!(function (n, t) {
  "object" == typeof module && "object" == typeof module.exports
    ? (module.exports = n.document
        ? t(n, !0)
        : function (n) {
            if (!n.document)
              throw new Error("jQuery requires a window with a document");
            return t(n);
          })
    : t(n);
})("undefined" != typeof window ? window : this, function (n, t) {
  function ii(n) {
    var t = !!n && "length" in n && n.length,
      r = i.type(n);
    return "function" === r || i.isWindow(n)
      ? !1
      : "array" === r ||
          0 === t ||
          ("number" == typeof t && t > 0 && t - 1 in n);
  }
  function ri(n, t, r) {
    if (i.isFunction(t))
      return i.grep(n, function (n, i) {
        return !!t.call(n, i, n) !== r;
      });
    if (t.nodeType)
      return i.grep(n, function (n) {
        return (n === t) !== r;
      });
    if ("string" == typeof t) {
      if (pe.test(t)) return i.filter(t, n, r);
      t = i.filter(t, n);
    }
    return i.grep(n, function (n) {
      return i.inArray(n, t) > -1 !== r;
    });
  }
  function kr(n, t) {
    do n = n[t];
    while (n && 1 !== n.nodeType);
    return n;
  }
  function we(n) {
    var t = {};
    return (
      i.each(n.match(s) || [], function (n, i) {
        t[i] = !0;
      }),
      t
    );
  }
  function dr() {
    u.addEventListener
      ? (u.removeEventListener("DOMContentLoaded", v),
        n.removeEventListener("load", v))
      : (u.detachEvent("onreadystatechange", v), n.detachEvent("onload", v));
  }
  function v() {
    (u.addEventListener ||
      "load" === n.event.type ||
      "complete" === u.readyState) &&
      (dr(), i.ready());
  }
  function nu(n, t, r) {
    if (void 0 === r && 1 === n.nodeType) {
      var u = "data-" + t.replace(ke, "-$1").toLowerCase();
      if (((r = n.getAttribute(u)), "string" == typeof r)) {
        try {
          r =
            "true" === r
              ? !0
              : "false" === r
              ? !1
              : "null" === r
              ? null
              : +r + "" === r
              ? +r
              : be.test(r)
              ? i.parseJSON(r)
              : r;
        } catch (f) {}
        i.data(n, t, r);
      } else r = void 0;
    }
    return r;
  }
  function fi(n) {
    for (var t in n)
      if (("data" !== t || !i.isEmptyObject(n[t])) && "toJSON" !== t) return !1;
    return !0;
  }
  function tu(n, t, r, u) {
    if (ot(n)) {
      var s,
        e,
        h = i.expando,
        l = n.nodeType,
        o = l ? i.cache : n,
        f = l ? n[h] : n[h] && h;
      if (
        (f && o[f] && (u || o[f].data)) ||
        void 0 !== r ||
        "string" != typeof t
      )
        return (
          f || (f = l ? (n[h] = c.pop() || i.guid++) : h),
          o[f] || (o[f] = l ? {} : { toJSON: i.noop }),
          ("object" != typeof t && "function" != typeof t) ||
            (u
              ? (o[f] = i.extend(o[f], t))
              : (o[f].data = i.extend(o[f].data, t))),
          (e = o[f]),
          u || (e.data || (e.data = {}), (e = e.data)),
          void 0 !== r && (e[i.camelCase(t)] = r),
          "string" == typeof t
            ? ((s = e[t]), null == s && (s = e[i.camelCase(t)]))
            : (s = e),
          s
        );
    }
  }
  function iu(n, t, u) {
    if (ot(n)) {
      var o,
        s,
        h = n.nodeType,
        f = h ? i.cache : n,
        e = h ? n[i.expando] : i.expando;
      if (f[e]) {
        if (t && (o = u ? f[e] : f[e].data)) {
          for (
            i.isArray(t)
              ? (t = t.concat(i.map(t, i.camelCase)))
              : (t in o)
              ? (t = [t])
              : ((t = i.camelCase(t)), (t = (t in o) ? [t] : t.split(" "))),
              s = t.length;
            s--;

          )
            delete o[t[s]];
          if (u ? !fi(o) : !i.isEmptyObject(o)) return;
        }
        (u || (delete f[e].data, fi(f[e]))) &&
          (h
            ? i.cleanData([n], !0)
            : r.deleteExpando || f != f.window
            ? delete f[e]
            : (f[e] = void 0));
      }
    }
  }
  function ru(n, t, r, u) {
    var h,
      e = 1,
      l = 20,
      c = u
        ? function () {
            return u.cur();
          }
        : function () {
            return i.css(n, t, "");
          },
      s = c(),
      o = (r && r[3]) || (i.cssNumber[t] ? "" : "px"),
      f = (i.cssNumber[t] || ("px" !== o && +s)) && oi.exec(i.css(n, t));
    if (f && f[3] !== o) {
      o = o || f[3];
      r = r || [];
      f = +s || 1;
      do (e = e || ".5"), (f /= e), i.style(n, t, f + o);
      while (e !== (e = c() / s) && 1 !== e && --l);
    }
    return (
      r &&
        ((f = +f || +s || 0),
        (h = r[1] ? f + (r[1] + 1) * r[2] : +r[2]),
        u && ((u.unit = o), (u.start = f), (u.end = h))),
      h
    );
  }
  function ou(n) {
    var i = eu.split("|"),
      t = n.createDocumentFragment();
    if (t.createElement) while (i.length) t.createElement(i.pop());
    return t;
  }
  function f(n, t) {
    var e,
      u,
      o = 0,
      r =
        "undefined" != typeof n.getElementsByTagName
          ? n.getElementsByTagName(t || "*")
          : "undefined" != typeof n.querySelectorAll
          ? n.querySelectorAll(t || "*")
          : void 0;
    if (!r)
      for (r = [], e = n.childNodes || n; null != (u = e[o]); o++)
        !t || i.nodeName(u, t) ? r.push(u) : i.merge(r, f(u, t));
    return void 0 === t || (t && i.nodeName(n, t)) ? i.merge([n], r) : r;
  }
  function ci(n, t) {
    for (var u, r = 0; null != (u = n[r]); r++)
      i._data(u, "globalEval", !t || i._data(t[r], "globalEval"));
  }
  function de(n) {
    si.test(n.type) && (n.defaultChecked = n.checked);
  }
  function hu(n, t, u, e, s) {
    for (
      var l, h, k, c, w, b, v, d = n.length, y = ou(t), a = [], p = 0;
      d > p;
      p++
    )
      if (((h = n[p]), h || 0 === h))
        if ("object" === i.type(h)) i.merge(a, h.nodeType ? [h] : h);
        else if (su.test(h)) {
          for (
            c = c || y.appendChild(t.createElement("div")),
              w = (uu.exec(h) || ["", ""])[1].toLowerCase(),
              v = o[w] || o._default,
              c.innerHTML = v[1] + i.htmlPrefilter(h) + v[2],
              l = v[0];
            l--;

          )
            c = c.lastChild;
          if (
            (!r.leadingWhitespace &&
              hi.test(h) &&
              a.push(t.createTextNode(hi.exec(h)[0])),
            !r.tbody)
          )
            for (
              h =
                "table" !== w || li.test(h)
                  ? "<table>" !== v[1] || li.test(h)
                    ? 0
                    : c
                  : c.firstChild,
                l = h && h.childNodes.length;
              l--;

            )
              i.nodeName((b = h.childNodes[l]), "tbody") &&
                !b.childNodes.length &&
                h.removeChild(b);
          for (i.merge(a, c.childNodes), c.textContent = ""; c.firstChild; )
            c.removeChild(c.firstChild);
          c = y.lastChild;
        } else a.push(t.createTextNode(h));
    for (
      c && y.removeChild(c),
        r.appendChecked || i.grep(f(a, "input"), de),
        p = 0;
      (h = a[p++]);

    )
      if (e && i.inArray(h, e) > -1) s && s.push(h);
      else if (
        ((k = i.contains(h.ownerDocument, h)),
        (c = f(y.appendChild(h), "script")),
        k && ci(c),
        u)
      )
        for (l = 0; (h = c[l++]); ) fu.test(h.type || "") && u.push(h);
    return (c = null), y;
  }
  function vt() {
    return !0;
  }
  function rt() {
    return !1;
  }
  function au() {
    try {
      return u.activeElement;
    } catch (n) {}
  }
  function vi(n, t, r, u, f, e) {
    var o, s;
    if ("object" == typeof t) {
      "string" != typeof r && ((u = u || r), (r = void 0));
      for (s in t) vi(n, s, r, u, t[s], e);
      return n;
    }
    if (
      (null == u && null == f
        ? ((f = r), (u = r = void 0))
        : null == f &&
          ("string" == typeof r
            ? ((f = u), (u = void 0))
            : ((f = u), (u = r), (r = void 0))),
      f === !1)
    )
      f = rt;
    else if (!f) return n;
    return (
      1 === e &&
        ((o = f),
        (f = function (n) {
          return i().off(n), o.apply(this, arguments);
        }),
        (f.guid = o.guid || (o.guid = i.guid++))),
      n.each(function () {
        i.event.add(this, t, f, u, r);
      })
    );
  }
  function yu(n, t) {
    return i.nodeName(n, "table") &&
      i.nodeName(11 !== t.nodeType ? t : t.firstChild, "tr")
      ? n.getElementsByTagName("tbody")[0] ||
          n.appendChild(n.ownerDocument.createElement("tbody"))
      : n;
  }
  function pu(n) {
    return (n.type = (null !== i.find.attr(n, "type")) + "/" + n.type), n;
  }
  function wu(n) {
    var t = fo.exec(n.type);
    return t ? (n.type = t[1]) : n.removeAttribute("type"), n;
  }
  function bu(n, t) {
    if (1 === t.nodeType && i.hasData(n)) {
      var u,
        f,
        o,
        s = i._data(n),
        r = i._data(t, s),
        e = s.events;
      if (e) {
        delete r.handle;
        r.events = {};
        for (u in e)
          for (f = 0, o = e[u].length; o > f; f++) i.event.add(t, u, e[u][f]);
      }
      r.data && (r.data = i.extend({}, r.data));
    }
  }
  function so(n, t) {
    var u, e, f;
    if (1 === t.nodeType) {
      if (((u = t.nodeName.toLowerCase()), !r.noCloneEvent && t[i.expando])) {
        f = i._data(t);
        for (e in f.events) i.removeEvent(t, e, f.handle);
        t.removeAttribute(i.expando);
      }
      "script" === u && t.text !== n.text
        ? ((pu(t).text = n.text), wu(t))
        : "object" === u
        ? (t.parentNode && (t.outerHTML = n.outerHTML),
          r.html5Clone &&
            n.innerHTML &&
            !i.trim(t.innerHTML) &&
            (t.innerHTML = n.innerHTML))
        : "input" === u && si.test(n.type)
        ? ((t.defaultChecked = t.checked = n.checked),
          t.value !== n.value && (t.value = n.value))
        : "option" === u
        ? (t.defaultSelected = t.selected = n.defaultSelected)
        : ("input" !== u && "textarea" !== u) ||
          (t.defaultValue = n.defaultValue);
    }
  }
  function k(n, t, u, e) {
    t = sr.apply([], t);
    var l,
      o,
      a,
      h,
      p,
      c,
      s = 0,
      v = n.length,
      b = v - 1,
      y = t[0],
      w = i.isFunction(y);
    if (w || (v > 1 && "string" == typeof y && !r.checkClone && uo.test(y)))
      return n.each(function (i) {
        var r = n.eq(i);
        w && (t[0] = y.call(this, i, r.html()));
        k(r, t, u, e);
      });
    if (
      v &&
      ((c = hu(t, n[0].ownerDocument, !1, n, e)),
      (l = c.firstChild),
      1 === c.childNodes.length && (c = l),
      l || e)
    ) {
      for (h = i.map(f(c, "script"), pu), a = h.length; v > s; s++)
        (o = c),
          s !== b &&
            ((o = i.clone(o, !0, !0)), a && i.merge(h, f(o, "script"))),
          u.call(n[s], o, s);
      if (a)
        for (p = h[h.length - 1].ownerDocument, i.map(h, wu), s = 0; a > s; s++)
          (o = h[s]),
            fu.test(o.type || "") &&
              !i._data(o, "globalEval") &&
              i.contains(p, o) &&
              (o.src
                ? i._evalUrl && i._evalUrl(o.src)
                : i.globalEval(
                    (o.text || o.textContent || o.innerHTML || "").replace(
                      eo,
                      ""
                    )
                  ));
      c = l = null;
    }
    return n;
  }
  function ku(n, t, r) {
    for (var u, o = t ? i.filter(t, n) : n, e = 0; null != (u = o[e]); e++)
      r || 1 !== u.nodeType || i.cleanData(f(u)),
        u.parentNode &&
          (r && i.contains(u.ownerDocument, u) && ci(f(u, "script")),
          u.parentNode.removeChild(u));
    return n;
  }
  function du(n, t) {
    var r = i(t.createElement(n)).appendTo(t.body),
      u = i.css(r[0], "display");
    return r.detach(), u;
  }
  function yt(n) {
    var r = u,
      t = pi[n];
    return (
      t ||
        ((t = du(n, r)),
        ("none" !== t && t) ||
          ((ht = (
            ht || i("<iframe frameborder='0' width='0' height='0'/>")
          ).appendTo(r.documentElement)),
          (r = (ht[0].contentWindow || ht[0].contentDocument).document),
          r.write(),
          r.close(),
          (t = du(n, r)),
          ht.detach()),
        (pi[n] = t)),
      t
    );
  }
  function bi(n, t) {
    return {
      get: function () {
        return n()
          ? void delete this.get
          : (this.get = t).apply(this, arguments);
      },
    };
  }
  function ef(n) {
    if (n in ff) return n;
    for (var i = n.charAt(0).toUpperCase() + n.slice(1), t = uf.length; t--; )
      if (((n = uf[t] + i), n in ff)) return n;
  }
  function of(n, t) {
    for (var f, r, o, e = [], u = 0, s = n.length; s > u; u++)
      (r = n[u]),
        r.style &&
          ((e[u] = i._data(r, "olddisplay")),
          (f = r.style.display),
          t
            ? (e[u] || "none" !== f || (r.style.display = ""),
              "" === r.style.display &&
                st(r) &&
                (e[u] = i._data(r, "olddisplay", yt(r.nodeName))))
            : ((o = st(r)),
              ((f && "none" !== f) || !o) &&
                i._data(r, "olddisplay", o ? f : i.css(r, "display"))));
    for (u = 0; s > u; u++)
      (r = n[u]),
        r.style &&
          ((t && "none" !== r.style.display && "" !== r.style.display) ||
            (r.style.display = t ? e[u] || "" : "none"));
    return n;
  }
  function sf(n, t, i) {
    var r = lo.exec(t);
    return r ? Math.max(0, r[1] - (i || 0)) + (r[2] || "px") : t;
  }
  function hf(n, t, r, u, f) {
    for (
      var e = r === (u ? "border" : "content") ? 4 : "width" === t ? 1 : 0,
        o = 0;
      4 > e;
      e += 2
    )
      "margin" === r && (o += i.css(n, r + b[e], !0, f)),
        u
          ? ("content" === r && (o -= i.css(n, "padding" + b[e], !0, f)),
            "margin" !== r && (o -= i.css(n, "border" + b[e] + "Width", !0, f)))
          : ((o += i.css(n, "padding" + b[e], !0, f)),
            "padding" !== r &&
              (o += i.css(n, "border" + b[e] + "Width", !0, f)));
    return o;
  }
  function cf(n, t, u) {
    var o = !0,
      f = "width" === t ? n.offsetWidth : n.offsetHeight,
      e = d(n),
      s = r.boxSizing && "border-box" === i.css(n, "boxSizing", !1, e);
    if (0 >= f || null == f) {
      if (
        ((f = p(n, t, e)), (0 > f || null == f) && (f = n.style[t]), pt.test(f))
      )
        return f;
      o = s && (r.boxSizingReliable() || f === n.style[t]);
      f = parseFloat(f) || 0;
    }
    return f + hf(n, t, u || (s ? "border" : "content"), o, e) + "px";
  }
  function e(n, t, i, r, u) {
    return new e.prototype.init(n, t, i, r, u);
  }
  function vf() {
    return (
      n.setTimeout(function () {
        ut = void 0;
      }),
      (ut = i.now())
    );
  }
  function bt(n, t) {
    var r,
      i = { height: n },
      u = 0;
    for (t = t ? 1 : 0; 4 > u; u += 2 - t)
      (r = b[u]), (i["margin" + r] = i["padding" + r] = n);
    return t && (i.opacity = i.width = n), i;
  }
  function yf(n, t, i) {
    for (
      var u,
        f = (h.tweeners[t] || []).concat(h.tweeners["*"]),
        r = 0,
        e = f.length;
      e > r;
      r++
    )
      if ((u = f[r].call(i, t, n))) return u;
  }
  function vo(n, t, u) {
    var f,
      a,
      p,
      v,
      s,
      w,
      h,
      b,
      l = this,
      y = {},
      o = n.style,
      c = n.nodeType && st(n),
      e = i._data(n, "fxshow");
    u.queue ||
      ((s = i._queueHooks(n, "fx")),
      null == s.unqueued &&
        ((s.unqueued = 0),
        (w = s.empty.fire),
        (s.empty.fire = function () {
          s.unqueued || w();
        })),
      s.unqueued++,
      l.always(function () {
        l.always(function () {
          s.unqueued--;
          i.queue(n, "fx").length || s.empty.fire();
        });
      }));
    1 === n.nodeType &&
      ("height" in t || "width" in t) &&
      ((u.overflow = [o.overflow, o.overflowX, o.overflowY]),
      (h = i.css(n, "display")),
      (b = "none" === h ? i._data(n, "olddisplay") || yt(n.nodeName) : h),
      "inline" === b &&
        "none" === i.css(n, "float") &&
        (r.inlineBlockNeedsLayout && "inline" !== yt(n.nodeName)
          ? (o.zoom = 1)
          : (o.display = "inline-block")));
    u.overflow &&
      ((o.overflow = "hidden"),
      r.shrinkWrapBlocks() ||
        l.always(function () {
          o.overflow = u.overflow[0];
          o.overflowX = u.overflow[1];
          o.overflowY = u.overflow[2];
        }));
    for (f in t)
      if (((a = t[f]), lf.exec(a))) {
        if (
          (delete t[f], (p = p || "toggle" === a), a === (c ? "hide" : "show"))
        ) {
          if ("show" !== a || !e || void 0 === e[f]) continue;
          c = !0;
        }
        y[f] = (e && e[f]) || i.style(n, f);
      } else h = void 0;
    if (i.isEmptyObject(y))
      "inline" === ("none" === h ? yt(n.nodeName) : h) && (o.display = h);
    else {
      e ? "hidden" in e && (c = e.hidden) : (e = i._data(n, "fxshow", {}));
      p && (e.hidden = !c);
      c
        ? i(n).show()
        : l.done(function () {
            i(n).hide();
          });
      l.done(function () {
        var t;
        i._removeData(n, "fxshow");
        for (t in y) i.style(n, t, y[t]);
      });
      for (f in y)
        (v = yf(c ? e[f] : 0, f, l)),
          f in e ||
            ((e[f] = v.start),
            c &&
              ((v.end = v.start),
              (v.start = "width" === f || "height" === f ? 1 : 0)));
    }
  }
  function yo(n, t) {
    var r, f, e, u, o;
    for (r in n)
      if (
        ((f = i.camelCase(r)),
        (e = t[f]),
        (u = n[r]),
        i.isArray(u) && ((e = u[1]), (u = n[r] = u[0])),
        r !== f && ((n[f] = u), delete n[r]),
        (o = i.cssHooks[f]),
        o && "expand" in o)
      ) {
        u = o.expand(u);
        delete n[f];
        for (r in u) r in n || ((n[r] = u[r]), (t[r] = e));
      } else t[f] = e;
  }
  function h(n, t, r) {
    var e,
      o,
      s = 0,
      a = h.prefilters.length,
      f = i.Deferred().always(function () {
        delete l.elem;
      }),
      l = function () {
        if (o) return !1;
        for (
          var s = ut || vf(),
            t = Math.max(0, u.startTime + u.duration - s),
            h = t / u.duration || 0,
            i = 1 - h,
            r = 0,
            e = u.tweens.length;
          e > r;
          r++
        )
          u.tweens[r].run(i);
        return (
          f.notifyWith(n, [u, i, t]),
          1 > i && e ? t : (f.resolveWith(n, [u]), !1)
        );
      },
      u = f.promise({
        elem: n,
        props: i.extend({}, t),
        opts: i.extend(!0, { specialEasing: {}, easing: i.easing._default }, r),
        originalProperties: t,
        originalOptions: r,
        startTime: ut || vf(),
        duration: r.duration,
        tweens: [],
        createTween: function (t, r) {
          var f = i.Tween(
            n,
            u.opts,
            t,
            r,
            u.opts.specialEasing[t] || u.opts.easing
          );
          return u.tweens.push(f), f;
        },
        stop: function (t) {
          var i = 0,
            r = t ? u.tweens.length : 0;
          if (o) return this;
          for (o = !0; r > i; i++) u.tweens[i].run(1);
          return (
            t
              ? (f.notifyWith(n, [u, 1, 0]), f.resolveWith(n, [u, t]))
              : f.rejectWith(n, [u, t]),
            this
          );
        },
      }),
      c = u.props;
    for (yo(c, u.opts.specialEasing); a > s; s++)
      if ((e = h.prefilters[s].call(u, n, c, u.opts)))
        return (
          i.isFunction(e.stop) &&
            (i._queueHooks(u.elem, u.opts.queue).stop = i.proxy(e.stop, e)),
          e
        );
    return (
      i.map(c, yf, u),
      i.isFunction(u.opts.start) && u.opts.start.call(n, u),
      i.fx.timer(i.extend(l, { elem: n, anim: u, queue: u.opts.queue })),
      u
        .progress(u.opts.progress)
        .done(u.opts.done, u.opts.complete)
        .fail(u.opts.fail)
        .always(u.opts.always)
    );
  }
  function nt(n) {
    return i.attr(n, "class") || "";
  }
  function re(n) {
    return function (t, r) {
      "string" != typeof t && ((r = t), (t = "*"));
      var u,
        f = 0,
        e = t.toLowerCase().match(s) || [];
      if (i.isFunction(r))
        while ((u = e[f++]))
          "+" === u.charAt(0)
            ? ((u = u.slice(1) || "*"), (n[u] = n[u] || []).unshift(r))
            : (n[u] = n[u] || []).push(r);
    };
  }
  function ue(n, t, r, u) {
    function e(s) {
      var h;
      return (
        (f[s] = !0),
        i.each(n[s] || [], function (n, i) {
          var s = i(t, r, u);
          return "string" != typeof s || o || f[s]
            ? o
              ? !(h = s)
              : void 0
            : (t.dataTypes.unshift(s), e(s), !1);
        }),
        h
      );
    }
    var f = {},
      o = n === tr;
    return e(t.dataTypes[0]) || (!f["*"] && e("*"));
  }
  function rr(n, t) {
    var u,
      r,
      f = i.ajaxSettings.flatOptions || {};
    for (r in t) void 0 !== t[r] && ((f[r] ? n : u || (u = {}))[r] = t[r]);
    return u && i.extend(!0, n, u), n;
  }
  function ts(n, t, i) {
    for (var o, e, u, f, s = n.contents, r = n.dataTypes; "*" === r[0]; )
      r.shift(),
        void 0 === e && (e = n.mimeType || t.getResponseHeader("Content-Type"));
    if (e)
      for (f in s)
        if (s[f] && s[f].test(e)) {
          r.unshift(f);
          break;
        }
    if (r[0] in i) u = r[0];
    else {
      for (f in i) {
        if (!r[0] || n.converters[f + " " + r[0]]) {
          u = f;
          break;
        }
        o || (o = f);
      }
      u = u || o;
    }
    if (u) return u !== r[0] && r.unshift(u), i[u];
  }
  function is(n, t, i, r) {
    var h,
      u,
      f,
      s,
      e,
      o = {},
      c = n.dataTypes.slice();
    if (c[1]) for (f in n.converters) o[f.toLowerCase()] = n.converters[f];
    for (u = c.shift(); u; )
      if (
        (n.responseFields[u] && (i[n.responseFields[u]] = t),
        !e && r && n.dataFilter && (t = n.dataFilter(t, n.dataType)),
        (e = u),
        (u = c.shift()))
      )
        if ("*" === u) u = e;
        else if ("*" !== e && e !== u) {
          if (((f = o[e + " " + u] || o["* " + u]), !f))
            for (h in o)
              if (
                ((s = h.split(" ")),
                s[1] === u && (f = o[e + " " + s[0]] || o["* " + s[0]]))
              ) {
                f === !0
                  ? (f = o[h])
                  : o[h] !== !0 && ((u = s[0]), c.unshift(s[1]));
                break;
              }
          if (f !== !0)
            if (f && n.throws) t = f(t);
            else
              try {
                t = f(t);
              } catch (l) {
                return {
                  state: "parsererror",
                  error: f ? l : "No conversion from " + e + " to " + u,
                };
              }
        }
    return { state: "success", data: t };
  }
  function rs(n) {
    return (n.style && n.style.display) || i.css(n, "display");
  }
  function us(n) {
    if (!i.contains(n.ownerDocument || u, n)) return !0;
    while (n && 1 === n.nodeType) {
      if ("none" === rs(n) || "hidden" === n.type) return !0;
      n = n.parentNode;
    }
    return !1;
  }
  function ur(n, t, r, u) {
    var f;
    if (i.isArray(t))
      i.each(t, function (t, i) {
        r || es.test(n)
          ? u(n, i)
          : ur(
              n + "[" + ("object" == typeof i && null != i ? t : "") + "]",
              i,
              r,
              u
            );
      });
    else if (r || "object" !== i.type(t)) u(n, t);
    else for (f in t) ur(n + "[" + f + "]", t[f], r, u);
  }
  function fr() {
    try {
      return new n.XMLHttpRequest();
    } catch (t) {}
  }
  function ee() {
    try {
      return new n.ActiveXObject("Microsoft.XMLHTTP");
    } catch (t) {}
  }
  function oe(n) {
    return i.isWindow(n)
      ? n
      : 9 === n.nodeType
      ? n.defaultView || n.parentWindow
      : !1;
  }
  var c = [],
    u = n.document,
    a = c.slice,
    sr = c.concat,
    ti = c.push,
    hr = c.indexOf,
    lt = {},
    ce = lt.toString,
    tt = lt.hasOwnProperty,
    r = {},
    cr = "3.7.0",
    i = function (n, t) {
      return new i.fn.init(n, t);
    },
    le = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
    ae = /^-ms-/,
    ve = /-([\da-z])/gi,
    ye = function (n, t) {
      return t.toUpperCase();
    },
    w,
    ui,
    yr,
    pr,
    wr,
    br,
    s,
    at,
    gr,
    o,
    su,
    li,
    ht,
    pi,
    d,
    p,
    tf,
    ut,
    wt,
    lf,
    af,
    pf,
    wf,
    kf,
    df,
    dt,
    er,
    ni,
    or,
    se,
    he;
  i.fn = i.prototype = {
    jquery: cr,
    constructor: i,
    selector: "",
    length: 0,
    toArray: function () {
      return a.call(this);
    },
    get: function (n) {
      return null != n
        ? 0 > n
          ? this[n + this.length]
          : this[n]
        : a.call(this);
    },
    pushStack: function (n) {
      var t = i.merge(this.constructor(), n);
      return (t.prevObject = this), (t.context = this.context), t;
    },
    each: function (n) {
      return i.each(this, n);
    },
    map: function (n) {
      return this.pushStack(
        i.map(this, function (t, i) {
          return n.call(t, i, t);
        })
      );
    },
    slice: function () {
      return this.pushStack(a.apply(this, arguments));
    },
    first: function () {
      return this.eq(0);
    },
    last: function () {
      return this.eq(-1);
    },
    eq: function (n) {
      var i = this.length,
        t = +n + (0 > n ? i : 0);
      return this.pushStack(t >= 0 && i > t ? [this[t]] : []);
    },
    end: function () {
      return this.prevObject || this.constructor();
    },
    push: ti,
    sort: c.sort,
    splice: c.splice,
  };
  i.extend = i.fn.extend = function () {
    var r,
      e,
      t,
      f,
      o,
      s,
      n = arguments[0] || {},
      u = 1,
      c = arguments.length,
      h = !1;
    for (
      "boolean" == typeof n && ((h = n), (n = arguments[u] || {}), u++),
        "object" == typeof n || i.isFunction(n) || (n = {}),
        u === c && ((n = this), u--);
      c > u;
      u++
    )
      if (null != (o = arguments[u]))
        for (f in o)
          (r = n[f]),
            (t = o[f]),
            f !== "__proto__" &&
              n !== t &&
              (h && t && (i.isPlainObject(t) || (e = i.isArray(t)))
                ? (e
                    ? ((e = !1), (s = r && i.isArray(r) ? r : []))
                    : (s = r && i.isPlainObject(r) ? r : {}),
                  (n[f] = i.extend(h, s, t)))
                : void 0 !== t && (n[f] = t));
    return n;
  };
  i.extend({
    expando: "jQuery" + (cr + Math.random()).replace(/\D/g, ""),
    isReady: !0,
    error: function (n) {
      throw new Error(n);
    },
    noop: function () {},
    isFunction: function (n) {
      return "function" === i.type(n);
    },
    isArray:
      Array.isArray ||
      function (n) {
        return "array" === i.type(n);
      },
    isWindow: function (n) {
      return null != n && n == n.window;
    },
    isNumeric: function (n) {
      var t = n && n.toString();
      return !i.isArray(n) && t - parseFloat(t) + 1 >= 0;
    },
    isEmptyObject: function (n) {
      for (var t in n) return !1;
      return !0;
    },
    isPlainObject: function (n) {
      var t;
      if (!n || "object" !== i.type(n) || n.nodeType || i.isWindow(n))
        return !1;
      try {
        if (
          n.constructor &&
          !tt.call(n, "constructor") &&
          !tt.call(n.constructor.prototype, "isPrototypeOf")
        )
          return !1;
      } catch (u) {
        return !1;
      }
      if (!r.ownFirst) for (t in n) return tt.call(n, t);
      for (t in n);
      return void 0 === t || tt.call(n, t);
    },
    type: function (n) {
      return null == n
        ? n + ""
        : "object" == typeof n || "function" == typeof n
        ? lt[ce.call(n)] || "object"
        : typeof n;
    },
    globalEval: function (t) {
      t &&
        i.trim(t) &&
        (
          n.execScript ||
          function (t) {
            n.eval.call(n, t);
          }
        )(t);
    },
    camelCase: function (n) {
      return n.replace(ae, "ms-").replace(ve, ye);
    },
    nodeName: function (n, t) {
      return n.nodeName && n.nodeName.toLowerCase() === t.toLowerCase();
    },
    each: function (n, t) {
      var r,
        i = 0;
      if (ii(n)) {
        for (r = n.length; r > i; i++) if (t.call(n[i], i, n[i]) === !1) break;
      } else for (i in n) if (t.call(n[i], i, n[i]) === !1) break;
      return n;
    },
    trim: function (n) {
      return null == n ? "" : (n + "").replace(le, "");
    },
    makeArray: function (n, t) {
      var r = t || [];
      return (
        null != n &&
          (ii(Object(n))
            ? i.merge(r, "string" == typeof n ? [n] : n)
            : ti.call(r, n)),
        r
      );
    },
    inArray: function (n, t, i) {
      var r;
      if (t) {
        if (hr) return hr.call(t, n, i);
        for (
          r = t.length, i = i ? (0 > i ? Math.max(0, r + i) : i) : 0;
          r > i;
          i++
        )
          if (i in t && t[i] === n) return i;
      }
      return -1;
    },
    merge: function (n, t) {
      for (var r = +t.length, i = 0, u = n.length; r > i; ) n[u++] = t[i++];
      if (r !== r) while (void 0 !== t[i]) n[u++] = t[i++];
      return (n.length = u), n;
    },
    grep: function (n, t, i) {
      for (var u, f = [], r = 0, e = n.length, o = !i; e > r; r++)
        (u = !t(n[r], r)), u !== o && f.push(n[r]);
      return f;
    },
    map: function (n, t, i) {
      var e,
        u,
        r = 0,
        f = [];
      if (ii(n))
        for (e = n.length; e > r; r++)
          (u = t(n[r], r, i)), null != u && f.push(u);
      else for (r in n) (u = t(n[r], r, i)), null != u && f.push(u);
      return sr.apply([], f);
    },
    guid: 1,
    proxy: function (n, t) {
      var u, r, f;
      return (
        "string" == typeof t && ((f = n[t]), (t = n), (n = f)),
        i.isFunction(n)
          ? ((u = a.call(arguments, 2)),
            (r = function () {
              return n.apply(t || this, u.concat(a.call(arguments)));
            }),
            (r.guid = n.guid = n.guid || i.guid++),
            r)
          : void 0
      );
    },
    now: function () {
      return +new Date();
    },
    support: r,
  });
  "function" == typeof Symbol && (i.fn[Symbol.iterator] = c[Symbol.iterator]);
  i.each(
    "Boolean Number String Function Array Date RegExp Object Error Symbol".split(
      " "
    ),
    function (n, t) {
      lt["[object " + t + "]"] = t.toLowerCase();
    }
  );
  w = (function (n) {
    function u(n, t, r, u) {
      var l,
        w,
        a,
        s,
        nt,
        d,
        y,
        g,
        p = t && t.ownerDocument,
        v = t ? t.nodeType : 9;
      if (
        ((r = r || []),
        "string" != typeof n || !n || (1 !== v && 9 !== v && 11 !== v))
      )
        return r;
      if (
        !u &&
        ((t ? t.ownerDocument || t : c) !== i && b(t), (t = t || i), h)
      ) {
        if (11 !== v && (d = sr.exec(n)))
          if ((l = d[1])) {
            if (9 === v) {
              if (!(a = t.getElementById(l))) return r;
              if (a.id === l) return r.push(a), r;
            } else if (p && (a = p.getElementById(l)) && et(t, a) && a.id === l)
              return r.push(a), r;
          } else {
            if (d[2]) return k.apply(r, t.getElementsByTagName(n)), r;
            if (
              (l = d[3]) &&
              f.getElementsByClassName &&
              t.getElementsByClassName
            )
              return k.apply(r, t.getElementsByClassName(l)), r;
          }
        if (f.qsa && !lt[n + " "] && (!o || !o.test(n))) {
          if (1 !== v) (p = t), (g = n);
          else if ("object" !== t.nodeName.toLowerCase()) {
            for (
              (s = t.getAttribute("id"))
                ? (s = s.replace(hr, "\\$&"))
                : t.setAttribute("id", (s = e)),
                y = ft(n),
                w = y.length,
                nt = yi.test(s) ? "#" + s : "[id='" + s + "']";
              w--;

            )
              y[w] = nt + " " + yt(y[w]);
            g = y.join(",");
            p = (gt.test(n) && ii(t.parentNode)) || t;
          }
          if (g)
            try {
              return k.apply(r, p.querySelectorAll(g)), r;
            } catch (tt) {
            } finally {
              s === e && t.removeAttribute("id");
            }
        }
      }
      return si(n.replace(at, "$1"), t, r, u);
    }
    function ni() {
      function n(r, u) {
        return (
          i.push(r + " ") > t.cacheLength && delete n[i.shift()],
          (n[r + " "] = u)
        );
      }
      var i = [];
      return n;
    }
    function l(n) {
      return (n[e] = !0), n;
    }
    function a(n) {
      var t = i.createElement("div");
      try {
        return !!n(t);
      } catch (r) {
        return !1;
      } finally {
        t.parentNode && t.parentNode.removeChild(t);
        t = null;
      }
    }
    function ti(n, i) {
      for (var r = n.split("|"), u = r.length; u--; ) t.attrHandle[r[u]] = i;
    }
    function wi(n, t) {
      var i = t && n,
        r =
          i &&
          1 === n.nodeType &&
          1 === t.nodeType &&
          (~t.sourceIndex || li) - (~n.sourceIndex || li);
      if (r) return r;
      if (i) while ((i = i.nextSibling)) if (i === t) return -1;
      return n ? 1 : -1;
    }
    function cr(n) {
      return function (t) {
        var i = t.nodeName.toLowerCase();
        return "input" === i && t.type === n;
      };
    }
    function lr(n) {
      return function (t) {
        var i = t.nodeName.toLowerCase();
        return ("input" === i || "button" === i) && t.type === n;
      };
    }
    function it(n) {
      return l(function (t) {
        return (
          (t = +t),
          l(function (i, r) {
            for (var u, f = n([], i.length, t), e = f.length; e--; )
              i[(u = f[e])] && (i[u] = !(r[u] = i[u]));
          })
        );
      });
    }
    function ii(n) {
      return n && "undefined" != typeof n.getElementsByTagName && n;
    }
    function bi() {}
    function yt(n) {
      for (var t = 0, r = n.length, i = ""; r > t; t++) i += n[t].value;
      return i;
    }
    function ri(n, t, i) {
      var r = t.dir,
        u = i && "parentNode" === r,
        f = ki++;
      return t.first
        ? function (t, i, f) {
            while ((t = t[r])) if (1 === t.nodeType || u) return n(t, i, f);
          }
        : function (t, i, o) {
            var s,
              h,
              c,
              l = [v, f];
            if (o) {
              while ((t = t[r]))
                if ((1 === t.nodeType || u) && n(t, i, o)) return !0;
            } else
              while ((t = t[r]))
                if (1 === t.nodeType || u) {
                  if (
                    ((c = t[e] || (t[e] = {})),
                    (h = c[t.uniqueID] || (c[t.uniqueID] = {})),
                    (s = h[r]) && s[0] === v && s[1] === f)
                  )
                    return (l[2] = s[2]);
                  if (((h[r] = l), (l[2] = n(t, i, o)))) return !0;
                }
          };
    }
    function ui(n) {
      return n.length > 1
        ? function (t, i, r) {
            for (var u = n.length; u--; ) if (!n[u](t, i, r)) return !1;
            return !0;
          }
        : n[0];
    }
    function ar(n, t, i) {
      for (var r = 0, f = t.length; f > r; r++) u(n, t[r], i);
      return i;
    }
    function pt(n, t, i, r, u) {
      for (var e, o = [], f = 0, s = n.length, h = null != t; s > f; f++)
        (e = n[f]) && ((i && !i(e, r, u)) || (o.push(e), h && t.push(f)));
      return o;
    }
    function fi(n, t, i, r, u, f) {
      return (
        r && !r[e] && (r = fi(r)),
        u && !u[e] && (u = fi(u, f)),
        l(function (f, e, o, s) {
          var l,
            c,
            a,
            p = [],
            y = [],
            w = e.length,
            b = f || ar(t || "*", o.nodeType ? [o] : o, []),
            v = !n || (!f && t) ? b : pt(b, p, n, o, s),
            h = i ? (u || (f ? n : w || r) ? [] : e) : v;
          if ((i && i(v, h, o, s), r))
            for (l = pt(h, y), r(l, [], o, s), c = l.length; c--; )
              (a = l[c]) && (h[y[c]] = !(v[y[c]] = a));
          if (f) {
            if (u || n) {
              if (u) {
                for (l = [], c = h.length; c--; )
                  (a = h[c]) && l.push((v[c] = a));
                u(null, (h = []), l, s);
              }
              for (c = h.length; c--; )
                (a = h[c]) &&
                  (l = u ? nt(f, a) : p[c]) > -1 &&
                  (f[l] = !(e[l] = a));
            }
          } else (h = pt(h === e ? h.splice(w, h.length) : h)), u ? u(null, e, h, s) : k.apply(e, h);
        })
      );
    }
    function ei(n) {
      for (
        var o,
          u,
          r,
          s = n.length,
          h = t.relative[n[0].type],
          c = h || t.relative[" "],
          i = h ? 1 : 0,
          l = ri(
            function (n) {
              return n === o;
            },
            c,
            !0
          ),
          a = ri(
            function (n) {
              return nt(o, n) > -1;
            },
            c,
            !0
          ),
          f = [
            function (n, t, i) {
              var r =
                (!h && (i || t !== ht)) ||
                ((o = t).nodeType ? l(n, t, i) : a(n, t, i));
              return (o = null), r;
            },
          ];
        s > i;
        i++
      )
        if ((u = t.relative[n[i].type])) f = [ri(ui(f), u)];
        else {
          if (((u = t.filter[n[i].type].apply(null, n[i].matches)), u[e])) {
            for (r = ++i; s > r; r++) if (t.relative[n[r].type]) break;
            return fi(
              i > 1 && ui(f),
              i > 1 &&
                yt(
                  n
                    .slice(0, i - 1)
                    .concat({ value: " " === n[i - 2].type ? "*" : "" })
                ).replace(at, "$1"),
              u,
              r > i && ei(n.slice(i, r)),
              s > r && ei((n = n.slice(r))),
              s > r && yt(n)
            );
          }
          f.push(u);
        }
      return ui(f);
    }
    function vr(n, r) {
      var f = r.length > 0,
        e = n.length > 0,
        o = function (o, s, c, l, a) {
          var y,
            nt,
            d,
            g = 0,
            p = "0",
            tt = o && [],
            w = [],
            it = ht,
            rt = o || (e && t.find.TAG("*", a)),
            ut = (v += null == it ? 1 : Math.random() || 0.1),
            ft = rt.length;
          for (
            a && (ht = s === i || s || a);
            p !== ft && null != (y = rt[p]);
            p++
          ) {
            if (e && y) {
              for (
                nt = 0, s || y.ownerDocument === i || (b(y), (c = !h));
                (d = n[nt++]);

              )
                if (d(y, s || i, c)) {
                  l.push(y);
                  break;
                }
              a && (v = ut);
            }
            f && ((y = !d && y) && g--, o && tt.push(y));
          }
          if (((g += p), f && p !== g)) {
            for (nt = 0; (d = r[nt++]); ) d(tt, w, s, c);
            if (o) {
              if (g > 0) while (p--) tt[p] || w[p] || (w[p] = gi.call(l));
              w = pt(w);
            }
            k.apply(l, w);
            a && !o && w.length > 0 && g + r.length > 1 && u.uniqueSort(l);
          }
          return a && ((v = ut), (ht = it)), tt;
        };
      return f ? l(o) : o;
    }
    var rt,
      f,
      t,
      st,
      oi,
      ft,
      wt,
      si,
      ht,
      w,
      ut,
      b,
      i,
      s,
      h,
      o,
      d,
      ct,
      et,
      e = "sizzle" + 1 * new Date(),
      c = n.document,
      v = 0,
      ki = 0,
      hi = ni(),
      ci = ni(),
      lt = ni(),
      bt = function (n, t) {
        return n === t && (ut = !0), 0;
      },
      li = -2147483648,
      di = {}.hasOwnProperty,
      g = [],
      gi = g.pop,
      nr = g.push,
      k = g.push,
      ai = g.slice,
      nt = function (n, t) {
        for (var i = 0, r = n.length; r > i; i++) if (n[i] === t) return i;
        return -1;
      },
      kt =
        "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
      r = "[\\x20\\t\\r\\n\\f]",
      tt = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
      vi =
        "\\[" +
        r +
        "*(" +
        tt +
        ")(?:" +
        r +
        "*([*^$|!~]?=)" +
        r +
        "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" +
        tt +
        "))|)" +
        r +
        "*\\]",
      dt =
        ":(" +
        tt +
        ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" +
        vi +
        ")*)|.*)\\)|)",
      tr = new RegExp(r + "+", "g"),
      at = new RegExp("^" + r + "+|((?:^|[^\\\\])(?:\\\\.)*)" + r + "+$", "g"),
      ir = new RegExp("^" + r + "*," + r + "*"),
      rr = new RegExp("^" + r + "*([>+~]|" + r + ")" + r + "*"),
      ur = new RegExp("=" + r + "*([^\\]'\"]*?)" + r + "*\\]", "g"),
      fr = new RegExp(dt),
      yi = new RegExp("^" + tt + "$"),
      vt = {
        ID: new RegExp("^#(" + tt + ")"),
        CLASS: new RegExp("^\\.(" + tt + ")"),
        TAG: new RegExp("^(" + tt + "|[*])"),
        ATTR: new RegExp("^" + vi),
        PSEUDO: new RegExp("^" + dt),
        CHILD: new RegExp(
          "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
            r +
            "*(even|odd|(([+-]|)(\\d*)n|)" +
            r +
            "*(?:([+-]|)" +
            r +
            "*(\\d+)|))" +
            r +
            "*\\)|)",
          "i"
        ),
        bool: new RegExp("^(?:" + kt + ")$", "i"),
        needsContext: new RegExp(
          "^" +
            r +
            "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
            r +
            "*((?:-\\d)?\\d*)" +
            r +
            "*\\)|)(?=[^-]|$)",
          "i"
        ),
      },
      er = /^(?:input|select|textarea|button)$/i,
      or = /^h\d$/i,
      ot = /^[^{]+\{\s*\[native \w/,
      sr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
      gt = /[+~]/,
      hr = /'|\\/g,
      y = new RegExp("\\\\([\\da-f]{1,6}" + r + "?|(" + r + ")|.)", "ig"),
      p = function (n, t, i) {
        var r = "0x" + t - 65536;
        return r !== r || i
          ? t
          : 0 > r
          ? String.fromCharCode(r + 65536)
          : String.fromCharCode((r >> 10) | 55296, (1023 & r) | 56320);
      },
      pi = function () {
        b();
      };
    try {
      k.apply((g = ai.call(c.childNodes)), c.childNodes);
      g[c.childNodes.length].nodeType;
    } catch (yr) {
      k = {
        apply: g.length
          ? function (n, t) {
              nr.apply(n, ai.call(t));
            }
          : function (n, t) {
              for (var i = n.length, r = 0; (n[i++] = t[r++]); );
              n.length = i - 1;
            },
      };
    }
    f = u.support = {};
    oi = u.isXML = function (n) {
      var t = n && (n.ownerDocument || n).documentElement;
      return t ? "HTML" !== t.nodeName : !1;
    };
    b = u.setDocument = function (n) {
      var v,
        u,
        l = n ? n.ownerDocument || n : c;
      return l !== i && 9 === l.nodeType && l.documentElement
        ? ((i = l),
          (s = i.documentElement),
          (h = !oi(i)),
          (u = i.defaultView) &&
            u.top !== u &&
            (u.addEventListener
              ? u.addEventListener("unload", pi, !1)
              : u.attachEvent && u.attachEvent("onunload", pi)),
          (f.attributes = a(function (n) {
            return (n.className = "i"), !n.getAttribute("className");
          })),
          (f.getElementsByTagName = a(function (n) {
            return (
              n.appendChild(i.createComment("")),
              !n.getElementsByTagName("*").length
            );
          })),
          (f.getElementsByClassName = ot.test(i.getElementsByClassName)),
          (f.getById = a(function (n) {
            return (
              (s.appendChild(n).id = e),
              !i.getElementsByName || !i.getElementsByName(e).length
            );
          })),
          f.getById
            ? ((t.find.ID = function (n, t) {
                if ("undefined" != typeof t.getElementById && h) {
                  var i = t.getElementById(n);
                  return i ? [i] : [];
                }
              }),
              (t.filter.ID = function (n) {
                var t = n.replace(y, p);
                return function (n) {
                  return n.getAttribute("id") === t;
                };
              }))
            : (delete t.find.ID,
              (t.filter.ID = function (n) {
                var t = n.replace(y, p);
                return function (n) {
                  var i =
                    "undefined" != typeof n.getAttributeNode &&
                    n.getAttributeNode("id");
                  return i && i.value === t;
                };
              })),
          (t.find.TAG = f.getElementsByTagName
            ? function (n, t) {
                return "undefined" != typeof t.getElementsByTagName
                  ? t.getElementsByTagName(n)
                  : f.qsa
                  ? t.querySelectorAll(n)
                  : void 0;
              }
            : function (n, t) {
                var i,
                  r = [],
                  f = 0,
                  u = t.getElementsByTagName(n);
                if ("*" === n) {
                  while ((i = u[f++])) 1 === i.nodeType && r.push(i);
                  return r;
                }
                return u;
              }),
          (t.find.CLASS =
            f.getElementsByClassName &&
            function (n, t) {
              if ("undefined" != typeof t.getElementsByClassName && h)
                return t.getElementsByClassName(n);
            }),
          (d = []),
          (o = []),
          (f.qsa = ot.test(i.querySelectorAll)) &&
            (a(function (n) {
              s.appendChild(n).innerHTML =
                "<a id='" +
                e +
                "'></a><select id='" +
                e +
                "-\r\\' msallowcapture=''><option selected=''></option></select>";
              n.querySelectorAll("[msallowcapture^='']").length &&
                o.push("[*^$]=" + r + "*(?:''|\"\")");
              n.querySelectorAll("[selected]").length ||
                o.push("\\[" + r + "*(?:value|" + kt + ")");
              n.querySelectorAll("[id~=" + e + "-]").length || o.push("~=");
              n.querySelectorAll(":checked").length || o.push(":checked");
              n.querySelectorAll("a#" + e + "+*").length || o.push(".#.+[+~]");
            }),
            a(function (n) {
              var t = i.createElement("input");
              t.setAttribute("type", "hidden");
              n.appendChild(t).setAttribute("name", "D");
              n.querySelectorAll("[name=d]").length &&
                o.push("name" + r + "*[*^$|!~]?=");
              n.querySelectorAll(":enabled").length ||
                o.push(":enabled", ":disabled");
              n.querySelectorAll("*,:x");
              o.push(",.*:");
            })),
          (f.matchesSelector = ot.test(
            (ct =
              s.matches ||
              s.webkitMatchesSelector ||
              s.mozMatchesSelector ||
              s.oMatchesSelector ||
              s.msMatchesSelector)
          )) &&
            a(function (n) {
              f.disconnectedMatch = ct.call(n, "div");
              ct.call(n, "[s!='']:x");
              d.push("!=", dt);
            }),
          (o = o.length && new RegExp(o.join("|"))),
          (d = d.length && new RegExp(d.join("|"))),
          (v = ot.test(s.compareDocumentPosition)),
          (et =
            v || ot.test(s.contains)
              ? function (n, t) {
                  var r = 9 === n.nodeType ? n.documentElement : n,
                    i = t && t.parentNode;
                  return (
                    n === i ||
                    !(
                      !i ||
                      1 !== i.nodeType ||
                      !(r.contains
                        ? r.contains(i)
                        : n.compareDocumentPosition &&
                          16 & n.compareDocumentPosition(i))
                    )
                  );
                }
              : function (n, t) {
                  if (t) while ((t = t.parentNode)) if (t === n) return !0;
                  return !1;
                }),
          (bt = v
            ? function (n, t) {
                if (n === t) return (ut = !0), 0;
                var r = !n.compareDocumentPosition - !t.compareDocumentPosition;
                return r
                  ? r
                  : ((r =
                      (n.ownerDocument || n) === (t.ownerDocument || t)
                        ? n.compareDocumentPosition(t)
                        : 1),
                    1 & r ||
                    (!f.sortDetached && t.compareDocumentPosition(n) === r)
                      ? n === i || (n.ownerDocument === c && et(c, n))
                        ? -1
                        : t === i || (t.ownerDocument === c && et(c, t))
                        ? 1
                        : w
                        ? nt(w, n) - nt(w, t)
                        : 0
                      : 4 & r
                      ? -1
                      : 1);
              }
            : function (n, t) {
                if (n === t) return (ut = !0), 0;
                var r,
                  u = 0,
                  o = n.parentNode,
                  s = t.parentNode,
                  f = [n],
                  e = [t];
                if (!o || !s)
                  return n === i
                    ? -1
                    : t === i
                    ? 1
                    : o
                    ? -1
                    : s
                    ? 1
                    : w
                    ? nt(w, n) - nt(w, t)
                    : 0;
                if (o === s) return wi(n, t);
                for (r = n; (r = r.parentNode); ) f.unshift(r);
                for (r = t; (r = r.parentNode); ) e.unshift(r);
                while (f[u] === e[u]) u++;
                return u
                  ? wi(f[u], e[u])
                  : f[u] === c
                  ? -1
                  : e[u] === c
                  ? 1
                  : 0;
              }),
          i)
        : i;
    };
    u.matches = function (n, t) {
      return u(n, null, null, t);
    };
    u.matchesSelector = function (n, t) {
      if (
        ((n.ownerDocument || n) !== i && b(n),
        (t = t.replace(ur, "='$1']")),
        f.matchesSelector &&
          h &&
          !lt[t + " "] &&
          (!d || !d.test(t)) &&
          (!o || !o.test(t)))
      )
        try {
          var r = ct.call(n, t);
          if (
            r ||
            f.disconnectedMatch ||
            (n.document && 11 !== n.document.nodeType)
          )
            return r;
        } catch (e) {}
      return u(t, i, null, [n]).length > 0;
    };
    u.contains = function (n, t) {
      return (n.ownerDocument || n) !== i && b(n), et(n, t);
    };
    u.attr = function (n, r) {
      (n.ownerDocument || n) !== i && b(n);
      var e = t.attrHandle[r.toLowerCase()],
        u = e && di.call(t.attrHandle, r.toLowerCase()) ? e(n, r, !h) : void 0;
      return void 0 !== u
        ? u
        : f.attributes || !h
        ? n.getAttribute(r)
        : (u = n.getAttributeNode(r)) && u.specified
        ? u.value
        : null;
    };
    u.error = function (n) {
      throw new Error("Syntax error, unrecognized expression: " + n);
    };
    u.uniqueSort = function (n) {
      var r,
        u = [],
        t = 0,
        i = 0;
      if (
        ((ut = !f.detectDuplicates),
        (w = !f.sortStable && n.slice(0)),
        n.sort(bt),
        ut)
      ) {
        while ((r = n[i++])) r === n[i] && (t = u.push(i));
        while (t--) n.splice(u[t], 1);
      }
      return (w = null), n;
    };
    st = u.getText = function (n) {
      var r,
        i = "",
        u = 0,
        t = n.nodeType;
      if (t) {
        if (1 === t || 9 === t || 11 === t) {
          if ("string" == typeof n.textContent) return n.textContent;
          for (n = n.firstChild; n; n = n.nextSibling) i += st(n);
        } else if (3 === t || 4 === t) return n.nodeValue;
      } else while ((r = n[u++])) i += st(r);
      return i;
    };
    t = u.selectors = {
      cacheLength: 50,
      createPseudo: l,
      match: vt,
      attrHandle: {},
      find: {},
      relative: {
        ">": { dir: "parentNode", first: !0 },
        " ": { dir: "parentNode" },
        "+": { dir: "previousSibling", first: !0 },
        "~": { dir: "previousSibling" },
      },
      preFilter: {
        ATTR: function (n) {
          return (
            (n[1] = n[1].replace(y, p)),
            (n[3] = (n[3] || n[4] || n[5] || "").replace(y, p)),
            "~=" === n[2] && (n[3] = " " + n[3] + " "),
            n.slice(0, 4)
          );
        },
        CHILD: function (n) {
          return (
            (n[1] = n[1].toLowerCase()),
            "nth" === n[1].slice(0, 3)
              ? (n[3] || u.error(n[0]),
                (n[4] = +(n[4]
                  ? n[5] + (n[6] || 1)
                  : 2 * ("even" === n[3] || "odd" === n[3]))),
                (n[5] = +(n[7] + n[8] || "odd" === n[3])))
              : n[3] && u.error(n[0]),
            n
          );
        },
        PSEUDO: function (n) {
          var i,
            t = !n[6] && n[2];
          return vt.CHILD.test(n[0])
            ? null
            : (n[3]
                ? (n[2] = n[4] || n[5] || "")
                : t &&
                  fr.test(t) &&
                  (i = ft(t, !0)) &&
                  (i = t.indexOf(")", t.length - i) - t.length) &&
                  ((n[0] = n[0].slice(0, i)), (n[2] = t.slice(0, i))),
              n.slice(0, 3));
        },
      },
      filter: {
        TAG: function (n) {
          var t = n.replace(y, p).toLowerCase();
          return "*" === n
            ? function () {
                return !0;
              }
            : function (n) {
                return n.nodeName && n.nodeName.toLowerCase() === t;
              };
        },
        CLASS: function (n) {
          var t = hi[n + " "];
          return (
            t ||
            ((t = new RegExp("(^|" + r + ")" + n + "(" + r + "|$)")) &&
              hi(n, function (n) {
                return t.test(
                  ("string" == typeof n.className && n.className) ||
                    ("undefined" != typeof n.getAttribute &&
                      n.getAttribute("class")) ||
                    ""
                );
              }))
          );
        },
        ATTR: function (n, t, i) {
          return function (r) {
            var f = u.attr(r, n);
            return null == f
              ? "!=" === t
              : t
              ? ((f += ""),
                "=" === t
                  ? f === i
                  : "!=" === t
                  ? f !== i
                  : "^=" === t
                  ? i && 0 === f.indexOf(i)
                  : "*=" === t
                  ? i && f.indexOf(i) > -1
                  : "$=" === t
                  ? i && f.slice(-i.length) === i
                  : "~=" === t
                  ? (" " + f.replace(tr, " ") + " ").indexOf(i) > -1
                  : "|=" === t
                  ? f === i || f.slice(0, i.length + 1) === i + "-"
                  : !1)
              : !0;
          };
        },
        CHILD: function (n, t, i, r, u) {
          var s = "nth" !== n.slice(0, 3),
            o = "last" !== n.slice(-4),
            f = "of-type" === t;
          return 1 === r && 0 === u
            ? function (n) {
                return !!n.parentNode;
              }
            : function (t, i, h) {
                var p,
                  w,
                  y,
                  c,
                  a,
                  b,
                  k = s !== o ? "nextSibling" : "previousSibling",
                  d = t.parentNode,
                  nt = f && t.nodeName.toLowerCase(),
                  g = !h && !f,
                  l = !1;
                if (d) {
                  if (s) {
                    while (k) {
                      for (c = t; (c = c[k]); )
                        if (
                          f ? c.nodeName.toLowerCase() === nt : 1 === c.nodeType
                        )
                          return !1;
                      b = k = "only" === n && !b && "nextSibling";
                    }
                    return !0;
                  }
                  if (((b = [o ? d.firstChild : d.lastChild]), o && g)) {
                    for (
                      c = d,
                        y = c[e] || (c[e] = {}),
                        w = y[c.uniqueID] || (y[c.uniqueID] = {}),
                        p = w[n] || [],
                        a = p[0] === v && p[1],
                        l = a && p[2],
                        c = a && d.childNodes[a];
                      (c = (++a && c && c[k]) || (l = a = 0) || b.pop());

                    )
                      if (1 === c.nodeType && ++l && c === t) {
                        w[n] = [v, a, l];
                        break;
                      }
                  } else if (
                    (g &&
                      ((c = t),
                      (y = c[e] || (c[e] = {})),
                      (w = y[c.uniqueID] || (y[c.uniqueID] = {})),
                      (p = w[n] || []),
                      (a = p[0] === v && p[1]),
                      (l = a)),
                    l === !1)
                  )
                    while ((c = (++a && c && c[k]) || (l = a = 0) || b.pop()))
                      if (
                        (f
                          ? c.nodeName.toLowerCase() === nt
                          : 1 === c.nodeType) &&
                        ++l &&
                        (g &&
                          ((y = c[e] || (c[e] = {})),
                          (w = y[c.uniqueID] || (y[c.uniqueID] = {})),
                          (w[n] = [v, l])),
                        c === t)
                      )
                        break;
                  return (l -= u), l === r || (l % r == 0 && l / r >= 0);
                }
              };
        },
        PSEUDO: function (n, i) {
          var f,
            r =
              t.pseudos[n] ||
              t.setFilters[n.toLowerCase()] ||
              u.error("unsupported pseudo: " + n);
          return r[e]
            ? r(i)
            : r.length > 1
            ? ((f = [n, n, "", i]),
              t.setFilters.hasOwnProperty(n.toLowerCase())
                ? l(function (n, t) {
                    for (var u, f = r(n, i), e = f.length; e--; )
                      (u = nt(n, f[e])), (n[u] = !(t[u] = f[e]));
                  })
                : function (n) {
                    return r(n, 0, f);
                  })
            : r;
        },
      },
      pseudos: {
        not: l(function (n) {
          var t = [],
            r = [],
            i = wt(n.replace(at, "$1"));
          return i[e]
            ? l(function (n, t, r, u) {
                for (var e, o = i(n, null, u, []), f = n.length; f--; )
                  (e = o[f]) && (n[f] = !(t[f] = e));
              })
            : function (n, u, f) {
                return (t[0] = n), i(t, null, f, r), (t[0] = null), !r.pop();
              };
        }),
        has: l(function (n) {
          return function (t) {
            return u(n, t).length > 0;
          };
        }),
        contains: l(function (n) {
          return (
            (n = n.replace(y, p)),
            function (t) {
              return (t.textContent || t.innerText || st(t)).indexOf(n) > -1;
            }
          );
        }),
        lang: l(function (n) {
          return (
            yi.test(n || "") || u.error("unsupported lang: " + n),
            (n = n.replace(y, p).toLowerCase()),
            function (t) {
              var i;
              do
                if (
                  (i = h
                    ? t.lang
                    : t.getAttribute("xml:lang") || t.getAttribute("lang"))
                )
                  return (
                    (i = i.toLowerCase()), i === n || 0 === i.indexOf(n + "-")
                  );
              while ((t = t.parentNode) && 1 === t.nodeType);
              return !1;
            }
          );
        }),
        target: function (t) {
          var i = n.location && n.location.hash;
          return i && i.slice(1) === t.id;
        },
        root: function (n) {
          return n === s;
        },
        focus: function (n) {
          return (
            n === i.activeElement &&
            (!i.hasFocus || i.hasFocus()) &&
            !!(n.type || n.href || ~n.tabIndex)
          );
        },
        enabled: function (n) {
          return n.disabled === !1;
        },
        disabled: function (n) {
          return n.disabled === !0;
        },
        checked: function (n) {
          var t = n.nodeName.toLowerCase();
          return (
            ("input" === t && !!n.checked) || ("option" === t && !!n.selected)
          );
        },
        selected: function (n) {
          return n.parentNode && n.parentNode.selectedIndex, n.selected === !0;
        },
        empty: function (n) {
          for (n = n.firstChild; n; n = n.nextSibling)
            if (n.nodeType < 6) return !1;
          return !0;
        },
        parent: function (n) {
          return !t.pseudos.empty(n);
        },
        header: function (n) {
          return or.test(n.nodeName);
        },
        input: function (n) {
          return er.test(n.nodeName);
        },
        button: function (n) {
          var t = n.nodeName.toLowerCase();
          return ("input" === t && "button" === n.type) || "button" === t;
        },
        text: function (n) {
          var t;
          return (
            "input" === n.nodeName.toLowerCase() &&
            "text" === n.type &&
            (null == (t = n.getAttribute("type")) || "text" === t.toLowerCase())
          );
        },
        first: it(function () {
          return [0];
        }),
        last: it(function (n, t) {
          return [t - 1];
        }),
        eq: it(function (n, t, i) {
          return [0 > i ? i + t : i];
        }),
        even: it(function (n, t) {
          for (var i = 0; t > i; i += 2) n.push(i);
          return n;
        }),
        odd: it(function (n, t) {
          for (var i = 1; t > i; i += 2) n.push(i);
          return n;
        }),
        lt: it(function (n, t, i) {
          for (var r = 0 > i ? i + t : i; --r >= 0; ) n.push(r);
          return n;
        }),
        gt: it(function (n, t, i) {
          for (var r = 0 > i ? i + t : i; ++r < t; ) n.push(r);
          return n;
        }),
      },
    };
    t.pseudos.nth = t.pseudos.eq;
    for (rt in { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 })
      t.pseudos[rt] = cr(rt);
    for (rt in { submit: !0, reset: !0 }) t.pseudos[rt] = lr(rt);
    return (
      (bi.prototype = t.filters = t.pseudos),
      (t.setFilters = new bi()),
      (ft = u.tokenize =
        function (n, i) {
          var e,
            f,
            s,
            o,
            r,
            h,
            c,
            l = ci[n + " "];
          if (l) return i ? 0 : l.slice(0);
          for (r = n, h = [], c = t.preFilter; r; ) {
            (!e || (f = ir.exec(r))) &&
              (f && (r = r.slice(f[0].length) || r), h.push((s = [])));
            e = !1;
            (f = rr.exec(r)) &&
              ((e = f.shift()),
              s.push({ value: e, type: f[0].replace(at, " ") }),
              (r = r.slice(e.length)));
            for (o in t.filter)
              (f = vt[o].exec(r)) &&
                (!c[o] || (f = c[o](f))) &&
                ((e = f.shift()),
                s.push({ value: e, type: o, matches: f }),
                (r = r.slice(e.length)));
            if (!e) break;
          }
          return i ? r.length : r ? u.error(n) : ci(n, h).slice(0);
        }),
      (wt = u.compile =
        function (n, t) {
          var r,
            u = [],
            f = [],
            i = lt[n + " "];
          if (!i) {
            for (t || (t = ft(n)), r = t.length; r--; )
              (i = ei(t[r])), i[e] ? u.push(i) : f.push(i);
            i = lt(n, vr(f, u));
            i.selector = n;
          }
          return i;
        }),
      (si = u.select =
        function (n, i, r, u) {
          var s,
            e,
            o,
            a,
            v,
            l = "function" == typeof n && n,
            c = !u && ft((n = l.selector || n));
          if (((r = r || []), 1 === c.length)) {
            if (
              ((e = c[0] = c[0].slice(0)),
              e.length > 2 &&
                "ID" === (o = e[0]).type &&
                f.getById &&
                9 === i.nodeType &&
                h &&
                t.relative[e[1].type])
            ) {
              if (
                ((i = (t.find.ID(o.matches[0].replace(y, p), i) || [])[0]), !i)
              )
                return r;
              l && (i = i.parentNode);
              n = n.slice(e.shift().value.length);
            }
            for (s = vt.needsContext.test(n) ? 0 : e.length; s--; ) {
              if (((o = e[s]), t.relative[(a = o.type)])) break;
              if (
                (v = t.find[a]) &&
                (u = v(
                  o.matches[0].replace(y, p),
                  (gt.test(e[0].type) && ii(i.parentNode)) || i
                ))
              ) {
                if ((e.splice(s, 1), (n = u.length && yt(e)), !n))
                  return k.apply(r, u), r;
                break;
              }
            }
          }
          return (
            (l || wt(n, c))(
              u,
              i,
              !h,
              r,
              !i || (gt.test(n) && ii(i.parentNode)) || i
            ),
            r
          );
        }),
      (f.sortStable = e.split("").sort(bt).join("") === e),
      (f.detectDuplicates = !!ut),
      b(),
      (f.sortDetached = a(function (n) {
        return 1 & n.compareDocumentPosition(i.createElement("div"));
      })),
      a(function (n) {
        return (
          (n.innerHTML = "<a href='#'></a>"),
          "#" === n.firstChild.getAttribute("href")
        );
      }) ||
        ti("type|href|height|width", function (n, t, i) {
          if (!i) return n.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2);
        }),
      (f.attributes &&
        a(function (n) {
          return (
            (n.innerHTML = "<input/>"),
            n.firstChild.setAttribute("value", ""),
            "" === n.firstChild.getAttribute("value")
          );
        })) ||
        ti("value", function (n, t, i) {
          if (!i && "input" === n.nodeName.toLowerCase()) return n.defaultValue;
        }),
      a(function (n) {
        return null == n.getAttribute("disabled");
      }) ||
        ti(kt, function (n, t, i) {
          var r;
          if (!i)
            return n[t] === !0
              ? t.toLowerCase()
              : (r = n.getAttributeNode(t)) && r.specified
              ? r.value
              : null;
        }),
      u
    );
  })(n);
  i.find = w;
  i.expr = w.selectors;
  i.expr[":"] = i.expr.pseudos;
  i.uniqueSort = i.unique = w.uniqueSort;
  i.text = w.getText;
  i.isXMLDoc = w.isXML;
  i.contains = w.contains;
  var it = function (n, t, r) {
      for (var u = [], f = void 0 !== r; (n = n[t]) && 9 !== n.nodeType; )
        if (1 === n.nodeType) {
          if (f && i(n).is(r)) break;
          u.push(n);
        }
      return u;
    },
    lr = function (n, t) {
      for (var i = []; n; n = n.nextSibling)
        1 === n.nodeType && n !== t && i.push(n);
      return i;
    },
    ar = i.expr.match.needsContext,
    vr = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,
    pe = /^.[^:#\[\.,]*$/;
  i.filter = function (n, t, r) {
    var u = t[0];
    return (
      r && (n = ":not(" + n + ")"),
      1 === t.length && 1 === u.nodeType
        ? i.find.matchesSelector(u, n)
          ? [u]
          : []
        : i.find.matches(
            n,
            i.grep(t, function (n) {
              return 1 === n.nodeType;
            })
          )
    );
  };
  i.fn.extend({
    find: function (n) {
      var t,
        r = [],
        u = this,
        f = u.length;
      if ("string" != typeof n)
        return this.pushStack(
          i(n).filter(function () {
            for (t = 0; f > t; t++) if (i.contains(u[t], this)) return !0;
          })
        );
      for (t = 0; f > t; t++) i.find(n, u[t], r);
      return (
        (r = this.pushStack(f > 1 ? i.unique(r) : r)),
        (r.selector = this.selector ? this.selector + " " + n : n),
        r
      );
    },
    filter: function (n) {
      return this.pushStack(ri(this, n || [], !1));
    },
    not: function (n) {
      return this.pushStack(ri(this, n || [], !0));
    },
    is: function (n) {
      return !!ri(this, "string" == typeof n && ar.test(n) ? i(n) : n || [], !1)
        .length;
    },
  });
  yr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;
  pr = i.fn.init = function (n, t, r) {
    var f, e;
    if (!n) return this;
    if (((r = r || ui), "string" == typeof n)) {
      if (
        ((f =
          "<" === n.charAt(0) && ">" === n.charAt(n.length - 1) && n.length >= 3
            ? [null, n, null]
            : yr.exec(n)),
        !f || (!f[1] && t))
      )
        return !t || t.jquery ? (t || r).find(n) : this.constructor(t).find(n);
      if (f[1]) {
        if (
          ((t = t instanceof i ? t[0] : t),
          i.merge(
            this,
            i.parseHTML(f[1], t && t.nodeType ? t.ownerDocument || t : u, !0)
          ),
          vr.test(f[1]) && i.isPlainObject(t))
        )
          for (f in t)
            i.isFunction(this[f]) ? this[f](t[f]) : this.attr(f, t[f]);
        return this;
      }
      if (((e = u.getElementById(f[2])), e && e.parentNode)) {
        if (e.id !== f[2]) return ui.find(n);
        this.length = 1;
        this[0] = e;
      }
      return (this.context = u), (this.selector = n), this;
    }
    return n.nodeType
      ? ((this.context = this[0] = n), (this.length = 1), this)
      : i.isFunction(n)
      ? "undefined" != typeof r.ready
        ? r.ready(n)
        : n(i)
      : (void 0 !== n.selector &&
          ((this.selector = n.selector), (this.context = n.context)),
        i.makeArray(n, this));
  };
  pr.prototype = i.fn;
  ui = i(u);
  wr = /^(?:parents|prev(?:Until|All))/;
  br = { children: !0, contents: !0, next: !0, prev: !0 };
  i.fn.extend({
    has: function (n) {
      var t,
        r = i(n, this),
        u = r.length;
      return this.filter(function () {
        for (t = 0; u > t; t++) if (i.contains(this, r[t])) return !0;
      });
    },
    closest: function (n, t) {
      for (
        var r,
          f = 0,
          o = this.length,
          u = [],
          e = ar.test(n) || "string" != typeof n ? i(n, t || this.context) : 0;
        o > f;
        f++
      )
        for (r = this[f]; r && r !== t; r = r.parentNode)
          if (
            r.nodeType < 11 &&
            (e
              ? e.index(r) > -1
              : 1 === r.nodeType && i.find.matchesSelector(r, n))
          ) {
            u.push(r);
            break;
          }
      return this.pushStack(u.length > 1 ? i.uniqueSort(u) : u);
    },
    index: function (n) {
      return n
        ? "string" == typeof n
          ? i.inArray(this[0], i(n))
          : i.inArray(n.jquery ? n[0] : n, this)
        : this[0] && this[0].parentNode
        ? this.first().prevAll().length
        : -1;
    },
    add: function (n, t) {
      return this.pushStack(i.uniqueSort(i.merge(this.get(), i(n, t))));
    },
    addBack: function (n) {
      return this.add(null == n ? this.prevObject : this.prevObject.filter(n));
    },
  });
  i.each(
    {
      parent: function (n) {
        var t = n.parentNode;
        return t && 11 !== t.nodeType ? t : null;
      },
      parents: function (n) {
        return it(n, "parentNode");
      },
      parentsUntil: function (n, t, i) {
        return it(n, "parentNode", i);
      },
      next: function (n) {
        return kr(n, "nextSibling");
      },
      prev: function (n) {
        return kr(n, "previousSibling");
      },
      nextAll: function (n) {
        return it(n, "nextSibling");
      },
      prevAll: function (n) {
        return it(n, "previousSibling");
      },
      nextUntil: function (n, t, i) {
        return it(n, "nextSibling", i);
      },
      prevUntil: function (n, t, i) {
        return it(n, "previousSibling", i);
      },
      siblings: function (n) {
        return lr((n.parentNode || {}).firstChild, n);
      },
      children: function (n) {
        return lr(n.firstChild);
      },
      contents: function (n) {
        return i.nodeName(n, "iframe")
          ? n.contentDocument || n.contentWindow.document
          : i.merge([], n.childNodes);
      },
    },
    function (n, t) {
      i.fn[n] = function (r, u) {
        var f = i.map(this, t, r);
        return (
          "Until" !== n.slice(-5) && (u = r),
          u && "string" == typeof u && (f = i.filter(u, f)),
          this.length > 1 &&
            (br[n] || (f = i.uniqueSort(f)), wr.test(n) && (f = f.reverse())),
          this.pushStack(f)
        );
      };
    }
  );
  s = /\S+/g;
  i.Callbacks = function (n) {
    n = "string" == typeof n ? we(n) : i.extend({}, n);
    var e,
      r,
      h,
      f,
      t = [],
      o = [],
      u = -1,
      c = function () {
        for (f = n.once, h = e = !0; o.length; u = -1)
          for (r = o.shift(); ++u < t.length; )
            t[u].apply(r[0], r[1]) === !1 &&
              n.stopOnFalse &&
              ((u = t.length), (r = !1));
        n.memory || (r = !1);
        e = !1;
        f && (t = r ? [] : "");
      },
      s = {
        add: function () {
          return (
            t &&
              (r && !e && ((u = t.length - 1), o.push(r)),
              (function f(r) {
                i.each(r, function (r, u) {
                  i.isFunction(u)
                    ? (n.unique && s.has(u)) || t.push(u)
                    : u && u.length && "string" !== i.type(u) && f(u);
                });
              })(arguments),
              r && !e && c()),
            this
          );
        },
        remove: function () {
          return (
            i.each(arguments, function (n, r) {
              for (var f; (f = i.inArray(r, t, f)) > -1; )
                t.splice(f, 1), u >= f && u--;
            }),
            this
          );
        },
        has: function (n) {
          return n ? i.inArray(n, t) > -1 : t.length > 0;
        },
        empty: function () {
          return t && (t = []), this;
        },
        disable: function () {
          return (f = o = []), (t = r = ""), this;
        },
        disabled: function () {
          return !t;
        },
        lock: function () {
          return (f = !0), r || s.disable(), this;
        },
        locked: function () {
          return !!f;
        },
        fireWith: function (n, t) {
          return (
            f ||
              ((t = t || []),
              (t = [n, t.slice ? t.slice() : t]),
              o.push(t),
              e || c()),
            this
          );
        },
        fire: function () {
          return s.fireWith(this, arguments), this;
        },
        fired: function () {
          return !!h;
        },
      };
    return s;
  };
  i.extend({
    Deferred: function (n) {
      var u = [
          ["resolve", "done", i.Callbacks("once memory"), "resolved"],
          ["reject", "fail", i.Callbacks("once memory"), "rejected"],
          ["notify", "progress", i.Callbacks("memory")],
        ],
        f = "pending",
        r = {
          state: function () {
            return f;
          },
          always: function () {
            return t.done(arguments).fail(arguments), this;
          },
          then: function () {
            var n = arguments;
            return i
              .Deferred(function (f) {
                i.each(u, function (u, e) {
                  var o = i.isFunction(n[u]) && n[u];
                  t[e[1]](function () {
                    var n = o && o.apply(this, arguments);
                    n && i.isFunction(n.promise)
                      ? n
                          .promise()
                          .progress(f.notify)
                          .done(f.resolve)
                          .fail(f.reject)
                      : f[e[0] + "With"](
                          this === r ? f.promise() : this,
                          o ? [n] : arguments
                        );
                  });
                });
                n = null;
              })
              .promise();
          },
          promise: function (n) {
            return null != n ? i.extend(n, r) : r;
          },
        },
        t = {};
      return (
        (r.pipe = r.then),
        i.each(u, function (n, i) {
          var e = i[2],
            o = i[3];
          r[i[1]] = e.add;
          o &&
            e.add(
              function () {
                f = o;
              },
              u[1 ^ n][2].disable,
              u[2][2].lock
            );
          t[i[0]] = function () {
            return t[i[0] + "With"](this === t ? r : this, arguments), this;
          };
          t[i[0] + "With"] = e.fireWith;
        }),
        r.promise(t),
        n && n.call(t, t),
        t
      );
    },
    when: function (n) {
      var t = 0,
        u = a.call(arguments),
        r = u.length,
        e = 1 !== r || (n && i.isFunction(n.promise)) ? r : 0,
        f = 1 === e ? n : i.Deferred(),
        h = function (n, t, i) {
          return function (r) {
            t[n] = this;
            i[n] = arguments.length > 1 ? a.call(arguments) : r;
            i === o ? f.notifyWith(t, i) : --e || f.resolveWith(t, i);
          };
        },
        o,
        c,
        s;
      if (r > 1)
        for (o = new Array(r), c = new Array(r), s = new Array(r); r > t; t++)
          u[t] && i.isFunction(u[t].promise)
            ? u[t]
                .promise()
                .progress(h(t, c, o))
                .done(h(t, s, u))
                .fail(f.reject)
            : --e;
      return e || f.resolveWith(s, u), f.promise();
    },
  });
  i.fn.ready = function (n) {
    return i.ready.promise().done(n), this;
  };
  i.extend({
    isReady: !1,
    readyWait: 1,
    holdReady: function (n) {
      n ? i.readyWait++ : i.ready(!0);
    },
    ready: function (n) {
      (n === !0 ? --i.readyWait : i.isReady) ||
        ((i.isReady = !0),
        (n !== !0 && --i.readyWait > 0) ||
          (at.resolveWith(u, [i]),
          i.fn.triggerHandler &&
            (i(u).triggerHandler("ready"), i(u).off("ready"))));
    },
  });
  i.ready.promise = function (t) {
    if (!at)
      if (
        ((at = i.Deferred()),
        "complete" !== u.readyState &&
          ("loading" === u.readyState || u.documentElement.doScroll))
      )
        if (u.addEventListener)
          u.addEventListener("DOMContentLoaded", v),
            n.addEventListener("load", v);
        else {
          u.attachEvent("onreadystatechange", v);
          n.attachEvent("onload", v);
          var r = !1;
          try {
            r = null == n.frameElement && u.documentElement;
          } catch (e) {}
          r &&
            r.doScroll &&
            !(function f() {
              if (!i.isReady) {
                try {
                  r.doScroll("left");
                } catch (t) {
                  return n.setTimeout(f, 50);
                }
                dr();
                i.ready();
              }
            })();
        }
      else n.setTimeout(i.ready);
    return at.promise(t);
  };
  i.ready.promise();
  for (gr in i(r)) break;
  r.ownFirst = "0" === gr;
  r.inlineBlockNeedsLayout = !1;
  i(function () {
    var f, t, n, i;
    n = u.getElementsByTagName("body")[0];
    n &&
      n.style &&
      ((t = u.createElement("div")),
      (i = u.createElement("div")),
      (i.style.cssText =
        "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"),
      n.appendChild(i).appendChild(t),
      "undefined" != typeof t.style.zoom &&
        ((t.style.cssText =
          "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"),
        (r.inlineBlockNeedsLayout = f = 3 === t.offsetWidth),
        f && (n.style.zoom = 1)),
      n.removeChild(i));
  }),
    (function () {
      var n = u.createElement("div");
      r.deleteExpando = !0;
      try {
        delete n.test;
      } catch (t) {
        r.deleteExpando = !1;
      }
      n = null;
    })();
  var ot = function (n) {
      var t = i.noData[(n.nodeName + " ").toLowerCase()],
        r = +n.nodeType || 1;
      return 1 !== r && 9 !== r
        ? !1
        : !t || (t !== !0 && n.getAttribute("classid") === t);
    },
    be = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
    ke = /([A-Z])/g;
  i.extend({
    cache: {},
    noData: {
      "applet ": !0,
      "embed ": !0,
      "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
    },
    hasData: function (n) {
      return (
        (n = n.nodeType ? i.cache[n[i.expando]] : n[i.expando]), !!n && !fi(n)
      );
    },
    data: function (n, t, i) {
      return tu(n, t, i);
    },
    removeData: function (n, t) {
      return iu(n, t);
    },
    _data: function (n, t, i) {
      return tu(n, t, i, !0);
    },
    _removeData: function (n, t) {
      return iu(n, t, !0);
    },
  });
  i.fn.extend({
    data: function (n, t) {
      var f,
        u,
        e,
        r = this[0],
        o = r && r.attributes;
      if (void 0 === n) {
        if (
          this.length &&
          ((e = i.data(r)), 1 === r.nodeType && !i._data(r, "parsedAttrs"))
        ) {
          for (f = o.length; f--; )
            o[f] &&
              ((u = o[f].name),
              0 === u.indexOf("data-") &&
                ((u = i.camelCase(u.slice(5))), nu(r, u, e[u])));
          i._data(r, "parsedAttrs", !0);
        }
        return e;
      }
      return "object" == typeof n
        ? this.each(function () {
            i.data(this, n);
          })
        : arguments.length > 1
        ? this.each(function () {
            i.data(this, n, t);
          })
        : r
        ? nu(r, n, i.data(r, n))
        : void 0;
    },
    removeData: function (n) {
      return this.each(function () {
        i.removeData(this, n);
      });
    },
  });
  i.extend({
    queue: function (n, t, r) {
      var u;
      if (n)
        return (
          (t = (t || "fx") + "queue"),
          (u = i._data(n, t)),
          r &&
            (!u || i.isArray(r)
              ? (u = i._data(n, t, i.makeArray(r)))
              : u.push(r)),
          u || []
        );
    },
    dequeue: function (n, t) {
      t = t || "fx";
      var r = i.queue(n, t),
        e = r.length,
        u = r.shift(),
        f = i._queueHooks(n, t),
        o = function () {
          i.dequeue(n, t);
        };
      "inprogress" === u && ((u = r.shift()), e--);
      u &&
        ("fx" === t && r.unshift("inprogress"), delete f.stop, u.call(n, o, f));
      !e && f && f.empty.fire();
    },
    _queueHooks: function (n, t) {
      var r = t + "queueHooks";
      return (
        i._data(n, r) ||
        i._data(n, r, {
          empty: i.Callbacks("once memory").add(function () {
            i._removeData(n, t + "queue");
            i._removeData(n, r);
          }),
        })
      );
    },
  });
  i.fn.extend({
    queue: function (n, t) {
      var r = 2;
      return (
        "string" != typeof n && ((t = n), (n = "fx"), r--),
        arguments.length < r
          ? i.queue(this[0], n)
          : void 0 === t
          ? this
          : this.each(function () {
              var r = i.queue(this, n, t);
              i._queueHooks(this, n);
              "fx" === n && "inprogress" !== r[0] && i.dequeue(this, n);
            })
      );
    },
    dequeue: function (n) {
      return this.each(function () {
        i.dequeue(this, n);
      });
    },
    clearQueue: function (n) {
      return this.queue(n || "fx", []);
    },
    promise: function (n, t) {
      var r,
        f = 1,
        e = i.Deferred(),
        u = this,
        o = this.length,
        s = function () {
          --f || e.resolveWith(u, [u]);
        };
      for (
        "string" != typeof n && ((t = n), (n = void 0)), n = n || "fx";
        o--;

      )
        (r = i._data(u[o], n + "queueHooks")),
          r && r.empty && (f++, r.empty.add(s));
      return s(), e.promise(t);
    },
  }),
    (function () {
      var n;
      r.shrinkWrapBlocks = function () {
        if (null != n) return n;
        n = !1;
        var t, i, r;
        return (
          (i = u.getElementsByTagName("body")[0]),
          i && i.style
            ? ((t = u.createElement("div")),
              (r = u.createElement("div")),
              (r.style.cssText =
                "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"),
              i.appendChild(r).appendChild(t),
              "undefined" != typeof t.style.zoom &&
                ((t.style.cssText =
                  "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1"),
                (t.appendChild(u.createElement("div")).style.width = "5px"),
                (n = 3 !== t.offsetWidth)),
              i.removeChild(r),
              n)
            : void 0
        );
      };
    })();
  var ei = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
    oi = new RegExp("^(?:([+-])=|)(" + ei + ")([a-z%]*)$", "i"),
    b = ["Top", "Right", "Bottom", "Left"],
    st = function (n, t) {
      return (
        (n = t || n),
        "none" === i.css(n, "display") || !i.contains(n.ownerDocument, n)
      );
    };
  var y = function (n, t, r, u, f, e, o) {
      var s = 0,
        c = n.length,
        h = null == r;
      if ("object" === i.type(r)) {
        f = !0;
        for (s in r) y(n, t, s, r[s], !0, e, o);
      } else if (
        void 0 !== u &&
        ((f = !0),
        i.isFunction(u) || (o = !0),
        h &&
          (o
            ? (t.call(n, u), (t = null))
            : ((h = t),
              (t = function (n, t, r) {
                return h.call(i(n), r);
              }))),
        t)
      )
        for (; c > s; s++) t(n[s], r, o ? u : u.call(n[s], s, t(n[s], r)));
      return f ? n : h ? t.call(n) : c ? t(n[0], r) : e;
    },
    si = /^(?:checkbox|radio)$/i,
    uu = /<([\w:-]+)/,
    fu = /^$|\/(?:java|ecma)script/i,
    hi = /^\s+/,
    eu =
      "abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";
  !(function () {
    var n = u.createElement("div"),
      f = u.createDocumentFragment(),
      t = u.createElement("input");
    n.innerHTML =
      "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
    r.leadingWhitespace = 3 === n.firstChild.nodeType;
    r.tbody = !n.getElementsByTagName("tbody").length;
    r.htmlSerialize = !!n.getElementsByTagName("link").length;
    r.html5Clone =
      "<:nav></:nav>" !== u.createElement("nav").cloneNode(!0).outerHTML;
    t.type = "checkbox";
    t.checked = !0;
    f.appendChild(t);
    r.appendChecked = t.checked;
    n.innerHTML = "<textarea>x</textarea>";
    r.noCloneChecked = !!n.cloneNode(!0).lastChild.defaultValue;
    f.appendChild(n);
    t = u.createElement("input");
    t.setAttribute("type", "radio");
    t.setAttribute("checked", "checked");
    t.setAttribute("name", "t");
    n.appendChild(t);
    r.checkClone = n.cloneNode(!0).cloneNode(!0).lastChild.checked;
    r.noCloneEvent = !!n.addEventListener;
    n[i.expando] = 1;
    r.attributes = !n.getAttribute(i.expando);
  })();
  o = {
    option: [1, "<select multiple='multiple'>", "</select>"],
    legend: [1, "<fieldset>", "</fieldset>"],
    area: [1, "<map>", "</map>"],
    param: [1, "<object>", "</object>"],
    thead: [1, "<table>", "</table>"],
    tr: [2, "<table><tbody>", "</tbody></table>"],
    col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
    td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
    _default: r.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"],
  };
  o.optgroup = o.option;
  o.tbody = o.tfoot = o.colgroup = o.caption = o.thead;
  o.th = o.td;
  su = /<|&#?\w+;/;
  li = /<tbody/i;
  !(function () {
    var t,
      i,
      f = u.createElement("div");
    for (t in { submit: !0, change: !0, focusin: !0 })
      (i = "on" + t),
        (r[t] = i in n) ||
          (f.setAttribute(i, "t"), (r[t] = f.attributes[i].expando === !1));
    f = null;
  })();
  var ai = /^(?:input|select|textarea)$/i,
    ge = /^key/,
    no = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
    cu = /^(?:focusinfocus|focusoutblur)$/,
    lu = /^([^.]*)(?:\.(.+)|)/;
  i.event = {
    global: {},
    add: function (n, t, r, u, f) {
      var p,
        v,
        w,
        y,
        o,
        h,
        c,
        l,
        e,
        b,
        k,
        a = i._data(n);
      if (a) {
        for (
          r.handler && ((y = r), (r = y.handler), (f = y.selector)),
            r.guid || (r.guid = i.guid++),
            (v = a.events) || (v = a.events = {}),
            (h = a.handle) ||
              ((h = a.handle =
                function (n) {
                  if (
                    "undefined" != typeof i &&
                    (!n || i.event.triggered !== n.type)
                  )
                    return i.event.dispatch.apply(h.elem, arguments);
                }),
              (h.elem = n)),
            t = (t || "").match(s) || [""],
            w = t.length;
          w--;

        )
          (p = lu.exec(t[w]) || []),
            (e = k = p[1]),
            (b = (p[2] || "").split(".").sort()),
            e &&
              ((o = i.event.special[e] || {}),
              (e = (f ? o.delegateType : o.bindType) || e),
              (o = i.event.special[e] || {}),
              (c = i.extend(
                {
                  type: e,
                  origType: k,
                  data: u,
                  handler: r,
                  guid: r.guid,
                  selector: f,
                  needsContext: f && i.expr.match.needsContext.test(f),
                  namespace: b.join("."),
                },
                y
              )),
              (l = v[e]) ||
                ((l = v[e] = []),
                (l.delegateCount = 0),
                (o.setup && o.setup.call(n, u, b, h) !== !1) ||
                  (n.addEventListener
                    ? n.addEventListener(e, h, !1)
                    : n.attachEvent && n.attachEvent("on" + e, h))),
              o.add &&
                (o.add.call(n, c), c.handler.guid || (c.handler.guid = r.guid)),
              f ? l.splice(l.delegateCount++, 0, c) : l.push(c),
              (i.event.global[e] = !0));
        n = null;
      }
    },
    remove: function (n, t, r, u, f) {
      var y,
        o,
        h,
        b,
        p,
        a,
        c,
        l,
        e,
        w,
        k,
        v = i.hasData(n) && i._data(n);
      if (v && (a = v.events)) {
        for (t = (t || "").match(s) || [""], p = t.length; p--; )
          if (
            ((h = lu.exec(t[p]) || []),
            (e = k = h[1]),
            (w = (h[2] || "").split(".").sort()),
            e)
          ) {
            for (
              c = i.event.special[e] || {},
                e = (u ? c.delegateType : c.bindType) || e,
                l = a[e] || [],
                h =
                  h[2] &&
                  new RegExp("(^|\\.)" + w.join("\\.(?:.*\\.|)") + "(\\.|$)"),
                b = y = l.length;
              y--;

            )
              (o = l[y]),
                (!f && k !== o.origType) ||
                  (r && r.guid !== o.guid) ||
                  (h && !h.test(o.namespace)) ||
                  (u && u !== o.selector && ("**" !== u || !o.selector)) ||
                  (l.splice(y, 1),
                  o.selector && l.delegateCount--,
                  c.remove && c.remove.call(n, o));
            b &&
              !l.length &&
              ((c.teardown && c.teardown.call(n, w, v.handle) !== !1) ||
                i.removeEvent(n, e, v.handle),
              delete a[e]);
          } else for (e in a) i.event.remove(n, e + t[p], r, u, !0);
        i.isEmptyObject(a) && (delete v.handle, i._removeData(n, "events"));
      }
    },
    trigger: function (t, r, f, e) {
      var l,
        a,
        o,
        p,
        c,
        h,
        w,
        y = [f || u],
        s = tt.call(t, "type") ? t.type : t,
        v = tt.call(t, "namespace") ? t.namespace.split(".") : [];
      if (
        ((o = h = f = f || u),
        3 !== f.nodeType &&
          8 !== f.nodeType &&
          !cu.test(s + i.event.triggered) &&
          (s.indexOf(".") > -1 &&
            ((v = s.split(".")), (s = v.shift()), v.sort()),
          (a = s.indexOf(":") < 0 && "on" + s),
          (t = t[i.expando] ? t : new i.Event(s, "object" == typeof t && t)),
          (t.isTrigger = e ? 2 : 3),
          (t.namespace = v.join(".")),
          (t.rnamespace = t.namespace
            ? new RegExp("(^|\\.)" + v.join("\\.(?:.*\\.|)") + "(\\.|$)")
            : null),
          (t.result = void 0),
          t.target || (t.target = f),
          (r = null == r ? [t] : i.makeArray(r, [t])),
          (c = i.event.special[s] || {}),
          e || !c.trigger || c.trigger.apply(f, r) !== !1))
      ) {
        if (!e && !c.noBubble && !i.isWindow(f)) {
          for (
            p = c.delegateType || s, cu.test(p + s) || (o = o.parentNode);
            o;
            o = o.parentNode
          )
            y.push(o), (h = o);
          h === (f.ownerDocument || u) &&
            y.push(h.defaultView || h.parentWindow || n);
        }
        for (w = 0; (o = y[w++]) && !t.isPropagationStopped(); )
          (t.type = w > 1 ? p : c.bindType || s),
            (l = (i._data(o, "events") || {})[t.type] && i._data(o, "handle")),
            l && l.apply(o, r),
            (l = a && o[a]),
            l &&
              l.apply &&
              ot(o) &&
              ((t.result = l.apply(o, r)),
              t.result === !1 && t.preventDefault());
        if (
          ((t.type = s),
          !e &&
            !t.isDefaultPrevented() &&
            (!c._default || c._default.apply(y.pop(), r) === !1) &&
            ot(f) &&
            a &&
            f[s] &&
            !i.isWindow(f))
        ) {
          h = f[a];
          h && (f[a] = null);
          i.event.triggered = s;
          try {
            f[s]();
          } catch (b) {}
          i.event.triggered = void 0;
          h && (f[a] = h);
        }
        return t.result;
      }
    },
    dispatch: function (n) {
      n = i.event.fix(n);
      var e,
        o,
        f,
        r,
        t,
        s = [],
        h = a.call(arguments),
        c = (i._data(this, "events") || {})[n.type] || [],
        u = i.event.special[n.type] || {};
      if (
        ((h[0] = n),
        (n.delegateTarget = this),
        !u.preDispatch || u.preDispatch.call(this, n) !== !1)
      ) {
        for (
          s = i.event.handlers.call(this, n, c), e = 0;
          (r = s[e++]) && !n.isPropagationStopped();

        )
          for (
            n.currentTarget = r.elem, o = 0;
            (t = r.handlers[o++]) && !n.isImmediatePropagationStopped();

          )
            (n.rnamespace && !n.rnamespace.test(t.namespace)) ||
              ((n.handleObj = t),
              (n.data = t.data),
              (f = (
                (i.event.special[t.origType] || {}).handle || t.handler
              ).apply(r.elem, h)),
              void 0 !== f &&
                (n.result = f) === !1 &&
                (n.preventDefault(), n.stopPropagation()));
        return u.postDispatch && u.postDispatch.call(this, n), n.result;
      }
    },
    handlers: function (n, t) {
      var e,
        u,
        f,
        o,
        h = [],
        s = t.delegateCount,
        r = n.target;
      if (
        s &&
        r.nodeType &&
        ("click" !== n.type || isNaN(n.button) || n.button < 1)
      )
        for (; r != this; r = r.parentNode || this)
          if (1 === r.nodeType && (r.disabled !== !0 || "click" !== n.type)) {
            for (u = [], e = 0; s > e; e++)
              (o = t[e]),
                (f = o.selector + " "),
                void 0 === u[f] &&
                  (u[f] = o.needsContext
                    ? i(f, this).index(r) > -1
                    : i.find(f, this, null, [r]).length),
                u[f] && u.push(o);
            u.length && h.push({ elem: r, handlers: u });
          }
      return s < t.length && h.push({ elem: this, handlers: t.slice(s) }), h;
    },
    fix: function (n) {
      if (n[i.expando]) return n;
      var e,
        o,
        s,
        r = n.type,
        f = n,
        t = this.fixHooks[r];
      for (
        t ||
          (this.fixHooks[r] = t =
            no.test(r) ? this.mouseHooks : ge.test(r) ? this.keyHooks : {}),
          s = t.props ? this.props.concat(t.props) : this.props,
          n = new i.Event(f),
          e = s.length;
        e--;

      )
        (o = s[e]), (n[o] = f[o]);
      return (
        n.target || (n.target = f.srcElement || u),
        3 === n.target.nodeType && (n.target = n.target.parentNode),
        (n.metaKey = !!n.metaKey),
        t.filter ? t.filter(n, f) : n
      );
    },
    props:
      "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(
        " "
      ),
    fixHooks: {},
    keyHooks: {
      props: "char charCode key keyCode".split(" "),
      filter: function (n, t) {
        return (
          null == n.which &&
            (n.which = null != t.charCode ? t.charCode : t.keyCode),
          n
        );
      },
    },
    mouseHooks: {
      props:
        "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(
          " "
        ),
      filter: function (n, t) {
        var i,
          e,
          r,
          f = t.button,
          o = t.fromElement;
        return (
          null == n.pageX &&
            null != t.clientX &&
            ((e = n.target.ownerDocument || u),
            (r = e.documentElement),
            (i = e.body),
            (n.pageX =
              t.clientX +
              ((r && r.scrollLeft) || (i && i.scrollLeft) || 0) -
              ((r && r.clientLeft) || (i && i.clientLeft) || 0)),
            (n.pageY =
              t.clientY +
              ((r && r.scrollTop) || (i && i.scrollTop) || 0) -
              ((r && r.clientTop) || (i && i.clientTop) || 0))),
          !n.relatedTarget &&
            o &&
            (n.relatedTarget = o === n.target ? t.toElement : o),
          n.which ||
            void 0 === f ||
            (n.which = 1 & f ? 1 : 2 & f ? 3 : 4 & f ? 2 : 0),
          n
        );
      },
    },
    special: {
      load: { noBubble: !0 },
      focus: {
        trigger: function () {
          if (this !== au() && this.focus)
            try {
              return this.focus(), !1;
            } catch (n) {}
        },
        delegateType: "focusin",
      },
      blur: {
        trigger: function () {
          if (this === au() && this.blur) return this.blur(), !1;
        },
        delegateType: "focusout",
      },
      click: {
        trigger: function () {
          if (
            i.nodeName(this, "input") &&
            "checkbox" === this.type &&
            this.click
          )
            return this.click(), !1;
        },
        _default: function (n) {
          return i.nodeName(n.target, "a");
        },
      },
      beforeunload: {
        postDispatch: function (n) {
          void 0 !== n.result &&
            n.originalEvent &&
            (n.originalEvent.returnValue = n.result);
        },
      },
    },
    simulate: function (n, t, r) {
      var u = i.extend(new i.Event(), r, { type: n, isSimulated: !0 });
      i.event.trigger(u, null, t);
      u.isDefaultPrevented() && r.preventDefault();
    },
  };
  i.removeEvent = u.removeEventListener
    ? function (n, t, i) {
        n.removeEventListener && n.removeEventListener(t, i);
      }
    : function (n, t, i) {
        var r = "on" + t;
        n.detachEvent &&
          ("undefined" == typeof n[r] && (n[r] = null), n.detachEvent(r, i));
      };
  i.Event = function (n, t) {
    return this instanceof i.Event
      ? (n && n.type
          ? ((this.originalEvent = n),
            (this.type = n.type),
            (this.isDefaultPrevented =
              n.defaultPrevented ||
              (void 0 === n.defaultPrevented && n.returnValue === !1)
                ? vt
                : rt))
          : (this.type = n),
        t && i.extend(this, t),
        (this.timeStamp = (n && n.timeStamp) || i.now()),
        void (this[i.expando] = !0))
      : new i.Event(n, t);
  };
  i.Event.prototype = {
    constructor: i.Event,
    isDefaultPrevented: rt,
    isPropagationStopped: rt,
    isImmediatePropagationStopped: rt,
    preventDefault: function () {
      var n = this.originalEvent;
      this.isDefaultPrevented = vt;
      n && (n.preventDefault ? n.preventDefault() : (n.returnValue = !1));
    },
    stopPropagation: function () {
      var n = this.originalEvent;
      this.isPropagationStopped = vt;
      n &&
        !this.isSimulated &&
        (n.stopPropagation && n.stopPropagation(), (n.cancelBubble = !0));
    },
    stopImmediatePropagation: function () {
      var n = this.originalEvent;
      this.isImmediatePropagationStopped = vt;
      n && n.stopImmediatePropagation && n.stopImmediatePropagation();
      this.stopPropagation();
    },
  };
  i.each(
    {
      mouseenter: "mouseover",
      mouseleave: "mouseout",
      pointerenter: "pointerover",
      pointerleave: "pointerout",
    },
    function (n, t) {
      i.event.special[n] = {
        delegateType: t,
        bindType: t,
        handle: function (n) {
          var u,
            f = this,
            r = n.relatedTarget,
            e = n.handleObj;
          return (
            (r && (r === f || i.contains(f, r))) ||
              ((n.type = e.origType),
              (u = e.handler.apply(this, arguments)),
              (n.type = t)),
            u
          );
        },
      };
    }
  );
  r.submit ||
    (i.event.special.submit = {
      setup: function () {
        return i.nodeName(this, "form")
          ? !1
          : void i.event.add(
              this,
              "click._submit keypress._submit",
              function (n) {
                var r = n.target,
                  t =
                    i.nodeName(r, "input") || i.nodeName(r, "button")
                      ? i.prop(r, "form")
                      : void 0;
                t &&
                  !i._data(t, "submit") &&
                  (i.event.add(t, "submit._submit", function (n) {
                    n._submitBubble = !0;
                  }),
                  i._data(t, "submit", !0));
              }
            );
      },
      postDispatch: function (n) {
        n._submitBubble &&
          (delete n._submitBubble,
          this.parentNode &&
            !n.isTrigger &&
            i.event.simulate("submit", this.parentNode, n));
      },
      teardown: function () {
        return i.nodeName(this, "form")
          ? !1
          : void i.event.remove(this, "._submit");
      },
    });
  r.change ||
    (i.event.special.change = {
      setup: function () {
        return ai.test(this.nodeName)
          ? (("checkbox" !== this.type && "radio" !== this.type) ||
              (i.event.add(this, "propertychange._change", function (n) {
                "checked" === n.originalEvent.propertyName &&
                  (this._justChanged = !0);
              }),
              i.event.add(this, "click._change", function (n) {
                this._justChanged && !n.isTrigger && (this._justChanged = !1);
                i.event.simulate("change", this, n);
              })),
            !1)
          : void i.event.add(this, "beforeactivate._change", function (n) {
              var t = n.target;
              ai.test(t.nodeName) &&
                !i._data(t, "change") &&
                (i.event.add(t, "change._change", function (n) {
                  !this.parentNode ||
                    n.isSimulated ||
                    n.isTrigger ||
                    i.event.simulate("change", this.parentNode, n);
                }),
                i._data(t, "change", !0));
            });
      },
      handle: function (n) {
        var t = n.target;
        if (
          this !== t ||
          n.isSimulated ||
          n.isTrigger ||
          ("radio" !== t.type && "checkbox" !== t.type)
        )
          return n.handleObj.handler.apply(this, arguments);
      },
      teardown: function () {
        return i.event.remove(this, "._change"), !ai.test(this.nodeName);
      },
    });
  r.focusin ||
    i.each({ focus: "focusin", blur: "focusout" }, function (n, t) {
      var r = function (n) {
        i.event.simulate(t, n.target, i.event.fix(n));
      };
      i.event.special[t] = {
        setup: function () {
          var u = this.ownerDocument || this,
            f = i._data(u, t);
          f || u.addEventListener(n, r, !0);
          i._data(u, t, (f || 0) + 1);
        },
        teardown: function () {
          var u = this.ownerDocument || this,
            f = i._data(u, t) - 1;
          f
            ? i._data(u, t, f)
            : (u.removeEventListener(n, r, !0), i._removeData(u, t));
        },
      };
    });
  i.fn.extend({
    on: function (n, t, i, r) {
      return vi(this, n, t, i, r);
    },
    one: function (n, t, i, r) {
      return vi(this, n, t, i, r, 1);
    },
    off: function (n, t, r) {
      var u, f;
      if (n && n.preventDefault && n.handleObj)
        return (
          (u = n.handleObj),
          i(n.delegateTarget).off(
            u.namespace ? u.origType + "." + u.namespace : u.origType,
            u.selector,
            u.handler
          ),
          this
        );
      if ("object" == typeof n) {
        for (f in n) this.off(f, t, n[f]);
        return this;
      }
      return (
        (t !== !1 && "function" != typeof t) || ((r = t), (t = void 0)),
        r === !1 && (r = rt),
        this.each(function () {
          i.event.remove(this, n, r, t);
        })
      );
    },
    trigger: function (n, t) {
      return this.each(function () {
        i.event.trigger(n, t, this);
      });
    },
    triggerHandler: function (n, t) {
      var r = this[0];
      if (r) return i.event.trigger(n, t, r, !0);
    },
  });
  var to = / jQuery\d+="(?:null|\d+)"/g,
    vu = new RegExp("<(?:" + eu + ")[\\s/>]", "i"),
    io =
      /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
    ro = /<script|<style|<link/i,
    uo = /checked\s*(?:[^=]|=\s*.checked.)/i,
    fo = /^true\/(.*)/,
    eo = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
    oo = ou(u),
    yi = oo.appendChild(u.createElement("div"));
  i.extend({
    htmlPrefilter: function (n) {
      return n.replace(io, "<$1></$2>");
    },
    clone: function (n, t, u) {
      var e,
        c,
        s,
        o,
        h,
        l = i.contains(n.ownerDocument, n);
      if (
        (r.html5Clone || i.isXMLDoc(n) || !vu.test("<" + n.nodeName + ">")
          ? (s = n.cloneNode(!0))
          : ((yi.innerHTML = n.outerHTML), yi.removeChild((s = yi.firstChild))),
        !(
          (r.noCloneEvent && r.noCloneChecked) ||
          (1 !== n.nodeType && 11 !== n.nodeType) ||
          i.isXMLDoc(n)
        ))
      )
        for (e = f(s), h = f(n), o = 0; null != (c = h[o]); ++o)
          e[o] && so(c, e[o]);
      if (t)
        if (u)
          for (h = h || f(n), e = e || f(s), o = 0; null != (c = h[o]); o++)
            bu(c, e[o]);
        else bu(n, s);
      return (
        (e = f(s, "script")),
        e.length > 0 && ci(e, !l && f(n, "script")),
        (e = h = c = null),
        s
      );
    },
    cleanData: function (n, t) {
      for (
        var u,
          e,
          f,
          o,
          l = 0,
          s = i.expando,
          h = i.cache,
          a = r.attributes,
          v = i.event.special;
        null != (u = n[l]);
        l++
      )
        if ((t || ot(u)) && ((f = u[s]), (o = f && h[f]))) {
          if (o.events)
            for (e in o.events)
              v[e] ? i.event.remove(u, e) : i.removeEvent(u, e, o.handle);
          h[f] &&
            (delete h[f],
            a || "undefined" == typeof u.removeAttribute
              ? (u[s] = void 0)
              : u.removeAttribute(s),
            c.push(f));
        }
    },
  });
  i.fn.extend({
    domManip: k,
    detach: function (n) {
      return ku(this, n, !0);
    },
    remove: function (n) {
      return ku(this, n);
    },
    text: function (n) {
      return y(
        this,
        function (n) {
          return void 0 === n
            ? i.text(this)
            : this.empty().append(
                ((this[0] && this[0].ownerDocument) || u).createTextNode(n)
              );
        },
        null,
        n,
        arguments.length
      );
    },
    append: function () {
      return k(this, arguments, function (n) {
        if (
          1 === this.nodeType ||
          11 === this.nodeType ||
          9 === this.nodeType
        ) {
          var t = yu(this, n);
          t.appendChild(n);
        }
      });
    },
    prepend: function () {
      return k(this, arguments, function (n) {
        if (
          1 === this.nodeType ||
          11 === this.nodeType ||
          9 === this.nodeType
        ) {
          var t = yu(this, n);
          t.insertBefore(n, t.firstChild);
        }
      });
    },
    before: function () {
      return k(this, arguments, function (n) {
        this.parentNode && this.parentNode.insertBefore(n, this);
      });
    },
    after: function () {
      return k(this, arguments, function (n) {
        this.parentNode && this.parentNode.insertBefore(n, this.nextSibling);
      });
    },
    empty: function () {
      for (var n, t = 0; null != (n = this[t]); t++) {
        for (1 === n.nodeType && i.cleanData(f(n, !1)); n.firstChild; )
          n.removeChild(n.firstChild);
        n.options && i.nodeName(n, "select") && (n.options.length = 0);
      }
      return this;
    },
    clone: function (n, t) {
      return (
        (n = null == n ? !1 : n),
        (t = null == t ? n : t),
        this.map(function () {
          return i.clone(this, n, t);
        })
      );
    },
    html: function (n) {
      return y(
        this,
        function (n) {
          var t = this[0] || {},
            u = 0,
            e = this.length;
          if (void 0 === n)
            return 1 === t.nodeType ? t.innerHTML.replace(to, "") : void 0;
          if (
            "string" == typeof n &&
            !ro.test(n) &&
            (r.htmlSerialize || !vu.test(n)) &&
            (r.leadingWhitespace || !hi.test(n)) &&
            !o[(uu.exec(n) || ["", ""])[1].toLowerCase()]
          ) {
            n = i.htmlPrefilter(n);
            try {
              for (; e > u; u++)
                (t = this[u] || {}),
                  1 === t.nodeType &&
                    (i.cleanData(f(t, !1)), (t.innerHTML = n));
              t = 0;
            } catch (s) {}
          }
          t && this.empty().append(n);
        },
        null,
        n,
        arguments.length
      );
    },
    replaceWith: function () {
      var n = [];
      return k(
        this,
        arguments,
        function (t) {
          var r = this.parentNode;
          i.inArray(this, n) < 0 &&
            (i.cleanData(f(this)), r && r.replaceChild(t, this));
        },
        n
      );
    },
  });
  i.each(
    {
      appendTo: "append",
      prependTo: "prepend",
      insertBefore: "before",
      insertAfter: "after",
      replaceAll: "replaceWith",
    },
    function (n, t) {
      i.fn[n] = function (n) {
        for (var u, r = 0, f = [], e = i(n), o = e.length - 1; o >= r; r++)
          (u = r === o ? this : this.clone(!0)),
            i(e[r])[t](u),
            ti.apply(f, u.get());
        return this.pushStack(f);
      };
    }
  );
  pi = { HTML: "block", BODY: "block" };
  var gu = /^margin/,
    pt = new RegExp("^(" + ei + ")(?!px)[a-z%]+$", "i"),
    wi = function (n, t, i, r) {
      var f,
        u,
        e = {};
      for (u in t) (e[u] = n.style[u]), (n.style[u] = t[u]);
      f = i.apply(n, r || []);
      for (u in t) n.style[u] = e[u];
      return f;
    },
    nf = u.documentElement;
  !(function () {
    var f,
      h,
      c,
      e,
      l,
      a,
      s = u.createElement("div"),
      t = u.createElement("div");
    if (t.style) {
      t.style.cssText = "float:left;opacity:.5";
      r.opacity = "0.5" === t.style.opacity;
      r.cssFloat = !!t.style.cssFloat;
      t.style.backgroundClip = "content-box";
      t.cloneNode(!0).style.backgroundClip = "";
      r.clearCloneStyle = "content-box" === t.style.backgroundClip;
      s = u.createElement("div");
      s.style.cssText =
        "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute";
      t.innerHTML = "";
      s.appendChild(t);
      r.boxSizing =
        "" === t.style.boxSizing ||
        "" === t.style.MozBoxSizing ||
        "" === t.style.WebkitBoxSizing;
      i.extend(r, {
        reliableHiddenOffsets: function () {
          return null == f && o(), e;
        },
        boxSizingReliable: function () {
          return null == f && o(), c;
        },
        pixelMarginRight: function () {
          return null == f && o(), h;
        },
        pixelPosition: function () {
          return null == f && o(), f;
        },
        reliableMarginRight: function () {
          return null == f && o(), l;
        },
        reliableMarginLeft: function () {
          return null == f && o(), a;
        },
      });
      function o() {
        var i,
          r,
          o = u.documentElement;
        o.appendChild(s);
        t.style.cssText =
          "-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%";
        f = c = a = !1;
        h = l = !0;
        n.getComputedStyle &&
          ((r = n.getComputedStyle(t)),
          (f = "1%" !== (r || {}).top),
          (a = "2px" === (r || {}).marginLeft),
          (c = "4px" === (r || { width: "4px" }).width),
          (t.style.marginRight = "50%"),
          (h = "4px" === (r || { marginRight: "4px" }).marginRight),
          (i = t.appendChild(u.createElement("div"))),
          (i.style.cssText = t.style.cssText =
            "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0"),
          (i.style.marginRight = i.style.width = "0"),
          (t.style.width = "1px"),
          (l = !parseFloat((n.getComputedStyle(i) || {}).marginRight)),
          t.removeChild(i));
        t.style.display = "none";
        e = 0 === t.getClientRects().length;
        e &&
          ((t.style.display = ""),
          (t.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"),
          (t.childNodes[0].style.borderCollapse = "separate"),
          (i = t.getElementsByTagName("td")),
          (i[0].style.cssText = "margin:0;border:0;padding:0;display:none"),
          (e = 0 === i[0].offsetHeight),
          e &&
            ((i[0].style.display = ""),
            (i[1].style.display = "none"),
            (e = 0 === i[0].offsetHeight)));
        o.removeChild(s);
      }
    }
  })();
  tf = /^(top|right|bottom|left)$/;
  n.getComputedStyle
    ? ((d = function (t) {
        var i = t.ownerDocument.defaultView;
        return (i && i.opener) || (i = n), i.getComputedStyle(t);
      }),
      (p = function (n, t, u) {
        var o,
          s,
          h,
          f,
          e = n.style;
        return (
          (u = u || d(n)),
          (f = u ? u.getPropertyValue(t) || u[t] : void 0),
          ("" !== f && void 0 !== f) ||
            i.contains(n.ownerDocument, n) ||
            (f = i.style(n, t)),
          u &&
            !r.pixelMarginRight() &&
            pt.test(f) &&
            gu.test(t) &&
            ((o = e.width),
            (s = e.minWidth),
            (h = e.maxWidth),
            (e.minWidth = e.maxWidth = e.width = f),
            (f = u.width),
            (e.width = o),
            (e.minWidth = s),
            (e.maxWidth = h)),
          void 0 === f ? f : f + ""
        );
      }))
    : nf.currentStyle &&
      ((d = function (n) {
        return n.currentStyle;
      }),
      (p = function (n, t, i) {
        var o,
          f,
          e,
          r,
          u = n.style;
        return (
          (i = i || d(n)),
          (r = i ? i[t] : void 0),
          null == r && u && u[t] && (r = u[t]),
          pt.test(r) &&
            !tf.test(t) &&
            ((o = u.left),
            (f = n.runtimeStyle),
            (e = f && f.left),
            e && (f.left = n.currentStyle.left),
            (u.left = "fontSize" === t ? "1em" : r),
            (r = u.pixelLeft + "px"),
            (u.left = o),
            e && (f.left = e)),
          void 0 === r ? r : r + "" || "auto"
        );
      }));
  var ki = /alpha\([^)]*\)/i,
    ho = /opacity\s*=\s*([^)]*)/i,
    co = /^(none|table(?!-c[ea]).+)/,
    lo = new RegExp("^(" + ei + ")(.*)$", "i"),
    ao = { position: "absolute", visibility: "hidden", display: "block" },
    rf = { letterSpacing: "0", fontWeight: "400" },
    uf = ["Webkit", "O", "Moz", "ms"],
    ff = u.createElement("div").style;
  i.extend({
    cssHooks: {
      opacity: {
        get: function (n, t) {
          if (t) {
            var i = p(n, "opacity");
            return "" === i ? "1" : i;
          }
        },
      },
    },
    cssNumber: {
      animationIterationCount: !0,
      columnCount: !0,
      fillOpacity: !0,
      flexGrow: !0,
      flexShrink: !0,
      fontWeight: !0,
      lineHeight: !0,
      opacity: !0,
      order: !0,
      orphans: !0,
      widows: !0,
      zIndex: !0,
      zoom: !0,
    },
    cssProps: { float: r.cssFloat ? "cssFloat" : "styleFloat" },
    style: function (n, t, u, f) {
      if (n && 3 !== n.nodeType && 8 !== n.nodeType && n.style) {
        var e,
          h,
          o,
          s = i.camelCase(t),
          c = n.style;
        if (
          ((t = i.cssProps[s] || (i.cssProps[s] = ef(s) || s)),
          (o = i.cssHooks[t] || i.cssHooks[s]),
          void 0 === u)
        )
          return o && "get" in o && void 0 !== (e = o.get(n, !1, f)) ? e : c[t];
        if (
          ((h = typeof u),
          "string" === h &&
            (e = oi.exec(u)) &&
            e[1] &&
            ((u = ru(n, t, e)), (h = "number")),
          null != u &&
            u === u &&
            ("number" === h &&
              (u += (e && e[3]) || (i.cssNumber[s] ? "" : "px")),
            r.clearCloneStyle ||
              "" !== u ||
              0 !== t.indexOf("background") ||
              (c[t] = "inherit"),
            !(o && "set" in o && void 0 === (u = o.set(n, u, f)))))
        )
          try {
            c[t] = u;
          } catch (l) {}
      }
    },
    css: function (n, t, r, u) {
      var s,
        f,
        o,
        e = i.camelCase(t);
      return (
        (t = i.cssProps[e] || (i.cssProps[e] = ef(e) || e)),
        (o = i.cssHooks[t] || i.cssHooks[e]),
        o && "get" in o && (f = o.get(n, !0, r)),
        void 0 === f && (f = p(n, t, u)),
        "normal" === f && t in rf && (f = rf[t]),
        "" === r || r
          ? ((s = parseFloat(f)), r === !0 || isFinite(s) ? s || 0 : f)
          : f
      );
    },
  });
  i.each(["height", "width"], function (n, t) {
    i.cssHooks[t] = {
      get: function (n, r, u) {
        if (r)
          return co.test(i.css(n, "display")) && 0 === n.offsetWidth
            ? wi(n, ao, function () {
                return cf(n, t, u);
              })
            : cf(n, t, u);
      },
      set: function (n, u, f) {
        var e = f && d(n);
        return sf(
          n,
          u,
          f
            ? hf(
                n,
                t,
                f,
                r.boxSizing && "border-box" === i.css(n, "boxSizing", !1, e),
                e
              )
            : 0
        );
      },
    };
  });
  r.opacity ||
    (i.cssHooks.opacity = {
      get: function (n, t) {
        return ho.test(
          (t && n.currentStyle ? n.currentStyle.filter : n.style.filter) || ""
        )
          ? 0.01 * parseFloat(RegExp.$1) + ""
          : t
          ? "1"
          : "";
      },
      set: function (n, t) {
        var r = n.style,
          u = n.currentStyle,
          e = i.isNumeric(t) ? "alpha(opacity=" + 100 * t + ")" : "",
          f = (u && u.filter) || r.filter || "";
        r.zoom = 1;
        ((t >= 1 || "" === t) &&
          "" === i.trim(f.replace(ki, "")) &&
          r.removeAttribute &&
          (r.removeAttribute("filter"), "" === t || (u && !u.filter))) ||
          (r.filter = ki.test(f) ? f.replace(ki, e) : f + " " + e);
      },
    });
  i.cssHooks.marginRight = bi(r.reliableMarginRight, function (n, t) {
    if (t) return wi(n, { display: "inline-block" }, p, [n, "marginRight"]);
  });
  i.cssHooks.marginLeft = bi(r.reliableMarginLeft, function (n, t) {
    if (t)
      return (
        (parseFloat(p(n, "marginLeft")) ||
          (i.contains(n.ownerDocument, n)
            ? n.getBoundingClientRect().left -
              wi(n, { marginLeft: 0 }, function () {
                return n.getBoundingClientRect().left;
              })
            : 0)) + "px"
      );
  });
  i.each({ margin: "", padding: "", border: "Width" }, function (n, t) {
    i.cssHooks[n + t] = {
      expand: function (i) {
        for (
          var r = 0, f = {}, u = "string" == typeof i ? i.split(" ") : [i];
          4 > r;
          r++
        )
          f[n + b[r] + t] = u[r] || u[r - 2] || u[0];
        return f;
      },
    };
    gu.test(n) || (i.cssHooks[n + t].set = sf);
  });
  i.fn.extend({
    css: function (n, t) {
      return y(
        this,
        function (n, t, r) {
          var f,
            e,
            o = {},
            u = 0;
          if (i.isArray(t)) {
            for (f = d(n), e = t.length; e > u; u++)
              o[t[u]] = i.css(n, t[u], !1, f);
            return o;
          }
          return void 0 !== r ? i.style(n, t, r) : i.css(n, t);
        },
        n,
        t,
        arguments.length > 1
      );
    },
    show: function () {
      return of(this, !0);
    },
    hide: function () {
      return of(this);
    },
    toggle: function (n) {
      return "boolean" == typeof n
        ? n
          ? this.show()
          : this.hide()
        : this.each(function () {
            st(this) ? i(this).show() : i(this).hide();
          });
    },
  });
  i.Tween = e;
  e.prototype = {
    constructor: e,
    init: function (n, t, r, u, f, e) {
      this.elem = n;
      this.prop = r;
      this.easing = f || i.easing._default;
      this.options = t;
      this.start = this.now = this.cur();
      this.end = u;
      this.unit = e || (i.cssNumber[r] ? "" : "px");
    },
    cur: function () {
      var n = e.propHooks[this.prop];
      return n && n.get ? n.get(this) : e.propHooks._default.get(this);
    },
    run: function (n) {
      var t,
        r = e.propHooks[this.prop];
      return (
        (this.pos = this.options.duration
          ? (t = i.easing[this.easing](
              n,
              this.options.duration * n,
              0,
              1,
              this.options.duration
            ))
          : (t = n)),
        (this.now = (this.end - this.start) * t + this.start),
        this.options.step && this.options.step.call(this.elem, this.now, this),
        r && r.set ? r.set(this) : e.propHooks._default.set(this),
        this
      );
    },
  };
  e.prototype.init.prototype = e.prototype;
  e.propHooks = {
    _default: {
      get: function (n) {
        var t;
        return 1 !== n.elem.nodeType ||
          (null != n.elem[n.prop] && null == n.elem.style[n.prop])
          ? n.elem[n.prop]
          : ((t = i.css(n.elem, n.prop, "")), t && "auto" !== t ? t : 0);
      },
      set: function (n) {
        i.fx.step[n.prop]
          ? i.fx.step[n.prop](n)
          : 1 !== n.elem.nodeType ||
            (null == n.elem.style[i.cssProps[n.prop]] && !i.cssHooks[n.prop])
          ? (n.elem[n.prop] = n.now)
          : i.style(n.elem, n.prop, n.now + n.unit);
      },
    },
  };
  e.propHooks.scrollTop = e.propHooks.scrollLeft = {
    set: function (n) {
      n.elem.nodeType && n.elem.parentNode && (n.elem[n.prop] = n.now);
    },
  };
  i.easing = {
    linear: function (n) {
      return n;
    },
    swing: function (n) {
      return 0.5 - Math.cos(n * Math.PI) / 2;
    },
    _default: "swing",
  };
  i.fx = e.prototype.init;
  i.fx.step = {};
  lf = /^(?:toggle|show|hide)$/;
  af = /queueHooks$/;
  i.Animation = i.extend(h, {
    tweeners: {
      "*": [
        function (n, t) {
          var i = this.createTween(n, t);
          return ru(i.elem, n, oi.exec(t), i), i;
        },
      ],
    },
    tweener: function (n, t) {
      i.isFunction(n) ? ((t = n), (n = ["*"])) : (n = n.match(s));
      for (var r, u = 0, f = n.length; f > u; u++)
        (r = n[u]),
          (h.tweeners[r] = h.tweeners[r] || []),
          h.tweeners[r].unshift(t);
    },
    prefilters: [vo],
    prefilter: function (n, t) {
      t ? h.prefilters.unshift(n) : h.prefilters.push(n);
    },
  });
  i.speed = function (n, t, r) {
    var u =
      n && "object" == typeof n
        ? i.extend({}, n)
        : {
            complete: r || (!r && t) || (i.isFunction(n) && n),
            duration: n,
            easing: (r && t) || (t && !i.isFunction(t) && t),
          };
    return (
      (u.duration = i.fx.off
        ? 0
        : "number" == typeof u.duration
        ? u.duration
        : u.duration in i.fx.speeds
        ? i.fx.speeds[u.duration]
        : i.fx.speeds._default),
      (null != u.queue && u.queue !== !0) || (u.queue = "fx"),
      (u.old = u.complete),
      (u.complete = function () {
        i.isFunction(u.old) && u.old.call(this);
        u.queue && i.dequeue(this, u.queue);
      }),
      u
    );
  };
  i.fn.extend({
    fadeTo: function (n, t, i, r) {
      return this.filter(st)
        .css("opacity", 0)
        .show()
        .end()
        .animate({ opacity: t }, n, i, r);
    },
    animate: function (n, t, r, u) {
      var o = i.isEmptyObject(n),
        e = i.speed(t, r, u),
        f = function () {
          var t = h(this, i.extend({}, n), e);
          (o || i._data(this, "finish")) && t.stop(!0);
        };
      return (
        (f.finish = f),
        o || e.queue === !1 ? this.each(f) : this.queue(e.queue, f)
      );
    },
    stop: function (n, t, r) {
      var u = function (n) {
        var t = n.stop;
        delete n.stop;
        t(r);
      };
      return (
        "string" != typeof n && ((r = t), (t = n), (n = void 0)),
        t && n !== !1 && this.queue(n || "fx", []),
        this.each(function () {
          var o = !0,
            t = null != n && n + "queueHooks",
            e = i.timers,
            f = i._data(this);
          if (t) f[t] && f[t].stop && u(f[t]);
          else for (t in f) f[t] && f[t].stop && af.test(t) && u(f[t]);
          for (t = e.length; t--; )
            e[t].elem !== this ||
              (null != n && e[t].queue !== n) ||
              (e[t].anim.stop(r), (o = !1), e.splice(t, 1));
          (!o && r) || i.dequeue(this, n);
        })
      );
    },
    finish: function (n) {
      return (
        n !== !1 && (n = n || "fx"),
        this.each(function () {
          var t,
            f = i._data(this),
            r = f[n + "queue"],
            e = f[n + "queueHooks"],
            u = i.timers,
            o = r ? r.length : 0;
          for (
            f.finish = !0,
              i.queue(this, n, []),
              e && e.stop && e.stop.call(this, !0),
              t = u.length;
            t--;

          )
            u[t].elem === this &&
              u[t].queue === n &&
              (u[t].anim.stop(!0), u.splice(t, 1));
          for (t = 0; o > t; t++) r[t] && r[t].finish && r[t].finish.call(this);
          delete f.finish;
        })
      );
    },
  });
  i.each(["toggle", "show", "hide"], function (n, t) {
    var r = i.fn[t];
    i.fn[t] = function (n, i, u) {
      return null == n || "boolean" == typeof n
        ? r.apply(this, arguments)
        : this.animate(bt(t, !0), n, i, u);
    };
  });
  i.each(
    {
      slideDown: bt("show"),
      slideUp: bt("hide"),
      slideToggle: bt("toggle"),
      fadeIn: { opacity: "show" },
      fadeOut: { opacity: "hide" },
      fadeToggle: { opacity: "toggle" },
    },
    function (n, t) {
      i.fn[n] = function (n, i, r) {
        return this.animate(t, n, i, r);
      };
    }
  );
  i.timers = [];
  i.fx.tick = function () {
    var r,
      n = i.timers,
      t = 0;
    for (ut = i.now(); t < n.length; t++)
      (r = n[t]), r() || n[t] !== r || n.splice(t--, 1);
    n.length || i.fx.stop();
    ut = void 0;
  };
  i.fx.timer = function (n) {
    i.timers.push(n);
    n() ? i.fx.start() : i.timers.pop();
  };
  i.fx.interval = 13;
  i.fx.start = function () {
    wt || (wt = n.setInterval(i.fx.tick, i.fx.interval));
  };
  i.fx.stop = function () {
    n.clearInterval(wt);
    wt = null;
  };
  i.fx.speeds = { slow: 600, fast: 200, _default: 400 };
  (i.fn.delay = function (t, r) {
    return (
      (t = i.fx ? i.fx.speeds[t] || t : t),
      (r = r || "fx"),
      this.queue(r, function (i, r) {
        var u = n.setTimeout(i, t);
        r.stop = function () {
          n.clearTimeout(u);
        };
      })
    );
  }),
    (function () {
      var i,
        n = u.createElement("input"),
        t = u.createElement("div"),
        f = u.createElement("select"),
        e = f.appendChild(u.createElement("option"));
      t = u.createElement("div");
      t.setAttribute("className", "t");
      t.innerHTML =
        "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
      i = t.getElementsByTagName("a")[0];
      n.setAttribute("type", "checkbox");
      t.appendChild(n);
      i = t.getElementsByTagName("a")[0];
      i.style.cssText = "top:1px";
      r.getSetAttribute = "t" !== t.className;
      r.style = /top/.test(i.getAttribute("style"));
      r.hrefNormalized = "/a" === i.getAttribute("href");
      r.checkOn = !!n.value;
      r.optSelected = e.selected;
      r.enctype = !!u.createElement("form").enctype;
      f.disabled = !0;
      r.optDisabled = !e.disabled;
      n = u.createElement("input");
      n.setAttribute("value", "");
      r.input = "" === n.getAttribute("value");
      n.value = "t";
      n.setAttribute("type", "radio");
      r.radioValue = "t" === n.value;
    })();
  pf = /\r/g;
  wf = /[\x20\t\r\n\f]+/g;
  i.fn.extend({
    val: function (n) {
      var t,
        r,
        f,
        u = this[0];
      return arguments.length
        ? ((f = i.isFunction(n)),
          this.each(function (r) {
            var u;
            1 === this.nodeType &&
              ((u = f ? n.call(this, r, i(this).val()) : n),
              null == u
                ? (u = "")
                : "number" == typeof u
                ? (u += "")
                : i.isArray(u) &&
                  (u = i.map(u, function (n) {
                    return null == n ? "" : n + "";
                  })),
              (t =
                i.valHooks[this.type] ||
                i.valHooks[this.nodeName.toLowerCase()]),
              (t && "set" in t && void 0 !== t.set(this, u, "value")) ||
                (this.value = u));
          }))
        : u
        ? ((t = i.valHooks[u.type] || i.valHooks[u.nodeName.toLowerCase()]),
          t && "get" in t && void 0 !== (r = t.get(u, "value"))
            ? r
            : ((r = u.value),
              "string" == typeof r ? r.replace(pf, "") : null == r ? "" : r))
        : void 0;
    },
  });
  i.extend({
    valHooks: {
      option: {
        get: function (n) {
          var t = i.find.attr(n, "value");
          return null != t ? t : i.trim(i.text(n)).replace(wf, " ");
        },
      },
      select: {
        get: function (n) {
          for (
            var o,
              t,
              s = n.options,
              u = n.selectedIndex,
              f = "select-one" === n.type || 0 > u,
              h = f ? null : [],
              c = f ? u + 1 : s.length,
              e = 0 > u ? c : f ? u : 0;
            c > e;
            e++
          )
            if (
              ((t = s[e]),
              (t.selected || e === u) &&
                (r.optDisabled
                  ? !t.disabled
                  : null === t.getAttribute("disabled")) &&
                (!t.parentNode.disabled ||
                  !i.nodeName(t.parentNode, "optgroup")))
            ) {
              if (((o = i(t).val()), f)) return o;
              h.push(o);
            }
          return h;
        },
        set: function (n, t) {
          for (var f, r, u = n.options, o = i.makeArray(t), e = u.length; e--; )
            if (((r = u[e]), i.inArray(i.valHooks.option.get(r), o) > -1))
              try {
                r.selected = f = !0;
              } catch (s) {
                r.scrollHeight;
              }
            else r.selected = !1;
          return f || (n.selectedIndex = -1), u;
        },
      },
    },
  });
  i.each(["radio", "checkbox"], function () {
    i.valHooks[this] = {
      set: function (n, t) {
        if (i.isArray(t)) return (n.checked = i.inArray(i(n).val(), t) > -1);
      },
    };
    r.checkOn ||
      (i.valHooks[this].get = function (n) {
        return null === n.getAttribute("value") ? "on" : n.value;
      });
  });
  var ft,
    bf,
    l = i.expr.attrHandle,
    di = /^(?:checked|selected)$/i,
    g = r.getSetAttribute,
    kt = r.input;
  i.fn.extend({
    attr: function (n, t) {
      return y(this, i.attr, n, t, arguments.length > 1);
    },
    removeAttr: function (n) {
      return this.each(function () {
        i.removeAttr(this, n);
      });
    },
  });
  i.extend({
    attr: function (n, t, r) {
      var u,
        f,
        e = n.nodeType;
      if (3 !== e && 8 !== e && 2 !== e)
        return "undefined" == typeof n.getAttribute
          ? i.prop(n, t, r)
          : ((1 === e && i.isXMLDoc(n)) ||
              ((t = t.toLowerCase()),
              (f = i.attrHooks[t] || (i.expr.match.bool.test(t) ? bf : ft))),
            void 0 !== r
              ? null === r
                ? void i.removeAttr(n, t)
                : f && "set" in f && void 0 !== (u = f.set(n, r, t))
                ? u
                : (n.setAttribute(t, r + ""), r)
              : f && "get" in f && null !== (u = f.get(n, t))
              ? u
              : ((u = i.find.attr(n, t)), null == u ? void 0 : u));
    },
    attrHooks: {
      type: {
        set: function (n, t) {
          if (!r.radioValue && "radio" === t && i.nodeName(n, "input")) {
            var u = n.value;
            return n.setAttribute("type", t), u && (n.value = u), t;
          }
        },
      },
    },
    removeAttr: function (n, t) {
      var r,
        u,
        e = 0,
        f = t && t.match(s);
      if (f && 1 === n.nodeType)
        while ((r = f[e++]))
          (u = i.propFix[r] || r),
            i.expr.match.bool.test(r)
              ? (kt && g) || !di.test(r)
                ? (n[u] = !1)
                : (n[i.camelCase("default-" + r)] = n[u] = !1)
              : i.attr(n, r, ""),
            n.removeAttribute(g ? r : u);
    },
  });
  bf = {
    set: function (n, t, r) {
      return (
        t === !1
          ? i.removeAttr(n, r)
          : (kt && g) || !di.test(r)
          ? n.setAttribute((!g && i.propFix[r]) || r, r)
          : (n[i.camelCase("default-" + r)] = n[r] = !0),
        r
      );
    },
  };
  i.each(i.expr.match.bool.source.match(/\w+/g), function (n, t) {
    var r = l[t] || i.find.attr;
    l[t] =
      (kt && g) || !di.test(t)
        ? function (n, t, i) {
            var u, f;
            return (
              i ||
                ((f = l[t]),
                (l[t] = u),
                (u = null != r(n, t, i) ? t.toLowerCase() : null),
                (l[t] = f)),
              u
            );
          }
        : function (n, t, r) {
            if (!r)
              return n[i.camelCase("default-" + t)] ? t.toLowerCase() : null;
          };
  });
  (kt && g) ||
    (i.attrHooks.value = {
      set: function (n, t, r) {
        return i.nodeName(n, "input")
          ? void (n.defaultValue = t)
          : ft && ft.set(n, t, r);
      },
    });
  g ||
    ((ft = {
      set: function (n, t, i) {
        var r = n.getAttributeNode(i);
        return (
          r || n.setAttributeNode((r = n.ownerDocument.createAttribute(i))),
          (r.value = t += ""),
          "value" === i || t === n.getAttribute(i) ? t : void 0
        );
      },
    }),
    (l.id =
      l.name =
      l.coords =
        function (n, t, i) {
          var r;
          if (!i)
            return (r = n.getAttributeNode(t)) && "" !== r.value
              ? r.value
              : null;
        }),
    (i.valHooks.button = {
      get: function (n, t) {
        var i = n.getAttributeNode(t);
        if (i && i.specified) return i.value;
      },
      set: ft.set,
    }),
    (i.attrHooks.contenteditable = {
      set: function (n, t, i) {
        ft.set(n, "" === t ? !1 : t, i);
      },
    }),
    i.each(["width", "height"], function (n, t) {
      i.attrHooks[t] = {
        set: function (n, i) {
          if ("" === i) return n.setAttribute(t, "auto"), i;
        },
      };
    }));
  r.style ||
    (i.attrHooks.style = {
      get: function (n) {
        return n.style.cssText || void 0;
      },
      set: function (n, t) {
        return (n.style.cssText = t + "");
      },
    });
  kf = /^(?:input|select|textarea|button|object)$/i;
  df = /^(?:a|area)$/i;
  i.fn.extend({
    prop: function (n, t) {
      return y(this, i.prop, n, t, arguments.length > 1);
    },
    removeProp: function (n) {
      return (
        (n = i.propFix[n] || n),
        this.each(function () {
          try {
            this[n] = void 0;
            delete this[n];
          } catch (t) {}
        })
      );
    },
  });
  i.extend({
    prop: function (n, t, r) {
      var f,
        u,
        e = n.nodeType;
      if (3 !== e && 8 !== e && 2 !== e)
        return (
          (1 === e && i.isXMLDoc(n)) ||
            ((t = i.propFix[t] || t), (u = i.propHooks[t])),
          void 0 !== r
            ? u && "set" in u && void 0 !== (f = u.set(n, r, t))
              ? f
              : (n[t] = r)
            : u && "get" in u && null !== (f = u.get(n, t))
            ? f
            : n[t]
        );
    },
    propHooks: {
      tabIndex: {
        get: function (n) {
          var t = i.find.attr(n, "tabindex");
          return t
            ? parseInt(t, 10)
            : kf.test(n.nodeName) || (df.test(n.nodeName) && n.href)
            ? 0
            : -1;
        },
      },
    },
    propFix: { for: "htmlFor", class: "className" },
  });
  r.hrefNormalized ||
    i.each(["href", "src"], function (n, t) {
      i.propHooks[t] = {
        get: function (n) {
          return n.getAttribute(t, 4);
        },
      };
    });
  r.optSelected ||
    (i.propHooks.selected = {
      get: function (n) {
        var t = n.parentNode;
        return (
          t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex),
          null
        );
      },
      set: function (n) {
        var t = n.parentNode;
        t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex);
      },
    });
  i.each(
    [
      "tabIndex",
      "readOnly",
      "maxLength",
      "cellSpacing",
      "cellPadding",
      "rowSpan",
      "colSpan",
      "useMap",
      "frameBorder",
      "contentEditable",
    ],
    function () {
      i.propFix[this.toLowerCase()] = this;
    }
  );
  r.enctype || (i.propFix.enctype = "encoding");
  dt = /[\t\r\n\f]/g;
  i.fn.extend({
    addClass: function (n) {
      var o,
        t,
        r,
        u,
        f,
        h,
        e,
        c = 0;
      if (i.isFunction(n))
        return this.each(function (t) {
          i(this).addClass(n.call(this, t, nt(this)));
        });
      if ("string" == typeof n && n)
        for (o = n.match(s) || []; (t = this[c++]); )
          if (
            ((u = nt(t)),
            (r = 1 === t.nodeType && (" " + u + " ").replace(dt, " ")))
          ) {
            for (h = 0; (f = o[h++]); )
              r.indexOf(" " + f + " ") < 0 && (r += f + " ");
            e = i.trim(r);
            u !== e && i.attr(t, "class", e);
          }
      return this;
    },
    removeClass: function (n) {
      var o,
        r,
        t,
        u,
        f,
        h,
        e,
        c = 0;
      if (i.isFunction(n))
        return this.each(function (t) {
          i(this).removeClass(n.call(this, t, nt(this)));
        });
      if (!arguments.length) return this.attr("class", "");
      if ("string" == typeof n && n)
        for (o = n.match(s) || []; (r = this[c++]); )
          if (
            ((u = nt(r)),
            (t = 1 === r.nodeType && (" " + u + " ").replace(dt, " ")))
          ) {
            for (h = 0; (f = o[h++]); )
              while (t.indexOf(" " + f + " ") > -1)
                t = t.replace(" " + f + " ", " ");
            e = i.trim(t);
            u !== e && i.attr(r, "class", e);
          }
      return this;
    },
    toggleClass: function (n, t) {
      var r = typeof n;
      return "boolean" == typeof t && "string" === r
        ? t
          ? this.addClass(n)
          : this.removeClass(n)
        : i.isFunction(n)
        ? this.each(function (r) {
            i(this).toggleClass(n.call(this, r, nt(this), t), t);
          })
        : this.each(function () {
            var t, f, u, e;
            if ("string" === r)
              for (f = 0, u = i(this), e = n.match(s) || []; (t = e[f++]); )
                u.hasClass(t) ? u.removeClass(t) : u.addClass(t);
            else
              (void 0 !== n && "boolean" !== r) ||
                ((t = nt(this)),
                t && i._data(this, "__className__", t),
                i.attr(
                  this,
                  "class",
                  t || n === !1 ? "" : i._data(this, "__className__") || ""
                ));
          });
    },
    hasClass: function (n) {
      for (var t, r = 0, i = " " + n + " "; (t = this[r++]); )
        if (
          1 === t.nodeType &&
          (" " + nt(t) + " ").replace(dt, " ").indexOf(i) > -1
        )
          return !0;
      return !1;
    },
  });
  i.each(
    "blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(
      " "
    ),
    function (n, t) {
      i.fn[t] = function (n, i) {
        return arguments.length > 0 ? this.on(t, null, n, i) : this.trigger(t);
      };
    }
  );
  i.fn.extend({
    hover: function (n, t) {
      return this.mouseenter(n).mouseleave(t || n);
    },
  });
  var po = n.location,
    gi = i.now(),
    nr = /\?/,
    wo =
      /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
  i.parseJSON = function (t) {
    if (n.JSON && n.JSON.parse) return n.JSON.parse(t + "");
    var f,
      r = null,
      u = i.trim(t + "");
    return u &&
      !i.trim(
        u.replace(wo, function (n, t, i, u) {
          return (
            f && t && (r = 0), 0 === r ? n : ((f = i || t), (r += !u - !i), "")
          );
        })
      )
      ? Function("return " + u)()
      : i.error("Invalid JSON: " + t);
  };
  i.parseXML = function (t) {
    var r, u;
    if (!t || "string" != typeof t) return null;
    try {
      n.DOMParser
        ? ((u = new n.DOMParser()), (r = u.parseFromString(t, "text/xml")))
        : ((r = new n.ActiveXObject("Microsoft.XMLDOM")),
          (r.async = "false"),
          r.loadXML(t));
    } catch (f) {
      r = void 0;
    }
    return (
      (r &&
        r.documentElement &&
        !r.getElementsByTagName("parsererror").length) ||
        i.error("Invalid XML: " + t),
      r
    );
  };
  var bo = /#.*$/,
    gf = /([?&])_=[^&]*/,
    ko = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
    go = /^(?:GET|HEAD)$/,
    ns = /^\/\//,
    ne = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
    te = {},
    tr = {},
    ie = "*/".concat("*"),
    ir = po.href,
    et = ne.exec(ir.toLowerCase()) || [];
  i.extend({
    active: 0,
    lastModified: {},
    etag: {},
    ajaxSettings: {
      url: ir,
      type: "GET",
      isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(
        et[1]
      ),
      global: !0,
      processData: !0,
      async: !0,
      contentType: "application/x-www-form-urlencoded; charset=UTF-8",
      accepts: {
        "*": ie,
        text: "text/plain",
        html: "text/html",
        xml: "application/xml, text/xml",
        json: "application/json, text/javascript",
      },
      contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ },
      responseFields: {
        xml: "responseXML",
        text: "responseText",
        json: "responseJSON",
      },
      converters: {
        "* text": String,
        "text html": !0,
        "text json": i.parseJSON,
        "text xml": i.parseXML,
      },
      flatOptions: { url: !0, context: !0 },
    },
    ajaxSetup: function (n, t) {
      return t ? rr(rr(n, i.ajaxSettings), t) : rr(i.ajaxSettings, n);
    },
    ajaxPrefilter: re(te),
    ajaxTransport: re(tr),
    ajax: function (t, r) {
      function w(t, r, s, c) {
        var y,
          rt,
          it,
          w,
          tt,
          l = r;
        2 !== o &&
          ((o = 2),
          k && n.clearTimeout(k),
          (v = void 0),
          (b = c || ""),
          (f.readyState = t > 0 ? 4 : 0),
          (y = (t >= 200 && 300 > t) || 304 === t),
          s && (w = ts(u, f, s)),
          (w = is(u, w, f, y)),
          y
            ? (u.ifModified &&
                ((tt = f.getResponseHeader("Last-Modified")),
                tt && (i.lastModified[e] = tt),
                (tt = f.getResponseHeader("etag")),
                tt && (i.etag[e] = tt)),
              204 === t || "HEAD" === u.type
                ? (l = "nocontent")
                : 304 === t
                ? (l = "notmodified")
                : ((l = w.state), (rt = w.data), (it = w.error), (y = !it)))
            : ((it = l), (!t && l) || ((l = "error"), 0 > t && (t = 0))),
          (f.status = t),
          (f.statusText = (r || l) + ""),
          y ? g.resolveWith(h, [rt, l, f]) : g.rejectWith(h, [f, l, it]),
          f.statusCode(p),
          (p = void 0),
          a && d.trigger(y ? "ajaxSuccess" : "ajaxError", [f, u, y ? rt : it]),
          nt.fireWith(h, [f, l]),
          a &&
            (d.trigger("ajaxComplete", [f, u]),
            --i.active || i.event.trigger("ajaxStop")));
      }
      "object" == typeof t && ((r = t), (t = void 0));
      r = r || {};
      var c,
        l,
        e,
        b,
        k,
        a,
        v,
        y,
        u = i.ajaxSetup({}, r),
        h = u.context || u,
        d = u.context && (h.nodeType || h.jquery) ? i(h) : i.event,
        g = i.Deferred(),
        nt = i.Callbacks("once memory"),
        p = u.statusCode || {},
        tt = {},
        it = {},
        o = 0,
        rt = "canceled",
        f = {
          readyState: 0,
          getResponseHeader: function (n) {
            var t;
            if (2 === o) {
              if (!y)
                for (y = {}; (t = ko.exec(b)); ) y[t[1].toLowerCase()] = t[2];
              t = y[n.toLowerCase()];
            }
            return null == t ? null : t;
          },
          getAllResponseHeaders: function () {
            return 2 === o ? b : null;
          },
          setRequestHeader: function (n, t) {
            var i = n.toLowerCase();
            return o || ((n = it[i] = it[i] || n), (tt[n] = t)), this;
          },
          overrideMimeType: function (n) {
            return o || (u.mimeType = n), this;
          },
          statusCode: function (n) {
            var t;
            if (n)
              if (2 > o) for (t in n) p[t] = [p[t], n[t]];
              else f.always(n[f.status]);
            return this;
          },
          abort: function (n) {
            var t = n || rt;
            return v && v.abort(t), w(0, t), this;
          },
        };
      if (
        ((g.promise(f).complete = nt.add),
        (f.success = f.done),
        (f.error = f.fail),
        (u.url = ((t || u.url || ir) + "")
          .replace(bo, "")
          .replace(ns, et[1] + "//")),
        (u.type = r.method || r.type || u.method || u.type),
        (u.dataTypes = i
          .trim(u.dataType || "*")
          .toLowerCase()
          .match(s) || [""]),
        null == u.crossDomain &&
          ((c = ne.exec(u.url.toLowerCase())),
          (u.crossDomain = !(
            !c ||
            (c[1] === et[1] &&
              c[2] === et[2] &&
              (c[3] || ("http:" === c[1] ? "80" : "443")) ===
                (et[3] || ("http:" === et[1] ? "80" : "443")))
          ))),
        u.data &&
          u.processData &&
          "string" != typeof u.data &&
          (u.data = i.param(u.data, u.traditional)),
        ue(te, u, r, f),
        2 === o)
      )
        return f;
      a = i.event && u.global;
      a && 0 == i.active++ && i.event.trigger("ajaxStart");
      u.type = u.type.toUpperCase();
      u.hasContent = !go.test(u.type);
      e = u.url;
      u.hasContent ||
        (u.data &&
          ((e = u.url += (nr.test(e) ? "&" : "?") + u.data), delete u.data),
        u.cache === !1 &&
          (u.url = gf.test(e)
            ? e.replace(gf, "$1_=" + gi++)
            : e + (nr.test(e) ? "&" : "?") + "_=" + gi++));
      u.ifModified &&
        (i.lastModified[e] &&
          f.setRequestHeader("If-Modified-Since", i.lastModified[e]),
        i.etag[e] && f.setRequestHeader("If-None-Match", i.etag[e]));
      ((u.data && u.hasContent && u.contentType !== !1) || r.contentType) &&
        f.setRequestHeader("Content-Type", u.contentType);
      f.setRequestHeader(
        "Accept",
        u.dataTypes[0] && u.accepts[u.dataTypes[0]]
          ? u.accepts[u.dataTypes[0]] +
              ("*" !== u.dataTypes[0] ? ", " + ie + "; q=0.01" : "")
          : u.accepts["*"]
      );
      for (l in u.headers) f.setRequestHeader(l, u.headers[l]);
      if (u.beforeSend && (u.beforeSend.call(h, f, u) === !1 || 2 === o))
        return f.abort();
      rt = "abort";
      for (l in { success: 1, error: 1, complete: 1 }) f[l](u[l]);
      if ((v = ue(tr, u, r, f))) {
        if (((f.readyState = 1), a && d.trigger("ajaxSend", [f, u]), 2 === o))
          return f;
        u.async &&
          u.timeout > 0 &&
          (k = n.setTimeout(function () {
            f.abort("timeout");
          }, u.timeout));
        try {
          o = 1;
          v.send(tt, w);
        } catch (ut) {
          if (!(2 > o)) throw ut;
          w(-1, ut);
        }
      } else w(-1, "No Transport");
      return f;
    },
    getJSON: function (n, t, r) {
      return i.get(n, t, r, "json");
    },
    getScript: function (n, t) {
      return i.get(n, void 0, t, "script");
    },
  });
  i.each(["get", "post"], function (n, t) {
    i[t] = function (n, r, u, f) {
      return (
        i.isFunction(r) && ((f = f || u), (u = r), (r = void 0)),
        i.ajax(
          i.extend(
            { url: n, type: t, dataType: f, data: r, success: u },
            i.isPlainObject(n) && n
          )
        )
      );
    };
  });
  i._evalUrl = function (n) {
    return i.ajax({
      url: n,
      type: "GET",
      dataType: "script",
      cache: !0,
      async: !1,
      global: !1,
      throws: !0,
    });
  };
  i.fn.extend({
    wrapAll: function (n) {
      if (i.isFunction(n))
        return this.each(function (t) {
          i(this).wrapAll(n.call(this, t));
        });
      if (this[0]) {
        var t = i(n, this[0].ownerDocument).eq(0).clone(!0);
        this[0].parentNode && t.insertBefore(this[0]);
        t.map(function () {
          for (var n = this; n.firstChild && 1 === n.firstChild.nodeType; )
            n = n.firstChild;
          return n;
        }).append(this);
      }
      return this;
    },
    wrapInner: function (n) {
      return i.isFunction(n)
        ? this.each(function (t) {
            i(this).wrapInner(n.call(this, t));
          })
        : this.each(function () {
            var t = i(this),
              r = t.contents();
            r.length ? r.wrapAll(n) : t.append(n);
          });
    },
    wrap: function (n) {
      var t = i.isFunction(n);
      return this.each(function (r) {
        i(this).wrapAll(t ? n.call(this, r) : n);
      });
    },
    unwrap: function () {
      return this.parent()
        .each(function () {
          i.nodeName(this, "body") || i(this).replaceWith(this.childNodes);
        })
        .end();
    },
  });
  i.expr.filters.hidden = function (n) {
    return r.reliableHiddenOffsets()
      ? n.offsetWidth <= 0 && n.offsetHeight <= 0 && !n.getClientRects().length
      : us(n);
  };
  i.expr.filters.visible = function (n) {
    return !i.expr.filters.hidden(n);
  };
  var fs = /%20/g,
    es = /\[\]$/,
    fe = /\r?\n/g,
    os = /^(?:submit|button|image|reset|file)$/i,
    ss = /^(?:input|select|textarea|keygen)/i;
  i.param = function (n, t) {
    var r,
      u = [],
      f = function (n, t) {
        t = i.isFunction(t) ? t() : null == t ? "" : t;
        u[u.length] = encodeURIComponent(n) + "=" + encodeURIComponent(t);
      };
    if (
      (void 0 === t && (t = i.ajaxSettings && i.ajaxSettings.traditional),
      i.isArray(n) || (n.jquery && !i.isPlainObject(n)))
    )
      i.each(n, function () {
        f(this.name, this.value);
      });
    else for (r in n) ur(r, n[r], t, f);
    return u.join("&").replace(fs, "+");
  };
  i.fn.extend({
    serialize: function () {
      return i.param(this.serializeArray());
    },
    serializeArray: function () {
      return this.map(function () {
        var n = i.prop(this, "elements");
        return n ? i.makeArray(n) : this;
      })
        .filter(function () {
          var n = this.type;
          return (
            this.name &&
            !i(this).is(":disabled") &&
            ss.test(this.nodeName) &&
            !os.test(n) &&
            (this.checked || !si.test(n))
          );
        })
        .map(function (n, t) {
          var r = i(this).val();
          return null == r
            ? null
            : i.isArray(r)
            ? i.map(r, function (n) {
                return { name: t.name, value: n.replace(fe, "\r\n") };
              })
            : { name: t.name, value: r.replace(fe, "\r\n") };
        })
        .get();
    },
  });
  i.ajaxSettings.xhr =
    void 0 !== n.ActiveXObject
      ? function () {
          return this.isLocal
            ? ee()
            : u.documentMode > 8
            ? fr()
            : (/^(get|post|head|put|delete|options)$/i.test(this.type) &&
                fr()) ||
              ee();
        }
      : fr;
  var hs = 0,
    gt = {},
    ct = i.ajaxSettings.xhr();
  return (
    n.attachEvent &&
      n.attachEvent("onunload", function () {
        for (var n in gt) gt[n](void 0, !0);
      }),
    (r.cors = !!ct && "withCredentials" in ct),
    (ct = r.ajax = !!ct),
    ct &&
      i.ajaxTransport(function (t) {
        if (!t.crossDomain || r.cors) {
          var u;
          return {
            send: function (r, f) {
              var o,
                e = t.xhr(),
                s = ++hs;
              if (
                (e.open(t.type, t.url, t.async, t.username, t.password),
                t.xhrFields)
              )
                for (o in t.xhrFields) e[o] = t.xhrFields[o];
              t.mimeType &&
                e.overrideMimeType &&
                e.overrideMimeType(t.mimeType);
              t.crossDomain ||
                r["X-Requested-With"] ||
                (r["X-Requested-With"] = "XMLHttpRequest");
              for (o in r) void 0 !== r[o] && e.setRequestHeader(o, r[o] + "");
              e.send((t.hasContent && t.data) || null);
              u = function (n, r) {
                var o, c, h;
                if (u && (r || 4 === e.readyState))
                  if (
                    (delete gt[s],
                    (u = void 0),
                    (e.onreadystatechange = i.noop),
                    r)
                  )
                    4 !== e.readyState && e.abort();
                  else {
                    h = {};
                    o = e.status;
                    "string" == typeof e.responseText &&
                      (h.text = e.responseText);
                    try {
                      c = e.statusText;
                    } catch (l) {
                      c = "";
                    }
                    o || !t.isLocal || t.crossDomain
                      ? 1223 === o && (o = 204)
                      : (o = h.text ? 200 : 404);
                  }
                h && f(o, c, h, e.getAllResponseHeaders());
              };
              t.async
                ? 4 === e.readyState
                  ? n.setTimeout(u)
                  : (e.onreadystatechange = gt[s] = u)
                : u();
            },
            abort: function () {
              u && u(void 0, !0);
            },
          };
        }
      }),
    i.ajaxSetup({
      accepts: {
        script:
          "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript",
      },
      contents: { script: /\b(?:java|ecma)script\b/ },
      converters: {
        "text script": function (n) {
          return i.globalEval(n), n;
        },
      },
    }),
    i.ajaxPrefilter("script", function (n) {
      void 0 === n.cache && (n.cache = !1);
      n.crossDomain && ((n.type = "GET"), (n.global = !1));
    }),
    i.ajaxTransport("script", function (n) {
      if (n.crossDomain) {
        var t,
          r = u.head || i("head")[0] || u.documentElement;
        return {
          send: function (i, f) {
            t = u.createElement("script");
            t.async = !0;
            n.scriptCharset && (t.charset = n.scriptCharset);
            t.src = n.url;
            t.onload = t.onreadystatechange = function (n, i) {
              (i || !t.readyState || /loaded|complete/.test(t.readyState)) &&
                ((t.onload = t.onreadystatechange = null),
                t.parentNode && t.parentNode.removeChild(t),
                (t = null),
                i || f(200, "success"));
            };
            r.insertBefore(t, r.firstChild);
          },
          abort: function () {
            t && t.onload(void 0, !0);
          },
        };
      }
    }),
    (er = []),
    (ni = /(=)\?(?=&|$)|\?\?/),
    i.ajaxSetup({
      jsonp: "callback",
      jsonpCallback: function () {
        var n = er.pop() || i.expando + "_" + gi++;
        return (this[n] = !0), n;
      },
    }),
    i.ajaxPrefilter("json jsonp", function (t, r, u) {
      var f,
        e,
        o,
        s =
          t.jsonp !== !1 &&
          (ni.test(t.url)
            ? "url"
            : "string" == typeof t.data &&
              0 ===
                (t.contentType || "").indexOf(
                  "application/x-www-form-urlencoded"
                ) &&
              ni.test(t.data) &&
              "data");
      if (s || "jsonp" === t.dataTypes[0])
        return (
          (f = t.jsonpCallback =
            i.isFunction(t.jsonpCallback)
              ? t.jsonpCallback()
              : t.jsonpCallback),
          s
            ? (t[s] = t[s].replace(ni, "$1" + f))
            : t.jsonp !== !1 &&
              (t.url += (nr.test(t.url) ? "&" : "?") + t.jsonp + "=" + f),
          (t.converters["script json"] = function () {
            return o || i.error(f + " was not called"), o[0];
          }),
          (t.dataTypes[0] = "json"),
          (e = n[f]),
          (n[f] = function () {
            o = arguments;
          }),
          u.always(function () {
            void 0 === e ? i(n).removeProp(f) : (n[f] = e);
            t[f] && ((t.jsonpCallback = r.jsonpCallback), er.push(f));
            o && i.isFunction(e) && e(o[0]);
            o = e = void 0;
          }),
          "script"
        );
    }),
    (i.parseHTML = function (n, t, r) {
      if (!n || "string" != typeof n) return null;
      "boolean" == typeof t && ((r = t), (t = !1));
      t = t || u;
      var f = vr.exec(n),
        e = !r && [];
      return f
        ? [t.createElement(f[1])]
        : ((f = hu([n], t, e)),
          e && e.length && i(e).remove(),
          i.merge([], f.childNodes));
    }),
    (or = i.fn.load),
    (i.fn.load = function (n, t, r) {
      if ("string" != typeof n && or) return or.apply(this, arguments);
      var u,
        o,
        s,
        f = this,
        e = n.indexOf(" ");
      return (
        e > -1 && ((u = i.trim(n.slice(e, n.length))), (n = n.slice(0, e))),
        i.isFunction(t)
          ? ((r = t), (t = void 0))
          : t && "object" == typeof t && (o = "POST"),
        f.length > 0 &&
          i
            .ajax({ url: n, type: o || "GET", dataType: "html", data: t })
            .done(function (n) {
              s = arguments;
              f.html(u ? i("<div>").append(i.parseHTML(n)).find(u) : n);
            })
            .always(
              r &&
                function (n, t) {
                  f.each(function () {
                    r.apply(this, s || [n.responseText, t, n]);
                  });
                }
            ),
        this
      );
    }),
    i.each(
      [
        "ajaxStart",
        "ajaxStop",
        "ajaxComplete",
        "ajaxError",
        "ajaxSuccess",
        "ajaxSend",
      ],
      function (n, t) {
        i.fn[t] = function (n) {
          return this.on(t, n);
        };
      }
    ),
    (i.expr.filters.animated = function (n) {
      return i.grep(i.timers, function (t) {
        return n === t.elem;
      }).length;
    }),
    (i.offset = {
      setOffset: function (n, t, r) {
        var e,
          o,
          s,
          h,
          u,
          c,
          v,
          l = i.css(n, "position"),
          a = i(n),
          f = {};
        "static" === l && (n.style.position = "relative");
        u = a.offset();
        s = i.css(n, "top");
        c = i.css(n, "left");
        v =
          ("absolute" === l || "fixed" === l) && i.inArray("auto", [s, c]) > -1;
        v
          ? ((e = a.position()), (h = e.top), (o = e.left))
          : ((h = parseFloat(s) || 0), (o = parseFloat(c) || 0));
        i.isFunction(t) && (t = t.call(n, r, i.extend({}, u)));
        null != t.top && (f.top = t.top - u.top + h);
        null != t.left && (f.left = t.left - u.left + o);
        "using" in t ? t.using.call(n, f) : a.css(f);
      },
    }),
    i.fn.extend({
      offset: function (n) {
        if (arguments.length)
          return void 0 === n
            ? this
            : this.each(function (t) {
                i.offset.setOffset(this, n, t);
              });
        var t,
          f,
          u = { top: 0, left: 0 },
          r = this[0],
          e = r && r.ownerDocument;
        if (e)
          return (
            (t = e.documentElement),
            i.contains(t, r)
              ? ("undefined" != typeof r.getBoundingClientRect &&
                  (u = r.getBoundingClientRect()),
                (f = oe(e)),
                {
                  top:
                    u.top + (f.pageYOffset || t.scrollTop) - (t.clientTop || 0),
                  left:
                    u.left +
                    (f.pageXOffset || t.scrollLeft) -
                    (t.clientLeft || 0),
                })
              : u
          );
      },
      position: function () {
        if (this[0]) {
          var n,
            r,
            t = { top: 0, left: 0 },
            u = this[0];
          return (
            "fixed" === i.css(u, "position")
              ? (r = u.getBoundingClientRect())
              : ((n = this.offsetParent()),
                (r = this.offset()),
                i.nodeName(n[0], "html") || (t = n.offset()),
                (t.top += i.css(n[0], "borderTopWidth", !0)),
                (t.left += i.css(n[0], "borderLeftWidth", !0))),
            {
              top: r.top - t.top - i.css(u, "marginTop", !0),
              left: r.left - t.left - i.css(u, "marginLeft", !0),
            }
          );
        }
      },
      offsetParent: function () {
        return this.map(function () {
          for (
            var n = this.offsetParent;
            n && !i.nodeName(n, "html") && "static" === i.css(n, "position");

          )
            n = n.offsetParent;
          return n || nf;
        });
      },
    }),
    i.each(
      { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" },
      function (n, t) {
        var r = /Y/.test(t);
        i.fn[n] = function (u) {
          return y(
            this,
            function (n, u, f) {
              var e = oe(n);
              return void 0 === f
                ? e
                  ? t in e
                    ? e[t]
                    : e.document.documentElement[u]
                  : n[u]
                : void (e
                    ? e.scrollTo(
                        r ? i(e).scrollLeft() : f,
                        r ? f : i(e).scrollTop()
                      )
                    : (n[u] = f));
            },
            n,
            u,
            arguments.length,
            null
          );
        };
      }
    ),
    i.each(["top", "left"], function (n, t) {
      i.cssHooks[t] = bi(r.pixelPosition, function (n, r) {
        if (r) return (r = p(n, t)), pt.test(r) ? i(n).position()[t] + "px" : r;
      });
    }),
    i.each({ Height: "height", Width: "width" }, function (n, t) {
      i.each(
        { padding: "inner" + n, content: t, "": "outer" + n },
        function (r, u) {
          i.fn[u] = function (u, f) {
            var e = arguments.length && (r || "boolean" != typeof u),
              o = r || (u === !0 || f === !0 ? "margin" : "border");
            return y(
              this,
              function (t, r, u) {
                var f;
                return i.isWindow(t)
                  ? t.document.documentElement["client" + n]
                  : 9 === t.nodeType
                  ? ((f = t.documentElement),
                    Math.max(
                      t.body["scroll" + n],
                      f["scroll" + n],
                      t.body["offset" + n],
                      f["offset" + n],
                      f["client" + n]
                    ))
                  : void 0 === u
                  ? i.css(t, r, o)
                  : i.style(t, r, u, o);
              },
              t,
              e ? u : void 0,
              e,
              null
            );
          };
        }
      );
    }),
    i.fn.extend({
      bind: function (n, t, i) {
        return this.on(n, null, t, i);
      },
      unbind: function (n, t) {
        return this.off(n, null, t);
      },
      delegate: function (n, t, i, r) {
        return this.on(t, n, i, r);
      },
      undelegate: function (n, t, i) {
        return 1 === arguments.length
          ? this.off(n, "**")
          : this.off(t, n || "**", i);
      },
    }),
    (i.fn.size = function () {
      return this.length;
    }),
    (i.fn.andSelf = i.fn.addBack),
    "function" == typeof define &&
      define.amd &&
      define("jquery", [], function () {
        return i;
      }),
    (se = n.jQuery),
    (he = n.$),
    (i.noConflict = function (t) {
      return n.$ === i && (n.$ = he), t && n.jQuery === i && (n.jQuery = se), i;
    }),
    t || (n.jQuery = n.$ = i),
    i
  );
});
!(function (n, t) {
  t("kendo.core.min", ["jquery"], n);
})(
  function () {
    return (
      (function (n, t, i) {
        function g() {}
        function ar(n, t) {
          if (t)
            return (
              "'" +
              n
                .split("'")
                .join("\\'")
                .split('\\"')
                .join('\\\\\\"')
                .replace(/\n/g, "\\n")
                .replace(/\r/g, "\\r")
                .replace(/\t/g, "\\t") +
              "'"
            );
          var i = n.charAt(0),
            r = n.substring(1);
          return "=" === i
            ? "+(" + r + ")+"
            : ":" === i
            ? "+$kendoHtmlEncode(" + r + ")+"
            : ";" + n + ";$kendoOutput+=";
        }
        function f(n, t, i) {
          return (
            (n += ""),
            (t = t || 2),
            (i = t - n.length),
            i ? ai[t].substring(0, i) + n : n
          );
        }
        function vr(n) {
          var u =
              n.css(r.support.transitions.css + "box-shadow") ||
              n.css("box-shadow"),
            t = u ? u.match(lu) || [0, 0, 0, 0, 0] : [0, 0, 0, 0, 0],
            i = c.max(+t[3], +(t[4] || 0));
          return { left: -t[1] + i, right: +t[1] + i, bottom: +t[2] + i };
        }
        function yr(i, f) {
          var v,
            o,
            s,
            l,
            a,
            y,
            p = u.browser,
            h = r._outerWidth,
            w = r._outerHeight,
            e = i.parent(),
            b = h(t);
          return (
            e.removeClass("k-animation-container-sm"),
            e.hasClass("k-animation-container")
              ? dt(i, f)
              : ((o = i[0].style.width),
                (s = i[0].style.height),
                (l = ft.test(o)),
                (a = ft.test(s)),
                (y =
                  i.hasClass("k-tooltip") ||
                  i.is(".k-menu-horizontal.k-context-menu")),
                (v = l || a),
                !l && (!f || (f && o) || y) && (o = f ? h(i) + 1 : h(i)),
                ((!a && (!f || (f && s))) ||
                  i.is(".k-menu-horizontal.k-context-menu")) &&
                  (s = w(i)),
                i.wrap(
                  n("<div/>")
                    .addClass("k-animation-container")
                    .css({ width: o, height: s })
                ),
                (e = i.parent()),
                v &&
                  i.css({
                    width: "100%",
                    height: "100%",
                    boxSizing: "border-box",
                    mozBoxSizing: "border-box",
                    webkitBoxSizing: "border-box",
                  })),
            b < h(e) && (e.addClass("k-animation-container-sm"), dt(i, f)),
            p.msie &&
              c.floor(p.version) <= 7 &&
              (i.css({ zoom: 1 }), i.children(".k-menu").width(i.width())),
            e
          );
        }
        function dt(n, t) {
          var u,
            f = r._outerWidth,
            o = r._outerHeight,
            i = n.parent(".k-animation-container"),
            e = i[0].style;
          i.is(":hidden") && i.css({ display: "", position: "" });
          u = ft.test(e.width) || ft.test(e.height);
          u ||
            i.css({
              width: t ? f(n) + 1 : f(n),
              height: o(n),
              boxSizing: "content-box",
              mozBoxSizing: "content-box",
              webkitBoxSizing: "content-box",
            });
        }
        function st(n) {
          for (var t = 1, i = arguments.length, t = 1; t < i; t++)
            gt(n, arguments[t]);
          return n;
        }
        function gt(n, i) {
          var e,
            u,
            o,
            f,
            s,
            h = r.data.ObservableArray,
            c = r.data.LazyObservableArray,
            l = r.data.DataSource,
            a = r.data.HierarchicalDataSource;
          for (e in i)
            (u = i[e]),
              (o = typeof u),
              (f = o === k && null !== u ? u.constructor : null),
              !f ||
              f === Array ||
              f === h ||
              f === c ||
              f === l ||
              f === a ||
              f === RegExp ||
              (r.isFunction(t.ArrayBuffer) && f === ArrayBuffer)
                ? o !== ot && (n[e] = u)
                : u instanceof Date
                ? (n[e] = new Date(u.getTime()))
                : d(u.clone)
                ? (n[e] = u.clone())
                : ((s = n[e]),
                  (n[e] = typeof s === k ? s || {} : {}),
                  gt(n[e], u));
          return n;
        }
        function ht(n, t, r) {
          for (var u in t) if (t.hasOwnProperty(u) && t[u].test(n)) return u;
          return r !== i ? r : n;
        }
        function pr(n) {
          return n.replace(/([a-z][A-Z])/g, function (n) {
            return n.charAt(0) + "-" + n.charAt(1).toLowerCase();
          });
        }
        function ni(n) {
          return n.replace(/\-(\w)/g, function (n, t) {
            return t.toUpperCase();
          });
        }
        function ti(t, i) {
          var u,
            f = {};
          return (
            document.defaultView && document.defaultView.getComputedStyle
              ? ((u = document.defaultView.getComputedStyle(t, "")),
                i &&
                  n.each(i, function (n, t) {
                    f[t] = u.getPropertyValue(t);
                  }))
              : ((u = t.currentStyle),
                i &&
                  n.each(i, function (n, t) {
                    f[t] = u[ni(t)];
                  })),
            r.size(f) || (f = u),
            f
          );
        }
        function wr(n) {
          if (
            n &&
            n.className &&
            "string" == typeof n.className &&
            n.className.indexOf("k-auto-scrollable") > -1
          )
            return !0;
          var t = ti(n, ["overflow"]).overflow;
          return "auto" == t || "scroll" == t;
        }
        function br(t, r) {
          var e,
            o = u.browser.webkit,
            s = u.browser.mozilla,
            f = t instanceof n ? t[0] : t;
          if (t)
            return (
              (e = u.isRtl(t)),
              r === i
                ? e && o
                  ? f.scrollWidth - f.clientWidth - f.scrollLeft
                  : Math.abs(f.scrollLeft)
                : ((f.scrollLeft =
                    e && o
                      ? f.scrollWidth - f.clientWidth - r
                      : e && s
                      ? -r
                      : r),
                  i)
            );
        }
        function kr(n) {
          var t,
            i = 0;
          for (t in n) n.hasOwnProperty(t) && "toJSON" != t && i++;
          return i;
        }
        function dr(n, i, r) {
          var f, e, o;
          return (
            i || (i = "offset"),
            (f = n[i]()),
            (e = {
              top: f.top,
              right: f.right,
              bottom: f.bottom,
              left: f.left,
            }),
            u.browser.msie &&
              (u.pointers || u.msPointers) &&
              !r &&
              ((o = u.isRtl(n) ? 1 : -1),
              (e.top -= t.pageYOffset - document.documentElement.scrollTop),
              (e.left -=
                t.pageXOffset + o * document.documentElement.scrollLeft)),
            e
          );
        }
        function gr(n) {
          var t = {};
          return (
            it("string" == typeof n ? n.split(" ") : n, function (n) {
              t[n] = this;
            }),
            t
          );
        }
        function nu(n) {
          return new r.effects.Element(n);
        }
        function tu(n, t, i, r) {
          return (
            typeof n === o &&
              (d(t) && ((r = t), (t = 400), (i = !1)),
              d(i) && ((r = i), (i = !1)),
              typeof t === sr && ((i = t), (t = 400)),
              (n = { effects: n, duration: t, reverse: i, complete: r })),
            h(
              {
                effects: {},
                duration: 400,
                reverse: !1,
                init: rt,
                teardown: rt,
                hide: !1,
              },
              n,
              { completeCallback: n.complete, complete: rt }
            )
          );
        }
        function ii(t, i, r, u, f) {
          for (var e, o = 0, s = t.length; o < s; o++)
            (e = n(t[o])),
              e.queue(function () {
                y.promise(e, tu(i, r, u, f));
              });
          return t;
        }
        function iu(n, t, i, r) {
          return (
            t &&
              ((t = t.split(" ")),
              it(t, function (t, i) {
                n.toggleClass(i, r);
              })),
            n
          );
        }
        function ru(n) {
          return ("" + n)
            .replace(yi, "&amp;")
            .replace(pi, "&lt;")
            .replace(ki, "&gt;")
            .replace(wi, "&quot;")
            .replace(bi, "&#39;");
        }
        function uu(n) {
          var i;
          try {
            i = t.decodeURIComponent(n);
          } catch (r) {
            i = n.replace(/%u([\dA-F]{4})|%([\dA-F]{2})/gi, function (n, t, i) {
              return String.fromCharCode(parseInt("0x" + (t || i), 16));
            });
          }
          return i;
        }
        function ct(n, t) {
          var u;
          return (
            0 === t.indexOf("data") &&
              ((t = t.substring(4)),
              (t = t.charAt(0).toLowerCase() + t.substring(1))),
            (t = t.replace(rr, "-$1")),
            (u = n.getAttribute("data-" + r.ns + t)),
            null === u
              ? (u = i)
              : "null" === u
              ? (u = null)
              : "true" === u
              ? (u = !0)
              : "false" === u
              ? (u = !1)
              : au.test(u) && "mask" != t
              ? (u = parseFloat(u))
              : tr.test(u) &&
                !ir.test(u) &&
                (u = Function("return (" + u + ")")()),
            u
          );
        }
        function ri(t, u, f) {
          var o,
            e,
            s = {},
            h = t.getAttribute("data-" + r.ns + "role");
          for (o in u)
            (e = ct(t, o)),
              e !== i &&
                (nr.test(o) &&
                  "drawer" != h &&
                  ("string" == typeof e
                    ? n("#" + e).length
                      ? (e = r.template(n("#" + e).html()))
                      : f && (e = r.template(f[e]))
                    : (e = t.getAttribute(o))),
                (s[o] = e));
          return s;
        }
        function fu(t, i) {
          return n.contains(t, i) ? -1 : 1;
        }
        function eu() {
          var t = n(this);
          return (
            n.inArray(t.attr("data-" + r.ns + "role"), [
              "slider",
              "rangeslider",
            ]) > -1 || t.is(":visible")
          );
        }
        function ou(n, t) {
          var i = n.nodeName.toLowerCase();
          return (
            (/input|select|textarea|button|object/.test(i)
              ? !n.disabled
              : "a" === i
              ? n.href || t
              : t) && su(n)
          );
        }
        function su(t) {
          return (
            n.expr.pseudos.visible(t) &&
            !n(t)
              .parents()
              .addBack()
              .filter(function () {
                return "hidden" === n.css(this, "visibility");
              }).length
          );
        }
        function s(n, t) {
          return new s.fn.init(n, t);
        }
        var v,
          d,
          ui,
          fi,
          nt,
          ei,
          oi,
          si,
          hi,
          ci,
          li,
          ai,
          vi,
          y,
          yi,
          pi,
          wi,
          bi,
          ki,
          lt,
          di,
          gi,
          p,
          at,
          nr,
          tr,
          ir,
          rr,
          vt,
          yt,
          pt,
          ur,
          e,
          w,
          fr,
          wt,
          tt,
          er,
          or,
          a,
          r = (t.kendo = t.kendo || { cultures: {} }),
          h = n.extend,
          it = n.each,
          hu = n.isArray,
          bt = n.proxy,
          rt = n.noop,
          c = Math,
          ut = t.JSON || {},
          u = {},
          ft = /%/,
          cu = /\{(\d+)(:[^\}]+)?\}/g,
          lu =
            /(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,
          au = /^(\+|-?)\d+(\.?)\d*$/,
          l = "function",
          o = "string",
          b = "number",
          k = "object",
          et = "null",
          sr = "boolean",
          ot = "undefined",
          hr = {},
          cr = {},
          kt = [].slice,
          lr = function () {
            var u,
              e,
              t,
              r,
              o,
              s,
              n = arguments[0] || {},
              f = 1,
              c = arguments.length,
              h = !1;
            for (
              "boolean" == typeof n && ((h = n), (n = arguments[f] || {}), f++),
                "object" == typeof n || jQuery.isFunction(n) || (n = {}),
                f === c && ((n = this), f--);
              f < c;
              f++
            )
              if (null != (o = arguments[f]))
                for (r in o)
                  "filters" != r &&
                    "concat" != r &&
                    ":" != r &&
                    ((u = n[r]),
                    (t = o[r]),
                    n !== t &&
                      (h &&
                      t &&
                      (jQuery.isPlainObject(t) || (e = jQuery.isArray(t)))
                        ? (e
                            ? ((e = !1), (s = u && jQuery.isArray(u) ? u : []))
                            : (s = u && jQuery.isPlainObject(u) ? u : {}),
                          (n[r] = lr(h, s, t)))
                        : t !== i && (n[r] = t)));
            return n;
          };
        r.version = "2019.3.1023".replace(/^\s+|\s+$/g, "");
        g.extend = function (n) {
          var t,
            r,
            u = function () {},
            f = this,
            i =
              n && n.init
                ? n.init
                : function () {
                    f.apply(this, arguments);
                  };
          u.prototype = f.prototype;
          r = i.fn = i.prototype = new u();
          for (t in n)
            r[t] =
              null != n[t] && n[t].constructor === Object
                ? h(!0, {}, u.prototype[t], n[t])
                : n[t];
          return (r.constructor = i), (i.extend = f.extend), i;
        };
        g.prototype._initOptions = function (n) {
          this.options = st({}, this.options, n);
        };
        d = r.isFunction = function (n) {
          return "function" == typeof n;
        };
        ui = function () {
          this._defaultPrevented = !0;
        };
        fi = function () {
          return this._defaultPrevented === !0;
        };
        nt = g.extend({
          init: function () {
            this._events = {};
          },
          bind: function (n, t, r) {
            var u,
              h,
              s,
              f,
              c,
              e = this,
              a = typeof n === o ? [n] : n,
              v = typeof t === l;
            if (t === i) {
              for (u in n) e.bind(u, n[u]);
              return e;
            }
            for (u = 0, h = a.length; u < h; u++)
              (n = a[u]),
                (f = v ? t : t[n]),
                f &&
                  (r &&
                    ((s = f),
                    (f = function () {
                      e.unbind(n, f);
                      s.apply(e, arguments);
                    }),
                    (f.original = s)),
                  (c = e._events[n] = e._events[n] || []),
                  c.push(f));
            return e;
          },
          one: function (n, t) {
            return this.bind(n, t, !0);
          },
          first: function (n, t) {
            for (
              var r,
                e,
                u = this,
                s = typeof n === o ? [n] : n,
                h = typeof t === l,
                i = 0,
                f = s.length;
              i < f;
              i++
            )
              (n = s[i]),
                (r = h ? t : t[n]),
                r && ((e = u._events[n] = u._events[n] || []), e.unshift(r));
            return u;
          },
          trigger: function (n, t) {
            var r,
              f,
              u = this,
              i = u._events[n];
            if (i) {
              for (
                t = t || {},
                  t.sender = u,
                  t._defaultPrevented = !1,
                  t.preventDefault = ui,
                  t.isDefaultPrevented = fi,
                  i = i.slice(),
                  r = 0,
                  f = i.length;
                r < f;
                r++
              )
                i[r].call(u, t);
              return t._defaultPrevented === !0;
            }
            return !1;
          },
          unbind: function (n, t) {
            var r,
              f = this,
              u = f._events[n];
            if (n === i) f._events = {};
            else if (u)
              if (t)
                for (r = u.length - 1; r >= 0; r--)
                  (u[r] !== t && u[r].original !== t) || u.splice(r, 1);
              else f._events[n] = [];
            return f;
          },
        });
        ei = /^\w+/;
        oi = /\$\{([^}]*)\}/g;
        si = /\\\}/g;
        hi = /__CURLY__/g;
        ci = /\\#/g;
        li = /__SHARP__/g;
        ai = ["", "0", "00", "000", "0000"];
        (v = {
          paramName: "data",
          useWithBlock: !0,
          render: function (n, t) {
            for (var u = "", i = 0, r = t.length; i < r; i++) u += n(t[i]);
            return u;
          },
          compile: function (n, t) {
            var e,
              f,
              u,
              o = h({}, this, t),
              s = o.paramName,
              l = s.match(ei)[0],
              c = o.useWithBlock,
              i = "var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;";
            if (d(n)) return n;
            for (
              i += c ? "with(" + s + "){" : "",
                i += "$kendoOutput=",
                f = n
                  .replace(si, "__CURLY__")
                  .replace(oi, "#=$kendoHtmlEncode($1)#")
                  .replace(hi, "}")
                  .replace(ci, "__SHARP__")
                  .split("#"),
                u = 0;
              u < f.length;
              u++
            )
              i += ar(f[u], u % 2 == 0);
            i += c ? ";}" : ";";
            i += "return $kendoOutput;";
            i = i.replace(li, "#");
            try {
              return (
                (e = Function(l, i)),
                (e._slotCount = Math.floor(f.length / 2)),
                e
              );
            } catch (a) {
              throw Error(
                r.format("Invalid template:'{0}' Generated code:'{1}'", n, i)
              );
            }
          },
        }),
          (function () {
            function u(n) {
              return (
                (e.lastIndex = 0),
                e.test(n)
                  ? '"' +
                    n.replace(e, function (n) {
                      var t = s[n];
                      return typeof t === o
                        ? t
                        : "\\u" +
                            ("0000" + n.charCodeAt(0).toString(16)).slice(-4);
                    }) +
                    '"'
                  : '"' + n + '"'
              );
            }
            function i(f, e) {
              var c,
                y,
                a,
                w,
                v,
                p,
                d = n,
                s = e[f];
              if (
                (s &&
                  typeof s === k &&
                  typeof s.toJSON === l &&
                  (s = s.toJSON(f)),
                typeof t === l && (s = t.call(e, f, s)),
                (p = typeof s),
                p === o)
              )
                return u(s);
              if (p === b) return isFinite(s) ? s + "" : et;
              if (p === sr || p === et) return s + "";
              if (p === k) {
                if (!s) return et;
                if (((n += r), (v = []), "[object Array]" === h.apply(s))) {
                  for (w = s.length, c = 0; c < w; c++) v[c] = i(c, s) || et;
                  return (
                    (a =
                      0 === v.length
                        ? "[]"
                        : n
                        ? "[\n" + n + v.join(",\n" + n) + "\n" + d + "]"
                        : "[" + v.join(",") + "]"),
                    (n = d),
                    a
                  );
                }
                if (t && typeof t === k)
                  for (w = t.length, c = 0; c < w; c++)
                    typeof t[c] === o &&
                      ((y = t[c]),
                      (a = i(y, s)),
                      a && v.push(u(y) + (n ? ": " : ":") + a));
                else
                  for (y in s)
                    Object.hasOwnProperty.call(s, y) &&
                      ((a = i(y, s)), a && v.push(u(y) + (n ? ": " : ":") + a));
                return (
                  (a =
                    0 === v.length
                      ? "{}"
                      : n
                      ? "{\n" + n + v.join(",\n" + n) + "\n" + d + "}"
                      : "{" + v.join(",") + "}"),
                  (n = d),
                  a
                );
              }
            }
            var n,
              r,
              t,
              e =
                /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
              s = {
                "\b": "\\b",
                "\t": "\\t",
                "\n": "\\n",
                "\f": "\\f",
                "\r": "\\r",
                '"': '\\"',
                "\\": "\\\\",
              },
              h = {}.toString;
            typeof Date.prototype.toJSON !== l &&
              ((Date.prototype.toJSON = function () {
                var n = this;
                return isFinite(n.valueOf())
                  ? f(n.getUTCFullYear(), 4) +
                      "-" +
                      f(n.getUTCMonth() + 1) +
                      "-" +
                      f(n.getUTCDate()) +
                      "T" +
                      f(n.getUTCHours()) +
                      ":" +
                      f(n.getUTCMinutes()) +
                      ":" +
                      f(n.getUTCSeconds()) +
                      "Z"
                  : null;
              }),
              (String.prototype.toJSON =
                Number.prototype.toJSON =
                Boolean.prototype.toJSON =
                  function () {
                    return this.valueOf();
                  }));
            typeof ut.stringify !== l &&
              (ut.stringify = function (u, f, e) {
                var s;
                if (((n = ""), (r = ""), typeof e === b))
                  for (s = 0; s < e; s += 1) r += " ";
                else typeof e === o && (r = e);
                if (
                  ((t = f),
                  f &&
                    typeof f !== l &&
                    (typeof f !== k || typeof f.length !== b))
                )
                  throw Error("JSON.stringify");
                return i("", { "": u });
              });
          })(),
          (function () {
            function l(n) {
              if (n) {
                if (n.numberFormat) return n;
                if (typeof n === o) {
                  var t = r.cultures;
                  return t[n] || t[n.split("-")[0]] || null;
                }
                return null;
              }
              return null;
            }
            function a(n) {
              return n && (n = l(n)), n || r.cultures.current;
            }
            function d(n, t, r) {
              r = a(r);
              var u = r.calendars.standard,
                e = u.days,
                o = u.months;
              return (
                (t = u.patterns[t] || t),
                t.replace(nt, function (t) {
                  var s, r, h;
                  return (
                    "d" === t
                      ? (r = n.getDate())
                      : "dd" === t
                      ? (r = f(n.getDate()))
                      : "ddd" === t
                      ? (r = e.namesAbbr[n.getDay()])
                      : "dddd" === t
                      ? (r = e.names[n.getDay()])
                      : "M" === t
                      ? (r = n.getMonth() + 1)
                      : "MM" === t
                      ? (r = f(n.getMonth() + 1))
                      : "MMM" === t
                      ? (r = o.namesAbbr[n.getMonth()])
                      : "MMMM" === t
                      ? (r = o.names[n.getMonth()])
                      : "yy" === t
                      ? (r = f(n.getFullYear() % 100))
                      : "yyyy" === t
                      ? (r = f(n.getFullYear(), 4))
                      : "h" === t
                      ? (r = n.getHours() % 12 || 12)
                      : "hh" === t
                      ? (r = f(n.getHours() % 12 || 12))
                      : "H" === t
                      ? (r = n.getHours())
                      : "HH" === t
                      ? (r = f(n.getHours()))
                      : "m" === t
                      ? (r = n.getMinutes())
                      : "mm" === t
                      ? (r = f(n.getMinutes()))
                      : "s" === t
                      ? (r = n.getSeconds())
                      : "ss" === t
                      ? (r = f(n.getSeconds()))
                      : "f" === t
                      ? (r = c.floor(n.getMilliseconds() / 100))
                      : "ff" === t
                      ? ((r = n.getMilliseconds()),
                        r > 99 && (r = c.floor(r / 10)),
                        (r = f(r)))
                      : "fff" === t
                      ? (r = f(n.getMilliseconds(), 3))
                      : "tt" === t
                      ? (r = n.getHours() < 12 ? u.AM[0] : u.PM[0])
                      : "zzz" === t
                      ? ((s = n.getTimezoneOffset()),
                        (h = s < 0),
                        (r = ("" + c.abs(s / 60)).split(".")[0]),
                        (s = c.abs(s) - 60 * r),
                        (r = (h ? "+" : "-") + f(r)),
                        (r += ":" + f(s)))
                      : ("zz" !== t && "z" !== t) ||
                        ((r = n.getTimezoneOffset() / 60),
                        (h = r < 0),
                        (r = ("" + c.abs(r)).split(".")[0]),
                        (r = (h ? "+" : "-") + ("zz" === t ? f(r) : r))),
                    r !== i ? r : t.slice(1, t.length - 1)
                  );
                })
              );
            }
            function g(n, r, f) {
              var y,
                lt,
                ct,
                at,
                vt,
                yt,
                et,
                st,
                pt,
                gt,
                d,
                ot,
                p,
                wt,
                ei,
                bt,
                nt,
                o,
                ut,
                b,
                ni,
                ti,
                g,
                c,
                l,
                kt,
                ii,
                ui,
                ri,
                oi,
                ft,
                ht,
                fi,
                dt;
              if (
                ((f = a(f)),
                (y = f.numberFormat),
                (lt = y[u]),
                (ct = y.decimals),
                (at = y.pattern[0]),
                (vt = []),
                (d = n < 0),
                (bt = t),
                (nt = t),
                (ft = -1),
                n === i)
              )
                return t;
              if (!isFinite(n)) return n;
              if (!r) return f.name.length ? n.toLocaleString() : "" + n;
              if ((gt = tt.exec(r))) {
                if (
                  ((r = gt[1].toLowerCase()),
                  (et = "c" === r),
                  (st = "p" === r),
                  (et || st) &&
                    ((y = et ? y.currency : y.percent),
                    (lt = y[u]),
                    (ct = y.decimals),
                    (yt = y.symbol),
                    (at = y.pattern[d ? 0 : 1])),
                  (pt = gt[2]),
                  pt && (ct = +pt),
                  "e" === r)
                )
                  return (
                    (fi = pt ? n.toExponential(ct) : n.toExponential()),
                    fi.replace(u, y[u])
                  );
                if (
                  (st && (n *= 100),
                  (n = e(n, ct)),
                  (d = n < 0),
                  (n = n.split(u)),
                  (ot = n[0]),
                  (p = n[1]),
                  d && (ot = ot.substring(1)),
                  (nt = v(ot, 0, ot.length, y)),
                  p && (nt += lt + p),
                  "n" === r && !d)
                )
                  return nt;
                for (n = t, o = 0, ut = at.length; o < ut; o++)
                  (b = at.charAt(o)),
                    (n += "n" === b ? nt : "$" === b || "%" === b ? yt : b);
                return n;
              }
              if (
                ((r.indexOf("'") > -1 ||
                  r.indexOf('"') > -1 ||
                  r.indexOf("\\") > -1) &&
                  (r = r.replace(it, function (n) {
                    var t = n.charAt(0).replace("\\", ""),
                      i = n.slice(1).replace(t, "");
                    return vt.push(i), k;
                  })),
                (r = r.split(";")),
                d && r[1])
              )
                (r = r[1]), (ti = !0);
              else if (0 === n && r[2]) {
                if (((r = r[2]), r.indexOf(h) == -1 && r.indexOf(s) == -1))
                  return r;
              } else r = r[0];
              if (
                ((ui = r.indexOf("%")),
                (ri = r.indexOf("$")),
                (st = ui != -1),
                (et = ri != -1),
                st && (n *= 100),
                et &&
                  "\\" === r[ri - 1] &&
                  ((r = r.split("\\").join("")), (et = !1)),
                (et || st) &&
                  ((y = et ? y.currency : y.percent),
                  (lt = y[u]),
                  (ct = y.decimals),
                  (yt = y.symbol)),
                (ni = r.indexOf(w) > -1),
                ni && (r = r.replace(rt, t)),
                (g = r.indexOf(u)),
                (ut = r.length),
                g != -1)
              )
                if (
                  ((p = ("" + n).split("e")),
                  (p = p[1] ? e(n, Math.abs(p[1])) : p[0]),
                  (p = p.split(u)[1] || t),
                  (l = r.lastIndexOf(s) - g),
                  (c = r.lastIndexOf(h) - g),
                  (kt = l > -1),
                  (ii = c > -1),
                  (o = p.length),
                  kt ||
                    ii ||
                    ((r = r.substring(0, g) + r.substring(g + 1)),
                    (ut = r.length),
                    (g = -1),
                    (o = 0)),
                  kt && l > c)
                )
                  o = l;
                else if (c > l)
                  if (ii && o > c) {
                    for (
                      dt = e(n, c, d);
                      dt.charAt(dt.length - 1) === s && c > 0 && c > l;

                    )
                      c--, (dt = e(n, c, d));
                    o = c;
                  } else kt && o < l && (o = l);
              if (
                ((n = e(n, o, d)),
                (c = r.indexOf(h)),
                (oi = l = r.indexOf(s)),
                (ft =
                  c == -1 && l != -1
                    ? l
                    : c != -1 && l == -1
                    ? c
                    : c > l
                    ? l
                    : c),
                (c = r.lastIndexOf(h)),
                (l = r.lastIndexOf(s)),
                (ht =
                  c == -1 && l != -1
                    ? l
                    : c != -1 && l == -1
                    ? c
                    : c > l
                    ? c
                    : l),
                ft == ut && (ht = ft),
                ft != -1)
              ) {
                for (
                  nt = ("" + n).split(u),
                    ot = nt[0],
                    p = nt[1] || t,
                    wt = ot.length,
                    ei = p.length,
                    d && n * -1 >= 0 && (d = !1),
                    n = r.substring(0, ft),
                    d && !ti && (n += "-"),
                    o = ft;
                  o < ut;
                  o++
                ) {
                  if (((b = r.charAt(o)), g == -1)) {
                    if (ht - o < wt) {
                      n += ot;
                      break;
                    }
                  } else if (
                    (l != -1 && l < o && (bt = t),
                    g - o <= wt && g - o > -1 && ((n += ot), (o = g)),
                    g === o)
                  ) {
                    n += (p ? lt : t) + p;
                    o += ht - g + 1;
                    continue;
                  }
                  b === s ? ((n += b), (bt = b)) : b === h && (n += bt);
                }
                if (
                  (ni &&
                    (n = v(
                      n,
                      ft + (d && !ti ? 1 : 0),
                      Math.max(ht, wt + ft),
                      y
                    )),
                  ht >= ft && (n += r.substring(ht + 1)),
                  et || st)
                ) {
                  for (nt = t, o = 0, ut = n.length; o < ut; o++)
                    (b = n.charAt(o)), (nt += "$" === b || "%" === b ? yt : b);
                  n = nt;
                }
                if ((ut = vt.length))
                  for (o = 0; o < ut; o++) n = n.replace(k, vt[o]);
              }
              return n;
            }
            var v,
              e,
              y,
              nt =
                /dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|zzz|zz|z|"[^"]*"|'[^']*'/g,
              tt = /^(n|c|p|e)(\d*)$/i,
              it = /(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,
              rt = /\,/g,
              t = "",
              u = ".",
              w = ",",
              h = "#",
              s = "0",
              k = "??",
              p = "en-US",
              ut = {}.toString;
            r.cultures["en-US"] = {
              name: p,
              numberFormat: {
                pattern: ["-n"],
                decimals: 2,
                ",": ",",
                ".": ".",
                groupSize: [3],
                percent: {
                  pattern: ["-n %", "n %"],
                  decimals: 2,
                  ",": ",",
                  ".": ".",
                  groupSize: [3],
                  symbol: "%",
                },
                currency: {
                  name: "US Dollar",
                  abbr: "USD",
                  pattern: ["($n)", "$n"],
                  decimals: 2,
                  ",": ",",
                  ".": ".",
                  groupSize: [3],
                  symbol: "$",
                },
              },
              calendars: {
                standard: {
                  days: {
                    names: [
                      "Sunday",
                      "Monday",
                      "Tuesday",
                      "Wednesday",
                      "Thursday",
                      "Friday",
                      "Saturday",
                    ],
                    namesAbbr: [
                      "Sun",
                      "Mon",
                      "Tue",
                      "Wed",
                      "Thu",
                      "Fri",
                      "Sat",
                    ],
                    namesShort: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
                  },
                  months: {
                    names: [
                      "January",
                      "February",
                      "March",
                      "April",
                      "May",
                      "June",
                      "July",
                      "August",
                      "September",
                      "October",
                      "November",
                      "December",
                    ],
                    namesAbbr: [
                      "Jan",
                      "Feb",
                      "Mar",
                      "Apr",
                      "May",
                      "Jun",
                      "Jul",
                      "Aug",
                      "Sep",
                      "Oct",
                      "Nov",
                      "Dec",
                    ],
                  },
                  AM: ["AM", "am", "AM"],
                  PM: ["PM", "pm", "PM"],
                  patterns: {
                    d: "M/d/yyyy",
                    D: "dddd, MMMM dd, yyyy",
                    F: "dddd, MMMM dd, yyyy h:mm:ss tt",
                    g: "M/d/yyyy h:mm tt",
                    G: "M/d/yyyy h:mm:ss tt",
                    m: "MMMM dd",
                    M: "MMMM dd",
                    s: "yyyy'-'MM'-'ddTHH':'mm':'ss",
                    t: "h:mm tt",
                    T: "h:mm:ss tt",
                    u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
                    y: "MMMM, yyyy",
                    Y: "MMMM, yyyy",
                  },
                  "/": "/",
                  ":": ":",
                  firstDay: 0,
                  twoDigitYearMax: 2029,
                },
              },
            };
            r.culture = function (n) {
              var t,
                u = r.cultures;
              return n === i
                ? u.current
                : ((t = l(n) || u[p]),
                  (t.calendar = t.calendars.standard),
                  (u.current = t),
                  i);
            };
            r.findCulture = l;
            r.getCulture = a;
            r.culture(p);
            v = function (n, t, r, f) {
              var o,
                c,
                e,
                h,
                l,
                a,
                v = n.indexOf(f[u]),
                y = f.groupSize.slice(),
                s = y.shift();
              if (
                ((r = v !== -1 ? v : r + 1),
                (o = n.substring(t, r)),
                (c = o.length),
                c >= s)
              ) {
                for (e = c, h = []; e > -1; )
                  if (
                    ((l = o.substring(e - s, e)),
                    l && h.push(l),
                    (e -= s),
                    (a = y.shift()),
                    (s = a !== i ? a : s),
                    0 === s)
                  ) {
                    e > 0 && h.push(o.substring(0, e));
                    break;
                  }
                o = h.reverse().join(f[w]);
                n = n.substring(0, t) + o + n.substring(r);
              }
              return n;
            };
            e = function (n, t, i) {
              return (
                (t = t || 0),
                (n = ("" + n).split("e")),
                (n = Math.round(+(n[0] + "e" + (n[1] ? +n[1] + t : t)))),
                i && (n = -n),
                (n = ("" + n).split("e")),
                (n = +(n[0] + "e" + (n[1] ? +n[1] - t : -t))),
                n.toFixed(Math.min(t, 20))
              );
            };
            y = function (n, t, r) {
              if (t) {
                if ("[object Date]" === ut.call(n)) return d(n, t, r);
                if (typeof n === b) return g(n, t, r);
              }
              return n !== i ? n : "";
            };
            r.format = function (n) {
              var t = arguments;
              return n.replace(cu, function (n, i, r) {
                var u = t[parseInt(i, 10) + 1];
                return y(u, r ? r.substring(1) : "");
              });
            };
            r._extractFormat = function (n) {
              return (
                "{0:" === n.slice(0, 3) && (n = n.slice(3, n.length - 1)), n
              );
            };
            r._activeElement = function () {
              try {
                return document.activeElement;
              } catch (n) {
                return document.documentElement.activeElement;
              }
            };
            r._round = e;
            r._outerWidth = function (t, i) {
              return n(t).outerWidth(i || !1) || 0;
            };
            r._outerHeight = function (t, i) {
              return n(t).outerHeight(i || !1) || 0;
            };
            r.toString = y;
          })(),
          (function () {
            function t(n, t, i) {
              return !(n >= t && n <= i);
            }
            function a(n) {
              return n.charAt(0);
            }
            function u(t) {
              return n.map(t, a);
            }
            function v(n, t) {
              t || 23 !== n.getHours() || n.setHours(n.getHours() + 2);
            }
            function y(n) {
              for (var t = 0, r = n.length, i = []; t < r; t++)
                i[t] = (n[t] + "").toLowerCase();
              return i;
            }
            function f(n) {
              var t,
                i = {};
              for (t in n) i[t] = y(n[t]);
              return i;
            }
            function p(n, e, o, s) {
              if (!n) return null;
              var y,
                h,
                gt,
                pt,
                wt,
                bt,
                ft,
                ct,
                lt,
                b,
                k,
                ni,
                ti,
                tt = function (n) {
                  for (var t = 0; e[ot] === n; ) t++, ot++;
                  return t > 0 && (ot -= 1), t;
                },
                rt = function (t) {
                  var r = l[t] || RegExp("^\\d{1," + t + "}"),
                    i = n.substr(p, t).match(r);
                  return i
                    ? ((i = i[0]), (p += i.length), parseInt(i, 10))
                    : null;
                },
                at = function (t, i) {
                  for (
                    var o, r, u, f = 0, h = t.length, e = 0, s = 0;
                    f < h;
                    f++
                  )
                    (o = t[f]),
                      (r = o.length),
                      (u = n.substr(p, r)),
                      i && (u = u.toLowerCase()),
                      u == o && r > e && ((e = r), (s = f));
                  return e ? ((p += e), s + 1) : null;
                },
                vt = function () {
                  var t = !1;
                  return n.charAt(p) === e[ot] && (p++, (t = !0)), t;
                },
                w = o.calendars.standard,
                a = null,
                ut = null,
                d = null,
                c = null,
                et = null,
                st = null,
                it = null,
                ot = 0,
                p = 0,
                kt = !1,
                dt = new Date(),
                yt = w.twoDigitYearMax || 2029,
                ht = dt.getFullYear();
              for (
                e || (e = "d"),
                  pt = w.patterns[e],
                  pt && (e = pt),
                  e = e.split(""),
                  gt = e.length;
                ot < gt;
                ot++
              )
                if (((y = e[ot]), kt)) "'" === y ? (kt = !1) : vt();
                else if ("d" === y) {
                  if (
                    ((h = tt("d")),
                    w._lowerDays || (w._lowerDays = f(w.days)),
                    null !== d && h > 2)
                  )
                    continue;
                  if (
                    ((d =
                      h < 3
                        ? rt(2)
                        : at(w._lowerDays[3 == h ? "namesAbbr" : "names"], !0)),
                    null === d || t(d, 1, 31))
                  )
                    return null;
                } else if ("M" === y) {
                  if (
                    ((h = tt("M")),
                    w._lowerMonths || (w._lowerMonths = f(w.months)),
                    (ut =
                      h < 3
                        ? rt(2)
                        : at(
                            w._lowerMonths[3 == h ? "namesAbbr" : "names"],
                            !0
                          )),
                    null === ut || t(ut, 1, 12))
                  )
                    return null;
                  ut -= 1;
                } else if ("y" === y) {
                  if (((h = tt("y")), (a = rt(h)), null === a)) return null;
                  2 == h &&
                    ("string" == typeof yt && (yt = ht + parseInt(yt, 10)),
                    (a = ht - (ht % 100) + a),
                    a > yt && (a -= 100));
                } else if ("h" === y) {
                  if (
                    (tt("h"),
                    (c = rt(2)),
                    12 == c && (c = 0),
                    null === c || t(c, 0, 11))
                  )
                    return null;
                } else if ("H" === y) {
                  if ((tt("H"), (c = rt(2)), null === c || t(c, 0, 23)))
                    return null;
                } else if ("m" === y) {
                  if ((tt("m"), (et = rt(2)), null === et || t(et, 0, 59)))
                    return null;
                } else if ("s" === y) {
                  if ((tt("s"), (st = rt(2)), null === st || t(st, 0, 59)))
                    return null;
                } else if ("f" === y) {
                  if (
                    ((h = tt("f")),
                    (ti = n.substr(p, h).match(l[3])),
                    (it = rt(h)),
                    null !== it &&
                      ((it = parseFloat("0." + ti[0], 10)),
                      (it = r._round(it, 3)),
                      (it *= 1e3)),
                    null === it || t(it, 0, 999))
                  )
                    return null;
                } else if ("t" === y) {
                  if (
                    ((h = tt("t")),
                    (ct = w.AM),
                    (lt = w.PM),
                    1 === h && ((ct = u(ct)), (lt = u(lt))),
                    (wt = at(lt)),
                    !wt && !at(ct))
                  )
                    return null;
                } else if ("z" === y) {
                  if (((bt = !0), (h = tt("z")), "Z" === n.substr(p, 1))) {
                    vt();
                    continue;
                  }
                  if (
                    ((ft = n.substr(p, 6).match(h > 2 ? nt : g)), !ft) ||
                    ((ft = ft[0].split(":")),
                    (b = ft[0]),
                    (k = ft[1]),
                    !k &&
                      b.length > 3 &&
                      ((p = b.length - 2),
                      (k = b.substring(p)),
                      (b = b.substring(0, p))),
                    (b = parseInt(b, 10)),
                    t(b, -12, 13)) ||
                    (h > 2 &&
                      ((k = ft[0][0] + k),
                      (k = parseInt(k, 10)),
                      isNaN(k) || t(k, -59, 59)))
                  )
                    return null;
                } else if ("'" === y) (kt = !0), vt();
                else if (!vt()) return null;
              return s && !/^\s*$/.test(n.substr(p))
                ? null
                : ((ni = null !== c || null !== et || st || null),
                  null === a && null === ut && null === d && ni
                    ? ((a = ht), (ut = dt.getMonth()), (d = dt.getDate()))
                    : (null === a && (a = ht), null === d && (d = 1)),
                  wt && c < 12 && (c += 12),
                  bt
                    ? (b && (c += -b),
                      k && (et += -k),
                      (n = new Date(Date.UTC(a, ut, d, c, et, st, it))))
                    : ((n = new Date(a, ut, d, c, et, st, it)), v(n, c)),
                  a < 100 && n.setFullYear(a),
                  n.getDate() !== d && bt === i ? null : n);
            }
            function w(n) {
              var t = "-" === n.substr(0, 1) ? -1 : 1;
              return (
                (n = n.substring(1)),
                (n =
                  60 * parseInt(n.substr(0, 2), 10) +
                  parseInt(n.substring(2), 10)),
                t * n
              );
            }
            function k(n) {
              for (
                var u,
                  i,
                  f = c.max(s.length, h.length),
                  e = n.calendar || n.calendars.standard,
                  o = e.patterns,
                  r = [],
                  t = 0;
                t < f;
                t++
              ) {
                for (u = s[t], i = 0; i < u.length; i++) r.push(o[u[i]]);
                r = r.concat(h[t]);
              }
              return r;
            }
            function e(n, t, i, u) {
              var o, f, s, e;
              if ("[object Date]" === rt.call(n)) return n;
              if (
                ((o = 0),
                (f = null),
                n && 0 === n.indexOf("/D") && (f = tt.exec(n)))
              )
                return (
                  (f = f[1]),
                  (e = it.exec(f.substring(1))),
                  (f = new Date(parseInt(f, 10))),
                  e &&
                    ((e = w(e[0])),
                    (f = r.timezone.apply(f, 0)),
                    (f = r.timezone.convert(f, 0, -1 * e))),
                  f
                );
              for (
                i = r.getCulture(i),
                  t || (t = k(i)),
                  t = hu(t) ? t : [t],
                  s = t.length;
                o < s;
                o++
              )
                if ((f = p(n, t[o], i, u))) return f;
              return f;
            }
            var o = /\u00A0/g,
              d = /[eE][\-+]?[0-9]+/,
              g = /[+|\-]\d{1,2}/,
              nt = /[+|\-]\d{1,2}:?\d{2}/,
              tt = /^\/Date\((.*?)\)\/$/,
              it = /[+-]\d*/,
              s = [[], ["G", "g", "F"], ["D", "d", "y", "m", "T", "t"]],
              h = [
                [
                  "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
                  "yyyy-MM-ddTHH:mm:ss.fffffff",
                  "yyyy-MM-ddTHH:mm:ss.fffzzz",
                  "yyyy-MM-ddTHH:mm:ss.fff",
                  "ddd MMM dd yyyy HH:mm:ss",
                  "yyyy-MM-ddTHH:mm:sszzz",
                  "yyyy-MM-ddTHH:mmzzz",
                  "yyyy-MM-ddTHH:mmzz",
                  "yyyy-MM-ddTHH:mm:ss",
                  "yyyy-MM-dd HH:mm:ss",
                  "yyyy/MM/dd HH:mm:ss",
                ],
                ["yyyy-MM-ddTHH:mm", "yyyy-MM-dd HH:mm", "yyyy/MM/dd HH:mm"],
                ["yyyy/MM/dd", "yyyy-MM-dd", "HH:mm:ss", "HH:mm"],
              ],
              l = { 2: /^\d{1,2}/, 3: /^\d{1,3}/, 4: /^\d{4}/ },
              rt = {}.toString;
            r.parseDate = function (n, t, i) {
              return e(n, t, i, !1);
            };
            r.parseExactDate = function (n, t, i) {
              return e(n, t, i, !0);
            };
            r.parseInt = function (n, t) {
              var i = r.parseFloat(n, t);
              return i && (i = 0 | i), i;
            };
            r.parseFloat = function (n, t, i) {
              if (!n && 0 !== n) return null;
              if (typeof n === b) return n;
              n = "" + n;
              t = r.getCulture(t);
              var f,
                h,
                u = t.numberFormat,
                c = u.percent,
                l = u.currency,
                s = l.symbol,
                a = c.symbol,
                e = n.indexOf("-");
              return d.test(n)
                ? ((n = parseFloat(n.replace(u["."], "."))),
                  isNaN(n) && (n = null),
                  n)
                : e > 0
                ? null
                : ((e = e > -1),
                  n.indexOf(s) > -1 || (i && i.toLowerCase().indexOf("c") > -1)
                    ? ((u = l),
                      (f = u.pattern[0].replace("$", s).split("n")),
                      n.indexOf(f[0]) > -1 &&
                        n.indexOf(f[1]) > -1 &&
                        ((n = n.replace(f[0], "").replace(f[1], "")), (e = !0)))
                    : n.indexOf(a) > -1 && ((h = !0), (u = c), (s = a)),
                  (n = n
                    .replace("-", "")
                    .replace(s, "")
                    .replace(o, " ")
                    .split(u[","].replace(o, " "))
                    .join("")
                    .replace(u["."], ".")),
                  (n = parseFloat(n)),
                  isNaN(n) ? (n = null) : e && (n *= -1),
                  n && h && (n /= 100),
                  n);
            };
          })(),
          (function () {
            var c, e, h, l, s, r, f, a, v, y, p, w;
            u._scrollbar = i;
            u.scrollbar = function (n) {
              if (isNaN(u._scrollbar) || n) {
                var i,
                  t = document.createElement("div");
                return (
                  (t.style.cssText =
                    "overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block"),
                  (t.innerHTML = "&nbsp;"),
                  document.body.appendChild(t),
                  (u._scrollbar = i = t.offsetWidth - t.scrollWidth),
                  document.body.removeChild(t),
                  i
                );
              }
              return u._scrollbar;
            };
            u.isRtl = function (t) {
              return n(t).closest(".k-rtl").length > 0;
            };
            c = document.createElement("table");
            try {
              c.innerHTML = "<tr><td></td></tr>";
              u.tbodyInnerHtml = !0;
            } catch (b) {
              u.tbodyInnerHtml = !1;
            }
            u.touch = "ontouchstart" in t;
            e = document.documentElement.style;
            h = u.transitions = !1;
            l = u.transforms = !1;
            s = "HTMLElement" in t ? HTMLElement.prototype : [];
            u.hasHW3D =
              ("WebKitCSSMatrix" in t && "m11" in new t.WebKitCSSMatrix()) ||
              "MozPerspective" in e ||
              "msPerspective" in e;
            u.cssFlexbox =
              "flexWrap" in e || "WebkitFlexWrap" in e || "msFlexWrap" in e;
            it(["Moz", "webkit", "O", "ms"], function () {
              var n,
                t = "" + this,
                i = typeof c.style[t + "Transition"] === o;
              if (i || typeof c.style[t + "Transform"] === o)
                return (
                  (n = t.toLowerCase()),
                  (l = {
                    css: "ms" != n ? "-" + n + "-" : "",
                    prefix: t,
                    event: "o" === n || "webkit" === n ? n : "",
                  }),
                  i &&
                    ((h = l),
                    (h.event = h.event
                      ? h.event + "TransitionEnd"
                      : "transitionend")),
                  !1
                );
            });
            c = null;
            u.transforms = l;
            u.transitions = h;
            u.devicePixelRatio =
              t.devicePixelRatio === i ? 1 : t.devicePixelRatio;
            try {
              u.screenWidth =
                t.outerWidth || t.screen ? t.screen.availWidth : t.innerWidth;
              u.screenHeight =
                t.outerHeight || t.screen
                  ? t.screen.availHeight
                  : t.innerHeight;
            } catch (b) {
              u.screenWidth = t.screen.availWidth;
              u.screenHeight = t.screen.availHeight;
            }
            u.detectOS = function (n) {
              var f,
                r,
                i = !1,
                e = [],
                s = !/mobile safari/i.test(n),
                o = {
                  wp: /(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,
                  fire: /(Silk)\/(\d+)\.(\d+(\.\d+)?)/,
                  android:
                    /(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,
                  iphone: /(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,
                  ipad: /(iPad).*OS\s+(\d+)[\._]([\d_]+)/,
                  meego: /(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,
                  webos: /(webOS)\/(\d+)\.(\d+(\.\d+)?)/,
                  blackberry:
                    /(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,
                  playbook: /(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,
                  windows: /(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,
                  tizen: /(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,
                  sailfish: /(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,
                  ffos: /(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/,
                },
                h = {
                  ios: /^i(phone|pad|pod)$/i,
                  android: /^android|fire$/i,
                  blackberry: /^blackberry|playbook/i,
                  windows: /windows/,
                  wp: /wp/,
                  flat: /sailfish|ffos|tizen/i,
                  meego: /meego/,
                },
                c = { tablet: /playbook|ipad|fire/i },
                l = {
                  omini: /Opera\sMini/i,
                  omobile: /Opera\sMobi/i,
                  firefox: /Firefox|Fennec/i,
                  mobilesafari: /version\/.*safari/i,
                  ie: /MSIE|Windows\sPhone/i,
                  chrome: /chrome|crios/i,
                  webkit: /webkit/i,
                };
              for (r in o)
                if (o.hasOwnProperty(r) && (e = n.match(o[r]))) {
                  if ("windows" == r && "plugins" in navigator) return !1;
                  i = {};
                  i.device = r;
                  i.tablet = ht(r, c, !1);
                  i.browser = ht(n, l, "default");
                  i.name = ht(r, h);
                  i[i.name] = !0;
                  i.majorVersion = e[2];
                  i.minorVersion = (e[3] || "0").replace("_", ".");
                  f = i.minorVersion.replace(".", "").substr(0, 2);
                  i.flatVersion =
                    i.majorVersion +
                    f +
                    Array(3 - (f.length < 3 ? f.length : 2)).join("0");
                  i.cordova =
                    typeof t.PhoneGap !== ot || typeof t.cordova !== ot;
                  i.appMode =
                    t.navigator.standalone ||
                    /file|local|wmapp/.test(t.location.protocol) ||
                    i.cordova;
                  i.android &&
                    ((u.devicePixelRatio < 1.5 && i.flatVersion < 400) || s) &&
                    (u.screenWidth > 800 || u.screenHeight > 800) &&
                    (i.tablet = r);
                  break;
                }
              return i;
            };
            r = u.mobileOS = u.detectOS(navigator.userAgent);
            u.wpDevicePixelRatio = r.wp ? screen.width / 320 : 0;
            u.hasNativeScrolling = !1;
            (r.ios || (r.android && r.majorVersion > 2) || r.wp) &&
              (u.hasNativeScrolling = r);
            u.delayedClick = function () {
              if (u.touch) {
                if (r.ios) return !0;
                if (r.android)
                  return (
                    !u.browser.chrome ||
                    (!(u.browser.version < 32) &&
                      !(n("meta[name=viewport]").attr("content") || "").match(
                        /user-scalable=no/i
                      ))
                  );
              }
              return !1;
            };
            u.mouseAndTouchPresent =
              u.touch && !(u.mobileOS.ios || u.mobileOS.android);
            u.detectBrowser = function (n) {
              var i,
                t = !1,
                r = [],
                u = {
                  edge: /(edge)[ \/]([\w.]+)/i,
                  webkit: /(chrome|crios)[ \/]([\w.]+)/i,
                  safari: /(webkit)[ \/]([\w.]+)/i,
                  opera: /(opera)(?:.*version|)[ \/]([\w.]+)/i,
                  msie: /(msie\s|trident.*? rv:)([\w.]+)/i,
                  mozilla: /(mozilla)(?:.*? rv:([\w.]+)|)/i,
                };
              for (i in u)
                if (u.hasOwnProperty(i) && (r = n.match(u[i]))) {
                  t = {};
                  t[i] = !0;
                  t[r[1].toLowerCase().split(" ")[0].split("/")[0]] = !0;
                  t.version = parseInt(document.documentMode || r[2], 10);
                  break;
                }
              return t;
            };
            u.browser = u.detectBrowser(navigator.userAgent);
            u.detectClipboardAccess = function () {
              var n = {
                copy:
                  !!document.queryCommandSupported &&
                  document.queryCommandSupported("copy"),
                cut:
                  !!document.queryCommandSupported &&
                  document.queryCommandSupported("cut"),
                paste:
                  !!document.queryCommandSupported &&
                  document.queryCommandSupported("paste"),
              };
              return (
                u.browser.chrome &&
                  ((n.paste = !1),
                  u.browser.version >= 43 && ((n.copy = !0), (n.cut = !0))),
                n
              );
            };
            u.clipboard = u.detectClipboardAccess();
            u.zoomLevel = function () {
              var n, r, i;
              try {
                return (
                  (n = u.browser),
                  (r = 0),
                  (i = document.documentElement),
                  n.msie &&
                    11 == n.version &&
                    i.scrollHeight > i.clientHeight &&
                    !u.touch &&
                    (r = u.scrollbar()),
                  u.touch
                    ? i.clientWidth / t.innerWidth
                    : n.msie && n.version >= 10
                    ? ((top || t).document.documentElement.offsetWidth + r) /
                      (top || t).innerWidth
                    : 1
                );
              } catch (f) {
                return 1;
              }
            };
            (u.cssBorderSpacing =
              i !== e.borderSpacing &&
              !(u.browser.msie && u.browser.version < 8)),
              (function (t) {
                var i = "",
                  r = n(document.documentElement),
                  f = parseInt(t.version, 10);
                t.msie
                  ? (i = "ie")
                  : t.mozilla
                  ? (i = "ff")
                  : t.safari
                  ? (i = "safari")
                  : t.webkit
                  ? (i = "webkit")
                  : t.opera
                  ? (i = "opera")
                  : t.edge && (i = "edge");
                i && (i = "k-" + i + " k-" + i + f);
                u.mobileOS && (i += " k-mobile");
                u.cssFlexbox || (i += " k-no-flexbox");
                r.addClass(i);
              })(u.browser);
            u.eventCapture = document.documentElement.addEventListener;
            f = document.createElement("input");
            u.placeholder = "placeholder" in f;
            u.propertyChangeEvent = "onpropertychange" in f;
            u.input = (function () {
              for (
                var n,
                  i = [
                    "number",
                    "date",
                    "time",
                    "month",
                    "week",
                    "datetime",
                    "datetime-local",
                  ],
                  e = i.length,
                  r = "test",
                  u = {},
                  t = 0;
                t < e;
                t++
              )
                (n = i[t]),
                  f.setAttribute("type", n),
                  (f.value = r),
                  (u[n.replace("-", "")] = "text" !== f.type && f.value !== r);
              return u;
            })();
            f.style.cssText = "float:left;";
            u.cssFloat = !!f.style.cssFloat;
            f = null;
            u.stableSort = (function () {
              for (var t = [{ index: 0, field: "b" }], n = 1; n < 513; n++)
                t.push({ index: n, field: "a" });
              return (
                t.sort(function (n, t) {
                  return n.field > t.field ? 1 : n.field < t.field ? -1 : 0;
                }),
                1 === t[0].index
              );
            })();
            u.matchesSelector =
              s.webkitMatchesSelector ||
              s.mozMatchesSelector ||
              s.msMatchesSelector ||
              s.oMatchesSelector ||
              s.matchesSelector ||
              s.matches ||
              function (t) {
                for (
                  var i = document.querySelectorAll
                      ? (this.parentNode || document).querySelectorAll(t) || []
                      : n(t),
                    r = i.length;
                  r--;

                )
                  if (i[r] == this) return !0;
                return !1;
              };
            u.matchMedia = "matchMedia" in t;
            u.pushState = t.history && t.history.pushState;
            a = document.documentMode;
            u.hashChange =
              "onhashchange" in t && !(u.browser.msie && (!a || a <= 8));
            u.customElements = "registerElement" in t.document;
            v = u.browser.chrome;
            y = u.browser.crios;
            p = u.browser.mozilla;
            w = u.browser.safari;
            u.msPointers = !v && t.MSPointerEvent;
            u.pointers = !v && !y && !p && !w && t.PointerEvent;
            u.kineticScrollNeeded =
              r && (u.touch || u.msPointers || u.pointers);
          })();
        vi = {
          left: { reverse: "right" },
          right: { reverse: "left" },
          down: { reverse: "up" },
          up: { reverse: "down" },
          top: { reverse: "bottom" },
          bottom: { reverse: "top" },
          in: { reverse: "out" },
          out: { reverse: "in" },
        };
        y = {};
        n.extend(y, {
          enabled: !0,
          Element: function (t) {
            this.element = n(t);
          },
          promise: function (n, t) {
            n.is(":visible") ||
              n
                .css({ display: n.data("olddisplay") || "block" })
                .css("display");
            t.hide && n.data("olddisplay", n.css("display")).hide();
            t.init && t.init();
            t.completeCallback && t.completeCallback(n);
            n.dequeue();
          },
          disable: function () {
            this.enabled = !1;
            this.promise = this.promiseShim;
          },
          enable: function () {
            this.enabled = !0;
            this.promise = this.animatedPromise;
          },
        });
        y.promiseShim = y.promise;
        "kendoAnimate" in n.fn ||
          h(n.fn, {
            kendoStop: function (n, t) {
              return this.stop(n, t);
            },
            kendoAnimate: function (n, t, i, r) {
              return ii(this, n, t, i, r);
            },
            kendoAddClass: function (n, t) {
              return r.toggleClass(this, n, t, !0);
            },
            kendoRemoveClass: function (n, t) {
              return r.toggleClass(this, n, t, !1);
            },
            kendoToggleClass: function (n, t, i) {
              return r.toggleClass(this, n, t, i);
            },
          });
        yi = /&/g;
        pi = /</g;
        wi = /"/g;
        bi = /'/g;
        ki = />/g;
        lt = function (n) {
          return n.target;
        };
        u.touch &&
          ((lt = function (n) {
            var t =
              "originalEvent" in n
                ? n.originalEvent.changedTouches
                : "changedTouches" in n
                ? n.changedTouches
                : null;
            return t
              ? document.elementFromPoint(t[0].clientX, t[0].clientY)
              : n.target;
          }),
          it(
            [
              "swipe",
              "swipeLeft",
              "swipeRight",
              "swipeUp",
              "swipeDown",
              "doubleTap",
              "tap",
            ],
            function (t, i) {
              n.fn[i] = function (n) {
                return this.bind(i, n);
              };
            }
          ));
        u.touch
          ? u.mobileOS
            ? ((u.mousedown = "touchstart"),
              (u.mouseup = "touchend"),
              (u.mousemove = "touchmove"),
              (u.mousecancel = "touchcancel"),
              (u.click = "touchend"),
              (u.resize = "orientationchange"))
            : ((u.mousedown = "mousedown touchstart"),
              (u.mouseup = "mouseup touchend"),
              (u.mousemove = "mousemove touchmove"),
              (u.mousecancel = "mouseleave touchcancel"),
              (u.click = "click"),
              (u.resize = "resize"))
          : u.pointers
          ? ((u.mousemove = "pointermove"),
            (u.mousedown = "pointerdown"),
            (u.mouseup = "pointerup"),
            (u.mousecancel = "pointercancel"),
            (u.click = "pointerup"),
            (u.resize = "orientationchange resize"))
          : u.msPointers
          ? ((u.mousemove = "MSPointerMove"),
            (u.mousedown = "MSPointerDown"),
            (u.mouseup = "MSPointerUp"),
            (u.mousecancel = "MSPointerCancel"),
            (u.click = "MSPointerUp"),
            (u.resize = "orientationchange resize"))
          : ((u.mousemove = "mousemove"),
            (u.mousedown = "mousedown"),
            (u.mouseup = "mouseup"),
            (u.mousecancel = "mouseleave"),
            (u.click = "click"),
            (u.resize = "resize"));
        di = function (n, t) {
          for (var r, i, o = t || "d", e = 1, u = 0, f = n.length; u < f; u++)
            (i = n[u]),
              "" !== i &&
                ((r = i.indexOf("[")),
                0 !== r &&
                  (r == -1
                    ? (i = "." + i)
                    : (e++,
                      (i =
                        "." + i.substring(0, r) + " || {})" + i.substring(r)))),
                e++,
                (o += i + (u < f - 1 ? " || {})" : ")")));
          return Array(e).join("(") + o;
        };
        gi = /^([a-z]+:)?\/\//i;
        h(r, {
          widgets: [],
          _widgetRegisteredCallbacks: [],
          ui: r.ui || {},
          fx: r.fx || nu,
          effects: r.effects || y,
          mobile: r.mobile || {},
          data: r.data || {},
          dataviz: r.dataviz || {},
          drawing: r.drawing || {},
          spreadsheet: { messages: {} },
          keys: {
            INSERT: 45,
            DELETE: 46,
            BACKSPACE: 8,
            TAB: 9,
            ENTER: 13,
            ESC: 27,
            LEFT: 37,
            UP: 38,
            RIGHT: 39,
            DOWN: 40,
            END: 35,
            HOME: 36,
            SPACEBAR: 32,
            PAGEUP: 33,
            PAGEDOWN: 34,
            F2: 113,
            F10: 121,
            F12: 123,
            NUMPAD_PLUS: 107,
            NUMPAD_MINUS: 109,
            NUMPAD_DOT: 110,
          },
          support: r.support || u,
          animate: r.animate || ii,
          ns: "",
          attr: function (n) {
            return "data-" + r.ns + n;
          },
          getShadows: vr,
          wrap: yr,
          deepExtend: st,
          getComputedStyles: ti,
          isScrollable: wr,
          scrollLeft: br,
          size: kr,
          toCamelCase: ni,
          toHyphens: pr,
          getOffset: r.getOffset || dr,
          parseEffects: r.parseEffects || gr,
          toggleClass: r.toggleClass || iu,
          directions: r.directions || vi,
          Observable: nt,
          Class: g,
          Template: v,
          template: bt(v.compile, v),
          render: bt(v.render, v),
          stringify: bt(ut.stringify, ut),
          eventTarget: lt,
          htmlEncode: ru,
          unescape: uu,
          isLocalUrl: function (n) {
            return n && !gi.test(n);
          },
          expr: function (n, t, i) {
            return (
              (n = n || ""),
              typeof t == o && ((i = t), (t = !1)),
              (i = i || "d"),
              n && "[" !== n.charAt(0) && (n = "." + n),
              t
                ? ((n = n.replace(/"([^.]*)\.([^"]*)"/g, '"$1_$DOT$_$2"')),
                  (n = n.replace(/'([^.]*)\.([^']*)'/g, "'$1_$DOT$_$2'")),
                  (n = di(n.split("."), i)),
                  (n = n.replace(/_\$DOT\$_/g, ".")))
                : (n = i + n),
              n
            );
          },
          getter: function (n, t) {
            var i = n + t;
            return (hr[i] = hr[i] || Function("d", "return " + r.expr(n, t)));
          },
          setter: function (n) {
            return (cr[n] = cr[n] || Function("d,value", r.expr(n) + "=value"));
          },
          accessor: function (n) {
            return { get: r.getter(n), set: r.setter(n) };
          },
          guid: function () {
            for (var t, i = "", n = 0; n < 32; n++)
              (t = (16 * c.random()) | 0),
                (8 != n && 12 != n && 16 != n && 20 != n) || (i += "-"),
                (i += (12 == n ? 4 : 16 == n ? (3 & t) | 8 : t).toString(16));
            return i;
          },
          roleSelector: function (n) {
            return n
              .replace(/(\S+)/g, "[" + r.attr("role") + "=$1],")
              .slice(0, -1);
          },
          directiveSelector: function (n) {
            var t,
              i = n.split(" ");
            if (i)
              for (t = 0; t < i.length; t++)
                "view" != i[t] &&
                  (i[t] = i[t].replace(/(\w*)(view|bar|strip|over)$/, "$1-$2"));
            return i
              .join(" ")
              .replace(/(\S+)/g, "kendo-mobile-$1,")
              .slice(0, -1);
          },
          triggeredByInput: function (n) {
            return /^(label|input|textarea|select)$/i.test(n.target.tagName);
          },
          onWidgetRegistered: function (n) {
            for (var t = 0, i = r.widgets.length; t < i; t++) n(r.widgets[t]);
            r._widgetRegisteredCallbacks.push(n);
          },
          logToConsole: function (n, u) {
            var f = t.console;
            !r.suppressLog && i !== f && f.log && f[u || "log"](n);
          },
        });
        p = nt.extend({
          init: function (n, t) {
            var u,
              i = this;
            i.element = r.jQuery(n).handler(i);
            i.angular("init", t);
            nt.fn.init.call(i);
            u = t ? t.dataSource : null;
            u && (t = h({}, t, { dataSource: {} }));
            t = i.options = h(!0, {}, i.options, t);
            u && (t.dataSource = u);
            i.element.attr(r.attr("role")) ||
              i.element.attr(r.attr("role"), (t.name || "").toLowerCase());
            i.element.data("kendo" + t.prefix + t.name, i);
            i.bind(i.events, t);
          },
          events: [],
          options: { prefix: "" },
          _hasBindingTarget: function () {
            return !!this.element[0].kendoBindingTarget;
          },
          _tabindex: function (n) {
            n = n || this.wrapper;
            var i = this.element,
              t = "tabindex",
              r = n.attr(t) || i.attr(t);
            i.removeAttr(t);
            n.attr(t, isNaN(r) ? 0 : r);
          },
          setOptions: function (t) {
            this._setEvents(t);
            n.extend(this.options, t);
          },
          _setEvents: function (n) {
            for (var i, t = this, r = 0, u = t.events.length; r < u; r++)
              (i = t.events[r]),
                t.options[i] &&
                  n[i] &&
                  (t.unbind(i, t.options[i]),
                  t._events && t._events[i] && delete t._events[i]);
            t.bind(t.events, n);
          },
          resize: function (n) {
            var t = this.getSize(),
              i = this._size;
            (n ||
              ((t.width > 0 || t.height > 0) &&
                (!i || t.width !== i.width || t.height !== i.height))) &&
              ((this._size = t), this._resize(t, n), this.trigger("resize", t));
          },
          getSize: function () {
            return r.dimensions(this.element);
          },
          size: function (n) {
            return n ? (this.setSize(n), i) : this.getSize();
          },
          setSize: n.noop,
          _resize: n.noop,
          destroy: function () {
            var n = this;
            n.element.removeData("kendo" + n.options.prefix + n.options.name);
            n.element.removeData("handler");
            n.unbind();
          },
          _destroy: function () {
            this.destroy();
          },
          angular: function () {},
          _muteAngularRebind: function (n) {
            this._muteRebind = !0;
            n.call(this);
            this._muteRebind = !1;
          },
        });
        at = p.extend({
          dataItems: function () {
            return this.dataSource.flatView();
          },
          _angularItems: function (t) {
            var i = this;
            i.angular(t, function () {
              return {
                elements: i.items(),
                data: n.map(i.dataItems(), function (n) {
                  return { dataItem: n };
                }),
              };
            });
          },
        });
        r.dimensions = function (n, t) {
          var i = n[0];
          return (
            t && n.css(t), { width: i.offsetWidth, height: i.offsetHeight }
          );
        };
        r.notify = rt;
        nr = /template$/i;
        tr = /^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/;
        ir = /^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]+\]$/;
        rr = /([A-Z])/g;
        r.initWidget = function (u, f, e) {
          var h, p, s, v, d, c, w, l, b, g, y, k, a;
          if (
            (e ? e.roles && (e = e.roles) : (e = r.ui.roles),
            (u = u.nodeType ? u : u[0]),
            (c = u.getAttribute("data-" + r.ns + "role")))
          ) {
            b = c.indexOf(".") === -1;
            s = b ? e[c] : r.getter(c)(t);
            y = n(u).data();
            k = s ? "kendo" + s.fn.options.prefix + s.fn.options.name : "";
            g = b
              ? RegExp("^kendo.*" + c + "$", "i")
              : RegExp("^" + k + "$", "i");
            for (a in y)
              if (a.match(g)) {
                if (a !== k) return y[a];
                h = y[a];
              }
            if (s) {
              for (
                l = ct(u, "dataSource"),
                  f = n.extend({}, ri(u, s.fn.options), f),
                  l && (f.dataSource = typeof l === o ? r.getter(l)(t) : l),
                  v = 0,
                  d = s.fn.events.length;
                v < d;
                v++
              )
                (p = s.fn.events[v]),
                  (w = ct(u, p)),
                  w !== i && (f[p] = r.getter(w)(t));
              return (
                h ? n.isEmptyObject(f) || h.setOptions(f) : (h = new s(u, f)), h
              );
            }
          }
        };
        r.rolesFromNamespaces = function (n) {
          var t,
            i,
            u = [];
          for (
            n[0] || (n = [r.ui, r.dataviz.ui]), t = 0, i = n.length;
            t < i;
            t++
          )
            u[t] = n[t].roles;
          return h.apply(null, [{}].concat(u.reverse()));
        };
        r.init = function (t) {
          var i = r.rolesFromNamespaces(kt.call(arguments, 1));
          n(t)
            .find("[data-" + r.ns + "role]")
            .addBack()
            .each(function () {
              r.initWidget(this, {}, i);
            });
        };
        r.destroy = function (t) {
          n(t)
            .find("[data-" + r.ns + "role]")
            .addBack()
            .each(function () {
              var t,
                i = n(this).data();
              for (t in i)
                0 === t.indexOf("kendo") &&
                  typeof i[t].destroy === l &&
                  i[t].destroy();
            });
        };
        r.resize = function (t, i) {
          var u,
            f = n(t)
              .find("[data-" + r.ns + "role]")
              .addBack()
              .filter(eu);
          f.length &&
            ((u = n.makeArray(f)),
            u.sort(fu),
            n.each(u, function () {
              var t = r.widgetInstance(n(this));
              t && t.resize(i);
            }));
        };
        r.parseOptions = ri;
        h(r.ui, {
          Widget: p,
          DataBoundWidget: at,
          roles: {},
          progress: function (t, i, u) {
            var e,
              s,
              h,
              o,
              c,
              f = t.find(".k-loading-mask"),
              l = r.support,
              a = l.browser;
            u = n.extend(
              {},
              {
                width: "100%",
                height: "100%",
                top: t.scrollTop(),
                opacity: !1,
              },
              u
            );
            c = u.opacity ? "k-loading-mask k-opaque" : "k-loading-mask";
            i
              ? f.length ||
                ((e = l.isRtl(t)),
                (s = e ? "right" : "left"),
                (o = t.scrollLeft()),
                (h = a.webkit && e ? t[0].scrollWidth - t.width() - 2 * o : 0),
                (f = n(
                  r.format(
                    "<div class='{0}'><span class='k-loading-text'>{1}</span><div class='k-loading-image'/><div class='k-loading-color'/></div>",
                    c,
                    r.ui.progress.messages.loading
                  )
                )
                  .width(u.width)
                  .height(u.height)
                  .css("top", u.top)
                  .css(s, Math.abs(o) + h)
                  .prependTo(t)))
              : f && f.remove();
          },
          plugin: function (t, u, f) {
            var c,
              h,
              s,
              a,
              e = t.fn.options.name;
            for (
              u = u || r.ui,
                f = f || "",
                u[e] = t,
                u.roles[e.toLowerCase()] = t,
                c = "getKendo" + f + e,
                e = "kendo" + f + e,
                h = { name: e, widget: t, prefix: f || "" },
                r.widgets.push(h),
                s = 0,
                a = r._widgetRegisteredCallbacks.length;
              s < a;
              s++
            )
              r._widgetRegisteredCallbacks[s](h);
            n.fn[e] = function (u) {
              var f,
                s = this;
              return (
                typeof u === o
                  ? ((f = kt.call(arguments, 1)),
                    this.each(function () {
                      var t,
                        o,
                        h = n.data(this, e);
                      if (!h)
                        throw Error(
                          r.format(
                            "Cannot call method '{0}' of {1} before it is initialized",
                            u,
                            e
                          )
                        );
                      if (((t = h[u]), typeof t !== l))
                        throw Error(
                          r.format("Cannot find method '{0}' of {1}", u, e)
                        );
                      if (((o = t.apply(h, f)), o !== i)) return (s = o), !1;
                    }))
                  : this.each(function () {
                      return new t(this, u);
                    }),
                s
              );
            };
            n.fn[e].widget = t;
            n.fn[c] = function () {
              return this.data(e);
            };
          },
        });
        r.ui.progress.messages = { loading: "Loading..." };
        vt = {
          bind: function () {
            return this;
          },
          nullObject: !0,
          options: {},
        };
        yt = p.extend({
          init: function (n, t) {
            p.fn.init.call(this, n, t);
            this.element.autoApplyNS();
            this.wrapper = this.element;
            this.element.addClass("km-widget");
          },
          destroy: function () {
            p.fn.destroy.call(this);
            this.element.kendoDestroy();
          },
          options: { prefix: "Mobile" },
          events: [],
          view: function () {
            var n = this.element.closest(
              r.roleSelector("view splitview modalview drawer")
            );
            return r.widgetInstance(n, r.mobile.ui) || vt;
          },
          viewHasNativeScrolling: function () {
            var n = this.view();
            return n && n.options.useNativeScrolling;
          },
          container: function () {
            var n = this.element.closest(
              r.roleSelector("view layout modalview drawer splitview")
            );
            return r.widgetInstance(n.eq(0), r.mobile.ui) || vt;
          },
        });
        h(r.mobile, {
          init: function (n) {
            r.init(n, r.mobile.ui, r.ui, r.dataviz.ui);
          },
          appLevelNativeScrolling: function () {
            return (
              r.mobile.application &&
              r.mobile.application.options &&
              r.mobile.application.options.useNativeScrolling
            );
          },
          roles: {},
          ui: {
            Widget: yt,
            DataBoundWidget: at.extend(yt.prototype),
            roles: {},
            plugin: function (n) {
              r.ui.plugin(n, r.mobile.ui, "Mobile");
            },
          },
        });
        st(r.dataviz, {
          init: function (n) {
            r.init(n, r.dataviz.ui);
          },
          ui: {
            roles: {},
            themes: {},
            views: [],
            plugin: function (n) {
              r.ui.plugin(n, r.dataviz.ui);
            },
          },
          roles: {},
        });
        r.touchScroller = function (t, i) {
          return (
            i || (i = {}),
            (i.useNative = !0),
            n(t).map(function (t, f) {
              return (
                (f = n(f)),
                !(
                  !u.kineticScrollNeeded ||
                  !r.mobile.ui.Scroller ||
                  f.data("kendoMobileScroller")
                ) && (f.kendoMobileScroller(i), f.data("kendoMobileScroller"))
              );
            })[0]
          );
        };
        r.preventDefault = function (n) {
          n.preventDefault();
        };
        r.widgetInstance = function (n, i) {
          var f,
            o,
            h,
            s,
            c,
            u = n.data(r.ns + "role"),
            e = [],
            l = n.data("kendoView");
          if (u) {
            if (
              ("content" === u && (u = "scroller"),
              "editortoolbar" === u && (h = n.data("kendoEditorToolbar")))
            )
              return h;
            if ("view" === u && l) return l;
            if (i)
              if (i[0])
                for (f = 0, o = i.length; f < o; f++) e.push(i[f].roles[u]);
              else e.push(i.roles[u]);
            else
              e = [r.ui.roles[u], r.dataviz.ui.roles[u], r.mobile.ui.roles[u]];
            for (
              u.indexOf(".") >= 0 && (e = [r.getter(u)(t)]),
                f = 0,
                o = e.length;
              f < o;
              f++
            )
              if (
                ((s = e[f]),
                s &&
                  (c = n.data(
                    "kendo" + s.fn.options.prefix + s.fn.options.name
                  )))
              )
                return c;
          }
        };
        r.onResize = function (i) {
          var r = i;
          return (
            u.mobileOS.android &&
              (r = function () {
                setTimeout(i, 600);
              }),
            n(t).on(u.resize, r),
            r
          );
        };
        r.unbindResize = function (i) {
          n(t).off(u.resize, i);
        };
        r.attrValue = function (n, t) {
          return n.data(r.ns + t);
        };
        r.days = {
          Sunday: 0,
          Monday: 1,
          Tuesday: 2,
          Wednesday: 3,
          Thursday: 4,
          Friday: 5,
          Saturday: 6,
        };
        n.extend(n.expr.pseudos, {
          kendoFocusable: function (t) {
            var i = n.attr(t, "tabindex");
            return ou(t, !isNaN(i) && i > -1);
          },
        });
        pt = [
          "mousedown",
          "mousemove",
          "mouseenter",
          "mouseleave",
          "mouseover",
          "mouseout",
          "mouseup",
          "click",
        ];
        ur = "label, input, [data-rel=external]";
        e = {
          setupMouseMute: function () {
            var i,
              t = 0,
              r = pt.length,
              f = document.documentElement;
            if (!e.mouseTrap && u.eventCapture)
              for (
                e.mouseTrap = !0,
                  e.bustClick = !1,
                  e.captureMouse = !1,
                  i = function (t) {
                    e.captureMouse &&
                      ("click" === t.type
                        ? e.bustClick &&
                          !n(t.target).is(ur) &&
                          (t.preventDefault(), t.stopPropagation())
                        : t.stopPropagation());
                  };
                t < r;
                t++
              )
                f.addEventListener(pt[t], i, !0);
          },
          muteMouse: function (n) {
            e.captureMouse = !0;
            n.data.bustClick && (e.bustClick = !0);
            clearTimeout(e.mouseTrapTimeoutID);
          },
          unMuteMouse: function () {
            clearTimeout(e.mouseTrapTimeoutID);
            e.mouseTrapTimeoutID = setTimeout(function () {
              e.captureMouse = !1;
              e.bustClick = !1;
            }, 400);
          },
        };
        w = {
          down: "touchstart mousedown",
          move: "mousemove touchmove",
          up: "mouseup touchend touchcancel",
          cancel: "mouseleave touchcancel",
        };
        u.touch && (u.mobileOS.ios || u.mobileOS.android)
          ? (w = {
              down: "touchstart",
              move: "touchmove",
              up: "touchend touchcancel",
              cancel: "touchcancel",
            })
          : u.pointers
          ? (w = {
              down: "pointerdown",
              move: "pointermove",
              up: "pointerup",
              cancel: "pointercancel pointerleave",
            })
          : u.msPointers &&
            (w = {
              down: "MSPointerDown",
              move: "MSPointerMove",
              up: "MSPointerUp",
              cancel: "MSPointerCancel MSPointerLeave",
            });
        !u.msPointers ||
          "onmspointerenter" in t ||
          n.each(
            { MSPointerEnter: "MSPointerOver", MSPointerLeave: "MSPointerOut" },
            function (t, i) {
              n.event.special[t] = {
                delegateType: i,
                bindType: i,
                handle: function (t) {
                  var u,
                    f = this,
                    r = t.relatedTarget,
                    e = t.handleObj;
                  return (
                    (r && (r === f || n.contains(f, r))) ||
                      ((t.type = e.origType),
                      (u = e.handler.apply(this, arguments)),
                      (t.type = i)),
                    u
                  );
                },
              };
            }
          );
        fr = function (n) {
          return w[n] || n;
        };
        wt = /([^ ]+)/g;
        r.applyEventMap = function (n, t) {
          return (
            (n = n.replace(wt, fr)), t && (n = n.replace(wt, "$1." + t)), n
          );
        };
        tt = n.fn.on;
        lr(!0, s, n);
        s.fn = s.prototype = new n();
        s.fn.constructor = s;
        s.fn.init = function (t, i) {
          return (
            i && i instanceof n && !(i instanceof s) && (i = s(i)),
            n.fn.init.call(this, t, i, er)
          );
        };
        s.fn.init.prototype = s.fn;
        er = s(document);
        h(s.fn, {
          handler: function (n) {
            return this.data("handler", n), this;
          },
          autoApplyNS: function (n) {
            return this.data("kendoNS", n || r.guid()), this;
          },
          on: function () {
            var s,
              n,
              i,
              f,
              h,
              c,
              t = this,
              l = t.data("kendoNS");
            return 1 === arguments.length
              ? tt.call(t, arguments[0])
              : ((s = t),
                (n = kt.call(arguments)),
                typeof n[n.length - 1] === ot && n.pop(),
                (i = n[n.length - 1]),
                (f = r.applyEventMap(n[0], l)),
                u.mouseAndTouchPresent &&
                  f.search(/mouse|click/) > -1 &&
                  this[0] !== document.documentElement &&
                  (e.setupMouseMute(),
                  (h = 2 === n.length ? null : n[1]),
                  (c = f.indexOf("click") > -1 && f.indexOf("touchend") > -1),
                  tt.call(
                    this,
                    { touchstart: e.muteMouse, touchend: e.unMuteMouse },
                    h,
                    { bustClick: c }
                  )),
                typeof i === o &&
                  ((s = t.data("handler")),
                  (i = s[i]),
                  (n[n.length - 1] = function (n) {
                    i.call(s, n);
                  })),
                (n[0] = f),
                tt.apply(t, n),
                t);
          },
          kendoDestroy: function (n) {
            return (
              (n = n || this.data("kendoNS")), n && this.off("." + n), this
            );
          },
        });
        r.jQuery = s;
        r.eventMap = w;
        r.timezone = (function () {
          function t(t, i) {
            var r,
              o,
              s,
              c = i[3],
              e = i[4],
              f = i[5],
              h = i[8];
            return (
              h || (i[8] = h = {}),
              h[t]
                ? h[t]
                : (isNaN(e)
                    ? 0 === e.indexOf("last")
                      ? ((r = new Date(
                          Date.UTC(t, n[c] + 1, 1, f[0] - 24, f[1], f[2], 0)
                        )),
                        (o = u[e.substr(4, 3)]),
                        (s = r.getUTCDay()),
                        r.setUTCDate(r.getUTCDate() + o - s - (o > s ? 7 : 0)))
                      : e.indexOf(">=") >= 0 &&
                        ((r = new Date(
                          Date.UTC(t, n[c], e.substr(5), f[0], f[1], f[2], 0)
                        )),
                        (o = u[e.substr(0, 3)]),
                        (s = r.getUTCDay()),
                        r.setUTCDate(r.getUTCDate() + o - s + (o < s ? 7 : 0)))
                    : (r = new Date(Date.UTC(t, n[c], e, f[0], f[1], f[2], 0))),
                  (h[t] = r))
            );
          }
          function f(n, i, r) {
            var f, e, u, o;
            return (i = i[r])
              ? ((u = new Date(n).getUTCFullYear()),
                (i = jQuery.grep(i, function (n) {
                  var i = n[0],
                    t = n[1];
                  return (
                    i <= u && (t >= u || (i == u && "only" == t) || "max" == t)
                  );
                })),
                i.push(n),
                i.sort(function (n, i) {
                  return (
                    "number" != typeof n && (n = +t(u, n)),
                    "number" != typeof i && (i = +t(u, i)),
                    n - i
                  );
                }),
                (o = i[jQuery.inArray(n, i) - 1] || i[i.length - 1]),
                isNaN(o) ? o : null)
              : ((f = r.split(":")),
                (e = 0),
                f.length > 1 && (e = 60 * f[0] + +f[1]),
                [-1e6, "max", "-", "Jan", 1, [0, 0, 0], e, "-"]);
          }
          function e(n, t, i) {
            var u,
              f,
              e,
              r = t[i];
            if (("string" == typeof r && (r = t[r]), !r))
              throw Error(
                'Timezone "' +
                  i +
                  '" is either incorrect, or kendo.timezones.min.js is not included.'
              );
            for (
              u = r.length - 1;
              u >= 0 && ((f = r[u][3]), !(f && n > f));
              u--
            );
            if (((e = r[u + 1]), !e))
              throw Error('Timezone "' + i + '" not found on ' + n + ".");
            return e;
          }
          function i(n, t, i, r) {
            typeof n != b &&
              (n = Date.UTC(
                n.getFullYear(),
                n.getMonth(),
                n.getDate(),
                n.getHours(),
                n.getMinutes(),
                n.getSeconds(),
                n.getMilliseconds()
              ));
            var u = e(n, t, r);
            return { zone: u, rule: f(n, i, u[1]) };
          }
          function s(n, t) {
            var u, f, e;
            return "Etc/UTC" == t || "Etc/GMT" == t
              ? 0
              : ((u = i(n, this.zones, this.rules, t)),
                (f = u.zone),
                (e = u.rule),
                r.parseFloat(e ? f[0] - e[6] : f[0]));
          }
          function h(n, t) {
            var f = i(n, this.zones, this.rules, t),
              e = f.zone,
              r = f.rule,
              u = e[2];
            return u.indexOf("/") >= 0
              ? u.split("/")[r && +r[6] ? 1 : 0]
              : u.indexOf("%s") >= 0
              ? u.replace("%s", r && "-" != r[7] ? r[7] : "")
              : u;
          }
          function c(n, t, i) {
            var u,
              f,
              e,
              r = i;
            return (
              typeof t == o && (t = this.offset(n, t)),
              typeof i == o && (i = this.offset(n, i)),
              (f = n.getTimezoneOffset()),
              (n = new Date(n.getTime() + 6e4 * (t - i))),
              (e = n.getTimezoneOffset()),
              typeof r == o && (r = this.offset(n, r)),
              (u = e - f + (i - r)),
              new Date(n.getTime() + 6e4 * u)
            );
          }
          function l(n, t) {
            return this.convert(n, n.getTimezoneOffset(), t);
          }
          function a(n, t) {
            return this.convert(n, t, n.getTimezoneOffset());
          }
          function v(n) {
            return this.apply(new Date(n), "Etc/UTC");
          }
          var n = {
              Jan: 0,
              Feb: 1,
              Mar: 2,
              Apr: 3,
              May: 4,
              Jun: 5,
              Jul: 6,
              Aug: 7,
              Sep: 8,
              Oct: 9,
              Nov: 10,
              Dec: 11,
            },
            u = { Sun: 0, Mon: 1, Tue: 2, Wed: 3, Thu: 4, Fri: 5, Sat: 6 };
          return {
            zones: {},
            rules: {},
            offset: s,
            convert: c,
            apply: l,
            remove: a,
            abbr: h,
            toLocalDate: v,
          };
        })();
        r.date = (function () {
          function u(n, t) {
            return (
              0 === t &&
              23 === n.getHours() &&
              (n.setHours(n.getHours() + 2), !0)
            );
          }
          function c(n, t, i) {
            var r = n.getHours();
            i = i || 1;
            t = (t - n.getDay() + 7 * i) % 7;
            n.setDate(n.getDate() + t);
            u(n, r);
          }
          function l(n, t, i) {
            return (n = new Date(n)), c(n, t, i), n;
          }
          function a(n) {
            return new Date(n.getFullYear(), n.getMonth(), 1);
          }
          function p(n) {
            var t = new Date(n.getFullYear(), n.getMonth() + 1, 0),
              i = a(n),
              r = Math.abs(t.getTimezoneOffset() - i.getTimezoneOffset());
            return r && t.setHours(i.getHours() + r / 60), t;
          }
          function w(t, i) {
            return 1 !== i ? n(l(t, i, -1), 4) : n(t, 4 - (t.getDay() || 7));
          }
          function o(n, i) {
            var r = new Date(n.getFullYear(), 0, 1, -6),
              u = w(n, i),
              f = u.getTime() - r.getTime(),
              e = Math.floor(f / t);
            return 1 + Math.floor(e / 7);
          }
          function b(t, u) {
            var e, s, f;
            return (
              u === i && (u = r.culture().calendar.firstDay),
              (e = n(t, -7)),
              (s = n(t, 7)),
              (f = o(t, u)),
              0 === f ? o(e, u) + 1 : 53 === f && o(s, u) > 1 ? 1 : f
            );
          }
          function f(n) {
            return (
              (n = new Date(
                n.getFullYear(),
                n.getMonth(),
                n.getDate(),
                0,
                0,
                0
              )),
              u(n, 0),
              n
            );
          }
          function k(n) {
            return Date.UTC(
              n.getFullYear(),
              n.getMonth(),
              n.getDate(),
              n.getHours(),
              n.getMinutes(),
              n.getSeconds(),
              n.getMilliseconds()
            );
          }
          function e(n) {
            return s(n).getTime() - f(s(n));
          }
          function d(n, i, r) {
            var u,
              f = e(i),
              o = e(r);
            return (
              !n ||
              f == o ||
              (i >= r && (r += t),
              (u = e(n)),
              f > u && (u += t),
              o < f && (o += t),
              u >= f && u <= o)
            );
          }
          function g(n, i, r) {
            var u,
              e = i.getTime(),
              f = r.getTime();
            return e >= f && (f += t), (u = n.getTime()), u >= e && u <= f;
          }
          function n(n, i) {
            var r = n.getHours();
            return (n = new Date(n)), v(n, i * t), u(n, r), n;
          }
          function v(n, t, i) {
            var r,
              u = n.getTimezoneOffset();
            n.setTime(n.getTime() + t);
            i ||
              ((r = n.getTimezoneOffset() - u), n.setTime(n.getTime() + r * h));
          }
          function nt(n, t) {
            return (
              (n = new Date(
                n.getFullYear(),
                n.getMonth(),
                n.getDate(),
                t.getHours(),
                t.getMinutes(),
                t.getSeconds(),
                t.getMilliseconds()
              )),
              u(n, t.getHours()),
              n
            );
          }
          function y() {
            return f(new Date());
          }
          function tt(n) {
            return f(n).getTime() == y().getTime();
          }
          function s(n) {
            var t = new Date(1980, 1, 1, 0, 0, 0);
            return (
              n &&
                t.setHours(
                  n.getHours(),
                  n.getMinutes(),
                  n.getSeconds(),
                  n.getMilliseconds()
                ),
              t
            );
          }
          var h = 6e4,
            t = 864e5;
          return {
            adjustDST: u,
            dayOfWeek: l,
            setDayOfWeek: c,
            getDate: f,
            isInDateRange: g,
            isInTimeRange: d,
            isToday: tt,
            nextDay: function (t) {
              return n(t, 1);
            },
            previousDay: function (t) {
              return n(t, -1);
            },
            toUtcTime: k,
            MS_PER_DAY: t,
            MS_PER_HOUR: 60 * h,
            MS_PER_MINUTE: h,
            setTime: v,
            setHours: nt,
            addDays: n,
            today: y,
            toInvariantTime: s,
            firstDayOfMonth: a,
            lastDayOfMonth: p,
            weekInYear: b,
            getMilliseconds: e,
          };
        })();
        r.stripWhitespace = function (n) {
          var t, u, i;
          if (document.createNodeIterator)
            for (
              t = document.createNodeIterator(
                n,
                NodeFilter.SHOW_TEXT,
                function (t) {
                  return t.parentNode == n
                    ? NodeFilter.FILTER_ACCEPT
                    : NodeFilter.FILTER_REJECT;
                },
                !1
              );
              t.nextNode();

            )
              t.referenceNode &&
                !t.referenceNode.textContent.trim() &&
                t.referenceNode.parentNode.removeChild(t.referenceNode);
          else
            for (u = 0; u < n.childNodes.length; u++)
              (i = n.childNodes[u]),
                3 != i.nodeType ||
                  /\S/.test(i.nodeValue) ||
                  (n.removeChild(i), u--),
                1 == i.nodeType && r.stripWhitespace(i);
        };
        or =
          t.requestAnimationFrame ||
          t.webkitRequestAnimationFrame ||
          t.mozRequestAnimationFrame ||
          t.oRequestAnimationFrame ||
          t.msRequestAnimationFrame ||
          function (n) {
            setTimeout(n, 1e3 / 60);
          };
        r.animationFrame = function (n) {
          or.call(t, n);
        };
        a = [];
        r.queueAnimation = function (n) {
          a[a.length] = n;
          1 === a.length && r.runNextAnimation();
        };
        r.runNextAnimation = function () {
          r.animationFrame(function () {
            a[0] && (a.shift()(), a[0] && r.runNextAnimation());
          });
        };
        r.parseQueryStringParams = function (n) {
          for (
            var u = n.split("?")[1] || "",
              r = {},
              i = u.split(/&|=/),
              f = i.length,
              t = 0;
            t < f;
            t += 2
          )
            "" !== i[t] &&
              (r[decodeURIComponent(i[t])] = decodeURIComponent(i[t + 1]));
          return r;
        };
        r.elementUnderCursor = function (n) {
          if (i !== n.x.client)
            return document.elementFromPoint(n.x.client, n.y.client);
        };
        r.wheelDeltaY = function (n) {
          var r,
            t = n.originalEvent,
            u = t.wheelDeltaY;
          return (
            t.wheelDelta
              ? (u === i || u) && (r = t.wheelDelta)
              : t.detail && t.axis === t.VERTICAL_AXIS && (r = 10 * -t.detail),
            r
          );
        };
        r.throttle = function (n, t) {
          var r,
            u,
            f = 0;
          return !t || t <= 0
            ? n
            : ((u = function () {
                function u() {
                  n.apply(o, s);
                  f = +new Date();
                }
                var o = this,
                  e = +new Date() - f,
                  s = arguments;
                return f
                  ? (r && clearTimeout(r),
                    e > t ? u() : (r = setTimeout(u, t - e)),
                    i)
                  : u();
              }),
              (u.cancel = function () {
                clearTimeout(r);
              }),
              u);
        };
        r.caret = function (t, r, f) {
          var e,
            o,
            s,
            h,
            l,
            c = r !== i;
          if ((f === i && (f = r), t[0] && (t = t[0]), !c || !t.disabled)) {
            try {
              t.selectionStart !== i
                ? c
                  ? (t.focus(),
                    (o = u.mobileOS),
                    o.wp || o.android
                      ? setTimeout(function () {
                          t.setSelectionRange(r, f);
                        }, 0)
                      : t.setSelectionRange(r, f))
                  : (r = [t.selectionStart, t.selectionEnd])
                : document.selection &&
                  (n(t).is(":visible") && t.focus(),
                  (e = t.createTextRange()),
                  c
                    ? (e.collapse(!0),
                      e.moveStart("character", r),
                      e.moveEnd("character", f - r),
                      e.select())
                    : ((s = e.duplicate()),
                      e.moveToBookmark(
                        document.selection.createRange().getBookmark()
                      ),
                      s.setEndPoint("EndToStart", e),
                      (h = s.text.length),
                      (l = h + e.text.length),
                      (r = [h, l])));
            } catch (a) {
              r = [];
            }
            return r;
          }
        };
        r.compileMobileDirective = function (n, i) {
          var u = t.angular;
          return (
            n.attr(
              "data-" + r.ns + "role",
              n[0].tagName
                .toLowerCase()
                .replace("kendo-mobile-", "")
                .replace("-", "")
            ),
            u
              .element(n)
              .injector()
              .invoke([
                "$compile",
                function (t) {
                  t(n)(i);
                  /^\$(digest|apply)$/.test(i.$$phase) || i.$digest();
                },
              ]),
            r.widgetInstance(n, r.mobile.ui)
          );
        };
        r.antiForgeryTokens = function () {
          var t = {},
            r = n("meta[name=csrf-token],meta[name=_csrf]").attr("content"),
            u = n("meta[name=csrf-param],meta[name=_csrf_header]").attr(
              "content"
            );
          return (
            n("input[name^='__RequestVerificationToken']").each(function () {
              t[this.name] = this.value;
            }),
            u !== i && r !== i && (t[u] = r),
            t
          );
        };
        r.cycleForm = function (n) {
          function t(n) {
            var t = r.widgetInstance(n);
            t && t.focus ? t.focus() : n.focus();
          }
          var i = n.find("input, .k-widget").first(),
            u = n.find("button, .k-button").last();
          u.on("keydown", function (n) {
            n.keyCode != r.keys.TAB || n.shiftKey || (n.preventDefault(), t(i));
          });
          i.on("keydown", function (n) {
            n.keyCode == r.keys.TAB && n.shiftKey && (n.preventDefault(), t(u));
          });
        };
        r.focusElement = function (i) {
          var u = [],
            f = i
              .parentsUntil("body")
              .filter(function (n, t) {
                var i = r.getComputedStyles(t, ["overflow"]);
                return "visible" !== i.overflow;
              })
              .add(t);
          f.each(function (t, i) {
            u[t] = n(i).scrollTop();
          });
          try {
            i[0].setActive();
          } catch (e) {
            i[0].focus();
          }
          f.each(function (t, i) {
            n(i).scrollTop(u[t]);
          });
        };
        r.matchesMedia = function (n) {
          var i = r._bootstrapToMedia(n) || n;
          return u.matchMedia && t.matchMedia(i).matches;
        };
        (r._bootstrapToMedia = function (n) {
          return {
            xs: "(max-width: 576px)",
            sm: "(min-width: 576px)",
            md: "(min-width: 768px)",
            lg: "(min-width: 992px)",
            xl: "(min-width: 1200px)",
          }[n];
        }),
          (function () {
            function u(t, i, u, f) {
              var s,
                o,
                h = n("<form>").attr({ action: u, method: "POST", target: f }),
                e = r.antiForgeryTokens();
              e.fileName = i;
              s = t.split(";base64,");
              e.contentType = s[0].replace("data:", "");
              e.base64 = s[1];
              for (o in e)
                e.hasOwnProperty(o) &&
                  n("<input>")
                    .attr({ value: e[o], name: o, type: "hidden" })
                    .appendTo(h);
              h.appendTo("body").submit().remove();
            }
            function f(n, t) {
              var u,
                e,
                r,
                f,
                i,
                o = n;
              if ("string" == typeof n) {
                for (
                  u = n.split(";base64,"),
                    e = u[0],
                    r = atob(u[1]),
                    f = new Uint8Array(r.length),
                    i = 0;
                  i < r.length;
                  i++
                )
                  f[i] = r.charCodeAt(i);
                o = new Blob([f.buffer], { type: e });
              }
              navigator.msSaveBlob(o, t);
            }
            function e(n, r) {
              t.Blob && n instanceof Blob && (n = URL.createObjectURL(n));
              i.download = r;
              i.href = n;
              var u = document.createEvent("MouseEvents");
              u.initMouseEvent(
                "click",
                !0,
                !1,
                t,
                0,
                0,
                0,
                0,
                0,
                !1,
                !1,
                !1,
                !1,
                0,
                null
              );
              i.dispatchEvent(u);
              setTimeout(function () {
                URL.revokeObjectURL(n);
              });
            }
            var i = document.createElement("a"),
              o = "download" in i && !r.support.browser.edge;
            r.saveAs = function (n) {
              var t = u;
              n.forceProxy || (o ? (t = e) : navigator.msSaveBlob && (t = f));
              t(n.dataURI, n.fileName, n.proxyURL, n.proxyTarget);
            };
          })();
        r.proxyModelSetters = function (n) {
          var t = {};
          return (
            Object.keys(n || {}).forEach(function (i) {
              Object.defineProperty(t, i, {
                get: function () {
                  return n[i];
                },
                set: function (t) {
                  n[i] = t;
                  n.dirty = !0;
                },
              });
            }),
            t
          );
        };
      })(jQuery, window),
      window.kendo
    );
  },
  "function" == typeof define && define.amd
    ? define
    : function (n, t, i) {
        (i || t)();
      }
),
  (function (n, t) {
    t("kendo.router.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function e(n, t) {
            if (!t) return n;
            n + "/" === t && (n = t);
            var i = RegExp("^" + t, "i");
            return (
              i.test(n) || (n = t + "/" + n),
              r.protocol + "//" + (r.host + "/" + n).replace(/\/\/+/g, "/")
            );
          }
          function c(n) {
            return n ? "#!" : "#";
          }
          function l(n) {
            var t = r.href;
            return "#!" === n && t.indexOf("#") > -1 && t.indexOf("#!") < 0
              ? null
              : t.split(n)[1] || "";
          }
          function o(n, t) {
            return 0 === t.indexOf(n)
              ? t.substr(n.length).replace(/\/\//g, "/")
              : t;
          }
          function k(n) {
            return n.replace(/^(#)?/, "#");
          }
          function d(n) {
            return n.replace(/^(#(!)?)?/, "#!");
          }
          var i = window.kendo,
            f = "change",
            g = "back",
            a = "same",
            v = i.support,
            r = window.location,
            u = window.history,
            nt = 50,
            y = i.support.browser.msie,
            tt = /^#*/,
            s = window.document,
            h = i.Class.extend({
              back: function () {
                y
                  ? setTimeout(function () {
                      u.back();
                    })
                  : u.back();
              },
              forward: function () {
                y
                  ? setTimeout(function () {
                      u.forward();
                    })
                  : u.forward();
              },
              length: function () {
                return u.length;
              },
              replaceLocation: function (n) {
                r.replace(n);
              },
            }),
            p = h.extend({
              init: function (n) {
                this.root = n;
              },
              navigate: function (n) {
                u.pushState({}, s.title, e(n, this.root));
              },
              replace: function (n) {
                u.replaceState({}, s.title, e(n, this.root));
              },
              normalize: function (n) {
                return o(this.root, n);
              },
              current: function () {
                var n = r.pathname;
                return r.search && (n += r.search), o(this.root, n);
              },
              change: function (t) {
                n(window).bind("popstate.kendo", t);
              },
              stop: function () {
                n(window).unbind("popstate.kendo");
              },
              normalizeCurrent: function (n) {
                var t,
                  i = n.root,
                  f = r.pathname,
                  o = l(c(n.hashBang));
                i === f + "/" && (t = i);
                i === f && o && (t = e(o.replace(tt, ""), i));
                t && u.pushState({}, s.title, t);
              },
            }),
            w = h.extend({
              init: function (n) {
                this._id = i.guid();
                this.prefix = c(n);
                this.fix = n ? d : k;
              },
              navigate: function (n) {
                r.hash = this.fix(n);
              },
              replace: function (n) {
                this.replaceLocation(this.fix(n));
              },
              normalize: function (n) {
                return n.indexOf(this.prefix) < 0 ? n : n.split(this.prefix)[1];
              },
              change: function (t) {
                v.hashChange
                  ? n(window).on("hashchange." + this._id, t)
                  : (this._interval = setInterval(t, nt));
              },
              stop: function () {
                n(window).off("hashchange." + this._id);
                clearInterval(this._interval);
              },
              current: function () {
                return l(this.prefix);
              },
              normalizeCurrent: function (n) {
                var i = r.pathname,
                  t = n.root;
                return (
                  !(!n.pushState || t === i) &&
                  (this.replaceLocation(t + this.prefix + o(t, i)), !0)
                );
              },
            }),
            b = i.Observable.extend({
              start: function (t) {
                if (((t = t || {}), this.bind([f, g, a], t), !this._started)) {
                  this._started = !0;
                  t.root = t.root || "/";
                  var r,
                    i = this.createAdapter(t);
                  i.normalizeCurrent(t) ||
                    ((r = i.current()),
                    n.extend(this, {
                      adapter: i,
                      root: t.root,
                      historyLength: i.length(),
                      current: r,
                      locations: [r],
                    }),
                    i.change(n.proxy(this, "_checkUrl")));
                }
              },
              createAdapter: function (n) {
                return v.pushState && n.pushState
                  ? new p(n.root)
                  : new w(n.hashBang);
              },
              stop: function () {
                this._started &&
                  (this.adapter.stop(), this.unbind(f), (this._started = !1));
              },
              change: function (n) {
                this.bind(f, n);
              },
              replace: function (n, t) {
                this._navigate(n, t, function (t) {
                  t.replace(n);
                  this.locations[this.locations.length - 1] = this.current;
                });
              },
              navigate: function (n, i) {
                return "#:back" === n
                  ? ((this.backCalled = !0), this.adapter.back(), t)
                  : (this._navigate(n, i, function (t) {
                      t.navigate(n);
                      this.locations.push(this.current);
                    }),
                    t);
              },
              _navigate: function (n, i, r) {
                var u = this.adapter;
                return (
                  (n = u.normalize(n)),
                  this.current === n || this.current === decodeURIComponent(n)
                    ? (this.trigger(a), t)
                    : ((!i && this.trigger(f, { url: n, decode: !1 })) ||
                        ((this.current = n),
                        r.call(this, u),
                        (this.historyLength = u.length())),
                      t)
                );
              },
              _checkUrl: function () {
                var i = this.adapter,
                  n = i.current(),
                  e = i.length(),
                  o = this.historyLength === e,
                  r = n === this.locations[this.locations.length - 2] && o,
                  s = this.backCalled,
                  u = this.current;
                return (
                  null === n ||
                  this.current === n ||
                  this.current === decodeURIComponent(n) ||
                  ((this.historyLength = e),
                  (this.backCalled = !1),
                  (this.current = n),
                  r && this.trigger("back", { url: u, to: n })
                    ? (i.forward(), (this.current = u), t)
                    : this.trigger(f, { url: n, backButtonPressed: !s })
                    ? (r ? i.forward() : (i.back(), this.historyLength--),
                      (this.current = u),
                      t)
                    : (r ? this.locations.pop() : this.locations.push(n), t))
                );
              },
            });
          i.History = b;
          i.History.HistoryAdapter = h;
          i.History.HashAdapter = w;
          i.History.PushStateAdapter = p;
          i.absoluteURL = e;
          i.history = new b();
        })(window.kendo.jQuery),
        (function () {
          function h(n, t) {
            return t ? n : "([^/]+)";
          }
          function c(n, t) {
            return RegExp(
              "^" +
                n
                  .replace(y, "\\$&")
                  .replace(l, "(?:$1)?")
                  .replace(a, h)
                  .replace(v, "(.*?)") +
                "$",
              t ? "i" : ""
            );
          }
          function f(n) {
            return n.replace(/(\?.*)|(#.*)/g, "");
          }
          var n = window.kendo,
            t = n.history,
            e = n.Observable,
            o = "init",
            s = "routeMissing",
            i = "change",
            r = "back",
            u = "same",
            l = /\((.*?)\)/g,
            a = /(\(\?)?:\w+/g,
            v = /\*\w+/g,
            y = /[\-{}\[\]+?.,\\\^$|#\s]/g,
            p = n.Class.extend({
              init: function (n, t, i) {
                n instanceof RegExp || (n = c(n, i));
                this.route = n;
                this._callback = t;
              },
              callback: function (t, i, r) {
                var u,
                  o,
                  e = 0,
                  s = n.parseQueryStringParams(t);
                if (
                  ((s._back = i),
                  (t = f(t)),
                  (u = this.route.exec(t).slice(1)),
                  (o = u.length),
                  r)
                )
                  for (; e < o; e++)
                    void 0 !== u[e] && (u[e] = decodeURIComponent(u[e]));
                u.push(s);
                this._callback.apply(null, u);
              },
              worksWith: function (n, t, i) {
                return !!this.route.test(f(n)) && (this.callback(n, t, i), !0);
              },
            }),
            w = e.extend({
              init: function (n) {
                n || (n = {});
                e.fn.init.call(this);
                this.routes = [];
                this.pushState = n.pushState;
                this.hashBang = n.hashBang;
                this.root = n.root;
                this.ignoreCase = n.ignoreCase !== !1;
                this.bind([o, s, i, u, r], n);
              },
              destroy: function () {
                t.unbind(i, this._urlChangedProxy);
                t.unbind(u, this._sameProxy);
                t.unbind(r, this._backProxy);
                this.unbind();
              },
              start: function () {
                var i,
                  n = this,
                  f = function () {
                    n._same();
                  },
                  r = function (t) {
                    n._back(t);
                  },
                  u = function (t) {
                    n._urlChanged(t);
                  };
                t.start({
                  same: f,
                  change: u,
                  back: r,
                  pushState: n.pushState,
                  hashBang: n.hashBang,
                  root: n.root,
                });
                i = { url: t.current || "/", preventDefault: $.noop };
                n.trigger(o, i) || n._urlChanged(i);
                this._urlChangedProxy = u;
                this._backProxy = r;
              },
              route: function (n, t) {
                this.routes.push(new p(n, t, this.ignoreCase));
              },
              navigate: function (t, i) {
                n.history.navigate(t, i);
              },
              replace: function (t, i) {
                n.history.replace(t, i);
              },
              _back: function (n) {
                this.trigger(r, { url: n.url, to: n.to }) && n.preventDefault();
              },
              _same: function () {
                this.trigger(u);
              },
              _urlChanged: function (t) {
                var u,
                  f,
                  o,
                  h,
                  r = t.url,
                  c = !!t.decode,
                  e = t.backButtonPressed;
                if (
                  (r || (r = "/"),
                  this.trigger(i, {
                    url: t.url,
                    params: n.parseQueryStringParams(t.url),
                    backButtonPressed: e,
                  }))
                )
                  return void t.preventDefault();
                for (u = 0, f = this.routes, h = f.length; u < h; u++)
                  if (((o = f[u]), o.worksWith(r, e, c))) return;
                this.trigger(s, {
                  url: r,
                  params: n.parseQueryStringParams(r),
                  backButtonPressed: e,
                }) && t.preventDefault();
              },
            });
          n.Router = w;
        })(),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.data.odata.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function h(r, u) {
            for (
              var e,
                l,
                f,
                o,
                s,
                p,
                a = [],
                b = r.logic || "and",
                w = r.filters,
                c = 0,
                y = w.length;
              c < y;
              c++
            )
              (r = w[c]),
                (e = r.field),
                (s = r.value),
                (o = r.operator),
                r.filters
                  ? (r = h(r, u))
                  : ((p = r.ignoreCase),
                    (e = e.replace(/\./g, "/")),
                    (r = v[o]),
                    u && (r = tt[o]),
                    "isnullorempty" === o
                      ? (r = i.format("{0} {1} null or {0} {1} ''", e, r))
                      : "isnotnullorempty" === o
                      ? (r = i.format("{0} {1} null and {0} {1} ''", e, r))
                      : "isnull" === o || "isnotnull" === o
                      ? (r = i.format("{0} {1} null", e, r))
                      : "isempty" === o || "isnotempty" === o
                      ? (r = i.format("{0} {1} ''", e, r))
                      : r &&
                        s !== t &&
                        ((l = n.type(s)),
                        "string" === l
                          ? ((f = "'{1}'"),
                            (s = s.replace(/'/g, "''")),
                            p === !0 && (e = "tolower(" + e + ")"))
                          : "date" === l
                          ? u
                            ? ((f = "{1:yyyy-MM-ddTHH:mm:ss+00:00}"),
                              (s = i.timezone.apply(s, "Etc/UTC")))
                            : (f = "datetime'{1:yyyy-MM-ddTHH:mm:ss}'")
                          : (f = "{1}"),
                        r.length > 3
                          ? "substringof" !== r
                            ? (f = "{0}({2}," + f + ")")
                            : ((f = "{0}(" + f + ",{2})"),
                              "doesnotcontain" === o &&
                                (u
                                  ? ((f = "{0}({2},'{1}') eq -1"),
                                    (r = "indexof"))
                                  : (f += " eq false")))
                          : (f = "{2} {0} " + f),
                        (r = i.format(f, r, s, e)))),
                a.push(r);
            return (
              (r = a.join(" " + b + " ")),
              a.length > 1 && (r = "(" + r + ")"),
              r
            );
          }
          function c(n) {
            for (var t in n) 0 === t.indexOf("@odata") && delete n[t];
          }
          function e() {
            return Math.floor(65536 * (1 + Math.random()))
              .toString(16)
              .substr(1);
          }
          function u(n) {
            return n + e() + "-" + e() + "-" + e();
          }
          function o(n, t) {
            var i = r + "--" + n;
            return t && (i += "--"), i;
          }
          function p(n, t, r, u) {
            var f = n.options[u].url,
              e = i.format("{0} ", r);
            return a(f) ? e + f(t) : e + f;
          }
          function w(n, t) {
            var i = "";
            return (
              (i += o(n, !1)),
              (i += r + "Content-Type: application/http"),
              (i += r + "Content-Transfer-Encoding: binary"),
              i + (r + "Content-ID: " + t)
            );
          }
          function b(n) {
            var t = "";
            return (
              (t += r + "Content-Type: application/json;odata=minimalmetadata"),
              (t += r + "Prefer: return=representation"),
              t + (l + i.stringify(n))
            );
          }
          function k(n, t, i, u, f, e) {
            for (var s = "", o = 0; o < n.length; o++)
              (s += w(t, i)),
                (s += l + p(f, n[o], f.options[u].type, u) + " HTTP/1.1"),
                e || (s += b(n[o])),
                (s += r),
                i++;
            return s;
          }
          function s(n, t, i, u, f, e, s) {
            var h = "";
            return (
              (h += d(t, i)), (h += k(n, i, u, e, f, s)), (h += o(i, !0)), h + r
            );
          }
          function d(n, t) {
            var i = "";
            return (
              (i += "--" + n + r),
              i + ("Content-Type: multipart/mixed; boundary=" + t + r)
            );
          }
          function g(n, t) {
            var i = {},
              r = u("sf_batch_"),
              f = "",
              e = 0,
              c = n.options.batch.url,
              h = u("sf_changeset_");
            return (
              (i.type = n.options.batch.type),
              (i.url = a(c) ? c() : c),
              (i.headers = {
                "Content-Type": "multipart/mixed; boundary=" + r,
              }),
              t.updated.length &&
                ((f += s(t.updated, r, h, e, n, "update", !1)),
                (e += t.updated.length),
                (h = u("sf_changeset_"))),
              t.destroyed.length &&
                ((f += s(t.destroyed, r, h, e, n, "destroy", !0)),
                (e += t.destroyed.length),
                (h = u("sf_changeset_"))),
              t.created.length && (f += s(t.created, r, h, e, n, "create", !1)),
              (f += o(r, !0)),
              (i.data = f),
              i
            );
          }
          function nt(n) {
            var e,
              c,
              o,
              r,
              s,
              u,
              h = n.match(/--changesetresponse_[a-z0-9-]+$/gm),
              f = 0,
              t = [];
            for (t.push({ models: [], passed: !0 }), u = 0; u < h.length; u++)
              (r = h[u]),
                r.lastIndexOf("--", r.length - 1)
                  ? u < h.length - 1 && t.push({ models: [], passed: !0 })
                  : ((f = f ? n.indexOf(r, f + r.length) : n.indexOf(r)),
                    (e = n.substring(f, n.indexOf("--", f + 1))),
                    (c = e.match(/^HTTP\/1\.\d (\d{3}) (.*)$/gm).pop()),
                    (o = i.parseFloat(c.match(/\d{3}/g).pop())),
                    o >= 200 && o <= 299
                      ? ((s = e.match(/\{.*\}/gm)),
                        s && t[t.length - 1].models.push(JSON.parse(s[0])))
                      : (t[t.length - 1].passed = !1));
            return t;
          }
          var i = window.kendo,
            f = n.extend,
            r = "\r\n",
            l = "\r\n\r\n",
            a = i.isFunction,
            v = {
              eq: "eq",
              neq: "ne",
              gt: "gt",
              gte: "ge",
              lt: "lt",
              lte: "le",
              contains: "substringof",
              doesnotcontain: "substringof",
              endswith: "endswith",
              startswith: "startswith",
              isnull: "eq",
              isnotnull: "ne",
              isnullorempty: "eq",
              isnotnullorempty: "ne",
              isempty: "eq",
              isnotempty: "ne",
            },
            tt = f({}, v, { contains: "contains" }),
            y = {
              pageSize: n.noop,
              page: n.noop,
              filter: function (n, t, i) {
                t && ((t = h(t, i)), t && (n.$filter = t));
              },
              sort: function (t, i) {
                var r = n
                  .map(i, function (n) {
                    var t = n.field.replace(/\./g, "/");
                    return "desc" === n.dir && (t += " desc"), t;
                  })
                  .join(",");
                r && (t.$orderby = r);
              },
              skip: function (n, t) {
                t && (n.$skip = t);
              },
              take: function (n, t) {
                t && (n.$top = t);
              },
            },
            it = { read: { dataType: "jsonp" } };
          f(!0, i.data, {
            schemas: {
              odata: {
                type: "json",
                data: function (n) {
                  return n.d.results || [n.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 (n, t, r) {
                  var f, o, u, e;
                  if (
                    ((n = n || {}),
                    (t = t || "read"),
                    (e = (this.options || it)[t]),
                    (e = e ? e.dataType : "json"),
                    "read" === t)
                  ) {
                    f = { $inlinecount: "allpages" };
                    "json" != e && (f.$format = "json");
                    for (u in n) y[u] ? y[u](f, n[u], r) : (f[u] = n[u]);
                  } else {
                    if ("json" !== e)
                      throw Error(
                        "Only json dataType can be used for " +
                          t +
                          " operation."
                      );
                    if ("destroy" !== t) {
                      for (u in n)
                        (o = n[u]), "number" == typeof o && (n[u] = o + "");
                      f = i.stringify(n);
                    }
                  }
                  return f;
                },
              },
            },
          });
          f(!0, i.data, {
            schemas: {
              "odata-v4": {
                type: "json",
                data: function (t) {
                  if (n.isArray(t)) {
                    for (var i = 0; i < t.length; i++) c(t[i]);
                    return t;
                  }
                  return (t = n.extend({}, t)), c(t), t.value ? t.value : [t];
                },
                total: function (n) {
                  return n["@odata.count"];
                },
              },
            },
            transports: {
              "odata-v4": {
                batch: { type: "POST" },
                read: { cache: !0, dataType: "json" },
                update: {
                  cache: !0,
                  dataType: "json",
                  contentType: "application/json;IEEE754Compatible=true",
                  type: "PUT",
                },
                create: {
                  cache: !0,
                  dataType: "json",
                  contentType: "application/json;IEEE754Compatible=true",
                  type: "POST",
                },
                destroy: { cache: !0, dataType: "json", type: "DELETE" },
                parameterMap: function (n, t) {
                  var r = i.data.transports.odata.parameterMap(n, t, !0);
                  return (
                    "read" == t && ((r.$count = !0), delete r.$inlinecount), r
                  );
                },
                submit: function (t) {
                  var r = this,
                    u = g(r, t.data),
                    i = t.data;
                  (i.updated.length ||
                    i.destroyed.length ||
                    i.created.length) &&
                    n.ajax(
                      f(
                        !0,
                        {},
                        {
                          success: function (n) {
                            var r,
                              f = nt(n),
                              u = 0;
                            i.updated.length &&
                              ((r = f[u]),
                              r.passed &&
                                t.success(
                                  r.models.length ? r.models : [],
                                  "update"
                                ),
                              u++);
                            i.destroyed.length &&
                              ((r = f[u]),
                              r.passed && t.success([], "destroy"),
                              u++);
                            i.created.length &&
                              ((r = f[u]),
                              r.passed && t.success(r.models, "create"));
                          },
                          error: function (n, i, r) {
                            t.error(n, i, r);
                          },
                        },
                        u
                      )
                    );
                },
              },
            },
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.data.xml.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var i = window.kendo,
            r = n.isArray,
            u = n.isPlainObject,
            o = n.map,
            s = n.each,
            f = n.extend,
            h = i.getter,
            c = i.Class,
            e = c.extend({
              init: function (t) {
                var p,
                  v,
                  y,
                  w,
                  e = this,
                  c = t.total,
                  h = t.model,
                  b = t.parse,
                  l = t.errors,
                  k = t.serialize,
                  a = t.data;
                h &&
                  (u(h) &&
                    ((p = t.modelBase || i.data.Model),
                    h.fields &&
                      s(h.fields, function (t, i) {
                        u(i) && i.field
                          ? n.isFunction(i.field) ||
                            (i = f(i, { field: e.getter(i.field) }))
                          : (i = { field: e.getter(i) });
                        h.fields[t] = i;
                      }),
                    (v = h.id),
                    v &&
                      ((y = {}),
                      (y[e.xpathToMember(v, !0)] = { field: e.getter(v) }),
                      (h.fields = f(y, h.fields)),
                      (h.id = e.xpathToMember(v))),
                    (h = p.define(h))),
                  (e.model = h));
                c &&
                  ("string" == typeof c
                    ? ((c = e.getter(c)),
                      (e.total = function (n) {
                        return parseInt(c(n), 10);
                      }))
                    : "function" == typeof c && (e.total = c));
                l &&
                  ("string" == typeof l
                    ? ((l = e.getter(l)),
                      (e.errors = function (n) {
                        return l(n) || null;
                      }))
                    : "function" == typeof l && (e.errors = l));
                a &&
                  ("string" == typeof a
                    ? ((a = e.xpathToMember(a)),
                      (e.data = function (n) {
                        var i,
                          t = e.evaluate(n, a);
                        return (
                          (t = r(t) ? t : [t]),
                          e.model && h.fields
                            ? ((i = new e.model()),
                              o(t, function (n) {
                                if (n) {
                                  var t,
                                    r = {};
                                  for (t in h.fields)
                                    r[t] = i._parse(t, h.fields[t].field(n));
                                  return r;
                                }
                              }))
                            : t
                        );
                      }))
                    : "function" == typeof a && (e.data = a));
                "function" == typeof b &&
                  ((w = e.parse),
                  (e.parse = function (n) {
                    var t = b.call(e, n);
                    return w.call(e, t);
                  }));
                "function" == typeof k && (e.serialize = k);
              },
              total: function (n) {
                return this.data(n).length;
              },
              errors: function (n) {
                return n ? n.errors : null;
              },
              serialize: function (n) {
                return n;
              },
              parseDOM: function (n) {
                for (
                  var e,
                    i,
                    o,
                    h,
                    u,
                    c,
                    f = {},
                    l = n.attributes,
                    a = l.length,
                    s = 0;
                  s < a;
                  s++
                )
                  (c = l[s]), (f["@" + c.nodeName] = c.nodeValue);
                for (i = n.firstChild; i; i = i.nextSibling)
                  (o = i.nodeType),
                    3 === o || 4 === o
                      ? (f["#text"] = i.nodeValue)
                      : 1 === o &&
                        ((e = this.parseDOM(i)),
                        (h = i.nodeName),
                        (u = f[h]),
                        r(u) ? u.push(e) : (u = u !== t ? [u, e] : e),
                        (f[h] = u));
                return f;
              },
              evaluate: function (n, t) {
                for (var e, u, o, i, f, s = t.split("."); (e = s.shift()); )
                  if (((n = n[e]), r(n))) {
                    for (
                      u = [], t = s.join("."), f = 0, o = n.length;
                      f < o;
                      f++
                    )
                      (i = this.evaluate(n[f], t)),
                        (i = r(i) ? i : [i]),
                        u.push.apply(u, i);
                    return u;
                  }
                return n;
              },
              parse: function (t) {
                var i,
                  r,
                  u = {};
                return (
                  (i = t.documentElement || n.parseXML(t).documentElement),
                  (r = this.parseDOM(i)),
                  (u[i.nodeName] = r),
                  u
                );
              },
              xpathToMember: function (n, t) {
                return n
                  ? ((n = n.replace(/^\//, "").replace(/\//g, ".")),
                    n.indexOf("@") >= 0
                      ? n.replace(/\.?(@.*)/, t ? "$1" : '["$1"]')
                      : n.indexOf("text()") >= 0
                      ? n.replace(/(\.?text\(\))/, t ? "#text" : '["#text"]')
                      : n)
                  : "";
              },
              getter: function (n) {
                return h(this.xpathToMember(n), !0);
              },
            });
          n.extend(!0, i.data, { XmlDataReader: e, readers: { xml: e } });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.data.min",
      ["kendo.core.min", "kendo.data.odata.min", "kendo.data.xml.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function ti(n, t, i, r) {
            return function (f) {
              var o,
                e = {};
              for (o in f) e[o] = f[o];
              e.field = r ? i + "." + f.field : i;
              t == u && n._notifyChange && n._notifyChange(e);
              n.trigger(t, e);
            };
          }
          function wi(t, i) {
            if (t === i) return !0;
            var u,
              r = n.type(t),
              f = n.type(i);
            if (r !== f) return !1;
            if ("date" === r) return t.getTime() === i.getTime();
            if ("object" !== r && "array" !== r) return !1;
            for (u in t) if (!wi(t[u], i[u])) return !1;
            return !0;
          }
          function eu(n, t) {
            var i;
            for (var r in n)
              if (((i = n[r]), g(i) && i.field && i.field === t) || i === t)
                return i;
            return null;
          }
          function r(n) {
            this.data = n || [];
          }
          function rt(n, i) {
            if (n) {
              var r = typeof n === s ? { field: n, dir: i } : n,
                u = l(r) ? r : r !== t ? [r] : [];
              return bu(u, function (n) {
                return !!n.dir;
              });
            }
          }
          function bi(n) {
            var i,
              f,
              r,
              t,
              u = n.filters;
            if (u)
              for (i = 0, f = u.length; i < f; i++)
                (r = u[i]),
                  (t = r.operator),
                  t &&
                    typeof t === s &&
                    (r.operator = kr[t.toLowerCase()] || t),
                  bi(r);
          }
          function b(n) {
            if (n && !k(n))
              return (
                (!l(n) && n.filters) ||
                  (n = { logic: "and", filters: l(n) ? n : [n] }),
                bi(n),
                n
              );
          }
          function ou(n, t) {
            return (
              !n.logic &&
              !t.logic &&
              n.field === t.field &&
              n.value === t.value &&
              n.operator === t.operator
            );
          }
          function ki(n) {
            return (n = n || {}), k(n) ? { logic: "and", filters: [] } : b(n);
          }
          function di(n, t) {
            return t.logic || n.field > t.field
              ? 1
              : n.field < t.field
              ? -1
              : 0;
          }
          function gi(n, t) {
            var f, e, i, r, u;
            if (
              ((n = ki(n)), (t = ki(t)), n.logic !== t.logic) ||
              ((i = (n.filters || []).slice()),
              (r = (t.filters || []).slice()),
              i.length !== r.length)
            )
              return !1;
            for (i = i.sort(di), r = r.sort(di), u = 0; u < i.length; u++)
              if (((f = i[u]), (e = r[u]), f.logic && e.logic)) {
                if (!gi(f, e)) return !1;
              } else if (!ou(f, e)) return !1;
            return !0;
          }
          function su(n) {
            return l(n) ? n : [n];
          }
          function ut(n, i, r, u) {
            var f =
                typeof n === s
                  ? { field: n, dir: i, compare: r, skipItemSorting: u }
                  : n,
              e = l(f) ? f : f !== t ? [f] : [];
            return wt(e, function (n) {
              return {
                field: n.field,
                dir: n.dir || "asc",
                aggregates: n.aggregates,
                compare: n.compare,
                skipItemSorting: n.skipItemSorting,
              };
            });
          }
          function nr(n, t, i) {
            for (var u = ut(n, t, i), r = 0; r < u.length; r++)
              delete u[r].compare;
            return u;
          }
          function hu(n) {
            for (var i = l(n) ? n : [n], t = 0; t < i.length; t++)
              if (i[t] && h(i[t].compare)) return !0;
            return !1;
          }
          function cu(n, t) {
            return n && n.getTime && t && t.getTime
              ? n.getTime() === t.getTime()
              : n === t;
          }
          function lu(n, t, r, u, f, e) {
            var h, c, s, l, o;
            for (t = t || [], l = t.length, h = 0; h < l; h++)
              (c = t[h]),
                (s = c.aggregate),
                (o = c.field),
                (n[o] = n[o] || {}),
                (e[o] = e[o] || {}),
                (e[o][s] = e[o][s] || {}),
                (n[o][s] = dr[s.toLowerCase()](
                  n[o][s],
                  r,
                  i.accessor(o),
                  u,
                  f,
                  e[o][s]
                ));
          }
          function y(n) {
            return "number" == typeof n && !isNaN(n);
          }
          function vt(n) {
            return n && n.getTime;
          }
          function yt(n) {
            for (var i = n.length, r = Array(i), t = 0; t < i; t++)
              r[t] = n[t].toJSON();
            return r;
          }
          function au(n, t, r, u, f) {
            for (var s, o, e, c = {}, h = 0, l = n.length; h < l; h++) {
              s = n[h];
              for (o in t)
                (e = f[o]),
                  e &&
                    e !== o &&
                    (c[e] || (c[e] = i.setter(e)),
                    c[e](s, t[o](s)),
                    delete s[o]);
            }
          }
          function ii(n, t, i, r, u) {
            for (var e, f, o, s = 0, h = n.length; s < h; s++) {
              e = n[s];
              for (f in t)
                (e[f] = i._parse(f, t[f](e))),
                  (o = u[f]),
                  o && o !== f && delete e[o];
            }
          }
          function tr(n, t, i, r, u) {
            for (var f, o, e = 0, s = n.length; e < s; e++)
              (f = n[e]),
                (o = r[f.field]),
                o && o != f.field && (f.field = o),
                (f.value = i._parse(f.field, f.value)),
                f.hasSubgroups
                  ? tr(f.items, t, i, r, u)
                  : ii(f.items, t, i, r, u);
          }
          function ri(n, t, i, r, u, f) {
            return function (e) {
              return (e = n(e)), ir(t, i, r, u, f)(e);
            };
          }
          function ir(n, t, i, r, u) {
            return function (f) {
              return (
                f &&
                  !k(i) &&
                  ("[object Array]" === ni.call(f) ||
                    f instanceof v ||
                    (f = [f]),
                  t(f, i, new n(), r, u)),
                f || []
              );
            };
          }
          function rr(n, t) {
            var i, r, u;
            if (t.items && t.items.length)
              for (u = 0; u < t.items.length; u++)
                (i = n.items[u]),
                  (r = t.items[u]),
                  i && r
                    ? i.hasSubgroups
                      ? rr(i, r)
                      : i.field && i.value == r.value
                      ? i.items.push.apply(i.items, r.items)
                      : n.items.push.apply(n.items, [r])
                    : r && n.items.push.apply(n.items, [r]);
          }
          function ui(n, t, i, r) {
            for (
              var f, u, o, e = 0;
              t.length &&
              r &&
              ((f = t[e]),
              (u = f.items),
              (o = u.length),
              n && n.field === f.field && n.value === f.value
                ? (n.hasSubgroups && n.items.length
                    ? ui(n.items[n.items.length - 1], f.items, i, r)
                    : ((u = u.slice(i, i + r)), (n.items = n.items.concat(u))),
                  t.splice(e--, 1))
                : f.hasSubgroups && u.length
                ? (ui(f, u, i, r), f.items.length || t.splice(e--, 1))
                : ((u = u.slice(i, i + r)),
                  (f.items = u),
                  f.items.length || t.splice(e--, 1)),
              0 === u.length ? (i -= o) : ((i = 0), (r -= u.length)),
              !(++e >= t.length));

            );
            e < t.length && t.splice(e, t.length - e);
          }
          function ur(n, t) {
            for (
              var i,
                e,
                u,
                f = [],
                s = (n || []).length,
                o = h(t)
                  ? t
                  : function (n, t) {
                      return n[t];
                    },
                r = 0;
              r < s;
              r++
            )
              if (((i = o(n, r)), i.hasSubgroups)) f = f.concat(ur(i.items));
              else for (e = i.items, u = 0; u < e.length; u++) f.push(o(e, u));
            return f;
          }
          function fi(n) {
            for (var f, i, r, u = [], t = 0, e = n.length; t < e; t++)
              if (((r = n.at(t)), r.hasSubgroups)) u = u.concat(fi(r.items));
              else for (f = r.items, i = 0; i < f.length; i++) u.push(f.at(i));
            return u;
          }
          function fr(n, t) {
            var r, u, i;
            if (t)
              for (r = 0, u = n.length; r < u; r++)
                (i = n.at(r)),
                  i.hasSubgroups
                    ? fr(i.items, t)
                    : (i.items = new ot(i.items, t, i.items._events));
          }
          function er(n, t) {
            for (var i = 0; i < n.length; i++)
              if (n[i].hasSubgroups) {
                if (er(n[i].items, t)) return !0;
              } else if (t(n[i].items, n[i])) return !0;
          }
          function vu(n, t, i, r) {
            for (
              var u = 0;
              u < n.length && n[u].data !== t && !or(n[u].data, i, r);
              u++
            );
          }
          function or(n, t, i) {
            for (var r = 0, u = n.length; r < u; r++) {
              if (n[r] && n[r].hasSubgroups) return or(n[r].items, t, i);
              if (n[r] === t || n[r] === i) return (n[r] = i), !0;
            }
          }
          function sr(n, i, r, u, f) {
            for (var e, s, o = 0, h = n.length; o < h; o++)
              if (((e = n[o]), e && !(e instanceof u)))
                if (e.hasSubgroups === t || f) {
                  for (s = 0; s < i.length; s++)
                    if (i[s] === e) {
                      n[o] = i.at(s);
                      vu(r, i, e, n[o]);
                      break;
                    }
                } else sr(e.items, i, r, u, f);
          }
          function yu(n, t) {
            for (var r, u = n.length, i = 0; i < u; i++)
              if (((r = n[i]), r.uid && r.uid == t.uid))
                return n.splice(i, 1), r;
          }
          function hr(n, t) {
            return t
              ? lr(n, function (n) {
                  return (
                    (n.uid && n.uid == t.uid) ||
                    (n[t.idField] === t.id && t.id !== t._defaultId)
                  );
                })
              : -1;
          }
          function cr(n, t) {
            return t
              ? lr(n, function (n) {
                  return n.uid == t.uid;
                })
              : -1;
          }
          function lr(n, t) {
            for (var i = 0, r = n.length; i < r; i++) if (t(n[i])) return i;
            return -1;
          }
          function ar(n, t) {
            var i, r;
            return n && !k(n)
              ? ((i = n[t]),
                (r = g(i) ? i.from || i.field || t : n[t] || t),
                h(r) ? t : r)
              : t;
          }
          function vr(n, t) {
            var r,
              f,
              u,
              i = {};
            for (u in n) "filters" !== u && (i[u] = n[u]);
            if (n.filters)
              for (i.filters = [], r = 0, f = n.filters.length; r < f; r++)
                i.filters[r] = vr(n.filters[r], t);
            else i.field = ar(t.fields, i.field);
            return i;
          }
          function pt(n, t) {
            for (var i, u, f, o = [], r = 0, e = n.length; r < e; r++) {
              i = {};
              u = n[r];
              for (f in u) i[f] = u[f];
              i.field = ar(t.fields, i.field);
              i.aggregates &&
                l(i.aggregates) &&
                (i.aggregates = pt(i.aggregates, t));
              o.push(i);
            }
            return o;
          }
          function pu(t, i) {
            var s, c, l, h, o, a, r, u, f, e;
            for (
              t = n(t)[0],
                s = t.options,
                c = i[0],
                l = i[1],
                h = [],
                o = 0,
                a = s.length;
              o < a;
              o++
            )
              (f = {}),
                (u = s[o]),
                (r = u.parentNode),
                r === t && (r = null),
                u.disabled ||
                  (r && r.disabled) ||
                  (r && (f.optgroup = r.label),
                  (f[c.field] = u.text),
                  (e = u.attributes.value),
                  (e = e && e.specified ? u.value : u.text),
                  (f[l.field] = e),
                  h.push(f));
            return h;
          }
          function wu(t, i) {
            for (
              var r,
                h,
                f,
                e,
                o,
                c = n(t)[0].tBodies[0],
                l = c ? c.rows : [],
                v = i.length,
                a = [],
                u = 0,
                s = l.length;
              u < s;
              u++
            ) {
              for (f = {}, o = !0, h = l[u].cells, r = 0; r < v; r++)
                (e = h[r]),
                  "th" !== e.nodeName.toLowerCase() &&
                    ((o = !1), (f[i[r].field] = e.innerHTML));
              o || a.push(f);
            }
            return a;
          }
          function yr(n) {
            return function () {
              var t = this._data,
                i = c.fn[n].apply(this, at.call(arguments));
              return this._data != t && this._attachBubbleHandlers(), i;
            };
          }
          function pr(t, i) {
            function s(n, t) {
              return n.filter(t).add(n.find(t));
            }
            for (
              var r,
                f,
                h,
                o,
                c,
                u,
                a = n(t).children(),
                v = [],
                b = i[0].field,
                y = i[1] && i[1].field,
                p = i[2] && i[2].field,
                w = i[3] && i[3].field,
                e = 0,
                l = a.length;
              e < l;
              e++
            )
              (r = { _loaded: !0 }),
                (f = a.eq(e)),
                (o = f[0].firstChild),
                (u = f.children()),
                (t = u.filter("ul")),
                (u = u.filter(":not(ul)")),
                (h = f.attr("data-id")),
                h && (r.id = h),
                o && (r[b] = 3 == o.nodeType ? o.nodeValue : u.text()),
                y && (r[y] = s(u, "a").attr("href")),
                w && (r[w] = s(u, "img").attr("src")),
                p &&
                  ((c = s(u, ".k-sprite").prop("className")),
                  (r[p] = c && n.trim(c.replace("k-sprite", "")))),
                t.length && (r.items = pr(t.eq(0), i)),
                "true" == f.attr("data-hasChildren") && (r.hasChildren = !0),
                v.push(r);
            return v;
          }
          var wt,
            ot,
            o,
            ei,
            wr,
            p,
            st,
            br,
            oi,
            kr,
            dr,
            si,
            hi,
            ft,
            ci,
            c,
            li,
            ai,
            d,
            vi,
            gr,
            e = n.extend,
            w = n.proxy,
            g = n.isPlainObject,
            k = n.isEmptyObject,
            l = n.isArray,
            bu = n.grep,
            yi = n.ajax,
            bt = n.each,
            a = n.noop,
            i = window.kendo,
            h = i.isFunction,
            nt = i.Observable,
            kt = i.Class,
            s = "string",
            pi = "function",
            ku = "asc",
            nu = "create",
            tu = "read",
            iu = "update",
            ru = "destroy",
            u = "change",
            uu = "sync",
            dt = "get",
            tt = "error",
            it = "requestStart",
            ht = "progress",
            et = "requestEnd",
            du = [nu, tu, iu, ru],
            ct = function (n) {
              return n;
            },
            lt = i.getter,
            gt = i.stringify,
            f = Math,
            gu = [].push,
            nf = [].join,
            tf = [].pop,
            fu = [].splice,
            rf = [].shift,
            at = [].slice,
            uf = [].unshift,
            ni = {}.toString,
            ff = i.support.stableSort,
            ef = /^\/Date\((.*?)\)\/$/,
            v = nt.extend({
              init: function (n, t) {
                var i = this;
                i.type = t || o;
                nt.fn.init.call(i);
                i.length = n.length;
                i.wrapAll(n, i);
              },
              at: function (n) {
                return this[n];
              },
              toJSON: function () {
                for (var t, i = this.length, r = Array(i), n = 0; n < i; n++)
                  (t = this[n]), t instanceof o && (t = t.toJSON()), (r[n] = t);
                return r;
              },
              parent: a,
              wrapAll: function (n, t) {
                var i,
                  r,
                  u = this,
                  f = function () {
                    return u;
                  };
                for (t = t || [], i = 0, r = n.length; i < r; i++)
                  t[i] = u.wrap(n[i], f);
                return t;
              },
              wrap: function (n, t) {
                var r,
                  i = this;
                return (
                  null !== n &&
                    "[object Object]" === ni.call(n) &&
                    ((r = n instanceof i.type || n instanceof p),
                    r ||
                      ((n = n instanceof o ? n.toJSON() : n),
                      (n = new i.type(n))),
                    (n.parent = t),
                    n.bind(u, function (n) {
                      i.trigger(u, {
                        field: n.field,
                        node: n.node,
                        index: n.index,
                        items: n.items || [this],
                        action: n.node
                          ? n.action || "itemloaded"
                          : "itemchange",
                      });
                    })),
                  n
                );
              },
              push: function () {
                var n,
                  i = this.length,
                  t = this.wrapAll(arguments);
                return (
                  (n = gu.apply(this, t)),
                  this.trigger(u, { action: "add", index: i, items: t }),
                  n
                );
              },
              slice: at,
              sort: [].sort,
              join: nf,
              pop: function () {
                var n = this.length,
                  t = tf.apply(this);
                return (
                  n &&
                    this.trigger(u, {
                      action: "remove",
                      index: n - 1,
                      items: [t],
                    }),
                  t
                );
              },
              splice: function (n, t, i) {
                var r,
                  f,
                  e,
                  o = this.wrapAll(at.call(arguments, 2));
                if (((r = fu.apply(this, [n, t].concat(o))), r.length))
                  for (
                    this.trigger(u, { action: "remove", index: n, items: r }),
                      f = 0,
                      e = r.length;
                    f < e;
                    f++
                  )
                    r[f] && r[f].children && r[f].unbind(u);
                return (
                  i && this.trigger(u, { action: "add", index: n, items: o }), r
                );
              },
              shift: function () {
                var t = this.length,
                  n = rf.apply(this);
                return (
                  t &&
                    this.trigger(u, { action: "remove", index: 0, items: [n] }),
                  n
                );
              },
              unshift: function () {
                var n,
                  t = this.wrapAll(arguments);
                return (
                  (n = uf.apply(this, t)),
                  this.trigger(u, { action: "add", index: 0, items: t }),
                  n
                );
              },
              indexOf: function (n) {
                for (var r = this, t = 0, i = r.length; t < i; t++)
                  if (r[t] === n) return t;
                return -1;
              },
              forEach: function (n, t) {
                for (var i = 0, r = this.length, u = t || window; i < r; i++)
                  n.call(u, this[i], i, this);
              },
              map: function (n, t) {
                for (
                  var i = 0, r = [], u = this.length, f = t || window;
                  i < u;
                  i++
                )
                  r[i] = n.call(f, this[i], i, this);
                return r;
              },
              reduce: function (n) {
                var i,
                  t = 0,
                  r = this.length;
                for (
                  2 == arguments.length
                    ? (i = arguments[1])
                    : t < r && (i = this[t++]);
                  t < r;
                  t++
                )
                  i = n(i, this[t], t, this);
                return i;
              },
              reduceRight: function (n) {
                var i,
                  t = this.length - 1;
                for (
                  2 == arguments.length
                    ? (i = arguments[1])
                    : t > 0 && (i = this[t--]);
                  t >= 0;
                  t--
                )
                  i = n(i, this[t], t, this);
                return i;
              },
              filter: function (n, t) {
                for (
                  var r, i = 0, u = [], f = this.length, e = t || window;
                  i < f;
                  i++
                )
                  (r = this[i]), n.call(e, r, i, this) && (u[u.length] = r);
                return u;
              },
              find: function (n, t) {
                for (var r, i = 0, u = this.length, f = t || window; i < u; i++)
                  if (((r = this[i]), n.call(f, r, i, this))) return r;
              },
              every: function (n, t) {
                for (var r, i = 0, u = this.length, f = t || window; i < u; i++)
                  if (((r = this[i]), !n.call(f, r, i, this))) return !1;
                return !0;
              },
              some: function (n, t) {
                for (var r, i = 0, u = this.length, f = t || window; i < u; i++)
                  if (((r = this[i]), n.call(f, r, i, this))) return !0;
                return !1;
              },
              remove: function (n) {
                var t = this.indexOf(n);
                t !== -1 && this.splice(t, 1);
              },
              empty: function () {
                this.splice(0, this.length);
              },
            });
          "undefined" != typeof Symbol &&
            Symbol.iterator &&
            !v.prototype[Symbol.iterator] &&
            (v.prototype[Symbol.iterator] = [][Symbol.iterator]);
          ot = v.extend({
            init: function (n, t, i) {
              nt.fn.init.call(this);
              this.type = t || o;
              i && (this._events = i);
              for (var r = 0; r < n.length; r++) this[r] = n[r];
              this.length = r;
              this._parent = w(function () {
                return this;
              }, this);
            },
            at: function (n) {
              var t = this[n];
              return (
                t instanceof this.type
                  ? (t.parent = this._parent)
                  : (t = this[n] = this.wrap(t, this._parent)),
                t
              );
            },
          });
          o = nt.extend({
            init: function (n) {
              var t,
                r,
                u = this,
                f = function () {
                  return u;
                };
              nt.fn.init.call(this);
              this._handlers = {};
              for (r in n)
                (t = n[r]),
                  "object" == typeof t &&
                    t &&
                    !t.getTime &&
                    "_" != r.charAt(0) &&
                    (t = u.wrap(t, r, f)),
                  (u[r] = t);
              u.uid = i.guid();
            },
            shouldSerialize: function (n) {
              return (
                this.hasOwnProperty(n) &&
                "_handlers" !== n &&
                "_events" !== n &&
                typeof this[n] !== pi &&
                "uid" !== n
              );
            },
            forEach: function (n) {
              for (var t in this) this.shouldSerialize(t) && n(this[t], t);
            },
            toJSON: function () {
              var n,
                t,
                i = {};
              for (t in this)
                this.shouldSerialize(t) &&
                  ((n = this[t]),
                  (n instanceof o || n instanceof v) && (n = n.toJSON()),
                  (i[t] = n));
              return i;
            },
            get: function (n) {
              var r,
                t = this;
              return (
                t.trigger(dt, { field: n }),
                (r = "this" === n ? t : i.getter(n, !0)(t))
              );
            },
            _set: function (n, t) {
              var r,
                u,
                f,
                s = this,
                e = n.indexOf(".") >= 0;
              if (e)
                for (r = n.split("."), u = ""; r.length > 1; ) {
                  if (
                    ((u += r.shift()), (f = i.getter(u, !0)(s)), f instanceof o)
                  )
                    return f.set(r.join("."), t), e;
                  u += ".";
                }
              return i.setter(n)(s, t), e;
            },
            set: function (n, t) {
              var r = this,
                e = !1,
                o = n.indexOf(".") >= 0,
                f = i.getter(n, !0)(r);
              return (
                f !== t &&
                  (f instanceof nt &&
                    this._handlers[n] &&
                    (this._handlers[n].get &&
                      f.unbind(dt, this._handlers[n].get),
                    f.unbind(u, this._handlers[n].change)),
                  (e = r.trigger("set", { field: n, value: t })),
                  e ||
                    (o ||
                      (t = r.wrap(t, n, function () {
                        return r;
                      })),
                    (!r._set(n, t) ||
                      n.indexOf("(") >= 0 ||
                      n.indexOf("[") >= 0) &&
                      r.trigger(u, { field: n }))),
                e
              );
            },
            parent: a,
            wrap: function (n, t, i) {
              var l,
                r,
                e,
                s,
                f = this,
                h = ni.call(n);
              return (
                null == n ||
                  ("[object Object]" !== h && "[object Array]" !== h) ||
                  ((e = n instanceof v),
                  (s = n instanceof c),
                  "[object Object]" !== h || s || e
                    ? ("[object Array]" === h || e || s) &&
                      (e || s || (n = new v(n)),
                      (r = ti(f, u, t, !1)),
                      n.bind(u, r),
                      (f._handlers[t] = { change: r }))
                    : (n instanceof o || (n = new o(n)),
                      (l = ti(f, dt, t, !0)),
                      n.bind(dt, l),
                      (r = ti(f, u, t, !0)),
                      n.bind(u, r),
                      (f._handlers[t] = { get: l, change: r })),
                  (n.parent = i)),
                n
              );
            },
          });
          ei = {
            number: function (n) {
              return typeof n === s && "null" === n.toLowerCase()
                ? null
                : i.parseFloat(n);
            },
            date: function (n) {
              return typeof n === s && "null" === n.toLowerCase()
                ? null
                : i.parseDate(n);
            },
            boolean: function (n) {
              return typeof n === s
                ? "null" === n.toLowerCase()
                  ? null
                  : "true" === n.toLowerCase()
                : null != n
                ? !!n
                : n;
            },
            string: function (n) {
              return typeof n === s && "null" === n.toLowerCase()
                ? null
                : null != n
                ? n + ""
                : n;
            },
            default: function (n) {
              return n;
            },
          };
          wr = {
            string: "",
            number: 0,
            date: new Date(),
            boolean: !1,
            default: "",
          };
          p = o.extend({
            init: function (i) {
              var u,
                f,
                r = this;
              if (
                (!i || n.isEmptyObject(i)) &&
                ((i = n.extend({}, r.defaults, i)), r._initializers)
              )
                for (u = 0; u < r._initializers.length; u++)
                  (f = r._initializers[u]), (i[f] = r.defaults[f]());
              o.fn.init.call(r, i);
              r.dirty = !1;
              r.dirtyFields = {};
              r.idField &&
                ((r.id = r.get(r.idField)),
                r.id === t && (r.id = r._defaultId));
            },
            shouldSerialize: function (n) {
              return (
                o.fn.shouldSerialize.call(this, n) &&
                "uid" !== n &&
                !("id" !== this.idField && "id" === n) &&
                "dirty" !== n &&
                "dirtyFields" !== n &&
                "_accessors" !== n
              );
            },
            _parse: function (n, t) {
              var i,
                u = this,
                f = n,
                r = u.fields || {};
              return (
                (n = r[n]),
                n || (n = eu(r, f)),
                n &&
                  ((i = n.parse),
                  !i && n.type && (i = ei[n.type.toLowerCase()])),
                i ? i(t) : t
              );
            },
            _notifyChange: function (n) {
              var t = n.action;
              ("add" != t && "remove" != t) ||
                ((this.dirty = !0), (this.dirtyFields[n.field] = !0));
            },
            editable: function (n) {
              return (n = (this.fields || {})[n]), !n || n.editable !== !1;
            },
            set: function (n, t, i) {
              var r = this,
                u = r.dirty;
              r.editable(n) &&
                ((t = r._parse(n, t)),
                wi(t, r.get(n))
                  ? r.trigger("equalSet", { field: n, value: t })
                  : ((r.dirty = !0),
                    (r.dirtyFields[n] = !0),
                    o.fn.set.call(r, n, t, i) &&
                      !u &&
                      ((r.dirty = u), r.dirty || (r.dirtyFields[n] = !1))));
            },
            accept: function (n) {
              var i,
                r,
                t = this,
                u = function () {
                  return t;
                };
              for (i in n)
                (r = n[i]),
                  "_" != i.charAt(0) && (r = t.wrap(n[i], i, u)),
                  t._set(i, r);
              t.idField && (t.id = t.get(t.idField));
              t.dirty = !1;
              t.dirtyFields = {};
            },
            isNew: function () {
              return this.id === this._defaultId;
            },
          });
          p.define = function (n, i) {
            i === t && ((i = n), (n = p));
            var o,
              f,
              u,
              v,
              h,
              l,
              b,
              c,
              r = e({ defaults: {} }, i),
              y = {},
              a = r.id,
              w = [];
            if (
              (a && (r.idField = a),
              r.id && delete r.id,
              a && (r.defaults[a] = r._defaultId = ""),
              "[object Array]" === ni.call(r.fields))
            ) {
              for (l = 0, b = r.fields.length; l < b; l++)
                (u = r.fields[l]),
                  typeof u === s ? (y[u] = {}) : u.field && (y[u.field] = u);
              r.fields = y;
            }
            for (f in r.fields)
              (u = r.fields[f]),
                (v = u.type || "default"),
                (h = null),
                (c = f),
                (f = typeof u.field === s ? u.field : f),
                u.nullable ||
                  ((h = r.defaults[c !== f ? c : f] =
                    u.defaultValue !== t
                      ? u.defaultValue
                      : wr[v.toLowerCase()]),
                  "function" == typeof h && w.push(f)),
                i.id === f && (r._defaultId = h),
                (r.defaults[c !== f ? c : f] = h),
                (u.parse = u.parse || ei[v]);
            return (
              w.length > 0 && (r._initializers = w),
              (o = n.extend(r)),
              (o.define = function (n) {
                return p.define(o, n);
              }),
              r.fields && ((o.fields = r.fields), (o.idField = r.idField)),
              o
            );
          };
          st = {
            selector: function (n) {
              return h(n) ? n : lt(n);
            },
            compare: function (n) {
              var t = this.selector(n);
              return function (n, i) {
                return (
                  (n = t(n)),
                  (i = t(i)),
                  null == n && null == i
                    ? 0
                    : null == n
                    ? -1
                    : null == i
                    ? 1
                    : n.localeCompare
                    ? n.localeCompare(i)
                    : n > i
                    ? 1
                    : n < i
                    ? -1
                    : 0
                );
              };
            },
            create: function (n) {
              var t = n.compare || this.compare(n.field);
              return "desc" == n.dir
                ? function (n, i) {
                    return t(i, n, !0);
                  }
                : t;
            },
            combine: function (n) {
              return function (t, i) {
                for (var u = n[0](t, i), r = 1, f = n.length; r < f; r++)
                  u = u || n[r](t, i);
                return u;
              };
            },
          };
          br = e({}, st, {
            asc: function (n) {
              var t = this.selector(n);
              return function (n, i) {
                var r = t(n),
                  u = t(i);
                return (
                  r &&
                    r.getTime &&
                    u &&
                    u.getTime &&
                    ((r = r.getTime()), (u = u.getTime())),
                  r === u
                    ? n.__position - i.__position
                    : null == r
                    ? -1
                    : null == u
                    ? 1
                    : r.localeCompare
                    ? r.localeCompare(u)
                    : r > u
                    ? 1
                    : -1
                );
              };
            },
            desc: function (n) {
              var t = this.selector(n);
              return function (n, i) {
                var u = t(n),
                  r = t(i);
                return (
                  u &&
                    u.getTime &&
                    r &&
                    r.getTime &&
                    ((u = u.getTime()), (r = r.getTime())),
                  u === r
                    ? n.__position - i.__position
                    : null == u
                    ? 1
                    : null == r
                    ? -1
                    : r.localeCompare
                    ? r.localeCompare(u)
                    : u < r
                    ? 1
                    : -1
                );
              };
            },
            create: function (n) {
              return this[n.dir](n.field);
            },
          });
          wt = function (n, t) {
            for (var r = n.length, u = Array(r), i = 0; i < r; i++)
              u[i] = t(n[i], i, n);
            return u;
          };
          oi = (function () {
            function i(n) {
              return (
                "string" == typeof n && (n = n.replace(/[\r\n]+/g, "")),
                JSON.stringify(n)
              );
            }
            function n(n) {
              return function (t, r, u, f) {
                return (
                  (r += ""),
                  u &&
                    ((t =
                      "(" +
                      t +
                      " + '').toString()" +
                      (f
                        ? ".toLocaleLowerCase('" + f + "')"
                        : ".toLowerCase()")),
                    (r = f ? r.toLocaleLowerCase(f) : r.toLowerCase())),
                  n(t, i(r), u)
                );
              };
            }
            function t(n, t, r, u, f) {
              if (null != r) {
                if (typeof r === s) {
                  var e = ef.exec(r);
                  e
                    ? (r = new Date(+e[1]))
                    : u
                    ? ((r = i(f ? r.toLocaleLowerCase(f) : r.toLowerCase())),
                      (t =
                        "((" +
                        t +
                        " || '')+'')" +
                        (f
                          ? ".toLocaleLowerCase('" + f + "')"
                          : ".toLowerCase()")))
                    : (r = i(r));
                }
                r.getTime &&
                  ((t =
                    "(" +
                    t +
                    "&&" +
                    t +
                    ".getTime?" +
                    t +
                    ".getTime():" +
                    t +
                    ")"),
                  (r = r.getTime()));
              }
              return t + " " + n + " " + r;
            }
            function r(n) {
              var i, r, u, t;
              for (i = "/^", r = !1, u = 0; u < n.length; ++u) {
                if (((t = n.charAt(u)), r)) i += "\\" + t;
                else {
                  if ("~" == t) {
                    r = !0;
                    continue;
                  }
                  i +=
                    "*" == t
                      ? ".*"
                      : "?" == t
                      ? "."
                      : ".+^$()[]{}|\\/\n\r\u2028\u2029 ".indexOf(t) >= 0
                      ? "\\" + t
                      : t;
                }
                r = !1;
              }
              return i + "$/";
            }
            return {
              quote: function (n) {
                return n && n.getTime ? "new Date(" + n.getTime() + ")" : i(n);
              },
              eq: function (n, i, r, u) {
                return t("==", n, i, r, u);
              },
              neq: function (n, i, r, u) {
                return t("!=", n, i, r, u);
              },
              gt: function (n, i, r) {
                return t(">", n, i, r);
              },
              gte: function (n, i, r) {
                return t(">=", n, i, r);
              },
              lt: function (n, i, r) {
                return t("<", n, i, r);
              },
              lte: function (n, i, r) {
                return t("<=", n, i, r);
              },
              startswith: n(function (n, t) {
                return n + ".lastIndexOf(" + t + ", 0) == 0";
              }),
              doesnotstartwith: n(function (n, t) {
                return n + ".lastIndexOf(" + t + ", 0) == -1";
              }),
              endswith: n(function (n, t) {
                var i = t ? t.length - 2 : 0;
                return (
                  n + ".indexOf(" + t + ", " + n + ".length - " + i + ") >= 0"
                );
              }),
              doesnotendwith: n(function (n, t) {
                var i = t ? t.length - 2 : 0;
                return (
                  n + ".indexOf(" + t + ", " + n + ".length - " + i + ") < 0"
                );
              }),
              contains: n(function (n, t) {
                return n + ".indexOf(" + t + ") >= 0";
              }),
              doesnotcontain: n(function (n, t) {
                return n + ".indexOf(" + t + ") == -1";
              }),
              matches: n(function (n, t) {
                return (
                  (t = t.substring(1, t.length - 1)), r(t) + ".test(" + n + ")"
                );
              }),
              doesnotmatch: n(function (n, t) {
                return (
                  (t = t.substring(1, t.length - 1)),
                  "!" + r(t) + ".test(" + n + ")"
                );
              }),
              isempty: function (n) {
                return n + " === ''";
              },
              isnotempty: function (n) {
                return n + " !== ''";
              },
              isnull: function (n) {
                return "(" + n + " == null)";
              },
              isnotnull: function (n) {
                return "(" + n + " != null)";
              },
              isnullorempty: function (n) {
                return "(" + n + " === null) || (" + n + " === '')";
              },
              isnotnullorempty: function (n) {
                return "(" + n + " !== null) && (" + n + " !== '')";
              },
            };
          })();
          r.filterExpr = function (n) {
            for (
              var u,
                f,
                h,
                c,
                a = [],
                e = [],
                o = [],
                v = n.filters,
                s = 0,
                l = v.length;
              s < l;
              s++
            )
              (u = v[s]),
                (h = u.field),
                (c = u.operator),
                u.filters
                  ? ((f = r.filterExpr(u)),
                    (u = f.expression
                      .replace(/__o\[(\d+)\]/g, function (n, t) {
                        return (t = +t), "__o[" + (o.length + t) + "]";
                      })
                      .replace(/__f\[(\d+)\]/g, function (n, t) {
                        return (t = +t), "__f[" + (e.length + t) + "]";
                      })),
                    o.push.apply(o, f.operators),
                    e.push.apply(e, f.fields))
                  : (typeof h === pi
                      ? ((f = "__f[" + e.length + "](d)"), e.push(h))
                      : (f = i.expr(h)),
                    typeof c === pi
                      ? ((u =
                          "__o[" +
                          o.length +
                          "](" +
                          f +
                          ", " +
                          oi.quote(u.value) +
                          ")"),
                        o.push(c))
                      : (u = oi[(c || "eq").toLowerCase()](
                          f,
                          u.value,
                          u.ignoreCase === t || u.ignoreCase,
                          n.accentFoldingFiltering
                        ))),
                a.push(u);
            return {
              expression:
                "(" + a.join({ and: " && ", or: " || " }[n.logic]) + ")",
              fields: e,
              operators: o,
            };
          };
          kr = {
            "==": "eq",
            equals: "eq",
            isequalto: "eq",
            equalto: "eq",
            equal: "eq",
            "!=": "neq",
            ne: "neq",
            notequals: "neq",
            isnotequalto: "neq",
            notequalto: "neq",
            notequal: "neq",
            "<": "lt",
            islessthan: "lt",
            lessthan: "lt",
            less: "lt",
            "<=": "lte",
            le: "lte",
            islessthanorequalto: "lte",
            lessthanequal: "lte",
            ">": "gt",
            isgreaterthan: "gt",
            greaterthan: "gt",
            greater: "gt",
            ">=": "gte",
            isgreaterthanorequalto: "gte",
            greaterthanequal: "gte",
            ge: "gte",
            notsubstringof: "doesnotcontain",
            isnull: "isnull",
            isempty: "isempty",
            isnotempty: "isnotempty",
          };
          r.normalizeFilter = b;
          r.compareFilters = gi;
          r.prototype = {
            toArray: function () {
              return this.data;
            },
            range: function (n, t) {
              return new r(this.data.slice(n, n + t));
            },
            skip: function (n) {
              return new r(this.data.slice(n));
            },
            take: function (n) {
              return new r(this.data.slice(0, n));
            },
            select: function (n) {
              return new r(wt(this.data, n));
            },
            order: function (n, t, i) {
              var u = { dir: t };
              return (
                n && (n.compare ? (u.compare = n.compare) : (u.field = n)),
                new r(
                  i
                    ? this.data.sort(st.create(u))
                    : this.data.slice(0).sort(st.create(u))
                )
              );
            },
            orderBy: function (n, t) {
              return this.order(n, "asc", t);
            },
            orderByDescending: function (n, t) {
              return this.order(n, "desc", t);
            },
            sort: function (n, t, i, r) {
              var u,
                e,
                f = rt(n, t),
                o = [];
              if (((i = i || st), f.length)) {
                for (u = 0, e = f.length; u < e; u++) o.push(i.create(f[u]));
                return this.orderBy({ compare: i.combine(o) }, r);
              }
              return this;
            },
            filter: function (n) {
              var t,
                u,
                s,
                i,
                h,
                f,
                e,
                o,
                c = this.data,
                l = [];
              if (((n = b(n)), !n || 0 === n.filters.length)) return this;
              for (
                i = r.filterExpr(n),
                  f = i.fields,
                  e = i.operators,
                  h = o = Function("d, __f, __o", "return " + i.expression),
                  (f.length || e.length) &&
                    (o = function (n) {
                      return h(n, f, e);
                    }),
                  t = 0,
                  s = c.length;
                t < s;
                t++
              )
                (u = c[t]), o(u) && l.push(u);
              return new r(l);
            },
            group: function (n, t) {
              n = ut(n || []);
              t = t || this.data;
              var i,
                f = this,
                u = new r(f.data);
              return (
                n.length > 0 &&
                  ((i = n[0]),
                  (u = u.groupBy(i).select(function (u) {
                    var f = new r(t).filter([
                      {
                        field: u.field,
                        operator: "eq",
                        value: u.value,
                        ignoreCase: !1,
                      },
                    ]);
                    return {
                      field: u.field,
                      value: u.value,
                      items:
                        n.length > 1
                          ? new r(u.items)
                              .group(n.slice(1), f.toArray())
                              .toArray()
                          : u.items,
                      hasSubgroups: n.length > 1,
                      aggregates: f.aggregate(i.aggregates),
                    };
                  }))),
                u
              );
            },
            groupBy: function (n) {
              var t,
                o,
                h,
                c,
                u,
                f,
                l,
                s,
                a,
                e,
                v = this;
              if (k(n) || !this.data.length) return new r([]);
              for (
                t = n.field,
                  o = n.skipItemSorting
                    ? this.data
                    : this._sortForGrouping(t, n.dir || "asc"),
                  h = i.accessor(t),
                  u = h.get(o[0], t),
                  f = { field: t, value: u, items: [] },
                  e = [f],
                  s = 0,
                  a = o.length;
                s < a;
                s++
              )
                (c = o[s]),
                  (l = h.get(c, t)),
                  cu(u, l) ||
                    ((u = l),
                    (f = { field: t, value: u, items: [] }),
                    e.push(f)),
                  f.items.push(c);
              return (e = v._sortGroups(e, n)), new r(e);
            },
            _sortForGrouping: function (n, t) {
              var i,
                f,
                u = this.data;
              if (!ff) {
                for (i = 0, f = u.length; i < f; i++) u[i].__position = i;
                for (
                  u = new r(u).sort(n, t, br).toArray(), i = 0, f = u.length;
                  i < f;
                  i++
                )
                  delete u[i].__position;
                return u;
              }
              return this.sort(n, t).toArray();
            },
            _sortGroups: function (n, t) {
              var i = n;
              return (
                t &&
                  h(t.compare) &&
                  (i = new r(i)
                    .order({ compare: t.compare }, t.dir || ku)
                    .toArray()),
                i
              );
            },
            aggregate: function (n) {
              var t,
                i,
                r = {},
                u = {};
              if (n && n.length)
                for (t = 0, i = this.data.length; t < i; t++)
                  lu(r, n, this.data[t], t, i, u);
              return r;
            },
          };
          dr = {
            sum: function (n, t, i) {
              var r = i.get(t);
              return y(n) ? y(r) && (n += r) : (n = r), n;
            },
            count: function (n) {
              return (n || 0) + 1;
            },
            average: function (n, i, r, u, f, e) {
              var o = r.get(i);
              return (
                e.count === t && (e.count = 0),
                y(n) ? y(o) && (n += o) : (n = o),
                y(o) && e.count++,
                u == f - 1 && y(n) && (n /= e.count),
                n
              );
            },
            max: function (n, t, i) {
              var r = i.get(t);
              return (
                y(n) || vt(n) || (n = r), n < r && (y(r) || vt(r)) && (n = r), n
              );
            },
            min: function (n, t, i) {
              var r = i.get(t);
              return (
                y(n) || vt(n) || (n = r), n > r && (y(r) || vt(r)) && (n = r), n
              );
            },
          };
          r.normalizeGroup = ut;
          r.normalizeSort = rt;
          r.process = function (n, i, u) {
            var o, l, f, a, v, s, w, b, y, p, h, c;
            return (
              (i = i || {}),
              (o = i.group),
              (l = hu(ut(o || []))),
              (f = new r(n)),
              (a = nr(o || [])),
              (v = rt(i.sort || [])),
              (s = l ? v : a.concat(v)),
              (y = i.filterCallback),
              (p = i.filter),
              (h = i.skip),
              (c = i.take),
              s && u && (f = f.sort(s, t, t, u)),
              p &&
                ((f = f.filter(p)), y && (f = y(f)), (b = f.toArray().length)),
              s && (u || (f = f.sort(s)), o && (n = f.toArray())),
              l
                ? ((f = f.group(o, n)),
                  h !== t &&
                    c !== t &&
                    ((f = new r(ur(f.toArray())).range(h, c)),
                    (w = wt(a, function (n) {
                      return e({}, n, { skipItemSorting: !0 });
                    })),
                    (f = f.group(w, n))))
                : (h !== t && c !== t && (f = f.range(h, c)),
                  o && (f = f.group(o, n))),
              { total: b, data: f.toArray() }
            );
          };
          si = kt.extend({
            init: function (n) {
              this.data = n.data;
            },
            read: function (n) {
              n.success(this.data);
            },
            update: function (n) {
              n.success(n.data);
            },
            create: function (n) {
              n.success(n.data);
            },
            destroy: function (n) {
              n.success(n.data);
            },
          });
          hi = kt.extend({
            init: function (n) {
              var i,
                t = this;
              n = t.options = e({}, t.options, n);
              bt(du, function (t, i) {
                typeof n[i] === s && (n[i] = { url: n[i] });
              });
              t.cache = n.cache ? ft.create(n.cache) : { find: a, add: a };
              i = n.parameterMap;
              n.submit && (t.submit = n.submit);
              h(n.push) && (t.push = n.push);
              t.push || (t.push = ct);
              t.parameterMap = h(i)
                ? i
                : function (n) {
                    var t = {};
                    return (
                      bt(n, function (n, r) {
                        n in i &&
                          ((n = i[n]), g(n) && ((r = n.value(r)), (n = n.key)));
                        t[n] = r;
                      }),
                      t
                    );
                  };
            },
            options: { parameterMap: ct },
            create: function (n) {
              return yi(this.setup(n, nu));
            },
            read: function (i) {
              var r,
                o,
                u,
                f = this,
                e = f.cache;
              i = f.setup(i, tu);
              r = i.success || a;
              o = i.error || a;
              u = e.find(i.data);
              u !== t
                ? r(u)
                : ((i.success = function (n) {
                    e.add(i.data, n);
                    r(n);
                  }),
                  n.ajax(i));
            },
            update: function (n) {
              return yi(this.setup(n, iu));
            },
            destroy: function (n) {
              return yi(this.setup(n, ru));
            },
            setup: function (n, t) {
              n = n || {};
              var r,
                u = this,
                i = u.options[t],
                f = h(i.data) ? i.data(n.data) : i.data;
              return (
                (n = e(!0, {}, i, n)),
                (r = e(!0, {}, f, n.data)),
                (n.data = u.parameterMap(r, t)),
                h(n.url) && (n.url = n.url(r)),
                n
              );
            },
          });
          ft = kt.extend({
            init: function () {
              this._store = {};
            },
            add: function (n, i) {
              n !== t && (this._store[gt(n)] = i);
            },
            find: function (n) {
              return this._store[gt(n)];
            },
            clear: function () {
              this._store = {};
            },
            remove: function (n) {
              delete this._store[gt(n)];
            },
          });
          ft.create = function (n) {
            var t = {
              inmemory: function () {
                return new ft();
              },
            };
            return g(n) && h(n.find) ? n : n === !0 ? new ft() : t[n]();
          };
          ci = kt.extend({
            init: function (n) {
              var a,
                o,
                i,
                y,
                h,
                b,
                k,
                u,
                e,
                v,
                f,
                c,
                r,
                l,
                t = this;
              n = n || {};
              for (a in n) (o = n[a]), (t[a] = typeof o === s ? lt(o) : o);
              y = n.modelBase || p;
              g(t.model) && (t.model = i = y.define(t.model));
              h = w(t.data, t);
              t._dataAccessFunction = h;
              t.model &&
                ((b = w(t.groups, t)),
                (k = w(t.serialize, t)),
                (u = {}),
                (e = {}),
                (v = {}),
                (f = {}),
                (c = !1),
                (i = t.model),
                i.fields &&
                  (bt(i.fields, function (n, t) {
                    var i;
                    r = n;
                    g(t) && t.field ? (r = t.field) : typeof t === s && (r = t);
                    g(t) && t.from && (i = t.from);
                    c = c || (i && i !== n) || r !== n;
                    l = i || r;
                    e[n] = l.indexOf(".") !== -1 ? lt(l, !0) : lt(l);
                    v[n] = lt(n);
                    u[i || r] = n;
                    f[n] = i || r;
                  }),
                  !n.serialize && c && (t.serialize = ri(k, i, au, v, u, f))),
                (t._dataAccessFunction = h),
                (t._wrapDataAccessBase = ir(i, ii, e, u, f)),
                (t.data = ri(h, i, ii, e, u, f)),
                (t.groups = ri(b, i, tr, e, u, f)));
            },
            errors: function (n) {
              return n ? n.errors : null;
            },
            parse: ct,
            data: ct,
            total: function (n) {
              return n.length;
            },
            groups: ct,
            aggregates: function () {
              return {};
            },
            serialize: function (n) {
              return n;
            },
          });
          c = nt.extend({
            init: function (n) {
              var s,
                o,
                f,
                r = this;
              n && (o = n.data);
              n = r.options = e({}, r.options, n);
              r._map = {};
              r._prefetch = {};
              r._data = [];
              r._pristineData = [];
              r._ranges = [];
              r._view = [];
              r._pristineTotal = 0;
              r._destroyed = [];
              r._pageSize = n.pageSize;
              r._page = n.page || (n.pageSize ? 1 : t);
              r._sort = rt(n.sort);
              r._filter = b(n.filter);
              r._group = ut(n.group);
              r._aggregate = n.aggregate;
              r._total = n.total;
              r._shouldDetachObservableParents = !0;
              nt.fn.init.call(r);
              r.transport = li.create(n, o, r);
              h(r.transport.push) &&
                r.transport.push({
                  pushCreate: w(r._pushCreate, r),
                  pushUpdate: w(r._pushUpdate, r),
                  pushDestroy: w(r._pushDestroy, r),
                });
              null != n.offlineStorage &&
                ("string" == typeof n.offlineStorage
                  ? ((f = n.offlineStorage),
                    (r._storage = {
                      getItem: function () {
                        return JSON.parse(localStorage.getItem(f));
                      },
                      setItem: function (n) {
                        localStorage.setItem(f, gt(r.reader.serialize(n)));
                      },
                    }))
                  : (r._storage = n.offlineStorage));
              r.reader = new i.data.readers[n.schema.type || "json"](n.schema);
              s = r.reader.model || {};
              r._detachObservableParents();
              r._data = r._observe(r._data);
              r._online = !0;
              r.bind(["push", tt, u, it, uu, et, ht], n);
            },
            options: {
              data: null,
              schema: { modelBase: p },
              offlineStorage: null,
              serverSorting: !1,
              serverPaging: !1,
              serverFiltering: !1,
              serverGrouping: !1,
              serverAggregates: !1,
              batch: !1,
              inPlaceSort: !1,
            },
            clone: function () {
              return this;
            },
            online: function (i) {
              return i !== t
                ? this._online != i && ((this._online = i), i)
                  ? this.sync()
                  : n.Deferred().resolve().promise()
                : this._online;
            },
            offlineData: function (n) {
              return null == this.options.offlineStorage
                ? null
                : n !== t
                ? this._storage.setItem(n)
                : this._storage.getItem() || [];
            },
            _isServerGrouped: function () {
              var n = this.group() || [];
              return this.options.serverGrouping && n.length;
            },
            _pushCreate: function (n) {
              this._push(n, "pushCreate");
            },
            _pushUpdate: function (n) {
              this._push(n, "pushUpdate");
            },
            _pushDestroy: function (n) {
              this._push(n, "pushDestroy");
            },
            _push: function (n, t) {
              var i = this._readData(n);
              i || (i = n);
              this[t](i);
            },
            _flatData: function (n, t) {
              if (n) {
                if (this._isServerGrouped()) return fi(n);
                if (!t) for (var i = 0; i < n.length; i++) n.at(i);
              }
              return n;
            },
            parent: a,
            get: function (n) {
              for (
                var i = this._flatData(this._data, this.options.useRanges),
                  t = 0,
                  r = i.length;
                t < r;
                t++
              )
                if (i[t].id == n) return i[t];
            },
            getByUid: function (n) {
              return this._getByUid(n, this._data);
            },
            _getByUid: function (n, t) {
              var i,
                u,
                r = this._flatData(t, this.options.useRanges);
              if (r)
                for (i = 0, u = r.length; i < u; i++)
                  if (r[i].uid == n) return r[i];
            },
            indexOf: function (n) {
              return cr(this._data, n);
            },
            at: function (n) {
              return this._data.at(n);
            },
            data: function (n) {
              var r,
                i = this;
              if (n === t) {
                if (i._data) for (r = 0; r < i._data.length; r++) i._data.at(r);
                return i._data;
              }
              i._detachObservableParents();
              i._data = this._observe(n);
              i._pristineData = n.slice(0);
              i._storeData();
              i._ranges = [];
              i.trigger("reset");
              i._addRange(i._data);
              i._total = i._data.length;
              i._pristineTotal = i._total;
              i._process(i._data);
            },
            view: function (n) {
              return n === t
                ? this._view
                : ((this._view = this._observeView(n)), t);
            },
            _observeView: function (n) {
              var i,
                t = this;
              return (
                sr(
                  n,
                  t._data,
                  t._ranges,
                  t.reader.model || o,
                  t._isServerGrouped()
                ),
                (i = new ot(n, t.reader.model)),
                (i.parent = function () {
                  return t.parent();
                }),
                i
              );
            },
            flatView: function () {
              var n = this.group() || [];
              return n.length ? fi(this._view) : this._view;
            },
            add: function (n) {
              return this.insert(this._data.length, n);
            },
            _createNewModel: function (n) {
              return this.reader.model
                ? new this.reader.model(n)
                : n instanceof o
                ? n
                : new o(n);
            },
            insert: function (n, t) {
              return (
                t || ((t = n), (n = 0)),
                t instanceof p || (t = this._createNewModel(t)),
                this._isServerGrouped()
                  ? this._data.splice(n, 0, this._wrapInEmptyGroup(t))
                  : this._data.splice(n, 0, t),
                this._insertModelInRange(n, t),
                t
              );
            },
            pushInsert: function (t, i) {
              var u,
                s,
                f,
                h,
                e,
                r,
                c = this,
                o = c._getCurrentRangeSpan();
              i || ((i = t), (t = 0));
              l(i) || (i = [i]);
              u = [];
              s = this.options.autoSync;
              this.options.autoSync = !1;
              try {
                for (f = 0; f < i.length; f++)
                  (h = i[f]),
                    (e = this.insert(t, h)),
                    u.push(e),
                    (r = e.toJSON()),
                    this._isServerGrouped() && (r = this._wrapInEmptyGroup(r)),
                    this._pristineData.push(r),
                    o && o.length && n(o).last()[0].pristineData.push(r),
                    t++;
              } finally {
                this.options.autoSync = s;
              }
              u.length && this.trigger("push", { type: "create", items: u });
            },
            pushCreate: function (n) {
              this.pushInsert(this._data.length, n);
            },
            pushUpdate: function (n) {
              var r, f, i, e, t;
              for (l(n) || (n = [n]), r = [], f = 0; f < n.length; f++)
                (i = n[f]),
                  (e = this._createNewModel(i)),
                  (t = this.get(e.id)),
                  t
                    ? (r.push(t),
                      t.accept(i),
                      t.trigger(u),
                      this._updatePristineForModel(t, i))
                    : this.pushCreate(i);
              r.length && this.trigger("push", { type: "update", items: r });
            },
            pushDestroy: function (n) {
              var t = this._removeItems(n);
              t.length && this.trigger("push", { type: "destroy", items: t });
            },
            _removeItems: function (n, i) {
              var o, u, s, r, h, f, e;
              l(n) || (n = [n]);
              o = t === i || i;
              u = [];
              s = this.options.autoSync;
              this.options.autoSync = !1;
              try {
                for (r = 0; r < n.length; r++)
                  (h = n[r]),
                    (f = this._createNewModel(h)),
                    (e = !1),
                    this._eachItem(this._data, function (n) {
                      for (var i, t = 0; t < n.length; t++)
                        if (((i = n.at(t)), i.id === f.id)) {
                          u.push(i);
                          n.splice(t, 1);
                          e = !0;
                          break;
                        }
                    }),
                    e &&
                      o &&
                      (this._removePristineForModel(f), this._destroyed.pop());
              } finally {
                this.options.autoSync = s;
              }
              return u;
            },
            remove: function (n) {
              var t,
                i = this,
                r = i._isServerGrouped();
              return (
                this._eachItem(i._data, function (u) {
                  if (((t = yu(u, n)), t && r))
                    return (t.isNew && t.isNew()) || i._destroyed.push(t), !0;
                }),
                this._removeModelFromRanges(n),
                n
              );
            },
            destroyed: function () {
              return this._destroyed;
            },
            created: function () {
              for (
                var r = [],
                  t = this._flatData(this._data, this.options.useRanges),
                  n = 0,
                  i = t.length;
                n < i;
                n++
              )
                t[n].isNew && t[n].isNew() && r.push(t[n]);
              return r;
            },
            updated: function () {
              for (
                var r = [],
                  t = this._flatData(this._data, this.options.useRanges),
                  n = 0,
                  i = t.length;
                n < i;
                n++
              )
                t[n].isNew && !t[n].isNew() && t[n].dirty && r.push(t[n]);
              return r;
            },
            sync: function () {
              var i,
                t = this,
                r = [],
                u = [],
                e = t._destroyed,
                f = n.Deferred().resolve().promise();
              if (t.online()) {
                if (!t.reader.model) return f;
                r = t.created();
                u = t.updated();
                i = [];
                t.options.batch && t.transport.submit
                  ? (i = t._sendSubmit(r, u, e))
                  : (i.push.apply(i, t._send("create", r)),
                    i.push.apply(i, t._send("update", u)),
                    i.push.apply(i, t._send("destroy", e)));
                f = n.when.apply(null, i).then(function () {
                  for (var n = 0, i = arguments.length; n < i; n++)
                    arguments[n] && t._accept(arguments[n]);
                  t._storeData(!0);
                  t._syncEnd();
                  t._change({ action: "sync" });
                  t.trigger(uu);
                });
              } else
                t._storeData(!0), t._syncEnd(), t._change({ action: "sync" });
              return f;
            },
            _syncEnd: a,
            cancelChanges: function (n) {
              var t = this;
              n instanceof i.data.Model
                ? t._cancelModel(n)
                : ((t._destroyed = []),
                  t._detachObservableParents(),
                  (t._data = t._observe(t._pristineData)),
                  t.options.serverPaging && (t._total = t._pristineTotal),
                  (t._ranges = []),
                  t._addRange(t._data, 0),
                  t._changesCanceled(),
                  t._change(),
                  t._markOfflineUpdatesAsDirty());
            },
            _changesCanceled: a,
            _markOfflineUpdatesAsDirty: function () {
              var n = this;
              null != n.options.offlineStorage &&
                n._eachItem(n._data, function (n) {
                  for (var i, t = 0; t < n.length; t++)
                    (i = n.at(t)),
                      ("update" != i.__state__ && "create" != i.__state__) ||
                        (i.dirty = !0);
                });
            },
            hasChanges: function () {
              var n,
                i,
                t = this._flatData(this._data, this.options.useRanges);
              if (this._destroyed.length) return !0;
              for (n = 0, i = t.length; n < i; n++)
                if ((t[n].isNew && t[n].isNew()) || t[n].dirty) return !0;
              return !1;
            },
            _accept: function (t) {
              var o,
                r = this,
                f = t.models,
                i = t.response,
                u = 0,
                s = r._isServerGrouped(),
                h = r._pristineData,
                e = t.type;
              if ((r.trigger(et, { response: i, type: e }), i && !k(i))) {
                if (((i = r.reader.parse(i)), r._handleCustomErrors(i))) return;
                i = r.reader.data(i);
                l(i) || (i = [i]);
              } else
                i = n.map(f, function (n) {
                  return n.toJSON();
                });
              for (
                "destroy" === e && (r._destroyed = []), u = 0, o = f.length;
                u < o;
                u++
              )
                "destroy" !== e
                  ? (f[u].accept(i[u]),
                    "create" === e
                      ? h.push(s ? r._wrapInEmptyGroup(f[u].toJSON()) : i[u])
                      : "update" === e && r._updatePristineForModel(f[u], i[u]))
                  : r._removePristineForModel(f[u]);
            },
            _updatePristineForModel: function (n, t) {
              this._executeOnPristineForModel(n, function (n, r) {
                i.deepExtend(r[n], t);
              });
            },
            _executeOnPristineForModel: function (n, t) {
              this._eachPristineItem(function (i) {
                var r = hr(i, n);
                if (r > -1) return t(r, i), !0;
              });
            },
            _removePristineForModel: function (n) {
              this._executeOnPristineForModel(n, function (n, t) {
                t.splice(n, 1);
              });
            },
            _readData: function (n) {
              var t = this._isServerGrouped()
                ? this.reader.groups
                : this.reader.data;
              return t.call(this.reader, n);
            },
            _eachPristineItem: function (n) {
              var t = this,
                i = t.options,
                r = t._getCurrentRangeSpan();
              t._eachItem(t._pristineData, n);
              i.serverPaging &&
                i.useRanges &&
                bt(r, function (i, r) {
                  t._eachItem(r.pristineData, n);
                });
            },
            _eachItem: function (n, t) {
              n && n.length && (this._isServerGrouped() ? er(n, t) : t(n));
            },
            _pristineForModel: function (n) {
              var i,
                t,
                r = function (r) {
                  if (((t = hr(r, n)), t > -1)) return (i = r[t]), !0;
                };
              return this._eachPristineItem(r), i;
            },
            _cancelModel: function (n) {
              var i = this,
                t = this._pristineForModel(n);
              this._eachItem(this._data, function (r) {
                var u = cr(r, n);
                u >= 0 &&
                  (!t || (n.isNew() && !t.__state__)
                    ? (i._modelCanceled(n),
                      r.splice(u, 1),
                      i._removeModelFromRanges(n))
                    : (r[u].accept(t),
                      "update" == t.__state__ && (r[u].dirty = !0)));
              });
            },
            _modelCanceled: a,
            _submit: function (t, i) {
              var r = this;
              r.trigger(it, { type: "submit" });
              r.trigger(ht);
              r.transport.submit(
                e(
                  {
                    success: function (i, r) {
                      var u = n.grep(t, function (n) {
                        return n.type == r;
                      })[0];
                      u &&
                        u.resolve({ response: i, models: u.models, type: r });
                    },
                    error: function (n, i, u) {
                      for (var f = 0; f < t.length; f++) t[f].reject(n);
                      r.error(n, i, u);
                    },
                  },
                  i
                )
              );
            },
            _sendSubmit: function (t, i, r) {
              var u = this,
                f = [];
              return (
                u.options.batch &&
                  (t.length &&
                    f.push(
                      n.Deferred(function (n) {
                        n.type = "create";
                        n.models = t;
                      })
                    ),
                  i.length &&
                    f.push(
                      n.Deferred(function (n) {
                        n.type = "update";
                        n.models = i;
                      })
                    ),
                  r.length &&
                    f.push(
                      n.Deferred(function (n) {
                        n.type = "destroy";
                        n.models = r;
                      })
                    ),
                  u._submit(f, {
                    data: {
                      created: u.reader.serialize(yt(t)),
                      updated: u.reader.serialize(yt(i)),
                      destroyed: u.reader.serialize(yt(r)),
                    },
                  })),
                f
              );
            },
            _promise: function (t, i, r) {
              var u = this;
              return n
                .Deferred(function (n) {
                  u.trigger(it, { type: r });
                  u.trigger(ht);
                  u.transport[r].call(
                    u.transport,
                    e(
                      {
                        success: function (t) {
                          n.resolve({ response: t, models: i, type: r });
                        },
                        error: function (t, i, r) {
                          n.reject(t);
                          u.error(t, i, r);
                        },
                      },
                      t
                    )
                  );
                })
                .promise();
            },
            _send: function (n, t) {
              var i,
                f,
                r = this,
                u = [],
                e = r.reader.serialize(yt(t));
              if (r.options.batch)
                t.length && u.push(r._promise({ data: { models: e } }, t, n));
              else
                for (i = 0, f = t.length; i < f; i++)
                  u.push(r._promise({ data: e[i] }, [t[i]], n));
              return u;
            },
            read: function (t) {
              var i = this,
                u = i._params(t),
                r = n.Deferred();
              return (
                i._queueRequest(u, function () {
                  var n = i.trigger(it, { type: "read" });
                  n
                    ? (i._dequeueRequest(), r.resolve(n))
                    : (i.trigger(ht),
                      (i._ranges = []),
                      i.trigger("reset"),
                      i.online()
                        ? i.transport.read({
                            data: u,
                            success: function (n) {
                              i._ranges = [];
                              i.success(n, u);
                              r.resolve();
                            },
                            error: function () {
                              var n = at.call(arguments);
                              i.error.apply(i, n);
                              r.reject.apply(r, n);
                            },
                          })
                        : null != i.options.offlineStorage &&
                          (i.success(i.offlineData(), u), r.resolve()));
                }),
                r.promise()
              );
            },
            _readAggregates: function (n) {
              return this.reader.aggregates(n);
            },
            success: function (n) {
              var f,
                h,
                c,
                l,
                a,
                r,
                v,
                e,
                y,
                o,
                s,
                i = this,
                p = i.options;
              if ((i.trigger(et, { response: n, type: "read" }), i.online())) {
                if (((n = i.reader.parse(n)), i._handleCustomErrors(n)))
                  return i._dequeueRequest(), t;
                i._total = i.reader.total(n);
                i._pageSize > i._total &&
                  ((i._pageSize = i._total),
                  i.options.pageSize &&
                    i.options.pageSize > i._pageSize &&
                    (i._pageSize = i.options.pageSize));
                i._aggregate &&
                  p.serverAggregates &&
                  (i._aggregateResult = i._readAggregates(n));
                n = i._readData(n);
                i._destroyed = [];
              } else {
                for (
                  n = i._readData(n),
                    f = [],
                    c = {},
                    l = i.reader.model,
                    a = l ? l.idField : "id",
                    r = 0;
                  r < this._destroyed.length;
                  r++
                )
                  (v = this._destroyed[r][a]), (c[v] = v);
                for (r = 0; r < n.length; r++)
                  (e = n[r]),
                    (y = e.__state__),
                    "destroy" == y
                      ? c[e[a]] || this._destroyed.push(this._createNewModel(e))
                      : f.push(e);
                n = f;
                i._total = n.length;
              }
              if (
                ((i._pristineTotal = i._total),
                (h = i._skip && i._data.length && i._skip < i._data.length),
                i.options.endless)
              )
                for (
                  h && i._pristineData.splice(i._skip, i._pristineData.length),
                    f = n.slice(0),
                    o = 0;
                  o < f.length;
                  o++
                )
                  i._pristineData.push(f[o]);
              else i._pristineData = n.slice(0);
              if ((i._detachObservableParents(), i.options.endless)) {
                for (
                  i._data.unbind(u, i._changeHandler),
                    i._isServerGrouped() &&
                      i._data[i._data.length - 1].value === n[0].value &&
                      (rr(i._data[i._data.length - 1], n[0]), n.shift()),
                    n = i._observe(n),
                    h && i._data.splice(i._skip, i._data.length),
                    s = 0;
                  s < n.length;
                  s++
                )
                  i._data.push(n[s]);
                i._data.bind(u, i._changeHandler);
              } else i._data = i._observe(n);
              i._markOfflineUpdatesAsDirty();
              i._storeData();
              i._addRange(i._data);
              i._process(i._data);
              i._dequeueRequest();
            },
            _detachObservableParents: function () {
              if (this._data && this._shouldDetachObservableParents)
                for (var n = 0; n < this._data.length; n++)
                  this._data[n].parent && (this._data[n].parent = a);
            },
            _storeData: function (n) {
              function f(n) {
                for (var t, i, u = [], r = 0; r < n.length; r++)
                  (t = n.at(r)),
                    (i = t.toJSON()),
                    e && t.items
                      ? (i.items = f(t.items))
                      : ((i.uid = t.uid),
                        o &&
                          (t.isNew()
                            ? (i.__state__ = "create")
                            : t.dirty && (i.__state__ = "update"))),
                    u.push(i);
                return u;
              }
              var t,
                r,
                i,
                u,
                e = this._isServerGrouped(),
                o = this.reader.model;
              if (null != this.options.offlineStorage) {
                for (
                  t = f(this._data), r = [], i = 0;
                  i < this._destroyed.length;
                  i++
                )
                  (u = this._destroyed[i].toJSON()),
                    (u.__state__ = "destroy"),
                    r.push(u);
                this.offlineData(t.concat(r));
                n &&
                  (this._pristineData = this.reader.reader
                    ? this.reader.reader._wrapDataAccessBase(t)
                    : this.reader._wrapDataAccessBase(t));
              }
            },
            _addRange: function (n, i) {
              var r = this,
                u = t !== i ? i : r._skip || 0,
                f = u + r._flatData(n, !0).length;
              r._ranges.push({
                start: u,
                end: f,
                data: n,
                pristineData: n.toJSON(),
                timestamp: r._timeStamp(),
              });
              r._sortRanges();
            },
            _sortRanges: function () {
              this._ranges.sort(function (n, t) {
                return n.start - t.start;
              });
            },
            error: function (n, t, i) {
              this._dequeueRequest();
              this.trigger(et, {});
              this.trigger(tt, { xhr: n, status: t, errorThrown: i });
            },
            _params: function (n) {
              var t = this,
                i = e(
                  {
                    take: t.take(),
                    skip: t.skip(),
                    page: t.page(),
                    pageSize: t.pageSize(),
                    sort: t._sort,
                    filter: t._filter,
                    group: t._group,
                    aggregate: t._aggregate,
                  },
                  n
                );
              return (
                t.options.serverPaging ||
                  (delete i.take,
                  delete i.skip,
                  delete i.page,
                  delete i.pageSize),
                t.options.serverGrouping
                  ? t.reader.model &&
                    i.group &&
                    (i.group = pt(i.group, t.reader.model))
                  : delete i.group,
                t.options.serverFiltering
                  ? t.reader.model &&
                    i.filter &&
                    (i.filter = vr(i.filter, t.reader.model))
                  : delete i.filter,
                t.options.serverSorting
                  ? t.reader.model &&
                    i.sort &&
                    (i.sort = pt(i.sort, t.reader.model))
                  : delete i.sort,
                t.options.serverAggregates
                  ? t.reader.model &&
                    i.aggregate &&
                    (i.aggregate = pt(i.aggregate, t.reader.model))
                  : delete i.aggregate,
                i
              );
            },
            _queueRequest: function (n, i) {
              var r = this;
              r._requestInProgress
                ? (r._pending = { callback: w(i, r), options: n })
                : ((r._requestInProgress = !0), (r._pending = t), i());
            },
            _dequeueRequest: function () {
              var n = this;
              n._requestInProgress = !1;
              n._pending &&
                n._queueRequest(n._pending.options, n._pending.callback);
            },
            _handleCustomErrors: function (n) {
              if (this.reader.errors) {
                var t = this.reader.errors(n);
                if (t)
                  return (
                    this.trigger(tt, {
                      xhr: null,
                      status: "customerror",
                      errorThrown: "custom error",
                      errors: t,
                    }),
                    !0
                  );
              }
              return !1;
            },
            _shouldWrap: function (n) {
              var t = this.reader.model;
              return !(!t || !n.length) && !(n[0] instanceof t);
            },
            _observe: function (n) {
              var i,
                t = this,
                r = t.reader.model;
              return (
                (t._shouldDetachObservableParents = !0),
                n instanceof v
                  ? ((t._shouldDetachObservableParents = !1),
                    t._shouldWrap(n) &&
                      ((n.type = t.reader.model), n.wrapAll(n, n)))
                  : ((i = t.pageSize() && !t.options.serverPaging ? ot : v),
                    (n = new i(n, t.reader.model)),
                    (n.parent = function () {
                      return t.parent();
                    })),
                t._isServerGrouped() && fr(n, r),
                !(t._changeHandler && t._data && t._data instanceof v) ||
                (t.options.useRanges && t.options.serverPaging)
                  ? (t._changeHandler = w(t._change, t))
                  : t._data.unbind(u, t._changeHandler),
                n.bind(u, t._changeHandler)
              );
            },
            _updateTotalForAction: function (n, t) {
              var i = this,
                r = parseInt(i._total, 10);
              y(i._total) || (r = parseInt(i._pristineTotal, 10));
              "add" === n
                ? (r += t.length)
                : "remove" === n
                ? (r -= t.length)
                : "itemchange" === n || "sync" === n || i.options.serverPaging
                ? "sync" === n &&
                  (r = i._pristineTotal = parseInt(i._total, 10))
                : (r = i._pristineTotal);
              i._total = r;
            },
            _change: function (n) {
              var i,
                f,
                u,
                t = this,
                r = n ? n.action : "";
              if ("remove" === r)
                for (i = 0, f = n.items.length; i < f; i++)
                  (n.items[i].isNew && n.items[i].isNew()) ||
                    t._destroyed.push(n.items[i]);
              !t.options.autoSync ||
              ("add" !== r && "remove" !== r && "itemchange" !== r)
                ? (t._updateTotalForAction(r, n ? n.items : []),
                  t._process(t._data, n))
                : ((u = function (i) {
                    "sync" === i.action &&
                      (t.unbind("change", u),
                      t._updateTotalForAction(r, n.items));
                  }),
                  t.first("change", u),
                  t.sync());
            },
            _calculateAggregates: function (n, t) {
              t = t || {};
              var i = new r(n),
                f = t.aggregate,
                u = t.filter;
              return u && (i = i.filter(u)), i.aggregate(f);
            },
            _process: function (n, i) {
              var e,
                r = this,
                f = {};
              r.options.serverPaging !== !0 &&
                ((f.skip = r._skip),
                (f.take = r._take || r._pageSize),
                f.skip === t &&
                  r._page !== t &&
                  r._pageSize !== t &&
                  (f.skip = (r._page - 1) * r._pageSize),
                r.options.useRanges && (f.skip = r.currentRangeStart()));
              r.options.serverSorting !== !0 && (f.sort = r._sort);
              r.options.serverFiltering !== !0 && (f.filter = r._filter);
              r.options.serverGrouping !== !0 && (f.group = r._group);
              r.options.serverAggregates !== !0 && (f.aggregate = r._aggregate);
              r.options.serverGrouping && r._clearEmptyGroups(n);
              e = r._queryProcess(n, f);
              r.options.serverAggregates !== !0 &&
                (r._aggregateResult = r._calculateAggregates(
                  e.dataToAggregate || n,
                  f
                ));
              r.view(e.data);
              r._setFilterTotal(e.total, !1);
              i = i || {};
              i.items = i.items || r._view;
              r.trigger(u, i);
            },
            _clearEmptyGroups: function (n) {
              for (var t, i = n.length - 1; i >= 0; i--)
                (t = n[i]),
                  t.hasSubgroups
                    ? this._clearEmptyGroups(t.items)
                    : t.items &&
                      !t.items.length &&
                      fu.apply(t.parent(), [i, 1]);
            },
            _queryProcess: function (n, t) {
              return this.options.inPlaceSort
                ? r.process(n, t, this.options.inPlaceSort)
                : r.process(n, t);
            },
            _mergeState: function (i) {
              var r = this;
              return (
                i !== t &&
                  ((r._pageSize = i.pageSize),
                  (r._page = i.page),
                  (r._sort = i.sort),
                  (r._filter = i.filter),
                  (r._group = i.group),
                  (r._aggregate = i.aggregate),
                  (r._skip = r._currentRangeStart = i.skip),
                  (r._take = i.take),
                  r._skip === t &&
                    ((r._skip = r._currentRangeStart = r.skip()),
                    (i.skip = r.skip())),
                  r._take === t &&
                    r._pageSize !== t &&
                    ((r._take = r._pageSize), (i.take = r._take)),
                  i.sort && (r._sort = i.sort = rt(i.sort)),
                  i.filter &&
                    (r._filter = i.filter =
                      r.options.accentFoldingFiltering &&
                      !n.isEmptyObject(i.filter)
                        ? n.extend({}, b(i.filter), {
                            accentFoldingFiltering:
                              r.options.accentFoldingFiltering,
                          })
                        : b(i.filter)),
                  i.group && (r._group = i.group = ut(i.group)),
                  i.aggregate &&
                    (r._aggregate = i.aggregate = su(i.aggregate))),
                i
              );
            },
            query: function (i) {
              var r,
                f,
                e,
                o =
                  this.options.serverSorting ||
                  this.options.serverPaging ||
                  this.options.serverFiltering ||
                  this.options.serverGrouping ||
                  this.options.serverAggregates;
              return o ||
                ((this._data === t || 0 === this._data.length) &&
                  !this._destroyed.length)
                ? (this.options.endless &&
                    ((f = i.pageSize - this.pageSize()),
                    f > 0
                      ? ((f = this.pageSize()),
                        (i.page = i.pageSize / f),
                        (i.pageSize = f))
                      : ((i.page = 1), (this.options.endless = !1))),
                  this.read(this._mergeState(i)))
                : ((e = this.trigger(it, { type: "read" })),
                  e ||
                    (this.trigger(ht),
                    (r = this._queryProcess(this._data, this._mergeState(i))),
                    this._setFilterTotal(r.total, !0),
                    (this._aggregateResult = this._calculateAggregates(
                      r.dataToAggregate || this._data,
                      i
                    )),
                    this.view(r.data),
                    this.trigger(et, { type: "read" }),
                    this.trigger(u, { items: r.data })),
                  n.Deferred().resolve(e).promise());
            },
            _setFilterTotal: function (n, i) {
              var r = this;
              r.options.serverFiltering ||
                (n !== t ? (r._total = n) : i && (r._total = r._data.length));
            },
            fetch: function (n) {
              var t = this,
                i = function (i) {
                  i !== !0 && h(n) && n.call(t);
                };
              return this._query().done(i);
            },
            _query: function (n) {
              var t = this;
              return t.query(
                e(
                  {},
                  {
                    page: t.page(),
                    pageSize: t.pageSize(),
                    sort: t.sort(),
                    filter: t.filter(),
                    group: t.group(),
                    aggregate: t.aggregate(),
                  },
                  n
                )
              );
            },
            next: function (n) {
              var t = this,
                i = t.page(),
                r = t.total();
              if (((n = n || {}), i && !(r && i + 1 > t.totalPages())))
                return (
                  (t._skip = t._currentRangeStart = i * t.take()),
                  (i += 1),
                  (n.page = i),
                  t._query(n),
                  i
                );
            },
            prev: function (n) {
              var t = this,
                i = t.page();
              if (((n = n || {}), i && 1 !== i))
                return (
                  (t._skip = t._currentRangeStart = t._skip - t.take()),
                  (i -= 1),
                  (n.page = i),
                  t._query(n),
                  i
                );
            },
            page: function (n) {
              var r,
                i = this;
              return n !== t
                ? ((n = f.max(f.min(f.max(n, 1), i.totalPages()), 1)),
                  i._query(i._pageableQueryOptions({ page: n })),
                  t)
                : ((r = i.skip()),
                  r !== t ? f.round((r || 0) / (i.take() || 1)) + 1 : t);
            },
            pageSize: function (n) {
              var i = this;
              return n !== t
                ? (i._query(i._pageableQueryOptions({ pageSize: n, page: 1 })),
                  t)
                : i.take();
            },
            sort: function (n) {
              var i = this;
              return n !== t ? (i._query({ sort: n }), t) : i._sort;
            },
            filter: function (n) {
              var i = this;
              return n === t
                ? i._filter
                : (i.trigger("reset"), i._query({ filter: n, page: 1 }), t);
            },
            group: function (n) {
              var i = this;
              return n !== t ? (i._query({ group: n }), t) : i._group;
            },
            total: function () {
              return parseInt(this._total || 0, 10);
            },
            aggregate: function (n) {
              var i = this;
              return n !== t ? (i._query({ aggregate: n }), t) : i._aggregate;
            },
            aggregates: function () {
              var n = this._aggregateResult;
              return k(n) && (n = this._emptyAggregates(this.aggregate())), n;
            },
            _emptyAggregates: function (n) {
              var i,
                t,
                r = {};
              if (!k(n))
                for (i = {}, l(n) || (n = [n]), t = 0; t < n.length; t++)
                  (i[n[t].aggregate] = 0), (r[n[t].field] = i);
              return r;
            },
            _pageableQueryOptions: function (n) {
              return n;
            },
            _wrapInEmptyGroup: function (n) {
              for (
                var t, i, f = this.group(), r = f.length - 1, u = 0;
                r >= u;
                r--
              )
                (i = f[r]),
                  (t = {
                    value: n.get ? n.get(i.field) : n[i.field],
                    field: i.field,
                    items: t ? [t] : [n],
                    hasSubgroups: !!t,
                    aggregates: this._emptyAggregates(i.aggregates),
                  });
              return t;
            },
            totalPages: function () {
              var n = this,
                t = n.pageSize() || n.total();
              return f.ceil((n.total() || 0) / t);
            },
            inRange: function (n, t) {
              var i = this,
                r = f.min(n + t, i.total());
              return (
                (!i.options.serverPaging && i._data.length > 0) ||
                i._findRange(n, r).length > 0
              );
            },
            lastRange: function () {
              var n = this._ranges;
              return n[n.length - 1] || { start: 0, end: 0, data: [] };
            },
            firstItemUid: function () {
              var n = this._ranges;
              return n.length && n[0].data.length && n[0].data[0].uid;
            },
            enableRequestsInProgress: function () {
              this._skipRequestsInProgress = !1;
            },
            _timeStamp: function () {
              return new Date().getTime();
            },
            range: function (n, i, r) {
              this._currentRequestTimeStamp = this._timeStamp();
              this._skipRequestsInProgress = !0;
              n = f.min(n || 0, this.total());
              r = h(r) ? r : a;
              var s,
                u = this,
                o = f.max(f.floor(n / i), 0) * i,
                e = f.min(o + i, u.total());
              return (
                (s = u._findRange(n, f.min(n + i, u.total()))),
                s.length || 0 === u.total()
                  ? (u._processRangeData(s, n, i, o, e), r(), t)
                  : (i !== t &&
                      (u._rangeExists(o, e)
                        ? o < n &&
                          u.prefetch(e, i, function () {
                            u.range(n, i, r);
                          })
                        : u.prefetch(o, i, function () {
                            n > o &&
                            e < u.total() &&
                            !u._rangeExists(e, f.min(e + i, u.total()))
                              ? u.prefetch(e, i, function () {
                                  u.range(n, i, r);
                                })
                              : u.range(n, i, r);
                          })),
                    t)
              );
            },
            _findRange: function (n, i) {
              for (
                var r,
                  h,
                  c,
                  l,
                  y,
                  a,
                  s,
                  v,
                  f,
                  k,
                  u = this,
                  w = u._ranges,
                  b = [],
                  e = u.options,
                  d =
                    e.serverSorting ||
                    e.serverPaging ||
                    e.serverFiltering ||
                    e.serverGrouping ||
                    e.serverAggregates,
                  o = 0,
                  p = w.length;
                o < p;
                o++
              )
                if (((r = w[o]), n >= r.start && n <= r.end)) {
                  for (f = 0, h = o; h < p; h++)
                    if (
                      ((r = w[h]),
                      (v = u._flatData(r.data, !0)),
                      v.length &&
                        n + f >= r.start &&
                        ((y = r.data),
                        (a = r.end),
                        d ||
                          (e.inPlaceSort
                            ? (s = u._queryProcess(r.data, {
                                filter: u.filter(),
                              }))
                            : ((k = nr(u.group() || []).concat(
                                rt(u.sort() || [])
                              )),
                              (s = u._queryProcess(r.data, {
                                sort: k,
                                filter: u.filter(),
                              }))),
                          (v = y = s.data),
                          s.total !== t && (a = s.total)),
                        (c = 0),
                        n + f > r.start && (c = n + f - r.start),
                        (l = v.length),
                        a > i && (l -= a - i),
                        (f += l - c),
                        (b = u._mergeGroups(b, y, c, l)),
                        i <= r.end && f == i - n))
                    )
                      return b;
                  break;
                }
              return [];
            },
            _mergeGroups: function (n, t, i, r) {
              if (this._isServerGrouped()) {
                var u,
                  f = t.toJSON();
                return (
                  n.length && (u = n[n.length - 1]), ui(u, f, i, r), n.concat(f)
                );
              }
              return n.concat(t.slice(i, r));
            },
            _processRangeData: function (n, i, r, u, e) {
              var s,
                h,
                c,
                l,
                o = this;
              o._pending = t;
              o._skip =
                i > o.skip() ? f.min(e, (o.totalPages() - 1) * o.take()) : u;
              o._currentRangeStart = i;
              o._take = r;
              s = o.options.serverPaging;
              h = o.options.serverSorting;
              c = o.options.serverFiltering;
              l = o.options.serverAggregates;
              try {
                o.options.serverPaging = !0;
                o._isServerGrouped() ||
                  (o.group() && o.group().length) ||
                  (o.options.serverSorting = !0);
                o.options.serverFiltering = !0;
                o.options.serverPaging = !0;
                o.options.serverAggregates = !0;
                s &&
                  (o._detachObservableParents(), (o._data = n = o._observe(n)));
                o._process(n);
              } finally {
                o.options.serverPaging = s;
                o.options.serverSorting = h;
                o.options.serverFiltering = c;
                o.options.serverAggregates = l;
              }
            },
            skip: function () {
              var n = this;
              return n._skip === t
                ? n._page !== t
                  ? (n._page - 1) * (n.take() || 1)
                  : t
                : n._skip;
            },
            currentRangeStart: function () {
              return this._currentRangeStart || 0;
            },
            take: function () {
              return this._take || this._pageSize;
            },
            _prefetchSuccessHandler: function (n, t, i, r) {
              var f = this,
                e = f._timeStamp();
              return function (o) {
                var c,
                  l,
                  s,
                  a = !1,
                  h = { start: n, end: t, data: [], timestamp: f._timeStamp() };
                if (
                  (f._dequeueRequest(),
                  f.trigger(et, { response: o, type: "read" }),
                  (o = f.reader.parse(o)),
                  (s = f._readData(o)),
                  s.length)
                ) {
                  for (c = 0, l = f._ranges.length; c < l; c++)
                    if (f._ranges[c].start === n) {
                      a = !0;
                      h = f._ranges[c];
                      h.pristineData = s;
                      h.data = f._observe(s);
                      h.end = h.start + f._flatData(h.data, !0).length;
                      f._sortRanges();
                      break;
                    }
                  a || f._addRange(f._observe(s), n);
                }
                f._total = f.reader.total(o);
                (r ||
                  e >= f._currentRequestTimeStamp ||
                  !f._skipRequestsInProgress) &&
                  (i && s.length ? i() : f.trigger(u, {}));
              };
            },
            prefetch: function (n, t, i) {
              var r = this,
                u = f.min(n + t, r.total()),
                e = {
                  take: t,
                  skip: n,
                  page: n / t + 1,
                  pageSize: t,
                  sort: r._sort,
                  filter: r._filter,
                  group: r._group,
                  aggregate: r._aggregate,
                };
              r._rangeExists(n, u)
                ? i && i()
                : (clearTimeout(r._timeout),
                  (r._timeout = setTimeout(function () {
                    r._queueRequest(e, function () {
                      r.trigger(it, { type: "read" })
                        ? r._dequeueRequest()
                        : r.transport.read({
                            data: r._params(e),
                            success: r._prefetchSuccessHandler(n, u, i),
                            error: function () {
                              var n = at.call(arguments);
                              r.error.apply(r, n);
                            },
                          });
                    });
                  }, 100)));
            },
            _multiplePrefetch: function (n, t, i) {
              var r = this,
                u = f.min(n + t, r.total()),
                e = {
                  take: t,
                  skip: n,
                  page: n / t + 1,
                  pageSize: t,
                  sort: r._sort,
                  filter: r._filter,
                  group: r._group,
                  aggregate: r._aggregate,
                };
              r._rangeExists(n, u)
                ? i && i()
                : r.trigger(it, { type: "read" }) ||
                  r.transport.read({
                    data: r._params(e),
                    success: r._prefetchSuccessHandler(n, u, i, !0),
                  });
            },
            _rangeExists: function (n, t) {
              for (var f = this, r = f._ranges, i = 0, u = r.length; i < u; i++)
                if (r[i].start <= n && r[i].end >= t) return !0;
              return !1;
            },
            _getCurrentRangeSpan: function () {
              for (
                var n,
                  r = this,
                  u = r._ranges,
                  i = r.currentRangeStart(),
                  e = i + (r.take() || 0),
                  f = [],
                  o = u.length,
                  t = 0;
                t < o;
                t++
              )
                (n = u[t]),
                  ((n.start <= i && n.end >= i) ||
                    (n.start >= i && n.start <= e)) &&
                    f.push(n);
              return f;
            },
            _removeModelFromRanges: function (n) {
              for (var i, u = this, t = 0, r = this._ranges.length; t < r; t++)
                (i = this._ranges[t]), u._removeModelFromRange(i, n);
              u._updateRangesLength();
            },
            _removeModelFromRange: function (n, t) {
              this._eachItem(n.data, function (n) {
                for (var r, i = 0; i < n.length; i++)
                  if (((r = n[i]), r.uid && r.uid == t.uid)) {
                    [].splice.call(n, i, 1);
                    break;
                  }
              });
            },
            _insertModelInRange: function (n, t) {
              for (
                var i, r = this, f = r._ranges || [], e = f.length, u = 0;
                u < e;
                u++
              )
                if (((i = f[u]), i.start <= n && i.end >= n)) {
                  r._getByUid(t.uid, i.data) ||
                    (r._isServerGrouped()
                      ? i.data.splice(n, 0, r._wrapInEmptyGroup(t))
                      : i.data.splice(n, 0, t));
                  break;
                }
              r._updateRangesLength();
            },
            _updateRangesLength: function () {
              for (
                var n,
                  e = this,
                  o = e._ranges || [],
                  s = o.length,
                  r = !1,
                  i = 0,
                  u = 0,
                  t = 0;
                t < s;
                t++
              )
                (n = o[t]),
                  (u = e._flatData(n.data, !0).length - f.abs(n.end - n.start)),
                  r || 0 === u
                    ? r && ((n.start += i), (n.end += i))
                    : ((r = !0), (i = u), (n.end += i));
            },
          });
          li = {};
          li.create = function (t, r, u) {
            var o,
              f = t.transport ? n.extend({}, t.transport) : null;
            return (
              f
                ? ((f.read = typeof f.read === s ? { url: f.read } : f.read),
                  "jsdo" === t.type && (f.dataSource = u),
                  t.type &&
                    ((i.data.transports = i.data.transports || {}),
                    (i.data.schemas = i.data.schemas || {}),
                    i.data.transports[t.type]
                      ? g(i.data.transports[t.type])
                        ? (f = e(!0, {}, i.data.transports[t.type], f))
                        : (o = new i.data.transports[t.type](e(f, { data: r })))
                      : i.logToConsole(
                          "Unknown DataSource transport type '" +
                            t.type +
                            "'.\nVerify that registration scripts for this type are included after Kendo UI on the page.",
                          "warn"
                        ),
                    (t.schema = e(!0, {}, i.data.schemas[t.type], t.schema))),
                  o || (o = h(f.read) ? f : new hi(f)))
                : (o = new si({ data: t.data || [] })),
              o
            );
          };
          c.create = function (n) {
            (l(n) || n instanceof v) && (n = { data: n });
            var o,
              p,
              s,
              r = n || {},
              u = r.data,
              f = r.fields,
              h = r.table,
              a = r.select,
              y = {};
            if (
              (u ||
                !f ||
                r.transport ||
                (h
                  ? (u = wu(h, f))
                  : a &&
                    ((u = pu(a, f)),
                    r.group === t &&
                      u[0] &&
                      u[0].optgroup !== t &&
                      (r.group = "optgroup"))),
              i.data.Model && f && (!r.schema || !r.schema.model))
            ) {
              for (o = 0, p = f.length; o < p; o++)
                (s = f[o]), s.type && (y[s.field] = s);
              k(y) || (r.schema = e(!0, r.schema, { model: { fields: y } }));
            }
            return (
              (r.data = u),
              (a = null),
              (r.select = null),
              (h = null),
              (r.table = null),
              r instanceof c ? r : new c(r)
            );
          };
          ai = p.define({
            idField: "id",
            init: function (n) {
              var f,
                t = this,
                r = t.hasChildren || (n && n.hasChildren),
                o = "items",
                u = {};
              i.data.Model.fn.init.call(t, n);
              typeof t.children === s && (o = t.children);
              u = {
                schema: {
                  data: o,
                  model: { hasChildren: r, id: t.idField, fields: t.fields },
                },
              };
              typeof t.children !== s && e(u, t.children);
              u.data = n;
              r || (r = u.schema.data);
              typeof r === s && (r = i.getter(r));
              h(r) &&
                ((f = r.call(t, t)),
                (t.hasChildren = (!f || 0 !== f.length) && !!f));
              t._childrenOptions = u;
              t.hasChildren && t._initChildren();
              t._loaded = !(!n || !n._loaded);
            },
            _initChildren: function () {
              var t,
                i,
                r,
                n = this;
              n.children instanceof d ||
                ((t = n.children = new d(n._childrenOptions)),
                (i = t.transport),
                (r = i.parameterMap),
                (i.parameterMap = function (t, i) {
                  return (t[n.idField || "id"] = n.id), r && (t = r(t, i)), t;
                }),
                (t.parent = function () {
                  return n;
                }),
                t.bind(u, function (t) {
                  t.node = t.node || n;
                  n.trigger(u, t);
                }),
                t.bind(tt, function (t) {
                  var i = n.parent();
                  i && ((t.node = t.node || n), i.trigger(tt, t));
                }),
                n._updateChildrenField());
            },
            append: function (n) {
              this._initChildren();
              this.loaded(!0);
              this.children.add(n);
            },
            hasChildren: !1,
            level: function () {
              for (var n = this.parentNode(), t = 0; n && n.parentNode; )
                t++, (n = n.parentNode ? n.parentNode() : null);
              return t;
            },
            _updateChildrenField: function () {
              var n = this._childrenOptions.schema.data;
              this[n || "items"] = this.children.data();
            },
            _childrenLoaded: function () {
              this._loaded = !0;
              this._updateChildrenField();
            },
            load: function () {
              var i,
                f,
                r = {},
                e = "_query";
              return (
                this.hasChildren
                  ? (this._initChildren(),
                    (i = this.children),
                    (r[this.idField || "id"] = this.id),
                    this._loaded || ((i._data = t), (e = "read")),
                    i.one(u, w(this._childrenLoaded, this)),
                    this._matchFilter &&
                      (r.filter = {
                        field: "_matchFilter",
                        operator: "eq",
                        value: !0,
                      }),
                    (f = i[e](r)))
                  : this.loaded(!0),
                f || n.Deferred().resolve().promise()
              );
            },
            parentNode: function () {
              var n = this.parent();
              return n.parent();
            },
            loaded: function (n) {
              return n === t ? this._loaded : ((this._loaded = n), t);
            },
            shouldSerialize: function (n) {
              return (
                p.fn.shouldSerialize.call(this, n) &&
                "children" !== n &&
                "_loaded" !== n &&
                "hasChildren" !== n &&
                "_childrenOptions" !== n
              );
            },
          });
          d = c.extend({
            init: function (n) {
              var t = ai.define({ children: n });
              n.filter &&
                !n.serverFiltering &&
                ((this._hierarchicalFilter = n.filter), (n.filter = null));
              c.fn.init.call(
                this,
                e(!0, {}, { schema: { modelBase: t, model: t } }, n)
              );
              this._attachBubbleHandlers();
            },
            _attachBubbleHandlers: function () {
              var n = this;
              n._data.bind(tt, function (t) {
                n.trigger(tt, t);
              });
            },
            read: function (n) {
              var t = c.fn.read.call(this, n);
              return (
                this._hierarchicalFilter &&
                  (this._data && this._data.length > 0
                    ? this.filter(this._hierarchicalFilter)
                    : ((this.options.filter = this._hierarchicalFilter),
                      (this._filter = b(this.options.filter)),
                      (this._hierarchicalFilter = null))),
                t
              );
            },
            remove: function (n) {
              var r,
                t = n.parentNode(),
                i = this;
              return (
                t && t._initChildren && (i = t.children),
                (r = c.fn.remove.call(i, n)),
                t && !i.data().length && (t.hasChildren = !1),
                r
              );
            },
            success: yr("success"),
            data: yr("data"),
            insert: function (n, t) {
              var i = this.parent();
              return (
                i &&
                  i._initChildren &&
                  ((i.hasChildren = !0), i._initChildren()),
                c.fn.insert.call(this, n, t)
              );
            },
            filter: function (n) {
              return n === t
                ? this._filter
                : (!this.options.serverFiltering &&
                    this._markHierarchicalQuery(n) &&
                    (n = {
                      logic: "or",
                      filters: [
                        n,
                        {
                          field: "_matchFilter",
                          operator: "equals",
                          value: !0,
                        },
                      ],
                    }),
                  this.trigger("reset"),
                  this._query({ filter: n, page: 1 }),
                  t);
            },
            _markHierarchicalQuery: function (t) {
              var i,
                o,
                u,
                f,
                e,
                s = this.options.accentFoldingFiltering;
              return (
                (t = s
                  ? n.extend({}, b(t), { accentFoldingFiltering: s })
                  : b(t)),
                t && 0 !== t.filters.length
                  ? ((i = r.filterExpr(t)),
                    (u = i.fields),
                    (f = i.operators),
                    (o = e = Function("d, __f, __o", "return " + i.expression)),
                    (u.length || f.length) &&
                      (e = function (n) {
                        return o(n, u, f);
                      }),
                    this._updateHierarchicalFilter(e),
                    !0)
                  : (this._updateHierarchicalFilter(function () {
                      return !0;
                    }),
                    !1)
              );
            },
            _updateHierarchicalFilter: function (n) {
              for (var t, r = this._data, u = !1, i = 0; i < r.length; i++)
                (t = r[i]),
                  t.hasChildren
                    ? ((t._matchFilter =
                        t.children._updateHierarchicalFilter(n)),
                      t._matchFilter || (t._matchFilter = n(t)))
                    : (t._matchFilter = n(t)),
                  t._matchFilter && (u = !0);
              return u;
            },
            _find: function (n, t) {
              var i,
                e,
                r,
                f,
                u = this._data;
              if (u) {
                if ((r = c.fn[n].call(this, t))) return r;
                for (
                  u = this._flatData(this._data), i = 0, e = u.length;
                  i < e;
                  i++
                )
                  if (((f = u[i].children), f instanceof d && (r = f[n](t))))
                    return r;
              }
            },
            get: function (n) {
              return this._find("get", n);
            },
            getByUid: function (n) {
              return this._find("getByUid", n);
            },
          });
          d.create = function (n) {
            n = n && n.push ? { data: n } : n;
            var t = n || {},
              i = t.data,
              r = t.fields,
              u = t.list;
            return i && i._dataSource
              ? i._dataSource
              : (i || !r || t.transport || (u && (i = pr(u, r))),
                (t.data = i),
                t instanceof d ? t : new d(t));
          };
          vi = i.Observable.extend({
            init: function (n, t, r) {
              i.Observable.fn.init.call(this);
              this._prefetching = !1;
              this.dataSource = n;
              this.prefetch = !r;
              var u = this;
              n.bind("change", function () {
                u._change();
              });
              n.bind("reset", function () {
                u._reset();
              });
              this._syncWithDataSource();
              this.setViewSize(t);
            },
            setViewSize: function (n) {
              this.viewSize = n;
              this._recalculate();
            },
            at: function (n) {
              var i = this.pageSize,
                r = !0;
              return n >= this.total()
                ? (this.trigger("endreached", { index: n }), null)
                : this.useRanges
                ? this.useRanges
                  ? ((n < this.dataOffset || n >= this.skip + i) &&
                      (r = this.range(Math.floor(n / i) * i)),
                    n === this.prefetchThreshold && this._prefetch(),
                    n === this.midPageThreshold
                      ? this.range(this.nextMidRange, !0)
                      : n === this.nextPageThreshold
                      ? this.range(this.nextFullRange)
                      : n === this.pullBackThreshold &&
                        this.range(
                          this.offset === this.skip
                            ? this.previousMidRange
                            : this.previousFullRange
                        ),
                    r
                      ? this.dataSource.at(n - this.dataOffset)
                      : (this.trigger("endreached", { index: n }), null))
                  : t
                : this.dataSource.view()[n];
            },
            indexOf: function (n) {
              return this.dataSource.data().indexOf(n) + this.dataOffset;
            },
            total: function () {
              return parseInt(this.dataSource.total(), 10);
            },
            next: function () {
              var n = this,
                t = n.pageSize,
                i = n.skip - n.viewSize + t,
                r = f.max(f.floor(i / t), 0) * t;
              this.offset = i;
              this.dataSource.prefetch(r, t, function () {
                n._goToRange(i, !0);
              });
            },
            range: function (n, t) {
              if (this.offset === n) return !0;
              var r = this,
                i = this.pageSize,
                u = f.max(f.floor(n / i), 0) * i,
                e = this.dataSource;
              return (
                t && (u += i),
                e.inRange(n, i)
                  ? ((this.offset = n),
                    this._recalculate(),
                    this._goToRange(n),
                    !0)
                  : !this.prefetch ||
                    (e.prefetch(u, i, function () {
                      r.offset = n;
                      r._recalculate();
                      r._goToRange(n, !0);
                    }),
                    !1)
              );
            },
            syncDataSource: function () {
              var n = this.offset;
              this.offset = null;
              this.range(n);
            },
            destroy: function () {
              this.unbind();
            },
            _prefetch: function () {
              var i = this,
                n = this.pageSize,
                t = this.skip + n,
                r = this.dataSource;
              r.inRange(t, n) ||
                this._prefetching ||
                !this.prefetch ||
                ((this._prefetching = !0),
                this.trigger("prefetching", { skip: t, take: n }),
                r.prefetch(t, n, function () {
                  i._prefetching = !1;
                  i.trigger("prefetched", { skip: t, take: n });
                }));
            },
            _goToRange: function (n, t) {
              this.offset === n &&
                ((this.dataOffset = n),
                (this._expanding = t),
                this.dataSource.range(n, this.pageSize),
                this.dataSource.enableRequestsInProgress());
            },
            _reset: function () {
              this._syncPending = !0;
            },
            _change: function () {
              var n = this.dataSource;
              this.length = this.useRanges
                ? n.lastRange().end
                : n.view().length;
              this._syncPending &&
                (this._syncWithDataSource(),
                this._recalculate(),
                (this._syncPending = !1),
                this.trigger("reset", { offset: this.offset }));
              this.trigger("resize");
              this._expanding && this.trigger("expand");
              delete this._expanding;
            },
            _syncWithDataSource: function () {
              var n = this.dataSource;
              this._firstItemUid = n.firstItemUid();
              this.dataOffset = this.offset = n.skip() || 0;
              this.pageSize = n.pageSize();
              this.useRanges = n.options.serverPaging;
            },
            _recalculate: function () {
              var t = this.pageSize,
                r = this.offset,
                i = this.viewSize,
                n = Math.ceil(r / t) * t;
              this.skip = n;
              this.midPageThreshold = n + t - 1;
              this.nextPageThreshold = n + i - 1;
              this.prefetchThreshold = n + Math.floor((t / 3) * 2);
              this.pullBackThreshold = this.offset - 1;
              this.nextMidRange = n + t - i;
              this.nextFullRange = n;
              this.previousMidRange = r - i;
              this.previousFullRange = n - t;
            },
          });
          gr = i.Observable.extend({
            init: function (n, t) {
              var r = this;
              i.Observable.fn.init.call(r);
              this.dataSource = n;
              this.batchSize = t;
              this._total = 0;
              this.buffer = new vi(n, 3 * t);
              this.buffer.bind({
                endreached: function (n) {
                  r.trigger("endreached", { index: n.index });
                },
                prefetching: function (n) {
                  r.trigger("prefetching", { skip: n.skip, take: n.take });
                },
                prefetched: function (n) {
                  r.trigger("prefetched", { skip: n.skip, take: n.take });
                },
                reset: function () {
                  r._total = 0;
                  r.trigger("reset");
                },
                resize: function () {
                  r._total = Math.ceil(this.length / r.batchSize);
                  r.trigger("resize", {
                    total: r.total(),
                    offset: this.offset,
                  });
                },
              });
            },
            syncDataSource: function () {
              this.buffer.syncDataSource();
            },
            at: function (n) {
              var r,
                t,
                i = this.buffer,
                u = n * this.batchSize,
                e = this.batchSize,
                f = [];
              for (
                i.offset > u && i.at(i.offset - 1), t = 0;
                t < e && ((r = i.at(u + t)), null !== r);
                t++
              )
                f.push(r);
              return f;
            },
            total: function () {
              return this._total;
            },
            destroy: function () {
              this.buffer.destroy();
              this.unbind();
            },
          });
          e(!0, i.data, {
            readers: { json: ci },
            Query: r,
            DataSource: c,
            HierarchicalDataSource: d,
            Node: ai,
            ObservableObject: o,
            ObservableArray: v,
            LazyObservableArray: ot,
            LocalTransport: si,
            RemoteTransport: hi,
            Cache: ft,
            DataReader: ci,
            Model: p,
            Buffer: vi,
            BatchBuffer: gr,
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.binder.min", ["kendo.core.min", "kendo.data.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function w(t, u, f) {
            return r.extend({
              init: function (n, t, i) {
                var u = this;
                r.fn.init.call(u, n.element[0], t, i);
                u.widget = n;
                u._dataBinding = c(u.dataBinding, u);
                u._dataBound = c(u.dataBound, u);
                u._itemChange = c(u.itemChange, u);
              },
              itemChange: function (n) {
                l(
                  n.item[0],
                  n.data,
                  this._ns(n.ns),
                  [n.data].concat(this.bindings[t]._parents())
                );
              },
              dataBinding: function (n) {
                for (
                  var u = this.widget,
                    r = n.removedItems || u.items(),
                    t = 0,
                    i = r.length;
                  t < i;
                  t++
                )
                  b(r[t], !1);
              },
              _ns: function (t) {
                t = t || i.ui;
                var r = [i.ui, i.dataviz.ui, i.mobile.ui];
                return (
                  r.splice(n.inArray(t, r), 1),
                  r.unshift(t),
                  i.rolesFromNamespaces(r)
                );
              },
              dataBound: function (n) {
                var r,
                  o,
                  f,
                  s,
                  h = this.widget,
                  e = n.addedItems || h.items(),
                  c = h[u],
                  a = i.data.HierarchicalDataSource;
                if (!(a && c instanceof a) && e.length)
                  for (
                    f = n.addedDataItems || c.flatView(),
                      s = this.bindings[t]._parents(),
                      r = 0,
                      o = f.length;
                    r < o;
                    r++
                  )
                    e[r] && l(e[r], f[r], this._ns(n.ns), [f[r]].concat(s));
              },
              refresh: function (n) {
                var e,
                  s,
                  h,
                  c,
                  o = this,
                  r = o.widget;
                n = n || {};
                n.action ||
                  (o.destroy(),
                  r.bind("dataBinding", o._dataBinding),
                  r.bind("dataBound", o._dataBound),
                  r.bind("itemChange", o._itemChange),
                  (e = o.bindings[t].get()),
                  r[u] instanceof i.data.DataSource &&
                    r[u] != e &&
                    (e instanceof i.data.DataSource
                      ? r[f](e)
                      : e && e._dataSource
                      ? r[f](e._dataSource)
                      : ((s = i.ui.Select && r instanceof i.ui.Select),
                        (h = i.ui.MultiSelect && r instanceof i.ui.MultiSelect),
                        (c =
                          i.ui.DropDownTree && r instanceof i.ui.DropDownTree),
                        c ? r.treeview[u].data(e) : r[u].data(e),
                        o.bindings.value &&
                          (s || h) &&
                          r.value(
                            ut(o.bindings.value.get(), r.options.dataValueField)
                          ))));
              },
              destroy: function () {
                var n = this.widget;
                n.unbind("dataBinding", this._dataBinding);
                n.unbind("dataBound", this._dataBound);
                n.unbind("itemChange", this._itemChange);
              },
            });
          }
          function pt(n, t) {
            var r = i.initWidget(n, {}, t);
            if (r) return new d(r);
          }
          function nt(n) {
            var i,
              e,
              r,
              u,
              o,
              t,
              f,
              s = {};
            for (f = n.match(ot), i = 0, e = f.length; i < e; i++)
              (r = f[i]),
                (u = r.indexOf(":")),
                (o = r.substring(0, u)),
                (t = r.substring(u + 1)),
                "{" == t.charAt(0) && (t = nt(t)),
                (s[o] = t);
            return s;
          }
          function y(n, t, i) {
            var r,
              u = {};
            for (r in n) u[r] = new i(t, n[r]);
            return u;
          }
          function l(n, t, r, f) {
            var w, s, e, v, b, o, a, c, p;
            if (
              n &&
              !n.getAttribute("data-" + i.ns + "stop") &&
              ((w = n.getAttribute("data-" + i.ns + "role")),
              (e = n.getAttribute("data-" + i.ns + "bind")),
              (v = []),
              (b = !0),
              (a = {}),
              (f = f || [t]),
              (w || e) && it(n, !1),
              w && (c = pt(n, r)),
              e &&
                ((e = nt(e.replace(st, ""))),
                c ||
                  ((a = i.parseOptions(
                    n,
                    {
                      textField: "",
                      valueField: "",
                      template: "",
                      valueUpdate: u,
                      valuePrimitive: !1,
                      autoBind: !0,
                    },
                    t
                  )),
                  (a.roles = r),
                  (c = new k(n, a))),
                (c.source = t),
                (o = y(e, f, h)),
                a.template && (o.template = new et(f, "", a.template)),
                o.click &&
                  ((e.events = e.events || {}),
                  (e.events.click = e.click),
                  o.click.destroy(),
                  delete o.click),
                o.source && (b = !1),
                e.attr && (o.attr = y(e.attr, f, h)),
                e.style && (o.style = y(e.style, f, h)),
                e.events && (o.events = y(e.events, f, ft)),
                e.css && (o.css = y(e.css, f, h)),
                c.bind(o)),
              c && (n.kendoBindingTarget = c),
              (p = n.children),
              b && p)
            ) {
              for (s = 0; s < p.length; s++) v[s] = p[s];
              for (s = 0; s < v.length; s++) l(v[s], t, r, f);
            }
          }
          function tt(t, r) {
            var u,
              e,
              f,
              o = i.rolesFromNamespaces([].slice.call(arguments, 2));
            for (r = i.observable(r), t = n(t), u = 0, e = t.length; u < e; u++)
              (f = t[u]), 1 === f.nodeType && l(f, r, o);
          }
          function it(t, r) {
            var u,
              f = t.kendoBindingTarget;
            f &&
              (f.destroy(),
              yt
                ? delete t.kendoBindingTarget
                : t.removeAttribute
                ? t.removeAttribute("kendoBindingTarget")
                : (t.kendoBindingTarget = null));
            r &&
              ((u = i.widgetInstance(n(t))),
              u && typeof u.destroy === kt && u.destroy());
          }
          function b(n, t) {
            it(n, t);
            rt(n, t);
          }
          function rt(n, t) {
            var i,
              u,
              r = n.children;
            if (r) for (i = 0, u = r.length; i < u; i++) b(r[i], t);
          }
          function wt(t) {
            var i, r;
            for (t = n(t), i = 0, r = t.length; i < r; i++) b(t[i], !1);
          }
          function bt(n, t) {
            var i = n.element,
              r = i[0].kendoBindingTarget;
            r && tt(i, r.source, t);
          }
          function ut(n, t) {
            var u,
              i,
              f = [],
              r = 0;
            if (!t) return n;
            if (n instanceof e) {
              for (u = n.length; r < u; r++)
                (i = n[r]), (f[r] = i.get ? i.get(t) : i[t]);
              n = f;
            } else n instanceof o && (n = n.get(t));
            return n;
          }
          var h,
            ft,
            et,
            r,
            v,
            p,
            k,
            d,
            ot,
            st,
            i = window.kendo,
            g = i.Observable,
            o = i.data.ObservableObject,
            e = i.data.ObservableArray,
            ht = {}.toString,
            f = {},
            ct = i.Class,
            c = n.proxy,
            s = "value",
            lt = "source",
            at = "events",
            a = "checked",
            vt = "css",
            yt = !0,
            kt = "function",
            u = "change";
          !(function () {
            var n = document.createElement("a");
            try {
              delete n.test;
            } catch (t) {
              yt = !1;
            }
          })();
          h = g.extend({
            init: function (n, t) {
              var i = this;
              g.fn.init.call(i);
              i.source = n[0];
              i.parents = n;
              i.path = t;
              i.dependencies = {};
              i.dependencies[t] = !0;
              i.observable = i.source instanceof g;
              i._access = function (n) {
                i.dependencies[n.field] = !0;
              };
              i.observable &&
                ((i._change = function (n) {
                  i.change(n);
                }),
                i.source.bind(u, i._change));
            },
            _parents: function () {
              var i,
                t = this.parents,
                r = this.get();
              return (
                r &&
                  "function" == typeof r.parent &&
                  ((i = r.parent()),
                  n.inArray(i, t) < 0 && (t = [i].concat(t))),
                t
              );
            },
            change: function (n) {
              var r,
                t,
                f = n.field,
                i = this;
              if ("this" === i.path) i.trigger(u, n);
              else
                for (r in i.dependencies)
                  if (
                    0 === r.indexOf(f) &&
                    ((t = r.charAt(f.length)), !t || "." === t || "[" === t)
                  ) {
                    i.trigger(u, n);
                    break;
                  }
            },
            start: function (n) {
              n.bind("get", this._access);
            },
            stop: function (n) {
              n.unbind("get", this._access);
            },
            get: function () {
              var i = this,
                n = i.source,
                e = 0,
                f = i.path,
                r = n;
              if (!i.observable) return r;
              for (i.start(i.source), r = n.get(f); r === t && n; )
                (n = i.parents[++e]), n instanceof o && (r = n.get(f));
              if (r === t)
                for (n = i.source; r === t && n; )
                  (n = n.parent()), n instanceof o && (r = n.get(f));
              return (
                "function" == typeof r &&
                  ((e = f.lastIndexOf(".")),
                  e > 0 && (n = n.get(f.substring(0, e))),
                  i.start(n),
                  (r = n !== i.source ? r.call(n, i.source) : r.call(n)),
                  i.stop(n)),
                n &&
                  n !== i.source &&
                  ((i.currentSource = n),
                  n.unbind(u, i._change).bind(u, i._change)),
                i.stop(i.source),
                r
              );
            },
            set: function (n) {
              var t = this.currentSource || this.source,
                r = i.getter(this.path)(t);
              "function" == typeof r
                ? t !== this.source
                  ? r.call(t, this.source, n)
                  : r.call(t, n)
                : t.set(this.path, n);
            },
            destroy: function () {
              this.observable &&
                (this.source.unbind(u, this._change),
                this.currentSource &&
                  this.currentSource.unbind(u, this._change));
              this.unbind();
            },
          });
          ft = h.extend({
            get: function () {
              for (
                var n = this.source, i = this.path, r = 0, t = n.get(i);
                !t && n;

              )
                (n = this.parents[++r]), n instanceof o && (t = n.get(i));
              return c(t, n);
            },
          });
          et = h.extend({
            init: function (n, t, i) {
              var r = this;
              h.fn.init.call(r, n, t);
              r.template = i;
            },
            render: function (n) {
              var t;
              return (
                this.start(this.source),
                (t = i.render(this.template, n)),
                this.stop(this.source),
                t
              );
            },
          });
          r = ct.extend({
            init: function (n, t, i) {
              this.element = n;
              this.bindings = t;
              this.options = i;
            },
            bind: function (n, t) {
              var i = this;
              n = t ? n[t] : n;
              n.bind(u, function (n) {
                i.refresh(t || n);
              });
              i.refresh(t);
            },
            destroy: function () {},
          });
          v = r.extend({
            dataType: function () {
              var n =
                this.element.getAttribute("data-type") ||
                this.element.type ||
                "text";
              return n.toLowerCase();
            },
            parsedValue: function () {
              return this._parseValue(this.element.value, this.dataType());
            },
            _parseValue: function (n, t) {
              return (
                "date" == t
                  ? (n = i.parseDate(n, "yyyy-MM-dd"))
                  : "datetime-local" == t
                  ? (n = i.parseDate(n, [
                      "yyyy-MM-ddTHH:mm:ss",
                      "yyyy-MM-ddTHH:mm",
                    ]))
                  : "number" == t
                  ? (n = i.parseFloat(n))
                  : "boolean" == t &&
                    ((n = n.toLowerCase()),
                    (n =
                      null !== i.parseFloat(n)
                        ? !!i.parseFloat(n)
                        : "true" === n.toLowerCase())),
                n
              );
            },
          });
          f.attr = r.extend({
            refresh: function (n) {
              this.element.setAttribute(n, this.bindings.attr[n].get());
            },
          });
          f.css = r.extend({
            init: function (n, t, i) {
              r.fn.init.call(this, n, t, i);
              this.classes = {};
            },
            refresh: function (t) {
              var i = n(this.element),
                r = this.bindings.css[t],
                u = (this.classes[t] = r.get());
              u ? i.addClass(t) : i.removeClass(t);
            },
          });
          f.style = r.extend({
            refresh: function (n) {
              this.element.style[n] = this.bindings.style[n].get() || "";
            },
          });
          f.enabled = r.extend({
            refresh: function () {
              this.bindings.enabled.get()
                ? this.element.removeAttribute("disabled")
                : this.element.setAttribute("disabled", "disabled");
            },
          });
          f.readonly = r.extend({
            refresh: function () {
              this.bindings.readonly.get()
                ? this.element.setAttribute("readonly", "readonly")
                : this.element.removeAttribute("readonly");
            },
          });
          f.disabled = r.extend({
            refresh: function () {
              this.bindings.disabled.get()
                ? this.element.setAttribute("disabled", "disabled")
                : this.element.removeAttribute("disabled");
            },
          });
          f.events = r.extend({
            init: function (n, t, i) {
              r.fn.init.call(this, n, t, i);
              this.handlers = {};
            },
            refresh: function (t) {
              var r = n(this.element),
                u = this.bindings.events[t],
                i = this.handlers[t];
              i && r.off(t, i);
              i = this.handlers[t] = u.get();
              r.on(t, u.source, i);
            },
            destroy: function () {
              var t,
                i = n(this.element);
              for (t in this.handlers) i.off(t, this.handlers[t]);
            },
          });
          f.text = r.extend({
            refresh: function () {
              var t = this.bindings.text.get(),
                r = this.element.getAttribute("data-format") || "";
              null == t && (t = "");
              n(this.element).text(i.toString(t, r));
            },
          });
          f.visible = r.extend({
            refresh: function () {
              this.element.style.display = this.bindings.visible.get()
                ? ""
                : "none";
            },
          });
          f.invisible = r.extend({
            refresh: function () {
              this.element.style.display = this.bindings.invisible.get()
                ? "none"
                : "";
            },
          });
          f.html = r.extend({
            refresh: function () {
              this.element.innerHTML = this.bindings.html.get();
            },
          });
          f.value = v.extend({
            init: function (t, i, r) {
              v.fn.init.call(this, t, i, r);
              this._change = c(this.change, this);
              this.eventName = r.valueUpdate || u;
              n(this.element).on(this.eventName, this._change);
              this._initChange = !1;
            },
            change: function () {
              this._initChange = this.eventName != u;
              this.bindings[s].set(this.parsedValue());
              this._initChange = !1;
            },
            refresh: function () {
              var n, t;
              this._initChange ||
                ((n = this.bindings[s].get()),
                null == n && (n = ""),
                (t = this.dataType()),
                "date" == t
                  ? (n = i.toString(n, "yyyy-MM-dd"))
                  : "datetime-local" == t &&
                    (n = i.toString(n, "yyyy-MM-ddTHH:mm:ss")),
                (this.element.value = n));
              this._initChange = !1;
            },
            destroy: function () {
              n(this.element).off(this.eventName, this._change);
            },
          });
          f.source = r.extend({
            init: function (n, t, u) {
              r.fn.init.call(this, n, t, u);
              var f = this.bindings.source.get();
              f instanceof i.data.DataSource && u.autoBind !== !1 && f.fetch();
            },
            refresh: function (n) {
              var t = this,
                r = t.bindings.source.get();
              r instanceof e || r instanceof i.data.DataSource
                ? ((n = n || {}),
                  "add" == n.action
                    ? t.add(n.index, n.items)
                    : "remove" == n.action
                    ? t.remove(n.index, n.items)
                    : "itemchange" != n.action && t.render())
                : t.render();
            },
            container: function () {
              var n = this.element;
              return (
                "table" == n.nodeName.toLowerCase() &&
                  (n.tBodies[0] ||
                    n.appendChild(document.createElement("tbody")),
                  (n = n.tBodies[0])),
                n
              );
            },
            template: function () {
              var n = this.options,
                t = n.template,
                r = this.container().nodeName.toLowerCase();
              return (
                t ||
                  ((t =
                    "select" == r
                      ? n.valueField || n.textField
                        ? i.format(
                            '<option value="#:{0}#">#:{1}#</option>',
                            n.valueField || n.textField,
                            n.textField || n.valueField
                          )
                        : "<option>#:data#</option>"
                      : "tbody" == r
                      ? "<tr><td>#:data#</td></tr>"
                      : "ul" == r || "ol" == r
                      ? "<li>#:data#</li>"
                      : "#:data#"),
                  (t = i.template(t))),
                t
              );
            },
            add: function (t, r) {
              var s,
                u,
                h,
                f,
                e = this.container(),
                o = e.cloneNode(!1),
                c = e.children[t];
              if ((n(o).html(i.render(this.template(), r)), o.children.length))
                for (
                  s = this.bindings.source._parents(), u = 0, h = r.length;
                  u < h;
                  u++
                )
                  (f = o.children[0]),
                    e.insertBefore(f, c || null),
                    l(f, r[u], this.options.roles, [r[u]].concat(s));
            },
            remove: function (n, t) {
              for (var i, u = this.container(), r = 0; r < t.length; r++)
                (i = u.children[n]),
                  b(i, !0),
                  i.parentNode == u && u.removeChild(i);
            },
            render: function () {
              var f,
                r,
                o,
                t = this.bindings.source.get(),
                u = this.container(),
                s = this.template();
              if (null != t)
                if (
                  (t instanceof i.data.DataSource && (t = t.view()),
                  t instanceof e ||
                    "[object Array]" === ht.call(t) ||
                    (t = [t]),
                  this.bindings.template)
                ) {
                  if (
                    (rt(u, !0),
                    n(u).html(this.bindings.template.render(t)),
                    u.children.length)
                  )
                    for (
                      f = this.bindings.source._parents(), r = 0, o = t.length;
                      r < o;
                      r++
                    )
                      l(
                        u.children[r],
                        t[r],
                        this.options.roles,
                        [t[r]].concat(f)
                      );
                } else n(u).html(i.render(s, t));
            },
          });
          f.input = {
            checked: v.extend({
              init: function (t, i, r) {
                v.fn.init.call(this, t, i, r);
                this._change = c(this.change, this);
                n(this.element).change(this._change);
              },
              change: function () {
                var n,
                  r,
                  i,
                  u = this.element,
                  t = this.value();
                if ("radio" == u.type)
                  (t = this.parsedValue()), this.bindings[a].set(t);
                else if ("checkbox" == u.type)
                  if (((n = this.bindings[a].get()), n instanceof e)) {
                    if (((t = this.parsedValue()), t instanceof Date)) {
                      for (i = 0; i < n.length; i++)
                        if (n[i] instanceof Date && +n[i] == +t) {
                          r = i;
                          break;
                        }
                    } else r = n.indexOf(t);
                    r > -1 ? n.splice(r, 1) : n.push(t);
                  } else this.bindings[a].set(t);
              },
              refresh: function () {
                var o,
                  r,
                  n = this.bindings[a].get(),
                  u = n,
                  s = this.dataType(),
                  f = this.element;
                if ("checkbox" == f.type)
                  if (u instanceof e) {
                    if (
                      ((o = -1), (n = this.parsedValue()), n instanceof Date)
                    ) {
                      for (r = 0; r < u.length; r++)
                        if (u[r] instanceof Date && +u[r] == +n) {
                          o = r;
                          break;
                        }
                    } else o = u.indexOf(n);
                    f.checked = o >= 0;
                  } else f.checked = u;
                else
                  "radio" == f.type &&
                    ("date" == s
                      ? (n = i.toString(n, "yyyy-MM-dd"))
                      : "datetime-local" == s &&
                        (n = i.toString(n, "yyyy-MM-ddTHH:mm:ss")),
                    (f.checked = null !== n && t !== n && f.value === "" + n));
              },
              value: function () {
                var n = this.element,
                  t = n.value;
                return "checkbox" == n.type && (t = n.checked), t;
              },
              destroy: function () {
                n(this.element).off(u, this._change);
              },
            }),
          };
          f.select = {
            source: f.source.extend({
              refresh: function (r) {
                var f,
                  u = this,
                  o = u.bindings.source.get();
                o instanceof e || o instanceof i.data.DataSource
                  ? ((r = r || {}),
                    "add" == r.action
                      ? u.add(r.index, r.items)
                      : "remove" == r.action
                      ? u.remove(r.index, r.items)
                      : ("itemchange" != r.action && r.action !== t) ||
                        (u.render(),
                        u.bindings.value &&
                          u.bindings.value &&
                          ((f = ut(
                            u.bindings.value.get(),
                            n(u.element).data("valueField")
                          )),
                          null === f
                            ? (u.element.selectedIndex = -1)
                            : (u.element.value = f))))
                  : u.render();
              },
            }),
            value: v.extend({
              init: function (t, i, r) {
                v.fn.init.call(this, t, i, r);
                this._change = c(this.change, this);
                n(this.element).change(this._change);
              },
              parsedValue: function () {
                for (
                  var n,
                    t,
                    f = this.dataType(),
                    u = [],
                    i = 0,
                    r = this.element.options.length;
                  i < r;
                  i++
                )
                  (t = this.element.options[i]),
                    t.selected &&
                      ((n = t.attributes.value),
                      (n = n && n.specified ? t.value : t.text),
                      u.push(this._parseValue(n, f)));
                return u;
              },
              change: function () {
                for (
                  var u,
                    h,
                    c,
                    n,
                    v,
                    p,
                    f = [],
                    y = this.element,
                    l = this.options.valueField || this.options.textField,
                    w = this.options.valuePrimitive,
                    r = 0,
                    a = y.options.length;
                  r < a;
                  r++
                )
                  (h = y.options[r]),
                    h.selected &&
                      ((n = h.attributes.value),
                      (n = n && n.specified ? h.value : h.text),
                      f.push(l ? n : this._parseValue(n, this.dataType())));
                if (l)
                  for (
                    u = this.bindings.source.get(),
                      u instanceof i.data.DataSource && (u = u.view()),
                      c = 0;
                    c < f.length;
                    c++
                  )
                    for (r = 0, a = u.length; r < a; r++)
                      if (((v = u[r].get(l)), (p = v + "" === f[c]))) {
                        f[c] = u[r];
                        break;
                      }
                n = this.bindings[s].get();
                n instanceof e
                  ? n.splice.apply(n, [0, n.length].concat(f))
                  : this.bindings[s].set(
                      w || (!(n instanceof o || null === n || n === t) && l)
                        ? f[0].get(l)
                        : f[0]
                    );
              },
              refresh: function () {
                var t,
                  f,
                  r,
                  c = this.element,
                  h = c.options,
                  n = this.bindings[s].get(),
                  u = n,
                  l = this.options.valueField || this.options.textField,
                  v = !1,
                  a = this.dataType();
                for (
                  u instanceof e || (u = new e([n])),
                    c.selectedIndex = -1,
                    r = 0;
                  r < u.length;
                  r++
                )
                  for (
                    n = u[r],
                      l && n instanceof o && (n = n.get(l)),
                      "date" == a
                        ? (n = i.toString(u[r], "yyyy-MM-dd"))
                        : "datetime-local" == a &&
                          (n = i.toString(u[r], "yyyy-MM-ddTHH:mm:ss")),
                      t = 0;
                    t < h.length;
                    t++
                  )
                    (f = h[t].value),
                      "" === f && "" !== n && (f = h[t].text),
                      null != n &&
                        f == "" + n &&
                        ((h[t].selected = !0), (v = !0));
              },
              destroy: function () {
                n(this.element).off(u, this._change);
              },
            }),
          };
          f.widget = {
            events: r.extend({
              init: function (n, t, i) {
                r.fn.init.call(this, n.element[0], t, i);
                this.widget = n;
                this.handlers = {};
              },
              refresh: function (n) {
                var i = this.bindings.events[n],
                  t = this.handlers[n];
                t && this.widget.unbind(n, t);
                t = i.get();
                this.handlers[n] = function (n) {
                  n.data = i.source;
                  t(n);
                  n.data === i.source && delete n.data;
                };
                this.widget.bind(n, this.handlers[n]);
              },
              destroy: function () {
                for (var n in this.handlers)
                  this.widget.unbind(n, this.handlers[n]);
              },
            }),
            checked: r.extend({
              init: function (n, t, i) {
                r.fn.init.call(this, n.element[0], t, i);
                this.widget = n;
                this._change = c(this.change, this);
                this.widget.bind(u, this._change);
              },
              change: function () {
                this.bindings[a].set(this.value());
              },
              refresh: function () {
                this.widget.check(this.bindings[a].get() === !0);
              },
              value: function () {
                var t = this.element,
                  n = t.value;
                return (
                  ("on" != n &&
                    "off" != n &&
                    "checkbox" != this.element.type) ||
                    (n = t.checked),
                  n
                );
              },
              destroy: function () {
                this.widget.unbind(u, this._change);
              },
            }),
            start: r.extend({
              init: function (n, t, i) {
                r.fn.init.call(this, n.element[0], t, i);
                this._change = c(this.change, this);
                this.widget = n;
                this.widget.bind(u, this._change);
              },
              change: function () {
                this.bindings.start.set(this.widget.range().start);
              },
              refresh: function () {
                var n = this,
                  t = this.bindings.start.get(),
                  i = n.widget._range ? n.widget._range.end : null;
                this.widget.range({ start: t, end: i });
              },
              destroy: function () {
                this.widget.unbind(u, this._change);
              },
            }),
            end: r.extend({
              init: function (n, t, i) {
                r.fn.init.call(this, n.element[0], t, i);
                this._change = c(this.change, this);
                this.widget = n;
                this.widget.bind(u, this._change);
              },
              change: function () {
                this.bindings.end.set(this.widget.range().end);
              },
              refresh: function () {
                var n = this,
                  t = this.bindings.end.get(),
                  i = n.widget._range ? n.widget._range.start : null;
                this.widget.range({ start: i, end: t });
              },
              destroy: function () {
                this.widget.unbind(u, this._change);
              },
            }),
            visible: r.extend({
              init: function (n, t, i) {
                r.fn.init.call(this, n.element[0], t, i);
                this.widget = n;
              },
              refresh: function () {
                var n = this.bindings.visible.get();
                this.widget.wrapper[0].style.display = n ? "" : "none";
              },
            }),
            invisible: r.extend({
              init: function (n, t, i) {
                r.fn.init.call(this, n.element[0], t, i);
                this.widget = n;
              },
              refresh: function () {
                var n = this.bindings.invisible.get();
                this.widget.wrapper[0].style.display = n ? "none" : "";
              },
            }),
            enabled: r.extend({
              init: function (n, t, i) {
                r.fn.init.call(this, n.element[0], t, i);
                this.widget = n;
              },
              refresh: function () {
                this.widget.enable &&
                  this.widget.enable(this.bindings.enabled.get());
              },
            }),
            disabled: r.extend({
              init: function (n, t, i) {
                r.fn.init.call(this, n.element[0], t, i);
                this.widget = n;
              },
              refresh: function () {
                this.widget.enable &&
                  this.widget.enable(!this.bindings.disabled.get());
              },
            }),
            source: w("source", "dataSource", "setDataSource"),
            value: r.extend({
              init: function (t, i, f) {
                r.fn.init.call(this, t.element[0], i, f);
                this.widget = t;
                this._change = n.proxy(this.change, this);
                this.widget.first(u, this._change);
                var s = this.bindings.value.get();
                this._valueIsObservableObject =
                  !f.valuePrimitive && (null == s || s instanceof o);
                this._valueIsObservableArray = s instanceof e;
                this._initChange = !1;
              },
              _source: function () {
                var n;
                return this.widget.dataItem &&
                  ((n = this.widget.dataItem()), n && n instanceof o)
                  ? [n]
                  : (this.bindings.source && (n = this.bindings.source.get()),
                    (!n || n instanceof i.data.DataSource) &&
                      (n = this.widget.dataSource.flatView()),
                    n);
              },
              change: function () {
                var i,
                  h,
                  r,
                  u,
                  f,
                  c,
                  o,
                  n = this.widget.value(),
                  e = this.options.dataValueField || this.options.dataTextField,
                  l = "[object Array]" === ht.call(n),
                  s = this._valueIsObservableObject,
                  t = [];
                if (((this._initChange = !0), e))
                  if ("" === n && (s || this.options.valuePrimitive)) n = null;
                  else {
                    for (
                      o = this._source(),
                        l && ((h = n.length), (t = n.slice(0))),
                        f = 0,
                        c = o.length;
                      f < c;
                      f++
                    )
                      if (((r = o[f]), (u = r.get(e)), l)) {
                        for (i = 0; i < h; i++)
                          if (u == t[i]) {
                            t[i] = r;
                            break;
                          }
                      } else if (u == n) {
                        n = s ? r : u;
                        break;
                      }
                    t[0] &&
                      (n = this._valueIsObservableArray
                        ? t
                        : s || !e
                        ? t[0]
                        : t[0].get(e));
                  }
                this.bindings.value.set(n);
                this._initChange = !1;
              },
              refresh: function () {
                var i, r, h, f, n, u, s, l, c;
                if (!this._initChange) {
                  if (
                    ((i = this.widget),
                    (r = i.options),
                    (h = r.dataTextField),
                    (f = r.dataValueField || h),
                    (n = this.bindings.value.get()),
                    (u = r.text || ""),
                    (s = 0),
                    (c = []),
                    n === t && (n = null),
                    f)
                  )
                    if (n instanceof e) {
                      for (l = n.length; s < l; s++) c[s] = n[s].get(f);
                      n = c;
                    } else n instanceof o && ((u = n.get(h)), (n = n.get(f)));
                  r.autoBind !== !1 ||
                  r.cascadeFrom ||
                  !i.listView ||
                  i.listView.bound()
                    ? i.value(n)
                    : (h !== f || u || (u = n),
                      u || (!n && 0 !== n) || !r.valuePrimitive
                        ? i._preselect(n, u)
                        : i.value(n));
                }
                this._initChange = !1;
              },
              destroy: function () {
                this.widget.unbind(u, this._change);
              },
            }),
            dropdowntree: {
              value: r.extend({
                init: function (t, i, f) {
                  r.fn.init.call(this, t.element[0], i, f);
                  this.widget = t;
                  this._change = n.proxy(this.change, this);
                  this.widget.first(u, this._change);
                  this._initChange = !1;
                },
                change: function () {
                  var c,
                    a,
                    o,
                    f,
                    u,
                    l,
                    y,
                    h,
                    v,
                    n = this,
                    r = n.bindings[s].get(),
                    w = n.options.valuePrimitive,
                    k = n.widget.treeview.select(),
                    d = n.widget._isMultipleSelection()
                      ? n.widget._getAllChecked()
                      : n.widget.treeview.dataItem(k) || n.widget.value(),
                    i =
                      w || n.widget.options.autoBind === !1
                        ? n.widget.value()
                        : d,
                    b =
                      this.options.dataValueField || this.options.dataTextField;
                  if (
                    ((i = i.slice ? i.slice(0) : i),
                    (n._initChange = !0),
                    r instanceof e)
                  ) {
                    for (
                      c = [], a = i.length, o = 0, f = 0, u = r[o], l = !1;
                      u !== t;

                    ) {
                      for (v = !1, f = 0; f < a; f++)
                        if (
                          (w
                            ? (l = i[f] == u)
                            : ((h = i[f]),
                              (h = h.get ? h.get(b) : h),
                              (l = h == (u.get ? u.get(b) : u))),
                          l)
                        ) {
                          i.splice(f, 1);
                          a -= 1;
                          v = !0;
                          break;
                        }
                      v ? (o += 1) : (c.push(u), p(r, o, 1), (y = o));
                      u = r[o];
                    }
                    p(r, r.length, 0, i);
                    c.length &&
                      r.trigger("change", {
                        action: "remove",
                        items: c,
                        index: y,
                      });
                    i.length &&
                      r.trigger("change", {
                        action: "add",
                        items: i,
                        index: r.length - 1,
                      });
                  } else n.bindings[s].set(i);
                  n._initChange = !1;
                },
                refresh: function () {
                  if (!this._initChange) {
                    var f,
                      t,
                      i = this.options,
                      s = this.widget,
                      u = i.dataValueField || i.dataTextField,
                      n = this.bindings.value.get(),
                      c = n,
                      r = 0,
                      h = [];
                    if (u)
                      if (n instanceof e) {
                        for (f = n.length; r < f; r++)
                          (t = n[r]), (h[r] = t.get ? t.get(u) : t);
                        n = h;
                      } else n instanceof o && (n = n.get(u));
                    i.autoBind === !1 && i.valuePrimitive !== !0
                      ? s._preselect(c, n)
                      : s.value(n);
                  }
                },
                destroy: function () {
                  this.widget.unbind(u, this._change);
                },
              }),
            },
            gantt: {
              dependencies: w(
                "dependencies",
                "dependencies",
                "setDependenciesDataSource"
              ),
            },
            multiselect: {
              value: r.extend({
                init: function (t, i, f) {
                  r.fn.init.call(this, t.element[0], i, f);
                  this.widget = t;
                  this._change = n.proxy(this.change, this);
                  this.widget.first(u, this._change);
                  this._initChange = !1;
                },
                change: function () {
                  var c,
                    a,
                    o,
                    u,
                    r,
                    l,
                    y,
                    h,
                    v,
                    f = this,
                    i = f.bindings[s].get(),
                    w = f.options.valuePrimitive,
                    n = w ? f.widget.value() : f.widget.dataItems(),
                    b =
                      this.options.dataValueField || this.options.dataTextField;
                  if (
                    ((n = n.slice(0)), (f._initChange = !0), i instanceof e)
                  ) {
                    for (
                      c = [], a = n.length, o = 0, u = 0, r = i[o], l = !1;
                      r !== t;

                    ) {
                      for (v = !1, u = 0; u < a; u++)
                        if (
                          (w
                            ? (l = n[u] == r)
                            : ((h = n[u]),
                              (h = h.get ? h.get(b) : h),
                              (l = h == (r.get ? r.get(b) : r))),
                          l)
                        ) {
                          n.splice(u, 1);
                          a -= 1;
                          v = !0;
                          break;
                        }
                      v ? (o += 1) : (c.push(r), p(i, o, 1), (y = o));
                      r = i[o];
                    }
                    p(i, i.length, 0, n);
                    c.length &&
                      i.trigger("change", {
                        action: "remove",
                        items: c,
                        index: y,
                      });
                    n.length &&
                      i.trigger("change", {
                        action: "add",
                        items: n,
                        index: i.length - 1,
                      });
                  } else f.bindings[s].set(n);
                  f._initChange = !1;
                },
                refresh: function () {
                  if (!this._initChange) {
                    var h,
                      i,
                      r = this.options,
                      f = this.widget,
                      s = r.dataValueField || r.dataTextField,
                      n = this.bindings.value.get(),
                      l = n,
                      u = 0,
                      c = [];
                    if ((n === t && (n = null), s))
                      if (n instanceof e) {
                        for (h = n.length; u < h; u++)
                          (i = n[u]), (c[u] = i.get ? i.get(s) : i);
                        n = c;
                      } else n instanceof o && (n = n.get(s));
                    r.autoBind !== !1 || r.valuePrimitive === !0 || f._isBound()
                      ? f.value(n)
                      : f._preselect(l, n);
                  }
                },
                destroy: function () {
                  this.widget.unbind(u, this._change);
                },
              }),
            },
            scheduler: {
              source: w("source", "dataSource", "setDataSource").extend({
                dataBound: function (n) {
                  var t,
                    r,
                    i,
                    u,
                    f = this.widget,
                    e = n.addedItems || f.items();
                  if (e.length)
                    for (
                      i = n.addedDataItems || f.dataItems(),
                        u = this.bindings.source._parents(),
                        t = 0,
                        r = i.length;
                      t < r;
                      t++
                    )
                      l(e[t], i[t], this._ns(n.ns), [i[t]].concat(u));
                },
              }),
            },
            grid: {
              source: w("source", "dataSource", "setDataSource").extend({
                dataBound: function (n) {
                  var t,
                    r,
                    u,
                    i,
                    f = this.widget,
                    e = n.addedItems || f.items();
                  if (e.length)
                    for (
                      i = n.addedDataItems || f.dataItems(),
                        u = this.bindings.source._parents(),
                        t = 0,
                        r = i.length;
                      t < r;
                      t++
                    )
                      l(e[t], i[t], this._ns(n.ns), [i[t]].concat(u));
                },
              }),
            },
          };
          p = function (n, t, i, r) {
            var u, s, o, f, e;
            if (
              ((r = r || []),
              (i = i || 0),
              (u = r.length),
              (s = n.length),
              (o = [].slice.call(n, t + i)),
              (f = o.length),
              u)
            ) {
              for (u = t + u, e = 0; t < u; t++) (n[t] = r[e]), e++;
              n.length = u;
            } else if (i) for (n.length = t, i += t; t < i; ) delete n[--i];
            if (f) {
              for (f = t + f, e = 0; t < f; t++) (n[t] = o[e]), e++;
              n.length = f;
            }
            for (t = n.length; t < s; ) delete n[t], t++;
          };
          k = ct.extend({
            init: function (n, t) {
              this.target = n;
              this.options = t;
              this.toDestroy = [];
            },
            bind: function (n) {
              var t,
                u,
                f,
                e,
                o,
                h,
                r = this instanceof d,
                i = this.binders();
              for (t in n)
                t == s
                  ? (u = !0)
                  : t == lt
                  ? (f = !0)
                  : t != at || r
                  ? t == a
                    ? (o = !0)
                    : t == vt
                    ? (h = !0)
                    : this.applyBinding(t, n, i)
                  : (e = !0);
              f && this.applyBinding(lt, n, i);
              u && this.applyBinding(s, n, i);
              o && this.applyBinding(a, n, i);
              e && !r && this.applyBinding(at, n, i);
              h && !r && this.applyBinding(vt, n, i);
            },
            binders: function () {
              return f[this.target.nodeName.toLowerCase()] || {};
            },
            applyBinding: function (n, t, i) {
              var e,
                r = i[n] || f[n],
                o = this.toDestroy,
                u = t[n];
              if (r)
                if (
                  ((r = new r(this.target, t, this.options)),
                  o.push(r),
                  u instanceof h)
                )
                  r.bind(u), o.push(u);
                else for (e in u) r.bind(u, e), o.push(u[e]);
              else if ("template" !== n)
                throw Error(
                  "The " +
                    n +
                    " binding is not supported by the " +
                    this.target.nodeName.toLowerCase() +
                    " element"
                );
            },
            destroy: function () {
              for (var i = this.toDestroy, n = 0, t = i.length; n < t; n++)
                i[n].destroy();
            },
          });
          d = k.extend({
            binders: function () {
              return f.widget[this.target.options.name.toLowerCase()] || {};
            },
            applyBinding: function (n, t, i) {
              var e,
                r = i[n] || f.widget[n],
                o = this.toDestroy,
                u = t[n];
              if (!r)
                throw Error(
                  "The " +
                    n +
                    " binding is not supported by the " +
                    this.target.options.name +
                    " widget"
                );
              if (
                ((r = new r(this.target, t, this.target.options)),
                o.push(r),
                u instanceof h)
              )
                r.bind(u), o.push(u);
              else for (e in u) r.bind(u, e), o.push(u[e]);
            },
          });
          ot = /[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g;
          st = /\s/g;
          i.unbind = wt;
          i.bind = tt;
          i.data.binders = f;
          i.data.Binder = r;
          i.notify = bt;
          i.observable = function (n) {
            return n instanceof o || (n = new o(n)), n;
          };
          i.observableHierarchy = function (n) {
            function r(n) {
              for (var i, t = 0; t < n.length; t++)
                n[t]._initChildren(),
                  (i = n[t].children),
                  i.fetch(),
                  (n[t].items = i.data()),
                  r(n[t].items);
            }
            var t = i.data.HierarchicalDataSource.create(n);
            return t.fetch(), r(t.data()), (t._data._dataSource = t), t._data;
          };
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.fx.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function yt(n) {
            return parseInt(n, 10);
          }
          function l(n, t) {
            return yt(n.css(t));
          }
          function li(n) {
            var t,
              i = [];
            for (t in n) i.push(t);
            return i;
          }
          function rt(n) {
            for (var t in n)
              ht.indexOf(t) != -1 && d.indexOf(t) == -1 && delete n[t];
            return n;
          }
          function ut(n, t) {
            var r,
              i,
              u,
              e,
              o = [],
              h = {};
            for (i in t)
              (r = i.toLowerCase()),
                (e = f && ht.indexOf(r) != -1),
                !w.hasHW3D && e && d.indexOf(r) == -1
                  ? delete t[i]
                  : ((u = t[i]), e ? o.push(i + "(" + u + ")") : (h[i] = u));
            return o.length && (h[s] = o.join(" ")), h;
          }
          function pt(n, t) {
            var u, i, r;
            return f
              ? ((u = n.css(s)),
                u == ir
                  ? "scale" == t
                    ? 1
                    : 0
                  : ((i = u.match(RegExp(t + "\\s*\\(([\\d\\w\\.]+)"))),
                    (r = 0),
                    i
                      ? (r = yt(i[1]))
                      : ((i = u.match(wi) || [0, 0, 0, 0, 0]),
                        (t = t.toLowerCase()),
                        bi.test(t)
                          ? (r = parseFloat(i[3] / i[2]))
                          : "translatey" == t
                          ? (r = parseFloat(i[4] / i[2]))
                          : "scale" == t
                          ? (r = parseFloat(i[2]))
                          : "rotate" == t &&
                            (r = parseFloat(Math.atan2(i[2], i[1])))),
                    r))
              : parseFloat(n.css(t));
          }
          function ft(n) {
            return n.charAt(0).toUpperCase() + n.substring(1);
          }
          function e(n, t) {
            var i = h.extend(t),
              u = i.prototype.directions;
            r[ft(n)] = i;
            r.Element.prototype[n] = function (n, t, r, u) {
              return new i(this.element, n, t, r, u);
            };
            a(u, function (t, u) {
              r.Element.prototype[n + ft(u)] = function (n, t, r) {
                return new i(this.element, u, n, t, r);
              };
            });
          }
          function wt(n, i, r, u) {
            e(n, {
              directions: dt,
              startValue: function (n) {
                return (this._startValue = n), this;
              },
              endValue: function (n) {
                return (this._endValue = n), this;
              },
              shouldHide: function () {
                return this._shouldHide;
              },
              prepare: function (n, f) {
                var e,
                  o,
                  h = this,
                  c = "out" === this._direction,
                  s = h.element.data(i),
                  l = !(isNaN(s) || s == r);
                e = l
                  ? s
                  : t !== this._startValue
                  ? this._startValue
                  : c
                  ? r
                  : u;
                o = t !== this._endValue ? this._endValue : c ? u : r;
                this._reverse
                  ? ((n[i] = o), (f[i] = e))
                  : ((n[i] = e), (f[i] = o));
                h._shouldHide = f[i] === u;
              },
            });
          }
          function bt(n, t) {
            var r = i.directions[t].vertical,
              u = n[r ? nt : lt]() / 2 + "px";
            return ni[t].replace("$size", u);
          }
          var kt,
            et,
            h,
            p,
            dt,
            gt,
            ni,
            ti,
            ot,
            ii,
            k,
            st,
            i = window.kendo,
            r = i.effects,
            a = n.each,
            u = n.extend,
            ai = n.proxy,
            w = i.support,
            vi = w.browser,
            f = w.transforms,
            o = w.transitions,
            yi = { scale: 0, scalex: 0, scaley: 0, scale3d: 0 },
            pi = { translate: 0, translatex: 0, translatey: 0, translate3d: 0 },
            ri = t !== document.documentElement.style.zoom && !f,
            wi =
              /matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,
            ui = /^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,
            bi = /translatex?$/i,
            ki = /(zoom|fade|expand)(\w+)/,
            fi = /(zoom|fade|expand)/,
            di = /[xy]$/i,
            ht = [
              "perspective",
              "rotate",
              "rotatex",
              "rotatey",
              "rotatez",
              "rotate3d",
              "scale",
              "scalex",
              "scaley",
              "scalez",
              "scale3d",
              "skew",
              "skewx",
              "skewy",
              "translate",
              "translatex",
              "translatey",
              "translatez",
              "translate3d",
              "matrix",
              "matrix3d",
            ],
            d = [
              "rotate",
              "scale",
              "scalex",
              "scaley",
              "skew",
              "skewx",
              "skewy",
              "translate",
              "translatex",
              "translatey",
              "matrix",
            ],
            gi = { rotate: "deg", scale: "", skew: "px", translate: "px" },
            g = f.css,
            nr = Math.round,
            tr = "",
            b = "px",
            ir = "none",
            ct = "auto",
            lt = "width",
            nt = "height",
            ei = "hidden",
            at = "origin",
            oi = "abortId",
            tt = "overflow",
            v = "translate",
            it = "position",
            si = "completeCallback",
            y = g + "transition",
            s = g + "transform",
            rr = g + "backface-visibility",
            hi = g + "perspective",
            vt = "1500px",
            ci = "perspective(" + vt + ")",
            c = {
              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" },
            };
          i.directions = c;
          u(n.fn, {
            kendoStop: function (n, t) {
              return o ? r.stopQueue(this, n || !1, t || !1) : this.stop(n, t);
            },
          });
          f &&
            !o &&
            (a(d, function (i, r) {
              n.fn[r] = function (i) {
                if (t === i) return pt(this, r);
                var u = n(this)[0],
                  f = r + "(" + i + gi[r.replace(di, "")] + ")";
                return (
                  u.style.cssText.indexOf(s) == -1
                    ? n(this).css(s, f)
                    : (u.style.cssText = u.style.cssText.replace(
                        RegExp(r + "\\(.*?\\)", "i"),
                        f
                      )),
                  this
                );
              };
              n.fx.step[r] = function (t) {
                n(t.elem)[r](t.now);
              };
            }),
            (kt = n.fx.prototype.cur),
            (n.fx.prototype.cur = function () {
              return d.indexOf(this.prop) != -1
                ? parseFloat(n(this.elem)[this.prop]())
                : kt.apply(this, arguments);
            }));
          i.toggleClass = function (n, t, i, r) {
            return (
              t &&
                ((t = t.split(" ")),
                o &&
                  ((i = u(
                    { exclusive: "all", duration: 400, ease: "ease-out" },
                    i
                  )),
                  n.css(y, i.exclusive + " " + i.duration + "ms " + i.ease),
                  setTimeout(function () {
                    n.css(y, "").css(nt);
                  }, i.duration)),
                a(t, function (t, i) {
                  n.toggleClass(i, r);
                })),
              n
            );
          };
          i.parseEffects = function (n, t) {
            var i = {};
            return (
              "string" == typeof n
                ? a(n.split(" "), function (n, r) {
                    var o = !fi.test(r),
                      s = r.replace(ki, function (n, t, i) {
                        return t + ":" + i.toLowerCase();
                      }),
                      u = s.split(":"),
                      f = u[1],
                      e = {};
                    u.length > 1 && (e.direction = t && o ? c[f].reverse : f);
                    i[u[0]] = e;
                  })
                : a(n, function (n) {
                    var r = this.direction;
                    r && t && !fi.test(n) && (this.direction = c[r].reverse);
                    i[n] = this;
                  }),
              i
            );
          };
          o &&
            u(r, {
              transition: function (t, i, r) {
                var h,
                  f,
                  c,
                  e,
                  a = 0,
                  l = t.data("keys") || [];
                r = u(
                  {
                    duration: 200,
                    ease: "ease-out",
                    complete: null,
                    exclusive: "all",
                  },
                  r
                );
                c = !1;
                e = function () {
                  c ||
                    ((c = !0),
                    f && (clearTimeout(f), (f = null)),
                    t.removeData(oi).dequeue().css(y, "").css(y),
                    r.complete.call(t));
                };
                r.duration = n.fx
                  ? n.fx.speeds[r.duration] || r.duration
                  : r.duration;
                h = ut(t, i);
                n.merge(l, li(h));
                n.hasOwnProperty("uniqueSort")
                  ? t.data("keys", n.uniqueSort(l)).height()
                  : t.data("keys", n.unique(l)).height();
                t.css(y, r.exclusive + " " + r.duration + "ms " + r.ease).css(
                  y
                );
                t.css(h).css(s);
                o.event && (t.one(o.event, e), 0 !== r.duration && (a = 500));
                f = setTimeout(e, r.duration + a);
                t.data(oi, f);
                t.data(si, e);
              },
              stopQueue: function (n, t, r) {
                var u,
                  f = n.data("keys"),
                  e = !r && f,
                  o = n.data(si);
                return (
                  e && (u = i.getComputedStyles(n[0], f)),
                  o && o(),
                  e && n.css(u),
                  n.removeData("keys").stop(t)
                );
              },
            });
          et = i.Class.extend({
            init: function (n, t) {
              var i = this;
              i.element = n;
              i.effects = [];
              i.options = t;
              i.restore = [];
            },
            run: function (t) {
              var l,
                h,
                v,
                p,
                w,
                k,
                d,
                a = this,
                g = t.length,
                c = a.element,
                i = a.options,
                b = n.Deferred(),
                e = {},
                y = {};
              for (
                a.effects = t,
                  b.done(n.proxy(a, "complete")),
                  c.data("animating", !0),
                  h = 0;
                h < g;
                h++
              )
                for (
                  l = t[h],
                    l.setReverse(i.reverse),
                    l.setOptions(i),
                    a.addRestoreProperties(l.restore),
                    l.prepare(e, y),
                    w = l.children(),
                    v = 0,
                    k = w.length;
                  v < k;
                  v++
                )
                  w[v].duration(i.duration).run();
              for (d in i.effects) u(y, i.effects[d].properties);
              for (
                c.is(":visible") ||
                  u(e, { display: c.data("olddisplay") || "block" }),
                  f &&
                    !i.reset &&
                    ((p = c.data("targetTransform")), p && (e = u(p, e))),
                  e = ut(c, e),
                  f && !o && (e = rt(e)),
                  c.css(e).css(s),
                  h = 0;
                h < g;
                h++
              )
                t[h].setup();
              return (
                i.init && i.init(),
                c.data("targetTransform", y),
                r.animate(c, y, u({}, i, { complete: b.resolve })),
                b.promise()
              );
            },
            stop: function () {
              n(this.element).kendoStop(!0, !0);
            },
            addRestoreProperties: function (n) {
              for (var t, i = this.element, r = 0, u = n.length; r < u; r++)
                (t = n[r]),
                  this.restore.push(t),
                  i.data(t) || i.data(t, i.css(t));
            },
            restoreCallback: function () {
              for (
                var t, r = this.element, n = 0, i = this.restore.length;
                n < i;
                n++
              )
                (t = this.restore[n]), r.css(t, r.data(t));
            },
            complete: function () {
              var i = this,
                r = 0,
                t = i.element,
                u = i.options,
                e = i.effects,
                o = e.length;
              for (
                t.removeData("animating").dequeue(),
                  u.hide && t.data("olddisplay", t.css("display")).hide(),
                  this.restoreCallback(),
                  ri && !f && setTimeout(n.proxy(this, "restoreCallback"), 0);
                r < o;
                r++
              )
                e[r].teardown();
              u.completeCallback && u.completeCallback(t);
            },
          });
          r.promise = function (n, t) {
            var u,
              s,
              f,
              e = [],
              h = new et(n, t),
              o = i.parseEffects(t.effects);
            t.effects = o;
            for (f in o)
              (u = r[ft(f)]), u && ((s = new u(n, o[f].direction)), e.push(s));
            e[0]
              ? h.run(e)
              : (n.is(":visible") ||
                  n
                    .css({ display: n.data("olddisplay") || "block" })
                    .css("display"),
                t.init && t.init(),
                n.dequeue(),
                h.complete());
          };
          u(r, {
            animate: function (i, e, s) {
              var h = s.transition !== !1;
              delete s.transition;
              o && "transition" in r && h
                ? r.transition(i, e, s)
                : f
                ? i.animate(rt(e), {
                    queue: !1,
                    show: !1,
                    hide: !1,
                    duration: s.duration,
                    complete: s.complete,
                  })
                : i.each(function () {
                    var i = n(this),
                      r = {};
                    a(ht, function (n, o) {
                      var c,
                        s,
                        p,
                        w,
                        h,
                        a,
                        y,
                        b = e ? e[o] + " " : null;
                      b &&
                        ((s = e),
                        o in yi && e[o] !== t
                          ? ((c = b.match(ui)), f && u(s, { scale: +c[0] }))
                          : o in pi &&
                            e[o] !== t &&
                            ((p = i.css(it)),
                            (w = "absolute" == p || "fixed" == p),
                            i.data(v) ||
                              (w
                                ? i.data(v, {
                                    top: l(i, "top") || 0,
                                    left: l(i, "left") || 0,
                                    bottom: l(i, "bottom"),
                                    right: l(i, "right"),
                                  })
                                : i.data(v, {
                                    top: l(i, "marginTop") || 0,
                                    left: l(i, "marginLeft") || 0,
                                  })),
                            (h = i.data(v)),
                            (c = b.match(ui)),
                            c &&
                              ((a = o == v + "y" ? 0 : +c[1]),
                              (y = o == v + "y" ? +c[1] : +c[2]),
                              w
                                ? (isNaN(h.right)
                                    ? isNaN(a) || u(s, { left: h.left + a })
                                    : isNaN(a) || u(s, { right: h.right - a }),
                                  isNaN(h.bottom)
                                    ? isNaN(y) || u(s, { top: h.top + y })
                                    : isNaN(y) ||
                                      u(s, { bottom: h.bottom - y }))
                                : (isNaN(a) || u(s, { marginLeft: h.left + a }),
                                  isNaN(y) || u(s, { marginTop: h.top + y })))),
                        !f && "scale" != o && o in s && delete s[o],
                        s && u(r, s));
                    });
                    vi.msie && delete r.scale;
                    i.animate(r, {
                      queue: !1,
                      show: !1,
                      hide: !1,
                      duration: s.duration,
                      complete: s.complete,
                    });
                  });
            },
          });
          r.animatedPromise = r.promise;
          h = i.Class.extend({
            init: function (n, t) {
              var i = this;
              i.element = n;
              i._direction = t;
              i.options = {};
              i._additionalEffects = [];
              i.restore || (i.restore = []);
            },
            reverse: function () {
              return (this._reverse = !0), this.run();
            },
            play: function () {
              return (this._reverse = !1), this.run();
            },
            add: function (n) {
              return this._additionalEffects.push(n), this;
            },
            direction: function (n) {
              return (this._direction = n), this;
            },
            duration: function (n) {
              return (this._duration = n), this;
            },
            compositeRun: function () {
              var n = this,
                t = new et(n.element, {
                  reverse: n._reverse,
                  duration: n._duration,
                }),
                i = n._additionalEffects.concat([n]);
              return t.run(i);
            },
            run: function () {
              if (this._additionalEffects && this._additionalEffects[0])
                return this.compositeRun();
              var c,
                l,
                e = this,
                t = e.element,
                h = 0,
                y = e.restore,
                w = y.length,
                a = n.Deferred(),
                i = {},
                v = {},
                p = e.children(),
                b = p.length;
              for (
                a.done(n.proxy(e, "_complete")), t.data("animating", !0), h = 0;
                h < w;
                h++
              )
                (c = y[h]), t.data(c) || t.data(c, t.css(c));
              for (h = 0; h < b; h++) p[h].duration(e._duration).run();
              return (
                e.prepare(i, v),
                t.is(":visible") ||
                  u(i, { display: t.data("olddisplay") || "block" }),
                f && ((l = t.data("targetTransform")), l && (i = u(l, i))),
                (i = ut(t, i)),
                f && !o && (i = rt(i)),
                t.css(i).css(s),
                e.setup(),
                t.data("targetTransform", v),
                r.animate(t, v, { duration: e._duration, complete: a.resolve }),
                a.promise()
              );
            },
            stop: function () {
              for (
                var t = 0, i = this.children(), r = i.length, t = 0;
                t < r;
                t++
              )
                i[t].stop();
              return n(this.element).kendoStop(!0, !0), this;
            },
            restoreCallback: function () {
              for (
                var t, r = this.element, n = 0, i = this.restore.length;
                n < i;
                n++
              )
                (t = this.restore[n]), r.css(t, r.data(t));
            },
            _complete: function () {
              var t = this,
                i = t.element;
              i.removeData("animating").dequeue();
              t.restoreCallback();
              t.shouldHide() && i.data("olddisplay", i.css("display")).hide();
              ri && !f && setTimeout(n.proxy(t, "restoreCallback"), 0);
              t.teardown();
            },
            setOptions: function (n) {
              u(!0, this.options, n);
            },
            children: function () {
              return [];
            },
            shouldHide: n.noop,
            setup: n.noop,
            prepare: n.noop,
            teardown: n.noop,
            directions: [],
            setReverse: function (n) {
              return (this._reverse = n), this;
            },
          });
          p = ["left", "right", "up", "down"];
          dt = ["in", "out"];
          e("slideIn", {
            directions: p,
            divisor: function (n) {
              return (this.options.divisor = n), this;
            },
            prepare: function (n, t) {
              var e,
                u = this,
                o = u.element,
                l = i._outerWidth,
                a = i._outerHeight,
                r = c[u._direction],
                v = -r.modifier * (r.vertical ? a(o) : l(o)),
                s = v / ((u.options && u.options.divisor) || 1) + b,
                h = "0px";
              u._reverse && ((e = n), (n = t), (t = e));
              f
                ? ((n[r.transition] = s), (t[r.transition] = h))
                : ((n[r.property] = s), (t[r.property] = h));
            },
          });
          e("tile", {
            directions: p,
            init: function (n, t, i) {
              h.prototype.init.call(this, n, t);
              this.options = { previous: i };
            },
            previousDivisor: function (n) {
              return (this.options.previousDivisor = n), this;
            },
            children: function () {
              var n = this,
                t = n._reverse,
                r = n.options.previous,
                e = n.options.previousDivisor || 1,
                u = n._direction,
                f = [i.fx(n.element).slideIn(u).setReverse(t)];
              return (
                r &&
                  f.push(
                    i.fx(r).slideIn(c[u].reverse).divisor(e).setReverse(!t)
                  ),
                f
              );
            },
          });
          wt("fade", "opacity", 1, 0);
          wt("zoom", "scale", 1, 0.01);
          e("slideMargin", {
            prepare: function (n, t) {
              var r,
                u = this,
                i = u.element,
                f = u.options,
                o = i.data(at),
                s = f.offset,
                e = u._reverse;
              e ||
                null !== o ||
                i.data(at, parseFloat(i.css("margin-" + f.axis)));
              r = i.data(at) || 0;
              t["margin-" + f.axis] = e ? r : r + s;
            },
          });
          e("slideTo", {
            prepare: function (n, t) {
              var u = this,
                e = u.element,
                o = u.options,
                i = o.offset.split(","),
                r = u._reverse;
              f
                ? ((t.translatex = r ? 0 : i[0]), (t.translatey = r ? 0 : i[1]))
                : ((t.left = r ? 0 : i[0]), (t.top = r ? 0 : i[1]));
              e.css("left");
            },
          });
          e("expand", {
            directions: ["horizontal", "vertical"],
            restore: [tt],
            prepare: function (n, i) {
              var f = this,
                e = f.element,
                o = f.options,
                s = f._reverse,
                r = "vertical" === f._direction ? nt : lt,
                h = e[0].style[r],
                c = e.data(r),
                u = parseFloat(c || h),
                l = nr(e.css(r, ct)[r]());
              n.overflow = ei;
              u = o && o.reset ? l || u : u || l;
              i[r] = (s ? 0 : u) + b;
              n[r] = (s ? u : 0) + b;
              c === t && e.data(r, h);
            },
            shouldHide: function () {
              return this._reverse;
            },
            teardown: function () {
              var t = this,
                i = t.element,
                n = "vertical" === t._direction ? nt : lt,
                r = i.data(n);
              (r != ct && r !== tr) ||
                setTimeout(function () {
                  i.css(n, ct).css(n);
                }, 0);
            },
          });
          gt = { position: "absolute", marginLeft: 0, marginTop: 0, scale: 1 };
          e("transfer", {
            init: function (n, t) {
              this.element = n;
              this.options = { target: t };
              this.restore = [];
            },
            setup: function () {
              this.element.appendTo(document.body);
            },
            prepare: function (n, t) {
              var e = this,
                i = e.element,
                f = r.box(i),
                o = r.box(e.options.target),
                l = pt(i, "scale"),
                h = r.fillScale(o, f),
                c = r.transformOrigin(o, f);
              u(n, gt);
              t.scale = 1;
              i.css(s, "scale(1)").css(s);
              i.css(s, "scale(" + l + ")");
              n.top = f.top;
              n.left = f.left;
              n.transformOrigin = c.x + b + " " + c.y + b;
              e._reverse ? (n.scale = h) : (t.scale = h);
            },
          });
          ni = {
            top: "rect(auto auto $size auto)",
            bottom: "rect($size auto auto auto)",
            left: "rect(auto $size auto auto)",
            right: "rect(auto auto auto $size)",
          };
          ti = {
            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)" },
          };
          e("turningPage", {
            directions: p,
            init: function (n, t, i) {
              h.prototype.init.call(this, n, t);
              this._container = i;
            },
            prepare: function (n, t) {
              var r = this,
                f = r._reverse,
                e = f ? c[r._direction].reverse : r._direction,
                u = ti[e];
              n.zIndex = 1;
              r._clipInHalf &&
                (n.clip = bt(r._container, i.directions[e].reverse));
              n[rr] = ei;
              t[s] = ci + (f ? u.start : u.end);
              n[s] = ci + (f ? u.end : u.start);
            },
            setup: function () {
              this._container.append(this.element);
            },
            face: function (n) {
              return (this._face = n), this;
            },
            shouldHide: function () {
              var n = this,
                t = n._reverse,
                i = n._face;
              return (t && !i) || (!t && i);
            },
            clipInHalf: function (n) {
              return (this._clipInHalf = n), this;
            },
            temporary: function () {
              return this.element.addClass("temp-page"), this;
            },
          });
          e("staticPage", {
            directions: p,
            init: function (n, t, i) {
              h.prototype.init.call(this, n, t);
              this._container = i;
            },
            restore: ["clip"],
            prepare: function (n, t) {
              var i = this,
                r = i._reverse ? c[i._direction].reverse : i._direction;
              n.clip = bt(i._container, r);
              n.opacity = 0.999;
              t.opacity = 1;
            },
            shouldHide: function () {
              var n = this,
                t = n._reverse,
                i = n._face;
              return (t && !i) || (!t && i);
            },
            face: function (n) {
              return (this._face = n), this;
            },
          });
          e("pageturn", {
            directions: ["horizontal", "vertical"],
            init: function (n, t, i, r) {
              h.prototype.init.call(this, n, t);
              this.options = {};
              this.options.face = i;
              this.options.back = r;
            },
            children: function () {
              var o,
                r = this,
                u = r.options,
                n = "horizontal" === r._direction ? "left" : "top",
                f = i.directions[n].reverse,
                t = r._reverse,
                s = u.face.clone(!0).removeAttr("id"),
                h = u.back.clone(!0).removeAttr("id"),
                e = r.element;
              return (
                t && ((o = n), (n = f), (f = o)),
                [
                  i.fx(u.face).staticPage(n, e).face(!0).setReverse(t),
                  i.fx(u.back).staticPage(f, e).setReverse(t),
                  i
                    .fx(s)
                    .turningPage(n, e)
                    .face(!0)
                    .clipInHalf(!0)
                    .temporary()
                    .setReverse(t),
                  i
                    .fx(h)
                    .turningPage(f, e)
                    .clipInHalf(!0)
                    .temporary()
                    .setReverse(t),
                ]
              );
            },
            prepare: function (n, t) {
              n[hi] = vt;
              n.transformStyle = "preserve-3d";
              n.opacity = 0.999;
              t.opacity = 1;
            },
            teardown: function () {
              this.element.find(".temp-page").remove();
            },
          });
          e("flip", {
            directions: ["horizontal", "vertical"],
            init: function (n, t, i, r) {
              h.prototype.init.call(this, n, t);
              this.options = {};
              this.options.face = i;
              this.options.back = r;
            },
            children: function () {
              var f,
                n = this,
                e = n.options,
                t = "horizontal" === n._direction ? "left" : "top",
                r = i.directions[t].reverse,
                u = n._reverse,
                o = n.element;
              return (
                u && ((f = t), (t = r), (r = f)),
                [
                  i.fx(e.face).turningPage(t, o).face(!0).setReverse(u),
                  i.fx(e.back).turningPage(r, o).setReverse(u),
                ]
              );
            },
            prepare: function (n) {
              n[hi] = vt;
              n.transformStyle = "preserve-3d";
            },
          });
          ot = !w.mobileOS.android;
          ii = ".km-touch-scrollbar, .km-actionsheet-wrapper";
          e("replace", {
            _before: n.noop,
            _after: n.noop,
            init: function (t, i, r) {
              h.prototype.init.call(this, t);
              this._previous = n(i);
              this._transitionClass = r;
            },
            duration: function () {
              throw Error(
                "The replace effect does not support duration setting; the effect duration may be customized through the transition class rule"
              );
            },
            beforeTransition: function (n) {
              return (this._before = n), this;
            },
            afterTransition: function (n) {
              return (this._after = n), this;
            },
            _both: function () {
              return n().add(this._element).add(this._previous);
            },
            _containerClass: function () {
              var t = this._direction,
                n = "k-fx k-fx-start k-fx-" + this._transitionClass;
              return (
                t && (n += " k-fx-" + t),
                this._reverse && (n += " k-fx-reverse"),
                n
              );
            },
            complete: function (t) {
              if (!(!this.deferred || (t && n(t.target).is(ii)))) {
                var i = this.container;
                i.removeClass("k-fx-end")
                  .removeClass(this._containerClass())
                  .off(o.event, this.completeProxy);
                this._previous.hide().removeClass("k-fx-current");
                this.element.removeClass("k-fx-next");
                ot && i.css(tt, "");
                this.isAbsolute || this._both().css(it, "");
                this.deferred.resolve();
                delete this.deferred;
              }
            },
            run: function () {
              if (this._additionalEffects && this._additionalEffects[0])
                return this.compositeRun();
              var s,
                u = this,
                r = u.element,
                f = u._previous,
                t = r.parents().filter(f.parents()).first(),
                h = u._both(),
                e = n.Deferred(),
                c = r.css(it);
              return (
                t.length || (t = r.parent()),
                (this.container = t),
                (this.deferred = e),
                (this.isAbsolute = "absolute" == c),
                this.isAbsolute || h.css(it, "absolute"),
                ot && ((s = t.css(tt)), t.css(tt, "hidden")),
                o
                  ? (r.addClass("k-fx-hidden"),
                    t.addClass(this._containerClass()),
                    (this.completeProxy = n.proxy(this, "complete")),
                    t.on(o.event, this.completeProxy),
                    i.animationFrame(function () {
                      r.removeClass("k-fx-hidden").addClass("k-fx-next");
                      f.css("display", "").addClass("k-fx-current");
                      u._before(f, r);
                      i.animationFrame(function () {
                        t.removeClass("k-fx-start").addClass("k-fx-end");
                        u._after(f, r);
                      });
                    }))
                  : this.complete(),
                e.promise()
              );
            },
            stop: function () {
              this.complete();
            },
          });
          k = i.Class.extend({
            init: function () {
              var n = this;
              n._tickProxy = ai(n._tick, n);
              n._started = !1;
            },
            tick: n.noop,
            done: n.noop,
            onEnd: n.noop,
            onCancel: n.noop,
            start: function () {
              this.enabled() &&
                (this.done()
                  ? this.onEnd()
                  : ((this._started = !0), i.animationFrame(this._tickProxy)));
            },
            enabled: function () {
              return !0;
            },
            cancel: function () {
              this._started = !1;
              this.onCancel();
            },
            _tick: function () {
              var n = this;
              n._started &&
                (n.tick(),
                n.done()
                  ? ((n._started = !1), n.onEnd())
                  : i.animationFrame(n._tickProxy));
            },
          });
          st = k.extend({
            init: function (n) {
              var t = this;
              u(t, n);
              k.fn.init.call(t);
            },
            done: function () {
              return this.timePassed() >= this.duration;
            },
            timePassed: function () {
              return Math.min(this.duration, new Date() - this.startDate);
            },
            moveTo: function (n) {
              var t = this,
                i = t.movable;
              t.initial = i[t.axis];
              t.delta = n.location - t.initial;
              t.duration = "number" == typeof n.duration ? n.duration : 300;
              t.tick = t._easeProxy(n.ease);
              t.startDate = new Date();
              t.start();
            },
            _easeProxy: function (n) {
              var t = this;
              return function () {
                t.movable.moveAxis(
                  t.axis,
                  n(t.timePassed(), t.initial, t.delta, t.duration)
                );
              };
            },
          });
          u(st, {
            easeOutExpo: function (n, t, i, r) {
              return n == r ? t + i : i * (-Math.pow(2, (-10 * n) / r) + 1) + t;
            },
            easeOutBack: function (n, t, i, r, u) {
              return (
                (u = 1.70158),
                i * ((n = n / r - 1) * n * ((u + 1) * n + u) + 1) + t
              );
            },
          });
          r.Animation = k;
          r.Transition = st;
          r.createEffect = e;
          r.box = function (t) {
            t = n(t);
            var r = t.offset();
            return (
              (r.width = i._outerWidth(t)), (r.height = i._outerHeight(t)), r
            );
          };
          r.transformOrigin = function (n, t) {
            var i = ((n.left - t.left) * t.width) / (t.width - n.width),
              r = ((n.top - t.top) * t.height) / (t.height - n.height);
            return { x: isNaN(i) ? 0 : i, y: isNaN(r) ? 0 : r };
          };
          r.fillScale = function (n, t) {
            return Math.min(n.width / t.width, n.height / t.height);
          };
          r.fitScale = function (n, t) {
            return Math.max(n.width / t.width, n.height / t.height);
          };
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.view.min",
      ["kendo.core.min", "kendo.binder.min", "kendo.fx.min"],
      n
    );
  })(
    function () {
      return (
        (function (n) {
          function g(n) {
            if (!n) return {};
            var t = n.match(ct) || [];
            return { type: t[1], direction: t[3], reverse: "reverse" === t[5] };
          }
          var t = window.kendo,
            e = t.attr,
            nt = t.ui,
            tt = t.attrValue,
            it = t.directiveSelector,
            u = t.Observable,
            h = t.ui.Widget,
            i = t.roleSelector,
            rt = "SCRIPT",
            c = "init",
            l = "transitionStart",
            a = "transitionEnd",
            v = "show",
            y = "hide",
            ut = "attach",
            ft = "detach",
            et = /unrecognized expression/,
            ot = /<body[^>]*>(([\u000a\u000d\u2028\u2029]|.)*)<\/body>/i,
            o = "showStart",
            p = "sameViewRequested",
            w = "viewShow",
            b = "viewTypeDetermined",
            s = "after",
            r = {
              content: "k-content",
              view: "k-view",
              stretchedView: "k-stretched-view",
              widget: "k-widget",
              header: "k-header",
              footer: "k-footer",
            },
            f = t.ui.Widget.extend({
              init: function (i, r) {
                var f = this;
                r = r || {};
                f.id = t.guid();
                u.fn.init.call(f);
                this.options = n.extend({}, this.options, r);
                f.content = i;
                f.options.renderOnInit &&
                  h.fn.init.call(f, f._createElement(), r);
                f.options.wrapInSections && f._renderSections();
                f.tagName = r.tagName || "div";
                f.model = r.model;
                f._wrap = r.wrap !== !1;
                this._evalTemplate = r.evalTemplate || !1;
                f._fragments = {};
                f.bind([c, v, y, l, a], r);
              },
              options: {
                name: "View",
                renderOnInit: !1,
                wrapInSections: !1,
                detachOnHide: !0,
                detachOnDestroy: !0,
              },
              render: function (i) {
                var r = this,
                  u = !r.element;
                return (
                  u && (r.element = r._createElement()),
                  i && n(i).append(r.element),
                  u && (t.bind(r.element, r.model), r.trigger(c)),
                  i && (r._eachFragment(ut), r.trigger(v)),
                  r.element
                );
              },
              clone: function () {
                return new k(this);
              },
              triggerBeforeShow: function () {
                return !0;
              },
              triggerBeforeHide: function () {
                return !0;
              },
              showStart: function () {
                var t = this,
                  n = t.render();
                n && n.css("display", "");
                this.trigger(o, { view: this });
              },
              showEnd: function () {},
              hideEnd: function () {
                this.hide();
              },
              beforeTransition: function (n) {
                this.trigger(l, { type: n });
              },
              afterTransition: function (n) {
                this.trigger(a, { type: n });
              },
              hide: function () {
                this.options.detachOnHide &&
                  (this._eachFragment(ft), n(this.element).detach());
                this.trigger(y);
              },
              destroy: function () {
                var i = this,
                  n = i.element;
                n &&
                  (h.fn.destroy.call(i),
                  t.unbind(n),
                  t.destroy(n),
                  i.options.detachOnDestroy && n.remove());
              },
              purge: function () {
                var t = this;
                t.destroy();
                n(t.element).add(t.content).add(t.wrapper).off().remove();
              },
              fragments: function (t) {
                n.extend(this._fragments, t);
              },
              _eachFragment: function (n) {
                for (var t in this._fragments) this._fragments[t][n](this, t);
              },
              _createElement: function () {
                var r,
                  i,
                  f,
                  u = this,
                  e = "<" + u.tagName + " />";
                try {
                  i = n(document.getElementById(u.content) || u.content);
                  i[0].tagName === rt && (i = i.html());
                } catch (o) {
                  et.test(o.message) && (i = u.content);
                }
                return (
                  "string" == typeof i
                    ? ((i = i.replace(/^\s+|\s+$/g, "")),
                      u._evalTemplate && (i = t.template(i)(u.model || {})),
                      (r = n(e).append(i)),
                      u._wrap || (r = r.contents()))
                    : ((r = i),
                      u._evalTemplate &&
                        ((f = n(
                          t.template(n("<div />").append(r.clone(!0)).html())(
                            u.model || {}
                          )
                        )),
                        n.contains(document, r[0]) && r.replaceWith(f),
                        (r = f)),
                      u._wrap && (r = r.wrapAll(e).parent())),
                  r
                );
              },
              _renderSections: function () {
                var n = this;
                n.options.wrapInSections &&
                  (n._wrapper(),
                  n._createContent(),
                  n._createHeader(),
                  n._createFooter());
              },
              _wrapper: function () {
                var n,
                  u = this,
                  f = u.content;
                u.wrapper = f.is(i("view"))
                  ? u.content
                  : f
                      .wrap(
                        "<div data-" +
                          t.ns +
                          'stretch="true" data-' +
                          t.ns +
                          'role="view" data-' +
                          t.ns +
                          'init-widgets="false"></div>'
                      )
                      .parent();
                n = u.wrapper;
                n.attr("id", u.id);
                n.addClass(r.view);
                n.addClass(r.widget);
                n.attr("role", "view");
              },
              _createContent: function () {
                var u,
                  f = this,
                  t = n(f.wrapper),
                  o = i("content");
                t.children(o)[0] ||
                  ((u = t.children().filter(function () {
                    var t = n(this);
                    if (!t.is(i("header")) && !t.is(i("footer"))) return t;
                  })),
                  u.wrap("<div " + e("role") + '="content"></div>'));
                this.contentElement = t.children(i("content"));
                this.contentElement
                  .addClass(r.stretchedView)
                  .addClass(r.content);
              },
              _createHeader: function () {
                var n = this,
                  t = n.wrapper;
                this.header = t.children(i("header")).addClass(r.header);
              },
              _createFooter: function () {
                var n = this,
                  t = n.wrapper;
                this.footer = t.children(i("footer")).addClass(r.footer);
              },
            }),
            k = t.Class.extend({
              init: function (t) {
                n.extend(this, {
                  element: t.element.clone(!0),
                  transition: t.transition,
                  id: t.id,
                });
                t.element.parent().append(this.element);
              },
              hideEnd: function () {
                this.element.remove();
              },
              beforeTransition: n.noop,
              afterTransition: n.noop,
            }),
            st = f.extend({
              init: function (n, t) {
                f.fn.init.call(this, n, t);
                this.containers = {};
              },
              container: function (n) {
                var t = this.containers[n];
                return (
                  t ||
                    ((t = this._createContainer(n)), (this.containers[n] = t)),
                  t
                );
              },
              showIn: function (n, t, i) {
                this.container(n).show(t, i);
              },
              _createContainer: function (n) {
                var r,
                  t = this.render(),
                  i = t.find(n);
                if (!i.length && t.is(n)) {
                  if (!t.is(n))
                    throw Error(
                      "can't find a container with the specified " +
                        n +
                        " selector"
                    );
                  i = t;
                }
                return (
                  (r = new d(i)),
                  r.bind("accepted", function (n) {
                    n.view.render(i);
                  }),
                  r
                );
              },
            }),
            ht = f.extend({
              attach: function (n, t) {
                n.element.find(t).replaceWith(this.render());
              },
              detach: function () {},
            }),
            ct = /^(\w+)(:(\w+))?( (\w+))?$/,
            d = u.extend({
              init: function (n) {
                u.fn.init.call(this);
                this.container = n;
                this.history = [];
                this.view = null;
                this.running = !1;
              },
              after: function () {
                this.running = !1;
                this.trigger("complete", { view: this.view });
                this.trigger("after");
              },
              end: function () {
                this.view.showEnd();
                this.previous.hideEnd();
                this.after();
              },
              show: function (n, i, r) {
                if (
                  !n.triggerBeforeShow() ||
                  (this.view && !this.view.triggerBeforeHide())
                )
                  return this.trigger("after"), !1;
                r = r || n.id;
                var u = this,
                  e = n === u.view ? n.clone() : u.view,
                  f = u.history,
                  c = f[f.length - 2] || {},
                  h = c.id === r,
                  o = i || (h ? f[f.length - 1].transition : n.transition),
                  s = g(o);
                return (
                  u.running && u.effect.stop(),
                  "none" === o && (o = null),
                  u.trigger("accepted", { view: n }),
                  (u.view = n),
                  (u.previous = e),
                  (u.running = !0),
                  h ? f.pop() : f.push({ id: r, transition: o }),
                  e
                    ? (o && t.effects.enabled
                        ? (n.element.addClass("k-fx-hidden"),
                          n.showStart(),
                          h && !i && (s.reverse = !s.reverse),
                          (u.effect = t
                            .fx(n.element)
                            .replace(e.element, s.type)
                            .beforeTransition(function () {
                              n.beforeTransition("show");
                              e.beforeTransition("hide");
                            })
                            .afterTransition(function () {
                              n.afterTransition("show");
                              e.afterTransition("hide");
                            })
                            .direction(s.direction)
                            .setReverse(s.reverse)),
                          u.effect.run().then(function () {
                            u.end();
                          }))
                        : (n.showStart(), u.end()),
                      !0)
                    : (n.showStart(), n.showEnd(), u.after(), !0)
                );
              },
              destroy: function () {
                var t = this,
                  n = t.view;
                n && n.destroy && n.destroy();
              },
            }),
            lt = u.extend({
              init: function (i) {
                var f,
                  e,
                  r = this;
                u.fn.init.call(r);
                r.options = i;
                n.extend(r, i);
                r.sandbox = n("<div />");
                e = r.container;
                f = r._hideViews(e);
                r.rootView = f.first();
                r.layouts = {};
                r.viewContainer = new t.ViewContainer(r.container);
                r.viewContainer.bind("accepted", function (n) {
                  n.view.params = r.params;
                });
                r.viewContainer.bind("complete", function (n) {
                  r.trigger(w, { view: n.view });
                });
                r.viewContainer.bind(s, function () {
                  r.trigger(s);
                });
                this.bind(this.events, i);
              },
              events: [o, s, w, "loadStart", "loadComplete", p, b],
              destroy: function () {
                var i,
                  n = this,
                  r = n.viewContainer;
                t.destroy(n.container);
                for (i in n.layouts) this.layouts[i].destroy();
                r && r.destroy();
              },
              view: function () {
                return this.viewContainer.view;
              },
              showView: function (n, i, r) {
                if (
                  ((n = n.replace(RegExp("^" + this.remoteViewURLPrefix), "")),
                  "" === n && this.remoteViewURLPrefix && (n = "/"),
                  n.replace(/^#/, "") === this.url)
                )
                  return this.trigger(p), !1;
                this.trigger(o);
                var f = this,
                  e = f._findViewElement(n),
                  u = t.widgetInstance(e);
                return (
                  (f.url = n.replace(/^#/, "")),
                  (f.params = r),
                  u && u.reload && (u.purge(), (e = [])),
                  this.trigger(b, { remote: 0 === e.length, url: n }),
                  !e[0] ||
                    (u || (u = f._createView(e)), f.viewContainer.show(u, i, n))
                );
              },
              append: function (n, t) {
                var r,
                  i,
                  u = this.sandbox,
                  f = (t || "").split("?")[0],
                  o = this.container;
                return (
                  ot.test(n) && (n = RegExp.$1),
                  (u[0].innerHTML = n),
                  o.append(u.children("script, style")),
                  (r = this._hideViews(u)),
                  (i = r.first()),
                  i.length ||
                    (r = i = u.wrapInner("<div data-role=view />").children()),
                  f && i.hide().attr(e("url"), f),
                  o.append(r),
                  this._createView(i)
                );
              },
              _locate: function (n) {
                return this.$angular ? it(n) : i(n);
              },
              _findViewElement: function (n) {
                var t,
                  i = n.split("?")[0];
                return i
                  ? ((t = this.container.children(
                      "[" + e("url") + "='" + i + "']"
                    )),
                    t[0] ||
                      i.indexOf("/") !== -1 ||
                      (t = this.container.children(
                        "#" === i.charAt(0) ? i : "#" + i
                      )),
                    t[0] || (t = this._findViewElementById(n)),
                    t)
                  : this.rootView;
              },
              _findViewElementById: function (n) {
                return this.container.children("[id='" + n + "']");
              },
              _createView: function (n) {
                return this._createSpaView(n);
              },
              _createMobileView: function (n) {
                return t.initWidget(
                  n,
                  {
                    defaultTransition: this.transition,
                    loader: this.loader,
                    container: this.container,
                    getLayout: this.getLayoutProxy,
                    modelScope: this.modelScope,
                    reload: tt(n, "reload"),
                  },
                  nt.roles
                );
              },
              _createSpaView: function (n) {
                var i = (this.options || {}).viewOptions || {};
                return new t.View(n, {
                  renderOnInit: i.renderOnInit,
                  wrap: i.wrap || !1,
                  wrapInSections: i.wrapInSections,
                  detachOnHide: i.detachOnHide,
                  detachOnDestroy: i.detachOnDestroy,
                });
              },
              _hideViews: function (n) {
                return n.children(this._locate("view")).hide();
              },
            });
          t.ViewEngine = lt;
          t.ViewContainer = d;
          t.Fragment = ht;
          t.Layout = st;
          t.View = f;
          t.ViewClone = k;
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.dom.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function u() {
            this.node = null;
          }
          function e() {}
          function t(n, t, i) {
            this.nodeName = n;
            this.attr = t || {};
            this.children = i || [];
          }
          function r(n) {
            this.nodeValue = n + "";
          }
          function o(n) {
            this.html = n;
          }
          function a(n, t) {
            for (f.innerHTML = t; f.firstChild; ) n.appendChild(f.firstChild);
          }
          function s(n) {
            return new o(n);
          }
          function h(n, i, r) {
            return new t(n, i, r);
          }
          function c(n) {
            return new r(n);
          }
          function l(n) {
            this.root = n;
            this.children = [];
          }
          var i, f;
          u.prototype = {
            remove: function () {
              this.node.parentNode &&
                this.node.parentNode.removeChild(this.node);
              this.attr = {};
            },
            attr: {},
            text: function () {
              return "";
            },
          };
          e.prototype = {
            nodeName: "#null",
            attr: { style: {} },
            children: [],
            remove: function () {},
          };
          i = new e();
          t.prototype = new u();
          t.prototype.appendTo = function (n) {
            for (
              var r = document.createElement(this.nodeName),
                u = this.children,
                t = 0;
              t < u.length;
              t++
            )
              u[t].render(r, i);
            return n.appendChild(r), r;
          };
          t.prototype.render = function (n, t) {
            var u, r, o, f, e, s;
            if (t.nodeName !== this.nodeName)
              t.remove(), (u = this.appendTo(n));
            else {
              if (
                ((u = t.node),
                (o = this.children),
                (f = o.length),
                (e = t.children),
                (s = e.length),
                Math.abs(s - f) > 2)
              )
                return void this.render(
                  {
                    appendChild: function (i) {
                      n.replaceChild(i, t.node);
                    },
                  },
                  i
                );
              for (r = 0; r < f; r++) o[r].render(u, e[r] || i);
              for (r = f; r < s; r++) e[r].remove();
            }
            this.node = u;
            this.syncAttributes(t.attr);
            this.removeAttributes(t.attr);
          };
          t.prototype.syncAttributes = function (n) {
            var t,
              i,
              r,
              u = this.attr;
            for (t in u)
              (i = u[t]),
                (r = n[t]),
                "style" === t
                  ? this.setStyle(i, r)
                  : i !== r && this.setAttribute(t, i, r);
          };
          t.prototype.setStyle = function (n, t) {
            var i,
              r = this.node;
            if (t) for (i in n) n[i] !== t[i] && (r.style[i] = n[i]);
            else for (i in n) r.style[i] = n[i];
          };
          t.prototype.removeStyle = function (n) {
            var t,
              i = this.attr.style || {},
              r = this.node;
            for (t in n) void 0 === i[t] && (r.style[t] = "");
          };
          t.prototype.removeAttributes = function (n) {
            var t,
              i = this.attr;
            for (t in n)
              "style" === t
                ? this.removeStyle(n.style)
                : void 0 === i[t] && this.removeAttribute(t);
          };
          t.prototype.removeAttribute = function (n) {
            var t = this.node;
            "style" === n
              ? (t.style.cssText = "")
              : "className" === n
              ? (t.className = "")
              : t.removeAttribute(n);
          };
          t.prototype.setAttribute = function (n, t) {
            var i = this.node;
            void 0 !== i[n] ? (i[n] = t) : i.setAttribute(n, t);
          };
          t.prototype.text = function () {
            for (var t = "", n = 0; n < this.children.length; ++n)
              t += this.children[n].text();
            return t;
          };
          r.prototype = new u();
          r.prototype.nodeName = "#text";
          r.prototype.render = function (n, t) {
            var i;
            t.nodeName !== this.nodeName
              ? (t.remove(),
                (i = document.createTextNode(this.nodeValue)),
                n.appendChild(i))
              : ((i = t.node),
                this.nodeValue !== t.nodeValue &&
                  i.parentNode &&
                  (i.nodeValue = this.nodeValue));
            this.node = i;
          };
          r.prototype.text = function () {
            return this.nodeValue;
          };
          o.prototype = {
            nodeName: "#html",
            attr: {},
            remove: function () {
              for (var t, n = 0; n < this.nodes.length; n++)
                (t = this.nodes[n]),
                  t.parentNode && t.parentNode.removeChild(t);
            },
            render: function (n, t) {
              var r, i;
              if (t.nodeName !== this.nodeName || t.html !== this.html)
                for (
                  t.remove(),
                    r = n.lastChild,
                    a(n, this.html),
                    this.nodes = [],
                    i = r ? r.nextSibling : n.firstChild;
                  i;
                  i = i.nextSibling
                )
                  this.nodes.push(i);
              else this.nodes = t.nodes.slice(0);
            },
          };
          f = document.createElement("div");
          l.prototype = {
            html: s,
            element: h,
            text: c,
            render: function (n) {
              for (var r, f = this.children, t = 0, u = n.length; t < u; t++)
                (r = f[t]),
                  r
                    ? (r.node && r.node.parentNode) || (r.remove(), (r = i))
                    : (r = i),
                  n[t].render(this.root, r);
              for (t = u; t < f.length; t++) f[t].remove();
              this.children = n;
            },
          };
          n.dom = { html: s, text: c, element: h, Tree: l, Node: u };
        })(window.kendo),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("ooxml/utils.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function () {
        kendo.ooxml = kendo.ooxml || {};
        kendo.ooxml.createZip = function () {
          if ("undefined" == typeof JSZip)
            throw Error(
              "JSZip not found. Check http://docs.telerik.com/kendo-ui/framework/excel/introduction#requirements for more details."
            );
          return new JSZip();
        };
      })();
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("ooxml/kendo-ooxml.min", ["kendo.core.min", "ooxml/utils.min"], n);
  })(
    function () {
      !(function (n) {
        function rt(n, t, i) {
          return (
            (((1461 * (n + 4800 + (((t - 13) / 12) | 0))) / 4) | 0) +
            (((367 * (t - 1 - 12 * (((t - 13) / 12) | 0))) / 12) | 0) -
            (((3 * (((n + 4900 + (((t - 13) / 12) | 0)) / 100) | 0)) / 4) | 0) +
            i -
            32075
          );
        }
        function wi(n, t, i) {
          return rt(n, t, i) - lt;
        }
        function bi(n, t, i, r) {
          return (n + (t + (i + r / 1e3) / 60) / 60) / 24;
        }
        function ki(n) {
          var i = bi(
              n.getHours(),
              n.getMinutes(),
              n.getSeconds(),
              n.getMilliseconds()
            ),
            t = wi(n.getFullYear(), n.getMonth(), n.getDate());
          return t < 0 ? t - 1 + i : t + i;
        }
        function ut(n) {
          return at + n;
        }
        function e(n, t) {
          return t.indexOf(n);
        }
        function t(n) {
          return (n + "")
            .replace(/&/g, "&amp;")
            .replace(/</g, "&lt;")
            .replace(/>/g, "&gt;")
            .replace(/\"/g, "&quot;")
            .replace(/\'/g, "&#39;");
        }
        function ft(n, t) {
          for (var r = "", i = 0; i < n; ++i) r += t(i);
          return r;
        }
        function i(n, t) {
          var i,
            r = "";
          if (null != n)
            if (Array.isArray(n))
              for (i = 0; i < n.length; ++i) r += t(n[i], i);
            else
              "object" == typeof n &&
                Object.keys(n).forEach(function (i, u) {
                  r += t(n[i], i, u);
                });
          return r;
        }
        function di(n) {
          return "string" == typeof n
            ? "<f>" + t(n) + "</f>"
            : '<f t="array" ref="' + n.ref + '">' + t(n.src) + "</f>";
        }
        function p(n) {
          var t = Math.floor(n / 26) - 1;
          return (t >= 0 ? p(t) : "") + String.fromCharCode(65 + (n % 26));
        }
        function o(n, t) {
          return p(t) + (n + 1);
        }
        function c(n, t) {
          return "$" + p(t) + "$" + (n + 1);
        }
        function l(n) {
          var t = n.frozenRows || (n.freezePane || {}).rowSplit || 1;
          return t - 1;
        }
        function w(n) {
          var t = 7;
          return n / t - Math.floor(128 / t) / 256;
        }
        function gi(n) {
          return 0.75 * n;
        }
        function nr(n) {
          return (n + "")
            .replace(/[\x00-\x09\x0B\x0C\x0E-\x1F]/g, "")
            .replace(/\r?\n/g, "\r\n");
        }
        function b(n) {
          var t = n;
          return (
            t.length < 6 &&
              (t = t.replace(/(\w)/g, function (n, t) {
                return t + t;
              })),
            (t = t.substring(1).toUpperCase()),
            t.length < 8 && (t = "FF" + t),
            t
          );
        }
        function tr(n) {
          var t = "thin";
          return 2 === n ? (t = "medium") : 3 === n && (t = "thick"), t;
        }
        function a(n, t) {
          var i = "";
          return (
            t &&
              ((i += "<" + n + ' style="' + tr(t.size) + '">'),
              t.color && (i += '<color rgb="' + b(t.color) + '"/>'),
              (i += "</" + n + ">")),
            i
          );
        }
        function ir(n) {
          return (
            "<border>" +
            a("left", n.left) +
            a("right", n.right) +
            a("top", n.top) +
            a("bottom", n.bottom) +
            "</border>"
          );
        }
        function rr(n, t) {
          var r,
            f,
            i,
            u = [],
            e = [];
          for (
            ur(n, function (n, t) {
              var i = {
                _source: n,
                index: t,
                height: n.height,
                level: n.level,
                cells: [],
              };
              u.push(i);
              e[t] = i;
            }),
              r = et(u).slice(0),
              f = { rowData: u, rowsByIndex: e, mergedCells: t },
              i = 0;
            i < r.length;
            i++
          )
            or(r[i], f), delete r[i]._source;
          return et(u);
        }
        function ur(n, t) {
          for (var r, u, i = 0; i < n.length; i++)
            (r = n[i]),
              r && ((u = r.index), "number" != typeof u && (u = i), t(r, u));
        }
        function et(n) {
          return n.sort(function (n, t) {
            return n.index - t.index;
          });
        }
        function fr(n, t) {
          n.indexOf(t) < 0 && n.push(t);
        }
        function er(n, t) {
          for (var e, f, i, r, u = 0; u < n.length; ++u)
            if (((e = n[u]), (f = e.split(":")), (i = f[0]), i === t))
              return (
                (r = f[1]),
                (i = s(i)),
                (r = s(r)),
                { rowSpan: r.row - i.row + 1, colSpan: r.col - i.col + 1 }
              );
        }
        function s(n) {
          function i(n) {
            for (var r = n.toUpperCase(), i = 0, t = 0; t < r.length; ++t)
              i = 26 * i + r.charCodeAt(t) - 64;
            return i - 1;
          }
          function r(n) {
            return parseInt(n, 10) - 1;
          }
          var t = /^([a-z]+)(\d+)$/i.exec(n);
          return { row: r(t[2]), col: i(t[1]) };
        }
        function v(n) {
          return Math.round(9525 * n);
        }
        function or(n, t) {
          var h,
            u,
            i,
            r,
            e,
            a,
            c,
            f,
            s,
            p = n._source,
            l = n.index,
            v = p.cells,
            y = n.cells;
          if (v)
            for (h = 0; h < v.length; h++)
              if (
                ((u = v[h] || it),
                (i = u.rowSpan || 1),
                (r = u.colSpan || 1),
                (e = sr(y, u)),
                (a = o(l, e)),
                1 === i &&
                  1 === r &&
                  ((c = er(t.mergedCells, a)),
                  c && ((r = c.colSpan), (i = c.rowSpan))),
                st(u, y, e, r),
                (i > 1 || r > 1) &&
                  fr(t.mergedCells, a + ":" + o(l + i - 1, e + r - 1)),
                i > 1)
              )
                for (f = l + 1; f < l + i; f++)
                  (s = t.rowsByIndex[f]),
                    s ||
                      ((s = t.rowsByIndex[f] = { index: f, cells: [] }),
                      t.rowData.push(s)),
                    st(u, s.cells, e - 1, r + 1);
        }
        function sr(n, t) {
          var i;
          return (
            "number" == typeof t.index
              ? ((i = t.index), ot(n, t, t.index))
              : (i = hr(n, t)),
            i
          );
        }
        function ot(n, t, i) {
          n[i] = t;
        }
        function hr(n, t) {
          for (var r = n.length, i = 0; i < n.length + 1; i++)
            if (!n[i]) {
              n[i] = t;
              r = i;
              break;
            }
          return r;
        }
        function st(n, t, i, r) {
          for (var f, u = 1; u < r; u++)
            (f = {
              borderTop: n.borderTop,
              borderRight: n.borderRight,
              borderBottom: n.borderBottom,
              borderLeft: n.borderLeft,
            }),
              ot(t, f, i + u);
        }
        function f(n) {
          return li({
            ref: n.ref,
            columns: n.columns,
            generators: { custom: ai, dynamic: vi, top: yi, value: pi },
          });
        }
        var ht,
          u,
          ct,
          k,
          h,
          lt,
          d,
          at,
          g,
          vt,
          yt,
          nt,
          r,
          pt,
          wt,
          bt,
          kt,
          dt,
          gt,
          ni,
          ti,
          ii,
          ri,
          ui,
          fi,
          ei,
          oi,
          tt,
          si,
          hi,
          y,
          ci,
          it,
          li,
          ai,
          vi,
          yi,
          pi;
        window.kendo.ooxml = window.kendo.ooxml || {};
        ht = kendo.ooxml;
        u = n.map;
        ct = ht.createZip;
        k = {
          toString: function (n) {
            return n;
          },
        };
        h = kendo.Class.extend({});
        h.register = function (n) {
          k = n;
        };
        h.toString = function (n, t) {
          return k.toString(n, t);
        };
        lt = rt(1900, 0, -1);
        d = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
        at = "data:" + d + ";base64,";
        g = { compression: "DEFLATE", type: "base64" };
        vt = { compression: "DEFLATE", type: "blob" };
        yt = { compression: "DEFLATE", type: "arraybuffer" };
        nt = JSON.parse.bind(JSON);
        r = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r';
        pt =
          r +
          '\n            <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n               <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>\n               <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>\n               <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>\n            </Relationships>';
        wt = function (n) {
          var i = n.creator,
            u = n.lastModifiedBy,
            f = n.created,
            e = n.modified;
          return (
            r +
            '\n <cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties"\n   xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"\n   xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n   <dc:creator>' +
            t(i) +
            "</dc:creator>\n   <cp:lastModifiedBy>" +
            t(u) +
            '</cp:lastModifiedBy>\n   <dcterms:created xsi:type="dcterms:W3CDTF">' +
            t(f) +
            '</dcterms:created>\n   <dcterms:modified xsi:type="dcterms:W3CDTF">' +
            t(e) +
            "</dcterms:modified>\n</cp:coreProperties>"
          );
        };
        bt = function (n) {
          var u = n.sheets;
          return (
            r +
            '\n<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">\n  <Application>Microsoft Excel</Application>\n  <DocSecurity>0</DocSecurity>\n  <ScaleCrop>false</ScaleCrop>\n  <HeadingPairs>\n    <vt:vector size="2" baseType="variant">\n      <vt:variant>\n        <vt:lpstr>Worksheets</vt:lpstr>\n      </vt:variant>\n      <vt:variant>\n        <vt:i4>' +
            u.length +
            '</vt:i4>\n      </vt:variant>\n    </vt:vector>\n  </HeadingPairs>\n  <TitlesOfParts>\n    <vt:vector size="' +
            u.length +
            '" baseType="lpstr">' +
            i(u, function (n, i) {
              return n.options.title
                ? "<vt:lpstr>" + t(n.options.title) + "</vt:lpstr>"
                : "<vt:lpstr>Sheet" + (i + 1) + "</vt:lpstr>";
            }) +
            "</vt:vector>\n  </TitlesOfParts>\n  <LinksUpToDate>false</LinksUpToDate>\n  <SharedDoc>false</SharedDoc>\n  <HyperlinksChanged>false</HyperlinksChanged>\n  <AppVersion>14.0300</AppVersion>\n</Properties>"
          );
        };
        kt = function (n) {
          var t = n.sheetCount,
            u = n.commentFiles,
            f = n.drawingFiles;
          return (
            r +
            '\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">\n  <Default Extension="png" ContentType="image/png"/>\n  <Default Extension="gif" ContentType="image/gif"/>\n  <Default Extension="jpg" ContentType="image/jpeg"/>\n  <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" />\n  <Default Extension="xml" ContentType="application/xml" />\n  <Default Extension="vml" ContentType="application/vnd.openxmlformats-officedocument.vmlDrawing"/>\n  <Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" />\n  <Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>\n  <Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/>\n  ' +
            ft(t, function (n) {
              return (
                '<Override PartName="/xl/worksheets/sheet' +
                (n + 1) +
                '.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />'
              );
            }) +
            "\n  " +
            i(u, function (n) {
              return (
                '<Override PartName="/xl/' +
                n +
                '" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"/>'
              );
            }) +
            "\n  " +
            i(f, function (n) {
              return (
                '<Override PartName="/xl/drawings/' +
                n +
                '" ContentType="application/vnd.openxmlformats-officedocument.drawing+xml"/>'
              );
            }) +
            '\n  <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />\n  <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" />\n</Types>'
          );
        };
        dt = function (n) {
          var e = n.sheets,
            u = n.filterNames,
            f = n.userNames;
          return (
            r +
            '\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">\n  <fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="9303" />\n  <workbookPr defaultThemeVersion="124226" />\n  <bookViews>\n    <workbookView xWindow="240" yWindow="45" windowWidth="18195" windowHeight="7995" />\n  </bookViews>\n  <sheets>\n  ' +
            i(e, function (n, i) {
              var r = n.options,
                u = r.name || r.title || "Sheet" + (i + 1);
              return (
                '<sheet name="' +
                t(u) +
                '" sheetId="' +
                (i + 1) +
                '" r:id="rId' +
                (i + 1) +
                '" />'
              );
            }) +
            "\n  </sheets>\n  " +
            (u.length || f.length
              ? "\n    <definedNames>\n      " +
                i(u, function (n) {
                  return (
                    '\n         <definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="' +
                    n.localSheetId +
                    '">' +
                    t(n.name) +
                    "!" +
                    t(n.from) +
                    ":" +
                    t(n.to) +
                    "</definedName>"
                  );
                }) +
                "\n      " +
                i(f, function (n) {
                  return (
                    '\n         <definedName name="' +
                    n.name +
                    '" hidden="' +
                    (n.hidden ? 1 : 0) +
                    '" ' +
                    (null != n.localSheetId
                      ? 'localSheetId="' + n.localSheetId + '"'
                      : "") +
                    ">" +
                    t(n.value) +
                    "</definedName>"
                  );
                }) +
                "\n    </definedNames>"
              : "") +
            '\n  <calcPr fullCalcOnLoad="1" calcId="145621" />\n</workbook>'
          );
        };
        gt = function (n) {
          var s = n.frozenColumns,
            h = n.frozenRows,
            o = n.columns,
            u = n.defaults,
            k = n.data,
            d = n.index,
            c = n.mergeCells,
            l = n.autoFilter,
            a = n.filter,
            g = n.showGridLines,
            v = n.hyperlinks,
            y = n.validations,
            e = n.defaultCellStyleId,
            nt = n.rtl,
            p = n.legacyDrawing,
            b = n.drawing,
            tt = n.lastRow;
          return (
            r +
            '\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" mc:Ignorable="x14ac">\n   <dimension ref="A1:A' +
            tt +
            '" />\n\n   <sheetViews>\n     <sheetView ' +
            (nt ? 'rightToLeft="1"' : "") +
            " " +
            (0 === d ? 'tabSelected="1"' : "") +
            ' workbookViewId="0" ' +
            (g === !1 ? 'showGridLines="0"' : "") +
            ">\n     " +
            (h || s
              ? '\n       <pane state="frozen"\n         ' +
                (s ? 'xSplit="' + s + '"' : "") +
                "\n         " +
                (h ? 'ySplit="' + h + '"' : "") +
                '\n         topLeftCell="' +
                (String.fromCharCode(65 + (s || 0)) + ((h || 0) + 1)) +
                '"\n       />'
              : "") +
            '\n     </sheetView>\n   </sheetViews>\n\n   <sheetFormatPr x14ac:dyDescent="0.25" customHeight="1" defaultRowHeight="' +
            (u.rowHeight ? 0.75 * u.rowHeight : 15) +
            '"\n     ' +
            (u.columnWidth
              ? 'defaultColWidth="' + w(u.columnWidth) + '"'
              : "") +
            " />\n\n   " +
            (null != e || (o && o.length > 0)
              ? "\n     <cols>\n       " +
                (o && o.length
                  ? ""
                  : '\n         <col min="1" max="16384" style="' +
                    e +
                    '"\n              ' +
                    (u.columnWidth ? 'width="' + w(u.columnWidth) + '"' : "") +
                    " /> ") +
                "\n       " +
                i(o, function (n, t) {
                  var i = "number" == typeof n.index ? n.index + 1 : t + 1;
                  return 0 === n.width
                    ? "<col " +
                        (null != e ? 'style="' + e + '"' : "") +
                        '\n                        min="' +
                        i +
                        '" max="' +
                        i +
                        '" hidden="1" customWidth="1" />'
                    : "<col " +
                        (null != e ? 'style="' + e + '"' : "") +
                        '\n                      min="' +
                        i +
                        '" max="' +
                        i +
                        '" customWidth="1"\n                      ' +
                        (n.autoWidth
                          ? 'width="' +
                            (7 * n.width + 5) / 7 / 1 +
                            '" bestFit="1"'
                          : 'width="' + w(n.width) + '"') +
                        " />";
                }) +
                "\n     </cols>"
              : "") +
            "\n\n   <sheetData>\n     " +
            i(k, function (n, r) {
              var u = "number" == typeof n.index ? n.index + 1 : r + 1;
              return (
                '\n         <row r="' +
                u +
                '" x14ac:dyDescent="0.25"\n              ' +
                (n.level ? 'outlineLevel="' + n.level + '"' : "") +
                "\n              " +
                (0 === n.height
                  ? 'hidden="1"'
                  : n.height
                  ? 'ht="' + gi(n.height) + '" customHeight="1"'
                  : "") +
                ">\n           " +
                i(n.data, function (n) {
                  return (
                    '\n             <c r="' +
                    n.ref +
                    '" ' +
                    (n.style ? 's="' + n.style + '"' : "") +
                    " " +
                    (n.type ? 't="' + n.type + '"' : "") +
                    ">\n               " +
                    (null != n.formula ? di(n.formula) : "") +
                    "\n               " +
                    (null != n.value ? "<v>" + t(n.value) + "</v>" : "") +
                    "\n             </c>"
                  );
                }) +
                "\n         </row>\n       "
              );
            }) +
            "\n   </sheetData>\n\n   " +
            (l
              ? '<autoFilter ref="' + l.from + ":" + l.to + '"/>'
              : a
              ? f(a)
              : "") +
            "\n\n   " +
            (c.length
              ? '\n     <mergeCells count="' +
                c.length +
                '">\n       ' +
                i(c, function (n) {
                  return '<mergeCell ref="' + n + '"/>';
                }) +
                "\n     </mergeCells>"
              : "") +
            "\n\n   " +
            (y.length
              ? "\n     <dataValidations>\n       " +
                i(y, function (n) {
                  return (
                    '\n         <dataValidation sqref="' +
                    n.sqref.join(" ") +
                    '"\n                         showErrorMessage="' +
                    n.showErrorMessage +
                    '"\n                         type="' +
                    t(n.type) +
                    '"\n                         ' +
                    ("list" !== n.type
                      ? 'operator="' + t(n.operator) + '"'
                      : "") +
                    '\n                         allowBlank="' +
                    n.allowBlank +
                    '"\n                         showDropDown="' +
                    n.showDropDown +
                    '"\n                         ' +
                    (n.error ? 'error="' + t(n.error) + '"' : "") +
                    "\n                         " +
                    (n.errorTitle
                      ? 'errorTitle="' + t(n.errorTitle) + '"'
                      : "") +
                    ">\n           " +
                    (n.formula1
                      ? "<formula1>" + t(n.formula1) + "</formula1>"
                      : "") +
                    "\n           " +
                    (n.formula2
                      ? "<formula2>" + t(n.formula2) + "</formula2>"
                      : "") +
                    "\n         </dataValidation>"
                  );
                }) +
                "\n     </dataValidations>"
              : "") +
            "\n\n   " +
            (v.length
              ? "\n     <hyperlinks>\n       " +
                i(v, function (n) {
                  return (
                    '\n         <hyperlink ref="' +
                    n.ref +
                    '" r:id="' +
                    n.rId +
                    '"/>'
                  );
                }) +
                "\n     </hyperlinks>"
              : "") +
            '\n\n   <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" />\n   ' +
            (p ? '<legacyDrawing r:id="' + p + '"/>' : "") +
            "\n   " +
            (b ? '<drawing r:id="' + b + '"/>' : "") +
            "\n</worksheet>"
          );
        };
        ni = function (n) {
          var t = n.count;
          return (
            r +
            '\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n  ' +
            ft(t, function (n) {
              return (
                '\n    <Relationship Id="rId' +
                (n + 1) +
                '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet' +
                (n + 1) +
                '.xml" />'
              );
            }) +
            '\n  <Relationship Id="rId' +
            (t + 1) +
            '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />\n  <Relationship Id="rId' +
            (t + 2) +
            '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />\n</Relationships>'
          );
        };
        ti = function (n) {
          var f = n.hyperlinks,
            e = n.comments,
            u = n.sheetIndex,
            o = n.drawings;
          return (
            r +
            '\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n  ' +
            i(f, function (n) {
              return (
                '\n    <Relationship Id="' +
                n.rId +
                '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="' +
                t(n.target) +
                '" TargetMode="External" />'
              );
            }) +
            "\n  " +
            (e.length
              ? '\n    <Relationship Id="comment' +
                u +
                '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" Target="../comments' +
                u +
                '.xml"/>\n    <Relationship Id="vml' +
                u +
                '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing" Target="../drawings/vmlDrawing' +
                u +
                '.vml"/>'
              : "") +
            "\n  " +
            (o.length
              ? '\n    <Relationship Id="drw' +
                u +
                '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing" Target="../drawings/drawing' +
                u +
                '.xml"/>'
              : "") +
            "\n</Relationships>"
          );
        };
        ii = function (n) {
          var u = n.comments;
          return (
            r +
            '\n<comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">\n  <authors>\n    <author></author>\n  </authors>\n  <commentList>\n    ' +
            i(u, function (n) {
              return (
                '\n      <comment ref="' +
                n.ref +
                '" authorId="0">\n        <text>\n          <r>\n            <rPr>\n              <sz val="8"/>\n              <color indexed="81"/>\n              <rFont val="Tahoma"/>\n              <charset val="1"/>\n            </rPr>\n            <t>' +
                t(n.text) +
                "</t>\n          </r>\n        </text>\n      </comment>"
              );
            }) +
            "\n  </commentList>\n</comments>"
          );
        };
        ri = function (n) {
          var t = n.comments;
          return (
            '<xml xmlns:v="urn:schemas-microsoft-com:vml"\n     xmlns:o="urn:schemas-microsoft-com:office:office"\n     xmlns:x="urn:schemas-microsoft-com:office:excel">\n  <v:shapetype id="_x0000_t202" path="m,l,21600r21600,l21600,xe"></v:shapetype>\n  ' +
            i(t, function (n) {
              return (
                '\n    <v:shape type="#_x0000_t202" style="visibility: hidden" fillcolor="#ffffe1" o:insetmode="auto">\n      <v:shadow on="t" color="black" obscured="t"/>\n      <x:ClientData ObjectType="Note">\n        <x:MoveWithCells/>\n        <x:SizeWithCells/>\n        <x:Anchor>' +
                n.anchor +
                "</x:Anchor>\n        <x:AutoFill>False</x:AutoFill>\n        <x:Row>" +
                n.row +
                "</x:Row>\n        <x:Column>" +
                n.col +
                "</x:Column>\n      </x:ClientData>\n    </v:shape>"
              );
            }) +
            "\n</xml>"
          );
        };
        ui = function (n) {
          return (
            r +
            '\n<xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"\n          xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"\n          xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">\n  ' +
            i(n, function (n, t) {
              return (
                '\n    <xdr:oneCellAnchor editAs="oneCell">\n      <xdr:from>\n        <xdr:col>' +
                n.col +
                "</xdr:col>\n        <xdr:colOff>" +
                n.colOffset +
                "</xdr:colOff>\n        <xdr:row>" +
                n.row +
                "</xdr:row>\n        <xdr:rowOff>" +
                n.rowOffset +
                '</xdr:rowOff>\n      </xdr:from>\n      <xdr:ext cx="' +
                n.width +
                '" cy="' +
                n.height +
                '" />\n      <xdr:pic>\n        <xdr:nvPicPr>\n          <xdr:cNvPr id="' +
                (t + 1) +
                '" name="Picture ' +
                (t + 1) +
                '"/>\n          <xdr:cNvPicPr/>\n        </xdr:nvPicPr>\n        <xdr:blipFill>\n          <a:blip r:embed="' +
                n.imageId +
                '"/>\n          <a:stretch>\n            <a:fillRect/>\n          </a:stretch>\n        </xdr:blipFill>\n        <xdr:spPr>\n          <a:prstGeom prst="rect">\n            <a:avLst/>\n          </a:prstGeom>\n        </xdr:spPr>\n      </xdr:pic>\n      <xdr:clientData/>\n    </xdr:oneCellAnchor>'
              );
            }) +
            "\n</xdr:wsDr>"
          );
        };
        fi = function (n) {
          return (
            r +
            '\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n  ' +
            i(n, function (n) {
              return (
                '\n    <Relationship Id="' +
                n.rId +
                '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="' +
                n.target +
                '"/>'
              );
            }) +
            "\n</Relationships>"
          );
        };
        ei = function (n) {
          var u = n.count,
            f = n.uniqueCount,
            e = n.indexes;
          return (
            r +
            '\n<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="' +
            u +
            '" uniqueCount="' +
            f +
            '">\n  ' +
            i(Object.keys(e), function (n) {
              return (
                '\n    <si><t xml:space="preserve">' +
                t(n.substring(1)) +
                "</t></si>"
              );
            }) +
            "\n</sst>"
          );
        };
        oi = function (n) {
          var u = n.formats,
            f = n.fonts,
            e = n.fills,
            o = n.borders,
            s = n.styles;
          return (
            r +
            '\n<styleSheet\n    xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"\n    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"\n    mc:Ignorable="x14ac"\n    xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">\n  <numFmts count="' +
            u.length +
            '">\n  ' +
            i(u, function (n, i) {
              return (
                '\n    <numFmt formatCode="' +
                t(n.format) +
                '" numFmtId="' +
                (165 + i) +
                '" />'
              );
            }) +
            '\n  </numFmts>\n  <fonts count="' +
            (f.length + 1) +
            '" x14ac:knownFonts="1">\n    <font>\n       <sz val="11" />\n       <color theme="1" />\n       <name val="Calibri" />\n       <family val="2" />\n       <scheme val="minor" />\n    </font>\n    ' +
            i(f, function (n) {
              return (
                '\n    <font>\n      <sz val="' +
                (n.fontSize || 11) +
                '" />\n      ' +
                (n.bold ? "<b/>" : "") +
                "\n      " +
                (n.italic ? "<i/>" : "") +
                "\n      " +
                (n.underline ? "<u/>" : "") +
                "\n      " +
                (n.color
                  ? '<color rgb="' + t(n.color) + '" />'
                  : '<color theme="1" />') +
                "\n      " +
                (n.fontFamily
                  ? '\n        <name val="' +
                    t(n.fontFamily) +
                    '" />\n        <family val="2" />\n      '
                  : '\n        <name val="Calibri" />\n        <family val="2" />\n        <scheme val="minor" />\n      ') +
                "\n    </font>"
              );
            }) +
            '\n  </fonts>\n  <fills count="' +
            (e.length + 2) +
            '">\n      <fill><patternFill patternType="none"/></fill>\n      <fill><patternFill patternType="gray125"/></fill>\n    ' +
            i(e, function (n) {
              return (
                "\n      " +
                (n.background
                  ? '\n        <fill>\n          <patternFill patternType="solid">\n              <fgColor rgb="' +
                    t(n.background) +
                    '"/>\n          </patternFill>\n        </fill>\n      '
                  : "")
              );
            }) +
            '\n  </fills>\n  <borders count="' +
            (o.length + 1) +
            '">\n    <border><left/><right/><top/><bottom/><diagonal/></border>\n    ' +
            i(o, ir) +
            '\n  </borders>\n  <cellStyleXfs count="1">\n    <xf borderId="0" fillId="0" fontId="0" />\n  </cellStyleXfs>\n  <cellXfs count="' +
            (s.length + 1) +
            '">\n    <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />\n    ' +
            i(s, function (n) {
              return (
                '\n      <xf xfId="0"\n          ' +
                (n.fontId ? 'fontId="' + n.fontId + '" applyFont="1"' : "") +
                "\n          " +
                (n.fillId ? 'fillId="' + n.fillId + '" applyFill="1"' : "") +
                "\n          " +
                (n.numFmtId
                  ? 'numFmtId="' + n.numFmtId + '" applyNumberFormat="1"'
                  : "") +
                "\n          " +
                (n.textAlign || n.verticalAlign || n.wrap
                  ? 'applyAlignment="1"'
                  : "") +
                "\n          " +
                (n.borderId
                  ? 'borderId="' + n.borderId + '" applyBorder="1"'
                  : "") +
                ">\n        " +
                (n.textAlign || n.verticalAlign || n.wrap
                  ? "\n        <alignment\n          " +
                    (n.textAlign ? 'horizontal="' + t(n.textAlign) + '"' : "") +
                    "\n          " +
                    (n.verticalAlign
                      ? 'vertical="' + t(n.verticalAlign) + '"'
                      : "") +
                    "\n          " +
                    (n.indent ? 'indent="' + t(n.indent) + '"' : "") +
                    "\n          " +
                    (n.wrap ? 'wrapText="1"' : "") +
                    " />\n        "
                  : "") +
                "\n      </xf>\n    "
              );
            }) +
            '\n  </cellXfs>\n  <cellStyles count="1">\n    <cellStyle name="Normal" xfId="0" builtinId="0"/>\n  </cellStyles>\n  <dxfs count="0" />\n  <tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleMedium9" />\n</styleSheet>'
          );
        };
        tt = kendo.Class.extend({
          init: function (t, i, r, u) {
            this.options = t;
            this._strings = i;
            this._styles = r;
            this._borders = u;
            this._validations = {};
            this._comments = [];
            this._drawings = t.drawings || [];
            this._hyperlinks = (this.options.hyperlinks || []).map(function (
              t,
              i
            ) {
              return n.extend({}, t, { rId: "link" + i });
            });
          },
          relsToXML: function () {
            var n = this._hyperlinks,
              t = this._comments,
              i = this._drawings;
            if (n.length || t.length || i.length)
              return ti({
                hyperlinks: n,
                comments: t,
                sheetIndex: this.options.sheetIndex,
                drawings: i,
              });
          },
          toXML: function (n) {
            var t,
              s,
              i,
              r,
              u,
              f,
              e,
              h,
              c = this,
              a = this.options.mergedCells || [],
              y = this.options.rows || [],
              v = rr(y, a);
            this._readCells(v);
            t = this.options.filter;
            t && "number" == typeof t.from && "number" == typeof t.to
              ? (t = {
                  from: o(l(this.options), t.from),
                  to: o(l(this.options), t.to),
                })
              : t && t.ref && t.columns && ((s = t), (t = null));
            i = [];
            for (r in this._validations)
              Object.prototype.hasOwnProperty.call(c._validations, r) &&
                i.push(c._validations[r]);
            return (
              (u = null),
              this.options.defaultCellStyle &&
                (u = this._lookupStyle(this.options.defaultCellStyle)),
              (f = this.options.freezePane || {}),
              (e = this.options.defaults || {}),
              (h = this.options.rows ? this._getLastRow() : 1),
              gt({
                frozenColumns: this.options.frozenColumns || f.colSplit,
                frozenRows: this.options.frozenRows || f.rowSplit,
                columns: this.options.columns,
                defaults: e,
                data: v,
                index: n,
                mergeCells: a,
                autoFilter: t,
                filter: s,
                showGridLines: this.options.showGridLines,
                hyperlinks: this._hyperlinks,
                validations: i,
                defaultCellStyleId: u,
                rtl: void 0 !== this.options.rtl ? this.options.rtl : e.rtl,
                legacyDrawing: this._comments.length
                  ? "vml" + this.options.sheetIndex
                  : null,
                drawing: this._drawings.length
                  ? "drw" + this.options.sheetIndex
                  : null,
                lastRow: h,
              })
            );
          },
          commentsXML: function () {
            if (this._comments.length) return ii({ comments: this._comments });
          },
          drawingsXML: function (n) {
            var t, i;
            if (this._drawings.length)
              return (
                (t = {}),
                (i = this._drawings.map(function (i) {
                  var u = s(i.topLeftCell),
                    r = t[i.image];
                  return (
                    r ||
                      (r = t[i.image] =
                        { rId: "img" + i.image, target: n[i.image].target }),
                    {
                      col: u.col,
                      colOffset: v(i.offsetX),
                      row: u.row,
                      rowOffset: v(i.offsetY),
                      width: v(i.width),
                      height: v(i.height),
                      imageId: r.rId,
                    }
                  );
                })),
                { main: ui(i), rels: fi(t) }
              );
          },
          legacyDrawing: function () {
            if (this._comments.length) return ri({ comments: this._comments });
          },
          _lookupString: function (n) {
            var t,
              i = "$" + n,
              r = this._strings.indexes[i];
            return (
              void 0 !== r
                ? (t = r)
                : ((t = this._strings.indexes[i] = this._strings.uniqueCount),
                  this._strings.uniqueCount++),
              this._strings.count++,
              t
            );
          },
          _lookupStyle: function (n) {
            var t,
              i = JSON.stringify(n);
            return "{}" === i
              ? 0
              : ((t = e(i, this._styles)),
                t < 0 && (t = this._styles.push(i) - 1),
                t + 1);
          },
          _lookupBorder: function (n) {
            var t,
              i = JSON.stringify(n);
            if ("{}" !== i)
              return (
                (t = e(i, this._borders)),
                t < 0 && (t = this._borders.push(i) - 1),
                t + 1
              );
          },
          _readCells: function (n) {
            for (var t, u, i, f, e = this, r = 0; r < n.length; r++)
              for (t = n[r], u = t.cells, t.data = [], i = 0; i < u.length; i++)
                (f = e._cell(u[i], t.index, i)), f && t.data.push(f);
          },
          _cell: function (n, t, i) {
            var r, f, a, e, v, s, u, l, c, y;
            return n && n !== it
              ? ((r = n.value),
                (f = {}),
                n.borderLeft && (f.left = n.borderLeft),
                n.borderRight && (f.right = n.borderRight),
                n.borderTop && (f.top = n.borderTop),
                n.borderBottom && (f.bottom = n.borderBottom),
                (f = this._lookupBorder(f)),
                (a = this.options.defaultCellStyle || {}),
                (e = { borderId: f }),
                (function (n) {
                  n("color");
                  n("background");
                  n("bold");
                  n("italic");
                  n("underline");
                  n("fontFamily") || n("fontName", "fontFamily");
                  n("fontSize");
                  n("format");
                  n("textAlign") || n("hAlign", "textAlign");
                  n("verticalAlign") || n("vAlign", "verticalAlign");
                  n("wrap");
                  n("indent");
                })(function (t, i) {
                  var r = n[t];
                  if ((void 0 === r && (r = a[t]), void 0 !== r))
                    return (e[i || t] = r), !0;
                }),
                (v = this.options.columns || []),
                (s = v[i]),
                (u = typeof r),
                s &&
                  s.autoWidth &&
                  ((l = r),
                  "number" === u && (l = h.toString(r, n.format)),
                  (s.width = Math.max(s.width || 0, (l + "").length))),
                "string" === u
                  ? ((r = nr(r)), (r = this._lookupString(r)), (u = "s"))
                  : "number" === u
                  ? (u = "n")
                  : "boolean" === u
                  ? ((u = "b"), (r = +r))
                  : r && r.getTime
                  ? ((u = null),
                    (r = ki(r)),
                    e.format || (e.format = "mm-dd-yy"))
                  : ((u = null), (r = null)),
                (e = this._lookupStyle(e)),
                (c = o(t, i)),
                n.validation && this._addValidation(n.validation, c),
                n.comment &&
                  ((y = [i + 1, 15, t, 10, i + 3, 15, t + 3, 4]),
                  this._comments.push({
                    ref: c,
                    text: n.comment,
                    row: t,
                    col: i,
                    anchor: y.join(", "),
                  })),
                { value: r, formula: n.formula, type: u, style: e, ref: c })
              : null;
          },
          _addValidation: function (n, t) {
            var i = {
                showErrorMessage: "reject" === n.type ? 1 : 0,
                formula1: n.from,
                formula2: n.to,
                type: hi[n.dataType] || n.dataType,
                operator: si[n.comparerType] || n.comparerType,
                allowBlank: n.allowNulls ? 1 : 0,
                showDropDown: n.showButton ? 0 : 1,
                error: n.messageTemplate,
                errorTitle: n.titleTemplate,
              },
              r = JSON.stringify(i);
            this._validations[r] ||
              ((this._validations[r] = i), (i.sqref = []));
            this._validations[r].sqref.push(t);
          },
          _getLastRow: function () {
            var t = this.options.rows,
              n = t.length;
            return (
              t.forEach(function (t) {
                t.index && t.index >= n && (n = t.index + 1);
              }),
              n
            );
          },
        });
        si = {
          greaterThanOrEqualTo: "greaterThanOrEqual",
          lessThanOrEqualTo: "lessThanOrEqual",
        };
        hi = { number: "decimal" };
        y = {
          General: 0,
          0: 1,
          "0.00": 2,
          "#,##0": 3,
          "#,##0.00": 4,
          "0%": 9,
          "0.00%": 10,
          "0.00E+00": 11,
          "# ?/?": 12,
          "# ??/??": 13,
          "mm-dd-yy": 14,
          "d-mmm-yy": 15,
          "d-mmm": 16,
          "mmm-yy": 17,
          "h:mm AM/PM": 18,
          "h:mm:ss AM/PM": 19,
          "h:mm": 20,
          "h:mm:ss": 21,
          "m/d/yy h:mm": 22,
          "#,##0 ;(#,##0)": 37,
          "#,##0 ;[Red](#,##0)": 38,
          "#,##0.00;(#,##0.00)": 39,
          "#,##0.00;[Red](#,##0.00)": 40,
          "mm:ss": 45,
          "[h]:mm:ss": 46,
          "mmss.0": 47,
          "##0.0E+0": 48,
          "@": 49,
          "[$-404]e/m/d": 27,
          "m/d/yy": 30,
          t0: 59,
          "t0.00": 60,
          "t#,##0": 61,
          "t#,##0.00": 62,
          "t0%": 67,
          "t0.00%": 68,
          "t# ?/?": 69,
          "t# ??/??": 70,
        };
        ci = kendo.Class.extend({
          init: function (n) {
            var t = this;
            this.options = n || {};
            this._strings = { indexes: {}, count: 0, uniqueCount: 0 };
            this._styles = [];
            this._borders = [];
            this._images = this.options.images;
            this._imgId = 0;
            this._sheets = u(this.options.sheets || [], function (n, i) {
              return (
                (n.defaults = t.options),
                (n.sheetIndex = i + 1),
                new tt(n, t._strings, t._styles, t._borders)
              );
            });
          },
          imageFilename: function (n) {
            var t = ++this._imgId;
            switch (n) {
              case "image/jpg":
              case "image/jpeg":
                return "image" + t + ".jpg";
              case "image/png":
                return "image" + t + ".png";
              case "image/gif":
                return "image" + t + ".gif";
              default:
                return "image" + t + ".bin";
            }
          },
          toZIP: function () {
            var o,
              lt,
              n,
              at,
              vt,
              w,
              k,
              h,
              yt,
              gt,
              d,
              g,
              i,
              t,
              tt,
              ti,
              it,
              rt,
              ut,
              a,
              ft,
              v,
              ii,
              r,
              et,
              ri,
              ot,
              st,
              ht,
              p = this,
              f = ct(),
              ui = f.folder("docProps");
            for (
              ui.file(
                "core.xml",
                wt({
                  creator: this.options.creator || "Kendo UI",
                  lastModifiedBy: this.options.creator || "Kendo UI",
                  created: this.options.date || new Date().toJSON(),
                  modified: this.options.date || new Date().toJSON(),
                })
              ),
                o = this._sheets.length,
                ui.file("app.xml", bt({ sheets: this._sheets })),
                lt = f.folder("_rels"),
                lt.file(".rels", pt),
                n = f.folder("xl"),
                at = n.folder("_rels"),
                at.file("workbook.xml.rels", ni({ count: o })),
                this._images &&
                  ((vt = n.folder("media")),
                  Object.keys(this._images).forEach(function (n) {
                    var t = p._images[n],
                      i = p.imageFilename(t.type);
                    vt.file(i, t.data);
                    t.target = "../media/" + i;
                  })),
                w = {},
                n.file(
                  "workbook.xml",
                  dt({
                    sheets: this._sheets,
                    filterNames: u(this._sheets, function (n, t) {
                      var i,
                        u,
                        f,
                        e,
                        r = n.options,
                        o = r.name || r.title || "Sheet" + (t + 1);
                      if (((w[o.toLowerCase()] = t), (i = r.filter))) {
                        if (i.ref)
                          return (
                            (u = i.ref.split(":")),
                            (f = s(u[0])),
                            (e = s(u[1])),
                            {
                              localSheetId: t,
                              name: o,
                              from: c(f.row, f.col),
                              to: c(e.row, e.col),
                            }
                          );
                        if (void 0 !== i.from && void 0 !== i.to)
                          return {
                            localSheetId: t,
                            name: o,
                            from: c(l(r), i.from),
                            to: c(l(r), i.to),
                          };
                      }
                    }),
                    userNames: u(this.options.names || [], function (n) {
                      return {
                        name: n.localName,
                        localSheetId: n.sheet ? w[n.sheet.toLowerCase()] : null,
                        value: n.value,
                        hidden: n.hidden,
                      };
                    }),
                  })
                ),
                k = n.folder("worksheets"),
                h = n.folder("drawings"),
                yt = h.folder("_rels"),
                gt = k.folder("_rels"),
                d = [],
                g = [],
                i = 0;
              i < o;
              i++
            )
              (t = p._sheets[i]),
                (tt = "sheet" + (i + 1) + ".xml"),
                (ti = t.toXML(i)),
                (it = t.relsToXML()),
                (rt = t.commentsXML()),
                (ut = t.legacyDrawing()),
                (a = t.drawingsXML(p._images)),
                it && gt.file(tt + ".rels", it),
                rt &&
                  ((ft = "comments" + t.options.sheetIndex + ".xml"),
                  n.file(ft, rt),
                  d.push(ft)),
                ut && h.file("vmlDrawing" + t.options.sheetIndex + ".vml", ut),
                a &&
                  ((v = "drawing" + t.options.sheetIndex + ".xml"),
                  h.file(v, a.main),
                  yt.file(v + ".rels", a.rels),
                  g.push(v)),
                k.file(tt, ti);
            return (
              (ii = u(this._borders, nt)),
              (r = u(this._styles, nt)),
              (et = function (n) {
                return (
                  n.underline ||
                  n.bold ||
                  n.italic ||
                  n.color ||
                  n.fontFamily ||
                  n.fontSize
                );
              }),
              (ri = function (n) {
                var t,
                  i = +n;
                return i && (t = (3 * i) / 4), t;
              }),
              (ot = u(r, function (n) {
                if (
                  (n.fontSize && (n.fontSize = ri(n.fontSize)),
                  n.color && (n.color = b(n.color)),
                  et(n))
                )
                  return n;
              })),
              (st = u(r, function (n) {
                if (n.format && void 0 === y[n.format]) return n;
              })),
              (ht = u(r, function (n) {
                if (n.background) return (n.background = b(n.background)), n;
              })),
              n.file(
                "styles.xml",
                oi({
                  fonts: ot,
                  fills: ht,
                  formats: st,
                  borders: ii,
                  styles: u(r, function (n) {
                    var t = {};
                    return (
                      et(n) && (t.fontId = e(n, ot) + 1),
                      n.background && (t.fillId = e(n, ht) + 2),
                      (t.textAlign = n.textAlign),
                      (t.indent = n.indent),
                      (t.verticalAlign = n.verticalAlign),
                      (t.wrap = n.wrap),
                      (t.borderId = n.borderId),
                      n.format &&
                        (t.numFmtId =
                          void 0 !== y[n.format]
                            ? y[n.format]
                            : 165 + e(n, st)),
                      t
                    );
                  }),
                })
              ),
              n.file("sharedStrings.xml", ei(this._strings)),
              f.file(
                "[Content_Types].xml",
                kt({ sheetCount: o, commentFiles: d, drawingFiles: g })
              ),
              f
            );
          },
          toDataURL: function () {
            var n = this.toZIP();
            return n.generateAsync
              ? n.generateAsync(g).then(ut)
              : ut(n.generate(g));
          },
          toBlob: function () {
            var n = this.toZIP();
            return n.generateAsync
              ? n.generateAsync(vt)
              : new Blob([n.generate(yt)], { type: d });
          },
        });
        it = {};
        li = function (n) {
          var t = n.ref,
            r = n.columns,
            u = n.generators;
          return (
            '\n<autoFilter ref="' +
            t +
            '">\n  ' +
            i(r, function (n) {
              return (
                '\n    <filterColumn colId="' +
                n.index +
                '">\n      ' +
                u[n.filter](n) +
                "\n    </filterColumn>\n  "
              );
            }) +
            "\n</autoFilter>"
          );
        };
        ai = function (n) {
          var t = n.logic,
            r = n.criteria;
          return (
            "\n<customFilters " +
            ("and" === t ? 'and="1"' : "") +
            ">\n" +
            i(r, function (n) {
              var t = f.customOperator(n),
                i = f.customValue(n);
              return (
                "<customFilter " +
                (t ? 'operator="' + t + '"' : "") +
                ' val="' +
                i +
                '"/>'
              );
            }) +
            "\n</customFilters>"
          );
        };
        vi = function (n) {
          var t = n.type;
          return '<dynamicFilter type="' + f.dynamicFilterType(t) + '" />';
        };
        yi = function (n) {
          var t = n.type,
            i = n.value;
          return (
            '<top10 percent="' +
            (/percent$/i.test(t) ? 1 : 0) +
            '"\n       top="' +
            (/^top/i.test(t) ? 1 : 0) +
            '"\n       val="' +
            i +
            '" />'
          );
        };
        pi = function (n) {
          var t = n.blanks,
            r = n.values;
          return (
            "<filters " +
            (t ? 'blank="1"' : "") +
            ">\n    " +
            i(r, function (n) {
              return '\n      <filter val="' + n + '" />';
            }) +
            "\n  </filters>"
          );
        };
        f.customOperator = function (n) {
          return {
            eq: "equal",
            gt: "greaterThan",
            gte: "greaterThanOrEqual",
            lt: "lessThan",
            lte: "lessThanOrEqual",
            ne: "notEqual",
            doesnotstartwith: "notEqual",
            doesnotendwith: "notEqual",
            doesnotcontain: "notEqual",
            doesnotmatch: "notEqual",
          }[n.operator.toLowerCase()];
        };
        f.customValue = function (n) {
          function t(n) {
            return n.replace(/([*?])/g, "~$1");
          }
          switch (n.operator.toLowerCase()) {
            case "startswith":
            case "doesnotstartwith":
              return t(n.value) + "*";
            case "endswith":
            case "doesnotendwith":
              return "*" + t(n.value);
            case "contains":
            case "doesnotcontain":
              return "*" + t(n.value) + "*";
            default:
              return n.value;
          }
        };
        f.dynamicFilterType = function (n) {
          return (
            {
              quarter1: "Q1",
              quarter2: "Q2",
              quarter3: "Q3",
              quarter4: "Q4",
              january: "M1",
              february: "M2",
              march: "M3",
              april: "M4",
              may: "M5",
              june: "M6",
              july: "M7",
              august: "M8",
              september: "M9",
              october: "M10",
              november: "M11",
              december: "M12",
            }[n.toLowerCase()] || n
          );
        };
        kendo.deepExtend(kendo.ooxml, {
          IntlService: h,
          Workbook: ci,
          Worksheet: tt,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("ooxml/main.min", ["kendo.core.min", "ooxml/kendo-ooxml.min"], n);
  })(
    function () {
      !(function (n) {
        var t = kendo.ooxml.Workbook;
        kendo.ooxml.IntlService.register({ toString: kendo.toString });
        kendo.ooxml.Workbook = t.extend({
          toDataURL: function () {
            var n = t.fn.toDataURL.call(this);
            if ("string" != typeof n)
              throw Error(
                "The toDataURL method can be used only with jsZip 2. Either include jsZip 2 or use the toDataURLAsync method."
              );
            return n;
          },
          toDataURLAsync: function () {
            var r = n.Deferred(),
              i = t.fn.toDataURL.call(this);
            return (
              "string" == typeof i
                ? (i = r.resolve(i))
                : i &&
                  i.then &&
                  i.then(
                    function (n) {
                      r.resolve(n);
                    },
                    function () {
                      r.reject();
                    }
                  ),
              r.promise()
            );
          },
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.ooxml.min", ["ooxml/main.min"], n);
  })(
    function () {},
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("excel/kendo-excel.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        function o(n) {
          return n.title + ": " + n.value;
        }
        function i(n, t) {
          for (var r = [], i = 0; i < n; i++) r.push(t(i));
          return r;
        }
        var r, f, u, t, e;
        window.kendo.excel = window.kendo.excel || {};
        r = kendo.getter;
        f = n.map;
        u = {
          compile: function (n) {
            return n;
          },
        };
        t = kendo.Class.extend({});
        t.register = function (n) {
          u = n;
        };
        t.compile = function (n) {
          return u.compile(n);
        };
        e = kendo.Class.extend({
          init: function (n) {
            n.columns = this._trimColumns(n.columns || []);
            this.allColumns = f(
              this._leafColumns(n.columns || []),
              this._prepareColumn
            );
            this.columns = this.allColumns.filter(function (n) {
              return !n.hidden;
            });
            this.options = n;
            this.data = n.data || [];
            this.aggregates = n.aggregates || {};
            this.groups = [].concat(n.groups || []);
            this.hierarchy = n.hierarchy;
          },
          workbook: function () {
            return {
              sheets: [
                {
                  columns: this._columns(),
                  rows: this.hierarchy ? this._hierarchyRows() : this._rows(),
                  freezePane: this._freezePane(),
                  filter: this._filter(),
                },
              ],
            };
          },
          _trimColumns: function (n) {
            var t = this;
            return n.filter(function (n) {
              var i = !!n.field;
              return (
                !i && n.columns && (i = t._trimColumns(n.columns).length > 0), i
              );
            });
          },
          _leafColumns: function (n) {
            for (var r = this, i = [], t = 0; t < n.length; t++)
              n[t].columns
                ? (i = i.concat(r._leafColumns(n[t].columns)))
                : i.push(n[t]);
            return i;
          },
          _prepareColumn: function (i) {
            var f, u;
            return i.field
              ? ((f = function (n) {
                  return r(i.field, !0)(n);
                }),
                (u = null),
                i.values &&
                  ((u = {}),
                  i.values.forEach(function (n) {
                    u[n.value] = n.text;
                  }),
                  (f = function (n) {
                    return u[r(i.field, !0)(n)];
                  })),
                n.extend({}, i, {
                  value: f,
                  values: u,
                  groupHeaderTemplate: i.groupHeaderTemplate
                    ? t.compile(i.groupHeaderTemplate)
                    : o,
                  groupFooterTemplate: i.groupFooterTemplate
                    ? t.compile(i.groupFooterTemplate)
                    : null,
                  footerTemplate: i.footerTemplate
                    ? t.compile(i.footerTemplate)
                    : null,
                }))
              : null;
          },
          _filter: function () {
            if (!this.options.filterable) return null;
            var n = this._depth();
            return { from: n, to: n + this.columns.length - 1 };
          },
          _createPaddingCells: function (t) {
            var r = this;
            return i(t, function () {
              return n.extend(
                { background: "#dfdfdf", color: "#333" },
                r.options.paddingCellOptions
              );
            });
          },
          _dataRow: function (t, i, r) {
            var u,
              o,
              s,
              a,
              h,
              c,
              e,
              f,
              v = this,
              l = this._createPaddingCells(i);
            if (r && t.items)
              return (
                (u = this.allColumns.filter(function (n) {
                  return n.field === t.field;
                })[0]),
                (o = u && u.title ? u.title : t.field),
                (s = u ? u.groupHeaderTemplate : null),
                (a = n.extend(
                  {
                    title: o,
                    field: t.field,
                    value: u && u.values ? u.values[t.value] : t.value,
                    aggregates: t.aggregates,
                    items: t.items,
                  },
                  t.aggregates[t.field]
                )),
                (h = o + ": " + t.value),
                s && (h = s(a)),
                l.push(
                  n.extend(
                    {
                      value: h,
                      background: "#dfdfdf",
                      color: "#333",
                      colSpan: this.columns.length + r - i,
                    },
                    (u || {}).groupHeaderCellOptions
                  )
                ),
                (c = this._dataRows(t.items, i + 1)),
                c.unshift({
                  type: "group-header",
                  cells: l,
                  level: this.options.collapsible ? i : null,
                }),
                c.concat(this._footer(t, i))
              );
            for (e = [], f = 0; f < this.columns.length; f++)
              e[f] = v._cell(t, v.columns[f]);
            return (
              this.hierarchy && (e[0].colSpan = r - i + 1),
              [
                {
                  type: "data",
                  cells: l.concat(e),
                  level: this.options.collapsible ? i : null,
                },
              ]
            );
          },
          _dataRows: function (n, t) {
            for (
              var u = this, f = this._depth(), r = [], i = 0;
              i < n.length;
              i++
            )
              r.push.apply(r, u._dataRow(n[i], t, f));
            return r;
          },
          _hierarchyRows: function () {
            for (
              var s,
                r,
                t,
                h,
                c = this,
                u = this._depth(),
                f = this.data,
                a = this.hierarchy.itemLevel,
                l = this._hasFooterTemplate(),
                n = [],
                o = [],
                e = 0,
                i = 0;
              i < f.length;
              i++
            )
              (r = f[i]),
                (t = a(r)),
                l &&
                  (t > e
                    ? o.push({ id: s, level: e })
                    : t < e && n.push.apply(n, c._hierarchyFooterRows(o, t, u)),
                  (e = t),
                  (s = r.id)),
                n.push.apply(n, c._dataRow(r, t + 1, u));
            return (
              l &&
                (n.push.apply(n, this._hierarchyFooterRows(o, 0, u)),
                (h = f.length ? this.aggregates[f[0].parentId] : {}),
                n.push(this._hierarchyFooter(h, 0, u))),
              this._prependHeaderRows(n),
              n
            );
          },
          _hierarchyFooterRows: function (n, t, i) {
            for (
              var r, u = this, f = [];
              n.length && n[n.length - 1].level >= t;

            )
              (r = n.pop()),
                f.push(u._hierarchyFooter(u.aggregates[r.id], r.level + 1, i));
            return f;
          },
          _hasFooterTemplate: function () {
            for (var t = this.columns, n = 0; n < t.length; n++)
              if (t[n].footerTemplate) return !0;
          },
          _hierarchyFooter: function (t, i, r) {
            var u = this.columns.map(function (u, f) {
              var e = f ? 1 : r - i + 1;
              return u.footerTemplate
                ? n.extend(
                    {
                      background: "#dfdfdf",
                      color: "#333",
                      colSpan: e,
                      value: u.footerTemplate(n.extend({}, (t || {})[u.field])),
                    },
                    u.footerCellOptions
                  )
                : n.extend(
                    { background: "#dfdfdf", color: "#333", colSpan: e },
                    u.footerCellOptions
                  );
            });
            return {
              type: "footer",
              cells: this._createPaddingCells(i).concat(u),
            };
          },
          _footer: function (t, i) {
            var r,
              u,
              f,
              e = [],
              o = this.columns.some(function (n) {
                return n.groupFooterTemplate;
              });
            return (
              o &&
                ((u = {
                  group: { items: t.items, field: t.field, value: t.value },
                }),
                (r = {}),
                Object.keys(t.aggregates).forEach(function (i) {
                  r[i] = n.extend({}, t.aggregates[i], u);
                })),
              (f = this.columns.map(function (i) {
                if (i.groupFooterTemplate) {
                  var f = n.extend({}, r, t.aggregates[i.field], u);
                  return n.extend(
                    {
                      background: "#dfdfdf",
                      color: "#333",
                      value: i.groupFooterTemplate(f),
                    },
                    i.groupFooterCellOptions
                  );
                }
                return n.extend(
                  { background: "#dfdfdf", color: "#333" },
                  i.groupFooterCellOptions
                );
              })),
              o &&
                e.push({
                  type: "group-footer",
                  cells: this._createPaddingCells(this.groups.length).concat(f),
                  level: this.options.collapsible ? i : null,
                }),
              e
            );
          },
          _isColumnVisible: function (n) {
            return (
              this._visibleColumns([n]).length > 0 && (n.field || n.columns)
            );
          },
          _visibleColumns: function (n) {
            var t = this;
            return n.filter(function (n) {
              var i = !n.hidden;
              return (
                i && n.columns && (i = t._visibleColumns(n.columns).length > 0),
                i
              );
            });
          },
          _headerRow: function (t, r) {
            var f = this,
              u = t.cells.map(function (i) {
                return n.extend(i, {
                  colSpan: i.colSpan > 1 ? i.colSpan : 1,
                  rowSpan: t.rowSpan > 1 && !i.colSpan ? t.rowSpan : 1,
                });
              });
            return (
              this.hierarchy && (u[0].colSpan = this._depth() + 1),
              {
                type: "header",
                cells: i(r.length, function () {
                  return n.extend(
                    { background: "#7a7a7a", color: "#fff" },
                    f.options.headerPaddingCellOptions
                  );
                }).concat(u),
              }
            );
          },
          _prependHeaderRows: function (n) {
            var t,
              r = this,
              u = this.groups,
              i = [{ rowSpan: 1, cells: [], index: 0 }];
            for (
              this._prepareHeaderRows(i, this.options.columns),
                t = i.length - 1;
              t >= 0;
              t--
            )
              n.unshift(r._headerRow(i[t], u));
          },
          _prepareHeaderRows: function (t, i, r, u) {
            for (
              var f,
                e,
                s = this,
                h = u || t[t.length - 1],
                c = t[h.index + 1],
                l = 0,
                o = 0;
              o < i.length;
              o++
            )
              (f = i[o]),
                s._isColumnVisible(f) &&
                  ((e = n.extend(
                    {
                      background: "#7a7a7a",
                      color: "#fff",
                      value: f.title || f.field,
                      colSpan: 0,
                    },
                    f.headerCellOptions
                  )),
                  h.cells.push(e),
                  f.columns &&
                    f.columns.length &&
                    (c ||
                      ((c = { rowSpan: 0, cells: [], index: t.length }),
                      t.push(c)),
                    (e.colSpan = s._trimColumns(
                      s._visibleColumns(f.columns)
                    ).length),
                    s._prepareHeaderRows(t, f.columns, e, c),
                    (l += e.colSpan - 1),
                    (h.rowSpan = t.length - h.index)));
            r && (r.colSpan += l);
          },
          _rows: function () {
            var t,
              r,
              u = this,
              i = this._dataRows(this.data, 0);
            return (
              this.columns.length &&
                (this._prependHeaderRows(i),
                (t = !1),
                (r = this.columns.map(function (i) {
                  return i.footerTemplate
                    ? ((t = !0),
                      n.extend(
                        {
                          background: "#dfdfdf",
                          color: "#333",
                          value: i.footerTemplate(
                            n.extend({}, u.aggregates, u.aggregates[i.field])
                          ),
                        },
                        i.footerCellOptions
                      ))
                    : n.extend(
                        { background: "#dfdfdf", color: "#333" },
                        i.footerCellOptions
                      );
                })),
                t &&
                  i.push({
                    type: "footer",
                    cells: this._createPaddingCells(this.groups.length).concat(
                      r
                    ),
                  })),
              i
            );
          },
          _headerDepth: function (n) {
            for (var i, u = this, r = 0, t = 0; t < n.length; t++)
              n[t].columns &&
                ((i = u._headerDepth(n[t].columns)), i > r && (r = i));
            return 1 + r;
          },
          _freezePane: function () {
            var n = this._visibleColumns(this.options.columns || []),
              t = this._visibleColumns(
                this._trimColumns(
                  this._leafColumns(
                    n.filter(function (n) {
                      return n.locked;
                    })
                  )
                )
              ).length;
            return {
              rowSplit: this._headerDepth(n),
              colSplit: t ? t + this.groups.length : 0,
            };
          },
          _cell: function (t, i) {
            return n.extend({ value: i.value(t) }, i.cellOptions);
          },
          _depth: function () {
            return this.hierarchy ? this.hierarchy.depth : this.groups.length;
          },
          _columns: function () {
            var n = this._depth(),
              t = i(n, function () {
                return { width: 20 };
              });
            return t.concat(
              this.columns.map(function (n) {
                return { width: parseInt(n.width, 10), autoWidth: !n.width };
              })
            );
          },
        });
        kendo.deepExtend(kendo.excel, { ExcelExporter: e, TemplateService: t });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "excel/main.min",
      ["kendo.core.min", "kendo.data.min", "excel/kendo-excel.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          var r = t.excel.ExcelExporter,
            i = n.extend;
          t.excel.TemplateService.register({ compile: t.template });
          t.ExcelExporter = t.Class.extend({
            init: function (n) {
              var r, u, f, e;
              if (
                ((this.options = n),
                (r = n.dataSource),
                r instanceof t.data.DataSource)
              ) {
                if (
                  (r.filter() || (r.options.filter = void 0),
                  (this.dataSource = new r.constructor(
                    i({}, r.options, {
                      page: n.allPages ? 0 : r.page(),
                      filter: r.filter(),
                      pageSize: n.allPages
                        ? r.total()
                        : r.pageSize() || r.total(),
                      sort: r.sort(),
                      group: r.group(),
                      aggregate: r.aggregate(),
                    })
                  )),
                  (u = r.data()),
                  u.length > 0)
                ) {
                  if (n.hierarchy)
                    for (f = 0; f < u.length; f++)
                      (u[f].expanded !== !1 && void 0 !== u[f].expanded) ||
                        (u[f].expanded = !0);
                  this.dataSource._data = u;
                  e = this.dataSource.transport;
                  r._isServerGrouped() &&
                    e.options &&
                    e.options.data &&
                    (e.options.data = null);
                }
              } else this.dataSource = t.data.DataSource.create(r);
            },
            _hierarchy: function () {
              var u,
                t,
                f,
                i,
                n = this.options.hierarchy,
                r = this.dataSource;
              if (n && r.level) {
                for (
                  n = {
                    itemLevel: function (n) {
                      return r.level(n);
                    },
                  },
                    u = r.view(),
                    t = 0,
                    i = 0;
                  i < u.length;
                  i++
                )
                  (f = r.level(u[i])), f > t && (t = f);
                n.depth = t + 1;
              } else n = !1;
              return { hierarchy: n };
            },
            workbook: function () {
              return n
                .Deferred(
                  n.proxy(function (t) {
                    this.dataSource.fetch().then(
                      n.proxy(function () {
                        var n = new r(
                          i({}, this.options, this._hierarchy(), {
                            data: this.dataSource.view(),
                            groups: this.dataSource.group(),
                            aggregates: this.dataSource.aggregates(),
                          })
                        ).workbook();
                        t.resolve(n, this.dataSource.view());
                      }, this)
                    );
                  }, this)
                )
                .promise();
            },
          });
        })(kendo.jQuery, kendo),
        kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("excel/mixins.min", ["excel/main.min", "kendo.ooxml.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          t.ExcelMixin = {
            extend: function (t) {
              t.events.push("excelExport");
              t.options.excel = n.extend(t.options.excel, this.options);
              t.saveAsExcel = this.saveAsExcel;
            },
            options: {
              proxyURL: "",
              allPages: !1,
              filterable: !1,
              fileName: "Export.xlsx",
              collapsible: !1,
            },
            saveAsExcel: function () {
              var i = this.options.excel || {},
                r = new t.ExcelExporter({
                  columns: this.columns,
                  dataSource: this.dataSource,
                  allPages: i.allPages,
                  filterable: i.filterable,
                  hierarchy: i.hierarchy,
                  collapsible: i.collapsible,
                });
              r.workbook().then(
                n.proxy(function (n, r) {
                  if (!this.trigger("excelExport", { workbook: n, data: r })) {
                    var u = new t.ooxml.Workbook(n);
                    u.toDataURLAsync().then(function (r) {
                      t.saveAs({
                        dataURI: r,
                        fileName: n.fileName || i.fileName,
                        proxyURL: i.proxyURL,
                        forceProxy: i.forceProxy,
                      });
                    });
                  }
                }, this)
              );
            },
          };
        })(kendo.jQuery, kendo),
        kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.excel.min", ["excel/main.min", "excel/mixins.min"], n);
  })(
    function () {},
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.data.signalr.min", ["kendo.data.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function r(n) {
            return n && i(n.done) && i(n.fail);
          }
          function u(n) {
            return n && i(n.then) && i(n["catch"]);
          }
          var t = window.kendo,
            i = t.isFunction,
            f = t.data.RemoteTransport.extend({
              init: function (n) {
                var i,
                  e = n && n.signalr ? n.signalr : {},
                  f = e.promise;
                if (!f) throw Error('The "promise" option must be set.');
                if (!r(f) && !u(f))
                  throw Error('The "promise" option must be a Promise.');
                if (((this.promise = f), (i = e.hub), !i))
                  throw Error('The "hub" option must be set.');
                if ("function" != typeof i.on || "function" != typeof i.invoke)
                  throw Error(
                    'The "hub" option is not a valid SignalR hub proxy.'
                  );
                this.hub = i;
                t.data.RemoteTransport.fn.init.call(this, n);
              },
              push: function (n) {
                var t = this.options.signalr.client || {};
                t.create && this.hub.on(t.create, n.pushCreate);
                t.update && this.hub.on(t.update, n.pushUpdate);
                t.destroy && this.hub.on(t.destroy, n.pushDestroy);
              },
              _crud: function (i, f) {
                var e,
                  h,
                  o = this.hub,
                  s = this.promise,
                  c = this.options.signalr.server;
                if (!c || !c[f])
                  throw Error(
                    t.format('The "server.{0}" option must be set.', f)
                  );
                e = [c[f]];
                h = this.parameterMap(i.data, f);
                n.isEmptyObject(h) || e.push(h);
                r(s)
                  ? s.done(function () {
                      o.invoke.apply(o, e).done(i.success).fail(i.error);
                    })
                  : u(s) &&
                    s.then(function () {
                      o.invoke.apply(o, e).then(i.success)["catch"](i.error);
                    });
              },
              read: function (n) {
                this._crud(n, "read");
              },
              create: function (n) {
                this._crud(n, "create");
              },
              update: function (n) {
                this._crud(n, "update");
              },
              destroy: function (n) {
                this._crud(n, "destroy");
              },
            });
          n.extend(!0, t.data, { transports: { signalr: f } });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("drawing/util.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function t() {
            return n.Deferred();
          }
          function i(t) {
            return n.when.apply(n, t);
          }
          kendo.drawing.util = kendo.drawing.util || {};
          kendo.deepExtend(kendo.drawing.util, {
            createPromise: t,
            promiseAll: i,
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.color.min", ["kendo.core.min"], n);
  })(
    function () {
      function e(n, t, i) {
        void 0 === i && (i = "0");
        for (var r = n.toString(16); t > r.length; ) r = i + r;
        return r;
      }
      function o(n, t, i) {
        var r = i;
        return (
          r < 0 && (r += 1),
          r > 1 && (r -= 1),
          r < 1 / 6
            ? n + 6 * (t - n) * r
            : r < 0.5
            ? t
            : r < 2 / 3
            ? n + (t - n) * (2 / 3 - r) * 6
            : n
        );
      }
      function s(t, f) {
        var e, h, o;
        if (null == t || "none" === t) return null;
        if (t instanceof i) return t;
        if (((o = t.toLowerCase()), (e = l(o))))
          return (
            (o = "transparent" === e[1] ? new n(1, 1, 1, 0) : s(u[e[1]], f)),
            (o.match = [e[1]]),
            o
          );
        if (
          ((e = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(o))
            ? (h = new r(
                parseInt(e[1], 16),
                parseInt(e[2], 16),
                parseInt(e[3], 16),
                1
              ))
            : (e = /^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(o))
            ? (h = new r(
                parseInt(e[1] + e[1], 16),
                parseInt(e[2] + e[2], 16),
                parseInt(e[3] + e[3], 16),
                1
              ))
            : (e = /^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(
                o
              ))
            ? (h = new r(
                parseInt(e[1], 10),
                parseInt(e[2], 10),
                parseInt(e[3], 10),
                1
              ))
            : (e =
                /^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(
                  o
                ))
            ? (h = new r(
                parseInt(e[1], 10),
                parseInt(e[2], 10),
                parseInt(e[3], 10),
                parseFloat(e[4])
              ))
            : (e =
                /^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(
                  o
                ))
            ? (h = new n(
                parseFloat(e[1]) / 100,
                parseFloat(e[2]) / 100,
                parseFloat(e[3]) / 100,
                1
              ))
            : (e =
                /^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(
                  o
                )) &&
              (h = new n(
                parseFloat(e[1]) / 100,
                parseFloat(e[2]) / 100,
                parseFloat(e[3]) / 100,
                parseFloat(e[4])
              )),
          h)
        )
          h.match = e;
        else if (!f) throw Error("Cannot parse color: " + o);
        return h;
      }
      var h, v, u, c, l, i, n, r, f, a, t;
      window.kendo = window.kendo || {};
      h = kendo.Class;
      v = kendo.support;
      u = {
        aliceblue: "f0f8ff",
        antiquewhite: "faebd7",
        aqua: "00ffff",
        aquamarine: "7fffd4",
        azure: "f0ffff",
        beige: "f5f5dc",
        bisque: "ffe4c4",
        black: "000000",
        blanchedalmond: "ffebcd",
        blue: "0000ff",
        blueviolet: "8a2be2",
        brown: "a52a2a",
        burlywood: "deb887",
        cadetblue: "5f9ea0",
        chartreuse: "7fff00",
        chocolate: "d2691e",
        coral: "ff7f50",
        cornflowerblue: "6495ed",
        cornsilk: "fff8dc",
        crimson: "dc143c",
        cyan: "00ffff",
        darkblue: "00008b",
        darkcyan: "008b8b",
        darkgoldenrod: "b8860b",
        darkgray: "a9a9a9",
        darkgrey: "a9a9a9",
        darkgreen: "006400",
        darkkhaki: "bdb76b",
        darkmagenta: "8b008b",
        darkolivegreen: "556b2f",
        darkorange: "ff8c00",
        darkorchid: "9932cc",
        darkred: "8b0000",
        darksalmon: "e9967a",
        darkseagreen: "8fbc8f",
        darkslateblue: "483d8b",
        darkslategray: "2f4f4f",
        darkslategrey: "2f4f4f",
        darkturquoise: "00ced1",
        darkviolet: "9400d3",
        deeppink: "ff1493",
        deepskyblue: "00bfff",
        dimgray: "696969",
        dimgrey: "696969",
        dodgerblue: "1e90ff",
        firebrick: "b22222",
        floralwhite: "fffaf0",
        forestgreen: "228b22",
        fuchsia: "ff00ff",
        gainsboro: "dcdcdc",
        ghostwhite: "f8f8ff",
        gold: "ffd700",
        goldenrod: "daa520",
        gray: "808080",
        grey: "808080",
        green: "008000",
        greenyellow: "adff2f",
        honeydew: "f0fff0",
        hotpink: "ff69b4",
        indianred: "cd5c5c",
        indigo: "4b0082",
        ivory: "fffff0",
        khaki: "f0e68c",
        lavender: "e6e6fa",
        lavenderblush: "fff0f5",
        lawngreen: "7cfc00",
        lemonchiffon: "fffacd",
        lightblue: "add8e6",
        lightcoral: "f08080",
        lightcyan: "e0ffff",
        lightgoldenrodyellow: "fafad2",
        lightgray: "d3d3d3",
        lightgrey: "d3d3d3",
        lightgreen: "90ee90",
        lightpink: "ffb6c1",
        lightsalmon: "ffa07a",
        lightseagreen: "20b2aa",
        lightskyblue: "87cefa",
        lightslategray: "778899",
        lightslategrey: "778899",
        lightsteelblue: "b0c4de",
        lightyellow: "ffffe0",
        lime: "00ff00",
        limegreen: "32cd32",
        linen: "faf0e6",
        magenta: "ff00ff",
        maroon: "800000",
        mediumaquamarine: "66cdaa",
        mediumblue: "0000cd",
        mediumorchid: "ba55d3",
        mediumpurple: "9370d8",
        mediumseagreen: "3cb371",
        mediumslateblue: "7b68ee",
        mediumspringgreen: "00fa9a",
        mediumturquoise: "48d1cc",
        mediumvioletred: "c71585",
        midnightblue: "191970",
        mintcream: "f5fffa",
        mistyrose: "ffe4e1",
        moccasin: "ffe4b5",
        navajowhite: "ffdead",
        navy: "000080",
        oldlace: "fdf5e6",
        olive: "808000",
        olivedrab: "6b8e23",
        orange: "ffa500",
        orangered: "ff4500",
        orchid: "da70d6",
        palegoldenrod: "eee8aa",
        palegreen: "98fb98",
        paleturquoise: "afeeee",
        palevioletred: "d87093",
        papayawhip: "ffefd5",
        peachpuff: "ffdab9",
        peru: "cd853f",
        pink: "ffc0cb",
        plum: "dda0dd",
        powderblue: "b0e0e6",
        purple: "800080",
        red: "ff0000",
        rosybrown: "bc8f8f",
        royalblue: "4169e1",
        saddlebrown: "8b4513",
        salmon: "fa8072",
        sandybrown: "f4a460",
        seagreen: "2e8b57",
        seashell: "fff5ee",
        sienna: "a0522d",
        silver: "c0c0c0",
        skyblue: "87ceeb",
        slateblue: "6a5acd",
        slategray: "708090",
        slategrey: "708090",
        snow: "fffafa",
        springgreen: "00ff7f",
        steelblue: "4682b4",
        tan: "d2b48c",
        teal: "008080",
        thistle: "d8bfd8",
        tomato: "ff6347",
        turquoise: "40e0d0",
        violet: "ee82ee",
        wheat: "f5deb3",
        white: "ffffff",
        whitesmoke: "f5f5f5",
        yellow: "ffff00",
        yellowgreen: "9acd32",
      };
      c = v.browser;
      l = function (n) {
        var t,
          i = Object.keys(u);
        return (
          i.push("transparent"),
          (t = RegExp("^(" + i.join("|") + ")(\\W|$)", "i")),
          (l = function (n) {
            return t.exec(n);
          }),
          t.exec(n)
        );
      };
      i = h.extend({
        init: function () {},
        toHSV: function () {
          return this;
        },
        toRGB: function () {
          return this;
        },
        toHex: function () {
          return this.toBytes().toHex();
        },
        toBytes: function () {
          return this;
        },
        toCss: function () {
          return "#" + this.toHex();
        },
        toCssRgba: function () {
          var n = this.toBytes();
          return (
            "rgba(" +
            n.r +
            ", " +
            n.g +
            ", " +
            n.b +
            ", " +
            parseFloat((+this.a).toFixed(3)) +
            ")"
          );
        },
        toDisplay: function () {
          return c.msie && c.version < 9 ? this.toCss() : this.toCssRgba();
        },
        equals: function (n) {
          return (
            n === this || (null !== n && this.toCssRgba() === s(n).toCssRgba())
          );
        },
        diff: function (n) {
          var t, i;
          return null === n
            ? NaN
            : ((t = this.toBytes()),
              (i = n.toBytes()),
              Math.sqrt(
                Math.pow(0.3 * (t.r - i.r), 2) +
                  Math.pow(0.59 * (t.g - i.g), 2) +
                  Math.pow(0.11 * (t.b - i.b), 2)
              ));
        },
        clone: function () {
          var n = this.toBytes();
          return n === this && (n = new r(n.r, n.g, n.b, n.a)), n;
        },
      });
      n = i.extend({
        init: function (n, t, r, u) {
          i.fn.init.call(this);
          this.r = n;
          this.g = t;
          this.b = r;
          this.a = u;
        },
        toHSV: function () {
          var n,
            o,
            s = this,
            i = s.r,
            r = s.g,
            e = s.b,
            c = Math.min(i, r, e),
            t = Math.max(i, r, e),
            u = t - c,
            h = t;
          return 0 === u
            ? new f(0, 0, h, this.a)
            : (0 !== t
                ? ((o = u / t),
                  (n =
                    i === t
                      ? (r - e) / u
                      : r === t
                      ? 2 + (e - i) / u
                      : 4 + (i - r) / u),
                  (n *= 60),
                  n < 0 && (n += 360))
                : ((o = 0), (n = -1)),
              new f(n, o, h, this.a));
        },
        toHSL: function () {
          var u,
            o,
            n,
            s = this,
            f = s.r,
            t = s.g,
            i = s.b,
            r = Math.max(f, t, i),
            e = Math.min(f, t, i),
            h = (r + e) / 2;
          if (r === e) u = o = 0;
          else
            switch (
              ((n = r - e), (o = h > 0.5 ? n / (2 - r - e) : n / (r + e)), r)
            ) {
              case f:
                u = (t - i) / n + (t < i ? 6 : 0);
                break;
              case t:
                u = (i - f) / n + 2;
                break;
              case i:
                u = (f - t) / n + 4;
            }
          return new a(60 * u, 100 * o, 100 * h, this.a);
        },
        toBytes: function () {
          return new r(255 * this.r, 255 * this.g, 255 * this.b, this.a);
        },
      });
      r = n.extend({
        init: function (t, i, r, u) {
          n.fn.init.call(this, Math.round(t), Math.round(i), Math.round(r), u);
        },
        toRGB: function () {
          return new n(this.r / 255, this.g / 255, this.b / 255, this.a);
        },
        toHSV: function () {
          return this.toRGB().toHSV();
        },
        toHSL: function () {
          return this.toRGB().toHSL();
        },
        toHex: function () {
          return e(this.r, 2) + e(this.g, 2) + e(this.b, 2);
        },
        toBytes: function () {
          return this;
        },
      });
      f = i.extend({
        init: function (n, t, r, u) {
          i.fn.init.call(this);
          this.h = n;
          this.s = t;
          this.v = r;
          this.a = u;
        },
        toRGB: function () {
          var i,
            r,
            u,
            h,
            c,
            f,
            e,
            o,
            l = this,
            a = l.h,
            s = l.s,
            t = l.v;
          if (0 === s) i = r = u = t;
          else
            switch (
              ((a /= 60),
              (h = Math.floor(a)),
              (c = a - h),
              (f = t * (1 - s)),
              (e = t * (1 - s * c)),
              (o = t * (1 - s * (1 - c))),
              h)
            ) {
              case 0:
                i = t;
                r = o;
                u = f;
                break;
              case 1:
                i = e;
                r = t;
                u = f;
                break;
              case 2:
                i = f;
                r = t;
                u = o;
                break;
              case 3:
                i = f;
                r = e;
                u = t;
                break;
              case 4:
                i = o;
                r = f;
                u = t;
                break;
              default:
                i = t;
                r = f;
                u = e;
            }
          return new n(i, r, u, this.a);
        },
        toHSL: function () {
          return this.toRGB().toHSL();
        },
        toBytes: function () {
          return this.toRGB().toBytes();
        },
      });
      a = i.extend({
        init: function (n, t, r, u) {
          i.fn.init.call(this);
          this.h = n;
          this.s = t;
          this.l = r;
          this.a = u;
        },
        toRGB: function () {
          var f,
            e,
            s,
            i,
            r,
            h = this.h / 360,
            u = this.s / 100,
            t = this.l / 100;
          return (
            0 === u
              ? (f = e = s = t)
              : ((i = t < 0.5 ? t * (1 + u) : t + u - t * u),
                (r = 2 * t - i),
                (f = o(r, i, h + 1 / 3)),
                (e = o(r, i, h)),
                (s = o(r, i, h - 1 / 3))),
            new n(f, e, s, this.a)
          );
        },
        toHSV: function () {
          return this.toRGB().toHSV();
        },
        toBytes: function () {
          return this.toRGB().toBytes();
        },
      });
      t = h.extend({
        init: function (n) {
          var r,
            o,
            i,
            s,
            h,
            f,
            u,
            e = this;
          if (1 === arguments.length)
            for (
              r = t.formats, o = this.resolveColor(n), i = 0;
              i < r.length;
              i++
            )
              (s = r[i].re),
                (h = r[i].process),
                (f = s.exec(o)),
                f && ((u = h(f)), (e.r = u[0]), (e.g = u[1]), (e.b = u[2]));
          else
            (this.r = arguments[0]),
              (this.g = arguments[1]),
              (this.b = arguments[2]);
          this.r = this.normalizeByte(this.r);
          this.g = this.normalizeByte(this.g);
          this.b = this.normalizeByte(this.b);
        },
        toHex: function () {
          var n = this.padDigit,
            t = this.r.toString(16),
            i = this.g.toString(16),
            r = this.b.toString(16);
          return "#" + n(t) + n(i) + n(r);
        },
        resolveColor: function (n) {
          var i = n || "black";
          return (
            "#" === i.charAt(0) && (i = i.substr(1, 6)),
            (i = i.replace(/ /g, "")),
            (i = i.toLowerCase()),
            (i = t.namedColors[i] || i)
          );
        },
        normalizeByte: function (n) {
          return n < 0 || isNaN(n) ? 0 : n > 255 ? 255 : n;
        },
        padDigit: function (n) {
          return 1 === n.length ? "0" + n : n;
        },
        brightness: function (n) {
          var t = Math.round;
          return (
            (this.r = t(this.normalizeByte(this.r * n))),
            (this.g = t(this.normalizeByte(this.g * n))),
            (this.b = t(this.normalizeByte(this.b * n))),
            this
          );
        },
        percBrightness: function () {
          return Math.sqrt(
            0.241 * this.r * this.r +
              0.691 * this.g * this.g +
              0.068 * this.b * this.b
          );
        },
      });
      t.fromBytes = function (n, t, i, u) {
        return new r(n, t, i, null != u ? u : 1);
      };
      t.fromRGB = function (t, i, r, u) {
        return new n(t, i, r, null != u ? u : 1);
      };
      t.fromHSV = function (n, t, i, r) {
        return new f(n, t, i, null != r ? r : 1);
      };
      t.fromHSL = function (n, t, i, r) {
        return new a(n, t, i, null != r ? r : 1);
      };
      t.formats = [
        {
          re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
          process: function (n) {
            return [parseInt(n[1], 10), parseInt(n[2], 10), parseInt(n[3], 10)];
          },
        },
        {
          re: /^(\w{2})(\w{2})(\w{2})$/,
          process: function (n) {
            return [parseInt(n[1], 16), parseInt(n[2], 16), parseInt(n[3], 16)];
          },
        },
        {
          re: /^(\w{1})(\w{1})(\w{1})$/,
          process: function (n) {
            return [
              parseInt(n[1] + n[1], 16),
              parseInt(n[2] + n[2], 16),
              parseInt(n[3] + n[3], 16),
            ];
          },
        },
      ];
      t.namedColors = u;
      kendo.deepExtend(kendo, { parseColor: s, Color: t });
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("util/text-metrics.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        function u(n) {
          return (n + "").replace(s, h);
        }
        function f(n) {
          var t,
            i = [];
          for (t in n) i.push(t + n[t]);
          return i.sort().join("");
        }
        function e(n) {
          for (var t = 2166136261, i = 0; i < n.length; ++i)
            (t += (t << 1) + (t << 4) + (t << 7) + (t << 8) + (t << 24)),
              (t ^= n.charCodeAt(i));
          return t >>> 0;
        }
        function o() {
          return { width: 0, height: 0, baseline: 0 };
        }
        function l(n, i, r) {
          return t.current.measure(n, i, r);
        }
        var i, s, h, c, r, t;
        window.kendo.util = window.kendo.util || {};
        i = kendo.Class.extend({
          init: function (n) {
            this._size = n;
            this._length = 0;
            this._map = {};
          },
          put: function (n, t) {
            var r = this._map,
              i = { key: n, value: t };
            r[n] = i;
            this._head
              ? ((this._tail.newer = i),
                (i.older = this._tail),
                (this._tail = i))
              : (this._head = this._tail = i);
            this._length >= this._size
              ? ((r[this._head.key] = null),
                (this._head = this._head.newer),
                (this._head.older = null))
              : this._length++;
          },
          get: function (n) {
            var t = this._map[n];
            if (t)
              return (
                t === this._head &&
                  t !== this._tail &&
                  ((this._head = t.newer), (this._head.older = null)),
                t !== this._tail &&
                  (t.older &&
                    ((t.older.newer = t.newer), (t.newer.older = t.older)),
                  (t.older = this._tail),
                  (t.newer = null),
                  (this._tail.newer = t),
                  (this._tail = t)),
                t.value
              );
          },
        });
        s = /\r?\n|\r|\t/g;
        h = " ";
        c = { baselineMarkerSize: 1 };
        "undefined" != typeof document &&
          ((r = document.createElement("div")),
          (r.style.cssText =
            "position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;"));
        t = kendo.Class.extend({
          init: function (t) {
            this._cache = new i(1e3);
            this.options = n.extend({}, c, t);
          },
          measure: function (n, t, i) {
            var p, c, w, h, s, l, a, v, y;
            if ((void 0 === i && (i = {}), !n)) return o();
            if (((p = f(t)), (c = e(n + p)), (w = this._cache.get(c))))
              return w;
            h = o();
            s = i.box || r;
            l = this._baselineMarker().cloneNode(!1);
            for (a in t) (v = t[a]), void 0 !== v && (s.style[a] = v);
            return (
              (y = i.normalizeText !== !1 ? u(n) : n + ""),
              (s.textContent = y),
              s.appendChild(l),
              document.body.appendChild(s),
              y.length &&
                ((h.width = s.offsetWidth - this.options.baselineMarkerSize),
                (h.height = s.offsetHeight),
                (h.baseline = l.offsetTop + this.options.baselineMarkerSize)),
              h.width > 0 && h.height > 0 && this._cache.put(c, h),
              s.parentNode.removeChild(s),
              h
            );
          },
          _baselineMarker: function () {
            var n = document.createElement("div");
            return (
              (n.style.cssText =
                "display: inline-block; vertical-align: baseline;width: " +
                this.options.baselineMarkerSize +
                "px; height: " +
                this.options.baselineMarkerSize +
                "px;overflow: hidden;"),
              n
            );
          },
        });
        t.current = new t();
        kendo.deepExtend(kendo.util, {
          LRUCache: i,
          TextMetrics: t,
          measureText: l,
          objectKey: f,
          hashKey: e,
          normalizeText: u,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "drawing/kendo-drawing.min",
      ["drawing/util.min", "kendo.color.min", "util/text-metrics.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        function ur(n, t) {
          return n.push.apply(n, t), n;
        }
        function iu(n) {
          for (
            var t = [
                1e3, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70,
                60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,
              ],
              i = "";
            n > 0;

          )
            n < t[0] ? t.shift() : ((i += tc[t[0]]), (n -= t[0]));
          return i;
        }
        function r(n) {
          return typeof n !== ic;
        }
        function ru() {
          return "kdef" + rc++;
        }
        function yt(n) {
          return n / bu;
        }
        function ta(n) {
          for (var t, i = "", r = 0; r < n.length; r++)
            (t = n.charCodeAt(r)),
              t < 128
                ? (i += oi(t))
                : t < 2048
                ? ((i += oi(192 | (t >>> 6))), (i += oi(128 | (63 & t))))
                : t < 65536 &&
                  ((i += oi(224 | (t >>> 12))),
                  (i += oi(128 | ((t >>> 6) & 63))),
                  (i += oi(128 | (63 & t))));
          return i;
        }
        function bo(n) {
          for (
            var e, t, i, h, c, o, r, s = "", u = 0, f = ta(n);
            u < f.length;

          )
            (e = f.charCodeAt(u++)),
              (t = f.charCodeAt(u++)),
              (i = f.charCodeAt(u++)),
              (h = e >> 2),
              (c = ((3 & e) << 4) | (t >> 4)),
              (o = ((15 & t) << 2) | (i >> 6)),
              (r = 63 & i),
              isNaN(t) ? (o = r = 64) : isNaN(i) && (r = 64),
              (s =
                s + vr.charAt(h) + vr.charAt(c) + vr.charAt(o) + vr.charAt(r));
          return s;
        }
        function ko(n) {
          return r((n.x || {}).location)
            ? { x: n.x.location, y: n.y.location }
            : { x: n.pageX || n.clientX || 0, y: n.pageY || n.clientY || 0 };
        }
        function go(n) {
          return (
            void 0 === n && (n = {}), n.touch ? n.touch.initialTouch : n.target
          );
        }
        function ni(n) {
          return (
            "" === n ||
            null === n ||
            "none" === n ||
            "transparent" === n ||
            !r(n)
          );
        }
        function d(n) {
          if (n) return n[n.length - 1];
        }
        function ns(n, t, i) {
          return Math.max(Math.min(n, i), t);
        }
        function uu(n, t) {
          function r(n, i) {
            for (
              var r = [], u = 0, f = 0, e = 0;
              u < n.length && f < i.length;

            )
              r[e++] = t(n[u], i[f]) <= 0 ? n[u++] : i[f++];
            return (
              u < n.length && r.push.apply(r, n.slice(u)),
              f < i.length && r.push.apply(r, i.slice(f)),
              r
            );
          }
          return n.length < 2
            ? n.slice()
            : (function i(n) {
                var f, t, u;
                return n.length <= 1
                  ? n
                  : ((f = Math.floor(n.length / 2)),
                    (t = n.slice(0, f)),
                    (u = n.slice(f)),
                    (t = i(t)),
                    (u = i(u)),
                    r(t, u));
              })(n);
        }
        function et(n) {
          return n * bu;
        }
        function ia(n) {
          return n ? Math.pow(10, n) : 1;
        }
        function s(n, t) {
          var i = ia(t);
          return Math.round(n * i) / i;
        }
        function sf(n, t) {
          return r(n) ? n : t;
        }
        function hf(n, t) {
          var r, u, i;
          for (r in t)
            for (u = r.trim().split(" "), i = 0; i < u.length; i++)
              n.addEventListener(u[i], t[r], !1);
        }
        function ts(n) {
          var i = n.getBoundingClientRect(),
            t = document.documentElement;
          return {
            top:
              i.top + (window.pageYOffset || t.scrollTop) - (t.clientTop || 0),
            left:
              i.left +
              (window.pageXOffset || t.scrollLeft) -
              (t.clientLeft || 0),
          };
        }
        function fu(n, t) {
          for (
            var r,
              u = {},
              e = window.getComputedStyle(n) || {},
              f = Array.isArray(t) ? t : [t],
              i = 0;
            i < f.length;
            i++
          )
            (r = f[i]), (u[r] = e[r]);
          return u;
        }
        function is(n) {
          return isNaN(n) ? n : n + "px";
        }
        function fr(n, t) {
          var i, u, f;
          return t
            ? ((i = t.width),
              (u = t.height),
              r(i) && (n.style.width = is(i)),
              r(u) && (n.style.height = is(u)),
              void 0)
            : ((f = fu(n, ["width", "height"])),
              { width: parseInt(f.width, 10), height: parseInt(f.height, 10) });
        }
        function cf(n, t) {
          var r, u, i;
          void 0 === t && (t = {});
          for (r in t)
            for (u = r.trim().split(" "), i = 0; i < u.length; i++)
              n.removeEventListener(u[i], t[r], !1);
        }
        function ra(n) {
          return function (t) {
            return (
              this[n] !== t && ((this[n] = t), this.geometryChange()), this
            );
          };
        }
        function ua(n) {
          return function () {
            return this[n];
          };
        }
        function eu(n, t) {
          for (var i, u, r = 0; r < t.length; r++)
            (i = t[r]),
              (u = i.charAt(0).toUpperCase() + i.substring(1, i.length)),
              (n["set" + u] = ra(i)),
              (n["get" + u] = ua(i));
        }
        function pt(n) {
          return n && "function" == typeof n.matrix ? n.matrix() : n;
        }
        function v(n) {
          return null === n ? null : n instanceof yi ? n : new yi(n);
        }
        function rs(n, t, i, r) {
          var u = 0,
            f = 0;
          return (
            r &&
              ((u = Math.atan2(r.c * i, r.a * t)),
              0 !== r.b && (f = Math.atan2(r.d * i, r.b * t))),
            { x: u, y: f }
          );
        }
        function fa(n) {
          var t = "_" + n;
          return function (n) {
            return r(n)
              ? (this._observerField(t, n), this.geometryChange(), this)
              : this[t];
          };
        }
        function ou(n, t) {
          for (var i = 0; i < t.length; i++) n[t[i]] = fa(t[i]);
        }
        function us(n, t, i) {
          return void 0 === i && (i = st), 0 === s(Math.abs(n - t), i);
        }
        function lf(n, t, i) {
          return n < t || us(n, t, i);
        }
        function ea(n, i, r, u) {
          var e = i.x - n.x,
            s = u.x - r.x,
            o = i.y - n.y,
            h = u.y - r.y,
            c = n.x - r.x,
            l = n.y - r.y,
            a = e * h - s * o,
            v = (e * l - o * c) / a,
            f = (s * l - h * c) / a;
          if (v >= 0 && v <= 1 && f >= 0 && f <= 1)
            return new t(n.x + f * e, n.y + f * o);
        }
        function fs(n, t, i, r, u, f) {
          var e = s((u - n) / i, 3),
            o = s((f - t) / r, 3);
          return s(yt(Math.atan2(o, e)));
        }
        function oa(n) {
          var rt,
            c,
            l,
            a,
            v,
            lt,
            y,
            p,
            e,
            o,
            w,
            b,
            k,
            d,
            at,
            vt,
            u,
            f,
            g,
            nt,
            ut,
            pt,
            h,
            tt,
            wt,
            ft = n.x1,
            ot = n.y1,
            st = n.x2,
            ht = n.y2,
            i = n.rx,
            r = n.ry,
            bt = n.largeArc,
            ct = n.swipe,
            it = n.rotation;
          return (
            void 0 === it && (it = 0),
            (rt = et(it)),
            (c = Math.cos(rt)),
            (l = Math.sin(rt)),
            (a = (c * (ft - st)) / 2 + (l * (ot - ht)) / 2),
            (v = (-l * (ft - st)) / 2 + (c * (ot - ht)) / 2),
            (lt = bt !== ct ? 1 : -1),
            (y = Math.pow(a, 2)),
            (p = Math.pow(v, 2)),
            (e = Math.pow(i, 2)),
            (o = Math.pow(r, 2)),
            (w = y / e + p / o),
            w > 1 &&
              ((w = Math.sqrt(y / e + p / o)),
              (i = w * i),
              (e = Math.pow(i, 2)),
              (r = w * r),
              (o = Math.pow(r, 2))),
            (b = lt * Math.sqrt((e * o - e * p - o * y) / (e * p + o * y))),
            isNaN(b) && (b = 0),
            (k = (b * i * v) / r),
            (d = (-b * r * a) / i),
            (at = c * k - l * d + (ft + st) / 2),
            (vt = l * k + c * d + (ot + ht) / 2),
            (u = (a - k) / i),
            (f = (v - d) / r),
            (g = -(a + k) / i),
            (nt = -(v + d) / r),
            (ut =
              (f >= 0 ? 1 : -1) * yt(Math.acos(u / Math.sqrt(u * u + f * f)))),
            (pt = s(
              (u * g + f * nt) /
                (Math.sqrt(u * u + f * f) * Math.sqrt(g * g + nt * nt)),
              10
            )),
            (h = (u * nt - f * g >= 0 ? 1 : -1) * yt(Math.acos(pt))),
            !ct && h > 0 && (h -= 360),
            ct && h < 0 && (h += 360),
            (tt = ut + h),
            (wt = tt >= 0 ? 1 : -1),
            (tt = (Math.abs(tt) % 360) * wt),
            {
              center: new t(at, vt),
              startAngle: ut,
              endAngle: tt,
              radiusX: i,
              radiusY: r,
              xRotation: it,
            }
          );
        }
        function es(n, t) {
          for (var i = n; i < t; ) i += 90;
          return i;
        }
        function sa(n) {
          var i = "_" + n;
          return function (n) {
            return r(n)
              ? (this._observerField(i, t.create(n)),
                this.geometryChange(),
                this)
              : this[i];
          };
        }
        function su(n, t) {
          for (var i = 0; i < t.length; i++) n[t[i]] = sa(t[i]);
        }
        function os(n, t, i) {
          var r = yt(Math.atan2(t.y - n.y, t.x - n.x)),
            u = i.transformCopy(v().rotate(-r, n));
          return u.x < n.x;
        }
        function hu(n, t, i) {
          var r = 1 - n;
          return (
            Math.pow(r, 3) * i[0][t] +
            3 * Math.pow(r, 2) * n * i[1][t] +
            3 * Math.pow(n, 2) * r * i[2][t] +
            Math.pow(n, 3) * i[3][t]
          );
        }
        function ss(n, t) {
          return [
            -n[0][t] + 3 * n[1][t] - 3 * n[2][t] + n[3][t],
            3 * (n[0][t] - 2 * n[1][t] + n[2][t]),
            3 * (-n[0][t] + n[1][t]),
            n[0][t],
          ];
        }
        function hs(n) {
          return n < 0 ? -1 : 1;
        }
        function ha(n, t, i) {
          var r = Math.sqrt(Math.pow(t, 2) - 4 * n * i);
          return [(-t + r) / (2 * n), (-t - r) / (2 * n)];
        }
        function cs(n, t, i, r) {
          var b, e, o, l, c, u, f, a, v, y, p, w, h;
          return 0 === n
            ? ha(t, i, r)
            : ((b = (3 * n * i - Math.pow(t, 2)) / (3 * Math.pow(n, 2))),
              (e =
                (2 * Math.pow(t, 3) - 9 * n * t * i + 27 * Math.pow(n, 2) * r) /
                (27 * Math.pow(n, 3))),
              (o = Math.pow(b / 3, 3) + Math.pow(e / 2, 2)),
              (l = new tt(0, 1)),
              (c = -t / (3 * n)),
              o < 0
                ? ((u = new tt(-e / 2, Math.sqrt(-o)).nthRoot(3)),
                  (f = new tt(-e / 2, -Math.sqrt(-o)).nthRoot(3)))
                : ((u = -e / 2 + Math.sqrt(o)),
                  (u = new tt(hs(u) * Math.pow(Math.abs(u), 1 / 3))),
                  (f = -e / 2 - Math.sqrt(o)),
                  (f = new tt(hs(f) * Math.pow(Math.abs(f), 1 / 3)))),
              (a = u.add(f)),
              (p = u.add(f).multiplyConstant(-0.5)),
              (w = u.add(f.negate()).multiplyConstant(Math.sqrt(3) / 2)),
              (v = p.add(l.multiply(w))),
              (y = p.add(l.negate().multiply(w))),
              (h = []),
              a.isReal() && h.push(s(a.real + c, st)),
              v.isReal() && h.push(s(v.real + c, st)),
              y.isReal() && h.push(s(y.real + c, st)),
              h);
        }
        function cu(n, t, i, r, u) {
          for (
            var s, e = ss(n, r), o = cs(e[0], e[1], e[2], e[3] - t[r]), f = 0;
            f < o.length;
            f++
          )
            if (
              0 <= o[f] &&
              o[f] <= 1 &&
              ((s = hu(o[f], i, n)), Math.abs(s - t[i]) <= u)
            )
              return !0;
        }
        function ca(n, t, i) {
          for (
            var e,
              o,
              f = ss(n, "x"),
              u = cs(f[0], f[1], f[2], f[3] - t.x),
              s = 0,
              r = 0;
            r < u.length;
            r++
          )
            (e = hu(u[r], "y", n)),
              (o = us(e, t.y) || e > t.y),
              o &&
                (((0 === u[r] || 1 === u[r]) && i.bottomRight().x > t.x) ||
                  (0 < u[r] && u[r] < 1)) &&
                s++;
          return s;
        }
        function ls(n, t, i) {
          var s, u, f, r, e, o;
          return (
            n.x !== t.x &&
              ((u = Math.min(n.x, t.x)),
              (f = Math.max(n.x, t.x)),
              (r = Math.min(n.y, t.y)),
              (e = Math.max(n.y, t.y)),
              (o = u <= i.x && i.x < f),
              (s =
                r === e
                  ? i.y <= r && o
                  : o &&
                    ((e - r) *
                      ((n.x - t.x) * (n.y - t.y) > 0 ? i.x - u : f - i.x)) /
                      (f - u) +
                      r -
                      i.y >=
                      0)),
            s ? 1 : 0
          );
        }
        function as(n) {
          for (var u = n.length, i = fi, r = ei, t = 0; t < u; t++)
            (r = Math.max(r, n[t])), (i = Math.min(i, n[t]));
          return { min: i, max: r };
        }
        function lu(n, t, i) {
          for (var r, e, o, u = 0; u < n.length; u++)
            (e = n[u]),
              e.visible() &&
                ((o = t ? e.bbox(i) : e.rawBBox()),
                o && (r = r ? f.union(r, o) : o));
          return r;
        }
        function vs(n, t) {
          for (var i, e, u, r = 0; r < n.length; r++)
            (e = n[r]),
              e.visible() &&
                ((u = e.clippedBBox(t)), u && (i = i ? f.union(i, u) : u));
          return i;
        }
        function ys(n, t, i) {
          for (var u = t ? 0 : 1, r = 0; r < n.length; r += 2)
            n.splice(r + u, 0, i);
        }
        function ps(n, t) {
          if (n && t) return t.scaleCopy(2).translate(-n.x, -n.y);
        }
        function ws(n, t, i) {
          var r = t.clone().scale(2 / 3);
          return {
            controlOut: r.clone().translateWith(n.scaleCopy(ee)),
            controlIn: r.translateWith(i.scaleCopy(ee)),
          };
        }
        function la(n) {
          var t = [];
          return (
            n.replace(wc, function (n, i) {
              t.push(parseFloat(i));
            }),
            t
          );
        }
        function au(n, t, i) {
          var r = i.transform() || v(),
            u = r.matrix();
          u.e += n.x - t.origin.x;
          u.f += n.y - t.origin.y;
          r.matrix(u);
          i.transform(r);
        }
        function er(n, t, i, r, u) {
          return "start" === i
            ? t.origin[r]
            : "end" === i
            ? t.origin[r] + t.size[u] - n
            : t.origin[r] + (t.size[u] - n) / 2;
        }
        function aa(n, t, i, r, u) {
          return "start" === i
            ? t.origin[r] + t.size[u] - n
            : "end" === i
            ? t.origin[r]
            : t.origin[r] + (t.size[u] - n) / 2;
        }
        function bs(n, t, i, r, u) {
          for (var e, o, f = 0; f < n.length; f++)
            (e = n[f].clippedBBox()),
              e &&
                ((o = e.origin.clone()),
                (o[r] = er(e.size[u], t, i || "start", r, u)),
                au(o, e, n[f]));
        }
        function va(n, t, i) {
          bs(n, t, i, "x", "width");
        }
        function ya(n, t, i) {
          bs(n, t, i, "y", "height");
        }
        function af(n, i, r, u) {
          var f, s, e, h, o;
          if (n.length > 1)
            for (f = new t(), s = n[0].bbox, e = 1; e < n.length; e++)
              (h = n[e].element),
                (o = n[e].bbox),
                (f[i] = s.origin[i] + s.size[u]),
                (f[r] = o.origin[r]),
                au(f, o, h),
                (o.origin[i] = f[i]),
                (s = o);
        }
        function ks(n) {
          for (var i, r, u = [], t = 0; t < n.length; t++)
            (i = n[t]),
              (r = i.clippedBBox()),
              r && u.push({ element: i, bbox: r });
          return u;
        }
        function pa(n) {
          af(ks(n), "x", "y", "width");
        }
        function wa(n) {
          af(ks(n), "y", "x", "height");
        }
        function ba(n, t, i) {
          for (
            var h,
              u,
              e,
              l = t.size[i],
              o = [],
              r = [],
              s = 0,
              c = function () {
                r.push({ element: h, bbox: u });
              },
              f = 0;
            f < n.length;
            f++
          )
            (h = n[f]),
              (u = h.clippedBBox()),
              u &&
                ((e = u.size[i]),
                s + e > l
                  ? r.length
                    ? (o.push(r), (r = []), c(), (s = e))
                    : (c(), o.push(r), (r = []), (s = 0))
                  : (c(), (s += e)));
          return r.length && o.push(r), o;
        }
        function ds(n, t, i, r, u) {
          for (
            var e, o, s, l = ba(n, t, u), h = t.origin.clone(), c = [], f = 0;
            f < l.length;
            f++
          )
            for (
              e = l[f],
                o = e[0],
                h[r] = o.bbox.origin[r],
                au(h, o.bbox, o.element),
                o.bbox.origin[i] = h[i],
                af(e, i, r, u),
                c.push([]),
                s = 0;
              s < e.length;
              s++
            )
              c[f].push(e[s].element);
          return c;
        }
        function ka(n, t) {
          return ds(n, t, "x", "y", "width");
        }
        function da(n, t) {
          return ds(n, t, "y", "x", "height");
        }
        function ga(n, t) {
          var i,
            r,
            u,
            f,
            e = n.clippedBBox();
          e &&
            ((i = e.size),
            (r = t.size),
            (r.width < i.width || r.height < i.height) &&
              ((u = Math.min(r.width / i.width, r.height / i.height)),
              (f = n.transform() || v()),
              f.scale(u, u),
              n.transform(f)));
        }
        function nv(n) {
          return function (t) {
            return r(t) ? (this.options.set(n, t), this) : this.options.get(n);
          };
        }
        function tv(n, t) {
          for (var i = 0; i < t.length; i++) n[t[i]] = nv(t[i]);
        }
        function iv(n) {
          return 0.5 - Math.cos(n * Math.PI) / 2;
        }
        function rv(n) {
          return n;
        }
        function uv(n, t, i, r) {
          var e = 1.70158,
            u = 0,
            f = r;
          return 0 === n
            ? i
            : 1 === n
            ? i + r
            : (u || (u = 0.5),
              f < Math.abs(r)
                ? ((f = r), (e = u / 4))
                : (e = (u / (2 * Math.PI)) * Math.asin(r / f)),
              f *
                Math.pow(2, -10 * n) *
                Math.sin(((+n - e) * 1.1 * Math.PI) / u) +
                r +
                i);
        }
        function ti(n, t) {
          return r(t) && null !== t ? " " + n + '="' + t + '" ' : "";
        }
        function ii(n) {
          for (var i = "", t = 0; t < n.length; t++) i += ti(n[t][0], n[t][1]);
          return i;
        }
        function gs(n) {
          for (var i, u = "", t = 0; t < n.length; t++)
            (i = n[t][1]), r(i) && (u += n[t][0] + ":" + i + ";");
          if ("" !== u) return u;
        }
        function nh(n, t) {
          return (
            "clip" === n || ("fill" === n && (!t || "Gradient" === t.nodeType))
          );
        }
        function fv() {
          var t,
            r = document.getElementsByTagName("base")[0],
            n = document.location.href,
            i = "";
          return (
            r &&
              !ar.msie &&
              ((t = n.indexOf("#")),
              t !== -1 && (n = n.substring(0, t)),
              (i = n)),
            i
          );
        }
        function ev(n) {
          var t, i, r, u;
          try {
            t = n.getScreenCTM ? n.getScreenCTM() : null;
          } catch (f) {}
          t &&
            ((i = -t.e % 1),
            (r = -t.f % 1),
            (u = n.style),
            (0 === i && 0 === r) || ((u.left = i + "px"), (u.top = r + "px")));
        }
        function vf(n) {
          if (!n || "string" != typeof n || !uf.test(n)) return n;
          var t = vf._element;
          return (
            (uf.lastIndex = 0),
            n.replace(uf, function (n) {
              return (t.innerHTML = n), t.textContent || t.innerText;
            })
          );
        }
        function th(n) {
          var i,
            t,
            u,
            r = new nf({ skipBaseHref: !0 }),
            f = n.clippedBBox(),
            e = n;
          return (
            f &&
              ((i = f.getOrigin()),
              (t = new l()),
              t.transform(v().translate(-i.x, -i.y)),
              t.children.push(n),
              (e = t)),
            r.load([e]),
            (u =
              "<?xml version='1.0' ?><svg xmlns='" +
              tr +
              "' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>" +
              r.render() +
              "</svg>"),
            r.destroy(),
            u
          );
        }
        function vu(n, t) {
          var r,
            i,
            u,
            s,
            e,
            o,
            f = t.segments;
          if (0 !== f.length) {
            for (
              r = f[0], i = r.anchor(), n.moveTo(i.x, i.y), u = 1;
              u < f.length;
              u++
            )
              (r = f[u]),
                (i = r.anchor()),
                (s = f[u - 1]),
                (e = s.controlOut()),
                (o = r.controlIn()),
                e && o
                  ? n.bezierCurveTo(e.x, e.y, o.x, o.y, i.x, i.y)
                  : n.lineTo(i.x, i.y);
            t.options.closed && n.closePath();
          }
        }
        function ov(n, t) {
          return n._zIndex < t._zIndex ? 1 : n._zIndex > t._zIndex ? -1 : 0;
        }
        function sv(n, t) {
          for (var r, u, i = 0; i < t.length; i++)
            (r = t[i]),
              (u = kendo.parseColor(r.color())),
              (u.a *= r.opacity()),
              n.addColorStop(r.offset(), u.toCssRgba());
        }
        function hv(t, i) {
          var s,
            h,
            f,
            r,
            e,
            u,
            c,
            a,
            y = { width: "800px", height: "600px", cors: "Anonymous" },
            o = t,
            p = t.clippedBBox();
          return (
            p &&
              ((s = p.getOrigin()),
              (o = new l()),
              o.transform(v().translate(-s.x, -s.y)),
              o.children.push(t),
              (h = p.getSize()),
              (y.width = h.width + "px"),
              (y.height = h.height + "px")),
            (f = n.extend(y, i)),
            (r = document.createElement("div")),
            (e = r.style),
            (e.display = "none"),
            (e.width = f.width),
            (e.height = f.height),
            document.body.appendChild(r),
            (u = new nu(r, f)),
            u.suspendTracking(),
            u.draw(o),
            (c = u.image()),
            (a = function () {
              u.destroy();
              document.body.removeChild(r);
            }),
            c.then(a, a),
            c
          );
        }
        function cv(n, t) {
          var i = th(n);
          return (
            (t && t.raw) || (i = "data:image/svg+xml;base64," + bo(i)),
            ui().resolve(i)
          );
        }
        function at(n) {
          return Array.prototype.slice.call(n);
        }
        function lv(n, t) {
          n.classList ? n.classList.add(t) : (n.className += " " + t);
        }
        function av(n, t) {
          n.classList
            ? n.classList.remove(t)
            : (n.className = n.className
                .split(/\s+/)
                .reduce(function (n, i) {
                  return i != t && n.push(i), n;
                }, [])
                .join(" "));
        }
        function or(n, t) {
          Object.keys(t).forEach(function (i) {
            n.style[i] = t[i];
          });
        }
        function sr(n, t) {
          if (n.closest) return n.closest(t);
          for (; n && !/^\[object (?:HTML)?Document\]$/.test(n + ""); ) {
            if (1 == n.nodeType && tu(n, t)) return n;
            n = n.parentNode;
          }
        }
        function vv(n) {
          return "number" == typeof n
            ? { x: n, y: n }
            : Array.isArray(n)
            ? { x: n[0], y: n[1] }
            : { x: n.x, y: n.y };
        }
        function yf(n, t) {
          function e(n) {
            var i = new l(),
              f = n.getBoundingClientRect();
            return (
              yu(i, [r.x, 0, 0, r.y, -f.left * r.x, -f.top * r.y]),
              (u._clipbox = !1),
              (u._matrix = o.unit()),
              (u._stackingContext = { element: n, group: i }),
              (u._avoidLinks = t.avoidLinks === !0 ? "a" : t.avoidLinks),
              lv(n, "k-pdf-export"),
              lr(n, i),
              av(n, "k-pdf-export"),
              i
            );
          }
          function s(n) {
            if (null != n)
              return (
                "string" == typeof n &&
                  (n = kendo.template(n.replace(/^\s+|\s+$/g, ""))),
                "function" == typeof n
                  ? function (t) {
                      var r,
                        i = n(t);
                      return (
                        i &&
                          "string" == typeof i &&
                          ((r = document.createElement("div")),
                          (r.innerHTML = i),
                          (i = r.firstElementChild)),
                        i
                      );
                    }
                  : function () {
                      return n.cloneNode(!0);
                    }
              );
          }
          function h(n, t, r, u, f, e, o) {
            function g() {
              ("-" != r || f) && w(h);
              var t = b();
              h.parentNode.insertBefore(t, h);
              t.appendChild(h);
              it &&
                l.forEach(function (n, t) {
                  var i = it({
                    element: n,
                    pageNum: t + 1,
                    totalPages: l.length,
                  });
                  i && n.appendChild(i);
                });
              eh(l, function () {
                kv(l, function () {
                  n({ pages: l, container: a });
                });
              });
            }
            function nt(n) {
              if (
                o.keepTogether &&
                tu(n, o.keepTogether) &&
                n.offsetHeight <= f - v
              )
                return !0;
              var t = n.tagName;
              return (
                !(/^h[1-6]$/i.test(t) && n.offsetHeight >= f - v) &&
                (n.getAttribute("data-kendo-chart") ||
                  /^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(
                    n.tagName
                  ))
              );
            }
            function w(n) {
              var e, s, h, l, u, t, o;
              if (
                ("TABLE" == n.tagName && or(n, { tableLayout: "fixed" }),
                !nt(n))
              ) {
                for (
                  e = y(n),
                    s = parseFloat(i(e, "padding-bottom")),
                    h = parseFloat(i(e, "border-bottom-width")),
                    l = v,
                    v += s + h,
                    u = !0,
                    t = n.firstChild;
                  t;
                  t = t.nextSibling
                )
                  if (1 == t.nodeType) {
                    if (((u = !1), tu(t, r))) {
                      c(t);
                      continue;
                    }
                    if (!f) {
                      w(t);
                      continue;
                    }
                    if (!/^(?:static|relative)$/.test(i(y(t), "position")))
                      continue;
                    o = k(t);
                    1 == o ? c(t) : o && nt(t) ? c(t) : w(t);
                  } else 3 == t.nodeType && f && (tt(t, u), (u = !1));
                v = l;
              }
            }
            function rt(n) {
              var i = n.parentNode,
                t = i.firstChild;
              if (n === t) return !0;
              if (n === i.children[0]) {
                if (7 == t.nodeType || 8 == t.nodeType) return !0;
                if (3 == t.nodeType) return !/\S/.test(t.data);
              }
              return !1;
            }
            function c(n) {
              var t, u, f, i, e, s, r;
              return 1 == n.nodeType && n !== h && rt(n)
                ? c(n.parentNode)
                : ((t = sr(n, "table")),
                  (u = t && t.querySelector("colgroup")),
                  o.repeatHeaders &&
                    ((f = t && t.querySelector("thead")),
                    (i = sr(n, ".k-grid.k-widget")),
                    i &&
                      i.querySelector(".k-auto-scrollable") &&
                      (e = i.querySelector(".k-grid-header"))),
                  (s = b()),
                  (r = p.createRange()),
                  r.setStartBefore(h),
                  r.setEndBefore(n),
                  s.appendChild(r.extractContents()),
                  h.parentNode.insertBefore(s, h),
                  d(n.parentNode),
                  t &&
                    ((t = sr(n, "table")),
                    o.repeatHeaders &&
                      f &&
                      t.insertBefore(f.cloneNode(!0), t.firstChild),
                    u && t.insertBefore(u.cloneNode(!0), t.firstChild)),
                  void (
                    o.repeatHeaders &&
                    e &&
                    ((i = sr(n, ".k-grid.k-widget")),
                    i.insertBefore(e.cloneNode(!0), i.firstChild))
                  ));
            }
            function b() {
              var n = p.createElement("KENDO-PDF-PAGE");
              return (
                or(n, {
                  display: "block",
                  boxSizing: "content-box",
                  width: u ? u + "px" : "auto",
                  padding:
                    e.top +
                    "px " +
                    e.right +
                    "px " +
                    e.bottom +
                    "px " +
                    e.left +
                    "px",
                  position: "relative",
                  height: f ? f + "px" : "auto",
                  overflow: f || u ? "hidden" : "visible",
                  clear: "both",
                }),
                o && o.pageClassName && (n.className = o.pageClassName),
                l.push(n),
                n
              );
            }
            function k(n) {
              var r,
                i,
                t = n.getBoundingClientRect();
              return 0 === t.width || 0 === t.height
                ? 0
                : ((r = h.getBoundingClientRect().top),
                  (i = f - v),
                  t.height > i
                    ? 3
                    : t.top - r > i
                    ? 1
                    : t.bottom - r > i
                    ? 2
                    : 0);
            }
            function tt(n, t) {
              var u, i, f, r, e;
              /\S/.test(n.data) &&
                ((u = n.data.length),
                (i = p.createRange()),
                i.selectNodeContents(n),
                (f = k(i)),
                f &&
                  ((r = n),
                  1 == f
                    ? c(t ? n.parentNode : n)
                    : (!(function o(t, r, u) {
                        return (
                          i.setEnd(n, r),
                          t == r || r == u
                            ? r
                            : k(i)
                            ? o(t, (t + r) >> 1, r)
                            : o(r, (r + u) >> 1, u)
                        );
                      })(0, u >> 1, u),
                      !/\S/.test("" + i) && t
                        ? c(n.parentNode)
                        : ((r = n.splitText(i.endOffset)),
                          (e = b()),
                          i.setStartBefore(h),
                          e.appendChild(i.extractContents()),
                          h.parentNode.insertBefore(e, h),
                          d(r.parentNode))),
                  tt(r)));
            }
            function d(n) {
              var t = sr(n, "li");
              t && (t.setAttribute("kendo-no-bullet", "1"), d(t.parentNode));
            }
            var it = s(o.template),
              p = t.ownerDocument,
              l = [],
              h = o._destructive ? t : dl(t),
              a = p.createElement("KENDO-PDF-DOCUMENT"),
              v = 0;
            at(h.querySelectorAll("tfoot")).forEach(function (n) {
              n.parentNode.appendChild(n);
            });
            at(h.querySelectorAll("ol")).forEach(function (n) {
              at(n.children).forEach(function (n, t) {
                n.setAttribute("kendo-split-index", t);
              });
            });
            or(a, {
              display: "block",
              position: "absolute",
              boxSizing: "content-box",
              left: "-10000px",
              top: "-10000px",
            });
            u &&
              (or(a, {
                width: u + "px",
                paddingLeft: e.left + "px",
                paddingRight: e.right + "px",
              }),
              or(h, { overflow: "hidden" }));
            t.parentNode.insertBefore(a, t);
            a.appendChild(h);
            o.beforePageBreak
              ? setTimeout(function () {
                  o.beforePageBreak(a, g);
                }, 15)
              : setTimeout(g, 15);
          }
          var f, r;
          if ((t || (t = {}), (f = ui()), !n))
            return f.reject("No element to export");
          if ("function" != typeof getComputedStyle)
            throw Error(
              "window.getComputedStyle is missing.  You are using an unsupported browser, or running in IE8 compatibility mode.  Drawing HTML is supported in Chrome, Firefox, Safari and IE9+."
            );
          return (
            kendo.pdf.defineFont(ih(n.ownerDocument)),
            (r = vv(t.scale || 1)),
            eh(n, function () {
              var u,
                v = t && t.forcePageBreak,
                s = t && t.paperSize && "auto" != t.paperSize,
                c = kendo.pdf.getPaperOptions(function (n, i) {
                  return "paperSize" == n
                    ? s
                      ? t[n]
                      : "A4"
                    : n in t
                    ? t[n]
                    : i;
                }),
                a = s && c.paperSize[0],
                o = s && c.paperSize[1],
                i = t.margin && c.margin,
                y = !!i;
              v || o
                ? (i || (i = { left: 0, top: 0, right: 0, bottom: 0 }),
                  a && (a /= r.x),
                  o && (o /= r.y),
                  (i.left /= r.x),
                  (i.right /= r.x),
                  (i.top /= r.y),
                  (i.bottom /= r.y),
                  (u = new l({
                    pdf: {
                      multiPage: !0,
                      paperSize: s ? c.paperSize : "auto",
                      _ignoreMargin: y,
                    },
                  })),
                  h(
                    function (n) {
                      if (t.progress) {
                        var r = !1,
                          i = 0;
                        !(function o() {
                          if (i < n.pages.length) {
                            var s = e(n.pages[i]);
                            u.append(s);
                            t.progress({
                              page: s,
                              pageNum: ++i,
                              totalPages: n.pages.length,
                              cancel: function () {
                                r = !0;
                              },
                            });
                            r
                              ? n.container.parentNode.removeChild(n.container)
                              : setTimeout(o);
                          } else
                            n.container.parentNode.removeChild(n.container),
                              f.resolve(u);
                        })();
                      } else
                        n.pages.forEach(function (n) {
                          u.append(e(n));
                        }),
                          n.container.parentNode.removeChild(n.container),
                          f.resolve(u);
                    },
                    n,
                    v,
                    a ? a - i.left - i.right : null,
                    o ? o - i.top - i.bottom : null,
                    i,
                    t
                  ))
                : f.resolve(e(n));
            }),
            f
          );
        }
        function ih(n) {
          function u(n) {
            if (n) {
              var t = null;
              try {
                t = n.cssRules;
              } catch (i) {}
              t && e(n, t);
            }
          }
          function f(n) {
            var t,
              r = i(n.style, "src");
            return r
              ? k(r).reduce(function (n, t) {
                  var i = wo(t);
                  return i && n.push(i), n;
                }, [])
              : ((t = wo(n.cssText)), t ? [t] : []);
          }
          function e(n, t) {
            for (var r, s, c, l, a, h, e = 0; e < t.length; ++e)
              switch (((r = t[e]), r.type)) {
                case 3:
                  u(r.styleSheet);
                  break;
                case 5:
                  s = r.style;
                  c = k(i(s, "font-family"));
                  l = /^([56789]00|bold)$/i.test(i(s, "font-weight"));
                  a = "italic" == i(s, "font-style");
                  h = f(r);
                  h.length > 0 && o(n, c, l, a, h[0]);
              }
          }
          function o(n, t, i, u, f) {
            /^data:/i.test(f) ||
              /^[^\/:]+:\/\//.test(f) ||
              /^\//.test(f) ||
              (f = (n.href + "").replace(/[^\/]*$/, "") + f);
            t.forEach(function (n) {
              n = n.replace(/^(['"]?)(.*?)\1$/, "$2");
              i && (n += "|bold");
              u && (n += "|italic");
              r[n] = f;
            });
          }
          var r, t;
          for (
            null == n && (n = document), r = {}, t = 0;
            t < n.styleSheets.length;
            ++t
          )
            u(n.styleSheets[t]);
          return r;
        }
        function hr(n, t) {
          return Object.prototype.hasOwnProperty.call(n, t);
        }
        function yv(n) {
          return (n = "_counter_" + n), u[n];
        }
        function pv(n) {
          var i = [],
            t = u;
          for (n = "_counter_" + n; t; )
            hr(t, n) && i.push(t[n]), (t = Object.getPrototypeOf(t));
          return i.reverse();
        }
        function wv(n, t) {
          var i = u;
          for (n = "_counter_" + n; i && !hr(i, n); )
            i = Object.getPrototypeOf(i);
          i || (i = u._root);
          i[n] = (i[n] || 0) + (null == t ? 1 : t);
        }
        function bv(n, t) {
          n = "_counter_" + n;
          u[n] = null == t ? 0 : t;
        }
        function rh(n, t, i) {
          for (var u, f, r = 0; r < n.length; )
            (u = n[r++]),
              (f = parseFloat(n[r])),
              isNaN(f) ? t(u, i) : (t(u, f), ++r);
        }
        function uh(n) {
          var t,
            r = i(n, "counter-reset");
          r && rh(k(r, /^\s+/), bv, 0);
          t = i(n, "counter-increment");
          t && rh(k(t, /^\s+/), wv, 1);
        }
        function fh(n, t) {
          var i = kendo.parseColor(n, !0);
          return (
            i &&
              ((i = i.toRGB()),
              t ? (i = i.toCssRgba()) : 0 === i.a && (i = null)),
            i
          );
        }
        function kv(n, t) {
          function r() {
            --i <= 0 && t();
          }
          var i = 0;
          n.forEach(function (n) {
            for (var u, f = n.querySelectorAll("img"), t = 0; t < f.length; ++t)
              (u = f[t]), u.complete || (i++, (u.onload = u.onerror = r));
          });
          i || r();
        }
        function eh(n, t) {
          function o(n) {
            rr[n] || ((rr[n] = !0), e.push(n));
          }
          function u(n) {
            /^img$/i.test(n.tagName) && o(n.src);
            po(i(y(n), "background-image")).forEach(function (n) {
              "url" == n.type && o(n.url);
            });
            n.children && at(n.children).forEach(u);
          }
          function r() {
            --f <= 0 && t();
          }
          var f,
            e = [];
          Array.isArray(n) ? n.forEach(u) : u(n);
          f = e.length;
          0 === f && r();
          e.forEach(function (n) {
            var t = (rr[n] = new window.Image());
            /^data:/i.test(n) || (t.crossOrigin = "Anonymous");
            t.src = n;
            t.complete
              ? r()
              : ((t.onload = r),
                (t.onerror = function () {
                  rr[n] = null;
                  r();
                }));
          });
        }
        function pf(n) {
          var i,
            t = "";
          do
            (i = n % 26),
              (t = String.fromCharCode(97 + i) + t),
              (n = Math.floor(n / 26));
          while (n > 0);
          return t;
        }
        function oh(n, t, r) {
          var f, e;
          u = Object.create(u);
          u[n.tagName.toLowerCase()] = { element: n, style: t };
          f = i(t, "text-decoration");
          f &&
            "none" != f &&
            ((e = i(t, "color")),
            f.split(/\s+/g).forEach(function (n) {
              u[n] || (u[n] = e);
            }));
          gv(t) && (u._stackingContext = { element: n, group: r });
        }
        function sh() {
          u = Object.getPrototypeOf(u);
        }
        function hh(n) {
          if (null != u._clipbox) {
            var t = n.bbox(u._matrix);
            u._clipbox = u._clipbox ? f.intersect(u._clipbox, t) : t;
          }
        }
        function dv() {
          var n = u._clipbox;
          return (
            null == n || (n ? 0 === n.width() || 0 === n.height() : void 0)
          );
        }
        function gv(n) {
          function t(t) {
            return i(n, t);
          }
          if (
            "none" != t("transform") ||
            "static" != t("position") ||
            "auto" != t("z-index") ||
            t("opacity") < 1
          )
            return !0;
        }
        function y(n, t) {
          return window.getComputedStyle(n, t || null);
        }
        function i(n, t, i) {
          var r = n.getPropertyValue(t);
          return (
            (null != r && "" !== r) ||
              (it.webkit
                ? (r = n.getPropertyValue("-webkit-" + t))
                : it.mozilla
                ? (r = n.getPropertyValue("-moz-" + t))
                : it.opera
                ? (r = n.getPropertyValue("-o-" + t))
                : gt && (r = n.getPropertyValue("-ms-" + t))),
            arguments.length > 2 && (null == r || "" === r) ? i : r
          );
        }
        function wf(n, t, i, r) {
          n.setProperty(t, i, r);
          it.webkit
            ? n.setProperty("-webkit-" + t, i, r)
            : it.mozilla
            ? n.setProperty("-moz-" + t, i, r)
            : it.opera
            ? n.setProperty("-o-" + t, i, r)
            : gt &&
              (n.setProperty("-ms-" + t, i, r),
              (t =
                "ms" +
                t.replace(/(^|-)([a-z])/g, function (n, t, i) {
                  return t + i.toUpperCase();
                })),
              (n[t] = i));
        }
        function ot(n, t) {
          return (
            (t = "border-" + t),
            {
              width: parseFloat(i(n, t + "-width")),
              style: i(n, t + "-style"),
              color: fh(i(n, t + "-color"), !0),
            }
          );
        }
        function ch(n, t) {
          var i = n.style.cssText,
            r = t();
          return (n.style.cssText = i), r;
        }
        function wt(n, t) {
          var r = i(n, "border-" + t + "-radius")
            .split(/\s+/g)
            .map(parseFloat);
          return 1 == r.length && r.push(r[0]), bf({ x: r[0], y: r[1] });
        }
        function ny(n) {
          var t = n.getBoundingClientRect();
          return (t = ri(t, "border-*-width", n)), (t = ri(t, "padding-*", n));
        }
        function ri(n, t, r) {
          var u, f, e, o, s;
          return (
            "string" == typeof t
              ? ((u = y(r)),
                (f = parseFloat(i(u, t.replace("*", "top")))),
                (e = parseFloat(i(u, t.replace("*", "right")))),
                (o = parseFloat(i(u, t.replace("*", "bottom")))),
                (s = parseFloat(i(u, t.replace("*", "left")))))
              : "number" == typeof t && (f = e = o = s = t),
            {
              top: n.top + f,
              right: n.right - e,
              bottom: n.bottom - o,
              left: n.left + s,
              width: n.right - n.left - e - s,
              height: n.bottom - n.top - o - f,
            }
          );
        }
        function ty(n) {
          var t,
            r,
            u = i(n, "transform");
          return "none" == u
            ? null
            : ((t = /^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(u)),
              t
                ? ((r = i(n, "transform-origin")),
                  (t = t[1].split(/\s*,\s*/g).map(parseFloat)),
                  (r = r.split(/\s+/g).map(parseFloat)),
                  { matrix: t, origin: r })
                : void 0);
        }
        function lh(n) {
          return ((180 * n) / Math.PI) % 360;
        }
        function iy(n) {
          var t = parseFloat(n);
          return /grad$/.test(n)
            ? (Math.PI * t) / 200
            : /rad$/.test(n)
            ? t
            : /turn$/.test(n)
            ? Math.PI * t * 2
            : /deg$/.test(n)
            ? (Math.PI * t) / 180
            : void 0;
        }
        function yu(n, t) {
          return (
            (t = new o(t[0], t[1], t[2], t[3], t[4], t[5])), n.transform(t), t
          );
        }
        function cr(n, t) {
          n.clip(t);
        }
        function vi(n, t, i, r) {
          for (var u = new rt([t, i], r).curvePoints(), f = 1; f < u.length; )
            n.curveTo(u[f++], u[f++], u[f++]);
        }
        function bf(n) {
          return (n.x <= 0 || n.y <= 0) && (n.x = n.y = 0), n;
        }
        function ah(n, t, i, r, u) {
          var e = Math.max(0, t.x),
            o = Math.max(0, t.y),
            s = Math.max(0, i.x),
            h = Math.max(0, i.y),
            c = Math.max(0, r.x),
            l = Math.max(0, r.y),
            a = Math.max(0, u.x),
            v = Math.max(0, u.y),
            f = Math.min(
              n.width / (e + s),
              n.height / (h + l),
              n.width / (c + a),
              n.height / (v + o)
            );
          return (
            f < 1 &&
              ((e *= f),
              (o *= f),
              (s *= f),
              (h *= f),
              (c *= f),
              (l *= f),
              (a *= f),
              (v *= f)),
            {
              tl: { x: e, y: o },
              tr: { x: s, y: h },
              br: { x: c, y: l },
              bl: { x: a, y: v },
            }
          );
        }
        function kf(n, t, r) {
          var h,
            c,
            l,
            a,
            v,
            p,
            w,
            b,
            u = y(n),
            f = wt(u, "top-left"),
            e = wt(u, "top-right"),
            o = wt(u, "bottom-left"),
            s = wt(u, "bottom-right");
          return (
            ("padding" != r && "content" != r) ||
              ((h = ot(u, "top")),
              (c = ot(u, "right")),
              (l = ot(u, "bottom")),
              (a = ot(u, "left")),
              (f.x -= a.width),
              (f.y -= h.width),
              (e.x -= c.width),
              (e.y -= h.width),
              (s.x -= c.width),
              (s.y -= l.width),
              (o.x -= a.width),
              (o.y -= l.width),
              "content" == r &&
                ((v = parseFloat(i(u, "padding-top"))),
                (p = parseFloat(i(u, "padding-right"))),
                (w = parseFloat(i(u, "padding-bottom"))),
                (b = parseFloat(i(u, "padding-left"))),
                (f.x -= b),
                (f.y -= v),
                (e.x -= p),
                (e.y -= v),
                (s.x -= p),
                (s.y -= w),
                (o.x -= b),
                (o.y -= w))),
            "number" == typeof r &&
              ((f.x -= r),
              (f.y -= r),
              (e.x -= r),
              (e.y -= r),
              (s.x -= r),
              (s.y -= r),
              (o.x -= r),
              (o.y -= r)),
            vh(t, f, e, s, o)
          );
        }
        function vh(n, t, i, r, u) {
          var l = ah(n, t, i, r, u),
            o = l.tl,
            s = l.tr,
            h = l.br,
            c = l.bl,
            f = new e({ fill: null, stroke: null });
          return (
            f.moveTo(n.left, n.top + o.y),
            o.x &&
              vi(f, n.left + o.x, n.top + o.y, {
                startAngle: -180,
                endAngle: -90,
                radiusX: o.x,
                radiusY: o.y,
              }),
            f.lineTo(n.right - s.x, n.top),
            s.x &&
              vi(f, n.right - s.x, n.top + s.y, {
                startAngle: -90,
                endAngle: 0,
                radiusX: s.x,
                radiusY: s.y,
              }),
            f.lineTo(n.right, n.bottom - h.y),
            h.x &&
              vi(f, n.right - h.x, n.bottom - h.y, {
                startAngle: 0,
                endAngle: 90,
                radiusX: h.x,
                radiusY: h.y,
              }),
            f.lineTo(n.left + c.x, n.bottom),
            c.x &&
              vi(f, n.left + c.x, n.bottom - c.y, {
                startAngle: 90,
                endAngle: 180,
                radiusX: c.x,
                radiusY: c.y,
              }),
            f.close()
          );
        }
        function yh(n, t) {
          var i = parseFloat(n) + "";
          switch (t) {
            case "decimal-leading-zero":
              return i.length < 2 && (i = "0" + i), i;
            case "lower-roman":
              return iu(n).toLowerCase();
            case "upper-roman":
              return iu(n).toUpperCase();
            case "lower-latin":
            case "lower-alpha":
              return pf(n - 1);
            case "upper-latin":
            case "upper-alpha":
              return pf(n - 1).toUpperCase();
            default:
              return i;
          }
        }
        function ry(n, t) {
          function u(n, t, i) {
            return i
              ? ((i = i.replace(/^\s*(["'])(.*)\1\s*$/, "$2")),
                pv(n)
                  .map(function (n) {
                    return yh(n, t);
                  })
                  .join(i))
              : yh(yv(n) || 0, t);
          }
          var i,
            f = k(t, /^\s+/),
            r = [];
          return (
            f.forEach(function (t) {
              var f;
              (i = /^\s*(["'])(.*)\1\s*$/.exec(t))
                ? r.push(
                    i[2].replace(/\\([0-9a-f]{4})/gi, function (n, t) {
                      return String.fromCharCode(parseInt(t, 16));
                    })
                  )
                : (i = /^\s*counter\((.*?)\)\s*$/.exec(t))
                ? ((f = k(i[1])), r.push(u(f[0], f[1])))
                : (i = /^\s*counters\((.*?)\)\s*$/.exec(t))
                ? ((f = k(i[1])), r.push(u(f[0], f[2], f[1])))
                : r.push(
                    (i = /^\s*attr\((.*?)\)\s*$/.exec(t))
                      ? n.getAttribute(i[1]) || ""
                      : t
                  );
            }),
            r.join("")
          );
        }
        function df(n) {
          var r, t;
          if (n.cssText) return n.cssText;
          for (r = [], t = 0; t < n.length; ++t)
            r.push(n[t] + ": " + i(n, n[t]));
          return r.join(";\n");
        }
        function ph(n, t) {
          function r(t, r) {
            var u,
              f = y(n, t),
              e = f.content;
            uh(f);
            e &&
              "normal" != e &&
              "none" != e &&
              "0px" != f.width &&
              ((u = n.ownerDocument.createElement(ir)),
              (u.style.cssText = df(f)),
              (u.textContent = ry(n, e)),
              n.insertBefore(u, r),
              i.push(u));
          }
          var i, u;
          return n.tagName == ir
            ? void pu(n, t)
            : ((i = []),
              r(":before", n.firstChild),
              r(":after", null),
              void (i.length > 0
                ? ((u = n.className),
                  (n.className += " kendo-pdf-hide-pseudo-elements"),
                  pu(n, t),
                  (n.className = u),
                  i.forEach(function (t) {
                    n.removeChild(t);
                  }))
                : pu(n, t)));
        }
        function pu(n, t) {
          function bt(t) {
            var r, f, e, o, h, s;
            if (
              /^td$/i.test(n.tagName) &&
              ((r = u.table), r && "collapse" == i(r.style, "border-collapse"))
            ) {
              if (
                ((f = ot(r.style, "left").width),
                (e = ot(r.style, "top").width),
                0 === f && 0 === e)
              )
                return t;
              if (
                ((o = r.element.getBoundingClientRect()),
                (h = r.element.rows[0].cells[0]),
                (s = h.getBoundingClientRect()),
                s.top == o.top || s.left == o.left)
              )
                return at(t).map(function (n) {
                  return {
                    left: n.left + f,
                    top: n.top + e,
                    right: n.right + f,
                    bottom: n.bottom + e,
                    height: n.height,
                    width: n.width,
                  };
                });
            }
            return t;
          }
          function w(n, i, r, u, f, o, s, h) {
            function v(t, i, u) {
              var s = ((Math.PI / 2) * t) / (t + r),
                f = { x: i.x - t, y: i.y - r },
                o = new e({ fill: { color: n }, stroke: null }).moveTo(0, 0);
              yu(o, u);
              vi(o, 0, i.y, {
                startAngle: -90,
                endAngle: -lh(s),
                radiusX: i.x,
                radiusY: i.y,
              });
              f.x > 0 && f.y > 0
                ? (o.lineTo(f.x * Math.cos(s), i.y - f.y * Math.sin(s)),
                  vi(o, 0, i.y, {
                    startAngle: -lh(s),
                    endAngle: -90,
                    radiusX: f.x,
                    radiusY: f.y,
                    anticlockwise: !0,
                  }))
                : f.x > 0
                ? o.lineTo(f.x, r).lineTo(0, r)
                : o.lineTo(f.x, r).lineTo(f.x, 0);
              c.append(o.close());
            }
            if (!(r <= 0)) {
              var a,
                c = new l();
              yu(c, h);
              t.append(c);
              bf(o);
              bf(s);
              a = new e({ fill: { color: n }, stroke: null });
              c.append(a);
              a.moveTo(o.x ? Math.max(o.x, u) : 0, 0)
                .lineTo(i - (s.x ? Math.max(s.x, f) : 0), 0)
                .lineTo(i - Math.max(s.x, f), r)
                .lineTo(Math.max(o.x, u), r)
                .close();
              o.x && v(u, o, [-1, 0, 0, 1, o.x, 0]);
              s.x && v(f, s, [1, 0, 0, 1, i - s.x, 0]);
            }
          }
          function kt(n) {
            var u,
              i,
              r = new l();
            for (
              cr(r, vh(n, ct, lt, yt, vt)),
                t.append(r),
                g &&
                  ((u = new e({
                    fill: { color: g.toCssRgba() },
                    stroke: null,
                  })),
                  u
                    .moveTo(n.left, n.top)
                    .lineTo(n.right, n.top)
                    .lineTo(n.right, n.bottom)
                    .lineTo(n.left, n.bottom)
                    .close(),
                  r.append(u)),
                i = nt.length;
              --i >= 0;

            )
              dt(
                r,
                n,
                nt[i],
                tt[i % tt.length],
                b[i % b.length],
                rt[i % rt.length],
                ut[i % ut.length]
              );
          }
          function dt(t, i, r, u, e, o, s) {
            function c(t, i, r, h, c) {
              function w() {
                for (; a.origin.x > i.left; ) a.origin.x -= r;
              }
              function b() {
                for (; a.origin.y > i.top; ) a.origin.y -= h;
              }
              function k() {
                for (; a.origin.x < i.right; )
                  c(t, a.clone()), (a.origin.x += r);
              }
              var p,
                y,
                l,
                a,
                d,
                g = r / h,
                v = i;
              switch (
                ("content-box" == o
                  ? ((v = ri(v, "border-*-width", n)),
                    (v = ri(v, "padding-*", n)))
                  : "padding-box" == o && (v = ri(v, "border-*-width", n)),
                /^\s*auto(\s+auto)?\s*$/.test(s) ||
                  ("contain" == s
                    ? ((p = Math.min(v.width / r, v.height / h)),
                      (r *= p),
                      (h *= p))
                    : "cover" == s
                    ? ((p = Math.max(v.width / r, v.height / h)),
                      (r *= p),
                      (h *= p))
                    : ((y = s.split(/\s+/g)),
                      (r = /%$/.test(y[0])
                        ? (v.width * parseFloat(y[0])) / 100
                        : parseFloat(y[0])),
                      (h =
                        1 == y.length || "auto" == y[1]
                          ? r / g
                          : /%$/.test(y[1])
                          ? (v.height * parseFloat(y[1])) / 100
                          : parseFloat(y[1])))),
                (l = e + ""))
              ) {
                case "bottom":
                  l = "50% 100%";
                  break;
                case "top":
                  l = "50% 0";
                  break;
                case "left":
                  l = "0 50%";
                  break;
                case "right":
                  l = "100% 50%";
                  break;
                case "center":
                  l = "50% 50%";
              }
              if (
                ((l = l.split(/\s+/)),
                1 == l.length && (l[1] = "50%"),
                (l[0] = /%$/.test(l[0])
                  ? (parseFloat(l[0]) / 100) * (v.width - r)
                  : parseFloat(l[0])),
                (l[1] = /%$/.test(l[1])
                  ? (parseFloat(l[1]) / 100) * (v.height - h)
                  : parseFloat(l[1])),
                (a = new f([v.left + l[0], v.top + l[1]], [r, h])),
                "no-repeat" == u)
              )
                c(t, a);
              else if ("repeat-x" == u) w(), k();
              else if ("repeat-y" == u)
                for (b(); a.origin.y < i.bottom; )
                  c(t, a.clone()), (a.origin.y += h);
              else if ("repeat" == u)
                for (w(), b(), d = a.origin.clone(); a.origin.y < i.bottom; )
                  (a.origin.x = d.x), k(), (a.origin.y += h);
            }
            if (r && "none" != r)
              if ("url" == r.type) {
                if (/^url\(\"data:image\/svg/i.test(r.url)) return;
                var h = rr[r.url];
                h &&
                  h.width > 0 &&
                  h.height > 0 &&
                  c(t, i, h.width, h.height, function (n, t) {
                    n.append(new di(r.url, t));
                  });
              } else {
                if ("linear" != r.type) return;
                c(t, i, i.width, i.height, uy(r));
              }
          }
          function ni() {
            function f(i) {
              ch(n, function () {
                n.style.position = "relative";
                var r = n.ownerDocument.createElement(ir);
                r.style.position = "absolute";
                r.style.boxSizing = "border-box";
                "outside" == o
                  ? ((r.style.width = "6em"),
                    (r.style.left = "-6.8em"),
                    (r.style.textAlign = "right"))
                  : (r.style.left = "0px");
                i(r);
                n.insertBefore(r, n.firstChild);
                lr(r, t);
                n.removeChild(r);
              });
            }
            function e(t) {
              var i,
                r = n.parentNode.children,
                u = n.getAttribute("kendo-split-index");
              if (null != u) return t(0 | u, r.length);
              for (i = 0; i < r.length; ++i)
                if (r[i] === n) return t(i, r.length);
            }
            var o,
              u = i(r, "list-style-type");
            if ("none" != u)
              switch (((o = i(r, "list-style-position")), u)) {
                case "circle":
                case "disc":
                case "square":
                  f(function (n) {
                    n.style.fontSize = "60%";
                    n.style.lineHeight = "200%";
                    n.style.paddingRight = "0.5em";
                    n.style.fontFamily = "DejaVu Serif";
                    n.innerHTML = { disc: "●", circle: "◯", square: "■" }[u];
                  });
                  break;
                case "decimal":
                case "decimal-leading-zero":
                  f(function (n) {
                    e(function (t) {
                      ++t;
                      "decimal-leading-zero" == u && t < 10 && (t = "0" + t);
                      n.innerHTML = t + ".";
                    });
                  });
                  break;
                case "lower-roman":
                case "upper-roman":
                  f(function (n) {
                    e(function (t) {
                      t = iu(t + 1);
                      "upper-roman" == u && (t = t.toUpperCase());
                      n.innerHTML = t + ".";
                    });
                  });
                  break;
                case "lower-latin":
                case "lower-alpha":
                case "upper-latin":
                case "upper-alpha":
                  f(function (n) {
                    e(function (t) {
                      t = pf(t);
                      /^upper/i.test(u) && (t = t.toUpperCase());
                      n.innerHTML = t + ".";
                    });
                  });
              }
          }
          function ti(i, r, u) {
            function l(n) {
              return { x: n.y, y: n.x };
            }
            var a, v, y, f, p, b, k, g;
            if (
              0 !== i.width &&
              0 !== i.height &&
              (kt(i),
              (a = c.width > 0 && ((r && "ltr" == d) || (u && "rtl" == d))),
              (v = s.width > 0 && ((u && "ltr" == d) || (r && "rtl" == d))),
              0 !== o.width || 0 !== c.width || 0 !== s.width || 0 !== h.width)
            ) {
              if (
                o.color == s.color &&
                o.color == h.color &&
                o.color == c.color &&
                o.width == s.width &&
                o.width == h.width &&
                o.width == c.width &&
                a &&
                v
              )
                return (
                  (i = ri(i, o.width / 2)),
                  (y = kf(n, i, o.width / 2)),
                  (y.options.stroke = { color: o.color, width: o.width }),
                  void t.append(y)
                );
              if (
                0 === ct.x &&
                0 === lt.x &&
                0 === yt.x &&
                0 === vt.x &&
                o.width < 2 &&
                c.width < 2 &&
                s.width < 2 &&
                h.width < 2
              )
                return (
                  o.width > 0 &&
                    t.append(
                      new e({ stroke: { width: o.width, color: o.color } })
                        .moveTo(i.left, i.top + o.width / 2)
                        .lineTo(i.right, i.top + o.width / 2)
                    ),
                  h.width > 0 &&
                    t.append(
                      new e({ stroke: { width: h.width, color: h.color } })
                        .moveTo(i.left, i.bottom - h.width / 2)
                        .lineTo(i.right, i.bottom - h.width / 2)
                    ),
                  a &&
                    t.append(
                      new e({ stroke: { width: c.width, color: c.color } })
                        .moveTo(i.left + c.width / 2, i.top)
                        .lineTo(i.left + c.width / 2, i.bottom)
                    ),
                  void (
                    v &&
                    t.append(
                      new e({ stroke: { width: s.width, color: s.color } })
                        .moveTo(i.right - s.width / 2, i.top)
                        .lineTo(i.right - s.width / 2, i.bottom)
                    )
                  )
                );
              f = ah(i, ct, lt, yt, vt);
              p = f.tl;
              b = f.tr;
              k = f.br;
              g = f.bl;
              w(o.color, i.width, o.width, c.width, s.width, p, b, [
                1,
                0,
                0,
                1,
                i.left,
                i.top,
              ]);
              w(h.color, i.width, h.width, s.width, c.width, k, g, [
                -1,
                0,
                0,
                -1,
                i.right,
                i.bottom,
              ]);
              w(c.color, i.height, c.width, h.width, o.width, l(g), l(p), [
                0,
                -1,
                1,
                0,
                i.left,
                i.bottom,
              ]);
              w(s.color, i.height, s.width, o.width, h.width, l(b), l(k), [
                0,
                1,
                -1,
                0,
                i.right,
                i.top,
              ]);
            }
          }
          var nt,
            tt,
            b,
            rt,
            ut,
            ft,
            pt,
            v,
            a,
            p,
            et,
            st,
            ht,
            r = y(n),
            o = ot(r, "top"),
            s = ot(r, "right"),
            h = ot(r, "bottom"),
            c = ot(r, "left"),
            ct = wt(r, "top-left"),
            lt = wt(r, "top-right"),
            vt = wt(r, "bottom-left"),
            yt = wt(r, "bottom-right"),
            d = i(r, "direction"),
            g = i(r, "background-color");
          if (
            ((g = fh(g)),
            (nt = po(i(r, "background-image"))),
            (tt = k(i(r, "background-repeat"))),
            (b = k(i(r, "background-position"))),
            (rt = k(i(r, "background-origin"))),
            (ut = k(i(r, "background-size"))),
            gt &&
              ((ft = r.textOverflow),
              "ellipsis" == ft &&
                ((pt = n.style.textOverflow), (n.style.textOverflow = "clip"))),
            it.msie &&
              it.version < 10 &&
              (b = k(n.currentStyle.backgroundPosition)),
            (v = ri(n.getBoundingClientRect(), "border-*-width", n)),
            (function () {
              var n,
                f,
                o,
                s,
                h,
                u,
                c,
                y = i(r, "clip"),
                a = /^\s*rect\((.*)\)\s*$/.exec(y);
              a &&
                ((n = a[1].split(/[ ,]+/g)),
                (f = "auto" == n[0] ? v.top : parseFloat(n[0]) + v.top),
                (o = "auto" == n[1] ? v.right : parseFloat(n[1]) + v.left),
                (s = "auto" == n[2] ? v.bottom : parseFloat(n[2]) + v.top),
                (h = "auto" == n[3] ? v.left : parseFloat(n[3]) + v.left),
                (u = new l()),
                (c = new e()
                  .moveTo(h, f)
                  .lineTo(o, f)
                  .lineTo(o, s)
                  .lineTo(h, s)
                  .close()),
                cr(u, c),
                t.append(u),
                (t = u),
                hh(c));
            })(),
            (st = i(r, "display")),
            "table-row" == st)
          )
            for (a = [], p = 0, et = n.children; p < et.length; ++p)
              a.push(et[p].getBoundingClientRect());
          else
            (a = n.getClientRects()),
              1 == a.length && (a = [n.getBoundingClientRect()]);
          for (a = bt(a), p = 0; p < a.length; ++p)
            ti(a[p], 0 === p, p == a.length - 1);
          return (
            "A" == n.tagName &&
              n.href &&
              !/^#?$/.test(n.getAttribute("href")) &&
              ((u._avoidLinks && tu(n, u._avoidLinks)) ||
                ((ht = document.createRange()),
                ht.selectNodeContents(n),
                at(ht.getClientRects()).forEach(function (i) {
                  var r = new l();
                  r._pdfLink = {
                    url: n.href,
                    top: i.top,
                    right: i.right,
                    bottom: i.bottom,
                    left: i.left,
                  };
                  t.append(r);
                }))),
            a.length > 0 &&
              "list-item" == st &&
              !n.getAttribute("kendo-no-bullet") &&
              ni(a[0]),
            (function () {
              function u() {
                var r = kf(n, v, "padding"),
                  i = new l();
                cr(i, r);
                t.append(i);
                t = i;
                hh(r);
              }
              ey(n)
                ? u()
                : /^(hidden|auto|scroll)/.test(i(r, "overflow"))
                ? u()
                : /^(hidden|auto|scroll)/.test(i(r, "overflow-x"))
                ? u()
                : /^(hidden|auto|scroll)/.test(i(r, "overflow-y")) && u();
            })(),
            fy(n, t) || bh(n, t),
            gt && "ellipsis" == ft && (n.style.textOverflow = pt),
            t
          );
        }
        function uy(n) {
          return function (t, i) {
            var r,
              p,
              l,
              a,
              v,
              y,
              o,
              s,
              h,
              c,
              w,
              b,
              k,
              u = i.width(),
              f = i.height();
            switch (n.type) {
              case "linear":
                switch (((r = null != n.angle ? n.angle : Math.PI), n.to)) {
                  case "top":
                    r = 0;
                    break;
                  case "left":
                    r = -Math.PI / 2;
                    break;
                  case "bottom":
                    r = Math.PI;
                    break;
                  case "right":
                    r = Math.PI / 2;
                    break;
                  case "top left":
                  case "left top":
                    r = -Math.atan2(f, u);
                    break;
                  case "top right":
                  case "right top":
                    r = Math.atan2(f, u);
                    break;
                  case "bottom left":
                  case "left bottom":
                    r = Math.PI + Math.atan2(f, u);
                    break;
                  case "bottom right":
                  case "right bottom":
                    r = Math.PI - Math.atan2(f, u);
                }
                n.reverse && (r -= Math.PI);
                r %= 2 * Math.PI;
                r < 0 && (r += 2 * Math.PI);
                p = Math.abs(u * Math.sin(r)) + Math.abs(f * Math.cos(r));
                l = Math.atan((u * Math.tan(r)) / f);
                a = Math.sin(l);
                v = Math.cos(l);
                y = Math.abs(a) + Math.abs(v);
                o = (y / 2) * a;
                s = (y / 2) * v;
                r > Math.PI / 2 &&
                  r <= (3 * Math.PI) / 2 &&
                  ((o = -o), (s = -s));
                h = [];
                c = 0;
                w = n.stops.map(function (t, i) {
                  var u,
                    r = t.percent;
                  return (
                    r
                      ? (r = parseFloat(r) / 100)
                      : t.length
                      ? (r = parseFloat(t.length) / p)
                      : 0 === i
                      ? (r = 0)
                      : i == n.stops.length - 1 && (r = 1),
                    (u = { color: t.color.toCssRgba(), offset: r }),
                    null != r
                      ? ((c = r),
                        h.forEach(function (n, t) {
                          var i = n.stop;
                          i.offset =
                            n.left + ((c - n.left) * (t + 1)) / (h.length + 1);
                        }),
                        (h = []))
                      : h.push({ left: c, stop: u }),
                    u
                  );
                });
                b = [0.5 - o, 0.5 + s];
                k = [0.5 + o, 0.5 - s];
                t.append(
                  e
                    .fromRect(i)
                    .stroke(null)
                    .fill(new nr({ start: b, end: k, stops: w, userSpace: !1 }))
                );
                break;
              case "radial":
                window.console &&
                  window.console.log &&
                  window.console.log(
                    "Radial gradients are not yet supported in HTML renderer"
                  );
            }
          };
        }
        function fy(n, t) {
          var r, i, u, f;
          return (
            n._kendoExportVisual
              ? (r = n._kendoExportVisual())
              : window.kendo &&
                window.kendo.jQuery &&
                n.getAttribute(window.kendo.attr("role")) &&
                ((i = window.kendo.widgetInstance(window.kendo.jQuery(n))),
                i &&
                  (i.exportDOMVisual || i.exportVisual) &&
                  (r = i.exportDOMVisual
                    ? i.exportDOMVisual()
                    : i.exportVisual())),
            !!r &&
              ((u = new l()),
              u.children.push(r),
              (f = n.getBoundingClientRect()),
              u.transform(v().translate(f.left, f.top)),
              t.append(u),
              !0)
          );
        }
        function wh(n, t, i) {
          var r = ny(n),
            e = new f([r.left, r.top], [r.width, r.height]),
            u = new di(t, e);
          cr(u, kf(n, r, "content"));
          i.append(u);
        }
        function gf(n, t) {
          var f = y(n),
            e = y(t),
            r = parseFloat(i(f, "z-index")),
            u = parseFloat(i(e, "z-index")),
            o = i(f, "position"),
            s = i(e, "position");
          return isNaN(r) && isNaN(u)
            ? /static|absolute/.test(o) && /static|absolute/.test(s)
              ? 0
              : "static" == o
              ? -1
              : "static" == s
              ? 1
              : 0
            : isNaN(r)
            ? 0 === u
              ? 0
              : u > 0
              ? -1
              : 1
            : isNaN(u)
            ? 0 === r
              ? 0
              : r > 0
              ? 1
              : -1
            : parseFloat(r) - parseFloat(u);
        }
        function ey(n) {
          return /^(?:textarea|select|input)$/i.test(n.tagName);
        }
        function oy(n) {
          return n.selectedOptions && n.selectedOptions.length > 0
            ? n.selectedOptions[0]
            : n.options[n.selectedIndex];
        }
        function sy(n, t) {
          var o = y(n),
            u = i(o, "color"),
            r = n.getBoundingClientRect();
          "checkbox" == n.type
            ? (t.append(
                e
                  .fromRect(
                    new f([r.left + 1, r.top + 1], [r.width - 2, r.height - 2])
                  )
                  .stroke(u, 1)
              ),
              n.checked &&
                t.append(
                  new e()
                    .stroke(u, 1.2)
                    .moveTo(r.left + 0.22 * r.width, r.top + 0.55 * r.height)
                    .lineTo(r.left + 0.45 * r.width, r.top + 0.75 * r.height)
                    .lineTo(r.left + 0.78 * r.width, r.top + 0.22 * r.width)
                ))
            : (t.append(
                new dt(
                  new kt(
                    [(r.left + r.right) / 2, (r.top + r.bottom) / 2],
                    Math.min(r.width - 2, r.height - 2) / 2
                  )
                ).stroke(u, 1)
              ),
              n.checked &&
                t.append(
                  new dt(
                    new kt(
                      [(r.left + r.right) / 2, (r.top + r.bottom) / 2],
                      Math.min(r.width - 8, r.height - 8) / 2
                    )
                  )
                    .fill(u)
                    .stroke(null)
                ));
        }
        function hy(n, t) {
          var e,
            o,
            i,
            r,
            u,
            f = n.tagName.toLowerCase();
          if ("input" == f && ("checkbox" == n.type || "radio" == n.type))
            return sy(n, t);
          if (
            ((e = n.parentNode),
            (o = n.ownerDocument),
            (i = o.createElement(ir)),
            (i.style.cssText = df(y(n))),
            "input" == f && (i.style.whiteSpace = "pre"),
            ("select" != f && "textarea" != f) || (i.style.overflow = "auto"),
            "select" == f)
          )
            if (n.multiple)
              for (u = 0; u < n.options.length; ++u)
                (r = o.createElement(ir)),
                  (r.style.cssText = df(y(n.options[u]))),
                  (r.style.display = "block"),
                  (r.textContent = n.options[u].textContent),
                  i.appendChild(r);
            else (r = oy(n)), r && (i.textContent = r.textContent);
          else i.textContent = n.value;
          e.insertBefore(i, n);
          i.scrollLeft = n.scrollLeft;
          i.scrollTop = n.scrollTop;
          n.style.display = "none";
          bh(i, t);
          n.style.display = "";
          e.removeChild(i);
        }
        function bh(n, t) {
          var f, e, o, r, s, h, c;
          switch (
            (u._stackingContext.element === n && (u._stackingContext.group = t),
            n.tagName.toLowerCase())
          ) {
            case "img":
              wh(n, n.src, t);
              break;
            case "canvas":
              try {
                wh(n, n.toDataURL("image/png"), t);
              } catch (l) {}
              break;
            case "textarea":
            case "input":
            case "select":
              hy(n, t);
              break;
            default:
              for (
                f = [], e = [], o = [], r = n.firstChild;
                r;
                r = r.nextSibling
              )
                switch (r.nodeType) {
                  case 3:
                    /\S/.test(r.data) && kh(n, r, t);
                    break;
                  case 1:
                    s = y(r);
                    h = i(s, "float");
                    c = i(s, "position");
                    "static" != c
                      ? o.push(r)
                      : "none" != h
                      ? e.push(r)
                      : f.push(r);
                }
              uu(f, gf).forEach(function (n) {
                lr(n, t);
              });
              uu(e, gf).forEach(function (n) {
                lr(n, t);
              });
              uu(o, gf).forEach(function (n) {
                lr(n, t);
              });
          }
        }
        function kh(n, t, r) {
          function v(n) {
            var u, t, f, r, i;
            if (gt || it.chrome) {
              for (
                u = n.getClientRects(),
                  t = {
                    top: 1 / 0,
                    right: -(1 / 0),
                    bottom: -(1 / 0),
                    left: 1 / 0,
                  },
                  f = !1,
                  r = 0;
                r < u.length;
                ++r
              )
                (i = u[r]),
                  i.width <= 1 ||
                    i.bottom === k ||
                    ((t.left = Math.min(i.left, t.left)),
                    (t.top = Math.min(i.top, t.top)),
                    (t.right = Math.max(i.right, t.right)),
                    (t.bottom = Math.max(i.bottom, t.bottom)),
                    (f = !0));
              return f
                ? ((t.width = t.right - t.left),
                  (t.height = t.bottom - t.top),
                  t)
                : n.getBoundingClientRect();
            }
            return n.getBoundingClientRect();
          }
          function ht() {
            var i,
              f,
              h,
              r,
              u,
              e,
              c,
              p = s,
              n = l.substr(s).search(/\S/);
            if (((s += n), n < 0 || s >= a)) return !0;
            if (
              (o.setStart(t, s),
              o.setEnd(t, s + 1),
              (i = v(o)),
              (f = !1),
              (ut || ft > 1) &&
                ((n = l.substr(s).search(/\s/)),
                n >= 0 &&
                  (o.setEnd(t, s + n),
                  (h = v(o)),
                  h.bottom == i.bottom && ((i = h), (f = !0), (s += n)))),
              !f)
            ) {
              if (
                ((n = (function y(n, r, u) {
                  o.setEnd(t, r);
                  var f = v(o);
                  return f.bottom != i.bottom && n < r
                    ? y(n, (n + r) >> 1, r)
                    : f.right != i.right
                    ? ((i = f), r < u ? y(r, (r + u) >> 1, u) : r)
                    : r;
                })(s, Math.min(a, s + w), a)),
                n == s)
              )
                return !0;
              if (((s = n), (n = ("" + o).search(/\s+$/)), 0 === n)) return !1;
              n > 0 && (o.setEnd(t, o.startOffset + n), (i = v(o)));
            }
            if (
              (gt && (i = o.getClientRects()[0]),
              (r = "" + o),
              /^(?:pre|pre-wrap)$/i.test(et))
            ) {
              if (/\t/.test(r)) {
                for (u = 0, n = p; n < o.startOffset; ++n)
                  (e = l.charCodeAt(n)),
                    9 == e
                      ? (u += 8 - (u % 8))
                      : 10 == e || 13 == e
                      ? (u = 0)
                      : u++;
                for (; (n = r.search("\t")) >= 0; )
                  (c = "        ".substr(0, 8 - ((u + n) % 8))),
                    (r = r.substr(0, n) + c + r.substr(n + 1));
              }
            } else r = r.replace(/\s+/g, " ");
            f || (k = i.bottom);
            ct(r, i);
          }
          function ct(n, t) {
            var i, u, e;
            switch (
              (gt &&
                !isNaN(p) &&
                ((i = gl(b)),
                (u = (t.top + t.bottom - i) / 2),
                (t = {
                  top: u,
                  right: t.right,
                  bottom: u + i,
                  left: t.left,
                  height: i,
                  width: t.right - t.left,
                })),
              ot)
            ) {
              case "uppercase":
                n = n.toUpperCase();
                break;
              case "lowercase":
                n = n.toLowerCase();
                break;
              case "capitalize":
                n = n.replace(/(?:^|\s)\S/g, function (n) {
                  return n.toUpperCase();
                });
            }
            e = new kl(n, new f([t.left, t.top], [t.width, t.height]), {
              font: b,
              fill: { color: tt },
            });
            r.append(e);
          }
          function lt(n) {
            function t(t, i) {
              var u, f;
              t &&
                ((u = c / 12),
                (f = new e({ stroke: { width: u, color: t } })),
                (i -= u),
                f.moveTo(n.left, i).lineTo(n.right, i),
                r.append(f));
            }
            t(d, n.bottom);
            t(g, n.bottom - n.height / 2.7);
            t(nt, n.top);
          }
          var h,
            l,
            s,
            a,
            c,
            p,
            b,
            tt,
            o,
            rt,
            ut,
            ft,
            et,
            ot,
            w,
            k,
            d,
            g,
            nt,
            st;
          if (
            !dv() &&
            ((h = y(n)),
            !(parseFloat(i(h, "text-indent")) < -500) &&
              ((l = t.data),
              (s = 0),
              (a = l.search(/\S\s*$/) + 1),
              a &&
                ((c = i(h, "font-size")),
                (p = i(h, "line-height")),
                (b = [
                  i(h, "font-style"),
                  i(h, "font-variant"),
                  i(h, "font-weight"),
                  c,
                  i(h, "font-family"),
                ].join(" ")),
                (c = parseFloat(c)),
                (p = parseFloat(p)),
                0 !== c)))
          ) {
            for (
              tt = i(h, "color"),
                o = n.ownerDocument.createRange(),
                rt = i(h, "text-align"),
                ut = "justify" == rt,
                ft = i(h, "column-count", 1),
                et = i(h, "white-space"),
                ot = i(h, "text-transform"),
                w = (n.getBoundingClientRect().width / c) * 5,
                0 === w && (w = 500),
                k = null,
                d = u.underline,
                g = u["line-through"],
                nt = u.overline,
                st = d || g || nt;
              !ht();

            );
            st && (o.selectNode(t), at(o.getClientRects()).forEach(lt));
          }
        }
        function cy(n, t, i) {
          var f, s, r, o, h, c;
          for (
            "auto" != i
              ? ((f = u._stackingContext.group), (i = parseFloat(i)))
              : ((f = t), (i = 0)),
              s = f.children,
              r = 0;
            r < s.length && !(null != s[r]._dom_zIndex && s[r]._dom_zIndex > i);
            ++r
          );
          return (
            (o = new l()),
            f.insert(r, o),
            (o._dom_zIndex = i),
            f !== t &&
              u._clipbox &&
              ((h = u._matrix.invert()),
              (c = u._clipbox.transformCopy(h)),
              cr(o, e.fromRect(c))),
            o
          );
        }
        function lr(n, t) {
          var o,
            h,
            c,
            e,
            f,
            s,
            r = y(n);
          uh(r);
          /^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(
            n.tagName
          ) ||
            (null != u._clipbox &&
              ((o = parseFloat(i(r, "opacity"))),
              (h = i(r, "visibility")),
              (c = i(r, "display")),
              0 !== o &&
                "hidden" != h &&
                "none" != c &&
                ((e = ty(r)),
                (s = i(r, "z-index")),
                (e || o < 1) && "auto" == s && (s = 0),
                (f = cy(n, t, s)),
                o < 1 && f.opacity(o * f.opacity()),
                oh(n, r, f),
                e
                  ? ch(n, function () {
                      var o, s, h, t;
                      wf(n.style, "transform", "none", "important");
                      wf(n.style, "transition", "none", "important");
                      "static" == i(r, "position") &&
                        wf(n.style, "position", "relative", "important");
                      o = n.getBoundingClientRect();
                      s = o.left + e.origin[0];
                      h = o.top + e.origin[1];
                      t = [1, 0, 0, 1, -s, -h];
                      t = dh(t, e.matrix);
                      t = dh(t, [1, 0, 0, 1, s, h]);
                      t = yu(f, t);
                      u._matrix = u._matrix.multiplyCopy(t);
                      ph(n, f);
                    })
                  : ph(n, f),
                sh())));
        }
        function dh(n, t) {
          var e = n[0],
            o = n[1],
            s = n[2],
            h = n[3],
            c = n[4],
            l = n[5],
            i = t[0],
            r = t[1],
            u = t[2],
            f = t[3],
            a = t[4],
            v = t[5];
          return [
            e * i + o * u,
            e * r + o * f,
            s * i + h * u,
            s * r + h * f,
            c * i + l * u + a,
            c * r + l * f + v,
          ];
        }
        var gh,
          ne,
          h,
          wu,
          nc,
          ar,
          ui,
          te,
          b,
          tc,
          ic,
          rc,
          bu,
          fi,
          ei,
          vr,
          oi,
          uc,
          fc,
          bt,
          o,
          t,
          p,
          f,
          yi,
          c,
          ie,
          kt,
          ec,
          si,
          oc,
          pi,
          sc,
          dt,
          st,
          hc,
          yr,
          rt,
          cc,
          lc,
          ac,
          vc,
          re,
          yc,
          ku,
          ue,
          tt,
          wi,
          bi,
          fe,
          ee,
          pc,
          wc,
          oe,
          bc,
          pr,
          e,
          kc,
          ki,
          dc,
          gc,
          hi,
          di,
          du,
          l,
          nl,
          tl,
          il,
          rl,
          gi,
          ul,
          ht,
          vt,
          nr,
          wr,
          fl,
          br,
          se,
          gu,
          ci,
          el,
          a,
          g,
          ct,
          tr,
          kr,
          he,
          ol,
          ce,
          sl,
          le,
          ae,
          dr,
          w,
          ve,
          ye,
          pe,
          we,
          be,
          ke,
          nf,
          hl,
          tf,
          de,
          ge,
          rf,
          no,
          cl,
          to,
          nt,
          io,
          ro,
          uo,
          fo,
          uf,
          eo,
          oo,
          ll,
          al,
          lt,
          ff,
          li,
          vl,
          ef,
          gr,
          ai,
          ut,
          so,
          yl,
          of,
          pl,
          nu,
          ft,
          ho,
          co,
          lo,
          ao,
          vo,
          yo,
          wl,
          it,
          ir,
          rr,
          u,
          bl,
          gt,
          kl,
          tu,
          dl,
          po,
          k,
          wo,
          gl,
          na;
        window.kendo = window.kendo || {};
        gh = kendo.drawing;
        ne = gh.util;
        h = kendo.Class;
        wu = kendo.util;
        nc = kendo.support;
        ar = nc.browser;
        ui = ne.createPromise;
        te = ne.promiseAll;
        b = {
          extend: function (n) {
            var t,
              i = this;
            for (t in this) "extend" !== t && (n[t] = i[t]);
          },
          observers: function () {
            return (this._observers = this._observers || []);
          },
          addObserver: function (n) {
            return (
              this._observers
                ? this._observers.push(n)
                : (this._observers = [n]),
              this
            );
          },
          removeObserver: function (n) {
            var t = this.observers(),
              i = t.indexOf(n);
            return i !== -1 && t.splice(i, 1), this;
          },
          trigger: function (n, t) {
            var i,
              r,
              u = this._observers;
            if (u && !this._suspended)
              for (i = 0; i < u.length; i++) (r = u[i]), r[n] && r[n](t);
            return this;
          },
          optionsChange: function (n) {
            void 0 === n && (n = {});
            n.element = this;
            this.trigger("optionsChange", n);
          },
          geometryChange: function () {
            this.trigger("geometryChange", { element: this });
          },
          suspend: function () {
            return (this._suspended = (this._suspended || 0) + 1), this;
          },
          resume: function () {
            return (
              (this._suspended = Math.max((this._suspended || 0) - 1, 0)), this
            );
          },
          _observerField: function (n, t) {
            this[n] && this[n].removeObserver(this);
            this[n] = t;
            t.addObserver(this);
          },
        };
        tc = {
          1: "i",
          10: "x",
          100: "c",
          2: "ii",
          20: "xx",
          200: "cc",
          3: "iii",
          30: "xxx",
          300: "ccc",
          4: "iv",
          40: "xl",
          400: "cd",
          5: "v",
          50: "l",
          500: "d",
          6: "vi",
          60: "lx",
          600: "dc",
          7: "vii",
          70: "lxx",
          700: "dcc",
          8: "viii",
          80: "lxxx",
          800: "dccc",
          9: "ix",
          90: "xc",
          900: "cm",
          1e3: "m",
        };
        ic = "undefined";
        rc = 1;
        bu = Math.PI / 180;
        fi = Number.MAX_VALUE;
        ei = -Number.MAX_VALUE;
        vr =
          "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
        oi = String.fromCharCode;
        uc = {
          append: ur,
          arabicToRoman: iu,
          createPromise: ui,
          defined: r,
          definitionId: ru,
          deg: yt,
          encodeBase64: bo,
          eventCoordinates: ko,
          eventElement: go,
          isTransparent: ni,
          last: d,
          limitValue: ns,
          mergeSort: uu,
          promiseAll: te,
          rad: et,
          round: s,
          valueOrDefault: sf,
          bindEvents: hf,
          elementOffset: ts,
          elementSize: fr,
          elementStyles: fu,
          unbindEvents: cf,
          DEG_TO_RAD: bu,
          MAX_NUM: fi,
          MIN_NUM: ei,
        };
        fc = {}.toString;
        bt = h.extend({
          init: function (n, t) {
            var i,
              r,
              u = this;
            void 0 === t && (t = "");
            this.prefix = t;
            for (i in n) (r = n[i]), (r = u._wrap(r, i)), (u[i] = r);
          },
          get: function (n) {
            for (var i, r = n.split("."), t = this; r.length && t; )
              (i = r.shift()), (t = t[i]);
            return t;
          },
          set: function (n, t) {
            var i = this.get(n);
            i !== t &&
              (this._set(n, this._wrap(t, n)),
              this.optionsChange({ field: this.prefix + n, value: t }));
          },
          _set: function (n, t) {
            var f,
              e,
              r,
              o = this,
              s = n.indexOf(".") >= 0,
              u = this,
              i = n;
            if (s) {
              for (f = i.split("."), e = this.prefix; f.length > 1; )
                (i = f.shift()),
                  (e += i + "."),
                  (r = u[i]),
                  r || ((r = new bt({}, e)), r.addObserver(o), (u[i] = r)),
                  (u = r);
              i = f[0];
            }
            u._clear(i);
            u[i] = t;
          },
          _clear: function (n) {
            var t = this[n];
            t && t.removeObserver && t.removeObserver(this);
          },
          _wrap: function (n, t) {
            var u = fc.call(n),
              i = n;
            return (
              null !== i &&
                r(i) &&
                "[object Object]" === u &&
                (n instanceof bt ||
                  n instanceof h ||
                  (i = new bt(i, this.prefix + t + ".")),
                i.addObserver(this)),
              i
            );
          },
        });
        b.extend(bt.prototype);
        o = h.extend({
          init: function (n, t, i, r, u, f) {
            void 0 === n && (n = 0);
            void 0 === t && (t = 0);
            void 0 === i && (i = 0);
            void 0 === r && (r = 0);
            void 0 === u && (u = 0);
            void 0 === f && (f = 0);
            this.a = n;
            this.b = t;
            this.c = i;
            this.d = r;
            this.e = u;
            this.f = f;
          },
          multiplyCopy: function (n) {
            return new o(
              this.a * n.a + this.c * n.b,
              this.b * n.a + this.d * n.b,
              this.a * n.c + this.c * n.d,
              this.b * n.c + this.d * n.d,
              this.a * n.e + this.c * n.f + this.e,
              this.b * n.e + this.d * n.f + this.f
            );
          },
          invert: function () {
            var t = this,
              i = t.a,
              r = t.b,
              u = t.c,
              f = t.d,
              e = t.e,
              s = t.f,
              n = i * f - r * u;
            return 0 === n
              ? null
              : new o(
                  f / n,
                  -r / n,
                  -u / n,
                  i / n,
                  (u * s - f * e) / n,
                  (r * e - i * s) / n
                );
          },
          clone: function () {
            return new o(this.a, this.b, this.c, this.d, this.e, this.f);
          },
          equals: function (n) {
            return (
              !!n &&
              this.a === n.a &&
              this.b === n.b &&
              this.c === n.c &&
              this.d === n.d &&
              this.e === n.e &&
              this.f === n.f
            );
          },
          round: function (n) {
            return (
              (this.a = s(this.a, n)),
              (this.b = s(this.b, n)),
              (this.c = s(this.c, n)),
              (this.d = s(this.d, n)),
              (this.e = s(this.e, n)),
              (this.f = s(this.f, n)),
              this
            );
          },
          toArray: function (n) {
            var t,
              i = [this.a, this.b, this.c, this.d, this.e, this.f];
            if (r(n)) for (t = 0; t < i.length; t++) i[t] = s(i[t], n);
            return i;
          },
          toString: function (n, t) {
            return void 0 === t && (t = ","), this.toArray(n).join(t);
          },
        });
        o.translate = function (n, t) {
          return new o(1, 0, 0, 1, n, t);
        };
        o.unit = function () {
          return new o(1, 0, 0, 1, 0, 0);
        };
        o.rotate = function (n, t, i) {
          var r = new o();
          return (
            (r.a = Math.cos(et(n))),
            (r.b = Math.sin(et(n))),
            (r.c = -r.b),
            (r.d = r.a),
            (r.e = t - t * r.a + i * r.b || 0),
            (r.f = i - i * r.a - t * r.b || 0),
            r
          );
        };
        o.scale = function (n, t) {
          return new o(n, 0, 0, t, 0, 0);
        };
        o.IDENTITY = o.unit();
        t = h.extend({
          init: function (n, t) {
            this.x = n || 0;
            this.y = t || 0;
          },
          equals: function (n) {
            return n && n.x === this.x && n.y === this.y;
          },
          clone: function () {
            return new t(this.x, this.y);
          },
          rotate: function (n, i) {
            var r = t.create(i) || t.ZERO;
            return this.transform(o.rotate(n, r.x, r.y));
          },
          translate: function (n, t) {
            return (this.x += n), (this.y += t), this.geometryChange(), this;
          },
          translateWith: function (n) {
            return this.translate(n.x, n.y);
          },
          move: function (n, t) {
            return (this.x = this.y = 0), this.translate(n, t);
          },
          scale: function (n, t) {
            return (
              void 0 === t && (t = n),
              (this.x *= n),
              (this.y *= t),
              this.geometryChange(),
              this
            );
          },
          scaleCopy: function (n, t) {
            return this.clone().scale(n, t);
          },
          transform: function (n) {
            var t = pt(n),
              i = this,
              r = i.x,
              u = i.y;
            return (
              (this.x = t.a * r + t.c * u + t.e),
              (this.y = t.b * r + t.d * u + t.f),
              this.geometryChange(),
              this
            );
          },
          transformCopy: function (n) {
            var t = this.clone();
            return n && t.transform(n), t;
          },
          distanceTo: function (n) {
            var t = this.x - n.x,
              i = this.y - n.y;
            return Math.sqrt(t * t + i * i);
          },
          round: function (n) {
            return (
              (this.x = s(this.x, n)),
              (this.y = s(this.y, n)),
              this.geometryChange(),
              this
            );
          },
          toArray: function (n) {
            var t = r(n),
              i = t ? s(this.x, n) : this.x,
              u = t ? s(this.y, n) : this.y;
            return [i, u];
          },
          toString: function (n, t) {
            var f, i, u;
            return (
              void 0 === t && (t = " "),
              (f = this),
              (i = f.x),
              (u = f.y),
              r(n) && ((i = s(i, n)), (u = s(u, n))),
              i + t + u
            );
          },
        });
        t.create = function (n, i) {
          if (r(n))
            return n instanceof t
              ? n
              : 1 === arguments.length && 2 === n.length
              ? new t(n[0], n[1])
              : new t(n, i);
        };
        t.min = function () {
          for (
            var i, f = arguments, r = fi, u = fi, n = 0;
            n < arguments.length;
            n++
          )
            (i = f[n]), (r = Math.min(i.x, r)), (u = Math.min(i.y, u));
          return new t(r, u);
        };
        t.max = function () {
          for (
            var i, f = arguments, r = ei, u = ei, n = 0;
            n < arguments.length;
            n++
          )
            (i = f[n]), (r = Math.max(i.x, r)), (u = Math.max(i.y, u));
          return new t(r, u);
        };
        t.minPoint = function () {
          return new t(ei, ei);
        };
        t.maxPoint = function () {
          return new t(fi, fi);
        };
        Object.defineProperties &&
          Object.defineProperties(t, {
            ZERO: {
              get: function () {
                return new t(0, 0);
              },
            },
          });
        eu(t.prototype, ["x", "y"]);
        b.extend(t.prototype);
        p = h.extend({
          init: function (n, t) {
            this.width = n || 0;
            this.height = t || 0;
          },
          equals: function (n) {
            return n && n.width === this.width && n.height === this.height;
          },
          clone: function () {
            return new p(this.width, this.height);
          },
          toArray: function (n) {
            var t = r(n),
              i = t ? s(this.width, n) : this.width,
              u = t ? s(this.height, n) : this.height;
            return [i, u];
          },
        });
        p.create = function (n, t) {
          if (r(n))
            return n instanceof p
              ? n
              : 1 === arguments.length && 2 === n.length
              ? new p(n[0], n[1])
              : new p(n, t);
        };
        Object.defineProperties &&
          Object.defineProperties(p, {
            ZERO: {
              get: function () {
                return new p(0, 0);
              },
            },
          });
        eu(p.prototype, ["width", "height"]);
        b.extend(p.prototype);
        f = h.extend({
          init: function (n, i) {
            void 0 === n && (n = new t());
            void 0 === i && (i = new p());
            this.setOrigin(n);
            this.setSize(i);
          },
          clone: function () {
            return new f(this.origin.clone(), this.size.clone());
          },
          equals: function (n) {
            return (
              n && n.origin.equals(this.origin) && n.size.equals(this.size)
            );
          },
          setOrigin: function (n) {
            return (
              this._observerField("origin", t.create(n)),
              this.geometryChange(),
              this
            );
          },
          getOrigin: function () {
            return this.origin;
          },
          setSize: function (n) {
            return (
              this._observerField("size", p.create(n)),
              this.geometryChange(),
              this
            );
          },
          getSize: function () {
            return this.size;
          },
          width: function () {
            return this.size.width;
          },
          height: function () {
            return this.size.height;
          },
          topLeft: function () {
            return this.origin.clone();
          },
          bottomRight: function () {
            return this.origin.clone().translate(this.width(), this.height());
          },
          topRight: function () {
            return this.origin.clone().translate(this.width(), 0);
          },
          bottomLeft: function () {
            return this.origin.clone().translate(0, this.height());
          },
          center: function () {
            return this.origin
              .clone()
              .translate(this.width() / 2, this.height() / 2);
          },
          bbox: function (n) {
            var t = this.topLeft().transformCopy(n),
              i = this.topRight().transformCopy(n),
              r = this.bottomRight().transformCopy(n),
              u = this.bottomLeft().transformCopy(n);
            return f.fromPoints(t, i, r, u);
          },
          transformCopy: function (n) {
            return f.fromPoints(
              this.topLeft().transform(n),
              this.bottomRight().transform(n)
            );
          },
          expand: function (n, t) {
            return (
              void 0 === t && (t = n),
              (this.size.width += 2 * n),
              (this.size.height += 2 * t),
              this.origin.translate(-n, -t),
              this
            );
          },
          expandCopy: function (n, t) {
            return this.clone().expand(n, t);
          },
          containsPoint: function (n) {
            var t = this.origin,
              i = this.bottomRight();
            return !(n.x < t.x || n.y < t.y || i.x < n.x || i.y < n.y);
          },
          _isOnPath: function (n, t) {
            var i = this.expandCopy(t, t),
              r = this.expandCopy(-t, -t);
            return i.containsPoint(n) && !r.containsPoint(n);
          },
        });
        f.fromPoints = function () {
          var n = t.min.apply(null, arguments),
            i = t.max.apply(null, arguments),
            r = new p(i.x - n.x, i.y - n.y);
          return new f(n, r);
        };
        f.union = function (n, i) {
          return f.fromPoints(
            t.min(n.topLeft(), i.topLeft()),
            t.max(n.bottomRight(), i.bottomRight())
          );
        };
        f.intersect = function (n, i) {
          var r = {
              left: n.topLeft().x,
              top: n.topLeft().y,
              right: n.bottomRight().x,
              bottom: n.bottomRight().y,
            },
            u = {
              left: i.topLeft().x,
              top: i.topLeft().y,
              right: i.bottomRight().x,
              bottom: i.bottomRight().y,
            };
          if (
            r.left <= u.right &&
            u.left <= r.right &&
            r.top <= u.bottom &&
            u.top <= r.bottom
          )
            return f.fromPoints(
              new t(Math.max(r.left, u.left), Math.max(r.top, u.top)),
              new t(Math.min(r.right, u.right), Math.min(r.bottom, u.bottom))
            );
        };
        b.extend(f.prototype);
        yi = h.extend({
          init: function (n) {
            void 0 === n && (n = o.unit());
            this._matrix = n;
          },
          clone: function () {
            return new yi(this._matrix.clone());
          },
          equals: function (n) {
            return n && n._matrix.equals(this._matrix);
          },
          translate: function (n, t) {
            return (
              (this._matrix = this._matrix.multiplyCopy(o.translate(n, t))),
              this._optionsChange(),
              this
            );
          },
          scale: function (n, i, r) {
            void 0 === i && (i = n);
            void 0 === r && (r = null);
            var u = r;
            return (
              u &&
                ((u = t.create(u)),
                (this._matrix = this._matrix.multiplyCopy(
                  o.translate(u.x, u.y)
                ))),
              (this._matrix = this._matrix.multiplyCopy(o.scale(n, i))),
              u &&
                (this._matrix = this._matrix.multiplyCopy(
                  o.translate(-u.x, -u.y)
                )),
              this._optionsChange(),
              this
            );
          },
          rotate: function (n, i) {
            var r = t.create(i) || t.ZERO;
            return (
              (this._matrix = this._matrix.multiplyCopy(o.rotate(n, r.x, r.y))),
              this._optionsChange(),
              this
            );
          },
          multiply: function (n) {
            var t = pt(n);
            return (
              (this._matrix = this._matrix.multiplyCopy(t)),
              this._optionsChange(),
              this
            );
          },
          matrix: function (n) {
            return n
              ? ((this._matrix = n), this._optionsChange(), this)
              : this._matrix;
          },
          _optionsChange: function () {
            this.optionsChange({ field: "transform", value: this });
          },
        });
        b.extend(yi.prototype);
        c = h.extend({
          init: function (n) {
            this._initOptions(n);
          },
          _initOptions: function (n) {
            var t, i;
            void 0 === n && (n = {});
            t = n.clip;
            i = n.transform;
            i && (n.transform = v(i));
            t && !t.id && (t.id = ru());
            this.options = new bt(n);
            this.options.addObserver(this);
          },
          transform: function (n) {
            return r(n)
              ? void this.options.set("transform", v(n))
              : this.options.get("transform");
          },
          parentTransform: function () {
            for (var n, i, t = this; t.parent; )
              (t = t.parent),
                (i = t.transform()),
                i && (n = i.matrix().multiplyCopy(n || o.unit()));
            if (n) return v(n);
          },
          currentTransform: function (n) {
            var r, t, i, u;
            if (
              (void 0 === n && (n = this.parentTransform()),
              (r = this.transform()),
              (t = pt(r)),
              (i = pt(n)),
              (u = t && i ? i.multiplyCopy(t) : t || i))
            )
              return v(u);
          },
          visible: function (n) {
            return r(n)
              ? (this.options.set("visible", n), this)
              : this.options.get("visible") !== !1;
          },
          clip: function (n) {
            var t = this.options;
            return r(n)
              ? (n && !n.id && (n.id = ru()), t.set("clip", n), this)
              : t.get("clip");
          },
          opacity: function (n) {
            return r(n)
              ? (this.options.set("opacity", n), this)
              : sf(this.options.get("opacity"), 1);
          },
          clippedBBox: function (n) {
            var t,
              i = this._clippedBBox(n);
            if (i) return (t = this.clip()), t ? f.intersect(i, t.bbox(n)) : i;
          },
          containsPoint: function (n, t) {
            var r, i;
            return (
              !!this.visible() &&
              ((r = this.currentTransform(t)),
              (i = n),
              r && (i = n.transformCopy(r.matrix().invert())),
              (this._hasFill() && this._containsPoint(i)) ||
                (this._isOnPath && this._hasStroke() && this._isOnPath(i)))
            );
          },
          _hasFill: function () {
            var n = this.options.fill;
            return n && !ni(n.color);
          },
          _hasStroke: function () {
            var n = this.options.stroke;
            return n && n.width > 0 && !ni(n.color);
          },
          _clippedBBox: function (n) {
            return this.bbox(n);
          },
        });
        c.prototype.nodeType = "Element";
        b.extend(c.prototype);
        ie = Math.PI / 2;
        kt = h.extend({
          init: function (n, i) {
            void 0 === n && (n = new t());
            void 0 === i && (i = 0);
            this.setCenter(n);
            this.setRadius(i);
          },
          setCenter: function (n) {
            return (
              this._observerField("center", t.create(n)),
              this.geometryChange(),
              this
            );
          },
          getCenter: function () {
            return this.center;
          },
          equals: function (n) {
            return (
              n && n.center.equals(this.center) && n.radius === this.radius
            );
          },
          clone: function () {
            return new kt(this.center.clone(), this.radius);
          },
          pointAt: function (n) {
            return this._pointAt(et(n));
          },
          bbox: function (n) {
            for (
              var o,
                s,
                r,
                h = this,
                c = rs(this.center, this.radius, this.radius, n),
                u = t.maxPoint(),
                e = t.minPoint(),
                i = 0;
              i < 4;
              i++
            )
              (o = h._pointAt(c.x + i * ie).transformCopy(n)),
                (s = h._pointAt(c.y + i * ie).transformCopy(n)),
                (r = new t(o.x, s.y)),
                (u = t.min(u, r)),
                (e = t.max(e, r));
            return f.fromPoints(u, e);
          },
          _pointAt: function (n) {
            var i = this,
              r = i.center,
              u = i.radius;
            return new t(r.x + u * Math.cos(n), r.y + u * Math.sin(n));
          },
          containsPoint: function (n) {
            var t = this,
              i = t.center,
              r = t.radius;
            return (
              Math.pow(n.x - i.x, 2) + Math.pow(n.y - i.y, 2) <= Math.pow(r, 2)
            );
          },
          _isOnPath: function (n, t) {
            var i = this,
              f = i.center,
              r = i.radius,
              u = f.distanceTo(n);
            return r - t <= u && u <= r + t;
          },
        });
        eu(kt.prototype, ["radius"]);
        b.extend(kt.prototype);
        ec = "Gradient";
        si = {
          extend: function (n) {
            n.fill = this.fill;
            n.stroke = this.stroke;
          },
          fill: function (n, t) {
            var i,
              u = this.options;
            return r(n)
              ? (n && n.nodeType !== ec
                  ? ((i = { color: n }),
                    r(t) && (i.opacity = t),
                    u.set("fill", i))
                  : u.set("fill", n),
                this)
              : u.get("fill");
          },
          stroke: function (n, t, i) {
            return r(n)
              ? (this.options.set("stroke.color", n),
                r(t) && this.options.set("stroke.width", t),
                r(i) && this.options.set("stroke.opacity", i),
                this)
              : this.options.get("stroke");
          },
        };
        oc = "" + o.IDENTITY;
        pi = {
          extend: function (n) {
            n.bbox = this.bbox;
            n.geometryChange = this.geometryChange;
          },
          bbox: function (n) {
            var t,
              i,
              r = pt(this.currentTransform(n)),
              u = r ? "" + r : oc;
            return (
              this._bboxCache && this._matrixHash === u
                ? (t = this._bboxCache.clone())
                : ((t = this._bbox(r)),
                  (this._bboxCache = t ? t.clone() : null),
                  (this._matrixHash = u)),
              (i = this.options.get("stroke.width")),
              i && t && t.expand(i / 2),
              t
            );
          },
          geometryChange: function () {
            delete this._bboxCache;
            this.trigger("geometryChange", { element: this });
          },
        };
        sc = "#000";
        dt = c.extend({
          init: function (n, t) {
            void 0 === n && (n = new kt());
            void 0 === t && (t = {});
            c.fn.init.call(this, t);
            this.geometry(n);
            r(this.options.stroke) || this.stroke(sc);
          },
          rawBBox: function () {
            return this._geometry.bbox();
          },
          _bbox: function (n) {
            return this._geometry.bbox(n);
          },
          _containsPoint: function (n) {
            return this.geometry().containsPoint(n);
          },
          _isOnPath: function (n) {
            return this.geometry()._isOnPath(n, this.options.stroke.width / 2);
          },
        });
        dt.prototype.nodeType = "Circle";
        si.extend(dt.prototype);
        pi.extend(dt.prototype);
        ou(dt.prototype, ["geometry"]);
        st = 10;
        hc = 45;
        yr = Math.pow;
        rt = h.extend({
          init: function (n, i) {
            void 0 === n && (n = new t());
            void 0 === i && (i = {});
            this.setCenter(n);
            this.radiusX = i.radiusX;
            this.radiusY = i.radiusY || i.radiusX;
            this.startAngle = i.startAngle;
            this.endAngle = i.endAngle;
            this.anticlockwise = i.anticlockwise || !1;
            this.xRotation = i.xRotation;
          },
          clone: function () {
            return new rt(this.center, {
              radiusX: this.radiusX,
              radiusY: this.radiusY,
              startAngle: this.startAngle,
              endAngle: this.endAngle,
              anticlockwise: this.anticlockwise,
            });
          },
          setCenter: function (n) {
            return (
              this._observerField("center", t.create(n)),
              this.geometryChange(),
              this
            );
          },
          getCenter: function () {
            return this.center;
          },
          pointAt: function (n) {
            var i = this.center,
              r = et(n);
            return new t(
              i.x + this.radiusX * Math.cos(r),
              i.y + this.radiusY * Math.sin(r)
            );
          },
          curvePoints: function () {
            var u,
              t,
              i,
              n,
              c = this,
              f = this.startAngle,
              l = this.anticlockwise ? -1 : 1,
              e = [this.pointAt(f)],
              o = this._arcInterval(),
              s = o.endAngle - o.startAngle,
              h = Math.ceil(s / hc),
              a = s / h,
              r = f;
            for (
              this.xRotation && (u = v().rotate(this.xRotation, this.center)),
                t = 1;
              t <= h;
              t++
            )
              (i = r + l * a),
                (n = c._intervalCurvePoints(r, i, u)),
                e.push(n.cp1, n.cp2, n.p2),
                (r = i);
            return e;
          },
          bbox: function (n) {
            for (
              var o,
                s,
                a = this,
                v = this._arcInterval(),
                h = v.startAngle,
                i = v.endAngle,
                y = rs(this.center, this.radiusX, this.radiusY, n),
                w = yt(y.x),
                b = yt(y.y),
                p = this.pointAt(i).transformCopy(n),
                u = es(w, h),
                e = es(b, h),
                r = this.pointAt(h).transformCopy(n),
                c = t.min(r, p),
                l = t.max(r, p);
              u < i || e < i;

            )
              (o = void 0),
                u < i && ((o = a.pointAt(u).transformCopy(n)), (u += 90)),
                (s = void 0),
                e < i && ((s = a.pointAt(e).transformCopy(n)), (e += 90)),
                (r = new t(o.x, s.y)),
                (c = t.min(c, r)),
                (l = t.max(l, r));
            return f.fromPoints(c, l);
          },
          _arcInterval: function () {
            var r,
              i = this,
              t = i.startAngle,
              n = i.endAngle,
              u = i.anticlockwise;
            return (
              u && ((r = t), (t = n), (n = r)),
              (t > n || (u && t === n)) && (n += 360),
              { startAngle: t, endAngle: n }
            );
          },
          _intervalCurvePoints: function (n, i, r) {
            var u = this.pointAt(n),
              f = this.pointAt(i),
              o = this._derivativeAt(n),
              s = this._derivativeAt(i),
              e = (et(i) - et(n)) / 3,
              h = new t(u.x + e * o.x, u.y + e * o.y),
              c = new t(f.x - e * s.x, f.y - e * s.y);
            return (
              r &&
                (u.transform(r),
                f.transform(r),
                h.transform(r),
                c.transform(r)),
              { p1: u, cp1: h, cp2: c, p2: f }
            );
          },
          _derivativeAt: function (n) {
            var i = et(n);
            return new t(
              -this.radiusX * Math.sin(i),
              this.radiusY * Math.cos(i)
            );
          },
          containsPoint: function (n) {
            var f,
              i,
              e,
              r = this._arcInterval(),
              v = r.endAngle - r.startAngle,
              o = this,
              t = o.center,
              s = o.radiusX,
              h = o.radiusY,
              c = t.distanceTo(n),
              l = Math.atan2(n.y - t.y, n.x - t.x),
              a =
                (s * h) /
                Math.sqrt(
                  yr(s, 2) * yr(Math.sin(l), 2) + yr(h, 2) * yr(Math.cos(l), 2)
                ),
              y = this.pointAt(this.startAngle).round(st),
              p = this.pointAt(this.endAngle).round(st),
              u = ea(t, n.round(st), y, p);
            return (
              v < 180
                ? (f = u && lf(t.distanceTo(u), c) && lf(c, a))
                : ((i = fs(t.x, t.y, s, h, n.x, n.y)),
                  360 !== i && (i = (360 + i) % 360),
                  (e = r.startAngle <= i && i <= r.endAngle),
                  (f = (e && lf(c, a)) || (!e && (!u || u.equals(n))))),
              f
            );
          },
          _isOnPath: function (n, t) {
            var r,
              u = this._arcInterval(),
              f = this.center,
              i = fs(f.x, f.y, this.radiusX, this.radiusY, n.x, n.y);
            return (
              360 !== i && (i = (360 + i) % 360),
              (r = u.startAngle <= i && i <= u.endAngle),
              r && this.pointAt(i).distanceTo(n) <= t
            );
          },
        });
        rt.fromPoints = function (n, t, i, r, u, f, e) {
          var o = oa({
            x1: n.x,
            y1: n.y,
            x2: t.x,
            y2: t.y,
            rx: i,
            ry: r,
            largeArc: u,
            swipe: f,
            rotation: e,
          });
          return new rt(o.center, {
            startAngle: o.startAngle,
            endAngle: o.endAngle,
            radiusX: o.radiusX,
            radiusY: o.radiusY,
            xRotation: o.xRotation,
            anticlockwise: 0 === f,
          });
        };
        eu(rt.prototype, [
          "radiusX",
          "radiusY",
          "startAngle",
          "endAngle",
          "anticlockwise",
        ]);
        b.extend(rt.prototype);
        cc = [].push;
        lc = [].pop;
        ac = [].splice;
        vc = [].shift;
        re = [].slice;
        yc = [].unshift;
        ku = h.extend({
          init: function (n) {
            void 0 === n && (n = []);
            this.length = 0;
            this._splice(0, n.length, n);
          },
          elements: function (n) {
            return n
              ? (this._splice(0, this.length, n), this._change(), this)
              : this.slice(0);
          },
          push: function () {
            var n = arguments,
              t = cc.apply(this, n);
            return this._add(n), t;
          },
          slice: function () {
            return re.call(this);
          },
          pop: function () {
            var t = this.length,
              n = lc.apply(this);
            return t && this._remove([n]), n;
          },
          splice: function (n, t) {
            var i = re.call(arguments, 2),
              r = this._splice(n, t, i);
            return this._change(), r;
          },
          shift: function () {
            var t = this.length,
              n = vc.apply(this);
            return t && this._remove([n]), n;
          },
          unshift: function () {
            var n = arguments,
              t = yc.apply(this, n);
            return this._add(n), t;
          },
          indexOf: function (n) {
            for (var i = this, r = this.length, t = 0; t < r; t++)
              if (i[t] === n) return t;
            return -1;
          },
          _splice: function (n, t, i) {
            var r = ac.apply(this, [n, t].concat(i));
            return this._clearObserver(r), this._setObserver(i), r;
          },
          _add: function (n) {
            this._setObserver(n);
            this._change();
          },
          _remove: function (n) {
            this._clearObserver(n);
            this._change();
          },
          _setObserver: function (n) {
            for (var i = this, t = 0; t < n.length; t++) n[t].addObserver(i);
          },
          _clearObserver: function (n) {
            for (var i = this, t = 0; t < n.length; t++) n[t].removeObserver(i);
          },
          _change: function () {},
        });
        b.extend(ku.prototype);
        ue = ku.extend({
          _change: function () {
            this.geometryChange();
          },
        });
        tt = h.extend({
          init: function (n, t) {
            void 0 === n && (n = 0);
            void 0 === t && (t = 0);
            this.real = n;
            this.img = t;
          },
          add: function (n) {
            return new tt(s(this.real + n.real, st), s(this.img + n.img, st));
          },
          addConstant: function (n) {
            return new tt(this.real + n, this.img);
          },
          negate: function () {
            return new tt(-this.real, -this.img);
          },
          multiply: function (n) {
            return new tt(
              this.real * n.real - this.img * n.img,
              this.real * n.img + this.img * n.real
            );
          },
          multiplyConstant: function (n) {
            return new tt(this.real * n, this.img * n);
          },
          nthRoot: function (n) {
            var t = Math.atan2(this.img, this.real),
              r = Math.sqrt(Math.pow(this.img, 2) + Math.pow(this.real, 2)),
              i = Math.pow(r, 1 / n);
            return new tt(i * Math.cos(t / n), i * Math.sin(t / n));
          },
          equals: function (n) {
            return this.real === n.real && this.img === n.img;
          },
          isReal: function () {
            return 0 === this.img;
          },
        });
        wi = h.extend({
          init: function (n, i, r) {
            this.anchor(n || new t());
            this.controlIn(i);
            this.controlOut(r);
          },
          bboxTo: function (n, t) {
            var i = this.anchor().transformCopy(t),
              r = n.anchor().transformCopy(t);
            return this.controlOut() && n.controlIn()
              ? this._curveBoundingBox(
                  i,
                  this.controlOut().transformCopy(t),
                  n.controlIn().transformCopy(t),
                  r
                )
              : this._lineBoundingBox(i, r);
          },
          _lineBoundingBox: function (n, t) {
            return f.fromPoints(n, t);
          },
          _curveBoundingBox: function (n, i, r, u) {
            var e = [n, i, r, u],
              o = this._curveExtremesFor(e, "x"),
              s = this._curveExtremesFor(e, "y"),
              h = as([o.min, o.max, n.x, u.x]),
              c = as([s.min, s.max, n.y, u.y]);
            return f.fromPoints(new t(h.min, c.min), new t(h.max, c.max));
          },
          _curveExtremesFor: function (n, t) {
            var i = this._curveExtremes(n[0][t], n[1][t], n[2][t], n[3][t]);
            return { min: hu(i.min, t, n), max: hu(i.max, t, n) };
          },
          _curveExtremes: function (n, t, i, r) {
            var f,
              e,
              o = n - 3 * t + 3 * i - r,
              u = -2 * (n - 2 * t + i),
              l = n - t,
              c = Math.sqrt(u * u - 4 * o * l),
              s = 0,
              h = 1;
            return (
              0 === o
                ? 0 !== u && (s = h = -l / u)
                : isNaN(c) ||
                  ((s = (-u + c) / (2 * o)), (h = (-u - c) / (2 * o))),
              (f = Math.max(Math.min(s, h), 0)),
              (f < 0 || f > 1) && (f = 0),
              (e = Math.min(Math.max(s, h), 1)),
              (e > 1 || e < 0) && (e = 1),
              { min: f, max: e }
            );
          },
          _intersectionsTo: function (n, t) {
            return this.controlOut() && n.controlIn()
              ? ca(
                  [this.anchor(), this.controlOut(), n.controlIn(), n.anchor()],
                  t,
                  this.bboxTo(n)
                )
              : ls(this.anchor(), n.anchor(), t);
          },
          _isOnCurveTo: function (n, t, i, r) {
            var u,
              o,
              s,
              f,
              h,
              e,
              c,
              l = this.bboxTo(n).expand(i, i);
            if (l.containsPoint(t))
              return (
                (u = this.anchor()),
                (o = this.controlOut()),
                (s = n.controlIn()),
                (f = n.anchor()),
                "start" === r && u.distanceTo(t) <= i
                  ? !os(u, o, t)
                  : "end" === r && f.distanceTo(t) <= i
                  ? !os(f, s, t)
                  : ((h = [u, o, s, f]),
                    !(!cu(h, t, "x", "y", i) && !cu(h, t, "y", "x", i)) ||
                      ((e = v().rotate(45, t)),
                      (c = [
                        u.transformCopy(e),
                        o.transformCopy(e),
                        s.transformCopy(e),
                        f.transformCopy(e),
                      ]),
                      cu(c, t, "x", "y", i) || cu(c, t, "y", "x", i)))
              );
          },
          _isOnLineTo: function (n, t, i) {
            var r = this.anchor(),
              u = n.anchor(),
              e = yt(Math.atan2(u.y - r.y, u.x - r.x)),
              o = new f([r.x, r.y - i / 2], [r.distanceTo(u), i]);
            return o.containsPoint(t.transformCopy(v().rotate(-e, r)));
          },
          _isOnPathTo: function (n, t, i, r) {
            return this.controlOut() && n.controlIn()
              ? this._isOnCurveTo(n, t, i / 2, r)
              : this._isOnLineTo(n, t, i);
          },
        });
        su(wi.prototype, ["anchor", "controlIn", "controlOut"]);
        b.extend(wi.prototype);
        bi = c.extend({
          init: function (n) {
            c.fn.init.call(this, n);
            this.paths = new ue();
            this.paths.addObserver(this);
            r(this.options.stroke) || this.stroke("#000");
          },
          moveTo: function (n, t) {
            var i = new e();
            return i.moveTo(n, t), this.paths.push(i), this;
          },
          lineTo: function (n, t) {
            return this.paths.length > 0 && d(this.paths).lineTo(n, t), this;
          },
          curveTo: function (n, t, i) {
            return (
              this.paths.length > 0 && d(this.paths).curveTo(n, t, i), this
            );
          },
          arc: function (n, t, i, r, u) {
            return (
              this.paths.length > 0 && d(this.paths).arc(n, t, i, r, u), this
            );
          },
          arcTo: function (n, t, i, r, u, f) {
            return (
              this.paths.length > 0 && d(this.paths).arcTo(n, t, i, r, u, f),
              this
            );
          },
          close: function () {
            return this.paths.length > 0 && d(this.paths).close(), this;
          },
          _bbox: function (n) {
            return lu(this.paths, !0, n);
          },
          rawBBox: function () {
            return lu(this.paths, !1);
          },
          _containsPoint: function (n) {
            for (var i = this.paths, t = 0; t < i.length; t++)
              if (i[t]._containsPoint(n)) return !0;
            return !1;
          },
          _isOnPath: function (n) {
            for (
              var i = this.paths, r = this.options.stroke.width, t = 0;
              t < i.length;
              t++
            )
              if (i[t]._isOnPath(n, r)) return !0;
            return !1;
          },
          _clippedBBox: function (n) {
            return vs(this.paths, this.currentTransform(n));
          },
        });
        bi.prototype.nodeType = "MultiPath";
        si.extend(bi.prototype);
        pi.extend(bi.prototype);
        fe = {
          l: function (n, i) {
            for (
              var r, f = i.parameters, e = i.position, u = 0;
              u < f.length;
              u += 2
            )
              (r = new t(f[u], f[u + 1])),
                i.isRelative && r.translateWith(e),
                n.lineTo(r.x, r.y),
                (e.x = r.x),
                (e.y = r.y);
          },
          c: function (n, i) {
            for (
              var o, s, f, u = i.parameters, e = i.position, r = 0;
              r < u.length;
              r += 6
            )
              (o = new t(u[r], u[r + 1])),
                (s = new t(u[r + 2], u[r + 3])),
                (f = new t(u[r + 4], u[r + 5])),
                i.isRelative &&
                  (s.translateWith(e), o.translateWith(e), f.translateWith(e)),
                n.curveTo(o, s, f),
                (e.x = f.x),
                (e.y = f.y);
          },
          v: function (n, t) {
            var i = t.isRelative ? 0 : t.position.x;
            ys(t.parameters, !0, i);
            this.l(n, t);
          },
          h: function (n, t) {
            var i = t.isRelative ? 0 : t.position.y;
            ys(t.parameters, !1, i);
            this.l(n, t);
          },
          a: function (n, i) {
            for (
              var o, s, h, c, l, f, u = i.parameters, e = i.position, r = 0;
              r < u.length;
              r += 7
            )
              (o = u[r]),
                (s = u[r + 1]),
                (h = u[r + 2]),
                (c = u[r + 3]),
                (l = u[r + 4]),
                (f = new t(u[r + 5], u[r + 6])),
                i.isRelative && f.translateWith(e),
                (e.x === f.x && e.y === f.y) ||
                  (n.arcTo(f, o, s, c, l, h), (e.x = f.x), (e.y = f.y));
          },
          s: function (n, i) {
            var o,
              r,
              s,
              f,
              h,
              e = i.parameters,
              u = i.position,
              c = i.previousCommand;
            for (
              ("s" !== c && "c" !== c) ||
                (o = d(d(n.paths).segments).controlIn()),
                r = 0;
              r < e.length;
              r += 4
            )
              (s = new t(e[r], e[r + 1])),
                (f = new t(e[r + 2], e[r + 3])),
                (h = void 0),
                i.isRelative && (s.translateWith(u), f.translateWith(u)),
                (h = o ? ps(o, u) : u.clone()),
                (o = s),
                n.curveTo(h, s, f),
                (u.x = f.x),
                (u.y = f.y);
          },
          q: function (n, i) {
            for (
              var o, u, s, f = i.parameters, e = i.position, r = 0;
              r < f.length;
              r += 4
            )
              (o = new t(f[r], f[r + 1])),
                (u = new t(f[r + 2], f[r + 3])),
                i.isRelative && (o.translateWith(e), u.translateWith(e)),
                (s = ws(e, o, u)),
                n.curveTo(s.controlOut, s.controlIn, u),
                (e.x = u.x),
                (e.y = u.y);
          },
          t: function (n, i) {
            var f,
              h,
              e,
              u,
              o,
              s = i.parameters,
              r = i.position,
              c = i.previousCommand;
            for (
              ("q" !== c && "t" !== c) ||
                ((h = d(d(n.paths).segments)),
                (f = h
                  .controlIn()
                  .clone()
                  .translateWith(r.scaleCopy(-1 / 3))
                  .scale(1.5))),
                e = 0;
              e < s.length;
              e += 2
            )
              (u = new t(s[e], s[e + 1])),
                i.isRelative && u.translateWith(r),
                (f = f ? ps(f, r) : r.clone()),
                (o = ws(r, f, u)),
                n.curveTo(o.controlOut, o.controlIn, u),
                (r.x = u.x),
                (r.y = u.y);
          },
        };
        ee = 1 / 3;
        pc = /([a-df-z]{1})([^a-df-z]*)(z)?/gi;
        wc = /[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g;
        oe = "m";
        bc = "z";
        pr = h.extend({
          parse: function (n, i) {
            var f,
              u = new bi(i),
              r = new t();
            return (
              n.replace(pc, function (n, t, i, e) {
                var o = t.toLowerCase(),
                  h = o === t,
                  s = la(i.trim());
                if (
                  (o === oe &&
                    (h
                      ? ((r.x += s[0]), (r.y += s[1]))
                      : ((r.x = s[0]), (r.y = s[1])),
                    u.moveTo(r.x, r.y),
                    s.length > 2 && ((o = "l"), s.splice(0, 2))),
                  fe[o])
                )
                  fe[o](u, {
                    parameters: s,
                    position: r,
                    isRelative: h,
                    previousCommand: f,
                  }),
                    e && e.toLowerCase() === bc && u.close();
                else if (o !== oe)
                  throw Error(
                    "Error while parsing SVG path. Unsupported command: " + o
                  );
                f = o;
              }),
              u
            );
          },
        });
        pr.current = new pr();
        e = c.extend({
          init: function (n) {
            c.fn.init.call(this, n);
            this.segments = new ue();
            this.segments.addObserver(this);
            r(this.options.stroke) ||
              (this.stroke("#000"),
              r(this.options.stroke.lineJoin) ||
                this.options.set("stroke.lineJoin", "miter"));
          },
          moveTo: function (n, t) {
            return (
              this.suspend(),
              this.segments.elements([]),
              this.resume(),
              this.lineTo(n, t),
              this
            );
          },
          lineTo: function (n, i) {
            var u = r(i) ? new t(n, i) : n,
              f = new wi(u);
            return this.segments.push(f), this;
          },
          curveTo: function (n, t, i) {
            var r, u;
            return (
              this.segments.length > 0 &&
                ((r = d(this.segments)),
                (u = new wi(i, t)),
                this.suspend(),
                r.controlOut(n),
                this.resume(),
                this.segments.push(u)),
              this
            );
          },
          arc: function (n, i, r, u, f) {
            var s, e, o, h, c;
            return (
              this.segments.length > 0 &&
                ((s = d(this.segments)),
                (e = s.anchor()),
                (o = et(n)),
                (h = new t(e.x - r * Math.cos(o), e.y - u * Math.sin(o))),
                (c = new rt(h, {
                  startAngle: n,
                  endAngle: i,
                  radiusX: r,
                  radiusY: u,
                  anticlockwise: f,
                })),
                this._addArcSegments(c)),
              this
            );
          },
          arcTo: function (n, t, i, r, u, f) {
            var e, o, s;
            return (
              this.segments.length > 0 &&
                ((e = d(this.segments)),
                (o = e.anchor()),
                (s = rt.fromPoints(o, n, t, i, r, u, f)),
                this._addArcSegments(s)),
              this
            );
          },
          _addArcSegments: function (n) {
            var i,
              t,
              r = this;
            for (
              this.suspend(), i = n.curvePoints(), t = 1;
              t < i.length;
              t += 3
            )
              r.curveTo(i[t], i[t + 1], i[t + 2]);
            this.resume();
            this.geometryChange();
          },
          close: function () {
            return (this.options.closed = !0), this.geometryChange(), this;
          },
          rawBBox: function () {
            return this._bbox();
          },
          _containsPoint: function (n) {
            for (
              var f, e, t = this.segments, r = t.length, u = 0, i = 1;
              i < r;
              i++
            )
              (f = t[i - 1]), (e = t[i]), (u += f._intersectionsTo(e, n));
            return (
              (!this.options.closed &&
                t[0].anchor().equals(t[r - 1].anchor())) ||
                (u += ls(t[0].anchor(), t[r - 1].anchor(), n)),
              u % 2 != 0
            );
          },
          _isOnPath: function (n, t) {
            var r,
              i = this.segments,
              u = i.length,
              f = t || this.options.stroke.width;
            if (u > 1) {
              if (i[0]._isOnPathTo(i[1], n, f, "start")) return !0;
              for (r = 2; r <= u - 2; r++)
                if (i[r - 1]._isOnPathTo(i[r], n, f)) return !0;
              if (i[u - 2]._isOnPathTo(i[u - 1], n, f, "end")) return !0;
            }
            return !1;
          },
          _bbox: function (n) {
            var t,
              o,
              i,
              u,
              r = this.segments,
              e = r.length;
            if (1 === e)
              (o = r[0].anchor().transformCopy(n)), (t = new f(o, p.ZERO));
            else if (e > 0)
              for (i = 1; i < e; i++)
                (u = r[i - 1].bboxTo(r[i], n)), (t = t ? f.union(t, u) : u);
            return t;
          },
        });
        e.fromRect = function (n, t) {
          return new e(t)
            .moveTo(n.topLeft())
            .lineTo(n.topRight())
            .lineTo(n.bottomRight())
            .lineTo(n.bottomLeft())
            .close();
        };
        e.fromPoints = function (n, i) {
          var u, r, f;
          if (n) {
            for (u = new e(i), r = 0; r < n.length; r++)
              (f = t.create(n[r])), f && (0 === r ? u.moveTo(f) : u.lineTo(f));
            return u;
          }
        };
        e.fromArc = function (n, t) {
          var i = new e(t),
            r = n.startAngle,
            u = n.pointAt(r);
          return (
            i.moveTo(u.x, u.y),
            i.arc(r, n.endAngle, n.radiusX, n.radiusY, n.anticlockwise),
            i
          );
        };
        e.prototype.nodeType = "Path";
        si.extend(e.prototype);
        pi.extend(e.prototype);
        e.parse = function (n, t) {
          return pr.current.parse(n, t);
        };
        kc = "#000";
        ki = c.extend({
          init: function (n, t) {
            void 0 === n && (n = new rt());
            void 0 === t && (t = {});
            c.fn.init.call(this, t);
            this.geometry(n);
            r(this.options.stroke) || this.stroke(kc);
          },
          _bbox: function (n) {
            return this._geometry.bbox(n);
          },
          rawBBox: function () {
            return this.geometry().bbox();
          },
          toPath: function () {
            var t,
              i = new e(),
              n = this.geometry().curvePoints();
            if (n.length > 0)
              for (i.moveTo(n[0].x, n[0].y), t = 1; t < n.length; t += 3)
                i.curveTo(n[t], n[t + 1], n[t + 2]);
            return i;
          },
          _containsPoint: function (n) {
            return this.geometry().containsPoint(n);
          },
          _isOnPath: function (n) {
            return this.geometry()._isOnPath(n, this.options.stroke.width / 2);
          },
        });
        ki.prototype.nodeType = "Arc";
        si.extend(ki.prototype);
        pi.extend(ki.prototype);
        ou(ki.prototype, ["geometry"]);
        dc = "12px sans-serif";
        gc = "#000";
        hi = c.extend({
          init: function (n, i, u) {
            void 0 === i && (i = new t());
            void 0 === u && (u = {});
            c.fn.init.call(this, u);
            this.content(n);
            this.position(i);
            this.options.font || (this.options.font = dc);
            r(this.options.fill) || this.fill(gc);
          },
          content: function (n) {
            return r(n)
              ? (this.options.set("content", n), this)
              : this.options.get("content");
          },
          measure: function () {
            return wu.measureText(this.content(), {
              font: this.options.get("font"),
            });
          },
          rect: function () {
            var n = this.measure(),
              t = this.position().clone();
            return new f(t, [n.width, n.height]);
          },
          bbox: function (n) {
            var t = pt(this.currentTransform(n));
            return this.rect().bbox(t);
          },
          rawBBox: function () {
            return this.rect().bbox();
          },
          _containsPoint: function (n) {
            return this.rect().containsPoint(n);
          },
        });
        hi.prototype.nodeType = "Text";
        si.extend(hi.prototype);
        su(hi.prototype, ["position"]);
        di = c.extend({
          init: function (n, t, i) {
            void 0 === t && (t = new f());
            void 0 === i && (i = {});
            c.fn.init.call(this, i);
            this.src(n);
            this.rect(t);
          },
          src: function (n) {
            return r(n)
              ? (this.options.set("src", n), this)
              : this.options.get("src");
          },
          bbox: function (n) {
            var t = pt(this.currentTransform(n));
            return this._rect.bbox(t);
          },
          rawBBox: function () {
            return this._rect.bbox();
          },
          _containsPoint: function (n) {
            return this._rect.containsPoint(n);
          },
          _hasFill: function () {
            return this.src();
          },
        });
        di.prototype.nodeType = "Image";
        ou(di.prototype, ["rect"]);
        du = {
          extend: function (n, t) {
            n.traverse = function (n) {
              for (var r, u = this[t], i = 0; i < u.length; i++)
                (r = u[i]), r.traverse ? r.traverse(n) : n(r);
              return this;
            };
          },
        };
        l = c.extend({
          init: function (n) {
            c.fn.init.call(this, n);
            this.children = [];
          },
          childrenChange: function (n, t, i) {
            this.trigger("childrenChange", { action: n, items: t, index: i });
          },
          append: function () {
            return (
              ur(this.children, arguments),
              this._reparent(arguments, this),
              this.childrenChange("add", arguments),
              this
            );
          },
          insert: function (n, t) {
            return (
              this.children.splice(n, 0, t),
              (t.parent = this),
              this.childrenChange("add", [t], n),
              this
            );
          },
          insertAt: function (n, t) {
            return this.insert(t, n);
          },
          remove: function (n) {
            var t = this.children.indexOf(n);
            return (
              t >= 0 &&
                (this.children.splice(t, 1),
                (n.parent = null),
                this.childrenChange("remove", [n], t)),
              this
            );
          },
          removeAt: function (n) {
            if (0 <= n && n < this.children.length) {
              var t = this.children[n];
              this.children.splice(n, 1);
              t.parent = null;
              this.childrenChange("remove", [t], n);
            }
            return this;
          },
          clear: function () {
            var n = this.children;
            return (
              (this.children = []),
              this._reparent(n, null),
              this.childrenChange("remove", n, 0),
              this
            );
          },
          bbox: function (n) {
            return lu(this.children, !0, this.currentTransform(n));
          },
          rawBBox: function () {
            return lu(this.children, !1);
          },
          _clippedBBox: function (n) {
            return vs(this.children, this.currentTransform(n));
          },
          currentTransform: function (n) {
            return c.prototype.currentTransform.call(this, n) || null;
          },
          containsPoint: function (n, t) {
            var r, u, i;
            if (this.visible())
              for (
                r = this.children, u = this.currentTransform(t), i = 0;
                i < r.length;
                i++
              )
                if (r[i].containsPoint(n, u)) return !0;
            return !1;
          },
          _reparent: function (n, t) {
            for (var u, i, f = this, r = 0; r < n.length; r++)
              (u = n[r]),
                (i = u.parent),
                i && i !== f && i.remove && i.remove(u),
                (u.parent = t);
          },
        });
        l.prototype.nodeType = "Group";
        du.extend(l.prototype, "children");
        nl = {
          alignContent: "start",
          justifyContent: "start",
          alignItems: "start",
          spacing: 0,
          orientation: "horizontal",
          lineSpacing: 0,
          wrap: !0,
          revers: !1,
        };
        tl = function (n, t) {
          n.forEach(t);
        };
        il = function (n, t) {
          for (var r = n.length, i = r - 1; i >= 0; i--) t(n[i], i);
        };
        rl = l.extend({
          init: function (t, i) {
            l.fn.init.call(this, n.extend({}, nl, i));
            this._rect = t;
            this._fieldMap = {};
          },
          rect: function (n) {
            return n ? ((this._rect = n), this) : this._rect;
          },
          _initMap: function () {
            var t = this.options,
              n = this._fieldMap;
            "horizontal" === t.orientation
              ? ((n.sizeField = "width"),
                (n.groupsSizeField = "height"),
                (n.groupAxis = "x"),
                (n.groupsAxis = "y"))
              : ((n.sizeField = "height"),
                (n.groupsSizeField = "width"),
                (n.groupAxis = "y"),
                (n.groupsAxis = "x"));
            t.reverse
              ? ((this.forEach = il), (this.justifyAlign = aa))
              : ((this.forEach = tl), (this.justifyAlign = er));
          },
          reflow: function () {
            var n,
              i,
              g,
              nt,
              ut,
              h,
              u,
              e,
              c,
              o,
              w,
              b,
              k,
              tt,
              it,
              r,
              l,
              ft,
              d,
              s,
              a,
              et,
              rt,
              y,
              ot = this;
            if (this._rect && 0 !== this.children.length) {
              for (
                this._initMap(),
                  this.options.transform && this.transform(null),
                  n = this.options,
                  i = this._rect,
                  g = this._initGroups(),
                  nt = g.groups,
                  ut = g.groupsSize,
                  h = this._fieldMap,
                  u = h.sizeField,
                  e = h.groupsSizeField,
                  c = h.groupAxis,
                  o = h.groupsAxis,
                  w = new t(),
                  b = new t(),
                  k = new p(),
                  tt = er(ut, i, n.alignContent, o, e),
                  ft = function (t, i) {
                    var f = r.elements[i];
                    b[c] = it;
                    b[o] = er(t.size[e], l, n.alignItems, o, e);
                    au(b, t, f);
                    it += t.size[u] + n.spacing;
                  },
                  d = 0;
                d < nt.length;
                d++
              )
                (r = nt[d]),
                  (w[c] = it =
                    ot.justifyAlign(r.size, i, n.justifyContent, c, u)),
                  (w[o] = tt),
                  (k[u] = r.size),
                  (k[e] = r.lineSize),
                  (l = new f(w, k)),
                  ot.forEach(r.bboxes, ft),
                  (tt += r.lineSize + n.lineSpacing);
              !n.wrap &&
                r.size > i.size[u] &&
                ((s = i.size[u] / l.size[u]),
                (a = l.topLeft().scale(s, s)),
                (et = l.size[e] * s),
                (rt = er(et, i, n.alignContent, o, e)),
                (y = v()),
                "x" === c
                  ? y.translate(i.origin.x - a.x, rt - a.y)
                  : y.translate(rt - a.x, i.origin.y - a.y),
                y.scale(s, s),
                this.transform(y));
            }
          },
          _initGroups: function () {
            for (
              var u,
                t,
                i = this,
                s = this,
                f = s.options,
                e = s.children,
                h = f.lineSpacing,
                v = f.wrap,
                y = f.spacing,
                c = this._fieldMap.sizeField,
                n = this._newGroup(),
                l = [],
                o = function () {
                  l.push(n);
                  a += n.lineSize + h;
                },
                a = -h,
                r = 0;
              r < e.length;
              r++
            )
              (u = e[r]),
                (t = e[r].clippedBBox()),
                u.visible() &&
                  t &&
                  (v && n.size + t.size[c] + y > i._rect.size[c]
                    ? 0 === n.bboxes.length
                      ? (i._addToGroup(n, t, u), o(), (n = i._newGroup()))
                      : (o(), (n = i._newGroup()), i._addToGroup(n, t, u))
                    : i._addToGroup(n, t, u));
            return n.bboxes.length && o(), { groups: l, groupsSize: a };
          },
          _addToGroup: function (n, t, i) {
            n.size += t.size[this._fieldMap.sizeField] + this.options.spacing;
            n.lineSize = Math.max(
              t.size[this._fieldMap.groupsSizeField],
              n.lineSize
            );
            n.bboxes.push(t);
            n.elements.push(i);
          },
          _newGroup: function () {
            return {
              lineSize: 0,
              size: -this.options.spacing,
              bboxes: [],
              elements: [],
            };
          },
        });
        gi = c.extend({
          init: function (n, t) {
            void 0 === n && (n = new f());
            void 0 === t && (t = {});
            c.fn.init.call(this, t);
            this.geometry(n);
            r(this.options.stroke) || this.stroke("#000");
          },
          _bbox: function (n) {
            return this._geometry.bbox(n);
          },
          rawBBox: function () {
            return this._geometry.bbox();
          },
          _containsPoint: function (n) {
            return this._geometry.containsPoint(n);
          },
          _isOnPath: function (n) {
            return this.geometry()._isOnPath(n, this.options.stroke.width / 2);
          },
        });
        gi.prototype.nodeType = "Rect";
        si.extend(gi.prototype);
        pi.extend(gi.prototype);
        ou(gi.prototype, ["geometry"]);
        ul = ku.extend({
          _change: function () {
            this.optionsChange({ field: "stops" });
          },
        });
        ht = h.extend({
          init: function (n, t, i) {
            this.options = new bt({
              offset: n,
              color: t,
              opacity: r(i) ? i : 1,
            });
            this.options.addObserver(this);
          },
        });
        ht.create = function (n) {
          if (r(n))
            return n instanceof ht
              ? n
              : n.length > 1
              ? new ht(n[0], n[1], n[2])
              : new ht(n.offset, n.color, n.opacity);
        };
        tv(ht.prototype, ["offset", "color", "opacity"]);
        b.extend(ht.prototype);
        vt = h.extend({
          init: function (n) {
            void 0 === n && (n = {});
            this.stops = new ul(this._createStops(n.stops));
            this.stops.addObserver(this);
            this._userSpace = n.userSpace;
            this.id = ru();
          },
          userSpace: function (n) {
            return r(n)
              ? ((this._userSpace = n), this.optionsChange(), this)
              : this._userSpace;
          },
          _createStops: function (n) {
            var i, t;
            for (void 0 === n && (n = []), i = [], t = 0; t < n.length; t++)
              i.push(ht.create(n[t]));
            return i;
          },
          addStop: function (n, t, i) {
            this.stops.push(new ht(n, t, i));
          },
          removeStop: function (n) {
            var t = this.stops.indexOf(n);
            t >= 0 && this.stops.splice(t, 1);
          },
        });
        vt.prototype.nodeType = "Gradient";
        b.extend(vt.prototype);
        n.extend(vt.prototype, {
          optionsChange: function (n) {
            this.trigger("optionsChange", {
              field: "gradient" + (n ? "." + n.field : ""),
              value: this,
            });
          },
          geometryChange: function () {
            this.optionsChange();
          },
        });
        nr = vt.extend({
          init: function (n) {
            void 0 === n && (n = {});
            vt.fn.init.call(this, n);
            this.start(n.start || new t());
            this.end(n.end || new t(1, 0));
          },
        });
        su(nr.prototype, ["start", "end"]);
        wr = vt.extend({
          init: function (n) {
            void 0 === n && (n = {});
            vt.fn.init.call(this, n);
            this.center(n.center || new t());
            this._radius = r(n.radius) ? n.radius : 1;
            this._fallbackFill = n.fallbackFill;
          },
          radius: function (n) {
            return r(n)
              ? ((this._radius = n), this.geometryChange(), this)
              : this._radius;
          },
          fallbackFill: function (n) {
            return r(n)
              ? ((this._fallbackFill = n), this.optionsChange(), this)
              : this._fallbackFill;
          },
        });
        su(wr.prototype, ["center"]);
        fl = { swing: iv, linear: rv, easeOutElastic: uv };
        br = h.extend({
          init: function () {
            this._items = [];
          },
          register: function (n, t) {
            this._items.push({ name: n, type: t });
          },
          create: function (n, t) {
            var r,
              f,
              i,
              u = this._items;
            if (t && t.type)
              for (f = t.type.toLowerCase(), i = 0; i < u.length; i++)
                if (u[i].name.toLowerCase() === f) {
                  r = u[i];
                  break;
                }
            if (r) return new r.type(n, t);
          },
        });
        br.current = new br();
        se =
          Date.now ||
          function () {
            return new Date().getTime();
          };
        gu = h.extend({
          init: function (t, i) {
            this.options = n.extend({}, this.options, i);
            this.element = t;
          },
          setup: function () {},
          step: function () {},
          play: function () {
            var f,
              i,
              e,
              r = this,
              u = this.options,
              n = u.duration,
              t = u.delay;
            void 0 === t && (t = 0);
            f = fl[u.easing];
            i = se() + t;
            e = i + n;
            0 === n
              ? (this.step(1), this.abort())
              : setTimeout(function () {
                  var t = function () {
                    var u, o, s, h;
                    r._stopped ||
                      ((u = se()),
                      (o = ns(u - i, 0, n)),
                      (s = o / n),
                      (h = f(s, o, 0, 1, n)),
                      r.step(h),
                      u < e ? kendo.animationFrame(t) : r.abort());
                  };
                  t();
                }, t);
          },
          abort: function () {
            this._stopped = !0;
          },
          destroy: function () {
            this.abort();
          },
        });
        gu.prototype.options = { duration: 500, easing: "swing" };
        gu.create = function (n, t, i) {
          return br.current.create(n, t, i);
        };
        ci = h.extend({
          init: function () {
            this._items = [];
          },
          register: function (n, t, i) {
            var r = this._items,
              u = r[0],
              f = { name: n, type: t, order: i };
            !u || i < u.order ? r.unshift(f) : r.push(f);
          },
          create: function (n, t) {
            var f,
              i,
              r = this._items,
              u = r[0];
            if (t && t.type)
              for (f = t.type.toLowerCase(), i = 0; i < r.length; i++)
                if (r[i].name === f) {
                  u = r[i];
                  break;
                }
            return u
              ? new u.type(n, t)
              : void kendo.logToConsole(
                  "Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG and Canvas. User agent: " +
                    navigator.userAgent
                );
          },
        });
        ci.current = new ci();
        el = ["click", "mouseenter", "mouseleave", "mousemove", "resize"];
        a = kendo.Observable.extend({
          init: function (t, i) {
            kendo.Observable.fn.init.call(this);
            this.options = n.extend({}, i);
            this.element = t;
            this.element._kendoExportVisual = this.exportVisual.bind(this);
            this._click = this._handler("click");
            this._mouseenter = this._handler("mouseenter");
            this._mouseleave = this._handler("mouseleave");
            this._mousemove = this._handler("mousemove");
            this._visual = new l();
            fr(t, this.options);
            this.bind(el, this.options);
            this._enableTracking();
          },
          draw: function (n) {
            this._visual.children.push(n);
          },
          clear: function () {
            this._visual.children = [];
          },
          destroy: function () {
            this._visual = null;
            this.element._kendoExportVisual = null;
            this.unbind();
          },
          eventTarget: function (n) {
            for (
              var i, r = this, t = go(n);
              !i && t && ((i = t._kendoNode), t !== r.element);

            )
              t = t.parentElement;
            if (i) return i.srcElement;
          },
          exportVisual: function () {
            return this._visual;
          },
          getSize: function () {
            return fr(this.element);
          },
          currentSize: function (n) {
            return n ? void (this._size = n) : this._size;
          },
          setSize: function (n) {
            fr(this.element, n);
            this.currentSize(n);
            this._resize();
          },
          resize: function (n) {
            var t = this.getSize(),
              i = this.currentSize();
            (n ||
              ((t.width > 0 || t.height > 0) &&
                (!i || t.width !== i.width || t.height !== i.height))) &&
              (this.currentSize(t),
              this._resize(t, n),
              this.trigger("resize", t));
          },
          size: function (n) {
            return n ? void this.setSize(n) : this.getSize();
          },
          suspendTracking: function () {
            this._suspendedTracking = !0;
          },
          resumeTracking: function () {
            this._suspendedTracking = !1;
          },
          _enableTracking: function () {},
          _resize: function () {},
          _handler: function (n) {
            var t = this;
            return function (i) {
              var r = t.eventTarget(i);
              r &&
                !t._suspendedTracking &&
                t.trigger(n, { element: r, originalEvent: i, type: n });
            };
          },
          _elementOffset: function () {
            var n = this.element,
              t = fu(n, ["paddingLeft", "paddingTop"]),
              r = t.paddingLeft,
              u = t.paddingTop,
              i = ts(n),
              f = i.left,
              e = i.top;
            return { left: f + parseInt(r, 10), top: e + parseInt(u, 10) };
          },
          _surfacePoint: function (n) {
            var i = this._elementOffset(),
              r = ko(n),
              u = r.x - i.left,
              f = r.y - i.top;
            return new t(u, f);
          },
        });
        a.create = function (n, t) {
          return ci.current.create(n, t);
        };
        a.support = {};
        g = h.extend({
          init: function (n) {
            this.childNodes = [];
            this.parent = null;
            n && ((this.srcElement = n), this.observe());
          },
          destroy: function () {
            var t,
              n,
              i = this;
            for (
              this.srcElement && this.srcElement.removeObserver(this),
                t = this.childNodes,
                n = 0;
              n < t.length;
              n++
            )
              i.childNodes[n].destroy();
            this.parent = null;
          },
          load: function () {},
          observe: function () {
            this.srcElement && this.srcElement.addObserver(this);
          },
          append: function (n) {
            this.childNodes.push(n);
            n.parent = this;
          },
          insertAt: function (n, t) {
            this.childNodes.splice(t, 0, n);
            n.parent = this;
          },
          remove: function (n, t) {
            for (var r = this, u = n + t, i = n; i < u; i++)
              r.childNodes[i].removeSelf();
            this.childNodes.splice(n, t);
          },
          removeSelf: function () {
            this.clear();
            this.destroy();
          },
          clear: function () {
            this.remove(0, this.childNodes.length);
          },
          invalidate: function () {
            this.parent && this.parent.invalidate();
          },
          geometryChange: function () {
            this.invalidate();
          },
          optionsChange: function () {
            this.invalidate();
          },
          childrenChange: function (n) {
            "add" === n.action
              ? this.load(n.items, n.index)
              : "remove" === n.action && this.remove(n.index, n.items.length);
            this.invalidate();
          },
        });
        ct = {};
        tr = "http://www.w3.org/2000/svg";
        kr = "none";
        he = function (n, t) {
          n.innerHTML = t;
        };
        "undefined" != typeof document &&
          ((ol = "<svg xmlns='" + tr + "'></svg>"),
          (ce = document.createElement("div")),
          (sl = "undefined" != typeof DOMParser),
          (ce.innerHTML = ol),
          sl &&
            ce.firstChild.namespaceURI !== tr &&
            (he = function (n, t) {
              var i = new DOMParser(),
                r = i.parseFromString(t, "text/xml"),
                u = document.adoptNode(r.documentElement);
              n.innerHTML = "";
              n.appendChild(u);
            }));
        le = he;
        ae = "transform";
        dr = { clip: "clip-path", fill: "fill" };
        w = g.extend({
          init: function (n, t) {
            g.fn.init.call(this, n);
            this.definitions = {};
            this.options = t;
          },
          destroy: function () {
            this.element &&
              ((this.element._kendoNode = null), (this.element = null));
            this.clearDefinitions();
            g.fn.destroy.call(this);
          },
          load: function (n, t) {
            for (var f, e, i, s, o = this, u = 0; u < n.length; u++)
              (f = n[u]),
                (e = f.children),
                (i = new ct[f.nodeType](f, o.options)),
                r(t) ? o.insertAt(i, t) : o.append(i),
                i.createDefinitions(),
                e && e.length > 0 && i.load(e),
                (s = o.element),
                s && i.attachTo(s, t);
          },
          root: function () {
            for (var n = this; n.parent; ) n = n.parent;
            return n;
          },
          attachTo: function (n, t) {
            var i,
              u = document.createElement("div");
            le(
              u,
              "<svg xmlns='" +
                tr +
                "' version='1.1'>" +
                this.render() +
                "</svg>"
            );
            i = u.firstChild.firstChild;
            i &&
              (r(t)
                ? n.insertBefore(i, n.childNodes[t] || null)
                : n.appendChild(i),
              this.setElement(i));
          },
          setElement: function (n) {
            var i, t, r;
            for (
              this.element && (this.element._kendoNode = null),
                this.element = n,
                this.element._kendoNode = this,
                i = this.childNodes,
                t = 0;
              t < i.length;
              t++
            )
              (r = n.childNodes[t]), i[t].setElement(r);
          },
          clear: function () {
            var t, n;
            for (
              this.clearDefinitions(),
                this.element && (this.element.innerHTML = ""),
                t = this.childNodes,
                n = 0;
              n < t.length;
              n++
            )
              t[n].destroy();
            this.childNodes = [];
          },
          removeSelf: function () {
            if (this.element) {
              var n = this.element.parentNode;
              n && n.removeChild(this.element);
              this.element = null;
            }
            g.fn.removeSelf.call(this);
          },
          template: function () {
            return this.renderChildren();
          },
          render: function () {
            return this.template();
          },
          renderChildren: function () {
            for (var t = this.childNodes, i = "", n = 0; n < t.length; n++)
              i += t[n].render();
            return i;
          },
          optionsChange: function (n) {
            var t = n.field,
              i = n.value;
            "visible" === t
              ? this.css("display", i ? "" : kr)
              : dr[t] && nh(t, i)
              ? this.updateDefinition(t, i)
              : "opacity" === t
              ? this.attr("opacity", i)
              : "cursor" === t
              ? this.css("cursor", i)
              : "id" === t && (i ? this.attr("id", i) : this.removeAttr("id"));
            g.fn.optionsChange.call(this, n);
          },
          attr: function (n, t) {
            this.element && this.element.setAttribute(n, t);
          },
          allAttr: function (n) {
            for (var i = this, t = 0; t < n.length; t++)
              i.attr(n[t][0], n[t][1]);
          },
          css: function (n, t) {
            this.element && (this.element.style[n] = t);
          },
          allCss: function (n) {
            for (var i = this, t = 0; t < n.length; t++)
              i.css(n[t][0], n[t][1]);
          },
          removeAttr: function (n) {
            this.element && this.element.removeAttribute(n);
          },
          mapTransform: function (n) {
            var t = [];
            return (
              n && t.push([ae, "matrix(" + n.matrix().toString(6) + ")"]), t
            );
          },
          renderTransform: function () {
            return ii(this.mapTransform(this.srcElement.transform()));
          },
          transformChange: function (n) {
            n ? this.allAttr(this.mapTransform(n)) : this.removeAttr(ae);
          },
          mapStyle: function () {
            var n = this.srcElement.options,
              t = [["cursor", n.cursor]];
            return n.visible === !1 && t.push(["display", kr]), t;
          },
          renderStyle: function () {
            return ti("style", gs(this.mapStyle(!0)));
          },
          renderOpacity: function () {
            return ti("opacity", this.srcElement.options.opacity);
          },
          renderId: function () {
            return ti("id", this.srcElement.options.id);
          },
          createDefinitions: function () {
            var i,
              r,
              n,
              t,
              u = this.srcElement,
              f = this.definitions;
            if (u) {
              i = u.options;
              for (n in dr)
                (t = i.get(n)), t && nh(n, t) && ((f[n] = t), (r = !0));
              r && this.definitionChange({ action: "add", definitions: f });
            }
          },
          definitionChange: function (n) {
            this.parent && this.parent.definitionChange(n);
          },
          updateDefinition: function (n, t) {
            var r = this.definitions,
              u = r[n],
              f = dr[n],
              i = {};
            u &&
              ((i[n] = u),
              this.definitionChange({ action: "remove", definitions: i }),
              delete r[n]);
            t
              ? ((i[n] = t),
                this.definitionChange({ action: "add", definitions: i }),
                (r[n] = t),
                this.attr(f, this.refUrl(t.id)))
              : u && this.removeAttr(f);
          },
          clearDefinitions: function () {
            var n = this.definitions;
            this.definitionChange({ action: "remove", definitions: n });
            this.definitions = {};
          },
          renderDefinitions: function () {
            return ii(this.mapDefinitions());
          },
          mapDefinitions: function () {
            var n,
              r = this,
              t = this.definitions,
              i = [];
            for (n in t) i.push([dr[n], r.refUrl(t[n].id)]);
            return i;
          },
          refUrl: function (n) {
            var t = (this.options || {}).skipBaseHref,
              i = this.baseUrl().replace(/'/g, "\\'"),
              r = t ? "" : i;
            return "url(" + r + "#" + n + ")";
          },
          baseUrl: function () {
            return fv();
          },
        });
        ve = w.extend({
          template: function () {
            return (
              "<stop " + this.renderOffset() + " " + this.renderStyle() + " />"
            );
          },
          renderOffset: function () {
            return ti("offset", this.srcElement.offset());
          },
          mapStyle: function () {
            var n = this.srcElement;
            return [
              ["stop-color", n.color()],
              ["stop-opacity", n.opacity()],
            ];
          },
          optionsChange: function (n) {
            "offset" === n.field
              ? this.attr(n.field, n.value)
              : ("color" !== n.field && "opacity" !== n.field) ||
                this.css("stop-" + n.field, n.value);
          },
        });
        ye = w.extend({
          init: function (n) {
            w.fn.init.call(this, n);
            this.id = n.id;
            this.loadStops();
          },
          loadStops: function () {
            for (
              var t,
                u = this,
                i = this.srcElement.stops,
                r = this.element,
                n = 0;
              n < i.length;
              n++
            )
              (t = new ve(i[n])), u.append(t), r && t.attachTo(r);
          },
          optionsChange: function (n) {
            "gradient.stops" === n.field
              ? (g.prototype.clear.call(this), this.loadStops())
              : "gradient" === n.field && this.allAttr(this.mapCoordinates());
          },
          renderCoordinates: function () {
            return ii(this.mapCoordinates());
          },
          mapSpace: function () {
            return [
              "gradientUnits",
              this.srcElement.userSpace()
                ? "userSpaceOnUse"
                : "objectBoundingBox",
            ];
          },
        });
        pe = ye.extend({
          template: function () {
            return (
              "<linearGradient id='" +
              this.id +
              "' " +
              this.renderCoordinates() +
              ">" +
              this.renderChildren() +
              "</linearGradient>"
            );
          },
          mapCoordinates: function () {
            var n = this.srcElement,
              t = n.start(),
              i = n.end();
            return [
              ["x1", t.x],
              ["y1", t.y],
              ["x2", i.x],
              ["y2", i.y],
              this.mapSpace(),
            ];
          },
        });
        we = ye.extend({
          template: function () {
            return (
              "<radialGradient id='" +
              this.id +
              "' " +
              this.renderCoordinates() +
              ">" +
              this.renderChildren() +
              "</radialGradient>"
            );
          },
          mapCoordinates: function () {
            var n = this.srcElement,
              t = n.center(),
              i = n.radius();
            return [["cx", t.x], ["cy", t.y], ["r", i], this.mapSpace()];
          },
        });
        be = w.extend({
          init: function (n) {
            w.fn.init.call(this);
            this.srcElement = n;
            this.id = n.id;
            this.load([n]);
          },
          template: function () {
            return (
              "<clipPath id='" +
              this.id +
              "'>" +
              this.renderChildren() +
              "</clipPath>"
            );
          },
        });
        ke = w.extend({
          init: function () {
            w.fn.init.call(this);
            this.definitionMap = {};
          },
          attachTo: function (n) {
            this.element = n;
          },
          template: function () {
            return "<defs>" + this.renderChildren() + "</defs>";
          },
          definitionChange: function (n) {
            var t = n.definitions,
              i = n.action;
            "add" === i
              ? this.addDefinitions(t)
              : "remove" === i && this.removeDefinitions(t);
          },
          createDefinition: function (n, t) {
            var i;
            return (
              "clip" === n
                ? (i = be)
                : "fill" === n &&
                  (t instanceof nr ? (i = pe) : t instanceof wr && (i = we)),
              new i(t)
            );
          },
          addDefinitions: function (n) {
            var t,
              i = this;
            for (t in n) i.addDefinition(t, n[t]);
          },
          addDefinition: function (n, t) {
            var i,
              r = this,
              o = r.element,
              u = r.definitionMap,
              f = t.id,
              e = u[f];
            e
              ? e.count++
              : ((i = this.createDefinition(n, t)),
                (u[f] = { element: i, count: 1 }),
                this.append(i),
                o && i.attachTo(this.element));
          },
          removeDefinitions: function (n) {
            var t,
              i = this;
            for (t in n) i.removeDefinition(n[t]);
          },
          removeDefinition: function (n) {
            var i = this.definitionMap,
              r = n.id,
              t = i[r];
            t &&
              (t.count--,
              0 === t.count &&
                (this.remove(this.childNodes.indexOf(t.element), 1),
                delete i[r]));
          },
        });
        nf = w.extend({
          init: function (n) {
            w.fn.init.call(this);
            this.options = n;
            this.defs = new ke();
          },
          attachTo: function (n) {
            this.element = n;
            this.defs.attachTo(n.firstElementChild);
          },
          clear: function () {
            g.prototype.clear.call(this);
          },
          template: function () {
            return this.defs.render() + this.renderChildren();
          },
          definitionChange: function (n) {
            this.defs.definitionChange(n);
          },
        });
        hl = "rtl";
        tf = a.extend({
          init: function (t, i) {
            a.fn.init.call(this, t, i);
            this._root = new nf(
              n.extend(
                { rtl: fu(t, "direction").direction === hl },
                this.options
              )
            );
            le(this.element, this._template());
            this._rootElement = this.element.firstElementChild;
            ev(this._rootElement);
            this._root.attachTo(this._rootElement);
            hf(this.element, {
              click: this._click,
              mouseover: this._mouseenter,
              mouseout: this._mouseleave,
              mousemove: this._mousemove,
            });
            this.resize();
          },
          destroy: function () {
            this._root &&
              (this._root.destroy(),
              (this._root = null),
              (this._rootElement = null),
              cf(this.element, {
                click: this._click,
                mouseover: this._mouseenter,
                mouseout: this._mouseleave,
                mousemove: this._mousemove,
              }));
            a.fn.destroy.call(this);
          },
          translate: function (n) {
            var t =
              Math.round(n.x) +
              " " +
              Math.round(n.y) +
              " " +
              this._size.width +
              " " +
              this._size.height;
            this._offset = n;
            this._rootElement.setAttribute("viewBox", t);
          },
          draw: function (n) {
            a.fn.draw.call(this, n);
            this._root.load([n]);
          },
          clear: function () {
            a.fn.clear.call(this);
            this._root.clear();
          },
          svg: function () {
            return "<?xml version='1.0' ?>" + this._template();
          },
          exportVisual: function () {
            var n,
              r = this,
              t = r._visual,
              i = r._offset;
            return (
              i &&
                ((n = new l()),
                n.children.push(t),
                n.transform(v().translate(-i.x, -i.y)),
                (t = n)),
              t
            );
          },
          _resize: function () {
            this._offset && this.translate(this._offset);
          },
          _template: function () {
            return (
              "<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='" +
              tr +
              "' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>" +
              this._root.render() +
              "</svg>"
            );
          },
        });
        tf.prototype.type = "svg";
        "undefined" != typeof document &&
          document.implementation.hasFeature(
            "http://www.w3.org/TR/SVG11/feature#BasicStructure",
            "1.1"
          ) &&
          ((a.support.svg = !0), ci.current.register("svg", tf, 10));
        de = w.extend({
          template: function () {
            return (
              "<g" +
              (this.renderId() +
                this.renderTransform() +
                this.renderStyle() +
                this.renderOpacity() +
                this.renderDefinitions()) +
              ">" +
              this.renderChildren() +
              "</g>"
            );
          },
          optionsChange: function (n) {
            "transform" === n.field && this.transformChange(n.value);
            w.fn.optionsChange.call(this, n);
          },
        });
        ct.Group = de;
        ge = {
          dot: [1.5, 3.5],
          dash: [4, 3.5],
          longdash: [8, 3.5],
          dashdot: [3.5, 3.5, 1.5, 3.5],
          longdashdot: [8, 3.5, 1.5, 3.5],
          longdashdotdot: [8, 3.5, 1.5, 3.5, 1.5, 3.5],
        };
        rf = "solid";
        no = "butt";
        cl = {
          "fill.opacity": "fill-opacity",
          "stroke.color": "stroke",
          "stroke.width": "stroke-width",
          "stroke.opacity": "stroke-opacity",
        };
        to = " ";
        nt = w.extend({
          geometryChange: function () {
            this.attr("d", this.renderData());
            this.invalidate();
          },
          optionsChange: function (n) {
            switch (n.field) {
              case "fill":
                n.value
                  ? this.allAttr(this.mapFill(n.value))
                  : this.removeAttr("fill");
                break;
              case "fill.color":
                this.allAttr(this.mapFill({ color: n.value }));
                break;
              case "stroke":
                n.value
                  ? this.allAttr(this.mapStroke(n.value))
                  : this.removeAttr("stroke");
                break;
              case "transform":
                this.transformChange(n.value);
                break;
              default:
                var t = cl[n.field];
                t && this.attr(t, n.value);
            }
            w.fn.optionsChange.call(this, n);
          },
          content: function () {
            this.element &&
              (this.element.textContent = this.srcElement.content());
          },
          renderData: function () {
            return this.printPath(this.srcElement);
          },
          printPath: function (n) {
            var u,
              f,
              o,
              t,
              r,
              e = this,
              i = n.segments,
              s = i.length;
            if (s > 0) {
              for (u = [], t = 1; t < s; t++)
                (r = e.segmentType(i[t - 1], i[t])),
                  r !== o && ((o = r), u.push(r)),
                  u.push(
                    "L" === r
                      ? e.printPoints(i[t].anchor())
                      : e.printPoints(
                          i[t - 1].controlOut(),
                          i[t].controlIn(),
                          i[t].anchor()
                        )
                  );
              return (
                (f = "M" + this.printPoints(i[0].anchor()) + to + u.join(to)),
                n.options.closed && (f += "Z"),
                f
              );
            }
          },
          printPoints: function () {
            for (var t = arguments, r = t.length, i = [], n = 0; n < r; n++)
              i.push(t[n].toString(3));
            return i.join(" ");
          },
          segmentType: function (n, t) {
            return n.controlOut() && t.controlIn() ? "C" : "L";
          },
          mapStroke: function (n) {
            var t = [];
            return (
              n && !ni(n.color)
                ? (t.push(["stroke", n.color]),
                  t.push(["stroke-width", n.width]),
                  t.push(["stroke-linecap", this.renderLinecap(n)]),
                  t.push(["stroke-linejoin", n.lineJoin]),
                  r(n.opacity) && t.push(["stroke-opacity", n.opacity]),
                  r(n.dashType) &&
                    t.push(["stroke-dasharray", this.renderDashType(n)]))
                : t.push(["stroke", kr]),
              t
            );
          },
          renderStroke: function () {
            return ii(this.mapStroke(this.srcElement.options.stroke));
          },
          renderDashType: function (n) {
            var i,
              r,
              t,
              u = n.dashType,
              f = n.width;
            if ((void 0 === f && (f = 1), u && u !== rf)) {
              for (i = ge[u.toLowerCase()], r = [], t = 0; t < i.length; t++)
                r.push(i[t] * f);
              return r.join(" ");
            }
          },
          renderLinecap: function (n) {
            var t = n.dashType,
              i = n.lineCap;
            return t && "solid" !== t ? no : i;
          },
          mapFill: function (n) {
            var t = [];
            return (
              (n && "Gradient" === n.nodeType) ||
                (n && !ni(n.color)
                  ? (t.push(["fill", n.color]),
                    r(n.opacity) && t.push(["fill-opacity", n.opacity]))
                  : t.push(["fill", kr])),
              t
            );
          },
          renderFill: function () {
            return ii(this.mapFill(this.srcElement.options.fill));
          },
          template: function () {
            return (
              "<path " +
              this.renderId() +
              " " +
              this.renderStyle() +
              " " +
              this.renderOpacity() +
              " " +
              ti("d", this.renderData()) +
              this.renderStroke() +
              this.renderFill() +
              this.renderDefinitions() +
              this.renderTransform() +
              "></path>"
            );
          },
        });
        ct.Path = nt;
        io = nt.extend({
          renderData: function () {
            return this.printPath(this.srcElement.toPath());
          },
        });
        ct.Arc = io;
        ro = nt.extend({
          geometryChange: function () {
            var n = this.center();
            this.attr("cx", n.x);
            this.attr("cy", n.y);
            this.attr("r", this.radius());
            this.invalidate();
          },
          center: function () {
            return this.srcElement.geometry().center;
          },
          radius: function () {
            return this.srcElement.geometry().radius;
          },
          template: function () {
            return (
              "<circle " +
              this.renderId() +
              " " +
              this.renderStyle() +
              " " +
              this.renderOpacity() +
              "cx='" +
              this.center().x +
              "' cy='" +
              this.center().y +
              "' r='" +
              this.radius() +
              "'" +
              this.renderStroke() +
              " " +
              this.renderFill() +
              " " +
              this.renderDefinitions() +
              this.renderTransform() +
              " ></circle>"
            );
          },
        });
        ct.Circle = ro;
        uo = nt.extend({
          geometryChange: function () {
            var n = this.srcElement.geometry();
            this.attr("x", n.origin.x);
            this.attr("y", n.origin.y);
            this.attr("width", n.size.width);
            this.attr("height", n.size.height);
            this.invalidate();
          },
          size: function () {
            return this.srcElement.geometry().size;
          },
          origin: function () {
            return this.srcElement.geometry().origin;
          },
          template: function () {
            return (
              "<rect " +
              this.renderId() +
              " " +
              this.renderStyle() +
              " " +
              this.renderOpacity() +
              " x='" +
              this.origin().x +
              "' y='" +
              this.origin().y +
              "' width='" +
              this.size().width +
              "' height='" +
              this.size().height +
              "' " +
              this.renderStroke() +
              " " +
              this.renderFill() +
              " " +
              this.renderDefinitions() +
              " " +
              this.renderTransform() +
              " />"
            );
          },
        });
        ct.Rect = uo;
        fo = nt.extend({
          geometryChange: function () {
            this.allAttr(this.mapPosition());
            this.invalidate();
          },
          optionsChange: function (n) {
            "src" === n.field && this.allAttr(this.mapSource());
            nt.fn.optionsChange.call(this, n);
          },
          mapPosition: function () {
            var n = this.srcElement.rect(),
              t = n.topLeft();
            return [
              ["x", t.x],
              ["y", t.y],
              ["width", n.width() + "px"],
              ["height", n.height() + "px"],
            ];
          },
          renderPosition: function () {
            return ii(this.mapPosition());
          },
          mapSource: function (n) {
            var t = this.srcElement.src();
            return n && (t = kendo.htmlEncode(t)), [["xlink:href", t]];
          },
          renderSource: function () {
            return ii(this.mapSource(!0));
          },
          template: function () {
            return (
              "<image preserveAspectRatio='none' " +
              this.renderId() +
              " " +
              this.renderStyle() +
              " " +
              this.renderTransform() +
              " " +
              this.renderOpacity() +
              this.renderPosition() +
              " " +
              this.renderSource() +
              " " +
              this.renderDefinitions() +
              "></image>"
            );
          },
        });
        ct.Image = fo;
        uf = /&(?:[a-zA-Z]+|#\d+);/g;
        "undefined" != typeof document &&
          (vf._element = document.createElement("span"));
        eo = nt.extend({
          geometryChange: function () {
            var n = this.pos();
            this.attr("x", n.x);
            this.attr("y", n.y);
            this.invalidate();
          },
          optionsChange: function (n) {
            "font" === n.field
              ? (this.attr("style", gs(this.mapStyle())), this.geometryChange())
              : "content" === n.field &&
                nt.fn.content.call(this, this.srcElement.content());
            nt.fn.optionsChange.call(this, n);
          },
          mapStyle: function (n) {
            var i = nt.fn.mapStyle.call(this, n),
              t = this.srcElement.options.font;
            return (
              n && (t = kendo.htmlEncode(t)),
              i.push(["font", t], ["white-space", "pre"]),
              i
            );
          },
          pos: function () {
            var n = this.srcElement.position(),
              t = this.srcElement.measure();
            return n.clone().setY(n.y + t.baseline);
          },
          renderContent: function () {
            var n = this.srcElement.content();
            return (n = vf(n)), (n = kendo.htmlEncode(n)), wu.normalizeText(n);
          },
          renderTextAnchor: function () {
            var n;
            return (
              !(this.options || {}).rtl || ar.msie || ar.edge || (n = "end"),
              ti("text-anchor", n)
            );
          },
          template: function () {
            return (
              "<text " +
              this.renderId() +
              " " +
              this.renderTextAnchor() +
              " " +
              this.renderStyle() +
              " " +
              this.renderOpacity() +
              "x='" +
              this.pos().x +
              "' y='" +
              this.pos().y +
              "' " +
              this.renderStroke() +
              " " +
              this.renderTransform() +
              " " +
              this.renderDefinitions() +
              this.renderFill() +
              ">" +
              this.renderContent() +
              "</text>"
            );
          },
        });
        ct.Text = eo;
        oo = nt.extend({
          renderData: function () {
            var t,
              n,
              r = this,
              i = this.srcElement.paths;
            if (i.length > 0) {
              for (t = [], n = 0; n < i.length; n++) t.push(r.printPath(i[n]));
              return t.join(" ");
            }
          },
        });
        ct.MultiPath = oo;
        ll = {
          Circle: kt,
          Arc: rt,
          Rect: f,
          Point: t,
          Segment: wi,
          Matrix: o,
          Size: p,
          toMatrix: pt,
          Transformation: yi,
          transform: v,
        };
        al = {
          Surface: tf,
          RootNode: nf,
          Node: w,
          GroupNode: de,
          ArcNode: io,
          CircleNode: ro,
          RectNode: uo,
          ImageNode: fo,
          TextNode: eo,
          PathNode: nt,
          MultiPathNode: oo,
          DefinitionNode: ke,
          ClipNode: be,
          GradientStopNode: ve,
          LinearGradientNode: pe,
          RadialGradientNode: we,
          exportGroup: th,
        };
        lt = {};
        ff = g.extend({
          init: function (n) {
            g.fn.init.call(this, n);
            n && this.initClip();
          },
          initClip: function () {
            var n = this.srcElement.clip();
            n && ((this.clip = n), n.addObserver(this));
          },
          clear: function () {
            this.srcElement && this.srcElement.removeObserver(this);
            this.clearClip();
            g.fn.clear.call(this);
          },
          clearClip: function () {
            this.clip && (this.clip.removeObserver(this), delete this.clip);
          },
          setClip: function (n) {
            this.clip && (n.beginPath(), vu(n, this.clip), n.clip());
          },
          optionsChange: function (n) {
            "clip" === n.field && (this.clearClip(), this.initClip());
            g.fn.optionsChange.call(this, n);
          },
          setTransform: function (n) {
            if (this.srcElement) {
              var t = this.srcElement.transform();
              t && n.transform.apply(n, t.matrix().toArray(6));
            }
          },
          loadElements: function (n, t, i) {
            for (var f, e, o, s = this, u = 0; u < n.length; u++)
              (f = n[u]),
                (e = f.children),
                (o = new lt[f.nodeType](f, i)),
                e && e.length > 0 && o.load(e, t, i),
                r(t) ? s.insertAt(o, t) : s.append(o);
          },
          load: function (n, t, i) {
            this.loadElements(n, t, i);
            this.invalidate();
          },
          setOpacity: function (n) {
            if (this.srcElement) {
              var t = this.srcElement.opacity();
              r(t) && this.globalAlpha(n, t);
            }
          },
          globalAlpha: function (n, t) {
            var i = t;
            i && n.globalAlpha && (i *= n.globalAlpha);
            n.globalAlpha = i;
          },
          visible: function () {
            var n = this.srcElement;
            return !n || (n && n.options.visible !== !1);
          },
        });
        li = ff.extend({
          renderTo: function (n) {
            var i, t, r;
            if (this.visible()) {
              for (
                n.save(),
                  this.setTransform(n),
                  this.setClip(n),
                  this.setOpacity(n),
                  i = this.childNodes,
                  t = 0;
                t < i.length;
                t++
              )
                (r = i[t]), r.visible() && r.renderTo(n);
              n.restore();
            }
          },
        });
        du.extend(li.prototype, "childNodes");
        lt.Group = li;
        vl = 1e3 / 60;
        ef = li.extend({
          init: function (n) {
            li.fn.init.call(this);
            this.canvas = n;
            this.ctx = n.getContext("2d");
            var t = this._invalidate.bind(this);
            this.invalidate = kendo.throttle(function () {
              kendo.animationFrame(t);
            }, vl);
          },
          destroy: function () {
            li.fn.destroy.call(this);
            this.canvas = null;
            this.ctx = null;
          },
          load: function (n, t, i) {
            this.loadElements(n, t, i);
            this._invalidate();
          },
          _invalidate: function () {
            this.ctx &&
              (this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height),
              this.renderTo(this.ctx));
          },
        });
        du.extend(ef.prototype, "childNodes");
        gr = h.extend({
          init: function () {
            this.shapes = [];
          },
          _add: function (n, t) {
            this.shapes.push({ bbox: t, shape: n });
            n._quadNode = this;
          },
          pointShapes: function (n) {
            for (var i = this.shapes, u = i.length, r = [], t = 0; t < u; t++)
              i[t].bbox.containsPoint(n) && r.push(i[t].shape);
            return r;
          },
          insert: function (n, t) {
            this._add(n, t);
          },
          remove: function (n) {
            for (var i = this.shapes, r = i.length, t = 0; t < r; t++)
              if (i[t].shape === n) {
                i.splice(t, 1);
                break;
              }
          },
        });
        ai = gr.extend({
          init: function (n) {
            gr.fn.init.call(this);
            this.children = [];
            this.rect = n;
          },
          inBounds: function (n) {
            var t = this.rect,
              i = t.bottomRight(),
              r = n.bottomRight();
            return (
              t.origin.x <= n.origin.x &&
              t.origin.y <= n.origin.y &&
              r.x <= i.x &&
              r.y <= i.y
            );
          },
          pointShapes: function (n) {
            for (
              var i = this.children,
                u = i.length,
                r = gr.fn.pointShapes.call(this, n),
                t = 0;
              t < u;
              t++
            )
              ur(r, i[t].pointShapes(n));
            return r;
          },
          insert: function (n, t) {
            var i,
              u = this.children,
              r = !1;
            if (this.inBounds(t)) {
              if (this.shapes.length < 4) this._add(n, t);
              else {
                for (u.length || this._initChildren(), i = 0; i < u.length; i++)
                  if (u[i].insert(n, t)) {
                    r = !0;
                    break;
                  }
                r || this._add(n, t);
              }
              r = !0;
            }
            return r;
          },
          _initChildren: function () {
            var u = this,
              n = u.rect,
              e = u.children,
              t = n.center(),
              i = n.width() / 2,
              r = n.height() / 2;
            e.push(
              new ai(new f([n.origin.x, n.origin.y], [i, r])),
              new ai(new f([t.x, n.origin.y], [i, r])),
              new ai(new f([n.origin.x, t.y], [i, r])),
              new ai(new f([t.x, t.y], [i, r]))
            );
          },
        });
        ut = 3e3;
        so = 1e4;
        yl = 75;
        of = h.extend({
          init: function () {
            this.initRoots();
          },
          initRoots: function () {
            this.rootMap = {};
            this.root = new gr();
            this.rootElements = [];
          },
          clear: function () {
            for (var i = this, t = this.rootElements, n = 0; n < t.length; n++)
              i.remove(t[n]);
            this.initRoots();
          },
          pointShape: function (n) {
            var i,
              r = (this.rootMap[Math.floor(n.x / ut)] || {})[
                Math.floor(n.y / ut)
              ],
              t = this.root.pointShapes(n);
            for (
              r && (t = t.concat(r.pointShapes(n))),
                this.assignZindex(t),
                t.sort(ov),
                i = 0;
              i < t.length;
              i++
            )
              if (t[i].containsPoint(n)) return t[i];
          },
          assignZindex: function (n) {
            for (var t, u, f, r, e = this, i = 0; i < n.length; i++) {
              for (t = n[i], u = 0, f = Math.pow(so, yl), r = []; t; )
                r.push(t), (t = t.parent);
              for (; r.length; )
                (t = r.pop()),
                  (u +=
                    ((t.parent ? t.parent.children : e.rootElements).indexOf(
                      t
                    ) +
                      1) *
                    f),
                  (f /= so);
              n[i]._zIndex = u;
            }
          },
          optionsChange: function (n) {
            ("transform" !== n.field && "stroke.width" !== n.field) ||
              this.bboxChange(n.element);
          },
          geometryChange: function (n) {
            this.bboxChange(n.element);
          },
          bboxChange: function (n) {
            var t,
              i = this;
            if ("Group" === n.nodeType)
              for (t = 0; t < n.children.length; t++)
                i.bboxChange(n.children[t]);
            else n._quadNode && n._quadNode.remove(n), this._insertShape(n);
          },
          add: function (n) {
            var t = Array.isArray(n) ? n.slice(0) : [n];
            ur(this.rootElements, t);
            this._insert(t);
          },
          childrenChange: function (n) {
            var t,
              i = this;
            if ("remove" === n.action)
              for (t = 0; t < n.items.length; t++) i.remove(n.items[t]);
            else this._insert(Array.prototype.slice.call(n.items, 0));
          },
          _insert: function (n) {
            for (var t, i = this; n.length > 0; )
              (t = n.pop()),
                t.addObserver(i),
                "Group" === t.nodeType ? ur(n, t.children) : i._insertShape(t);
          },
          _insertShape: function (n) {
            var u,
              t,
              r,
              i,
              e = n.bbox();
            e &&
              ((u = this.getSectors(e)),
              (t = u[0][0]),
              (r = u[1][0]),
              this.inRoot(u)
                ? this.root.insert(n, e)
                : ((i = this.rootMap),
                  i[t] || (i[t] = {}),
                  i[t][r] ||
                    (i[t][r] = new ai(new f([t * ut, r * ut], [ut, ut]))),
                  i[t][r].insert(n, e)));
          },
          remove: function (n) {
            var i,
              t,
              r = this;
            if ((n.removeObserver(this), "Group" === n.nodeType))
              for (i = n.children, t = 0; t < i.length; t++) r.remove(i[t]);
            else n._quadNode && (n._quadNode.remove(n), delete n._quadNode);
          },
          inRoot: function (n) {
            return n[0].length > 1 || n[1].length > 1;
          },
          getSectors: function (n) {
            for (
              var i,
                u = n.bottomRight(),
                f = Math.floor(u.x / ut),
                e = Math.floor(u.y / ut),
                r = [[], []],
                t = Math.floor(n.origin.x / ut);
              t <= f;
              t++
            )
              r[0].push(t);
            for (i = Math.floor(n.origin.y / ut); i <= e; i++) r[1].push(i);
            return r;
          },
        });
        pl = h.extend({
          init: function (n) {
            n.bind("mouseenter", this._mouseenter.bind(this));
            n.bind("mouseleave", this._mouseleave.bind(this));
            this.element = n.element;
          },
          clear: function () {
            this._resetCursor();
          },
          destroy: function () {
            this._resetCursor();
            delete this.element;
          },
          _mouseenter: function (n) {
            var t = this._shapeCursor(n);
            t
              ? (this._current || (this._defaultCursor = this._getCursor()),
                this._setCursor(t))
              : this._resetCursor();
          },
          _mouseleave: function () {
            this._resetCursor();
          },
          _shapeCursor: function (n) {
            for (var t = n.element; t && !r(t.options.cursor); ) t = t.parent;
            if (t) return t.options.cursor;
          },
          _getCursor: function () {
            if (this.element) return this.element.style.cursor;
          },
          _setCursor: function (n) {
            this.element &&
              ((this.element.style.cursor = n), (this._current = n));
          },
          _resetCursor: function () {
            this._current &&
              (this._setCursor(this._defaultCursor || ""),
              delete this._current);
          },
        });
        nu = a.extend({
          init: function (n, t) {
            var i, r;
            a.fn.init.call(this, n, t);
            this.element.innerHTML = this._template(this);
            i = this.element.firstElementChild;
            r = fr(n);
            i.width = r.width;
            i.height = r.height;
            this._rootElement = i;
            this._root = new ef(i);
            this._mouseTrackHandler = this._trackMouse.bind(this);
            hf(this.element, {
              click: this._mouseTrackHandler,
              mousemove: this._mouseTrackHandler,
            });
          },
          destroy: function () {
            a.fn.destroy.call(this);
            this._root && (this._root.destroy(), (this._root = null));
            this._searchTree &&
              (this._searchTree.clear(), delete this._searchTree);
            this._cursor && (this._cursor.destroy(), delete this._cursor);
            cf(this.element, {
              click: this._mouseTrackHandler,
              mousemove: this._mouseTrackHandler,
            });
          },
          draw: function (n) {
            a.fn.draw.call(this, n);
            this._root.load([n], void 0, this.options.cors);
            this._searchTree && this._searchTree.add([n]);
          },
          clear: function () {
            a.fn.clear.call(this);
            this._root.clear();
            this._searchTree && this._searchTree.clear();
            this._cursor && this._cursor.clear();
          },
          eventTarget: function (n) {
            var t, i;
            if (this._searchTree)
              return (
                (t = this._surfacePoint(n)),
                (i = this._searchTree.pointShape(t))
              );
          },
          image: function () {
            var n,
              t,
              i = this,
              r = i._root,
              f = i._rootElement,
              u = [];
            return (
              r.traverse(function (n) {
                n.loading && u.push(n.loading);
              }),
              (n = ui()),
              (t = function () {
                r._invalidate();
                try {
                  var t = f.toDataURL();
                  n.resolve(t);
                } catch (i) {
                  n.reject(i);
                }
              }),
              te(u).then(t, t),
              n
            );
          },
          suspendTracking: function () {
            a.fn.suspendTracking.call(this);
            this._searchTree &&
              (this._searchTree.clear(), delete this._searchTree);
          },
          resumeTracking: function () {
            var t, i, n;
            if ((a.fn.resumeTracking.call(this), !this._searchTree)) {
              for (
                this._searchTree = new of(),
                  t = this._root.childNodes,
                  i = [],
                  n = 0;
                n < t.length;
                n++
              )
                i.push(t[n].srcElement);
              this._searchTree.add(i);
            }
          },
          _resize: function () {
            this._rootElement.width = this._size.width;
            this._rootElement.height = this._size.height;
            this._root.invalidate();
          },
          _template: function () {
            return "<canvas style='width: 100%; height: 100%;'></canvas>";
          },
          _enableTracking: function () {
            this._searchTree = new of();
            this._cursor = new pl(this);
            a.fn._enableTracking.call(this);
          },
          _trackMouse: function (n) {
            var t, i;
            this._suspendedTracking ||
              ((t = this.eventTarget(n)),
              "click" !== n.type
                ? ((i = this._currentShape),
                  i &&
                    i !== t &&
                    this.trigger("mouseleave", {
                      element: i,
                      originalEvent: n,
                      type: "mouseleave",
                    }),
                  t &&
                    i !== t &&
                    this.trigger("mouseenter", {
                      element: t,
                      originalEvent: n,
                      type: "mouseenter",
                    }),
                  this.trigger("mousemove", {
                    element: t,
                    originalEvent: n,
                    type: "mousemove",
                  }),
                  (this._currentShape = t))
                : t &&
                  this.trigger("click", {
                    element: t,
                    originalEvent: n,
                    type: "click",
                  }));
          },
        });
        nu.prototype.type = "canvas";
        "undefined" != typeof document &&
          document.createElement("canvas").getContext &&
          ((a.support.canvas = !0), ci.current.register("canvas", nu, 20));
        ft = ff.extend({
          renderTo: function (n) {
            n.save();
            this.setTransform(n);
            this.setClip(n);
            this.setOpacity(n);
            n.beginPath();
            this.renderPoints(n, this.srcElement);
            this.setLineDash(n);
            this.setLineCap(n);
            this.setLineJoin(n);
            this.setFill(n);
            this.setStroke(n);
            n.restore();
          },
          setFill: function (n) {
            var t = this.srcElement.options.fill,
              i = !1;
            return (
              t &&
                ("Gradient" === t.nodeType
                  ? (this.setGradientFill(n, t), (i = !0))
                  : ni(t.color) ||
                    ((n.fillStyle = t.color),
                    n.save(),
                    this.globalAlpha(n, t.opacity),
                    n.fill(),
                    n.restore(),
                    (i = !0))),
              i
            );
          },
          setGradientFill: function (n, t) {
            var r,
              f,
              e,
              i,
              u = this.srcElement.rawBBox();
            t instanceof nr
              ? ((f = t.start()),
                (e = t.end()),
                (r = n.createLinearGradient(f.x, f.y, e.x, e.y)))
              : t instanceof wr &&
                ((i = t.center()),
                (r = n.createRadialGradient(
                  i.x,
                  i.y,
                  0,
                  i.x,
                  i.y,
                  t.radius()
                )));
            sv(r, t.stops);
            n.save();
            t.userSpace() ||
              n.transform(u.width(), 0, 0, u.height(), u.origin.x, u.origin.y);
            n.fillStyle = r;
            n.fill();
            n.restore();
          },
          setStroke: function (n) {
            var t = this.srcElement.options.stroke;
            if (t && !ni(t.color) && t.width > 0)
              return (
                (n.strokeStyle = t.color),
                (n.lineWidth = sf(t.width, 1)),
                n.save(),
                this.globalAlpha(n, t.opacity),
                n.stroke(),
                n.restore(),
                !0
              );
          },
          dashType: function () {
            var n = this.srcElement.options.stroke;
            if (n && n.dashType) return n.dashType.toLowerCase();
          },
          setLineDash: function (n) {
            var t,
              i = this.dashType();
            i &&
              i !== rf &&
              ((t = ge[i]),
              n.setLineDash
                ? n.setLineDash(t)
                : ((n.mozDash = t), (n.webkitLineDash = t)));
          },
          setLineCap: function (n) {
            var i = this.dashType(),
              t = this.srcElement.options.stroke;
            i && i !== rf
              ? (n.lineCap = no)
              : t && t.lineCap && (n.lineCap = t.lineCap);
          },
          setLineJoin: function (n) {
            var t = this.srcElement.options.stroke;
            t && t.lineJoin && (n.lineJoin = t.lineJoin);
          },
          renderPoints: function (n, t) {
            vu(n, t);
          },
        });
        lt.Path = ft;
        ho = ft.extend({
          renderPoints: function (n) {
            var t = this.srcElement.toPath();
            vu(n, t);
          },
        });
        lt.Arc = ho;
        co = ft.extend({
          renderPoints: function (n) {
            var t = this.srcElement.geometry(),
              i = t.center,
              r = t.radius;
            n.arc(i.x, i.y, r, 0, 2 * Math.PI);
          },
        });
        lt.Circle = co;
        lo = ft.extend({
          renderPoints: function (n) {
            var t = this.srcElement.geometry(),
              i = t.origin,
              r = t.size;
            n.rect(i.x, i.y, r.width, r.height);
          },
        });
        lt.Rect = lo;
        ao = ft.extend({
          init: function (n, t) {
            ft.fn.init.call(this, n);
            this.onLoad = this.onLoad.bind(this);
            this.onError = this.onError.bind(this);
            this.loading = ui();
            var i = (this.img = new Image());
            t && !/^data:/i.test(n.src()) && (i.crossOrigin = t);
            i.src = n.src();
            i.complete
              ? this.onLoad()
              : ((i.onload = this.onLoad), (i.onerror = this.onError));
          },
          renderTo: function (n) {
            "resolved" === this.loading.state() &&
              (n.save(),
              this.setTransform(n),
              this.setClip(n),
              this.drawImage(n),
              n.restore());
          },
          optionsChange: function (n) {
            "src" === n.field
              ? ((this.loading = ui()), (this.img.src = this.srcElement.src()))
              : ft.fn.optionsChange.call(this, n);
          },
          onLoad: function () {
            this.loading.resolve();
            this.invalidate();
          },
          onError: function () {
            this.loading.reject(
              Error(
                "Unable to load image '" +
                  this.img.src +
                  "'. Check for connectivity and verify CORS headers."
              )
            );
          },
          drawImage: function (n) {
            var t = this.srcElement.rect(),
              i = t.topLeft();
            n.drawImage(this.img, i.x, i.y, t.width(), t.height());
          },
        });
        lt.Image = ao;
        vo = ft.extend({
          renderTo: function (n) {
            var t = this.srcElement,
              i = t.position(),
              r = t.measure();
            n.save();
            this.setTransform(n);
            this.setClip(n);
            this.setOpacity(n);
            n.beginPath();
            n.font = t.options.font;
            n.textAlign = "left";
            this.setFill(n) && n.fillText(t.content(), i.x, i.y + r.baseline);
            this.setStroke(n) &&
              (this.setLineDash(n),
              n.strokeText(t.content(), i.x, i.y + r.baseline));
            n.restore();
          },
        });
        lt.Text = vo;
        yo = ft.extend({
          renderPoints: function (n) {
            for (var i = this.srcElement.paths, t = 0; t < i.length; t++)
              vu(n, i[t]);
          },
        });
        lt.MultiPath = yo;
        wl = {
          Surface: nu,
          RootNode: ef,
          Node: ff,
          GroupNode: li,
          ArcNode: ho,
          CircleNode: co,
          RectNode: lo,
          ImageNode: ao,
          TextNode: vo,
          PathNode: ft,
          MultiPathNode: yo,
        };
        it = ar;
        ir = "KENDO-PSEUDO-ELEMENT";
        rr = {};
        u = {};
        u._root = u;
        bl = "undefined" != typeof window;
        gt = !!bl && (it.msie || it.edge);
        kl = hi.extend({
          init: function (n, t, i) {
            hi.fn.init.call(this, n, t.getOrigin(), i);
            this._pdfRect = t;
          },
          rect: function () {
            return this._pdfRect;
          },
          rawBBox: function () {
            return this._pdfRect;
          },
        });
        tu =
          "undefined" != typeof Element &&
          Element.prototype &&
          (function (n) {
            return n.matches
              ? function (n, t) {
                  return n.matches(t);
                }
              : n.webkitMatchesSelector
              ? function (n, t) {
                  return n.webkitMatchesSelector(t);
                }
              : n.mozMatchesSelector
              ? function (n, t) {
                  return n.mozMatchesSelector(t);
                }
              : n.msMatchesSelector
              ? function (n, t) {
                  return n.msMatchesSelector(t);
                }
              : function (n) {
                  return (
                    [].indexOf.call(document.querySelectorAll(n), this) !== -1
                  );
                };
          })(Element.prototype);
        dl = (function (n) {
          return n
            ? function t(i) {
                var e,
                  o,
                  u,
                  f,
                  r = i.cloneNode(!1);
                if (1 == i.nodeType) {
                  e = n(i);
                  o = n(r);
                  f = e.data();
                  for (u in f) o.data(u, f[u]);
                  for (
                    /^canvas$/i.test(i.tagName)
                      ? r.getContext("2d").drawImage(i, 0, 0)
                      : /^(?:input|select|textarea|option)$/i.test(i.tagName) &&
                        (r.removeAttribute("id"),
                        r.removeAttribute("name"),
                        (r.value = i.value),
                        (r.checked = i.checked),
                        (r.selected = i.selected)),
                      u = i.firstChild;
                    u;
                    u = u.nextSibling
                  )
                    r.appendChild(t(u));
                }
                return r;
              }
            : function (n) {
                var t,
                  i = (function u(n) {
                    var t,
                      i = n.cloneNode(!1);
                    for (
                      n._kendoExportVisual &&
                        (i._kendoExportVisual = n._kendoExportVisual),
                        t = n.firstChild;
                      t;
                      t = t.nextSibling
                    )
                      i.appendChild(u(t));
                    return i;
                  })(n),
                  r = n.querySelectorAll("canvas");
                return (
                  r.length &&
                    at(i.querySelectorAll("canvas")).forEach(function (n, t) {
                      n.getContext("2d").drawImage(r[t], 0, 0);
                    }),
                  (t = n.querySelectorAll("input, select, textarea, option")),
                  at(
                    i.querySelectorAll("input, select, textarea, option")
                  ).forEach(function (n, i) {
                    n.removeAttribute("id");
                    n.removeAttribute("name");
                    n.value = t[i].value;
                    n.checked = t[i].checked;
                    n.selected = t[i].selected;
                  }),
                  i
                );
              };
        })("undefined" != typeof window && window.kendo && window.kendo.jQuery);
        yf.getFontFaces = ih;
        yf.drawText = function (n) {
          var t = new l();
          return (
            (u._clipbox = !1),
            (u._matrix = o.unit()),
            (u._stackingContext = { element: n, group: t }),
            oh(n, y(n), t),
            3 == n.firstChild.nodeType ? kh(n, n.firstChild, t) : pu(n, t),
            sh(),
            t
          );
        };
        po = (function () {
          function o(u) {
            function w() {
              var n = l.exec(u);
              n && (u = u.substr(n[1].length));
            }
            function o(n) {
              w();
              var t = n.exec(u);
              if (t) return (u = u.substr(t[1].length)), t[1];
            }
            function b() {
              var i,
                r,
                f,
                n = kendo.parseColor(u, !0);
              if (n)
                return (
                  (f =
                    /^#[0-9a-f]+/i.exec(u) ||
                    /^rgba?\(.*?\)/i.exec(u) ||
                    /^..*?\b/.exec(u)),
                  (u = u.substr(f[0].length)),
                  (n = n.toRGB()),
                  (i = o(h)) || (r = o(t)),
                  { color: n, length: i, percent: r }
                );
            }
            function k(r) {
              var h,
                s,
                l,
                a,
                v,
                p,
                w = [],
                y = !1;
              if (o(f)) {
                for (
                  h = o(c),
                    "0" == h && (h = "0deg"),
                    h
                      ? ((h = iy(h)), o(n))
                      : ((s = o(i)),
                        "to" == s ? (s = o(i)) : s && /^-/.test(r) && (y = !0),
                        (l = o(i)),
                        o(n)),
                    /-moz-/.test(r) &&
                      null == h &&
                      null == s &&
                      ((a = o(t)),
                      (v = o(t)),
                      (y = !0),
                      "0%" == a ? (s = "left") : "100%" == a && (s = "right"),
                      "0%" == v ? (l = "top") : "100%" == v && (l = "bottom"),
                      o(n));
                  u && !o(e) && (p = b());

                )
                  w.push(p), o(n);
                return {
                  type: "linear",
                  angle: h,
                  to: s && l ? s + " " + l : s ? s : l ? l : null,
                  stops: w,
                  reverse: y,
                };
              }
            }
            function d() {
              if (o(f)) {
                var n = o(v);
                return (
                  (n = n.replace(/^['"]+|["']+$/g, "")),
                  o(e),
                  { type: "url", url: n }
                );
              }
            }
            var y,
              p = u;
            return hr(r, p)
              ? r[p]
              : ((y = o(s)) ? (y = k(y)) : (y = o(a)) && (y = d()),
                (r[p] = y || { type: "none" }));
          }
          var s = /^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\s*)\(/,
            t = /^([-0-9.]+%)/,
            h = /^([-0-9.]+px)/,
            i = /^(left|right|top|bottom|to|center)\W/,
            c = /^([-0-9.]+(deg|grad|rad|turn)|0)/,
            l = /^(\s+)/,
            f = /^(\()/,
            e = /^(\))/,
            n = /^(,)/,
            a = /^(url)\(/,
            v = /^(.*?)\)/,
            r = {},
            u = {};
          return function (n) {
            return hr(u, n) ? u[n] : (u[n] = k(n).map(o));
          };
        })();
        k = (function () {
          var n = {};
          return function (t, i) {
            function f(n) {
              return (c = n.exec(t.substr(r)));
            }
            function l(n) {
              return n.replace(/^\s+|\s+$/g, "");
            }
            var o, s, e, r, h, u, c;
            if ((i || (i = /^\s*,\s*/), (o = t + i), hr(n, o))) return n[o];
            for (s = [], e = 0, r = 0, h = 0, u = !1; r < t.length; )
              !u && f(/^[\(\[\{]/)
                ? (h++, r++)
                : !u && f(/^[\)\]\}]/)
                ? (h--, r++)
                : !u && f(/^[\"\']/)
                ? ((u = c[0]), r++)
                : "'" == u && f(/^\\\'/)
                ? (r += 2)
                : '"' == u && f(/^\\\"/)
                ? (r += 2)
                : "'" == u && f(/^\'/)
                ? ((u = !1), r++)
                : '"' == u && f(/^\"/)
                ? ((u = !1), r++)
                : f(i)
                ? (!u &&
                    !h &&
                    r > e &&
                    (s.push(l(t.substring(e, r))), (e = r + c[0].length)),
                  (r += c[0].length))
                : r++;
            return e < r && s.push(l(t.substring(e, r))), (n[o] = s);
          };
        })();
        wo = (function (n) {
          return function (t) {
            var i,
              r = n[t];
            return (
              r ||
                ((i =
                  /url\((['"]?)([^'")]*?)\1\)\s+format\((['"]?)truetype\3\)/.exec(
                    t
                  ))
                  ? (r = n[t] = i[2])
                  : (i = /url\((['"]?)([^'")]*?\.ttf)\1\)/.exec(t)) &&
                    (r = n[t] = i[2])),
              r
            );
          };
        })(Object.create ? Object.create(null) : {});
        gl = (function (n) {
          return function (t) {
            var i = n[t];
            return (
              null == i &&
                (i = n[t] = wu.measureText("Mapq", { font: t }).height),
              i
            );
          };
        })(Object.create ? Object.create(null) : {});
        na = {
          svg: al,
          canvas: wl,
          util: uc,
          PathParser: pr,
          Surface: a,
          BaseNode: g,
          SurfaceFactory: ci,
          OptionsStore: bt,
          exportImage: hv,
          exportSVG: cv,
          QuadNode: ai,
          ShapesQuadTree: of,
          ObserversMixin: b,
          Element: c,
          Circle: dt,
          Arc: ki,
          Path: e,
          MultiPath: bi,
          Text: hi,
          Image: di,
          Group: l,
          Layout: rl,
          Rect: gi,
          align: va,
          vAlign: ya,
          stack: pa,
          vStack: wa,
          wrap: ka,
          vWrap: da,
          fit: ga,
          LinearGradient: nr,
          RadialGradient: wr,
          GradientStop: ht,
          Gradient: vt,
          Animation: gu,
          AnimationFactory: br,
          drawDOM: yf,
        };
        kendo.deepExtend(kendo, { drawing: na, geometry: ll });
        kendo.drawing.Segment = kendo.geometry.Segment;
        kendo.dataviz.drawing = kendo.drawing;
        kendo.dataviz.geometry = kendo.geometry;
        kendo.drawing.util.measureText = kendo.util.measureText;
        kendo.drawing.util.objectKey = kendo.util.objectKey;
        kendo.drawing.Color = kendo.Color;
        kendo.util.encodeBase64 = kendo.drawing.util.encodeBase64;
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.popup.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function k(t, i) {
            return !(!t || !i) && (t === i || n.contains(t, i));
          }
          var et,
            a,
            ot,
            st,
            i = window.kendo,
            d = i.ui,
            g = d.Widget,
            kt = i.Class,
            r = i.support,
            e = i.getOffset,
            o = i._outerWidth,
            f = i._outerHeight,
            nt = "open",
            tt = "close",
            ht = "deactivate",
            ct = "activate",
            s = "center",
            lt = "left",
            v = "right",
            y = "top",
            p = "bottom",
            w = "absolute",
            it = "hidden",
            rt = "body",
            ut = "location",
            l = "position",
            at = "visible",
            vt = "effects",
            yt = "k-state-active",
            b = "k-state-border",
            dt = /k-state-border-(\w+)/,
            pt = ".k-picker-wrap, .k-dropdown-wrap, .k-link",
            gt = "down",
            ft = n(document.documentElement),
            ni = n.proxy,
            ti = n(window),
            wt = "scroll",
            ii = r.transitions.css,
            bt = ii + "transform",
            u = n.extend,
            h = ".kendoPopup",
            c = [
              "font-size",
              "font-family",
              "font-stretch",
              "font-style",
              "font-weight",
              "line-height",
            ],
            ri = g.extend({
              init: function (t, f) {
                var o,
                  e = this;
                f = f || {};
                f.isRtl &&
                  ((f.origin = f.origin || p + " " + v),
                  (f.position = f.position || y + " " + v));
                g.fn.init.call(e, t, f);
                t = e.element;
                f = e.options;
                e.collisions = f.collision ? f.collision.split(" ") : [];
                e.downEvent = i.applyEventMap(gt, i.guid());
                1 === e.collisions.length && e.collisions.push(e.collisions[0]);
                o = n(e.options.anchor)
                  .closest(".k-popup,.k-group")
                  .filter(":not([class^=km-])");
                f.appendTo = n(n(f.appendTo)[0] || o[0] || document.body);
                e.element
                  .hide()
                  .addClass("k-popup k-group k-reset")
                  .toggleClass("k-rtl", !!f.isRtl)
                  .css({ position: w })
                  .appendTo(f.appendTo)
                  .attr("aria-hidden", !0)
                  .on("mouseenter" + h, function () {
                    e._hovered = !0;
                  })
                  .on("wheel" + h, function (t) {
                    var r = n(t.target).find(".k-list"),
                      i = r.parent();
                    r.length &&
                      r.is(":visible") &&
                      ((0 === i.scrollTop() && t.originalEvent.deltaY < 0) ||
                        (i.scrollTop() ===
                          i.prop("scrollHeight") - i.prop("offsetHeight") &&
                          t.originalEvent.deltaY > 0)) &&
                      t.preventDefault();
                  })
                  .on("mouseleave" + h, function () {
                    e._hovered = !1;
                  });
                e.wrapper = n();
                f.animation === !1 &&
                  (f.animation = {
                    open: { effects: {} },
                    close: { hide: !0, effects: {} },
                  });
                u(f.animation.open, {
                  complete: function () {
                    e.wrapper.css({ overflow: at });
                    e._activated = !0;
                    e._trigger(ct);
                  },
                });
                u(f.animation.close, {
                  complete: function () {
                    e._animationClose();
                  },
                });
                e._mousedownProxy = function (n) {
                  e._mousedown(n);
                };
                e._resizeProxy = r.mobileOS.android
                  ? function (n) {
                      setTimeout(function () {
                        e._resize(n);
                      }, 600);
                    }
                  : function (n) {
                      e._resize(n);
                    };
                f.toggleTarget &&
                  n(f.toggleTarget).on(f.toggleEvent + h, n.proxy(e.toggle, e));
              },
              events: [nt, ct, tt, ht],
              options: {
                name: "Popup",
                toggleEvent: "click",
                origin: p + " " + lt,
                position: y + " " + lt,
                anchor: rt,
                appendTo: null,
                collision: "flip fit",
                viewport: window,
                copyAnchorStyles: !0,
                autosize: !1,
                modal: !1,
                adjustSize: { width: 0, height: 0 },
                animation: {
                  open: {
                    effects: "slideIn:down",
                    transition: !0,
                    duration: 200,
                  },
                  close: { duration: 100, hide: !0 },
                },
              },
              _animationClose: function () {
                var n = this,
                  t = n.wrapper.data(ut);
                n.wrapper.hide();
                t && n.wrapper.css(t);
                n.options.anchor != rt && n._hideDirClass();
                n._closing = !1;
                n._trigger(ht);
              },
              destroy: function () {
                var u,
                  t = this,
                  r = t.options,
                  f = t.element.off(h);
                g.fn.destroy.call(t);
                r.toggleTarget && n(r.toggleTarget).off(h);
                r.modal ||
                  (ft.off(t.downEvent, t._mousedownProxy), t._toggleResize(!1));
                i.destroy(t.element.children());
                f.removeData();
                r.appendTo[0] === document.body &&
                  ((u = f.parent(".k-animation-container")),
                  u[0] ? u.remove() : f.remove());
              },
              open: function (t, u) {
                var s,
                  h,
                  f = this,
                  a = { isFixed: !isNaN(parseInt(u, 10)), x: t, y: u },
                  e = f.element,
                  o = f.options,
                  v = n(o.anchor),
                  p = e[0] && e.hasClass("km-widget");
                if (!f.visible()) {
                  if (
                    (o.copyAnchorStyles &&
                      (p && "font-size" == c[0] && c.shift(),
                      e.css(i.getComputedStyles(v[0], c))),
                    e.data("animating") || f._trigger(nt))
                  )
                    return;
                  f._activated = !1;
                  o.modal ||
                    (ft
                      .off(f.downEvent, f._mousedownProxy)
                      .on(f.downEvent, f._mousedownProxy),
                    f._toggleResize(!1),
                    f._toggleResize(!0));
                  f.wrapper = h = i
                    .wrap(e, o.autosize)
                    .css({ overflow: it, display: "block", position: w })
                    .attr("aria-hidden", !1);
                  r.mobileOS.android && h.css(bt, "translatez(0)");
                  h.css(l);
                  n(o.appendTo)[0] == document.body && h.css(y, "-10000px");
                  f.flipped = f._position(a);
                  s = f._openAnimation();
                  o.anchor != rt && f._showDirClass(s);
                  e.data(vt, s.effects)
                    .kendoStop(!0)
                    .kendoAnimate(s)
                    .attr("aria-hidden", !1);
                }
              },
              _location: function (t) {
                var u,
                  s,
                  f = this,
                  e = f.element,
                  o = f.options,
                  h = n(o.anchor),
                  a = e[0] && e.hasClass("km-widget");
                return (
                  o.copyAnchorStyles &&
                    (a && "font-size" == c[0] && c.shift(),
                    e.css(i.getComputedStyles(h[0], c))),
                  (f.wrapper = u =
                    i
                      .wrap(e, o.autosize)
                      .css({ overflow: it, display: "block", position: w })),
                  r.mobileOS.android && u.css(bt, "translatez(0)"),
                  u.css(l),
                  n(o.appendTo)[0] == document.body && u.css(y, "-10000px"),
                  f._position(t || {}),
                  (s = u.offset()),
                  {
                    width: i._outerWidth(u),
                    height: i._outerHeight(u),
                    left: s.left,
                    top: s.top,
                  }
                );
              },
              _openAnimation: function () {
                var n = u(!0, {}, this.options.animation.open);
                return (n.effects = i.parseEffects(n.effects, this.flipped)), n;
              },
              _hideDirClass: function () {
                var t = n(this.options.anchor),
                  r = ((t.attr("class") || "").match(dt) || ["", "down"])[1],
                  u = b + "-" + r;
                t.removeClass(u).children(pt).removeClass(yt).removeClass(u);
                this.element.removeClass(b + "-" + i.directions[r].reverse);
              },
              _showDirClass: function (t) {
                var r = t.effects.slideIn
                    ? t.effects.slideIn.direction
                    : "down",
                  u = b + "-" + r;
                n(this.options.anchor)
                  .addClass(u)
                  .children(pt)
                  .addClass(yt)
                  .addClass(u);
                this.element.addClass(b + "-" + i.directions[r].reverse);
              },
              position: function () {
                this.visible() && (this.flipped = this._position());
              },
              toggle: function () {
                var n = this;
                n[n.visible() ? tt : nt]();
              },
              visible: function () {
                return this.element.is(":" + at);
              },
              close: function (r) {
                var h,
                  e,
                  o,
                  s,
                  f = this,
                  c = f.options;
                if (f.visible()) {
                  if (
                    ((h = f.wrapper[0] ? f.wrapper : i.wrap(f.element).hide()),
                    f._toggleResize(!1),
                    f._closing || f._trigger(tt))
                  )
                    return f._toggleResize(!0), t;
                  f.element.find(".k-popup").each(function () {
                    var i = n(this),
                      t = i.data("kendoPopup");
                    t && t.close(r);
                  });
                  ft.off(f.downEvent, f._mousedownProxy);
                  r
                    ? (e = { hide: !0, effects: {} })
                    : ((e = u(!0, {}, c.animation.close)),
                      (o = f.element.data(vt)),
                      (s = e.effects),
                      !s &&
                        !i.size(s) &&
                        o &&
                        i.size(o) &&
                        ((e.effects = o), (e.reverse = !0)),
                      (f._closing = !0));
                  f.element.kendoStop(!0).attr("aria-hidden", !0);
                  h.css({ overflow: it }).attr("aria-hidden", !0);
                  f.element.kendoAnimate(e);
                  r && f._animationClose();
                }
              },
              _trigger: function (n) {
                return this.trigger(n, { type: n });
              },
              _resize: function (n) {
                var t = this;
                r.resize.indexOf(n.type) !== -1
                  ? (clearTimeout(t._resizeTimeout),
                    (t._resizeTimeout = setTimeout(function () {
                      t._position();
                      t._resizeTimeout = null;
                    }, 50)))
                  : (!t._hovered ||
                      (t._activated &&
                        t.element.hasClass("k-list-container"))) &&
                    t.close();
              },
              _toggleResize: function (n) {
                var t = n ? "on" : "off",
                  i = r.resize;
                r.mobileOS.ios || r.mobileOS.android || (i += " " + wt);
                n &&
                  !this.scrollableParents &&
                  (this.scrollableParents = this._scrollableParents());
                this.scrollableParents &&
                  this.scrollableParents.length &&
                  this.scrollableParents[t](wt, this._resizeProxy);
                ti[t](i, this._resizeProxy);
              },
              _mousedown: function (t) {
                var u = this,
                  s = u.element[0],
                  e = u.options,
                  h = n(e.anchor)[0],
                  o = e.toggleTarget,
                  f = i.eventTarget(t),
                  r = n(f).closest(".k-popup"),
                  c = r.parent().parent(".km-shim").length;
                r = r[0];
                (!c && r && r !== u.element[0]) ||
                  ("popover" !== n(t.target).closest("a").data("rel") &&
                    (k(s, f) || k(h, f) || (o && k(n(o)[0], f)) || u.close()));
              },
              _fit: function (n, t, i) {
                var r = 0;
                return n + t > i && (r = i - (n + t)), n < 0 && (r = -n), r;
              },
              _flip: function (n, t, i, r, u, f, e) {
                var o = 0;
                return (
                  (e = e || t),
                  f !== u &&
                    f !== s &&
                    u !== s &&
                    (n + e > r && (o += -(i + t)), n + o < 0 && (o += i + t)),
                  o
                );
              },
              _scrollableParents: function () {
                return n(this.options.anchor)
                  .parentsUntil("body")
                  .filter(function (n, t) {
                    return i.isScrollable(t);
                  });
              },
              _position: function (t) {
                var g,
                  ot,
                  v,
                  wt,
                  st,
                  p,
                  nt,
                  bt,
                  tt,
                  b,
                  kt,
                  k,
                  c,
                  ht,
                  ct,
                  it,
                  lt,
                  h = this,
                  at = h.element,
                  s = h.wrapper,
                  a = h.options,
                  rt = n(a.viewport),
                  d = r.zoomLevel(),
                  dt = !!(rt[0] == window && window.innerWidth && d <= 1.02),
                  y = n(a.anchor),
                  vt = a.origin.toLowerCase().split(" "),
                  yt = a.position.toLowerCase().split(" "),
                  ft = h.collisions,
                  et = 10002,
                  pt = 0,
                  gt = document.documentElement;
                if (
                  ((st =
                    a.viewport === window
                      ? {
                          top:
                            window.pageYOffset ||
                            document.documentElement.scrollTop ||
                            0,
                          left:
                            window.pageXOffset ||
                            document.documentElement.scrollLeft ||
                            0,
                        }
                      : rt.offset()),
                  dt
                    ? ((p = window.innerWidth), (nt = window.innerHeight))
                    : ((p = rt.width()), (nt = rt.height())),
                  dt &&
                    gt.scrollHeight - gt.clientHeight > 0 &&
                    ((bt = a.isRtl ? -1 : 1),
                    (p -= bt * i.support.scrollbar())),
                  (g = y.parents().filter(s.siblings())),
                  g[0])
                )
                  if ((v = Math.max(+g.css("zIndex"), 0))) et = v + 10;
                  else
                    for (ot = y.parentsUntil(g), wt = ot.length; pt < wt; pt++)
                      (v = +n(ot[pt]).css("zIndex")),
                        v && et < v && (et = v + 10);
                return (
                  s.css("zIndex", et),
                  s.css(
                    t && t.isFixed ? { left: t.x, top: t.y } : h._align(vt, yt)
                  ),
                  (tt = e(s, l, y[0] === s.offsetParent()[0])),
                  (b = e(s)),
                  (kt = y
                    .offsetParent()
                    .parent(".k-animation-container,.k-popup,.k-group")),
                  kt.length && ((tt = e(s, l, !0)), (b = e(s))),
                  (b.top -= st.top),
                  (b.left -= st.left),
                  h.wrapper.data(ut) || s.data(ut, u({}, tt)),
                  (k = u({}, b)),
                  (c = u({}, tt)),
                  (ht = a.adjustSize),
                  "fit" === ft[0] &&
                    (c.top += h._fit(k.top, f(s) + ht.height, nt / d)),
                  "fit" === ft[1] &&
                    (c.left += h._fit(k.left, o(s) + ht.width, p / d)),
                  (ct = u({}, c)),
                  (it = f(at)),
                  (lt = f(s)),
                  !s.height() && it && (lt += it),
                  "flip" === ft[0] &&
                    (c.top += h._flip(
                      k.top,
                      it,
                      f(y),
                      nt / d,
                      vt[0],
                      yt[0],
                      lt
                    )),
                  "flip" === ft[1] &&
                    (c.left += h._flip(
                      k.left,
                      o(at),
                      o(y),
                      p / d,
                      vt[1],
                      yt[1],
                      o(s)
                    )),
                  at.css(l, w),
                  s.css(c),
                  c.left != ct.left || c.top != ct.top
                );
              },
              _align: function (t, i) {
                var c,
                  l = this,
                  a = l.wrapper,
                  y = n(l.options.anchor),
                  w = t[0],
                  b = t[1],
                  k = i[0],
                  d = i[1],
                  g = e(y),
                  nt = n(l.options.appendTo),
                  tt = o(a),
                  it = f(a) || f(a.children().first()),
                  rt = o(y),
                  ut = f(y),
                  r = g.top,
                  u = g.left,
                  h = Math.round;
                return (
                  nt[0] != document.body &&
                    ((c = e(nt)), (r -= c.top), (u -= c.left)),
                  w === p && (r += ut),
                  w === s && (r += h(ut / 2)),
                  k === p && (r -= it),
                  k === s && (r -= h(it / 2)),
                  b === v && (u += rt),
                  b === s && (u += h(rt / 2)),
                  d === v && (u -= tt),
                  d === s && (u -= h(tt / 2)),
                  { top: r, left: u }
                );
              },
            });
          d.plugin(ri);
          et = i.support.stableSort;
          a = "kendoTabKeyTrap";
          ot =
            "a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], *[contenteditable]";
          st = kt.extend({
            init: function (t) {
              this.element = n(t);
              this.element.autoApplyNS(a);
            },
            trap: function () {
              this.element.on("keydown", ni(this._keepInTrap, this));
            },
            removeTrap: function () {
              this.element.kendoDestroy(a);
            },
            destroy: function () {
              this.element.kendoDestroy(a);
              this.element = t;
            },
            shouldTrap: function () {
              return !0;
            },
            _keepInTrap: function (n) {
              var t, i, r;
              9 === n.which &&
                this.shouldTrap() &&
                !n.isDefaultPrevented() &&
                ((t = this._focusableElements()),
                (i = this._sortFocusableElements(t)),
                (r = this._nextFocusable(n, i)),
                this._focus(r),
                n.preventDefault());
            },
            _focusableElements: function () {
              var t = this.element.find(ot).filter(function (t, i) {
                return (
                  i.tabIndex >= 0 &&
                  n(i).is(":visible") &&
                  !n(i).is("[disabled]")
                );
              });
              return (
                this.element.is("[tabindex]") && t.push(this.element[0]), t
              );
            },
            _sortFocusableElements: function (n) {
              var i, t;
              return (
                et
                  ? (i = n.sort(function (n, t) {
                      return n.tabIndex - t.tabIndex;
                    }))
                  : ((t = "__k_index"),
                    n.each(function (n, i) {
                      i.setAttribute(t, n);
                    }),
                    (i = n.sort(function (n, i) {
                      return n.tabIndex === i.tabIndex
                        ? parseInt(n.getAttribute(t), 10) -
                            parseInt(i.getAttribute(t), 10)
                        : n.tabIndex - i.tabIndex;
                    })),
                    n.removeAttr(t)),
                i
              );
            },
            _nextFocusable: function (n, t) {
              var i = t.length,
                r = t.index(n.target);
              return t.get((r + (n.shiftKey ? -1 : 1)) % i);
            },
            _focus: function (n) {
              return "IFRAME" == n.nodeName
                ? (n.contentWindow.document.body.focus(), t)
                : (n.focus(),
                  "INPUT" == n.nodeName &&
                    n.setSelectionRange &&
                    this._haveSelectionRange(n) &&
                    n.setSelectionRange(0, n.value.length),
                  t);
            },
            _haveSelectionRange: function (n) {
              var t = n.type.toLowerCase();
              return (
                "text" === t ||
                "search" === t ||
                "url" === t ||
                "tel" === t ||
                "password" === t
              );
            },
          });
          d.Popup.TabKeyTrap = st;
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "drawing/surface-tooltip.min",
      ["kendo.popup.min", "drawing/kendo-drawing.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var i = ".kendo",
          t = window.kendo,
          u = t.deepExtend,
          f = t.drawing.util,
          e = f.defined,
          o = f.limitValue,
          s = f.eventCoordinates,
          h = t._outerWidth,
          c = t._outerHeight,
          r = n.proxy,
          l =
            '<div class="k-tooltip"><div class="k-tooltip-content"></div></div>',
          a =
            '<div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close">close</a></div>',
          v = t.Class.extend({
            init: function (t, i) {
              this.element = n(l);
              this.content = this.element.children(".k-tooltip-content");
              i = i || {};
              this.options = u({}, this.options, this._tooltipOptions(i));
              this.popupOptions = {
                appendTo: i.appendTo,
                animation: i.animation,
                copyAnchorStyles: !1,
                collision: "fit fit",
              };
              this._openPopupHandler = n.proxy(this._openPopup, this);
              this.surface = t;
              this._bindEvents();
            },
            options: {
              position: "top",
              showOn: "mouseenter",
              offset: 7,
              autoHide: !0,
              hideDelay: 0,
              showAfter: 100,
            },
            _bindEvents: function () {
              this._showHandler = r(this._showEvent, this);
              this._surfaceLeaveHandler = r(this._surfaceLeave, this);
              this._mouseleaveHandler = r(this._mouseleave, this);
              this._mousemoveHandler = r(this._mousemove, this);
              this.surface.bind("click", this._showHandler);
              this.surface.bind("mouseenter", this._showHandler);
              this.surface.bind("mouseleave", this._mouseleaveHandler);
              this.surface.bind("mousemove", this._mousemoveHandler);
              this.surface.element.on(
                "mouseleave" + i,
                this._surfaceLeaveHandler
              );
              this.element.on(
                "click" + i,
                ".k-tooltip-button",
                r(this._hideClick, this)
              );
              this.element.on("mouseleave" + i, r(this._tooltipLeave, this));
            },
            getPopup: function () {
              return (
                this.popup ||
                  (this.popup = new t.ui.Popup(
                    this.element,
                    this.popupOptions
                  )),
                this.popup
              );
            },
            destroy: function () {
              var n = this.popup;
              this.surface.unbind("click", this._showHandler);
              this.surface.unbind("mouseenter", this._showHandler);
              this.surface.unbind("mouseleave", this._mouseleaveHandler);
              this.surface.unbind("mousemove", this._mousemoveHandler);
              this.surface.element.off(
                "mouseleave" + i,
                this._surfaceLeaveHandler
              );
              this.element.off("click" + i);
              this.element.off("mouseleave" + i);
              n && (n.destroy(), delete this.popup);
              delete this.popupOptions;
              clearTimeout(this._timeout);
              delete this.element;
              delete this.content;
              delete this.surface;
            },
            _tooltipOptions: function (n) {
              return (
                (n = n || {}),
                {
                  position: n.position,
                  showOn: n.showOn,
                  offset: n.offset,
                  autoHide: n.autoHide,
                  width: n.width,
                  height: n.height,
                  content: n.content,
                  shared: n.shared,
                  hideDelay: n.hideDelay,
                  showAfter: n.showAfter,
                }
              );
            },
            _tooltipShape: function (n) {
              for (; n && !n.options.tooltip; ) n = n.parent;
              return n;
            },
            _updateContent: function (n, i, r) {
              var u = r.content;
              if ((t.isFunction(u) && (u = u({ element: i, target: n })), u))
                return this.content.html(u), !0;
            },
            _position: function (n, t, i, r) {
              var y,
                l = t.position,
                c = t.offset || 0,
                p = this.surface,
                f = p._instance._elementOffset(),
                b = p.getSize(),
                w = p._instance._offset,
                u = n.bbox(),
                a = i.width,
                v = i.height,
                e = 0,
                h = 0;
              return (
                u.origin.translate(f.left, f.top),
                w && u.origin.translate(-w.x, -w.y),
                "cursor" == l && r
                  ? ((y = s(r)), (e = y.x - a / 2), (h = y.y - v - c))
                  : "left" == l
                  ? ((e = u.origin.x - a - c), (h = u.center().y - v / 2))
                  : "right" == l
                  ? ((e = u.bottomRight().x + c), (h = u.center().y - v / 2))
                  : "bottom" == l
                  ? ((e = u.center().x - a / 2), (h = u.bottomRight().y + c))
                  : ((e = u.center().x - a / 2), (h = u.origin.y - v - c)),
                {
                  left: o(e, f.left, f.left + b.width),
                  top: o(h, f.top, f.top + b.height),
                }
              );
            },
            show: function (n, t) {
              this._show(
                n,
                n,
                u({}, this.options, this._tooltipOptions(n.options.tooltip), t)
              );
            },
            hide: function () {
              var n = this.popup,
                t = this._current;
              delete this._current;
              clearTimeout(this._showTimeout);
              n &&
                n.visible() &&
                t &&
                !this.surface.trigger("tooltipClose", {
                  element: t.shape,
                  target: t.target,
                  popup: n,
                }) &&
                n.close();
            },
            _hideClick: function (n) {
              n.preventDefault();
              this.hide();
            },
            _show: function (n, t, i, r, u) {
              var f,
                e,
                o = this._current;
              clearTimeout(this._timeout);
              (o && ((o.shape === t && i.shared) || o.target === n)) ||
                (clearTimeout(this._showTimeout),
                (f = this.getPopup()),
                !this.surface.trigger("tooltipOpen", {
                  element: t,
                  target: n,
                  popup: f,
                }) &&
                  this._updateContent(n, t, i) &&
                  (this._autoHide(i),
                  (e = this._measure(i)),
                  f.visible() && f.close(!0),
                  (this._current = {
                    options: i,
                    elementSize: e,
                    shape: t,
                    target: n,
                    position: this._position(i.shared ? t : n, i, e, r),
                  }),
                  u
                    ? (this._showTimeout = setTimeout(
                        this._openPopupHandler,
                        i.showAfter || 0
                      ))
                    : this._openPopup()));
            },
            _openPopup: function () {
              var t = this._current,
                n = t.position;
              this.getPopup().open(n.left, n.top);
            },
            _autoHide: function (t) {
              t.autoHide &&
                this._closeButton &&
                (this.element.removeClass("k-tooltip-closable"),
                this._closeButton.remove(),
                delete this._closeButton);
              t.autoHide ||
                this._closeButton ||
                (this.element.addClass("k-tooltip-closable"),
                (this._closeButton = n(a).prependTo(this.element)));
            },
            _showEvent: function (n) {
              var t,
                i = this._tooltipShape(n.element);
              i &&
                ((t = u(
                  {},
                  this.options,
                  this._tooltipOptions(i.options.tooltip)
                )),
                t &&
                  t.showOn == n.type &&
                  this._show(n.element, i, t, n.originalEvent, !0));
            },
            _measure: function (n) {
              var r,
                u,
                t,
                i = this.getPopup();
              return (
                this.element.css({ width: "auto", height: "auto" }),
                (t = i.visible()),
                t || i.wrapper.show(),
                this.element.css({
                  width: e(n.width) ? n.width : "auto",
                  height: e(n.height) ? n.height : "auto",
                }),
                (r = h(this.element)),
                (u = c(this.element)),
                t || i.wrapper.hide(),
                { width: r, height: u }
              );
            },
            _mouseleave: function (n) {
              var t, i;
              this.popup &&
                !this._popupRelatedTarget(n.originalEvent) &&
                ((t = this),
                (i = t._current),
                i &&
                  i.options.autoHide &&
                  (t._timeout = setTimeout(function () {
                    clearTimeout(t._showTimeout);
                    t.hide();
                  }, i.options.hideDelay || 0)));
            },
            _mousemove: function (n) {
              var r,
                t,
                i = this._current;
              i &&
                n.element &&
                ((r = i.options),
                "cursor" == r.position &&
                  ((t = this._position(
                    n.element,
                    r,
                    i.elementSize,
                    n.originalEvent
                  )),
                  (i.position = t),
                  this.getPopup().wrapper.css({ left: t.left, top: t.top })));
            },
            _surfaceLeave: function (n) {
              this.popup &&
                !this._popupRelatedTarget(n) &&
                (clearTimeout(this._showTimeout), this.hide());
            },
            _popupRelatedTarget: function (t) {
              return (
                t.relatedTarget &&
                n(t.relatedTarget).closest(this.popup.wrapper).length
              );
            },
            _tooltipLeave: function () {
              var n = this,
                t = n._current;
              t &&
                t.options.autoHide &&
                (n._timeout = setTimeout(function () {
                  n.hide();
                }, t.options.hideDelay || 0));
            },
          });
        t.drawing.SurfaceTooltip = v;
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "drawing/surface.min",
      ["drawing/kendo-drawing.min", "drawing/surface-tooltip.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        function e(n) {
          this._instance.translate(n);
        }
        var i,
          t = window.kendo,
          f = t.drawing,
          r = f.Surface,
          u = t.ui.Widget,
          o = t.deepExtend,
          s = n.proxy;
        t.support.svg = r.support.svg;
        t.support.canvas = r.support.canvas;
        i = u.extend({
          init: function (n, t) {
            u.fn.init.call(this, n, {});
            this.options = o({}, this.options, t);
            this._instance = r.create(this.element[0], t);
            this._instance.translate && (this.translate = e);
            this._triggerInstanceHandler = s(this._triggerInstanceEvent, this);
            this._bindHandler("click");
            this._bindHandler("mouseenter");
            this._bindHandler("mouseleave");
            this._bindHandler("mousemove");
            this._enableTracking();
          },
          options: { name: "Surface", tooltip: {} },
          events: [
            "click",
            "mouseenter",
            "mouseleave",
            "mousemove",
            "resize",
            "tooltipOpen",
            "tooltipClose",
          ],
          _triggerInstanceEvent: function (n) {
            this.trigger(n.type, n);
          },
          _bindHandler: function (n) {
            this._instance.bind(n, this._triggerInstanceHandler);
          },
          draw: function (n) {
            this._instance.draw(n);
          },
          clear: function () {
            this._instance && this._instance.clear();
            this.hideTooltip();
          },
          destroy: function () {
            this._instance && (this._instance.destroy(), delete this._instance);
            this._tooltip && (this._tooltip.destroy(), delete this._tooltip);
            u.fn.destroy.call(this);
          },
          exportVisual: function () {
            return this._instance.exportVisual();
          },
          eventTarget: function (n) {
            return this._instance.eventTarget(n);
          },
          showTooltip: function (n, t) {
            this._tooltip && this._tooltip.show(n, t);
          },
          hideTooltip: function () {
            this._tooltip && this._tooltip.hide();
          },
          suspendTracking: function () {
            this._instance.suspendTracking();
            this.hideTooltip();
          },
          resumeTracking: function () {
            this._instance.resumeTracking();
          },
          getSize: function () {
            return {
              width: this.element.width(),
              height: this.element.height(),
            };
          },
          setSize: function (n) {
            this.element.css({ width: n.width, height: n.height });
            this._size = n;
            this._instance.currentSize(n);
            this._resize();
          },
          _resize: function () {
            this._instance.currentSize(this._size);
            this._instance._resize();
          },
          _enableTracking: function () {
            t.ui.Popup &&
              (this._tooltip = new f.SurfaceTooltip(
                this,
                this.options.tooltip || {}
              ));
          },
        });
        t.ui.plugin(i);
        i.create = function (n, t) {
          return new i(n, t);
        };
        t.drawing.Surface = i;
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("drawing/html.min", ["drawing/kendo-drawing.min"], n);
  })(
    function () {
      !(function (n) {
        var r = window.kendo,
          t = r.drawing,
          i = t.drawDOM;
        t.drawDOM = function (t, r) {
          return i(n(t)[0], r);
        };
        t.drawDOM.drawText = i.drawText;
        t.drawDOM.getFontFaces = i.getFontFaces;
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.drawing.min",
      [
        "drawing/util.min",
        "drawing/kendo-drawing.min",
        "drawing/surface-tooltip.min",
        "drawing/surface.min",
        "drawing/html.min",
      ],
      n
    );
  })(
    function () {},
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.validator.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function d(i) {
            var r,
              u = t.ui.validator.ruleResolvers || {},
              f = {};
            for (r in u) n.extend(!0, f, u[r].resolve(i));
            return f;
          }
          function g(n) {
            return n
              .replace(/&amp/g, "&amp;")
              .replace(/&quot;/g, '"')
              .replace(/&#39;/g, "'")
              .replace(/&lt;/g, "<")
              .replace(/&gt;/g, ">");
          }
          function nt(n) {
            return (n = (n + "").split(".")), n.length > 1 ? n[1].length : 0;
          }
          function tt(t) {
            return n(n.parseHTML ? n.parseHTML(t) : t);
          }
          function it(i, r) {
            for (var u, o, e = n(), f = 0, s = i.length; f < s; f++)
              (u = i[f]),
                rt.test(u.className) &&
                  ((o = u.getAttribute(t.attr("for"))),
                  o === r && (e = e.add(u)));
            return e;
          }
          var h,
            t = window.kendo,
            f = t.ui.Widget,
            i = ".kendoValidator",
            r = "k-invalid-msg",
            rt = RegExp(r, "i"),
            e = "k-invalid",
            ut = "k-valid",
            ft =
              /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/i,
            et =
              /^(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,
            u =
              ":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",
            c = ":checkbox:not([disabled],[readonly])",
            o = "[type=number],[type=range]",
            l = "blur",
            a = "name",
            v = "form",
            y = "novalidate",
            p = "validate",
            s = "change",
            w = "validateInput",
            ot = n.proxy,
            b = function (n, t) {
              return (
                "string" == typeof t && (t = RegExp("^(?:" + t + ")$")),
                t.test(n)
              );
            },
            k = function (n, t, i) {
              var r = n.val();
              return !n.filter(t).length || "" === r || b(r, i);
            },
            st = function (n, t) {
              return !!n.length && null != n[0].attributes[t];
            };
          t.ui.validator || (t.ui.validator = { rules: {}, messages: {} });
          h = f.extend({
            init: function (i, r) {
              var e = this,
                o = d(i),
                s = "[" + t.attr("validate") + "!=false]";
              r = r || {};
              r.rules = n.extend({}, t.ui.validator.rules, o.rules, r.rules);
              r.messages = n.extend(
                {},
                t.ui.validator.messages,
                o.messages,
                r.messages
              );
              f.fn.init.call(e, i, r);
              e._errorTemplate = t.template(e.options.errorTemplate);
              e.element.is(v) && e.element.attr(y, y);
              e._inputSelector = u + s;
              e._checkboxSelector = c + s;
              e._errors = {};
              e._attachEvents();
              e._isValidated = !1;
            },
            events: [p, s, w],
            options: {
              name: "Validator",
              errorTemplate:
                '<span class="k-widget k-tooltip k-tooltip-validation"><span class="k-icon k-i-warning"> </span> #=message#</span>',
              messages: {
                required: "{0} is required",
                pattern: "{0} is not valid",
                min: "{0} should be greater than or equal to {1}",
                max: "{0} should be smaller than or equal to {1}",
                step: "{0} is not valid",
                email: "{0} is not valid email",
                url: "{0} is not valid URL",
                date: "{0} is not valid date",
                dateCompare:
                  "End date should be greater than or equal to the start date",
              },
              rules: {
                required: function (n) {
                  var i =
                      n.filter("[type=checkbox]").length && !n.is(":checked"),
                    t = n.val();
                  return !(
                    st(n, "required") &&
                    (!t || "" === t || 0 === t.length || i)
                  );
                },
                pattern: function (n) {
                  return (
                    !n
                      .filter(
                        "[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]"
                      )
                      .filter("[pattern]").length ||
                    "" === n.val() ||
                    b(n.val(), n.attr("pattern"))
                  );
                },
                min: function (n) {
                  if (
                    n
                      .filter(o + ",[" + t.attr("type") + "=number]")
                      .filter("[min]").length &&
                    "" !== n.val()
                  ) {
                    var i = parseFloat(n.attr("min")) || 0,
                      r = t.parseFloat(n.val());
                    return i <= r;
                  }
                  return !0;
                },
                max: function (n) {
                  if (
                    n
                      .filter(o + ",[" + t.attr("type") + "=number]")
                      .filter("[max]").length &&
                    "" !== n.val()
                  ) {
                    var i = parseFloat(n.attr("max")) || 0,
                      r = t.parseFloat(n.val());
                    return i >= r;
                  }
                  return !0;
                },
                step: function (n) {
                  if (
                    n
                      .filter(o + ",[" + t.attr("type") + "=number]")
                      .filter("[step]").length &&
                    "" !== n.val()
                  ) {
                    var i,
                      f = parseFloat(n.attr("min")) || 0,
                      r = parseFloat(n.attr("step")) || 1,
                      e = parseFloat(n.val()),
                      u = nt(r);
                    return u
                      ? ((i = Math.pow(10, u)),
                        (Math.floor((e - f) * i) % (r * i)) /
                          Math.pow(100, u) ==
                          0)
                      : (e - f) % r == 0;
                  }
                  return !0;
                },
                email: function (n) {
                  return k(
                    n,
                    "[type=email],[" + t.attr("type") + "=email]",
                    ft
                  );
                },
                url: function (n) {
                  return k(n, "[type=url],[" + t.attr("type") + "=url]", et);
                },
                date: function (n) {
                  return (
                    !n.filter("[type^=date],[" + t.attr("type") + "=date]")
                      .length ||
                    "" === n.val() ||
                    null !== t.parseDate(n.val(), n.attr(t.attr("format")))
                  );
                },
              },
              validateOnBlur: !0,
            },
            destroy: function () {
              f.fn.destroy.call(this);
              this.element.off(i);
            },
            value: function () {
              return !!this._isValidated && 0 === this.errors().length;
            },
            _submit: function (n) {
              return (
                !!this.validate() ||
                (n.stopPropagation(),
                n.stopImmediatePropagation(),
                n.preventDefault(),
                !1)
              );
            },
            _checkElement: function (n) {
              var t = this.value();
              this.validateInput(n);
              this.value() !== t && this.trigger(s);
            },
            _attachEvents: function () {
              var t = this;
              t.element.is(v) && t.element.on("submit" + i, ot(t._submit, t));
              t.options.validateOnBlur &&
                (t.element.is(u)
                  ? (t.element.on(l + i, function () {
                      t._checkElement(t.element);
                    }),
                    t.element.is(c) &&
                      t.element.on("click" + i, function () {
                        t._checkElement(t.element);
                      }))
                  : (t.element.on(l + i, t._inputSelector, function () {
                      t._checkElement(n(this));
                    }),
                    t.element.on("click" + i, t._checkboxSelector, function () {
                      t._checkElement(n(this));
                    })));
            },
            validate: function () {
              var i,
                t,
                f,
                r,
                n = !1,
                e = this.value();
              if (((this._errors = {}), this.element.is(u)))
                n = this.validateInput(this.element);
              else {
                for (
                  r = !1,
                    i = this.element.find(this._inputSelector),
                    t = 0,
                    f = i.length;
                  t < f;
                  t++
                )
                  this.validateInput(i.eq(t)) || (r = !0);
                n = !r;
              }
              return (
                this.trigger(p, { valid: n }), e !== n && this.trigger(s), n
              );
            },
            validateInput: function (i) {
              var f, p, c, u, b, o, l, v, k, s, y, h;
              return (
                (i = n(i)),
                (this._isValidated = !0),
                (f = this),
                (p = f._errorTemplate),
                (c = f._checkValidity(i)),
                (u = c.valid),
                (b = "." + r),
                (o = i.attr(a) || ""),
                (l = f
                  ._findMessageContainer(o)
                  .add(
                    i.next(b).filter(function () {
                      var i = n(this);
                      return (
                        !i.filter("[" + t.attr("for") + "]").length ||
                        i.attr(t.attr("for")) === o
                      );
                    })
                  )
                  .hide()),
                (k = !i.attr("aria-invalid")),
                i.removeAttr("aria-invalid"),
                u
                  ? delete f._errors[o]
                  : ((v = f._extractMessage(i, c.key)),
                    (f._errors[o] = v),
                    (s = tt(p({ message: g(v) }))),
                    (y = l.attr("id")),
                    f._decorateMessageContainer(s, o),
                    y && s.attr("id", y),
                    l.replaceWith(s).length || s.insertAfter(i),
                    s.show(),
                    i.attr("aria-invalid", !0)),
                k !== u && this.trigger(w, { valid: u, input: i }),
                i.toggleClass(e, !u),
                i.toggleClass(ut, u),
                t.widgetInstance(i) &&
                  ((h = t.widgetInstance(i)._inputWrapper),
                  h && (h.toggleClass(e, !u), h.toggleClass(e, !u))),
                u
              );
            },
            hideMessages: function () {
              var i = this,
                t = "." + r,
                n = i.element;
              n.is(u) ? n.next(t).hide() : n.find(t).hide();
            },
            _findMessageContainer: function (i) {
              for (
                var f,
                  o = t.ui.validator.messageLocators,
                  r = n(),
                  u = 0,
                  e = this.element.length;
                u < e;
                u++
              )
                r = r.add(it(this.element[u].getElementsByTagName("*"), i));
              for (f in o) r = r.add(o[f].locate(this.element, i));
              return r;
            },
            _decorateMessageContainer: function (n, i) {
              var u,
                f = t.ui.validator.messageLocators;
              n.addClass(r).attr(t.attr("for"), i || "");
              for (u in f) f[u].decorate(n, i);
              n.attr("role", "alert");
            },
            _extractMessage: function (n, i) {
              var u,
                f = this,
                r = f.options.messages[i],
                e = n.attr(a);
              return (
                t.ui.Validator.prototype.options.messages[i] ||
                  (u = t.isFunction(r) ? r(n) : r),
                (r = t.isFunction(r) ? r(n) : r),
                t.format(
                  n.attr(t.attr(i + "-msg")) ||
                    n.attr("validationMessage") ||
                    u ||
                    n.attr("title") ||
                    r ||
                    "",
                  e,
                  n.attr(i) || n.attr(t.attr(i))
                )
              );
            },
            _checkValidity: function (n) {
              var t,
                i = this.options.rules;
              for (t in i)
                if (!i[t].call(this, n)) return { valid: !1, key: t };
              return { valid: !0 };
            },
            errors: function () {
              var n,
                t = [],
                i = this._errors;
              for (n in i) t.push(i[n]);
              return t;
            },
          });
          t.ui.plugin(h);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.userevents.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function c(n, t) {
            var i = n.x.location,
              r = n.y.location,
              u = t.x.location,
              f = t.y.location,
              e = i - u,
              o = r - f;
            return {
              center: { x: (i + u) / 2, y: (r + f) / 2 },
              distance: Math.sqrt(e * e + o * o),
            };
          }
          function o(n) {
            var s,
              f,
              t,
              r = [],
              u = n.originalEvent,
              e = n.currentTarget,
              o = 0;
            if (n.api)
              r.push({
                id: 2,
                event: n,
                target: n.target,
                currentTarget: n.target,
                location: n,
                type: "api",
              });
            else if (n.type.match(/touch/))
              for (f = u ? u.changedTouches : [], s = f.length; o < s; o++)
                (t = f[o]),
                  r.push({
                    location: t,
                    event: n,
                    target: t.target,
                    currentTarget: e,
                    id: t.identifier,
                    type: "touch",
                  });
            else
              r.push(
                i.pointers || i.msPointers
                  ? {
                      location: u,
                      event: n,
                      target: n.target,
                      currentTarget: e,
                      id: u.pointerId,
                      type: "pointer",
                    }
                  : {
                      id: 1,
                      event: n,
                      target: n.target,
                      currentTarget: e,
                      location: n,
                      type: "mouse",
                    }
              );
            return r;
          }
          function l(n) {
            for (
              var r = t.eventMap.up.split(" "), i = 0, u = r.length;
              i < u;
              i++
            )
              n(r[i]);
          }
          var t = window.kendo,
            i = t.support,
            a = t.Class,
            v = t.Observable,
            u = n.now,
            f = n.extend,
            y = i.mobileOS,
            ot = y && y.android,
            p = 800,
            st = 300,
            w = i.browser.msie ? 5 : 0,
            b = "press",
            k = "hold",
            d = "select",
            g = "start",
            s = "move",
            h = "end",
            nt = "cancel",
            e = "tap",
            tt = "doubleTap",
            it = "release",
            ht = "gesturestart",
            rt = "gesturechange",
            ut = "gestureend",
            ft = "gesturetap",
            ct = { api: 0, touch: 0, mouse: 9, pointer: 9 },
            lt = !i.touch || i.mouseAndTouchPresent,
            et = a.extend({
              init: function (n, t) {
                var i = this;
                i.axis = n;
                i._updateLocationData(t);
                i.startLocation = i.location;
                i.velocity = i.delta = 0;
                i.timeStamp = u();
              },
              move: function (n) {
                var t = this,
                  i = n["page" + t.axis],
                  r = u(),
                  f = r - t.timeStamp || 1;
                (!i && ot) ||
                  ((t.delta = i - t.location),
                  t._updateLocationData(n),
                  (t.initialDelta = i - t.startLocation),
                  (t.velocity = t.delta / f),
                  (t.timeStamp = r));
              },
              _updateLocationData: function (n) {
                var t = this,
                  i = t.axis;
                t.location = n["page" + i];
                t.client = n["client" + i];
                t.screen = n["screen" + i];
              },
            }),
            at = a.extend({
              init: function (n, t, i) {
                f(this, {
                  x: new et("X", i.location),
                  y: new et("Y", i.location),
                  type: i.type,
                  useClickAsTap: n.useClickAsTap,
                  threshold: n.threshold || ct[i.type],
                  userEvents: n,
                  target: t,
                  currentTarget: i.currentTarget,
                  initialTouch: i.target,
                  id: i.id,
                  pressEvent: i,
                  _clicks: n._clicks,
                  supportDoubleTap: n.supportDoubleTap,
                  _moved: !1,
                  _finished: !1,
                });
              },
              press: function () {
                this._holdTimeout = setTimeout(
                  n.proxy(this, "_hold"),
                  this.userEvents.minHold
                );
                this._trigger(b, this.pressEvent);
              },
              _tap: function (n) {
                var t = this;
                t.userEvents._clicks++;
                1 == t.userEvents._clicks &&
                  (t._clickTimeout = setTimeout(function () {
                    1 == t.userEvents._clicks
                      ? t._trigger(e, n)
                      : t._trigger(tt, n);
                    t.userEvents._clicks = 0;
                  }, st));
              },
              _hold: function () {
                this._trigger(k, this.pressEvent);
              },
              move: function (n) {
                var t = this,
                  i = "api" !== n.type && t.userEvents._shouldNotMove;
                if (!t._finished && !i) {
                  if ((t.x.move(n.location), t.y.move(n.location), !t._moved)) {
                    if (t._withinIgnoreThreshold()) return;
                    if (r.current && r.current !== t.userEvents)
                      return t.dispose();
                    t._start(n);
                  }
                  t._finished || t._trigger(s, n);
                }
              },
              end: function (n) {
                this.endTime = u();
                this._finished ||
                  ((this._finished = !0),
                  this._trigger(it, n),
                  this._moved
                    ? this._trigger(h, n)
                    : this.useClickAsTap ||
                      (this.supportDoubleTap
                        ? this._tap(n)
                        : this._trigger(e, n)),
                  clearTimeout(this._holdTimeout),
                  this.dispose());
              },
              dispose: function () {
                var i = this.userEvents,
                  t = i.touches;
                this._finished = !0;
                this.pressEvent = null;
                clearTimeout(this._holdTimeout);
                t.splice(n.inArray(this, t), 1);
              },
              skip: function () {
                this.dispose();
              },
              cancel: function () {
                this.dispose();
              },
              isMoved: function () {
                return this._moved;
              },
              _start: function (n) {
                clearTimeout(this._holdTimeout);
                this.startTime = u();
                this._moved = !0;
                this._trigger(g, n);
              },
              _trigger: function (n, t) {
                var i = this,
                  r = t.event,
                  u = { touch: i, x: i.x, y: i.y, target: i.target, event: r };
                i.userEvents.notify(n, u) && r.preventDefault();
              },
              _withinIgnoreThreshold: function () {
                var n = this.x.initialDelta,
                  t = this.y.initialDelta;
                return Math.sqrt(n * n + t * t) <= this.threshold;
              },
            }),
            r = v.extend({
              init: function (r, u) {
                var a,
                  y,
                  et,
                  ot,
                  o = this,
                  c = t.guid();
                u = u || {};
                a = o.filter = u.filter;
                o.threshold = u.threshold || w;
                o.minHold = u.minHold || p;
                o.touches = [];
                o._maxTouches = u.multiTouch ? 2 : 1;
                o.allowSelection = u.allowSelection;
                o.captureUpIfMoved = u.captureUpIfMoved;
                o.useClickAsTap = !u.fastTap && !i.delayedClick();
                o.eventNS = c;
                o._clicks = 0;
                o.supportDoubleTap = u.supportDoubleTap;
                r = n(r).handler(o);
                v.fn.init.call(o);
                f(o, {
                  element: r,
                  surface: n(
                    u.global && lt
                      ? r[0].ownerDocument.documentElement
                      : u.surface || r
                  ),
                  stopPropagation: u.stopPropagation,
                  pressed: !1,
                });
                o.surface
                  .handler(o)
                  .on(t.applyEventMap("move", c), "_move")
                  .on(t.applyEventMap("up cancel", c), "_end");
                r.on(t.applyEventMap("down", c), a, "_start");
                o.useClickAsTap &&
                  r.on(t.applyEventMap("click", c), a, "_click");
                (i.pointers || i.msPointers) &&
                  (i.browser.version < 11
                    ? ((y = "pinch-zoom double-tap-zoom"),
                      r.css(
                        "-ms-touch-action",
                        u.touchAction && "none" != u.touchAction
                          ? y + " " + u.touchAction
                          : y
                      ))
                    : r.css("touch-action", u.touchAction || "none"));
                u.preventDragEvent &&
                  r.on(t.applyEventMap("dragstart", c), t.preventDefault);
                r.on(
                  t.applyEventMap("mousedown", c),
                  a,
                  { root: r },
                  "_select"
                );
                o.captureUpIfMoved &&
                  i.eventCapture &&
                  ((et = o.surface[0]),
                  (ot = n.proxy(o.preventIfMoving, o)),
                  l(function (n) {
                    et.addEventListener(n, ot, !0);
                  }));
                o.bind([b, k, e, tt, g, s, h, it, nt, ht, rt, ut, ft, d], u);
              },
              preventIfMoving: function (n) {
                this._isMoved() && n.preventDefault();
              },
              destroy: function () {
                var t,
                  n = this;
                n._destroyed ||
                  ((n._destroyed = !0),
                  n.captureUpIfMoved &&
                    i.eventCapture &&
                    ((t = n.surface[0]),
                    l(function (i) {
                      t.removeEventListener(i, n.preventIfMoving);
                    })),
                  n.element.kendoDestroy(n.eventNS),
                  n.surface.kendoDestroy(n.eventNS),
                  n.element.removeData("handler"),
                  n.surface.removeData("handler"),
                  n._disposeAll(),
                  n.unbind(),
                  delete n.surface,
                  delete n.element,
                  delete n.currentTarget);
              },
              capture: function () {
                r.current = this;
              },
              cancel: function () {
                this._disposeAll();
                this.trigger(nt);
              },
              notify: function (n, t) {
                var r = this,
                  i = r.touches;
                if (this._isMultiTouch()) {
                  switch (n) {
                    case s:
                      n = rt;
                      break;
                    case h:
                      n = ut;
                      break;
                    case e:
                      n = ft;
                  }
                  f(t, { touches: i }, c(i[0], i[1]));
                }
                return this.trigger(n, f(t, { type: n }));
              },
              press: function (n, t, i) {
                this._apiCall("_start", n, t, i);
              },
              move: function (n, t) {
                this._apiCall("_move", n, t);
              },
              end: function (n, t) {
                this._apiCall("_end", n, t);
              },
              _isMultiTouch: function () {
                return this.touches.length > 1;
              },
              _maxTouchesReached: function () {
                return this.touches.length >= this._maxTouches;
              },
              _disposeAll: function () {
                for (var n = this.touches; n.length > 0; ) n.pop().dispose();
              },
              _isMoved: function () {
                return n.grep(this.touches, function (n) {
                  return n.isMoved();
                }).length;
              },
              _select: function (n) {
                (this.allowSelection && !this.trigger(d, { event: n })) ||
                  n.preventDefault();
              },
              _start: function (t) {
                var f,
                  u,
                  i = this,
                  e = 0,
                  c = i.filter,
                  s = o(t),
                  l = s.length,
                  h = t.which;
                if (!((h && h > 1) || i._maxTouchesReached()))
                  for (
                    r.current = null,
                      i.currentTarget = t.currentTarget,
                      i.stopPropagation && t.stopPropagation();
                    e < l && !i._maxTouchesReached();
                    e++
                  )
                    (u = s[e]),
                      (f = c ? n(u.currentTarget) : i.element),
                      f.length &&
                        ((u = new at(i, f, u)),
                        i.touches.push(u),
                        u.press(),
                        i._isMultiTouch() && i.notify("gesturestart", {}));
              },
              _move: function (n) {
                this._eachTouch("move", n);
              },
              _end: function (n) {
                this._eachTouch("end", n);
              },
              _click: function (t) {
                var i = {
                  touch: {
                    initialTouch: t.target,
                    target: n(t.currentTarget),
                    endTime: u(),
                    x: { location: t.pageX, client: t.clientX },
                    y: { location: t.pageY, client: t.clientY },
                  },
                  x: t.pageX,
                  y: t.pageY,
                  target: n(t.currentTarget),
                  event: t,
                  type: "tap",
                };
                this.trigger("tap", i) && t.preventDefault();
              },
              _eachTouch: function (n, t) {
                for (
                  var r, u, f, c = this, e = {}, s = o(t), h = c.touches, i = 0;
                  i < h.length;
                  i++
                )
                  (r = h[i]), (e[r.id] = r);
                for (i = 0; i < s.length; i++)
                  (u = s[i]), (f = e[u.id]), f && f[n](u);
              },
              _apiCall: function (t, i, r, u) {
                this[t]({
                  api: !0,
                  pageX: i,
                  pageY: r,
                  clientX: i,
                  clientY: r,
                  target: n(u || this.element)[0],
                  stopPropagation: n.noop,
                  preventDefault: n.noop,
                });
              },
            });
          r.defaultThreshold = function (n) {
            w = n;
          };
          r.minHold = function (n) {
            p = n;
          };
          t.getTouches = o;
          t.touchDelta = c;
          t.UserEvents = r;
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.draganddrop.min", ["kendo.core.min", "kendo.userevents.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function ni(t, i) {
            try {
              return n.contains(t, i) || t == i;
            } catch (r) {
              return !1;
            }
          }
          function v(n, t) {
            return parseInt(n.css(t), 10) || 0;
          }
          function it(n, t) {
            return Math.min(Math.max(n, t.min), t.max);
          }
          function rt(n, t) {
            var r = g(n),
              e = i._outerWidth,
              o = i._outerHeight,
              u = r.left + v(n, "borderLeftWidth") + v(n, "paddingLeft"),
              f = r.top + v(n, "borderTopWidth") + v(n, "paddingTop"),
              s = u + n.width() - e(t, !0),
              h = f + n.height() - o(t, !0);
            return { x: { min: u, max: s }, y: { min: f, max: h } };
          }
          function ti(i, r, u) {
            for (
              var o, e, f = 0, s = r && r.length, h = u && u.length;
              i && i.parentNode;

            ) {
              for (f = 0; f < s; f++)
                if (((o = r[f]), o.element[0] === i))
                  return { target: o, targetElement: i };
              for (f = 0; f < h; f++)
                if (
                  ((e = u[f]),
                  n.contains(e.element[0], i) &&
                    d.matchesSelector.call(i, e.options.filter))
                )
                  return { target: e, targetElement: i };
              i = i.parentNode;
            }
            return t;
          }
          function ut(n, t) {
            var i,
              u = t.options.group,
              r = n[u];
            if ((s.fn.destroy.call(t), r.length > 1)) {
              for (i = 0; i < r.length; i++)
                if (r[i] == t) {
                  r.splice(i, 1);
                  break;
                }
            } else (r.length = 0), delete n[u];
          }
          function ft(n) {
            var t,
              i,
              r,
              u = b()[0];
            return n[0] === u
              ? ((i = u.scrollTop),
                (r = u.scrollLeft),
                {
                  top: i,
                  left: r,
                  bottom: i + y.height(),
                  right: r + y.width(),
                })
              : ((t = n.offset()),
                (t.bottom = t.top + n.height()),
                (t.right = t.left + n.width()),
                t);
          }
          function b() {
            return n(
              i.support.browser.edge || i.support.browser.safari
                ? e.body
                : e.documentElement
            );
          }
          function et(t) {
            var r,
              u = b();
            if (!t || t === e.body || t === e.documentElement) return u;
            for (r = n(t)[0]; r && !i.isScrollable(r) && r !== e.body; )
              r = r.parentNode;
            return r === e.body ? u : n(r);
          }
          function ot(n, t, i) {
            var u = { x: 0, y: 0 },
              r = 50;
            return (
              n - i.left < r
                ? (u.x = -(r - (n - i.left)))
                : i.right - n < r && (u.x = r - (i.right - n)),
              t - i.top < r
                ? (u.y = -(r - (t - i.top)))
                : i.bottom - t < r && (u.y = r - (i.bottom - t)),
              u
            );
          }
          var f,
            k,
            st,
            l,
            ht,
            ct,
            i = window.kendo,
            d = i.support,
            e = window.document,
            y = n(window),
            ii = i.Class,
            s = i.ui.Widget,
            o = i.Observable,
            ri = i.UserEvents,
            u = n.proxy,
            r = n.extend,
            g = i.getOffset,
            p = {},
            h = {},
            c = {},
            nt = i.elementUnderCursor,
            lt = "keyup",
            a = "change",
            at = "dragstart",
            vt = "hold",
            yt = "drag",
            pt = "dragend",
            wt = "dragcancel",
            bt = "hintDestroyed",
            tt = "dragenter",
            w = "dragleave",
            kt = "drop",
            ui = o.extend({
              init: function (t, r) {
                var f = this,
                  e = t[0];
                f.capture = !1;
                e.addEventListener
                  ? (n.each(i.eventMap.down.split(" "), function () {
                      e.addEventListener(this, u(f._press, f), !0);
                    }),
                    n.each(i.eventMap.up.split(" "), function () {
                      e.addEventListener(this, u(f._release, f), !0);
                    }))
                  : (n.each(i.eventMap.down.split(" "), function () {
                      e.attachEvent(this, u(f._press, f));
                    }),
                    n.each(i.eventMap.up.split(" "), function () {
                      e.attachEvent(this, u(f._release, f));
                    }));
                o.fn.init.call(f);
                f.bind(["press", "release"], r || {});
              },
              captureNext: function () {
                this.capture = !0;
              },
              cancelCapture: function () {
                this.capture = !1;
              },
              _press: function (n) {
                var t = this;
                t.trigger("press");
                t.capture && n.preventDefault();
              },
              _release: function (n) {
                var t = this;
                t.trigger("release");
                t.capture && (n.preventDefault(), t.cancelCapture());
              },
            }),
            dt = o.extend({
              init: function (t) {
                var i = this;
                o.fn.init.call(i);
                i.forcedEnabled = !1;
                n.extend(i, t);
                i.scale = 1;
                i.horizontal
                  ? ((i.measure = "offsetWidth"),
                    (i.scrollSize = "scrollWidth"),
                    (i.axis = "x"))
                  : ((i.measure = "offsetHeight"),
                    (i.scrollSize = "scrollHeight"),
                    (i.axis = "y"));
              },
              makeVirtual: function () {
                n.extend(this, {
                  virtual: !0,
                  forcedEnabled: !0,
                  _virtualMin: 0,
                  _virtualMax: 0,
                });
              },
              virtualSize: function (n, t) {
                (this._virtualMin === n && this._virtualMax === t) ||
                  ((this._virtualMin = n),
                  (this._virtualMax = t),
                  this.update());
              },
              outOfBounds: function (n) {
                return n > this.max || n < this.min;
              },
              forceEnabled: function () {
                this.forcedEnabled = !0;
              },
              getSize: function () {
                return this.container[0][this.measure];
              },
              getTotal: function () {
                return this.element[0][this.scrollSize];
              },
              rescale: function (n) {
                this.scale = n;
              },
              update: function (n) {
                var t = this,
                  u = t.virtual ? t._virtualMax : t.getTotal(),
                  r = u * t.scale,
                  i = t.getSize();
                (0 !== u || t.forcedEnabled) &&
                  ((t.max = t.virtual ? -t._virtualMin : 0),
                  (t.size = i),
                  (t.total = r),
                  (t.min = Math.min(t.max, i - r)),
                  (t.minScale = i / u),
                  (t.centerOffset = (r - i) / 2),
                  (t.enabled = t.forcedEnabled || r > i),
                  n || t.trigger(a, t));
              },
            }),
            fi = o.extend({
              init: function (n) {
                var t = this;
                o.fn.init.call(t);
                t.x = new dt(r({ horizontal: !0 }, n));
                t.y = new dt(r({ horizontal: !1 }, n));
                t.container = n.container;
                t.forcedMinScale = n.minScale;
                t.maxScale = n.maxScale || 100;
                t.bind(a, n);
              },
              rescale: function (n) {
                this.x.rescale(n);
                this.y.rescale(n);
                this.refresh();
              },
              centerCoordinates: function () {
                return {
                  x: Math.min(0, -this.x.centerOffset),
                  y: Math.min(0, -this.y.centerOffset),
                };
              },
              refresh: function () {
                var n = this;
                n.x.update();
                n.y.update();
                n.enabled = n.x.enabled || n.y.enabled;
                n.minScale =
                  n.forcedMinScale || Math.min(n.x.minScale, n.y.minScale);
                n.fitScale = Math.max(n.x.minScale, n.y.minScale);
                n.trigger(a);
              },
            }),
            gt = o.extend({
              init: function (n) {
                var t = this;
                r(t, n);
                o.fn.init.call(t);
              },
              outOfBounds: function () {
                return this.dimension.outOfBounds(this.movable[this.axis]);
              },
              dragMove: function (n) {
                var t = this,
                  i = t.dimension,
                  r = t.axis,
                  u = t.movable,
                  f = u[r] + n;
                i.enabled &&
                  (((f < i.min && n < 0) || (f > i.max && n > 0)) &&
                    (n *= t.resistance),
                  u.translateAxis(r, n),
                  t.trigger(a, t));
              },
            }),
            ei = ii.extend({
              init: function (t) {
                var f,
                  e,
                  o,
                  u,
                  i = this;
                r(i, { elastic: !0 }, t);
                o = i.elastic ? 0.5 : 0;
                u = i.movable;
                i.x = f = new gt({
                  axis: "x",
                  dimension: i.dimensions.x,
                  resistance: o,
                  movable: u,
                });
                i.y = e = new gt({
                  axis: "y",
                  dimension: i.dimensions.y,
                  resistance: o,
                  movable: u,
                });
                i.userEvents.bind(
                  ["press", "move", "end", "gesturestart", "gesturechange"],
                  {
                    gesturestart: function (n) {
                      i.gesture = n;
                      i.offset = i.dimensions.container.offset();
                    },
                    press: function (t) {
                      n(t.event.target)
                        .closest("a")
                        .is("[data-navigate-on-press=true]") &&
                        t.sender.cancel();
                    },
                    gesturechange: function (n) {
                      var r,
                        o,
                        s,
                        h = i.gesture,
                        c = h.center,
                        l = n.center,
                        t = n.distance / h.distance,
                        v = i.dimensions.minScale,
                        a = i.dimensions.maxScale;
                      u.scale <= v && t < 1 && (t += 0.8 * (1 - t));
                      u.scale * t >= a && (t = a / u.scale);
                      o = u.x + i.offset.left;
                      s = u.y + i.offset.top;
                      r = {
                        x: (o - c.x) * t + l.x - o,
                        y: (s - c.y) * t + l.y - s,
                      };
                      u.scaleWith(t);
                      f.dragMove(r.x);
                      e.dragMove(r.y);
                      i.dimensions.rescale(u.scale);
                      i.gesture = n;
                      n.preventDefault();
                    },
                    move: function (n) {
                      n.event.target.tagName.match(/textarea|input/i) ||
                        (f.dimension.enabled || e.dimension.enabled
                          ? (f.dragMove(n.x.delta),
                            e.dragMove(n.y.delta),
                            n.preventDefault())
                          : n.touch.skip());
                    },
                    end: function (n) {
                      n.preventDefault();
                    },
                  }
                );
              },
            }),
            oi = d.transitions.prefix + "Transform";
          k = d.hasHW3D
            ? function (n, t, i) {
                return (
                  "translate3d(" + n + "px," + t + "px,0) scale(" + i + ")"
                );
              }
            : function (n, t, i) {
                return "translate(" + n + "px," + t + "px) scale(" + i + ")";
              };
          st = o.extend({
            init: function (t) {
              var i = this;
              o.fn.init.call(i);
              i.element = n(t);
              i.element[0].style.webkitTransformOrigin = "left top";
              i.x = 0;
              i.y = 0;
              i.scale = 1;
              i._saveCoordinates(k(i.x, i.y, i.scale));
            },
            translateAxis: function (n, t) {
              this[n] += t;
              this.refresh();
            },
            scaleTo: function (n) {
              this.scale = n;
              this.refresh();
            },
            scaleWith: function (n) {
              this.scale *= n;
              this.refresh();
            },
            translate: function (n) {
              this.x += n.x;
              this.y += n.y;
              this.refresh();
            },
            moveAxis: function (n, t) {
              this[n] = t;
              this.refresh();
            },
            moveTo: function (n) {
              r(this, n);
              this.refresh();
            },
            refresh: function () {
              var t,
                n = this,
                r = n.x,
                u = n.y;
              n.round && ((r = Math.round(r)), (u = Math.round(u)));
              t = k(r, u, n.scale);
              t != n.coordinates &&
                (i.support.browser.msie && i.support.browser.version < 10
                  ? ((n.element[0].style.position = "absolute"),
                    (n.element[0].style.left = n.x + "px"),
                    (n.element[0].style.top = n.y + "px"))
                  : (n.element[0].style[oi] = t),
                n._saveCoordinates(t),
                n.trigger(a));
            },
            _saveCoordinates: function (n) {
              this.coordinates = n;
            },
          });
          l = s.extend({
            init: function (n, t) {
              var i,
                r = this;
              s.fn.init.call(r, n, t);
              i = r.options.group;
              i in h ? h[i].push(r) : (h[i] = [r]);
            },
            events: [tt, w, kt],
            options: { name: "DropTarget", group: "default" },
            destroy: function () {
              ut(h, this);
            },
            _trigger: function (n, t) {
              var i = this,
                u = p[i.options.group];
              if (u)
                return i.trigger(
                  n,
                  r({}, t.event, { draggable: u, dropTarget: t.dropTarget })
                );
            },
            _over: function (n) {
              this._trigger(tt, n);
            },
            _out: function (n) {
              this._trigger(w, n);
            },
            _drop: function (n) {
              var t = this,
                i = p[t.options.group];
              i && (i.dropped = !t._trigger(kt, n));
            },
          });
          l.destroyGroup = function (n) {
            var t,
              i = h[n] || c[n];
            if (i) {
              for (t = 0; t < i.length; t++) s.fn.destroy.call(i[t]);
              i.length = 0;
              delete h[n];
              delete c[n];
            }
          };
          l._cache = h;
          ht = l.extend({
            init: function (n, t) {
              var i,
                r = this;
              s.fn.init.call(r, n, t);
              i = r.options.group;
              i in c ? c[i].push(r) : (c[i] = [r]);
            },
            destroy: function () {
              ut(c, this);
            },
            options: { name: "DropTargetArea", group: "default", filter: null },
          });
          ct = s.extend({
            init: function (n, t) {
              var i = this;
              s.fn.init.call(i, n, t);
              i._activated = !1;
              i.userEvents = new ri(i.element, {
                global: !0,
                allowSelection: !0,
                filter: i.options.filter,
                threshold: i.options.distance,
                start: u(i._start, i),
                hold: u(i._hold, i),
                move: u(i._drag, i),
                end: u(i._end, i),
                cancel: u(i._cancel, i),
                select: u(i._select, i),
              });
              i._afterEndHandler = u(i._afterEnd, i);
              i._captureEscape = u(i._captureEscape, i);
            },
            events: [vt, at, yt, pt, wt, bt],
            options: {
              name: "Draggable",
              distance: i.support.touch ? 0 : 5,
              group: "default",
              cursorOffset: null,
              axis: null,
              container: null,
              filter: null,
              ignore: null,
              holdToDrag: !1,
              autoScroll: !1,
              dropped: !1,
            },
            cancelHold: function () {
              this._activated = !1;
            },
            _captureEscape: function (n) {
              var t = this;
              n.keyCode === i.keys.ESC &&
                (t._trigger(wt, { event: n }), t.userEvents.cancel());
            },
            _updateHint: function (t) {
              var i,
                r = this,
                o = r.options,
                u = r.boundaries,
                e = o.axis,
                f = r.options.cursorOffset;
              f
                ? (i = {
                    left: t.x.location + f.left,
                    top: t.y.location + f.top,
                  })
                : ((r.hintOffset.left += t.x.delta),
                  (r.hintOffset.top += t.y.delta),
                  (i = n.extend({}, r.hintOffset)));
              u && ((i.top = it(i.top, u.y)), (i.left = it(i.left, u.x)));
              "x" === e ? delete i.top : "y" === e && delete i.left;
              r.hint.css(i);
            },
            _shouldIgnoreTarget: function (t) {
              var i = this.options.ignore;
              return i && n(t).is(i);
            },
            _select: function (n) {
              this._shouldIgnoreTarget(n.event.target) || n.preventDefault();
            },
            _start: function (r) {
              var o,
                u = this,
                f = u.options,
                h = f.container ? n(f.container) : null,
                s = f.hint;
              return this._shouldIgnoreTarget(r.touch.initialTouch) ||
                (f.holdToDrag && !u._activated)
                ? (u.userEvents.cancel(), t)
                : ((u.currentTarget = r.target),
                  (u.currentTargetOffset = g(u.currentTarget)),
                  s &&
                    (u.hint && u.hint.stop(!0, !0).remove(),
                    (u.hint = i.isFunction(s)
                      ? n(s.call(u, u.currentTarget))
                      : s),
                    (o = g(u.currentTarget)),
                    (u.hintOffset = o),
                    u.hint
                      .css({
                        position: "absolute",
                        zIndex: 2e4,
                        left: o.left,
                        top: o.top,
                      })
                      .appendTo(e.body),
                    u.angular("compile", function () {
                      u.hint.removeAttr("ng-repeat");
                      for (
                        var t = n(r.target);
                        !t.data("$$kendoScope") && t.length;

                      )
                        t = t.parent();
                      return {
                        elements: u.hint.get(),
                        scopeFrom: t.data("$$kendoScope"),
                      };
                    })),
                  (p[f.group] = u),
                  (u.dropped = !1),
                  h && (u.boundaries = rt(h, u.hint)),
                  n(e).on(lt, u._captureEscape),
                  u._trigger(at, r) && (u.userEvents.cancel(), u._afterEnd()),
                  u.userEvents.capture(),
                  t);
            },
            _hold: function (n) {
              this.currentTarget = n.target;
              this._trigger(vt, n)
                ? this.userEvents.cancel()
                : (this._activated = !0);
            },
            _drag: function (t) {
              var i, r;
              t.preventDefault();
              i = this._elementUnderCursor(t);
              this.options.autoScroll &&
                this._cursorElement !== i &&
                ((this._scrollableParent = et(i)), (this._cursorElement = i));
              this._lastEvent = t;
              this._processMovement(t, i);
              this.options.autoScroll &&
                this._scrollableParent[0] &&
                ((r = ot(
                  t.x.location,
                  t.y.location,
                  ft(this._scrollableParent)
                )),
                (this._scrollCompenstation = n.extend({}, this.hintOffset)),
                (this._scrollVelocity = r),
                0 === r.y && 0 === r.x
                  ? (clearInterval(this._scrollInterval),
                    (this._scrollInterval = null))
                  : this._scrollInterval ||
                    (this._scrollInterval = setInterval(
                      n.proxy(this, "_autoScroll"),
                      50
                    )));
              this.hint && this._updateHint(t);
            },
            _processMovement: function (i, u) {
              this._withDropTarget(u, function (u, e) {
                if (!u)
                  return (
                    f &&
                      (f._trigger(w, r(i, { dropTarget: n(f.targetElement) })),
                      (f = null)),
                    t
                  );
                if (f) {
                  if (e === f.targetElement) return;
                  f._trigger(w, r(i, { dropTarget: n(f.targetElement) }));
                }
                u._trigger(tt, r(i, { dropTarget: n(e) }));
                f = r(u, { targetElement: e });
              });
              this._trigger(yt, r(i, { dropTarget: f, elementUnderCursor: u }));
            },
            _autoScroll: function () {
              var l,
                u,
                f,
                o,
                s,
                i,
                h,
                r,
                n = this._scrollableParent[0],
                t = this._scrollVelocity,
                c = this._scrollCompenstation;
              n &&
                ((l = this._elementUnderCursor(this._lastEvent)),
                this._processMovement(this._lastEvent, l),
                (o = n === b()[0]),
                o
                  ? ((u = e.body.scrollHeight > y.height()),
                    (f = e.body.scrollWidth > y.width()))
                  : ((u = n.offsetHeight <= n.scrollHeight),
                    (f = n.offsetWidth <= n.scrollWidth)),
                (s = n.scrollTop + t.y),
                (i = u && s > 0 && s < n.scrollHeight),
                (h = n.scrollLeft + t.x),
                (r = f && h > 0 && h < n.scrollWidth),
                i && (n.scrollTop += t.y),
                r && (n.scrollLeft += t.x),
                this.hint &&
                  o &&
                  (r || i) &&
                  (i && (c.top += t.y),
                  r && (c.left += t.x),
                  this.hint.css(c)));
            },
            _end: function (t) {
              this._withDropTarget(
                this._elementUnderCursor(t),
                function (i, u) {
                  i && (i._drop(r({}, t, { dropTarget: n(u) })), (f = null));
                }
              );
              this._cancel(this._trigger(pt, t));
            },
            _cancel: function (n) {
              var t = this;
              t._scrollableParent = null;
              this._cursorElement = null;
              clearInterval(this._scrollInterval);
              t._activated = !1;
              t.hint && !t.dropped
                ? setTimeout(function () {
                    t.hint.stop(!0, !0);
                    n
                      ? t._afterEndHandler()
                      : t.hint.animate(
                          t.currentTargetOffset,
                          "fast",
                          t._afterEndHandler
                        );
                  }, 0)
                : t._afterEnd();
            },
            _trigger: function (n, t) {
              var i = this;
              return i.trigger(
                n,
                r({}, t.event, {
                  x: t.x,
                  y: t.y,
                  currentTarget: i.currentTarget,
                  initialTarget: t.touch ? t.touch.initialTouch : null,
                  dropTarget: t.dropTarget,
                  elementUnderCursor: t.elementUnderCursor,
                })
              );
            },
            _elementUnderCursor: function (n) {
              var t = nt(n),
                i = this.hint;
              return (
                i &&
                  ni(i[0], t) &&
                  (i.hide(), (t = nt(n)), t || (t = nt(n)), i.show()),
                t
              );
            },
            _withDropTarget: function (n, t) {
              var i,
                f = this.options.group,
                r = h[f],
                u = c[f];
              ((r && r.length) || (u && u.length)) &&
                ((i = ti(n, r, u)), i ? t(i.target, i.targetElement) : t());
            },
            destroy: function () {
              var n = this;
              s.fn.destroy.call(n);
              n._afterEnd();
              n.userEvents.destroy();
              this._scrollableParent = null;
              this._cursorElement = null;
              clearInterval(this._scrollInterval);
              n.currentTarget = null;
            },
            _afterEnd: function () {
              var t = this;
              t.hint && t.hint.remove();
              delete p[t.options.group];
              t.trigger("destroy");
              t.trigger(bt);
              n(e).off(lt, t._captureEscape);
            },
          });
          i.ui.plugin(l);
          i.ui.plugin(ht);
          i.ui.plugin(ct);
          i.TapCapture = ui;
          i.containerBoundaries = rt;
          r(i.ui, { Pane: ei, PaneDimensions: fi, Movable: st });
          i.ui.Draggable.utils = {
            autoScrollVelocity: ot,
            scrollableViewPort: ft,
            findScrollableParent: et,
          };
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mobile.scroller.min",
      ["kendo.fx.min", "kendo.draganddrop.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          var i = window.kendo,
            d = i.mobile,
            l = i.effects,
            a = d.ui,
            r = n.proxy,
            f = n.extend,
            o = a.Widget,
            g = i.Class,
            v = i.ui.Movable,
            nt = i.ui.Pane,
            tt = i.ui.PaneDimensions,
            y = l.Transition,
            e = l.Animation,
            u = Math.abs,
            it = 500,
            rt = 0.7,
            ut = 0.96,
            ft = 10,
            p = 55,
            w = 0.5,
            b = 5,
            h = "km-scroller-release",
            c = "km-scroller-refresh",
            s = "change",
            k = "scroll",
            et = 2,
            ot = e.extend({
              init: function (n) {
                var t = this;
                e.fn.init.call(t);
                f(t, n);
                t.userEvents.bind("gestureend", r(t.start, t));
                t.tapCapture.bind("press", r(t.cancel, t));
              },
              enabled: function () {
                return this.movable.scale < this.dimensions.minScale;
              },
              done: function () {
                return this.dimensions.minScale - this.movable.scale < 0.01;
              },
              tick: function () {
                var n = this.movable;
                n.scaleWith(1.1);
                this.dimensions.rescale(n.scale);
              },
              onEnd: function () {
                var n = this.movable;
                n.scaleTo(this.dimensions.minScale);
                this.dimensions.rescale(n.scale);
              },
            }),
            st = e.extend({
              init: function (n) {
                var t = this;
                e.fn.init.call(t);
                f(t, n, {
                  transition: new y({
                    axis: n.axis,
                    movable: n.movable,
                    onEnd: function () {
                      t._end();
                    },
                  }),
                });
                t.tapCapture.bind("press", function () {
                  t.cancel();
                });
                t.userEvents.bind("end", r(t.start, t));
                t.userEvents.bind("gestureend", r(t.start, t));
                t.userEvents.bind("tap", r(t.onEnd, t));
              },
              onCancel: function () {
                this.transition.cancel();
              },
              freeze: function (n) {
                var t = this;
                t.cancel();
                t._moveTo(n);
              },
              onEnd: function () {
                var n = this;
                n.paneAxis.outOfBounds() ? n._snapBack() : n._end();
              },
              done: function () {
                return u(this.velocity) < 1;
              },
              start: function (n) {
                var i,
                  t = this;
                t.dimension.enabled &&
                  (t.paneAxis.outOfBounds()
                    ? t._snapBack()
                    : ((i = n.touch.id === et ? 0 : n.touch[t.axis].velocity),
                      (t.velocity = Math.max(
                        Math.min(i * t.velocityMultiplier, p),
                        -p
                      )),
                      t.tapCapture.captureNext(),
                      e.fn.start.call(t)));
              },
              tick: function () {
                var n = this,
                  i = n.dimension,
                  r = n.paneAxis.outOfBounds() ? w : n.friction,
                  u = (n.velocity *= r),
                  t = n.movable[n.axis] + u;
                !n.elastic &&
                  i.outOfBounds(t) &&
                  ((t = Math.max(Math.min(t, i.max), i.min)), (n.velocity = 0));
                n.movable.moveAxis(n.axis, t);
              },
              _end: function () {
                this.tapCapture.cancelCapture();
                this.end();
              },
              _snapBack: function () {
                var n = this,
                  t = n.dimension,
                  i = n.movable[n.axis] > t.max ? t.max : t.min;
                n._moveTo(i);
              },
              _moveTo: function (n) {
                this.transition.moveTo({
                  location: n,
                  duration: it,
                  ease: y.easeOutExpo,
                });
              },
            }),
            ht = e.extend({
              init: function (n) {
                var t = this;
                i.effects.Animation.fn.init.call(this);
                f(t, n, { origin: {}, destination: {}, offset: {} });
              },
              tick: function () {
                this._updateCoordinates();
                this.moveTo(this.origin);
              },
              done: function () {
                return u(this.offset.y) < b && u(this.offset.x) < b;
              },
              onEnd: function () {
                this.moveTo(this.destination);
                this.callback && this.callback.call();
              },
              setCoordinates: function (n, t) {
                this.offset = {};
                this.origin = n;
                this.destination = t;
              },
              setCallback: function (n) {
                n && i.isFunction(n) ? (this.callback = n) : (n = t);
              },
              _updateCoordinates: function () {
                this.offset = {
                  x: (this.destination.x - this.origin.x) / 4,
                  y: (this.destination.y - this.origin.y) / 4,
                };
                this.origin = {
                  y: this.origin.y + this.offset.y,
                  x: this.origin.x + this.offset.x,
                };
              },
            }),
            ct = g.extend({
              init: function (t) {
                var i = this,
                  e = "x" === t.axis,
                  u = n(
                    '<div class="km-touch-scrollbar km-' +
                      (e ? "horizontal" : "vertical") +
                      '-scrollbar" />'
                  );
                f(i, t, {
                  element: u,
                  elementSize: 0,
                  movable: new v(u),
                  scrollMovable: t.movable,
                  alwaysVisible: t.alwaysVisible,
                  size: e ? "width" : "height",
                });
                i.scrollMovable.bind(s, r(i.refresh, i));
                i.container.append(u);
                t.alwaysVisible && i.show();
              },
              refresh: function () {
                var n = this,
                  f = n.axis,
                  e = n.dimension,
                  r = e.size,
                  o = n.scrollMovable,
                  u = r / e.total,
                  t = Math.round(-o[f] * u),
                  i = Math.round(r * u);
                u >= 1
                  ? this.element.css("display", "none")
                  : this.element.css("display", "");
                t + i > r ? (i = r - t) : t < 0 && ((i += t), (t = 0));
                n.elementSize != i &&
                  (n.element.css(n.size, i + "px"), (n.elementSize = i));
                n.movable.moveAxis(f, t);
              },
              show: function () {
                this.element.css({ opacity: rt, visibility: "visible" });
              },
              hide: function () {
                this.alwaysVisible || this.element.css({ opacity: 0 });
              },
            }),
            lt = o.extend({
              init: function (e, h) {
                var p,
                  w,
                  a,
                  l,
                  b,
                  y,
                  d,
                  g,
                  it,
                  c = this;
                return (
                  o.fn.init.call(c, e, h),
                  (e = c.element),
                  (c._native =
                    c.options.useNative && i.support.hasNativeScrolling)
                    ? (e
                        .addClass("km-native-scroller")
                        .prepend('<div class="km-scroll-header"/>'),
                      f(c, {
                        scrollElement: e,
                        fixedContainer: e.children().first(),
                      }),
                      t)
                    : (e
                        .css("overflow", "hidden")
                        .addClass("km-scroll-wrapper")
                        .wrapInner('<div class="km-scroll-container"/>')
                        .prepend('<div class="km-scroll-header"/>'),
                      (p = e.children().eq(1)),
                      (w = new i.TapCapture(e)),
                      (a = new v(p)),
                      (l = new tt({
                        element: p,
                        container: e,
                        forcedEnabled: c.options.zoom,
                      })),
                      (b = this.options.avoidScrolling),
                      (y = new i.UserEvents(e, {
                        touchAction: "pan-y",
                        fastTap: !0,
                        allowSelection: !0,
                        preventDragEvent: !0,
                        captureUpIfMoved: !0,
                        multiTouch: c.options.zoom,
                        supportDoubleTap: c.options.supportDoubleTap,
                        start: function (t) {
                          l.refresh();
                          var i = u(t.x.velocity),
                            r = u(t.y.velocity),
                            f = 2 * i >= r,
                            e = n.contains(c.fixedContainer[0], t.event.target),
                            o = 2 * r >= i;
                          !e &&
                          !b(t) &&
                          c.enabled &&
                          ((l.x.enabled && f) || (l.y.enabled && o))
                            ? y.capture()
                            : y.cancel();
                        },
                      })),
                      (d = new nt({
                        movable: a,
                        dimensions: l,
                        userEvents: y,
                        elastic: c.options.elastic,
                      })),
                      (g = new ot({
                        movable: a,
                        dimensions: l,
                        userEvents: y,
                        tapCapture: w,
                      })),
                      (it = new ht({
                        moveTo: function (n) {
                          c.scrollTo(n.x, n.y);
                        },
                      })),
                      a.bind(s, function () {
                        c.scrollTop = -a.y;
                        c.scrollLeft = -a.x;
                        c.trigger(k, {
                          scrollTop: c.scrollTop,
                          scrollLeft: c.scrollLeft,
                        });
                      }),
                      c.options.mousewheelScrolling &&
                        e.on(
                          "DOMMouseScroll mousewheel",
                          r(this, "_wheelScroll")
                        ),
                      f(c, {
                        movable: a,
                        dimensions: l,
                        zoomSnapBack: g,
                        animatedScroller: it,
                        userEvents: y,
                        pane: d,
                        tapCapture: w,
                        pulled: !1,
                        enabled: !0,
                        scrollElement: p,
                        scrollTop: 0,
                        scrollLeft: 0,
                        fixedContainer: e.children().first(),
                      }),
                      c._initAxis("x"),
                      c._initAxis("y"),
                      (c._wheelEnd = function () {
                        c._wheel = !1;
                        c.userEvents.end(0, c._wheelY);
                      }),
                      l.refresh(),
                      c.options.pullToRefresh && c._initPullToRefresh(),
                      t)
                );
              },
              _wheelScroll: function (n) {
                if (!n.ctrlKey) {
                  this._wheel ||
                    ((this._wheel = !0),
                    (this._wheelY = 0),
                    this.userEvents.press(0, this._wheelY));
                  clearTimeout(this._wheelTimeout);
                  this._wheelTimeout = setTimeout(this._wheelEnd, 50);
                  var t = i.wheelDeltaY(n);
                  t &&
                    ((this._wheelY += t),
                    this.userEvents.move(0, this._wheelY));
                  n.preventDefault();
                }
              },
              makeVirtual: function () {
                this.dimensions.y.makeVirtual();
              },
              virtualSize: function (n, t) {
                this.dimensions.y.virtualSize(n, t);
              },
              height: function () {
                return this.dimensions.y.size;
              },
              scrollHeight: function () {
                return this.scrollElement[0].scrollHeight;
              },
              scrollWidth: function () {
                return this.scrollElement[0].scrollWidth;
              },
              options: {
                name: "Scroller",
                zoom: !1,
                pullOffset: 140,
                visibleScrollHints: !1,
                elastic: !0,
                useNative: !1,
                mousewheelScrolling: !0,
                avoidScrolling: function () {
                  return !1;
                },
                pullToRefresh: !1,
                messages: {
                  pullTemplate: "Pull to refresh",
                  releaseTemplate: "Release to refresh",
                  refreshTemplate: "Refreshing",
                },
              },
              events: ["pull", k, "resize"],
              _resize: function () {
                this._native || this.contentResized();
              },
              setOptions: function (n) {
                var t = this;
                o.fn.setOptions.call(t, n);
                n.pullToRefresh && t._initPullToRefresh();
              },
              reset: function () {
                this._native
                  ? this.scrollElement.scrollTop(0)
                  : (this.movable.moveTo({ x: 0, y: 0 }), this._scale(1));
              },
              contentResized: function () {
                this.dimensions.refresh();
                this.pane.x.outOfBounds() &&
                  this.movable.moveAxis("x", this.dimensions.x.min);
                this.pane.y.outOfBounds() &&
                  this.movable.moveAxis("y", this.dimensions.y.min);
              },
              zoomOut: function () {
                var n = this.dimensions;
                n.refresh();
                this._scale(n.fitScale);
                this.movable.moveTo(n.centerCoordinates());
              },
              enable: function () {
                this.enabled = !0;
              },
              disable: function () {
                this.enabled = !1;
              },
              scrollTo: function (n, t) {
                this._native
                  ? (this.scrollElement.scrollLeft(u(n)),
                    this.scrollElement.scrollTop(u(t)))
                  : (this.dimensions.refresh(),
                    this.movable.moveTo({ x: n, y: t }));
              },
              animatedScrollTo: function (n, t, i) {
                var r, u;
                this._native
                  ? this.scrollTo(n, t)
                  : ((r = { x: this.movable.x, y: this.movable.y }),
                    (u = { x: n, y: t }),
                    this.animatedScroller.setCoordinates(r, u),
                    this.animatedScroller.setCallback(i),
                    this.animatedScroller.start());
              },
              pullHandled: function () {
                var n = this;
                n.refreshHint.removeClass(c);
                n.hintContainer.html(n.pullTemplate({}));
                n.yinertia.onEnd();
                n.xinertia.onEnd();
                n.userEvents.cancel();
              },
              destroy: function () {
                o.fn.destroy.call(this);
                this.userEvents && this.userEvents.destroy();
              },
              _scale: function (n) {
                this.dimensions.rescale(n);
                this.movable.scaleTo(n);
              },
              _initPullToRefresh: function () {
                var n = this;
                n.dimensions.y.forceEnabled();
                n.pullTemplate = i.template(n.options.messages.pullTemplate);
                n.releaseTemplate = i.template(
                  n.options.messages.releaseTemplate
                );
                n.refreshTemplate = i.template(
                  n.options.messages.refreshTemplate
                );
                n.scrollElement.prepend(
                  '<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-loading-left"></span><span class="km-loading-right"></span><span class="km-template">' +
                    n.pullTemplate({}) +
                    "</span></span>"
                );
                n.refreshHint = n.scrollElement.children().first();
                n.hintContainer = n.refreshHint.children(".km-template");
                n.pane.y.bind("change", r(n._paneChange, n));
                n.userEvents.bind("end", r(n._dragEnd, n));
              },
              _dragEnd: function () {
                var n = this;
                n.pulled &&
                  ((n.pulled = !1),
                  n.refreshHint.removeClass(h).addClass(c),
                  n.hintContainer.html(n.refreshTemplate({})),
                  n.yinertia.freeze(n.options.pullOffset / 2),
                  n.trigger("pull"));
              },
              _paneChange: function () {
                var n = this;
                n.movable.y / w > n.options.pullOffset
                  ? n.pulled ||
                    ((n.pulled = !0),
                    n.refreshHint.removeClass(c).addClass(h),
                    n.hintContainer.html(n.releaseTemplate({})))
                  : n.pulled &&
                    ((n.pulled = !1),
                    n.refreshHint.removeClass(h),
                    n.hintContainer.html(n.pullTemplate({})));
              },
              _initAxis: function (n) {
                var t = this,
                  u = t.movable,
                  i = t.dimensions[n],
                  e = t.tapCapture,
                  f = t.pane[n],
                  r = new ct({
                    axis: n,
                    movable: u,
                    dimension: i,
                    container: t.element,
                    alwaysVisible: t.options.visibleScrollHints,
                  });
                i.bind(s, function () {
                  r.refresh();
                });
                f.bind(s, function () {
                  r.show();
                });
                t[n + "inertia"] = new st({
                  axis: n,
                  paneAxis: f,
                  movable: u,
                  tapCapture: e,
                  userEvents: t.userEvents,
                  dimension: i,
                  elastic: t.options.elastic,
                  friction: t.options.friction || ut,
                  velocityMultiplier: t.options.velocityMultiplier || ft,
                  end: function () {
                    r.hide();
                    t.trigger("scrollEnd", {
                      axis: n,
                      scrollTop: t.scrollTop,
                      scrollLeft: t.scrollLeft,
                    });
                  },
                });
              },
            });
          a.plugin(lt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.groupable.min", ["kendo.core.min", "kendo.draganddrop.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var i = window.kendo,
            h = i.ui.Widget,
            e = i._outerWidth,
            o = i.attr,
            a = n.extend,
            p = n.each,
            f = n.proxy,
            r = !1,
            v = "dir",
            w = "field",
            b = "title",
            s = "asc",
            k = "desc",
            c = "group-sort",
            l = ".kendoGroupable",
            d = "change",
            g = i.template(
              '<div class="k-group-indicator" data-#=data.ns#field="${data.field}" data-#=data.ns#title="${data.title || ""}" data-#=data.ns#dir="${data.dir || "asc"}"><a href="\\#" class="k-link"><span class="k-icon k-i-sort-${(data.dir || "asc") == "asc" ? "asc-sm" : "desc-sm"}" title="(sorted ${(data.dir || "asc") == "asc" ? "ascending": "descending"})"></span>${data.title ? data.title: data.field}</a><a class="k-button k-button-icon k-bare"><span class="k-icon k-i-close"></span></a></div>',
              { useWithBlock: !1 }
            ),
            y = function (t) {
              var r = t.attr(i.attr("title"));
              return (
                r && (r = i.htmlEncode(r)),
                n('<div class="k-header k-group-clue k-drag-clue" />')
                  .html(r || t.attr(i.attr("field")))
                  .prepend('<span class="k-icon k-drag-status k-i-cancel" />')
              );
            },
            u = n('<div class="k-grouping-dropclue"/>'),
            nt = h.extend({
              init: function (p, w) {
                var g,
                  tt,
                  b = this,
                  rt = i.guid(),
                  it = f(b._intializePositions, b),
                  nt = (b._dropCuePositions = []);
                h.fn.init.call(b, p, w);
                r = i.support.isRtl(p);
                tt = r ? "right" : "left";
                b.draggable = g =
                  b.options.draggable ||
                  new i.ui.Draggable(b.element, {
                    filter: b.options.draggableElements,
                    hint: y,
                    group: rt,
                  });
                b.groupContainer = n(b.options.groupContainer, b.element)
                  .kendoDropTarget({
                    group: g.options.group,
                    dragenter: function (n) {
                      b._canDrag(n.draggable.currentTarget) &&
                        (n.draggable.hint
                          .find(".k-drag-status")
                          .removeClass("k-i-cancel")
                          .addClass("k-i-plus"),
                        u.css(tt, 0).appendTo(b.groupContainer));
                    },
                    dragleave: function (n) {
                      n.draggable.hint
                        .find(".k-drag-status")
                        .removeClass("k-i-plus")
                        .addClass("k-i-cancel");
                      u.remove();
                    },
                    drop: function (t) {
                      var f,
                        o = t.draggable.currentTarget,
                        e = o.attr(i.attr("field")),
                        s = o.attr(i.attr("title")),
                        h = b.indicator(e),
                        p = b._dropCuePositions,
                        l = p[p.length - 1],
                        v = a({}, b.options.sort, o.data(c)),
                        y = v.dir;
                      (o.hasClass("k-group-indicator") || b._canDrag(o)) &&
                        (l
                          ? ((f = b._dropCuePosition(
                              i.getOffset(u).left +
                                parseInt(l.element.css("marginLeft"), 10) *
                                  (r ? -1 : 1) +
                                parseInt(l.element.css("marginRight"), 10)
                            )),
                            f &&
                              b._canDrop(n(h), f.element, f.left) &&
                              (f.before
                                ? f.element.before(
                                    h || b.buildIndicator(e, s, y)
                                  )
                                : f.element.after(
                                    h || b.buildIndicator(e, s, y)
                                  ),
                              b._setIndicatorSortOptions(e, v),
                              b._change()))
                          : (b.groupContainer.empty(),
                            b.groupContainer.append(b.buildIndicator(e, s, y)),
                            b._setIndicatorSortOptions(e, v),
                            b._change()));
                    },
                  })
                  .kendoDraggable({
                    filter: "div.k-group-indicator",
                    hint: y,
                    group: g.options.group,
                    dragcancel: f(b._dragCancel, b),
                    dragstart: function (n) {
                      var t = n.currentTarget,
                        f = parseInt(t.css("marginLeft"), 10),
                        i = t.position(),
                        o = r ? i.left - f : i.left + e(t);
                      it();
                      u.css("left", o).appendTo(b.groupContainer);
                      this.hint
                        .find(".k-drag-status")
                        .removeClass("k-i-cancel")
                        .addClass("k-i-plus");
                    },
                    dragend: function () {
                      b._dragEnd(this);
                    },
                    drag: f(b._drag, b),
                  })
                  .on("click" + l, ".k-button", function (t) {
                    t.preventDefault();
                    b._removeIndicator(n(this).parent());
                  })
                  .on("click" + l, ".k-link", function (t) {
                    var i = n(this).parent(),
                      r = i.attr(o(v)) === s ? k : s;
                    i.attr(o(v), r);
                    b._change();
                    t.preventDefault();
                  });
                g.bind(["dragend", "dragcancel", "dragstart", "drag"], {
                  dragend: function () {
                    b._dragEnd(this);
                  },
                  dragcancel: f(b._dragCancel, b),
                  dragstart: function (n) {
                    var i, r, u;
                    return b.options.allowDrag || b._canDrag(n.currentTarget)
                      ? (it(),
                        nt.length
                          ? ((i = nt[nt.length - 1].element),
                            (r = parseInt(i.css("marginRight"), 10)),
                            (u = i.position().left + e(i) + r))
                          : (u = 0),
                        t)
                      : (n.preventDefault(), t);
                  },
                  drag: f(b._drag, b),
                });
                b.dataSource = b.options.dataSource;
                b.dataSource && b._refreshHandler
                  ? b.dataSource.unbind(d, b._refreshHandler)
                  : (b._refreshHandler = f(b.refresh, b));
                b.dataSource &&
                  (b.dataSource.bind("change", b._refreshHandler), b.refresh());
              },
              refresh: function () {
                var i,
                  t = this,
                  r = t.dataSource,
                  u = r.group() || [],
                  f = o(w),
                  e = o(b);
                t.groupContainer &&
                  (t.groupContainer.empty(),
                  p(u, function (r, u) {
                    var o = u.field,
                      s = u.dir,
                      h = t.element.find(t.options.filter).filter(function () {
                        return n(this).attr(f) === o;
                      });
                    i = t.buildIndicator(o, h.attr(e), s);
                    t.groupContainer.append(i);
                    t._setIndicatorSortOptions(
                      o,
                      a({}, t.options.sort, { dir: s, compare: u.compare })
                    );
                  }));
                t._invalidateGroupContainer();
              },
              destroy: function () {
                var n = this;
                h.fn.destroy.call(n);
                n.groupContainer.off(l);
                n.groupContainer.data("kendoDropTarget") &&
                  n.groupContainer.data("kendoDropTarget").destroy();
                n.groupContainer.data("kendoDraggable") &&
                  n.groupContainer.data("kendoDraggable").destroy();
                n.options.draggable || n.draggable.destroy();
                n.dataSource &&
                  n._refreshHandler &&
                  (n.dataSource.unbind("change", n._refreshHandler),
                  (n._refreshHandler = null));
                n.groupContainer = n.element = n.draggable = null;
              },
              events: ["change"],
              options: {
                name: "Groupable",
                filter: "th",
                draggableElements: "th",
                messages: {
                  empty:
                    "Drag a column header and drop it here to group by that column",
                },
                sort: { dir: s, compare: null },
              },
              indicator: function (t) {
                var r = n(".k-group-indicator", this.groupContainer);
                return n.grep(r, function (r) {
                  return n(r).attr(i.attr("field")) === t;
                })[0];
              },
              buildIndicator: function (n, t, r) {
                var u = this;
                return g({
                  ns: i.ns,
                  field: n.replace(/"/g, "'"),
                  title: t,
                  dir: r || (u.options.sort || {}).dir || s,
                });
              },
              _setIndicatorSortOptions: function (t, i) {
                var r = n(this.indicator(t));
                r.data(c, i);
              },
              aggregates: function () {
                var r,
                  t,
                  u,
                  f = this;
                return f.element
                  .find(f.options.filter)
                  .map(function () {
                    var e = n(this),
                      f = e.attr(i.attr("aggregates")),
                      o = e.attr(i.attr("field"));
                    if (f && "" !== f)
                      for (
                        r = f.split(","), f = [], t = 0, u = r.length;
                        t < u;
                        t++
                      )
                        f.push({ field: o, aggregate: r[t] });
                    return f;
                  })
                  .toArray();
              },
              descriptors: function () {
                var r,
                  t = this,
                  u = n(".k-group-indicator", t.groupContainer),
                  f = t.aggregates();
                return n.map(u, function (u) {
                  var e, o;
                  return (
                    (u = n(u)),
                    (r = u.attr(i.attr("field"))),
                    (e = t.options.sort || {}),
                    (o = u.data(c) || {}),
                    {
                      field: r,
                      dir: u.attr(i.attr("dir")),
                      aggregates: f || [],
                      compare: o.compare || e.compare,
                    }
                  );
                });
              },
              _removeIndicator: function (n) {
                var t = this;
                n.off();
                n.removeData();
                n.remove();
                t._invalidateGroupContainer();
                t._change();
              },
              _change: function () {
                var i,
                  n = this;
                if (n.dataSource) {
                  if (
                    ((i = n.descriptors()), n.trigger("change", { groups: i }))
                  )
                    return n.refresh(), t;
                  n.dataSource.group(i);
                }
              },
              _dropCuePosition: function (t) {
                var i,
                  h,
                  c,
                  o,
                  s,
                  f = this._dropCuePositions;
                if (u.is(":visible") && 0 !== f.length)
                  return (
                    (t = Math.ceil(t)),
                    (i = f[f.length - 1]),
                    (h = i.left),
                    (c = i.right),
                    (o = parseInt(i.element.css("marginLeft"), 10)),
                    (s = parseInt(i.element.css("marginRight"), 10)),
                    (t >= c && !r) || (t < h && r)
                      ? (t = {
                          left:
                            i.element.position().left +
                            (r ? -o : e(i.element) + s),
                          element: i.element,
                          before: !1,
                        })
                      : ((t = n.grep(f, function (n) {
                          return (
                            (n.left <= t && t <= n.right) || (r && t > n.right)
                          );
                        })[0]),
                        t &&
                          (t = {
                            left: r
                              ? t.element.position().left + e(t.element) + s
                              : t.element.position().left - o,
                            element: t.element,
                            before: !0,
                          })),
                    t
                  );
              },
              _drag: function (n) {
                var t = this._dropCuePosition(n.x.location);
                t && u.css({ left: t.left, right: "auto" });
              },
              _canDrag: function (n) {
                var t = n.attr(i.attr("field"));
                return (
                  "false" != n.attr(i.attr("groupable")) &&
                  t &&
                  (n.hasClass("k-group-indicator") || !this.indicator(t))
                );
              },
              _canDrop: function (n, t, i) {
                var u = n.next();
                return (
                  n[0] !== t[0] &&
                  (!u[0] ||
                    t[0] !== u[0] ||
                    (!r && i > u.position().left) ||
                    (r && i < u.position().left))
                );
              },
              _dragEnd: function (t) {
                var r = this,
                  f = t.currentTarget.attr(i.attr("field")),
                  u = r.indicator(f);
                t !== r.options.draggable &&
                  !t.dropped &&
                  u &&
                  r._removeIndicator(n(u));
                r._dragCancel();
              },
              _dragCancel: function () {
                u.remove();
                this._dropCuePositions = [];
              },
              _intializePositions: function () {
                var t,
                  r = this,
                  u = n(".k-group-indicator", r.groupContainer);
                r._dropCuePositions = n.map(u, function (r) {
                  return (
                    (r = n(r)),
                    (t = i.getOffset(r).left),
                    {
                      left: parseInt(t, 10),
                      right: parseInt(t + e(r), 10),
                      element: r,
                    }
                  );
                });
              },
              _invalidateGroupContainer: function () {
                var n = this.groupContainer;
                n && n.is(":empty") && n.html(this.options.messages.empty);
              },
            });
          i.ui.plugin(nt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.reorderable.min", ["kendo.core.min", "kendo.draganddrop.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function u(t, i) {
            t = n(t);
            i
              ? t
                  .find(".k-drag-status")
                  .removeClass("k-i-plus")
                  .addClass("k-i-cancel")
              : t
                  .find(".k-drag-status")
                  .removeClass("k-i-cancel")
                  .addClass("k-i-plus");
          }
          var t = window.kendo,
            f = t._outerWidth,
            o = t._outerHeight,
            i = t.getOffset,
            r = t.ui.Widget,
            e = "change",
            s = "k-reorderable",
            h = r.extend({
              init: function (h, c) {
                var a,
                  l = this,
                  v = t.guid() + "-reorderable";
                r.fn.init.call(l, h, c);
                h = l.element.addClass(s);
                c = l.options;
                l.draggable = a =
                  c.draggable ||
                  new t.ui.Draggable(h, {
                    group: v,
                    autoScroll: !0,
                    filter: c.filter,
                    hint: c.hint,
                  });
                l.reorderDropCue = n('<div class="k-reorder-cue"></div></div>');
                h.find(a.options.filter).kendoDropTarget({
                  group: a.options.group,
                  dragenter: function (n) {
                    var t, r, e, s;
                    l._draggable &&
                      ((t = this.element),
                      (e = !l._dropTargetAllowed(t) || l._isLastDraggable()),
                      u(n.draggable.hint, e),
                      e ||
                        ((r = i(t)),
                        (s = r.left),
                        c.inSameContainer &&
                        !c.inSameContainer({
                          source: t,
                          target: l._draggable,
                          sourceIndex: l._index(t),
                          targetIndex: l._index(l._draggable),
                        })
                          ? (l._dropTarget = t)
                          : l._index(t) > l._index(l._draggable) && (s += f(t)),
                        l.reorderDropCue
                          .css({ height: o(t), top: r.top, left: s })
                          .appendTo(document.body)));
                  },
                  dragleave: function (n) {
                    u(n.draggable.hint, !0);
                    l.reorderDropCue.remove();
                    l._dropTarget = null;
                  },
                  drop: function () {
                    var n, t;
                    l._dropTarget = null;
                    l._draggable &&
                      ((n = this.element),
                      (t = l._draggable),
                      l._dropTargetAllowed(n) &&
                        !l._isLastDraggable() &&
                        l.trigger(e, {
                          element: l._draggable,
                          target: n,
                          oldIndex: l._index(t),
                          newIndex: l._index(n),
                          position:
                            i(l.reorderDropCue).left > i(n).left
                              ? "after"
                              : "before",
                        }));
                  },
                });
                a.bind(["dragcancel", "dragend", "dragstart", "drag"], {
                  dragcancel: function () {
                    l.reorderDropCue.remove();
                    l._draggable = null;
                    l._elements = null;
                  },
                  dragend: function () {
                    l.reorderDropCue.remove();
                    l._draggable = null;
                    l._elements = null;
                  },
                  dragstart: function (n) {
                    l._draggable = n.currentTarget;
                    l._elements = l.element.find(l.draggable.options.filter);
                  },
                  drag: function (n) {
                    var t, r;
                    l._dropTarget &&
                      !this.hint
                        .find(".k-drag-status")
                        .hasClass("k-i-cancel") &&
                      ((t = i(l._dropTarget).left),
                      (r = f(l._dropTarget)),
                      l.reorderDropCue.css(
                        n.pageX > t + r / 2 ? { left: t + r } : { left: t }
                      ));
                  },
                });
              },
              options: { name: "Reorderable", filter: "*" },
              events: [e],
              _isLastDraggable: function () {
                var n,
                  r = this.options.inSameContainer,
                  t = this._draggable[0],
                  u = this._elements.get(),
                  i = !1;
                if (!r) return !1;
                for (; !i && u.length > 0; )
                  (n = u.pop()),
                    (i =
                      t !== n &&
                      r({
                        source: t,
                        target: n,
                        sourceIndex: this._index(t),
                        targetIndex: this._index(n),
                      }));
                return !i;
              },
              _dropTargetAllowed: function (n) {
                var i = this.options.inSameContainer,
                  r = this.options.dragOverContainers,
                  t = this._draggable;
                return (
                  t[0] !== n[0] &&
                  (!i ||
                    !r ||
                    !!i({
                      source: t,
                      target: n,
                      sourceIndex: this._index(t),
                      targetIndex: this._index(n),
                    }) ||
                    r(this._index(t), this._index(n)))
                );
              },
              _index: function (n) {
                return this._elements.index(n);
              },
              destroy: function () {
                var t = this;
                r.fn.destroy.call(t);
                t.element.find(t.draggable.options.filter).each(function () {
                  var t = n(this);
                  t.data("kendoDropTarget") &&
                    t.data("kendoDropTarget").destroy();
                });
                t.draggable &&
                  (t.draggable.destroy(),
                  (t.draggable.element = t.draggable = null));
                t.elements =
                  t.reorderDropCue =
                  t._elements =
                  t._draggable =
                    null;
              },
            });
          t.ui.plugin(h);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.resizable.min", ["kendo.core.min", "kendo.draganddrop.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var u = window.kendo,
            o = u.ui,
            f = o.Widget,
            r = n.proxy,
            e = u.isFunction,
            s = n.extend,
            i = "horizontal",
            h = "vertical",
            c = "start",
            l = "resize",
            a = "resizeend",
            v = f.extend({
              init: function (n, t) {
                var u = this;
                f.fn.init.call(u, n, t);
                u.orientation =
                  u.options.orientation.toLowerCase() != h ? i : h;
                u._positionMouse = u.orientation == i ? "x" : "y";
                u._position = u.orientation == i ? "left" : "top";
                u._sizingDom =
                  u.orientation == i ? "outerWidth" : "outerHeight";
                u.draggable = new o.Draggable(t.draggableElement || n, {
                  distance: 1,
                  filter: t.handle,
                  drag: r(u._resize, u),
                  dragcancel: r(u._cancel, u),
                  dragstart: r(u._start, u),
                  dragend: r(u._stop, u),
                });
                u.userEvents = u.draggable.userEvents;
              },
              events: [l, a, c],
              options: { name: "Resizable", orientation: i },
              resize: function () {},
              _max: function (n) {
                var i = this,
                  u = i.hint ? i.hint[i._sizingDom]() : 0,
                  r = i.options.max;
                return e(r)
                  ? r(n)
                  : r !== t
                  ? i._initialElementPosition + r - u
                  : r;
              },
              _min: function (n) {
                var r = this,
                  i = r.options.min;
                return e(i)
                  ? i(n)
                  : i !== t
                  ? r._initialElementPosition + i
                  : i;
              },
              _start: function (t) {
                var i = this,
                  r = i.options.hint,
                  u = n(t.currentTarget);
                i._initialElementPosition = u.position()[i._position];
                i._initialMousePosition = t[i._positionMouse].startLocation;
                r &&
                  ((i.hint = e(r) ? n(r(u)) : r),
                  i.hint
                    .css({ position: "absolute" })
                    .css(i._position, i._initialElementPosition)
                    .appendTo(i.element));
                i.trigger(c, t);
                i._maxPosition = i._max(t);
                i._minPosition = i._min(t);
                n(document.body).css("cursor", u.css("cursor"));
              },
              _resize: function (n) {
                var r,
                  i = this,
                  u = i._maxPosition,
                  f = i._minPosition,
                  e =
                    i._initialElementPosition +
                    (n[i._positionMouse].location - i._initialMousePosition);
                r = f !== t ? Math.max(f, e) : e;
                i.position = r = u !== t ? Math.min(u, r) : r;
                i.hint &&
                  i.hint
                    .toggleClass(i.options.invalidClass || "", r == u || r == f)
                    .css(i._position, r);
                i.resizing = !0;
                i.trigger(l, s(n, { position: r }));
              },
              _stop: function (t) {
                var i = this;
                i.hint && i.hint.remove();
                i.resizing = !1;
                i.trigger(a, s(t, { position: i.position }));
                n(document.body).css("cursor", "");
              },
              _cancel: function (n) {
                var i = this;
                i.hint &&
                  ((i.position = t),
                  i.hint.css(i._position, i._initialElementPosition),
                  i._stop(n));
              },
              destroy: function () {
                var n = this;
                f.fn.destroy.call(n);
                n.draggable && n.draggable.destroy();
              },
              press: function (n) {
                if (n) {
                  var t = n.position(),
                    i = this;
                  i.userEvents.press(t.left, t.top, n[0]);
                  i.targetPosition = t;
                  i.target = n;
                }
              },
              move: function (n) {
                var i = this,
                  f = i._position,
                  r = i.targetPosition,
                  u = i.position;
                u === t && (u = r[f]);
                r[f] = u + n;
                i.userEvents.move(r.left, r.top);
              },
              end: function () {
                this.userEvents.end();
                this.target = this.position = t;
              },
            });
          u.ui.plugin(v);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.sortable.min", ["kendo.draganddrop.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function w(t, i) {
            try {
              return n.contains(t, i) || t == i;
            } catch (r) {
              return !1;
            }
          }
          function b(n) {
            return n.clone();
          }
          function k(n) {
            return n.clone().removeAttr("id").css("visibility", "hidden");
          }
          var i = window.kendo,
            u = i.ui.Widget,
            o = i._outerWidth,
            s = i._outerHeight,
            h = "start",
            c = "beforeMove",
            l = "move",
            r = "end",
            f = "change",
            a = "cancel",
            v = "sort",
            y = "remove",
            p = "receive",
            e = -1,
            d = u.extend({
              init: function (n, t) {
                var i = this;
                u.fn.init.call(i, n, t);
                i.options.placeholder || (i.options.placeholder = k);
                i.options.hint || (i.options.hint = b);
                i.draggable = i._createDraggable();
              },
              events: [h, c, l, r, f, a],
              options: {
                name: "Sortable",
                hint: null,
                placeholder: null,
                filter: ">*",
                holdToDrag: !1,
                disabled: null,
                container: null,
                connectWith: null,
                handler: null,
                cursorOffset: null,
                axis: null,
                ignore: null,
                autoScroll: !1,
                cursor: "auto",
                moveOnDragEnter: !1,
              },
              destroy: function () {
                this.draggable.destroy();
                u.fn.destroy.call(this);
              },
              _createDraggable: function () {
                var r = this,
                  u = r.element,
                  t = r.options;
                return new i.ui.Draggable(u, {
                  filter: t.filter,
                  hint: i.isFunction(t.hint) ? t.hint : n(t.hint),
                  holdToDrag: t.holdToDrag,
                  container: t.container ? n(t.container) : null,
                  cursorOffset: t.cursorOffset,
                  axis: t.axis,
                  ignore: t.ignore,
                  autoScroll: t.autoScroll,
                  dragstart: n.proxy(r._dragstart, r),
                  dragcancel: n.proxy(r._dragcancel, r),
                  drag: n.proxy(r._drag, r),
                  dragend: n.proxy(r._dragend, r),
                });
              },
              _dragstart: function (t) {
                var r = (this.draggedElement = t.currentTarget),
                  f = this.options.disabled,
                  e = this.options.handler,
                  u = this.options.placeholder,
                  o = (this.placeholder = n(
                    i.isFunction(u) ? u.call(this, r) : u
                  ));
                f && r.is(f)
                  ? t.preventDefault()
                  : e && !n(t.initialTarget).is(e)
                  ? t.preventDefault()
                  : this.trigger(h, { item: r, draggableEvent: t })
                  ? t.preventDefault()
                  : (r.css("display", "none"), r.before(o), this._setCursor());
              },
              _dragcancel: function () {
                this._cancel();
                this.trigger(a, { item: this.draggedElement });
                this._resetCursor();
              },
              _drag: function (i) {
                var l,
                  o,
                  f,
                  e,
                  a,
                  y = this.draggedElement,
                  r = this._findTarget(i),
                  v = { left: i.x.location, top: i.y.location },
                  s = { x: i.x.delta, y: i.y.delta },
                  c = this.options.axis,
                  u = this.options.moveOnDragEnter,
                  h = { item: y, list: this, draggableEvent: i };
                if ("x" === c || "y" === c)
                  return this._movementByAxis(c, v, s[c], h), t;
                if (r) {
                  if (
                    ((l = this._getElementCenter(r.element)),
                    (o = {
                      left: Math.round(v.left - l.left),
                      top: Math.round(v.top - l.top),
                    }),
                    n.extend(h, { target: r.element }),
                    r.appendToBottom)
                  )
                    return this._movePlaceholder(r, null, h), t;
                  if (
                    (r.appendAfterHidden && this._movePlaceholder(r, "next", h),
                    this._isFloating(r.element)
                      ? (s.x < 0 && u) || (!u && o.left < 0)
                        ? (f = "prev")
                        : ((s.x > 0 && u) || (!u && o.left > 0)) && (f = "next")
                      : (s.y < 0 && u) || (!u && o.top < 0)
                      ? (f = "prev")
                      : ((s.y > 0 && u) || (!u && o.top > 0)) && (f = "next"),
                    f)
                  ) {
                    for (
                      a = "prev" === f ? jQuery.fn.prev : jQuery.fn.next,
                        e = a.call(r.element);
                      e.length && !e.is(":visible");

                    )
                      e = a.call(e);
                    e[0] != this.placeholder[0] &&
                      this._movePlaceholder(r, f, h);
                  }
                }
              },
              _dragend: function (i) {
                var s,
                  l,
                  u,
                  h,
                  c = this.placeholder,
                  o = this.draggedElement,
                  a = this.indexOf(o),
                  w = this.indexOf(c),
                  b = this.options.connectWith;
                return (
                  this._resetCursor(),
                  (u = {
                    action: v,
                    item: o,
                    oldIndex: a,
                    newIndex: w,
                    draggableEvent: i,
                  }),
                  w >= 0
                    ? (l = this.trigger(r, u))
                    : ((s = c.parents(b).getKendoSortable()),
                      (u.action = y),
                      (h = n.extend({}, u, {
                        action: p,
                        oldIndex: e,
                        newIndex: s.indexOf(c),
                      })),
                      (l = !(!this.trigger(r, u) && !s.trigger(r, h)))),
                  l || w === a
                    ? (this._cancel(), t)
                    : (c.replaceWith(o),
                      o.show(),
                      (this.draggable.dropped = !0),
                      (u = {
                        action: this.indexOf(o) != e ? v : y,
                        item: o,
                        oldIndex: a,
                        newIndex: this.indexOf(o),
                        draggableEvent: i,
                      }),
                      this.trigger(f, u),
                      s &&
                        ((h = n.extend({}, u, {
                          action: p,
                          oldIndex: e,
                          newIndex: s.indexOf(o),
                        })),
                        s.trigger(f, h)),
                      t)
                );
              },
              _findTarget: function (i) {
                var f,
                  u,
                  r = this._findElementUnderCursor(i),
                  e = this.options.connectWith;
                return n.contains(this.element[0], r)
                  ? ((f = this.items()),
                    (u = f.filter(r)[0] || f.has(r)[0]),
                    u ? { element: n(u), sortable: this } : null)
                  : this.element[0] == r && this._isEmpty()
                  ? {
                      element: this.element,
                      sortable: this,
                      appendToBottom: !0,
                    }
                  : this.element[0] == r && this._isLastHidden()
                  ? ((u = this.items().eq(0)),
                    { element: u, sortable: this, appendAfterHidden: !0 })
                  : e
                  ? this._searchConnectedTargets(r, i)
                  : t;
              },
              _findElementUnderCursor: function (n) {
                var t = i.elementUnderCursor(n),
                  r = n.sender;
                return (
                  w(r.hint[0], t) &&
                    (r.hint.hide(),
                    (t = i.elementUnderCursor(n)),
                    t || (t = i.elementUnderCursor(n)),
                    r.hint.show()),
                  t
                );
              },
              _searchConnectedTargets: function (t, i) {
                for (
                  var r, o, f, e = n(this.options.connectWith), u = 0;
                  u < e.length;
                  u++
                )
                  if (((r = e.eq(u).getKendoSortable()), n.contains(e[u], t))) {
                    if (r)
                      return (
                        (o = r.items()),
                        (f = o.filter(t)[0] || o.has(t)[0]),
                        f
                          ? ((r.placeholder = this.placeholder),
                            { element: n(f), sortable: r })
                          : null
                      );
                  } else if (e[u] == t) {
                    if (r && r._isEmpty())
                      return {
                        element: e.eq(u),
                        sortable: r,
                        appendToBottom: !0,
                      };
                    if (this._isCursorAfterLast(r, i))
                      return (
                        (f = r.items().last()), { element: f, sortable: r }
                      );
                  }
              },
              _isCursorAfterLast: function (n, t) {
                var r,
                  f,
                  u = n.items().last(),
                  e = { left: t.x.location, top: t.y.location };
                return (
                  (r = i.getOffset(u)),
                  (r.top += s(u)),
                  (r.left += o(u)),
                  (f = this._isFloating(u) ? r.left - e.left : r.top - e.top),
                  f < 0
                );
              },
              _movementByAxis: function (t, i, r, u) {
                var e,
                  o = "x" === t ? i.left : i.top,
                  f = r < 0 ? this.placeholder.prev() : this.placeholder.next(),
                  s = this.items();
                f.length &&
                  !f.is(":visible") &&
                  (f = r < 0 ? f.prev() : f.next());
                s.filter(f).length &&
                  (n.extend(u, { target: f }),
                  (e = this._getElementCenter(f)),
                  e && (e = "x" === t ? e.left : e.top),
                  f.length && r < 0 && o - e < 0
                    ? this._movePlaceholder(
                        { element: f, sortable: this },
                        "prev",
                        u
                      )
                    : f.length &&
                      r > 0 &&
                      o - e > 0 &&
                      this._movePlaceholder(
                        { element: f, sortable: this },
                        "next",
                        u
                      ));
              },
              _movePlaceholder: function (n, t, i) {
                var r = this.placeholder;
                n.sortable.trigger(c, i) ||
                  (t
                    ? "prev" === t
                      ? n.element.before(r)
                      : "next" === t && n.element.after(r)
                    : n.element.append(r),
                  n.sortable.trigger(l, i));
              },
              _setCursor: function () {
                var t,
                  i = this.options.cursor;
                i &&
                  "auto" !== i &&
                  ((t = n(document.body)),
                  (this._originalCursorType = t.css("cursor")),
                  t.css({ cursor: i }),
                  this._cursorStylesheet ||
                    (this._cursorStylesheet = n(
                      "<style>* { cursor: " + i + " !important; }</style>"
                    )),
                  this._cursorStylesheet.appendTo(t));
              },
              _resetCursor: function () {
                this._originalCursorType &&
                  (n(document.body).css("cursor", this._originalCursorType),
                  (this._originalCursorType = null),
                  this._cursorStylesheet.remove());
              },
              _getElementCenter: function (n) {
                var t = n.length ? i.getOffset(n) : null;
                return t && ((t.top += s(n) / 2), (t.left += o(n) / 2)), t;
              },
              _isFloating: function (n) {
                var t = /left|right/.test(n.css("float")),
                  i = /inline|table-cell/.test(n.css("display")),
                  r =
                    /flex/.test(n.parent().css("display")) &&
                    (/row|row-reverse/.test(n.parent().css("flex-direction")) ||
                      !n.parent().css("flex-direction"));
                return t || i || r;
              },
              _cancel: function () {
                this.draggedElement.show();
                this.placeholder.remove();
              },
              _items: function () {
                var n = this.options.filter;
                return n ? this.element.find(n) : this.element.children();
              },
              indexOf: function (n) {
                var i = this._items(),
                  t = this.placeholder,
                  r = this.draggedElement;
                return t && n[0] == t[0]
                  ? i.not(r).index(n)
                  : i.not(t).index(n);
              },
              items: function () {
                var t = this.placeholder,
                  n = this._items();
                return t && (n = n.not(t)), n;
              },
              _isEmpty: function () {
                return !this.items().length;
              },
              _isLastHidden: function () {
                return 1 === this.items().length && this.items().is(":hidden");
              },
            });
          i.ui.plugin(d);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.selectable.min", ["kendo.core.min", "kendo.userevents.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function w(n, t) {
            if (!n.is(":visible")) return !1;
            var i = r.getOffset(n),
              u = t.left + t.width,
              f = t.top + t.height;
            return (
              (i.right = i.left + r._outerWidth(n)),
              (i.bottom = i.top + r._outerHeight(n)),
              !(i.left > u || i.right < t.left || i.top > f || i.bottom < t.top)
            );
          }
          var h,
            r = window.kendo,
            c = r.ui.Widget,
            f = n.proxy,
            l = Math.abs,
            a = "aria-selected",
            i = "k-state-selected",
            e = "k-state-selecting",
            o = "k-selectable",
            s = "change",
            b = ".kendoSelectable",
            v = "unselect",
            u = "k-state-unselecting",
            y = r.support.browser.msie,
            p = !1;
          !(function (n) {
            !(function () {
              n('<div class="parent"><span /></div>')
                .on("click", ">*", function () {
                  p = !0;
                })
                .find("span")
                .trigger("click")
                .end()
                .off();
            })();
          })(n);
          h = c.extend({
            init: function (t, i) {
              var e,
                u = this;
              c.fn.init.call(u, t, i);
              u._marquee = n(
                "<div class='k-marquee'><div class='k-marquee-color'></div></div>"
              );
              u._lastActive = null;
              u.element.addClass(o);
              u.relatedTarget = u.options.relatedTarget;
              e = u.options.multiple;
              this.options.aria &&
                e &&
                u.element.attr("aria-multiselectable", !0);
              u.userEvents = new r.UserEvents(u.element, {
                global: !0,
                allowSelection: !0,
                filter: (p ? "" : "." + o + " ") + u.options.filter,
                tap: f(u._tap, u),
                touchAction: e ? "none" : "pan-x pan-y",
              });
              e &&
                u.userEvents
                  .bind("start", f(u._start, u))
                  .bind("move", f(u._move, u))
                  .bind("end", f(u._end, u))
                  .bind("select", f(u._select, u));
            },
            events: [s, v],
            options: {
              name: "Selectable",
              filter: ">*",
              inputSelectors:
                "input,a,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up,label.k-checkbox-label.k-no-text,.k-icon.k-i-collapse,.k-icon.k-i-expand,span.k-numeric-wrap",
              multiple: !1,
              relatedTarget: n.noop,
            },
            _isElement: function (n) {
              var t,
                i = this.element,
                u = i.length,
                r = !1;
              for (n = n[0], t = 0; t < u; t++)
                if (i[t] === n) {
                  r = !0;
                  break;
                }
              return r;
            },
            _tap: function (t) {
              var f,
                u = n(t.target),
                r = this,
                e = t.event.ctrlKey || t.event.metaKey,
                h = r.options.multiple,
                a = h && t.event.shiftKey,
                c = t.event.which,
                l = t.event.button;
              !r._isElement(u.closest("." + o)) ||
                (c && 3 == c) ||
                (l && 2 == l) ||
                (this._allowSelection(t.event.target) &&
                  ((f = u.hasClass(i)),
                  (h && e) || r.clear(),
                  (u = u.add(r.relatedTarget(u))),
                  a
                    ? r.selectRange(r._firstSelectee(), u, t)
                    : (f && e
                        ? (r._unselect(u), r._notify(s, t))
                        : r.value(u, t),
                      (r._lastActive = r._downTarget = u))));
            },
            _start: function (r) {
              var s,
                f = this,
                e = n(r.target),
                c = e.hasClass(i),
                h = r.event.ctrlKey || r.event.metaKey;
              if (this._allowSelection(r.event.target)) {
                if (((f._downTarget = e), !f._isElement(e.closest("." + o))))
                  return f.userEvents.cancel(), t;
                f.options.useAllItems
                  ? (f._items = f.element.find(f.options.filter))
                  : ((s = e.closest(f.element)),
                    (f._items = s.find(f.options.filter)));
                r.sender.capture();
                f._marquee
                  .appendTo(document.body)
                  .css({
                    left: r.x.client + 1,
                    top: r.y.client + 1,
                    width: 0,
                    height: 0,
                  });
                h || f.clear();
                e = e.add(f.relatedTarget(e));
                c && (f._selectElement(e, !0), h && e.addClass(u));
              }
            },
            _move: function (n) {
              var t = this,
                i = {
                  left:
                    n.x.startLocation > n.x.location
                      ? n.x.location
                      : n.x.startLocation,
                  top:
                    n.y.startLocation > n.y.location
                      ? n.y.location
                      : n.y.startLocation,
                  width: l(n.x.initialDelta),
                  height: l(n.y.initialDelta),
                };
              t._marquee.css(i);
              t._invalidateSelectables(i, n.event.ctrlKey || n.event.metaKey);
              n.preventDefault();
            },
            _end: function (n) {
              var i,
                t = this;
              t._marquee.remove();
              t._unselect(
                t.element.find(t.options.filter + "." + u)
              ).removeClass(u);
              i = t.element.find(t.options.filter + "." + e);
              i = i.add(t.relatedTarget(i));
              t.value(i, n);
              t._lastActive = t._downTarget;
              t._items = null;
            },
            _invalidateSelectables: function (n, t) {
              for (
                var f,
                  r,
                  c = this._downTarget[0],
                  h = this._items,
                  o = 0,
                  s = h.length;
                o < s;
                o++
              )
                (r = h.eq(o)),
                  (f = r.add(this.relatedTarget(r))),
                  w(r, n)
                    ? r.hasClass(i)
                      ? t && c !== r[0] && f.removeClass(i).addClass(u)
                      : r.hasClass(e) || r.hasClass(u) || f.addClass(e)
                    : r.hasClass(e)
                    ? f.removeClass(e)
                    : t && r.hasClass(u) && f.removeClass(u).addClass(i);
            },
            value: function (n, r) {
              var u = this,
                e = f(u._selectElement, u);
              return n
                ? (n.each(function () {
                    e(this);
                  }),
                  u._notify(s, r),
                  t)
                : u.element.find(u.options.filter + "." + i);
            },
            _firstSelectee: function () {
              var t,
                n = this;
              return null !== n._lastActive
                ? n._lastActive
                : ((t = n.value()),
                  t.length > 0 ? t[0] : n.element.find(n.options.filter)[0]);
            },
            _selectElement: function (t, r) {
              var u = n(t),
                f = !r && this._notify("select", { element: t });
              u.removeClass(e);
              f || (u.addClass(i), this.options.aria && u.attr(a, !0));
            },
            _notify: function (n, t) {
              return (t = t || {}), this.trigger(n, t);
            },
            _unselect: function (n) {
              if (!this.trigger(v, { element: n }))
                return n.removeClass(i), this.options.aria && n.attr(a, !1), n;
            },
            _select: function (t) {
              this._allowSelection(t.event.target) &&
                (!y ||
                  (y &&
                    !n(r._activeElement()).is(this.options.inputSelectors))) &&
                t.preventDefault();
            },
            _allowSelection: function (t) {
              return (
                !n(t).is(this.options.inputSelectors) ||
                (this.userEvents.cancel(), (this._downTarget = null), !1)
              );
            },
            resetTouchEvents: function () {
              this.userEvents.cancel();
            },
            clear: function () {
              var n = this.element.find(this.options.filter + "." + i);
              this._unselect(n);
            },
            selectRange: function (t, i, r) {
              var e,
                o,
                f,
                u = this;
              for (
                u.clear(),
                  u.element.length > 1 && (f = u.options.continuousItems()),
                  (f && f.length) || (f = u.element.find(u.options.filter)),
                  t = n.inArray(n(t)[0], f),
                  i = n.inArray(n(i)[0], f),
                  t > i && ((o = t), (t = i), (i = o)),
                  u.options.useAllItems || (i += u.element.length - 1),
                  e = t;
                e <= i;
                e++
              )
                u._selectElement(f[e]);
              u._notify(s, r);
            },
            destroy: function () {
              var n = this;
              c.fn.destroy.call(n);
              n.element.off(b);
              n.userEvents.destroy();
              n._marquee = n._lastActive = n.element = n.userEvents = null;
            },
          });
          h.parseOptions = function (n) {
            var t = "string" == typeof n && n.toLowerCase();
            return {
              multiple: t && t.indexOf("multiple") > -1,
              cell: t && t.indexOf("cell") > -1,
            };
          };
          r.ui.plugin(h);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("chat/messageBox.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var r = window.kendo,
            f = r.ui.Widget,
            e = n.extend,
            i = n.proxy,
            o = ".",
            t = ".kendoChat",
            s = r.keys,
            h =
              '<svg version="1.1" ixmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" xml:space="preserve"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg>',
            c =
              '<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"><g>   <path d="M128,240c0-26.4-21.6-48-48-48s-48,21.6-48,48s21.6,48,48,48S128,266.4,128,240z"/>   <path d="M192,240c0,26.4,21.6,48,48,48c26.4,0,48-21.6,48-48s-21.6-48-48-48C213.6,192,192,213.6,192,240z"/>   <path d="M352,240c0,26.4,21.6,48,48,48c26.4,0,48-21.6,48-48s-21.6-48-48-48C373.6,192,352,213.6,352,240z"/></g></svg>',
            u = f.extend({
              init: function (n, t) {
                f.fn.init.call(this, n, t);
                this._wrapper();
                this._attachEvents();
                this._typing = !1;
              },
              events: [],
              options: { messages: { placeholder: "Type a message..." } },
              destroy: function () {
                f.fn.destroy.call(this);
                this.input &&
                  (this.input.off(t), this.input.remove(), (this.input = null));
                this.element.off(t);
                this.element.empty();
              },
              _wrapper: function () {
                var t = u.styles,
                  i = this.options,
                  f = i.messages,
                  e = "inputId_" + r.guid();
                n("<label>")
                  .addClass(t.hidden)
                  .html(f.placeholder)
                  .attr("for", e)
                  .appendTo(this.element);
                this.input = n("<input type='text'>")
                  .addClass(t.input)
                  .attr("id", e)
                  .attr("placeholder", f.placeholder)
                  .appendTo(this.element);
                i.toolbar &&
                  i.toolbar.toggleable &&
                  i.toolbar.buttons &&
                  n("<button>")
                    .addClass(t.button)
                    .addClass(t.buttonFlat)
                    .addClass(t.buttonIcon)
                    .addClass(t.buttonToggle)
                    .attr("type", "button")
                    .append(n(c))
                    .appendTo(this.element);
                n("<button>")
                  .addClass(t.button)
                  .addClass(t.buttonFlat)
                  .addClass(t.buttonIcon)
                  .addClass(t.buttonSend)
                  .append(n(h))
                  .appendTo(this.element);
              },
              _attachEvents: function () {
                var n = u.styles;
                this.input
                  .on("keydown" + t, i(this._keydown, this))
                  .on("input" + t, i(this._input, this))
                  .on("focusout" + t, i(this._inputFocusout, this));
                this.element.on(
                  "click" + t,
                  o + n.buttonSend,
                  i(this._buttonClick, this)
                );
                this.element.on(
                  "click" + t,
                  o + n.buttonToggle,
                  i(this._toggleToolbar, this)
                );
              },
              _input: function () {
                var n = this.input.val(),
                  t = n.length > 0;
                this._triggerTyping(t);
              },
              _keydown: function (n) {
                var t = n.keyCode;
                switch (t) {
                  case s.ENTER:
                    n.preventDefault();
                    this._sendMessage();
                }
              },
              _buttonClick: function (n) {
                n.preventDefault();
                this._sendMessage();
              },
              _sendMessage: function () {
                var n,
                  t = this.input.val();
                t.length &&
                  (this._triggerTyping(!1),
                  (n = { text: t }),
                  this.trigger("sendMessage", n),
                  this.input.val(""));
              },
              _inputFocusout: function () {
                this._triggerTyping(!1);
              },
              _triggerTyping: function (n) {
                n
                  ? this._typing ||
                    (this.trigger("typingStart", {}), (this._typing = !0))
                  : this._typing &&
                    (this.trigger("typingEnd", {}), (this._typing = !1));
              },
              _toggleToolbar: function (n) {
                this.trigger("toggleToolbar", { originalEvent: n });
              },
            });
          e(!0, u, {
            styles: {
              input: "k-input",
              button: "k-button",
              buttonFlat: "k-flat",
              buttonIcon: "k-button-icon",
              buttonSend: "k-button-send",
              buttonToggle: "k-button-toggle",
              iconAdd: "k-icon k-i-add",
              hidden: "k-hidden",
            },
          });
          e(r, { chat: { ChatMessageBox: u } });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("chat/toolbar.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var c = window.kendo,
            e = c.ui.Widget,
            i = n.extend,
            u = n.proxy,
            o = ".",
            s = ".kendoChat",
            f = "kButtonName",
            h = "chatToolbarScrollLeft",
            l = "chatToolbarScrollRight",
            y = ":visible",
            a = { effects: "expand:vertical", duration: 200 },
            v = { expand: { show: !0 }, collapse: { hide: !0 } },
            r = e.extend({
              init: function (n, t) {
                var r, f;
                t = i({}, t, { name: "ChatToolbar" });
                r = t.toolbar;
                f = r.buttons && r.buttons.length;
                e.fn.init.call(this, n, t);
                f && this._createButtonList();
                f &&
                  r.scrollable &&
                  this.buttonsWidth() > this.element.width() &&
                  this._initScrolling();
                this._setupAnimation();
                r.toggleable && this.toggle(!0);
                this.element.on("click" + s, u(this._onClick, this));
              },
              events: ["click"],
              destroy: function () {
                e.fn.destroy.call(this);
                this.element.off(s);
                this.element.empty();
              },
              _createButtonList: function () {
                for (
                  var u,
                    f = this,
                    o = r.styles,
                    e = f.options.toolbar.buttons,
                    i = n("<div class='" + o.buttonList + "'></div>"),
                    t = 0;
                  t < e.length;
                  t++
                )
                  (u = f._createButton(e[t])), i.append(u);
                i.appendTo(this.element);
                this.buttonList = i;
              },
              _createButton: function (t) {
                var u = r.styles,
                  i = n("<button>");
                return (
                  "string" == typeof t && (t = { name: t }),
                  i
                    .attr(t.attr || {})
                    .attr("title", t.text)
                    .attr("type", "button")
                    .addClass(t.name)
                    .data(f, t.name)
                    .addClass(u.button),
                  t.iconClass &&
                    (i.addClass(u.buttonIcon),
                    i.prepend("<span class='" + t.iconClass + "'></span>")),
                  i
                );
              },
              _onClick: function (t) {
                var u = r.styles,
                  i = n(t.target).closest(o + u.button);
                i.is(o + u.scrollButton) &&
                  !this._scrolling &&
                  this._scroll(i.data(f));
                i.data(f) &&
                  this.trigger("click", {
                    button: i[0],
                    name: i.data(f),
                    originalEvent: t,
                  });
              },
              _initScrolling: function () {
                var n = r.styles;
                this.scrollButtonLeft = this._createButton({
                  name: h,
                  iconClass: n.scrollButtonLeftIcon,
                  attr: { class: n.scrollButton + " " + n.scrollButtonLeft },
                });
                this.scrollButtonRight = this._createButton({
                  name: l,
                  iconClass: n.scrollButtonRightIcon,
                  attr: { class: n.scrollButton + " " + n.scrollButtonRight },
                });
                this.element.prepend(this.scrollButtonLeft);
                this.element.append(this.scrollButtonRight);
                this._refreshScrollButtons();
                this.element.on(
                  "keydown" + s,
                  u(this._refreshScrollButtons, this)
                );
              },
              _scroll: function (n) {
                var i = this,
                  r = i.buttonWidth(),
                  u = this.maxScrollSize(),
                  f = n === h ? r * -1 : r,
                  e = this.currentScrollLeft(),
                  t = e + f;
                t = Math.min(Math.max(t, 0), u);
                (n !== h && n !== l) ||
                  (i.buttonList.scrollLeft(t), i._refreshScrollButtons(t));
              },
              _refreshScrollButtons: function (n) {
                var r = this.maxScrollSize(),
                  i =
                    n === t || isNaN(parseInt(n, 10))
                      ? this.currentScrollLeft()
                      : n;
                (this.scrollButtonLeft || this.scrollButtonRight) &&
                  (this.scrollButtonLeft.toggle(0 !== i),
                  this.scrollButtonRight.toggle(i !== r));
              },
              _setupAnimation: function () {
                var n = this.options.toolbar.animation,
                  t = i({}, a),
                  r = i({ reverse: !0, hide: !0 }, a);
                n =
                  n === !1
                    ? i(!0, {}, v)
                    : i(!0, { expand: t, collapse: r }, n);
                this.options.toolbar.animation = n;
              },
              _animationComplete: function () {
                this._refreshScrollButtons();
              },
              currentScrollLeft: function () {
                return Math.round(this.buttonList.scrollLeft());
              },
              maxScrollSize: function () {
                return Math.round(
                  this.buttonList[0].scrollWidth -
                    this.buttonList[0].clientWidth
                );
              },
              buttons: function () {
                var n = r.styles;
                return this.buttonList
                  ? this.buttonList.children(o + n.button)
                  : null;
              },
              buttonWidth: function () {
                return Math.round(this.buttons().last().outerWidth(!0));
              },
              buttonsWidth: function () {
                var n = 0;
                return (
                  this.buttons() &&
                    (n = this.buttonWidth() * this.buttons().length),
                  n
                );
              },
              toggle: function (n) {
                var t = this.options.toolbar.animation;
                n && (t = i(!0, {}, v));
                t.expand.complete = u(this._animationComplete, this);
                t.collapse.complete = u(this._animationComplete, this);
                this.element.is(y)
                  ? this.element.kendoStop().kendoAnimate(t.collapse)
                  : this.element.kendoStop().kendoAnimate(t.expand);
              },
            });
          i(!0, r, {
            styles: {
              button: "k-button",
              buttonFlat: "k-flat",
              buttonList: "k-button-list",
              scrollButton: "k-scroll-button",
              scrollButtonLeft: "k-scroll-button-left",
              scrollButtonRight: "k-scroll-button-right",
              scrollButtonLeftIcon: "k-icon k-i-arrow-chevron-left",
              scrollButtonRightIcon: "k-icon k-i-arrow-chevron-right",
              buttonIcon: "k-button-icon",
            },
          });
          i(c.chat, { ChatToolBar: r });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("chat/view.min", ["kendo.core.min", "kendo.draganddrop.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var o,
            a,
            u,
            r,
            t = window.kendo,
            s = t.ui.Widget,
            h = n.extend,
            e = n.proxy,
            i = ".",
            v = " ",
            f = ".kendoChat",
            p = t.template(
              '<div #:text# class="#=styles.messageGroup# #= url ? "" : styles.noAvatar #"><p class="#=styles.author#">#:text#</p># if (url) { #<img src="#=url#" alt="#:text#" class="#=styles.avatar#"># } #</div>'
            ),
            w = t.template(
              '<div me class="#=styles.messageGroup# #=styles.self# #= url ? "" : styles.noAvatar #"># if (url) { #<img src="#=url#" alt="#:text#" class="#=styles.avatar#"># } #</div>'
            ),
            c = t.template(
              '<div class="#=styles.message#"><time class="#=styles.messageTime#">#= kendo.toString(kendo.parseDate(timestamp), "HH:mm:ss") #</time><div class="#=styles.bubble#">#:text#</div></div>'
            ),
            l = t.template(
              '<div class="#=styles.messageListContent# #=styles.typingIndicatorBubble#"><p class="#=styles.author#">#:text#</p><div class="#=styles.message#"><div class="#=styles.bubble#"><div class="#=styles.typingIndicator#"><span></span><span></span><span></span></div></div></div></div>'
            ),
            b = t.template(
              '<div class="#=styles.suggestedActions#"># for (var i = 0; i < suggestedActions.length; i++) { #<span class="#=styles.suggestedAction#" data-value="#:suggestedActions[i].value#">#:suggestedActions[i].title#</span># } #</div>'
            ),
            y = t.template(
              '<div class="#=styles.card# #=styles.cardRich#"># if (typeof images !== "undefined" && images.length > 0) { #<img src="#:images[0].url#" alt="#:images[0].alt#" class="#=styles.cardImage#" /># } #<div class="#=styles.cardBody#"># if (typeof title !== "undefined") { #<h5 class="#=styles.cardTitle#">#:title#</h5># } ## if (typeof subtitle !== "undefined") { #<h6 class="#=styles.cardSubtitle#">#:subtitle#</h6># } ## if (typeof text !== "undefined") { #<p>#:text#</p># } #</div># if (typeof buttons !== "undefined" && buttons.length > 0) { #<div class="#=styles.cardActions# #=styles.cardActionsVertical#"># for (var i = 0; i < buttons.length; i++) { #<span class="#=styles.cardAction#"><span class="#=styles.button# #=styles.buttonPrimary#" data-value="#:buttons[i].value#">#:buttons[i].title#</span></span># } #</div># } #</div>'
            );
          h(t.chat, { Templates: {}, Components: {} });
          t.chat.registerTemplate = function (n, i) {
            t.chat.Templates[n] = t.template(i);
          };
          t.chat.getTemplate = function (n) {
            return t.chat.Templates[n] || c;
          };
          t.chat.registerTemplate("text", c);
          t.chat.registerTemplate("message", c);
          t.chat.registerTemplate("typing", l);
          t.chat.registerTemplate("suggestedAction", b);
          t.chat.registerTemplate("heroCard", y);
          t.chat.registerTemplate("application/vnd.microsoft.card.hero", y);
          t.chat.registerComponent = function (n, i) {
            t.chat.Components[n] = i;
          };
          t.chat.getComponent = function (n) {
            return t.chat.Components[n] || null;
          };
          o = t.chat.Component = t.Class.extend({
            init: function (t, i) {
              this.element = n("<div></div>");
              this.options = t;
              this.view = i;
            },
            destroy: function () {
              t.destroy(this.element);
            },
          });
          a = o.extend({
            init: function (n, i) {
              o.fn.init.call(this, n, i);
              this.element.kendoCalendar({
                change: function () {
                  i.trigger("suggestedAction", {
                    text: t.toString(this.value(), "d"),
                    type: "message",
                  });
                },
              });
            },
            destroy: function () {},
          });
          t.chat.registerComponent("calendar", a);
          u = {
            wrapper: "k-widget k-chat",
            messageList: "k-avatars",
            messageListContent: "k-message-list-content",
            messageTime: "k-message-time",
            messageGroup: "k-message-group",
            message: "k-message",
            only: "k-only",
            first: "k-first",
            middle: "k-middle",
            last: "k-last",
            author: "k-author",
            avatar: "k-avatar",
            noAvatar: "k-no-avatar",
            self: "k-alt",
            button: "k-button",
            iconButton: "k-button-icon",
            buttonPrimary: "k-flat k-primary",
            scrollButtonIcon: "k-icon",
            scrollButtonIconLeft: "k-i-arrow-chevron-left",
            scrollButtonIconRight: "k-i-arrow-chevron-right",
            typingIndicator: "k-typing-indicator",
            typingIndicatorBubble: "k-typing-indicator-bubble",
            bubble: "k-bubble",
            suggestedActions: "k-quick-replies",
            suggestedAction: "k-quick-reply",
            cardWrapper: "k-card-container",
            cardDeckScrollWrap: "k-card-deck-scrollwrap",
            cardDeck: "k-card-deck",
            cardList: "k-card-list",
            card: "k-card",
            cardRich: "k-card-type-rich",
            cardBody: "k-card-body",
            cardImage: "k-card-image",
            cardTitle: "k-card-title",
            cardSubtitle: "k-card-subtitle",
            cardActions: "k-card-actions",
            cardActionsVertical: "k-card-actions-vertical",
            cardAction: "k-card-action",
            selected: "k-state-selected",
          };
          r = t.chat.ChatView = s.extend({
            init: function (n, t) {
              s.fn.init.call(this, n, t);
              this._list();
              this._lastSender = null;
              this.typingParticipants = [];
              this._attachEvents();
              this._scrollable();
            },
            events: [],
            options: {
              messages: {
                isTyping: " is typing.",
                areTyping: " are typing.",
                and: " and ",
              },
            },
            destroy: function () {
              s.fn.destroy.call(this);
              this._scrollDraggable && this._scrollDraggable.destroy();
              this.element.empty();
              this.element.off(f);
              this.list = null;
              this._lastSender = null;
            },
            _list: function () {
              var t = r.styles;
              this.element.addClass(t.messageList).attr("aria-live", "polite");
              this.list = n("<div>")
                .addClass(t.messageListContent)
                .appendTo(this.element);
            },
            _attachEvents: function () {
              var n = r.styles;
              this.element
                .on("click" + f, e(this._listClick, this))
                .on("click" + f, i + n.message, e(this._messageClick, this))
                .on(
                  "click" + f,
                  i + n.suggestedAction,
                  e(this._suggestedActionClick, this)
                )
                .on(
                  "click" + f,
                  i + n.cardAction + v + i + n.button,
                  e(this._cardActionClick, this)
                );
            },
            _scrollable: function () {
              var n = r.styles;
              this.element.on(
                "click" + f,
                i + n.cardDeckScrollWrap + v + i + n.button,
                e(this._scrollButtonClick, this)
              );
            },
            _scrollButtonClick: function (t) {
              var f = r.styles,
                e = n(t.currentTarget),
                s = 0 !== e.find(i + f.scrollButtonIconLeft).length,
                u = e.siblings(i + f.cardDeck),
                h = u.find(i + f.card).last(),
                o = h.outerWidth(!0);
              u.scrollLeft(s ? u.scrollLeft() - o : u.scrollLeft() + o);
            },
            getTemplate: function (n) {
              return t.chat.getTemplate(n);
            },
            getComponent: function (n) {
              return t.chat.getComponent(n);
            },
            renderMessage: function (n, t) {
              n.timestamp || (n.timestamp = new Date());
              n.text || (n.text = "");
              var i = this._renderTemplate(n.type, n);
              this._renderBubble(n.type, i, t);
              "typing" == n.type
                ? this.typingParticipants.length > 0 &&
                  this._removeTypingParticipant(t)
                : (this._lastSender = t.id);
            },
            renderSuggestedActions: function (n) {
              this._removeSuggestedActions();
              var t = this._renderTemplate("suggestedAction", {
                suggestedActions: n,
              });
              this.list.append(t);
              this._scrollToBottom();
            },
            renderAttachments: function (n) {
              var t,
                e,
                f = this._renderAttachmentWrapper(n.attachmentLayout),
                o =
                  "carousel" === n.attachmentLayout
                    ? f.find(i + r.styles.cardDeck)
                    : f,
                u = n.attachments;
              if (u.length) {
                for (t = 0; t < u.length; t++)
                  (e = this._renderTemplate(u[t].contentType, u[t].content)),
                    o.append(e);
                this._removeSuggestedActions();
                this._removeTypingIndicator();
                this.list.append(f);
                this._lastSender = null;
              }
            },
            renderComponent: function (n) {
              var t = this.getComponent(n),
                i = new t({}, this);
              this.list.append(i.element);
              this._scrollToBottom();
            },
            _renderAttachmentWrapper: function (t) {
              var f,
                e,
                u = r.styles,
                i = n("<div>");
              return (
                "carousel" === t
                  ? (i.addClass(u.cardDeckScrollWrap),
                    (f = this._renderScrollButton(u.scrollButtonIconLeft)),
                    i.append(f),
                    i.append(n("<div>").addClass(u.cardDeck)),
                    (e = this._renderScrollButton(u.scrollButtonIconRight)),
                    i.append(e))
                  : i.addClass(u.cardList),
                i
              );
            },
            _renderScrollButton: function (t) {
              var i = r.styles;
              return n("<button>")
                .addClass(i.button)
                .addClass(i.iconButton)
                .append(n("<span>").addClass(i.scrollButtonIcon).addClass(t));
            },
            _removeSuggestedActions: function () {
              this.list.find(i + r.styles.suggestedActions).remove();
            },
            _listClick: function (t) {
              var u = r.styles,
                f = n(t.target);
              f.hasClass(u.message) ||
                f.parents(i + u.message).length ||
                this._clearSelection();
            },
            _messageClick: function (t) {
              this._clearSelection();
              n(t.currentTarget).addClass(r.styles.selected);
            },
            _suggestedActionClick: function (t) {
              var i = n(t.target).data("value") || "";
              this.trigger("actionClick", { text: i });
              this._removeSuggestedActions();
            },
            _cardActionClick: function (t) {
              var i = n(t.target).data("value") || "";
              this.trigger("actionClick", { text: i });
            },
            _renderBubble: function (n, t, i) {
              this._removeSuggestedActions();
              this._removeTypingIndicator();
              var r = this._getMessageGroup(i, n);
              this._appendToGroup(r, t, n);
              this._scrollToBottom();
            },
            _renderTemplate: function (t, i) {
              var u,
                f,
                e,
                o,
                s = this.getComponent(t);
              return (
                s
                  ? ((f = new s(i, this)), (u = f.element))
                  : ((e = this.getTemplate(t)),
                    (o = h(!0, {}, i, { styles: r.styles })),
                    (u = n(e(o)))),
                u
              );
            },
            _getMessageGroup: function (t, u) {
              var f,
                e = r.styles,
                o = this._getMessageGroupTemplate(t, u),
                s = "typing" == u ? this.element : this.list;
              return t.id === this._lastSender &&
                null !== this._lastSender &&
                "typing" !== u &&
                ((f = this.list.find(i + e.messageGroup).last()), f.length)
                ? f
                : n(o({ text: t.name, url: t.iconUrl, styles: e })).appendTo(s);
            },
            _getMessageGroupTemplate: function (n, t) {
              var r = n.id === this.options.user.id,
                i = r ? w : p;
              return "typing" == t && (i = l), i;
            },
            _appendToGroup: function (n, t, u) {
              var f = r.styles,
                e = n.find(i + f.message),
                o = e.length,
                s = this.element.find(i + f.typingIndicator);
              (s.length && "typing" == u) ||
                (t.addClass(0 === o ? f.only : f.last),
                e
                  .filter(i + f.only)
                  .removeClass(f.only)
                  .addClass(f.first),
                e
                  .filter(i + f.last)
                  .removeClass(f.last)
                  .addClass(f.middle),
                n.append(t));
            },
            _renderTypingIndicator: function (t) {
              var r,
                f,
                e = this.element.find(i + u.typingIndicatorBubble);
              this._addTypingParticipant(t);
              e.length
                ? ((f = this._composeTypingParticipantsText(
                    this.typingParticipants
                  )),
                  (r = e.find(i + u.author).first()),
                  r.text(f))
                : n(
                    l({
                      text: t.name + this.options.messages.isTyping,
                      styles: u,
                    })
                  ).appendTo(this.element);
              this._scrollToBottom();
            },
            _addTypingParticipant: function (n) {
              for (
                var i = !1, t = 0;
                t < this.typingParticipants.length;
                t += 1
              )
                if (this.typingParticipants[t].id == n.id) {
                  i = !0;
                  break;
                }
              i || this.typingParticipants.push(n);
            },
            _removeTypingParticipant: function (n) {
              var e,
                r,
                t,
                f = this.element.find(i + u.typingIndicatorBubble);
              if (f.length) {
                for (t = 0; t < this.typingParticipants.length; t += 1)
                  this.typingParticipants[t].id == n.id &&
                    this.typingParticipants.splice(t, 1);
                r = this._composeTypingParticipantsText(
                  this.typingParticipants
                );
                "" === r
                  ? f.remove()
                  : ((e = f.find(i + u.author).first()), e.text(r));
              }
            },
            _composeTypingParticipantsText: function (n) {
              var t = this.options.messages,
                r = 1 == n.length ? t.isTyping : t.areTyping,
                i = "";
              return 0 === n.length
                ? i
                : (i =
                    this.typingParticipants
                      .map(function (n) {
                        return n.name;
                      })
                      .join(", ")
                      .replace(/,(?!.*,)/gim, t.and.trimRight()) + r);
            },
            _removeTypingIndicator: function () {
              var n = this.element.find(i + u.typingIndicatorBubble);
              n.length && ((this.typingParticipants = []), n.remove());
            },
            _clearSelection: function () {
              var n = r.styles.selected;
              this.element.find(i + n).removeClass(n);
            },
            _scrollToBottom: function () {
              this.element.scrollTop(this.element.prop("scrollHeight"));
            },
          });
          h(!0, r, { styles: u });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.chat.min",
      ["chat/messageBox.min", "chat/toolbar.min", "chat/view.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          var i = window.kendo,
            e = i.ui.Widget,
            r = n.extend,
            f = ".",
            o = {
              wrapper: "k-widget k-chat",
              canvas: "k-chat-canvas",
              viewWrapper: "k-message-list",
              messageBoxWrapper: "k-message-box",
              toolbarBoxWrapper: "k-toolbar-box",
            },
            u = e.extend({
              init: function (n, t, r) {
                e.fn.init.call(this, n, t);
                r && (this._events = r);
                this._user();
                this._wrapper();
                this._view();
                this._messageBox();
                t && t.toolbar && t.toolbar.buttons && this._toolbar();
                i.notify(this);
              },
              events: [
                "typingStart",
                "typingEnd",
                "post",
                "sendMessage",
                "actionClick",
                "toolClick",
              ],
              options: {
                user: { name: "User", iconUrl: "" },
                name: "Chat",
                messages: { placeholder: "Type a message..." },
                toolbar: !1,
              },
              setOptions: function (t) {
                this._setEvents(t);
                n.extend(!0, this.options, t);
                this.toolbar &&
                  "toolbar" in t &&
                  (this.toolbar.destroy(), (this.toolbar = null));
                this.messageBox &&
                  (this.messageBox.unbind(),
                  this.messageBox.destroy(),
                  (this.messageBox = null));
                this._messageBox();
                "toolbar" in t &&
                  (this._resetToolbarButtons(t), this._toolbar());
              },
              _resetToolbarButtons: function (n) {
                var t = this.wrapper.find(f + o.toolbarBoxWrapper);
                t.is(":visible") || t.show();
                "buttons" in n.toolbar &&
                  (this.options.toolbar.buttons = n.toolbar.buttons);
              },
              destroy: function () {
                this.view &&
                  (this.view.unbind(), this.view.destroy(), (this.view = null));
                this.messageBox &&
                  (this.messageBox.unbind(),
                  this.messageBox.destroy(),
                  (this.messageBox = null));
                this.toolbar && (this.toolbar.destroy(), (this.toolbar = null));
                e.fn.destroy.call(this);
              },
              _user: function () {
                this.options.user.id = i.guid();
              },
              getUser: function () {
                return r(!0, {}, this.options.user);
              },
              _wrapper: function () {
                var n = u.styles,
                  t = this.options,
                  i = t.height,
                  r = t.width,
                  e =
                    "<div class='" +
                    n.viewWrapper +
                    "'></div><div class='" +
                    n.messageBoxWrapper +
                    "'></div><div class='" +
                    n.toolbarBoxWrapper +
                    "' role='toolbar' style='display:none;'></div>";
                this.wrapper = this.element.addClass(n.wrapper).append(e);
                t.toolbar &&
                  t.toolbar.buttons &&
                  t.toolbar.buttons.length &&
                  this.wrapper.find(f + n.toolbarBoxWrapper).show();
                i && this.wrapper.height(i);
                r && this.wrapper.css("max-width", r);
              },
              _view: function () {
                var n = this,
                  t = u.styles,
                  e = r(!0, {}, this.options),
                  o = this.wrapper.find(f + t.viewWrapper + "");
                this.view = new i.chat.ChatView(o, e);
                this.view.bind("actionClick", function (t) {
                  n.trigger("actionClick", t);
                  n.postMessage(t.text);
                });
              },
              _messageBox: function () {
                var n = this,
                  t = u.styles,
                  e = r(!0, {}, this.options),
                  o = this.wrapper.find(f + t.messageBoxWrapper + "");
                this.messageBox = new i.chat.ChatMessageBox(o, e);
                this.messageBox
                  .bind("typingStart", function (t) {
                    n.trigger("typingStart", t);
                  })
                  .bind("typingEnd", function (t) {
                    n.trigger("typingEnd", t);
                  })
                  .bind("sendMessage", function (t) {
                    n.trigger("sendMessage", t);
                    n.postMessage(t.text);
                  })
                  .bind("toggleToolbar", function () {
                    n.toggleToolbar();
                  });
              },
              _toolbar: function () {
                var n = this,
                  o = u.styles,
                  e = r(!0, {}, n.options),
                  s = n.wrapper.find(f + o.toolbarBoxWrapper + "");
                e.toolbar.scrollable === t &&
                  (this.options.toolbar.scrollable = e.toolbar.scrollable = !0);
                e.toolbar.toggleable === t &&
                  (this.options.toolbar.toggleable = e.toolbar.toggleable = !1);
                n.toolbar = new i.chat.ChatToolBar(s, e);
                n.toolbar.bind("click", function (t) {
                  n.trigger("toolClick", {
                    sender: n,
                    name: t.name,
                    button: t.button,
                    messageBox: n.messageBox.input[0],
                    originalEvent: t.originalEvent,
                  });
                });
              },
              postMessage: function (n) {
                var t = r(
                  !0,
                  {},
                  {
                    text: n,
                    type: "message",
                    timestamp: new Date(),
                    from: this.getUser(),
                  }
                );
                this.trigger("post", t);
                this.renderMessage(t, t.from);
              },
              renderMessage: function (n, t) {
                this.view.renderMessage(n, t);
              },
              renderSuggestedActions: function (n) {
                this.view.renderSuggestedActions(n);
              },
              renderAttachments: function (n, t) {
                this.view.renderAttachments(n, t);
              },
              toggleToolbar: function (n) {
                this.toolbar.toggle(n);
              },
              renderUserTypingIndicator: function (n) {
                this.view._renderTypingIndicator(n);
              },
              clearUserTypingIndicator: function (n) {
                this.view._removeTypingParticipant(n);
              },
              removeTypingIndicator: function () {
                this.view._removeTypingIndicator();
              },
            });
          i.ui.plugin(u);
          r(!0, u, { styles: o });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.button.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var u = window.kendo,
            f = u.ui.Widget,
            r = n.proxy,
            e = u.keys,
            o = "click",
            l = u.support.mousedown,
            a = u.support.mouseup,
            v = "k-button",
            y = "k-button-icon",
            p = "k-button-icontext",
            i = ".kendoButton",
            h = "disabled",
            w = "k-state-disabled",
            c = "k-state-focused",
            s = "k-state-active",
            b = f.extend({
              init: function (n, t) {
                var e = this;
                f.fn.init.call(e, n, t);
                n = e.wrapper = e.element;
                t = e.options;
                n.addClass(v).attr("role", "button");
                t.enable = t.enable && !n.attr(h);
                e.enable(t.enable);
                t.enable && e._tabindex();
                e.iconElement();
                n.on(o + i, r(e._click, e))
                  .on("focus" + i, r(e._focus, e))
                  .on("blur" + i, r(e._blur, e))
                  .on("keydown" + i, r(e._keydown, e))
                  .on("keyup" + i, r(e._removeActive, e))
                  .on(l + i, r(e._addActive, e))
                  .on(a + i, r(e._removeActive, e));
                u.notify(e);
              },
              destroy: function () {
                var n = this;
                n.wrapper.off(i);
                f.fn.destroy.call(n);
              },
              events: [o],
              options: {
                name: "Button",
                icon: "",
                iconClass: "",
                spriteCssClass: "",
                imageUrl: "",
                enable: !0,
              },
              _isNativeButton: function () {
                return "button" == this.element.prop("tagName").toLowerCase();
              },
              _click: function (n) {
                this.options.enable &&
                  this.trigger(o, { event: n }) &&
                  n.preventDefault();
              },
              _focus: function () {
                this.options.enable && this.element.addClass(c);
              },
              _blur: function () {
                var n = this;
                n.element.removeClass(c);
                setTimeout(function () {
                  n.element.removeClass(s);
                });
              },
              _keydown: function (n) {
                var t = this;
                (n.keyCode != e.ENTER && n.keyCode != e.SPACEBAR) ||
                  (t._addActive(),
                  t._isNativeButton() ||
                    (n.keyCode == e.SPACEBAR && n.preventDefault(),
                    t._click(n)));
              },
              _removeActive: function () {
                this.element.removeClass(s);
              },
              _addActive: function () {
                this.options.enable && this.element.addClass(s);
              },
              iconElement: function () {
                var t,
                  r,
                  e,
                  c = this,
                  i = c.element,
                  u = c.options,
                  f = u.icon,
                  o = u.iconClass,
                  s = u.spriteCssClass,
                  h = u.imageUrl;
                (s || h || f || o) &&
                  ((e = !0),
                  i
                    .contents()
                    .filter(function () {
                      return (
                        !n(this).hasClass("k-sprite") &&
                        !n(this).hasClass("k-icon") &&
                        !n(this).hasClass("k-image")
                      );
                    })
                    .each(function (t, i) {
                      (1 == i.nodeType ||
                        (3 == i.nodeType && n.trim(i.nodeValue).length > 0)) &&
                        (e = !1);
                    }),
                  i.addClass(e ? y : p));
                h
                  ? ((r = i.children("img.k-image").first()),
                    r[0] ||
                      (r = n('<img alt="icon" class="k-image" />').prependTo(
                        i
                      )),
                    r.attr("src", h))
                  : f || o
                  ? ((t = i.children("span.k-icon").first()),
                    t[0] || (t = n("<span></span>").prependTo(i)),
                    t.attr("class", f ? "k-icon k-i-" + f : o))
                  : s &&
                    ((t = i.children("span.k-sprite").first()),
                    t[0] ||
                      (t = n('<span class="k-sprite"></span>').prependTo(i)),
                    t.addClass(s));
              },
              enable: function (n) {
                var i = this,
                  r = i.element;
                n === t && (n = !0);
                n = !!n;
                i.options.enable = n;
                r.toggleClass(w, !n).attr("aria-disabled", !n).attr(h, !n);
                n && i._tabindex();
                try {
                  r.blur();
                } catch (u) {}
              },
            });
          u.ui.plugin(b);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.buttongroup.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function v(r, u) {
            r !== t &&
              n(
                '<span class="k-badge">' + i.htmlEncode(r) + "</span>"
              ).appendTo(u);
          }
          var i = window.kendo,
            y = i.ui,
            l = y.Widget,
            e = i.keys,
            a = n.proxy,
            c = i.template,
            o = ".kendoButtonGroup",
            w = "k-widget",
            b = "k-button-group",
            f = "k-button",
            k = "k-button-icontext",
            d = "k-button-icon",
            u = "k-state-active",
            r = "k-state-focused",
            s = "k-state-disabled",
            p = "select",
            g = "click",
            nt = "keydown",
            tt = "focus",
            it = "blur",
            rt = "mousedown",
            h = {
              item: c(
                '<span #= item.enabled === false ? "disabled" : "" # # if (item.badge) { #' +
                  i.attr("badge") +
                  '="#=item.badge#"# } #>#= icon(iconClass) ##= image(item) ##= text #</span>'
              ),
              image: c('<img alt="icon" src="#=data.imageUrl#" />'),
              icon: c('<span class="#=data#" />'),
              empty: c(""),
            },
            ut = l.extend({
              init: function (t, i) {
                var u = this;
                l.fn.init.call(u, t, i);
                u.wrapper = u.element;
                u.options.items && u._renderItems(u.options.items);
                u.selectedIndices = [];
                u.element
                  .addClass(w + " " + b)
                  .attr("role", "group")
                  .attr("tabindex", u.element.attr("tabindex") || "0")
                  .children()
                  .each(function () {
                    var t = n(this);
                    u._updateClasses.bind(u)(t);
                  });
                u._enable = !0;
                u.options.enable ||
                  ((u._enable = !1),
                  u.element.attr("aria-disabled", !0).addClass(s));
                u.select(u.options.index);
                u.element
                  .on(g + o, "." + f, a(u._click, u))
                  .on(tt + o, a(u._focus, u))
                  .on(nt + o, a(u._keyDown, u))
                  .on(it + o, function () {
                    u.preventFocus = !1;
                    u.element.find("." + f).removeClass(r);
                  })
                  .on(rt + o, function () {
                    u.preventFocus = !0;
                  });
              },
              events: [p],
              options: {
                name: "ButtonGroup",
                selection: "single",
                index: -1,
                enable: !0,
              },
              current: function () {
                return this.element.find("." + u);
              },
              _renderItems: function (t) {
                var r = this;
                t.forEach(function (t) {
                  var f = n(
                    h.item({
                      image: t.imageUrl ? h.image : h.empty,
                      icon:
                        t.imageUrl || (!t.iconClass && !t.icon)
                          ? h.empty
                          : h.icon,
                      iconClass: t.iconClass || "k-icon k-i-" + t.icon,
                      item: t,
                      text: t.text
                        ? t.encoded === !1
                          ? t.text
                          : i.htmlEncode(t.text)
                        : "",
                    })
                  );
                  t.attributes && f.attr(t.attributes);
                  t.selected && f.addClass(u);
                  (t.iconClass || t.icon || t.imageUrl) &&
                    f.addClass(t.text ? "k-button-icontext" : "k-button-icon");
                  f.appendTo(r.element);
                });
              },
              _focus: function () {
                var t = n(this.element);
                this.preventFocus ||
                  (t.find("." + u).length
                    ? t
                        .find("." + u)
                        .first()
                        .focus()
                        .addClass(r)
                    : t.children().first().focus().addClass(r));
              },
              _keyDown: function (t) {
                var o,
                  l = this,
                  a = n(l.element),
                  u = a.find("." + f),
                  s = a.find("." + r),
                  h = u.index(s),
                  c = i.support.isRtl(l.element);
                (t.keyCode === e.LEFT && !c) || (t.keyCode === e.RIGHT && c)
                  ? (s.removeClass(r),
                    (o = 0 === h ? u.eq(u.length - 1) : n(u[h - 1])),
                    o.focus().addClass(r),
                    t.preventDefault())
                  : (t.keyCode === e.LEFT && c) || (t.keyCode === e.RIGHT && !c)
                  ? (s.removeClass(r),
                    (o = h + 1 === u.length ? u.eq(0) : n(u[h + 1])),
                    o.focus().addClass(r),
                    t.preventDefault())
                  : (t.keyCode !== e.ENTER && t.keyCode !== e.SPACEBAR) ||
                    (l._select(s), t.preventDefault());
              },
              select: function (i) {
                var s,
                  e = this,
                  o = -1;
                i !== t &&
                  i !== -1 &&
                  (e.element.find("." + f).removeClass(r),
                  "number" == typeof i
                    ? ((o = i), (i = e.element.children().eq(i)))
                    : i.nodeType && ((i = n(i)), (o = i.index())),
                  "multiple" === e.options.selection
                    ? ((s = "true" === i.attr("aria-pressed")),
                      i.attr("aria-pressed", !s).toggleClass(u),
                      e.selectedIndices.indexOf(o) === -1
                        ? e.selectedIndices.push(o)
                        : e.selectedIndices.splice(
                            e.selectedIndices.indexOf(o),
                            1
                          ))
                    : ((e.selectedIndices = []),
                      e.current().attr("aria-pressed", !1).removeClass(u),
                      i.attr("aria-pressed", !0).addClass(u),
                      e.selectedIndices.push(o)),
                  e.trigger(p, { indices: e.selectedIndices }));
              },
              badge: function (n, r) {
                var u,
                  e = this.element,
                  f = isNaN(n) ? e.find(n) : e.children().eq(n),
                  o = r || 0 === r;
                if (f.length) {
                  if (((u = f.children(".k-badge").eq(0)), !u.length && o))
                    return v(i.htmlEncode(r), f), i.htmlEncode(r);
                  if (o) u.html(i.htmlEncode(r));
                  else if (r === !1) return u.empty().remove(), t;
                  return u.html();
                }
              },
              enable: function (n) {
                t === n && (n = !0);
                this.element.attr("aria-disabled", !n).toggleClass(s, !n);
                this._enable = this.options.enable = n;
              },
              destroy: function () {
                var n = this;
                n.element.off(o);
                l.fn.destroy.call(n);
              },
              _updateClasses: function (t) {
                var r = i.attrValue(t, "icon"),
                  e = i.attrValue(t, "badge"),
                  o = t.find("img").addClass("k-image"),
                  c = !0;
                t.attr("aria-pressed", !1).attr("role", "button").addClass(f);
                (t.is("[disabled]") || t.hasClass(s)) &&
                  t
                    .addClass(s)
                    .attr("aria-disabled", !0)
                    .removeAttr("disabled");
                t.is("." + u) &&
                  (t.removeClass(u),
                  ((!t.hasClass(s) && "single" === this.options.selection) ||
                    "multiple" === this.options.selection) &&
                    this.select(t[0]));
                !o[0] && r && t.prepend(n(h.icon("k-icon k-i-" + r)));
                t.contents()
                  .filter(function () {
                    return (
                      !n(this).hasClass("k-icon") &&
                      !n(this).hasClass("k-image")
                    );
                  })
                  .each(function () {
                    (1 == this.nodeType ||
                      (3 == this.nodeType &&
                        n.trim(this.nodeValue).length > 0)) &&
                      (c = !1);
                  });
                (o[0] || r) && t.addClass(c ? d : k);
                (e || 0 === e) && v(e, t);
              },
              _click: function (t) {
                var i = n(t.target).closest("." + f);
                t.isDefaultPrevented() || this._select(i);
              },
              _select: function (n) {
                var i = n;
                return (
                  this.element.find("." + f).removeClass(r),
                  !this._enable || i.is("." + s)
                    ? (i.addClass(r), t)
                    : (this.select(n[0]), i.addClass(r), t)
                );
              },
            });
          y.plugin(ut);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.switch.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var i = window.kendo,
            c = i.ui,
            f = ".kendoSwitch",
            e = c.Widget,
            l = i.support,
            a = "change",
            r = {
              widget: "k-switch k-widget",
              container: "k-switch-container",
              handle: "k-switch-handle",
              checked: "k-switch-on",
              checkedLabel: "k-switch-label-on",
              unchecked: "k-switch-off",
              uncheckedLabel: "k-switch-label-off",
              disabled: "k-state-disabled",
              readonly: "k-state-readonly",
              active: "k-state-active",
            },
            u = "disabled",
            v = "aria-disabled",
            o = "readonly",
            y = "aria-readonly",
            p = "aria-checked",
            s = "checked",
            w = l.click + f,
            b = l.pointers ? "pointerup" : "touchend",
            k = "keydown" + f,
            d = "_label",
            h = n.proxy,
            g = i.template(
              '<span class="#=styles.widget#" role="switch"></span>'
            ),
            nt = i.template(
              "<span class='#=styles.container#'><span class='#=styles.checkedLabel#'>#=checked#</span><span class='#=styles.uncheckedLabel#'>#=unchecked#</span><span class='#=styles.handle#'></span></span>"
            ),
            tt = e.extend({
              init: function (t, u) {
                var o,
                  f = this;
                e.fn.init.call(f, t, u);
                u = f.options;
                t = f.element[0];
                t.type = "checkbox";
                o = n(g({ styles: r }));
                f.wrapper = f.element.wrap(o).parent();
                f.wrapper
                  .append(
                    n(
                      nt({
                        styles: r,
                        checked: u.messages.checked,
                        unchecked: u.messages.unchecked,
                      })
                    )
                  )
                  .addClass(t.className);
                f.wrapper
                  .on(w, h(f._click, f))
                  .on(b, h(f._touchEnd, f))
                  .on(k, h(f._keydown, f));
                f.options.enabled && f._tabindex();
                f._initSettings();
                f._aria();
                i.notify(f, i.ui);
              },
              setOptions: function (i) {
                var e,
                  o,
                  u = this,
                  f = i.messages;
                u.options = n.extend(u.options, i);
                f &&
                  f.checked !== t &&
                  ((e = u.wrapper.find("." + r.checkedLabel)),
                  e.text(f.checked));
                f &&
                  f.unchecked !== t &&
                  ((o = u.wrapper.find("." + r.uncheckedLabel)),
                  o.text(f.unchecked));
                i.width && u.wrapper.css({ width: i.width });
                i.enabled !== t && u.enable(i.enabled);
                i.readonly !== t && u.readonly(i.readonly);
                u.check(i.checked);
              },
              _initSettings: function () {
                var t = this,
                  i = t.element[0],
                  n = t.options;
                n.width && t.wrapper.css({ width: n.width });
                null === n.checked && (n.checked = i.checked);
                t.check(n.checked);
                n.enabled = n.enabled && !t.element.attr(u);
                t.enable(n.enabled);
                n.readonly = n.readonly || !!t.element.attr(o);
                t.readonly(n.readonly);
              },
              _aria: function () {
                var t,
                  e = this,
                  r = e.element,
                  u = e.wrapper,
                  o = r.attr("id"),
                  f = n('label[for="' + o + '"]'),
                  s = r.attr("aria-label"),
                  h = r.attr("aria-labelledby");
                s
                  ? u.attr("aria-label", s)
                  : h
                  ? u.attr("aria-labelledby", h)
                  : f.length &&
                    ((t = f.attr("id")),
                    t || ((t = (o || i.guid()) + d), f.attr("id", t)),
                    u.attr("aria-labelledby", t));
              },
              events: [a],
              options: {
                name: "Switch",
                messages: { checked: "On", unchecked: "Off" },
                width: null,
                checked: null,
                enabled: !0,
                readonly: !1,
              },
              check: function (n) {
                var i = this,
                  u = i.element[0];
                return n === t
                  ? u.checked
                  : (u.checked !== n && (i.options.checked = u.checked = n),
                    i.wrapper
                      .attr(p, n)
                      .toggleClass(r.checked, n)
                      .toggleClass(r.unchecked, !n),
                    n ? i.element.attr(s, s) : i.element.removeAttr(s),
                    t);
              },
              value: function (n) {
                return (
                  "string" == typeof n && (n = "true" === n),
                  this.check.apply(this, [n])
                );
              },
              destroy: function () {
                e.fn.destroy.call(this);
                this.wrapper.off(f);
              },
              toggle: function () {
                var n = this;
                n.check(!n.element[0].checked);
              },
              enable: function (n) {
                var f = this.element,
                  i = this.wrapper;
                t === n && (n = !0);
                this.options.enabled = n;
                n
                  ? (f.removeAttr(u), i.removeAttr(v))
                  : (f.attr(u, u), i.attr(v, !0));
                i.toggleClass(r.disabled, !n);
              },
              readonly: function (n) {
                var i = this,
                  f = i.element,
                  u = i.wrapper;
                t === n && (n = !0);
                i.options.readonly = n;
                n
                  ? (f.attr(o, !0), u.attr(y, !0))
                  : (f.removeAttr(o), u.removeAttr(y));
                u.toggleClass(r.readonly, n);
              },
              _check: function () {
                var n = this,
                  i = (n.element[0].checked = !n.element[0].checked);
                return (
                  n.wrapper.focus(),
                  !n.options.enabled ||
                  n.options.readonly ||
                  n.trigger(a, { checked: i })
                    ? ((n.element[0].checked = !i), t)
                    : (n.check(i), t)
                );
              },
              _keydown: function (n) {
                n.keyCode === i.keys.SPACEBAR &&
                  (this._check(), n.preventDefault());
              },
              _isTouch: function (n) {
                return (
                  /touch/.test(n.type) ||
                  (n.originalEvent && /touch/.test(n.originalEvent.pointerType))
                );
              },
              _click: function (n) {
                this._isTouch(n) || 1 !== n.which || this._check();
              },
              _touchEnd: function (n) {
                this._isTouch(n) && (this._check(), n.preventDefault());
              },
            });
          c.plugin(tt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.pager.min", ["kendo.data.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function h(n, t, r, u, f) {
            return n({ idx: t, text: r, ns: i.ns, numeric: u, title: f || "" });
          }
          function e(n, t, i) {
            return ft({
              className: n.substring(1),
              text: t,
              wrapClassName: i || "",
            });
          }
          function o(n, t, r, u) {
            n.find(t)
              .parent()
              .attr(i.attr("page"), r)
              .attr("tabindex", -1)
              .toggleClass("k-state-disabled", u);
          }
          function b(n, t) {
            o(n, l, 1, t <= 1);
          }
          function k(n, t) {
            o(n, v, Math.max(1, t - 1), t <= 1);
          }
          function d(n, t, i) {
            o(n, y, Math.min(i, t + 1), t >= i);
          }
          function g(n, t, i) {
            o(n, a, i, t >= i);
          }
          var i = window.kendo,
            nt = i.ui,
            c = nt.Widget,
            u = n.proxy,
            l = ".k-i-arrow-end-left",
            a = ".k-i-arrow-end-right",
            v = ".k-i-arrow-60-left",
            y = ".k-i-arrow-60-right",
            p = "k-pager-lg k-pager-md k-pager-sm",
            f = "change",
            r = ".kendoPager",
            w = "click",
            tt = "keydown",
            it = "disabled",
            rt = "down",
            s = n(document.documentElement),
            ut = Number.MAX_VALUE,
            ft = i.template(
              '<a href="\\#" aria-label="#=text#" title="#=text#" class="k-link k-pager-nav #= wrapClassName #"><span class="k-icon #= className #"></span></a>'
            ),
            et = c.extend({
              init: function (t, o) {
                var p,
                  h,
                  it,
                  ut,
                  s = this,
                  nt = null;
                c.fn.init.call(s, t, o);
                o = s.options;
                s._createDataSource(o);
                s.linkTemplate = i.template(s.options.linkTemplate);
                s.selectTemplate = i.template(s.options.selectTemplate);
                s.currentPageTemplate = i.template(
                  s.options.currentPageTemplate
                );
                p = s.page();
                h = s.totalPages();
                s._refreshHandler = u(s.refresh, s);
                s.dataSource.bind(f, s._refreshHandler);
                s.downEvent = i.applyEventMap(rt, i.guid());
                o.previousNext &&
                  (s.element.find(l).length ||
                    (s.element.append(e(l, o.messages.first, "k-pager-first")),
                    b(s.element, p, h)),
                  s.element.find(v).length ||
                    (s.element.append(e(v, o.messages.previous)),
                    k(s.element, p, h)));
                o.numeric &&
                  ((s.list = s.element.find(".k-pager-numbers")),
                  s.list.length ||
                    (s.list = n(
                      '<ul class="k-pager-numbers k-reset" />'
                    ).appendTo(s.element)),
                  o.dataSource &&
                    !o.dataSource.total() &&
                    s.list
                      .empty()
                      .append(s.currentPageTemplate({ text: 0 }))
                      .append(s.selectTemplate({ text: 0 })),
                  s.list.wrap('<div class="k-pager-numbers-wrap"></div>'));
                o.input &&
                  (s.element.find(".k-pager-input").length ||
                    s.element.append(
                      '<span class="k-pager-input k-label">' +
                        o.messages.page +
                        '<input class="k-textbox">' +
                        i.format(o.messages.of, h) +
                        "</span>"
                    ),
                  s.element.on(
                    tt + r,
                    ".k-pager-input input",
                    u(s._keydown, s)
                  ));
                o.previousNext &&
                  (s.element.find(y).length ||
                    (s.element.append(e(y, o.messages.next)),
                    d(s.element, p, h)),
                  s.element.find(a).length ||
                    (s.element.append(e(a, o.messages.last, "k-pager-last")),
                    g(s.element, p, h)));
                o.pageSizes &&
                  (s.element.find(".k-pager-sizes").length ||
                    ((it = o.pageSizes.length
                      ? o.pageSizes
                      : ["all", 5, 10, 20]),
                    (ut = n.map(it, function (n) {
                      return n.toLowerCase && "all" === n.toLowerCase()
                        ? "<option value='all'>" +
                            o.messages.allPages +
                            "</option>"
                        : "<option>" + n + "</option>";
                    })),
                    n(
                      '<span class="k-pager-sizes k-label"><select/>' +
                        o.messages.itemsPerPage +
                        "</span>"
                    )
                      .appendTo(s.element)
                      .find("select")
                      .html(ut.join(""))
                      .end()
                      .appendTo(s.element)),
                  s.element.find(".k-pager-sizes select").val(s.pageSize()),
                  i.ui.DropDownList &&
                    s.element
                      .find(".k-pager-sizes select")
                      .show()
                      .kendoDropDownList(),
                  s.element.on(
                    f + r,
                    ".k-pager-sizes select",
                    u(s._change, s)
                  ));
                o.refresh &&
                  (s.element.find(".k-pager-refresh").length ||
                    s.element.append(
                      '<a href="#" class="k-pager-refresh k-link" title="' +
                        o.messages.refresh +
                        '" aria-label="' +
                        o.messages.refresh +
                        '"><span class="k-icon k-i-reload"></span></a>'
                    ),
                  s.element.on(
                    w + r,
                    ".k-pager-refresh",
                    u(s._refreshClick, s)
                  ));
                o.info &&
                  (s.element.find(".k-pager-info").length ||
                    s.element.append('<span class="k-pager-info k-label" />'));
                s.element
                  .on(w + r, "a", u(s._click, s))
                  .addClass("k-pager-wrap k-widget k-floatwrap");
                s.element.on(w + r, ".k-current-page", u(s._toggleActive, s));
                o.autoBind && s.refresh();
                s._resizeHandler = u(s.resize, s, !0);
                n(window).on("resize" + r, s._resizeHandler);
                nt = s._getWidthSizeClass(s.element.width());
                nt && s.element.addClass(nt);
                i.notify(s);
              },
              destroy: function () {
                var t = this;
                c.fn.destroy.call(t);
                t.element.off(r);
                t.dataSource.unbind(f, t._refreshHandler);
                t._refreshHandler = null;
                n(window).off("resize" + r, this._resizeHandler);
                i.destroy(t.element);
                t.element = t.list = null;
              },
              events: [f],
              options: {
                name: "Pager",
                selectTemplate:
                  '<li><span class="k-state-selected">#=text#</span></li>',
                currentPageTemplate:
                  '<li class="k-current-page"><span class="k-link k-pager-nav">#=text#</span></li>',
                linkTemplate:
                  '<li><a tabindex="-1" href="\\#" class="k-link" data-#=ns#page="#=idx#" #if (title !== "") {# title="#=title#" #}#>#=text#</a></li>',
                buttonCount: 10,
                autoBind: !0,
                numeric: !0,
                info: !0,
                input: !1,
                previousNext: !0,
                pageSizes: !1,
                refresh: !1,
                responsive: !0,
                messages: {
                  allPages: "All",
                  display: "{0} - {1} of {2} items",
                  empty: "No items to display",
                  page: "Page",
                  of: "of {0}",
                  itemsPerPage: "items per page",
                  first: "Go to the first page",
                  previous: "Go to the previous page",
                  next: "Go to the next page",
                  last: "Go to the last page",
                  refresh: "Refresh",
                  morePages: "More pages",
                },
              },
              setDataSource: function (n) {
                var t = this;
                t.dataSource.unbind(f, t._refreshHandler);
                t.dataSource = t.options.dataSource = n;
                n.bind(f, t._refreshHandler);
                t.options.autoBind && n.fetch();
              },
              _resize: function (n) {
                var i, t;
                n.width &&
                  ((i = this._getWidthSizeClass(n.width)),
                  (t = this.element),
                  i
                    ? t.hasClass(i) || (t.removeClass(p), t.addClass(i))
                    : t.removeClass(p));
              },
              _createDataSource: function (n) {
                this.dataSource = i.data.DataSource.create(n.dataSource);
              },
              refresh: function (t) {
                var c,
                  p,
                  w,
                  rt,
                  ft,
                  nt,
                  r = this,
                  a = 1,
                  u = r.page(),
                  e = "",
                  f = r.options,
                  o = r.pageSize(),
                  et = r._collapsedTotal(),
                  v = r.dataSource.total(),
                  l = r.totalPages(),
                  tt = r.linkTemplate,
                  y = f.buttonCount;
                if (
                  (s.unbind(r.downEvent, n.proxy(r._hideList, r)),
                  !t || "itemchange" != t.action)
                ) {
                  if (f.numeric) {
                    for (
                      u > y &&
                        ((w = u % y), (a = 0 === w ? u - y + 1 : u - w + 1)),
                        p = Math.min(a + y - 1, l),
                        a > 1 &&
                          (e += h(tt, a - 1, "...", !1, f.messages.morePages)),
                        c = a;
                      c <= p;
                      c++
                    )
                      e += h(c == u ? r.selectTemplate : tt, c, c, !0);
                    p < l && (e += h(tt, c, "...", !1, f.messages.morePages));
                    "" === e && (e = r.selectTemplate({ text: 0 }));
                    e = this.currentPageTemplate({ text: u }) + e;
                    r.list.removeClass("k-state-expanded").html(e);
                  }
                  f.info &&
                    ((e =
                      v > 0
                        ? i.format(
                            f.messages.display,
                            r.dataSource.options.endless
                              ? 1
                              : Math.min(
                                  (u - 1) * (r.dataSource.pageSize() || 0) + 1,
                                  et
                                ),
                            Math.min(u * o, et),
                            v
                          )
                        : f.messages.empty),
                    r.element.find(".k-pager-info").html(e));
                  f.input &&
                    r.element
                      .find(".k-pager-input")
                      .html(
                        r.options.messages.page +
                          '<input class="k-textbox" aria-label="' +
                          u +
                          '">' +
                          i.format(f.messages.of, l)
                      )
                      .find("input")
                      .val(u)
                      .attr(it, v < 1)
                      .toggleClass("k-state-disabled", v < 1);
                  f.previousNext &&
                    (b(r.element, u, l),
                    k(r.element, u, l),
                    d(r.element, u, l),
                    g(r.element, u, l));
                  f.pageSizes &&
                    ((rt =
                      r.element.find(".k-pager-sizes option[value='all']")
                        .length > 0),
                    (ft = rt && (o === this.dataSource.total() || o == ut)),
                    (nt = o),
                    ft && ((o = "all"), (nt = f.messages.allPages)),
                    r.element
                      .find(".k-pager-sizes select")
                      .val(o)
                      .attr("aria-label", o)
                      .filter("[" + i.attr("role") + "=dropdownlist]")
                      .kendoDropDownList("value", o)
                      .kendoDropDownList("text", nt));
                }
              },
              _collapsedTotal: function () {
                return this.dataSource.total();
              },
              _keydown: function (n) {
                if (n.keyCode === i.keys.ENTER) {
                  var r = this.element.find(".k-pager-input").find("input"),
                    t = parseInt(r.val(), 10);
                  (isNaN(t) || t < 1 || t > this.totalPages()) &&
                    (t = this.page());
                  r.val(t);
                  this.page(t);
                }
              },
              _refreshClick: function (n) {
                n.preventDefault();
                this.dataSource.read();
              },
              _change: function (n) {
                var r = n.currentTarget.value,
                  u = parseInt(r, 10),
                  i = this.dataSource;
                isNaN(u)
                  ? "all" == (r + "").toLowerCase() &&
                    ((i._pageSize = t), (i._take = t), (i._skip = 0), i.fetch())
                  : i.pageSize(u);
              },
              _toggleActive: function () {
                var t = this;
                t.list.hasClass("k-state-expanded")
                  ? s.unbind(t.downEvent, n.proxy(t._hideList, t))
                  : s.bind(t.downEvent, n.proxy(t._hideList, t));
                t.list.toggleClass("k-state-expanded");
              },
              _hideList: function (t) {
                var r = this,
                  u = i.eventTarget(t);
                n.contains(r.list[0], u) ||
                  (s.unbind(r.downEvent, n.proxy(r._hideList, r)),
                  r.list.removeClass("k-state-expanded"));
              },
              _click: function (t) {
                var r = n(t.currentTarget);
                t.preventDefault();
                r.is(".k-state-disabled") ||
                  this.page(parseInt(r.attr(i.attr("page")), 10));
              },
              totalPages: function () {
                return Math.ceil(
                  (this.dataSource.total() || 0) / (this.pageSize() || 1)
                );
              },
              pageSize: function () {
                return this.dataSource.pageSize() || this.dataSource.total();
              },
              page: function (n) {
                return n
                  ? (this.trigger("pageChange", { index: n }) ||
                      (this.dataSource.page(n), this.trigger(f, { index: n })),
                    t)
                  : this.dataSource.total() > 0
                  ? this.dataSource.page()
                  : 0;
              },
              _getWidthSizeClass: function (n) {
                var i = this,
                  t = p.split(" ");
                return i.options.responsive
                  ? n <= 480
                    ? t[2]
                    : n <= 640
                    ? t[1]
                    : n <= 1024
                    ? t[0]
                    : null
                  : null;
              },
            });
          nt.plugin(et);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.notification.min", ["kendo.core.min", "kendo.popup.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var r = window.kendo,
            s = r.ui.Widget,
            g = n.proxy,
            h = n.extend,
            f = window.setTimeout,
            y = "click",
            p = "show",
            w = "hide",
            c = "k-notification",
            e = ".k-notification-wrap .k-i-close",
            v = "k-hiding",
            b = "info",
            nt = "success",
            tt = "warning",
            it = "error",
            i = "top",
            o = "left",
            l = "bottom",
            a = "right",
            k = "up",
            u = ".kendoNotification",
            rt = '<div class="k-widget k-popup k-notification"></div>',
            d =
              '<div class="k-notification-wrap"><span class="k-icon k-i-#=typeIcon#" title="#=typeIcon#"></span><div class="k-notification-content">#=content#</div><span class="k-icon k-i-close" title="Hide"></span></div>',
            ut = d.replace("#=content#", "#:content#"),
            ft = s.extend({
              init: function (t, i) {
                var u = this;
                s.fn.init.call(u, t, i);
                i = u.options;
                (i.appendTo && n(i.appendTo).is(t)) || u.element.hide();
                u._compileTemplates(i.templates);
                u._guid = "_" + r.guid();
                u._isRtl = r.support.isRtl(t);
                u._compileStacking(i.stacking, i.position.top, i.position.left);
                r.notify(u);
              },
              events: [p, w],
              options: {
                name: "Notification",
                position: {
                  pinned: !0,
                  top: null,
                  left: null,
                  bottom: 20,
                  right: 20,
                },
                stacking: "default",
                hideOnClick: !0,
                button: !1,
                allowHideAfter: 0,
                autoHideAfter: 5e3,
                appendTo: null,
                width: null,
                height: null,
                templates: [],
                animation: {
                  open: { effects: "fade:in", duration: 300 },
                  close: { effects: "fade:out", duration: 600, hide: !0 },
                },
              },
              _compileTemplates: function (t) {
                var i = this,
                  u = r.template;
                i._compiled = {};
                n.each(t, function (t, r) {
                  i._compiled[r.type] = u(
                    r.template || n("#" + r.templateId).html()
                  );
                });
                i._defaultCompiled = u(d);
                i._safeCompiled = u(ut);
              },
              _getCompiled: function (n, t) {
                var i = t ? this._safeCompiled : this._defaultCompiled;
                return n ? this._compiled[n] || i : i;
              },
              _compileStacking: function (n, t, r) {
                var f,
                  e,
                  h = this,
                  s = {
                    paddingTop: 0,
                    paddingRight: 0,
                    paddingBottom: 0,
                    paddingLeft: 0,
                  },
                  u = null !== r ? o : a;
                switch (n) {
                  case "down":
                    f = l + " " + u;
                    e = i + " " + u;
                    delete s.paddingBottom;
                    break;
                  case a:
                    f = i + " " + a;
                    e = i + " " + o;
                    delete s.paddingRight;
                    break;
                  case o:
                    f = i + " " + o;
                    e = i + " " + a;
                    delete s.paddingLeft;
                    break;
                  case k:
                    f = i + " " + u;
                    e = l + " " + u;
                    delete s.paddingTop;
                    break;
                  default:
                    null !== t
                      ? ((f = l + " " + u),
                        (e = i + " " + u),
                        delete s.paddingBottom)
                      : ((f = i + " " + u),
                        (e = l + " " + u),
                        delete s.paddingTop);
                }
                h._popupOrigin = f;
                h._popupPosition = e;
                h._popupPaddings = s;
              },
              _attachPopupEvents: function (n, t) {
                function i(n) {
                  n.on(y + u, function () {
                    h._hidePopup(t);
                  });
                }
                var o,
                  h = this,
                  r = n.allowHideAfter,
                  s = !isNaN(r) && r > 0;
                n.hideOnClick
                  ? t.bind("activate", function () {
                      s
                        ? f(function () {
                            i(t.element);
                          }, r)
                        : i(t.element);
                    })
                  : n.button &&
                    ((o = t.element.find(e)),
                    s
                      ? f(function () {
                          i(o);
                        }, r)
                      : i(o));
              },
              _showPopup: function (t, i) {
                var s,
                  c,
                  o = this,
                  y = i.autoHideAfter,
                  l = i.position.left,
                  a = i.position.top;
                c = n("." + o._guid + ":not(." + v + ")").last();
                s = new r.ui.Popup(t, {
                  anchor: c[0] ? c : document.body,
                  origin: o._popupOrigin,
                  position: o._popupPosition,
                  animation: i.animation,
                  copyAnchorStyles: !1,
                  modal: !0,
                  collision: "",
                  isRtl: o._isRtl,
                  close: function () {
                    o._triggerHide(this.element);
                  },
                  deactivate: function (n) {
                    n.sender.element.off(u);
                    n.sender.element.find(e).off(u);
                    n.sender.destroy();
                  },
                });
                o._attachPopupEvents(i, s);
                t.removeClass("k-group k-reset");
                c[0]
                  ? s.open()
                  : (null === l &&
                      (l =
                        n(window).width() - t.outerWidth() - i.position.right),
                    null === a &&
                      (a =
                        n(window).height() -
                        t.outerHeight() -
                        i.position.bottom),
                    s.open(l, a));
                s.wrapper
                  .addClass(o._guid)
                  .css(h({ margin: 0, zIndex: 10050 }, o._popupPaddings));
                i.position.pinned
                  ? (s.wrapper.css("position", "fixed"),
                    c[0] && o._togglePin(s.wrapper, !0))
                  : c[0] || o._togglePin(s.wrapper, !1);
                y > 0 &&
                  f(function () {
                    o._hidePopup(s);
                  }, y);
              },
              _hidePopup: function (n) {
                n.wrapper.addClass(v);
                n.close();
              },
              _togglePin: function (t, r) {
                var u = n(window),
                  f = r ? -1 : 1;
                t.css({
                  top: parseInt(t.css(i), 10) + f * u.scrollTop(),
                  left: parseInt(t.css(o), 10) + f * u.scrollLeft(),
                });
              },
              _attachStaticEvents: function (n, t) {
                function i(n) {
                  n.on(y + u, g(o._hideStatic, o, t));
                }
                var o = this,
                  r = n.allowHideAfter,
                  s = !isNaN(r) && r > 0;
                n.hideOnClick
                  ? s
                    ? f(function () {
                        i(t);
                      }, r)
                    : i(t)
                  : n.button &&
                    (s
                      ? f(function () {
                          i(t.find(e));
                        }, r)
                      : i(t.find(e)));
              },
              _showStatic: function (t, i) {
                var u,
                  r = this,
                  e = i.autoHideAfter,
                  s = i.animation,
                  h =
                    i.stacking == k || i.stacking == o
                      ? "prependTo"
                      : "appendTo";
                t.removeClass("k-popup")
                  .addClass(r._guid)
                  [h](i.appendTo)
                  .hide()
                  .kendoAnimate(s.open || !1);
                u = r.getNotifications();
                u.each(function (t, u) {
                  r._attachStaticEvents(i, n(u));
                  e > 0 &&
                    f(function () {
                      r._hideStatic(n(u));
                    }, e);
                });
              },
              _hideStatic: function (n) {
                n.kendoAnimate(
                  h(this.options.animation.close || !1, {
                    complete: function () {
                      n.off(u).find(e).off(u);
                      n.remove();
                    },
                  })
                );
                this._triggerHide(n);
              },
              _triggerHide: function (n) {
                this.trigger(w, { element: n });
                this.angular("cleanup", function () {
                  return { elements: n };
                });
              },
              show: function (i, u, f) {
                var l,
                  a,
                  e = this,
                  o = e.options,
                  s = n(rt);
                return (
                  u || (u = b),
                  null !== i &&
                    i !== t &&
                    "" !== i &&
                    (r.isFunction(i) && (i = i()),
                    (a = { typeIcon: u, content: "" }),
                    (l = n.isPlainObject(i) ? h(a, i) : h(a, { content: i })),
                    s
                      .addClass(c + "-" + u)
                      .toggleClass(c + "-button", o.button)
                      .toggleClass(c + "-closable", o.button)
                      .attr("data-role", "alert")
                      .css({ width: o.width, height: o.height })
                      .append(e._getCompiled(u, f)(l)),
                    e.angular("compile", function () {
                      return { elements: s, data: [{ dataItem: l }] };
                    }),
                    n(o.appendTo)[0] ? e._showStatic(s, o) : e._showPopup(s, o),
                    e.trigger(p, { element: s })),
                  e
                );
              },
              showText: function (n, t) {
                this.show(n, t, !0);
              },
              info: function (n) {
                return this.show(n, b);
              },
              success: function (n) {
                return this.show(n, nt);
              },
              warning: function (n) {
                return this.show(n, tt);
              },
              error: function (n) {
                return this.show(n, it);
              },
              hide: function () {
                var t = this,
                  i = t.getNotifications();
                return (
                  i.each(
                    t.options.appendTo
                      ? function (i, r) {
                          t._hideStatic(n(r));
                        }
                      : function (i, r) {
                          var u = n(r).data("kendoPopup");
                          u && t._hidePopup(u);
                        }
                  ),
                  t
                );
              },
              getNotifications: function () {
                var t = this,
                  i = n("." + t._guid + ":not(." + v + ")");
                return t.options.appendTo ? i : i.children("." + c);
              },
              setOptions: function (n) {
                var i,
                  r = this;
                s.fn.setOptions.call(r, n);
                i = r.options;
                n.templates !== t && r._compileTemplates(i.templates);
                (n.stacking === t && n.position === t) ||
                  r._compileStacking(
                    i.stacking,
                    i.position.top,
                    i.position.left
                  );
              },
              destroy: function () {
                s.fn.destroy.call(this);
                this.getNotifications().off(u).find(e).off(u);
              },
            });
          r.ui.plugin(ft);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.tooltip.min",
      ["kendo.core.min", "kendo.popup.min", "kendo.fx.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function c(n) {
            for (; n.length && !g(n); ) n = n.parent();
          }
          function g(n) {
            var t = n.data(i.ns + "title");
            if (t) return n.attr("title", t), n.removeData(i.ns + "title"), !0;
          }
          function nt(n) {
            var t = n.attr("title");
            if (t) return n.data(i.ns + "title", t), n.attr("title", ""), !0;
          }
          function f(n) {
            for (; n.length && !n.is("body") && !nt(n); ) n = n.parent();
          }
          var i = window.kendo,
            e = i.ui.Widget,
            tt = i.ui.Popup,
            it = i.isFunction,
            rt = n.isPlainObject,
            l = n.extend,
            u = n.proxy,
            o = n(document),
            ut = i.isLocalUrl,
            a = "_tt_active",
            v = "aria-describedby",
            y = "show",
            p = "hide",
            w = "error",
            s = "contentLoad",
            b = "requestStart",
            h = "k-content-frame",
            ft =
              '<div role="tooltip" class="k-widget k-tooltip#if (!autoHide) {# k-tooltip-closable#}#">#if (!autoHide) {# <div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close" title="Close"></a></div> #}#<div class="k-tooltip-content"></div>#if (callout){ #<div class="k-callout k-callout-#=dir#"></div>#}#</div>',
            et = i.template(
              "<iframe frameborder='0' class='" +
                h +
                "' src='#= content.url #'>This page requires frames in order to show content</iframe>"
            ),
            r = ".kendoTooltip",
            ot = {
              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" },
            },
            k = {
              top: "bottom",
              bottom: "top",
              left: "right",
              right: "left",
              center: "center",
            },
            d = { bottom: "n", top: "s", left: "e", right: "w", center: "n" },
            st = {
              horizontal: { offset: "top", size: "outerHeight" },
              vertical: { offset: "left", size: "outerWidth" },
            },
            ht = function (n) {
              return n.target.data(i.ns + "title");
            },
            ct = e.extend({
              init: function (n, t) {
                var f,
                  i = this;
                e.fn.init.call(i, n, t);
                f = i.options.position.match(/left|right/)
                  ? "horizontal"
                  : "vertical";
                i.dimensions = st[f];
                i._documentKeyDownHandler = u(i._documentKeyDown, i);
                i.element.on(
                  i.options.showOn + r,
                  i.options.filter,
                  u(i._showOn, i)
                );
                (this._isShownOnMouseEnter() || this._isShownOnClick()) &&
                  i.element.on(
                    "mouseenter" + r,
                    i.options.filter,
                    u(i._mouseenter, i)
                  );
                this.options.autoHide &&
                  this._isShownOnMouseEnter() &&
                  i.element.on(
                    "mouseleave" + r,
                    i.options.filter,
                    u(i._mouseleave, i)
                  );
                this.options.autoHide &&
                  this._isShownOnFocus() &&
                  i.element.on("blur" + r, i.options.filter, u(i._blur, i));
              },
              options: {
                name: "Tooltip",
                filter: "",
                content: ht,
                showAfter: 100,
                hideAfter: 100,
                callout: !0,
                offset: 0,
                position: "bottom",
                showOn: "mouseenter",
                autoHide: !0,
                width: null,
                height: null,
                animation: {
                  open: { effects: "fade:in", duration: 0 },
                  close: { duration: 40, hide: !0 },
                },
              },
              events: [y, p, s, w, b],
              _isShownOnFocus: function () {
                return (
                  this.options.showOn && this.options.showOn.match(/focus/)
                );
              },
              _isShownOnMouseEnter: function () {
                return (
                  this.options.showOn && this.options.showOn.match(/mouseenter/)
                );
              },
              _isShownOnClick: function () {
                return (
                  this.options.showOn && this.options.showOn.match(/click/)
                );
              },
              _mouseenter: function (t) {
                f(n(t.currentTarget));
              },
              _showOn: function (t) {
                var i = this,
                  r = n(t.currentTarget);
                i._isShownOnClick() && !i._isShownOnMouseEnter()
                  ? i._show(r)
                  : i._isShownOnFocus()
                  ? (f(r), i._show(r))
                  : (clearTimeout(i.timeout),
                    (i.timeout = setTimeout(function () {
                      i._show(r);
                    }, i.options.showAfter)));
              },
              _appendContent: function (n) {
                var e,
                  f = this,
                  t = f.options.content,
                  u = f.content,
                  o = f.options.iframe;
                rt(t) && t.url
                  ? ("iframe" in f.options || (o = !ut(t.url)),
                    f.trigger(b, { options: t, target: n }),
                    o
                      ? (u.hide(),
                        (e = u.find("." + h)[0]),
                        e
                          ? (e.src = t.url || e.src)
                          : u.html(et({ content: t })),
                        u
                          .find("." + h)
                          .off("load" + r)
                          .on("load" + r, function () {
                            f.trigger(s);
                            u.show();
                          }))
                      : (u.empty(), i.ui.progress(u, !0), f._ajaxRequest(t)))
                  : t && it(t)
                  ? ((t = t({ sender: this, target: n })), u.html(t || ""))
                  : u.html(t);
                f.angular("compile", function () {
                  return { elements: u };
                });
              },
              _ajaxRequest: function (n) {
                var t = this;
                jQuery.ajax(
                  l(
                    {
                      type: "GET",
                      dataType: "html",
                      cache: !1,
                      error: function (n, r) {
                        i.ui.progress(t.content, !1);
                        t.trigger(w, { status: r, xhr: n });
                      },
                      success: u(function (n) {
                        i.ui.progress(t.content, !1);
                        t.content.html(n);
                        t.trigger(s);
                      }, t),
                    },
                    n
                  )
                );
              },
              _documentKeyDown: function (n) {
                n.keyCode === i.keys.ESC && this.hide();
              },
              refresh: function () {
                var t = this,
                  n = t.popup;
                n && n.options.anchor && t._appendContent(n.options.anchor);
              },
              hide: function () {
                this.popup && this.popup.close();
              },
              show: function (n) {
                n = n || this.element;
                f(n);
                this._show(n);
              },
              _show: function (n) {
                var t = this,
                  i = t.target();
                t.popup || t._initPopup();
                i &&
                  i[0] != n[0] &&
                  (t.popup.close(), t.popup.element.kendoStop(!0, !0));
                (i && i[0] == n[0]) ||
                  (t._appendContent(n), (t.popup.options.anchor = n));
                t.popup.one("deactivate", function () {
                  c(n);
                  n.removeAttr(v);
                  this.element.removeAttr("id").attr("aria-hidden", !0);
                  o.off("keydown" + r, t._documentKeyDownHandler);
                });
                t.popup._hovered = !0;
                t.popup.open();
              },
              _initPopup: function () {
                var f = this,
                  e = f.options,
                  s = n(
                    i.template(ft)({
                      callout: e.callout && "center" !== e.position,
                      dir: d[e.position],
                      autoHide: e.autoHide,
                    })
                  );
                f.popup = new tt(
                  s,
                  l(
                    {
                      autosize: !0,
                      activate: function () {
                        var i = this.options.anchor,
                          n = i[0].id || f.element[0].id;
                        n && (i.attr(v, n + a), this.element.attr("id", n + a));
                        e.callout
                          ? f._positionCallout()
                          : f._offset(f.options.position, f.options.offset);
                        this.element.removeAttr("aria-hidden");
                        o.on("keydown" + r, f._documentKeyDownHandler);
                        f.trigger(y);
                        f.popup._hovered = t;
                      },
                      close: function () {
                        f.trigger(p);
                      },
                      copyAnchorStyles: !1,
                      animation: e.animation,
                    },
                    ot[e.position]
                  )
                );
                s.css({ width: e.width, height: e.height });
                f.content = s.find(".k-tooltip-content");
                f.arrow = s.find(".k-callout");
                e.autoHide && this._isShownOnMouseEnter()
                  ? s.on("mouseleave" + r, u(f._mouseleave, f))
                  : s.on(
                      "click" + r,
                      ".k-tooltip-button",
                      u(f._closeButtonClick, f)
                    );
              },
              _closeButtonClick: function (n) {
                n.preventDefault();
                this.hide();
              },
              _mouseleave: function (n) {
                var t = this;
                clearTimeout(t.timeout);
                t.timeout = setTimeout(function () {
                  t._closePopup(n.currentTarget);
                }, t.options.hideAfter);
              },
              _blur: function (n) {
                this._closePopup(n.currentTarget);
              },
              _closePopup: function (t) {
                this.popup && !this.popup._hovered
                  ? this.popup.close()
                  : c(n(t));
              },
              target: function () {
                return this.popup ? this.popup.options.anchor : null;
              },
              _positionCallout: function () {
                var t = this,
                  i = t.options.position,
                  f = t.dimensions,
                  r = f.offset,
                  u = t.popup,
                  e = u.options.anchor,
                  o = n(e).offset(),
                  s = n(u.element).offset(),
                  h = d[u.flipped ? k[i] : i],
                  c = o[r] - s[r] + n(e)[f.size]() / 2;
                t._offset(i, t.options.offset);
                t.arrow
                  .removeClass(
                    "k-callout-n k-callout-s k-callout-w k-callout-e"
                  )
                  .addClass("k-callout-" + h)
                  .css(r, c);
              },
              destroy: function () {
                var n = this.popup;
                n && (n.element.off(r), n.destroy());
                clearTimeout(this.timeout);
                this.element.off(r);
                o.off("keydown" + r, this._documentKeyDownHandler);
                e.fn.destroy.call(this);
              },
              _offset: function (n, t) {
                var r = this,
                  u = "top" == n || "left" == n,
                  f = r.popup.flipped,
                  e = (u && f) || (!u && !f) ? 1 : -1,
                  o = u ? "margin-" + n : "margin-" + k[n],
                  s = i._outerWidth(r.arrow) / 2 + t;
                r.popup.wrapper.css(o, s * e + "px");
              },
            });
          i.ui.plugin(ct);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.list.min", ["kendo.data.min", "kendo.popup.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function o(n, i) {
            return (
              n !== t &&
                "" !== n &&
                null !== n &&
                ("boolean" === i
                  ? ("boolean" != typeof n && (n = "true" === n.toLowerCase()),
                    (n = !!n))
                  : "number" === i
                  ? (n = +n)
                  : "string" === i && (n = "" + n)),
              n
            );
          }
          function s(n) {
            return n[n.length - 1];
          }
          function w(n) {
            var t = n.selectedIndex;
            return t > -1 ? n.options[t] : {};
          }
          function kt(n, t) {
            var r,
              f,
              i,
              u,
              h = t.length,
              e = n.length,
              o = [],
              s = [];
            if (e)
              for (i = 0; i < e; i++) {
                for (r = n[i], f = !1, u = 0; u < h; u++)
                  if (r === t[u]) {
                    f = !0;
                    o.push({ index: i, item: r });
                    break;
                  }
                f || s.push(r);
              }
            return { changed: o, unchanged: s };
          }
          function nt(t) {
            return (
              !(!t || n.isEmptyObject(t)) && !(t.filters && !t.filters.length)
            );
          }
          function b(t, i) {
            var u,
              r = !1;
            return (
              t.filters &&
                ((u = n.grep(t.filters, function (n) {
                  return (
                    (r = b(n, i)), n.filters ? n.filters.length : n.field != i
                  );
                })),
                r || t.filters.length === u.length || (r = !0),
                (t.filters = u)),
              r
            );
          }
          var h,
            tt,
            i = window.kendo,
            v = i.ui,
            it = i._outerHeight,
            rt = /^\d+(\.\d+)?%$/i,
            c = v.Widget,
            f = i.keys,
            e = i.support,
            dt = i.htmlEncode,
            ut = i._activeElement,
            ft = i._outerWidth,
            gt = i.data.ObservableArray,
            y = "id",
            u = "change",
            et = "k-state-focused",
            k = "k-state-hover",
            ot = "k-i-loading",
            st = ".k-group-header",
            ht = ".k-item",
            ni = "_label",
            ct = "open",
            lt = "close",
            p = "cascade",
            d = "select",
            at = "selected",
            vt = "requestStart",
            yt = "requestEnd",
            l = n.extend,
            r = n.proxy,
            ti = n.isArray,
            g = e.browser,
            pt = "k-hidden",
            wt = "width",
            ii = g.msie,
            ri = ii && g.version < 9,
            ui = /"/g,
            bt = {
              ComboBox: ["DropDownList", "MultiColumnComboBox"],
              DropDownList: ["ComboBox", "MultiColumnComboBox"],
              MultiColumnComboBox: ["ComboBox", "DropDownList"],
            },
            a = i.ui.DataBoundWidget.extend({
              init: function (t, u) {
                var e,
                  f = this,
                  o = f.ns;
                c.fn.init.call(f, t, u);
                t = f.element;
                u = f.options;
                f._isSelect = t.is(d);
                f._isSelect &&
                  f.element[0].length &&
                  (u.dataSource ||
                    ((u.dataTextField = u.dataTextField || "text"),
                    (u.dataValueField = u.dataValueField || "value")));
                f.ul = n('<ul unselectable="on" class="k-list k-reset"/>').attr(
                  { tabIndex: -1, "aria-hidden": !0 }
                );
                f.list = n("<div class='k-list-container'/>")
                  .append(f.ul)
                  .on("mousedown" + o, r(f._listMousedown, f));
                e = t.attr(y);
                e || (e = i.guid());
                f.list.attr(y, e + "-list");
                f.ul.attr(y, e + "_listbox");
                u.columns &&
                  u.columns.length &&
                  (f.ul.removeClass("k-list").addClass("k-grid-list"),
                  f._columnsHeader());
                f._header();
                f._noData();
                f._footer();
                f._accessors();
                f._initValue();
              },
              options: {
                valuePrimitive: !1,
                footerTemplate: "",
                headerTemplate: "",
                noDataTemplate: !0,
                messages: { noData: "No data found.", clear: "clear" },
              },
              setOptions: function (n) {
                c.fn.setOptions.call(this, n);
                n && n.enable !== t && (n.enabled = n.enable);
                n.columns && n.columns.length && this._columnsHeader();
                this._header();
                this._noData();
                this._footer();
                this._renderFooter();
                this._renderNoData();
              },
              focus: function () {
                this._focused.focus();
              },
              readonly: function (n) {
                this._editable({ readonly: n === t || n, disable: !1 });
              },
              enable: function (n) {
                this._editable({ readonly: !1, disable: !(n = n === t || n) });
              },
              _header: function () {
                var e,
                  u = this,
                  r = n(u.header),
                  f = u.options.headerTemplate;
                return (
                  this._angularElement(r, "cleanup"),
                  i.destroy(r),
                  r.remove(),
                  f
                    ? ((e = "function" != typeof f ? i.template(f) : f),
                      (r = n(e({}))),
                      (u.header = r[0] ? r : null),
                      u.list.prepend(r),
                      this._angularElement(u.header, "compile"),
                      t)
                    : ((u.header = null), t)
                );
              },
              _columnsHeader: function () {
                var f,
                  o,
                  t,
                  s,
                  r,
                  v,
                  h,
                  y,
                  c,
                  a,
                  u,
                  l = this,
                  e = n(l.columnsHeader);
                for (
                  this._angularElement(e, "cleanup"),
                    i.destroy(e),
                    e.remove(),
                    f =
                      "<div class='k-grid-header'><div class='k-grid-header-wrap'><table role='presentation'>",
                    o = "<colgroup>",
                    t = "<tr>",
                    s = 0;
                  s < this.options.columns.length;
                  s++
                )
                  (r = this.options.columns[s]),
                    (v = r.title || r.field || ""),
                    (h = r.headerTemplate || v),
                    (y = "function" != typeof h ? i.template(h) : h),
                    (c = r.width),
                    (a = parseInt(c, 10)),
                    (u = ""),
                    c &&
                      !isNaN(a) &&
                      ((u += "style='width:"),
                      (u += a),
                      (u += rt.test(c) ? "%" : "px"),
                      (u += ";'")),
                    (o += "<col " + u + "/>"),
                    (t += "<th class='k-header'>"),
                    (t += y(r)),
                    (t += "</th>");
                o += "</colgroup>";
                t += "</tr>";
                f += o;
                f += t;
                f += "</table></div></div>";
                l.columnsHeader = e = n(f);
                l.list.prepend(e);
                this._angularElement(l.columnsHeader, "compile");
              },
              _noData: function () {
                var r = this,
                  f = n(r.noData),
                  u =
                    r.options.noDataTemplate === !0
                      ? r.options.messages.noData
                      : r.options.noDataTemplate;
                return (
                  r.angular("cleanup", function () {
                    return { elements: f };
                  }),
                  i.destroy(f),
                  f.remove(),
                  u
                    ? ((r.noData = n(
                        '<div class="k-nodata" style="display:none"><div></div></div>'
                      ).appendTo(r.list)),
                      (r.noDataTemplate =
                        "function" != typeof u ? i.template(u) : u),
                      t)
                    : ((r.noData = null), t)
                );
              },
              _footer: function () {
                var r = this,
                  f = n(r.footer),
                  u = r.options.footerTemplate;
                return (
                  this._angularElement(f, "cleanup"),
                  i.destroy(f),
                  f.remove(),
                  u
                    ? ((r.footer = n('<div class="k-footer"></div>').appendTo(
                        r.list
                      )),
                      (r.footerTemplate =
                        "function" != typeof u ? i.template(u) : u),
                      t)
                    : ((r.footer = null), t)
                );
              },
              _listOptions: function (t) {
                var u = this,
                  f = u.options,
                  e = f.virtual,
                  o = { change: r(u._listChange, u) },
                  s = r(u._listBound, u);
                return (
                  (e = "object" == typeof e ? e : {}),
                  (t = n.extend(
                    {
                      autoBind: !1,
                      selectable: !0,
                      dataSource: u.dataSource,
                      click: r(u._click, u),
                      activate: r(u._activateItem, u),
                      columns: f.columns,
                      deactivate: r(u._deactivateItem, u),
                      dataBinding: function () {
                        u.trigger("dataBinding");
                      },
                      dataBound: s,
                      height: f.height,
                      dataValueField: f.dataValueField,
                      dataTextField: f.dataTextField,
                      groupTemplate: f.groupTemplate,
                      fixedGroupTemplate: f.fixedGroupTemplate,
                      template: f.template,
                    },
                    t,
                    e,
                    o
                  )),
                  t.template ||
                    (t.template = "#:" + i.expr(t.dataTextField, "data") + "#"),
                  f.$angular && (t.$angular = f.$angular),
                  t
                );
              },
              _initList: function () {
                var n = this,
                  t = n._listOptions({
                    selectedItemChange: r(n._listChange, n),
                  });
                n.listView = n.options.virtual
                  ? new i.ui.VirtualList(n.ul, t)
                  : new i.ui.StaticList(n.ul, t);
                n.listView.bind("listBound", r(n._listBound, n));
                n._setListValue();
              },
              _setListValue: function (n) {
                n = n || this.options.value;
                n !== t &&
                  this.listView
                    .value(n)
                    .done(r(this._updateSelectionState, this));
              },
              _updateSelectionState: n.noop,
              _listMousedown: function (n) {
                (this.filterInput && this.filterInput[0] === n.target) ||
                  n.preventDefault();
              },
              _isFilterEnabled: function () {
                var n = this.options.filter;
                return n && "none" !== n;
              },
              _hideClear: function () {
                var n = this;
                n._clear && n._clear.addClass(pt);
              },
              _showClear: function () {
                this._clear && this._clear.removeClass(pt);
              },
              _clearValue: function () {
                this._clearText();
                this._accessor("");
                this.listView.value([]);
                this._isSelect && (this._customOption = t);
                this._isFilterEnabled() &&
                  !this.options.enforceMinLength &&
                  (this._filter({ word: "", open: !1 }),
                  this.options.highlightFirst && this.listView.focus(0));
                this._change();
              },
              _clearText: function () {
                this.text("");
              },
              _clearFilter: function () {
                this.options.virtual || this.listView.bound(!1);
                this._filterSource();
              },
              _filterSource: function (n, t) {
                var r,
                  e,
                  f = this,
                  o = f.options,
                  h =
                    o.filterFields &&
                    n &&
                    n.logic &&
                    n.filters &&
                    n.filters.length,
                  i = f.dataSource,
                  u = l({}, i.filter() || {}),
                  s = n || (u.filters && u.filters.length && !n),
                  c = b(u, o.dataTextField);
                if (
                  (this._clearFilterExpressions(u),
                  (!n && !c) || !f.trigger("filtering", { filter: n }))
                )
                  return (
                    (r = { filters: [], logic: "and" }),
                    h ? r.filters.push(n) : this._pushFilterExpression(r, n),
                    nt(u) &&
                      (r.logic === u.logic
                        ? (r.filters = r.filters.concat(u.filters))
                        : r.filters.push(u)),
                    f._cascading && this.listView.setDSFilter(r),
                    (e = l(
                      {},
                      {
                        page: s ? 1 : i.page(),
                        pageSize: s ? i.options.pageSize : i.pageSize(),
                        sort: i.sort(),
                        filter: i.filter(),
                        group: i.group(),
                        aggregate: i.aggregate(),
                      },
                      { filter: r }
                    )),
                    i[t ? "read" : "query"](i._mergeState(e))
                  );
              },
              _pushFilterExpression: function (n, t) {
                nt(t) && "" !== t.value && n.filters.push(t);
              },
              _clearFilterExpressions: function (n) {
                var i, t;
                if (n.filters) {
                  for (t = 0; t < n.filters.length; t++)
                    "fromFilter" in n.filters[t] && (i = t);
                  isNaN(i) || n.filters.splice(i, 1);
                }
              },
              _angularElement: function (n, t) {
                n &&
                  this.angular(t, function () {
                    return { elements: n };
                  });
              },
              _renderNoData: function () {
                var t = this,
                  n = t.noData;
                n &&
                  (this._angularElement(n, "cleanup"),
                  n.children(":first").html(t.noDataTemplate({ instance: t })),
                  this._angularElement(n, "compile"));
              },
              _toggleNoData: function (t) {
                n(this.noData).toggle(t);
              },
              _toggleHeader: function (n) {
                var t = this.listView.content.prev(st);
                t.toggle(n);
              },
              _renderFooter: function () {
                var t = this,
                  n = t.footer;
                n &&
                  (this._angularElement(n, "cleanup"),
                  n.html(t.footerTemplate({ instance: t })),
                  this._angularElement(n, "compile"));
              },
              _allowOpening: function () {
                return (
                  this.options.noDataTemplate ||
                  this.dataSource.flatView().length
                );
              },
              _initValue: function () {
                var n = this,
                  t = n.options.value;
                null !== t
                  ? n.element.val(t)
                  : ((t = n._accessor()), (n.options.value = t));
                n._old = t;
              },
              _ignoreCase: function () {
                var n,
                  t = this,
                  i = t.dataSource.reader.model;
                i &&
                  i.fields &&
                  ((n = i.fields[t.options.dataTextField]),
                  n &&
                    n.type &&
                    "string" !== n.type &&
                    (t.options.ignoreCase = !1));
              },
              _focus: function (n) {
                return this.listView.focus(n);
              },
              _filter: function (n) {
                var i,
                  r,
                  t = this,
                  f = t.options,
                  e = n.word,
                  u = f.filterFields,
                  o = f.dataTextField;
                if (u && u.length)
                  for (
                    i = { logic: "or", filters: [], fromFilter: !0 }, r = 0;
                    r < u.length;
                    r++
                  )
                    this._pushFilterExpression(i, t._buildExpression(e, u[r]));
                else i = t._buildExpression(e, o);
                t._open = n.open;
                t._filterSource(i);
              },
              _buildExpression: function (n, t) {
                var i = this,
                  r = i.options,
                  u = r.ignoreCase,
                  f = i.dataSource.options.accentFoldingFiltering;
                return {
                  value: u ? (f ? n.toLocaleLowerCase(f) : n.toLowerCase()) : n,
                  field: t,
                  operator: r.filter,
                  ignoreCase: u,
                };
              },
              _clearButton: function () {
                var t = this,
                  i = t.options.messages.clear;
                t._clear ||
                  (t._clear = n(
                    '<span unselectable="on" class="k-icon k-clear-value k-i-close" title="' +
                      i +
                      '"></span>'
                  ).attr({ role: "button", tabIndex: -1 }));
                t.options.clearButton || t._clear.remove();
                this._hideClear();
              },
              search: function (t) {
                var i = this.options;
                t = "string" == typeof t ? t : this._inputValue();
                clearTimeout(this._typingTimeout);
                ((!i.enforceMinLength && !t.length) ||
                  t.length >= i.minLength) &&
                  ((this._state = "filter"),
                  this.listView &&
                    (this.listView._emptySearch = !n.trim(t).length),
                  this._isFilterEnabled()
                    ? this._filter({ word: t, open: !0 })
                    : this._searchByWord(t));
              },
              current: function (n) {
                return this._focus(n);
              },
              items: function () {
                return this.ul[0].children;
              },
              destroy: function () {
                var n = this,
                  t = n.ns;
                c.fn.destroy.call(n);
                n._unbindDataSource();
                n.listView.destroy();
                n.list.off(t);
                n.popup.destroy();
                n._form && n._form.off("reset", n._resetHandler);
              },
              dataItem: function (i) {
                var r = this;
                if (i === t) return r.listView.selectedDataItems()[0];
                if ("number" != typeof i) {
                  if (r.options.virtual)
                    return r.dataSource.getByUid(n(i).data("uid"));
                  i = n(r.items()).index(i);
                }
                return r.dataSource.flatView()[i];
              },
              _activateItem: function () {
                var n = this.listView.focus();
                n &&
                  this._focused
                    .add(this.filterInput)
                    .attr("aria-activedescendant", n.attr("id"));
              },
              _deactivateItem: function () {
                this._focused
                  .add(this.filterInput)
                  .removeAttr("aria-activedescendant");
              },
              _accessors: function () {
                var t = this,
                  r = t.element,
                  n = t.options,
                  u = i.getter,
                  f = r.attr(i.attr("text-field")),
                  e = r.attr(i.attr("value-field"));
                !n.dataTextField && f && (n.dataTextField = f);
                !n.dataValueField && e && (n.dataValueField = e);
                t._text = u(n.dataTextField);
                t._value = u(n.dataValueField);
              },
              _aria: function (n) {
                var i = this,
                  r = i.options,
                  u = i._focused.add(i.filterInput);
                r.suggest !== t &&
                  u.attr("aria-autocomplete", r.suggest ? "both" : "list");
                n = n ? n + " " + i.ul[0].id : i.ul[0].id;
                u.attr("aria-owns", n);
                i.ul.attr("aria-live", i._isFilterEnabled() ? "polite" : "off");
                i._ariaLabel();
              },
              _ariaLabel: function () {
                var e,
                  u = this,
                  t = u._focused,
                  r = u.element,
                  o = r.attr("id"),
                  f = n('label[for="' + o + '"]'),
                  s = r.attr("aria-label"),
                  h = r.attr("aria-labelledby");
                t !== r &&
                  (s
                    ? t.attr("aria-label", s)
                    : h
                    ? t.attr("aria-labelledby", h)
                    : f.length &&
                      ((e =
                        f.attr("id") || u._generateLabelId(f, o || i.guid())),
                      t.attr("aria-labelledby", e)));
              },
              _generateLabelId: function (n, t) {
                var i = t + ni;
                return n.attr("id", i), i;
              },
              _blur: function () {
                var n = this;
                n._change();
                n.close();
              },
              _change: function () {
                var r,
                  n = this,
                  f = n.selectedIndex,
                  e = n.options.value,
                  i = n.value();
                n._isSelect && !n.listView.bound() && e && (i = e);
                i !== o(n._old, typeof i) && i !== o(n._oldText, typeof i)
                  ? (r = !0)
                  : n._valueBeforeCascade !== t &&
                    n._valueBeforeCascade !==
                      o(n._old, typeof n._valueBeforeCascade) &&
                    n._userTriggered
                  ? (r = !0)
                  : f === t ||
                    f === n._oldIndex ||
                    n.listView.isFiltered() ||
                    (r = !0);
                r &&
                  ((n._valueBeforeCascade = n._old =
                    null === n._old || "" === n._old || "" === i
                      ? i
                      : n.dataItem()
                      ? n.options.dataValueField
                        ? n.dataItem()[n.options.dataValueField]
                        : n.dataItem()
                      : null),
                  (n._oldIndex = f),
                  (n._oldText = n.text && n.text()),
                  n._typing || n.element.trigger(u),
                  n.trigger(u));
                n.typing = !1;
              },
              _data: function () {
                return this.dataSource.view();
              },
              _enable: function () {
                var n = this,
                  i = n.options,
                  r = n.element.is("[disabled]");
                i.enable !== t && (i.enabled = i.enable);
                !i.enabled || r
                  ? n.enable(!1)
                  : n.readonly(n.element.is("[readonly]"));
              },
              _dataValue: function (n) {
                var i = this._value(n);
                return i === t && (i = this._text(n)), i;
              },
              _offsetHeight: function () {
                var t = 0,
                  i = this.listView.content.prevAll(":visible");
                return (
                  i.each(function () {
                    var i = n(this);
                    t += it(i, !0);
                  }),
                  t
                );
              },
              _height: function (i) {
                var o,
                  f,
                  s,
                  u = this,
                  e = u.list,
                  r = u.options.height,
                  h = u.popup.visible();
                if (i || u.options.noDataTemplate) {
                  if (
                    ((f = e.add(e.parent(".k-animation-container")).show()),
                    !e.is(":visible"))
                  )
                    return f.hide(), t;
                  r = u.listView.content[0].scrollHeight > r ? r : "auto";
                  f.height(r);
                  "auto" !== r &&
                    ((o = u._offsetHeight()),
                    (s = it(n(u.footer)) || 0),
                    (r = r - o - s));
                  u.listView.content.height(r);
                  h || f.hide();
                }
                return r;
              },
              _openHandler: function (n) {
                this._adjustListWidth();
                this.trigger(ct)
                  ? n.preventDefault()
                  : (this._focused.attr("aria-expanded", !0),
                    this.ul.attr("aria-hidden", !1));
              },
              _adjustListWidth: function () {
                var n,
                  r,
                  u = this,
                  t = u.list,
                  i = t[0].style.width,
                  f = u.wrapper;
                if (t.data(wt) || !i)
                  return (
                    (n = window.getComputedStyle
                      ? window.getComputedStyle(f[0], null)
                      : 0),
                    (r = parseFloat(n && n.width) || ft(f)),
                    n &&
                      g.msie &&
                      (r +=
                        parseFloat(n.paddingLeft) +
                        parseFloat(n.paddingRight) +
                        parseFloat(n.borderLeftWidth) +
                        parseFloat(n.borderRightWidth)),
                    (i =
                      "border-box" !== t.css("box-sizing")
                        ? r - (ft(t) - t.width())
                        : r),
                    t
                      .css({
                        fontFamily: f.css("font-family"),
                        width: u.options.autoWidth ? "auto" : i,
                        minWidth: i,
                        whiteSpace: u.options.autoWidth ? "nowrap" : "normal",
                      })
                      .data(wt, i),
                    !0
                  );
              },
              _closeHandler: function (n) {
                this.trigger(lt)
                  ? n.preventDefault()
                  : (this._focused.attr("aria-expanded", !1),
                    this.ul.attr("aria-hidden", !0));
              },
              _focusItem: function () {
                var n = this.listView,
                  r = !n.focus(),
                  i = s(n.select());
                i === t && this.options.highlightFirst && r && (i = 0);
                i !== t ? n.focus(i) : r && n.scrollToIndex(0);
              },
              _calculateGroupPadding: function (n) {
                var f = this.ul.children(".k-first:first"),
                  r = this.listView.content.prev(st),
                  u = 0,
                  t = "right";
                r[0] &&
                  "none" !== r[0].style.display &&
                  ("auto" !== n && (u = i.support.scrollbar()),
                  this.element.parents(".k-rtl").length && (t = "left"),
                  (u +=
                    parseFloat(f.css("border-" + t + "-width"), 10) +
                    parseFloat(f.children(".k-group").css("padding-" + t), 10)),
                  r.css("padding-" + t, u));
              },
              _calculatePopupHeight: function (n) {
                var t = this._height(this.dataSource.flatView().length || n);
                this._calculateGroupPadding(t);
                this._calculateColumnsHeaderPadding(t);
              },
              _calculateColumnsHeaderPadding: function (n) {
                var t, r, u;
                this.options.columns &&
                  this.options.columns.length &&
                  ((t = this),
                  (r = e.isRtl(t.wrapper)),
                  (u = i.support.scrollbar()),
                  t.columnsHeader.css(
                    r ? "padding-left" : "padding-right",
                    "auto" !== n ? u : 0
                  ));
              },
              _refreshScroll: function () {
                var n = this.listView,
                  t = n.element.height() > n.content.height();
                this.options.autoWidth &&
                  n.content.css({
                    overflowX: "hidden",
                    overflowY: t ? "scroll" : "auto",
                  });
              },
              _resizePopup: function (n) {
                this.options.virtual ||
                  (this.popup.element.is(":visible")
                    ? this._calculatePopupHeight(n)
                    : (this.popup.one(
                        "open",
                        function (n) {
                          return r(function () {
                            this._calculatePopupHeight(n);
                          }, this);
                        }.call(this, n)
                      ),
                      this.popup.one(
                        "activate",
                        r(this._refreshScroll, this)
                      )));
              },
              _popup: function () {
                var n = this;
                n.popup = new v.Popup(
                  n.list,
                  l({}, n.options.popup, {
                    anchor: n.wrapper,
                    open: r(n._openHandler, n),
                    close: r(n._closeHandler, n),
                    animation: n.options.animation,
                    isRtl: e.isRtl(n.wrapper),
                    autosize: n.options.autoWidth,
                  })
                );
              },
              _makeUnselectable: function () {
                ri &&
                  this.list
                    .find("*")
                    .not(".k-textbox")
                    .attr("unselectable", "on");
              },
              _toggleHover: function (t) {
                n(t.currentTarget).toggleClass(k, "mouseenter" === t.type);
              },
              _toggle: function (n, i) {
                var r = this,
                  u = e.mobileOS && (e.touch || e.MSPointers || e.pointers);
                n = n !== t ? n : !r.popup.visible();
                i ||
                  u ||
                  r._focused[0] === ut() ||
                  ((r._prevent = !0), r._focused.focus(), (r._prevent = !1));
                r[n ? ct : lt]();
              },
              _triggerCascade: function () {
                var n = this;
                (n._cascadeTriggered &&
                  n.value() === o(n._cascadedValue, typeof n.value())) ||
                  ((n._cascadedValue = n.value()),
                  (n._cascadeTriggered = !0),
                  n.trigger(p, { userTriggered: n._userTriggered }));
              },
              _triggerChange: function () {
                this._valueBeforeCascade !== this.value() && this.trigger(u);
              },
              _unbindDataSource: function () {
                var n = this;
                n.dataSource
                  .unbind(vt, n._requestStartHandler)
                  .unbind(yt, n._requestEndHandler)
                  .unbind("error", n._errorHandler);
              },
              requireValueMapper: function (n, t) {
                var i =
                  (n.value instanceof Array ? n.value.length : n.value) ||
                  (t instanceof Array ? t.length : t);
                if (
                  i &&
                  n.virtual &&
                  "function" != typeof n.virtual.valueMapper
                )
                  throw Error(
                    "ValueMapper is not provided while the value is being set. See http://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#the-valuemapper-function"
                  );
              },
            });
          l(a, {
            inArray: function (n, t) {
              var i,
                r,
                u = t.children;
              if (!n || n.parentNode !== t) return -1;
              for (i = 0, r = u.length; i < r; i++) if (n === u[i]) return i;
              return -1;
            },
            unifyType: o,
          });
          i.ui.List = a;
          v.Select = a.extend({
            init: function (n, t) {
              a.fn.init.call(this, n, t);
              this._initial = this.element.val();
            },
            setDataSource: function (n) {
              var i,
                t = this;
              t.options.dataSource = n;
              t._dataSource();
              t.listView.bound() &&
                ((t._initialIndex = null), (t.listView._current = null));
              t.listView.setDataSource(t.dataSource);
              t.options.autoBind && t.dataSource.fetch();
              i = t._parentWidget();
              i && t._cascadeSelect(i);
            },
            close: function () {
              this.popup.close();
            },
            select: function (n) {
              var i = this;
              return n === t
                ? i.selectedIndex
                : i._select(n).done(function () {
                    i._cascadeValue = i._old = i._accessor();
                    i._oldIndex = i.selectedIndex;
                  });
            },
            _accessor: function (n, t) {
              return this[
                this._isSelect ? "_accessorSelect" : "_accessorInput"
              ](n, t);
            },
            _accessorInput: function (n) {
              var i = this.element[0];
              return n === t
                ? i.value
                : (null === n && (n = ""), (i.value = n), t);
            },
            _accessorSelect: function (n, i) {
              var u,
                r = this.element[0];
              return n === t
                ? w(r).value || ""
                : ((w(r).selected = !1),
                  i === t && (i = -1),
                  (u = null !== n && "" !== n),
                  u && i == -1
                    ? this._custom(n)
                    : n
                    ? (r.value = n)
                    : (r.selectedIndex = i),
                  t);
            },
            _syncValueAndText: function () {
              return !0;
            },
            _custom: function (t) {
              var r = this,
                u = r.element,
                i = r._customOption;
              i || ((i = n("<option/>")), (r._customOption = i), u.append(i));
              i.text(t);
              i[0].selected = !0;
            },
            _hideBusy: function () {
              var n = this;
              clearTimeout(n._busy);
              n._arrowIcon.removeClass(ot);
              n._focused.attr("aria-busy", !1);
              n._busy = null;
              n._showClear();
            },
            _showBusy: function (n) {
              var t = this;
              n.isDefaultPrevented() ||
                ((t._request = !0),
                t._busy ||
                  (t._busy = setTimeout(function () {
                    t._arrowIcon &&
                      (t._focused.attr("aria-busy", !0),
                      t._arrowIcon.addClass(ot),
                      t._hideClear());
                  }, 100)));
            },
            _requestEnd: function () {
              this._request = !1;
              this._hideBusy();
            },
            _dataSource: function () {
              var e,
                t = this,
                o = t.element,
                f = t.options,
                u = f.dataSource || {};
              u = n.isArray(u) ? { data: u } : u;
              t._isSelect &&
                ((e = o[0].selectedIndex),
                e > -1 && (f.index = e),
                (u.select = o),
                (u.fields = [
                  { field: f.dataTextField },
                  { field: f.dataValueField },
                ]));
              t.dataSource
                ? t._unbindDataSource()
                : ((t._requestStartHandler = r(t._showBusy, t)),
                  (t._requestEndHandler = r(t._requestEnd, t)),
                  (t._errorHandler = r(t._hideBusy, t)));
              t.dataSource = i.data.DataSource.create(u)
                .bind(vt, t._requestStartHandler)
                .bind(yt, t._requestEndHandler)
                .bind("error", t._errorHandler);
            },
            _firstItem: function () {
              this.listView.focusFirst();
            },
            _lastItem: function () {
              this.listView.focusLast();
            },
            _nextItem: function () {
              this.listView.focusNext();
            },
            _prevItem: function () {
              this.listView.focusPrev();
            },
            _move: function (n) {
              var r,
                h,
                e,
                y,
                c,
                l,
                p,
                i = this,
                s = i.listView,
                o = n.keyCode,
                v = o === f.DOWN;
              if (o === f.UP || v) {
                if (n.altKey) i.toggle(v);
                else {
                  if (!s.bound() && !i.ul[0].firstChild)
                    return (
                      i._fetch ||
                        (i.dataSource.one(u, function () {
                          i._fetch = !1;
                          i._move(n);
                        }),
                        (i._fetch = !0),
                        i._filterSource()),
                      n.preventDefault(),
                      !0
                    );
                  if (
                    ((e = i._focus()),
                    i._fetch ||
                      (e && !e.hasClass("k-state-selected")) ||
                      (v
                        ? (i._nextItem(), i._focus() || i._lastItem())
                        : (i._prevItem(), i._focus() || i._firstItem())),
                    (r = s.dataItemByIndex(s.getElementIndex(i._focus()))),
                    i.trigger(d, { dataItem: r, item: i._focus() }))
                  )
                    return i._focus(e), t;
                  i._select(i._focus(), !0).done(function () {
                    i.popup.visible() || i._blur();
                    i._cascadedValue =
                      null === i._cascadedValue
                        ? i.value()
                        : i.dataItem()
                        ? i.dataItem()[i.options.dataValueField] || i.dataItem()
                        : null;
                  });
                }
                n.preventDefault();
                h = !0;
              } else if (o === f.ENTER || o === f.TAB) {
                if (
                  (i.popup.visible() && n.preventDefault(),
                  (e = i._focus()),
                  (r = i.dataItem()),
                  i.popup.visible() ||
                    (r && i.text() === i._text(r)) ||
                    (e = null),
                  (y = i.filterInput && i.filterInput[0] === ut()),
                  e)
                ) {
                  if (
                    ((r = s.dataItemByIndex(s.getElementIndex(e))),
                    (l = !0),
                    r &&
                      (l =
                        i._value(r) !==
                        a.unifyType(i.value(), typeof i._value(r))),
                    l && i.trigger(d, { dataItem: r, item: e }))
                  )
                    return;
                  c = i._select(e);
                } else
                  i.input &&
                    ((i._syncValueAndText() || i._isSelect) &&
                      i._accessor(i.input.val()),
                    i.listView.value(i.input.val()));
                i._focusElement && i._focusElement(i.wrapper);
                y && o === f.TAB
                  ? i.wrapper.focusout()
                  : c && "function" == typeof c.done
                  ? c.done(function () {
                      i._blur();
                    })
                  : i._blur();
                i.close();
                h = !0;
              } else
                o === f.ESC
                  ? (i.popup.visible() && n.preventDefault(),
                    i.close(),
                    (h = !0))
                  : !i.popup.visible() ||
                    (o !== f.PAGEDOWN && o !== f.PAGEUP) ||
                    (n.preventDefault(),
                    (p = o === f.PAGEDOWN ? 1 : -1),
                    s.scrollWith(p * s.screenHeight()),
                    (h = !0));
              return h;
            },
            _fetchData: function () {
              var n = this,
                t = !!n.dataSource.view().length;
              n._request ||
                n.options.cascadeFrom ||
                n.listView.bound() ||
                n._fetch ||
                t ||
                ((n._fetch = !0),
                n.dataSource.fetch().done(function () {
                  n._fetch = !1;
                }));
            },
            _options: function (n, i, r) {
              var u,
                o,
                s,
                f,
                h = this,
                a = h.element,
                e = a[0],
                v = n.length,
                c = "",
                l = 0;
              for (i && (c = i); l < v; l++)
                (u = "<option"),
                  (o = n[l]),
                  (s = h._text(o)),
                  (f = h._value(o)),
                  f !== t &&
                    ((f += ""),
                    f.indexOf('"') !== -1 && (f = f.replace(ui, "&quot;")),
                    (u += ' value="' + f + '"')),
                  (u += ">"),
                  s !== t && (u += dt(s)),
                  (u += "</option>"),
                  (c += u);
              a.html(c);
              r !== t &&
                ((e.value = r), e.value && !r && (e.selectedIndex = -1));
              e.selectedIndex !== -1 &&
                ((u = w(e)), u && u.setAttribute(at, at));
            },
            _reset: function () {
              var t = this,
                i = t.element,
                r = i.attr("form"),
                u = r ? n("#" + r) : i.closest("form");
              u[0] &&
                ((t._resetHandler = function () {
                  setTimeout(function () {
                    t.value(t._initial);
                  });
                }),
                (t._form = u.on("reset", t._resetHandler)));
            },
            _parentWidget: function () {
              var r,
                t,
                i,
                u = this.options.name;
              if (this.options.cascadeFrom) {
                if (
                  ((r = n("#" + this.options.cascadeFrom)),
                  (t = r.data("kendo" + u)),
                  !t)
                )
                  for (
                    i = 0;
                    i < bt[u].length && !(t = r.data("kendo" + bt[u][i]));
                    i += 1
                  );
                return t;
              }
            },
            _cascade: function () {
              var t,
                n = this,
                i = n.options,
                u = i.cascadeFrom;
              if (u) {
                if (((t = n._parentWidget()), !t)) return;
                n._cascadeHandlerProxy = r(n._cascadeHandler, n);
                n._cascadeFilterRequests = [];
                i.autoBind = !1;
                t.bind("set", function () {
                  n.one("set", function (t) {
                    n._selectedValue = t.value || n._accessor();
                  });
                });
                t.first(p, n._cascadeHandlerProxy);
                t.listView.bound()
                  ? (n._toggleCascadeOnFocus(), n._cascadeSelect(t))
                  : (t.one("dataBound", function () {
                      n._toggleCascadeOnFocus();
                      t.popup.visible() && t._focused.focus();
                    }),
                    t.value() || n.enable(!1));
              }
            },
            _toggleCascadeOnFocus: function () {
              var t = this,
                n = t._parentWidget();
              n._focused.add(n.filterInput).bind("focus", function () {
                n.unbind(p, t._cascadeHandlerProxy);
                n.first(u, t._cascadeHandlerProxy);
              });
              n._focused.add(n.filterInput).bind("focusout", function () {
                n.unbind(u, t._cascadeHandlerProxy);
                n.first(p, t._cascadeHandlerProxy);
              });
            },
            _cascadeHandler: function (n) {
              var t = this._parentWidget(),
                i = this.value();
              this._userTriggered = n.userTriggered;
              this.listView.bound() && this._clearSelection(t, !0);
              this._cascadeSelect(t, i);
            },
            _cascadeChange: function (n) {
              var t = this,
                i = t._accessor() || t._selectedValue;
              t._cascadeFilterRequests.length || (t._selectedValue = null);
              t._userTriggered
                ? t._clearSelection(n, !0)
                : i
                ? (i !== o(t.listView.value()[0], typeof i) && t.value(i),
                  (t.dataSource.view()[0] && t.selectedIndex !== -1) ||
                    t._clearSelection(n, !0))
                : t.dataSource.flatView().length && t.select(t.options.index);
              t.enable();
              t._triggerCascade();
              t._triggerChange();
              t._userTriggered = !1;
            },
            _cascadeSelect: function (n, i) {
              var o,
                u,
                r = this,
                f = n.dataItem(),
                e = f
                  ? f[r.options.cascadeFromParentField] || n._value(f)
                  : null,
                s = r.options.cascadeFromField || n.options.dataValueField;
              r._valueBeforeCascade = i !== t ? i : r.value();
              e || 0 === e
                ? ((o = r.dataSource.filter() || {}),
                  b(o, s),
                  (u = function () {
                    var t = r._cascadeFilterRequests.shift();
                    t && r.unbind("dataBound", t);
                    t = r._cascadeFilterRequests[0];
                    t && r.first("dataBound", t);
                    r._cascadeChange(n);
                  }),
                  r._cascadeFilterRequests.push(u),
                  1 === r._cascadeFilterRequests.length &&
                    r.first("dataBound", u),
                  (r._cascading = !0),
                  r._filterSource({ field: s, operator: "eq", value: e }),
                  (r._cascading = !1))
                : (r.enable(!1),
                  r._clearSelection(n),
                  r._triggerCascade(),
                  r._triggerChange(),
                  (r._userTriggered = !1));
            },
          });
          h = ".StaticList";
          tt = i.ui.DataBoundWidget.extend({
            init: function (t, u) {
              c.fn.init.call(this, t, u);
              this.element
                .attr("role", "listbox")
                .on("click" + h, "li", r(this._click, this))
                .on("mouseenter" + h, "li", function () {
                  n(this).addClass(k);
                })
                .on("mouseleave" + h, "li", function () {
                  n(this).removeClass(k);
                });
              e.touch && this._touchHandlers();
              "multiple" === this.options.selectable &&
                this.element.attr("aria-multiselectable", !0);
              this.content = this.element
                .wrap("<div class='k-list-scroller' unselectable='on'></div>")
                .parent();
              this.header = this.content
                .before(
                  '<div class="k-group-header" style="display:none"></div>'
                )
                .prev();
              this.bound(!1);
              this._optionID = i.guid();
              this._selectedIndices = [];
              this._view = [];
              this._dataItems = [];
              this._values = [];
              var f = this.options.value;
              f && (this._values = n.isArray(f) ? f.slice(0) : [f]);
              this._getter();
              this._templates();
              this.setDataSource(this.options.dataSource);
              this._onScroll = r(function () {
                var n = this;
                clearTimeout(n._scrollId);
                n._scrollId = setTimeout(function () {
                  n._renderHeader();
                }, 50);
              }, this);
            },
            options: {
              name: "StaticList",
              dataValueField: null,
              valuePrimitive: !1,
              selectable: !0,
              template: null,
              groupTemplate: null,
              fixedGroupTemplate: null,
            },
            events: [
              "click",
              u,
              "activate",
              "deactivate",
              "dataBinding",
              "dataBound",
              "selectedItemChange",
            ],
            setDataSource: function (t) {
              var o,
                f = this,
                e = t || {};
              e = n.isArray(e) ? { data: e } : e;
              e = i.data.DataSource.create(e);
              f.dataSource
                ? (f.dataSource.unbind(u, f._refreshHandler),
                  (o = f.value()),
                  f.value([]),
                  f.bound(!1),
                  f.value(o))
                : (f._refreshHandler = r(f.refresh, f));
              f.setDSFilter(e.filter());
              f.dataSource = e.bind(u, f._refreshHandler);
              f._fixedHeader();
            },
            _touchHandlers: function () {
              var i,
                r,
                t = this,
                u = function (n) {
                  return (n.originalEvent || n).changedTouches[0].pageY;
                };
              t.element.on("touchstart" + h, function (n) {
                i = u(n);
              });
              t.element.on("touchend" + h, function (f) {
                f.isDefaultPrevented() ||
                  ((r = u(f)),
                  Math.abs(r - i) < 10 &&
                    ((t._touchTriggered = !0),
                    t._triggerClick(n(f.target).closest(ht).get(0))));
              });
            },
            skip: function () {
              return this.dataSource.skip();
            },
            setOptions: function (n) {
              c.fn.setOptions.call(this, n);
              this._getter();
              this._templates();
              this._render();
            },
            destroy: function () {
              this.element.off(h);
              this._refreshHandler &&
                this.dataSource.unbind(u, this._refreshHandler);
              clearTimeout(this._scrollId);
              c.fn.destroy.call(this);
            },
            dataItemByIndex: function (n) {
              return this.dataSource.flatView()[n];
            },
            screenHeight: function () {
              return this.content[0].clientHeight;
            },
            scrollToIndex: function (n) {
              var t = this.element[0].children[n];
              t && this.scroll(t);
            },
            scrollWith: function (n) {
              this.content.scrollTop(this.content.scrollTop() + n);
            },
            scroll: function (n) {
              if (n) {
                n[0] && (n = n[0]);
                var i = this.content[0],
                  r = n.offsetTop,
                  e = n.offsetHeight,
                  t = i.scrollTop,
                  u = i.clientHeight,
                  f = r + e;
                t > r ? (t = r) : f > t + u && (t = f - u);
                i.scrollTop = t;
              }
            },
            selectedDataItems: function (n) {
              return n === t
                ? this._dataItems.slice()
                : ((this._dataItems = n),
                  (this._values = this._getValues(n)),
                  t);
            },
            _getValues: function (t) {
              var i = this._valueGetter;
              return n.map(t, function (n) {
                return i(n);
              });
            },
            focusNext: function () {
              var n = this.focus();
              n = n ? n.next() : 0;
              this.focus(n);
            },
            focusPrev: function () {
              var n = this.focus();
              n = n ? n.prev() : this.element[0].children.length - 1;
              this.focus(n);
            },
            focusFirst: function () {
              this.focus(this.element[0].children[0]);
            },
            focusLast: function () {
              this.focus(s(this.element[0].children));
            },
            focus: function (i) {
              var u,
                r = this,
                f = r._optionID;
              return i === t
                ? r._current
                : ((i = s(r._get(i))),
                  (i = n(this.element[0].children[i])),
                  r._current &&
                    (r._current.removeClass(et).removeAttr(y),
                    r.trigger("deactivate")),
                  (u = !!i[0]),
                  u && (i.addClass(et), r.scroll(i), i.attr("id", f)),
                  (r._current = u ? i : null),
                  r.trigger("activate"),
                  t);
            },
            focusIndex: function () {
              return this.focus() ? this.focus().index() : t;
            },
            skipUpdate: function (n) {
              this._skipUpdate = n;
            },
            select: function (i) {
              var e,
                f,
                o,
                r = this,
                v = r.options.selectable,
                h = "multiple" !== v && v !== !1,
                c = r._selectedIndices,
                y = [this.element.find(".k-state-selected").index()],
                l = [],
                a = [];
              return i === t
                ? c.slice()
                : ((i = r._get(i)),
                  1 === i.length && i[0] === -1 && (i = []),
                  (f = n.Deferred().resolve()),
                  (o = r.isFiltered()),
                  o && !h && r._deselectFiltered(i)
                    ? f
                    : h &&
                      !o &&
                      n.inArray(s(i), c) !== -1 &&
                      n.inArray(s(i), y) !== -1
                    ? (r._dataItems.length &&
                        r._view.length &&
                        (r._dataItems = [r._view[c[0]].item]),
                      f)
                    : ((e = r._deselect(i)),
                      (a = e.removed),
                      (i = e.indices),
                      i.length && (h && (i = [s(i)]), (l = r._select(i))),
                      (l.length || a.length) &&
                        ((r._valueComparer = null),
                        r.trigger(u, { added: l, removed: a })),
                      f));
            },
            removeAt: function (n) {
              return (
                this._selectedIndices.splice(n, 1),
                this._values.splice(n, 1),
                (this._valueComparer = null),
                { position: n, dataItem: this._dataItems.splice(n, 1)[0] }
              );
            },
            setValue: function (t) {
              t = n.isArray(t) || t instanceof gt ? t.slice(0) : [t];
              this._values = t;
              this._valueComparer = null;
            },
            value: function (i) {
              var f,
                r = this,
                u = r._valueDeferred;
              return i === t
                ? r._values.slice()
                : (r.setValue(i),
                  (u && "resolved" !== u.state()) ||
                    (r._valueDeferred = u = n.Deferred()),
                  r.bound() &&
                    ((f = r._valueIndices(r._values)),
                    "multiple" === r.options.selectable && r.select(-1),
                    r.select(f),
                    u.resolve()),
                  (r._skipUpdate = !1),
                  u);
            },
            items: function () {
              return this.element.children(ht);
            },
            _click: function (n) {
              return this._touchTriggered
                ? ((this._touchTriggered = !1), t)
                : (n.isDefaultPrevented() ||
                    this._triggerClick(n.currentTarget),
                  t);
            },
            _triggerClick: function (t) {
              this.trigger("click", { item: n(t) }) || this.select(t);
            },
            _valueExpr: function (n, t) {
              var f,
                e,
                i = this,
                r = 0,
                u = [];
              if (!i._valueComparer || i._valueType !== n) {
                for (i._valueType = n; r < t.length; r++) u.push(o(t[r], n));
                f =
                  "for (var idx = 0; idx < " +
                  u.length +
                  "; idx++) { if (current === values[idx]) {   return idx; }} return -1;";
                e = Function("current", "values", f);
                i._valueComparer = function (n) {
                  return e(n, u);
                };
              }
              return i._valueComparer;
            },
            _dataItemPosition: function (n, t) {
              var i = this._valueGetter(n),
                r = this._valueExpr(typeof i, t);
              return r(i);
            },
            _getter: function () {
              this._valueGetter = i.getter(this.options.dataValueField);
            },
            _deselect: function (t) {
              var r,
                e,
                o,
                u = this,
                s = u.element[0].children,
                c = u.options.selectable,
                f = u._selectedIndices,
                l = u._dataItems,
                v = u._values,
                h = [],
                i = 0,
                a = 0;
              if (((t = t.slice()), c !== !0 && t.length)) {
                if ("multiple" === c)
                  for (; i < t.length; i++)
                    if (((e = t[i]), n(s[e]).hasClass("k-state-selected")))
                      for (r = 0; r < f.length; r++)
                        if (((o = f[r]), o === e)) {
                          n(s[o])
                            .removeClass("k-state-selected")
                            .attr("aria-selected", !1);
                          h.push({
                            position: r + a,
                            dataItem: l.splice(r, 1)[0],
                          });
                          f.splice(r, 1);
                          t.splice(i, 1);
                          v.splice(r, 1);
                          a += 1;
                          i -= 1;
                          r -= 1;
                          break;
                        }
              } else {
                for (; i < f.length; i++)
                  n(s[f[i]])
                    .removeClass("k-state-selected")
                    .attr("aria-selected", !1),
                    h.push({ position: i, dataItem: l[i] });
                u._values = [];
                u._dataItems = [];
                u._selectedIndices = [];
              }
              return { indices: t, removed: h };
            },
            _deselectFiltered: function (t) {
              for (
                var o, i, r, s = this.element[0].children, f = [], e = 0;
                e < t.length;
                e++
              )
                (i = t[e]),
                  (o = this._view[i].item),
                  (r = this._dataItemPosition(o, this._values)),
                  r > -1 &&
                    (f.push(this.removeAt(r)),
                    n(s[i]).removeClass("k-state-selected"));
              return (
                !!f.length && (this.trigger(u, { added: [], removed: f }), !0)
              );
            },
            _select: function (t) {
              var i,
                u,
                r = this,
                o = r.element[0].children,
                h = r._view,
                e = [],
                f = 0;
              for (s(t) !== -1 && r.focus(t); f < t.length; f++)
                (u = t[f]),
                  (i = h[u]),
                  u !== -1 &&
                    i &&
                    ((i = i.item),
                    r._selectedIndices.push(u),
                    r._dataItems.push(i),
                    r._values.push(r._valueGetter(i)),
                    n(o[u])
                      .addClass("k-state-selected")
                      .attr("aria-selected", !0),
                    e.push({ dataItem: i }));
              return e;
            },
            getElementIndex: function (t) {
              return n(t).data("offset-index");
            },
            _get: function (n) {
              return (
                "number" == typeof n
                  ? (n = [n])
                  : ti(n) ||
                    ((n = this.getElementIndex(n)), (n = [n !== t ? n : -1])),
                n
              );
            },
            _template: function () {
              var r = this,
                t = r.options,
                n = t.template;
              return (
                n
                  ? ((n = i.template(n)),
                    (n = function (t) {
                      return (
                        '<li tabindex="-1" role="option" unselectable="on" class="k-item">' +
                        n(t) +
                        "</li>"
                      );
                    }))
                  : (n = i.template(
                      '<li tabindex="-1" role="option" unselectable="on" class="k-item">${' +
                        i.expr(t.dataTextField, "data") +
                        "}</li>",
                      { useWithBlock: !1 }
                    )),
                n
              );
            },
            _templates: function () {
              var u,
                t,
                f,
                o,
                e,
                n = this.options,
                r = {
                  template: n.template,
                  groupTemplate: n.groupTemplate,
                  fixedGroupTemplate: n.fixedGroupTemplate,
                };
              if (n.columns)
                for (t = 0; t < n.columns.length; t++)
                  (f = n.columns[t]),
                    (o = f.field ? "" + f.field : "text"),
                    (r["column" + t] = f.template || "#: " + o + "#");
              for (e in r)
                (u = r[e]),
                  u && "function" != typeof u && (r[e] = i.template(u));
              this.templates = r;
            },
            _normalizeIndices: function (n) {
              for (var r = [], i = 0; i < n.length; i++)
                n[i] !== t && r.push(n[i]);
              return r;
            },
            _valueIndices: function (n, t) {
              var r,
                u = this._view,
                i = 0;
              if (((t = t ? t.slice() : []), !n.length)) return [];
              for (; i < u.length; i++)
                (r = this._dataItemPosition(u[i].item, n)),
                  r !== -1 && (t[r] = i);
              return this._normalizeIndices(t);
            },
            _firstVisibleItem: function () {
              for (
                var r = this.element[0],
                  f = this.content[0],
                  i = f.scrollTop,
                  u = n(r.children[0]).height(),
                  e = Math.floor(i / u) || 0,
                  t = r.children[e] || r.lastChild,
                  o = t.offsetTop < i;
                t;

              )
                if (o) {
                  if (t.offsetTop + u > i || !t.nextSibling) break;
                  t = t.nextSibling;
                } else {
                  if (t.offsetTop <= i || !t.previousSibling) break;
                  t = t.previousSibling;
                }
              return this._view[n(t).data("offset-index")];
            },
            _fixedHeader: function () {
              this.isGrouped() && this.templates.fixedGroupTemplate
                ? (this.header.show(), this.content.scroll(this._onScroll))
                : (this.header.hide(),
                  this.content.off("scroll", this._onScroll));
            },
            _renderHeader: function () {
              var n,
                t = this.templates.fixedGroupTemplate;
              t &&
                ((n = this._firstVisibleItem()),
                n && ("" + n.group).length && this.header.html(t(n.group)));
            },
            _renderItem: function (n) {
              var t =
                  '<li tabindex="-1" role="option" unselectable="on" class="k-item',
                r = n.item,
                u = 0 !== n.index,
                f = n.selected,
                e = this.isGrouped(),
                i = this.options.columns && this.options.columns.length;
              return (
                u && n.newGroup && (t += " k-first"),
                n.isLastGroupedItem && i && (t += " k-last"),
                f && (t += " k-state-selected"),
                (t +=
                  '" aria-selected="' +
                  (f ? "true" : "false") +
                  '" data-offset-index="' +
                  n.index +
                  '">'),
                (t += i ? this._renderColumns(r) : this.templates.template(r)),
                u && n.newGroup
                  ? (t += i
                      ? '<div class="k-cell k-group-cell"><span>' +
                        this.templates.groupTemplate(n.group) +
                        "</span></div>"
                      : '<div class="k-group">' +
                        this.templates.groupTemplate(n.group) +
                        "</div>")
                  : e && i && (t += "<div class='k-cell k-spacer-cell'></div>"),
                t + "</li>"
              );
            },
            _renderColumns: function (n) {
              for (
                var r, f, t, u = "", i = 0;
                i < this.options.columns.length;
                i++
              )
                (r = this.options.columns[i].width),
                  (f = parseInt(r, 10)),
                  (t = ""),
                  r &&
                    !isNaN(f) &&
                    ((t += "style='width:"),
                    (t += f),
                    (t += rt.test(r) ? "%" : "px"),
                    (t += ";'")),
                  (u += "<span class='k-cell' " + t + ">"),
                  (u += this.templates["column" + i](n)),
                  (u += "</span>");
              return u;
            },
            _render: function () {
              var t,
                i,
                e,
                r,
                o = "",
                n = 0,
                s = 0,
                f = [],
                u = this.dataSource.view(),
                h = this.value(),
                c = this.isGrouped();
              if (c)
                for (n = 0; n < u.length; n++)
                  for (i = u[n], e = !0, r = 0; r < i.items.length; r++)
                    (t = {
                      selected: this._selected(i.items[r], h),
                      item: i.items[r],
                      group: i.value,
                      newGroup: e,
                      isLastGroupedItem: r === i.items.length - 1,
                      index: s,
                    }),
                      (f[s] = t),
                      (s += 1),
                      (o += this._renderItem(t)),
                      (e = !1);
              else
                for (n = 0; n < u.length; n++)
                  (t = {
                    selected: this._selected(u[n], h),
                    item: u[n],
                    index: n,
                  }),
                    (f[n] = t),
                    (o += this._renderItem(t));
              this._view = f;
              this.element[0].innerHTML = o;
              c && f.length && this._renderHeader();
            },
            _selected: function (n, t) {
              var i =
                !this.isFiltered() || "multiple" === this.options.selectable;
              return i && this._dataItemPosition(n, t) !== -1;
            },
            setDSFilter: function (n) {
              this._lastDSFilter = l({}, n);
            },
            isFiltered: function () {
              return (
                this._lastDSFilter ||
                  this.setDSFilter(this.dataSource.filter()),
                !i.data.Query.compareFilters(
                  this.dataSource.filter(),
                  this._lastDSFilter
                )
              );
            },
            refresh: function (n) {
              var i,
                t = this,
                r = n && n.action,
                f = t.options.skipUpdateOnBind,
                u = "itemchange" === r;
              t.trigger("dataBinding");
              t._angularItems("cleanup");
              t._fixedHeader();
              t._render();
              t.bound(!0);
              u || "remove" === r
                ? ((i = kt(t._dataItems, n.items)),
                  i.changed.length &&
                    (u
                      ? t.trigger("selectedItemChange", { items: i.changed })
                      : t.value(t._getValues(i.unchanged))))
                : t.isFiltered() || t._skipUpdate || t._emptySearch
                ? (t.focus(0),
                  t._skipUpdate &&
                    ((t._skipUpdate = !1),
                    (t._selectedIndices = t._valueIndices(
                      t._values,
                      t._selectedIndices
                    ))))
                : f || (r && "add" !== r) || t.value(t._values);
              t._valueDeferred && t._valueDeferred.resolve();
              t._angularItems("compile");
              t.trigger("dataBound");
            },
            bound: function (n) {
              return n === t ? this._bound : ((this._bound = n), t);
            },
            isGrouped: function () {
              return (this.dataSource.group() || []).length;
            },
          });
          v.plugin(tt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.calendar.min", ["kendo.core.min", "kendo.selectable.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function ni(n, t, i, r) {
            var f,
              u = n.getFullYear(),
              e = t.getFullYear(),
              o = i.getFullYear();
            return (
              (u -= u % r),
              (f = u + (r - 1)),
              u < e && (u = e),
              f > o && (f = o),
              u + "-" + f
            );
          }
          function ut(n) {
            var i,
              u = 0,
              c = n.min,
              l = n.max,
              t = n.start,
              a = n.setter,
              v = n.build,
              e = n.weekNumberBuild,
              y = n.cells || 12,
              o = n.isWeekColumnVisible,
              p = n.perRow || 4,
              s = n.otherMonth,
              w = n.lastDayOfMonth,
              h = n.weekNumber || kr,
              k = n.content || pr,
              g = n.empty || wr,
              nt = n.otherMonthCellTemplate || br,
              f =
                n.html ||
                '<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">';
            for (o && (f += h(e(t))); u < y; u++)
              u > 0 &&
                u % p == 0 &&
                ((f += '</tr><tr role="row">'),
                o && (f += h(s || +t <= +w ? e(t) : { weekNumber: "&nbsp;" }))),
                (t = r(t.getFullYear(), t.getMonth(), t.getDate())),
                it(t, 0),
                (i = v(t, u, n.disableDates)),
                (f +=
                  i.cssClass.indexOf(d) === -1 || s
                    ? b(t, c, l)
                      ? k(i)
                      : g(i)
                    : nt(i)),
                a(t, 1);
            return f + "</tr></tbody></table>";
          }
          function st(n, t, i) {
            var f = n.getFullYear(),
              r = t.getFullYear(),
              e = r,
              u = 0;
            return (
              i && ((r -= r % i), (e = r - (r % i) + i - 1)),
              f > e ? (u = 1) : f < r && (u = -1),
              u
            );
          }
          function v() {
            var n = new e();
            return new e(n.getFullYear(), n.getMonth(), n.getDate());
          }
          function k(n, t, i) {
            var r = v();
            return (
              n && (r = new e(+n)),
              t > r ? (r = new e(+t)) : i < r && (r = new e(+i)),
              r
            );
          }
          function b(n, t, i) {
            return +n >= +t && +n <= +i;
          }
          function ti(n, t) {
            return n.slice(t).concat(n.slice(0, t));
          }
          function ii(n, t, i) {
            t = t instanceof e ? t.getFullYear() : n.getFullYear() + i * t;
            n.setFullYear(t);
          }
          function ri(n, t) {
            var r, f, e;
            return (
              +t < +n &&
                ((r = +n),
                u.views[0].setDate(n, t),
                u.views[0].setDate(t, new Date(r))),
              (f = Date.UTC(n.getFullYear(), n.getMonth(), n.getDate())),
              (e = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate())),
              Math.ceil((+e - +f) / i.date.MS_PER_DAY)
            );
          }
          function ui(n, t, i, r) {
            for (var u, f = 0; f <= t; f++)
              (u = new Date(i.getTime())),
                (u = new Date(u.setDate(u.getDate() + f))),
                r(u) || n.push(u);
          }
          function fi(t) {
            var i = n(this).hasClass("k-state-disabled");
            i ||
              n(this).toggleClass(kt, iu.indexOf(t.type) > -1 || t.type == nr);
          }
          function or(n) {
            n.preventDefault();
          }
          function r(n, t, i) {
            var r = new e(n, t, i);
            return r.setFullYear(n, t, i), r;
          }
          function ht(n) {
            return hi(n).calendars.standard;
          }
          function ct(n) {
            var i = a[n.start],
              r = a[n.depth],
              u = hi(n.culture);
            n.format = yr(n.format || u.calendars.standard.patterns.d);
            isNaN(i) && ((i = 0), (n.start = rt));
            (r === t || r > i) && (n.depth = rt);
            null === n.dates && (n.dates = []);
          }
          function ei(n) {
            dr && n.find("*").attr("unselectable", "on");
          }
          function oi(n, t) {
            n.addClass("k-" + t);
          }
          function sr(n, t) {
            for (var i = 0, r = t.length; i < r; i++)
              if (n === +t[i]) return !0;
            return !1;
          }
          function hr(n, t) {
            return (
              !!n &&
              n.getFullYear() === t.getFullYear() &&
              n.getMonth() === t.getMonth() &&
              n.getDate() === t.getDate()
            );
          }
          function cr(n, t) {
            return (
              !!n &&
              n.getFullYear() === t.getFullYear() &&
              n.getMonth() === t.getMonth()
            );
          }
          function lt(t) {
            return i.isFunction(t) ? t : n.isArray(t) ? ar(t) : n.noop;
          }
          function lr(n) {
            for (var i = [], t = 0; t < n.length; t++)
              i.push(n[t].setHours(0, 0, 0, 0));
            return i;
          }
          function ar(t) {
            var u,
              i,
              o,
              f,
              r = [],
              h = ["su", "mo", "tu", "we", "th", "fr", "sa"],
              s = "if (found) { return true } else {return false}";
            if (t[0] instanceof e)
              (r = lr(t)),
                (u =
                  "var found = date && window.kendo.jQuery.inArray(date.setHours(0, 0, 0, 0),[" +
                  r +
                  "]) > -1;" +
                  s);
            else {
              for (i = 0; i < t.length; i++)
                (o = t[i].slice(0, 2).toLowerCase()),
                  (f = n.inArray(o, h)),
                  f > -1 && r.push(f);
              u =
                "var found = date && window.kendo.jQuery.inArray(date.getDay(),[" +
                r +
                "]) > -1;" +
                s;
            }
            return Function("date", u);
          }
          function at(n, t) {
            return (
              n instanceof Date &&
                t instanceof Date &&
                ((n = n.getTime()), (t = t.getTime())),
              n === t
            );
          }
          function o(t) {
            var u = n(t).attr(i.attr(et)).split("/");
            return r(u[0], u[1], u[2]);
          }
          var u,
            i = window.kendo,
            vt = i.support,
            si = i.ui,
            ft = si.Widget,
            f = i.keys,
            yt = i.parseDate,
            it = i.date.adjustDST,
            vr = i.date.weekInYear,
            pt = i.ui.Selectable,
            yr = i._extractFormat,
            y = i.template,
            hi = i.getCulture,
            ci = i.support.transitions,
            li = ci ? ci.css + "transform-origin" : "",
            pr = y(
              '<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>',
              { useWithBlock: !1 }
            ),
            wr = y(
              '<td role="gridcell" class="k-out-of-range"><a class="k-link"></a></td>',
              { useWithBlock: !1 }
            ),
            br = y('<td role="gridcell" class="k-out-of-range">&nbsp;</td>', {
              useWithBlock: !1,
            }),
            kr = y('<td class="k-alt">#= data.weekNumber #</td>', {
              useWithBlock: !1,
            }),
            ai = i.support.browser,
            dr = ai.msie && ai.version < 9,
            gr = i._outerWidth,
            s = ".kendoCalendar",
            p = "click" + s,
            nu = "keydown" + s,
            wt = "id",
            vi = "min",
            yi = "left",
            bt = "slideIn",
            rt = "month",
            pi = "century",
            w = "change",
            wi = "navigate",
            et = "value",
            kt = "k-state-hover",
            c = "k-state-disabled",
            l = "k-state-focused",
            d = "k-other-month",
            bi = ' class="' + d + '"',
            ki = "k-nav-today",
            g = "td:has(.k-link)",
            h = "td:has(.k-link):not(." + c + "):not(.k-out-of-range)",
            tu = "td:not(:has(.k-link))",
            di = "k-state-selected",
            gi = "blur" + s,
            nr = "focus",
            tr = nr + s,
            iu = vt.touch ? "touchstart" : "mouseenter",
            ir = vt.touch ? "touchstart" + s : "mouseenter" + s,
            rr = vt.touch
              ? "touchend" + s + " touchmove" + s
              : "mouseleave" + s,
            ru = 6e4,
            ur = 864e5,
            nt = "_prevArrow",
            tt = "_nextArrow",
            dt = "aria-disabled",
            fr = "aria-selected",
            gt = "aria-label",
            ot = n.proxy,
            er = n.extend,
            e = Date,
            a = { month: 0, year: 1, decade: 2, century: 3 },
            uu = ft.extend({
              init: function (t, r) {
                var f,
                  y,
                  u = this;
                ft.fn.init.call(u, t, r);
                t = u.wrapper = u.element;
                r = u.options;
                r.url = i.unescape(r.url);
                u.options.disableDates = lt(u.options.disableDates);
                u._templates();
                u._selectable();
                u._header();
                u._viewWrapper();
                u._footer(u.footer);
                y = t
                  .addClass(
                    "k-widget k-calendar " +
                      (r.weekNumber ? " k-week-number" : "")
                  )
                  .on(ir + " " + rr, g, fi)
                  .on(nu, "table.k-content", ot(u._move, u))
                  .on(p, g, function (t) {
                    var i = t.currentTarget.firstChild,
                      f = o(i);
                    i.href.indexOf("#") != -1 && t.preventDefault();
                    ("month" == u._view.name && u.options.disableDates(f)) ||
                      ("month" == u._view.name && "single" != r.selectable) ||
                      u._click(n(i));
                  })
                  .on("mouseup" + s, "table.k-content, .k-footer", function () {
                    u._focusView(u.options.focusOnNav !== !1);
                  })
                  .attr(wt);
                y && (u._cellID = y + "_cell_selected");
                u._isMultipleSelection() &&
                  u.options.weekNumber &&
                  t.on(p, tu, function (t) {
                    var r = n(t.currentTarget).closest("tr").find(h).first(),
                      i = (u.selectable._lastActive = n(t.currentTarget)
                        .closest("tr")
                        .find(h)
                        .last());
                    u.selectable.selectRange(r, i, { event: t });
                    u._current = u._value = o(i.find("a"));
                    u._class(l, u._current);
                  });
                ct(r);
                f = yt(r.value, r.format, r.culture);
                u._selectDates = [];
                u._index = a[r.start];
                u._current = new e(+k(f, r.min, r.max));
                u._addClassProxy = function () {
                  if (((u._active = !0), u._cell.hasClass(c))) {
                    var n = u._view.toDateString(v());
                    u._cell = u._cellByDate(n);
                  }
                  u._cell.addClass(l);
                };
                u._removeClassProxy = function () {
                  u._active = !1;
                  u._cell.removeClass(l);
                };
                u.value(f);
                u._isMultipleSelection() &&
                  r.selectDates.length > 0 &&
                  u.selectDates(r.selectDates);
                i.notify(u);
              },
              options: {
                name: "Calendar",
                value: null,
                min: new e(1900, 0, 1),
                max: new e(2099, 11, 31),
                dates: [],
                disableDates: null,
                url: "",
                culture: "",
                footer: "",
                format: "",
                month: {},
                weekNumber: !1,
                selectable: "single",
                selectDates: [],
                start: rt,
                depth: rt,
                animation: {
                  horizontal: {
                    effects: bt,
                    reverse: !0,
                    duration: 500,
                    divisor: 2,
                  },
                  vertical: { effects: "zoomIn", duration: 400 },
                },
                messages: { weekColumnHeader: "" },
              },
              events: [w, wi],
              setOptions: function (n) {
                var t = this;
                ct(n);
                n.disableDates = lt(n.disableDates);
                t._destroySelectable();
                ft.fn.setOptions.call(t, n);
                t._templates();
                t._selectable();
                t._viewWrapper();
                t._footer(t.footer);
                t._index = a[t.options.start];
                t.navigate();
                n.weekNumber && t.element.addClass("k-week-number");
              },
              destroy: function () {
                var n = this,
                  t = n._today;
                n.element.off(s);
                n._title.off(s);
                n[nt].off(s);
                n[tt].off(s);
                n._destroySelectable();
                i.destroy(n._table);
                t && i.destroy(t.off(s));
                ft.fn.destroy.call(n);
              },
              current: function () {
                return this._current;
              },
              view: function () {
                return this._view;
              },
              focus: function (n) {
                n = n || this._table;
                this._bindTable(n);
                n.trigger("focus");
              },
              min: function (n) {
                return this._option(vi, n);
              },
              max: function (n) {
                return this._option("max", n);
              },
              navigateToPast: function () {
                this._navigate(nt, -1);
              },
              navigateToFuture: function () {
                this._navigate(tt, 1);
              },
              navigateUp: function () {
                var n = this,
                  t = n._index;
                n._title.hasClass(c) || n.navigate(n._current, ++t);
              },
              navigateDown: function (n) {
                var i = this,
                  r = i._index,
                  u = i.options.depth;
                if (n)
                  return r === a[u]
                    ? ((at(i._value, i._current) && at(i._value, n)) ||
                        (i.value(n), i.trigger(w)),
                      t)
                    : (i.navigate(n, --r), t);
              },
              navigate: function (i, r) {
                var f, o, d, y, p, g, s, b, it, ut, ft, w, v, rt, h, et;
                r = isNaN(r) ? a[r] : r;
                f = this;
                o = f.options;
                d = o.culture;
                y = o.min;
                p = o.max;
                g = f._title;
                s = f._table;
                b = f._oldTable;
                it = f._current;
                ut = i && +i > +it;
                ft = r !== t && r !== f._index;
                i || (i = it);
                f._current = i = new e(+k(i, y, p));
                r === t ? (r = f._index) : (f._index = r);
                f._view = v = u.views[r];
                rt = v.compare;
                h = r === a[pi];
                g.toggleClass(c, h).attr(dt, h);
                h = rt(i, y) < 1;
                f[nt].toggleClass(c, h).attr(dt, h);
                f[nt].hasClass(c) && f[nt].removeClass(kt);
                h = rt(i, p) > -1;
                f[tt].toggleClass(c, h).attr(dt, h);
                f[tt].hasClass(c) && f[tt].removeClass(kt);
                s &&
                  b &&
                  b.data("animating") &&
                  (b.kendoStop(!0, !0), s.kendoStop(!0, !0));
                f._oldTable = s;
                (s && !f._changeView) ||
                  (g.html(v.title(i, y, p, d)),
                  (f._table = w =
                    n(
                      v.content(
                        er(
                          {
                            min: y,
                            max: p,
                            date: i,
                            url: o.url,
                            dates: o.dates,
                            format: o.format,
                            otherMonth: !0,
                            culture: d,
                            disableDates: o.disableDates,
                            isWeekColumnVisible: o.weekNumber,
                            messages: o.messages,
                          },
                          f[v.name]
                        )
                      )
                    )),
                  oi(w, v.name),
                  ei(w),
                  (et = s && s.data("start") === w.data("start")),
                  f._animate({
                    from: s,
                    to: w,
                    vertical: ft,
                    future: ut,
                    replace: et,
                  }),
                  f.trigger(wi),
                  f._focus(i));
                r === a[o.depth] &&
                  f._selectDates.length > 0 &&
                  f._visualizeSelectedDatesInView();
                "single" === f.options.selectable &&
                  r === a[o.depth] &&
                  f._value &&
                  !f.options.disableDates(f._value) &&
                  f._class("k-state-selected", f._value);
                f._class(l, i);
                !s && f._cell && f._cell.removeClass(l);
                f._changeView = !0;
              },
              selectDates: function (i) {
                var f,
                  u,
                  r = this;
                return i === t
                  ? r._selectDates
                  : ((u = i
                      .map(function (n) {
                        return n.getTime();
                      })
                      .filter(function (n, t, i) {
                        return i.indexOf(n) === t;
                      })
                      .map(function (n) {
                        return new Date(n);
                      })),
                    (f = n.grep(u, function (n) {
                      if (n)
                        return (
                          +r._validateValue(new Date(n.setHours(0, 0, 0, 0))) ==
                          +n
                        );
                    })),
                    (r._selectDates =
                      f.length > 0 ? f : 0 === u.length ? u : r._selectDates),
                    r._visualizeSelectedDatesInView(),
                    t);
              },
              value: function (n) {
                var r,
                  i = this,
                  f = i._view,
                  u = i._view;
                return n === t
                  ? i._value
                  : ((n = i._validateValue(n)),
                    n &&
                      i._isMultipleSelection() &&
                      ((r = new Date(+n)),
                      r.setHours(0, 0, 0, 0),
                      (i._selectDates = [r]),
                      (i.selectable._lastActive = null)),
                    f && null === n && i._cell
                      ? i._cell.removeClass(di)
                      : ((i._changeView =
                          !n || (u && 0 !== u.compare(n, i._current))),
                        i.navigate(n)),
                    t);
              },
              _validateValue: function (n) {
                var i = this,
                  u = i.options,
                  f = u.min,
                  o = u.max;
                return (
                  null === n &&
                    (i._current = r(
                      i._current.getFullYear(),
                      i._current.getMonth(),
                      i._current.getDate()
                    )),
                  (n = yt(n, u.format, u.culture)),
                  null !== n && ((n = new e(+n)), b(n, f, o) || (n = null)),
                  null !== n && i.options.disableDates(new Date(+n))
                    ? i._value === t && (i._value = null)
                    : (i._value = n),
                  i._value
                );
              },
              _visualizeSelectedDatesInView: function () {
                var r,
                  t = this,
                  u = {};
                n.each(t._selectDates, function (n, t) {
                  u[i.calendar.views[0].toDateString(t)] = t;
                });
                t.selectable.clear();
                r = t._table.find(g).filter(function (t, r) {
                  return u[n(r.firstChild).attr(i.attr(et))];
                });
                r.length > 0 && t.selectable._selectElement(r, !0);
              },
              _isMultipleSelection: function () {
                var n = this;
                return "multiple" === n.options.selectable;
              },
              _selectable: function () {
                var i,
                  t,
                  n = this;
                n._isMultipleSelection() &&
                  ((i = n.options.selectable),
                  (t = pt.parseOptions(i)),
                  t.multiple && n.element.attr("aria-multiselectable", "true"),
                  (n.selectable = new pt(n.wrapper, {
                    aria: !0,
                    inputSelectors:
                      "input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",
                    multiple: t.multiple,
                    filter: "table.k-month:eq(0) " + h,
                    change: ot(n._onSelect, n),
                    relatedTarget: ot(n._onRelatedTarget, n),
                  })));
              },
              _onRelatedTarget: function (n) {
                var t = this;
                t.selectable.options.multiple &&
                  n.is(h) &&
                  ((t._current = o(n.find("a"))), t._class(l, o(n.find("a"))));
              },
              _onSelect: function (i) {
                var r = this,
                  u = i,
                  f = pt.parseOptions(r.options.selectable);
                return f.multiple
                  ? (u.event.ctrlKey || u.event.metaKey
                      ? n(u.event.currentTarget).is(h)
                        ? r._toggleSelection(n(u.event.currentTarget))
                        : (r._cellsBySelector(h).each(function (t, i) {
                            var u = o(n(i).find("a"));
                            r._deselect(u);
                          }),
                          r._addSelectedCellsToArray())
                      : u.event.shiftKey
                      ? r._rangeSelection(r._cell)
                      : n(u.event.currentTarget).is(g)
                      ? r.value(o(n(u.event.currentTarget).find("a")))
                      : ((r._selectDates = []), r._addSelectedCellsToArray()),
                    r.trigger(w),
                    t)
                  : (n(u.event.currentTarget).is("td") &&
                    !n(u.event.currentTarget).hasClass("k-state-selected")
                      ? n(u.event.currentTarget).addClass("k-state-selected")
                      : r._click(n(u.event.currentTarget).find("a")),
                    t);
              },
              _destroySelectable: function () {
                var n = this;
                n.selectable && (n.selectable.destroy(), (n.selectable = null));
              },
              _toggleSelection: function (n) {
                var t = this,
                  i = o(n.find("a"));
                n.hasClass("k-state-selected")
                  ? t._selectDates.push(i)
                  : t._deselect(i);
              },
              _rangeSelection: function (n, t) {
                var u,
                  i = this,
                  r = t || o(i.selectable.value().first().find("a")),
                  f = o(n.find("a"));
                i.selectable._lastActive || i._value
                  ? (r = i.selectable._lastActive
                      ? o(i.selectable._lastActive.find("a"))
                      : new Date(+i._value))
                  : (i.selectable._lastActive = t
                      ? i._cellByDate(i._view.toDateString(t), h)
                      : i.selectable.value().first());
                i._selectDates = [];
                u = ri(r, f);
                ui(i._selectDates, u, r, i.options.disableDates);
                i._visualizeSelectedDatesInView();
              },
              _cellsBySelector: function (n) {
                var t = this;
                return t._table.find(n);
              },
              _addSelectedCellsToArray: function () {
                var t = this;
                t.selectable.value().each(function (i, r) {
                  var u = o(n(r.firstChild));
                  t.options.disableDates(u) || t._selectDates.push(u);
                });
              },
              _deselect: function (n) {
                var t = this,
                  i = t._selectDates.map(Number).indexOf(+n);
                i != -1 && t._selectDates.splice(i, 1);
              },
              _dateInView: function (n) {
                var t = this,
                  i = o(t._cellsBySelector(h + ":first").find("a")),
                  r = o(t._cellsBySelector(h + ":last").find("a"));
                return +n <= +r && +n >= +i;
              },
              _isNavigatable: function (n, t) {
                var r,
                  u,
                  i = this,
                  f = i.options.disableDates;
                return "month" == i._view.name
                  ? !f(n)
                  : ((u = i.wrapper.find("." + l).index()),
                    (r = i.wrapper.find(".k-content td:eq(" + (u + t) + ")")),
                    r.is(h) || !f(n));
              },
              _move: function (u) {
                var v,
                  a,
                  d,
                  g,
                  it,
                  s = this,
                  nt = s.options,
                  c = u.keyCode,
                  tt = s._view,
                  rt = s._index,
                  y = s.options.min,
                  ut = s.options.max,
                  h = new e(+s._current),
                  p = i.support.isRtl(s.wrapper),
                  ft = s.options.disableDates;
                return (
                  u.target === s._table[0] && (s._active = !0),
                  (c == f.RIGHT && !p) || (c == f.LEFT && p)
                    ? ((v = 1), (a = !0))
                    : (c == f.LEFT && !p) || (c == f.RIGHT && p)
                    ? ((v = -1), (a = !0))
                    : c == f.UP
                    ? ((v = 0 === rt ? -7 : -4), (a = !0))
                    : c == f.DOWN
                    ? ((v = 0 === rt ? 7 : 4), (a = !0))
                    : c == f.SPACEBAR
                    ? ((v = 0), (a = !0))
                    : (c != f.HOME && c != f.END) ||
                      ((d = c == f.HOME ? "first" : "last"),
                      (g = tt[d](h)),
                      (h = new e(
                        g.getFullYear(),
                        g.getMonth(),
                        g.getDate(),
                        h.getHours(),
                        h.getMinutes(),
                        h.getSeconds(),
                        h.getMilliseconds()
                      )),
                      h.setFullYear(g.getFullYear()),
                      (a = !0)),
                  u.ctrlKey || u.metaKey
                    ? (c == f.RIGHT && !p) || (c == f.LEFT && p)
                      ? (s.navigateToFuture(), (a = !0))
                      : (c == f.LEFT && !p) || (c == f.RIGHT && p)
                      ? (s.navigateToPast(), (a = !0))
                      : c == f.UP
                      ? (s.navigateUp(), (a = !0))
                      : c == f.DOWN
                      ? (s._click(n(s._cell[0].firstChild)), (a = !0))
                      : (c != f.ENTER && c != f.SPACEBAR) ||
                        !s._isMultipleSelection() ||
                        (s._keyboardToggleSelection(u),
                        (it = o(n(s._cell[0]).find("a"))),
                        s._class(l, it))
                    : u.shiftKey
                    ? (v !== t || d) &&
                      (d || tt.setDate(h, v),
                      b(h, y, ut) || (h = k(h, nt.min, nt.max)),
                      ft(h) && (h = s._nextNavigatable(h, v)),
                      (y = r(y.getFullYear(), y.getMonth(), y.getDate())),
                      s._isMultipleSelection()
                        ? s._keyboardRangeSelection(u, h)
                        : s._focus(h))
                    : (c == f.ENTER || c == f.SPACEBAR
                        ? ("month" == tt.name && s._isMultipleSelection()
                            ? (s.value(o(n(s._cell.find("a")))),
                              (s.selectable._lastActive = n(s._cell[0])),
                              s.trigger(w))
                            : s._click(n(s._cell[0].firstChild)),
                          (a = !0))
                        : c == f.PAGEUP
                        ? ((a = !0), s.navigateToPast())
                        : c == f.PAGEDOWN && ((a = !0), s.navigateToFuture()),
                      (v || d) &&
                        (d || tt.setDate(h, v),
                        (y = r(y.getFullYear(), y.getMonth(), y.getDate())),
                        b(h, y, ut) || (h = k(h, nt.min, nt.max)),
                        s._isNavigatable(h, v) ||
                          (h = s._nextNavigatable(h, v)),
                        s._isMultipleSelection()
                          ? s._dateInView(h)
                            ? ((s._current = h), s._class(l, h))
                            : s.navigate(h)
                          : s._focus(h))),
                  a && u.preventDefault(),
                  s._current
                );
              },
              _keyboardRangeSelection: function (n, i) {
                var u,
                  f,
                  r = this;
                return r._dateInView(i)
                  ? ((r.selectable.options.filter =
                      r.wrapper.find("table").length > 1 && +i > +r._current
                        ? "table.k-month:eq(1) " + h
                        : "table.k-month:eq(0) " + h),
                    r._class(l, i),
                    (r._current = i),
                    r._rangeSelection(
                      r._cellByDate(r._view.toDateString(i), h),
                      i
                    ),
                    r.trigger(w),
                    (r.selectable.options.filter = "table.k-month:eq(0) " + h),
                    t)
                  : ((r._selectDates = []),
                    (u = r.selectable._lastActive
                      ? o(r.selectable._lastActive.find("a"))
                      : i),
                    (f = ri(u, new Date(+i))),
                    ui(r._selectDates, f, u, r.options.disableDates),
                    r.navigate(i),
                    (r._current = i),
                    (r.selectable._lastActive =
                      r.selectable._lastActive ||
                      r._cellByDate(r._view.toDateString(i), h)),
                    r.trigger(w),
                    t);
              },
              _keyboardToggleSelection: function (t) {
                var i = this;
                t.currentTarget = i._cell[0];
                i.selectable._lastActive = n(i._cell[0]);
                n(i._cell[0]).hasClass(di)
                  ? (i.selectable._unselect(n(i._cell[0])),
                    i.selectable.trigger(w, { event: t }))
                  : i.selectable.value(n(i._cell[0]), { event: t });
              },
              _nextNavigatable: function (n, t) {
                var i = this,
                  r = !0,
                  u = i._view,
                  e = i.options.min,
                  o = i.options.max,
                  s = i.options.disableDates,
                  f = new Date(n.getTime());
                for (u.setDate(f, -t); r; ) {
                  if ((u.setDate(n, t), !b(n, e, o))) {
                    n = f;
                    break;
                  }
                  r = s(n);
                }
                return n;
              },
              _animate: function (n) {
                var i = this,
                  t = n.from,
                  r = n.to,
                  u = i._active,
                  f = i.element.children(".k-calendar-view");
                t
                  ? t.parent().data("animating")
                    ? (t.off(s),
                      t.parent().kendoStop(!0, !0).remove(),
                      t.remove(),
                      f.append(r),
                      i._focusView(u))
                    : !t.is(":visible") ||
                      i.options.animation === !1 ||
                      n.replace
                    ? (r.insertAfter(t), t.off(s).remove(), i._focusView(u))
                    : i[n.vertical ? "_vertical" : "_horizontal"](
                        t,
                        r,
                        n.future
                      )
                  : (f.append(r), i._bindTable(r));
              },
              _horizontal: function (n, t, i) {
                var r = this,
                  e = r._active,
                  u = r.options.animation.horizontal,
                  o = u.effects,
                  f = gr(n);
                o &&
                  o.indexOf(bt) != -1 &&
                  (n.add(t).css({ width: f }),
                  n.wrap("<div/>"),
                  r._focusView(e, n),
                  n
                    .parent()
                    .css({
                      position: "relative",
                      width: 2 * f,
                      float: yi,
                      "margin-left": i ? 0 : -f,
                    }),
                  t[i ? "insertAfter" : "insertBefore"](n),
                  er(u, {
                    effects: bt + ":" + (i ? "right" : yi),
                    complete: function () {
                      n.off(s).remove();
                      r._oldTable = null;
                      t.unwrap();
                      r._focusView(e);
                    },
                  }),
                  n.parent().kendoStop(!0, !0).kendoAnimate(u));
              },
              _vertical: function (n, t) {
                var u,
                  r,
                  i = this,
                  f = i.options.animation.vertical,
                  e = f.effects,
                  o = i._active;
                e &&
                  e.indexOf("zoom") != -1 &&
                  (t.insertBefore(n),
                  n.css({ position: "absolute", width: t.width() }),
                  li &&
                    ((u = i._cellByDate(i._view.toDateString(i._current))),
                    (r = u.position()),
                    (r =
                      r.left +
                      parseInt(u.width() / 2, 10) +
                      "px " +
                      (r.top + parseInt(u.height() / 2, 10) + "px")),
                    t.css(li, r)),
                  n.kendoStop(!0, !0).kendoAnimate({
                    effects: "fadeOut",
                    duration: 600,
                    complete: function () {
                      n.off(s).remove();
                      i._oldTable = null;
                      i._focusView(o);
                    },
                  }),
                  t.kendoStop(!0, !0).kendoAnimate(f));
              },
              _cellByDate: function (t, r) {
                return this._table
                  .find(r ? r : "td:not(." + d + ")")
                  .filter(function () {
                    return n(this.firstChild).attr(i.attr(et)) === t;
                  });
              },
              _class: function (n, t) {
                var f,
                  i = this,
                  u = i._cellID,
                  r = i._cell,
                  e = i._view.toDateString(t);
                r &&
                  r.length &&
                  (r[0].removeAttribute(fr),
                  r[0].removeAttribute(gt),
                  r[0].removeAttribute(wt));
                t && "month" == i._view.name && (f = i.options.disableDates(t));
                i._cellsBySelector(
                  i._isMultipleSelection() ? g : "td:not(." + d + ")"
                ).removeClass(n);
                r = i
                  ._cellByDate(
                    e,
                    "multiple" == i.options.selectable
                      ? g
                      : "td:not(." + d + ")"
                  )
                  .attr(fr, !0);
                ((n === l && !i._active && i.options.focusOnNav !== !1) || f) &&
                  (n = "");
                r.addClass(n);
                r[0] && (i._cell = r);
                u &&
                  (r.attr(wt, u),
                  i._table[0].removeAttribute("aria-activedescendant"),
                  i._table.attr("aria-activedescendant", u));
              },
              _bindTable: function (n) {
                n.on(tr, this._addClassProxy).on(gi, this._removeClassProxy);
              },
              _click: function (n) {
                var t = this,
                  r = t.options,
                  u = new Date(+t._current),
                  i = o(n);
                it(i, 0);
                "month" == t._view.name &&
                  t.options.disableDates(i) &&
                  (i = t._value);
                t._view.setDate(u, i);
                t.navigateDown(k(u, r.min, r.max));
              },
              _focus: function (n) {
                var t = this,
                  i = t._view;
                0 !== i.compare(n, t._current)
                  ? t.navigate(n)
                  : ((t._current = n), t._class(l, n));
              },
              _focusView: function (n, t) {
                n && this.focus(t);
              },
              _viewWrapper: function () {
                var r = this,
                  t = r.element,
                  i = t.children(".k-calendar-view");
                i[0] ||
                  (i = n("<div class='k-calendar-view' />").insertAfter(
                    t.find(".k-header")
                  ));
              },
              _footer: function (r) {
                var u = this,
                  e = v(),
                  o = u.element,
                  f = o.find(".k-footer");
                return r
                  ? (f[0] ||
                      (f = n(
                        '<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>'
                      ).appendTo(o)),
                    (u._today = f
                      .show()
                      .find(".k-link")
                      .html(r(e))
                      .attr("title", i.toString(e, "D", u.options.culture))),
                    u._toggle(),
                    t)
                  : (u._toggle(!1), f.hide(), t);
              },
              _header: function () {
                var t,
                  n = this,
                  i = n.element;
                i.find(".k-header")[0] ||
                  i.html(
                    '<div class="k-header"><a href="#" role="button" class="k-link k-nav-prev" ' +
                      gt +
                      '="Previous"><span class="k-icon k-i-arrow-60-left"></span></a><a href="#" role="button" aria-live="assertive" aria-atomic="true" class="k-link k-nav-fast"></a><a href="#" role="button" class="k-link k-nav-next" ' +
                      gt +
                      '="Next"><span class="k-icon k-i-arrow-60-right"></span></a></div>'
                  );
                t = i
                  .find(".k-link")
                  .on(ir + " " + rr + " " + tr + " " + gi, fi)
                  .on("click", function () {
                    return !1;
                  });
                n._title = t.eq(1).on(p, function () {
                  n._active = n.options.focusOnNav !== !1;
                  n.navigateUp();
                });
                n[nt] = t.eq(0).on(p, function () {
                  n._active = n.options.focusOnNav !== !1;
                  n.navigateToPast();
                });
                n[tt] = t.eq(2).on(p, function () {
                  n._active = n.options.focusOnNav !== !1;
                  n.navigateToFuture();
                });
              },
              _navigate: function (n, t) {
                var f,
                  i = this,
                  s = i._index + 1,
                  r = new e(+i._current);
                i._isMultipleSelection() &&
                  ((f = i._table
                    .find("td:not(.k-other-month):not(.k-out-of-range)")
                    .has(".k-link")
                    .first()),
                  (r = o(f.find("a"))),
                  (i._current = new Date(+r)));
                n = i[n];
                n.hasClass(c) ||
                  (s > 3
                    ? r.setFullYear(r.getFullYear() + 100 * t)
                    : u.views[s].setDate(r, t),
                  i.navigate(r));
              },
              _option: function (n, i) {
                var f,
                  r = this,
                  u = r.options,
                  o = r._value || r._current;
                return i === t
                  ? u[n]
                  : ((i = yt(i, u.format, u.culture)),
                    i &&
                      ((u[n] = new e(+i)),
                      (f = n === vi ? i > o : o > i),
                      (f || cr(o, i)) &&
                        (f && (r._value = null), (r._changeView = !0)),
                      r._changeView ||
                        (r._changeView = !(!u.month.content && !u.month.empty)),
                      r.navigate(r._value),
                      r._toggle()),
                    t);
              },
              _toggle: function (n) {
                var i = this,
                  u = i.options,
                  f = i.options.disableDates(v()),
                  r = i._today;
                n === t && (n = b(v(), u.min, u.max));
                r &&
                  (r.off(p),
                  n && !f
                    ? r.addClass(ki).removeClass(c).on(p, ot(i._todayClick, i))
                    : r.removeClass(ki).addClass(c).on(p, or));
              },
              _todayClick: function (n) {
                var t = this,
                  r = a[t.options.depth],
                  u = t.options.disableDates,
                  i = v();
                n.preventDefault();
                u(i) ||
                  (0 === t._view.compare(t._current, i) &&
                    t._index == r &&
                    (t._changeView = !1),
                  t._isMultipleSelection() &&
                    ((t._selectDates = [i]), (t.selectable._lastActive = null)),
                  (t._value = i),
                  t.navigate(i, r),
                  t.trigger(w));
              },
              _templates: function () {
                var t = this,
                  r = t.options,
                  n = r.footer,
                  u = r.month,
                  f = u.content,
                  e = u.weekNumber,
                  o = u.empty,
                  s = '#= kendo.toString(data,"D","' + r.culture + '") #';
                t.month = {
                  content: y(
                    '<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" ' +
                      i.attr(et) +
                      '="#=data.dateString#" title="#=data.title#">' +
                      (f || "#=data.value#") +
                      "</a></td>",
                    { useWithBlock: !!f }
                  ),
                  empty: y('<td role="gridcell">' + (o || "&nbsp;") + "</td>", {
                    useWithBlock: !!o,
                  }),
                  weekNumber: y(
                    '<td class="k-alt">' +
                      (e || "#= data.weekNumber #") +
                      "</td>",
                    { useWithBlock: !!e }
                  ),
                };
                n && n !== !0 && (s = n);
                t.footer = n !== !1 ? y(s, { useWithBlock: !1 }) : null;
              },
            });
          si.plugin(uu);
          u = {
            firstDayOfMonth: function (n) {
              return r(n.getFullYear(), n.getMonth(), 1);
            },
            firstVisibleDay: function (n, t) {
              t = t || i.culture().calendar;
              var f = t.firstDay,
                r = new e(
                  n.getFullYear(),
                  n.getMonth(),
                  1,
                  n.getHours(),
                  n.getMinutes(),
                  n.getSeconds(),
                  n.getMilliseconds()
                );
              for (r.setFullYear(n.getFullYear()); r.getDay() != f; )
                u.setTime(r, -1 * ur);
              return r;
            },
            setTime: function (n, t) {
              var r = n.getTimezoneOffset(),
                i = new e(n.getTime() + t),
                u = i.getTimezoneOffset() - r;
              n.setTime(i.getTime() + u * ru);
            },
            views: [
              {
                name: rt,
                title: function (n, t, i, r) {
                  return (
                    ht(r).months.names[n.getMonth()] + " " + n.getFullYear()
                  );
                },
                content: function (n) {
                  var t = this,
                    f = 0,
                    e = n.min,
                    o = n.max,
                    s = n.date,
                    y = n.dates,
                    ft = n.format,
                    h = n.culture,
                    w = n.url,
                    et = n.showHeader,
                    ot = n.otherMonth,
                    b = n.isWeekColumnVisible,
                    st = w && y[0],
                    p = ht(h),
                    k = p.firstDay,
                    g = p.days,
                    ct = ti(g.names, k),
                    lt = ti(g.namesShort, k),
                    nt = u.firstVisibleDay(s, p),
                    at = t.first(s),
                    tt = t.last(s),
                    rt = t.toDateString,
                    l = v(),
                    a =
                      '<table tabindex="0" role="grid" class="k-content" cellspacing="0" data-start="' +
                      rt(nt) +
                      '">';
                  for (
                    a += et
                      ? '<caption class="k-month-header">' +
                        this.title(s, e, o, h) +
                        '</caption><thead><tr role="row">'
                      : '<thead><tr role="row">',
                      b &&
                        (a +=
                          '<th scope="col" class="k-alt">' +
                          n.messages.weekColumnHeader +
                          "</th>");
                    f < 7;
                    f++
                  )
                    a +=
                      '<th scope="col" title="' +
                      ct[f] +
                      '">' +
                      lt[f] +
                      "</th>";
                  return (
                    it(l, 0),
                    (l = +l),
                    ut({
                      cells: 42,
                      perRow: 7,
                      html: (a += '</tr></thead><tbody><tr role="row">'),
                      start: nt,
                      isWeekColumnVisible: b,
                      weekNumber: n.weekNumber,
                      min: r(e.getFullYear(), e.getMonth(), e.getDate()),
                      max: r(o.getFullYear(), o.getMonth(), o.getDate()),
                      otherMonth: ot,
                      content: n.content,
                      lastDayOfMonth: tt,
                      empty: n.empty,
                      setter: t.setDate,
                      disableDates: n.disableDates,
                      build: function (n, t, r) {
                        var u = [],
                          f = n.getDay(),
                          e = "",
                          o = "#";
                        return (
                          (n < at || n > tt) && u.push(d),
                          r(n) && u.push(c),
                          +n === l && u.push("k-today"),
                          (0 !== f && 6 !== f) || u.push("k-weekend"),
                          st &&
                            sr(+n, y) &&
                            ((o = w.replace("{0}", i.toString(n, ft, h))),
                            (e = " k-action-link")),
                          {
                            date: n,
                            dates: y,
                            ns: i.ns,
                            title: i.toString(n, "D", h),
                            value: n.getDate(),
                            dateString: rt(n),
                            cssClass: u[0]
                              ? ' class="' + u.join(" ") + '"'
                              : "",
                            linkClass: e,
                            url: o,
                          }
                        );
                      },
                      weekNumberBuild: function (n) {
                        return {
                          weekNumber: vr(n, i.culture().calendar.firstDay),
                          currentDate: n,
                        };
                      },
                    })
                  );
                },
                first: function (n) {
                  return u.firstDayOfMonth(n);
                },
                last: function (n) {
                  var t = r(n.getFullYear(), n.getMonth() + 1, 0),
                    i = u.firstDayOfMonth(n),
                    f = Math.abs(t.getTimezoneOffset() - i.getTimezoneOffset());
                  return f && t.setHours(i.getHours() + f / 60), t;
                },
                compare: function (n, t) {
                  var i = n.getMonth(),
                    r = n.getFullYear(),
                    u = t.getMonth(),
                    f = t.getFullYear();
                  return r > f ? 1 : r < f ? -1 : i == u ? 0 : i > u ? 1 : -1;
                },
                setDate: function (n, t) {
                  var i = n.getHours();
                  t instanceof e
                    ? n.setFullYear(t.getFullYear(), t.getMonth(), t.getDate())
                    : u.setTime(n, t * ur);
                  it(n, i);
                },
                toDateString: function (n) {
                  return (
                    n.getFullYear() + "/" + n.getMonth() + "/" + n.getDate()
                  );
                },
              },
              {
                name: "year",
                title: function (n) {
                  return n.getFullYear();
                },
                content: function (n) {
                  var e = ht(n.culture).months.namesAbbr,
                    o = this.toDateString,
                    u = n.min,
                    f = n.max,
                    t = "";
                  return (
                    n.showHeader &&
                      ((t +=
                        '<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><caption class="k-meta-header">'),
                      (t += this.title(n.date)),
                      (t += '</caption><tbody><tr role="row">')),
                    ut({
                      min: r(u.getFullYear(), u.getMonth(), 1),
                      max: r(f.getFullYear(), f.getMonth(), 1),
                      start: r(n.date.getFullYear(), 0, 1),
                      html: t,
                      setter: this.setDate,
                      build: function (n) {
                        return {
                          value: e[n.getMonth()],
                          ns: i.ns,
                          dateString: o(n),
                          cssClass: "",
                        };
                      },
                    })
                  );
                },
                first: function (n) {
                  return r(n.getFullYear(), 0, n.getDate());
                },
                last: function (n) {
                  return r(n.getFullYear(), 11, n.getDate());
                },
                compare: function (n, t) {
                  return st(n, t);
                },
                setDate: function (n, t) {
                  var i,
                    r = n.getHours();
                  t instanceof e
                    ? ((i = t.getMonth()),
                      n.setFullYear(t.getFullYear(), i, n.getDate()),
                      i !== n.getMonth() && n.setDate(0))
                    : ((i = n.getMonth() + t),
                      n.setMonth(i),
                      i > 11 && (i -= 12),
                      i > 0 && n.getMonth() != i && n.setDate(0));
                  it(n, r);
                },
                toDateString: function (n) {
                  return n.getFullYear() + "/" + n.getMonth() + "/1";
                },
              },
              {
                name: "decade",
                title: function (n, t, i) {
                  return ni(n, t, i, 10);
                },
                content: function (n) {
                  var u = n.date.getFullYear(),
                    f = this.toDateString,
                    t = "";
                  return (
                    n.showHeader &&
                      ((t +=
                        '<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><caption class="k-meta-header">'),
                      (t += this.title(n.date, n.min, n.max)),
                      (t += '</caption><tbody><tr role="row">')),
                    ut({
                      start: r(u - (u % 10) - 1, 0, 1),
                      min: r(n.min.getFullYear(), 0, 1),
                      max: r(n.max.getFullYear(), 0, 1),
                      otherMonth: n.otherMonth,
                      html: t,
                      setter: this.setDate,
                      build: function (n, t) {
                        return {
                          value: n.getFullYear(),
                          ns: i.ns,
                          dateString: f(n),
                          cssClass: 0 === t || 11 == t ? bi : "",
                        };
                      },
                    })
                  );
                },
                first: function (n) {
                  var t = n.getFullYear();
                  return r(t - (t % 10), n.getMonth(), n.getDate());
                },
                last: function (n) {
                  var t = n.getFullYear();
                  return r(t - (t % 10) + 9, n.getMonth(), n.getDate());
                },
                compare: function (n, t) {
                  return st(n, t, 10);
                },
                setDate: function (n, t) {
                  ii(n, t, 1);
                },
                toDateString: function (n) {
                  return n.getFullYear() + "/0/1";
                },
              },
              {
                name: pi,
                title: function (n, t, i) {
                  return ni(n, t, i, 100);
                },
                content: function (n) {
                  var s = n.date.getFullYear(),
                    e = n.min.getFullYear(),
                    o = n.max.getFullYear(),
                    h = this.toDateString,
                    t = e,
                    u = o,
                    f = "";
                  return (
                    (t -= t % 10),
                    (u -= u % 10),
                    u - t < 10 && (u = t + 9),
                    n.showHeader &&
                      ((f +=
                        '<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><caption class="k-meta-header">'),
                      (f += this.title(n.date, n.min, n.max)),
                      (f += '</caption><tbody><tr role="row">')),
                    ut({
                      start: r(s - (s % 100) - 10, 0, 1),
                      min: r(t, 0, 1),
                      max: r(u, 0, 1),
                      otherMonth: n.otherMonth,
                      html: f,
                      setter: this.setDate,
                      build: function (n, t) {
                        var r = n.getFullYear(),
                          u = r + 9;
                        return (
                          r < e && (r = e),
                          u > o && (u = o),
                          {
                            ns: i.ns,
                            value: r + " - " + u,
                            dateString: h(n),
                            cssClass: 0 === t || 11 == t ? bi : "",
                          }
                        );
                      },
                    })
                  );
                },
                first: function (n) {
                  var t = n.getFullYear();
                  return r(t - (t % 100), n.getMonth(), n.getDate());
                },
                last: function (n) {
                  var t = n.getFullYear();
                  return r(t - (t % 100) + 99, n.getMonth(), n.getDate());
                },
                compare: function (n, t) {
                  return st(n, t, 100);
                },
                setDate: function (n, t) {
                  ii(n, t, 10);
                },
                toDateString: function (n) {
                  var t = n.getFullYear();
                  return t - (t % 10) + "/0/1";
                },
              },
            ],
          };
          u.isEqualDatePart = hr;
          u.isEqualDate = at;
          u.makeUnselectable = ei;
          u.restrictValue = k;
          u.isInRange = b;
          u.addClassToViewContainer = oi;
          u.normalize = ct;
          u.viewsEnum = a;
          u.disabled = lt;
          u.toDateObject = o;
          u.getToday = v;
          u.createDate = r;
          i.calendar = u;
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.dateinput.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function b(n, t, i, r) {
            var e,
              u,
              o,
              s,
              h = n[r + n.length - i.length];
            if (
              ((n = n.substring(0, r + n.length - i.length)),
              (i = i.substring(0, r)),
              (e = []),
              n === i && r > 0)
            )
              return e.push([t[r - 1], i[r - 1]]), e;
            if (
              0 === n.indexOf(i) &&
              (0 === i.length || t[i.length - 1] !== t[i.length])
            ) {
              for (o = "", u = i.length; u < n.length; u++)
                t[u] !== o &&
                  f.indexOf(t[u]) >= 0 &&
                  ((o = t[u]), e.push([o, ""]));
              return e;
            }
            if (" " === i[i.length - 1] || i[i.length - 1] === h)
              return [[t[r - 1], " "]];
            if (0 === i.indexOf(n) || f.indexOf(t[r - 1]) === -1) {
              for (s = t[0], u = Math.max(0, n.length - 1); u < t.length; u++)
                if (f.indexOf(t[u]) >= 0) {
                  s = t[u];
                  break;
                }
              return [[s, i[r - 1]]];
            }
            return [[t[r - 1], i[r - 1]]];
          }
          var c,
            k = window,
            i = k.kendo,
            u = i.caret,
            l = i.ui,
            o = l.Widget,
            d = i.keys,
            r = ".kendoDateInput",
            e = n.proxy,
            g = {}.toString,
            a =
              (i.support.propertyChangeEvent
                ? "propertychange.kendoDateInput input"
                : "input") + r,
            v = "k-state-disabled",
            y = "k-state-default",
            p = "k-state-invalid",
            w = "disabled",
            h = "readonly",
            s = "change",
            f = "dMyHhmftsz",
            nt = o.extend({
              init: function (t, u) {
                var e,
                  s,
                  f = this;
                o.fn.init.call(f, t, u);
                t = f.element;
                u = f.options;
                u.format = i._extractFormat(
                  u.format ||
                    i.getCulture(u.culture).calendars.standard.patterns.d
                );
                u.min = i.parseDate(t.attr("min")) || i.parseDate(u.min);
                u.max = i.parseDate(t.attr("max")) || i.parseDate(u.max);
                e =
                  (t.parent().attr("class") || "").indexOf("k-picker-wrap") >=
                  0;
                e
                  ? (f.wrapper = t.parent())
                  : ((f.wrapper = t
                      .wrap("<span class='k-widget k-dateinput'></span>")
                      .parent()),
                    f.wrapper.addClass(t[0].className),
                    (f.wrapper[0].style.cssText = t[0].style.cssText),
                    t.css({ width: "100%", height: t[0].style.height }));
                f._inputWrapper = n(f.wrapper[0]);
                n("<span class='k-icon k-i-warning'></span>").insertAfter(t);
                f._form();
                f.element
                  .addClass(e ? " " : "k-textbox")
                  .attr("autocomplete", "off")
                  .on("focusout" + r, function () {
                    f._change();
                  });
                try {
                  t[0].setAttribute("type", "text");
                } catch (h) {
                  t[0].type = "text";
                }
                s =
                  t.is("[disabled]") ||
                  n(f.element).parents("fieldset").is(":disabled");
                s ? f.enable(!1) : f.readonly(t.is("[readonly]"));
                f.value(f.options.value || t.val());
                i.notify(f);
              },
              options: {
                name: "DateInput",
                culture: "",
                value: "",
                format: "",
                min: new Date(1900, 0, 1),
                max: new Date(2099, 11, 31),
                messages: {
                  year: "year",
                  month: "month",
                  day: "day",
                  weekday: "day of the week",
                  hour: "hours",
                  minute: "minutes",
                  second: "seconds",
                  dayperiod: "AM/PM",
                },
              },
              events: [s],
              min: function (n) {
                return n === t ? this.options.min : ((this.options.min = n), t);
              },
              max: function (n) {
                return n === t ? this.options.max : ((this.options.max = n), t);
              },
              setOptions: function (n) {
                var t = this;
                o.fn.setOptions.call(t, n);
                this._unbindInput();
                this._bindInput();
                this._updateElementValue();
              },
              destroy: function () {
                var n = this;
                n.element.off(r);
                n._formElement && n._formElement.off("reset", n._resetHandler);
                o.fn.destroy.call(n);
              },
              value: function (n) {
                return n === t
                  ? this._dateTime.getDateObject()
                  : (null === n && (n = ""),
                    "[object Date]" !== g.call(n) &&
                      (n = i.parseDate(
                        n,
                        this.options.format,
                        this.options.culture
                      )),
                    n && !n.getTime() && (n = null),
                    (this._dateTime = new c(
                      n,
                      this.options.format,
                      this.options.culture,
                      this.options.messages
                    )),
                    this._updateElementValue(),
                    (this._oldValue = n),
                    t);
              },
              _updateElementValue: function () {
                var n = this._dateTime.toPair(
                  this.options.format,
                  this.options.culture,
                  this.options.messages
                );
                this.element.val(n[0]);
                this._oldText = n[0];
                this._format = n[1];
              },
              readonly: function (n) {
                this._editable({ readonly: n === t || n, disable: !1 });
              },
              enable: function (n) {
                this._editable({ readonly: !1, disable: !(n = n === t || n) });
              },
              _bindInput: function () {
                var n = this;
                n.element
                  .on("focusout" + r, function () {
                    n._change();
                  })
                  .on("paste" + r, e(n._paste, n))
                  .on("keydown" + r, e(n._keydown, n))
                  .on(a, e(n._input, n))
                  .on("mouseup" + r, e(n._mouseUp, n))
                  .on(
                    "DOMMouseScroll" + r + " mousewheel" + r,
                    e(n._scroll, n)
                  );
              },
              _unbindInput: function () {
                this.element
                  .off("keydown" + r)
                  .off("paste" + r)
                  .off("focusout" + r)
                  .off(a)
                  .off("mouseup" + r)
                  .off("DOMMouseScroll" + r + " mousewheel" + r);
              },
              _editable: function (n) {
                var i = this,
                  t = i.element,
                  r = n.disable,
                  u = n.readonly,
                  f = i.wrapper;
                i._unbindInput();
                u || r
                  ? (r &&
                      (f.addClass(v).removeClass(y),
                      t.attr(w, r),
                      t && t.length && t[0].removeAttribute(h)),
                    u && t.attr(h, u))
                  : (f.addClass(y).removeClass(v),
                    t &&
                      t.length &&
                      (t[0].removeAttribute(w), t[0].removeAttribute(h)),
                    i._bindInput());
              },
              _change: function () {
                var n = this,
                  i = n._oldValue,
                  t = n.value();
                t &&
                  n.min() &&
                  t < n.min() &&
                  (n.value(n.min()), (t = n.value()));
                t &&
                  n.max() &&
                  t > n.max() &&
                  (n.value(n.max()), (t = n.value()));
                ((i && t && t.getTime() !== i.getTime()) ||
                  (i && !t) ||
                  (!i && t)) &&
                  ((n._oldValue = t), n.trigger(s), n.element.trigger(s));
              },
              _input: function () {
                var n,
                  f,
                  r,
                  o,
                  s,
                  h,
                  c,
                  t = this,
                  l = t.element[0],
                  e = !1;
                if (i._activeElement() === l) {
                  if (
                    ((n = b(
                      this._oldText,
                      this._format,
                      this.element[0].value,
                      u(this.element[0])[0]
                    )),
                    (f = 1 === n.length && " " === n[0][1]),
                    !f)
                  )
                    for (r = 0; r < n.length; r++)
                      (o = this._dateTime.parsePart(n[r][0], n[r][1])),
                        (e = e || !o);
                  this._updateElementValue();
                  n.length &&
                    " " !== n[0][0] &&
                    (this._selectSegment(n[0][0]),
                    f ||
                      ((s = n[0][0]),
                      setTimeout(function () {
                        t._selectSegment(s);
                      })));
                  f &&
                    ((h = { keyCode: 39, preventDefault: function () {} }),
                    this._keydown(h));
                  e &&
                    (clearTimeout(t._blinkInvalidTimeout),
                    (c = p),
                    t.wrapper.addClass(p),
                    (t._blinkInvalidTimeout = setTimeout(function () {
                      t.wrapper.removeClass(c);
                    }, 100)));
                }
              },
              _mouseUp: function () {
                var n = u(this.element[0]);
                n[0] === n[1] && this._selectNearestSegment();
              },
              _scroll: function (n) {
                if (
                  i._activeElement() === this.element[0] &&
                  !this.element.is("[readonly]")
                ) {
                  n = window.event || n;
                  var t = { keyCode: 37, preventDefault: function () {} };
                  t.keyCode = n.shiftKey
                    ? (n.wheelDelta || -n.detail) > 0
                      ? 37
                      : 39
                    : (n.wheelDelta || -n.detail) > 0
                    ? 38
                    : 40;
                  this._keydown(t);
                  n.returnValue = !1;
                  n.preventDefault && n.preventDefault();
                  n.stopPropagation && n.stopPropagation();
                }
              },
              _form: function () {
                var t = this,
                  i = t.element,
                  r = i.attr("form"),
                  u = r ? n("#" + r) : i.closest("form");
                u[0] &&
                  ((t._resetHandler = function () {
                    setTimeout(function () {
                      t.value(i[0].value);
                    });
                  }),
                  (t._formElement = u.on("reset", t._resetHandler)));
              },
              _paste: function (n) {
                n.preventDefault();
              },
              _keydown: function (n) {
                var e,
                  c,
                  r,
                  o,
                  h,
                  l,
                  a,
                  t = n.keyCode;
                if (37 == t || 39 == t)
                  for (
                    n.preventDefault(),
                      e = u(this.element[0]),
                      e[0] != e[1] && this._selectNearestSegment(),
                      c = 37 == t ? -1 : 1,
                      r =
                        c == -1
                          ? u(this.element[0])[0] - 1
                          : u(this.element[0])[1] + 1;
                    r >= 0 && r < this._format.length;

                  ) {
                    if (f.indexOf(this._format[r]) >= 0) {
                      this._selectSegment(this._format[r]);
                      break;
                    }
                    r += c;
                  }
                (38 != t && 40 != t) ||
                  (n.preventDefault(),
                  (e = u(this.element[0])),
                  (o = this._format[e[0]]),
                  f.indexOf(o) >= 0 &&
                    ((h = 1),
                    "m" == o && (h = this.options.interval || 1),
                    this._dateTime.modifyPart(o, 38 == t ? 1 * h : h * -1),
                    this._updateElementValue(),
                    this._selectSegment(o),
                    this.element.trigger(s)));
                i.support.browser.msie &&
                  i.support.browser.version < 10 &&
                  ((l = n.keyCode ? n.keyCode : n.which),
                  (8 !== l && 46 !== l) ||
                    ((a = this),
                    setTimeout(function () {
                      a._input();
                    }, 0)));
                t === d.ENTER && this._change();
              },
              _selectNearestSegment: function () {
                for (
                  var e = u(this.element[0]), r = e[0], n = r, i = r - 1;
                  n < this._format.length || i >= 0;
                  n++, i--
                ) {
                  if (
                    n < this._format.length &&
                    f.indexOf(this._format[n]) !== -1
                  )
                    return this._selectSegment(this._format[n]), t;
                  if (i >= 0 && f.indexOf(this._format[i]) !== -1)
                    return this._selectSegment(this._format[i]), t;
                }
              },
              _selectSegment: function (n) {
                for (var i = -1, r = 0, t = 0; t < this._format.length; t++)
                  this._format[t] === n && ((r = t + 1), i === -1 && (i = t));
                i < 0 && (i = 0);
                u(this.element, i, r);
              },
            });
          l.plugin(nt);
          c = function (n, r, u, f) {
            function s(n, t, i) {
              return (
                (n += ""),
                (t = t || 2),
                (i = t - n.length),
                i ? et[t].substring(0, i) + n : n
              );
            }
            function rt(n) {
              return (ft = n), ot;
            }
            function g(n, t) {
              switch (n) {
                case "y":
                  a = t;
                  break;
                case "M":
                  h = t;
                  t || (e.setMonth(0), (p = ""));
                  break;
                case "d":
                  l = t;
                  break;
                case "H":
                case "h":
                  c = t;
                  t || (y = "");
                  break;
                case "m":
                  w = t;
                  break;
                case "s":
                  b = t;
                  break;
                default:
                  return;
              }
            }
            var nt,
              d,
              e = null,
              a = !0,
              h = !0,
              l = !0,
              c = !0,
              w = !0,
              b = !0,
              k = !0,
              p = "",
              y = "",
              o = {},
              et = ["", "0", "00", "000", "0000"],
              ut =
                /dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|zzz|zz|z|"[^"]*"|'[^']*'/g,
              tt = null,
              v = null,
              it = null,
              ft = !1,
              ot = function (n) {
                var r, u, i, f, y;
                switch (n) {
                  case "d":
                    i = l ? e.getDate() : o.day;
                    break;
                  case "dd":
                    i = l ? s(e.getDate()) : o.day;
                    break;
                  case "ddd":
                    i = l && h && a ? it.namesAbbr[e.getDay()] : o.weekday;
                    break;
                  case "dddd":
                    i = l && h && a ? it.names[e.getDay()] : o.weekday;
                    break;
                  case "M":
                    i = h ? e.getMonth() + 1 : o.month;
                    break;
                  case "MM":
                    i = h ? s(e.getMonth() + 1) : o.month;
                    break;
                  case "MMM":
                    i = h ? tt.namesAbbr[e.getMonth()] : o.month;
                    break;
                  case "MMMM":
                    i = h ? tt.names[e.getMonth()] : o.month;
                    break;
                  case "yy":
                    i = a ? s(e.getFullYear() % 100) : o.year;
                    break;
                  case "yyyy":
                    i = a ? s(e.getFullYear(), 4) : o.year;
                    break;
                  case "h":
                    i = c ? e.getHours() % 12 || 12 : o.hour;
                    break;
                  case "hh":
                    i = c ? s(e.getHours() % 12 || 12) : o.hour;
                    break;
                  case "H":
                    i = c ? e.getHours() : o.hour;
                    break;
                  case "HH":
                    i = c ? s(e.getHours()) : o.hour;
                    break;
                  case "m":
                    i = w ? e.getMinutes() : o.minute;
                    break;
                  case "mm":
                    i = w ? s(e.getMinutes()) : o.minute;
                    break;
                  case "s":
                    i = b ? e.getSeconds() : o.second;
                    break;
                  case "ss":
                    i = b ? s(e.getSeconds()) : o.second;
                    break;
                  case "f":
                    i = k ? Math.floor(e.getMilliseconds() / 100) : k;
                    break;
                  case "ff":
                    i = e.getMilliseconds();
                    i > 99 && (i = Math.floor(i / 10));
                    i = k ? s(i) : n;
                    break;
                  case "fff":
                    i = k ? s(e.getMilliseconds(), 3) : n;
                    break;
                  case "tt":
                    i = c
                      ? e.getHours() < 12
                        ? v.AM[0]
                        : v.PM[0]
                      : o.dayperiod;
                    break;
                  case "zzz":
                    r = e.getTimezoneOffset();
                    u = r < 0;
                    i = ("" + Math.abs(r / 60)).split(".")[0];
                    r = Math.abs(r) - 60 * i;
                    i = (u ? "+" : "-") + s(i);
                    i += ":" + s(r);
                    break;
                  case "z":
                  case "zz":
                    i = e.getTimezoneOffset() / 60;
                    u = i < 0;
                    i = ("" + Math.abs(i)).split(".")[0];
                    i = (u ? "+" : "-") + ("zz" === n ? s(i) : i);
                }
                if (((i = i !== t ? i : n.slice(1, n.length - 1)), ft)) {
                  for (
                    i = "" + i,
                      f = "",
                      "ddd" == n && (n = "EEE"),
                      "dddd" == n && (n = "EEEE"),
                      y = 0;
                    y < i.length;
                    y++
                  )
                    f += n[0];
                  return f;
                }
                return i;
              };
            if (
              ((this.setValue = function (n) {
                l = n;
              }),
              (this.getValue = function () {
                return l;
              }),
              (this.modifyPart = function (n, t) {
                var r,
                  i = new Date(e && e.getTime ? e.getTime() : e);
                switch (n) {
                  case "y":
                    i.setFullYear(i.getFullYear() + t);
                    break;
                  case "M":
                    r = i.getMonth() + t;
                    i.setMonth(r);
                    i.getMonth() % 12 != (r + 12) % 12 &&
                      (i.setDate(1), i.setMonth(r));
                    break;
                  case "d":
                  case "E":
                    i.setDate(i.getDate() + t);
                    break;
                  case "H":
                  case "h":
                    i.setHours(i.getHours() + t);
                    break;
                  case "m":
                    i.setMinutes(i.getMinutes() + t);
                    break;
                  case "s":
                    i.setSeconds(i.getSeconds() + t);
                    break;
                  case "t":
                    i.setHours((i.getHours() + 12) % 24);
                }
                i.getFullYear() > 0 && (g(n, !0), (e = i));
              }),
              (this.parsePart = function (n, t) {
                var i, r, f, u, nt, d, o, s, k;
                if (!t) return g(n, !1), !0;
                switch (((i = new Date(e && e.getTime ? e.getTime() : e)), n)) {
                  case "d":
                    if (
                      ((f = (l ? 10 * i.getDate() : 0) + parseInt(t, 10)),
                      isNaN(f))
                    )
                      return;
                    for (; f > 31; ) f = parseInt(("" + f).slice(1), 10);
                    if (f < 1) l = !1;
                    else {
                      if ((i.setDate(f), i.getMonth() !== e.getMonth())) return;
                      l = !0;
                    }
                    break;
                  case "M":
                    if (
                      ((u =
                        (h ? 10 * (i.getMonth() + 1) : 0) + parseInt(t, 10)),
                      isNaN(u))
                    ) {
                      for (
                        nt = v.months.names, p += t.toLowerCase();
                        p.length > 0;

                      ) {
                        for (d = 0; d < nt.length; d++)
                          if (0 === nt[d].toLowerCase().indexOf(p))
                            return i.setMonth(d), (h = !0), (e = i), !0;
                        p = p.substring(1, p.length);
                      }
                      return !1;
                    }
                    for (; u > 12; ) u = parseInt(("" + u).slice(1), 10);
                    u < 1
                      ? (h = !1)
                      : (i.setMonth(u - 1),
                        i.getMonth() !== u - 1 &&
                          (i.setDate(1), i.setMonth(u - 1)),
                        (h = !0));
                    break;
                  case "y":
                    if (
                      ((o = (a ? 10 * i.getFullYear() : 0) + parseInt(t, 10)),
                      isNaN(o))
                    )
                      return;
                    for (; o > 9999; ) o = parseInt(("" + o).slice(1), 10);
                    o < 1 ? (a = !1) : (i.setFullYear(o), (a = !0));
                    break;
                  case "h":
                    if (
                      ((r =
                        (c ? 10 * (i.getHours() % 12 || 12) : 0) +
                        parseInt(t, 10)),
                      isNaN(r))
                    )
                      return;
                    for (; r > 12; ) r = parseInt(("" + r).slice(1), 10);
                    i.setHours(12 * Math.floor(i.getHours() / 12) + (r % 12));
                    c = !0;
                    break;
                  case "H":
                    if (
                      ((r = (c ? 10 * i.getHours() : 0) + parseInt(t, 10)),
                      isNaN(r))
                    )
                      return;
                    for (; r > 23; ) r = parseInt(("" + r).slice(1), 10);
                    i.setHours(r);
                    c = !0;
                    break;
                  case "m":
                    if (
                      ((s = (w ? 10 * i.getMinutes() : 0) + parseInt(t, 10)),
                      isNaN(s))
                    )
                      return;
                    for (; s > 59; ) s = parseInt(("" + s).slice(1), 10);
                    i.setMinutes(s);
                    w = !0;
                    break;
                  case "s":
                    if (
                      ((k = (b ? 10 * i.getSeconds() : 0) + parseInt(t, 10)),
                      isNaN(k))
                    )
                      return;
                    for (; k > 59; ) k = parseInt(("" + k).slice(1), 10);
                    i.setSeconds(k);
                    b = !0;
                    break;
                  case "t":
                    if (c) {
                      for (y += t.toLowerCase(); y.length > 0; ) {
                        if (
                          (0 === v.AM[0].toLowerCase().indexOf(y) &&
                            i.getHours() >= 12) ||
                          (0 === v.PM[0].toLowerCase().indexOf(y) &&
                            i.getHours() < 12)
                        )
                          return (
                            i.setHours((i.getHours() + 12) % 24), (e = i), !0
                          );
                        y = y.substring(1, y.length);
                      }
                      return !1;
                    }
                }
                return (e = i), !0;
              }),
              (this.toPair = function (n, t, r) {
                return n
                  ? ((t = i.getCulture(t)),
                    (v = t.calendars.standard),
                    (n = v.patterns[n] || n),
                    (it = v.days),
                    (tt = v.months),
                    (o = r),
                    [n.replace(ut, rt(!1)), n.replace(ut, rt(!0))])
                  : ["", ""];
              }),
              (this.getDateObject = function () {
                return a && h && l && c && w && b && k
                  ? new Date(e.getTime())
                  : null;
              }),
              n)
            )
              e = new Date(n.getTime());
            else
              for (
                e = new Date(), nt = this.toPair(r, u, f)[1], d = 0;
                d < nt.length;
                d++
              )
                g(nt[d], !1);
          };
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.datepicker.min",
      ["kendo.calendar.min", "kendo.popup.min", "kendo.dateinput.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function a(t) {
            var i = t.parseFormats,
              r = t.format;
            o.normalize(t);
            i = n.isArray(i) ? i : [i];
            i.length || i.push("yyyy-MM-dd");
            n.inArray(r, i) === -1 && i.splice(0, 0, t.format);
            t.parseFormats = i;
          }
          function nt(n) {
            n.preventDefault();
          }
          var tt,
            i = window.kendo,
            e = i.ui,
            s = e.Widget,
            u = i.parseDate,
            f = i.keys,
            v = i.support,
            bt = i.template,
            kt = i._activeElement,
            it = "<div />",
            rt = "<span />",
            r = ".kendoDatePicker",
            ut = "click" + r,
            dt = v.mouseAndTouchPresent
              ? i.applyEventMap("up", r.slice(1))
              : ut,
            y = "open",
            p = "close",
            w = "change",
            ft = "disabled",
            et = "readonly",
            b = "k-state-default",
            ot = "k-state-focused",
            st = "k-state-selected",
            k = "k-state-disabled",
            gt = "k-state-hover",
            ni = "mouseenter" + r + " mouseleave" + r,
            ht = "mousedown" + r,
            d = "id",
            ct = "min",
            lt = "max",
            at = "month",
            vt = "aria-disabled",
            yt = "aria-expanded",
            g = "aria-hidden",
            o = i.calendar,
            ti = o.isInRange,
            pt = o.restrictValue,
            ii = o.isEqualDatePart,
            h = n.extend,
            c = n.proxy,
            wt = Date,
            l = function (t) {
              var r,
                u = this,
                o = document.body,
                f = n(it)
                  .attr(g, "true")
                  .addClass("k-calendar-container")
                  .appendTo(o);
              u.options = t = t || {};
              r = t.id;
              r && ((r += "_dateview"), f.attr(d, r), (u._dateViewID = r));
              u.popup = new e.Popup(
                f,
                h(t.popup, t, {
                  name: "Popup",
                  isRtl: i.support.isRtl(t.anchor),
                })
              );
              u.div = f;
              u.value(t.value);
            };
          l.prototype = {
            _calendar: function () {
              var u,
                t = this,
                r = t.calendar,
                f = t.options;
              r ||
                ((u = n(it)
                  .attr(d, i.guid())
                  .appendTo(t.popup.element)
                  .on(ht, nt)
                  .on(ut, "td:has(.k-link)", c(t._click, t))),
                (t.calendar = r = new e.Calendar(u)),
                t._setOptions(f),
                i.calendar.makeUnselectable(r.element),
                r.navigate(t._value || t._current, f.start),
                t.value(t._value));
            },
            _setOptions: function (n) {
              this.calendar.setOptions({
                focusOnNav: !1,
                change: n.change,
                culture: n.culture,
                dates: n.dates,
                depth: n.depth,
                footer: n.footer,
                format: n.format,
                max: n.max,
                min: n.min,
                month: n.month,
                weekNumber: n.weekNumber,
                start: n.start,
                disableDates: n.disableDates,
              });
            },
            setOptions: function (n) {
              var t = this.options,
                i = n.disableDates;
              i && (n.disableDates = o.disabled(i));
              this.options = h(t, n, {
                change: t.change,
                close: t.close,
                open: t.open,
              });
              this.calendar && this._setOptions(this.options);
            },
            destroy: function () {
              this.popup.destroy();
            },
            open: function () {
              var t,
                n = this;
              n._calendar();
              t = n.popup._hovered;
              n.popup._hovered = !0;
              n.popup.open();
              setTimeout(function () {
                n.popup._hovered = t;
              }, 1);
            },
            close: function () {
              this.popup.close();
            },
            min: function (n) {
              this._option(ct, n);
            },
            max: function (n) {
              this._option(lt, n);
            },
            toggle: function () {
              var n = this;
              n[n.popup.visible() ? p : y]();
            },
            move: function (n) {
              var t = this,
                i = n.keyCode,
                u = t.calendar,
                e = (n.ctrlKey && i == f.DOWN) || i == f.ENTER,
                r = !1;
              if (n.altKey)
                i == f.DOWN
                  ? (t.open(), n.preventDefault(), (r = !0))
                  : i == f.UP && (t.close(), n.preventDefault(), (r = !0));
              else if (t.popup.visible()) {
                if (i == f.ESC || (e && u._cell.hasClass(st)))
                  return t.close(), n.preventDefault(), !0;
                i != f.SPACEBAR && (t._current = u._move(n));
                r = !0;
              }
              return r;
            },
            current: function (n) {
              this._current = n;
              this.calendar._focus(n);
            },
            value: function (n) {
              var t = this,
                r = t.calendar,
                i = t.options,
                u = i.disableDates;
              u && u(n) && (n = null);
              t._value = n;
              t._current = new wt(+pt(n, i.min, i.max));
              r && r.value(n);
            },
            _click: function (n) {
              n.currentTarget.className.indexOf(st) !== -1 &&
                (this.calendar.trigger("change"), this.close());
            },
            _option: function (n, t) {
              var i = this,
                r = i.calendar;
              i.options[n] = t;
              r && r[n](t);
            },
          };
          l.normalize = a;
          i.DateView = l;
          tt = s.extend({
            init: function (t, r) {
              var o,
                e,
                f = this;
              s.fn.init.call(f, t, r);
              t = f.element;
              r = f.options;
              r.disableDates = i.calendar.disabled(r.disableDates);
              r.min = u(t.attr("min")) || u(r.min);
              r.max = u(t.attr("max")) || u(r.max);
              a(r);
              f._initialOptions = h({}, r);
              f._wrapper();
              f.dateView = new l(
                h({}, r, {
                  id: t.attr(d),
                  anchor: f.wrapper,
                  change: function () {
                    f._change(this.value());
                    f.close();
                  },
                  close: function (n) {
                    f.trigger(p)
                      ? n.preventDefault()
                      : (t.attr(yt, !1), e.attr(g, !0));
                  },
                  open: function (n) {
                    var i,
                      r = f.options;
                    f.trigger(y)
                      ? n.preventDefault()
                      : (f.element.val() !== f._oldText &&
                          ((i = u(t.val(), r.parseFormats, r.culture)),
                          f.dateView[i ? "current" : "value"](i)),
                        t.attr(yt, !0),
                        e.attr(g, !1),
                        f._updateARIA(i));
                  },
                })
              );
              e = f.dateView.div;
              f._icon();
              try {
                t[0].setAttribute("type", "text");
              } catch (c) {
                t[0].type = "text";
              }
              t.addClass("k-input").attr({
                role: "combobox",
                "aria-expanded": !1,
                "aria-owns": f.dateView._dateViewID,
                autocomplete: "off",
              });
              f._reset();
              f._template();
              o =
                t.is("[disabled]") ||
                n(f.element).parents("fieldset").is(":disabled");
              o ? f.enable(!1) : f.readonly(t.is("[readonly]"));
              f._createDateInput(r);
              f._old = f._update(r.value || f.element.val());
              f._oldText = t.val();
              i.notify(f);
            },
            events: [y, p, w],
            options: {
              name: "DatePicker",
              value: null,
              footer: "",
              format: "",
              culture: "",
              parseFormats: [],
              min: new Date(1900, 0, 1),
              max: new Date(2099, 11, 31),
              start: at,
              depth: at,
              animation: {},
              month: {},
              dates: [],
              disableDates: null,
              ARIATemplate:
                'Current focused date is #=kendo.toString(data.current, "D")#',
              dateInput: !1,
              weekNumber: !1,
            },
            setOptions: function (n) {
              var t = this,
                r = t._value;
              s.fn.setOptions.call(t, n);
              n = t.options;
              n.min = u(n.min);
              n.max = u(n.max);
              a(n);
              t.dateView.setOptions(n);
              t._createDateInput(n);
              t._dateInput || t.element.val(i.toString(r, n.format, n.culture));
              r && t._updateARIA(r);
            },
            _editable: function (n) {
              var t = this,
                o = t._dateIcon.off(r),
                i = t.element.off(r),
                f = t._inputWrapper.off(r),
                e = n.readonly,
                u = n.disable;
              e || u
                ? (f.addClass(u ? k : b).removeClass(u ? b : k),
                  i.attr(ft, u).attr(et, e).attr(vt, u))
                : (f.addClass(b).removeClass(k).on(ni, t._toggleHover),
                  i &&
                    i.length &&
                    (i[0].removeAttribute(ft), i[0].removeAttribute(et)),
                  i
                    .attr(vt, !1)
                    .on("keydown" + r, c(t._keydown, t))
                    .on("focusout" + r, c(t._blur, t))
                    .on("focus" + r, function () {
                      t._inputWrapper.addClass(ot);
                    }),
                  o.on(dt, c(t._click, t)).on(ht, nt));
            },
            readonly: function (n) {
              this._editable({ readonly: n === t || n, disable: !1 });
              this._dateInput &&
                this._dateInput._editable({
                  readonly: n === t || n,
                  disable: !1,
                });
            },
            enable: function (n) {
              this._editable({ readonly: !1, disable: !(n = n === t || n) });
              this._dateInput &&
                this._dateInput._editable({
                  readonly: !1,
                  disable: !(n = n === t || n),
                });
            },
            destroy: function () {
              var n = this;
              s.fn.destroy.call(n);
              n.dateView.destroy();
              n.element.off(r);
              n._dateIcon.off(r);
              n._inputWrapper.off(r);
              n._form && n._form.off("reset", n._resetHandler);
            },
            open: function () {
              this.dateView.open();
            },
            close: function () {
              this.dateView.close();
            },
            min: function (n) {
              return this._option(ct, n);
            },
            max: function (n) {
              return this._option(lt, n);
            },
            value: function (n) {
              var i = this;
              return n === t
                ? i._value
                : ((i._old = i._update(n)),
                  null === i._old && i.element.val(""),
                  (i._oldText = i.element.val()),
                  t);
            },
            _toggleHover: function (t) {
              n(t.currentTarget).toggleClass(gt, "mouseenter" === t.type);
            },
            _blur: function () {
              var n = this,
                t = n.element.val();
              n.close();
              t !== n._oldText && n._change(t);
              n._inputWrapper.removeClass(ot);
            },
            _click: function (n) {
              var t = this;
              t.dateView.toggle();
              t._focusElement(n.type);
            },
            _focusElement: function (n) {
              var t = this.element;
              (v.touch &&
                (!v.mouseAndTouchPresent || (n || "").match(/touch/i))) ||
                t[0] === kt() ||
                t.trigger("focus");
            },
            _change: function (n) {
              var r,
                u,
                f,
                t = this,
                e = t.element.val();
              n = t._update(n);
              r = !i.calendar.isEqualDate(t._old, n);
              u = r && !t._typing;
              f = e !== t.element.val();
              (u || f) && t.element.trigger(w);
              r && ((t._old = n), (t._oldText = t.element.val()), t.trigger(w));
              t._typing = !1;
            },
            _keydown: function (n) {
              var t = this,
                i = t.dateView,
                r = t.element.val(),
                u = !1;
              i.popup.visible() || n.keyCode != f.ENTER || r === t._oldText
                ? ((u = i.move(n)),
                  t._updateARIA(i._current),
                  u
                    ? t._dateInput &&
                      n.stopImmediatePropagation &&
                      n.stopImmediatePropagation()
                    : (t._typing = !0))
                : t._change(r);
            },
            _icon: function () {
              var t,
                i = this,
                r = i.element;
              t = r.next("span.k-select");
              t[0] ||
                (t = n(
                  '<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-calendar"></span></span>'
                ).insertAfter(r));
              i._dateIcon = t.attr({
                role: "button",
                "aria-controls": i.dateView._dateViewID,
              });
            },
            _option: function (n, i) {
              var f = this,
                r = f.options;
              return i === t
                ? r[n]
                : ((i = u(i, r.parseFormats, r.culture)),
                  i && ((r[n] = new wt(+i)), f.dateView[n](i)),
                  t);
            },
            _update: function (n) {
              var e,
                r = this,
                f = r.options,
                o = f.min,
                h = f.max,
                s = r._value,
                t = u(n, f.parseFormats, f.culture),
                c =
                  (null === t && null === s) ||
                  (t instanceof Date && s instanceof Date);
              return (
                f.disableDates(t) &&
                  ((t = null), r._old || r.element.val() || (n = null)),
                +t == +s && c
                  ? ((e = i.toString(t, f.format, f.culture)),
                    e !== n && r.element.val(null === t ? n : e),
                    t)
                  : (null !== t && ii(t, o)
                      ? (t = pt(t, o, h))
                      : ti(t, o, h) || (t = null),
                    (r._value = t),
                    r.dateView.value(t),
                    r._dateInput && t
                      ? r._dateInput.value(t || n)
                      : r.element.val(i.toString(t || n, f.format, f.culture)),
                    r._updateARIA(t),
                    t)
              );
            },
            _wrapper: function () {
              var t,
                r = this,
                i = r.element;
              t = i.parents(".k-datepicker");
              t[0] ||
                ((t = i
                  .wrap(rt)
                  .parent()
                  .addClass("k-picker-wrap k-state-default")),
                (t = t.wrap(rt).parent()));
              t[0].style.cssText = i[0].style.cssText;
              i.css({ width: "100%", height: i[0].style.height });
              r.wrapper = t
                .addClass("k-widget k-datepicker")
                .addClass(i[0].className);
              r._inputWrapper = n(t[0].firstChild);
            },
            _reset: function () {
              var t = this,
                i = t.element,
                r = i.attr("form"),
                u = r ? n("#" + r) : i.closest("form");
              u[0] &&
                ((t._resetHandler = function () {
                  t.value(i[0].defaultValue);
                  t.max(t._initialOptions.max);
                  t.min(t._initialOptions.min);
                }),
                (t._form = u.on("reset", t._resetHandler)));
            },
            _template: function () {
              this._ariaTemplate = bt(this.options.ARIATemplate);
            },
            _createDateInput: function (n) {
              this._dateInput &&
                (this._dateInput.destroy(), (this._dateInput = null));
              n.dateInput &&
                (this._dateInput = new e.DateInput(this.element, {
                  culture: n.culture,
                  format: n.format,
                  min: n.min,
                  max: n.max,
                }));
            },
            _updateARIA: function (n) {
              var i,
                t = this,
                r = t.dateView.calendar;
              t.element &&
                t.element.length &&
                t.element[0].removeAttribute("aria-activedescendant");
              r &&
                ((i = r._cell),
                i.attr(
                  "aria-label",
                  t._ariaTemplate({ current: n || r.current() })
                ),
                t.element.attr("aria-activedescendant", i.attr("id")));
            },
          });
          e.plugin(tt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.drawer.min", ["kendo.userevents.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var r = window.kendo,
            s = r.ui,
            o = s.Widget,
            i = "push",
            u = "overlay",
            f = "left",
            e = "right",
            h = r.ui.Widget.extend({
              init: function (t, u) {
                var e,
                  s,
                  f = this;
                o.fn.init.call(this, t, u);
                u = f.options;
                f._element(t);
                f._wrapper(t);
                f.position();
                f._mode();
                u.mini && f._miniMode();
                f._initDrawerItems();
                u.mini && u.mode != i && f._setBodyOffset();
                e = this.userEvents = new r.UserEvents(
                  u.mode != i ? n(document.body) : this.drawerContainer,
                  { fastTap: !0, allowSelection: !0 }
                );
                s = function (t) {
                  n.contains(f.drawerItemsWrapper[0], t.event.target) &&
                    f._itemClick(t);
                  f.visible &&
                    !f.trigger("hide", { sender: this }) &&
                    (f.hide(), t.preventDefault());
                };
                this.options.swipeToOpen
                  ? (e.bind("start", function (n) {
                      f._start(n);
                    }),
                    e.bind("move", function (n) {
                      f._update(n);
                    }),
                    e.bind("end", function (n) {
                      f._end(n);
                    }),
                    e.bind("tap", s))
                  : e.bind("press", s);
                u.minHeight &&
                  u.mode == i &&
                  f.drawerContainer.css("min-height", u.minHeight);
              },
              _element: function () {
                var t = this,
                  i = t.element,
                  r = t.options,
                  u = (t.contentElement = i.children().first());
                t.drawerElement = n(r.template);
                u.addClass("k-drawer-content");
                i.addClass("k-widget k-drawer");
              },
              _wrapper: function () {
                var t = this.options,
                  s = this.drawerElement,
                  e = this.element,
                  o = this.contentElement,
                  h = (this.drawerItemsWrapper = s
                    .wrap("<div class='k-drawer-items'></div>")
                    .parent()),
                  r = (this.drawerWrapper = h
                    .wrap("<div class='k-drawer-wrapper'></div>")
                    .parent()),
                  f = (this.drawerContainer = e
                    .wrap("<div class='k-drawer-container'></div>")
                    .parent());
                t.mini ? t.mini.width && r.width(t.mini.width) : r.width(0);
                t.mode === i
                  ? f.append(o)
                  : t.mode === u && (f.after(o), n(document.body).prepend(f));
                e.append(r);
              },
              _setBodyOffset: function () {
                var t = this.element.outerWidth();
                this.leftPositioned
                  ? n(document.body).css("padding-left", t)
                  : n(document.body).css("padding-right", t);
              },
              _initDrawerItems: function () {
                var t = this.drawerItemsWrapper,
                  n = t.find("[data-role='drawer-item']"),
                  i = t.find("[data-role='drawer-separator']");
                n.addClass("k-drawer-item");
                i.addClass("k-drawer-item k-drawer-separator");
                this._selectedItemIndex >= 0 &&
                  (n.removeClass("k-state-selected"),
                  n.eq(this._selectedItemIndex).addClass("k-state-selected"));
              },
              _mode: function () {
                var t,
                  f = this.options,
                  r = this.drawerContainer;
                f.mode == i
                  ? r.addClass("k-drawer-" + i)
                  : (r.addClass("k-drawer-" + u),
                    (t = this.overlayContainer =
                      n('<div class="k-overlay"></div>')),
                    t.hide(),
                    r.prepend(t));
              },
              _miniMode: function () {
                var t = this.options,
                  u = this.drawerContainer,
                  i = t.mini.width,
                  r = (this._miniTemplate =
                    t.mini.template && n(t.mini.template)),
                  f = this.drawerItemsWrapper,
                  e = this.drawerWrapper;
                u.addClass("k-drawer-mini");
                r && f.html(r);
                i && e.width(i);
                this.minWidth = t.mini.width || this.drawerWrapper.width();
              },
              show: function () {
                var i = this.drawerWrapper,
                  n = this.drawerContainer,
                  t = this.options,
                  r = n.hasClass("k-drawer-expanded"),
                  f = this._miniTemplate,
                  e = this.drawerElement,
                  o = this.drawerItemsWrapper;
                r || (n.addClass("k-drawer-expanded"), (this.visible = !0));
                f && (o.html(e), this._initDrawerItems(), this._selectItem());
                i.width(t.width);
                t.mode === u &&
                  (this.overlayContainer.show(), (this.visible = !0));
              },
              hide: function () {
                var t = this,
                  r = t.drawerWrapper,
                  f = t.drawerContainer,
                  n = this.options,
                  e = this.drawerItemsWrapper,
                  o = this._miniTemplate,
                  i = n.mini && n.mini.width;
                this._miniTemplate &&
                  (e.html(o), t._initDrawerItems(), this._selectItem());
                r.width(n.mini ? (i ? i : "") : 0);
                this.visible &&
                  (f.removeClass("k-drawer-expanded"), (this.visible = !1));
                n.mode === u && this.overlayContainer.hide();
              },
              position: function (n) {
                var i = this,
                  u = i.options,
                  r = n || u.position,
                  t = i.drawerContainer;
                r == e
                  ? (t.removeClass("k-drawer-" + f),
                    t.addClass("k-drawer-" + e))
                  : (t.removeClass("k-drawer-" + e),
                    t.addClass("k-drawer-" + f));
                this.leftPositioned = r === f;
              },
              _start: function (n) {
                var u = this,
                  f = this.options,
                  e = this.drawerWrapper,
                  o = this.drawerItemsWrapper,
                  s = n.sender;
                return Math.abs(n.x.velocity) < Math.abs(n.y.velocity) ||
                  r.triggeredByInput(n.event)
                  ? (s.cancel(), t)
                  : (this.drawerMini && o.html(u.drawerElement),
                    e.css("transition", "none"),
                    f.mode != i && this.overlayContainer.show(),
                    t);
              },
              _update: function (n) {
                var t = this.options,
                  r = t.mode;
                r == i ? this._push(n) : this._overlay(n);
              },
              _end: function (n) {
                var r,
                  t = n.x.velocity,
                  e = this.options,
                  u = this.drawerWrapper,
                  o = u.width(),
                  f = o > e.width / 2,
                  i = 0.8;
                u.css("transition", "all .3s ease-out");
                r = this.leftPositioned
                  ? t > -i && (t > i || f)
                  : t < i && (t < -i || f);
                r
                  ? this.trigger("show", { sender: this })
                    ? (n.preventDefault(), this.hide())
                    : this.show()
                  : this.trigger("hide", { sender: this })
                  ? (n.preventDefault(), this.show())
                  : this.hide();
              },
              _overlay: function (n) {
                var t = this.options,
                  r = (t.mini && t.mini.width) || this.minWidth || 0,
                  i = this.drawerWrapper,
                  u = i.width(),
                  f = u + (this.leftPositioned ? n.x.delta : -n.x.delta),
                  e = Math.min(Math.max(f, r), t.width);
                n.event.preventDefault();
                n.event.stopPropagation();
                i.width(e);
              },
              _push: function (n) {
                var t = this.options,
                  r = (t.mini && t.mini.width) || this.minWidth || 0,
                  i = this.drawerWrapper,
                  u = i.width(),
                  f = u + (this.leftPositioned ? n.x.delta : -n.x.delta),
                  e = Math.min(Math.max(f, r), t.width);
                n.event.preventDefault();
                n.event.stopPropagation();
                i.width(e);
              },
              _selectItem: function (n) {
                var i;
                return n
                  ? (n.addClass("k-state-selected"),
                    this.trigger("itemClick", { item: n, sender: this }),
                    (this._selectedItemIndex = n.index()),
                    t)
                  : ((i = this._selectedItemIndex),
                    i &&
                      this.drawerItemsWrapper
                        .find("[data-role='drawer-item']")
                        .eq(i)
                        .addClass("k-state-selected"),
                    t);
              },
              _itemClick: function (t) {
                var i,
                  r = this;
                n(t.event.target).find(".k-drawer-item").length > 0
                  ? (i = n(t.event.target).find(".k-drawer-item"))
                  : n(t.event.target).closest(".k-drawer-item").length > 0
                  ? (i = n(t.event.target).closest(".k-drawer-item"))
                  : n(t.event.target).hasClass(".k-drawer-item") &&
                    (i = n(t.event.target));
                r.drawerItemsWrapper
                  .find(".k-drawer-item")
                  .removeClass("k-state-selected");
                r._selectItem(i);
              },
              destroy: function () {
                var t = this.options;
                t.mode != i &&
                  (this.leftPositioned
                    ? n(document.body).css("padding-left", 0)
                    : n(document.body).css("padding-right", 0));
                o.fn.destroy.call(this);
                this.userEvents.destroy();
                r.destroy(this.element);
                this.element =
                  this.drawerWrapper =
                  this.drawerElement =
                  this.drawerContainer =
                  this.drawerItemsWrapper =
                  this._miniTemplate =
                    null;
              },
              options: {
                name: "Drawer",
                position: f,
                mode: "overlay",
                swipeToOpen: !0,
                width: 280,
                mini: !1,
                template: "",
              },
              events: ["hide", "show", "itemClick"],
            });
          r.ui.plugin(h);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.multiviewcalendar.min",
      ["kendo.core.min", "kendo.selectable.min", "kendo.calendar.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function si(t) {
            var i = n(this).hasClass("k-state-disabled");
            i ||
              n(this).toggleClass(it, at.indexOf(t.type) > -1 || t.type == fi);
          }
          function hi(n, t, i, r) {
            for (var u, f = 0; f <= t; f++)
              (u = new Date(i.getTime())),
                (u = new Date(u.setDate(u.getDate() + f))),
                r(u) || n.push(u);
          }
          function ci(n, t) {
            var r, f, e;
            return (
              +t < +n &&
                ((r = +n),
                i.views[0].setDate(n, t),
                i.views[0].setDate(t, new Date(r))),
              (f = Date.UTC(n.getFullYear(), n.getMonth(), n.getDate())),
              (e = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate())),
              Math.ceil((+e - +f) / u.date.MS_PER_DAY)
            );
          }
          function nt(n, r, u) {
            var f;
            return "month" === r
              ? ((f = new l(n.getFullYear(), n.getMonth() + u, n.getDate())),
                f.setFullYear(n.getFullYear()),
                (Math.abs(f.getMonth() - n.getMonth()) > u || u > 10) &&
                  (f.setMonth(n.getMonth() + u), (f = i.views[0].last(f))),
                f)
              : "year" === r
              ? ((f = new l(1, n.getMonth(), n.getDate())),
                f.setFullYear(n.getFullYear() + u),
                Math.abs(f.getFullYear() - n.getFullYear()) > u &&
                  ((f = new l(1, n.getMonth(), 1)),
                  f.setFullYear(n.getFullYear() + u),
                  (f = i.views[1].last(f))),
                f)
              : "decade" === r
              ? ((f = new l(1, n.getMonth(), n.getDate())),
                f.setFullYear(n.getFullYear() + 10 * u),
                Math.abs(f.getFullYear() - n.getFullYear()) > 10 * u &&
                  ((f = new l(1, n.getMonth(), 1)),
                  f.setFullYear(n.getFullYear() + 10 * u),
                  (f = i.views[2].last(f))),
                f)
              : "century" === r
              ? ((f = new l(1, n.getMonth(), n.getDate())),
                f.setFullYear(n.getFullYear() + 100 * u),
                Math.abs(f.getFullYear() - n.getFullYear()) > 100 * u &&
                  ((f = new l(1, n.getMonth(), 1)),
                  f.setFullYear(n.getFullYear() + 100 * u),
                  (f = i.views[3].last(f))),
                f)
              : t;
          }
          var u = window.kendo,
            i = u.calendar,
            ft = u.support,
            g = i.isInRange,
            e = i.toDateObject,
            yt = i.createDate,
            pt = i.isEqualDate,
            ut = i.getToday,
            r = u.keys,
            wt = u.ui,
            b = wt.Widget,
            bt = wt.Selectable,
            et = u.template,
            li = ft.mobileOS,
            f = ".kendoMultiViewCalendar",
            k = "click",
            ai = "keydown",
            ot = "id",
            kt = "min",
            st = "month",
            ht = ".",
            dt = "century",
            vi = "decade",
            a = "change",
            d = "navigate",
            ct = "value",
            y = "k-state-focused",
            w = "k-state-selected",
            tt = "k-range-mid",
            gt = "k-range-split-end",
            ni = "k-range-split-start",
            lt = "k-range-start",
            ti = "k-range-end",
            it = "k-state-hover",
            o = "k-state-disabled",
            ii = "k-nav-today",
            yi = "k-other-month",
            ri = "k-out-of-range",
            v = "td:has(.k-link):not(." + ri + ")",
            s = "td:has(.k-link):not(." + o + "):not(." + ri + ")",
            ui = "blur",
            fi = "focus",
            at = ft.touch ? "touchstart" : "mouseenter",
            ei = ft.touch
              ? "touchend" + f + " touchmove" + f
              : "mouseleave" + f,
            c = "_prevArrow",
            h = "_nextArrow",
            oi = "aria-selected",
            vt = "aria-disabled",
            rt = "aria-label",
            p = n.proxy,
            l = Date,
            pi = { month: 0, year: 1, decade: 2, century: 3 },
            wi = b.extend({
              init: function (n, t) {
                var i = this;
                b.fn.init.call(i, n, t);
                i.userEvents = new u.UserEvents(i.element, {
                  global: !0,
                  allowSelection: !0,
                  filter: i.options.filter,
                  tap: p(i._tap, i),
                  touchAction: "none",
                });
              },
              events: [a],
              options: {
                name: "RangeSelectable",
                filter: ">*",
                inputSelectors:
                  "input,a,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",
                multiple: !1,
                dragToSelect: !0,
                relatedTarget: n.noop,
              },
              destroy: function () {
                var n = this;
                b.fn.destroy.call(n);
                n.userEvents.destroy();
                n._lastActive =
                  n.element =
                  n.userEvents =
                  n._start =
                  n._end =
                    null;
              },
              _allowSelection: function (t) {
                return (
                  !n(t).is(this.options.inputSelectors) ||
                  (this.userEvents.cancel(), !1)
                );
              },
              start: function (n) {
                return n === t
                  ? this._start
                  : (n.addClass(lt + " " + w), (this._start = n), t);
              },
              end: function (n) {
                return n === t
                  ? this._start
                  : (n.addClass(ti + " " + w), (this._end = n), t);
              },
              mid: function (t) {
                var i = this.element.find("table.k-month");
                t.addClass(tt);
                i.each(function () {
                  var t = n(this),
                    i = t.find(s + ":last"),
                    r = t.find(s + ":first");
                  i.hasClass(tt) && i.addClass(gt);
                  r.hasClass(tt) && r.addClass(ni);
                });
              },
              clear: function (n) {
                this.element
                  .find(v)
                  .removeClass(
                    ti + " " + w + " " + lt + " " + tt + " " + gt + " " + ni
                  );
                n && (this._start = this._end = null);
              },
              selectFrom: function (t) {
                var i = this,
                  r = i.element.find(v),
                  u = n.inArray(n(t)[0], r);
                i.clear();
                i.start(t);
                r = r.filter(function (n) {
                  return n > u;
                });
                i.mid(r);
              },
              selectTo: function (t) {
                var i = this,
                  r = i.element.find(v),
                  u = n.inArray(n(t)[0], r);
                i.clear();
                r = r.filter(function (n) {
                  return n < u;
                });
                i.mid(r);
                i.end(n(t));
              },
              range: function (i, r) {
                var f,
                  e,
                  o,
                  s,
                  u = this;
                return i === t
                  ? { start: u._start, end: u._end }
                  : ((f = u.element.find(v)),
                    (e = n.inArray(n(i)[0], f)),
                    (o = n.inArray(n(r)[0], f)),
                    e > o &&
                      ((s = r), (r = i), (i = s), (s = e), (e = o), (o = s)),
                    u.clear(),
                    i.addClass(lt + " " + w),
                    (u._start = i),
                    (f = f.filter(function (n) {
                      return n > e && n < o;
                    })),
                    u.mid(f),
                    u.end(n(r)),
                    t);
              },
              change: function () {
                this.trigger(a);
              },
              _tap: function (i) {
                var f,
                  o,
                  s,
                  u = n(i.target),
                  r = this;
                if (((r._lastActive = u), !r._start))
                  return r.start(u), r.trigger(a), t;
                if (r._start && !r._end)
                  return (
                    (f = r.element.find(v)),
                    (o = n.inArray(n(r._start)[0], f)),
                    (s = n.inArray(n(u)[0], f)),
                    +e(n(r._start).find("a")) > +e(n(u).find("a"))
                      ? (r.clear(), r.start(u), r.trigger(a), t)
                      : ((f = f.filter(function (n) {
                          return n > o && n < s;
                        })),
                        r.mid(f),
                        r.end(n(u)),
                        r.trigger(a),
                        t)
                  );
                if (r._start && r._end) {
                  if (u.hasClass(tt))
                    return (
                      r._toggling ? r.range(r._start, u) : r.range(u, r._end),
                      (r._toggling = !r._toggling),
                      r.trigger(a),
                      t
                    );
                  r._toggling = !1;
                  r._end = null;
                  r.clear();
                  r.start(u);
                  r.trigger(a);
                }
              },
            }),
            bi = b.extend({
              init: function (t, r) {
                var o,
                  h,
                  e = this;
                b.fn.init.call(e, t, r);
                t = e.wrapper = e.element;
                r = e.options;
                e.options.disableDates = i.disabled(e.options.disableDates);
                h = u.getCulture(r.culture);
                r.format = u._extractFormat(
                  r.format || h.calendars.standard.patterns.d
                );
                e._templates();
                e._header();
                e._wrapper();
                o = t
                  .addClass(
                    "k-widget k-calendar k-calendar-range" +
                      (r.weekNumber ? " k-week-number" : "")
                  )
                  .on(ai + f, "table.k-content", p(e._move, e))
                  .on(ui + f, "table", p(e._blur, e))
                  .on(k + f, s, function (t) {
                    var i = t.currentTarget.firstChild;
                    i.href.indexOf("#") != -1 && t.preventDefault();
                    e._click(n(i));
                  })
                  .on(at + f, s, p(e._mouseEnter, e))
                  .on(ei, s, function () {
                    n(this).removeClass(it);
                  })
                  .attr(ot);
                o && (e._cellID = o + "_cell_selected");
                e._calendarWidth = e.element.width();
                e._range = r.range;
                e._initViews({ viewName: r.start, value: r.value });
                e._selectable();
                e._footer(e.footer);
                e._selectDates = [];
                e.value(r.value);
                "multiple" == r.selectable &&
                  ((e._selectDates = r.selectDates.length
                    ? r.selectDates
                    : e._selectDates),
                  e._restoreSelection());
                "range" == r.selectable && e.selectRange(e._range);
                u.notify(e);
              },
              options: {
                name: "MultiViewCalendar",
                value: null,
                min: new l(1900, 0, 1),
                max: new l(2099, 11, 31),
                dates: [],
                disableDates: null,
                culture: "",
                footer: "",
                format: "",
                month: {},
                range: { start: null, end: null },
                weekNumber: !1,
                views: 2,
                showViewHeader: !1,
                selectable: "single",
                selectDates: [],
                start: st,
                depth: st,
                messages: { weekColumnHeader: "" },
              },
              events: [a, d],
              setOptions: function (n) {
                var r,
                  t = this;
                for (
                  i.normalize(n),
                    n.disableDates = i.disabled(n.disableDates),
                    b.fn.setOptions.call(t, n),
                    t._selectable(),
                    t._templates(),
                    t._footer(t.footer),
                    r = 0;
                  r < t._views.length;
                  r++
                )
                  t._views[r].off(f).remove();
                t._initViews({ viewName: n.start, value: n.value });
                t._range = n.range || { start: null, end: null };
                t._restoreSelection();
              },
              destroy: function () {
                var t,
                  n = this;
                if (
                  ((n._cell = null),
                  (n._currentView = null),
                  (n._current = null),
                  n._views)
                )
                  for (t = 0; t < n._views.length; t++)
                    n._views[t].off(f).remove();
                n.element.off(f);
                n.header &&
                  (n.header.off(f), (n._title = null), (n.header = null));
                n.selectable && (n.selectable.destroy(), (n.selectable = null));
                n.rangeSelectable &&
                  (n.rangeSelectable.destroy(), (n.rangeSelectable = null));
                n._today && u.destroy(n._today.off(f));
                n._views = null;
                b.fn.destroy.call(n);
              },
              current: function () {
                return this._current;
              },
              focus: function () {
                var n;
                this._cell
                  ? this._cell.closest("table").trigger("focus")
                  : this._current && this._dateInViews(this._current)
                  ? ((this._cell = this._cellByDate(this._current)),
                    this._cell.closest("table").trigger("focus"))
                  : ((n = this.element.find("table").first().trigger("focus")),
                    (this._cell = n.find(s + ":first")),
                    (this._current = e(this._cell.find("a"))));
                this._cell.addClass(y);
              },
              min: function (n) {
                return this._option(kt, n);
              },
              max: function (n) {
                return this._option("max", n);
              },
              view: function () {
                return this._currentView;
              },
              navigateToPast: function () {
                this._navigate(c, -1);
              },
              navigateToFuture: function () {
                this._navigate(h, 1);
              },
              navigateUp: function () {
                var n = this,
                  t = n._index;
                n._title.hasClass(o) || n.navigate(n._current, ++t);
              },
              navigateDown: function (n) {
                var i = this,
                  r = i._index,
                  u = i.options.depth;
                if (n)
                  return r === pi[u]
                    ? ((pt(i._value, i._current) && pt(i._value, n)) ||
                        (i.value(n), i.trigger(a)),
                      t)
                    : (i.navigate(n, --r), t);
              },
              navigate: function (n, r) {
                var u, o, s, h, e;
                for (
                  r = isNaN(r) ? i.views[i.viewsEnum[r]] : i.views[r],
                    u = this,
                    o = u.options,
                    s = o.min,
                    h = o.max,
                    u._current = n ? n : (n = new l(+i.restrictValue(n, s, h))),
                    r === t && (r = u._currentView),
                    u._currentView = r,
                    e = 0;
                  e < u._views.length;
                  e++
                )
                  u._views[e].off(f).remove();
                u._initViews({ viewName: r.name, value: n });
                u._restoreSelection();
              },
              _updateHeader: function () {
                var u,
                  a,
                  f,
                  e,
                  t = this,
                  i = t._currentView,
                  v = t._title,
                  s = t._firstViewValue,
                  r = t.options,
                  p = t._visibleRange(),
                  w = r.culture,
                  y = r.min,
                  l = r.max;
                i.name === vi || i.name === dt
                  ? ((u = nt(s, i.name, r.views - 1)),
                    g(u, y, l) || (u = l),
                    v.html(
                      i.first(s).getFullYear() + " - " + i.last(u).getFullYear()
                    ))
                  : v.html(
                      i.title(s, y, l, w) +
                        " - " +
                        i.title(nt(s, i.name, r.views - 1), y, l, w)
                    );
                a = i.name === dt;
                v.toggleClass(o, a).attr(vt, a);
                f = i.compare(p.start, t.options.min) < 1;
                e = i.compare(p.end, t.options.max) > -1;
                f && e
                  ? t._navContainer &&
                    (t._navContainer.remove(), (t._navContainer = null))
                  : (t._navContainer ||
                      ((t._navContainer = n(
                        '<span class="k-calendar-nav"><a href="#" role="button" class="k-button k-button-icon k-prev-view" ' +
                          rt +
                          '="Previous"><span class="k-icon k-i-arrow-60-left"></span></a><a href="#" role="button" class="k-button k-button-icon k-next-view" ' +
                          rt +
                          '="Next"><span class="k-icon k-i-arrow-60-right"></span></a></span>'
                      ).appendTo(t.header)),
                      (t[c] = t._navContainer.find(".k-prev-view")),
                      (t[h] = t._navContainer.find(".k-next-view"))),
                    t[c].toggleClass(o, f).attr(vt, f),
                    t[c].hasClass(o) && t[c].removeClass(it),
                    t[h].toggleClass(o, e).attr(vt, e),
                    t[h].hasClass(o) && t[h].removeClass(it));
              },
              _mouseEnter: function (t) {
                var r,
                  f,
                  o,
                  s,
                  i = this,
                  u = n(t.currentTarget);
                if (
                  (u.addClass(it),
                  i.rangeSelectable &&
                    "month" === i._currentView.name &&
                    ((r = i.selectRange()), r.start && !r.end))
                ) {
                  if (i._dateInViews(i.selectRange().start)) {
                    if (
                      ((f = i.element.find(i.rangeSelectable.options.filter)),
                      (o = n.inArray(n(i.rangeSelectable._start)[0], f)),
                      (s = n.inArray(n(u)[0], f)),
                      o > s)
                    )
                      return;
                    i.rangeSelectable.range(i.rangeSelectable._start, u);
                  } else
                    +e(i.element.find(v + ":first").find("a")) > +r.start &&
                      i.rangeSelectable.selectTo(u);
                  i.rangeSelectable._end = null;
                }
              },
              _move: function (i, f) {
                var tt,
                  nt,
                  ot,
                  k,
                  st,
                  ct,
                  v = this,
                  ft = v.options,
                  p = i.keyCode,
                  lt = v._index,
                  rt = ft.min,
                  at = ft.max,
                  et = v.element.find(ht + y),
                  b = et.closest("table"),
                  w = new l(+(v._current || e(et.find("a")))),
                  ut = u.support.isRtl(v.wrapper),
                  it = !1;
                if (
                  ((p == r.RIGHT && !ut) || (p == r.LEFT && ut)
                    ? ((tt = 1), (nt = !0))
                    : (p == r.LEFT && !ut) || (p == r.RIGHT && ut)
                    ? ((tt = -1), (nt = !0))
                    : p == r.UP
                    ? ((tt = 0 === lt ? -7 : -4), (nt = !0))
                    : p == r.DOWN
                    ? ((tt = 0 === lt ? 7 : 4), (nt = !0))
                    : p == r.SPACEBAR
                    ? ((tt = 0), (nt = !0))
                    : p == r.HOME
                    ? ((nt = !0),
                      (k = b.find(s).eq(0)),
                      k.hasClass(y)
                        ? ((b = b.prev()),
                          b.length
                            ? v._focusCell(b.find(s).eq(0))
                            : ((it = v[c] && !v[c].hasClass(o)),
                              v._navigate(c, -1, f),
                              v._focusCell(
                                v.element.find("table:first " + s + ":first")
                              )))
                        : v._focusCell(k))
                    : p == r.END &&
                      ((nt = !0),
                      (k = b.find(s).last()),
                      k.hasClass(y)
                        ? ((b = b.next()),
                          b.length
                            ? v._focusCell(b.find(s).last())
                            : ((it = v[h] && !v[h].hasClass(o)),
                              v._navigate(h, 1, f),
                              v._focusCell(
                                v.element.find("table:last " + s + ":last")
                              )))
                        : v._focusCell(k)),
                  i.ctrlKey || i.metaKey)
                )
                  (p == r.RIGHT && !ut) || (p == r.LEFT && ut)
                    ? ((it = v[h] && !v[h].hasClass(o)),
                      v._navigate(h, 1, f),
                      (nt = !0))
                    : (p == r.LEFT && !ut) || (p == r.RIGHT && ut)
                    ? ((it = v[c] && !v[c].hasClass(o)),
                      v._navigate(c, -1, f),
                      (nt = !0))
                    : p == r.UP
                    ? ((it = !v._title.hasClass(o)),
                      v.navigateUp(),
                      v._focusCell(v._cellByDate(v._current), !f),
                      (nt = !0))
                    : p == r.DOWN
                    ? ("month" === v._currentView.name
                        ? v.value(w)
                        : (v.navigateDown(w),
                          v._focusCell(v._cellByDate(v._current), !f),
                          (it = !0)),
                      (nt = !0))
                    : (p != r.ENTER && p != r.SPACEBAR) ||
                      ("multiple" === ft.selectable && v._toggleSelection(i));
                else if (i.shiftKey && "single" !== ft.selectable) {
                  if (tt !== t || ot) {
                    if (
                      (ot || v._currentView.setDate(w, tt),
                      "month" !== v._currentView.name)
                    )
                      return;
                    ft.disableDates(w) && (w = v._nextNavigatable(w, tt));
                    rt = yt(rt.getFullYear(), rt.getMonth(), rt.getDate());
                    g(w, rt, at) &&
                      (v._dateInViews(w) ||
                        (tt > 0
                          ? ((it = v[h] && !v[h].hasClass(o)),
                            v._navigate(h, 1, f))
                          : ((it = v[c] && !v[c].hasClass(o)),
                            v._navigate(c, -1, f))),
                      (k = v._cellByDate(w)),
                      (v._current = w),
                      v.selectable &&
                        (v._selectRange(
                          e((v.selectable._lastActive || et).find("a")),
                          w
                        ),
                        v.selectable._lastActive ||
                          (v.selectable._lastActive = et),
                        v.trigger(a),
                        v._focusCell(k)),
                      v.rangeSelectable &&
                        ((st = e(
                          (v.rangeSelectable._lastActive || et).find("a")
                        )),
                        v._dateInViews(st)
                          ? ((v.rangeSelectable._lastActive =
                              v.rangeSelectable._end &&
                              v.rangeSelectable._end.is(ht + y)
                                ? v.rangeSelectable._start
                                : v._cellByDate(st)),
                            v.rangeSelectable.range(
                              v.rangeSelectable._lastActive,
                              k
                            ))
                          : +st > +w
                          ? ((v.rangeSelectable._end =
                              v.rangeSelectable._lastActive),
                            v.rangeSelectable.selectFrom(k))
                          : v.rangeSelectable.selectTo(k),
                        v.rangeSelectable.change(),
                        v._focusCell(k)));
                  }
                } else
                  p == r.ENTER || p == r.SPACEBAR
                    ? ("month" === v._currentView.name
                        ? (v.selectable &&
                            (v.selectable._lastActive = v._cellByDate(w)),
                          v.value(w),
                          v.rangeSelectable && v.rangeSelectable.change())
                        : v._click(n(v._cell[0].firstChild), f),
                      (nt = !0))
                    : (p != r.PAGEUP && p != r.PAGEDOWN) ||
                      ((nt = !0),
                      (ct = b.find(s).index(et)),
                      (b = p == r.PAGEUP ? b.prev() : b.next()),
                      b.length ||
                        (p == r.PAGEUP
                          ? ((it = v[c] && !v[c].hasClass(o)),
                            v.navigateToPast(),
                            (b = v.element.find("table:first")))
                          : ((it = v[h] && !v[h].hasClass(o)),
                            v.navigateToFuture(),
                            (b = v.element.find("table:last")))),
                      (k = b.find(s).eq(ct)),
                      v._focusCell(k.length ? k : b.find(s).last())),
                    (tt || ot) &&
                      (ot || v._currentView.setDate(w, tt),
                      (rt = yt(rt.getFullYear(), rt.getMonth(), rt.getDate())),
                      g(w, rt, at) &&
                        (v.selectable &&
                          ft.disableDates(w) &&
                          (w = v._nextNavigatable(w, tt)),
                        v._dateInViews(w) ||
                          (tt > 0
                            ? ((it = v[h] && !v[h].hasClass(o)),
                              v._navigate(h, 1, f))
                            : ((it = v[c] && !v[c].hasClass(o)),
                              v._navigate(h, -1, f))),
                        (k = v._cellByDate(w)),
                        (v._current = w),
                        v._focusCell(k, !f)));
                return it && v.trigger(d), nt && i.preventDefault(), v._current;
              },
              _visualizeSelectedDatesInView: function () {
                var i,
                  t = this,
                  r = {};
                n.each(t._selectDates, function (n, t) {
                  r[u.calendar.views[0].toDateString(t)] = t;
                });
                t.selectable.clear();
                i = t.element
                  .find("table")
                  .find(v)
                  .filter(function (t, i) {
                    return r[n(i.firstChild).attr(u.attr(ct))];
                  });
                i.length > 0 && t.selectable._selectElement(i, !0);
              },
              _nextNavigatable: function (n, t) {
                var i = this,
                  r = !0,
                  u = i._currentView,
                  e = i.options.min,
                  o = i.options.max,
                  s = i.options.disableDates,
                  f = new Date(n.getTime());
                for (u.setDate(f, -t); r; ) {
                  if ((u.setDate(n, t), !g(n, e, o))) {
                    n = f;
                    break;
                  }
                  r = s(n);
                }
                return n;
              },
              _toggleSelection: function (t) {
                var i = this;
                i.selectable._lastActive = n(i._cell[0]);
                n(i._cell[0]).hasClass(w)
                  ? (i.selectable._unselect(n(i._cell[0])),
                    i.selectable.trigger(a, { event: t }))
                  : i.selectable.value(n(i._cell[0]), { event: t });
              },
              _option: function (n, i) {
                var e,
                  r = this,
                  f = r.options,
                  o = r._value || r._current;
                return i === t
                  ? f[n]
                  : ((i = u.parseDate(i, f.format, f.culture)),
                    i &&
                      ((f[n] = new l(+i)),
                      (e = n === kt ? i > o : o > i),
                      e && (r._value = null),
                      r.navigate(r._value),
                      r._toggle()),
                    t);
              },
              _cellByDate: function (t) {
                return (
                  t instanceof Date && (t = this._currentView.toDateString(t)),
                  this.element
                    .find("table")
                    .find("td:not(." + yi + ")")
                    .filter(function () {
                      return n(this.firstChild).attr(u.attr(ct)) === t;
                    })
                );
              },
              _selectable: function () {
                var n = this,
                  t = n.options.selectable;
                n.selectable && (n.selectable.destroy(), (n.selectable = null));
                n.rangeSelectable &&
                  (n.rangeSelectable.destroy(), (n.rangeSelectable = null));
                "range" === t.toLowerCase()
                  ? (n.rangeSelectable = new wi(n.wrapper, {
                      filter: "table.k-month " + s,
                      change: p(n._rangeSelection, n),
                    }))
                  : (n.selectable = new bt(n.wrapper, {
                      aria: !0,
                      dragToSelect: !1,
                      inputSelectors:
                        "input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",
                      multiple: bt.parseOptions(t).multiple,
                      filter: "table.k-content " + s,
                      change: p(n._selection, n),
                      relatedTarget: p(n._onRelatedTarget, n),
                      unselect: p(n._unselecting, n),
                    }));
              },
              _onRelatedTarget: function (n) {
                var t = this;
                t.selectable.options.multiple &&
                  n.is(s) &&
                  n.length > 1 &&
                  t._focusCell(n.first(), !0);
              },
              _getFirstViewDate: function (n) {
                for (
                  var t,
                    u,
                    o = this,
                    r = o.options,
                    f = [],
                    e = new Date(+o._current),
                    i = 0;
                  i < r.views;
                  i++
                ) {
                  if (((t = n.first(e)), (u = n.last(e)), +u > +r.max)) {
                    +t <= +r.max && f.push({ start: t, end: new Date(+r.max) });
                    break;
                  }
                  f.push({ start: t, end: u });
                  e = new Date(+nt(u, n.name, 1));
                }
                for (e = new Date(+o._current), i = 0; i < r.views; i++) {
                  if (((t = n.first(e)), (u = n.last(e)), +t < +r.min)) {
                    +u >= +r.min && f.push({ start: new Date(+r.min), end: u });
                    break;
                  }
                  f.push({ start: t, end: u });
                  e = new Date(+nt(t, n.name, -1));
                }
                for (t = f[0].start, i = 0; i < r.views + 1 && f[i]; i++)
                  +t > +f[i].start && (t = f[i].start);
                return new Date(+t);
              },
              _canRenderNextView: function (n) {
                var t = n.getFullYear(),
                  u = n.getMonth(),
                  e = n.getDate(),
                  i = this.options.max,
                  r = i.getFullYear(),
                  f = i.getMonth();
                return (
                  t < r ||
                  (t === r && u < f) ||
                  (t === r && u === f && e < i.getDate()) ||
                  (t === r && u === f && e === i.getDate())
                );
              },
              _initViews: function (t) {
                var f,
                  o,
                  r = this,
                  u = r.options,
                  s = i.viewsEnum[t.viewName],
                  e = i.views[s];
                for (
                  r._current = new l(+i.restrictValue(t.value, u.min, u.max)),
                    r._views = [],
                    r._index = s,
                    f = r._getFirstViewDate(e),
                    f.setDate(1),
                    r._firstViewValue = new Date(+f),
                    o = 0;
                  o < u.views &&
                  ((f = o ? nt(f, e.name, 1) : f),
                  f.setDate(1),
                  r._canRenderNextView(f));
                  o++
                )
                  (r._table = n(
                    e.content(
                      n.extend(
                        {
                          min: u.min,
                          max: u.max,
                          date: f,
                          url: u.url,
                          dates: u.dates,
                          format: u.format,
                          culture: u.culture,
                          disableDates: u.disableDates,
                          showHeader: u.showViewHeader,
                          isWeekColumnVisible: u.weekNumber,
                          otherMonth: u.otherMonth,
                          messages: u.messages,
                        },
                        r[e.name]
                      )
                    )
                  )),
                    r._table.appendTo(r.tablesWrapper).addClass("k-" + e.name),
                    r._views.push(r._table);
                r._currentView = e;
                r.tablesWrapper.attr(
                  "class",
                  "k-calendar-view k-calendar-" + e.name + "view"
                );
                r._updateHeader();
              },
              _rangeSelection: function (n) {
                var r,
                  u,
                  i = this,
                  t = n.sender.range();
                t.start && (r = e(t.start.find("a")));
                t.end && (u = e(t.end.find("a")));
                i._range = { start: r, end: u };
                i._preventChange || i.trigger(a);
              },
              _selection: function (t) {
                var u,
                  i = this,
                  f = t.sender.value(),
                  r = t.event,
                  o = n(r && r.currentTarget),
                  h = o.is("td");
                "single" === i.options.selectable &&
                  i._validateValue(
                    f[0]
                      ? e(f.first().find("a"))
                      : t.sender._lastActive
                      ? e(t.sender._lastActive.find("a"))
                      : i.value()
                  );
                "multiple" == i.options.selectable &&
                  (h && (u = e(o.find("a"))),
                  r && r.ctrlKey
                    ? h
                      ? o.hasClass(w)
                        ? i._selectDates.push(u)
                        : i._deselect(u)
                      : (i.element.find("table " + s).each(function (t, r) {
                          var u = e(n(r).find("a"));
                          i._deselect(u);
                        }),
                        i._addSelectedCellsToArray())
                    : r && r.shiftKey
                    ? i._selectRange(
                        e(
                          t.sender._lastActive
                            ? t.sender._lastActive.find("a")
                            : f.first().find("a")
                        ),
                        u
                      )
                    : h
                    ? ((i._selectDates = []), i._selectDates.push(u))
                    : ((i._selectDates = []), i._addSelectedCellsToArray()));
                i._preventChange || i.trigger(a);
              },
              _addSelectedCellsToArray: function () {
                var t = this;
                t.selectable.value().each(function (i, r) {
                  var u = e(n(r.firstChild));
                  t.options.disableDates(u) || t._selectDates.push(u);
                });
              },
              _deselect: function (n) {
                var t = this,
                  i = t._selectDates.map(Number).indexOf(+n);
                i != -1 && t._selectDates.splice(i, 1);
              },
              _unselecting: function (n) {
                var t = this,
                  i = n.element;
                "single" === t.options.selectable &&
                  !li &&
                  i.hasClass(y) &&
                  n.preventDefault();
              },
              _visibleRange: function () {
                var n = this.element.find(".k-calendar-view table"),
                  t = e(
                    n
                      .first()
                      .find(v + ":first")
                      .find("a")
                  ),
                  i = e(
                    n
                      .last()
                      .find(v + ":last")
                      .find("a")
                  );
                return { start: t, end: i };
              },
              _dateInViews: function (n) {
                var i = this,
                  t = i.element.find(".k-calendar-view table"),
                  r = e(
                    t
                      .first()
                      .find(v + ":first")
                      .find("a")
                  ),
                  u = e(
                    t
                      .last()
                      .find(v + ":last")
                      .find("a")
                  );
                return +n <= +u && +n >= +r;
              },
              _fillRange: function (n, t) {
                var r,
                  i = this;
                i._selectDates = [];
                r = ci(n, t);
                hi(i._selectDates, r, n, i.options.disableDates);
              },
              _selectRange: function (n, t) {
                var i,
                  r = this;
                +t < +n && ((i = t), (t = n), (n = i));
                r._fillRange(n, t);
                r._visualizeSelectedDatesInView();
              },
              _header: function () {
                var r,
                  t = this,
                  u = t.element,
                  i = u.find(".k-calendar-header");
                i.length ||
                  (i = n(
                    '<div class="k-calendar-header"><a href="#" role="button" class="k-button k-title" aria-live="assertive" aria-atomic="true"></a><span class="k-calendar-nav"><a href="#" role="button" class="k-button k-button-icon k-prev-view" ' +
                      rt +
                      '="Previous"><span class="k-icon k-i-arrow-60-left"></span></a><a href="#" role="button" class="k-button k-button-icon k-next-view" ' +
                      rt +
                      '="Next"><span class="k-icon k-i-arrow-60-right"></span></a></span></div>'
                  ).prependTo(u));
                t.header = i;
                i.on(
                  at + f + " " + ei + " " + fi + f + " " + ui + f,
                  ".k-button",
                  si
                )
                  .on("click", function () {
                    return !1;
                  })
                  .on(k + f, ".k-button.k-title", function () {
                    t.navigateUp();
                    t._focusCell(t._cellByDate(t._current), !0);
                    t.trigger(d);
                  })
                  .on(k + f, ".k-button.k-prev-view", function (n) {
                    n.preventDefault();
                    t.navigateToPast();
                    t.trigger(d);
                  })
                  .on(k + f, ".k-button.k-next-view", function (n) {
                    n.preventDefault();
                    t.navigateToFuture();
                    t.trigger(d);
                  });
                r = i.find(".k-button");
                t._title = r.filter(".k-title");
                t._navContainer = i.find(".k-calendar-nav");
                t[c] = r.filter(".k-prev-view");
                t[h] = r.filter(".k-next-view");
              },
              _wrapper: function () {
                this.tablesWrapper = n(
                  '<div class="k-calendar-view" />'
                ).insertAfter(this.element[0].firstChild);
              },
              _templates: function () {
                var i = this,
                  e = i.options,
                  n = e.month,
                  r = n.content,
                  f = n.weekNumber,
                  t = n.empty;
                i.month = {
                  content: et(
                    '<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" ' +
                      u.attr(ct) +
                      '="#=data.dateString#" title="#=data.title#">' +
                      (r || "#=data.value#") +
                      "</a></td>",
                    { useWithBlock: !!r }
                  ),
                  empty: et(
                    '<td role="gridcell"' +
                      (t ? ">" : ' class="k-out-of-range">') +
                      (t || "<a class='k-link'></a>") +
                      "</td>",
                    { useWithBlock: !!t }
                  ),
                  weekNumber: et(
                    '<td class="k-alt">' +
                      (f || "#= data.weekNumber #") +
                      "</td>",
                    { useWithBlock: !!f }
                  ),
                };
              },
              _footer: function () {
                var i = this,
                  f = i.options,
                  e =
                    f.footer !== !1
                      ? u.template(
                          i.options.footer ||
                            '#= kendo.toString(data,"D","' + f.culture + '") #',
                          { useWithBlock: !1 }
                        )
                      : null,
                  o = ut(),
                  s = i.element,
                  r = s.find(".k-footer");
                return e
                  ? (r[0] ||
                      (r = n(
                        '<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>'
                      ).appendTo(s)),
                    (i._today = r
                      .show()
                      .find(".k-link")
                      .html(e(o))
                      .attr("title", u.toString(o, "D", i.options.culture))),
                    i._toggle(),
                    t)
                  : (i._toggle(!1), r.hide(), t);
              },
              _navigate: function (n, t, r) {
                var e,
                  u = this,
                  h = u._index + 1,
                  s = new l(+u._current),
                  f = new l(+u._current);
                n = u[n];
                e = u._cellByDate(s).closest("table").index();
                t > 0 ? (e = 1 - e) : (e += 1);
                (n && n.hasClass(o)) ||
                  (h > 3
                    ? s.setFullYear(s.getFullYear() + 100 * t * e)
                    : i.views[h].setDate(s, t * e),
                  u.navigate(s),
                  u._dateInViews(f)
                    ? (u._focusCell(u._cellByDate(f), !r), (u._current = f))
                    : (h > 3
                        ? f.setFullYear(f.getFullYear() + 100 * t)
                        : i.views[h].setDate(f, t),
                      u._focusCell(u._cellByDate(f), !r),
                      (u._current = f)));
              },
              _toggle: function (n) {
                var i = this,
                  u = i.options,
                  e = "range" !== u.selectable && i.options.disableDates(ut()),
                  r = i._today;
                n === t && (n = g(ut(), u.min, u.max));
                r &&
                  (r.off(k + f),
                  n && !e
                    ? r
                        .addClass(ii)
                        .removeClass(o)
                        .on(k + f, p(i._todayClick, i))
                    : r
                        .removeClass(ii)
                        .addClass(o)
                        .on(k + f, function (n) {
                          n.preventDefault();
                        }));
              },
              _click: function (n, t) {
                var r = this,
                  f = r.options,
                  s = new Date(+r._current),
                  o = e(n);
                u.date.adjustDST(o, 0);
                r._currentView.setDate(s, o);
                r._current = o;
                r._currentView.name !== f.depth
                  ? (r.navigateDown(i.restrictValue(s, f.min, f.max)),
                    r._focusCell(r._cellByDate(r._current), !t),
                    r.trigger(d))
                  : r._focusCell(n.closest("td"), !t);
              },
              _blur: function () {
                var n = this;
                n._cell && n._cell.removeClass(y);
              },
              _focus: function (t) {
                var r = this,
                  u = n(t.currentTarget),
                  i = r._cell;
                (i && n.contains(u[0], i[0])) || (i = u.find(s + ":first"));
                r._focusCell(i);
              },
              _focusCell: function (n, t) {
                var i = this,
                  r = i._cellID,
                  u = n.closest("table");
                i._cell &&
                  i._cell.length &&
                  (i._cell[0].removeAttribute(oi),
                  i._cell[0].removeAttribute(rt),
                  i._cell.removeClass(y),
                  i._cell[0].removeAttribute(ot),
                  i._cell
                    .closest("table")[0]
                    .removeAttribute("aria-activedescendant"));
                i._cell = n;
                t && u.trigger("focus");
                r && (n.attr(ot, r), u.attr("aria-activedescendant", r));
                n.attr(oi, !0).addClass(y);
                n.length &&
                  "month" == i._currentView.name &&
                  (i._current = e(n.find("a")));
              },
              _todayClick: function (n) {
                var t = this,
                  u = t.options.disableDates,
                  i = ut(),
                  r = !1;
                n.preventDefault();
                u(i) ||
                  ((t._value = i),
                  "multiple" === t.options.selectable && (t._selectDates = [i]),
                  "range" === t.options.selectable &&
                    (t.rangeSelectable.clear(!0),
                    (t._range = { start: i, end: null })),
                  ("month" == t._currentView.name && t._dateInViews(i)) ||
                    (r = !0),
                  t.navigate(i, t.options.depth),
                  "single" === t.options.selectable &&
                    (t.selectable._lastActive = null),
                  r && t.trigger(d),
                  t.trigger(a));
              },
              _validateValue: function (n) {
                var i = this,
                  r = i.options,
                  f = r.min,
                  e = r.max;
                return (
                  (n = u.parseDate(n, r.format, r.culture)),
                  null !== n && ((n = new l(+n)), g(n, f, e) || (n = null)),
                  null !== n && i.options.disableDates(new Date(+n))
                    ? i._value === t && (i._value = null)
                    : (i._value = n),
                  i._value
                );
              },
              clearSelection: function () {
                var n = this;
                n.selectable && n.element.find(ht + w).removeClass(w);
                n.rangeSelectable && n.rangeSelectable.clear(!0);
              },
              _restoreSelection: function () {
                var i,
                  n = this,
                  r = n.options.selectable;
                if (n._currentView.name === n.options.depth) {
                  if (((n._preventChange = !0), "range" === r)) {
                    if (((i = n.selectRange()), !i || !i.start))
                      return (n._preventChange = !1), t;
                    n.selectRange(i);
                  }
                  "single" === r &&
                    n.value() &&
                    n.selectable.value(n._cellByDate(n.value()));
                  "multiple" === r && n._visualizeSelectedDatesInView();
                  n._preventChange = !1;
                }
              },
              value: function (n) {
                var r,
                  i = this;
                return n === t
                  ? i._value
                  : ((n = i._validateValue(n)),
                    i.clearSelection(),
                    n && !i._dateInViews(n) && i.navigate(n),
                    null !== n &&
                      i._currentView.name === st &&
                      ((r = i._cellByDate(n)),
                      i.selectable && i.selectable.value(r),
                      i.rangeSelectable &&
                        (i.rangeSelectable.start(r),
                        (i.rangeSelectable._lastActive = r))),
                    t);
              },
              selectDates: function (i) {
                var f,
                  u,
                  r = this;
                return i === t
                  ? r._selectDates
                  : ((u = i
                      .map(function (n) {
                        return n.getTime();
                      })
                      .filter(function (n, t, i) {
                        return i.indexOf(n) === t;
                      })
                      .map(function (n) {
                        return new Date(n);
                      })),
                    (f = n.grep(u, function (n) {
                      if (n)
                        return (
                          +r._validateValue(new Date(n.setHours(0, 0, 0, 0))) ==
                          +n
                        );
                    })),
                    (r._selectDates =
                      f.length > 0 ? f : 0 === u.length ? u : r._selectDates),
                    r._visualizeSelectedDatesInView(),
                    t);
              },
              selectRange: function (n) {
                var r,
                  u,
                  f,
                  i = this;
                return n === t
                  ? i._range
                  : ((i._range = n),
                    n.start &&
                      ((f = i._visibleRange()),
                      (r = i._dateInViews(n.start)),
                      (u = n.end && i._dateInViews(n.end)),
                      !r &&
                        u &&
                        i.rangeSelectable.selectTo(i._cellByDate(n.end)),
                      r &&
                        u &&
                        i.rangeSelectable.range(
                          i._cellByDate(n.start),
                          i._cellByDate(n.end)
                        ),
                      n.end &&
                        r &&
                        !u &&
                        i.rangeSelectable.selectFrom(i._cellByDate(n.start)),
                      !n.end &&
                        r &&
                        i.rangeSelectable.start(i._cellByDate(n.start)),
                      +f.start > +n.start &&
                        +f.end < +n.end &&
                        i.rangeSelectable.mid(i.element.find(s))),
                    t);
              },
            });
          u.ui.plugin(bi);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.virtuallist.min", ["kendo.data.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function h(n) {
            return n[n.length - 1];
          }
          function f(n) {
            return n instanceof Array ? n : [n];
          }
          function e(n) {
            return (
              "string" == typeof n ||
              "number" == typeof n ||
              "boolean" == typeof n
            );
          }
          function it(n, t, i) {
            return Math.ceil((n * t) / i);
          }
          function v(n, t, i) {
            var r = document.createElement(i || "div");
            return t && (r.className = t), n.appendChild(r), r;
          }
          function rt() {
            var r,
              t = n(
                '<div class="k-popup"><ul class="k-list"><li class="k-item"><li></ul></div>'
              );
            return (
              t.css({
                position: "absolute",
                left: "-200000px",
                visibility: "hidden",
              }),
              t.appendTo(document.body),
              (r = parseFloat(
                i.getComputedStyles(t.find(".k-item")[0], ["line-height"])[
                  "line-height"
                ]
              )),
              t.remove(),
              r
            );
          }
          function ut(n, t, i) {
            return { down: n * i, up: n * (t - 1 - i) };
          }
          function ft(n, t) {
            var i = (n.listScreens - 1 - n.threshold) * t,
              r = n.threshold * t;
            return function (n, t, u) {
              return t > u ? t - n.top < i : 0 === n.top || t - n.top > r;
            };
          }
          function et(n, t) {
            return function (i) {
              return t(n.scrollTop, i);
            };
          }
          function ot(n) {
            return function (t, i) {
              return n(t.items, t.index, i), t;
            };
          }
          function st(n, t) {
            i.support.browser.msie && i.support.browser.version < 10
              ? (n.style.top = t + "px")
              : ((n.style.webkitTransform = "translateY(" + t + "px)"),
                (n.style.transform = "translateY(" + t + "px)"));
          }
          function ht(t, r) {
            return function (u, f) {
              for (var e = 0, o = u.length; e < o; e++)
                t(u[e], f[e], r),
                  f[e].item &&
                    this.trigger(d, {
                      item: n(u[e]),
                      data: f[e].item,
                      ns: i.ui,
                    });
            };
          }
          function ct(n, t) {
            var i;
            return (
              t > 0
                ? ((i = n.splice(0, t)), n.push.apply(n, i))
                : ((i = n.splice(t, -t)), n.unshift.apply(n, i)),
              i
            );
          }
          function lt(i, f, e) {
            var o = e.template;
            i = n(i);
            f.item || (o = e.placeholderTemplate);
            0 === f.index &&
              this.header &&
              f.group &&
              this.header.html(e.fixedGroupTemplate(f.group));
            this.angular("cleanup", function () {
              return { elements: [i] };
            });
            i.attr("data-uid", f.item ? f.item.uid : "").attr(
              "data-offset-index",
              f.index
            );
            i.html(
              this.options.columns && this.options.columns.length && f.item
                ? at(this.options, f.item, e)
                : o(f.item || {})
            );
            i.toggleClass(r, f.current);
            i.toggleClass(u, f.selected);
            i.toggleClass("k-first", f.newGroup);
            i.toggleClass("k-last", f.isLastGroupedItem);
            i.toggleClass("k-loading-item", !f.item);
            0 !== f.index &&
              f.newGroup &&
              n("<div class=" + ii + "></div>")
                .appendTo(i)
                .html(e.groupTemplate(f.group));
            f.top !== t && st(i[0], f.top);
            this.angular("compile", function () {
              return {
                elements: [i],
                data: [
                  { dataItem: f.item, group: f.group, newGroup: f.newGroup },
                ],
              };
            });
          }
          function at(n, t, i) {
            for (var f, o, r, e = "", u = 0; u < n.columns.length; u++)
              (f = n.columns[u].width),
                (o = parseInt(f, 10)),
                (r = ""),
                f &&
                  ((r += "style='width:"),
                  (r += o),
                  (r += wt.test(f) ? "%" : "px"),
                  (r += ";'")),
                (e += "<span class='k-cell' " + r + ">"),
                (e += i["column" + u](t)),
                (e += "</span>");
            return e;
          }
          function vt(n, t) {
            var r,
              f,
              i,
              u,
              h = t.length,
              e = n.length,
              o = [],
              s = [];
            if (e)
              for (i = 0; i < e; i++) {
                for (r = n[i], f = !1, u = 0; u < h; u++)
                  if (r === t[u]) {
                    f = !0;
                    o.push({ index: i, item: r });
                    break;
                  }
                f || s.push(r);
              }
            return { changed: o, unchanged: s };
          }
          function y(n) {
            return n && "resolved" !== n.state();
          }
          var i = window.kendo,
            p = i.ui,
            l = p.Widget,
            yt = p.DataBoundWidget,
            pt = n.proxy,
            wt = /^\d+(\.\d+)?%$/i,
            bt = "k-virtual-wrap",
            kt = "k-virtual-list",
            dt = "k-virtual-content",
            w = "k-list",
            gt = "k-group-header",
            a = "k-virtual-item",
            ni = "k-item",
            ti = "k-height-container",
            ii = "k-group",
            u = "k-state-selected",
            r = "k-state-focused",
            b = "k-state-hover",
            o = "change",
            c = "click",
            k = "listBound",
            d = "itemChange",
            g = "activate",
            nt = "deactivate",
            s = ".VirtualList",
            tt = yt.extend({
              init: function (t, r) {
                var u = this;
                u.bound(!1);
                u._fetching = !1;
                l.fn.init.call(u, t, r);
                u.options.itemHeight || (u.options.itemHeight = rt());
                r = u.options;
                u.element.addClass(w + " " + kt).attr("role", "listbox");
                u.content = u.element
                  .wrap("<div unselectable='on' class='" + dt + "'></div>")
                  .parent();
                u.wrapper = u.content
                  .wrap("<div class='" + bt + "'></div>")
                  .parent();
                u.header = u.content
                  .before("<div class='" + gt + "'></div>")
                  .prev();
                r.columns && r.columns.length && u.element.removeClass(w);
                u.element
                  .on("mouseenter" + s, "li:not(.k-loading-item)", function () {
                    n(this).addClass(b);
                  })
                  .on("mouseleave" + s, "li", function () {
                    n(this).removeClass(b);
                  });
                u._values = f(u.options.value);
                u._selectedDataItems = [];
                u._selectedIndexes = [];
                u._rangesList = {};
                u._promisesList = [];
                u._optionID = i.guid();
                u._templates();
                u.setDataSource(r.dataSource);
                u.content.on(
                  "scroll" + s,
                  i.throttle(function () {
                    u._renderItems();
                    u._triggerListBound();
                  }, r.delay)
                );
                u._selectable();
              },
              options: {
                name: "VirtualList",
                autoBind: !0,
                delay: 100,
                height: null,
                listScreens: 4,
                threshold: 0.5,
                itemHeight: null,
                oppositeBuffer: 1,
                type: "flat",
                selectable: !1,
                value: [],
                dataValueField: null,
                template: "#:data#",
                placeholderTemplate: "loading...",
                groupTemplate: "#:data#",
                fixedGroupTemplate: "#:data#",
                mapValueTo: "index",
                valueMapper: null,
              },
              events: [o, c, k, d, g, nt],
              setOptions: function (n) {
                l.fn.setOptions.call(this, n);
                this._selectProxy && this.options.selectable === !1
                  ? this.element.off(c, "." + a, this._selectProxy)
                  : !this._selectProxy &&
                    this.options.selectable &&
                    this._selectable();
                this._templates();
                this.refresh();
              },
              items: function () {
                return n(this._items);
              },
              destroy: function () {
                this.wrapper.off(s);
                this.dataSource.unbind(o, this._refreshHandler);
                l.fn.destroy.call(this);
              },
              setDataSource: function (t) {
                var f,
                  r = this,
                  u = t || {};
                u = n.isArray(u) ? { data: u } : u;
                u = i.data.DataSource.create(u);
                r.dataSource
                  ? (r.dataSource.unbind(o, r._refreshHandler),
                    r._clean(),
                    r.bound(!1),
                    (r._deferValueSet = !0),
                    (f = r.value()),
                    r.value([]),
                    r.mute(function () {
                      r.value(f);
                    }))
                  : (r._refreshHandler = n.proxy(r.refresh, r));
                r.dataSource = u.bind(o, r._refreshHandler);
                r.setDSFilter(u.filter());
                0 !== u.view().length
                  ? r.refresh()
                  : r.options.autoBind && u.fetch();
              },
              skip: function () {
                return this.dataSource.currentRangeStart();
              },
              _triggerListBound: function () {
                var n = this,
                  t = n.skip();
                n.bound() &&
                  !n._selectingValue &&
                  n._skip !== t &&
                  ((n._skip = t), n.trigger(k));
              },
              _getValues: function (t) {
                var i = this._valueGetter;
                return n.map(t, function (n) {
                  return i(n);
                });
              },
              _highlightSelectedItems: function () {
                for (var t, n = 0; n < this._selectedDataItems.length; n++)
                  (t = this._getElementByDataItem(this._selectedDataItems[n])),
                    t.length && t.addClass(u);
              },
              refresh: function (n) {
                var i,
                  t = this,
                  r = n && n.action,
                  u = "itemchange" === r,
                  f = this.isFiltered();
                t._mute ||
                  ((t._deferValueSet = !1),
                  t._fetching
                    ? (t._renderItems && t._renderItems(!0),
                      t._triggerListBound())
                    : (f && t.focus(0),
                      t._createList(),
                      r ||
                      !t._values.length ||
                      f ||
                      t.options.skipUpdateOnBind ||
                      t._emptySearch
                        ? (t.bound(!0),
                          t._highlightSelectedItems(),
                          t._triggerListBound())
                        : ((t._selectingValue = !0),
                          t.bound(!0),
                          t.value(t._values, !0).done(function () {
                            t._selectingValue = !1;
                            t._triggerListBound();
                          }))),
                  (u || "remove" === r) &&
                    ((i = vt(t._selectedDataItems, n.items)),
                    i.changed.length &&
                      (u
                        ? t.trigger("selectedItemChange", { items: i.changed })
                        : t.value(t._getValues(i.unchanged)))),
                  (t._fetching = !1));
              },
              removeAt: function (n) {
                return (
                  this._selectedIndexes.splice(n, 1),
                  this._values.splice(n, 1),
                  {
                    position: n,
                    dataItem: this._selectedDataItems.splice(n, 1)[0],
                  }
                );
              },
              setValue: function (n) {
                this._values = f(n);
              },
              value: function (i, r) {
                var e,
                  u = this;
                return i === t
                  ? u._values.slice()
                  : (null === i && (i = []),
                    (i = f(i)),
                    (u._valueDeferred &&
                      "resolved" !== u._valueDeferred.state()) ||
                      (u._valueDeferred = n.Deferred()),
                    (e =
                      "multiple" === u.options.selectable &&
                      u.select().length &&
                      i.length),
                    (!e && i.length) || u.select(-1),
                    (u._values = i),
                    ((u.bound() && !u._mute && !u._deferValueSet) || r) &&
                      u._prefetchByValue(i),
                    u._valueDeferred);
              },
              _checkValuesOrder: function (n) {
                if (
                  this._removedAddedIndexes &&
                  this._removedAddedIndexes.length === n.length
                ) {
                  var t = this._removedAddedIndexes.slice();
                  return (this._removedAddedIndexes = null), t;
                }
                return n;
              },
              _prefetchByValue: function (n) {
                for (
                  var r,
                    f,
                    i = this,
                    o = i._dataView,
                    l = i._valueGetter,
                    h = i.options.mapValueTo,
                    c = !1,
                    s = [],
                    u = 0;
                  u < n.length;
                  u++
                )
                  for (f = 0; f < o.length; f++)
                    (r = o[f].item),
                      r &&
                        ((c = e(r) ? n[u] === r : n[u] === l(r)),
                        c && s.push(o[f].index));
                return s.length === n.length
                  ? ((i._values = []), i.select(s), t)
                  : ("function" == typeof i.options.valueMapper
                      ? i.options.valueMapper({
                          value:
                            "multiple" === this.options.selectable ? n : n[0],
                          success: function (n) {
                            "index" === h
                              ? i.mapValueToIndex(n)
                              : "dataItem" === h && i.mapValueToDataItem(n);
                          },
                        })
                      : i.value()[0]
                      ? ((i._selectingValue = !1), i._triggerListBound())
                      : i.select([-1]),
                    t);
              },
              mapValueToIndex: function (n) {
                if (
                  ((n = n === t || n === -1 || null === n ? [] : f(n)),
                  n.length)
                ) {
                  var i = this._deselect([]).removed;
                  i.length && this._triggerChange(i, []);
                } else n = [-1];
                this.select(n);
              },
              mapValueToDataItem: function (i) {
                var o, s, r, e;
                if (((i = i === t || null === i ? [] : f(i)), i.length)) {
                  for (
                    o = n.map(this._selectedDataItems, function (n, t) {
                      return { index: t, dataItem: n };
                    }),
                      s = n.map(i, function (n, t) {
                        return { index: t, dataItem: n };
                      }),
                      this._selectedDataItems = i,
                      this._selectedIndexes = [],
                      r = 0;
                    r < this._selectedDataItems.length;
                    r++
                  )
                    (e = this._getElementByDataItem(
                      this._selectedDataItems[r]
                    )),
                      this._selectedIndexes.push(this._getIndecies(e)[0]),
                      e.addClass(u);
                  this._triggerChange(o, s);
                  this._valueDeferred && this._valueDeferred.resolve();
                } else this.select([-1]);
              },
              deferredRange: function (t) {
                var s = this.dataSource,
                  i = this.itemCount,
                  u = this._rangesList,
                  f = n.Deferred(),
                  e = [],
                  o = Math.floor(t / i) * i,
                  r = Math.ceil(t / i) * i,
                  h = r === o ? [r] : [o, r];
                return (
                  n.each(h, function (t, r) {
                    var f,
                      h = r + i,
                      o = u[r];
                    o && o.end === h
                      ? (f = o.deferred)
                      : ((f = n.Deferred()),
                        (u[r] = { end: h, deferred: f }),
                        s._multiplePrefetch(r, i, function () {
                          f.resolve();
                        }));
                    e.push(f);
                  }),
                  n.when.apply(n, e).then(function () {
                    f.resolve();
                  }),
                  f
                );
              },
              prefetch: function (t) {
                var i = this,
                  r = this.itemCount,
                  u = !i._promisesList.length;
                return (
                  y(i._activeDeferred) ||
                    ((i._activeDeferred = n.Deferred()),
                    (i._promisesList = [])),
                  n.each(t, function (n, t) {
                    i._promisesList.push(i.deferredRange(i._getSkip(t, r)));
                  }),
                  u &&
                    n.when.apply(n, i._promisesList).done(function () {
                      i._promisesList = [];
                      i._activeDeferred.resolve();
                    }),
                  i._activeDeferred
                );
              },
              _findDataItem: function (n, t) {
                var i, r;
                if ("group" === this.options.type)
                  for (r = 0; r < n.length; r++) {
                    if (((i = n[r].items), !(i.length <= t))) return i[t];
                    t -= i.length;
                  }
                return n[t];
              },
              _getRange: function (n, t) {
                return this.dataSource._findRange(
                  n,
                  Math.min(n + t, this.dataSource.total())
                );
              },
              dataItemByIndex: function (t) {
                var r = this,
                  u = r.itemCount,
                  f = r._getSkip(t, u),
                  e = this._getRange(f, u);
                return r._getRange(f, u).length
                  ? ("group" === r.options.type &&
                      (i.ui.progress(n(r.wrapper), !0),
                      r.mute(function () {
                        r.dataSource.range(f, u, function () {
                          i.ui.progress(n(r.wrapper), !1);
                        });
                        e = r.dataSource.view();
                      })),
                    r._findDataItem(e, [t - f]))
                  : null;
              },
              selectedDataItems: function () {
                return this._selectedDataItems.slice();
              },
              scrollWith: function (n) {
                this.content.scrollTop(this.content.scrollTop() + n);
              },
              scrollTo: function (n) {
                this.content.scrollTop(n);
              },
              scrollToIndex: function (n) {
                this.scrollTo(n * this.options.itemHeight);
              },
              focus: function (i) {
                var f,
                  u,
                  l,
                  e,
                  o,
                  s,
                  c = this.options.itemHeight,
                  v = this._optionID,
                  a = !0;
                if (i === t)
                  return (e = this.element.find("." + r)), e.length ? e : null;
                if ("function" == typeof i)
                  for (l = this.dataSource.flatView(), o = 0; o < l.length; o++)
                    if (i(l[o])) {
                      i = o;
                      break;
                    }
                return (
                  i instanceof Array && (i = h(i)),
                  isNaN(i)
                    ? ((f = n(i)),
                      (u = parseInt(n(f).attr("data-offset-index"), 10)))
                    : ((u = i), (f = this._getElementByIndex(u))),
                  u === -1
                    ? (this.element.find("." + r).removeClass(r),
                      (this._focusedIndex = t),
                      t)
                    : (f.length
                        ? (f.hasClass(r) && (a = !1),
                          this._focusedIndex !== t &&
                            ((e = this._getElementByIndex(this._focusedIndex)),
                            e.removeClass(r).removeAttr("id"),
                            a && this.trigger(nt)),
                          (this._focusedIndex = u),
                          f.addClass(r).attr("id", v),
                          (s = this._getElementLocation(u)),
                          "top" === s
                            ? this.scrollTo(u * c)
                            : "bottom" === s
                            ? this.scrollTo(u * c + c - this._screenHeight)
                            : "outScreen" === s && this.scrollTo(u * c),
                          a && this.trigger(g))
                        : ((this._focusedIndex = u),
                          this.items().removeClass(r),
                          this.scrollToIndex(u)),
                      t)
                );
              },
              focusIndex: function () {
                return this._focusedIndex;
              },
              focusFirst: function () {
                this.scrollTo(0);
                this.focus(0);
              },
              focusLast: function () {
                var n = this.dataSource.total();
                this.scrollTo(this.heightContainer.offsetHeight);
                this.focus(n - 1);
              },
              focusPrev: function () {
                var t,
                  n = this._focusedIndex;
                return !isNaN(n) && n > 0
                  ? ((n -= 1),
                    this.focus(n),
                    (t = this.focus()),
                    t &&
                      t.hasClass("k-loading-item") &&
                      ((n += 1), this.focus(n)),
                    n)
                  : ((n = this.dataSource.total() - 1), this.focus(n), n);
              },
              focusNext: function () {
                var t,
                  n = this._focusedIndex,
                  i = this.dataSource.total() - 1;
                return !isNaN(n) && n < i
                  ? ((n += 1),
                    this.focus(n),
                    (t = this.focus()),
                    t &&
                      t.hasClass("k-loading-item") &&
                      ((n -= 1), this.focus(n)),
                    n)
                  : ((n = 0), this.focus(n), n);
              },
              _triggerChange: function (n, t) {
                n = n || [];
                t = t || [];
                (n.length || t.length) &&
                  this.trigger(o, { removed: n, added: t });
              },
              select: function (i) {
                var u,
                  l,
                  a,
                  e,
                  o,
                  s,
                  r = this,
                  c = "multiple" !== r.options.selectable,
                  v = y(r._activeDeferred),
                  p = this.isFiltered(),
                  f = [];
                return i === t
                  ? r._selectedIndexes.slice()
                  : ((r._selectDeferred &&
                      "resolved" !== r._selectDeferred.state()) ||
                      (r._selectDeferred = n.Deferred()),
                    (u = r._getIndecies(i)),
                    (a = c && !p && h(u) === h(this._selectedIndexes)),
                    (f = r._deselectCurrentValues(u)),
                    f.length || !u.length || a
                      ? (r._triggerChange(f),
                        r._valueDeferred &&
                          r._valueDeferred.resolve().promise(),
                        r._selectDeferred.resolve().promise())
                      : (1 === u.length && u[0] === -1 && (u = []),
                        (l = u),
                        (o = r._deselect(u)),
                        (f = o.removed),
                        (u = o.indices),
                        c && ((v = !1), u.length && (u = [h(u)])),
                        (s = function () {
                          var n = r._select(u);
                          (l.length === u.length || c) && r.focus(u);
                          r._triggerChange(f, n);
                          r._valueDeferred && r._valueDeferred.resolve();
                          r._selectDeferred.resolve();
                        }),
                        (e = r.prefetch(u)),
                        v || (e ? e.done(s) : s()),
                        r._selectDeferred.promise()));
              },
              bound: function (n) {
                return n === t
                  ? this._listCreated
                  : ((this._listCreated = n), t);
              },
              mute: function (n) {
                this._mute = !0;
                pt(n(), this);
                this._mute = !1;
              },
              setDSFilter: function (t) {
                this._lastDSFilter = n.extend({}, t);
              },
              isFiltered: function () {
                return (
                  this._lastDSFilter ||
                    this.setDSFilter(this.dataSource.filter()),
                  !i.data.Query.compareFilters(
                    this.dataSource.filter(),
                    this._lastDSFilter
                  )
                );
              },
              skipUpdate: n.noop,
              _getElementByIndex: function (t) {
                return this.items().filter(function (i, r) {
                  return t === parseInt(n(r).attr("data-offset-index"), 10);
                });
              },
              _getElementByDataItem: function (t) {
                for (
                  var u, o, r = this._dataView, f = this._valueGetter, i = 0;
                  i < r.length;
                  i++
                )
                  if (
                    (o =
                      r[i].item && e(r[i].item)
                        ? r[i].item === t
                        : r[i].item && t && f(r[i].item) == f(t))
                  ) {
                    u = r[i];
                    break;
                  }
                return u ? this._getElementByIndex(u.index) : n();
              },
              _clean: function () {
                this.result = t;
                this._lastScrollTop = t;
                this._skip = t;
                n(this.heightContainer).remove();
                this.heightContainer = t;
                this.element.empty();
              },
              _height: function () {
                var r = !!this.dataSource.view().length,
                  n = this.options.height,
                  t = this.options.itemHeight,
                  i = this.dataSource.total();
                return r ? n / t > i && (n = i * t) : (n = 0), n;
              },
              setScreenHeight: function () {
                var n = this._height();
                this.content.height(n);
                this._screenHeight = n;
              },
              screenHeight: function () {
                return this._screenHeight;
              },
              _getElementLocation: function (n) {
                var i = this.content.scrollTop(),
                  f = this._screenHeight,
                  r = this.options.itemHeight,
                  t = n * r,
                  e = t + r,
                  u = i + f;
                return t === i - r || (e > i && t < i)
                  ? "top"
                  : t === u || (t < u && u < e)
                  ? "bottom"
                  : t >= i && t <= i + (f - r)
                  ? "inScreen"
                  : "outScreen";
              },
              _templates: function () {
                var r,
                  u,
                  e,
                  f,
                  n = this.options,
                  t = {
                    template: n.template,
                    placeholderTemplate: n.placeholderTemplate,
                    groupTemplate: n.groupTemplate,
                    fixedGroupTemplate: n.fixedGroupTemplate,
                  };
                if (n.columns)
                  for (r = 0; r < n.columns.length; r++)
                    (u = n.columns[r]),
                      (e = u.field ? "" + u.field : "text"),
                      (t["column" + r] = u.template || "#: " + e + "#");
                for (f in t)
                  "function" != typeof t[f] && (t[f] = i.template(t[f] || ""));
                this.templates = t;
              },
              _generateItems: function (n, t) {
                for (
                  var i, r = [], u = this.options.itemHeight + "px";
                  t-- > 0;

                )
                  (i = document.createElement("li")),
                    (i.tabIndex = -1),
                    (i.className = a + " " + ni),
                    i.setAttribute("role", "option"),
                    (i.style.height = u),
                    (i.style.minHeight = u),
                    n.appendChild(i),
                    r.push(i);
                return r;
              },
              _saveInitialRanges: function () {
                var t,
                  i = this.dataSource._ranges,
                  r = n.Deferred();
                for (
                  r.resolve(), this._rangesList = {}, t = 0;
                  t < i.length;
                  t++
                )
                  this._rangesList[i[t].start] = { end: i[t].end, deferred: r };
              },
              _createList: function () {
                var t = this,
                  u = t.content.get(0),
                  r = t.options,
                  i = t.dataSource;
                t.bound() && t._clean();
                t._saveInitialRanges();
                t._buildValueGetter();
                t.setScreenHeight();
                t.itemCount = it(t._screenHeight, r.listScreens, r.itemHeight);
                t.itemCount > i.total() && (t.itemCount = i.total());
                t._items = t._generateItems(t.element[0], t.itemCount);
                t._setHeight(r.itemHeight * i.total());
                t.options.type = (i.group() || []).length ? "group" : "flat";
                "flat" === t.options.type ? t.header.hide() : t.header.show();
                t.getter = t._getter(function () {
                  t._renderItems(!0);
                });
                t._onScroll = function (n, i) {
                  var r = t._listItems(t.getter);
                  return t._fixedHeader(n, r(n, i));
                };
                t._renderItems = t._whenChanged(
                  et(u, t._onScroll),
                  ot(t._reorderList(t._items, n.proxy(lt, t)))
                );
                t._renderItems();
                t._calculateGroupPadding(t._screenHeight);
                t._calculateColumnsHeaderPadding();
              },
              _setHeight: function (n) {
                var r,
                  i,
                  t = this.heightContainer;
                if (
                  (t
                    ? (r = t.offsetHeight)
                    : (t = this.heightContainer = v(this.content[0], ti)),
                  n !== r)
                )
                  for (t.innerHTML = ""; n > 0; )
                    (i = Math.min(n, 25e4)),
                      (v(t).style.height = i + "px"),
                      (n -= i);
              },
              _getter: function () {
                var u = null,
                  n = this.dataSource,
                  i = n.skip(),
                  f = this.options.type,
                  t = this.itemCount,
                  r = {};
                return (
                  n.pageSize() < t &&
                    this.mute(function () {
                      n.pageSize(t);
                    }),
                  function (e, o) {
                    var a,
                      y,
                      v,
                      h,
                      p,
                      c,
                      l,
                      w,
                      s = this;
                    if (n.inRange(o, t)) {
                      if (
                        (i !== o &&
                          this.mute(function () {
                            n.range(o, t);
                            i = o;
                          }),
                        "group" === f)
                      ) {
                        if (!r[o])
                          for (
                            y = r[o] = [], v = n.view(), h = 0, p = v.length;
                            h < p;
                            h++
                          )
                            for (
                              c = v[h], l = 0, w = c.items.length;
                              l < w;
                              l++
                            )
                              y.push({ item: c.items[l], group: c.value });
                        a = r[o][e - o];
                      } else a = n.view()[e - o];
                      return a;
                    }
                    return (
                      u !== o &&
                        ((u = o),
                        (i = o),
                        s._getterDeferred && s._getterDeferred.reject(),
                        (s._getterDeferred = s.deferredRange(o)),
                        s._getterDeferred.then(function () {
                          var i = s._indexConstraint(s.content[0].scrollTop);
                          s._getterDeferred = null;
                          o <= i &&
                            i <= o + t &&
                            ((s._fetching = !0), n.range(o, t));
                        })),
                      null
                    );
                  }
                );
              },
              _fixedHeader: function (n, t) {
                var i,
                  u,
                  f = this.currentVisibleGroup,
                  e = this.options.itemHeight,
                  o = Math.floor((n - t.top) / e),
                  r = t.items[o];
                return (
                  r &&
                    r.item &&
                    ((i = r.group),
                    i !== f &&
                      ((u = i || ""),
                      this.header.html(this.templates.fixedGroupTemplate(u)),
                      (this.currentVisibleGroup = i))),
                  t
                );
              },
              _itemMapper: function (n, t, i) {
                var u,
                  r,
                  a = this.options.type,
                  v = this.options.itemHeight,
                  y = this._focusedIndex,
                  f = !1,
                  s = !1,
                  h = !1,
                  c = null,
                  l = !1,
                  o = this._valueGetter;
                if (
                  ("group" === a &&
                    (n &&
                      ((h =
                        0 === t ||
                        (this._currentGroup !== !1 &&
                          this._currentGroup !== n.group)),
                      (this._currentGroup = n.group)),
                    (c = n ? n.group : null),
                    (n = n ? n.item : null)),
                  "dataItem" === this.options.mapValueTo &&
                    this._selectedDataItems.length &&
                    n)
                ) {
                  for (u = 0; u < this._selectedDataItems.length; u++)
                    if ((l = o(this._selectedDataItems[u]) === o(n))) {
                      f = !0;
                      break;
                    }
                } else if (!this.isFiltered() && i.length && n)
                  for (r = 0; r < i.length; r++)
                    if ((l = e(n) ? i[r] === n : i[r] === o(n))) {
                      i.splice(r, 1);
                      f = !0;
                      break;
                    }
                return (
                  y === t && (s = !0),
                  {
                    item: n ? n : null,
                    group: c,
                    newGroup: h,
                    selected: f,
                    current: s,
                    index: t,
                    top: t * v,
                  }
                );
              },
              _range: function (n) {
                var i,
                  r,
                  u,
                  f = this.itemCount,
                  e = this._values.slice(),
                  t = [];
                for (
                  this._view = {}, this._currentGroup = !1, r = n, u = n + f;
                  r < u;
                  r++
                )
                  (i = this._itemMapper(this.getter(r, n), r, e)),
                    t[t.length - 1] &&
                      (t[t.length - 1].isLastGroupedItem = i.newGroup),
                    t.push(i),
                    (this._view[i.index] = i);
                return (this._dataView = t), t;
              },
              _getDataItemsCollection: function (n, t) {
                var i = this._range(this._listIndex(n, t));
                return {
                  index: i.length ? i[0].index : 0,
                  top: i.length ? i[0].top : 0,
                  items: i,
                };
              },
              _listItems: function () {
                var t = this._screenHeight,
                  i = this.options,
                  r = ft(i, t);
                return n.proxy(function (n, t) {
                  var i = this.result,
                    u = this._lastScrollTop;
                  return (
                    (!t && i && r(i, n, u)) ||
                      (i = this._getDataItemsCollection(n, u)),
                    (this._lastScrollTop = n),
                    (this.result = i),
                    i
                  );
                }, this);
              },
              _whenChanged: function (n, t) {
                var i;
                return function (r) {
                  var u = n(r);
                  u !== i && ((i = u), t(u, r));
                };
              },
              _reorderList: function (t, i) {
                var u = this,
                  f = t.length,
                  r = -(1 / 0);
                return (
                  (i = n.proxy(ht(i, this.templates), this)),
                  function (n, e, o) {
                    var h,
                      c,
                      s = e - r;
                    o || Math.abs(s) >= f
                      ? ((h = t), (c = n))
                      : ((h = ct(t, s)),
                        (c = s > 0 ? n.slice(-s) : n.slice(0, -s)));
                    i(h, c, u.bound());
                    r = e;
                  }
                );
              },
              _bufferSizes: function () {
                var n = this.options;
                return ut(this._screenHeight, n.listScreens, n.oppositeBuffer);
              },
              _indexConstraint: function (n) {
                var t = this.itemCount,
                  i = this.options.itemHeight,
                  r = this.dataSource.total();
                return Math.min(
                  Math.max(r - t, 0),
                  Math.max(0, Math.floor(n / i))
                );
              },
              _listIndex: function (n, t) {
                var i,
                  r = this._bufferSizes();
                return (
                  (i = n - (n > t ? r.down : r.up)), this._indexConstraint(i)
                );
              },
              _selectable: function () {
                this.options.selectable &&
                  ((this._selectProxy = n.proxy(this, "_clickHandler")),
                  this.element.on(c + s, "." + a, this._selectProxy));
              },
              getElementIndex: function (n) {
                return n instanceof jQuery
                  ? parseInt(n.attr("data-offset-index"), 10)
                  : t;
              },
              _getIndecies: function (n) {
                var r,
                  t,
                  u,
                  i = [];
                if ("function" == typeof n)
                  for (r = this.dataSource.flatView(), t = 0; t < r.length; t++)
                    if (n(r[t])) {
                      i.push(t);
                      break;
                    }
                return (
                  "number" == typeof n && i.push(n),
                  (u = this.getElementIndex(n)),
                  isNaN(u) || i.push(u),
                  n instanceof Array && (i = n),
                  i
                );
              },
              _deselect: function (i) {
                var a,
                  c,
                  v,
                  b,
                  r,
                  f,
                  o,
                  p = [],
                  s = this._selectedIndexes,
                  h = this._selectedDataItems,
                  y = 0,
                  k = this.options.selectable,
                  w = 0,
                  d = this._valueGetter,
                  l = null;
                if (((i = i.slice()), k !== !0 && i.length)) {
                  if ("multiple" === k)
                    for (f = 0; f < i.length; f++) {
                      if (
                        ((l = null),
                        (y = n.inArray(i[f], s)),
                        (c = this.dataItemByIndex(i[f])),
                        y === -1 && c)
                      )
                        for (o = 0; o < h.length; o++)
                          (b = e(c) ? h[o] === c : d(h[o]) === d(c)),
                            b &&
                              ((v = this._getElementByIndex(i[f])),
                              (l = this._deselectSingleItem(v, o, i[f], w)));
                      else
                        (a = s[y]),
                          a !== t &&
                            ((v = this._getElementByIndex(a)),
                            (l = this._deselectSingleItem(v, y, a, w)));
                      l && (i.splice(f, 1), p.push(l), w++, f--);
                    }
                } else {
                  for (r = 0; r < s.length; r++)
                    s[r] !== t
                      ? this._getElementByIndex(s[r]).removeClass(u)
                      : h[r] && this._getElementByDataItem(h[r]).removeClass(u),
                      p.push({ index: s[r], position: r, dataItem: h[r] });
                  this._values = [];
                  this._selectedDataItems = [];
                  this._selectedIndexes = [];
                }
                return { indices: i, removed: p };
              },
              _deselectSingleItem: function (n, t, i, r) {
                var f;
                if (n.hasClass("k-state-selected"))
                  return (
                    n.removeClass(u),
                    this._values.splice(t, 1),
                    this._selectedIndexes.splice(t, 1),
                    (f = this._selectedDataItems.splice(t, 1)[0]),
                    { index: i, position: t + r, dataItem: f }
                  );
              },
              _deselectCurrentValues: function (t) {
                var o,
                  r,
                  u,
                  i,
                  s = this.element[0].children,
                  h = this._values,
                  f = [],
                  e = 0;
                if (
                  "multiple" !== this.options.selectable ||
                  !this.isFiltered()
                )
                  return [];
                if (t[0] === -1)
                  return (
                    n(s).removeClass("k-state-selected"),
                    (f = n.map(
                      this._selectedDataItems.slice(0),
                      function (n, t) {
                        return { dataItem: n, position: t };
                      }
                    )),
                    (this._selectedIndexes = []),
                    (this._selectedDataItems = []),
                    (this._values = []),
                    f
                  );
                for (; e < t.length; e++) {
                  for (
                    u = -1,
                      r = t[e],
                      this.dataItemByIndex(r) &&
                        (o = this._valueGetter(this.dataItemByIndex(r))),
                      i = 0;
                    i < h.length;
                    i++
                  )
                    if (o == h[i]) {
                      u = i;
                      break;
                    }
                  u > -1 &&
                    (f.push(this.removeAt(u)),
                    n(s[r]).removeClass("k-state-selected"));
                }
                return f;
              },
              _getSkip: function (n, t) {
                var i = n < t ? 1 : Math.floor(n / t) + 1;
                return (i - 1) * t;
              },
              _select: function (t) {
                var r,
                  s,
                  i = this,
                  c = "multiple" !== this.options.selectable,
                  f = this.dataSource,
                  o = this.itemCount,
                  l = this._valueGetter,
                  h = [];
                return (
                  c &&
                    ((i._selectedIndexes = []),
                    (i._selectedDataItems = []),
                    (i._values = [])),
                  (s = f.skip()),
                  n.each(t, function (n, t) {
                    var c = i._getSkip(t, o);
                    i.mute(function () {
                      f.range(c, o);
                      r = i._findDataItem(f.view(), [t - c]);
                      i._selectedIndexes.push(t);
                      i._selectedDataItems.push(r);
                      i._values.push(e(r) ? r : l(r));
                      h.push({ index: t, dataItem: r });
                      i._getElementByIndex(t).addClass(u);
                      f.range(s, o);
                    });
                  }),
                  (i._values = i._checkValuesOrder(i._values)),
                  h
                );
              },
              _clickHandler: function (t) {
                var i = n(t.currentTarget);
                !t.isDefaultPrevented() &&
                  i.attr("data-uid") &&
                  this.trigger(c, { item: i });
              },
              _buildValueGetter: function () {
                this._valueGetter = i.getter(this.options.dataValueField);
              },
              _calculateGroupPadding: function (n) {
                var u = this.items().first(),
                  t = this.header,
                  r = 0;
                t[0] &&
                  "none" !== t[0].style.display &&
                  ("auto" !== n && (r = i.support.scrollbar()),
                  (r +=
                    parseFloat(u.css("border-right-width"), 10) +
                    parseFloat(u.children(".k-group").css("right"), 10)),
                  t.css("padding-right", r));
              },
              _calculateColumnsHeaderPadding: function () {
                var n, t, r, u;
                this.options.columns &&
                  this.options.columns.length &&
                  ((n = i.support.isRtl(this.wrapper)),
                  (t = i.support.scrollbar()),
                  (r = this.content.parent().parent().find(".k-grid-header")),
                  (u = this.dataSource.total()),
                  r.css(n ? "padding-left" : "padding-right", u ? t : 0));
              },
            });
          i.ui.VirtualList = tt;
          i.ui.plugin(tt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.autocomplete.min",
      ["kendo.list.min", "kendo.mobile.scroller.min", "kendo.virtuallist.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function s(n, t, i) {
            return i ? t.substring(0, n).split(i).length - 1 : 0;
          }
          function g(n, t, i) {
            return t.split(i)[s(n, t, i)];
          }
          function nt(n, t, i, r, u) {
            var f = t.split(r);
            return (
              f.splice(s(n, t, r), 1, i),
              r && "" !== f[f.length - 1] && f.push(""),
              f.join(u)
            );
          }
          var f = window.kendo,
            tt = f.support,
            o = f.caret,
            h = f._activeElement,
            v = tt.placeholder,
            y = f.ui,
            u = y.List,
            r = f.keys,
            it = f.data.DataSource,
            p = "aria-disabled",
            w = "aria-readonly",
            c = "change",
            l = "k-state-default",
            b = "disabled",
            k = "readonly",
            d = "k-state-focused",
            rt = "k-state-selected",
            a = "k-state-disabled",
            ut = "off",
            ft = "k-state-hover",
            i = ".kendoAutoComplete",
            et = "mouseenter" + i + " mouseleave" + i,
            e = n.proxy,
            ot = u.extend({
              init: function (t, r) {
                var s,
                  h,
                  o = this;
                o.ns = i;
                r = n.isArray(r) ? { dataSource: r } : r;
                u.fn.init.call(o, t, r);
                t = o.element;
                r = o.options;
                r.placeholder = r.placeholder || t.attr("placeholder");
                v && t.attr("placeholder", r.placeholder);
                o._wrapper();
                o._loader();
                o._clearButton();
                o._dataSource();
                o._ignoreCase();
                t[0].type = "text";
                s = o.wrapper;
                o._popup();
                t.addClass("k-input")
                  .on("keydown" + i, e(o._keydown, o))
                  .on("keypress" + i, e(o._keypress, o))
                  .on("input" + i, e(o._search, o))
                  .on("paste" + i, e(o._search, o))
                  .on("focus" + i, function () {
                    o._prev = o._accessor();
                    o._oldText = o._prev;
                    o._placeholder(!1);
                    s.addClass(d);
                  })
                  .on("focusout" + i, function () {
                    o._change();
                    o._placeholder();
                    o.close();
                    s.removeClass(d);
                  })
                  .attr({
                    autocomplete: ut,
                    role: "textbox",
                    "aria-haspopup": !0,
                  });
                o._clear.on("click" + i + " touchend" + i, e(o._clearValue, o));
                o._enable();
                o._old = o._accessor();
                t[0].id && t.attr("aria-owns", o.ul[0].id);
                o._aria();
                o._placeholder();
                o._initList();
                h = n(o.element).parents("fieldset").is(":disabled");
                h && o.enable(!1);
                o.listView.bind("click", function (n) {
                  n.preventDefault();
                });
                o._resetFocusItemHandler = n.proxy(o._resetFocusItem, o);
                f.notify(o);
                o._toggleCloseVisibility();
              },
              options: {
                name: "AutoComplete",
                enabled: !0,
                suggest: !1,
                template: "",
                groupTemplate: "#:data#",
                fixedGroupTemplate: "#:data#",
                dataTextField: "",
                minLength: 1,
                enforceMinLength: !1,
                delay: 200,
                height: 200,
                filter: "startswith",
                ignoreCase: !0,
                highlightFirst: !1,
                separator: null,
                placeholder: "",
                animation: {},
                virtual: !1,
                value: null,
                clearButton: !0,
                autoWidth: !1,
                popup: null,
              },
              _dataSource: function () {
                var n = this;
                n.dataSource && n._refreshHandler
                  ? n._unbindDataSource()
                  : ((n._progressHandler = e(n._showBusy, n)),
                    (n._errorHandler = e(n._hideBusy, n)));
                n.dataSource = it
                  .create(n.options.dataSource)
                  .bind("progress", n._progressHandler)
                  .bind("error", n._errorHandler);
              },
              setDataSource: function (n) {
                this.options.dataSource = n;
                this._dataSource();
                this.listView.setDataSource(this.dataSource);
              },
              events: [
                "open",
                "close",
                c,
                "select",
                "filtering",
                "dataBinding",
                "dataBound",
              ],
              setOptions: function (n) {
                var t = this._listOptions(n);
                u.fn.setOptions.call(this, n);
                this.listView.setOptions(t);
                this._accessors();
                this._aria();
                this._clearButton();
              },
              _listOptions: function (t) {
                var i = u.fn._listOptions.call(
                  this,
                  n.extend(t, { skipUpdateOnBind: !0 })
                );
                return (
                  (i.dataValueField = i.dataTextField),
                  (i.selectedItemChange = null),
                  i
                );
              },
              _editable: function (n) {
                var r = this,
                  f = r.element,
                  e = r.wrapper.off(i),
                  u = n.readonly,
                  t = n.disable;
                u || t
                  ? (e.addClass(t ? a : l).removeClass(t ? l : a),
                    f.attr(b, t).attr(k, u).attr(p, t).attr(w, u))
                  : (e.addClass(l).removeClass(a).on(et, r._toggleHover),
                    f.removeAttr(b).removeAttr(k).attr(p, !1).attr(w, !1));
              },
              close: function () {
                var n = this,
                  t = n.listView.focus();
                t && t.removeClass(rt);
                n.popup.close();
              },
              destroy: function () {
                var n = this;
                n.element.off(i);
                n._clear.off(i);
                n.wrapper.off(i);
                u.fn.destroy.call(n);
              },
              refresh: function () {
                this.listView.refresh();
              },
              select: function (n) {
                this._select(n);
              },
              search: function (t) {
                var u,
                  i = this,
                  r = i.options,
                  f = r.ignoreCase,
                  e = i._separator(),
                  s = i.dataSource.options.accentFoldingFiltering;
                t = t || i._accessor();
                clearTimeout(i._typingTimeout);
                e && (t = g(o(i.element)[0], t, e));
                u = t.length;
                ((!r.enforceMinLength && !u) || u >= r.minLength) &&
                  ((i._open = !0),
                  i._mute(function () {
                    this.listView.value([]);
                  }),
                  i._filterSource({
                    value: f
                      ? s
                        ? t.toLocaleLowerCase(s)
                        : t.toLowerCase()
                      : t,
                    operator: r.filter,
                    field: r.dataTextField,
                    ignoreCase: f,
                  }),
                  i.one("close", n.proxy(i._unifySeparators, i)));
                i._toggleCloseVisibility();
              },
              suggest: function (n) {
                var c,
                  f = this,
                  p = f._last,
                  i = f._accessor(),
                  y = f.element[0],
                  e = o(y)[0],
                  a = f._separator(),
                  v = i.split(a),
                  w = s(e, i, a),
                  b = e,
                  l = f.dataSource.options.accentFoldingFiltering;
                return p == r.BACKSPACE || p == r.DELETE
                  ? ((f._last = t), t)
                  : ((n = n || ""),
                    "string" != typeof n &&
                      (n[0] &&
                        (n = f.dataSource.view()[u.inArray(n[0], f.ul[0])]),
                      (n = n ? f._text(n) : "")),
                    e <= 0 &&
                      (e =
                        (l ? i.toLocaleLowerCase(l) : i.toLowerCase()).indexOf(
                          l ? n.toLocaleLowerCase(l) : n.toLowerCase()
                        ) + 1),
                    (c = i.substring(0, e).lastIndexOf(a)),
                    (c = c > -1 ? e - (c + a.length) : e),
                    (i = v[w].substring(0, c)),
                    n &&
                      ((n = "" + n),
                      (c = (
                        l ? n.toLocaleLowerCase(l) : n.toLowerCase()
                      ).indexOf(l ? i.toLocaleLowerCase(l) : i.toLowerCase())),
                      c > -1 &&
                        ((n = n.substring(c + i.length)),
                        (b = e + n.length),
                        (i += n)),
                      a && "" !== v[v.length - 1] && v.push("")),
                    (v[w] = i),
                    f._accessor(v.join(a || "")),
                    y === h() && o(y, e, b),
                    t);
              },
              value: function (n) {
                return n === t
                  ? this._accessor()
                  : (this.listView.value(n),
                    this._accessor(n),
                    (this._old = this._accessor()),
                    (this._oldText = this._accessor()),
                    this._toggleCloseVisibility(),
                    t);
              },
              _click: function (n) {
                var r = n.item,
                  i = this,
                  u = i.element,
                  f = i.listView.dataItemByIndex(i.listView.getElementIndex(r));
                return (
                  n.preventDefault(),
                  (i._active = !0),
                  i.trigger("select", { dataItem: f, item: r })
                    ? (i.close(), t)
                    : ((i._oldText = u.val()),
                      i._select(r).done(function () {
                        i._blur();
                        o(u, u.val().length);
                      }),
                      t)
                );
              },
              _clearText: n.noop,
              _resetFocusItem: function () {
                var n = this.options.highlightFirst ? 0 : -1;
                this.options.virtual && this.listView.scrollTo(0);
                this.listView.focus(n);
              },
              _listBound: function () {
                var r,
                  n = this,
                  u = n.popup,
                  f = n.options,
                  e = n.dataSource.flatView(),
                  i = e.length,
                  s = n.dataSource._group.length,
                  o = n.element[0] === h();
                n._renderFooter();
                n._renderNoData();
                n._toggleNoData(!i);
                n._toggleHeader(!!s && !!i);
                n._resizePopup();
                u.position();
                i && f.suggest && o && n.suggest(e[0]);
                n._open &&
                  ((n._open = !1),
                  (r = n._allowOpening() ? "open" : "close"),
                  n._typingTimeout && !o && (r = "close"),
                  i &&
                    (n._resetFocusItem(),
                    f.virtual &&
                      n.popup
                        .unbind("activate", n._resetFocusItemHandler)
                        .one("activate", n._resetFocusItemHandler)),
                  u[r](),
                  (n._typingTimeout = t));
                n._touchScroller && n._touchScroller.reset();
                n._hideBusy();
                n._makeUnselectable();
                n.trigger("dataBound");
              },
              _mute: function (n) {
                this._muted = !0;
                n.call(this);
                this._muted = !1;
              },
              _listChange: function () {
                var n = this._active || this.element[0] === h();
                n &&
                  !this._muted &&
                  this._selectValue(this.listView.selectedDataItems()[0]);
              },
              _selectValue: function (n) {
                var i = this._separator(),
                  t = "";
                n && (t = this._text(n));
                null === t && (t = "");
                i &&
                  (t = nt(
                    o(this.element)[0],
                    this._accessor(),
                    t,
                    i,
                    this._defaultSeparator()
                  ));
                this._prev = t;
                this._accessor(t);
                this._placeholder();
              },
              _unifySeparators: function () {
                return (
                  this._accessor(
                    this.value()
                      .split(this._separator())
                      .join(this._defaultSeparator())
                  ),
                  this
                );
              },
              _preselect: function (n, t) {
                this._inputValue(t);
                this._accessor(n);
                this._old = this.oldText = this._accessor();
                this.listView.setValue(n);
                this._placeholder();
              },
              _change: function () {
                var n = this,
                  t = n._unifySeparators().value(),
                  i = t !== u.unifyType(n._old, typeof t),
                  r = i && !n._typing,
                  f = n._oldText !== t;
                n._old = t;
                n._oldText = t;
                (r || f) && n.element.trigger(c);
                i && n.trigger(c);
                n.typing = !1;
                n._toggleCloseVisibility();
              },
              _accessor: function (n) {
                var i = this,
                  r = i.element[0];
                return n === t
                  ? ((n = r.value),
                    r.className.indexOf("k-readonly") > -1 &&
                    n === i.options.placeholder
                      ? ""
                      : n)
                  : ((r.value = null === n ? "" : n), i._placeholder(), t);
              },
              _keydown: function (n) {
                var o,
                  s,
                  t = this,
                  i = n.keyCode,
                  f = t.listView,
                  e = t.popup.visible(),
                  u = f.focus();
                if (((t._last = i), i === r.DOWN))
                  e
                    ? this._move(u ? "focusNext" : "focusFirst")
                    : t.value() &&
                      t
                        ._filterSource({
                          value: t.ignoreCase
                            ? t.value().toLowerCase()
                            : t.value(),
                          operator: t.options.filter,
                          field: t.options.dataTextField,
                          ignoreCase: t.ignoreCase,
                        })
                        .done(function () {
                          t._allowOpening() &&
                            (t._resetFocusItem(), t.popup.open());
                        }),
                    n.preventDefault();
                else if (i === r.UP)
                  e && this._move(u ? "focusPrev" : "focusLast"),
                    n.preventDefault();
                else if (i === r.HOME) this._move("focusFirst");
                else if (i === r.END) this._move("focusLast");
                else if (i === r.ENTER || i === r.TAB) {
                  if ((i === r.ENTER && e && n.preventDefault(), e && u)) {
                    if (
                      ((o = f.dataItemByIndex(f.getElementIndex(u))),
                      t.trigger("select", { dataItem: o, item: u }))
                    )
                      return;
                    this._select(u);
                  }
                  this._blur();
                } else
                  i === r.ESC
                    ? (e ? n.preventDefault() : t._clearValue(), t.close())
                    : !t.popup.visible() || (i !== r.PAGEDOWN && i !== r.PAGEUP)
                    ? ((t.popup._hovered = !0), t._search())
                    : (n.preventDefault(),
                      (s = i === r.PAGEDOWN ? 1 : -1),
                      f.scrollWith(s * f.screenHeight()));
              },
              _keypress: function () {
                this._oldText = this.element.val();
                this._typing = !0;
              },
              _move: function (n) {
                this.listView[n]();
                this.options.suggest && this.suggest(this.listView.focus());
              },
              _hideBusy: function () {
                var n = this;
                clearTimeout(n._busy);
                n._loading.hide();
                n.element.attr("aria-busy", !1);
                n._busy = null;
                n._showClear();
              },
              _showBusy: function () {
                var n = this;
                n._busy ||
                  (n._busy = setTimeout(function () {
                    n.element.attr("aria-busy", !0);
                    n._loading.show();
                    n._hideClear();
                  }, 100));
              },
              _placeholder: function (n) {
                if (!v) {
                  var i,
                    f = this,
                    u = f.element,
                    r = f.options.placeholder;
                  if (r) {
                    if (
                      ((i = u.val()),
                      n === t && (n = !i),
                      n || (r = i !== r ? i : ""),
                      i === f._old && !n)
                    )
                      return;
                    u.toggleClass("k-readonly", n).val(r);
                    r || u[0] !== document.activeElement || o(u[0], 0, 0);
                  }
                }
              },
              _separator: function () {
                var n = this.options.separator;
                return n instanceof Array ? RegExp(n.join("|"), "gi") : n;
              },
              _defaultSeparator: function () {
                var n = this.options.separator;
                return n instanceof Array ? n[0] : n;
              },
              _inputValue: function () {
                return this.element.val();
              },
              _search: function () {
                var n = this;
                clearTimeout(n._typingTimeout);
                n._typingTimeout = setTimeout(function () {
                  n._prev !== n._accessor() &&
                    ((n._prev = n._accessor()), n.search());
                }, n.options.delay);
              },
              _select: function (n) {
                var t = this;
                return (
                  (t._active = !0),
                  t.listView.select(n).done(function () {
                    t._active = !1;
                  })
                );
              },
              _loader: function () {
                this._loading = n(
                  '<span class="k-icon k-i-loading" style="display:none"></span>'
                ).insertAfter(this.element);
              },
              _clearButton: function () {
                u.fn._clearButton.call(this);
                this.options.clearButton &&
                  (this._clear.insertAfter(this.element),
                  this.wrapper.addClass("k-autocomplete-clearable"));
              },
              _toggleHover: function (t) {
                n(t.currentTarget).toggleClass(ft, "mouseenter" === t.type);
              },
              _toggleCloseVisibility: function () {
                this.value() ? this._showClear() : this._hideClear();
              },
              _wrapper: function () {
                var t,
                  i = this,
                  r = i.element,
                  u = r[0];
                t = r.parent();
                t.is("span.k-widget") || (t = r.wrap("<span />").parent());
                t.attr("tabindex", -1);
                t.attr("role", "presentation");
                t[0].style.cssText = u.style.cssText;
                r.css({ width: "", height: u.style.height });
                i._focused = i.element;
                i.wrapper = t
                  .addClass("k-widget k-autocomplete")
                  .addClass(u.className);
                i._inputWrapper = n(t[0]);
              },
              _clearValue: function () {
                u.fn._clearValue.call(this);
                this.element.focus();
              },
            });
          y.plugin(ot);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dropdownlist.min",
      ["kendo.list.min", "kendo.mobile.scroller.min", "kendo.virtuallist.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function d(n, t, i) {
            for (var r, u = 0, f = t.length - 1; u < f; ++u)
              (r = t[u]), r in n || (n[r] = {}), (n = n[r]);
            n[t[f]] = i;
          }
          function g(n, t) {
            return n >= t && (n -= t), n;
          }
          function ut(n, t) {
            for (var i = 0; i < n.length; i++) if (n.charAt(i) !== t) return !1;
            return !0;
          }
          var r = window.kendo,
            c = r.ui,
            ft = c.List,
            e = c.Select,
            o = r.support,
            l = r._activeElement,
            a = r.data.ObservableObject,
            f = r.keys,
            i = ".kendoDropDownList",
            s = i + "FocusEvent",
            nt = "disabled",
            tt = "readonly",
            v = "change",
            it = "k-state-focused",
            y = "k-state-default",
            p = "k-state-disabled",
            rt = "aria-disabled",
            et = "click" + i + " touchend" + i,
            w = "mouseenter" + i + " mouseleave" + i,
            h = "tabindex",
            b = "filter",
            k = "accept",
            ot =
              "The `optionLabel` option is not valid due to missing fields. Define a custom optionLabel as shown here http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#configuration-optionLabel",
            u = n.proxy,
            st = e.extend({
              init: function (f, o) {
                var l,
                  c,
                  a,
                  s = this,
                  v = o && o.index;
                s.ns = i;
                o = n.isArray(o) ? { dataSource: o } : o;
                e.fn.init.call(s, f, o);
                o = s.options;
                f = s.element.on("focus" + i, u(s._focusHandler, s));
                s._focusInputHandler = n.proxy(s._focusInput, s);
                s.optionLabel = n();
                s._optionLabel();
                s._inputTemplate();
                s._reset();
                s._prev = "";
                s._word = "";
                s._wrapper();
                s._tabindex();
                s.wrapper.data(h, s.wrapper.attr(h));
                s._span();
                s._popup();
                s._mobile();
                s._dataSource();
                s._ignoreCase();
                s._filterHeader();
                s._aria();
                s.wrapper.attr("aria-live", "polite");
                s._enable();
                s._attachFocusHandlers();
                s._oldIndex = s.selectedIndex = -1;
                v !== t && (o.index = v);
                s._initialIndex = o.index;
                s.requireValueMapper(s.options);
                s._initList();
                s._cascade();
                s.one("set", function (n) {
                  !n.sender.listView.bound() &&
                    s.hasOptionLabel() &&
                    s._textAccessor(s._optionLabelText());
                });
                o.autoBind
                  ? s.dataSource.fetch()
                  : s.selectedIndex === -1 &&
                    ((c = o.text || ""),
                    c ||
                      ((l = o.optionLabel),
                      l && 0 === o.index
                        ? (c = l)
                        : s._isSelect && (c = f.children(":selected").text())),
                    s._textAccessor(c));
                a = n(s.element).parents("fieldset").is(":disabled");
                a && s.enable(!1);
                s.listView.bind("click", function (n) {
                  n.preventDefault();
                });
                r.notify(s);
              },
              options: {
                name: "DropDownList",
                enabled: !0,
                autoBind: !0,
                index: 0,
                text: null,
                value: null,
                delay: 500,
                height: 200,
                dataTextField: "",
                dataValueField: "",
                optionLabel: "",
                cascadeFrom: "",
                cascadeFromField: "",
                cascadeFromParentField: "",
                ignoreCase: !0,
                animation: {},
                filter: "none",
                minLength: 1,
                enforceMinLength: !1,
                virtual: !1,
                template: null,
                valueTemplate: null,
                optionLabelTemplate: null,
                groupTemplate: "#:data#",
                fixedGroupTemplate: "#:data#",
                autoWidth: !1,
                popup: null,
              },
              events: [
                "open",
                "close",
                v,
                "select",
                "filtering",
                "dataBinding",
                "dataBound",
                "cascade",
                "set",
              ],
              setOptions: function (n) {
                e.fn.setOptions.call(this, n);
                this.listView.setOptions(this._listOptions(n));
                this._optionLabel();
                this._inputTemplate();
                this._accessors();
                this._filterHeader();
                this._enable();
                this._aria();
                !this.value() && this.hasOptionLabel() && this.select(0);
              },
              destroy: function () {
                var n = this;
                e.fn.destroy.call(n);
                n.wrapper.off(i);
                n.wrapper.off(s);
                n.element.off(i);
                n._inputWrapper.off(i);
                n._arrow.off();
                n._arrow = null;
                n._arrowIcon = null;
                n.optionLabel.off();
                n.filterInput && n.filterInput.off(s);
              },
              open: function () {
                var n = this,
                  t =
                    !!n.dataSource.filter() &&
                    n.dataSource.filter().filters.length > 0;
                n.popup.visible() ||
                  (n.listView.bound() && n._state !== k
                    ? n._allowOpening() &&
                      ((n._focusFilter = !0),
                      n.popup.one("activate", n._focusInputHandler),
                      (n.popup._hovered = !0),
                      n.popup.open(),
                      n._resizeFilterInput(),
                      n._focusItem())
                    : ((n._open = !0),
                      (n._state = "rebind"),
                      n.filterInput && (n.filterInput.val(""), (n._prev = "")),
                      n.filterInput && 1 !== n.options.minLength && !t
                        ? (n.refresh(),
                          n.popup.one("activate", n._focusInputHandler),
                          n.popup.open(),
                          n._resizeFilterInput())
                        : n._filterSource()));
              },
              _focusInput: function () {
                this._focusElement(this.filterInput);
              },
              _resizeFilterInput: function () {
                var t,
                  i,
                  n = this.filterInput,
                  u = this._prevent;
                n &&
                  ((t = this.filterInput[0] === l()),
                  (i = r.caret(this.filterInput[0])[0]),
                  (this._prevent = !0),
                  n
                    .css("display", "none")
                    .css("width", this.popup.element.css("width"))
                    .css("display", "inline-block"),
                  t && (n.focus(), r.caret(n[0], i)),
                  (this._prevent = u));
              },
              _allowOpening: function () {
                return (
                  this.hasOptionLabel() ||
                  this.filterInput ||
                  e.fn._allowOpening.call(this)
                );
              },
              toggle: function (n) {
                this._toggle(n, !0);
              },
              current: function (n) {
                var i;
                return n === t
                  ? ((i = this.listView.focus()),
                    !i && 0 === this.selectedIndex && this.hasOptionLabel()
                      ? this.optionLabel
                      : i)
                  : (this._focus(n), t);
              },
              dataItem: function (i) {
                var r = this,
                  u = null;
                if (null === i) return i;
                if (i === t) u = r.listView.selectedDataItems()[0];
                else {
                  if ("number" != typeof i) {
                    if (r.options.virtual)
                      return r.dataSource.getByUid(n(i).data("uid"));
                    i = i.hasClass("k-list-optionlabel")
                      ? -1
                      : n(r.items()).index(i);
                  } else r.hasOptionLabel() && (i -= 1);
                  u = r.dataSource.flatView()[i];
                }
                return u || (u = r._optionLabelDataItem()), u;
              },
              refresh: function () {
                this.listView.refresh();
              },
              text: function (n) {
                var r,
                  i = this,
                  u = i.options.ignoreCase;
                return (
                  (n = null === n ? "" : n),
                  n === t
                    ? i._textAccessor()
                    : "string" != typeof n
                    ? (i._textAccessor(n), t)
                    : ((r = u ? n.toLowerCase() : n),
                      i
                        ._select(function (n) {
                          return (
                            (n = i._text(n)),
                            u && (n = (n + "").toLowerCase()),
                            n === r
                          );
                        })
                        .done(function () {
                          i._textAccessor(i.dataItem() || n);
                        }),
                      t)
                );
              },
              _clearFilter: function () {
                n(this.filterInput).val("");
                e.fn._clearFilter.call(this);
              },
              value: function (n) {
                var i = this,
                  r = i.listView,
                  f = i.dataSource;
                return n === t
                  ? ((n = i._accessor() || i.listView.value()[0]),
                    n === t || null === n ? "" : n)
                  : (i.requireValueMapper(i.options, n),
                    (!n && i.hasOptionLabel()) || (i._initialIndex = null),
                    this.trigger("set", { value: n }),
                    i._request && i.options.cascadeFrom && i.listView.bound()
                      ? (i._valueSetter && f.unbind(v, i._valueSetter),
                        (i._valueSetter = u(function () {
                          i.value(n);
                        }, i)),
                        f.one(v, i._valueSetter),
                        t)
                      : (i._isFilterEnabled() && r.bound() && r.isFiltered()
                          ? i._clearFilter()
                          : i._fetchData(),
                        r.value(n).done(function () {
                          i._old = i._valueBeforeCascade = i._accessor();
                          i._oldIndex = i.selectedIndex;
                        }),
                        t));
              },
              hasOptionLabel: function () {
                return this.optionLabel && !!this.optionLabel[0];
              },
              _optionLabel: function () {
                var i = this,
                  e = i.options,
                  o = e.optionLabel,
                  f = e.optionLabelTemplate;
                return o
                  ? (f ||
                      ((f = "#:"),
                      (f +=
                        "string" == typeof o
                          ? "data"
                          : r.expr(e.dataTextField, "data")),
                      (f += "#")),
                    "function" != typeof f && (f = r.template(f)),
                    (i.optionLabelTemplate = f),
                    i.hasOptionLabel() ||
                      (i.optionLabel = n(
                        '<div class="k-list-optionlabel"></div>'
                      ).prependTo(i.list)),
                    i.optionLabel
                      .html(f(o))
                      .off()
                      .on(et, u(i._click, i))
                      .on(w, i._toggleHover),
                    i.angular("compile", function () {
                      return {
                        elements: i.optionLabel,
                        data: [{ dataItem: i._optionLabelDataItem() }],
                      };
                    }),
                    t)
                  : (i.optionLabel.off().remove(), (i.optionLabel = n()), t);
              },
              _optionLabelText: function () {
                var n = this.options.optionLabel;
                return "string" == typeof n ? n : this._text(n);
              },
              _optionLabelDataItem: function () {
                var i = this,
                  r = i.options.optionLabel;
                return i.hasOptionLabel()
                  ? n.isPlainObject(r)
                    ? new a(r)
                    : i._assignInstance(i._optionLabelText(), "")
                  : t;
              },
              _buildOptions: function (n) {
                var r,
                  u,
                  f,
                  i = this;
                i._isSelect &&
                  ((r = i.listView.value()[0]),
                  (u = i._optionLabelDataItem()),
                  (f = u && i._value(u)),
                  (r !== t && null !== r) || (r = ""),
                  u &&
                    ((f !== t && null !== f) || (f = ""),
                    (u =
                      '<option value="' + f + '">' + i._text(u) + "</option>")),
                  i._options(n, u, r),
                  r !== ft.unifyType(i._accessor(), typeof r) &&
                    ((i._customOption = null), i._custom(r)));
              },
              _listBound: function () {
                var t,
                  n = this,
                  i = n._initialIndex,
                  u = n._state === b,
                  r = n.dataSource.flatView();
                n._presetValue = !1;
                n._renderFooter();
                n._renderNoData();
                n._toggleNoData(!r.length);
                n._resizePopup(!0);
                n.popup.position();
                n._buildOptions(r);
                n._makeUnselectable();
                u ||
                  (n._open && n.toggle(n._allowOpening()),
                  (n._open = !1),
                  n._fetch ||
                    (r.length
                      ? (!n.listView.value().length &&
                          i > -1 &&
                          null !== i &&
                          n.select(i),
                        (n._initialIndex = null),
                        (t = n.listView.selectedDataItems()[0]),
                        t && n.text() !== n._text(t) && n._selectValue(t))
                      : n._textAccessor() !== n._optionLabelText() &&
                        (n.listView.value(""),
                        n._selectValue(null),
                        (n._oldIndex = n.selectedIndex))));
                n._hideBusy();
                n.trigger("dataBound");
              },
              _listChange: function () {
                this._selectValue(this.listView.selectedDataItems()[0]);
                (this._presetValue || (this._old && this._oldIndex === -1)) &&
                  (this._oldIndex = this.selectedIndex);
              },
              _filterPaste: function () {
                this._search();
              },
              _attachFocusHandlers: function () {
                var n = this,
                  t = n.wrapper;
                t.on("focusin" + s, u(n._focusinHandler, n)).on(
                  "focusout" + s,
                  u(n._focusoutHandler, n)
                );
                n.filterInput &&
                  n.filterInput
                    .on("focusin" + s, u(n._focusinHandler, n))
                    .on("focusout" + s, u(n._focusoutHandler, n));
              },
              _focusHandler: function () {
                this.wrapper.focus();
              },
              _focusinHandler: function () {
                this._inputWrapper.addClass(it);
                this._prevent = !1;
              },
              _focusoutHandler: function () {
                var n = this,
                  t = window.self !== window.top;
                n._prevent ||
                  (clearTimeout(n._typingTimeout),
                  o.mobileOS.ios && t ? n._change() : n._blur(),
                  n._inputWrapper.removeClass(it),
                  (n._prevent = !0),
                  (n._open = !1),
                  n.element.blur());
              },
              _wrapperMousedown: function () {
                this._prevent = !!this.filterInput;
              },
              _wrapperClick: function (n) {
                n.preventDefault();
                this.popup.unbind("activate", this._focusInputHandler);
                this._focused = this.wrapper;
                this._prevent = !1;
                this._toggle();
              },
              _editable: function (n) {
                var t = this,
                  s = t.element,
                  e = n.disable,
                  c = n.readonly,
                  f = t.wrapper.add(t.filterInput).off(i),
                  o = t._inputWrapper.off(w);
                c || e
                  ? e
                    ? (f.removeAttr(h), o.addClass(p).removeClass(y))
                    : o.addClass(y).removeClass(p)
                  : (s.removeAttr(nt).removeAttr(tt),
                    o.addClass(y).removeClass(p).on(w, t._toggleHover),
                    f
                      .attr(h, f.data(h))
                      .attr(rt, !1)
                      .on("keydown" + i, u(t._keydown, t))
                      .on(r.support.mousedown + i, u(t._wrapperMousedown, t))
                      .on("paste" + i, u(t._filterPaste, t)),
                    t.wrapper.on("click" + i, u(t._wrapperClick, t)),
                    t.filterInput
                      ? f.on("input" + i, u(t._search, t))
                      : f.on("keypress" + i, u(t._keypress, t)));
                s.attr(nt, e).attr(tt, c);
                f.attr(rt, e);
              },
              _keydown: function (n) {
                var o,
                  u,
                  s,
                  i = this,
                  r = n.keyCode,
                  h = n.altKey,
                  e = i.popup.visible();
                if (
                  (i.filterInput && (o = i.filterInput[0] === l()),
                  r === f.LEFT
                    ? ((r = f.UP), (u = !0))
                    : r === f.RIGHT && ((r = f.DOWN), (u = !0)),
                  !u || !o)
                ) {
                  if (
                    ((n.keyCode = r),
                    ((h && r === f.UP) || r === f.ESC) &&
                      i._focusElement(i.wrapper),
                    i._state === b &&
                      r === f.ESC &&
                      (i._clearFilter(), (i._open = !1), (i._state = k)),
                    r === f.ENTER && i._typingTimeout && i.filterInput && e)
                  )
                    return n.preventDefault(), t;
                  if (
                    (r !== f.SPACEBAR ||
                      o ||
                      (i.toggle(!e), n.preventDefault()),
                    (u = i._move(n)),
                    !u)
                  ) {
                    if (
                      (!e || !i.filterInput) &&
                      ((s = i._focus()),
                      r === f.HOME
                        ? ((u = !0), i._firstItem())
                        : r === f.END && ((u = !0), i._lastItem()),
                      u)
                    ) {
                      if (
                        i.trigger("select", {
                          dataItem: i._getElementDataItem(i._focus()),
                          item: i._focus(),
                        })
                      )
                        return i._focus(s), t;
                      i._select(i._focus(), !0).done(function () {
                        e || i._blur();
                      });
                      n.preventDefault();
                    }
                    h || u || !i.filterInput || i._search();
                  }
                }
              },
              _matchText: function (n, i) {
                var r = this.options.ignoreCase;
                return (
                  n !== t &&
                  null !== n &&
                  ((n += ""), r && (n = n.toLowerCase()), 0 === n.indexOf(i))
                );
              },
              _shuffleData: function (n, t) {
                var i = this._optionLabelDataItem();
                return (
                  i && (n = [i].concat(n)), n.slice(t).concat(n.slice(0, t))
                );
              },
              _selectNext: function () {
                var e,
                  f,
                  r,
                  n = this,
                  t = n.dataSource.flatView(),
                  u = t.length + (n.hasOptionLabel() ? 1 : 0),
                  o = ut(n._word, n._last),
                  i = n.selectedIndex;
                for (
                  i === -1 ? (i = 0) : ((i += o ? 1 : 0), (i = g(i, u))),
                    t = t.toJSON ? t.toJSON() : t.slice(),
                    t = n._shuffleData(t, i),
                    r = 0;
                  r < u &&
                  ((f = n._text(t[r])), !o || !n._matchText(f, n._last)) &&
                  !n._matchText(f, n._word);
                  r++
                );
                r !== u &&
                  ((e = n._focus()),
                  n._select(g(i + r, u)).done(function () {
                    var t = function () {
                      n.popup.visible() || n._change();
                    };
                    n.trigger("select", {
                      dataItem: n._getElementDataItem(n._focus()),
                      item: n._focus(),
                    })
                      ? n._select(e).done(t)
                      : t();
                  }));
              },
              _keypress: function (n) {
                var t,
                  i = this;
                0 !== n.which &&
                  n.keyCode !== r.keys.ENTER &&
                  ((t = String.fromCharCode(n.charCode || n.keyCode)),
                  i.options.ignoreCase && (t = t.toLowerCase()),
                  " " === t && n.preventDefault(),
                  (i._word += t),
                  (i._last = t),
                  i._search());
              },
              _popupOpen: function () {
                var n = this.popup;
                n.wrapper = r.wrap(n.element);
                n.element.closest(".km-root")[0] &&
                  (n.wrapper.addClass("km-popup km-widget"),
                  this.wrapper.addClass("km-widget"));
              },
              _popup: function () {
                e.fn._popup.call(this);
                this.popup.one("open", u(this._popupOpen, this));
              },
              _getElementDataItem: function (n) {
                return n && n[0]
                  ? n[0] === this.optionLabel[0]
                    ? this._optionLabelDataItem()
                    : this.listView.dataItemByIndex(
                        this.listView.getElementIndex(n)
                      )
                  : null;
              },
              _click: function (i) {
                var r = this,
                  u = i.item || n(i.currentTarget);
                return (
                  i.preventDefault(),
                  r.trigger("select", {
                    dataItem: r._getElementDataItem(u),
                    item: u,
                  })
                    ? (r.close(), t)
                    : ((r._userTriggered = !0),
                      r._select(u).done(function () {
                        r._blur();
                        r._focusElement(r.wrapper);
                      }),
                      t)
                );
              },
              _focusElement: function (n) {
                var i = l(),
                  r = this.wrapper,
                  t = this.filterInput,
                  u = n === t ? r : t,
                  f = o.mobileOS && (o.touch || o.MSPointers || o.pointers);
                (t && t[0] === n[0] && f) ||
                  (t &&
                    (u[0] === i || this._focusFilter) &&
                    ((this._focusFilter = !1),
                    (this._prevent = !0),
                    (this._focused = n.focus())));
              },
              _searchByWord: function (n) {
                var t, i;
                n &&
                  ((t = this),
                  (i = t.options.ignoreCase),
                  i && (n = n.toLowerCase()),
                  t._select(function (i) {
                    return t._matchText(t._text(i), n);
                  }));
              },
              _inputValue: function () {
                return this.text();
              },
              _search: function () {
                var n = this,
                  i = n.dataSource;
                if ((clearTimeout(n._typingTimeout), n._isFilterEnabled()))
                  n._typingTimeout = setTimeout(function () {
                    var t = n.filterInput.val();
                    n._prev !== t &&
                      ((n._prev = t), n.search(t), n._resizeFilterInput());
                    n._typingTimeout = null;
                  }, n.options.delay);
                else {
                  if (
                    ((n._typingTimeout = setTimeout(function () {
                      n._word = "";
                    }, n.options.delay)),
                    !n.listView.bound())
                  )
                    return (
                      i.fetch().done(function () {
                        n._selectNext();
                      }),
                      t
                    );
                  n._selectNext();
                }
              },
              _get: function (t) {
                var r,
                  u,
                  i,
                  f = "function" == typeof t,
                  e = f ? n() : n(t);
                if (
                  (this.hasOptionLabel() &&
                    ("number" == typeof t
                      ? t > -1 && (t -= 1)
                      : e.hasClass("k-list-optionlabel") && (t = -1)),
                  f)
                ) {
                  for (r = this.dataSource.flatView(), i = 0; i < r.length; i++)
                    if (t(r[i])) {
                      t = i;
                      u = !0;
                      break;
                    }
                  u || (t = -1);
                }
                return t;
              },
              _firstItem: function () {
                this.hasOptionLabel()
                  ? this._focus(this.optionLabel)
                  : this.listView.focusFirst();
              },
              _lastItem: function () {
                this._resetOptionLabel();
                this.listView.focusLast();
              },
              _nextItem: function () {
                this.optionLabel.hasClass("k-state-focused")
                  ? (this._resetOptionLabel(), this.listView.focusFirst())
                  : this.listView.focusNext();
              },
              _prevItem: function () {
                this.optionLabel.hasClass("k-state-focused") ||
                  (this.listView.focusPrev(),
                  this.listView.focus() || this._focus(this.optionLabel));
              },
              _focusItem: function () {
                var i = this.options,
                  r = this.listView,
                  u = r.focus(),
                  n = r.select();
                n = n[n.length - 1];
                n === t && i.highlightFirst && !u && (n = 0);
                n !== t
                  ? r.focus(n)
                  : !i.optionLabel ||
                    (i.virtual && "dataItem" === i.virtual.mapValueTo)
                  ? r.scrollToIndex(0)
                  : (this._focus(this.optionLabel),
                    this._select(this.optionLabel),
                    this.listView.content.scrollTop(0));
              },
              _resetOptionLabel: function (n) {
                this.optionLabel
                  .removeClass("k-state-focused" + (n || ""))
                  .removeAttr("id");
              },
              _focus: function (n) {
                var i = this.listView,
                  r = this.optionLabel;
                return n === t
                  ? ((n = i.focus()),
                    !n && r.hasClass("k-state-focused") && (n = r),
                    n)
                  : (this._resetOptionLabel(),
                    (n = this._get(n)),
                    i.focus(n),
                    n === -1 &&
                      (r.addClass("k-state-focused").attr("id", i._optionID),
                      this._focused
                        .add(this.filterInput)
                        .removeAttr("aria-activedescendant")
                        .attr("aria-activedescendant", i._optionID)),
                    t);
              },
              _select: function (n, t) {
                var i = this;
                return (
                  (n = i._get(n)),
                  i.listView.select(n).done(function () {
                    t || i._state !== b || (i._state = k);
                    n === -1 && i._selectValue(null);
                  })
                );
              },
              _selectValue: function (n) {
                var i = this,
                  f = i.options.optionLabel,
                  r = i.listView.select(),
                  u = "",
                  e = "";
                r = r[r.length - 1];
                r === t && (r = -1);
                this._resetOptionLabel(" k-state-selected");
                n || 0 === n
                  ? ((e = n), (u = i._dataValue(n)), f && (r += 1))
                  : f &&
                    (i._focus(i.optionLabel.addClass("k-state-selected")),
                    (e = i._optionLabelText()),
                    (u = "string" == typeof f ? "" : i._value(f)),
                    (r = 0));
                i.selectedIndex = r;
                null === u && (u = "");
                i._textAccessor(e);
                i._accessor(u, r);
                i._triggerCascade();
              },
              _mobile: function () {
                var i = this,
                  t = i.popup,
                  n = o.mobileOS,
                  r = t.element.parents(".km-root").eq(0);
                r.length &&
                  n &&
                  (t.options.animation.open.effects =
                    n.android || n.meego
                      ? "fadeIn"
                      : n.ios || n.wp
                      ? "slideIn:up"
                      : t.options.animation.open.effects);
              },
              _filterHeader: function () {
                var t;
                this.filterInput &&
                  (this.filterInput.off(i).parent().remove(),
                  (this.filterInput = null));
                this._isFilterEnabled() &&
                  ((t = '<span class="k-icon k-i-zoom"></span>'),
                  (this.filterInput = n('<input class="k-textbox"/>').attr({
                    placeholder: this.element.attr("placeholder"),
                    title: this.element.attr("title"),
                    role: "listbox",
                    "aria-haspopup": !0,
                    "aria-expanded": !1,
                  })),
                  this.list.prepend(
                    n('<span class="k-list-filter" />').append(
                      this.filterInput.add(t)
                    )
                  ));
              },
              _span: function () {
                var r,
                  t = this,
                  i = t.wrapper,
                  u = "span.k-input";
                r = i.find(u);
                r[0] ||
                  (i
                    .append(
                      '<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input">&nbsp;</span><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>'
                    )
                    .append(t.element),
                  (r = i.find(u)));
                t.span = r;
                t._inputWrapper = n(i[0].firstChild);
                t._arrow = i.find(".k-select");
                t._arrowIcon = t._arrow.find(".k-icon");
              },
              _wrapper: function () {
                var n,
                  i = this,
                  t = i.element,
                  r = t[0];
                n = t.parent();
                n.is("span.k-widget") ||
                  ((n = t.wrap("<span />").parent()),
                  (n[0].style.cssText = r.style.cssText),
                  (n[0].title = r.title));
                i._focused = i.wrapper = n
                  .addClass("k-widget k-dropdown")
                  .addClass(r.className)
                  .css("display", "")
                  .attr({
                    accesskey: t.attr("accesskey"),
                    unselectable: "on",
                    role: "listbox",
                    "aria-haspopup": !0,
                    "aria-expanded": !1,
                  });
                t.hide().removeAttr("accesskey");
              },
              _clearSelection: function (n) {
                this.select(n.value() ? 0 : -1);
              },
              _inputTemplate: function () {
                var t = this,
                  i = t.options.valueTemplate;
                if (
                  ((i = i
                    ? r.template(i)
                    : n.proxy(
                        r.template("#:this._text(data)#", { useWithBlock: !1 }),
                        t
                      )),
                  (t.valueTemplate = i),
                  t.hasOptionLabel() && !t.options.optionLabelTemplate)
                )
                  try {
                    t.valueTemplate(t._optionLabelDataItem());
                  } catch (u) {
                    throw Error(ot);
                  }
              },
              _textAccessor: function (i) {
                var e,
                  r = null,
                  o = this.valueTemplate,
                  u = this._optionLabelText(),
                  f = this.span;
                if (i === t) return f.text();
                n.isPlainObject(i) || i instanceof a
                  ? (r = i)
                  : u && u === i && (r = this.options.optionLabel);
                r || (r = this._assignInstance(i, this._accessor()));
                this.hasOptionLabel() &&
                  ((r !== u && this._text(r) !== u) ||
                    ((o = this.optionLabelTemplate),
                    "string" != typeof this.options.optionLabel ||
                      this.options.optionLabelTemplate ||
                      (r = u)));
                e = function () {
                  return { elements: f.get(), data: [{ dataItem: r }] };
                };
                this.angular("cleanup", e);
                try {
                  f.html(o(r));
                } catch (s) {
                  f.html("");
                }
                this.angular("compile", e);
              },
              _preselect: function (n, t) {
                n || t || (t = this._optionLabelText());
                this._accessor(n);
                this._textAccessor(t);
                this._old = this._accessor();
                this._oldIndex = this.selectedIndex;
                this.listView.setValue(n);
                this._initialIndex = null;
                this._presetValue = !0;
              },
              _assignInstance: function (n, t) {
                var r = this.options.dataTextField,
                  i = {};
                return (
                  r
                    ? (d(i, r.split("."), n),
                      d(i, this.options.dataValueField.split("."), t),
                      (i = new a(i)))
                    : (i = n),
                  i
                );
              },
            });
          c.plugin(st);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.treeview.draganddrop.min",
      ["kendo.data.min", "kendo.draganddrop.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          var i = window.kendo,
            e = i.ui,
            u = n.proxy,
            o = n.extend,
            f = "visibility",
            r = "k-state-hover",
            s =
              "input,a:not(.k-in),textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-icon.k-i-arrow-60-right,span.k-icon.k-i-arrow-45-down-right";
          e.HierarchicalDragAndDrop = i.Class.extend({
            init: function (t, r) {
              this.element = t;
              this.hovered = t;
              this.options = o(
                {
                  dragstart: n.noop,
                  drag: n.noop,
                  drop: n.noop,
                  dragend: n.noop,
                },
                r
              );
              this._draggable = new e.Draggable(t, {
                ignore: s,
                filter: r.filter,
                autoScroll: r.autoScroll,
                cursorOffset: {
                  left: 10,
                  top: i.support.mobileOS ? -40 / i.support.zoomLevel() : 10,
                },
                hint: u(this._hint, this),
                dragstart: u(this.dragstart, this),
                dragcancel: u(this.dragcancel, this),
                drag: u(this.drag, this),
                dragend: u(this.dragend, this),
                $angular: r.$angular,
              });
            },
            _hint: function (n) {
              return (
                "<div class='k-header k-drag-clue'><span class='k-icon k-drag-status' />" +
                this.options.hintText(n) +
                "</div>"
              );
            },
            _removeTouchHover: function () {
              i.support.touch &&
                this.hovered &&
                (this.hovered.find("." + r).removeClass(r),
                (this.hovered = !1));
            },
            _hintStatus: function (i) {
              var r = this._draggable.hint.find(".k-drag-status")[0];
              return i
                ? ((r.className = "k-icon k-drag-status " + i), t)
                : n.trim(r.className.replace(/(p|k)-(icon|drag-status)/g, ""));
            },
            dragstart: function (t) {
              this.source = t.currentTarget.closest(this.options.itemSelector);
              this.options.dragstart(this.source) && t.preventDefault();
              this.dropHint = this.options.reorderable
                ? n("<div class='k-icon k-i-drag-and-drop' />")
                    .css(f, "hidden")
                    .appendTo(this.element)
                : n();
            },
            drag: function (t) {
              var e,
                v,
                p,
                c,
                w,
                o,
                y,
                s,
                l,
                b,
                u,
                a = this.options,
                k = this.source,
                h = (this.dropTarget = n(i.eventTarget(t))),
                d = h.closest(a.allowedContainers);
              d.length
                ? k[0] == h[0] || a.contains(k[0], h[0])
                  ? (u = "k-i-cancel")
                  : ((u = "k-i-insert-middle"),
                    (l = a.itemFromTarget(h)),
                    (e = l.item),
                    e.length
                      ? (this._removeTouchHover(),
                        (v = i._outerHeight(e)),
                        (c = l.content),
                        a.reorderable
                          ? ((w = v / (c.length > 0 ? 4 : 2)),
                            (p = i.getOffset(e).top),
                            (o = t.y.location < p + w),
                            (y = p + v - w < t.y.location),
                            (s = c.length && !o && !y))
                          : ((s = !0), (o = !1), (y = !1)),
                        (this.hovered = !!s && d),
                        this.dropHint.css(f, s ? "hidden" : "visible"),
                        this._lastHover &&
                          this._lastHover[0] != c[0] &&
                          this._lastHover.removeClass(r),
                        (this._lastHover = c.toggleClass(r, s)),
                        s
                          ? (u = "k-i-plus")
                          : ((b = e.position()),
                            (b.top += o ? 0 : v),
                            this.dropHint
                              .css(b)
                              [o ? "prependTo" : "appendTo"](
                                a.dropHintContainer(e)
                              ),
                            o && l.first && (u = "k-i-insert-up"),
                            y && l.last && (u = "k-i-insert-down")))
                      : h[0] != this.dropHint[0] &&
                        (this._lastHover && this._lastHover.removeClass(r),
                        (u = n.contains(this.element[0], d[0])
                          ? "k-i-cancel"
                          : "k-i-plus")))
                : ((u = "k-i-cancel"), this._removeTouchHover());
              this.options.drag({
                originalEvent: t.originalEvent,
                source: k,
                target: h,
                pageY: t.y.location,
                pageX: t.x.location,
                status: u.substring(2),
                setStatus: function (n) {
                  u = n;
                },
              });
              0 !== u.indexOf("k-i-insert") && this.dropHint.css(f, "hidden");
              this._hintStatus(u);
            },
            dragcancel: function () {
              this.dropHint.remove();
            },
            dragend: function (n) {
              var i,
                u,
                h,
                s = "over",
                c = this.source,
                e = this.dropHint,
                o = this.dropTarget;
              return (
                "visible" == e.css(f)
                  ? ((s = this.options.dropPositionFrom(e)),
                    (i = e.closest(this.options.itemSelector)))
                  : o &&
                    ((i = o.closest(this.options.itemSelector)),
                    i.length ||
                      (i = o.closest(this.options.allowedContainers))),
                (u = {
                  originalEvent: n.originalEvent,
                  source: c[0],
                  destination: i[0],
                  valid: "k-i-cancel" != this._hintStatus(),
                  setValid: function (n) {
                    this.valid = n;
                  },
                  dropTarget: o[0],
                  position: s,
                }),
                (h = this.options.drop(u)),
                e.remove(),
                this._removeTouchHover(),
                this._lastHover && this._lastHover.removeClass(r),
                !u.valid || h
                  ? ((this._draggable.dropped = u.valid), t)
                  : ((this._draggable.dropped = !0),
                    this.options.dragend({
                      originalEvent: n.originalEvent,
                      source: c,
                      destination: i,
                      position: s,
                    }),
                    t)
              );
            },
            destroy: function () {
              this._lastHover = this.hovered = null;
              this._draggable.destroy();
            },
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.treeview.min",
      ["kendo.data.min", "kendo.treeview.draganddrop.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function ht(n) {
            return function (t) {
              var i = t.children(".k-animation-container");
              return i.length || (i = t), i.children(n);
            };
          }
          function h(n) {
            return i.template(n, { useWithBlock: !1 });
          }
          function ut(n) {
            return n.find(".k-checkbox-wrapper:first input[type=checkbox]");
          }
          function ct(n) {
            return function (t, i) {
              i = i.closest(e);
              var u,
                r = i.parent();
              return (
                r.parent().is("li") && (u = r.parent()),
                this._dataSourceMove(t, r, u, function (t, r) {
                  var u = this.dataItem(i),
                    f = u ? u.parent().indexOf(u) : i.index();
                  return this._insert(t.data(), r, f + n);
                })
              );
            };
          }
          function fi(t, i) {
            for (var r; t && "ul" != t.nodeName.toLowerCase(); )
              (r = t),
                (t = t.nextSibling),
                3 == r.nodeType && (r.nodeValue = n.trim(r.nodeValue)),
                at.test(r.className)
                  ? i.insertBefore(r, i.firstChild)
                  : i.appendChild(r);
          }
          function nt(t) {
            var i = t.children("div"),
              u = t.children("ul"),
              f = i.children(".k-icon"),
              e = t.children("input[type=checkbox]"),
              r = i.children(".k-in");
            t.hasClass("k-treeview") ||
              (i.length || (i = n("<div />").prependTo(t)),
              !f.length && u.length
                ? (f = n("<span class='k-icon' />").prependTo(i))
                : (u.length && u.children().length) || (f.remove(), u.remove()),
              e.length &&
                n("<span class='k-checkbox-wrapper' />").appendTo(i).append(e),
              r.length ||
                ((r = t.children("a").eq(0).addClass("k-in k-link")),
                r.length || (r = n("<span class='k-in' />")),
                r.appendTo(i),
                i.length && fi(i[0].nextSibling, r[0])));
          }
          var lt,
            o,
            w,
            tt,
            at,
            i = window.kendo,
            a = i.ui,
            ei = i.data,
            v = n.extend,
            vt = i.template,
            b = n.isArray,
            ft = a.Widget,
            yt = ei.HierarchicalDataSource,
            u = n.proxy,
            s = i.keys,
            r = ".kendoTreeView",
            pt = ".kendoTreeViewTemp",
            et = "select",
            wt = "check",
            ot = "navigate",
            k = "change",
            bt = "error",
            f = "checked",
            c = "indeterminate",
            kt = "dragstart",
            dt = "drag",
            gt = "drop",
            ni = "dragend",
            ti = "dataBound",
            y = "click",
            l = "undefined",
            ii = "k-state-hover",
            d = "k-treeview",
            oi = ":visible",
            e = ".k-item",
            it = "string",
            rt = "aria-checked",
            st = "aria-selected",
            ri = "aria-disabled",
            p = "k-state-disabled",
            g = {
              text: "dataTextField",
              url: "dataUrlField",
              spriteCssClass: "dataSpriteCssClassField",
              imageUrl: "dataImageUrlField",
            },
            si = function (n) {
              return (
                n instanceof i.jQuery ||
                (window.jQuery && n instanceof window.jQuery)
              );
            },
            ui = function (n) {
              return "object" == typeof HTMLElement
                ? n instanceof HTMLElement
                : n &&
                    "object" == typeof n &&
                    1 === n.nodeType &&
                    typeof n.nodeName === it;
            };
          o = ht(".k-group");
          w = ht(".k-group,.k-content");
          tt = function (n) {
            return n.children("div").children(".k-icon");
          };
          at = /k-sprite/;
          lt = i.ui.DataBoundWidget.extend({
            init: function (n, t) {
              var u,
                r = this,
                f = !1,
                e = t && !!t.dataSource;
              b(t) && (t = { dataSource: t });
              t &&
                typeof t.loadOnDemand == l &&
                b(t.dataSource) &&
                (t.loadOnDemand = !1);
              ft.prototype.init.call(r, n, t);
              n = r.element;
              t = r.options;
              r._dataSourceUids = {};
              u = (n.is("ul") && n) || (n.hasClass(d) && n.children("ul"));
              f = !e && u.length;
              f && (t.dataSource.list = u);
              r._animation();
              r._accessors();
              r._templates();
              n.hasClass(d)
                ? ((r.wrapper = n), (r.root = n.children("ul").eq(0)))
                : (r._wrapper(), u && ((r.root = n), r._group(r.wrapper)));
              r._tabindex();
              r.wrapper.attr("role", "tree");
              r._dataSource(f);
              r._attachEvents();
              r._dragging();
              f
                ? r._syncHtmlAndDataSource()
                : t.autoBind && (r._progress(!0), r.dataSource.fetch());
              t.checkboxes &&
                t.checkboxes.checkChildren &&
                r.updateIndeterminate();
              r.element[0].id &&
                (r._ariaId = i.format("{0}_tv_active", r.element[0].id));
              i.notify(r);
            },
            _attachEvents: function () {
              var t = this,
                i = ".k-in:not(.k-state-selected,.k-state-disabled)",
                f = "mouseenter";
              t.wrapper
                .on(f + r, ".k-in.k-state-selected", function (n) {
                  n.preventDefault();
                })
                .on(f + r, i, function () {
                  n(this).addClass(ii);
                })
                .on("mouseleave" + r, i, function () {
                  n(this).removeClass(ii);
                })
                .on(y + r, i, u(t._click, t))
                .on(
                  "dblclick" + r,
                  ".k-in:not(.k-state-disabled)",
                  u(t._toggleButtonClick, t)
                )
                .on(
                  y + r,
                  ".k-i-expand,.k-i-collapse",
                  u(t._toggleButtonClick, t)
                )
                .on("keydown" + r, u(t._keydown, t))
                .on("keypress" + r, u(t._keypress, t))
                .on("focus" + r, u(t._focus, t))
                .on("blur" + r, u(t._blur, t))
                .on(
                  "mousedown" + r,
                  ".k-in,.k-checkbox-wrapper :checkbox,.k-i-expand,.k-i-collapse",
                  u(t._mousedown, t)
                )
                .on(
                  "change" + r,
                  ".k-checkbox-wrapper :checkbox",
                  u(t._checkboxChange, t)
                )
                .on("click" + r, ".checkbox-span", u(t._checkboxLabelClick, t))
                .on("click" + r, ".k-request-retry", u(t._retryRequest, t))
                .on("click" + r, ".k-link.k-state-disabled", function (n) {
                  n.preventDefault();
                })
                .on("click" + r, function (i) {
                  var r = n(i.target);
                  r.is(":kendoFocusable") ||
                    r
                      .find("input,select,textarea,button,object")
                      .is(":kendoFocusable") ||
                    t.focus();
                });
            },
            _checkboxLabelClick: function (t) {
              var i = n(t.target.previousSibling);
              i.is("[disabled]") ||
                (i.prop("checked", !i.prop("checked")), i.trigger("change"));
            },
            _syncHtmlAndDataSource: function (n, t) {
              n = n || this.root;
              t = t || this.dataSource;
              for (
                var r,
                  e,
                  o,
                  s,
                  c = t.view(),
                  l = i.attr("uid"),
                  a = i.attr("expanded"),
                  v = this.options.checkboxes,
                  h = n.children("li"),
                  u = 0;
                u < h.length;
                u++
              )
                (e = c[u]),
                  (o = e.uid),
                  (r = h.eq(u)),
                  r
                    .attr("role", "treeitem")
                    .attr(l, o)
                    .attr(st, r.hasClass("k-state-selected")),
                  (e.expanded = "true" === r.attr(a)),
                  v &&
                    ((s = ut(r)),
                    (e.checked = s.prop(f)),
                    s.attr("id", "_" + o),
                    s.next(".k-checkbox-label").attr("for", "_" + o)),
                  this._syncHtmlAndDataSource(r.children("ul"), e.children);
            },
            _animation: function () {
              var i = this.options,
                n = i.animation,
                r = n.collapse && "effects" in n.collapse,
                t = v({}, n.expand, n.collapse);
              r || (t = v(t, { reverse: !0 }));
              n === !1 &&
                (n = {
                  expand: { effects: {} },
                  collapse: { hide: !0, effects: {} },
                });
              n.collapse = v(t, { hide: !0 });
              i.animation = n;
            },
            _dragging: function () {
              var t,
                r = this.options.dragAndDrop,
                i = this.dragging;
              r && !i
                ? ((t = this),
                  (this.dragging = new a.HierarchicalDragAndDrop(this.element, {
                    reorderable: !0,
                    $angular: this.options.$angular,
                    autoScroll: this.options.autoScroll,
                    filter: "div:not(.k-state-disabled) .k-in",
                    allowedContainers: ".k-treeview",
                    itemSelector: ".k-treeview .k-item",
                    hintText: u(this._hintText, this),
                    contains: function (t, i) {
                      return n.contains(t, i);
                    },
                    dropHintContainer: function (n) {
                      return n;
                    },
                    itemFromTarget: function (n) {
                      var t = n.closest(".k-top,.k-mid,.k-bot");
                      return {
                        item: t,
                        content: n.closest(".k-in"),
                        first: t.hasClass("k-top"),
                        last: t.hasClass("k-bot"),
                      };
                    },
                    dropPositionFrom: function (n) {
                      return n.prevAll(".k-in").length > 0 ? "after" : "before";
                    },
                    dragstart: function (n) {
                      return t.trigger(kt, { sourceNode: n[0] });
                    },
                    drag: function (n) {
                      t.trigger(dt, {
                        originalEvent: n.originalEvent,
                        sourceNode: n.source[0],
                        dropTarget: n.target[0],
                        pageY: n.pageY,
                        pageX: n.pageX,
                        statusClass: n.status,
                        setStatusClass: n.setStatus,
                      });
                    },
                    drop: function (i) {
                      var u = n(i.dropTarget),
                        r = u.closest("a");
                      return (
                        r && r.attr("href") && t._tempPreventNavigation(r),
                        t.trigger(gt, {
                          originalEvent: i.originalEvent,
                          sourceNode: i.source,
                          destinationNode: i.destination,
                          valid: i.valid,
                          setValid: function (n) {
                            this.valid = n;
                            i.setValid(n);
                          },
                          dropTarget: i.dropTarget,
                          dropPosition: i.position,
                        })
                      );
                    },
                    dragend: function (n) {
                      function f(i) {
                        t.options.checkboxes &&
                          t.options.checkboxes.checkChildren &&
                          t.updateIndeterminate();
                        t.trigger(ni, {
                          originalEvent: n.originalEvent,
                          sourceNode: i && i[0],
                          destinationNode: r[0],
                          dropPosition: u,
                        });
                      }
                      var i = n.source,
                        r = n.destination,
                        u = n.position;
                      "over" == u
                        ? t.append(i, r, f)
                        : ("before" == u
                            ? (i = t.insertBefore(i, r))
                            : "after" == u && (i = t.insertAfter(i, r)),
                          f(i));
                    },
                  })))
                : !r && i && (i.destroy(), (this.dragging = null));
            },
            _tempPreventNavigation: function (n) {
              n.on(y + r + pt, function (t) {
                t.preventDefault();
                n.off(y + r + pt);
              });
            },
            _hintText: function (n) {
              return this.templates.dragClue({
                item: this.dataItem(n),
                treeview: this.options,
              });
            },
            _templates: function () {
              var t = this,
                n = t.options,
                r = u(t._fieldAccessor, t);
              n.template && typeof n.template == it
                ? (n.template = vt(n.template))
                : n.template ||
                  (n.template = h(
                    "# var text = " +
                      r("text") +
                      "(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #"
                  ));
              t._checkboxes();
              t.templates = {
                setAttributes: function (n) {
                  var t,
                    r = "",
                    i = n.attr || {};
                  for (t in i)
                    i.hasOwnProperty(t) &&
                      "class" !== t &&
                      (r += t + '="' + i[t] + '" ');
                  return r;
                },
                wrapperCssClass: function (n, t) {
                  var i = "k-item",
                    r = t.index;
                  return (
                    n.firstLevel && 0 === r && (i += " k-first"),
                    r == n.length - 1 && (i += " k-last"),
                    i
                  );
                },
                cssClass: function (n, t) {
                  var r = "",
                    i = t.index,
                    u = n.length - 1;
                  return (
                    n.firstLevel && 0 === i && (r += "k-top "),
                    r +
                      (0 === i && i != u ? "k-top" : i == u ? "k-bot" : "k-mid")
                  );
                },
                textClass: function (n, t) {
                  var i = "k-in";
                  return (
                    t && (i += " k-link"),
                    n.enabled === !1 && (i += " k-state-disabled"),
                    n.selected === !0 && (i += " k-state-selected"),
                    i
                  );
                },
                toggleButtonClass: function (n) {
                  return (
                    "k-icon" +
                    (n.expanded !== !0 ? " k-i-expand" : " k-i-collapse")
                  );
                },
                groupAttributes: function (n) {
                  var t = "";
                  return (
                    n.firstLevel || (t = "role='group'"),
                    t + (n.expanded !== !0 ? " style='display:none'" : "")
                  );
                },
                groupCssClass: function (n) {
                  var t = "k-group";
                  return n.firstLevel && (t += " k-treeview-lines"), t;
                },
                dragClue: h("#= data.treeview.template(data) #"),
                group: h(
                  "<ul class='#= data.r.groupCssClass(data.group) #'#= data.r.groupAttributes(data.group) #>#= data.renderItems(data) #</ul>"
                ),
                itemContent: h(
                  "# var imageUrl = " +
                    r("imageUrl") +
                    "(data.item); ## var spriteCssClass = " +
                    r("spriteCssClass") +
                    "(data.item); ## if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #'># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #' /># } ##= data.treeview.template(data) #"
                ),
                itemElement: h(
                  "# var item = data.item, r = data.r; ## var url = " +
                    r("url") +
                    "(item); #<div class='#= r.cssClass(data.group, item) #'># if (item.hasChildren) { #<span class='#= r.toggleButtonClass(item) #'/># } ## if (data.treeview.checkboxes) { #<span class='k-checkbox-wrapper' role='presentation'>#= data.treeview.checkboxes.template(data) #</span># } ## var tag = url ? 'a' : 'span'; ## var textAttr = url ? ' href=\\'' + url + '\\'' : ''; #<#=tag# class='#= r.textClass(item, !!url) #'#= textAttr #>#= r.itemContent(data) #</#=tag#></div>"
                ),
                item: h(
                  "# var item = data.item, r = data.r; #<li role='treeitem' class='#= r.wrapperCssClass(data.group, item) #'" +
                    i.attr("uid") +
                    '=\'#= item.uid #\' #= r.setAttributes(item.toJSON ? item.toJSON() : item) # # if (data.treeview.checkboxes) { #aria-checked=\'#= item.checked ? "true" : "false" #\' # } #aria-selected=\'#= item.selected ? "true" : "false" #\' #=item.enabled === false ? "aria-disabled=\'true\'" : \'\'#aria-expanded=\'#= item.expanded ? "true" : "false" #\' data-expanded=\'#= item.expanded ? "true" : "false" #\' >#= r.itemElement(data) #</li>'
                ),
                loading: h(
                  "<div class='k-icon k-i-loading' /> #: data.messages.loading #"
                ),
                retry: h(
                  "#: data.messages.requestFailed # <button class='k-button k-request-retry'>#: data.messages.retry #</button>"
                ),
              };
            },
            items: function () {
              return this.element.find(".k-item > div:first-child");
            },
            setDataSource: function (t) {
              var i = this.options;
              i.dataSource = t;
              this._dataSourceUids = {};
              this._dataSource();
              i.checkboxes &&
                i.checkboxes.checkChildren &&
                this.dataSource.one(
                  "change",
                  n.proxy(this.updateIndeterminate, this, null)
                );
              this.options.autoBind && this.dataSource.fetch();
            },
            _bindDataSource: function () {
              this._refreshHandler = u(this.refresh, this);
              this._errorHandler = u(this._error, this);
              this.dataSource.bind(k, this._refreshHandler);
              this.dataSource.bind(bt, this._errorHandler);
            },
            _unbindDataSource: function () {
              var n = this.dataSource;
              n &&
                (n.unbind(k, this._refreshHandler),
                n.unbind(bt, this._errorHandler));
            },
            _dataSource: function (n) {
              function r(n) {
                for (var t = 0; t < n.length; t++)
                  n[t]._initChildren(),
                    n[t].children.fetch(),
                    r(n[t].children.view());
              }
              var i = this,
                u = i.options,
                t = u.dataSource;
              t = b(t) ? { data: t } : t;
              i._unbindDataSource();
              t.fields ||
                (t.fields = [
                  { field: "text" },
                  { field: "url" },
                  { field: "spriteCssClass" },
                  { field: "imageUrl" },
                ]);
              i.dataSource = t = yt.create(t);
              n && (t.fetch(), r(t.view()));
              i._bindDataSource();
            },
            events: [kt, dt, gt, ni, ti, "expand", "collapse", et, k, ot, wt],
            options: {
              name: "TreeView",
              dataSource: {},
              animation: {
                expand: { effects: "expand:vertical", duration: 200 },
                collapse: { duration: 100 },
              },
              messages: {
                loading: "Loading...",
                requestFailed: "Request failed.",
                retry: "Retry",
              },
              dragAndDrop: !1,
              checkboxes: !1,
              autoBind: !0,
              autoScroll: !1,
              loadOnDemand: !0,
              template: "",
              dataTextField: null,
            },
            _accessors: function () {
              var t,
                n,
                r,
                u = this,
                f = u.options,
                e = u.element;
              for (t in g)
                (n = f[g[t]]),
                  (r = e.attr(i.attr(t + "-field"))),
                  !n && r && (n = r),
                  n || (n = t),
                  b(n) || (n = [n]),
                  (f[g[t]] = n);
            },
            _fieldAccessor: function (t) {
              var u = this.options[g[t]],
                f = u.length,
                r = "(function(item) {";
              return (
                0 === f
                  ? (r += "return item['" + t + "'];")
                  : ((r +=
                      "var levels = [" +
                      n
                        .map(u, function (n) {
                          return "function(d){ return " + i.expr(n) + "}";
                        })
                        .join(",") +
                      "];"),
                    (r +=
                      "return levels[Math.min(item.level(), " +
                      f +
                      "-1)](item)")),
                r + "})"
              );
            },
            setOptions: function (n) {
              ft.fn.setOptions.call(this, n);
              this._animation();
              this._dragging();
              this._templates();
            },
            _trigger: function (n, t) {
              return this.trigger(n, { node: t.closest(e)[0] });
            },
            _setChecked: function (t, i) {
              if (t && n.isFunction(t.view))
                for (var r = 0, u = t.view(); r < u.length; r++)
                  u[r].enabled !== !1 && this._setCheckedValue(u[r], i),
                    u[r].children && this._setChecked(u[r].children, i);
            },
            _setCheckedValue: function (n, t) {
              n[f] = t;
            },
            _setIndeterminate: function (n) {
              var t,
                u,
                i,
                e = o(n),
                r = !0;
              if (e.length && ((t = ut(e.children())), (u = t.length))) {
                if (u > 1) {
                  for (i = 1; i < u; i++)
                    if (
                      t[i].checked != t[i - 1].checked ||
                      t[i].indeterminate ||
                      t[i - 1].indeterminate
                    ) {
                      r = !1;
                      break;
                    }
                } else r = !t[0].indeterminate;
                return (
                  n.attr(rt, r ? t[0].checked : "mixed"),
                  ut(n)
                    .data(c, !r)
                    .prop(c, !r)
                    .prop(f, r && t[0].checked)
                );
              }
            },
            updateIndeterminate: function (n) {
              var t, i, u, r;
              if (((n = n || this.wrapper), (t = o(n).children()), t.length)) {
                for (i = 0; i < t.length; i++)
                  this.updateIndeterminate(t.eq(i));
                if (n.is(".k-treeview")) return;
                u = this._setIndeterminate(n);
                r = this.dataItem(n);
                u && u.prop(f) ? (r.checked = !0) : r && delete r.checked;
              }
            },
            _bubbleIndeterminate: function (n, t) {
              if (n.length) {
                t || this.updateIndeterminate(n);
                var r,
                  i = this.parent(n);
                i.length &&
                  (this._setIndeterminate(i),
                  (r = i
                    .children("div")
                    .find(".k-checkbox-wrapper input[type=checkbox]")),
                  (this._skip = !0),
                  r.prop(c) === !1
                    ? this.dataItem(i).set(f, r.prop(f))
                    : this.dataItem(i).set(f, !1),
                  (this._skip = !1),
                  this._bubbleIndeterminate(i, !0));
              }
            },
            _checkboxChange: function (t) {
              var u = n(t.target),
                i = u.prop(f),
                r = u.closest(e),
                o = this.dataItem(r);
              this._preventChange ||
                (o.checked != i &&
                  (o.set(f, i), r.attr(rt, i), this._trigger(wt, r)));
            },
            _toggleButtonClick: function (t) {
              var i = n(t.currentTarget).closest(e);
              i.is("[aria-disabled='true']") || this.toggle(i);
            },
            _mousedown: function (t) {
              var o = this,
                u = n(t.currentTarget),
                s = n(t.currentTarget).closest(e),
                h = i.support.browser;
              s.is("[aria-disabled='true']") ||
                ((h.msie || h.edge) &&
                  u.is(":checkbox") &&
                  (u.prop(c)
                    ? ((o._preventChange = !1),
                      u.prop(f, !u.prop(f)),
                      u.trigger(k),
                      u.on(y + r, function (n) {
                        n.preventDefault();
                      }),
                      (o._preventChange = !0))
                    : (u.off(y + r), (o._preventChange = !1))),
                (o._clickTarget = s),
                o.current(s));
            },
            _focusable: function (n) {
              return (
                n &&
                n.length &&
                n.is(":visible") &&
                !n.find(".k-in:first").hasClass(p)
              );
            },
            _focus: function () {
              var t = this.select(),
                r = this._clickTarget;
              i.support.touch ||
                (r && r.length && (t = r),
                this._focusable(t) || (t = this.current()),
                this._focusable(t) || (t = this._nextVisible(n())),
                this.current(t));
            },
            focus: function () {
              var t,
                u = this.wrapper,
                n = u[0],
                r = [],
                f = [],
                e = document.documentElement;
              do
                (n = n.parentNode),
                  n.scrollHeight > n.clientHeight &&
                    (r.push(n), f.push(n.scrollTop));
              while (n != e);
              for (i.focusElement(u), t = 0; t < r.length; t++)
                r[t].scrollTop = f[t];
            },
            _blur: function () {
              this.current().find(".k-in:first").removeClass("k-state-focused");
            },
            _enabled: function (n) {
              return !n.children("div").children(".k-in").hasClass(p);
            },
            parent: function (t) {
              var i,
                r,
                u = /\bk-item\b/;
              typeof t == it && (t = this.element.find(t));
              ui(t) || (t = t[0]);
              r = u.test(t.className);
              do
                (t = t.parentNode),
                  u.test(t.className) && (r ? (i = t) : (r = !0));
              while (!/\bk-treeview\b/.test(t.className) && !i);
              return n(i);
            },
            _nextVisible: function (n) {
              function r(n) {
                for (; n.length && !n.next().length; ) n = i.parent(n);
                return n.next().length ? n.next() : n;
              }
              var t,
                i = this,
                u = i._expanded(n);
              return (
                n.length && n.is(":visible")
                  ? u
                    ? ((t = o(n).children().first()), t.length || (t = r(n)))
                    : (t = r(n))
                  : (t = i.root.children().eq(0)),
                t
              );
            },
            _previousVisible: function (n) {
              var i,
                t,
                r = this;
              if (!n.length || n.prev().length)
                for (
                  t = n.length ? n.prev() : r.root.children().last();
                  r._expanded(t) && ((i = o(t).children().last()), i.length);

                )
                  t = i;
              else t = r.parent(n) || n;
              return t;
            },
            _keydown: function (r) {
              var o,
                u = this,
                h = r.keyCode,
                e = u.current(),
                v = u._expanded(e),
                l = e.find(".k-checkbox-wrapper:first :checkbox"),
                a = i.support.isRtl(u.element);
              r.target == r.currentTarget &&
                ((!a && h == s.RIGHT) || (a && h == s.LEFT)
                  ? v
                    ? (o = u._nextVisible(e))
                    : e.find(".k-in:first").hasClass(p) || u.expand(e)
                  : (!a && h == s.LEFT) || (a && h == s.RIGHT)
                  ? v && !e.find(".k-in:first").hasClass(p)
                    ? u.collapse(e)
                    : ((o = u.parent(e)), u._enabled(o) || (o = t))
                  : h == s.DOWN
                  ? (o = u._nextVisible(e))
                  : h == s.UP
                  ? (o = u._previousVisible(e))
                  : h == s.HOME
                  ? (o = u._nextVisible(n()))
                  : h == s.END
                  ? (o = u._previousVisible(n()))
                  : h != s.ENTER || e.find(".k-in:first").hasClass(p)
                  ? h == s.SPACEBAR &&
                    l.length &&
                    (e.find(".k-in:first").hasClass(p) ||
                      (l.prop(f, !l.prop(f)).data(c, !1).prop(c, !1),
                      u._checkboxChange({ target: l })),
                    (o = e))
                  : e.find(".k-in:first").hasClass("k-state-selected") ||
                    u._trigger(et, e) ||
                    u.select(e),
                o &&
                  (r.preventDefault(),
                  e[0] != o[0] && (u._trigger(ot, o), u.current(o))));
            },
            _keypress: function (n) {
              var i,
                t = this,
                r = t.current().get(0),
                u = n.key,
                f = 1 === u.length;
              f &&
                (t._match || (t._match = ""),
                (t._match += u),
                clearTimeout(t._matchTimer),
                (t._matchTimer = setTimeout(function () {
                  t._match = "";
                }, 300)),
                (i =
                  r &&
                  t._matchNextByText(
                    Array.prototype.indexOf.call(t.element.find(".k-item"), r),
                    t._match
                  )),
                i.length || (i = t._matchNextByText(-1, t._match)),
                i.get(0) &&
                  i.get(0) !== r &&
                  (t._trigger(ot, i), t.current(i)));
            },
            _matchNextByText: function (t, i) {
              var r = this.element,
                u = r.find(".k-in").filter(function (r, u) {
                  return (
                    r > t &&
                    n(u).is(":visible") &&
                    0 === n(u).text().toLowerCase().indexOf(i)
                  );
                });
              return u.eq(0).closest(e);
            },
            _click: function (t) {
              var u,
                f = this,
                i = n(t.currentTarget),
                o = w(i.closest(e)),
                r = i.attr("href");
              u = r
                ? "#" == r || r.indexOf("#" + this.element.id + "-") >= 0
                : o.length && !o.children().length;
              u && t.preventDefault();
              i.hasClass(".k-state-selected") ||
                f._trigger(et, i) ||
                f.select(i);
            },
            _wrapper: function () {
              var n,
                i,
                r = this,
                t = r.element;
              t.is("ul")
                ? ((n = t.wrap("<div />").parent()), (i = t))
                : ((n = t), (i = n.children("ul").eq(0)));
              r.wrapper = n.addClass("k-widget k-treeview");
              r.root = i;
            },
            _getSelectedNode: function () {
              return this.element.find(".k-state-selected").closest(e);
            },
            _group: function (n) {
              var t = this,
                r = n.hasClass(d),
                i = { firstLevel: r, expanded: r || t._expanded(n) },
                u = n.children("ul");
              u.addClass(t.templates.groupCssClass(i)).css(
                "display",
                i.expanded ? "" : "none"
              );
              t._nodes(u, i);
            },
            _nodes: function (t, i) {
              var u,
                r = this,
                f = t.children("li");
              i = v({ length: f.length }, i);
              f.each(function (t, f) {
                f = n(f);
                u = { index: t, expanded: r._expanded(f) };
                nt(f);
                r._updateNodeClasses(f, i, u);
                r._group(f);
              });
            },
            _checkboxes: function () {
              var t,
                i = this.options,
                n = i.checkboxes;
              n &&
                ((t =
                  "<input type='checkbox' tabindex='-1' #= (item.enabled === false) ? 'disabled' : '' # #= item.checked ? 'checked' : '' #"),
                n.name && (t += " name='" + n.name + "'"),
                (t +=
                  " id='_#= item.uid #' class='k-checkbox' /><span class='k-checkbox-label checkbox-span'></span>"),
                (n = v({ template: t }, i.checkboxes)),
                typeof n.template == it && (n.template = vt(n.template)),
                (i.checkboxes = n));
            },
            _updateNodeClasses: function (n, t, i) {
              var r,
                e,
                u = n.children("div"),
                o = n.children("ul"),
                f = this.templates;
              n.hasClass("k-treeview") ||
                ((i = i || {}),
                (i.expanded =
                  typeof i.expanded != l ? i.expanded : this._expanded(n)),
                (i.index = typeof i.index != l ? i.index : n.index()),
                (i.enabled =
                  typeof i.enabled != l
                    ? i.enabled
                    : !u.children(".k-in").hasClass("k-state-disabled")),
                (t = t || {}),
                (t.firstLevel =
                  typeof t.firstLevel != l
                    ? t.firstLevel
                    : n.parent().parent().hasClass(d)),
                (t.length =
                  typeof t.length != l
                    ? t.length
                    : n.parent().children().length),
                n
                  .removeClass("k-first k-last")
                  .addClass(f.wrapperCssClass(t, i)),
                u.removeClass("k-top k-mid k-bot").addClass(f.cssClass(t, i)),
                (r = u.children(".k-in")),
                (e = r[0] && "a" == r[0].nodeName.toLowerCase()),
                r
                  .removeClass("k-in k-link k-state-default k-state-disabled")
                  .addClass(f.textClass(i, e)),
                (o.length || "true" == n.attr("data-hasChildren")) &&
                  (u
                    .children(".k-icon")
                    .removeClass("k-i-expand k-i-collapse")
                    .addClass(f.toggleButtonClass(i)),
                  o.addClass("k-group")));
            },
            _processNodes: function (t, i) {
              for (
                var u = this, f = u.element.find(t), r = 0;
                r < f.length;
                r++
              )
                i.call(u, r, n(f[r]).closest(e));
            },
            dataItem: function (t) {
              var u = n(t).closest(e).attr(i.attr("uid")),
                r = this.dataSource;
              return r && r.getByUid(u);
            },
            _dataItem: function (t) {
              var r = n(t).closest(e).attr(i.attr("uid")),
                u = this.dataSource;
              return u && this._dataSourceUids[r];
            },
            _insertNode: function (t, r, u, f, e) {
              for (
                var v,
                  h,
                  c,
                  y,
                  p,
                  l = this,
                  a = o(u),
                  k = a.children().length + 1,
                  w = { firstLevel: u.hasClass(d), expanded: !e, length: k },
                  b = "",
                  g = function (n, t) {
                    n.appendTo(t);
                  },
                  s = 0;
                s < t.length;
                s++
              )
                (c = t[s]),
                  (c.index = r + s),
                  (b += l._renderItem({ group: w, item: c }));
              if (((h = n(b)), h.length)) {
                for (
                  l.angular("compile", function () {
                    return {
                      elements: h.get(),
                      data: t.map(function (n) {
                        return { dataItem: n };
                      }),
                    };
                  }),
                    a.length ||
                      (a = n(l._renderGroup({ group: w })).appendTo(u)),
                    f(h, a),
                    u.hasClass("k-item") &&
                      (nt(u), l._updateNodeClasses(u, w, { expanded: !e })),
                    y = h.prev().first(),
                    p = h.next().last(),
                    l._updateNodeClasses(
                      y,
                      {},
                      { expanded: "true" == y.attr(i.attr("expanded")) }
                    ),
                    l._updateNodeClasses(
                      p,
                      {},
                      { expanded: "true" == p.attr(i.attr("expanded")) }
                    ),
                    s = 0;
                  s < t.length;
                  s++
                )
                  (c = t[s]),
                    c.hasChildren &&
                      ((v = c.children.data()),
                      v.length &&
                        l._insertNode(v, c.index, h.eq(s), g, !c.expanded));
                return h;
              }
            },
            _updateNodes: function (t, i) {
              function p(n, t) {
                n.is(".k-group") &&
                  n.find(".k-item:not([aria-disabled])").attr(rt, t);
                n.find(
                  ".k-checkbox-wrapper input[type=checkbox]:not([disabled])"
                )
                  .prop(f, t)
                  .data(c, !1)
                  .prop(c, !1);
              }
              var s,
                u,
                o,
                r,
                h,
                v,
                l,
                e = this,
                b = { treeview: e.options, item: r },
                y = "expanded" != i && "checked" != i;
              if ("selected" == i)
                (r = t[0]),
                  (u = e
                    .findByUid(r.uid)
                    .find(".k-in:first")
                    .removeClass("k-state-hover")
                    .toggleClass("k-state-selected", r[i])
                    .end()),
                  r[i] && e.current(u),
                  u.attr(st, !!r[i]);
              else {
                for (
                  l = n.map(t, function (n) {
                    return e.findByUid(n.uid).children("div");
                  }),
                    y &&
                      e.angular("cleanup", function () {
                        return { elements: l };
                      }),
                    s = 0;
                  s < t.length;
                  s++
                )
                  (b.item = r = t[s]),
                    (o = l[s]),
                    (u = o.parent()),
                    y && o.children(".k-in").html(e.templates.itemContent(b)),
                    i == f
                      ? ((h = r[i]),
                        p(o, h),
                        u.attr(rt, h),
                        e.options.checkboxes.checkChildren &&
                          (p(u.children(".k-group"), h),
                          e._setChecked(r.children, h),
                          e._bubbleIndeterminate(u)))
                      : "expanded" == i
                      ? e._toggle(u, r, r[i])
                      : "enabled" == i &&
                        (u
                          .find(".k-checkbox-wrapper input[type=checkbox]")
                          .prop("disabled", !r[i]),
                        (v = !w(u).is(oi)),
                        u.removeAttr(ri),
                        r[i] ||
                          (r.selected && r.set("selected", !1),
                          r.expanded && r.set("expanded", !1),
                          (v = !0),
                          u.attr(st, !1).attr(ri, !0)),
                        e._updateNodeClasses(
                          u,
                          {},
                          { enabled: r[i], expanded: !v }
                        )),
                    o.length &&
                      (r._events &&
                        r._events.change &&
                        r._events.change.splice(1),
                      this.trigger("itemChange", { item: o, data: r, ns: a }));
                y &&
                  e.angular("compile", function () {
                    return {
                      elements: l,
                      data: n.map(t, function (n) {
                        return [{ dataItem: n }];
                      }),
                    };
                  });
              }
            },
            _appendItems: function (n, t, i) {
              var r,
                u,
                s,
                h = o(i),
                f = h.children(),
                e = !this._expanded(i);
              this.element === i
                ? ((r = this.dataSource.data()),
                  (u = this.dataSource.view()),
                  (s = u.length < r.length ? u : r),
                  (n = s.indexOf(t[0])))
                : t.length && (n = t[0].parent().indexOf(t[0]));
              typeof n == l && (n = f.length);
              this._insertNode(
                t,
                n,
                i,
                function (t, i) {
                  n >= f.length ? t.appendTo(i) : t.insertBefore(f.eq(n));
                },
                e
              );
              e ||
                (this._updateNodeClasses(i, {}, { expanded: !e }),
                o(i).css("display", "block"));
            },
            _refreshChildren: function (n, t, i) {
              var r,
                u,
                e,
                f = this.options,
                s = f.loadOnDemand,
                h = f.checkboxes && f.checkboxes.checkChildren;
              if ((o(n).empty(), t.length))
                for (
                  this._appendItems(i, t, n),
                    u = o(n).children(),
                    s && h && this._bubbleIndeterminate(u.last()),
                    r = 0;
                  r < u.length;
                  r++
                )
                  (e = u.eq(r)),
                    this.trigger("itemChange", {
                      item: e.children("div"),
                      data: t[r],
                      ns: a,
                    });
              else nt(n);
            },
            _refreshRoot: function (t) {
              var r,
                u,
                i,
                f = this._renderGroup({
                  items: t,
                  group: { firstLevel: !0, expanded: !0 },
                });
              for (
                this.root.length
                  ? (this._angularItems("cleanup"),
                    (r = n(f)),
                    this.root.attr("class", r.attr("class")).html(r.html()))
                  : (this.root = this.wrapper.html(f).children("ul")),
                  u = this.root.children(".k-item"),
                  i = 0;
                i < t.length;
                i++
              )
                this.trigger("itemChange", {
                  item: u.eq(i),
                  data: t[i],
                  ns: a,
                });
              this._angularItems("compile");
            },
            refresh: function (n) {
              var i,
                o,
                e = n.node,
                u = n.action,
                r = n.items,
                f = this.wrapper,
                s = this.options,
                h = s.loadOnDemand,
                c = s.checkboxes && s.checkboxes.checkChildren;
              if (!this._skip) {
                for (i = 0; i < r.length; i++)
                  this._dataSourceUids[r[i].uid] = r[i];
                if (n.field)
                  return !r[0] || !r[0].level
                    ? void 0
                    : this._updateNodes(r, n.field);
                if (
                  (e && ((f = this.findByUid(e.uid)), this._progress(f, !1)),
                  c && "remove" != u)
                ) {
                  for (o = !1, i = 0; i < r.length; i++)
                    if ("checked" in r[i]) {
                      o = !0;
                      break;
                    }
                  if (!o && e && e.checked)
                    for (i = 0; i < r.length; i++) r[i].checked = !0;
                }
                if (
                  ("add" == u
                    ? this._appendItems(n.index, r, f)
                    : "remove" == u
                    ? this._remove(this.findByUid(r[0].uid), !1)
                    : "itemchange" == u
                    ? this._updateNodes(r)
                    : "itemloaded" == u
                    ? this._refreshChildren(f, r, n.index)
                    : this._refreshRoot(r),
                  "remove" != u)
                )
                  for (i = 0; i < r.length; i++)
                    (!h || r[i].expanded || r[i]._loaded) && r[i].load();
                this.trigger(ti, { node: e ? f : t });
                this.dataSource.filter() &&
                  this.options.checkboxes.checkChildren &&
                  this.updateIndeterminate(f);
              }
            },
            _error: function (n) {
              var t = n.node && this.findByUid(n.node.uid),
                i = this.templates.retry({ messages: this.options.messages });
              t
                ? (this._progress(t, !1),
                  this._expanded(t, !1),
                  tt(t).addClass("k-i-reload"),
                  n.node.loaded(!1))
                : (this._progress(!1), this.element.html(i));
            },
            _retryRequest: function (n) {
              n.preventDefault();
              this.dataSource.fetch();
            },
            expand: function (n) {
              this._processNodes(n, function (n, t) {
                this.toggle(t, !0);
              });
            },
            collapse: function (n) {
              this._processNodes(n, function (n, t) {
                this.toggle(t, !1);
              });
            },
            enable: function (n, t) {
              "boolean" == typeof n
                ? ((t = n), (n = this.items()))
                : (t = 2 != arguments.length || !!t);
              this._processNodes(n, function (n, i) {
                this.dataItem(i).set("enabled", t);
              });
            },
            current: function (i) {
              var u = this,
                r = u._current,
                o = u.element,
                f = u._ariaId;
              return arguments.length > 0 && i && i.length
                ? (r &&
                    (r[0].id === f && r.removeAttr("id"),
                    r.find(".k-in:first").removeClass("k-state-focused")),
                  (r = u._current = n(i, o).closest(e)),
                  r.find(".k-in:first").addClass("k-state-focused"),
                  (f = r[0].id || f),
                  f &&
                    (u.wrapper.removeAttr("aria-activedescendant"),
                    r.attr("id", f),
                    u.wrapper.attr("aria-activedescendant", f)),
                  t)
                : (r || (r = u._nextVisible(n())), r);
            },
            select: function (i) {
              var r = this,
                u = r.element;
              return arguments.length
                ? ((i = n(i, u).closest(e)),
                  u.find(".k-state-selected").each(function () {
                    var t = r.dataItem(this);
                    t
                      ? (t.set("selected", !1), delete t.selected)
                      : n(this).removeClass("k-state-selected");
                  }),
                  i.length &&
                    (r.dataItem(i).set("selected", !0), (r._clickTarget = i)),
                  r.trigger(k),
                  t)
                : u.find(".k-state-selected").closest(e);
            },
            _toggle: function (n, t, i) {
              var u,
                f = this.options,
                r = w(n),
                e = i ? "expand" : "collapse";
              r.data("animating") ||
                ((u = t && t.loaded()),
                i && !u
                  ? (f.loadOnDemand && this._progress(n, !0),
                    r.remove(),
                    t.load())
                  : (this._updateNodeClasses(n, {}, { expanded: i }),
                    i || r.css("height", r.height()).css("height"),
                    r.kendoStop(!0, !0).kendoAnimate(
                      v({ reset: !0 }, f.animation[e], {
                        complete: function () {
                          i && r.css("height", "");
                        },
                      })
                    )));
            },
            toggle: function (t, i) {
              t = n(t);
              tt(t).is(".k-i-expand, .k-i-collapse") &&
                (1 == arguments.length && (i = !this._expanded(t)),
                this._expanded(t, i));
            },
            destroy: function () {
              var n = this;
              ft.fn.destroy.call(n);
              n.wrapper.off(r);
              n.wrapper.find(".k-checkbox-wrapper :checkbox").off(r);
              n._unbindDataSource();
              n.dragging && n.dragging.destroy();
              n._dataSourceUids = {};
              i.destroy(n.element);
              n.root = n.wrapper = n.element = null;
            },
            _expanded: function (n, r, u) {
              var f,
                o = i.attr("expanded"),
                e = r,
                s = e ? "expand" : "collapse";
              return 1 == arguments.length
                ? ((f = this._dataItem(n)),
                  "true" === n.attr(o) || (f && f.expanded))
                : ((f = this.dataItem(n)),
                  w(n).data("animating") ||
                    (!u && this._trigger(s, n)) ||
                    (e
                      ? (n.attr(o, "true"), n.attr("aria-expanded", "true"))
                      : (n.removeAttr(o), n.attr("aria-expanded", "false")),
                    f && (f.set("expanded", e), (e = f.expanded))),
                  t);
            },
            _progress: function (n, t) {
              var i = this.element,
                r = this.templates.loading({ messages: this.options.messages });
              1 == arguments.length
                ? ((t = n), t ? i.html(r) : i.empty())
                : tt(n).toggleClass("k-i-loading", t).removeClass("k-i-reload");
            },
            text: function (n, i) {
              var r = this.dataItem(n),
                u = this.options[g.text],
                e = r.level(),
                o = u.length,
                f = u[Math.min(e, o - 1)];
              return i ? (r.set(f, i), t) : r[f];
            },
            _objectOrSelf: function (t) {
              return (
                n(t).closest("[data-role=treeview]").data("kendoTreeView") ||
                this
              );
            },
            _dataSourceMove: function (t, i, r, u) {
              var f,
                e = this._objectOrSelf(r || i),
                o = e.dataSource,
                s = n.Deferred().resolve().promise();
              return (
                r &&
                  r[0] != e.element[0] &&
                  ((f = e.dataItem(r)),
                  f.loaded() || (e._progress(r, !0), (s = f.load())),
                  r != this.root &&
                    ((o = f.children),
                    (o && o instanceof yt) ||
                      (f._initChildren(), f.loaded(!0), (o = f.children)))),
                (t = this._toObservableData(t)),
                u.call(e, o, t, s)
              );
            },
            _toObservableData: function (t) {
              var u,
                f,
                r = t;
              return (
                (si(t) || ui(t)) &&
                  ((u = this._objectOrSelf(t).dataSource),
                  (f = n(t).attr(i.attr("uid"))),
                  (r = u.getByUid(f)),
                  r && (r = u.remove(r))),
                r
              );
            },
            _insert: function (n, t, r) {
              t instanceof i.data.ObservableArray
                ? (t = t.toJSON())
                : b(t) || (t = [t]);
              var u = n.parent();
              return (
                u &&
                  u._initChildren &&
                  ((u.hasChildren = !0), u._initChildren()),
                n.splice.apply(n, [r, 0].concat(t)),
                this.findByUid(n[r].uid)
              );
            },
            insertAfter: ct(1),
            insertBefore: ct(0),
            append: function (t, i, r) {
              var u = this.root;
              if (!(i && t instanceof jQuery && i[0] === t[0]))
                return (
                  (i = i && i.length ? i : null),
                  i && (u = o(i)),
                  this._dataSourceMove(t, u, i, function (t, u, f) {
                    function s() {
                      i && o._expanded(i, !0, !0);
                      var n = t.data(),
                        r = Math.max(n.length, 0);
                      return o._insert(n, u, r);
                    }
                    var e,
                      o = this;
                    return (
                      f.done(function () {
                        e = s();
                        (r = r || n.noop)(e);
                      }),
                      e || null
                    );
                  })
                );
            },
            _remove: function (t, i) {
              var r,
                f,
                e,
                u = this;
              return (
                (t = n(t, u.element)),
                this.angular("cleanup", function () {
                  return { elements: t.get() };
                }),
                (r = t.parent().parent()),
                (f = t.prev()),
                (e = t.next()),
                t[i ? "detach" : "remove"](),
                r.hasClass("k-item") && (nt(r), u._updateNodeClasses(r)),
                u._updateNodeClasses(f),
                u._updateNodeClasses(e),
                t
              );
            },
            remove: function (n) {
              var t = this.dataItem(n);
              t && this.dataSource.remove(t);
            },
            detach: function (n) {
              return this._remove(n, !0);
            },
            findByText: function (t) {
              return n(this.element)
                .find(".k-in")
                .filter(function (i, r) {
                  return n(r).text() == t;
                })
                .closest(e);
            },
            findByUid: function (t) {
              for (
                var f,
                  u = this.element.find(".k-item"),
                  e = i.attr("uid"),
                  r = 0;
                r < u.length;
                r++
              )
                if (u[r].getAttribute(e) == t) {
                  f = u[r];
                  break;
                }
              return n(f);
            },
            expandPath: function (t, i) {
              function f() {
                u.shift();
                u.length ? e(u[0]).then(f) : o.call(r);
              }
              function e(t) {
                var u = n.Deferred(),
                  i = r.dataSource.get(t);
                return (
                  i
                    ? i.loaded()
                      ? (i.set("expanded", !0), u.resolve())
                      : (r._progress(r.findByUid(i.uid), !0),
                        i.load().then(function () {
                          i.set("expanded", !0);
                          u.resolve();
                        }))
                    : u.resolve(),
                  u.promise()
                );
              }
              var r = this,
                u = t.slice(0),
                o = i || n.noop;
              e(u[0]).then(f);
            },
            _parentIds: function (n) {
              for (var t = n && n.parentNode(), i = []; t && t.parentNode; )
                i.unshift(t.id), (t = t.parentNode());
              return i;
            },
            expandTo: function (n) {
              n instanceof i.data.Node || (n = this.dataSource.get(n));
              var t = this._parentIds(n);
              this.expandPath(t);
            },
            _renderItem: function (n) {
              return (
                n.group || (n.group = {}),
                (n.treeview = this.options),
                (n.r = this.templates),
                this.templates.item(n)
              );
            },
            _renderGroup: function (n) {
              var t = this;
              return (
                (n.renderItems = function (n) {
                  var u = "",
                    i = 0,
                    r = n.items,
                    f = r ? r.length : 0,
                    e = n.group;
                  for (e.length = f; i < f; i++)
                    (n.group = e),
                      (n.item = r[i]),
                      (n.item.index = i),
                      (u += t._renderItem(n));
                  return u;
                }),
                (n.r = t.templates),
                t.templates.group(n)
              );
            },
          });
          a.plugin(lt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dropdowntree/treeview.min", ["kendo.treeview.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function h(n) {
            return function (t) {
              var i = t.children(".k-animation-container");
              return i.length || (i = t), i.children(n);
            };
          }
          var r = window.kendo,
            c = r.ui,
            i = r.keys,
            u = "k-state-disabled",
            o = "select",
            f = "checked",
            l = n.proxy,
            a = "dataBound",
            v = "click",
            y = ".kendoTreeView",
            s = "indeterminate",
            p = "navigate",
            e = c.TreeView,
            w = h(".k-group"),
            b = e.extend({
              init: function (n, t, i) {
                var r = this;
                r.dropdowntree = i;
                e.fn.init.call(r, n, t);
                r.dropdowntree._isMultipleSelection() &&
                  r.wrapper.on(
                    v + y,
                    ".k-in.k-state-selected",
                    l(r._clickSelectedItem, r)
                  );
              },
              _checkOnSelect: function (n) {
                if (!n.isDefaultPrevented()) {
                  var t = this.dataItem(n.node);
                  t.set("checked", !t.checked);
                }
              },
              _setCheckedValue: function (n, t) {
                n.set(f, t);
              },
              _click: function (n) {
                var t = this;
                t.dropdowntree._isMultipleSelection() &&
                  t.one("select", t._checkOnSelect);
                e.fn._click.call(t, n);
              },
              _clickSelectedItem: function (t) {
                var i = this,
                  r = n(t.currentTarget);
                i.one("select", i._checkOnSelect);
                i._trigger(o, r) || i.dataItem(r).set("selected", !1);
              },
              defaultrefresh: function (n) {
                var r,
                  o,
                  u = n.node,
                  f = n.action,
                  i = n.items,
                  e = this.wrapper,
                  s = this.options,
                  h = s.loadOnDemand,
                  c = s.checkboxes && s.checkboxes.checkChildren;
                if (!this._skip) {
                  if (n.field)
                    return !i[0] || !i[0].level
                      ? void 0
                      : this._updateNodes(i, n.field);
                  if (
                    (u && ((e = this.findByUid(u.uid)), this._progress(e, !1)),
                    c && "remove" != f)
                  ) {
                    for (o = !1, r = 0; r < i.length; r++)
                      if ("checked" in i[r]) {
                        o = !0;
                        break;
                      }
                    if (!o && u && u.checked)
                      for (r = 0; r < i.length; r++) i[r].checked = !0;
                  }
                  if (
                    ("add" == f
                      ? this._appendItems(n.index, i, e)
                      : "remove" == f
                      ? this._remove(this.findByUid(i[0].uid), !1)
                      : "itemchange" == f
                      ? this._updateNodes(i)
                      : "itemloaded" == f
                      ? this._refreshChildren(e, i, n.index)
                      : this._refreshRoot(i),
                    "remove" != f)
                  )
                    for (r = 0; r < i.length; r++)
                      (h && !i[r].expanded) || i[r].load();
                  this.trigger(a, { node: u ? e : t });
                  this.dropdowntree._treeViewDataBound({
                    node: u ? e : t,
                    sender: this,
                  });
                  this.options.checkboxes.checkChildren &&
                    this.updateIndeterminate();
                }
              },
              _previousVisible: function (n) {
                var r,
                  i,
                  t = this;
                if (!n.length || n.prev().length)
                  for (
                    i = n.length ? n.prev() : t.root.children().last();
                    t._expanded(i) && ((r = w(i).children().last()), r.length);

                  )
                    i = r;
                else
                  (i = t.parent(n) || n),
                    i.length ||
                      (t.dropdowntree.checkAll &&
                      t.dropdowntree.checkAll.is(":visible")
                        ? t.dropdowntree.checkAll.find(".k-checkbox").focus()
                        : t.dropdowntree.filterInput
                        ? t.dropdowntree.filterInput.focus()
                        : t.dropdowntree.wrapper.focus());
                return i;
              },
              _keydown: function (e) {
                var l,
                  h = this,
                  a = e.keyCode,
                  c = h.current(),
                  w = h._expanded(c),
                  v = c.find(".k-checkbox-wrapper:first :checkbox"),
                  y = r.support.isRtl(h.element);
                e.target == e.currentTarget &&
                  ((!y && a == i.RIGHT) || (y && a == i.LEFT)
                    ? w
                      ? (l = h._nextVisible(c))
                      : c.find(".k-in:first").hasClass(u) || h.expand(c)
                    : (!y && a == i.LEFT) || (y && a == i.RIGHT)
                    ? w && !c.find(".k-in:first").hasClass(u)
                      ? h.collapse(c)
                      : ((l = h.parent(c)), h._enabled(l) || (l = t))
                    : a == i.DOWN
                    ? (l = h._nextVisible(c))
                    : a != i.UP || e.altKey
                    ? a == i.HOME
                      ? (l = h._nextVisible(n()))
                      : a == i.END
                      ? (l = h._previousVisible(n()))
                      : a != i.ENTER || c.find(".k-in:first").hasClass(u)
                      ? a == i.SPACEBAR &&
                        v.length &&
                        !c.find(".k-in:first").hasClass(u)
                        ? (v.prop(f, !v.prop(f)).data(s, !1).prop(s, !1),
                          h._checkboxChange({ target: v }),
                          (l = c))
                        : ((e.altKey && a === i.UP) || a === i.ESC) &&
                          h._closePopup()
                      : c.find(".k-in:first").hasClass("k-state-selected") ||
                        h._trigger(o, c) ||
                        h.select(c)
                    : (l = h._previousVisible(c)),
                  l &&
                    (e.preventDefault(),
                    c[0] != l[0] && (h._trigger(p, l), h.current(l))));
              },
              _closePopup: function () {
                this.dropdowntree.close();
                this.dropdowntree.wrapper.focus();
              },
              refresh: function (n) {
                this.defaultrefresh(n);
                this.dropdowntree.options.skipUpdateOnBind ||
                  ("itemchange" === n.action
                    ? this.dropdowntree._isMultipleSelection()
                      ? "checked" === n.field &&
                        this.dropdowntree._checkValue(n.items[0])
                      : "checked" !== n.field &&
                        "expanded" !== n.field &&
                        n.items[0].selected &&
                        this.dropdowntree._selectValue(n.items[0])
                    : this.dropdowntree.refresh(n));
              },
            });
          r.ui._dropdowntree = b;
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dropdowntree.min",
      ["dropdowntree/treeview.min", "kendo.popup.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function b(n, t, i) {
            for (var r, u = 0, f = t.length - 1; u < f; ++u)
              (r = t[u]), r in n || (n[r] = {}), (n = n[r]);
            n[t[f]] = i;
          }
          var k,
            d,
            i = window.kendo,
            c = i.ui,
            ct = c.Widget,
            lt = c._dropdowntree,
            v = i.data.ObservableArray,
            y = i.data.ObservableObject,
            g = n.extend,
            nt = i._activeElement,
            r = ".kendoDropDownTree",
            u = i.keys,
            tt = i.support,
            it = "k-hidden",
            rt = "width",
            s = tt.browser,
            ut = i._outerWidth,
            o = ".",
            ft = "disabled",
            p = "readonly",
            w = "k-state-disabled",
            et = "aria-disabled",
            at = "k-state-hover",
            f = "k-state-focused",
            ot = "mouseenter" + r + " mouseleave" + r,
            h = "tabindex",
            l = "click",
            st = "open",
            ht = "close",
            a = "change",
            vt = /"/g,
            e = n.proxy,
            yt = i.ui.Widget.extend({
              init: function (t, u) {
                var f, o, s;
                this.ns = r;
                i.ui.Widget.fn.init.call(this, t, u);
                this._selection = this._getSelection();
                this._focusInputHandler = n.proxy(this._focusInput, this);
                this._initial = this.element.val();
                this._values = [];
                f = this.options.value;
                (null !== f && f.length) || (this._noInitialValue = !0);
                this._isNullorUndefined(f) ||
                  ((this._valueMethodCalled = !0),
                  (this._values = n.isArray(f) ? f.slice(0) : [f]));
                this._inputTemplate();
                this._accessors();
                this._setTreeViewOptions(this.options);
                this._dataSource();
                this._selection._initWrapper();
                this._placeholder(!0);
                this._tabindex();
                this.wrapper.data(h, this.wrapper.attr(h));
                this.tree = n("<div/>").attr({
                  tabIndex: -1,
                  "aria-hidden": !0,
                });
                this.list = n("<div class='k-list-container'/>").append(
                  this.tree
                );
                this._header();
                this._noData();
                this._footer();
                this._reset();
                this._popup();
                this.popup.one("open", e(this._popupOpen, this));
                this._clearButton();
                this._filterHeader();
                this._treeview();
                this._renderFooter();
                this._checkAll();
                this._enable();
                this._toggleCloseVisibility();
                this.options.autoBind ||
                  ((o = u.text || ""),
                  this._isNullorUndefined(u.value)
                    ? o
                      ? this._textAccessor(o)
                      : u.placeholder && this._placeholder(!0)
                    : this._preselect(u.value));
                s = n(this.element).parents("fieldset").is(":disabled");
                s && this.enable(!1);
                this._valueMethodCalled = !1;
                i.notify(this);
              },
              _preselect: function (n, t) {
                this._selection._preselect(n, t);
              },
              _setTreeViewOptions: function (t) {
                var i = {
                  autoBind: t.autoBind,
                  checkboxes: t.checkboxes,
                  dataImageUrlField: t.dataImageUrlField,
                  dataSpriteCssClassField: t.dataSpriteCssClassField,
                  dataTextField: t.dataTextField,
                  dataUrlField: t.dataUrlField,
                  loadOnDemand: t.loadOnDemand,
                };
                this.options.treeview = n.extend({}, i, this.options.treeview);
                t.template && (this.options.treeview.template = t.template);
              },
              _dataSource: function () {
                var t = this.options.dataSource;
                this.dataSource = i.data.HierarchicalDataSource.create(t);
                t &&
                  n.extend(this.options.treeview, {
                    dataSource: this.dataSource,
                  });
              },
              _popupOpen: function () {
                var n = this.popup;
                n.wrapper = i.wrap(n.element);
              },
              _getSelection: function () {
                return this._isMultipleSelection()
                  ? new c.DropDownTree.MultipleSelection(this)
                  : new c.DropDownTree.SingleSelection(this);
              },
              setDataSource: function (n) {
                this._noInitialValue = !0;
                this._clearTextAndValue();
                this.dataSource = n;
                this.treeview.setDataSource(n);
              },
              _isMultipleSelection: function () {
                return (
                  this.options &&
                  (this.options.treeview.checkboxes || this.options.checkboxes)
                );
              },
              options: {
                name: "DropDownTree",
                animation: {},
                autoBind: !0,
                autoClose: !0,
                autoWidth: !1,
                clearButton: !0,
                dataTextField: "",
                dataValueField: "",
                dataImageUrlField: "",
                dataSpriteCssClassField: "",
                dataUrlField: "",
                delay: 500,
                enabled: !0,
                enforceMinLength: !1,
                filter: "none",
                height: 200,
                ignoreCase: !0,
                index: 0,
                loadOnDemand: !1,
                messages: {
                  singleTag: "item(s) selected",
                  clear: "clear",
                  deleteTag: "delete",
                  noData: "No data found.",
                },
                minLength: 1,
                checkboxes: !1,
                noDataTemplate: !0,
                placeholder: "",
                checkAll: !1,
                checkAllTemplate: "Check all",
                tagMode: "multiple",
                template: null,
                text: null,
                treeview: {},
                valuePrimitive: !1,
                footerTemplate: "",
                headerTemplate: "",
                value: null,
                valueTemplate: null,
                popup: null,
              },
              events: ["open", "close", "dataBound", a, "select", "filtering"],
              focus: function () {
                this.wrapper.focus();
              },
              dataItem: function (n) {
                return this.treeview.dataItem(n);
              },
              readonly: function (n) {
                this._editable({ readonly: n === t || n, disable: !1 });
                this._toggleCloseVisibility();
              },
              enable: function (n) {
                this._editable({ readonly: !1, disable: !(n = n === t || n) });
                this._toggleCloseVisibility();
              },
              toggle: function (n) {
                this._toggle(n);
              },
              open: function () {
                var n = this.popup;
                this.options.autoBind ||
                  this.dataSource.data().length ||
                  (this.treeview._progress(!0),
                  this._isFilterEnabled()
                    ? this._search()
                    : this.dataSource.fetch());
                !n.visible() &&
                  this._allowOpening() &&
                  (this._isMultipleSelection() &&
                    n.element.addClass("k-multiple-selection"),
                  n.element.addClass("k-popup-dropdowntree"),
                  n.one("activate", this._focusInputHandler),
                  (n._hovered = !0),
                  n.open());
              },
              close: function () {
                this.popup.close();
              },
              search: function (t) {
                var i,
                  r = this.options;
                if (
                  (clearTimeout(this._typingTimeout),
                  (!r.enforceMinLength && !t.length) || t.length >= r.minLength)
                ) {
                  if (
                    ((i = this._getFilter(t)),
                    this.trigger("filtering", { filter: i }) ||
                      n.isArray(this.options.dataTextField))
                  )
                    return;
                  this._filtering = !0;
                  this.treeview.dataSource.filter(i);
                }
              },
              _getFilter: function (n) {
                return {
                  field: this.options.dataTextField,
                  operator: this.options.filter,
                  value: n,
                  ignoreCase: this.options.ignoreCase,
                };
              },
              refresh: function () {
                var t = this.treeview.dataSource.flatView();
                this._renderFooter();
                this._renderNoData();
                this.filterInput &&
                  this.checkAll &&
                  this.checkAll.toggle(!this.filterInput.val().length);
                this.tree.toggle(!!t.length);
                n(this.noData).toggle(!t.length);
              },
              setOptions: function (n) {
                ct.fn.setOptions.call(this, n);
                this._setTreeViewOptions(n);
                this._dataSource();
                this.options.treeview &&
                  this.treeview.setOptions(this.options.treeview);
                n.height && this.tree && this.tree.css("max-height", n.height);
                this._header();
                this._noData();
                this._footer();
                this._renderFooter();
                this._renderNoData();
                this.span &&
                  (this._isMultipleSelection() ||
                    this.span.hasClass("k-readonly")) &&
                  this._placeholder(!0);
                this._inputTemplate();
                this._accessors();
                this._filterHeader();
                this._checkAll();
                this._enable();
                n && (n.enable || n.enabled) && this.enable(!0);
                this._clearButton();
              },
              destroy: function () {
                i.ui.Widget.fn.destroy.call(this);
                this.treeview && this.treeview.destroy();
                this.popup.destroy();
                this.wrapper.off(r);
                this._clear.off(r);
                this._inputWrapper.off(r);
                this.filterInput && this.filterInput.off(r);
                this.tagList && this.tagList.off(r);
                i.unbind(this.tagList);
                this.options.checkAll && this.checkAll && this.checkAll.off(r);
                this._form && this._form.off("reset", this._resetHandler);
              },
              setValue: function (t) {
                t = n.isArray(t) || t instanceof v ? t.slice(0) : [t];
                this._values = t;
              },
              items: function () {
                return this.treeview.items();
              },
              value: function (n) {
                var i = this;
                if (n)
                  if (i.filterInput && i.dataSource._filter)
                    (i._filtering = !0), i.dataSource.filter({});
                  else if (!i.dataSource.data().length)
                    return (
                      i.dataSource.fetch(function () {
                        i._selection._setValue(n);
                      }),
                      t
                    );
                return i._selection._setValue(n);
              },
              text: function (n) {
                var i,
                  r = this.options.ignoreCase;
                return (
                  (n = null === n ? "" : n),
                  n === t || this._isMultipleSelection()
                    ? this._textAccessor()
                    : "string" != typeof n
                    ? (this._textAccessor(n), t)
                    : ((i = r ? n : n.toLowerCase()),
                      this._selectItemByText(i),
                      this._textAccessor(i),
                      t)
                );
              },
              _header: function () {
                var e,
                  u = this,
                  r = n(u.header),
                  f = u.options.headerTemplate;
                return (
                  this._angularElement(r, "cleanup"),
                  i.destroy(r),
                  r.remove(),
                  f
                    ? ((e = "function" != typeof f ? i.template(f) : f),
                      (r = n(e({}))),
                      (u.header = r[0] ? r : null),
                      u.list.prepend(r),
                      this._angularElement(u.header, "compile"),
                      t)
                    : ((u.header = null), t)
                );
              },
              _noData: function () {
                var r = this,
                  f = n(r.noData),
                  u =
                    r.options.noDataTemplate === !0
                      ? r.options.messages.noData
                      : r.options.noDataTemplate;
                return (
                  r.angular("cleanup", function () {
                    return { elements: f };
                  }),
                  i.destroy(f),
                  f.remove(),
                  u
                    ? ((r.noData = n(
                        '<div class="k-nodata" style="display:none"><div></div></div>'
                      ).appendTo(r.list)),
                      (r.noDataTemplate =
                        "function" != typeof u ? i.template(u) : u),
                      t)
                    : ((r.noData = null), t)
                );
              },
              _renderNoData: function () {
                var t = this,
                  n = t.noData;
                n &&
                  (this._angularElement(n, "cleanup"),
                  n.children(":first").html(t.noDataTemplate({ instance: t })),
                  this._angularElement(n, "compile"));
              },
              _footer: function () {
                var r = this,
                  f = n(r.footer),
                  u = r.options.footerTemplate;
                return (
                  this._angularElement(f, "cleanup"),
                  i.destroy(f),
                  f.remove(),
                  u
                    ? ((r.footer = n('<div class="k-footer"></div>').appendTo(
                        r.list
                      )),
                      (r.footerTemplate =
                        "function" != typeof u ? i.template(u) : u),
                      t)
                    : ((r.footer = null), t)
                );
              },
              _renderFooter: function () {
                var t = this,
                  n = t.footer;
                n &&
                  (this._angularElement(n, "cleanup"),
                  n.html(t.footerTemplate({ instance: t })),
                  this._angularElement(n, "compile"));
              },
              _enable: function () {
                var n = this,
                  i = n.options,
                  r = n.element.is("[disabled]");
                i.enable !== t && (i.enabled = i.enable);
                !i.enabled || r
                  ? n.enable(!1)
                  : n.readonly(n.element.is("[readonly]"));
              },
              _adjustListWidth: function () {
                var n,
                  r,
                  u = this,
                  t = u.list,
                  i = t[0].style.width,
                  f = u.wrapper;
                if (t.data(rt) || !i)
                  return (
                    (n = window.getComputedStyle
                      ? window.getComputedStyle(f[0], null)
                      : 0),
                    (r = parseFloat(n && n.width) || ut(f)),
                    n &&
                      s.msie &&
                      (r +=
                        parseFloat(n.paddingLeft) +
                        parseFloat(n.paddingRight) +
                        parseFloat(n.borderLeftWidth) +
                        parseFloat(n.borderRightWidth)),
                    (i =
                      "border-box" !== t.css("box-sizing")
                        ? r - (ut(t) - t.width())
                        : r),
                    t
                      .css({
                        fontFamily: f.css("font-family"),
                        width: u.options.autoWidth ? "auto" : i,
                        minWidth: i,
                        whiteSpace: u.options.autoWidth ? "nowrap" : "normal",
                      })
                      .data(rt, i),
                    !0
                  );
              },
              _reset: function () {
                var t = this,
                  i = t.element,
                  r = i.attr("form"),
                  u = r ? n("#" + r) : i.closest("form");
                u[0] &&
                  ((t._resetHandler = function () {
                    setTimeout(function () {
                      t.value(t._initial);
                    });
                  }),
                  (t._form = u.on("reset", t._resetHandler)));
              },
              _popup: function () {
                var n = this;
                n.popup = new c.Popup(
                  n.list,
                  g({}, n.options.popup, {
                    anchor: n.wrapper,
                    open: e(n._openHandler, n),
                    close: e(n._closeHandler, n),
                    animation: n.options.animation,
                    isRtl: tt.isRtl(n.wrapper),
                    autosize: n.options.autoWidth,
                  })
                );
              },
              _angularElement: function (n, t) {
                n &&
                  this.angular(t, function () {
                    return { elements: n };
                  });
              },
              _allowOpening: function () {
                return (
                  this.options.noDataTemplate ||
                  this.treeview.dataSource.flatView().length
                );
              },
              _placeholder: function (n) {
                this.span &&
                  this.span
                    .toggleClass("k-readonly", n)
                    .text(n ? this.options.placeholder : "");
              },
              _currentValue: function (n) {
                var t = this._value(n);
                return t || 0 === t || (t = n), t;
              },
              _checkValue: function (i) {
                var s,
                  u,
                  h,
                  e,
                  o = "",
                  f = -1,
                  r = this.value(),
                  c = "multiple" === this.options.tagMode;
                if (
                  ((i || 0 === i) &&
                    (i.level && (i._level = i.level()),
                    (o = this._currentValue(i)),
                    (f = r.indexOf(o))),
                  i.checked)
                ) {
                  if (
                    ((s = n.grep(this._tags, function (n) {
                      return n.uid === i._tagUid;
                    })),
                    s.length)
                  )
                    return;
                  u = new y(i.toJSON());
                  i._tagUid = u.uid;
                  this._tags.push(u);
                  1 === this._tags.length &&
                    (this.span.hide(), c || this._multipleTags.push(u));
                  f === -1 && (r.push(o), this.setValue(r));
                } else {
                  if (
                    ((h = this._tags.find(function (n) {
                      return n.uid === i._tagUid;
                    })),
                    (e = this._tags.indexOf(h)),
                    e === -1)
                  )
                    return this._treeViewCheckAllCheck(i), t;
                  this._tags.splice(e, 1);
                  0 === this._tags.length &&
                    (this.span.show(), c || this._multipleTags.splice(0, 1));
                  f !== -1 && (r.splice(f, 1), this.setValue(r));
                }
                this._treeViewCheckAllCheck(i);
                this._preventChangeTrigger ||
                  this._valueMethodCalled ||
                  this._noInitialValue ||
                  this.trigger(a);
                this.options.autoClose &&
                  this.popup.visible() &&
                  (this.close(), this.wrapper.focus());
                this.popup.position();
                this._toggleCloseVisibility();
                this._updateSelectedOptions();
              },
              _updateSelectedOptions: function () {
                var n, r, t, u, i;
                if ("select" === this.element[0].tagName.toLowerCase()) {
                  if (
                    ((n = this._tags),
                    (r = ""),
                    (t = null),
                    (u = null),
                    n.length)
                  )
                    for (i = 0; i < n.length; i++)
                      (t = n[i]),
                        (u = this._value(t)),
                        (r += this._option(u, this._text(t), !0));
                  this.element.html(r);
                }
              },
              _option: function (n, r, u) {
                var f = "<option";
                return (
                  n !== t &&
                    ((n += ""),
                    n.indexOf('"') !== -1 && (n = n.replace(vt, "&quot;")),
                    (f += ' value="' + n + '"')),
                  u && (f += " selected"),
                  (f += ">"),
                  r !== t && (f += i.htmlEncode(r)),
                  f + "</option>"
                );
              },
              _selectValue: function (n) {
                var t = "",
                  i = "";
                (n || 0 === n) &&
                  (n.level && (n._level = n.level()),
                  (i = this._text(n) || n),
                  (t = this._currentValue(n)));
                null === t && (t = "");
                this.setValue(t);
                this._textAccessor(i, n);
                this._accessor(t);
                this._valueMethodCalled || this.trigger(a);
                this._valueMethodCalled = !1;
                this.options.autoClose &&
                  this.popup.visible() &&
                  (this.close(), this.wrapper.focus());
                this.popup.position();
                this._toggleCloseVisibility();
              },
              _clearClick: function (n) {
                n.stopPropagation();
                this._clearTextAndValue();
              },
              _clearTextAndValue: function () {
                this.setValue([]);
                this._clearInput();
                this._clearText();
                this._selection._clearValue();
                this.popup.position();
                this._toggleCloseVisibility();
              },
              _clearText: function () {
                this.options.placeholder
                  ? this._placeholder(!0)
                  : this.span && this.span.html("");
              },
              _inputTemplate: function () {
                var t = this.options.valueTemplate;
                t = t
                  ? i.template(t)
                  : n.proxy(
                      i.template("#:this._text(data)#", { useWithBlock: !1 }),
                      this
                    );
                this.valueTemplate = t;
              },
              _assignInstance: function (n, t) {
                var r = this.options.dataTextField,
                  i = {};
                return (
                  r
                    ? (b(i, r.split(o), n),
                      b(i, this.options.dataValueField.split(o), t),
                      (i = new y(i)))
                    : (i = n),
                  i
                );
              },
              _textAccessor: function (i, r) {
                var f,
                  e = this.valueTemplate,
                  u = this.span;
                if (i === t) return u.text();
                u.removeClass("k-readonly");
                !r && (n.isPlainObject(i) || i instanceof y) && (r = i);
                r || (r = this._assignInstance(i, this._accessor()));
                f = function () {
                  return { elements: u.get(), data: [{ dataItem: r }] };
                };
                this.angular("cleanup", f);
                try {
                  u.html(e(r));
                } catch (o) {
                  u && u.html("");
                }
                this.angular("compile", f);
              },
              _accessors: function () {
                var r = this.element,
                  t = this.options,
                  o = i.getter,
                  u = r.attr(i.attr("text-field")),
                  f = r.attr(i.attr("value-field")),
                  e = function (t) {
                    var i, r;
                    return n.isArray(t)
                      ? ((i = t.length),
                        (r = n.map(t, function (n) {
                          return function (t) {
                            return t[n];
                          };
                        })),
                        function (n) {
                          var t = n._level;
                          if (t || 0 === t) return r[Math.min(t, i - 1)](n);
                        })
                      : o(t);
                  };
                !t.dataTextField && u && (t.dataTextField = u);
                !t.dataValueField && f && (t.dataValueField = f);
                t.dataTextField = t.dataTextField || "text";
                t.dataValueField = t.dataValueField || "value";
                this._text = e(t.dataTextField);
                this._value = e(t.dataValueField);
              },
              _accessor: function (n, t) {
                return this._accessorInput(n, t);
              },
              _accessorInput: function (n) {
                var i = this.element[0];
                return n === t
                  ? i.value
                  : (null === n && (n = ""), (i.value = n), t);
              },
              _clearInput: function () {
                var n = this.element[0];
                n.value = "";
              },
              _clearButton: function () {
                var t = this.options.messages.clear;
                this._clear ||
                  (this._clear = n(
                    '<span unselectable="on" class="k-icon k-clear-value k-i-close" title="' +
                      t +
                      '"></span>'
                  ).attr({ role: "button", tabIndex: -1 }));
                this.options.clearButton
                  ? (this._clear.insertAfter(this.span),
                    this.wrapper.addClass("k-dropdowntree-clearable"))
                  : this.options.clearButton || this._clear.remove();
              },
              _toggleCloseVisibility: function () {
                var n = this.element.attr(p),
                  t =
                    (this.value() && !this._isMultipleSelection()) ||
                    this.value().length,
                  i =
                    this.element.val() &&
                    this.element.val() !== this.options.placeholder;
                n || (!t && !i) ? this._hideClear() : this._showClear();
              },
              _showClear: function () {
                this._clear && this._clear.removeClass(it);
              },
              _hideClear: function () {
                this._clear && this._clear.addClass(it);
              },
              _openHandler: function (n) {
                this._adjustListWidth();
                this.trigger(st)
                  ? n.preventDefault()
                  : (this.wrapper.attr("aria-expanded", !0),
                    this.tree.attr("aria-hidden", !1).attr("role", "tree"));
              },
              _closeHandler: function (n) {
                this.trigger(ht)
                  ? n.preventDefault()
                  : (this.wrapper.attr("aria-expanded", !1),
                    this.tree.attr("aria-hidden", !0));
              },
              _treeview: function () {
                var n = this;
                n.options.height && n.tree.css("max-height", n.options.height);
                n.tree.attr("id", i.guid());
                n.treeview = new lt(n.tree, g({}, n.options.treeview), n);
                n.dataSource = n.treeview.dataSource;
                n.treeview.bind("select", function (t) {
                  n.trigger("select", t);
                });
              },
              _treeViewDataBound: function (n) {
                var r, i, u;
                return (
                  n.node &&
                    this._prev &&
                    this._prev.length &&
                    n.sender.expand(n.node),
                  this._filtering
                    ? (n.node || (this._filtering = !1),
                      this._isMultipleSelection() || this._deselectItem(n),
                      t)
                    : (this.treeview || (this.treeview = n.sender),
                      n.node
                        ? ((i = n.sender.dataItem(n.node)),
                          i &&
                            ((u = i.children.data()),
                            this._checkLoadedItems(u)))
                        : ((r = n.sender.dataSource.data()),
                          this._checkLoadedItems(r),
                          this._noInitialValue && (this._noInitialValue = !1)),
                      this.trigger("dataBound", n),
                      t)
                );
              },
              _deselectItem: function (n) {
                var r,
                  t,
                  i = [];
                for (
                  n.node
                    ? ((r = n.sender.dataItem(n.node)),
                      r && (i = r.children.data()))
                    : (i = n.sender.dataSource.data()),
                    t = 0;
                  t < i.length;
                  t++
                )
                  i[t].selected &&
                    !this._valueComparer(i[t], this.value()) &&
                    i[t].set("selected", !1);
              },
              _checkLoadedItems: function (n) {
                var t,
                  i = this.value();
                if (n)
                  for (t = 0; t < n.length; t++)
                    this._selection._checkLoadedItem(n[t], i);
              },
              _treeViewCheckAllCheck: function (n) {
                this.options.checkAll &&
                  this.checkAll &&
                  (this._getAllChecked(),
                  n.checked ? this._checkCheckAll() : this._uncheckCheckAll());
              },
              _checkCheckAll: function () {
                var n = this.checkAll.find(".k-checkbox");
                this._allItemsAreChecked
                  ? n.prop("checked", !0).prop("indeterminate", !1)
                  : n.prop("indeterminate", !0);
              },
              _uncheckCheckAll: function () {
                var n = this.checkAll.find(".k-checkbox");
                this._allItemsAreUnchecked
                  ? n.prop("checked", !1).prop("indeterminate", !1)
                  : n.prop("indeterminate", !0);
              },
              _filterHeader: function () {
                var t;
                this.filterInput &&
                  (this.filterInput.off(r).parent().remove(),
                  (this.filterInput = null));
                this._isFilterEnabled() &&
                  (this._disableCheckChildren(),
                  (t = '<span class="k-icon k-i-zoom"></span>'),
                  (this.filterInput = n('<input class="k-textbox"/>').attr({
                    placeholder: this.element.attr("placeholder"),
                    title: this.element.attr("title"),
                    role: "listbox",
                    "aria-haspopup": !0,
                    "aria-expanded": !1,
                  })),
                  this.filterInput.on("input", e(this._filterChange, this)),
                  n('<span class="k-list-filter" />')
                    .insertBefore(this.tree)
                    .append(this.filterInput.add(t)));
              },
              _filterChange: function () {
                this.filterInput && this._search();
              },
              _disableCheckChildren: function () {
                this._isMultipleSelection() &&
                  this.options.treeview.checkboxes &&
                  this.options.treeview.checkboxes.checkChildren &&
                  (this.options.treeview.checkboxes.checkChildren = !1);
              },
              _checkAll: function () {
                this.checkAll &&
                  (this.checkAll.find(".k-checkbox-label, .k-checkbox").off(r),
                  this.checkAll.remove(),
                  (this.checkAll = null));
                this._isMultipleSelection() &&
                  this.options.checkAll &&
                  ((this.checkAll = n(
                    '<div class="k-check-all"><input type="checkbox" class="k-checkbox"/><span class="k-checkbox-label">Check All</span></div>'
                  ).insertBefore(this.tree)),
                  this.checkAll
                    .find(".k-checkbox-label")
                    .html(
                      i.template(this.options.checkAllTemplate)({
                        instance: this,
                      })
                    ),
                  this.checkAll
                    .find(".k-checkbox-label")
                    .on(l + r, e(this._clickCheckAll, this)),
                  this.checkAll
                    .find(".k-checkbox")
                    .on("change" + r, e(this._changeCheckAll, this))
                    .on("keydown" + r, e(this._keydownCheckAll, this)),
                  (this._disabledCheckedItems = []),
                  (this._disabledUnCheckedItems = []),
                  this._getAllChecked(),
                  this._allItemsAreUnchecked || this._checkCheckAll());
              },
              _changeCheckAll: function () {
                var n = this.checkAll.find(".k-checkbox"),
                  t = n.prop("checked");
                s.msie || s.edge || this._updateCheckAll(t);
              },
              _updateCheckAll: function (n) {
                var t = this.checkAll.find(".k-checkbox");
                this._toggleCheckAllItems(n);
                t.prop("checked", n);
                this._disabledCheckedItems.length &&
                this._disabledUnCheckedItems.length
                  ? t.prop("indeterminate", !0)
                  : this._disabledCheckedItems.length
                  ? t.prop("indeterminate", !n)
                  : this._disabledUnCheckedItems.length
                  ? t.prop("indeterminate", n)
                  : t.prop("indeterminate", !1);
                this._disabledCheckedItems = [];
                this._disabledUnCheckedItems = [];
              },
              _keydownCheckAll: function (n) {
                var i = n.keyCode,
                  r = n.altKey;
                return (r && i === u.UP) || i === u.ESC
                  ? (this.close(), this.wrapper.focus(), n.preventDefault(), t)
                  : (i === u.UP &&
                      (this.filterInput
                        ? this.filterInput.focus()
                        : this.wrapper.focus(),
                      n.preventDefault()),
                    i === u.DOWN &&
                      (this.tree &&
                        this.tree.is(":visible") &&
                        this.tree.focus(),
                      n.preventDefault()),
                    i === u.SPACEBAR &&
                      (s.msie || s.edge) &&
                      (this._clickCheckAll(), n.preventDefault()),
                    t);
              },
              _clickCheckAll: function () {
                var n = this.checkAll.find(".k-checkbox"),
                  t = n.prop("checked");
                this._updateCheckAll(!t);
                n.focus();
              },
              _dfs: function (n, t, i) {
                for (var r = 0; r < n.length && this[t](n[r], i); r++)
                  this._traverceChildren(n[r], t, i);
              },
              _uncheckItemByUid: function (n) {
                this._dfs(this.dataSource.data(), "_uncheckItemEqualsUid", n);
              },
              _uncheckItemEqualsUid: function (n, t) {
                return (
                  n.enabled === !1 ||
                  n._tagUid != t ||
                  (n.set("checked", !1), !1)
                );
              },
              _selectItemByText: function (n) {
                this._dfs(this.dataSource.data(), "_itemEqualsText", n);
              },
              _itemEqualsText: function (n, t) {
                return (
                  n.enabled === !1 ||
                  this._text(n) !== t ||
                  (this.treeview.select(this.treeview.findByUid(n.uid)),
                  this._selectValue(n),
                  !1)
                );
              },
              _selectItemByValue: function (n) {
                this._dfs(this.dataSource.data(), "_itemEqualsValue", n);
              },
              _itemEqualsValue: function (n, t) {
                return (
                  n.enabled === !1 ||
                  !this._valueComparer(n, t) ||
                  (this.treeview.select(this.treeview.findByUid(n.uid)), !1)
                );
              },
              _checkItemByValue: function (n) {
                for (
                  var i = this.treeview.dataItems(), t = 0;
                  t < n.length;
                  t++
                )
                  this._dfs(i, "_checkItemEqualsValue", n[t]);
              },
              _checkItemEqualsValue: function (n, t) {
                return (
                  n.enabled === !1 ||
                  !this._valueComparer(n, t) ||
                  (n.set("checked", !0), !1)
                );
              },
              _valueComparer: function (n, t) {
                var i,
                  r,
                  u = this._value(n);
                return this._isNullorUndefined(u)
                  ? ((i = this._text(n)),
                    !!i && (this._text(t) ? i == this._text(t) : i == t))
                  : !this._isNullorUndefined(t) &&
                      ((r = this._value(t)), r ? u == r : u == t);
              },
              _isNullorUndefined: function (n) {
                return n === t || null === n;
              },
              _getAllChecked: function () {
                return (
                  (this._allCheckedItems = []),
                  (this._allItemsAreChecked = !0),
                  (this._allItemsAreUnchecked = !0),
                  this._dfs(this.dataSource.data(), "_getAllCheckedItems"),
                  this._allCheckedItems
                );
              },
              _getAllCheckedItems: function (n) {
                return (
                  this._allItemsAreChecked &&
                    (this._allItemsAreChecked = n.checked),
                  this._allItemsAreUnchecked &&
                    (this._allItemsAreUnchecked = !n.checked),
                  n.checked && this._allCheckedItems.push(n),
                  !0
                );
              },
              _traverceChildren: function (n, t, i) {
                var u =
                    n._childrenOptions && n._childrenOptions.schema
                      ? n._childrenOptions.schema.data
                      : null,
                  r = n[u] || n.items || n.children;
                r && this._dfs(r, t, i);
              },
              _toggleCheckAllItems: function (n) {
                this._dfs(this.dataSource.data(), "_checkAllCheckItem", n);
              },
              _checkAllCheckItem: function (n, t) {
                return (
                  n.enabled === !1
                    ? n.checked
                      ? this._disabledCheckedItems.push(n)
                      : this._disabledUnCheckedItems.push(n)
                    : n.set("checked", t),
                  !0
                );
              },
              _isFilterEnabled: function () {
                var n = this.options.filter;
                return n && "none" !== n;
              },
              _editable: function (t) {
                var i = this,
                  c = i.element,
                  o = t.disable,
                  a = t.readonly,
                  u = i.wrapper.add(i.filterInput).off(r),
                  s = i._inputWrapper.off(ot);
                i._isMultipleSelection() && i.tagList.off(l + r);
                a || o
                  ? o
                    ? (u.removeAttr(h), s.addClass(w))
                    : (u.attr(h, u.data(h)),
                      s.removeClass(w),
                      u
                        .on("focusin" + r, e(i._focusinHandler, i))
                        .on("focusout" + r, e(i._focusoutHandler, i)))
                  : (c.removeAttr(ft).removeAttr(p),
                    s.removeClass(w).on(ot, i._toggleHover),
                    i._clear.on("click" + r, e(i._clearClick, i)),
                    u
                      .attr(h, u.data(h))
                      .attr(et, !1)
                      .on("keydown" + r, e(i._keydown, i))
                      .on("focusin" + r, e(i._focusinHandler, i))
                      .on("focusout" + r, e(i._focusoutHandler, i)),
                    i.wrapper.on(l + r, e(i._wrapperClick, i)),
                    this._isMultipleSelection() &&
                      (i.tagList.on(l + r, "li.k-button", function (t) {
                        n(t.currentTarget).addClass(f);
                      }),
                      i.tagList.on(l + r, ".k-select", function (n) {
                        i._removeTagClick(n);
                      })));
                c.attr(ft, o).attr(p, a);
                u.attr(et, o);
              },
              _focusinHandler: function () {
                this._inputWrapper.addClass(f);
                this._prevent = !1;
              },
              _focusoutHandler: function () {
                var n = this;
                this._isMultipleSelection() &&
                  this.tagList.find(o + f).removeClass(f);
                n._prevent ||
                  (this._inputWrapper.removeClass(f),
                  (n._prevent = !0),
                  n.element.blur());
              },
              _toggle: function (n) {
                n = n !== t ? n : !this.popup.visible();
                this[n ? st : ht]();
              },
              _wrapperClick: function (n) {
                n.preventDefault();
                this.popup.unbind("activate", this._focusInputHandler);
                this._focused = this.wrapper;
                this._prevent = !1;
                this._toggle();
              },
              _toggleHover: function (t) {
                n(t.currentTarget).toggleClass(at, "mouseenter" === t.type);
              },
              _focusInput: function () {
                this.filterInput
                  ? this.filterInput.focus()
                  : this.checkAll
                  ? this.checkAll.find(".k-checkbox").focus()
                  : this.tree.is(":visible") && this.tree.focus();
              },
              _keydown: function (n) {
                var h,
                  a,
                  r,
                  e,
                  i = n.keyCode,
                  l = n.altKey,
                  c = this.popup.visible();
                if (
                  (this.filterInput && (h = this.filterInput[0] === nt()),
                  this.wrapper && (a = this.wrapper[0] === nt()),
                  a)
                ) {
                  if (i === u.ESC)
                    return this._clearTextAndValue(), n.preventDefault(), t;
                  if (this._isMultipleSelection()) {
                    if (i === u.LEFT)
                      return this._focusPrevTag(), n.preventDefault(), t;
                    if (i === u.RIGHT)
                      return this._focusNextTag(), n.preventDefault(), t;
                    if (i === u.HOME)
                      return this._focusFirstTag(), n.preventDefault(), t;
                    if (i === u.END)
                      return this._focusLastTag(), n.preventDefault(), t;
                    if (i === u.DELETE)
                      return (
                        (r = this.tagList.find(o + f).first()),
                        r.length &&
                          ((e = this._tags[r.index()]), this._removeTag(e)),
                        n.preventDefault(),
                        t
                      );
                    if (i === u.BACKSPACE)
                      return (
                        (r = this.tagList.find(o + f).first()),
                        r.length
                          ? ((e = this._tags[r.index()]), this._removeTag(e))
                          : ((r = this._focusLastTag()),
                            r.length &&
                              ((e = this._tags[r.index()]),
                              this._removeTag(e))),
                        n.preventDefault(),
                        t
                      );
                  }
                }
                return (
                  h &&
                    (i === u.ESC && this._clearFilter(),
                    i !== u.UP ||
                      l ||
                      (this.wrapper.focus(), n.preventDefault()),
                    s.msie &&
                      s.version < 10 &&
                      ((i !== u.BACKSPACE && i !== u.DELETE) ||
                        this._search())),
                  (l && i === u.UP) || i === u.ESC
                    ? (this.wrapper.focus(),
                      this.close(),
                      n.preventDefault(),
                      t)
                    : i === u.ENTER &&
                      this._typingTimeout &&
                      this.filterInput &&
                      c
                    ? (n.preventDefault(), t)
                    : (i !== u.SPACEBAR ||
                        h ||
                        (this._toggle(!c), n.preventDefault()),
                      l &&
                        i === u.DOWN &&
                        !c &&
                        (this.open(), n.preventDefault()),
                      i === u.DOWN &&
                        c &&
                        (this.filterInput && !h
                          ? this.filterInput.focus()
                          : this.checkAll && this.checkAll.is(":visible")
                          ? this.checkAll.find("input").focus()
                          : this.tree.is(":visible") && this.tree.focus(),
                        n.preventDefault()),
                      t)
                );
              },
              _focusPrevTag: function () {
                var n,
                  t = this.tagList.find(o + f);
                t.length
                  ? ((n = this.wrapper.attr("aria-activedescendant")),
                    t
                      .first()
                      .removeClass(f)
                      .removeAttr("id")
                      .prev()
                      .addClass(f)
                      .attr("id", n),
                    this.wrapper.attr("aria-activedescendant", n))
                  : this._focusLastTag();
              },
              _focusNextTag: function () {
                var n,
                  t = this.tagList.find(o + f);
                t.length
                  ? ((n = this.wrapper.attr("aria-activedescendant")),
                    t
                      .first()
                      .removeClass(f)
                      .removeAttr("id")
                      .next()
                      .addClass(f)
                      .attr("id", n),
                    this.wrapper.attr("aria-activedescendant", n))
                  : this._focusFirstTag();
              },
              _focusFirstTag: function () {
                var n,
                  t = this.wrapper.attr("aria-activedescendant");
                return (
                  this._clearDisabledTag(),
                  (n = this.tagList
                    .children("li")
                    .first()
                    .addClass(f)
                    .attr("id", t)),
                  this.wrapper.attr("aria-activedescendant", t),
                  n
                );
              },
              _focusLastTag: function () {
                var n,
                  t = this.wrapper.attr("aria-activedescendant");
                return (
                  this._clearDisabledTag(),
                  (n = this.tagList
                    .children("li")
                    .last()
                    .addClass(f)
                    .attr("id", t)),
                  this.wrapper.attr("aria-activedescendant", t),
                  n
                );
              },
              _clearDisabledTag: function () {
                this.tagList
                  .find(o + f)
                  .removeClass(f)
                  .removeAttr("id");
              },
              _search: function () {
                var n = this;
                clearTimeout(n._typingTimeout);
                n._typingTimeout = setTimeout(function () {
                  var t = n.filterInput.val();
                  n._prev !== t && ((n._prev = t), n.search(t));
                  n._typingTimeout = null;
                }, n.options.delay);
              },
              _clearFilter: function () {
                this.filterInput.val().length &&
                  (this.filterInput.val(""),
                  (this._prev = ""),
                  (this._filtering = !0),
                  this.treeview.dataSource.filter({}));
              },
              _removeTagClick: function (t) {
                t.stopPropagation();
                var i = this._tags[n(t.currentTarget.parentElement).index()];
                this._removeTag(i);
              },
              _removeTag: function (n) {
                if (n) {
                  var t = n.uid;
                  this._uncheckItemByUid(t);
                }
              },
            });
          c.plugin(yt);
          k = i.Class.extend({
            init: function (n) {
              this._dropdowntree = n;
            },
            _initWrapper: function () {
              this._wrapper();
              this._span();
            },
            _preselect: function (n) {
              var t = this._dropdowntree;
              t._selectValue(n);
            },
            _wrapper: function () {
              var n,
                i = this._dropdowntree,
                t = i.element,
                r = t[0];
              n = t.parent();
              n.is("span.k-widget") ||
                ((n = t.wrap("<span />").parent()),
                (n[0].style.cssText = r.style.cssText),
                (n[0].title = r.title));
              i._focused = i.wrapper = n
                .addClass("k-widget k-dropdowntree")
                .addClass(r.className)
                .css("display", "")
                .attr({
                  accesskey: t.attr("accesskey"),
                  unselectable: "on",
                  role: "listbox",
                  "aria-haspopup": !0,
                  "aria-expanded": !1,
                });
              t.hide().removeAttr("accesskey");
            },
            _span: function () {
              var r,
                t = this._dropdowntree,
                i = t.wrapper,
                u = "span.k-input";
              r = i.find(u);
              r[0] ||
                (i
                  .append(
                    '<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input">&nbsp;</span><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>'
                  )
                  .append(t.element),
                (r = i.find(u)));
              t.span = r;
              t._inputWrapper = n(i[0].firstChild);
              t._arrow = i.find(".k-select");
              t._arrowIcon = t._arrow.find(".k-icon");
            },
            _setValue: function (n) {
              var r,
                i = this._dropdowntree;
              return n === t || null === n
                ? ((r = i._values.slice()[0]),
                  (n = "object" == typeof r ? r : i._accessor() || r),
                  n === t || null === n ? "" : n)
                : ((i._valueMethodCalled = !0),
                  0 === n.length
                    ? (i._clearTextAndValue(), (i._valueMethodCalled = !1), t)
                    : (i._selectItemByValue(n), i._toggleCloseVisibility(), t));
            },
            _clearValue: function () {
              var n = this._dropdowntree,
                t = n.treeview.select();
              n.treeview.dataItem(t) &&
                (n.treeview.dataItem(t).set("selected", !1),
                n._valueMethodCalled || n.trigger(a));
            },
            _checkLoadedItem: function (n, t) {
              var i = this._dropdowntree;
              ((!i._isNullorUndefined(t) &&
                "" !== t &&
                i._valueComparer(n, t)) ||
                (!t && n.selected)) &&
                i.treeview.select(i.treeview.findByUid(n.uid));
            },
          });
          d = i.Class.extend({
            init: function (n) {
              this._dropdowntree = n;
            },
            _initWrapper: function () {
              var t = this._dropdowntree;
              this._tagTemplate();
              t.element.attr("multiple", "multiple").hide();
              this._wrapper();
              t._tags = new v([]);
              t._multipleTags = new v([]);
              this._tagList();
              t.span = n(
                '<span unselectable="on" class="k-input">&nbsp;</span>'
              ).insertAfter(t.tagList);
              t._inputWrapper = n(t.wrapper[0].firstChild);
            },
            _preselect: function (t, r) {
              var u = this._dropdowntree,
                f = r || u.options.value;
              n.isArray(t) || t instanceof i.data.ObservableArray || (t = [t]);
              (n.isPlainObject(t[0]) ||
                t[0] instanceof i.data.ObservableObject ||
                !u.options.dataValueField) &&
                (u.dataSource.data(t), u.value(f));
            },
            _tagTemplate: function () {
              var n = this._dropdowntree,
                r = n.options,
                t = r.valueTemplate,
                u = "multiple" === r.tagMode,
                f = r.messages.singleTag;
              t = t ? i.template(t) : n.valueTemplate;
              n.valueTemplate = function (i) {
                return u
                  ? '<li class="k-button ' +
                      (i.enabled === !1 ? "k-state-disabled" : "") +
                      '" unselectable="on" role="option" ' +
                      (i.enabled === !1 ? 'aria-disabled="true"' : "") +
                      '><span unselectable="on">' +
                      t(i) +
                      '</span><span title="' +
                      n.options.messages.deleteTag +
                      '" aria-label="' +
                      n.options.messages.deleteTag +
                      '" class="k-select"><span class="k-icon k-i-close"></span></span></li>'
                  : '<li class="k-button" unselectable="on" role="option"><span unselectable="on" data-bind="text: tags.length"></span><span unselectable="on">&nbsp;' +
                      f +
                      "</span></li>";
              };
            },
            _wrapper: function () {
              var u = this._dropdowntree,
                t = u.element,
                r = t.parent("span.k-dropdowntree");
              r[0] ||
                ((r = t
                  .wrap(
                    '<div class="k-widget k-dropdowntree" unselectable="on" />'
                  )
                  .parent()),
                (r[0].style.cssText = t[0].style.cssText),
                (r[0].title = t[0].title),
                n(
                  '<div class="k-multiselect-wrap k-floatwrap" unselectable="on" />'
                ).insertBefore(t));
              u.wrapper = r
                .addClass(t[0].className)
                .css("display", "")
                .attr({
                  role: "listbox",
                  "aria-activedescendant": i.guid(),
                  "aria-haspopup": !0,
                  "aria-expanded": !1,
                });
              u._innerWrapper = n(r[0].firstChild);
            },
            _tagList: function () {
              var u,
                f,
                e,
                t = this._dropdowntree,
                r = t._innerWrapper.children("ul");
              r[0] ||
                ((u = "multiple" === t.options.tagMode),
                (f = u ? "tags" : "multipleTag"),
                (r = n(
                  '<ul role="listbox" unselectable="on" data-template="tagTemplate" data-bind="source: ' +
                    f +
                    '" class="k-reset"/>'
                ).appendTo(t._innerWrapper)));
              t.tagList = r;
              t.tagList.attr("id", i.guid() + "_tagList");
              t.wrapper.attr("aria-owns", t.tagList.attr("id"));
              e = i.observable({
                multipleTag: t._multipleTags,
                tags: t._tags,
                tagTemplate: t.valueTemplate,
              });
              i.bind(t.tagList, e);
              t.tagList.attr("data-stop", !0);
            },
            _setValue: function (n) {
              var i = this._dropdowntree,
                r = i._values;
              return n === t || null === n
                ? i._values.slice()
                : (i.setValue(n),
                  (i._valueMethodCalled = !0),
                  n.length
                    ? (this._removeValues(r, n), i._checkItemByValue(n))
                    : i._clearTextAndValue(),
                  (i._valueMethodCalled = !1),
                  i._toggleCloseVisibility(),
                  t);
            },
            _removeValues: function (n, t) {
              for (
                var i,
                  r = this._dropdowntree,
                  f = this._getNewValues(n, t),
                  u = 0;
                u < f.length;
                u++
              )
                for (i = 0; i < r._tags.length; i++)
                  r._valueComparer(r._tags[i], f[u]) &&
                    r._uncheckItemByUid(r._tags[i].uid);
            },
            _getNewValues: function (n, t) {
              for (var r = [], i = 0; i < n.length; i++)
                t.indexOf(n[i]) === -1 && r.push(n[i]);
              return r;
            },
            _clearValue: function () {
              for (
                var r, n = this._dropdowntree, i = n._tags.slice(), t = 0;
                t < i.length;
                t++
              )
                (r = i[t].uid),
                  (n._preventChangeTrigger = !0),
                  n._uncheckItemByUid(r);
              i.length &&
                ((n._preventChangeTrigger = !1),
                n._valueMethodCalled || n.trigger(a));
            },
            _checkLoadedItem: function (n, i) {
              var r = this._dropdowntree;
              return r._noInitialValue && n.checked
                ? (r._checkValue(n), t)
                : (i.length &&
                    (i.indexOf(r._currentValue(n)) !== -1 || i.indexOf(n)) !==
                      -1 &&
                    !this._findTag(r._currentValue(n)) &&
                    (n.checked ? r._checkValue(n) : n.set("checked", !0)),
                  t);
            },
            _findTag: function (n) {
              var t = this._dropdowntree;
              return t._tags.find(function (i) {
                return t._valueComparer(i, n);
              });
            },
          });
          i.ui.DropDownTree.SingleSelection = k;
          i.ui.DropDownTree.MultipleSelection = d;
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.combobox.min",
      ["kendo.list.min", "kendo.mobile.scroller.min", "kendo.virtuallist.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          var f = window.kendo,
            v = f.ui,
            s = v.List,
            e = v.Select,
            h = f.caret,
            d = f.support,
            g = d.placeholder,
            y = f._activeElement,
            u = f.keys,
            i = ".kendoComboBox",
            p = i + "FocusEvent",
            o = "click" + i,
            c = "mousedown" + i,
            nt = "disabled",
            tt = "readonly",
            l = "change",
            ft = "k-i-loading",
            w = "k-state-default",
            it = "k-state-focused",
            b = "k-state-disabled",
            rt = "aria-disabled",
            et = "off",
            a = "filter",
            k = "accept",
            ut = "rebind",
            ot = "mouseenter" + i + " mouseleave" + i,
            r = n.proxy,
            st = /(\r\n|\n|\r)/gm,
            ht = e.extend({
              init: function (t, u) {
                var s,
                  h,
                  o = this;
                o.ns = i;
                u = n.isArray(u) ? { dataSource: u } : u;
                e.fn.init.call(o, t, u);
                u = o.options;
                t = o.element.on("focus" + i, r(o._focusHandler, o));
                u.placeholder = u.placeholder || t.attr("placeholder");
                o._reset();
                o._wrapper();
                o._input();
                o._clearButton();
                o._tabindex(o.input);
                o._popup();
                o._dataSource();
                o._ignoreCase();
                o._enable();
                o._attachFocusEvents();
                o._oldIndex = o.selectedIndex = -1;
                o._aria();
                o._initialIndex = u.index;
                o.requireValueMapper(o.options);
                o._initList();
                o._cascade();
                u.autoBind
                  ? o._filterSource()
                  : ((s = u.text),
                    !s && o._isSelect && (s = t.children(":selected").text()),
                    s && o._setText(s));
                s || o._placeholder();
                h = n(o.element).parents("fieldset").is(":disabled");
                h && o.enable(!1);
                f.notify(o);
                o._toggleCloseVisibility();
              },
              options: {
                name: "ComboBox",
                enabled: !0,
                index: -1,
                text: null,
                value: null,
                autoBind: !0,
                delay: 200,
                dataTextField: "",
                dataValueField: "",
                minLength: 1,
                enforceMinLength: !1,
                height: 200,
                highlightFirst: !0,
                filter: "none",
                placeholder: "",
                suggest: !1,
                cascadeFrom: "",
                cascadeFromField: "",
                cascadeFromParentField: "",
                ignoreCase: !0,
                animation: {},
                virtual: !1,
                template: null,
                groupTemplate: "#:data#",
                fixedGroupTemplate: "#:data#",
                clearButton: !0,
                syncValueAndText: !0,
                autoWidth: !1,
                popup: null,
              },
              events: [
                "open",
                "close",
                l,
                "select",
                "filtering",
                "dataBinding",
                "dataBound",
                "cascade",
                "set",
              ],
              setOptions: function (n) {
                var t = this._listOptions(n);
                e.fn.setOptions.call(this, n);
                this.listView.setOptions(t);
                this._accessors();
                this._aria();
                this._clearButton();
              },
              destroy: function () {
                var n = this;
                n.input.off(i);
                n.input.off(p);
                n.element.off(i);
                n.wrapper.off(i);
                n._inputWrapper.off(i);
                clearTimeout(n._pasteTimeout);
                n._arrow.off(o + " " + c);
                n._clear.off(o + " " + c);
                e.fn.destroy.call(n);
              },
              _change: function () {
                var n = this,
                  i = n.text(),
                  u = i && i !== n._oldText && i !== n.options.placeholder,
                  r = n.selectedIndex,
                  f = r === -1;
                return !n.options.syncValueAndText && !n.value() && f && u
                  ? ((n._old = ""),
                    (n._oldIndex = r),
                    (n._oldText = i),
                    n._typing || n.element.trigger(l),
                    n.trigger(l),
                    (n._typing = !1),
                    t)
                  : (e.fn._change.call(n), n._toggleCloseVisibility(), t);
              },
              _attachFocusEvents: function () {
                var n = this;
                n.input
                  .on("focus" + p, r(n._inputFocus, n))
                  .on("focusout" + p, r(n._inputFocusout, n));
              },
              _focusHandler: function () {
                this.input.focus();
              },
              _arrowClick: function () {
                this._toggle();
              },
              _inputFocus: function () {
                this._inputWrapper.addClass(it);
                this._placeholder(!1);
              },
              _inputFocusout: function () {
                var i,
                  r,
                  n = this,
                  u = n.value();
                return (
                  (n._userTriggered = !0),
                  n._inputWrapper.removeClass(it),
                  clearTimeout(n._typingTimeout),
                  (n._typingTimeout = null),
                  n.text(n.text()),
                  (i = n._focus()),
                  (r = this.listView.dataItemByIndex(
                    this.listView.getElementIndex(i)
                  )),
                  u !== n.value() &&
                  n.trigger("select", { dataItem: r, item: i })
                    ? (n.value(u), t)
                    : (n._placeholder(), n._blur(), n.element.blur(), t)
                );
              },
              _inputPaste: function () {
                var n = this;
                clearTimeout(n._pasteTimeout);
                n._pasteTimeout = null;
                n._pasteTimeout = setTimeout(function () {
                  n.search();
                });
              },
              _editable: function (n) {
                var t = this,
                  u = n.disable,
                  f = n.readonly,
                  e = t._inputWrapper.off(i),
                  s = t.element.add(t.input.off(i)),
                  h = t._arrow.off(o + " " + c),
                  l = t._clear;
                f || u
                  ? (e.addClass(u ? b : w).removeClass(u ? w : b),
                    s.attr(nt, u).attr(tt, f).attr(rt, u))
                  : (e.addClass(w).removeClass(b).on(ot, t._toggleHover),
                    s.removeAttr(nt).removeAttr(tt).attr(rt, !1),
                    h.on(o, r(t._arrowClick, t)).on(c, function (n) {
                      n.preventDefault();
                    }),
                    l.on(o + " touchend" + i, r(t._clearValue, t)),
                    t.input
                      .on("keydown" + i, r(t._keydown, t))
                      .on("input" + i, r(t._search, t))
                      .on("paste" + i, r(t._inputPaste, t)),
                    t.wrapper.on(o + i, r(t._focusHandler, t)));
                t._toggleCloseVisibility();
              },
              open: function () {
                var n = this,
                  t = n._state,
                  i =
                    !!n.dataSource.filter() &&
                    n.dataSource.filter().filters.length > 0,
                  r = !n.ul.find(n.listView.focus()).length;
                n.popup.visible() ||
                  ((!n.listView.bound() && t !== a) || t === k
                    ? ((n._open = !0),
                      (n._state = ut),
                      (1 !== n.options.minLength && !i) ||
                      (i && n.value() && n.selectedIndex === -1)
                        ? (n.refresh(),
                          n._openPopup(),
                          this.options.virtual || n.listView.bound(!1))
                        : n._filterSource())
                    : n._allowOpening() &&
                      ((n.popup._hovered = !0),
                      n._openPopup(),
                      n.options.virtual
                        ? n._focusItem()
                        : r &&
                          n.options.highlightFirst &&
                          n.listView.focus(0)));
              },
              _scrollToFocusedItem: function () {
                var n = this.listView;
                n.scrollToIndex(n.getElementIndex(n.focus()));
              },
              _openPopup: function () {
                this.popup.one("activate", r(this._scrollToFocusedItem, this));
                this.popup.open();
              },
              _updateSelectionState: function () {
                var n = this,
                  i = n.options.text,
                  r = n.options.value;
                n.listView.isFiltered() ||
                  (n.selectedIndex === -1
                    ? ((i !== t && null !== i) || (i = r),
                      n._accessor(r),
                      n.input.val(i || n.input.val()),
                      n._placeholder())
                    : n._oldIndex === -1 && (n._oldIndex = n.selectedIndex));
              },
              _buildOptions: function (n) {
                var r,
                  i = this;
                i._isSelect &&
                  ((r = i._customOption),
                  i._state === ut && (i._state = ""),
                  (i._customOption = t),
                  i._options(n, "", i.value()),
                  r &&
                    r[0].selected &&
                    !i.listView._emptySearch &&
                    i._custom(r.val()));
              },
              _updateSelection: function () {
                var r,
                  i = this,
                  u = i.listView,
                  f = i._initialIndex,
                  e = null !== f && f > -1,
                  o = i._state === a;
                return o
                  ? (n(u.focus()).removeClass("k-state-selected"), t)
                  : (i._fetch ||
                      (u.value().length ||
                        (e
                          ? i.select(f)
                          : i._accessor() && u.value(i._accessor())),
                      (i._initialIndex = null),
                      (r = u.selectedDataItems()[0]),
                      r &&
                        (i._value(r) !== i.value()
                          ? i._custom(i._value(r))
                          : i._value(r) !== i.element[0].value &&
                            i._accessor(i._value(r)),
                        i.text() &&
                          i.text() !== i._text(r) &&
                          i._selectValue(r))),
                    t);
              },
              _updateItemFocus: function () {
                var n = this.listView;
                this.options.highlightFirst
                  ? n.focus() || n.focusIndex() || n.focus(0)
                  : n.focus(-1);
              },
              _listBound: function () {
                var n = this,
                  r = n.input[0] === y(),
                  i = n.dataSource.flatView(),
                  u = n.listView.skip(),
                  f = i.length,
                  e = n.dataSource._group ? n.dataSource._group.length : 0,
                  o = u === t || 0 === u;
                n._presetValue = !1;
                n._renderFooter();
                n._renderNoData();
                n._toggleNoData(!f);
                n._toggleHeader(!!e && !!f);
                n._resizePopup();
                n.popup.position();
                n._buildOptions(i);
                n._makeUnselectable();
                n._updateSelection();
                i.length &&
                  o &&
                  (n._updateItemFocus(),
                  n.options.suggest && r && n.input.val() && n.suggest(i[0]));
                n._open &&
                  ((n._open = !1),
                  n._typingTimeout && !r
                    ? n.popup.close()
                    : n.toggle(n._allowOpening()),
                  (n._typingTimeout = null));
                n._hideBusy();
                n.trigger("dataBound");
              },
              _listChange: function () {
                this._selectValue(this.listView.selectedDataItems()[0]);
                this._presetValue && (this._oldIndex = this.selectedIndex);
              },
              _get: function (n) {
                var i, r, t;
                if ("function" == typeof n) {
                  for (i = this.dataSource.flatView(), t = 0; t < i.length; t++)
                    if (n(i[t])) {
                      n = t;
                      r = !0;
                      break;
                    }
                  r || (n = -1);
                }
                return n;
              },
              _select: function (n, t) {
                var i = this;
                return (
                  (n = i._get(n)),
                  n === -1 && ((i.input[0].value = ""), i._accessor("")),
                  i.listView.select(n).done(function () {
                    t || i._state !== a || (i._state = k);
                    i._toggleCloseVisibility();
                  })
                );
              },
              _selectValue: function (n) {
                var i = this.listView.select(),
                  r = "",
                  u = "";
                i = i[i.length - 1];
                i === t && (i = -1);
                this.selectedIndex = i;
                this.listView.isFiltered() &&
                  i !== -1 &&
                  (this._valueBeforeCascade = this._old);
                i !== -1 || n
                  ? ((n || 0 === n) &&
                      ((r = this._dataValue(n)), (u = this._text(n))),
                    null === r && (r = ""))
                  : (this.options.syncValueAndText
                      ? ((u =
                          this.options.dataTextField ===
                          this.options.dataValueField
                            ? this._accessor()
                            : this.input[0].value),
                        (r = u))
                      : (u = this.text()),
                    this.listView.focus(-1));
                this._setDomInputValue(u);
                this._accessor(r !== t ? r : u, i);
                this._placeholder();
                this._triggerCascade();
              },
              _setDomInputValue: function (n) {
                var t,
                  i,
                  u = this,
                  r = h(this.input);
                r && r.length && (t = r[0]);
                this._prev = this.input[0].value = n;
                t &&
                  this.selectedIndex === -1 &&
                  ((i = d.mobileOS),
                  i.wp || i.android
                    ? setTimeout(function () {
                        u.input[0].setSelectionRange(t, t);
                      }, 0)
                    : this.input[0].setSelectionRange(t, t));
              },
              refresh: function () {
                this.listView.refresh();
              },
              _toggleCloseVisibility: function () {
                var n =
                  this.element.is(":disabled") || this.element.is("[readonly]");
                this.text() && !n ? this._showClear() : this._hideClear();
              },
              suggest: function (n) {
                var c,
                  r = this,
                  o = r.input[0],
                  i = r.text(),
                  e = h(o)[0],
                  l = r._last,
                  f = r.dataSource.options.accentFoldingFiltering;
                return l == u.BACKSPACE || l == u.DELETE
                  ? ((r._last = t), t)
                  : ((n = n || ""),
                    "string" != typeof n &&
                      (n[0] &&
                        (n = r.dataSource.view()[s.inArray(n[0], r.ul[0])]),
                      (n = n ? r._text(n) : "")),
                    e <= 0 &&
                      (e =
                        (f ? i.toLocaleLowerCase(f) : i.toLowerCase()).indexOf(
                          f ? n.toLocaleLowerCase(f) : n.toLowerCase()
                        ) + 1),
                    n
                      ? ((n = "" + n),
                        (c = (
                          f ? n.toLocaleLowerCase(f) : n.toLowerCase()
                        ).indexOf(
                          f ? i.toLocaleLowerCase(f) : i.toLowerCase()
                        )),
                        c > -1 && (i += n.substring(c + i.length)))
                      : (i = i.substring(0, e)),
                    (i.length === e && n) ||
                      ((o.value = i), o === y() && h(o, e, i.length)),
                    t);
              },
              text: function (n) {
                var i, u, e, f, r, o;
                return (
                  (n = null === n ? "" : n),
                  (i = this),
                  (u = i.input[0]),
                  (e = i.options.ignoreCase),
                  (f = n),
                  n === t
                    ? u.value
                    : i.options.autoBind !== !1 || i.listView.bound()
                    ? ((r = i.dataItem()),
                      r &&
                      i._text(r).replace &&
                      i._text(r).replace(st, "") === n &&
                      ((o = i._value(r)), o === s.unifyType(i._old, typeof o))
                        ? (i._triggerCascade(), t)
                        : (e && (f = f.toLowerCase()),
                          (i.dataItem() && i._text(i.dataItem()) === n) ||
                            (i
                              ._select(function (n) {
                                return (
                                  (n = i._text(n)),
                                  e && (n = (n + "").toLowerCase()),
                                  n === f
                                );
                              })
                              .done(function () {
                                i.selectedIndex < 0 &&
                                  ((u.value = n),
                                  i.options.syncValueAndText && i._accessor(n),
                                  (i._cascadeTriggered = !0),
                                  i._triggerCascade());
                                i._prev = u.value;
                              }),
                            i._toggleCloseVisibility()),
                          t))
                    : (i._setText(n), t)
                );
              },
              toggle: function (n) {
                this._toggle(n, !0);
              },
              value: function (n) {
                var i = this,
                  u = i.options,
                  r = i.listView;
                return n === t
                  ? ((n = i._accessor() || i.listView.value()[0]),
                    n === t || null === n ? "" : n)
                  : (i.requireValueMapper(i.options, n),
                    i.trigger("set", { value: n }),
                    (n === u.value && i.input.val() === u.text) ||
                      (i._accessor(n),
                      i._isFilterEnabled() && r.bound() && r.isFiltered()
                        ? i._clearFilter()
                        : i._fetchData(),
                      r.value(n).done(function () {
                        i.selectedIndex !== -1 ||
                          (r._selectedDataItems &&
                            r._selectedDataItems.length) ||
                          (i._accessor(n), i.input.val(n), i._placeholder(!0));
                        i._old = i._valueBeforeCascade = i._accessor();
                        i._oldIndex = i.selectedIndex;
                        i._prev = i.input.val();
                        i._state === a && (i._state = k);
                        i._toggleCloseVisibility();
                      })),
                    t);
              },
              _hideBusy: function () {
                var n = this;
                clearTimeout(n._busy);
                n._arrowIcon.removeClass(ft);
                n._focused.attr("aria-busy", !1);
                n._busy = null;
                n._toggleCloseVisibility();
              },
              _click: function (n) {
                var i = this,
                  u = n.item,
                  r = i.listView.dataItemByIndex(i.listView.getElementIndex(u)),
                  f = !0;
                return (
                  n.preventDefault(),
                  r &&
                    ((f =
                      i._value(r) !==
                      s.unifyType(i.value(), typeof i._value(r))),
                    f || i.input.val(i._text(r))),
                  f && i.trigger("select", { dataItem: r, item: u })
                    ? (i.close(), t)
                    : ((i._userTriggered = !0),
                      i._select(u).done(function () {
                        i._blur();
                      }),
                      t)
                );
              },
              _syncValueAndText: function () {
                return this.options.syncValueAndText;
              },
              _inputValue: function () {
                return this.text();
              },
              _searchByWord: function (n) {
                var r,
                  i = this,
                  u = i.options,
                  f = i.dataSource,
                  e = u.ignoreCase,
                  o = function (r) {
                    var u = i._text(r);
                    if (u !== t)
                      return (
                        (u += ""),
                        ("" === u || "" !== n) &&
                          (e && (u = u.toLowerCase()), 0 === u.indexOf(n))
                      );
                  };
                return (
                  e && (n = n.toLowerCase()),
                  i.ul[0].firstChild
                    ? (this.listView.focus(this._get(o)),
                      (r = this.listView.focus()),
                      r && (u.suggest && i.suggest(r), this.open()),
                      this.options.highlightFirst &&
                        !n &&
                        this.listView.focusFirst(),
                      t)
                    : (f
                        .one(l, function () {
                          f.view()[0] && i.search(n);
                        })
                        .fetch(),
                      t)
                );
              },
              _input: function () {
                var i,
                  e,
                  t = this,
                  r = t.element.removeClass("k-input")[0],
                  o = r.accessKey,
                  u = t.wrapper,
                  s = "input.k-input",
                  f = r.name || "";
                f && (f = 'name="' + f + '_input" ');
                i = u.find(s);
                i[0] ||
                  (u
                    .append(
                      '<span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input ' +
                        f +
                        'class="k-input" type="text" autocomplete="' +
                        et +
                        '"/><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>'
                    )
                    .append(t.element),
                  (i = u.find(s)));
                i[0].style.cssText = r.style.cssText;
                i[0].title = r.title;
                e = parseInt(
                  this.element.prop("maxlength") ||
                    this.element.attr("maxlength"),
                  10
                );
                e > -1 && (i[0].maxLength = e);
                i.addClass(r.className)
                  .css({ width: "", height: r.style.height })
                  .attr({ role: "combobox", "aria-expanded": !1 })
                  .show();
                g && i.attr("placeholder", t.options.placeholder);
                o && ((r.accessKey = ""), (i[0].accessKey = o));
                t._focused = t.input = i;
                t._inputWrapper = n(u[0].firstChild);
                t._arrow = u
                  .find(".k-select")
                  .attr({ role: "button", tabIndex: -1 });
                t._arrowIcon = t._arrow.find(".k-icon");
                r.id && t._arrow.attr("aria-controls", t.ul[0].id);
              },
              _clearButton: function () {
                s.fn._clearButton.call(this);
                this.options.clearButton &&
                  (this._clear.insertAfter(this.input),
                  this.wrapper.addClass("k-combobox-clearable"));
              },
              _keydown: function (n) {
                var f,
                  i,
                  e,
                  t = this,
                  r = n.keyCode;
                if (
                  ((t._last = r),
                  clearTimeout(t._typingTimeout),
                  (t._typingTimeout = null),
                  r === u.HOME)
                )
                  t._firstItem();
                else if (r === u.END) t._lastItem();
                else if (r === u.ENTER || (r === u.TAB && t.popup.visible()))
                  if (
                    ((f = t.listView.focus()),
                    (i = t.dataItem()),
                    (e = !0),
                    t.popup.visible() ||
                      (i && t.text() === t._text(i)) ||
                      (f = null),
                    f)
                  ) {
                    if (
                      (t.popup.visible() && n.preventDefault(),
                      (i = t.listView.dataItemByIndex(
                        t.listView.getElementIndex(f)
                      )),
                      i &&
                        (e =
                          t._value(i) !==
                          s.unifyType(t.value(), typeof t._value(i))),
                      e && t.trigger("select", { dataItem: i, item: f }))
                    )
                      return;
                    t._userTriggered = !0;
                    t._select(f).done(function () {
                      t._blur();
                      t._valueBeforeCascade = t._old = t.value();
                    });
                  } else
                    (t._syncValueAndText() || t._isSelect) &&
                      t._accessor(t.input.val()),
                      t.listView.value(t.input.val()),
                      t._blur();
                else
                  r == u.TAB || t._move(n)
                    ? r === u.ESC &&
                      !t.popup.visible() &&
                      t.text() &&
                      t._clearValue()
                    : t._search();
              },
              _placeholder: function (n) {
                if (!g) {
                  var u,
                    f = this,
                    i = f.input,
                    r = f.options.placeholder;
                  if (r) {
                    if (
                      ((u = f.value()),
                      n === t && (n = !u),
                      i.toggleClass("k-readonly", n),
                      !n)
                    ) {
                      if (u) return;
                      r = "";
                    }
                    i.val(r);
                    r || i[0] !== y() || h(i[0], 0, 0);
                  }
                }
              },
              _search: function () {
                var n = this;
                clearTimeout(n._typingTimeout);
                n._typingTimeout = setTimeout(function () {
                  var t = n.text();
                  n._prev !== t &&
                    ((n._prev = t),
                    "none" === n.options.filter &&
                      n.options.virtual &&
                      n.listView.select(-1),
                    n.search(t),
                    n._toggleCloseVisibility());
                  n._typingTimeout = null;
                }, n.options.delay);
              },
              _setText: function (n) {
                this.input.val(n);
                this._prev = n;
              },
              _wrapper: function () {
                var i = this,
                  n = i.element,
                  t = n.parent();
                t.is("span.k-widget") ||
                  ((t = n.hide().wrap("<span />").parent()),
                  (t[0].style.cssText = n[0].style.cssText));
                i.wrapper = t
                  .addClass("k-widget k-combobox")
                  .addClass(n[0].className)
                  .css("display", "");
              },
              _clearSelection: function (n, t) {
                var i = this,
                  r = n.value(),
                  u = r && n.selectedIndex === -1;
                (this.selectedIndex == -1 && this.value()) ||
                  ((t || !r || u) &&
                    ((i.options.value = ""),
                    i.value(""),
                    (i._selectedValue = null)));
              },
              _preselect: function (n, t) {
                this.input.val(t);
                this._accessor(n);
                this._old = this._accessor();
                this._oldIndex = this.selectedIndex;
                this.listView.setValue(n);
                this._placeholder();
                this._initialIndex = null;
                this._presetValue = !0;
                this._toggleCloseVisibility();
              },
              _clearValue: function () {
                e.fn._clearValue.call(this);
                this.input.focus();
              },
            });
          v.plugin(ht);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.multiselect.min",
      ["kendo.list.min", "kendo.mobile.scroller.min", "kendo.virtuallist.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function lt(n, t) {
            var i;
            if (
              (null === n && null !== t) ||
              (null !== n && null === t) ||
              ((i = n.length), i !== t.length)
            )
              return !1;
            for (; i--; ) if (n[i] !== t[i]) return !1;
            return !0;
          }
          var r = window.kendo,
            d = r.ui,
            e = d.List,
            i = n.extend({ A: 65 }, r.keys),
            g = r._activeElement,
            at = r.data.ObservableArray,
            f = n.proxy,
            s = "id",
            v = "li",
            o = "accept",
            h = "filter",
            y = "rebind",
            nt = "open",
            tt = "close",
            p = "change",
            vt = "progress",
            w = "select",
            c = "deselect",
            it = "aria-disabled",
            l = "k-state-focused",
            rt = "k-state-selected",
            b = "k-hidden",
            ut = "k-state-hover",
            ft = "k-state-disabled",
            et = "k-no-click",
            ot = "disabled",
            st = "readonly",
            yt = "off",
            u = ".kendoMultiSelect",
            k = "click" + u,
            pt = "keydown" + u,
            ht = "mouseenter" + u,
            ct = "mouseleave" + u,
            wt = ht + " " + ct,
            bt = /"/g,
            a = n.isArray,
            kt = [
              "font-family",
              "font-size",
              "font-stretch",
              "font-style",
              "font-weight",
              "letter-spacing",
              "text-transform",
              "line-height",
            ],
            dt = e.extend({
              init: function (t, i) {
                var o,
                  h,
                  f = this;
                f.ns = u;
                e.fn.init.call(f, t, i);
                f._optionsMap = {};
                f._customOptions = {};
                f._wrapper();
                f._tagList();
                f._input();
                f._textContainer();
                f._loader();
                f._clearButton();
                f._tabindex(f.input);
                t = f.element.attr("multiple", "multiple").hide();
                i = f.options;
                i.placeholder || (i.placeholder = t.data("placeholder"));
                o = t.attr(s);
                o &&
                  ((f._tagID = o + "_tag_active"),
                  (o += "_taglist"),
                  f.tagList.attr(s, o),
                  f.input.attr("aria-describedby", o));
                f._initialOpen = !0;
                f._ariaLabel();
                f._ariaSetLive();
                f._dataSource();
                f._ignoreCase();
                f._popup();
                f._tagTemplate();
                f.requireValueMapper(f.options);
                f._initList();
                f._reset();
                f._enable();
                f._placeholder();
                i.autoBind
                  ? f.dataSource.fetch()
                  : i.value && f._preselect(i.value);
                h = n(f.element).parents("fieldset").is(":disabled");
                h && f.enable(!1);
                f._ariaSetSize(f.value().length);
                r.notify(f);
                f._toggleCloseVisibility();
              },
              options: {
                name: "MultiSelect",
                tagMode: "multiple",
                enabled: !0,
                autoBind: !0,
                autoClose: !0,
                highlightFirst: !0,
                dataTextField: "",
                dataValueField: "",
                filter: "startswith",
                ignoreCase: !0,
                minLength: 1,
                messages: {
                  singleTag: "item(s) selected",
                  clear: "clear",
                  deleteTag: "delete",
                  noData: "No data found.",
                },
                enforceMinLength: !1,
                delay: 100,
                value: null,
                maxSelectedItems: null,
                placeholder: "",
                height: 200,
                animation: {},
                virtual: !1,
                itemTemplate: "",
                tagTemplate: "",
                groupTemplate: "#:data#",
                fixedGroupTemplate: "#:data#",
                clearButton: !0,
                autoWidth: !1,
                popup: null,
              },
              events: [
                nt,
                tt,
                p,
                w,
                c,
                "filtering",
                "dataBinding",
                "dataBound",
              ],
              setDataSource: function (n) {
                this.options.dataSource = n;
                this._state = "";
                this._dataSource();
                this.persistTagList = !1;
                this.listView.setDataSource(this.dataSource);
                this.options.autoBind && this.dataSource.fetch();
              },
              setOptions: function (n) {
                var t = this._listOptions(n);
                e.fn.setOptions.call(this, n);
                this.listView.setOptions(t);
                this._accessors();
                this._aria(this.tagList.attr(s));
                this._tagTemplate();
                this._placeholder();
                this._clearButton();
              },
              currentTag: function (n) {
                var i = this;
                return n === t
                  ? i._currentTag
                  : (i._currentTag &&
                      (i._currentTag.removeClass(l).removeAttr(s),
                      i._currentTag.find(".k-select").attr("aria-hidden", !0),
                      i.input.removeAttr("aria-activedescendant")),
                    n &&
                      (n.addClass(l).attr(s, i._tagID),
                      n.find(".k-select").removeAttr("aria-hidden"),
                      i.input.attr("aria-activedescendant", i._tagID)),
                    (i._currentTag = n),
                    t);
              },
              dataItems: function () {
                return this.listView.selectedDataItems();
              },
              destroy: function () {
                var n = this,
                  t = n.ns;
                clearTimeout(n._busy);
                clearTimeout(n._typingTimeout);
                n.wrapper.off(t);
                n.tagList.off(t);
                n.input.off(t);
                n._clear.off(t);
                e.fn.destroy.call(n);
              },
              _activateItem: function () {
                this.popup.visible() && e.fn._activateItem.call(this);
                this.currentTag(null);
              },
              _listOptions: function (t) {
                var u = this,
                  i = e.fn._listOptions.call(
                    u,
                    n.extend(t, {
                      selectedItemChange: f(u._selectedItemChange, u),
                      selectable: "multiple",
                    })
                  ),
                  s = this.options.itemTemplate || this.options.template,
                  o = i.itemTemplate || s || i.template;
                return (
                  o || (o = "#:" + r.expr(i.dataTextField, "data") + "#"),
                  (i.template = o),
                  i
                );
              },
              _setListValue: function () {
                e.fn._setListValue.call(this, this._initialValues.slice(0));
              },
              _listChange: function (n) {
                var i,
                  r = this.dataSource.flatView(),
                  u = this._optionsMap,
                  f = this._value;
                for (
                  this._state === y && (this._state = ""), i = 0;
                  i < n.added.length;
                  i++
                )
                  if (u[f(n.added[i].dataItem)] === t) {
                    this._render(r);
                    break;
                  }
                this._selectValue(n.added, n.removed);
              },
              _selectedItemChange: function (n) {
                for (var i, r = n.items, t = 0; t < r.length; t++)
                  (i = r[t]),
                    this.tagList
                      .children()
                      .eq(i.index)
                      .children("span:first")
                      .html(this.tagTextTemplate(i.item));
              },
              _wrapperMousedown: function (t) {
                var i = this,
                  e = "input" !== t.target.nodeName.toLowerCase(),
                  f = n(t.target),
                  u = f.hasClass("k-select") || f.hasClass("k-icon");
                u &&
                  (u = !f.closest(".k-select").children(".k-i-arrow-60-down")
                    .length);
                !e ||
                  (u && r.support.mobileOS) ||
                  !t.cancelable ||
                  t.preventDefault();
                u ||
                  (i.input[0] !== g() && e && i.input.focus(),
                  1 === i.options.minLength && i.open());
              },
              _inputFocus: function () {
                this._placeholder(!1);
                this.wrapper.addClass(l);
              },
              _inputFocusout: function () {
                var n = this;
                clearTimeout(n._typingTimeout);
                n.wrapper.removeClass(l);
                n._placeholder(!n.listView.selectedDataItems()[0], !0);
                n.close();
                n._state === h && ((n._state = o), n.listView.skipUpdate(!0));
                n.listView.bound() &&
                  n.listView.isFiltered() &&
                  ((n.persistTagList = !0), n._clearFilter());
                n.element.blur();
              },
              _removeTag: function (n, i) {
                var s,
                  a,
                  l,
                  r = this,
                  v = r._state,
                  e = n.index(),
                  u = r.listView,
                  y = u.value()[e],
                  w = r.listView.selectedDataItems()[e],
                  f = r._customOptions[y],
                  p = u.element[0].children;
                return r.trigger(c, { dataItem: w, item: n })
                  ? (r._close(), t)
                  : (f !== t || (v !== o && v !== h) || (f = r._optionsMap[y]),
                    (l = function () {
                      r.currentTag(null);
                      i && r._change();
                      r._close();
                    }),
                    f === t && u.select().length
                      ? ((r.persistTagList = !1),
                        u.select(u.select()[e]).done(l))
                      : ((s = r.element[0].children[f]),
                        s && (s.selected = !1),
                        u.removeAt(e),
                        (a = p[f]),
                        a && p[f].classList.remove("k-state-selected"),
                        "single" !== r.options.tagMode
                          ? n.remove()
                          : r._updateTagListHTML(),
                        l()),
                    t);
              },
              _tagListClick: function (t) {
                t.preventDefault();
                t.stopPropagation();
                var i = n(t.currentTarget);
                i.children(".k-i-arrow-60-down").length ||
                  this._removeTag(i.closest(v), !0);
              },
              _clearValue: function () {
                var t = this;
                "single" === t.options.tagMode
                  ? t._clearSingleTagValue()
                  : t.tagList.children().each(function (i, r) {
                      t._removeTag(n(r), !1);
                    });
                t.input.val("");
                t._search();
                t._change();
                t.focus();
                t._hideClear();
                t._state === h && (t._state = o);
              },
              _clearSingleTagValue: function () {
                var n = this,
                  t = n.persistTagList;
                t && (n.persistTagList = !1);
                n.listView.value([]);
                n.persistTagList = t;
              },
              _focusHandler: function () {
                this.input.focus();
              },
              _editable: function (t) {
                var i = this,
                  r = t.disable,
                  e = t.readonly,
                  o = i.wrapper.off(u),
                  h = i.tagList.off(u),
                  s = i.element.add(i.input.off(u));
                e || r
                  ? (o.toggleClass(ft, r).toggleClass(et, e),
                    s.attr(ot, r).attr(st, e).attr(it, r))
                  : (o
                      .removeClass(ft)
                      .removeClass(et)
                      .on(wt, i._toggleHover)
                      .on(
                        "mousedown" + u + " touchend" + u,
                        f(i._wrapperMousedown, i)
                      )
                      .on(k, f(i._focusHandler, i)),
                    i.input
                      .on(pt, f(i._keydown, i))
                      .on("paste" + u, f(i._search, i))
                      .on("input" + u, f(i._search, i))
                      .on("focus" + u, f(i._inputFocus, i))
                      .on("focusout" + u, f(i._inputFocusout, i)),
                    i._clear.on(k + " touchend" + u, f(i._clearValue, i)),
                    s.removeAttr(ot).removeAttr(st).attr(it, !1),
                    h
                      .on(ht, v, function () {
                        n(this).addClass(ut);
                      })
                      .on(ct, v, function () {
                        n(this).removeClass(ut);
                      })
                      .on(
                        k + " touchend" + u,
                        "li.k-button .k-select",
                        f(i._tagListClick, i)
                      ));
              },
              _close: function () {
                var n = this;
                n.options.autoClose ? n.close() : n.popup.position();
              },
              _filterSource: function (n, t) {
                t || (t = this._retrieveData);
                this._retrieveData = !1;
                e.fn._filterSource.call(this, n, t);
              },
              close: function () {
                this._activeItem = null;
                this.input.removeAttr("aria-activedescendant");
                this.popup.close();
              },
              open: function () {
                var t = this;
                t._request && (t._retrieveData = !1);
                t._retrieveData || !t.listView.bound() || t._state === o
                  ? ((t._open = !0),
                    (t._state = y),
                    t.listView.skipUpdate(!0),
                    (t.persistTagList = !(
                      t._initialOpen && !t.listView.bound()
                    )),
                    t._filterSource(),
                    t._focusItem())
                  : t._allowOpening() &&
                    (!t._initialOpen ||
                      t.options.autoBind ||
                      t.options.virtual ||
                      !t.options.value ||
                      n.isPlainObject(t.options.value[0]) ||
                      t.value(t.value() || t._initialValues),
                    (t.popup._hovered = !0),
                    (t._initialOpen = !1),
                    t.popup.open(),
                    t._focusItem());
              },
              toggle: function (n) {
                n = n !== t ? n : !this.popup.visible();
                this[n ? nt : tt]();
              },
              refresh: function () {
                this.listView.refresh();
              },
              _listBound: function () {
                var n = this,
                  i = n.dataSource.flatView(),
                  r = n.listView.skip();
                n._render(i);
                n._renderFooter();
                n._renderNoData();
                n._toggleNoData(!i.length);
                n._resizePopup();
                n._open && ((n._open = !1), n.toggle(n._allowOpening()));
                n.popup.position();
                !n.options.highlightFirst ||
                  (r !== t && 0 !== r) ||
                  n.listView.focusFirst();
                n._touchScroller && n._touchScroller.reset();
                n._hideBusy();
                n._makeUnselectable();
                n.trigger("dataBound");
              },
              _inputValue: function () {
                var t = this,
                  n = t.input.val();
                return t.options.placeholder === n && (n = ""), n;
              },
              value: function (n) {
                var i = this,
                  r = i.listView,
                  e = r.value().slice(),
                  u = i.options.maxSelectedItems,
                  f = r.bound() && r.isFiltered();
                return n === t
                  ? e
                  : ((i.persistTagList = !1),
                    i.requireValueMapper(i.options, n),
                    (n = i._normalizeValues(n)),
                    null !== u && n.length > u && (n = n.slice(0, u)),
                    f && i._clearFilter(),
                    r.value(n),
                    (i._old = i._valueBeforeCascade = n.slice()),
                    f || i._fetchData(),
                    i._ariaSetSize(i.value().length),
                    i._toggleCloseVisibility(),
                    t);
              },
              _preselect: function (t, i) {
                var u = this;
                a(t) || t instanceof r.data.ObservableArray || (t = [t]);
                (n.isPlainObject(t[0]) ||
                  t[0] instanceof r.data.ObservableObject ||
                  !u.options.dataValueField) &&
                  (u.dataSource.data(t),
                  u.value(i || u._initialValues),
                  (u._retrieveData = !0));
              },
              _setOption: function (n, t) {
                var i = this.element[0].children[this._optionsMap[n]];
                i && (i.selected = t);
              },
              _fetchData: function () {
                var n = this,
                  t = !!n.dataSource.view().length,
                  i = 0 === n.listView.value().length;
                i ||
                  n._request ||
                  ((n._retrieveData || (!n._fetch && !t)) &&
                    ((n._fetch = !0),
                    (n._retrieveData = !1),
                    n.dataSource.read().done(function () {
                      n._fetch = !1;
                    })));
              },
              _isBound: function () {
                return this.listView.bound() && !this._retrieveData;
              },
              _dataSource: function () {
                var n = this,
                  u = n.element,
                  i = n.options,
                  t = i.dataSource || {};
                t = a(t) ? { data: t } : t;
                t.select = u;
                t.fields = [
                  { field: i.dataTextField },
                  { field: i.dataValueField },
                ];
                n.dataSource && n._refreshHandler
                  ? n._unbindDataSource()
                  : ((n._progressHandler = f(n._showBusy, n)),
                    (n._errorHandler = f(n._hideBusy, n)));
                n.dataSource = r.data.DataSource.create(t)
                  .bind(vt, n._progressHandler)
                  .bind("error", n._errorHandler);
              },
              _reset: function () {
                var t = this,
                  i = t.element,
                  r = i.attr("form"),
                  u = r ? n("#" + r) : i.closest("form");
                u[0] &&
                  ((t._resetHandler = function () {
                    setTimeout(function () {
                      t.value(t._initialValues);
                      t._placeholder();
                    });
                  }),
                  (t._form = u.on("reset", t._resetHandler)));
              },
              _initValue: function () {
                var n = this.options.value || this.element.val();
                this._old = this._initialValues = this._normalizeValues(n);
              },
              _normalizeValues: function (t) {
                var i = this;
                return (
                  null === t
                    ? (t = [])
                    : t && n.isPlainObject(t)
                    ? (t = [i._value(t)])
                    : t && n.isPlainObject(t[0])
                    ? (t = n.map(t, function (n) {
                        return i._value(n);
                      }))
                    : a(t) || t instanceof at
                    ? a(t) && (t = t.slice())
                    : (t = [t]),
                  t
                );
              },
              _change: function () {
                var n = this,
                  t = n.value();
                lt(t, n._old) ||
                  ((n._old = t.slice()), n.trigger(p), n.element.trigger(p));
                n.popup.position();
                n._ariaSetSize(t.length);
                n._toggleCloseVisibility();
              },
              _click: function (n) {
                var t = this,
                  i = n.item;
                n.preventDefault();
                t._select(i).done(function () {
                  t._activeItem = i;
                  t._change();
                  t._close();
                });
              },
              _getActiveItem: function () {
                return (
                  this._activeItem ||
                  n(
                    this.listView.items()[this._getSelectedIndices().length - 1]
                  ) ||
                  this.listView.focus()
                );
              },
              _getSelectedIndices: function () {
                return (
                  this.listView._selectedIndices ||
                  this.listView._selectedIndexes
                );
              },
              _keydown: function (u) {
                var a,
                  p,
                  w,
                  b,
                  f = this,
                  h = u.keyCode,
                  s = f._currentTag,
                  e = f.listView,
                  l = f.input.val(),
                  v = r.support.isRtl(f.wrapper),
                  c = f.popup.visible(),
                  y = 0;
                if (
                  (h !== i.ENTER && (this._multipleSelection = !1),
                  h === i.DOWN)
                ) {
                  if ((u.preventDefault(), !c))
                    return f.open(), e.focus() || e.focusFirst(), t;
                  e.focus()
                    ? (!f._activeItem &&
                        u.shiftKey &&
                        ((f._activeItem = e.focus()), (y = -1)),
                      (a = e.getElementIndex(f._getActiveItem().first())),
                      e.focusNext(),
                      e.focus()
                        ? u.shiftKey &&
                          ((this._multipleSelection = !0),
                          f._selectRange(
                            a,
                            e.getElementIndex(e.focus().first()) + y
                          ))
                        : e.focusLast())
                    : e.focusFirst();
                } else if (h === i.UP)
                  c &&
                    (!f._activeItem &&
                      u.shiftKey &&
                      ((f._activeItem = e.focus()), (y = 1)),
                    (a = e.getElementIndex(f._getActiveItem().first())),
                    e.focusPrev(),
                    e.focus()
                      ? u.shiftKey &&
                        ((this._multipleSelection = !0),
                        f._selectRange(
                          a,
                          e.getElementIndex(e.focus().first()) + y
                        ))
                      : f.close()),
                    u.preventDefault();
                else if ((h === i.LEFT && !v) || (h === i.RIGHT && v))
                  l ||
                    ((s = s ? s.prev() : n(f.tagList[0].lastChild)),
                    s[0] && f.currentTag(s));
                else if ((h === i.RIGHT && !v) || (h === i.LEFT && v))
                  !l && s && ((s = s.next()), f.currentTag(s[0] ? s : null));
                else if (
                  u.ctrlKey &&
                  !u.altKey &&
                  h === i.A &&
                  c &&
                  !f.options.virtual
                )
                  (this._multipleSelection = !0),
                    this._getSelectedIndices().length === e.items().length &&
                      (f._activeItem = null),
                    e.items().length && f._selectRange(0, e.items().length - 1);
                else if (h === i.ENTER && c) {
                  if (!e.focus()) return;
                  if (
                    (u.preventDefault(),
                    this._multipleSelection &&
                      ((this._multipleSelection = !1), e.focus().hasClass(rt)))
                  )
                    return f._close(), t;
                  f._select(e.focus()).done(function () {
                    f._change();
                    f._close();
                  });
                } else if (h === i.SPACEBAR && u.ctrlKey && c)
                  f._activeItem &&
                    e.focus() &&
                    e.focus()[0] === f._activeItem[0] &&
                    (f._activeItem = null),
                    n(e.focus()).hasClass(rt) || (f._activeItem = e.focus()),
                    f._select(e.focus()).done(function () {
                      f._change();
                    }),
                    u.preventDefault();
                else if (h === i.SPACEBAR && u.shiftKey && c)
                  (p = e.getElementIndex(f._getActiveItem())),
                    (w = e.getElementIndex(e.focus())),
                    p !== t && w !== t && f._selectRange(p, w),
                    u.preventDefault();
                else if (h === i.ESC)
                  c
                    ? u.preventDefault()
                    : (f.tagList.children().each(function (t, i) {
                        f._removeTag(n(i), !1);
                      }),
                      f._change()),
                    f.close();
                else if (h === i.HOME)
                  c
                    ? e.focus()
                      ? (u.ctrlKey &&
                          u.shiftKey &&
                          !f.options.virtual &&
                          f._selectRange(e.getElementIndex(e.focus()[0]), 0),
                        e.focusFirst())
                      : f.close()
                    : l ||
                      ((s = f.tagList[0].firstChild), s && f.currentTag(n(s)));
                else if (h === i.END)
                  c
                    ? e.focus()
                      ? (u.ctrlKey &&
                          u.shiftKey &&
                          !f.options.virtual &&
                          f._selectRange(
                            e.getElementIndex(e.focus()[0]),
                            e.element.children().length - 1
                          ),
                        e.focusLast())
                      : f.close()
                    : l ||
                      ((s = f.tagList[0].lastChild), s && f.currentTag(n(s)));
                else if ((h !== i.DELETE && h !== i.BACKSPACE) || l)
                  !f.popup.visible() || (h !== i.PAGEDOWN && h !== i.PAGEUP)
                    ? (clearTimeout(f._typingTimeout),
                      setTimeout(function () {
                        f._scale();
                      }),
                      f._search())
                    : (u.preventDefault(),
                      (b = h === i.PAGEDOWN ? 1 : -1),
                      e.scrollWith(b * e.screenHeight()));
                else {
                  if (((f._state = o), "single" === f.options.tagMode))
                    return f._clearSingleTagValue(), f._change(), f._close(), t;
                  h !== i.BACKSPACE || s || (s = n(f.tagList[0].lastChild));
                  s && s[0] && f._removeTag(s, !0);
                }
              },
              _hideBusy: function () {
                var n = this;
                clearTimeout(n._busy);
                n.input.attr("aria-busy", !1);
                n._loading.addClass(b);
                n._request = !1;
                n._busy = null;
                n._toggleCloseVisibility();
              },
              _showBusyHandler: function () {
                this.input.attr("aria-busy", !0);
                this._loading.removeClass(b);
                this._hideClear();
              },
              _showBusy: function () {
                var n = this;
                n._request = !0;
                n._busy ||
                  (n._busy = setTimeout(f(n._showBusyHandler, n), 100));
              },
              _placeholder: function (n, i) {
                var u = this,
                  f = u.input,
                  s = g(),
                  h = u.options.placeholder,
                  e = f.val(),
                  c = f[0] === s,
                  o = e.length;
                (c && !u.options.autoClose && e !== h) || ((o = 0), (e = ""));
                n === t &&
                  ((n = !1),
                  f[0] !== s && (n = !u.listView.selectedDataItems()[0]));
                u._prev = e;
                f.toggleClass("k-readonly", n).val(n ? h : e);
                c && !i && r.caret(f[0], o, o);
                u._scale();
              },
              _scale: function () {
                var n,
                  t = this,
                  r = t.wrapper.find(".k-multiselect-wrap"),
                  u = r.width(),
                  i = t._span.text(t.input.val());
                r.is(":visible")
                  ? (n = i.width() + 25)
                  : (i.appendTo(document.documentElement),
                    (u = n = i.width() + 25),
                    i.appendTo(r));
                t.input.width(n > u ? u : n);
              },
              _option: function (n, i, u) {
                var f = "<option";
                return (
                  n !== t &&
                    ((n += ""),
                    n.indexOf('"') !== -1 && (n = n.replace(bt, "&quot;")),
                    (f += ' value="' + n + '"')),
                  u && (f += " selected"),
                  (f += ">"),
                  i !== t && (f += r.htmlEncode(i)),
                  f + "</option>"
                );
              },
              _render: function (n) {
                var f,
                  u,
                  i,
                  t,
                  s,
                  e,
                  r = this.listView.selectedDataItems(),
                  c = this.listView.value(),
                  o = n.length,
                  h = "";
                for (
                  c.length !== r.length && (r = this._buildSelectedItems(c)),
                    s = {},
                    e = {},
                    t = 0;
                  t < o;
                  t++
                )
                  (u = n[t]),
                    (i = this._value(u)),
                    (f = this._selectedItemIndex(i, r)),
                    f !== -1 && r.splice(f, 1),
                    (e[i] = t),
                    (h += this._option(i, this._text(u), f !== -1));
                if (r.length)
                  for (t = 0; t < r.length; t++)
                    (u = r[t]),
                      (i = this._value(u)),
                      (s[i] = o),
                      (e[i] = o),
                      (o += 1),
                      (h += this._option(i, this._text(u), !0));
                this._customOptions = s;
                this._optionsMap = e;
                this.element.html(h);
              },
              _buildSelectedItems: function (n) {
                for (
                  var i,
                    u = this.options.dataValueField,
                    f = this.options.dataTextField,
                    r = [],
                    t = 0;
                  t < n.length;
                  t++
                )
                  (i = {}), (i[u] = n[t]), (i[f] = n[t]), r.push(i);
                return r;
              },
              _selectedItemIndex: function (n, t) {
                for (var r = this._value, i = 0; i < t.length; i++)
                  if (n === r(t[i])) return i;
                return -1;
              },
              _search: function () {
                var n = this;
                clearTimeout(n._typingTimeout);
                n._typingTimeout = setTimeout(function () {
                  var t = n._inputValue();
                  n._prev !== t &&
                    ((n._prev = t), n.search(t), n._toggleCloseVisibility());
                }, n.options.delay);
              },
              _toggleCloseVisibility: function () {
                this.value().length ||
                (this.input.val() &&
                  this.input.val() !== this.options.placeholder)
                  ? this._showClear()
                  : this._hideClear();
              },
              _allowOpening: function () {
                return this._allowSelection() && e.fn._allowOpening.call(this);
              },
              _allowSelection: function () {
                var n = this.options.maxSelectedItems;
                return null === n || n > this.listView.value().length;
              },
              _angularTagItems: function (t) {
                var i = this;
                i.angular(t, function () {
                  return {
                    elements: i.tagList[0].children,
                    data: n.map(i.dataItems(), function (n) {
                      return { dataItem: n };
                    }),
                  };
                });
              },
              updatePersistTagList: function (n, t) {
                this.persistTagList.added &&
                this.persistTagList.added.length === t.length &&
                this.persistTagList.removed &&
                this.persistTagList.removed.length === n.length
                  ? (this.persistTagList = !1)
                  : ((this.listView._removedAddedIndexes = this._old.slice()),
                    (this.persistTagList = { added: n, removed: t }));
              },
              _selectValue: function (n, i) {
                var o,
                  s,
                  r,
                  u = this,
                  h = u.dataSource.total(),
                  f = u.tagList,
                  e = u._value;
                if (this.persistTagList)
                  return this.updatePersistTagList(n, i), t;
                if (
                  (u._angularTagItems("cleanup"),
                  "multiple" === u.options.tagMode)
                ) {
                  for (r = i.length - 1; r > -1; r--)
                    (o = i[r]),
                      f.children().length &&
                        (f[0].removeChild(f[0].children[o.position]),
                        u._setOption(e(o.dataItem), !1));
                  for (r = 0; r < n.length; r++)
                    (s = n[r]),
                      f.append(u.tagTemplate(s.dataItem)),
                      u._setOption(e(s.dataItem), !0);
                } else {
                  for (
                    (!u._maxTotal || u._maxTotal < h) && (u._maxTotal = h),
                      this._updateTagListHTML(),
                      r = i.length - 1;
                    r > -1;
                    r--
                  )
                    u._setOption(e(i[r].dataItem), !1);
                  for (r = 0; r < n.length; r++)
                    u._setOption(e(n[r].dataItem), !0);
                }
                u._angularTagItems("compile");
                u._placeholder();
              },
              _updateTagListHTML: function () {
                var n = this,
                  t = n.value(),
                  r = n.dataSource.total(),
                  i = n.tagList;
                i.html("");
                t.length &&
                  i.append(
                    n.tagTemplate({
                      values: t,
                      dataItems: n.dataItems(),
                      maxTotal: n._maxTotal,
                      currentTotal: r,
                    })
                  );
              },
              _select: function (t) {
                var i,
                  r,
                  e,
                  u,
                  f = n.Deferred().resolve();
                return t
                  ? ((i = this),
                    (r = i.listView),
                    (e = r.dataItemByIndex(r.getElementIndex(t))),
                    (u = t.hasClass("k-state-selected")),
                    i._state === y && (i._state = ""),
                    i._allowSelection() || u
                      ? i.trigger(u ? c : w, { dataItem: e, item: t })
                        ? (i._close(), f)
                        : ((i.persistTagList = !1),
                          r.select(t).done(function () {
                            i._placeholder();
                            i._state === h &&
                              ((i._state = o), r.skipUpdate(!0));
                          }))
                      : f)
                  : f;
              },
              _selectRange: function (i, r) {
                var u,
                  o,
                  s = this,
                  h = this.listView,
                  l = this.options.maxSelectedItems,
                  f = this._getSelectedIndices().slice(),
                  e = [],
                  a = function (t) {
                    h.select(t).done(function () {
                      t.forEach(function (t) {
                        var r = h.dataItemByIndex(t),
                          i = h.element.children()[t],
                          u = n(i).hasClass("k-state-selected");
                        s.trigger(u ? w : c, { dataItem: r, item: n(i) });
                      });
                      s._change();
                    });
                  };
                if (f.length - 1 == r - i) return a(f);
                if (i < r) for (u = i; u <= r; u++) e.push(u);
                else for (u = i; u >= r; u--) e.push(u);
                for (
                  null !== l && e.length > l && (e = e.slice(0, l)), u = 0;
                  u < e.length;
                  u++
                )
                  (o = e[u]),
                    this._getSelectedIndices().indexOf(o) == -1
                      ? f.push(o)
                      : f.splice(f.indexOf(o), 1);
                return f.length ? ((s.persistTagList = !1), a(f)) : t;
              },
              _input: function () {
                var t = this,
                  i = t.element,
                  u = i[0].accessKey,
                  r = t._innerWrapper.children("input.k-input");
                r[0] ||
                  (r = n(
                    '<input class="k-input" style="width: 25px" />'
                  ).appendTo(t._innerWrapper));
                i.removeAttr("accesskey");
                t._focused = t.input = r.attr({
                  accesskey: u,
                  autocomplete: yt,
                  role: "listbox",
                  title: i[0].title,
                  "aria-expanded": !1,
                  "aria-haspopup": "listbox",
                  "aria-autocomplete": "list",
                });
              },
              _tagList: function () {
                var t = this,
                  i = t._innerWrapper.children("ul");
                i[0] ||
                  (i = n('<ul unselectable="on" class="k-reset"/>').appendTo(
                    t._innerWrapper
                  ));
                t.tagList = i;
              },
              _tagTemplate: function () {
                var f,
                  t = this,
                  n = t.options,
                  i = n.tagTemplate,
                  e = n.dataSource,
                  u = "multiple" === n.tagMode,
                  o = n.messages.singleTag;
                t.element[0].length &&
                  !e &&
                  ((n.dataTextField = n.dataTextField || "text"),
                  (n.dataValueField = n.dataValueField || "value"));
                f = u
                  ? r.template("#:" + r.expr(n.dataTextField, "data") + "#", {
                      useWithBlock: !1,
                    })
                  : r.template("#:values.length# " + o);
                t.tagTextTemplate = i = i ? r.template(i) : f;
                t.tagTemplate = function (n) {
                  return (
                    '<li role="option" aria-selected="true" class="k-button" unselectable="on"><span unselectable="on">' +
                    i(n) +
                    '</span><span aria-hidden="true" unselectable="on" aria-label="' +
                    (u
                      ? 'delete" title="' +
                        t.options.messages.deleteTag +
                        '" aria-label="' +
                        t.options.messages.deleteTag
                      : "open") +
                    '" class="k-select"><span class="k-icon ' +
                    (u ? "k-i-close" : "k-i-arrow-60-down") +
                    '"></span></span></li>'
                  );
                };
              },
              _loader: function () {
                this._loading = n(
                  '<span class="k-icon k-i-loading ' + b + '"></span>'
                ).insertAfter(this.input);
              },
              _clearButton: function () {
                e.fn._clearButton.call(this);
                this.options.clearButton &&
                  (this._clear.insertAfter(this.input),
                  this.wrapper.addClass("k-multiselect-clearable"));
              },
              _textContainer: function () {
                var t = r.getComputedStyles(this.input[0], kt);
                t.position = "absolute";
                t.visibility = "hidden";
                t.top = -3333;
                t.left = -3333;
                this._span = n("<span/>").css(t).appendTo(this.wrapper);
              },
              _wrapper: function () {
                var r = this,
                  t = r.element,
                  i = t.parent("span.k-multiselect");
                i[0] ||
                  ((i = t
                    .wrap(
                      '<div class="k-widget k-multiselect" unselectable="on" />'
                    )
                    .parent()),
                  (i[0].style.cssText = t[0].style.cssText),
                  (i[0].title = t[0].title),
                  n(
                    '<div class="k-multiselect-wrap k-floatwrap" role="listbox" unselectable="on" />'
                  ).insertBefore(t));
                r.wrapper = i.addClass(t[0].className).css("display", "");
                r._innerWrapper = n(i[0].firstChild);
              },
              _ariaSetSize: function (n) {
                var i = this,
                  t = i.tagList.children();
                n && t.length && t.attr("aria-setsize", n);
              },
              _ariaSetLive: function () {
                var n = this;
                n.ul.attr("aria-live", n._isFilterEnabled() ? "polite" : "off");
              },
            });
          d.plugin(dt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.multicolumncombobox.min", ["kendo.combobox.min"], n);
  })(
    function () {
      return (
        (function () {
          var t = window.kendo,
            i = t.ui,
            n = i.ComboBox,
            r = /^\d+(\.\d+)?%$/i,
            u = "k-dropdowngrid",
            f = "k-dropdowngrid-popup k-popup-flush",
            e = n.extend({
              init: function (t, i) {
                n.fn.init.call(this, t, i);
                this.list.addClass(f);
                this._allColumnsWidthsAreSet(this.options)
                  ? this.list.width(this._calculateDropDownWidth(this.options))
                  : this.options.dropDownWidth &&
                    this.list.width(this.options.dropDownWidth);
              },
              options: {
                name: "MultiColumnComboBox",
                ns: ".kendoMultiColumnComboBox",
                columns: [],
                dropDownWidth: null,
                filterFields: [],
              },
              setOptions: function (t) {
                n.fn.setOptions.call(this, t);
                this._allColumnsWidthsAreSet(t)
                  ? this.list.width(this._calculateDropDownWidth(t))
                  : this.options.dropDownWidth &&
                    this.list.width(this.options.dropDownWidth);
              },
              _allColumnsWidthsAreSet: function (n) {
                var t,
                  i,
                  u = n.columns;
                if (!u || !u.length) return !1;
                for (t = 0; t < u.length; t++)
                  if (
                    ((i = u[t].width),
                    !i || isNaN(parseInt(i, 10)) || r.test(i))
                  )
                    return !1;
                return !0;
              },
              _calculateDropDownWidth: function (n) {
                for (
                  var r, u = n.columns, f = t.support.scrollbar(), i = 0;
                  i < u.length;
                  i++
                )
                  (r = u[i].width), (f += parseInt(r, 10));
                return f;
              },
              _wrapper: function () {
                n.fn._wrapper.call(this);
                this.wrapper.addClass(u);
              },
            });
          i.plugin(e);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.slider.min", ["kendo.draganddrop.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function ei(n, t, i) {
            var f = i ? " k-slider-horizontal" : " k-slider-vertical",
              r = n.style ? n.style : t.attr("style"),
              e = t.attr("class") ? " " + t.attr("class") : "",
              u = "";
            return (
              "bottomRight" == n.tickPlacement
                ? (u = " k-slider-bottomright")
                : "topLeft" == n.tickPlacement && (u = " k-slider-topleft"),
              (r = r ? " style='" + r + "'" : ""),
              "<div class='k-widget k-slider" +
                f +
                e +
                "'" +
                r +
                "><div class='k-slider-wrap" +
                (n.showButtons ? " k-slider-buttons" : "") +
                u +
                "'></div></div>"
            );
          }
          function ni(n, t, i, r) {
            var u = "";
            return (
              (u = i
                ? (!r && "increase" == t) || (r && "increase" != t)
                  ? "k-i-arrow-60-right"
                  : "k-i-arrow-60-left"
                : "increase" == t
                ? "k-i-arrow-60-up"
                : "k-i-arrow-60-down"),
              "<a class='k-button k-button-" +
                t +
                "' title='" +
                n[t + "ButtonTitle"] +
                "' aria-label='" +
                n[t + "ButtonTitle"] +
                "'><span class='k-icon " +
                u +
                "'></span></a>"
            );
          }
          function oi(n, t) {
            for (
              var u = "<ul class='k-reset k-slider-items'>",
                f = i.floor(o(t / n.smallStep)) + 1,
                r = 0;
              r < f;
              r++
            )
              u += "<li class='k-tick' role='presentation'>&nbsp;</li>";
            return u + "</ul>";
          }
          function si(n, t) {
            var i = t.is("input") ? 1 : 2,
              r = 2 == i ? n.leftDragHandleTitle : n.dragHandleTitle;
            return (
              "<div class='k-slider-track'><div class='k-slider-selection'><!-- --></div><a href='#' class='k-draghandle' title='" +
              r +
              "' role='slider' aria-valuemin='" +
              n.min +
              "' aria-valuemax='" +
              n.max +
              "' aria-valuenow='" +
              (i > 1 ? n.selectionStart || n.min : n.value || n.min) +
              "'></a>" +
              (i > 1
                ? "<a href='#' class='k-draghandle' title='" +
                  n.rightDragHandleTitle +
                  "'role='slider' aria-valuemin='" +
                  n.min +
                  "' aria-valuemax='" +
                  n.max +
                  "' aria-valuenow='" +
                  (n.selectionEnd || n.max) +
                  "'></a>"
                : "") +
              "</div>"
            );
          }
          function b(n) {
            return function (t) {
              return t + n;
            };
          }
          function ti(n) {
            return function () {
              return n;
            };
          }
          function h(n) {
            return (n + "").replace(".", r.cultures.current.numberFormat["."]);
          }
          function hi(n) {
            var t = "" + n,
              i = 0;
            return (
              (t = t.split(".")),
              t[1] && (i = t[1].length),
              (i = i > 10 ? 10 : i)
            );
          }
          function o(n) {
            var r, t;
            return (
              (n = parseFloat(n, 10)),
              (r = hi(n)),
              (t = i.pow(10, r || 0)),
              i.round(n * t) / t
            );
          }
          function s(n, i) {
            var r = li(n.getAttribute(i));
            return null === r && (r = t), r;
          }
          function kt(n) {
            return typeof n !== ai;
          }
          function tt(n) {
            return 1e4 * n;
          }
          var ft,
            r = window.kendo,
            et = r.ui.Widget,
            ci = r.ui.Draggable,
            k = r._outerWidth,
            ot = r._outerHeight,
            ii = n.extend,
            st = r.format,
            li = r.parseFloat,
            f = n.proxy,
            dt = n.isArray,
            i = Math,
            gt = r.support,
            ri = gt.pointers,
            ui = gt.msPointers,
            it = "change",
            ht = "slide",
            u = ".slider",
            rt = "touchstart" + u + " mousedown" + u,
            d = ri ? "pointerdown" + u : ui ? "MSPointerDown" + u : rt,
            a = "touchend" + u + " mouseup" + u,
            ct = ri ? "pointerup" : ui ? "MSPointerUp" + u : a,
            lt = "moveSelection",
            y = "keydown" + u,
            at = "click" + u,
            ut = "mouseover" + u,
            vt = "focus" + u,
            yt = "blur" + u,
            e = ".k-draghandle",
            p = ".k-slider-track",
            c = ".k-tick",
            w = "k-state-selected",
            l = "k-state-focused",
            pt = "k-state-default",
            wt = "k-state-disabled",
            g = "disabled",
            ai = "undefined",
            bt = "tabindex",
            fi = r.getTouches,
            nt = et.extend({
              init: function (n, t) {
                var u,
                  i = this;
                if (
                  (et.fn.init.call(i, n, t),
                  (t = i.options),
                  (i._isHorizontal = "horizontal" == t.orientation),
                  (i._isRtl = i._isHorizontal && r.support.isRtl(n)),
                  (i._position = i._isHorizontal ? "left" : "bottom"),
                  (i._sizeFn = i._isHorizontal ? "width" : "height"),
                  (i._outerSize = i._isHorizontal ? k : ot),
                  (t.tooltip.format = t.tooltip.enabled
                    ? t.tooltip.format || "{0}"
                    : "{0}"),
                  t.smallStep <= 0)
                )
                  throw Error(
                    "Kendo UI Slider smallStep must be a positive number."
                  );
                i._createHtml();
                i.wrapper = i.element.closest(".k-slider");
                i._trackDiv = i.wrapper.find(p);
                i._setTrackDivWidth();
                i._maxSelection = i._trackDiv[i._sizeFn]();
                i._sliderItemsInit();
                i._reset();
                i._tabindex(i.wrapper.find(e));
                i[t.enabled ? "enable" : "disable"]();
                u = r.support.isRtl(i.wrapper) ? -1 : 1;
                i._keyMap = {
                  37: b(-1 * u * t.smallStep),
                  40: b(-t.smallStep),
                  39: b(1 * u * t.smallStep),
                  38: b(+t.smallStep),
                  35: ti(t.max),
                  36: ti(t.min),
                  33: b(+t.largeStep),
                  34: b(-t.largeStep),
                };
                r.notify(i);
              },
              events: [it, ht],
              options: {
                enabled: !0,
                min: 0,
                max: 10,
                smallStep: 1,
                largeStep: 5,
                orientation: "horizontal",
                tickPlacement: "both",
                tooltip: { enabled: !0, format: "{0}" },
              },
              _distance: function () {
                return o(this.options.max - this.options.min);
              },
              _resize: function () {
                this._setTrackDivWidth();
                this.wrapper.find(".k-slider-items").remove();
                this._maxSelection = this._trackDiv[this._sizeFn]();
                this._sliderItemsInit();
                this._refresh();
                this.options.enabled && this.enable(!0);
              },
              _sliderItemsInit: function () {
                var t = this,
                  r = t.options,
                  u = t._maxSelection / ((r.max - r.min) / r.smallStep),
                  f = t._calculateItemsWidth(
                    i.floor(t._distance() / r.smallStep)
                  );
                "none" != r.tickPlacement &&
                  u >= 2 &&
                  (n(this.element).parent().find(".k-slider-items").remove(),
                  t._trackDiv.before(oi(r, t._distance())),
                  t._setItemsWidth(f),
                  t._setItemsTitle());
                t._calculateSteps(f);
                "none" != r.tickPlacement &&
                  u >= 2 &&
                  r.largeStep >= r.smallStep &&
                  t._setItemsLargeTick();
              },
              getSize: function () {
                return r.dimensions(this.wrapper);
              },
              _setTrackDivWidth: function () {
                var n = this,
                  t =
                    2 *
                    parseFloat(
                      n._trackDiv.css(n._isRtl ? "right" : n._position),
                      10
                    );
                n._trackDiv[n._sizeFn](n.wrapper[n._sizeFn]() - 2 - t);
              },
              _setItemsWidth: function (t) {
                for (
                  var i = this,
                    h = i.options,
                    o = 0,
                    u = t.length - 1,
                    f = i.wrapper.find(c),
                    e = 0,
                    l = f.length,
                    s = 0,
                    r = 0;
                  r < l - 2;
                  r++
                )
                  n(f[r + 1])[i._sizeFn](t[r]);
                if (
                  (i._isHorizontal
                    ? (n(f[o])
                        .addClass("k-first")
                        [i._sizeFn](t[u - 1]),
                      n(f[u]).addClass("k-last")[i._sizeFn](t[u]))
                    : (n(f[u]).addClass("k-first")[i._sizeFn](t[u]),
                      n(f[o])
                        .addClass("k-last")
                        [i._sizeFn](t[u - 1])),
                  i._distance() % h.smallStep != 0 && !i._isHorizontal)
                ) {
                  for (r = 0; r < t.length; r++) s += t[r];
                  e = i._maxSelection - s;
                  e += parseFloat(i._trackDiv.css(i._position), 10) + 2;
                  i.wrapper.find(".k-slider-items").css("padding-top", e);
                }
              },
              _setItemsTitle: function () {
                for (
                  var t = this,
                    i = t.options,
                    u = t.wrapper.find(c),
                    f = i.min,
                    e = u.length,
                    r = t._isHorizontal && !t._isRtl ? 0 : e - 1,
                    s = t._isHorizontal && !t._isRtl ? e : -1,
                    h = t._isHorizontal && !t._isRtl ? 1 : -1;
                  r - s != 0;
                  r += h
                )
                  n(u[r]).attr("title", st(i.tooltip.format, o(f))),
                    (f += i.smallStep);
              },
              _setItemsLargeTick: function () {
                var r,
                  s,
                  e,
                  t = this,
                  u = t.options,
                  f = t.wrapper.find(c),
                  i = 0;
                if (
                  tt(u.largeStep) % tt(u.smallStep) == 0 ||
                  t._distance() / u.largeStep >= 3
                )
                  for (
                    t._isHorizontal ||
                      t._isRtl ||
                      (f = n.makeArray(f).reverse()),
                      i = 0;
                    i < f.length;
                    i++
                  )
                    (r = n(f[i])),
                      (s = t._values[i]),
                      (e = o(tt(s - this.options.min))),
                      e % tt(u.smallStep) == 0 &&
                        e % tt(u.largeStep) == 0 &&
                        (r
                          .addClass("k-tick-large")
                          .html(
                            "<span class='k-label'>" +
                              r.attr("title") +
                              "</span>"
                          ),
                        0 !== i &&
                          i !== f.length - 1 &&
                          r.css("line-height", r[t._sizeFn]() + "px"));
              },
              _calculateItemsWidth: function (n) {
                var e,
                  t,
                  u,
                  r = this,
                  o = r.options,
                  s = parseFloat(r._trackDiv.css(r._sizeFn)) + 1,
                  f = r._distance(),
                  h = s / f;
                for (
                  f / o.smallStep - i.floor(f / o.smallStep) > 0 &&
                    (s -= (f % o.smallStep) * h),
                    e = s / n,
                    t = [],
                    u = 0;
                  u < n - 1;
                  u++
                )
                  t[u] = e;
                return (t[n - 1] = t[n] = e / 2), r._roundWidths(t);
              },
              _roundWidths: function (n) {
                for (var r = 0, u = n.length, t = 0; t < u; t++)
                  (r += n[t] - i.floor(n[t])), (n[t] = i.floor(n[t]));
                return (r = i.round(r)), this._addAdditionalSize(r, n);
              },
              _addAdditionalSize: function (n, t) {
                if (0 === n) return t;
                for (
                  var u =
                      parseFloat(t.length - 1) / parseFloat(1 == n ? n : n - 1),
                    r = 0;
                  r < n;
                  r++
                )
                  t[parseInt(i.round(u * r), 10)] += 1;
                return t;
              },
              _calculateSteps: function (n) {
                var e,
                  t = this,
                  u = t.options,
                  s = u.min,
                  h = 0,
                  c = t._distance(),
                  r = i.ceil(c / u.smallStep),
                  f = 1;
                if (
                  ((r += (c / u.smallStep) % 1 == 0 ? 1 : 0),
                  n.splice(0, 0, 2 * n[r - 2]),
                  n.splice(r - 1, 1, 2 * n.pop()),
                  (t._pixelSteps = [h]),
                  (t._values = [s]),
                  0 !== r)
                ) {
                  for (; f < r; )
                    (h += (n[f - 1] + n[f]) / 2),
                      (t._pixelSteps[f] = h),
                      (s += u.smallStep),
                      (t._values[f] = o(s)),
                      f++;
                  e = c % u.smallStep == 0 ? r - 1 : r;
                  t._pixelSteps[e] = t._maxSelection;
                  t._values[e] = u.max;
                  t._isRtl && (t._pixelSteps.reverse(), t._values.reverse());
                }
              },
              _getValueFromPosition: function (n, t) {
                var f,
                  r = this,
                  e = r.options,
                  s = i.max(e.smallStep * (r._maxSelection / r._distance()), 0),
                  u = 0,
                  h = s / 2;
                if (
                  (r._isHorizontal
                    ? ((u = n - t.startPoint),
                      r._isRtl && (u = r._maxSelection - u))
                    : (u = t.startPoint - n),
                  r._maxSelection -
                    (parseInt(r._maxSelection % s, 10) - 3) / 2 <
                    u)
                )
                  return e.max;
                for (f = 0; f < r._pixelSteps.length; f++)
                  if (i.abs(r._pixelSteps[f] - u) - 1 <= h)
                    return o(r._values[f]);
              },
              _getFormattedValue: function (n, t) {
                var i,
                  u,
                  f,
                  s = this,
                  o = "",
                  e = s.options.tooltip;
                return (
                  dt(n)
                    ? ((u = n[0]), (f = n[1]))
                    : t &&
                      t.type &&
                      ((u = t.selectionStart), (f = t.selectionEnd)),
                  t && (i = t.tooltipTemplate),
                  !i && e.template && (i = r.template(e.template)),
                  dt(n) || (t && t.type)
                    ? i
                      ? (o = i({ selectionStart: u, selectionEnd: f }))
                      : ((u = st(e.format, u)),
                        (f = st(e.format, f)),
                        (o = u + " - " + f))
                    : (t && (t.val = n),
                      (o = i ? i({ value: n }) : st(e.format, n))),
                  o
                );
              },
              _getDraggableArea: function () {
                var n = this,
                  t = r.getOffset(n._trackDiv);
                return {
                  startPoint: n._isHorizontal
                    ? t.left
                    : t.top + n._maxSelection,
                  endPoint: n._isHorizontal ? t.left + n._maxSelection : t.top,
                };
              },
              _createHtml: function () {
                var t = this,
                  i = t.element,
                  n = t.options,
                  r = i.find("input");
                2 == r.length
                  ? (r.eq(0).prop("value", h(n.selectionStart)),
                    r.eq(1).prop("value", h(n.selectionEnd)))
                  : i.prop("value", h(n.value));
                i.wrap(ei(n, i, t._isHorizontal)).hide();
                n.showButtons &&
                  i
                    .before(ni(n, "increase", t._isHorizontal, t._isRtl))
                    .before(ni(n, "decrease", t._isHorizontal, t._isRtl));
                i.before(si(n, i));
              },
              _focus: function (t) {
                var i = this,
                  f = t.target,
                  u = i.value(),
                  r = i._drag;
                r ||
                  (f == i.wrapper.find(e).eq(0)[0]
                    ? ((r = i._firstHandleDrag), (i._activeHandle = 0))
                    : ((r = i._lastHandleDrag), (i._activeHandle = 1)),
                  (u = u[i._activeHandle]));
                n(f).addClass(l + " " + w);
                r &&
                  ((i._activeHandleDrag = r),
                  (r.selectionStart = i.options.selectionStart),
                  (r.selectionEnd = i.options.selectionEnd),
                  r._updateTooltip(u));
              },
              _focusWithMouse: function (t) {
                t = n(t);
                var i = this,
                  r = t.is(e) ? t.index() : 0;
                window.setTimeout(function () {
                  i.wrapper.find(e)[2 == r ? 1 : 0].focus();
                }, 1);
                i._setTooltipTimeout();
              },
              _blur: function (t) {
                var i = this,
                  r = i._activeHandleDrag;
                n(t.target).removeClass(l + " " + w);
                r &&
                  (r._removeTooltip(),
                  delete i._activeHandleDrag,
                  delete i._activeHandle);
              },
              _setTooltipTimeout: function () {
                var n = this;
                n._tooltipTimeout = window.setTimeout(function () {
                  var t = n._drag || n._activeHandleDrag;
                  t && t._removeTooltip();
                }, 300);
              },
              _clearTooltipTimeout: function () {
                var n,
                  t = this;
                window.clearTimeout(this._tooltipTimeout);
                n = t._drag || t._activeHandleDrag;
                n &&
                  n.tooltipDiv &&
                  n.tooltipDiv.stop(!0, !1).css("opacity", 1);
              },
              _reset: function () {
                var t = this,
                  i = t.element,
                  r = i.attr("form"),
                  u = r ? n("#" + r) : i.closest("form");
                u[0] && (t._form = u.on("reset", f(t._formResetHandler, t)));
              },
              min: function (n) {
                return n ? (this.setOptions({ min: n }), t) : this.options.min;
              },
              max: function (n) {
                return n ? (this.setOptions({ max: n }), t) : this.options.max;
              },
              setOptions: function (n) {
                et.fn.setOptions.call(this, n);
                this._sliderItemsInit();
                this._refresh();
              },
              destroy: function () {
                this._form && this._form.off("reset", this._formResetHandler);
                et.fn.destroy.call(this);
              },
            }),
            v = nt.extend({
              init: function (r, u) {
                var o,
                  f = this;
                r.type = "text";
                u = ii(
                  {},
                  {
                    value: s(r, "value"),
                    min: s(r, "min"),
                    max: s(r, "max"),
                    smallStep: s(r, "step"),
                  },
                  u
                );
                r = n(r);
                u && u.enabled === t && (u.enabled = !r.is("[disabled]"));
                nt.fn.init.call(f, r, u);
                u = f.options;
                (kt(u.value) && null !== u.value) ||
                  ((u.value = u.min), r.prop("value", h(u.min)));
                u.value = i.max(i.min(u.value, u.max), u.min);
                o = f.wrapper.find(e);
                this._selection = new v.Selection(o, f, u);
                f._drag = new v.Drag(o, "", f, u);
              },
              options: {
                name: "Slider",
                showButtons: !0,
                increaseButtonTitle: "Increase",
                decreaseButtonTitle: "Decrease",
                dragHandleTitle: "drag",
                tooltip: { format: "{0:#,#.##}" },
                value: null,
              },
              enable: function (i) {
                var v,
                  s,
                  h,
                  o = this,
                  b = o.options;
                o.disable();
                i !== !1 &&
                  (o.wrapper.removeClass(wt).addClass(pt),
                  o.wrapper.find("input").removeAttr(g),
                  (v = function (i) {
                    var f,
                      e,
                      r,
                      u = fi(i)[0];
                    if (u) {
                      if (
                        ((f = o._isHorizontal
                          ? u.location.pageX
                          : u.location.pageY),
                        (e = o._getDraggableArea()),
                        (r = n(i.target)),
                        r.hasClass("k-draghandle"))
                      )
                        return r.addClass(l + " " + w), t;
                      o._update(o._getValueFromPosition(f, e));
                      o._focusWithMouse(i.target);
                      o._drag.dragstart(i);
                      i.preventDefault();
                    }
                  }),
                  o.wrapper
                    .find(c + ", " + p)
                    .on(d, v)
                    .end()
                    .on(d, function () {
                      n(document.documentElement).one(
                        "selectstart",
                        r.preventDefault
                      );
                    })
                    .on(ct, function () {
                      o._drag._end();
                    }),
                  o.wrapper
                    .find(e)
                    .attr(bt, 0)
                    .on(a, function () {
                      o._setTooltipTimeout();
                    })
                    .on(at, function (n) {
                      o._focusWithMouse(n.target);
                      n.preventDefault();
                    })
                    .on(vt, f(o._focus, o))
                    .on(yt, f(o._blur, o)),
                  (s = f(function (n) {
                    var t = o._nextValueByIndex(o._valueIndex + 1 * n);
                    o._setValueInRange(t);
                    o._drag._updateTooltip(t);
                  }, o)),
                  b.showButtons &&
                    ((h = f(function (n, t) {
                      this._clearTooltipTimeout();
                      (1 === n.which || (gt.touch && 0 === n.which)) &&
                        (s(t),
                        (this.timeout = setTimeout(
                          f(function () {
                            this.timer = setInterval(function () {
                              s(t);
                            }, 60);
                          }, this),
                          200
                        )));
                    }, o)),
                    o.wrapper
                      .find(".k-button")
                      .on(
                        a,
                        f(function (n) {
                          this._clearTimer();
                          o._focusWithMouse(n.target);
                        }, o)
                      )
                      .on(ut, function (t) {
                        n(t.currentTarget).addClass("k-state-hover");
                      })
                      .on(
                        "mouseout" + u,
                        f(function (t) {
                          n(t.currentTarget).removeClass("k-state-hover");
                          this._clearTimer();
                        }, o)
                      )
                      .eq(0)
                      .on(
                        rt,
                        f(function (n) {
                          h(n, 1);
                        }, o)
                      )
                      .click(!1)
                      .end()
                      .eq(1)
                      .on(
                        rt,
                        f(function (n) {
                          h(n, -1);
                        }, o)
                      )
                      .click(r.preventDefault)),
                  o.wrapper.find(e).off(y, !1).on(y, f(this._keydown, o)),
                  (b.enabled = !0));
              },
              disable: function () {
                var t = this;
                t.wrapper.removeClass(pt).addClass(wt);
                n(t.element).prop(g, g);
                t.wrapper
                  .find(".k-button")
                  .off(rt)
                  .on(rt, function (t) {
                    t.preventDefault();
                    n(this).addClass("k-state-active");
                  })
                  .off(a)
                  .on(a, function (t) {
                    t.preventDefault();
                    n(this).removeClass("k-state-active");
                  })
                  .off("mouseleave" + u)
                  .on("mouseleave" + u, r.preventDefault)
                  .off(ut)
                  .on(ut, r.preventDefault);
                t.wrapper
                  .find(c + ", " + p)
                  .off(d)
                  .off(ct);
                t.wrapper
                  .find(e)
                  .attr(bt, -1)
                  .off(a)
                  .off(y)
                  .off(at)
                  .off(vt)
                  .off(yt);
                t.options.enabled = !1;
              },
              _update: function (n) {
                var t = this,
                  i = t.value() != n;
                t.value(n);
                i && t.trigger(it, { value: t.options.value });
              },
              value: function (n) {
                var r = this,
                  i = r.options;
                return (
                  (n = o(n)),
                  isNaN(n)
                    ? i.value
                    : (n >= i.min &&
                        n <= i.max &&
                        i.value != n &&
                        (r.element.prop("value", h(n)),
                        (i.value = n),
                        r._refreshAriaAttr(n),
                        r._refresh()),
                      t)
                );
              },
              _refresh: function () {
                this.trigger(lt, { value: this.options.value });
              },
              _refreshAriaAttr: function (n) {
                var i,
                  r = this,
                  t = r._drag;
                i =
                  t && t._tooltipDiv
                    ? t._tooltipDiv.text()
                    : r._getFormattedValue(n, null);
                this.wrapper
                  .find(e)
                  .attr("aria-valuenow", n)
                  .attr("aria-valuetext", i);
              },
              _clearTimer: function () {
                clearTimeout(this.timeout);
                clearInterval(this.timer);
              },
              _keydown: function (n) {
                var t = this;
                n.keyCode in t._keyMap &&
                  (t._clearTooltipTimeout(),
                  t._setValueInRange(t._keyMap[n.keyCode](t.options.value)),
                  t._drag._updateTooltip(t.value()),
                  n.preventDefault());
              },
              _setValueInRange: function (n) {
                var r = this,
                  u = r.options;
                return (
                  (n = o(n)),
                  isNaN(n)
                    ? (r._update(u.min), t)
                    : ((n = i.max(i.min(n, u.max), u.min)), r._update(n), t)
                );
              },
              _nextValueByIndex: function (n) {
                var t = this._values.length;
                return (
                  this._isRtl && (n = t - 1 - n),
                  this._values[i.max(0, i.min(n, t - 1))]
                );
              },
              _formResetHandler: function () {
                var n = this,
                  t = n.options.min;
                setTimeout(function () {
                  var i = n.element[0].value;
                  n.value("" === i || isNaN(i) ? t : i);
                });
              },
              destroy: function () {
                var n = this;
                nt.fn.destroy.call(n);
                n.wrapper
                  .off(u)
                  .find(".k-button")
                  .off(u)
                  .end()
                  .find(e)
                  .off(u)
                  .end()
                  .find(c + ", " + p)
                  .off(u)
                  .end();
                n._drag.draggable.destroy();
                n._drag._removeTooltip(!0);
              },
            });
          v.Selection = function (n, t, r) {
            function u(u) {
              var e = u - r.min,
                s = (t._valueIndex = i.ceil(o(e / r.smallStep))),
                f = parseInt(t._pixelSteps[s], 10),
                h = t._trackDiv.find(".k-slider-selection"),
                c = parseInt(t._outerSize(n) / 2, 10),
                l = t._isRtl ? 2 : 0;
              h[t._sizeFn](t._isRtl ? t._maxSelection - f : f);
              n.css(t._position, f - c - l);
            }
            u(r.value);
            t.bind([ht, lt], function (n) {
              u(parseFloat(n.value, 10));
            });
            t.bind(it, function (n) {
              u(parseFloat(n.sender.value(), 10));
            });
          };
          v.Drag = function (n, t, i, r) {
            var u = this;
            u.owner = i;
            u.options = r;
            u.element = n;
            u.type = t;
            u.draggable = new ci(n, {
              distance: 0,
              dragstart: f(u._dragstart, u),
              drag: f(u.drag, u),
              dragend: f(u.dragend, u),
              dragcancel: f(u.dragcancel, u),
            });
            n.click(!1);
            n.on("dragstart", function (n) {
              n.preventDefault();
            });
          };
          v.Drag.prototype = {
            dragstart: function (n) {
              this.owner._activeDragHandle = this;
              this.draggable.userEvents.cancel();
              this._dragstart(n);
              this.dragend();
            },
            _dragstart: function (r) {
              var u = this,
                f = u.owner,
                e = u.options;
              return e.enabled
                ? ((this.owner._activeDragHandle = this),
                  f.element.off(ut),
                  f.wrapper.find("." + l).removeClass(l + " " + w),
                  u.element.addClass(l + " " + w),
                  n(document.documentElement).css("cursor", "pointer"),
                  (u.dragableArea = f._getDraggableArea()),
                  (u.step = i.max(
                    e.smallStep * (f._maxSelection / f._distance()),
                    0
                  )),
                  u.type
                    ? ((u.selectionStart = e.selectionStart),
                      (u.selectionEnd = e.selectionEnd),
                      f._setZIndex(u.type))
                    : (u.oldVal = u.val = e.value),
                  u._removeTooltip(!0),
                  u._createTooltip(),
                  t)
                : (r.preventDefault(), t);
            },
            _createTooltip: function () {
              var s,
                e,
                t = this,
                i = t.owner,
                u = t.options.tooltip,
                f = "",
                o = n(window);
              u.enabled &&
                (u.template && (s = t.tooltipTemplate = r.template(u.template)),
                n(".k-slider-tooltip").remove(),
                (t.tooltipDiv = n(
                  "<div class='k-widget k-tooltip k-slider-tooltip'><!-- --></div>"
                ).appendTo(document.body)),
                (f = i._getFormattedValue(t.val || i.value(), t)),
                t.type ||
                  ((e = "k-callout-" + (i._isHorizontal ? "s" : "e")),
                  (t.tooltipInnerDiv =
                    "<div class='k-callout " + e + "'><!-- --></div>"),
                  (f += t.tooltipInnerDiv)),
                t.tooltipDiv.html(f),
                (t._scrollOffset = {
                  top: o.scrollTop(),
                  left: o.scrollLeft(),
                }),
                t.moveTooltip());
            },
            drag: function (n) {
              var u,
                t = this,
                f = t.owner,
                r = n.x.location,
                o = n.y.location,
                e = t.dragableArea.startPoint,
                i = t.dragableArea.endPoint;
              n.preventDefault();
              t.val = f._isHorizontal
                ? f._isRtl
                  ? t.constrainValue(r, e, i, r < i)
                  : t.constrainValue(r, e, i, r >= i)
                : t.constrainValue(o, i, e, o <= i);
              t.oldVal != t.val &&
                ((t.oldVal = t.val),
                t.type
                  ? ("firstHandle" == t.type
                      ? (t.selectionStart =
                          t.val < t.selectionEnd
                            ? t.val
                            : (t.selectionEnd = t.val))
                      : t.val > t.selectionStart
                      ? (t.selectionEnd = t.val)
                      : (t.selectionStart = t.selectionEnd = t.val),
                    (u = {
                      values: [t.selectionStart, t.selectionEnd],
                      value: [t.selectionStart, t.selectionEnd],
                    }))
                  : (u = { value: t.val }),
                f.trigger(ht, u));
              t._updateTooltip(t.val);
            },
            _updateTooltip: function (n) {
              var t = this,
                r = t.options,
                u = r.tooltip,
                i = "";
              u.enabled &&
                (t.tooltipDiv || t._createTooltip(),
                (i = t.owner._getFormattedValue(o(n), t)),
                t.type || (i += t.tooltipInnerDiv),
                t.tooltipDiv.html(i),
                t.moveTooltip());
            },
            dragcancel: function () {
              return (
                this.owner._refresh(),
                n(document.documentElement).css("cursor", ""),
                this._end()
              );
            },
            dragend: function () {
              var t = this,
                i = t.owner;
              return (
                n(document.documentElement).css("cursor", ""),
                t.type
                  ? i._update(t.selectionStart, t.selectionEnd)
                  : (i._update(t.val), t.draggable.userEvents._disposeAll()),
                t.draggable.userEvents.cancel(),
                t._end()
              );
            },
            _end: function () {
              var n = this,
                t = n.owner;
              return t._focusWithMouse(n.element), t.element.on(ut), !1;
            },
            _removeTooltip: function (t) {
              var i = this,
                r = i.owner;
              i.tooltipDiv &&
                r.options.tooltip.enabled &&
                r.options.enabled &&
                (t
                  ? (i.tooltipDiv.remove(), (i.tooltipDiv = null))
                  : i.tooltipDiv.fadeOut("slow", function () {
                      n(this).remove();
                      i.tooltipDiv = null;
                    }));
            },
            moveTooltip: function () {
              var l,
                h,
                c,
                a,
                t = this,
                f = t.owner,
                i = 0,
                u = 0,
                v = t.element,
                o = r.getOffset(v),
                y = 8,
                p = n(window),
                s = t.tooltipDiv.find(".k-callout"),
                w = k(t.tooltipDiv),
                b = ot(t.tooltipDiv);
              t.type
                ? ((l = f.wrapper.find(e)),
                  (o = r.getOffset(l.eq(0))),
                  (h = r.getOffset(l.eq(1))),
                  f._isHorizontal
                    ? ((i = h.top), (u = o.left + (h.left - o.left) / 2))
                    : ((i = o.top + (h.top - o.top) / 2), (u = h.left)),
                  (a = k(l.eq(0)) + 2 * y))
                : ((i = o.top), (u = o.left), (a = k(v) + 2 * y));
              f._isHorizontal
                ? ((u -= parseInt((w - f._outerSize(v)) / 2, 10)),
                  (i -= b + y + (s.length ? s.height() : 0)))
                : ((i -= parseInt((b - f._outerSize(v)) / 2, 10)),
                  (u -= w + y + (s.length ? s.width() : 0)));
              f._isHorizontal
                ? ((c = t._flip(i, b, a, ot(p) + t._scrollOffset.top)),
                  (i += c),
                  (u += t._fit(u, w, k(p) + t._scrollOffset.left)))
                : ((c = t._flip(u, w, a, k(p) + t._scrollOffset.left)),
                  (i += t._fit(i, b, ot(p) + t._scrollOffset.top)),
                  (u += c));
              c > 0 &&
                s &&
                (s.removeClass(),
                s.addClass(
                  "k-callout k-callout-" + (f._isHorizontal ? "n" : "w")
                ));
              t.tooltipDiv.css({ top: i, left: u });
            },
            _fit: function (n, t, i) {
              var r = 0;
              return n + t > i && (r = i - (n + t)), n < 0 && (r = -n), r;
            },
            _flip: function (n, t, i, r) {
              var u = 0;
              return n + t > r && (u += -(i + t)), n + u < 0 && (u += i + t), u;
            },
            constrainValue: function (n, t, i, r) {
              var u = this;
              return t < n && n < i
                ? u.owner._getValueFromPosition(n, u.dragableArea)
                : r
                ? u.options.max
                : u.options.min;
            },
          };
          r.ui.plugin(v);
          ft = nt.extend({
            init: function (i, r) {
              var l,
                u = this,
                f = n(i).find("input"),
                o = f.eq(0)[0],
                c = f.eq(1)[0];
              o.type = "text";
              c.type = "text";
              r &&
                r.showButtons &&
                (window.console &&
                  window.console.warn(
                    "showbuttons option is not supported for the range slider, ignoring"
                  ),
                (r.showButtons = !1));
              r = ii(
                {},
                {
                  selectionStart: s(o, "value"),
                  min: s(o, "min"),
                  max: s(o, "max"),
                  smallStep: s(o, "step"),
                },
                {
                  selectionEnd: s(c, "value"),
                  min: s(c, "min"),
                  max: s(c, "max"),
                  smallStep: s(c, "step"),
                },
                r
              );
              r && r.enabled === t && (r.enabled = !f.is("[disabled]"));
              nt.fn.init.call(u, i, r);
              r = u.options;
              (kt(r.selectionStart) && null !== r.selectionStart) ||
                ((r.selectionStart = r.min), f.eq(0).prop("value", h(r.min)));
              (kt(r.selectionEnd) && null !== r.selectionEnd) ||
                ((r.selectionEnd = r.max), f.eq(1).prop("value", h(r.max)));
              l = u.wrapper.find(e);
              this._selection = new ft.Selection(l, u, r);
              u._firstHandleDrag = new v.Drag(l.eq(0), "firstHandle", u, r);
              u._lastHandleDrag = new v.Drag(l.eq(1), "lastHandle", u, r);
            },
            options: {
              name: "RangeSlider",
              leftDragHandleTitle: "drag",
              rightDragHandleTitle: "drag",
              tooltip: { format: "{0:#,#.##}" },
              selectionStart: null,
              selectionEnd: null,
            },
            enable: function (i) {
              var s,
                u = this,
                o = u.options;
              u.disable();
              i !== !1 &&
                (u.wrapper.removeClass(wt).addClass(pt),
                u.wrapper.find("input").removeAttr(g),
                (s = function (i) {
                  var a,
                    v,
                    r,
                    h,
                    e,
                    s,
                    f,
                    c = fi(i)[0];
                  if (c) {
                    if (
                      ((a = u._isHorizontal
                        ? c.location.pageX
                        : c.location.pageY),
                      (v = u._getDraggableArea()),
                      (r = u._getValueFromPosition(a, v)),
                      (h = n(i.target)),
                      h.hasClass("k-draghandle"))
                    )
                      return (
                        u.wrapper.find("." + l).removeClass(l + " " + w),
                        h.addClass(l + " " + w),
                        t
                      );
                    r < o.selectionStart
                      ? ((e = r),
                        (s = o.selectionEnd),
                        (f = u._firstHandleDrag))
                      : r > u.selectionEnd
                      ? ((e = o.selectionStart),
                        (s = r),
                        (f = u._lastHandleDrag))
                      : r - o.selectionStart <= o.selectionEnd - r
                      ? ((e = r),
                        (s = o.selectionEnd),
                        (f = u._firstHandleDrag))
                      : ((e = o.selectionStart),
                        (s = r),
                        (f = u._lastHandleDrag));
                    f.dragstart(i);
                    u._setValueInRange(e, s);
                    u._focusWithMouse(f.element);
                  }
                }),
                u.wrapper
                  .find(c + ", " + p)
                  .on(d, s)
                  .end()
                  .on(d, function () {
                    n(document.documentElement).one(
                      "selectstart",
                      r.preventDefault
                    );
                  })
                  .on(ct, function () {
                    u._activeDragHandle && u._activeDragHandle._end();
                  }),
                u.wrapper
                  .find(e)
                  .attr(bt, 0)
                  .on(a, function () {
                    u._setTooltipTimeout();
                  })
                  .on(at, function (n) {
                    u._focusWithMouse(n.target);
                    n.preventDefault();
                  })
                  .on(vt, f(u._focus, u))
                  .on(yt, f(u._blur, u)),
                u.wrapper
                  .find(e)
                  .off(y, r.preventDefault)
                  .eq(0)
                  .on(
                    y,
                    f(function (n) {
                      this._keydown(n, "firstHandle");
                    }, u)
                  )
                  .end()
                  .eq(1)
                  .on(
                    y,
                    f(function (n) {
                      this._keydown(n, "lastHandle");
                    }, u)
                  ),
                (u.options.enabled = !0));
            },
            disable: function () {
              var n = this;
              n.wrapper.removeClass(pt).addClass(wt);
              n.wrapper.find("input").prop(g, g);
              n.wrapper
                .find(c + ", " + p)
                .off(d)
                .off(ct);
              n.wrapper
                .find(e)
                .attr(bt, -1)
                .off(a)
                .off(y)
                .off(at)
                .off(vt)
                .off(yt);
              n.options.enabled = !1;
            },
            _keydown: function (n, t) {
              var e,
                s,
                f,
                i = this,
                r = i.options.selectionStart,
                u = i.options.selectionEnd;
              n.keyCode in i._keyMap &&
                (i._clearTooltipTimeout(),
                "firstHandle" == t
                  ? ((f = i._activeHandleDrag = i._firstHandleDrag),
                    (r = i._keyMap[n.keyCode](r)),
                    r > u && (u = r))
                  : ((f = i._activeHandleDrag = i._lastHandleDrag),
                    (u = i._keyMap[n.keyCode](u)),
                    r > u && (r = u)),
                i._setValueInRange(o(r), o(u)),
                (e = Math.max(r, i.options.selectionStart)),
                (s = Math.min(u, i.options.selectionEnd)),
                (f.selectionEnd = Math.max(s, i.options.selectionStart)),
                (f.selectionStart = Math.min(e, i.options.selectionEnd)),
                f._updateTooltip(i.value()[i._activeHandle]),
                n.preventDefault());
            },
            _update: function (n, t) {
              var i = this,
                r = i.value(),
                u = r[0] != n || r[1] != t;
              i.value([n, t]);
              u && i.trigger(it, { values: [n, t], value: [n, t] });
            },
            value: function (n) {
              return n && n.length ? this._value(n[0], n[1]) : this._value();
            },
            _value: function (n, i) {
              var u = this,
                r = u.options,
                f = r.selectionStart,
                e = r.selectionEnd;
              return isNaN(n) && isNaN(i)
                ? [f, e]
                : ((n = o(n)),
                  (i = o(i)),
                  n >= r.min &&
                    n <= r.max &&
                    i >= r.min &&
                    i <= r.max &&
                    n <= i &&
                    ((f == n && e == i) ||
                      (u.element
                        .find("input")
                        .eq(0)
                        .prop("value", h(n))
                        .end()
                        .eq(1)
                        .prop("value", h(i)),
                      (r.selectionStart = n),
                      (r.selectionEnd = i),
                      u._refresh(),
                      u._refreshAriaAttr(n, i))),
                  t);
            },
            values: function (n, t) {
              return dt(n) ? this._value(n[0], n[1]) : this._value(n, t);
            },
            _refresh: function () {
              var t = this,
                n = t.options;
              t.trigger(lt, {
                values: [n.selectionStart, n.selectionEnd],
                value: [n.selectionStart, n.selectionEnd],
              });
              n.selectionStart == n.max &&
                n.selectionEnd == n.max &&
                t._setZIndex("firstHandle");
            },
            _refreshAriaAttr: function (n, t) {
              var u,
                i = this,
                r = i.wrapper.find(e),
                f = i._activeHandleDrag;
              u = i._getFormattedValue([n, t], f);
              r.eq(0).attr("aria-valuenow", n);
              r.eq(1).attr("aria-valuenow", t);
              r.attr("aria-valuetext", u);
            },
            _setValueInRange: function (n, t) {
              var r = this.options;
              n = i.max(i.min(n, r.max), r.min);
              t = i.max(i.min(t, r.max), r.min);
              n == r.max && t == r.max && this._setZIndex("firstHandle");
              this._update(i.min(n, t), i.max(n, t));
            },
            _setZIndex: function (t) {
              this.wrapper.find(e).each(function (i) {
                n(this).css("z-index", "firstHandle" == t ? 1 - i : i);
              });
            },
            _formResetHandler: function () {
              var n = this,
                t = n.options;
              setTimeout(function () {
                var u = n.element.find("input"),
                  i = u[0].value,
                  r = u[1].value;
                n.values(
                  "" === i || isNaN(i) ? t.min : i,
                  "" === r || isNaN(r) ? t.max : r
                );
              });
            },
            destroy: function () {
              var n = this;
              nt.fn.destroy.call(n);
              n.wrapper
                .off(u)
                .find(c + ", " + p)
                .off(u)
                .end()
                .find(e)
                .off(u);
              n._firstHandleDrag.draggable.destroy();
              n._lastHandleDrag.draggable.destroy();
            },
          });
          ft.Selection = function (n, t, r) {
            function u(u) {
              u = u || [];
              var l = u[0] - r.min,
                a = u[1] - r.min,
                v = i.ceil(o(l / r.smallStep)),
                y = i.ceil(o(a / r.smallStep)),
                e = t._pixelSteps[v],
                s = t._pixelSteps[y],
                h = parseInt(t._outerSize(n.eq(0)) / 2, 10),
                c = t._isRtl ? 2 : 0;
              n.eq(0)
                .css(t._position, e - h - c)
                .end()
                .eq(1)
                .css(t._position, s - h - c);
              f(e, s);
            }
            function f(n, r) {
              var e,
                u,
                f = t._trackDiv.find(".k-slider-selection");
              e = i.abs(n - r);
              f[t._sizeFn](e);
              t._isRtl
                ? ((u = i.max(n, r)), f.css("right", t._maxSelection - u - 1))
                : ((u = i.min(n, r)), f.css(t._position, u - 1));
            }
            u(t.value());
            t.bind([it, ht, lt], function (n) {
              u(n.values);
            });
          };
          r.ui.plugin(ft);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.colorpicker.min",
      [
        "kendo.core.min",
        "kendo.color.min",
        "kendo.popup.min",
        "kendo.slider.min",
        "kendo.userevents.min",
        "kendo.button.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t, i) {
          function b(n, t, i) {
            i = e(i);
            i &&
              !i.equals(n.color()) &&
              ("change" == t && (n._value = i),
              (i = 1 != i.a ? i.toCssRgba() : i.toCss()),
              n.trigger(t, { value: i }));
          }
          function v(n, t, i) {
            var u, r;
            return (
              (n = Array.prototype.slice.call(n)),
              (u = n.length),
              (r = n.indexOf(t)),
              r < 0
                ? i < 0
                  ? n[u - 1]
                  : n[0]
                : ((r += i), r < 0 ? (r += u) : (r %= u), n[r])
            );
          }
          function h(n) {
            n.preventDefault();
          }
          function y(n, t) {
            return function () {
              return n.apply(t, arguments);
            };
          }
          var f = window.kendo,
            p = f.ui,
            c = p.Widget,
            e = f.parseColor,
            k = f.Color,
            r = f.keys,
            s = "background-color",
            l = "k-state-selected",
            rt =
              "000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7",
            ut =
              "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",
            d = "#ffffff",
            g = {
              apply: "Apply",
              cancel: "Cancel",
              noColor: "no color",
              clearColor: "Clear color",
              previewInput: "Color Hexadecimal Code",
            },
            u = ".kendoColorTools",
            a = "click" + u,
            w = "keydown" + u,
            nt = f.support.browser,
            ft = nt.msie && nt.version < 9,
            o = c.extend({
              init: function (n, t) {
                var r,
                  i = this;
                c.fn.init.call(i, n, t);
                n = i.element;
                t = i.options;
                i._value = t.value = e(t.value);
                i._tabIndex = n.attr("tabIndex") || 0;
                r = i._ariaId = t.ariaId;
                r && n.attr("aria-labelledby", r);
                t._standalone && (i._triggerSelect = i._triggerChange);
              },
              options: { name: "ColorSelector", value: null, _standalone: !0 },
              events: ["change", "select", "cancel"],
              color: function (n) {
                return (
                  n !== i &&
                    ((this._value = e(n)), this._updateUI(this._value)),
                  this._value
                );
              },
              value: function (n) {
                return (
                  (n = this.color(n)),
                  n && (n = this.options.opacity ? n.toCssRgba() : n.toCss()),
                  n || null
                );
              },
              enable: function (t) {
                0 === arguments.length && (t = !0);
                n(".k-disabled-overlay", this.wrapper).remove();
                t ||
                  this.wrapper.append("<div class='k-disabled-overlay'></div>");
                this._onEnable(t);
              },
              _select: function (n, t) {
                var i = this._value;
                n = this.color(n);
                t ||
                  (this.element.trigger("change"),
                  n.equals(i)
                    ? this._standalone || this.trigger("cancel")
                    : this.trigger("change", { value: this.value() }));
              },
              _triggerSelect: function (n) {
                b(this, "select", n);
              },
              _triggerChange: function (n) {
                b(this, "change", n);
              },
              destroy: function () {
                this.element && this.element.off(u);
                this.wrapper && this.wrapper.off(u).find("*").off(u);
                this.wrapper = null;
                c.fn.destroy.call(this);
              },
              _updateUI: n.noop,
              _selectOnHide: function () {
                return null;
              },
              _cancel: function () {
                this.trigger("cancel");
              },
            }),
            tt = o.extend({
              init: function (t, i) {
                var r,
                  h,
                  c,
                  l,
                  u = this;
                if (
                  (o.fn.init.call(u, t, i),
                  (t = u.wrapper = u.element),
                  (i = u.options),
                  (r = i.palette),
                  "websafe" == r
                    ? ((r = ut), (i.columns = 18))
                    : "basic" == r && (r = rt),
                  "string" == typeof r && (r = r.split(",")),
                  n.isArray(r) &&
                    (r = n.map(r, function (n) {
                      return e(n);
                    })),
                  (u._selectedID = (i.ariaId || f.guid()) + "_selected"),
                  t
                    .addClass("k-widget k-colorpalette")
                    .attr("role", "grid")
                    .attr("aria-readonly", "true")
                    .append(
                      n(
                        u._template({
                          colors: r,
                          columns: i.columns,
                          tileSize: i.tileSize,
                          value: u._value,
                          id: i.ariaId,
                        })
                      )
                    )
                    .on(a, ".k-item", function (t) {
                      u._select(n(t.currentTarget).css(s));
                    })
                    .attr("tabIndex", u._tabIndex)
                    .on(w, y(u._keydown, u)),
                  (h = i.tileSize))
                ) {
                  if (/number|string/.test(typeof h)) c = l = parseFloat(h);
                  else {
                    if ("object" != typeof h)
                      throw Error(
                        "Unsupported value for the 'tileSize' argument"
                      );
                    c = parseFloat(h.width);
                    l = parseFloat(h.height);
                  }
                  t.find(".k-item").css({ width: c, height: l });
                }
              },
              focus: function () {
                this.wrapper &&
                  !this.wrapper.is("[unselectable='on']") &&
                  this.wrapper.focus();
              },
              options: {
                name: "ColorPalette",
                columns: 10,
                tileSize: null,
                palette: "basic",
              },
              _onEnable: function (n) {
                n
                  ? this.wrapper.attr("tabIndex", this._tabIndex)
                  : this.wrapper.removeAttr("tabIndex");
              },
              _keydown: function (t) {
                var i,
                  c,
                  a = this.wrapper,
                  o = a.find(".k-item"),
                  u = o.filter("." + l).get(0),
                  f = t.keyCode;
                if (
                  (f == r.LEFT
                    ? (i = v(o, u, -1))
                    : f == r.RIGHT
                    ? (i = v(o, u, 1))
                    : f == r.DOWN
                    ? (i = v(o, u, this.options.columns))
                    : f == r.UP
                    ? (i = v(o, u, -this.options.columns))
                    : f == r.ENTER
                    ? (h(t), u && this._select(n(u).css(s)))
                    : f == r.ESC && this._cancel(),
                  i)
                ) {
                  h(t);
                  this._current(i);
                  try {
                    c = e(i.css(s));
                    this._triggerSelect(c);
                  } catch (y) {}
                }
              },
              _current: function (t) {
                this.wrapper
                  .find("." + l)
                  .removeClass(l)
                  .attr("aria-selected", !1)
                  .removeAttr("id");
                n(t)
                  .addClass(l)
                  .attr("aria-selected", !0)
                  .attr("id", this._selectedID);
                this.element
                  .removeAttr("aria-activedescendant")
                  .attr("aria-activedescendant", this._selectedID);
              },
              _updateUI: function (t) {
                var i = null;
                this.wrapper.find(".k-item").each(function () {
                  var r = e(n(this).css(s));
                  if (r && r.equals(t)) return (i = this), !1;
                });
                this._current(i);
              },
              _template: f.template(
                '<table class="k-palette k-reset" role="presentation"><tr role="row"># for (var i = 0; i < colors.length; ++i) { ## var selected = colors[i].equals(value); ## if (i && i % columns == 0) { # </tr><tr role="row"> # } #<td role="gridcell" unselectable="on" style="background-color:#= colors[i].toCss() #"#= selected ? " aria-selected=true" : "" # #=(id && i === 0) ? "id=\\""+id+"\\" " : "" # class="k-item#= selected ? " ' +
                  l +
                  '" : "" #" aria-label="#= colors[i].toCss() #"></td># } #</tr></table>'
              ),
            }),
            it = o.extend({
              init: function (t, i) {
                var u = this;
                o.fn.init.call(u, t, i);
                i = u.options;
                i.messages = i.options
                  ? n.extend(u.options.messages, i.options.messages)
                  : u.options.messages;
                t = u.element;
                u.wrapper = t
                  .addClass("k-widget k-flatcolorpicker")
                  .append(u._template(i));
                u._hueElements = n(
                  ".k-hsv-rectangle, .k-alpha-slider .k-slider-track",
                  t
                );
                u._selectedColor = n(".k-selected-color-display", t);
                u._colorAsText = n("input.k-color-value", t);
                u._sliders();
                u._hsvArea();
                u._updateUI(u._value || e("#f00"));
                t.find("input.k-color-value")
                  .on(w, function (t) {
                    var i,
                      o,
                      f = this;
                    if (t.keyCode == r.ENTER)
                      try {
                        i = e(f.value);
                        o = u.color();
                        u._select(i, i.equals(o));
                      } catch (s) {
                        n(f).addClass("k-state-error");
                      }
                    else
                      u.options.autoupdate &&
                        setTimeout(function () {
                          var n = e(f.value, !0);
                          n && u._updateUI(n, !0);
                        }, 10);
                  })
                  .end()
                  .on(a, ".k-controls button.apply", function () {
                    u.options._clearedColor
                      ? u.trigger("change")
                      : u._select(u._getHSV());
                  })
                  .on(a, ".k-controls button.cancel", function () {
                    u._updateUI(u.color());
                    u._cancel();
                  });
                ft && u._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;
                o.fn.destroy.call(this);
              },
              options: {
                name: "FlatColorPicker",
                opacity: !1,
                buttons: !1,
                input: !0,
                preview: !0,
                clearButton: !1,
                autoupdate: !0,
                messages: g,
              },
              _applyIEFilter: function () {
                var t = this.element.find(".k-hue-slider .k-slider-track")[0],
                  n = t.currentStyle.backgroundImage;
                n = n.replace(/^url\([\'\"]?|[\'\"]?\)$/g, "");
                t.style.filter =
                  "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
                  n +
                  "', sizingMethod='scale')";
              },
              _sliders: function () {
                function t(t) {
                  n._updateUI(n._getHSV(t.value, null, null, null));
                }
                function i(t) {
                  n._updateUI(n._getHSV(null, null, null, t.value / 100));
                }
                var n = this,
                  r = n.element,
                  u = r.find(".k-hue-slider"),
                  f = r.find(".k-alpha-slider");
                u.attr("aria-label", "hue saturation");
                n._hueSlider = u
                  .kendoSlider({
                    min: 0,
                    max: 360,
                    tickPlacement: "none",
                    showButtons: !1,
                    slide: t,
                    change: t,
                  })
                  .data("kendoSlider");
                f.attr("aria-label", "opacity");
                n._opacitySlider = f
                  .kendoSlider({
                    min: 0,
                    max: 100,
                    tickPlacement: "none",
                    showButtons: !1,
                    slide: i,
                    change: i,
                  })
                  .data("kendoSlider");
              },
              _hsvArea: function () {
                function r(n, i) {
                  var o = this.offset,
                    r = n - o.left,
                    u = i - o.top,
                    f = this.width,
                    e = this.height;
                  r = r < 0 ? 0 : r > f ? f : r;
                  u = u < 0 ? 0 : u > e ? e : u;
                  t._svChange(r / f, 1 - u / e);
                }
                var t = this,
                  u = t.element,
                  n = u.find(".k-hsv-rectangle"),
                  i = n
                    .find(".k-draghandle")
                    .attr("tabIndex", 0)
                    .on(w, y(t._keydown, t));
                t._hsvEvents = new f.UserEvents(n, {
                  global: !0,
                  press: function (t) {
                    this.offset = f.getOffset(n);
                    this.width = n.width();
                    this.height = n.height();
                    i.focus();
                    r.call(this, t.x.location, t.y.location);
                  },
                  start: function () {
                    n.addClass("k-dragging");
                    i.focus();
                  },
                  move: function (n) {
                    n.preventDefault();
                    r.call(this, n.x.location, n.y.location);
                  },
                  end: function () {
                    n.removeClass("k-dragging");
                  },
                });
                t._hsvRect = n;
                t._hsvHandle = i;
              },
              _onEnable: function (n) {
                this._hueSlider.enable(n);
                this._opacitySlider && this._opacitySlider.enable(n);
                this.wrapper.find("input").attr("disabled", !n);
                var t = this._hsvRect.find(".k-draghandle");
                n
                  ? t.attr("tabIndex", this._tabIndex)
                  : t.removeAttr("tabIndex");
              },
              _keydown: function (n) {
                function i(i, r) {
                  var u = t._getHSV();
                  u[i] += r * (n.shiftKey ? 0.01 : 0.05);
                  u[i] < 0 && (u[i] = 0);
                  u[i] > 1 && (u[i] = 1);
                  t._updateUI(u);
                  h(n);
                }
                function u(i) {
                  var r = t._getHSV();
                  r.h += i * (n.shiftKey ? 1 : 5);
                  r.h < 0 && (r.h = 0);
                  r.h > 359 && (r.h = 359);
                  t._updateUI(r);
                  h(n);
                }
                var t = this;
                switch (n.keyCode) {
                  case r.LEFT:
                    n.ctrlKey ? u(-1) : i("s", -1);
                    break;
                  case r.RIGHT:
                    n.ctrlKey ? u(1) : i("s", 1);
                    break;
                  case r.UP:
                    i(n.ctrlKey && t._opacitySlider ? "a" : "v", 1);
                    break;
                  case r.DOWN:
                    i(n.ctrlKey && t._opacitySlider ? "a" : "v", -1);
                    break;
                  case r.ENTER:
                    t._select(t._getHSV());
                    break;
                  case r.F2:
                    t.wrapper.find("input.k-color-value").focus().select();
                    break;
                  case r.ESC:
                    t._cancel();
                }
              },
              focus: function () {
                this._hsvHandle.focus();
              },
              _getHSV: function (n, t, i, r) {
                var u = this._hsvRect,
                  e = u.width(),
                  o = u.height(),
                  f = this._hsvHandle.position();
                return (
                  null == n && (n = this._hueSlider.value()),
                  null == t && (t = f.left / e),
                  null == i && (i = 1 - f.top / o),
                  null == r &&
                    (r = this._opacitySlider
                      ? this._opacitySlider.value() / 100
                      : 1),
                  k.fromHSV(n, t, i, r)
                );
              },
              _svChange: function (n, t) {
                var i = this._getHSV(null, n, t, null);
                this._updateUI(i);
              },
              _updateUI: function (n, t) {
                var i = this,
                  r = i._hsvRect;
                n &&
                  (this._colorAsText.attr(
                    "title",
                    i.options.messages.previewInput
                  ),
                  this._colorAsText.removeClass("k-state-error"),
                  i._selectedColor.css(s, n.toDisplay()),
                  t ||
                    i._colorAsText.val(
                      i._opacitySlider ? n.toCssRgba() : n.toCss()
                    ),
                  i._triggerSelect(n),
                  (n = n.toHSV()),
                  i._hsvHandle.css({
                    left: n.s * r.width() + "px",
                    top: (1 - n.v) * r.height() + "px",
                  }),
                  i._hueElements.css(s, k.fromHSV(n.h, 1, 1, 1).toCss()),
                  i._hueSlider.value(n.h),
                  i._opacitySlider && i._opacitySlider.value(100 * n.a));
              },
              _selectOnHide: function () {
                return this.options.buttons ? null : this._getHSV();
              },
              _template: f.template(
                '# if (preview) { #<div class="k-selected-color"><div class="k-selected-color-display"><div class="k-color-input"><input class="k-color-value" # if (clearButton && !_standalone) { #placeholder="#: messages.noColor #" # } ##= !data.input ? \'style="visibility: hidden;"\' : "" #># if (clearButton && !_standalone) { #<span class="k-clear-color k-button k-bare" title="#: messages.clearColor #"></span># } #</div></div></div># } ## if (clearButton && !_standalone && !preview) { #<div class="k-clear-color-container"><span class="k-clear-color k-button k-bare">#: messages.clearColor #</span></div># } #<div class="k-hsv-rectangle"><div class="k-hsv-gradient"></div><div class="k-draghandle"></div></div><div class="k-sliders-wrap k-vbox"><input class="k-hue-slider" /># if (opacity) { #<input class="k-alpha-slider k-transparency-slider" /># } #</div># if (buttons) { #<div unselectable="on" class="k-controls"><button class="k-button k-primary apply">#: messages.apply #</button> <button class="k-button cancel">#: messages.cancel #</button></div># } #'
              ),
            }),
            et = c.extend({
              init: function (t, i) {
                var u,
                  f,
                  o,
                  s,
                  h,
                  r = this;
                c.fn.init.call(r, t, i);
                i = r.options;
                t = r.element;
                u = t.attr("value") || t.val();
                u = u ? e(u, !0) : e(i.value, !0);
                r._value = i.value = u;
                f = r.wrapper = n(r._template(i));
                t.hide().after(f);
                t.is("input") &&
                  (t.appendTo(f),
                  (o = t.closest("label")),
                  (s = t.attr("id")),
                  s && (o = o.add('label[for="' + s + '"]')),
                  o.click(function (n) {
                    r.open();
                    n.preventDefault();
                  }));
                r._tabIndex = t.attr("tabIndex") || 0;
                r.enable(!t.attr("disabled"));
                h = t.attr("accesskey");
                h && (t.attr("accesskey", null), f.attr("accesskey", h));
                r.bind("activate", function (n) {
                  n.isDefaultPrevented() || r.toggle();
                });
                r._updateUI(u);
              },
              destroy: function () {
                this.wrapper.off(u).find("*").off(u);
                this._popup &&
                  (this._selector.destroy(), this._popup.destroy());
                this._selector = this._popup = this.wrapper = null;
                c.fn.destroy.call(this);
              },
              enable: function (n) {
                var t = this,
                  i = t.wrapper,
                  r = i.children(".k-picker-wrap"),
                  f = r.find(".k-select");
                0 === arguments.length && (n = !0);
                t.element.attr("disabled", !n);
                i.attr("aria-disabled", !n);
                f.off(u).on("mousedown" + u, h);
                i.addClass("k-state-disabled")
                  .removeAttr("tabIndex")
                  .add("*", i)
                  .off(u);
                n
                  ? i
                      .removeClass("k-state-disabled")
                      .attr("tabIndex", t._tabIndex)
                      .on("mouseenter" + u, function () {
                        r.addClass("k-state-hover");
                      })
                      .on("mouseleave" + u, function () {
                        r.removeClass("k-state-hover");
                      })
                      .on("focus" + u, function () {
                        r.addClass("k-state-focused");
                      })
                      .on("blur" + u, function () {
                        r.removeClass("k-state-focused");
                      })
                      .on(w, y(t._keydown, t))
                      .on(a, ".k-select", y(t.toggle, t))
                      .on(
                        a,
                        t.options.toolIcon
                          ? ".k-tool-icon"
                          : ".k-selected-color",
                        function () {
                          t.trigger("activate");
                        }
                      )
                  : t.close();
              },
              _template: f.template(
                '<span role="textbox" aria-haspopup="true" class="k-widget k-colorpicker"><span class="k-picker-wrap k-state-default"># if (toolIcon) { #<span class="k-icon k-tool-icon #= toolIcon #"><span class="k-selected-color"></span></span># } else { #<span class="k-selected-color"><span class="k-icon k-i-line" style="display: none;"></span></span># } #<span class="k-select" unselectable="on" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span></span>'
              ),
              options: {
                name: "ColorPicker",
                palette: null,
                columns: 10,
                toolIcon: null,
                value: null,
                messages: g,
                opacity: !1,
                buttons: !0,
                preview: !0,
                clearButton: !1,
                ARIATemplate: 'Current selected color is #=data || ""#',
              },
              events: ["activate", "change", "select", "open", "close"],
              open: function () {
                this.element.prop("disabled") || this._getPopup().open();
              },
              close: function () {
                var n = (this._selector && this._selector.options) || {};
                n._closing = !0;
                this._getPopup().close();
                delete n._closing;
              },
              toggle: function () {
                this.element.prop("disabled") || this._getPopup().toggle();
              },
              _noColorIcon: function () {
                return this.wrapper.find(
                  ".k-picker-wrap > .k-selected-color > .k-icon.k-i-line"
                );
              },
              color: o.fn.color,
              value: o.fn.value,
              _select: o.fn._select,
              _triggerSelect: o.fn._triggerSelect,
              _isInputTypeColor: function () {
                var n = this.element[0];
                return /^input$/i.test(n.tagName) && /^color$/i.test(n.type);
              },
              _updateUI: function (n) {
                var t = "";
                n &&
                  ((t =
                    this._isInputTypeColor() || 1 == n.a
                      ? n.toCss()
                      : n.toCssRgba()),
                  this.element.val(t));
                this._ariaTemplate ||
                  (this._ariaTemplate = f.template(this.options.ARIATemplate));
                this.wrapper.attr("aria-label", this._ariaTemplate(t));
                this._triggerSelect(n);
                this.wrapper
                  .find(".k-selected-color")
                  .css(s, n ? n.toDisplay() : d);
                this._noColorIcon()[t ? "hide" : "show"]();
              },
              _keydown: function (n) {
                var t = n.keyCode;
                this._getPopup().visible()
                  ? (t == r.ESC
                      ? this._selector._cancel()
                      : this._selector._keydown(n),
                    h(n))
                  : (t != r.ENTER && t != r.DOWN) || (this.open(), h(n));
              },
              _getPopup: function () {
                var u,
                  c,
                  h,
                  r,
                  t = this,
                  o = t._popup;
                return (
                  o ||
                    ((u = t.options),
                    (c = u.palette ? tt : it),
                    (u._standalone = !1),
                    delete u.select,
                    delete u.change,
                    delete u.cancel,
                    (h = f.guid()),
                    (r = t._selector =
                      new c(
                        n('<div id="' + h + '"/>').appendTo(document.body),
                        u
                      )),
                    t.wrapper.attr("aria-owns", h),
                    (t._popup = o =
                      r.wrapper
                        .kendoPopup({
                          anchor: t.wrapper,
                          adjustSize: { width: 5, height: 0 },
                        })
                        .data("kendoPopup")),
                    r.element.find(".k-clear-color").kendoButton({
                      icon: "reset-color",
                      click: function (n) {
                        r.options._clearedColor = !0;
                        t.value(null);
                        t.element.val(null);
                        t._updateUI(null);
                        r._colorAsText.val("");
                        r._hsvHandle.css({ top: "0px", left: "0px" });
                        r._selectedColor.css(s, d);
                        t.trigger("change", { value: t.value() });
                        n.preventDefault();
                      },
                    }),
                    r.bind({
                      select: function (n) {
                        t._updateUI(e(n.value));
                        delete r.options._clearedColor;
                      },
                      change: function () {
                        r.options._clearedColor || t._select(r.color());
                        t.close();
                      },
                      cancel: function () {
                        r.options._clearedColor &&
                          !t.value() &&
                          r.value() &&
                          t._select(r.color(), !0);
                        t.close();
                      },
                    }),
                    o.bind({
                      close: function (n) {
                        var f, e, o, u;
                        return t.trigger("close")
                          ? (n.preventDefault(), i)
                          : (t.wrapper
                              .children(".k-picker-wrap")
                              .removeClass("k-state-focused"),
                            (f = r._selectOnHide()),
                            (e = r.value()),
                            (o = t.value()),
                            (u = r.options),
                            f
                              ? (u._clearedColor && !o) || t._select(f)
                              : (setTimeout(function () {
                                  t.wrapper &&
                                    !t.wrapper.is("[unselectable='on']") &&
                                    t.wrapper.focus();
                                }),
                                !u._closing && u._clearedColor && !o && e
                                  ? t._select(e, !0)
                                  : t._updateUI(t.color())),
                            i);
                      },
                      open: function (n) {
                        t.trigger("open")
                          ? n.preventDefault()
                          : t.wrapper
                              .children(".k-picker-wrap")
                              .addClass("k-state-focused");
                      },
                      activate: function () {
                        r._select(t.color(), !0);
                        r.focus();
                        t.wrapper
                          .children(".k-picker-wrap")
                          .addClass("k-state-focused");
                      },
                    })),
                  o
                );
              },
            });
          p.plugin(tt);
          p.plugin(it);
          p.plugin(et);
        })(jQuery, parseInt),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.numerictextbox.min",
      ["kendo.core.min", "kendo.userevents.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function w(n, t) {
            var i = "k-i-arrow-" + ("increase" === n ? "60-up" : "60-down");
            return (
              '<span unselectable="on" class="k-link k-link-' +
              n +
              '" aria-label="' +
              t +
              '" title="' +
              t +
              '"><span unselectable="on" class="' +
              v +
              " " +
              i +
              '"></span></span>'
            );
          }
          function et(n, t) {
            var i = ("" + parseFloat(n, 10)).split(f);
            return i[1] && (i[1] = i[1].substring(0, t)), i.join(f);
          }
          var r = window.kendo,
            s = r.caret,
            e = r.keys,
            b = r.ui,
            h = b.Widget,
            ot = r._activeElement,
            k = r._extractFormat,
            st = r.parseFloat,
            ht = r.support.placeholder,
            ct = r.getCulture,
            c = "change",
            d = "disabled",
            g = "readonly",
            lt = "k-input",
            nt = "spin",
            u = ".kendoNumericTextBox",
            at = "touchend",
            vt = "mouseleave" + u,
            tt = "mouseenter" + u + " " + vt,
            l = "k-state-default",
            it = "k-state-focused",
            rt = "k-state-hover",
            a = "focus",
            f = ".",
            v = "k-icon",
            y = "k-state-selected",
            p = "k-state-disabled",
            ut = "k-state-invalid",
            ft = "aria-disabled",
            yt = /^(-)?(\d*)$/,
            i = null,
            o = n.proxy,
            pt = n.extend,
            wt = h.extend({
              init: function (f, e) {
                var l,
                  v,
                  y,
                  c,
                  p,
                  w,
                  s = this,
                  b = e && e.step !== t;
                h.fn.init.call(s, f, e);
                e = s.options;
                f = s.element
                  .on("focusout" + u, o(s._focusout, s))
                  .attr("role", "spinbutton");
                e.placeholder = e.placeholder || f.attr("placeholder");
                l = s.min(f.attr("min"));
                v = s.max(f.attr("max"));
                y = s._parse(f.attr("step"));
                e.min === i && l !== i && (e.min = l);
                e.max === i && v !== i && (e.max = v);
                b || y === i || (e.step = y);
                s._initialOptions = pt({}, e);
                w = f.attr("type");
                s._reset();
                s._wrapper();
                s._arrows();
                s._validation();
                s._input();
                r.support.mobileOS
                  ? s._text.on(at + u + " " + a + u, function () {
                      r.support.browser.edge
                        ? s._text.one(a + u, function () {
                            s._toggleText(!1);
                            f.focus();
                          })
                        : (s._toggleText(!1), f.focus());
                    })
                  : s._text.on(a + u, o(s._click, s));
                f.attr(
                  "aria-valuemin",
                  e.min !== i ? e.min * e.factor : e.min
                ).attr("aria-valuemax", e.max !== i ? e.max * e.factor : e.max);
                e.format = k(e.format);
                c = e.value;
                c == i && (c = "number" == w ? parseFloat(f.val()) : f.val());
                s.value(c);
                p =
                  f.is("[disabled]") ||
                  n(s.element).parents("fieldset").is(":disabled");
                p ? s.enable(!1) : s.readonly(f.is("[readonly]"));
                s.angular("compile", function () {
                  return { elements: s._text.get() };
                });
                r.notify(s);
              },
              options: {
                name: "NumericTextBox",
                decimals: i,
                restrictDecimals: !1,
                min: i,
                max: i,
                value: i,
                step: 1,
                round: !0,
                culture: "",
                format: "n",
                spinners: !0,
                placeholder: "",
                factor: 1,
                upArrowText: "Increase value",
                downArrowText: "Decrease value",
              },
              events: [c, nt],
              _editable: function (n) {
                var t = this,
                  r = t.element,
                  i = n.disable,
                  f = n.readonly,
                  e = t._text.add(r),
                  s = t._inputWrapper.off(tt);
                t._toggleText(!0);
                t._upArrowEventHandler.unbind("press");
                t._downArrowEventHandler.unbind("press");
                r.off("keydown" + u)
                  .off("keypress" + u)
                  .off("keyup" + u)
                  .off("paste" + u);
                f || i
                  ? (s.addClass(i ? p : l).removeClass(i ? l : p),
                    e.attr(d, i).attr(g, f).attr(ft, i))
                  : (s.addClass(l).removeClass(p).on(tt, t._toggleHover),
                    e.removeAttr(d).removeAttr(g).attr(ft, !1),
                    t._upArrowEventHandler.bind("press", function (n) {
                      n.preventDefault();
                      t._spin(1);
                      t._upArrow.addClass(y);
                    }),
                    t._downArrowEventHandler.bind("press", function (n) {
                      n.preventDefault();
                      t._spin(-1);
                      t._downArrow.addClass(y);
                    }),
                    t.element
                      .on("keydown" + u, o(t._keydown, t))
                      .on("keypress" + u, o(t._keypress, t))
                      .on("keyup" + u, o(t._keyup, t))
                      .on("paste" + u, o(t._paste, t)));
              },
              readonly: function (n) {
                this._editable({ readonly: n === t || n, disable: !1 });
              },
              enable: function (n) {
                this._editable({ readonly: !1, disable: !(n = n === t || n) });
              },
              setOptions: function (n) {
                var r = this;
                h.fn.setOptions.call(r, n);
                r._arrowsWrap.toggle(r.options.spinners);
                r._inputWrapper.toggleClass(
                  "k-expand-padding",
                  !r.options.spinners
                );
                r._text.prop("placeholder", r.options.placeholder);
                r._placeholder(r.options.placeholder);
                r.element.attr({
                  "aria-valuemin":
                    r.options.min !== i
                      ? r.options.min * r.options.factor
                      : r.options.min,
                  "aria-valuemax":
                    r.options.max !== i
                      ? r.options.max * r.options.factor
                      : r.options.max,
                });
                r.options.format = k(r.options.format);
                n.value !== t && r.value(n.value);
              },
              destroy: function () {
                var n = this;
                n.element
                  .add(n._text)
                  .add(n._upArrow)
                  .add(n._downArrow)
                  .add(n._inputWrapper)
                  .off(u);
                n._upArrowEventHandler.destroy();
                n._downArrowEventHandler.destroy();
                n._form && n._form.off("reset", n._resetHandler);
                h.fn.destroy.call(n);
              },
              min: function (n) {
                return this._option("min", n);
              },
              max: function (n) {
                return this._option("max", n);
              },
              step: function (n) {
                return this._option("step", n);
              },
              value: function (n) {
                var r,
                  i = this;
                return n === t
                  ? i._value
                  : ((n = i._parse(n)),
                    (r = i._adjust(n)),
                    n === r && (i._update(n), (i._old = i._value)),
                    t);
              },
              focus: function () {
                this._focusin();
              },
              _adjust: function (n) {
                var f = this,
                  u = f.options,
                  t = u.min,
                  r = u.max;
                return n === i
                  ? n
                  : (t !== i && n < t ? (n = t) : r !== i && n > r && (n = r),
                    n);
              },
              _arrows: function () {
                var i,
                  t = this,
                  f = function () {
                    clearTimeout(t._spinning);
                    i.removeClass(y);
                  },
                  u = t.options,
                  e = u.spinners,
                  o = t.element;
                i = o.siblings("." + v);
                i[0] ||
                  ((i = n(
                    w("increase", u.upArrowText) +
                      w("decrease", u.downArrowText)
                  ).insertAfter(o)),
                  (t._arrowsWrap = i
                    .wrapAll('<span class="k-select"/>')
                    .parent()));
                e ||
                  (i.parent().toggle(e),
                  t._inputWrapper.addClass("k-expand-padding"));
                t._upArrow = i.eq(0);
                t._upArrowEventHandler = new r.UserEvents(t._upArrow, {
                  release: f,
                });
                t._downArrow = i.eq(1);
                t._downArrowEventHandler = new r.UserEvents(t._downArrow, {
                  release: f,
                });
              },
              _validation: function () {
                var t = this,
                  i = t.element;
                t._validationIcon = n(
                  "<span class='" + v + " k-i-warning'></span>"
                )
                  .hide()
                  .insertAfter(i);
              },
              _blur: function () {
                var n = this;
                n._toggleText(!0);
                n._change(n.element.val());
              },
              _click: function (n) {
                var t = this;
                clearTimeout(t._focusing);
                t._focusing = setTimeout(function () {
                  var i,
                    o,
                    r,
                    h = n.target,
                    a = s(h)[0],
                    c = h.value.substring(0, a),
                    l = t._format(t.options.format),
                    u = l[","],
                    e = 0;
                  u &&
                    ((o = RegExp("\\" + u, "g")),
                    (r = RegExp(
                      "(^(-)$)|(^(-)?([\\d\\" +
                        u +
                        "]+)(\\" +
                        l[f] +
                        ")?(\\d+)?)"
                    )));
                  r && (i = r.exec(c));
                  i &&
                    ((e = i[0].replace(o, "").length),
                    c.indexOf("(") != -1 && t._value < 0 && e++);
                  t._focusin();
                  s(t.element[0], e);
                });
              },
              _change: function (n) {
                var t = this,
                  i = t.options.factor;
                i && 1 !== i && ((n = r.parseFloat(n)), null !== n && (n /= i));
                t._update(n);
                n = t._value;
                t._old != n &&
                  ((t._old = n),
                  t._typing || t.element.trigger(c),
                  t.trigger(c));
                t._typing = !1;
              },
              _culture: function (n) {
                return n || ct(this.options.culture);
              },
              _focusin: function () {
                var n = this;
                n._inputWrapper.addClass(it);
                n._toggleText(!1);
                n.element[0].focus();
              },
              _focusout: function () {
                var n = this;
                clearTimeout(n._focusing);
                n._inputWrapper.removeClass(it).removeClass(rt);
                n._blur();
                n._removeInvalidState();
              },
              _format: function (n, t) {
                var i = this._culture(t).numberFormat;
                return (
                  (n = n.toLowerCase()),
                  n.indexOf("c") > -1
                    ? (i = i.currency)
                    : n.indexOf("p") > -1 && (i = i.percent),
                  i
                );
              },
              _input: function () {
                var t,
                  e = this,
                  r = e.options,
                  o = "k-formatted-value",
                  u = e.element.addClass(lt).show()[0],
                  s = u.accessKey,
                  h = e.wrapper;
                t = h.find(f + o);
                t[0] ||
                  (t = n('<input type="text"/>').insertBefore(u).addClass(o));
                try {
                  u.setAttribute("type", "text");
                } catch (c) {
                  u.type = "text";
                }
                t[0].title = u.title;
                t[0].tabIndex = u.tabIndex;
                t[0].style.cssText = u.style.cssText;
                t.prop("placeholder", r.placeholder);
                s && (t.attr("accesskey", s), (u.accessKey = ""));
                e._text = t
                  .addClass(u.className)
                  .attr({
                    role: "spinbutton",
                    "aria-valuemin": r.min !== i ? r.min * r.factor : r.min,
                    "aria-valuemax": r.max !== i ? r.max * r.factor : r.max,
                    autocomplete: "off",
                  });
              },
              _keydown: function (n) {
                var t = this,
                  i = n.keyCode;
                t._key = i;
                i == e.DOWN
                  ? t._step(-1)
                  : i == e.UP
                  ? t._step(1)
                  : i == e.ENTER
                  ? t._change(t.element.val())
                  : i != e.TAB && (t._typing = !0);
              },
              _keypress: function (n) {
                var t, o, r, h, c, y, u, l, a, i, v;
                0 === n.which ||
                  n.metaKey ||
                  n.ctrlKey ||
                  n.keyCode === e.BACKSPACE ||
                  n.keyCode === e.ENTER ||
                  ((t = this),
                  (o = t.options.min),
                  (r = t.element),
                  (h = s(r)),
                  (c = h[0]),
                  (y = h[1]),
                  (u = String.fromCharCode(n.which)),
                  (l = t._format(t.options.format)),
                  (a = t._key === e.NUMPAD_DOT),
                  (i = r.val()),
                  a && (u = l[f]),
                  (i = i.substring(0, c) + u + i.substring(y)),
                  (v = t._numericRegex(l).test(i)),
                  v && a
                    ? (r.val(i), s(r, c + u.length), n.preventDefault())
                    : ((null !== o && o >= 0 && "-" === i.charAt(0)) || !v) &&
                      (t._addInvalidState(), n.preventDefault()),
                  (t._key = 0));
              },
              _keyup: function () {
                this._removeInvalidState();
              },
              _addInvalidState: function () {
                var n = this;
                n._inputWrapper.addClass(ut);
                n._validationIcon.show();
              },
              _removeInvalidState: function () {
                var n = this;
                n._inputWrapper.removeClass(ut);
                n._validationIcon.hide();
              },
              _numericRegex: function (n) {
                var t = this,
                  r = n[f],
                  u = t.options.decimals,
                  e = "*";
                return (
                  r === f && (r = "\\" + r),
                  u === i && (u = n.decimals),
                  0 === u && t.options.restrictDecimals
                    ? yt
                    : (t.options.restrictDecimals && (e = "{0," + u + "}"),
                      t._separator !== r &&
                        ((t._separator = r),
                        (t._floatRegExp = RegExp(
                          "^(-)?(((\\d+(" +
                            r +
                            "\\d" +
                            e +
                            ")?)|(" +
                            r +
                            "\\d" +
                            e +
                            ")))?$"
                        ))),
                      t._floatRegExp)
                );
              },
              _paste: function (n) {
                var t = this,
                  r = n.target,
                  u = r.value,
                  e = t._format(t.options.format);
                setTimeout(function () {
                  var n = t._parse(r.value);
                  n === i
                    ? t._update(u)
                    : ((r.value = ("" + n).replace(f, e[f])),
                      (t._adjust(n) === n &&
                        t._numericRegex(e).test(r.value)) ||
                        t._update(u));
                });
              },
              _option: function (n, i) {
                var r = this,
                  u = r.element,
                  f = r.options;
                return i === t
                  ? f[n]
                  : ((i = r._parse(i)),
                    (i || "step" !== n) &&
                      ((f[n] = i),
                      u.add(r._text).attr("aria-value" + n, i),
                      u.attr(n, i)),
                    t);
              },
              _spin: function (n, t) {
                var i = this;
                t = t || 500;
                clearTimeout(i._spinning);
                i._spinning = setTimeout(function () {
                  i._spin(n, 50);
                }, t);
                i._step(n);
              },
              _step: function (n) {
                var t = this,
                  r = t.element,
                  u = t._value,
                  i = t._parse(r.val()) || 0,
                  f = t.options.decimals || 2;
                ot() != r[0] && t._focusin();
                t.options.factor && i && (i /= t.options.factor);
                i = +(i + t.options.step * n).toFixed(f);
                i = t._adjust(i);
                t._update(i);
                t._typing = !1;
                u !== i && t.trigger(nt);
              },
              _toggleHover: function (t) {
                n(t.currentTarget).toggleClass(rt, "mouseenter" === t.type);
              },
              _toggleText: function (n) {
                var t = this;
                t._text.toggle(n);
                t.element.toggle(!n);
              },
              _parse: function (n, t) {
                return st(n, this._culture(t), this.options.format);
              },
              _round: function (n, t) {
                var i = this.options.round ? r._round : et;
                return i(n, t);
              },
              _update: function (n) {
                var e,
                  t = this,
                  o = t.options,
                  h = o.factor,
                  c = o.format,
                  u = o.decimals,
                  s = t._culture(),
                  l = t._format(c, s);
                u === i && (u = l.decimals);
                n = t._parse(n, s);
                e = n !== i;
                e && (n = parseFloat(t._round(n, u), 10));
                t._value = n = t._adjust(n);
                t._placeholder(r.toString(n, c, s));
                e
                  ? (h && (n = parseFloat(t._round(n * h, u), 10)),
                    (n = "" + n),
                    n.indexOf("e") !== -1 && (n = t._round(+n, u)),
                    (n = n.replace(f, l[f])))
                  : (n = null);
                t.element.val(n);
                t.element.add(t._text).attr("aria-valuenow", n);
              },
              _placeholder: function (n) {
                var t = this._text;
                t.val(n);
                ht || n || t.val(this.options.placeholder);
                t.attr("title", this.element.attr("title") || t.val());
              },
              _wrapper: function () {
                var t,
                  i = this,
                  r = i.element,
                  u = r[0];
                t = r.parents(".k-numerictextbox");
                t.is("span.k-numerictextbox") ||
                  ((t = r
                    .hide()
                    .wrap('<span class="k-numeric-wrap k-state-default" />')
                    .parent()),
                  (t = t.wrap("<span/>").parent()));
                t[0].style.cssText = u.style.cssText;
                u.style.width = "";
                i.wrapper = t
                  .addClass("k-widget k-numerictextbox")
                  .addClass(u.className)
                  .css("display", "");
                i._inputWrapper = n(t[0].firstChild);
              },
              _reset: function () {
                var t = this,
                  i = t.element,
                  r = i.attr("form"),
                  u = r ? n("#" + r) : i.closest("form");
                u[0] &&
                  ((t._resetHandler = function () {
                    setTimeout(function () {
                      t.value(i[0].value);
                      t.max(t._initialOptions.max);
                      t.min(t._initialOptions.min);
                    });
                  }),
                  (t._form = u.on("reset", t._resetHandler)));
              },
            });
          b.plugin(wt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.filtermenu.min",
      [
        "kendo.datepicker.min",
        "kendo.numerictextbox.min",
        "kendo.dropdownlist.min",
        "kendo.binder.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function k(t, i) {
            t.filters &&
              (t.filters = n.grep(t.filters, function (n) {
                return k(n, i), n.filters ? n.filters.length : n.field != i;
              }));
          }
          function d(n) {
            var i, u, t, f, e, r;
            if (n && n.length)
              for (r = [], i = 0, u = n.length; i < u; i++)
                (t = n[i]),
                  (e = "" !== t.text ? t.text || t.value || t : t.text),
                  (f = null == t.value ? t.text || t : t.value),
                  (r[i] = { text: e, value: f });
            return r;
          }
          function ut(t, i) {
            return n.grep(t, function (t) {
              return t.filters
                ? ((t.filters = n.grep(t.filters, function (n) {
                    return n.field != i;
                  })),
                  t.filters.length)
                : t.field != i;
            });
          }
          function g(t, i) {
            t.filters &&
              (t.filters = n.grep(t.filters, function (n) {
                return (
                  g(n, i),
                  n.filters
                    ? n.filters.length
                    : n.field == i && "eq" == n.operator
                );
              }));
          }
          function nt(i) {
            return "and" == i.logic && i.filters.length > 1
              ? []
              : i.filters
              ? n.map(i.filters, function (n) {
                  return nt(n);
                })
              : i.value !== t
              ? [i.value]
              : [];
          }
          function b(n, r) {
            for (
              var f, u, h = i.getter(r, !0), e = [], o = 0, s = {};
              o < n.length;

            )
              (f = n[o++]),
                (u = h(f)),
                u === t || s.hasOwnProperty(u) || (e.push(f), (s[u] = !0));
            return e;
          }
          function ft(n, t) {
            return function (i) {
              var r = n(i);
              return b(r, t);
            };
          }
          var i = window.kendo,
            l = i.ui,
            r = n.proxy,
            et = i.support,
            u = et.browser.chrome ? "disabled" : "off",
            h = "kendoPopup",
            a = "init",
            v = "open",
            tt = "refresh",
            f = "change",
            e = ".kendoFilterMenu",
            y = "Is equal to",
            p = "Is not equal to",
            ot = { number: "numerictextbox", date: "datepicker" },
            st = { string: "text", number: "number", date: "date" },
            it = i.isFunction,
            c = l.Widget,
            ht =
              '<div class="k-filter-menu-container"><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 class="k-action-buttons"><button type="submit" title="#=messages.filter#" class="k-button k-primary">#=messages.filter#</button><button type="reset" title="#=messages.clear#" class="k-button">#=messages.clear#</button></div></div>',
            ct =
              '<div class="k-filter-menu-container"><div class="k-filter-help-text">#=messages.info#</div><label><input class="k-textbox" data-#=ns#bind="value: filters[0].value" name="filters[0].value"/></label><div class="k-action-buttons"><button type="submit" title="#=messages.filter#" class="k-button k-primary">#=messages.filter#</button><button type="reset" title="#=messages.clear#" class="k-button">#=messages.clear#</button></div></div>',
            lt =
              '<div class="k-filter-menu-container"><div class="k-filter-help-text">#=messages.info#</div><select title="#=messages.operator#" data-#=ns#bind="value: filters[0].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select title="#=messages.value#" data-#=ns#bind="value:filters[0].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#" data-#=ns#value-primitive="true"></select>#}else{#<input title="#=messages.value#" data-#=ns#bind="value:filters[0].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}##if(extra){#<select title="#=messages.logic#" class="k-filter-and" data-#=ns#bind="value: logic" data-#=ns#role="dropdownlist"><option value="and">#=messages.and#</option><option value="or">#=messages.or#</option></select><select title="#=messages.additionalOperator#" data-#=ns#bind="value: filters[1].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select title="#=messages.additionalValue#" data-#=ns#bind="value:filters[1].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#" data-#=ns#value-primitive="true"></select>#}else{#<input title="#=messages.additionalValue#" data-#=ns#bind="value: filters[1].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""#/>#}##}#<div class="k-action-buttons"><button type="submit" title="#=messages.filter#" class="k-button k-primary">#=messages.filter#</button><button type="reset" title="#=messages.clear#" class="k-button">#=messages.clear#</button></div></div>',
            at =
              '<div data-#=ns#role="view" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><a href="\\#" class="k-header-cancel k-link" title="#=messages.cancel#" aria-label="#=messages.cancel#"><span class="k-icon k-i-arrow-chevron-left"></span></a>#=messages.filter# #=messages.into# #=title#<a href="\\#" class="k-header-done k-link" title="#=messages.done#" aria-label="#=messages.done#"><span class="k-icon k-i-check"></span></a></div><form title="#=messages.title#" class="k-filter-menu k-mobile-list"><ul><li><span class="k-filter-help-text">#=messages.info#</span><ul><li class="k-item"><label class="k-label"><span class="k-filter-operator-text">#=messages.operator#</span><select id="operator_#=filterMenuGuid#" title="#=messages.operator#" class="k-filter-operator" data-#=ns#bind="value: filters[0].operator" autocomplete="' +
              u +
              '" >#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select></label></li><li class="k-item"><label class="k-label"><span class="k-filter-input-text">#=messages.value#</span>#if(values){#<select id="value_#=filterMenuGuid#" title="#=messages.value#" data-#=ns#bind="value:filters[0].value" autocomplete="' +
              u +
              '" ><option value="">#=messages.selectValue#</option>#for(var val in values){#<option value="#=values[val].value#">#=values[val].text#</option>#}#</select>#}else{#<input id="value_#=filterMenuGuid#" title="#=messages.value#" data-#=ns#bind="value:filters[0].value" class="k-value-input" type="#=inputType#" autocomplete="' +
              u +
              '" />#}#</label></li></ul>#if(extra){#<ul><li class="k-item"><label class="k-label"><span class="k-filter-logic-and-text">#=messages.and#</span><input id="and_#=filterMenuGuid#" title="#=messages.and#" type="radio" name="logic" class="k-radio" data-#=ns#bind="checked: logic" value="and" autocomplete="' +
              u +
              '" /><span class="k-radio-label"></span></label></li><li class="k-item"><label class="k-label"><span class="k-filter-logic-or-text">#=messages.or#</span><input id="or_#=filterMenuGuid#" title="#=messages.or#" type="radio" name="logic" class="k-radio" data-#=ns#bind="checked: logic" value="or" autocomplete="' +
              u +
              '" /><span class="k-radio-label"></label></label></li></ul><ul><li class="k-item"><label class="k-label"><span class="k-filter-operator-text">#=messages.additionalOperator#</span><select id="additionalOperator_#=filterMenuGuid#" title="#=messages.additionalOperator#" class="k-filter-operator" data-#=ns#bind="value: filters[1].operator" autocomplete="' +
              u +
              '" >#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select></label></li><li class="k-item"><label class="k-label"><span class="k-filter-input-text">#=messages.additionalValue#</span>#if(values){#<select id="additionalValue_#=filterMenuGuid#" title="#=messages.additionalValue#" data-#=ns#bind="value:filters[1].value" autocomplete="' +
              u +
              '" ><option value="">#=messages.selectValue#</option>#for(var val in values){#<option value="#=values[val].value#">#=values[val].text#</option>#}#</select>#}else{#<input id="additionalValue_#=filterMenuGuid#" title="#=messages.additionalValue#" data-#=ns#bind="value:filters[1].value" class="k-value-input" type="#=inputType#" autocomplete="' +
              u +
              '" />#}#</label></li></ul>#}#</li><li class="k-item k-clear-wrap"><span class="k-label k-clear" title="#=messages.clear#" aria-label="#=messages.clear#">#=messages.clear#</span></li></ul></form></div>',
            vt =
              '<div data-#=ns#role="view" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><a href="\\#" class="k-header-cancel k-link" title="#=messages.cancel#" aria-label="#=messages.cancel#"><span class="k-icon k-i-arrow-chevron-left"></span></a>#=messages.filter# #=messages.into# #=title#<a href="\\#" class="k-header-done k-link" title="#=messages.done#" aria-label="#=messages.done#"><span class="k-icon k-i-check"></span></a></div><form title="#=messages.title#" class="k-filter-menu k-mobile-list"><ul><li><span class="k-filter-help-text">#=messages.info#</span><ul class="k-multicheck-bool-wrap"><li class="k-item"><label class="k-label"><input id="true_#=filterMenuGuid#" title="#=messages.isTrue#" class="k-check" type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value" autocomplete="' +
              u +
              '" /><span class="k-item-title">#=messages.isTrue#</span></label></li><li class="k-item"><label class="k-label"><input id="false_#=filterMenuGuid#" title="#=messages.isFalse#" class="k-check" type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value" autocomplete="' +
              u +
              '" /><span for="false_#=filterMenuGuid#" class="k-item-title">#=messages.isFalse#</span></label></li></ul></li><li class="k-item k-clear-wrap"><span class="k-label k-clear" title="#=messages.clear#" aria-label="#=messages.clear#">#=messages.clear#</span></li></ul></form></div>',
            o = c.extend({
              init: function (t, u) {
                var a,
                  v,
                  h,
                  s,
                  o = this,
                  l = "string";
                c.fn.init.call(o, t, u);
                a = o.operators = u.operators || {};
                t = o.element;
                u = o.options;
                u.appendToElement ||
                  ((h = t
                    .addClass("k-with-icon k-filterable")
                    .find(".k-grid-filter")),
                  h[0] ||
                    (h = t
                      .prepend(
                        '<a class="k-grid-filter" href="#" title="' +
                          u.messages.filter +
                          '" aria-label="' +
                          u.messages.filter +
                          '"><span class="k-icon k-i-filter"></span></a>'
                      )
                      .find(".k-grid-filter")),
                  h.attr("tabindex", -1).on("click" + e, r(o._click, o)));
                o.link = h || n();
                o.dataSource = w.create(u.dataSource);
                o.field = u.field || t.attr(i.attr("field"));
                o.model = o.dataSource.reader.model;
                o._parse = function (n) {
                  return null != n ? n + "" : n;
                };
                o.model &&
                  o.model.fields &&
                  ((s = o.model.fields[o.field]),
                  s &&
                    ((l = s.type || "string"),
                    s.parse && (o._parse = r(s.parse, s))));
                u.values && (l = "enums");
                o.type = l;
                a = a[l] || u.operators[l];
                for (v in a) break;
                o._defaultFilter = function () {
                  return { field: o.field, operator: v || "eq", value: "" };
                };
                o._refreshHandler = r(o.refresh, o);
                o.dataSource.bind(f, o._refreshHandler);
                u.appendToElement ? o._init() : o.refresh();
              },
              _init: function () {
                var u,
                  t = this,
                  f = t.options.ui,
                  o = it(f);
                t.pane = t.options.pane;
                t.pane && (t._isMobile = !0);
                o || (u = f || ot[t.type]);
                t._isMobile ? t._createMobileForm(u) : t._createForm(u);
                t.form
                  .on("submit" + e, r(t._submit, t))
                  .on("reset" + e, r(t._reset, t));
                o &&
                  t.form
                    .find(".k-textbox")
                    .removeClass("k-textbox")
                    .each(function () {
                      f(n(this));
                    });
                t.form
                  .find("[" + i.attr("role") + "=numerictextbox]")
                  .removeClass("k-textbox")
                  .end()
                  .find("[" + i.attr("role") + "=datetimepicker]")
                  .removeClass("k-textbox")
                  .end()
                  .find("[" + i.attr("role") + "=timepicker]")
                  .removeClass("k-textbox")
                  .end()
                  .find("[" + i.attr("role") + "=datepicker]")
                  .removeClass("k-textbox");
                t.refresh();
                t.trigger(a, { field: t.field, container: t.form });
                i.cycleForm(t.form);
              },
              _createForm: function (t) {
                var u = this,
                  f = u.options,
                  s = u.operators || {},
                  o = u.type,
                  c = it(u.options.ui);
                s = s[o] || f.operators[o];
                u.form = n(
                  '<form title="' +
                    u.options.messages.title +
                    '" class="k-filter-menu"/>'
                ).html(
                  i.template("boolean" === o ? (c ? ct : ht) : lt)({
                    field: u.field,
                    format: f.format,
                    ns: i.ns,
                    messages: f.messages,
                    extra: f.extra,
                    operators: s,
                    type: o,
                    role: t,
                    values: d(f.values),
                  })
                );
                f.appendToElement
                  ? (u.element.append(u.form),
                    (u.popup = u.element.closest(".k-popup").data(h)))
                  : (u.popup = u.form[h]({
                      anchor: u.link,
                      open: r(u._open, u),
                      activate: r(u._activate, u),
                      close: function () {
                        u.options.closeCallback &&
                          u.options.closeCallback(u.element);
                      },
                    }).data(h));
                u.form.on("keydown" + e, r(u._keydown, u));
              },
              _createMobileForm: function (t) {
                var r = this,
                  u = r.options,
                  e = r.operators || {},
                  o = i.guid(),
                  f = r.type;
                e = e[f] || u.operators[f];
                r.form = n("<div />").html(
                  i.template("boolean" === f ? vt : at)({
                    field: r.field,
                    title: u.title || r.field,
                    format: u.format,
                    ns: i.ns,
                    messages: u.messages,
                    extra: u.extra,
                    operators: e,
                    filterMenuGuid: o,
                    type: f,
                    role: t,
                    inputType: st[f],
                    values: d(u.values),
                  })
                );
                r.view = r.pane.append(r.form.html());
                r.form = r.view.element.find("form");
                r.view.element
                  .on("click", ".k-header-done", function (n) {
                    r.form.submit();
                    n.preventDefault();
                  })
                  .on("click", ".k-header-cancel", function (n) {
                    r._closeForm();
                    n.preventDefault();
                  })
                  .on("click", ".k-clear", function (n) {
                    r._mobileClear();
                    n.preventDefault();
                  });
                r.view.bind("showStart", function () {
                  r.refresh();
                });
              },
              refresh: function () {
                var n = this,
                  u = n.dataSource.filter() || { filters: [], logic: "and" },
                  r = [n._defaultFilter()],
                  t = n._defaultFilter().operator;
                (n.options.extra ||
                  ("isnull" !== t &&
                    "isnullorempty" !== t &&
                    "isnotnullorempty" !== t &&
                    "isnotnull" !== t &&
                    "isempty" !== t &&
                    "isnotempty" !== t)) &&
                  r.push(n._defaultFilter());
                n.filterModel = i.observable({ logic: "and", filters: r });
                n.form && i.bind(n.form.children().first(), n.filterModel);
                n._bind(u)
                  ? n.link.addClass("k-state-active")
                  : n.link.removeClass("k-state-active");
              },
              destroy: function () {
                var n = this;
                c.fn.destroy.call(n);
                n.form &&
                  (i.unbind(n.form),
                  i.destroy(n.form),
                  n.form.unbind(e),
                  n.popup && (n.popup.destroy(), (n.popup = null)),
                  (n.form = null));
                n.view && (n.view.purge(), (n.view = null));
                n.link.unbind(e);
                n._refreshHandler &&
                  (n.dataSource.unbind(f, n._refreshHandler),
                  (n.dataSource = null));
                n.element = n.link = n._refreshHandler = n.filterModel = null;
              },
              _bind: function (n) {
                for (
                  var i,
                    t,
                    r = this,
                    h = n.filters,
                    f = !1,
                    o = 0,
                    e = r.filterModel,
                    u = 0,
                    s = h.length;
                  u < s;
                  u++
                )
                  (t = h[u]),
                    t.field == r.field
                      ? (e.set("logic", n.logic),
                        (i = e.filters[o]),
                        i ||
                          (e.filters.push({ field: r.field }),
                          (i = e.filters[o])),
                        i.set("value", r._parse(t.value)),
                        i.set("operator", t.operator),
                        o++,
                        (f = !0))
                      : t.filters && (f = f || r._bind(t));
                return f;
              },
              _stripFilters: function (t) {
                return n.grep(t, function (n) {
                  return (
                    ("" !== n.value && null != n.value) ||
                    "isnull" === n.operator ||
                    "isnotnull" === n.operator ||
                    "isempty" === n.operator ||
                    "isnotempty" === n.operator ||
                    "isnullorempty" == n.operator ||
                    "isnotnullorempty" == n.operator
                  );
                });
              },
              _merge: function (n) {
                var u,
                  r,
                  e,
                  f = this,
                  o = n.logic || "and",
                  i = this._stripFilters(n.filters),
                  t = f.dataSource.filter() || { filters: [], logic: "and" };
                for (k(t, f.field), r = 0, e = i.length; r < e; r++)
                  (u = i[r]), (u.value = f._parse(u.value));
                return (
                  i.length &&
                    (t.filters.length
                      ? ((n.filters = i),
                        "and" !== t.logic &&
                          ((t.filters = [
                            { logic: t.logic, filters: t.filters },
                          ]),
                          (t.logic = "and")),
                        t.filters.push(i.length > 1 ? n : i[0]))
                      : ((t.filters = i), (t.logic = o))),
                  t
                );
              },
              filter: function (n) {
                var t = this._stripFilters(n.filters);
                (t.length &&
                  this.trigger("change", {
                    filter: { logic: n.logic, filters: t },
                    field: this.field,
                  })) ||
                  ((n = this._merge(n)),
                  n.filters.length && this.dataSource.filter(n));
              },
              clear: function () {
                var n = this,
                  t = n.dataSource.filter() || { filters: [] };
                this.trigger("change", { filter: null, field: n.field }) ||
                  n._removeFilter(t);
              },
              _mobileClear: function () {
                var t,
                  f,
                  e,
                  o,
                  u,
                  i = this,
                  r = i.view.element;
                "boolean" === i.type
                  ? ((t = r.find(".k-check:checked")),
                    (f = t.val()),
                    t.val(""),
                    t.trigger("change"),
                    t.val(f),
                    t.prop("checked", !1))
                  : ((e = r.find("select")),
                    e.each(function (t, i) {
                      var r = n(i);
                      r.val(r.find("option:first").val());
                      r.trigger("change");
                    }),
                    ("string" !== i.type &&
                      "date" !== i.type &&
                      "number" !== i.type) ||
                      ((o = r.find(".k-value-input")),
                      o.each(function (t, i) {
                        var r = n(i);
                        r.val("");
                        r.trigger("change");
                      })),
                    i.options.extra &&
                      ((u = r.find("[name=logic]").first()),
                      u.prop("checked", !0),
                      u.trigger("change")));
              },
              _removeFilter: function (t) {
                var i = this;
                t.filters = n.grep(t.filters, function (n) {
                  return n.filters
                    ? ((n.filters = ut(n.filters, i.field)), n.filters.length)
                    : n.field != i.field;
                });
                t.filters.length || (t = null);
                i.dataSource.filter(t);
              },
              _submit: function (t) {
                var i, u, r;
                t.preventDefault();
                t.stopPropagation();
                i = this.filterModel.toJSON();
                u = n.grep(i.filters, function (n) {
                  return "" !== n.value && null !== n.value;
                });
                this._checkForNullOrEmptyFilter(i) || (u && u.length)
                  ? this.filter(i)
                  : ((r = this.dataSource.filter()),
                    r && (r.filters.push(i), (i = r)),
                    this._removeFilter(i));
                this._closeForm();
              },
              _checkForNullOrEmptyFilter: function (n) {
                var i, r, t;
                return (
                  !!(n && n.filters && n.filters.length) &&
                  ((i = !1),
                  (r = !1),
                  n.filters[0] &&
                    ((t = n.filters[0].operator),
                    (i =
                      "isnull" == t ||
                      "isnotnull" == t ||
                      "isnotempty" == t ||
                      "isempty" == t ||
                      "isnullorempty" == t ||
                      "isnotnullorempty" == t)),
                  n.filters[1] &&
                    ((t = n.filters[1].operator),
                    (r =
                      "isnull" == t ||
                      "isnotnull" == t ||
                      "isnotempty" == t ||
                      "isempty" == t ||
                      "isnullorempty" == t ||
                      "isnotnullorempty" == t)),
                  (!this.options.extra && i) ||
                    (this.options.extra && (i || r)))
                );
              },
              _reset: function () {
                this.clear();
                this.options.search &&
                  this.container &&
                  this.container.find("label").parent().show();
                this._closeForm();
              },
              _closeForm: function () {
                this._isMobile
                  ? this.pane.navigate("", this.options.animations.right)
                  : this.popup.close();
              },
              _click: function (n) {
                n.preventDefault();
                n.stopPropagation();
                this.popup || this.pane || this._init();
                this._isMobile
                  ? this.pane.navigate(this.view, this.options.animations.left)
                  : this.popup.toggle();
              },
              _open: function () {
                var t;
                n(".k-filter-menu")
                  .not(this.form)
                  .each(function () {
                    t = n(this).data(h);
                    t && t.close();
                  });
              },
              _activate: function () {
                this.form.find(":kendoFocusable:first").focus();
                this.trigger(v, { field: this.field, container: this.form });
              },
              _keydown: function (n) {
                n.keyCode == i.keys.ESC && this.popup.close();
              },
              events: [a, "change", v],
              options: {
                name: "FilterMenu",
                extra: !0,
                appendToElement: !1,
                type: "string",
                operators: {
                  string: {
                    eq: y,
                    neq: p,
                    startswith: "Starts with",
                    contains: "Contains",
                    doesnotcontain: "Does not contain",
                    endswith: "Ends with",
                    isnull: "Is null",
                    isnotnull: "Is not null",
                    isempty: "Is empty",
                    isnotempty: "Is not empty",
                    isnullorempty: "Has no value",
                    isnotnullorempty: "Has value",
                  },
                  number: {
                    eq: y,
                    neq: p,
                    gte: "Is greater than or equal to",
                    gt: "Is greater than",
                    lte: "Is less than or equal to",
                    lt: "Is less than",
                    isnull: "Is null",
                    isnotnull: "Is not null",
                  },
                  date: {
                    eq: y,
                    neq: p,
                    gte: "Is after or equal to",
                    gt: "Is after",
                    lte: "Is before or equal to",
                    lt: "Is before",
                    isnull: "Is null",
                    isnotnull: "Is not null",
                  },
                  enums: {
                    eq: y,
                    neq: p,
                    isnull: "Is null",
                    isnotnull: "Is not null",
                  },
                },
                messages: {
                  info: "Show items with value that:",
                  title: "Show items with value that:",
                  isTrue: "is true",
                  isFalse: "is false",
                  filter: "Filter",
                  clear: "Clear",
                  and: "And",
                  or: "Or",
                  selectValue: "-Select value-",
                  operator: "Operator",
                  value: "Value",
                  additionalValue: "Additional value",
                  additionalOperator: "Additional operator",
                  logic: "Filters logic",
                  cancel: "Cancel",
                  done: "Done",
                  into: "in",
                },
                animations: { left: "slide", right: "slide:right" },
              },
            }),
            s = ".kendoFilterMultiCheck",
            w = i.data.DataSource,
            yt =
              '<div data-#=ns#role="view" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><a href="\\#" class="k-header-cancel k-link" title="#=messages.cancel#" aria-label="#=messages.cancel#"><span class="k-icon k-i-arrow-chevron-left"></span></a>#=messages.filter# #=messages.into# #=title#<a href="\\#" class="k-header-done k-link" title="#=messages.done#" aria-label="#=messages.done#"><span class="k-icon k-i-check"></span></a></div><form class="k-filter-menu k-mobile-list"><ul>#if(search){#<li class="k-textbox k-space-right"><input placeholder="#=messages.search#" title="#=messages.search#" autocomplete="' +
              u +
              '"  /><span class="k-icon k-i-zoom" /></li>#}#<li class="k-filter-tools"><span style="#=checkAll ? "" : "visibility: hidden;" #" class="k-label k-select-all" title="#=messages.checkAll#" aria-label="#=messages.checkAll#">#=messages.checkAll#</span><span class="k-label k-clear-all" title="#=messages.clearAll#" aria-label="#=messages.clearAll#">#=messages.clearAll#</span></li>#if(messages.selectedItemsFormat){#<li><div class="k-filter-selected-items"></div></li>#}#<li><ul class="k-multicheck-wrap"></ul></li></ul></form></div>',
            rt = c.extend({
              init: function (t, u) {
                var e, o;
                c.fn.init.call(this, t, u);
                u = this.options;
                this.element = n(t);
                e = this.field =
                  this.options.field || this.element.attr(i.attr("field"));
                o = u.checkSource;
                this._foreignKeyValues()
                  ? ((this.checkSource = w.create(u.values)),
                    this.checkSource.fetch())
                  : u.forceUnique
                  ? ((o = n.extend(!0, {}, u.dataSource.options)),
                    delete o.pageSize,
                    (this.checkSource = w.create(o)),
                    (this.checkSource.reader.data = ft(
                      this.checkSource.reader.data,
                      this.field
                    )))
                  : (this.checkSource = w.create(o));
                this.dataSource = u.dataSource;
                this.model = this.dataSource.reader.model;
                this._parse = function (n) {
                  return n + "";
                };
                this.model &&
                  this.model.fields &&
                  ((e = this.model.fields[this.field]),
                  e &&
                    ("number" == e.type
                      ? (this._parse = function (n) {
                          return "string" == typeof n &&
                            "null" === n.toLowerCase()
                            ? null
                            : parseFloat(n);
                        })
                      : e.parse && (this._parse = r(e.parse, e)),
                    (this.type = e.type || "string")));
                u.appendToElement ? this._init() : this._createLink();
                this._refreshHandler = r(this.refresh, this);
                this.dataSource.bind(f, this._refreshHandler);
              },
              _createLink: function () {
                var t = this.element,
                  n = t
                    .addClass("k-with-icon k-filterable")
                    .find(".k-grid-filter");
                n[0] ||
                  (n = t
                    .prepend(
                      '<a class="k-grid-filter" href="#" title="' +
                        this.options.messages.filter +
                        '" aria-label="' +
                        this.options.messages.filter +
                        '"><span class="k-icon k-i-filter"/></a>'
                    )
                    .find(".k-grid-filter"));
                this._link = n
                  .attr("tabindex", -1)
                  .on("click" + e, r(this._click, this));
              },
              _init: function () {
                var n = this,
                  t = this.options.forceUnique,
                  i = this.options;
                this.pane = i.pane;
                this.pane && (this._isMobile = !0);
                this._createForm();
                this._foreignKeyValues()
                  ? this.refresh()
                  : t &&
                    !this.checkSource.options.serverPaging &&
                    this.dataSource.data().length
                  ? (this.checkSource.data(
                      b(this.dataSource.data(), this.field)
                    ),
                    this.refresh())
                  : (this._attachProgress(),
                    this.checkSource.fetch(function () {
                      n.refresh.call(n);
                    }));
                this.options.forceUnique ||
                  ((this.checkChangeHandler = function () {
                    n.container.empty();
                    n.refresh();
                  }),
                  this.checkSource.bind(f, this.checkChangeHandler));
                this.form
                  .on("keydown" + s, r(this._keydown, this))
                  .on("submit" + s, r(this._filter, this))
                  .on("reset" + s, r(this._reset, this));
                this.trigger(a, { field: this.field, container: this.form });
              },
              _attachProgress: function () {
                var n = this;
                this._progressHandler = function () {
                  l.progress(n.container, !0);
                };
                this._progressHideHandler = function () {
                  l.progress(n.container, !1);
                };
                this.checkSource
                  .bind("progress", this._progressHandler)
                  .bind("change", this._progressHideHandler);
              },
              _input: function () {
                var n = this;
                n._clearTypingTimeout();
                n._typingTimeout = setTimeout(function () {
                  n.search();
                }, 100);
              },
              _clearTypingTimeout: function () {
                this._typingTimeout &&
                  (clearTimeout(this._typingTimeout),
                  (this._typingTimeout = null));
              },
              search: function () {
                var n,
                  i,
                  r,
                  f = this.options.ignoreCase,
                  t = this.searchTextBox[0].value,
                  u = this.container.find("label");
                for (
                  f && (t = t.toLowerCase()),
                    n = 0,
                    this.options.checkAll &&
                      u.length &&
                      (this._isMobile
                        ? (this.view.element.find(
                            ".k-select-all"
                          )[0].style.visibility = t ? "hidden" : "")
                        : ((u[0].parentNode.style.display = t ? "none" : ""),
                          n++));
                  n < u.length;

                )
                  (i = u[n]),
                    (r = i.textContent || i.innerText),
                    f && (r = r.toLowerCase()),
                    (i.parentNode.style.display =
                      r.indexOf(t) >= 0 ? "" : "none"),
                    n++;
              },
              _activate: function () {
                this.form.find(":kendoFocusable:first").focus();
                this.trigger(v, { field: this.field, container: this.form });
              },
              _createForm: function () {
                var e,
                  u = this.options,
                  f = "",
                  t = this;
                this._isMobile ||
                  ((f += "<div class='k-filter-menu-container'>"),
                  u.search &&
                    (f +=
                      "<div class='k-textbox k-space-right'><input placeholder='" +
                      u.messages.search +
                      "'/><span class='k-icon k-i-zoom' /></div>"),
                  (f += "<ul class='k-reset k-multicheck-wrap'></ul>"),
                  u.messages.selectedItemsFormat &&
                    (f +=
                      "<div class='k-filter-selected-items'>" +
                      i.format(u.messages.selectedItemsFormat, 0) +
                      "</div>"),
                  (f += "<div class='k-action-buttons'>"),
                  (f +=
                    "<button type='submit' class='k-button k-primary'>" +
                    u.messages.filter +
                    "</button>"),
                  (f +=
                    "<button type='reset' class='k-button'>" +
                    u.messages.clear +
                    "</button>"),
                  (f += "</div>"),
                  (f += "</div>"),
                  (this.form = n('<form class="k-filter-menu"/>').html(f)),
                  (this.container = this.form.find(".k-multicheck-wrap")));
                this._isMobile
                  ? ((t.form = n("<div />").html(
                      i.template(yt)({
                        field: t.field,
                        title: u.title || t.field,
                        ns: i.ns,
                        messages: u.messages,
                        search: u.search,
                        checkAll: u.checkAll,
                      })
                    )),
                    (t.view = t.pane.append(t.form.html())),
                    (t.form = t.view.element.find("form")),
                    (e = this.view.element),
                    (this.container = e.find(".k-multicheck-wrap")),
                    e
                      .on("click", ".k-header-done", function (n) {
                        t.form.submit();
                        n.preventDefault();
                      })
                      .on("click", ".k-header-cancel", function (n) {
                        t._closeForm();
                        n.preventDefault();
                      })
                      .on("click", ".k-clear-all", function (n) {
                        t._mobileCheckAll(!1);
                        n.preventDefault();
                      })
                      .on("click", ".k-select-all", function (n) {
                        t._mobileCheckAll(!0);
                        n.preventDefault();
                      }),
                    t.view.bind("showStart", function () {
                      t.refresh();
                    }))
                  : u.appendToElement
                  ? ((this.popup = this.element.closest(".k-popup").data(h)),
                    this.element.append(this.form))
                  : (t.popup = t.form
                      .kendoPopup({
                        anchor: t._link,
                        open: r(t._open, t),
                        activate: r(t._activate, t),
                        close: function () {
                          t.options.closeCallback &&
                            t.options.closeCallback(t.element);
                        },
                      })
                      .data(h));
                u.search &&
                  ((this.searchTextBox = this.form.find(".k-textbox > input")),
                  this.searchTextBox.on("input", r(this._input, this)));
              },
              createCheckAllItem: function () {
                var t = this.options,
                  e = i.template(
                    t.itemTemplate({ field: "all", mobile: this._isMobile })
                  ),
                  u = n(e({ all: t.messages.checkAll }));
                this.container.prepend(u);
                this.checkBoxAll = u
                  .find(":checkbox")
                  .eq(0)
                  .addClass("k-check-all");
                this.checkAllHandler = r(this.checkAll, this);
                this.checkBoxAll.on(f + s, this.checkAllHandler);
              },
              updateCheckAllState: function () {
                if (
                  (this.options.messages.selectedItemsFormat &&
                    this.form
                      .find(".k-filter-selected-items")
                      .text(
                        i.format(
                          this.options.messages.selectedItemsFormat,
                          this.container.find(":checked:not(.k-check-all)")
                            .length
                        )
                      ),
                  this.checkBoxAll)
                ) {
                  var n =
                    this.container.find(":checkbox:not(.k-check-all)").length ==
                    this.container.find(":checked:not(.k-check-all)").length;
                  this.checkBoxAll.prop("checked", n);
                }
              },
              refresh: function (n) {
                var r = this.options.forceUnique,
                  t = this.dataSource,
                  i = this.getFilterArray();
                this._link &&
                  this._link.toggleClass("k-state-active", 0 !== i.length);
                this.form &&
                  (n &&
                    r &&
                    n.sender === t &&
                    !t.options.serverPaging &&
                    ("itemchange" == n.action ||
                      "add" == n.action ||
                      "remove" == n.action ||
                      (t.options.autoSync && "sync" === n.action)) &&
                    !this._foreignKeyValues() &&
                    (this.checkSource.data(
                      b(this.dataSource.data(), this.field)
                    ),
                    this.container.empty()),
                  this.container.is(":empty") && this.createCheckBoxes(),
                  this.checkValues(i),
                  this.trigger(tt));
              },
              getFilterArray: function () {
                var i,
                  t = n.extend(
                    !0,
                    {},
                    { filters: [], logic: "and" },
                    this.dataSource.filter()
                  );
                return g(t, this.field), (i = nt(t));
              },
              createCheckBoxes: function () {
                var n,
                  e,
                  o,
                  t = this.options,
                  u = {
                    field: this.field,
                    format: t.format,
                    mobile: this._isMobile,
                    type: this.type,
                  };
                this.options.forceUnique
                  ? this._foreignKeyValues()
                    ? ((n = this.checkSource.data()),
                      (u.valueField = "value"),
                      (u.field = "text"))
                    : (n = this.checkSource.data())
                  : (n = this.checkSource.view());
                e = i.template(t.itemTemplate(u));
                o = i.render(e, n);
                t.checkAll && !this._isMobile && this.createCheckAllItem();
                this.container.on(
                  f + s,
                  ":checkbox",
                  r(this.updateCheckAllState, this)
                );
                this.container.append(o);
              },
              checkAll: function () {
                var n = this.checkBoxAll.is(":checked");
                this.container.find(":checkbox").prop("checked", n);
              },
              checkValues: function (t) {
                var i = this;
                n(
                  n.grep(
                    this.container.find(":checkbox").prop("checked", !1),
                    function (r) {
                      var f,
                        u,
                        e = !1;
                      if (!n(r).is(".k-check-all"))
                        for (f = i._parse(n(r).val()), u = 0; u < t.length; u++)
                          if (
                            (e =
                              "date" == i.type
                                ? t[u] && f
                                  ? t[u].getTime() == f.getTime()
                                  : null === t[u] && null === f
                                : t[u] == f)
                          )
                            return e;
                    }
                  )
                ).prop("checked", !0);
                this.updateCheckAllState();
              },
              _mobileCheckAll: function (t) {
                var i = this,
                  r = i.container.find(":checkbox");
                r.each(function (i, r) {
                  var u = n(r);
                  u.prop("checked", t);
                  u.trigger("change");
                });
              },
              _filter: function (t) {
                var i, r;
                t.preventDefault();
                t.stopPropagation();
                i = { logic: "or" };
                r = this;
                i.filters = n.map(
                  this.form.find(":checkbox:checked:not(.k-check-all)"),
                  function (t) {
                    return {
                      value: n(t).val(),
                      operator: "eq",
                      field: r.field,
                    };
                  }
                );
                (i.filters.length &&
                  this.trigger("change", { filter: i, field: r.field })) ||
                  ((i = this._merge(i)),
                  i.filters.length ? this.dataSource.filter(i) : this.clear(),
                  this._closeForm());
              },
              _stripFilters: function (t) {
                return n.grep(t, function (n) {
                  return null != n.value;
                });
              },
              _foreignKeyValues: function () {
                var n = this.options;
                return n.values && !n.checkSource;
              },
              destroy: function () {
                var n = this;
                c.fn.destroy.call(n);
                n.form &&
                  (i.unbind(n.form),
                  i.destroy(n.form),
                  n.form.unbind(s),
                  n.popup && (n.popup.destroy(), (n.popup = null)),
                  (n.form = null),
                  n.container && (n.container.unbind(s), (n.container = null)),
                  n.checkBoxAll && n.checkBoxAll.unbind(s));
                n.view && (n.view.purge(), (n.view = null));
                n._link && n._link.unbind(e);
                n._refreshHandler &&
                  (n.dataSource.unbind(f, n._refreshHandler),
                  (n.dataSource = null));
                n.checkChangeHandler &&
                  n.checkSource.unbind(f, n.checkChangeHandler);
                n._progressHandler &&
                  n.checkSource.unbind("progress", n._progressHandler);
                n._progressHideHandler &&
                  n.checkSource.unbind("change", n._progressHideHandler);
                this._clearTypingTimeout();
                this.searchTextBox = null;
                n.element =
                  n.checkSource =
                  n.container =
                  n.checkBoxAll =
                  n._link =
                  n._refreshHandler =
                  n.checkAllHandler =
                    null;
              },
              options: {
                name: "FilterMultiCheck",
                itemTemplate: function (n) {
                  var r = n.field,
                    u = n.format,
                    i = n.valueField,
                    e = n.mobile,
                    f = "";
                  return (
                    i === t && (i = r),
                    "date" == n.type && (f = ":yyyy-MM-ddTHH:mm:sszzz"),
                    "<li class='k-item'><label class='k-label'><input type='checkbox' class='" +
                      (e ? "k-check" : "") +
                      "'  value='#:kendo.format('{0" +
                      f +
                      "}'," +
                      i +
                      ")#'/><span class='k-item-title'>#:kendo.format('" +
                      (u ? u : "{0}") +
                      "', " +
                      r +
                      ")#</span></label></li>"
                  );
                },
                checkAll: !0,
                search: !1,
                ignoreCase: !0,
                appendToElement: !1,
                messages: {
                  checkAll: "Select All",
                  clearAll: "Clear All",
                  clear: "Clear",
                  filter: "Filter",
                  search: "Search",
                  cancel: "Cancel",
                  selectedItemsFormat: "{0} items selected",
                  done: "Done",
                  into: "in",
                },
                forceUnique: !0,
                animations: { left: "slide", right: "slide:right" },
              },
              events: [a, tt, "change", v],
            });
          n.extend(rt.fn, {
            _click: o.fn._click,
            _keydown: o.fn._keydown,
            _reset: o.fn._reset,
            _closeForm: o.fn._closeForm,
            _removeFilter: o.fn._removeFilter,
            clear: o.fn.clear,
            _merge: o.fn._merge,
          });
          l.plugin(o);
          l.plugin(rt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.menu.min", ["kendo.popup.min", "kendo.data.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function br(n, t) {
            return (
              (n = n.split(" ")[!t + 0] || n),
              n.replace("top", "up").replace("bottom", "down")
            );
          }
          function kr(n, t, r) {
            n = n.split(" ")[!t + 0] || n;
            var u = {
                origin: ["bottom", r ? "right" : "left"],
                position: ["top", r ? "right" : "left"],
              },
              f = /left|right/.test(n);
            return (
              f
                ? ((u.origin = ["top", n]),
                  (u.position[1] = i.directions[n].reverse))
                : ((u.origin[0] = n),
                  (u.position[0] = i.directions[n].reverse)),
              (u.origin = u.origin.join(" ")),
              (u.position = u.position.join(" ")),
              u
            );
          }
          function e(t, i) {
            try {
              return n.contains(t, i);
            } catch (r) {
              return !1;
            }
          }
          function bi(t) {
            t = n(t);
            t.addClass("k-item").children(rr).addClass(wt);
            t.children("a").addClass(fi).children(rr).addClass(wt);
            t.filter(":not([disabled])").addClass(vr);
            t.filter(".k-separator").empty().append("&nbsp;");
            t.filter("li[disabled]")
              .addClass(k)
              .removeAttr("disabled")
              .attr("aria-disabled", !0);
            t.filter("[role]").length || t.attr("role", "menuitem");
            t.children(ur).length ||
              t
                .contents()
                .filter(function () {
                  return !(
                    this.nodeName.match(ou) ||
                    (3 == this.nodeType && !n.trim(this.nodeValue))
                  );
                })
                .wrapAll("<span class='" + fi + "'/>");
            tt(t);
            g(t);
          }
          function tt(t) {
            t = n(t);
            t.find("> .k-link > [class*=k-i-arrow-60]:not(.k-sprite)").remove();
            t.filter(":has(.k-menu-group)")
              .children(".k-link:not(:has([class*=k-i-arrow]:not(.k-sprite)))")
              .each(function () {
                var t = n(this),
                  i = dr(t);
                t.append("<span class='k-icon" + i + " k-menu-expand-arrow'/>");
              });
          }
          function dr(n) {
            var t = n.parent().parent(),
              r = i.support.isRtl(t);
            return t.hasClass(c + "-horizontal")
              ? " k-i-arrow-60-down"
              : r
              ? " k-i-arrow-60-left"
              : " k-i-arrow-60-right";
          }
          function g(t) {
            t = n(t);
            t.filter(".k-first:not(:first-child)").removeClass(or);
            t.filter(".k-last:not(:last-child)").removeClass(er);
            t.filter(":first-child").addClass(or);
            t.filter(":last-child").addClass(er);
          }
          function ki(n) {
            var i, t;
            if (n && n.length)
              for (i in n)
                (t = n.eq(i)),
                  t.find("ul").length
                    ? t.attr("aria-haspopup", !0)
                    : t.removeAttr("aria-haspopup");
          }
          function di(n) {
            if (!n.hasClass(c)) return n.parentsUntil("." + c, "li");
          }
          function vt(t, i) {
            var r = nu(i);
            r && gr(t, r);
            i.items &&
              n(t)
                .children("ul")
                .children("li")
                .each(function (n) {
                  vt(this, i.items[n]);
                });
          }
          function gr(t, i) {
            n(t).children(".k-link").data({ selectHandler: i });
          }
          function nu(n) {
            var t = n.select,
              r = i.isFunction;
            return t && r(t) ? t : null;
          }
          function a(n) {
            return n
              ? "li[data-groupparent='" + n + "']"
              : "li[data-groupparent]";
          }
          function it(n) {
            return n ? "ul[data-group='" + n + "']" : "ul[data-group]";
          }
          function ct(t, i) {
            var u = t.find(a()),
              r = [];
            return (
              u.each(function (u, f) {
                var o, e;
                for (f = n(f), o = f.data(y), e = t; o; )
                  (e = i.find(it(o) + ":visible")),
                    e.length && r.push(e),
                    (f = e.find(a())),
                    (o = f.data(y));
              }),
              r
            );
          }
          function gt(t, i) {
            var r = t.data(l);
            return r ? i.find(a(r)) : n([]);
          }
          function gi(t, i) {
            var r = t.data(y);
            return r ? i.children(f).children(it(r)) : n([]);
          }
          function tu(t, i) {
            var u,
              o,
              r = [],
              s = function (n) {
                for (; n.parentNode && !i.is(n.parentNode); )
                  r.push(n.parentNode), (n = n.parentNode);
              },
              e = t[0] || t;
            for (
              s(e), u = r[r.length - 1];
              n(u).is(f) && ((o = n(u).children("ul")), (e = gt(o, i)[0]));

            )
              r.push(e), s(e), (u = r[r.length - 1]);
            return r;
          }
          function iu(n) {
            var t = 0;
            return (
              n.wheelDelta &&
                ((t = -n.wheelDelta / 120),
                (t = t > 0 ? Math.ceil(t) : Math.floor(t))),
              n.detail && (t = Math.round(n.detail / 3)),
              t
            );
          }
          function nr(n, t) {
            for (var r = 0, i = n.parentNode; i && !isNaN(i[t]); )
              (r += i[t]), (i = i.parentNode);
            return r;
          }
          function rt(n) {
            return hr && n.originalEvent && n.originalEvent.pointerType in wu;
          }
          function ru(n) {
            var t = n.originalEvent;
            return ut && /touch/i.test(t.type || "");
          }
          function tr(n) {
            n.contents()
              .filter(function () {
                return "LI" != this.nodeName;
              })
              .remove();
          }
          var i = window.kendo,
            ni = i.ui,
            uu = i._activeElement,
            ut = i.support.touch && i.support.mobileOS,
            ti = n.isArray,
            fu = i.data.HierarchicalDataSource,
            yt = "mousedown",
            ii = "click",
            ir = 30,
            eu = 50,
            s = n.extend,
            u = n.proxy,
            ri = n.each,
            v = i.template,
            h = i.keys,
            ui = ni.Widget,
            ou = /^(ul|a|div)$/i,
            r = ".kendoMenu",
            rr = "img",
            lt = "open",
            c = "k-menu",
            fi = "k-link k-menu-link",
            ur = ".k-link",
            fr = ".k-menu-expand-arrow",
            er = "k-last",
            ft = "close",
            pt = "timer",
            or = "k-first",
            wt = "k-image",
            et = "select",
            ot = "zIndex",
            ei = "activate",
            oi = "deactivate",
            sr = "touchstart" + r + " MSPointerDown" + r + " pointerdown" + r,
            si = i.support.pointers,
            hi = i.support.msPointers,
            hr = hi || si,
            ci = "change",
            cr = "error",
            lr = i.support.touch ? "touchstart" : "",
            w = si ? "pointerover" : hi ? "MSPointerOver" : "mouseenter",
            at = si ? "pointerout" : hi ? "MSPointerOut" : "mouseleave",
            li = "DOMMouseScroll" + r + " mousewheel" + r,
            ar = i.support.resize + r,
            su = "scrollWidth",
            hu = "scrollHeight",
            cu = "offsetWidth",
            lu = "offsetHeight",
            l = "group",
            y = "groupparent",
            bt = n(document.documentElement),
            b = "kendoPopup",
            vr = "k-state-default",
            kt = "k-state-hover",
            p = "k-state-focused",
            k = "k-state-disabled",
            au = "k-state-selected",
            ai = ".k-menu",
            vi = ".k-menu-group",
            f = ".k-animation-container",
            yi = vi + "," + f,
            o = ":not(.k-list) > .k-item",
            vu = ".k-item.k-state-disabled",
            st = ".k-item",
            pi = ".k-item:not(.k-state-disabled)",
            yu = ".k-item:not(.k-state-disabled) > .k-link",
            yr = ":not(.k-item.k-separator)",
            ht = st + yr + ":eq(0)",
            pr = st + yr + ":last",
            pu = "div:not(.k-animation-container,.k-list-container)",
            nt = ".k-menu-scroll-button",
            wu = { 2: 1, touch: 1 },
            bu = "string",
            wr = "dataBound",
            dt = {
              text: "dataTextField",
              url: "dataUrlField",
              spriteCssClass: "dataSpriteCssClassField",
              imageUrl: "dataImageUrlField",
              imageAttr: "dataImageAttrField",
              content: "dataContentField",
            },
            wi = {
              wrapperCssClass: function (n, t) {
                var i = "k-item",
                  r = t.index;
                return (
                  (i +=
                    t.enabled === !1
                      ? " k-state-disabled"
                      : " k-state-default"),
                  n.firstLevel && 0 === r && (i += " k-first"),
                  r == n.length - 1 && (i += " k-last"),
                  t.cssClass && (i += " " + t.cssClass),
                  t.attr &&
                    t.attr.hasOwnProperty("class") &&
                    (i += " " + t.attr["class"]),
                  t.selected && (i += " " + au),
                  i
                );
              },
              itemCssAttributes: function (n) {
                var t,
                  r = "",
                  i = n.attr || {};
                for (t in i)
                  i.hasOwnProperty(t) &&
                    "class" !== t &&
                    (r += t + '="' + i[t] + '" ');
                return r;
              },
              imageCssAttributes: function (n) {
                var i,
                  r = "",
                  t = n && n.toJSON ? n.toJSON() : {};
                t["class"] ? (t["class"] += " " + wt) : (t["class"] = wt);
                for (i in t)
                  t.hasOwnProperty(i) && (r += i + '="' + t[i] + '" ');
                return r;
              },
              contentCssAttributes: function (n) {
                var i,
                  r = "",
                  t = n.contentAttr || {},
                  u = "k-content k-group k-menu-group";
                t["class"] ? (t["class"] += " " + u) : (t["class"] = u);
                for (i in t)
                  t.hasOwnProperty(i) && (r += i + '="' + t[i] + '" ');
                return r;
              },
              textClass: function () {
                return fi;
              },
              arrowClass: function (n, t) {
                return (
                  "k-icon" +
                  (t.horizontal ? " k-i-arrow-60-down" : " k-i-arrow-60-right")
                );
              },
              groupAttributes: function (n) {
                return n.expanded !== !0 ? " style='display:none'" : "";
              },
              groupCssClass: function () {
                return "k-group k-menu-group";
              },
              content: function (n) {
                return n.content ? n.content : "&nbsp;";
              },
            },
            d = i.ui.DataBoundWidget.extend({
              init: function (n, t) {
                var r = this;
                ui.fn.init.call(r, n, t);
                n = r.wrapper = r.element;
                t = r.options;
                r._accessors();
                r._templates();
                r._dataSource();
                r._updateClasses();
                r._animations(t);
                r.nextItemZIndex = 100;
                r._tabindex();
                r._initOverflow(t);
                r._attachMenuEventsHandlers();
                t.openOnClick && (r.clicked = !1);
                n.attr("role", "menubar");
                n[0].id && (r._ariaId = i.format("{0}_mn_active", n[0].id));
                i.notify(r);
              },
              events: [lt, ft, ei, oi, et, wr],
              options: {
                name: "Menu",
                animation: {
                  open: { duration: 200 },
                  close: { duration: 100 },
                },
                orientation: "horizontal",
                direction: "default",
                openOnClick: !1,
                closeOnClick: !0,
                hoverDelay: 100,
                scrollable: !1,
                popupCollision: t,
              },
              _initData: function () {
                var n = this;
                n.dataSource &&
                  (n.angular("cleanup", function () {
                    return { elements: n.element.children() };
                  }),
                  n.element.empty(),
                  n.append(n.dataSource.view(), n.element),
                  n.angular("compile", function () {
                    return { elements: n.element.children() };
                  }));
              },
              _attachMenuEventsHandlers: function () {
                var t = this,
                  f = t.element,
                  e = t.options,
                  i = t._overflowWrapper();
                (i || f)
                  .on(sr, st, u(t._focusHandler, t))
                  .on(ii + r, vu, !1)
                  .on(ii + r, st, u(t._click, t))
                  .on(sr + " " + yt + r, ".k-content", u(t._preventClose, t))
                  .on(w + r, pi, u(t._mouseenter, t))
                  .on(at + r, pi, u(t._mouseleave, t))
                  .on(yt + r, pi, u(t._mousedown, t))
                  .on(
                    lr +
                      r +
                      " " +
                      w +
                      r +
                      " " +
                      at +
                      r +
                      " " +
                      yt +
                      r +
                      " " +
                      ii +
                      r,
                    yu,
                    u(t._toggleHover, t)
                  );
                f.on("keydown" + r, u(t._keydown, t))
                  .on("focus" + r, u(t._focus, t))
                  .on("focus" + r, ".k-content", u(t._focus, t))
                  .on("blur" + r, u(t._removeHoverItem, t))
                  .on("blur" + r, "[tabindex]", u(t._checkActiveElement, t));
                i &&
                  i
                    .on(at + r, yi, u(t._mouseleavePopup, t))
                    .on(w + r, yi, u(t._mouseenterPopup, t));
                e.openOnClick &&
                  ((t._documentClickHandler = u(t._documentClick, t)),
                  n(document).click(t._documentClickHandler));
              },
              _detachMenuEventsHandlers: function () {
                var t = this,
                  i = t._overflowWrapper();
                i && i.off(r);
                t.element.off(r);
                t._documentClickHandler &&
                  n(document).unbind("click", t._documentClickHandler);
              },
              _initOverflow: function (t) {
                var e,
                  o,
                  s,
                  f,
                  r = this,
                  u = "horizontal" == t.orientation;
                t.scrollable &&
                  ((r._openedPopups = {}),
                  (r._scrollWrapper = r.element
                    .wrap(
                      "<div class='k-menu-scroll-wrapper " +
                        t.orientation +
                        "'></div>"
                    )
                    .parent()),
                  u && tr(r.element),
                  (e = n(
                    r.templates.scrollButton({ direction: u ? "left" : "up" })
                  )),
                  (o = n(
                    r.templates.scrollButton({
                      direction: u ? "right" : "down",
                    })
                  )),
                  e.add(o).appendTo(r._scrollWrapper),
                  r._initScrolling(r.element, e, o, u),
                  (s = r.element.outerWidth()),
                  (f = r.element[0].style.width),
                  (f = "auto" === f ? "" : f),
                  u &&
                    n(window).on(
                      ar,
                      i.throttle(function () {
                        r._setOverflowWrapperWidth(s, f);
                        r._toggleScrollButtons(r.element, e, o, u);
                      }, 100)
                    ),
                  r._setOverflowWrapperWidth(s, f),
                  r._toggleScrollButtons(r.element, e, o, u));
              },
              _overflowWrapper: function () {
                return this._scrollWrapper || this._popupsWrapper;
              },
              _setOverflowWrapperWidth: function (n, t) {
                var r,
                  f,
                  e,
                  u,
                  i = this,
                  o = i._scrollWrapper.css("width");
                i._scrollWrapper.css({ width: "" });
                r = i._scrollWrapper.outerWidth();
                i._scrollWrapper.css({ width: o });
                f = i.element.outerWidth();
                e = i.element[0].offsetWidth - i.element[0].clientWidth;
                f != r &&
                  r > 0 &&
                  ((u = t ? Math.min(n, r) : r),
                  i.element.width(u - e),
                  i._scrollWrapper.width(u));
              },
              _reinitOverflow: function (n) {
                var t = this,
                  i =
                    (n.scrollable && !t.options.scrollable) ||
                    (!n.scrollable && t.options.scrollable) ||
                    (n.scrollable &&
                      t.options.scrollable &&
                      n.scrollable.distance != t.options.scrollable.distance) ||
                    n.orientation != t.options.orientation;
                i &&
                  (t._detachMenuEventsHandlers(),
                  t._destroyOverflow(),
                  t._initOverflow(n),
                  t._attachMenuEventsHandlers());
              },
              _destroyOverflow: function () {
                var u = this,
                  i = u._overflowWrapper();
                i &&
                  (i.off(r),
                  i.find(nt).off(r).remove(),
                  i.children(f).each(function (t, r) {
                    var u,
                      f = n(r).children(vi);
                    f.off(li);
                    u = gt(f, i);
                    u.length && u.append(r);
                  }),
                  i.find(a()).removeAttr("data-groupparent"),
                  i.find(it()).removeAttr("data-group"),
                  u.element.off(li),
                  n(window).off(ar),
                  i.contents().unwrap(),
                  (u._scrollWrapper = u._popupsWrapper = u._openedPopups = t));
              },
              _initScrolling: function (t, u, f, e) {
                var o = this,
                  l = o.options.scrollable,
                  h = n.isNumeric(l.distance) ? l.distance : eu,
                  p = h / 2,
                  b = "-=" + h,
                  k = "+=" + h,
                  d = "-=" + 2 * h,
                  g = "+=" + 2 * h,
                  s = !1,
                  c = !1,
                  a = function (n) {
                    var i = e ? { scrollLeft: n } : { scrollTop: n };
                    t.finish().animate(i, "fast", "linear", function () {
                      s && a(n);
                    });
                    o._toggleScrollButtons(t, u, f, e);
                  },
                  v = function (n) {
                    s || c || (a(n.data.direction), (s = !0));
                  },
                  y = function (i) {
                    var r = e
                      ? { scrollLeft: i.data.direction }
                      : { scrollTop: i.data.direction };
                    c = ru(i) || rt(i);
                    t.stop().animate(r, "fast", "linear", function () {
                      c
                        ? (o._toggleScrollButtons(t, u, f, e), (s = !0))
                        : n(i.currentTarget).trigger(w);
                    });
                    s = !1;
                    i.stopPropagation();
                    i.preventDefault();
                  };
                u.on(w + r, { direction: b }, v).on(
                  i.eventMap.down + r,
                  { direction: d },
                  y
                );
                f.on(w + r, { direction: k }, v).on(
                  i.eventMap.down + r,
                  { direction: g },
                  y
                );
                u.add(f).on(at + r, function () {
                  t.stop();
                  s = !1;
                  o._toggleScrollButtons(t, u, f, e);
                });
                t.on(li, function (n) {
                  var i, s, r, h;
                  n.ctrlKey ||
                    n.shiftKey ||
                    n.altKey ||
                    ((i = iu(n.originalEvent)),
                    (s = Math.abs(i) * p),
                    (r = (i > 0 ? "+=" : "-=") + s),
                    (h = e ? { scrollLeft: r } : { scrollTop: r }),
                    o._closeChildPopups(t),
                    t.finish().animate(h, "fast", "linear", function () {
                      o._toggleScrollButtons(t, u, f, e);
                    }),
                    n.preventDefault());
                });
              },
              _toggleScrollButtons: function (n, t, i, r) {
                var u = r ? n.scrollLeft() : n.scrollTop(),
                  f = r ? su : hu,
                  e = r ? cu : lu;
                t.toggle(0 !== u);
                i.toggle(u < n[0][f] - n[0][e] - 1);
              },
              setOptions: function (n) {
                var t = this.options.animation;
                this._animations(n);
                n.animation = s(!0, t, n.animation);
                "dataSource" in n && this._dataSource(n);
                this._updateClasses();
                this._reinitOverflow(n);
                ui.fn.setOptions.call(this, n);
              },
              destroy: function () {
                var n = this;
                ui.fn.destroy.call(n);
                n._detachMenuEventsHandlers();
                n._destroyOverflow();
                i.destroy(n.element);
              },
              enable: function (n, t) {
                return this._toggleDisabled(n, t !== !1), this;
              },
              disable: function (n) {
                return this._toggleDisabled(n, !1), this;
              },
              attemptGetItem: function (t) {
                var i, r;
                return (
                  (t = t || this.element),
                  (i = this.element.find(t)),
                  (r = this._overflowWrapper()),
                  i.length || t === this.element ? i : r ? r.find(t) : n()
                );
              },
              append: function (n, t) {
                t = this.attemptGetItem(t);
                var i = this._insert(
                  n,
                  t,
                  t.length
                    ? t.find(
                        "> .k-menu-group, > .k-animation-container > .k-menu-group"
                      )
                    : null
                );
                return (
                  ri(i.items, function (t) {
                    i.group.append(this);
                    tt(this);
                    vt(this, n[t] || n);
                  }),
                  tt(t),
                  g(i.group.find(".k-first, .k-last").add(i.items)),
                  ki(di(i.group)),
                  this
                );
              },
              insertBefore: function (n, t) {
                t = this.attemptGetItem(t);
                var i = this._insert(n, t, t.parent());
                return (
                  ri(i.items, function (i) {
                    t.before(this);
                    tt(this);
                    g(this);
                    vt(this, n[i] || n);
                  }),
                  g(t),
                  this
                );
              },
              insertAfter: function (n, t) {
                t = this.attemptGetItem(t);
                var i = this._insert(n, t, t.parent());
                return (
                  ri(i.items, function (i) {
                    t.after(this);
                    tt(this);
                    g(this);
                    vt(this, n[i] || n);
                  }),
                  g(t),
                  this
                );
              },
              _insert: function (t, r, u) {
                var f,
                  l,
                  o,
                  h,
                  e = this;
                return (
                  (r && r.length) || (u = e.element),
                  (o =
                    n.isPlainObject(t) || t instanceof i.data.ObservableObject),
                  (h = {
                    firstLevel: u.hasClass(c),
                    horizontal: u.hasClass(c + "-horizontal"),
                    expanded: !0,
                    length: u.children().length,
                  }),
                  r &&
                    !u.length &&
                    (u = n(
                      e.renderGroup({ group: h, options: e.options })
                    ).appendTo(r)),
                  o || ti(t) || t instanceof i.data.ObservableArray
                    ? (f = n(
                        n.map(o ? [t] : t, function (t, i) {
                          return "string" == typeof t
                            ? n(t).get()
                            : n(
                                e.renderItem({
                                  group: h,
                                  item: s(t, { index: i }),
                                })
                              ).get();
                        })
                      ))
                    : ((f =
                        "string" == typeof t && "<" != t.charAt(0)
                          ? e.element.find(t)
                          : n(t)),
                      (l = f
                        .find("> ul")
                        .addClass("k-menu-group")
                        .attr("role", "menu")),
                      (f = f.filter("li")),
                      f.add(l.find("> li")).each(function () {
                        bi(this);
                      })),
                  { items: f, group: u }
                );
              },
              remove: function (n) {
                var r, t, i, e, u;
                return (
                  (n = this.attemptGetItem(n)),
                  (r = this),
                  (t = n.parentsUntil(r.element, o)),
                  (i = n.parent("ul:not(.k-menu)")),
                  n.remove(),
                  i &&
                    !i.children(o).length &&
                    ((e = di(i)),
                    (u = i.parent(f)),
                    u.length ? u.remove() : i.remove(),
                    ki(e)),
                  t.length && ((t = t.eq(0)), tt(t), g(t)),
                  r
                );
              },
              _openAfterLoad: function (n, t) {
                var i = this;
                t.loaded()
                  ? (i.open(n), (i._loading = !1))
                  : t.one(ci, function () {
                      n.find(fr).removeClass("k-i-loading");
                      i._loading && (i.open(n), (i._loading = !1));
                    });
              },
              open: function (r) {
                var o,
                  y,
                  p,
                  f = this,
                  e = f.options,
                  w = "horizontal" == e.orientation,
                  h = e.direction,
                  k = i.support.isRtl(f.wrapper),
                  v = f._overflowWrapper();
                return (
                  (r = (v || f.element).find(r)),
                  (o =
                    f.dataSource &&
                    f.dataSource.getByUid(r.data(i.ns + "uid"))),
                  o && o.hasChildren && !o.loaded() && !f._loading
                    ? ((f._loading = !0),
                      r.find(fr).addClass("k-i-loading"),
                      o.load(),
                      f._openAfterLoad(r, o),
                      t)
                    : (/^(top|bottom|default)$/.test(h) &&
                        (h = k
                          ? w
                            ? (h + " left").replace("default", "bottom")
                            : "left"
                          : w
                          ? (h + " right").replace("default", "bottom")
                          : "right"),
                      (y =
                        ">.k-popup:visible,>.k-animation-container>.k-popup:visible"),
                      (p = function () {
                        var t = n(this).data(b);
                        t && f.close(n(this).closest("li.k-item"), !0);
                      }),
                      r.siblings().find(y).each(p),
                      v && r.find(y).each(p),
                      f.options.openOnClick && (f.clicked = !0),
                      r.each(function () {
                        var r = n(this);
                        clearTimeout(r.data(pt));
                        r.data(
                          pt,
                          setTimeout(function () {
                            var y,
                              g,
                              st,
                              tt,
                              it,
                              d,
                              ht,
                              p,
                              rt,
                              et,
                              o = r.find(".k-menu-group:first:hidden");
                            !o[0] &&
                              v &&
                              ((g = f._getPopup(r)), (o = g && g.element));
                            o.is(":visible") ||
                              (o[0] &&
                                f._triggerEvent({ item: r[0], type: lt }) ===
                                  !1 &&
                                (!o.find(".k-menu-group")[0] &&
                                o.children(".k-item").length > 1
                                  ? ((st = n(window).height()),
                                    (tt = function () {
                                      o.css({
                                        maxHeight:
                                          st -
                                          (i._outerHeight(o) - o.height()) -
                                          i.getShadows(o).bottom,
                                        overflow: "auto",
                                      });
                                    }),
                                    i.support.browser.msie &&
                                    i.support.browser.version <= 7
                                      ? setTimeout(tt, 0)
                                      : tt())
                                  : o.css({ maxHeight: "", overflow: "" }),
                                r.data(ot, r.css(ot)),
                                (it = f.nextItemZIndex++),
                                r.css(ot, it),
                                f.options.scrollable &&
                                  r.parent().siblings(nt).css({ zIndex: ++it }),
                                (y = o.data(b)),
                                (d = r.parent().hasClass(c)),
                                (ht = d && w),
                                (p = kr(h, d, k)),
                                (rt = e.animation.open.effects),
                                (et = rt !== t ? rt : "slideIn:" + br(h, d)),
                                y
                                  ? ((y = o.data(b)),
                                    (y.options.origin = p.origin),
                                    (y.options.position = p.position),
                                    (y.options.animation.open.effects = et))
                                  : (y = o
                                      .kendoPopup({
                                        activate: function () {
                                          f._triggerEvent({
                                            item: this.wrapper.parent(),
                                            type: ei,
                                          });
                                        },
                                        deactivate: function (n) {
                                          f._closing = !1;
                                          n.sender.element
                                            .removeData("targetTransform")
                                            .css({ opacity: "" });
                                          f._triggerEvent({
                                            item: this.wrapper.parent(),
                                            type: oi,
                                          });
                                        },
                                        origin: p.origin,
                                        position: p.position,
                                        collision:
                                          e.popupCollision !== t
                                            ? e.popupCollision
                                            : ht
                                            ? "fit"
                                            : "fit flip",
                                        anchor: r,
                                        appendTo: v || r,
                                        animation: {
                                          open: s(
                                            !0,
                                            { effects: et },
                                            e.animation.open
                                          ),
                                          close: e.animation.close,
                                        },
                                        open: u(f._popupOpen, f),
                                        close: function (n) {
                                          var t, r;
                                          f._closing = !0;
                                          t = n.sender.wrapper.parent();
                                          v &&
                                            ((r = n.sender.element.data(l)),
                                            r &&
                                              (t = (v || f.element).find(a(r))),
                                            n.sender.wrapper
                                              .children(nt)
                                              .hide());
                                          f._triggerEvent({
                                            item: t[0],
                                            type: ft,
                                          })
                                            ? n.preventDefault()
                                            : (t.css(ot, t.data(ot)),
                                              t.removeData(ot),
                                              f.options.scrollable &&
                                                t
                                                  .parent()
                                                  .siblings(nt)
                                                  .css({ zIndex: "" }),
                                              (ut ||
                                                hr ||
                                                i.support
                                                  .mouseAndTouchPresent) &&
                                                (t.removeClass(kt),
                                                f._removeHoverItem()));
                                        },
                                      })
                                      .data(b)),
                                o.removeAttr("aria-hidden"),
                                f._configurePopupOverflow(y, r),
                                (y._hovered = !0),
                                y.open(),
                                f._initPopupScrolling(y)));
                          }, f.options.hoverDelay)
                        );
                      }),
                      f)
                );
              },
              _configurePopupOverflow: function (n, t) {
                var i,
                  r = this;
                r.options.scrollable &&
                  (r._wrapPopupElement(n),
                  t.attr("data-groupparent") ||
                    ((i = new Date().getTime()),
                    t.attr("data-groupparent", i),
                    n.element.attr("data-group", i)));
              },
              _wrapPopupElement: function (n) {
                n.element.parent().is(f) ||
                  (n.wrapper = i
                    .wrap(n.element, n.options.autosize)
                    .css({
                      overflow: "hidden",
                      display: "block",
                      position: "absolute",
                    }));
              },
              _initPopupScrolling: function (n, t, i) {
                var r = this;
                r.options.scrollable &&
                  n.element[0].scrollHeight > n.element[0].offsetHeight &&
                  r._initPopupScrollButtons(n, t, i);
              },
              _initPopupScrollButtons: function (t, i, u) {
                var f = this,
                  e = t.wrapper.children(nt),
                  o = f.options.animation,
                  s = ((o && o.open && o.open.duration) || 0) + ir;
                setTimeout(function () {
                  var o, s;
                  e.length ||
                    ((o = n(
                      f.templates.scrollButton({ direction: i ? "left" : "up" })
                    )),
                    (s = n(
                      f.templates.scrollButton({
                        direction: i ? "right" : "down",
                      })
                    )),
                    (e = o.add(s).appendTo(t.wrapper)),
                    f._initScrolling(t.element, o, s, i),
                    u ||
                      e
                        .on(w + r, function () {
                          var i = f._overflowWrapper();
                          n(ct(t.element, i)).each(function (n, t) {
                            var r = i.find(a(t.data(l)));
                            f.close(r);
                          });
                        })
                        .on(at + r, function () {
                          setTimeout(function () {
                            n.isEmptyObject(f._openedPopups) &&
                              f._closeParentPopups(t.element);
                          }, ir);
                        }));
                  f._toggleScrollButtons(t.element, e.first(), e.last(), i);
                }, s);
              },
              _popupOpen: function (n) {
                this._keyTriggered ||
                  n.sender.element.children("." + p).removeClass(p);
                this.options.scrollable && this._setPopupHeight(n.sender);
              },
              _setPopupHeight: function (t, r) {
                var o,
                  s,
                  a,
                  h,
                  l,
                  v,
                  u,
                  y,
                  p,
                  e = t.element,
                  w = e.add(e.parent(f));
                w.height((e.hasClass(c) && this._initialHeight) || "");
                o = t._location(r);
                s = n(window).height();
                a = o.height;
                h = r ? 0 : Math.max(o.top, 0);
                l = r ? 0 : nr(this._overflowWrapper()[0], "scrollTop");
                v = window.innerHeight - s;
                u = s - i.getShadows(e).bottom + v;
                y = u + l > a + h;
                y ||
                  ((p = Math.min(u, u - h + l)),
                  w.css({ overflow: "hidden", height: p + "px" }));
              },
              close: function (t, i) {
                var f,
                  e,
                  r = this,
                  u = r._overflowWrapper(),
                  o = u || r.element;
                return (
                  (t = o.find(t)),
                  t.length || (t = o.find(">.k-item")),
                  (f = function (t) {
                    var i = !1;
                    return n.isEmptyObject(r._openedPopups)
                      ? i
                      : (n(ct(t, u)).each(function (n, t) {
                          return (i = !!r._openedPopups["" + t.data(l)]), !i;
                        }),
                        i);
                  }),
                  (e = function (n) {
                    var t = n.data(y);
                    return !u || !t || !r._openedPopups["" + t];
                  }),
                  t.each(function () {
                    var o = n(this);
                    !i && r._isRootItem(o) && (r.clicked = !1);
                    clearTimeout(o.data(pt));
                    o.data(
                      pt,
                      setTimeout(function () {
                        var n = r._getPopup(o);
                        if (n && (e(o) || r._forceClose)) {
                          if (!r._forceClose && f(n.element)) return;
                          n.close();
                          n.element.attr("aria-hidden", !0);
                          u &&
                            r._forceClose &&
                            t.last().is(o[0]) &&
                            delete r._forceClose;
                        }
                      }, r.options.hoverDelay)
                    );
                  }),
                  r
                );
              },
              _getPopup: function (n) {
                var t,
                  r,
                  f = this,
                  i = n
                    .find(
                      ".k-menu-group:not(.k-list-container):not(.k-calendar-container):first:visible"
                    )
                    .data(b),
                  u = f._overflowWrapper();
                return (
                  !i &&
                    u &&
                    ((t = n.data(y)),
                    t && ((r = u.find(it(t))), (i = r.data(b)))),
                  i
                );
              },
              _toggleDisabled: function (t, i) {
                this.element.find(t).each(function () {
                  n(this)
                    .toggleClass(vr, i)
                    .toggleClass(k, !i)
                    .attr("aria-disabled", !i);
                });
              },
              _toggleHover: function (t) {
                var r = n(i.eventTarget(t) || t.target).closest(o),
                  u = t.type == w || yt.indexOf(t.type) !== -1;
                r.siblings().removeClass(kt);
                r.parents("li." + k).length ||
                  r.toggleClass(
                    kt,
                    u ||
                      "mousedown" == t.type ||
                      "pointerover" == t.type ||
                      t.type == lr
                  );
                this._removeHoverItem();
              },
              _preventClose: function () {
                this.options.closeOnClick || (this._closurePrevented = !0);
              },
              _checkActiveElement: function (t) {
                var u = this,
                  f = n(t ? t.currentTarget : this._hoverItem()),
                  r = u._findRootParent(f)[0];
                this._closurePrevented ||
                  setTimeout(function () {
                    (document.hasFocus() &&
                      (e(r, i._activeElement()) ||
                        !t ||
                        e(r, t.currentTarget))) ||
                      u.close(r);
                  }, 0);
                this._closurePrevented = !1;
              },
              _removeHoverItem: function () {
                var n = this._hoverItem();
                n &&
                  n.hasClass(p) &&
                  (n.removeClass(p), (this._oldHoverItem = null));
              },
              _updateClasses: function () {
                var t,
                  n = this.element,
                  r = ".k-menu-init div ul";
                n.removeClass("k-menu-horizontal k-menu-vertical");
                n.addClass(
                  "k-widget k-reset k-header k-menu-init " + c
                ).addClass(c + "-" + this.options.orientation);
                n.find("li > ul")
                  .filter(function () {
                    return !i.support.matchesSelector.call(this, r);
                  })
                  .addClass("k-group k-menu-group")
                  .attr("role", "menu")
                  .attr("aria-hidden", n.is(":visible"))
                  .parent("li")
                  .attr("aria-haspopup", "true")
                  .end()
                  .find("li > div")
                  .addClass("k-content")
                  .attr("tabindex", "-1");
                t = n.find("> li,.k-menu-group > li");
                n.removeClass("k-menu-init");
                t.each(function () {
                  bi(this);
                });
              },
              _mouseenter: function (t) {
                var i = this,
                  r = n(t.currentTarget),
                  s = i._itemHasChildren(r),
                  f = r.data(y) || r.parent().data(l),
                  h = rt(t);
                f && (i._openedPopups["" + f] = !0);
                i._closing ||
                  (t.delegateTarget != r.parents(ai)[0] &&
                    t.delegateTarget !=
                      r.parents(
                        ".k-menu-scroll-wrapper,.k-popups-wrapper"
                      )[0]) ||
                  ((i._keyTriggered = !1),
                  (i.options.openOnClick.rootMenuItems &&
                    i._isRootItem(r.closest(o))) ||
                    (i.options.openOnClick.subMenuItems &&
                      !i._isRootItem(r.closest(o))) ||
                    (!(
                      i.options.openOnClick === !1 ||
                      (i.options.openOnClick.rootMenuItems === !1 &&
                        i._isRootItem(r.closest(o))) ||
                      (i.options.openOnClick.subMenuItems === !1 &&
                        !i._isRootItem(r.closest(o))) ||
                      i.clicked
                    ) ||
                      ut ||
                      (h && i._isRootItem(r.closest(o))) ||
                      (!e(t.currentTarget, t.relatedTarget) && s && i.open(r)),
                    ((i.options.openOnClick === !0 && i.clicked) || ut) &&
                      r.siblings().each(
                        u(function (n, t) {
                          i.close(t, !0);
                        }, i)
                      )));
              },
              _mousedown: function (t) {
                var i = this,
                  r = n(t.currentTarget);
                ((i.options.openOnClick.subMenuItems && !i._isRootItem(r)) ||
                  ut) &&
                  r.siblings().each(
                    u(function (n, t) {
                      i.close(t, !0);
                    }, i)
                  );
              },
              _mouseleave: function (r) {
                var u = this,
                  o = n(r.currentTarget),
                  s = o.data(y),
                  c = o.children(f).length || o.children(vi).length || s,
                  h = n(window);
                return (
                  s && delete u._openedPopups["" + s],
                  o.parentsUntil(
                    f,
                    ".k-list-container,.k-calendar-container"
                  )[0]
                    ? (r.stopImmediatePropagation(), t)
                    : (u.options.openOnClick !== !1 &&
                        (u.options.openOnClick.rootMenuItems ||
                          !u._isRootItem(o)) &&
                        (u.options.openOnClick.subMenuItems ||
                          u._isRootItem(o))) ||
                      ut ||
                      rt(r) ||
                      e(r.currentTarget, r.relatedTarget || r.target) ||
                      !c ||
                      e(r.currentTarget, i._activeElement())
                    ? (((i.support.browser.msie &&
                        !r.toElement &&
                        !r.relatedTarget &&
                        !rt(r)) ||
                        r.clientX < 0 ||
                        r.clientY < 0 ||
                        r.clientY > h.height() ||
                        r.clientX > h.width()) &&
                        u.close(o),
                      t)
                    : (u.close(o, !0), (u._loading = !1), t)
                );
              },
              _mouseenterPopup: function (t) {
                var r,
                  u = this,
                  i = n(t.currentTarget);
                i.parent().is(f) ||
                  ((i = i.children("ul")),
                  (r = i.data(l)),
                  r && (u._openedPopups["" + r] = !0));
              },
              _mouseleavePopup: function (t) {
                var r = this,
                  i = n(t.currentTarget);
                !rt(t) && i.is(f) && r._closePopups(i.children("ul"));
              },
              _closePopups: function (t) {
                var u,
                  i = this,
                  f = i._overflowWrapper(),
                  r = t.data(l);
                r &&
                  (delete i._openedPopups["" + r],
                  (u = f.find(a(r))),
                  setTimeout(function () {
                    if (i.options.openOnClick) i._closeChildPopups(t);
                    else if (n.isEmptyObject(i._openedPopups)) {
                      var r = i._innerPopup(t);
                      i._closeParentPopups(r);
                    } else i.close(u, !0);
                  }, 0));
              },
              _closeChildPopups: function (t) {
                var i = this,
                  r = i._overflowWrapper();
                n(ct(t, r)).each(function () {
                  var n = r.find(a(this.data(l)));
                  i.close(n, !0);
                });
              },
              _innerPopup: function (n) {
                var i = this._overflowWrapper(),
                  t = ct(n, i);
                return t[t.length - 1] || n;
              },
              _closeParentPopups: function (n) {
                var r = this,
                  u = r._overflowWrapper(),
                  t = n.data(l),
                  i = u.find(a(t));
                for (
                  t = i.parent().data(l), r.close(i, !0);
                  t && !r._openedPopups[t] && !i.parent().is(ai);

                )
                  (i = u.find(a(t))), r.close(i, !0), (t = i.parent().data(l));
              },
              _click: function (r) {
                for (
                  var v,
                    s,
                    g,
                    nt,
                    p,
                    tt,
                    u = this,
                    h = u.options,
                    e = n(i.eventTarget(r)),
                    c = e[0],
                    l = e[0] ? e[0].nodeName.toUpperCase() : "",
                    ut =
                      "INPUT" == l ||
                      "SELECT" == l ||
                      "BUTTON" == l ||
                      "LABEL" == l,
                    w = e.closest(ur),
                    f = e.closest(o),
                    et = f[0],
                    b = w.attr("href"),
                    ot = e.attr("href"),
                    st = n("<a href='#' />").attr("href"),
                    a = !!b && b !== st,
                    ht = a && !!b.match(/^#/),
                    ct = !!ot && ot !== st,
                    d = u._overflowWrapper();
                  c && c.parentNode != et;

                )
                  c = c.parentNode;
                if (!n(c).is(pu)) {
                  if (f.hasClass(k)) return r.preventDefault(), t;
                  if (
                    (r.handled ||
                      !u._triggerSelect(e, et) ||
                      ut ||
                      r.preventDefault(),
                    (r.handled = !0),
                    (s = f.children(yi)),
                    d && ((p = f.data(y)), p && (s = d.find(it(p)))),
                    (g = s.is(":visible")),
                    (nt = h.openOnClick && g && u._isRootItem(f)),
                    h.closeOnClick && (!a || ht) && (!s.length || nt))
                  )
                    return (
                      f.removeClass(kt).css("height"),
                      (u._oldHoverItem = u._findRootParent(f)),
                      (tt = u._parentsUntil(w, u.element, o)),
                      (u._forceClose = !!d),
                      u.close(tt),
                      (u.clicked = !1),
                      "MSPointerUp".indexOf(r.type) != -1 && r.preventDefault(),
                      t
                    );
                  a && r.enterKey && w[0].click();
                  ((u._isRootItem(f) && h.openOnClick !== !1) ||
                    h.openOnClick.subMenuItems ||
                    i.support.touch ||
                    (rt(r) && u._isRootItem(f.closest(o)))) &&
                    (a || ut || ct || r.preventDefault(),
                    (u.clicked = !0),
                    (v = s.is(":visible") ? ft : lt),
                    (h.closeOnClick || v != ft) && u[v](f));
                }
              },
              _parentsUntil: function (i, r, u) {
                var e,
                  f,
                  o = this._overflowWrapper();
                return o
                  ? ((e = tu(i, o)),
                    (f = []),
                    n(e).each(function () {
                      var i = n(this);
                      return !i.is(r) && (i.is(u) && f.push(this), t);
                    }),
                    n(f))
                  : i.parentsUntil(r, u);
              },
              _triggerSelect: function (n, t) {
                var r, i, u, f;
                return (
                  (n = n.is(".k-link") ? n : n.closest(".k-link")),
                  (r = n.data("selectHandler")),
                  r && ((i = this._getEventData(n)), r.call(this, i)),
                  (u = i && i.isDefaultPrevented()),
                  (f = this._triggerEvent({ item: t, type: et })),
                  u || f
                );
              },
              _getEventData: function (n) {
                return {
                  sender: this,
                  target: n,
                  _defaultPrevented: !1,
                  preventDefault: function () {
                    this._defaultPrevented = !0;
                  },
                  isDefaultPrevented: function () {
                    return this._defaultPrevented;
                  },
                };
              },
              _documentClick: function (n) {
                var t = this;
                e((t._overflowWrapper() || t.element)[0], n.target) ||
                  (t.clicked = !1);
              },
              _focus: function (i) {
                var r = this,
                  u = i.target,
                  f = r._hoverItem(),
                  e = uu();
                return u == r.wrapper[0] || n(u).is(":kendoFocusable")
                  ? (e === i.currentTarget &&
                      (f.length
                        ? r._moveHover([], f)
                        : r._oldHoverItem ||
                          r._moveHover([], r.wrapper.children().first())),
                    t)
                  : (i.stopPropagation(),
                    n(u)
                      .closest(".k-content")
                      .closest(".k-menu-group")
                      .closest(".k-item")
                      .addClass(p),
                    r.wrapper.focus(),
                    t);
              },
              _keydown: function (n) {
                var f,
                  o,
                  s,
                  r = this,
                  e = n.keyCode,
                  u = r._oldHoverItem,
                  c = i.support.isRtl(r.wrapper);
                if (n.target == n.currentTarget || e == h.ESC) {
                  if (
                    (u || (u = r._oldHoverItem = r._hoverItem()),
                    (o = r._itemBelongsToVertival(u)),
                    (s = r._itemHasChildren(u)),
                    (r._keyTriggered = !0),
                    e == h.RIGHT)
                  )
                    f = r[c ? "_itemLeft" : "_itemRight"](u, o, s);
                  else if (e == h.LEFT)
                    f = r[c ? "_itemRight" : "_itemLeft"](u, o, s);
                  else if (e == h.DOWN) f = r._itemDown(u, o, s);
                  else if (e == h.UP) f = r._itemUp(u, o, s);
                  else if (e == h.HOME)
                    r._moveHover(u, u.parent().children().first()),
                      n.preventDefault();
                  else if (e == h.END)
                    r._moveHover(u, u.parent().children().last()),
                      n.preventDefault();
                  else if (e == h.ESC) f = r._itemEsc(u, o);
                  else if (e == h.ENTER || e == h.SPACEBAR)
                    (f = u.children(".k-link")),
                      f.length > 0 &&
                        (r._click({
                          target: f[0],
                          preventDefault: function () {},
                          enterKey: !0,
                        }),
                        s && !u.hasClass(k)
                          ? (r.open(u),
                            r._moveHover(
                              u,
                              r._childPopupElement(u).children().first()
                            ))
                          : r._moveHover(u, r._findRootParent(u)));
                  else if (e == h.TAB)
                    return (
                      (f = r._findRootParent(u)),
                      r._moveHover(u, f),
                      r._checkActiveElement(),
                      t
                    );
                  f && f[0] && (n.preventDefault(), n.stopPropagation());
                }
              },
              _hoverItem: function () {
                return this.wrapper
                  .find(".k-item.k-state-hover,.k-item.k-state-focused")
                  .filter(":visible");
              },
              _itemBelongsToVertival: function (n) {
                var t = this.wrapper.hasClass("k-menu-vertical");
                return n.length ? n.parent().hasClass("k-menu-group") || t : t;
              },
              _itemHasChildren: function (n) {
                return (
                  !!(n && n.length && n[0].nodeType) &&
                  (n.children(".k-menu-group, div.k-animation-container")
                    .length > 0 ||
                    (!!n.data(y) &&
                      !!this._overflowWrapper().children(it(n.data(y)))))
                );
              },
              _moveHover: function (t, i) {
                var r = this,
                  u = r._ariaId;
                t.length && i.length && t.removeClass(p);
                i.length &&
                  (i[0].id && (u = i[0].id),
                  i.addClass(p),
                  (r._oldHoverItem = i),
                  u &&
                    (r.element.removeAttr("aria-activedescendant"),
                    n("#" + u).removeAttr("id"),
                    i.attr("id", u),
                    r.element.attr("aria-activedescendant", u)),
                  r._scrollToItem(i));
              },
              _findRootParent: function (n) {
                return this._isRootItem(n)
                  ? n
                  : this._parentsUntil(n, ai, "li.k-item").last();
              },
              _isRootItem: function (n) {
                return n.parent().hasClass(c);
              },
              _itemRight: function (n, t, i) {
                var r,
                  f,
                  e,
                  o,
                  u = this;
                return (
                  t
                    ? i && !n.hasClass(k)
                      ? (u.open(n),
                        (r = u._childPopupElement(n).children().first()))
                      : "horizontal" == u.options.orientation &&
                        ((f = u._findRootParent(n)),
                        (e = u._overflowWrapper()),
                        e && ((o = gi(f, e)), u._closeChildPopups(o)),
                        u.close(f),
                        (r = f.nextAll(ht)))
                    : ((r = n.nextAll(ht)),
                      r.length || (r = n.prevAll(pr)),
                      u.close(n)),
                  r && !r.length
                    ? (r = u.wrapper.children(".k-item").first())
                    : r || (r = []),
                  u._moveHover(n, r),
                  r
                );
              },
              _itemLeft: function (n, t) {
                var i,
                  u,
                  r = this;
                return (
                  t
                    ? ((i = n.parent().closest(".k-item")),
                      (u = r._overflowWrapper()),
                      !i.length && u && (i = gt(n.parent(), u)),
                      r.close(i),
                      r._isRootItem(i) &&
                        "horizontal" == r.options.orientation &&
                        (i = i.prevAll(ht)))
                    : ((i = n.prevAll(ht)),
                      i.length || (i = n.nextAll(pr)),
                      r.close(n)),
                  i.length || (i = r.wrapper.children(".k-item").last()),
                  r._moveHover(n, i),
                  i
                );
              },
              _itemDown: function (n, t, i) {
                var r,
                  u = this;
                if (t) r = n.nextAll(ht);
                else {
                  if (!i || n.hasClass(k)) return;
                  u.open(n);
                  r = u._childPopupElement(n).children().first();
                }
                return (
                  !r.length && n.length
                    ? (r = n.parent().children().first())
                    : n.length || (r = u.wrapper.children(".k-item").first()),
                  u._moveHover(n, r),
                  r
                );
              },
              _itemUp: function (n, t) {
                var i,
                  r = this;
                if (t)
                  return (
                    (i = n.prevAll(ht)),
                    !i.length && n.length
                      ? (i = n.parent().children().last())
                      : n.length || (i = r.wrapper.children(".k-item").last()),
                    r._moveHover(n, i),
                    i
                  );
              },
              _scrollToItem: function (n) {
                var t,
                  r,
                  h,
                  o,
                  l,
                  a,
                  u,
                  v,
                  f,
                  e,
                  s,
                  y,
                  p = this;
                p.options.scrollable &&
                  n &&
                  n.length &&
                  ((t = n.parent()),
                  (r =
                    !!t.hasClass(c) && "horizontal" == p.options.orientation),
                  (h = r ? "scrollLeft" : "scrollTop"),
                  (o = r ? i._outerWidth : i._outerHeight),
                  (l = t[h]()),
                  (a = o(n)),
                  (u = n[0][r ? "offsetLeft" : "offsetTop"]),
                  (v = o(t)),
                  (f = t.siblings(nt)),
                  (e = f.length ? o(f.first()) : 0),
                  l + v < u + a + e
                    ? (s = u + a - v + e)
                    : l > u - e && (s = u - e),
                  isNaN(s) ||
                    ((y = {}),
                    (y[h] = s),
                    t.finish().animate(y, "fast", "linear", function () {
                      p._toggleScrollButtons(t, f.first(), f.last(), r);
                    })));
              },
              _itemEsc: function (n, t) {
                var i,
                  r = this;
                return t
                  ? ((i = n.parent().closest(".k-item")),
                    r.close(i),
                    r._moveHover(n, i),
                    i)
                  : n;
              },
              _childPopupElement: function (n) {
                var t = n.find(".k-menu-group"),
                  i = this._overflowWrapper();
                return !t.length && i && (t = gi(n, i)), t;
              },
              _triggerEvent: function (n) {
                var t = this;
                return t.trigger(n.type, { type: n.type, item: n.item });
              },
              _focusHandler: function (t) {
                var u = this,
                  r = n(i.eventTarget(t)).closest(o);
                r.hasClass(k) ||
                  setTimeout(function () {
                    u._moveHover([], r);
                    r.children(".k-content")[0] &&
                      r.parent().closest(".k-item").removeClass(p);
                  }, 200);
              },
              _animations: function (n) {
                n &&
                  "animation" in n &&
                  !n.animation &&
                  (n.animation = {
                    open: { effects: {} },
                    close: { hide: !0, effects: {} },
                  });
              },
              _dataSource: function (n) {
                var i = this,
                  t = n ? n.dataSource : i.options.dataSource;
                t &&
                  ((t = ti(t) ? { data: t } : t),
                  i._unbindDataSource(),
                  t.fields ||
                    (t.fields = [
                      { field: "uid" },
                      { field: "text" },
                      { field: "url" },
                      { field: "cssClass" },
                      { field: "spriteCssClass" },
                      { field: "imageUrl" },
                      { field: "imageAttr" },
                      { field: "attr" },
                      { field: "contentAttr" },
                      { field: "content" },
                      { field: "encoded" },
                      { field: "items" },
                      { field: "select" },
                    ]),
                  (i.dataSource = fu.create(t)),
                  i._bindDataSource(),
                  i.dataSource.fetch());
              },
              _bindDataSource: function () {
                this._refreshHandler = u(this.refresh, this);
                this._errorHandler = u(this._error, this);
                this.dataSource.bind(ci, this._refreshHandler);
                this.dataSource.bind(cr, this._errorHandler);
              },
              _unbindDataSource: function () {
                var n = this.dataSource;
                n &&
                  (n.unbind(ci, this._refreshHandler),
                  n.unbind(cr, this._errorHandler));
              },
              _error: function () {},
              findByUid: function (n) {
                var t = this._overflowWrapper() || this.element;
                return t.find("[" + i.attr("uid") + "=" + n + "]");
              },
              refresh: function (t) {
                var i = this,
                  u = t.node,
                  r = t.action,
                  f = u ? i.findByUid(u.uid) : i.element,
                  e = t.items,
                  o = t.index,
                  s = n.proxy(i._updateItem, i),
                  h = n.proxy(i._removeItem, i);
                "add" == r
                  ? i._appendItems(e, o, f)
                  : "remove" == r
                  ? e.forEach(h)
                  : "itemchange" == r
                  ? e.forEach(s)
                  : "itemloaded" === r
                  ? i.append(t.items, f)
                  : this._initData();
                this.trigger(wr, { item: f, dataItem: u });
              },
              _appendItems: function (n, t, i) {
                var r = this,
                  u = i.find(st).eq(t);
                u.length ? r.insertBefore(n, u) : r.append(n, i);
              },
              _removeItem: function (n) {
                var t = this,
                  i = t.findByUid(n.uid);
                t.remove(i);
              },
              _updateItem: function (n) {
                var t = this,
                  i = t.findByUid(n.uid),
                  r = i.next(),
                  u = n.parentNode();
                t.remove(i);
                r.length
                  ? t.insertBefore(n, r)
                  : t.append(n, u && t.findByUid(u.uid));
              },
              _accessors: function () {
                var t,
                  n,
                  r,
                  u = this,
                  f = u.options,
                  e = u.element;
                for (t in dt)
                  (n = f[dt[t]]),
                    (r = e.attr(i.attr(t + "-field"))),
                    !n && r && (n = r),
                    n || (n = t),
                    ti(n) || (n = [n]),
                    (f[dt[t]] = n);
              },
              _fieldAccessor: function (t) {
                var f = this.options[dt[t]] || [],
                  u = f.length,
                  r = "(function(item) {";
                return (
                  0 === u
                    ? (r += "return item['" + t + "'];")
                    : ((r +=
                        "var levels = [" +
                        n
                          .map(f, function (n) {
                            return "function(d){ return " + i.expr(n) + "}";
                          })
                          .join(",") +
                        "];"),
                      (r +=
                        "if(item.level){return levels[Math.min(item.level(), " +
                        u +
                        "-1)](item);}else"),
                      (r += "{return levels[" + u + "-1](item)}")),
                  r + "})"
                );
              },
              _templates: function () {
                var r = this,
                  t = r.options,
                  n = u(r._fieldAccessor, r);
                t.template && typeof t.template == bu
                  ? (t.template = v(t.template))
                  : t.template ||
                    (t.template = v(
                      "# var text = " +
                        n("text") +
                        "(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #"
                    ));
                r.templates = {
                  content: v(
                    "#var contentHtml = " +
                      n("content") +
                      "(item);#<div #= contentCssAttributes(item.toJSON ? item.toJSON() : item) # tabindex='-1'>#= contentHtml || '' #</div>"
                  ),
                  group: v(
                    "<ul class='#= groupCssClass(group) #'#= groupAttributes(group) # role='menu' aria-hidden='true'>#= renderItems(data) #</ul>"
                  ),
                  itemWrapper: v(
                    "# var url = " +
                      n("url") +
                      "(item); ## var imageUrl = " +
                      n("imageUrl") +
                      "(item); ## var imgAttributes = " +
                      n("imageAttr") +
                      "(item);## var tag = url ? 'a' : 'span' #<#= tag # class='#= textClass(item) #' #if(url){#href='#= url #'#}#># if (imageUrl) { #<img #= imageCssAttributes(imgAttributes) #  alt='' src='#= imageUrl #' /># } ##= sprite(item) ##= data.menu.options.template(data) ##= arrow(data) #</#= tag #>"
                  ),
                  item: v(
                    "#var contentHtml = " +
                      n("content") +
                      "(item);#<li class='#= wrapperCssClass(group, item) #' #= itemCssAttributes(item.toJSON ? item.toJSON() : item) # role='menuitem'  #=item.items ? \"aria-haspopup='true'\": \"\"##=item.enabled === false ? \"aria-disabled='true'\" : ''#" +
                      i.attr("uid") +
                      "='#= item.uid #' >#= itemWrapper(data) ##if (item.hasChildren || item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl || contentHtml) { ##= renderContent(data) ## } #</li>"
                  ),
                  scrollButton: v(
                    "<span class='k-button k-button-icon k-menu-scroll-button k-scroll-#= direction #' unselectable='on'><span class='k-icon k-i-arrow-60-#= direction #'></span></span>"
                  ),
                  arrow: v(
                    "<span class='#= arrowClass(item, group) #'></span>"
                  ),
                  sprite: v(
                    "# var spriteCssClass = " +
                      n("spriteCssClass") +
                      "(data); if(spriteCssClass) {#<span class='k-sprite #= spriteCssClass #'></span>#}#"
                  ),
                  empty: v(""),
                };
              },
              renderItem: function (n) {
                var r,
                  i,
                  t = this;
                return (
                  (n = s({ menu: t, group: {} }, n)),
                  (r = t.templates.empty),
                  (i = n.item),
                  t.templates.item(
                    s(
                      n,
                      {
                        sprite: t.templates.sprite,
                        itemWrapper: t.templates.itemWrapper,
                        renderContent: t.renderContent,
                        arrow:
                          i.items ||
                          i.content ||
                          i[t.options.dataContentField[0]]
                            ? t.templates.arrow
                            : r,
                        subGroup: t.renderGroup,
                      },
                      wi
                    )
                  )
                );
              },
              renderGroup: function (n) {
                var t = this,
                  i = t.templates || n.menu.templates;
                return i.group(
                  s(
                    {
                      renderItems: function (n) {
                        for (
                          var r = "",
                            t = 0,
                            i = n.items,
                            u = i ? i.length : 0,
                            f = s({ length: u }, n.group);
                          t < u;
                          t++
                        )
                          r += n.menu.renderItem(
                            s(n, { group: f, item: s({ index: t }, i[t]) })
                          );
                        return r;
                      },
                    },
                    n,
                    wi
                  )
                );
              },
              renderContent: function (n) {
                return n.menu.templates.content(s(n, wi));
              },
            }),
            ku = d.extend({
              init: function (t, r) {
                var u = this;
                d.fn.init.call(u, t, r);
                u._marker = i.guid().substring(0, 8);
                u.target = n(u.options.target);
                u._popup();
                u._wire();
              },
              _initOverflow: function (n) {
                var t = this;
                n.scrollable &&
                  !t._overflowWrapper() &&
                  ((t._openedPopups = {}),
                  (t._popupsWrapper = (
                    t.element.parent().is(f) ? t.element.parent() : t.element
                  )
                    .wrap(
                      "<div class='k-popups-wrapper " +
                        n.orientation +
                        "'></div>"
                    )
                    .parent()),
                  "horizontal" == t.options.orientation && tr(t.element),
                  n.appendTo && n.appendTo.append(t._popupsWrapper),
                  (t._initialHeight = t.element[0].style.height),
                  (t._initialWidth = t.element[0].style.width));
              },
              options: {
                name: "ContextMenu",
                filter: null,
                showOn: "contextmenu",
                orientation: "vertical",
                alignToAnchor: !1,
                copyAnchorStyles: !0,
                target: "body",
              },
              events: [lt, ft, ei, oi, et],
              setOptions: function (t) {
                var i = this;
                d.fn.setOptions.call(i, t);
                i.target.off(i.showOn + r + i._marker, i._showProxy);
                i.userEvents && i.userEvents.destroy();
                i.target = n(i.options.target);
                t.orientation && i.popup.wrapper[0] && i.popup.element.unwrap();
                i._wire();
                d.fn.setOptions.call(this, t);
              },
              destroy: function () {
                var n = this;
                n.target.off(n.options.showOn + r + n._marker);
                bt.off(i.support.mousedown + r + n._marker, n._closeProxy);
                n.userEvents && n.userEvents.destroy();
                d.fn.destroy.call(n);
              },
              open: function (u, f) {
                var s,
                  h,
                  o = this;
                return (
                  (u = n(u)[0]),
                  e(o.element[0], n(u)[0]) || o._itemHasChildren(n(u))
                    ? d.fn.open.call(o, u)
                    : o._triggerEvent({ item: o.element, type: lt }) === !1 &&
                      (o.popup.visible() &&
                        o.options.filter &&
                        (o.popup.close(!0), o.popup.element.kendoStop(!0)),
                      f !== t
                        ? ((s = o._overflowWrapper()),
                          s && ((h = s.offset()), (u -= h.left), (f -= h.top)),
                          o.popup.wrapper.hide(),
                          o._configurePopupScrolling(u, f),
                          o.popup.open(u, f))
                        : ((o.popup.options.anchor =
                            (u ? u : o.popup.anchor) || o.target),
                          o.popup.element.kendoStop(!0),
                          o._configurePopupScrolling(),
                          o.popup.open()),
                      bt.off(o.popup.downEvent, o.popup._mousedownProxy),
                      bt.on(
                        i.support.mousedown + r + o._marker,
                        o._closeProxy
                      )),
                  o
                );
              },
              _configurePopupScrolling: function (n, i) {
                var u = this,
                  r = u.popup,
                  f = "horizontal" == u.options.orientation;
                u.options.scrollable &&
                  (u._wrapPopupElement(r),
                  r.element.parent().css({ position: "", height: "" }),
                  r.element.css({
                    visibility: "hidden",
                    display: "",
                    position: "",
                  }),
                  f
                    ? u._setPopupWidth(
                        r,
                        isNaN(n) ? t : { isFixed: !0, x: n, y: i }
                      )
                    : u._setPopupHeight(
                        r,
                        isNaN(n) ? t : { isFixed: !0, x: n, y: i }
                      ),
                  r.element.css({
                    visibility: "",
                    display: "none",
                    position: "absolute",
                  }),
                  u._initPopupScrollButtons(r, f, !0),
                  r.element.siblings(nt).hide());
              },
              _setPopupWidth: function (t, r) {
                var u,
                  l,
                  a,
                  e,
                  o,
                  s,
                  h,
                  v,
                  c = t.element,
                  y = c.add(c.parent(f));
                y.width(this._initialWidth || "");
                u = t._location(r);
                l = n(window).width();
                a = u.width;
                e = Math.max(u.left, 0);
                o = r ? 0 : nr(this._overflowWrapper()[0], "scrollLeft");
                s = i.getShadows(c);
                h = l - s.left - s.right;
                v = h + o > a + e;
                v || y.css({ overflow: "hidden", width: h - e + o + "px" });
              },
              close: function () {
                var t = this;
                e(t.element[0], n(arguments[0])[0]) ||
                t._itemHasChildren(arguments[0])
                  ? d.fn.close.call(t, arguments[0])
                  : t.popup.visible() &&
                    t._triggerEvent({ item: t.element, type: ft }) === !1 &&
                    (t.popup.close(),
                    bt.off(i.support.mousedown + r + t._marker, t._closeProxy),
                    t.unbind(et, t._closeTimeoutProxy));
              },
              _showHandler: function (t) {
                var o,
                  r = t,
                  u = this,
                  f = u.options,
                  s = n(i.support.mobileOS ? r.target : r.currentTarget);
                t.event &&
                  ((r = t.event),
                  (r.pageX = t.x.location),
                  (r.pageY = t.y.location));
                e(u.element[0], t.relatedTarget || t.target) ||
                  ((u._eventOrigin = r),
                  r.preventDefault(),
                  r.stopImmediatePropagation(),
                  u.element.find("." + p).removeClass(p),
                  ((f.filter && s.is(f.filter)) || !f.filter) &&
                    (f.alignToAnchor
                      ? ((u.popup.options.anchor = r.currentTarget),
                        u.open(r.currentTarget))
                      : ((u.popup.options.anchor = r.currentTarget),
                        u._targetChild
                          ? ((o = u.target.offset()),
                            u.open(r.pageX - o.left, r.pageY - o.top))
                          : u.open(r.pageX, r.pageY))));
              },
              _closeHandler: function (t) {
                var f,
                  i = this,
                  r = n(t.relatedTarget || t.target),
                  o = r.closest(i.target.selector)[0] == i.target[0],
                  h = r.closest(st),
                  c = i._itemHasChildren(h),
                  s = i._overflowWrapper(),
                  u = e(i.element[0], r[0]) || (s && e(s[0], r[0]));
                i._eventOrigin = t;
                f = 3 !== t.which;
                i.popup.visible() &&
                  ((f && o) || !o) &&
                  ((i.options.closeOnClick && !c && u) || !u) &&
                  (u
                    ? (this.unbind(et, this._closeTimeoutProxy),
                      i.bind(et, i._closeTimeoutProxy))
                    : i.close());
              },
              _wire: function () {
                var n = this,
                  t = n.options,
                  f = n.target;
                n._showProxy = u(n._showHandler, n);
                n._closeProxy = u(n._closeHandler, n);
                n._closeTimeoutProxy = u(n.close, n);
                f[0] &&
                  (i.support.mobileOS && "contextmenu" == t.showOn
                    ? ((n.userEvents = new i.UserEvents(f, {
                        filter: t.filter,
                        allowSelection: !1,
                      })),
                      f.on(t.showOn + r + n._marker, !1),
                      n.userEvents.bind("hold", n._showProxy))
                    : t.filter
                    ? f.on(t.showOn + r + n._marker, t.filter, n._showProxy)
                    : f.on(t.showOn + r + n._marker, n._showProxy));
              },
              _triggerEvent: function (i) {
                var r = this,
                  f = n(r.popup.options.anchor)[0],
                  u = r._eventOrigin;
                return (
                  (r._eventOrigin = t),
                  r.trigger(
                    i.type,
                    s(
                      {
                        type: i.type,
                        item: i.item || this.element[0],
                        target: f,
                      },
                      u ? { event: u } : {}
                    )
                  )
                );
              },
              _popup: function () {
                var t = this,
                  i = t._overflowWrapper();
                t._triggerProxy = u(t._triggerEvent, t);
                t.popup = t.element
                  .addClass("k-context-menu")
                  .kendoPopup({
                    autosize: "horizontal" === t.options.orientation,
                    anchor: t.target || "body",
                    copyAnchorStyles: t.options.copyAnchorStyles,
                    collision: t.options.popupCollision || "fit",
                    animation: t.options.animation,
                    activate: t._triggerProxy,
                    deactivate: t._triggerProxy,
                    appendTo: i || t.options.appendTo,
                    close: i
                      ? function (t) {
                          n(ct(t.sender.element, i)).each(function (n, t) {
                            var i = t.data(b);
                            i && i.close(!0);
                          });
                        }
                      : n.noop,
                  })
                  .data(b);
                t._targetChild = e(t.target[0], t.popup.element[0]);
              },
            });
          ni.plugin(d);
          ni.plugin(ku);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.columnmenu.min",
      ["kendo.popup.min", "kendo.filtermenu.min", "kendo.menu.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function c(t) {
            return n.trim(t).replace(/&nbsp;/gi, "");
          }
          function g(n, t) {
            for (var r, f = {}, i = 0, u = n.length; i < u; i++)
              (r = n[i]), (f[r[t]] = r);
            return f;
          }
          function h(n) {
            for (var i = [], t = 0; t < n.length; t++)
              n[t].columns ? (i = i.concat(h(n[t].columns))) : i.push(n[t]);
            return i;
          }
          function nt(n, t) {
            return "[" + i.attr(n) + "='" + (t || "").replace(/'/g, '"') + "']";
          }
          function tt(n, t, i) {
            n > 0 ? t.insertAfter(i.children().eq(n - 1)) : i.prepend(t);
          }
          var i = window.kendo,
            v = i.ui,
            o = n.proxy,
            it = n.extend,
            u = n.grep,
            y = n.map,
            rt = n.inArray,
            r = "k-state-selected",
            l = "asc",
            p = "desc",
            w = "change",
            b = "init",
            k = "open",
            f = "select",
            a = "kendoPopup",
            ut = "kendoFilterMenu",
            d = "kendoMenu",
            e = ".kendoColumnMenu",
            s = v.Widget,
            ft = s.extend({
              init: function (t, r) {
                var f,
                  u = this;
                s.fn.init.call(u, t, r);
                t = u.element;
                r = u.options;
                u.owner = r.owner;
                u.dataSource = r.dataSource;
                u.field = t.attr(i.attr("field"));
                u.title = t.attr(i.attr("title"));
                f = t.find(".k-header-column-menu");
                f[0] ||
                  (f = t
                    .addClass("k-with-icon")
                    .prepend(
                      '<a class="k-header-column-menu" href="#" title="' +
                        r.messages.settings +
                        '" aria-label="' +
                        r.messages.settings +
                        '"><span class="k-icon k-i-more-vertical"></span></a>'
                    )
                    .find(".k-header-column-menu"));
                u.link = f.attr("tabindex", -1).on("click" + e, o(u._click, u));
                u.wrapper = n('<div class="k-column-menu"/>');
                u._refreshHandler = o(u.refresh, u);
                u.dataSource.bind(w, u._refreshHandler);
              },
              _init: function () {
                var n = this;
                n.pane = n.options.pane;
                n.pane && (n._isMobile = !0);
                n._isMobile ? n._createMobileMenu() : n._createMenu();
                n.owner._muteAngularRebind(function () {
                  n._angularItems("compile");
                });
                n._sort();
                n._columns();
                n._filter();
                n._lockColumns();
                n.trigger(b, { field: n.field, container: n.wrapper });
              },
              events: [b, k, "sort", "filtering"],
              options: {
                name: "ColumnMenu",
                messages: {
                  sortAscending: "Sort Ascending",
                  sortDescending: "Sort Descending",
                  filter: "Filter",
                  column: "Column",
                  columns: "Columns",
                  columnVisibility: "Column Visibility",
                  clear: "Clear",
                  cancel: "Cancel",
                  done: "Done",
                  settings: "Edit Column Settings",
                  lock: "Lock",
                  unlock: "Unlock",
                },
                filter: "",
                columns: !0,
                sortable: !0,
                filterable: !0,
                animations: { left: "slide" },
              },
              _createMenu: function () {
                var n = this,
                  t = n.options;
                n.wrapper.html(
                  i.template(et)({
                    uid: i.guid(),
                    ns: i.ns,
                    messages: t.messages,
                    sortable: t.sortable,
                    filterable: t.filterable,
                    columns: n._ownerColumns(),
                    showColumns: t.columns,
                    lockedColumns: t.lockedColumns,
                  })
                );
                n.popup = n.wrapper[a]({
                  anchor: n.link,
                  open: o(n._open, n),
                  activate: o(n._activate, n),
                  deactivate: o(n._deactivate, n),
                  close: function () {
                    n.menu._closing = !0;
                    n.options.closeCallback &&
                      n.options.closeCallback(n.element);
                  },
                }).data(a);
                n.menu = n.wrapper
                  .children()
                  [d]({
                    orientation: "vertical",
                    closeOnClick: !1,
                    open: function () {
                      n._updateMenuItems();
                    },
                  })
                  .data(d);
              },
              _deactivate: function () {
                this.menu._closing = !1;
              },
              _createMobileMenu: function () {
                var r,
                  n = this,
                  t = n.options,
                  u = i.template(ot)({
                    ns: i.ns,
                    field: n.field,
                    title: n.title || n.field,
                    messages: t.messages,
                    sortable: t.sortable,
                    filterable: t.filterable,
                    columns: n._ownerColumns(),
                    showColumns: t.columns,
                    lockedColumns: t.lockedColumns,
                  });
                n.view = n.pane.append(u);
                n.view.state = { columns: {} };
                n.wrapper = n.view.element.find(".k-column-menu");
                n.menu = new st(n.wrapper.children(), {
                  pane: n.pane,
                  columnMenu: n,
                });
                n.menu.element.on("transitionend" + e, function (n) {
                  n.stopPropagation();
                });
                r =
                  n.view.wrapper && n.view.wrapper[0]
                    ? n.view.wrapper
                    : n.view.element;
                r.on("click", ".k-header-done", function (t) {
                  t.preventDefault();
                  n.menu._applyChanges();
                  n.menu._cancelChanges(!1);
                  n.close();
                });
                r.on("click", ".k-header-cancel", function (t) {
                  t.preventDefault();
                  n.menu._cancelChanges(!0);
                  n.close();
                });
                n.view.bind("showStart", function () {
                  var t = n.view || { columns: {} };
                  n.options.lockedColumns && n._updateLockedColumns();
                  t.element.find(".k-sort-asc.k-state-selected").length
                    ? (t.state.initialSort = "asc")
                    : t.element.find(".k-sort-desc.k-state-selected").length &&
                      (t.state.initialSort = "desc");
                });
              },
              _angularItems: function (t) {
                var r = this;
                r.angular(t, function () {
                  var t = r.wrapper
                      .find(".k-columns-item input[" + i.attr("field") + "]")
                      .map(function () {
                        return n(this).closest("li");
                      }),
                    u = y(r._ownerColumns(), function (n) {
                      return { column: n._originalObject };
                    });
                  return { elements: t, data: u };
                });
              },
              destroy: function () {
                var n = this;
                n._angularItems("cleanup");
                s.fn.destroy.call(n);
                n.filterMenu && n.filterMenu.destroy();
                n._refreshHandler && n.dataSource.unbind(w, n._refreshHandler);
                n.options.columns &&
                  n.owner &&
                  (n._updateColumnsMenuHandler &&
                    (n.owner.unbind("columnShow", n._updateColumnsMenuHandler),
                    n.owner.unbind("columnHide", n._updateColumnsMenuHandler)),
                  n._updateColumnsLockedStateHandler &&
                    (n.owner.unbind(
                      "columnLock",
                      n._updateColumnsLockedStateHandler
                    ),
                    n.owner.unbind(
                      "columnUnlock",
                      n._updateColumnsLockedStateHandler
                    )));
                n.menu && (n.menu.element.off(e), n.menu.destroy());
                n.wrapper.off(e);
                n.popup && n.popup.destroy();
                n.view && n.view.purge();
                n.link.off(e);
                n.owner = null;
                n.wrapper = null;
                n.element = null;
              },
              close: function () {
                this.menu.close();
                this.popup &&
                  (this.popup.close(), this.popup.element.off("keydown" + e));
              },
              _click: function (n) {
                var t,
                  i = this;
                n.preventDefault();
                n.stopPropagation();
                t = this.options;
                (t.filter && this.element.is(!t.filter)) ||
                  (this.popup || this.pane
                    ? i._updateMenuItems()
                    : this._init(),
                  this._isMobile
                    ? this.pane.navigate(
                        this.view,
                        this.options.animations.left
                      )
                    : this.popup.toggle());
              },
              _updateMenuItems: function () {
                var n = this;
                n._setMenuItemsVisibility();
                n._reorderMenuItems();
              },
              _setMenuItemsVisibility: function () {
                var n = this;
                n._eachRenderedMenuItem(function (n, t, i) {
                  t.matchesMedia === !1 ? i.hide() : i.show();
                });
              },
              _reorderMenuItems: function () {
                var n = this;
                n._eachRenderedMenuItem(function (n, t, i, r) {
                  i[0] && i.index() !== n && tt(n, i, r);
                });
              },
              _eachRenderedMenuItem: function (t) {
                for (
                  var i,
                    s,
                    l,
                    a,
                    f,
                    e = this,
                    o = u(h(e.owner.columns), function (n) {
                      var t = !0,
                        i = c(n.title || "");
                      return (
                        (n.menu !== !1 && (n.field || i.length)) || (t = !1), t
                      );
                    }).map(function (n) {
                      return {
                        field: n.field,
                        title: n.title,
                        matchesMedia: n.matchesMedia,
                      };
                    }),
                    v =
                      e._isMobile && e.view
                        ? n(e.view.element)
                            .find(".k-columns-item")
                            .children("ul")
                        : n(e.wrapper).find(".k-menu-group").first(),
                    y = function (t, i, r) {
                      return t.find(i).filter(function () {
                        return p(o[r], n(this).text());
                      });
                    },
                    p = function (n, t) {
                      return w(n, t);
                    },
                    w = function (n, t) {
                      return n.title ? t === n.title : t === n.field;
                    },
                    b = function (n) {
                      return u(o, function (t) {
                        return JSON.stringify(o[n]) == JSON.stringify(t);
                      });
                    },
                    r = 0;
                  r < o.length;
                  r++
                )
                  (f = o[r]),
                    (s = b(r)),
                    (l = n.inArray(f, s)),
                    (i = y(v, "span", r)),
                    (i = this._isMobile ? i.next() : i),
                    (a = f.field ? f.field : f.title),
                    (i = i.find(nt("field", a)).closest("li").eq(l)),
                    t(r, f, i, v);
              },
              _open: function () {
                var t = this;
                n(".k-column-menu")
                  .not(t.wrapper)
                  .each(function () {
                    n(this).data(a).close();
                  });
                t.popup.element.on("keydown" + e, function (n) {
                  n.keyCode == i.keys.ESC && t.close();
                });
                t.options.lockedColumns && t._updateLockedColumns();
              },
              _activate: function () {
                this.menu.element.focus();
                this.trigger(k, { field: this.field, container: this.wrapper });
              },
              _ownerColumns: function () {
                var n = h(this.owner.columns),
                  t = u(n, function (n) {
                    var t = !0,
                      i = c(n.title || "");
                    return (
                      (n.menu !== !1 && (n.field || i.length)) || (t = !1), t
                    );
                  });
                return y(t, function (t) {
                  return {
                    originalField: t.field,
                    field: t.field || t.title,
                    title: t.title || t.field,
                    hidden: t.hidden,
                    matchesMedia: t.matchesMedia,
                    index: rt(t, n),
                    locked: !!t.locked,
                    _originalObject: t,
                  };
                });
              },
              _sort: function () {
                var t = this;
                t.options.sortable &&
                  (t.refresh(),
                  t.menu.bind(f, function (i) {
                    var u,
                      f = n(i.item);
                    f.hasClass("k-sort-asc")
                      ? (u = l)
                      : f.hasClass("k-sort-desc") && (u = p);
                    u &&
                      (f
                        .parent()
                        .find(".k-sort-" + (u == l ? p : l))
                        .removeClass(r),
                      t._sortDataSource(f, u),
                      t._isMobile || t.close());
                  }));
              },
              _sortDataSource: function (n, i) {
                var e,
                  h,
                  u = this,
                  o = u.options.sortable,
                  s = null === o.compare ? t : o.compare,
                  c = u.dataSource,
                  f = c.sort() || [],
                  l = n.hasClass(r) && o && o.allowUnsort !== !1;
                if (
                  ((i = l ? t : i),
                  !u.trigger("sort", {
                    sort: { field: u.field, dir: i, compare: s },
                  }))
                ) {
                  if (
                    (l ? n.removeClass(r) : n.addClass(r),
                    "multiple" === o.mode)
                  ) {
                    for (e = 0, h = f.length; e < h; e++)
                      if (f[e].field === u.field) {
                        f.splice(e, 1);
                        break;
                      }
                    f.push({ field: u.field, dir: i, compare: s });
                  } else f = [{ field: u.field, dir: i, compare: s }];
                  c.sort(f);
                }
              },
              _columns: function () {
                var t = this;
                t.options.columns &&
                  (t._updateColumnsMenu(),
                  (t._updateColumnsMenuHandler = o(t._updateColumnsMenu, t)),
                  t.owner.bind(
                    ["columnHide", "columnShow"],
                    t._updateColumnsMenuHandler
                  ),
                  (t._updateColumnsLockedStateHandler = o(
                    t._updateColumnsLockedState,
                    t
                  )),
                  t.owner.bind(
                    ["columnUnlock", "columnLock"],
                    t._updateColumnsLockedStateHandler
                  ),
                  t.menu.bind(f, function (i) {
                    var e,
                      r,
                      f = n(i.item),
                      o = u(h(t.owner.columns), function (n) {
                        var t = !0,
                          i = c(n.title || "");
                        return (
                          (n.menu !== !1 && (n.field || i.length)) || (t = !1),
                          t
                        );
                      });
                    t._isMobile && i.preventDefault();
                    f.parent().closest("li.k-columns-item")[0] &&
                      ((e = f.find(":checkbox")),
                      e.attr("disabled") ||
                        ((r = o[f.index()]),
                        r.hidden === !0
                          ? t.owner.showColumn(r)
                          : t.owner.hideColumn(r)));
                  }));
              },
              _updateColumnsMenu: function () {
                var r,
                  l,
                  t,
                  f,
                  e,
                  o,
                  n,
                  y = i.attr("field"),
                  p = i.attr("locked"),
                  a = u(h(this.owner.columns), function (n) {
                    var t = !0,
                      i = c(n.title || "");
                    return (
                      (n.menu !== !1 && (n.field || i.length)) || (t = !1), t
                    );
                  }),
                  w = u(this._ownerColumns(), function (n) {
                    return !n.hidden && n.matchesMedia !== !1;
                  }),
                  v = u(w, function (n) {
                    return n.originalField;
                  }),
                  b = u(v, function (n) {
                    return n.locked === !0;
                  }).length,
                  k = u(v, function (n) {
                    return n.locked !== !0;
                  }).length,
                  s = u(this.owner.columns, function (n) {
                    return n.menu === !1;
                  }),
                  d = u(s, function (n) {
                    return n.hidden;
                  });
                for (
                  this.wrapper
                    .find("[role='menuitemcheckbox']")
                    .attr("aria-checked", !1),
                    o = this.wrapper
                      .find(".k-columns-item input[" + y + "]")
                      .prop("disabled", !1)
                      .prop("checked", !1),
                    r = 0,
                    l = o.length;
                  r < l;
                  r++
                )
                  (t = o.eq(r)),
                    (e = "true" === t.attr(p)),
                    (f = !1),
                    (n = t.data("kendoSwitch")),
                    (f = !a[r].hidden && a[r].matchesMedia !== !1),
                    t.prop("checked", f),
                    n && (n.enable(!0), n.check(f)),
                    t
                      .closest("[role='menuitemcheckbox']")
                      .attr("aria-checked", f),
                    f &&
                      (1 == b &&
                        e &&
                        (t.prop("disabled", !0), n && n.enable(!1)),
                      (0 !== s.length && s.length !== d.length) ||
                        1 != k ||
                        e ||
                        (t.prop("disabled", !0), n && n.enable(!1)));
              },
              _updateColumnsLockedState: function () {
                for (
                  var t,
                    r,
                    e = i.attr("field"),
                    o = i.attr("locked"),
                    s = g(this._ownerColumns(), "field"),
                    f = this.wrapper.find(
                      ".k-columns-item input[type=checkbox]"
                    ),
                    n = 0,
                    u = f.length;
                  n < u;
                  n++
                )
                  (t = f.eq(n)), (r = s[t.attr(e)]), r && t.attr(o, r.locked);
                this._updateColumnsMenu();
              },
              _filter: function () {
                var t = this,
                  r = ut,
                  i = t.options;
                i.filterable !== !1 &&
                  (i.filterable.multi &&
                    ((r = "kendoFilterMultiCheck"),
                    i.filterable.dataSource &&
                      ((i.filterable.checkSource = i.filterable.dataSource),
                      delete i.filterable.dataSource)),
                  (t.filterMenu = t.wrapper
                    .find(".k-filterable")
                    [r](
                      it(
                        !0,
                        {},
                        {
                          appendToElement: !0,
                          dataSource: i.dataSource,
                          values: i.values,
                          field: t.field,
                          title: t.title,
                          change: function (n) {
                            t.trigger("filtering", {
                              filter: n.filter,
                              field: n.field,
                            }) && n.preventDefault();
                          },
                        },
                        i.filterable
                      )
                    )
                    .data(r)),
                  t._isMobile &&
                    t.menu.bind(f, function (i) {
                      var r = n(i.item);
                      r.hasClass("k-filter-item") &&
                        t.pane.navigate(
                          t.filterMenu.view,
                          t.options.animations.left
                        );
                    }));
              },
              _lockColumns: function () {
                var t = this;
                t.menu.bind(f, function (i) {
                  var r = n(i.item);
                  r.hasClass("k-lock")
                    ? (t.owner.lockColumn(t.field), t._isMobile || t.close())
                    : r.hasClass("k-unlock") &&
                      (t.owner.unlockColumn(t.field), t._isMobile || t.close());
                });
              },
              _updateLockedColumns: function () {
                var n,
                  t,
                  i,
                  r,
                  f = this.field,
                  e = this.owner.columns,
                  o = u(e, function (n) {
                    return n.field == f || n.title == f;
                  })[0];
                o &&
                  ((n = o.locked === !0),
                  (t = u(e, function (t) {
                    return !t.hidden && ((t.locked && n) || (!t.locked && !n));
                  }).length),
                  (i = this.wrapper
                    .find(".k-lock")
                    .removeClass("k-state-disabled")),
                  (r = this.wrapper
                    .find(".k-unlock")
                    .removeClass("k-state-disabled")),
                  (n || 1 == t) && i.addClass("k-state-disabled"),
                  (n && 1 != t) || r.addClass("k-state-disabled"),
                  this._updateColumnsLockedState());
              },
              refresh: function () {
                var i,
                  t,
                  u,
                  n = this,
                  f = n.options.dataSource.sort() || [],
                  e = n.field;
                for (
                  n.wrapper.find(".k-sort-asc, .k-sort-desc").removeClass(r),
                    t = 0,
                    u = f.length;
                  t < u;
                  t++
                )
                  (i = f[t]),
                    e == i.field &&
                      n.wrapper.find(".k-sort-" + i.dir).addClass(r);
                n.link[
                  n._filterExist(n.dataSource.filter())
                    ? "addClass"
                    : "removeClass"
                ]("k-state-active");
              },
              _filterExist: function (n) {
                var t,
                  i,
                  u,
                  r = !1;
                if (n) {
                  for (n = n.filters, i = 0, u = n.length; i < u; i++)
                    (t = n[i]),
                      t.field == this.field
                        ? (r = !0)
                        : t.filters && (r = r || this._filterExist(t));
                  return r;
                }
              },
            }),
            et =
              '<ul id="#=uid#">#if(sortable){#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span>${messages.sortDescending}</span></li>#if(showColumns || filterable){#<li class="k-separator" role="presentation"></li>#}##}##if(showColumns){#<li class="k-item k-columns-item" aria-haspopup="true"><span class="k-link"><span class="k-icon k-i-columns"></span>${messages.columns}</span><ul>#for (var idx = 0; idx < columns.length; idx++) {#<li role="menuitemcheckbox" aria-checked="false" #=columns[idx].matchesMedia === false ? "style=\'display:none;\'" : ""#><input type="checkbox" title="#=columns[idx].title#" data-#=ns#field="#=columns[idx].field.replace(/"/g,"&\\#34;")#" data-#=ns#index="#=columns[idx].index#" data-#=ns#locked="#=columns[idx].locked#"/>#=columns[idx].title#</li>#}#</ul></li>#if(filterable || lockedColumns){#<li class="k-separator" role="presentation"></li>#}##}##if(filterable){#<li class="k-item k-filter-item" aria-haspopup="true"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.filter}</span><ul><li><div class="k-filterable"></div></li></ul></li>#if(lockedColumns){#<li class="k-separator" role="presentation"></li>#}##}##if(lockedColumns){#<li class="k-item k-lock"><span class="k-link"><span class="k-icon k-i-lock"></span>${messages.lock}</span></li><li class="k-item k-unlock"><span class="k-link"><span class="k-icon k-i-unlock"></span>${messages.unlock}</span></li>#}#</ul>',
            ot =
              '<div data-#=ns#role="view" class="k-grid-column-menu"><div data-#=ns#role="header" class="k-header"><a href="\\#" class="k-header-cancel k-link" title="#=messages.cancel#" aria-label="#=messages.cancel#"><span class="k-icon k-i-arrow-chevron-left"></span></a>${messages.settings}<a href="\\#" class="k-header-done k-link" title="#=messages.done#" aria-label="#=messages.done#"><span class="k-icon k-i-check"></span></a></div><div class="k-column-menu k-mobile-list"><ul><li><span class="k-list-title">#=messages.column#: ${title}</span><ul>#if(sortable){#<li id="#=kendo.guid()#" class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span><span class="k-item-title">${messages.sortAscending}</span></span></li><li id="#=kendo.guid()#" class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span><span class="k-item-title">${messages.sortDescending}</span></span></li>#}##if(lockedColumns){#<li id="#=kendo.guid()#" class="k-item k-lock"><span class="k-link"><span class="k-icon k-i-lock"></span><span class="k-item-title">${messages.lock}</span></span></li><li id="#=kendo.guid()#" class="k-item k-unlock"><span class="k-link"><span class="k-icon k-i-unlock"></span><span class="k-item-title">${messages.unlock}</span></span></li>#}##if(filterable){#<li id="#=kendo.guid()#" class="k-item k-filter-item"><span class="k-link k-filterable"><span class="k-icon k-i-filter"></span><span class="k-item-title">${messages.filter}</span></span></li>#}#</ul></li>#if(showColumns){#<li class="k-columns-item"><span class="k-list-title">${messages.columnVisibility}</span><ul>#for (var idx = 0; idx < columns.length; idx++) {#<li id="#=kendo.guid()#" class="k-item"><span class="k-item-title">#=columns[idx].title#</span><input type="checkbox" title="#=columns[idx].title#"  data-#=ns#field="#=columns[idx].field.replace(/"/g,"&\\#34;")#" data-#=ns#index="#=columns[idx].index#" data-#=ns#locked="#=columns[idx].locked#"/></li>#}#</ul></li>#}#<li class="k-item k-clear-wrap"><span class="k-label k-clear" title="#=messages.clear#" aria-label="#=messages.clear#">#=messages.clear#</span></li></ul></div></div>',
            st = s.extend({
              init: function (n, t) {
                var i = this;
                s.fn.init.call(i, n, t);
                i._createCheckBoxes();
                i.element.on(
                  "click" + e,
                  "li.k-item:not(.k-separator):not(.k-state-disabled):not(:has(.k-switch))",
                  "_click"
                );
              },
              events: [f],
              _click: function (i) {
                var r = this;
                return (
                  n(i.target).is("[type=checkbox]") || i.preventDefault(),
                  n(i.target).hasClass("k-clear")
                    ? (r._cancelChanges(!0), t)
                    : n(i.target).hasClass("k-filterable")
                    ? (r._cancelChanges(!0),
                      r.trigger(f, { item: i.currentTarget }),
                      t)
                    : (r._updateSelectedItems(i.currentTarget), t)
                );
              },
              _updateSelectedItems: function (t) {
                var e,
                  f,
                  o,
                  s = this,
                  i = n(t),
                  u = s.options.columnMenu.view.state || { columns: {} },
                  h = i.prop("id");
                i.hasClass("k-filter-item") ||
                  ((u[h] = !u[h]),
                  (i.hasClass("k-sort-asc") || i.hasClass("k-sort-desc")) &&
                    (i.hasClass("k-sort-asc")
                      ? ((e = "asc"), (f = s.element.find(".k-sort-desc")))
                      : ((e = "desc"), (f = s.element.find(".k-sort-asc"))),
                    (o = f.prop("id")),
                    e !== u.initialSort ||
                      i.hasClass("k-state-selected") ||
                      (u[h] = !1),
                    u[o] && (u[o] = !1),
                    f.removeClass(r)),
                  i.hasClass(r) ? i.removeClass(r) : i.addClass(r));
              },
              _cancelChanges: function (n) {
                var t,
                  i,
                  h,
                  u,
                  e = this,
                  o = e.options.columnMenu,
                  c = o.view,
                  l = c.state || { columns: {} },
                  s = l.columns;
                if ((e.element.find("." + r).removeClass(r), o.refresh(), n)) {
                  t = [];
                  for (i in s)
                    s.hasOwnProperty(i) &&
                      s[i] === !0 &&
                      ((h = c.element.find("#" + i)), t.push(h[0]));
                  for (u = t.length - 1; u >= 0; u--)
                    e.trigger(f, { item: t[u] });
                  o.options.lockedColumns && o._updateLockedColumns();
                }
                e.options.columnMenu.view.state = { columns: {} };
              },
              _applyChanges: function () {
                var n,
                  t,
                  u = this,
                  e = u.options.columnMenu.view,
                  i = e.state || { columns: {} };
                for (n in i)
                  i.hasOwnProperty(n) &&
                    "initialSort" !== n &&
                    "columns" !== n &&
                    i[n] === !0 &&
                    ((t = e.element.find("#" + n)),
                    t.hasClass(r) ? t.removeClass(r) : t.addClass(r),
                    u.trigger(f, { item: t[0] }));
              },
              _createCheckBoxes: function () {
                var n = this;
                n.element
                  .find(".k-columns-item")
                  .find("[type='checkbox']")
                  .kendoSwitch({
                    messages: { checked: "", unchecked: "" },
                    change: function (t) {
                      var i = t.sender.element.closest(".k-item"),
                        r = n.options.columnMenu.view.state || { columns: {} },
                        u = i.prop("id");
                      r.columns[u] = !r.columns[u];
                      n.trigger(f, { item: i });
                    },
                  });
              },
              _destroyCheckBoxes: function () {
                for (
                  var t,
                    r = this,
                    i = r.element
                      .find(".k-columns-item")
                      .find("[type='checkbox']"),
                    n = 0;
                  n < i.length;
                  n++
                )
                  (t = i.eq(n).data("kendoSwitch")), t && t.destroy();
              },
              close: function () {
                this.options.pane.navigate("");
              },
              destroy: function () {
                var n = this;
                s.fn.destroy.call(n);
                n.element.off(e);
                n._destroyCheckBoxes();
              },
            });
          v.plugin(ft);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.columnsorter.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function y(r) {
            var f,
              e = r.find("tr:not(.k-filter-row)"),
              o = function () {
                var t = n(this);
                return (
                  !t.hasClass("k-group-cell") && !t.hasClass("k-hierarchy-cell")
                );
              },
              u = n();
            return (
              e.length > 1 &&
                (u = e
                  .find("th:visible")
                  .filter(o)
                  .filter(function () {
                    return this.rowSpan > 1;
                  })),
              (u = u.add(e.last().find("th:visible").filter(o))),
              (f = i.attr("index")),
              u.sort(function (i, r) {
                var u, e;
                return (
                  (i = n(i)),
                  (r = n(r)),
                  (u = i.attr(f)),
                  (e = r.attr(f)),
                  u === t && (u = n(i).index()),
                  e === t && (e = n(r).index()),
                  (u = parseInt(u, 10)),
                  (e = parseInt(e, 10)),
                  u > e ? 1 : u < e ? -1 : 0
                );
              }),
              u
            );
          }
          var i = window.kendo,
            s = i.ui,
            f = s.Widget,
            u = "dir",
            r = "asc",
            h = "single",
            c = "field",
            e = "desc",
            l = ".kendoColumnSorter",
            a = ".k-link",
            o = "aria-sort",
            v = n.proxy,
            p = f.extend({
              init: function (n, t) {
                var u,
                  i = this;
                f.fn.init.call(i, n, t);
                i._refreshHandler = v(i.refresh, i);
                i.dataSource = i.options.dataSource.bind(
                  "change",
                  i._refreshHandler
                );
                i.directions =
                  i.options.initialDirection === r ? [r, e] : [e, r];
                u = i.element.find(a);
                u[0] ||
                  (u = i.element
                    .wrapInner('<a class="k-link" href="#"/>')
                    .find(a));
                i.link = u;
                i.element.on("click" + l, v(i._click, i));
              },
              options: {
                name: "ColumnSorter",
                mode: h,
                allowUnsort: !0,
                compare: null,
                filter: "",
                initialDirection: r,
                showIndexes: !1,
              },
              events: ["change"],
              destroy: function () {
                var n = this;
                f.fn.destroy.call(n);
                n.element.off(l);
                n.dataSource.unbind("change", n._refreshHandler);
                n._refreshHandler = n.element = n.link = n.dataSource = null;
              },
              refresh: function () {
                var l,
                  k,
                  v,
                  a,
                  p,
                  w,
                  d,
                  s,
                  h = this,
                  b = h.dataSource.sort() || [],
                  f = h.element,
                  g = f.attr(i.attr(c));
                for (
                  f.removeAttr(i.attr(u)), f.removeAttr(o), l = 0, k = b.length;
                  l < k;
                  l++
                )
                  (v = b[l]),
                    g == v.field && (f.attr(i.attr(u), v.dir), (w = l + 1));
                a = f.attr(i.attr(u));
                f.is("th") &&
                  ((s = f.closest("table")),
                  s.parent().hasClass("k-grid-header-wrap")
                    ? (s = s.closest(".k-grid").find(".k-grid-content > table"))
                    : s.parent().hasClass("k-grid-header-locked")
                    ? (s = s
                        .closest(".k-grid")
                        .find(".k-grid-content-locked > table"))
                    : s.parent().hasClass("k-grid") || (s = null),
                  s &&
                    (f.attr(i.attr("index"))
                      ? ((d = y(f.closest(".k-grid-header"))), (p = d.index(f)))
                      : (p = f.parent().children(":visible").index(f)),
                    f.toggleClass("k-sorted", a !== t),
                    s
                      .children("colgroup")
                      .children(":not(.k-group-col):not(.k-hierarchy-col)")
                      .eq(p)
                      .toggleClass("k-sorted", a !== t)));
                f.find(
                  ".k-i-sort-asc-sm,.k-i-sort-desc-sm,.k-sort-order"
                ).remove();
                a === r
                  ? (n('<span class="k-icon k-i-sort-asc-sm" />').appendTo(
                      h.link
                    ),
                    f.attr(o, "ascending"))
                  : a === e &&
                    (n('<span class="k-icon k-i-sort-desc-sm" />').appendTo(
                      h.link
                    ),
                    f.attr(o, "descending"));
                h.options.showIndexes &&
                  b.length > 1 &&
                  w &&
                  n('<span class="k-sort-order" />').html(w).appendTo(h.link);
              },
              _toggleSortDirection: function (n) {
                var i = this.directions;
                return n === i[i.length - 1] && this.options.allowUnsort
                  ? t
                  : i[0] === n
                  ? i[1]
                  : i[0];
              },
              _click: function (n) {
                var e,
                  y,
                  r = this,
                  s = r.element,
                  l = s.attr(i.attr(c)),
                  o = s.attr(i.attr(u)),
                  a = r.options,
                  v = null === r.options.compare ? t : r.options.compare,
                  f = r.dataSource.sort() || [];
                if (
                  (n.preventDefault(),
                  (!a.filter || s.is(a.filter)) &&
                    ((o = this._toggleSortDirection(o)),
                    !this.trigger("change", {
                      sort: { field: l, dir: o, compare: v },
                    })))
                ) {
                  if (a.mode === h) f = [{ field: l, dir: o, compare: v }];
                  else if ("multiple" === a.mode) {
                    for (e = 0, y = f.length; e < y; e++)
                      if (f[e].field === l) {
                        f.splice(e, 1);
                        break;
                      }
                    f.push({ field: l, dir: o, compare: v });
                  }
                  this.dataSource.options.endless &&
                    ((this.dataSource.options.endless = null),
                    (s.closest(".k-grid").getKendoGrid()._endlessPageSize =
                      r.dataSource.options.pageSize),
                    this.dataSource.pageSize(r.dataSource.options.pageSize));
                  this.dataSource.sort(f);
                }
              },
            });
          s.plugin(p);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.editable.min",
      [
        "kendo.datepicker.min",
        "kendo.numerictextbox.min",
        "kendo.validator.min",
        "kendo.binder.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function s(t) {
            return (t = null != t ? t : ""), t.type || n.type(t) || "string";
          }
          function k(t) {
            t.find(
              ":input:not(:button, .k-combobox .k-input, [" +
                i.attr("role") +
                "=listbox], [" +
                i.attr("role") +
                "=upload], [" +
                i.attr("skip") +
                "], [type=file])"
            ).each(function () {
              var r = i.attr("bind"),
                t = this.getAttribute(r) || "",
                u =
                  "checkbox" === this.type || "radio" === this.type
                    ? "checked:"
                    : "value:",
                f = this.name;
              t.indexOf(u) === -1 &&
                f &&
                ((t += (t.length ? "," : "") + u + f), n(this).attr(r, t));
            });
          }
          function r(n) {
            var t,
              r,
              e,
              c,
              y,
              o = (n.model.fields || n.model)[n.field],
              h = s(o),
              p = o ? o.validation : {},
              b = i.attr("type"),
              k = i.attr("bind"),
              u = { name: n.field, title: n.title ? n.title : n.field };
            for (t in p)
              (r = p[t]),
                a(t, w) >= 0
                  ? (u[b] = t)
                  : l(r) ||
                    ((e = i.getCulture()),
                    "number" == typeof r && e.name.length
                      ? ((c = e.numberFormat),
                        (y = ("" + r).replace(v, c[v])),
                        (u[t] = y))
                      : (u[t] = f(r) ? r.value || t : r)),
                (u[i.attr(t + "-msg")] = r.message),
                (u.autocomplete = it);
            return (
              a(h, w) >= 0 && (u[b] = h),
              (u[k] = ("boolean" === h ? "checked:" : "value:") + n.field),
              u
            );
          }
          function u(n, t) {
            var i = n.attr("id");
            return i && ((t.id = i), n.removeAttr("id")), t;
          }
          function d(n) {
            var i, u, t, f, e, r;
            if (n && n.length)
              for (r = [], i = 0, u = n.length; i < u; i++)
                (t = n[i]),
                  (e = t.text || t.value || t),
                  (f = null == t.value ? t.text || t : t.value),
                  (r[i] = { text: e, value: f });
            return r;
          }
          function h(n, t) {
            var r,
              i,
              u = n ? n.validation || {} : {};
            for (r in u)
              (i = u[r]), f(i) && i.value && (i = i.value), l(i) && (t[r] = i);
          }
          var i = window.kendo,
            c = i.ui,
            e = c.Widget,
            g = n.extend,
            nt = i.support.browser.msie && i.support.browser.version < 9,
            l = i.isFunction,
            f = n.isPlainObject,
            a = n.inArray,
            v = ".",
            tt = i.support,
            it = tt.browser.chrome ? "disabled" : "off",
            y =
              /("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,
            p = "change",
            o = "equalSet",
            w = ["url", "email", "number", "date", "boolean"],
            rt = {
              number: function (t, u) {
                var f = r(u);
                n('<input type="text"/>')
                  .attr(f)
                  .appendTo(t)
                  .kendoNumericTextBox({ format: u.format });
                n(
                  "<span " +
                    i.attr("for") +
                    '="' +
                    u.field +
                    '" class="k-invalid-msg"/>'
                )
                  .hide()
                  .appendTo(t);
              },
              date: function (t, u) {
                var e = r(u),
                  f = u.format;
                f && (f = i._extractFormat(f));
                e[i.attr("format")] = f;
                n('<input type="text"/>')
                  .attr(e)
                  .appendTo(t)
                  .kendoDatePicker({ format: u.format });
                n(
                  "<span " +
                    i.attr("for") +
                    '="' +
                    u.field +
                    '" class="k-invalid-msg"/>'
                )
                  .hide()
                  .appendTo(t);
              },
              string: function (t, i) {
                var u = r(i);
                n('<input type="text" class="k-textbox"/>').attr(u).appendTo(t);
              },
              boolean: function (t, i) {
                var u = r(i);
                n('<input type="checkbox" />').attr(u).appendTo(t);
              },
              values: function (t, u) {
                var e = r(u),
                  f = i.stringify(d(u.values));
                n(
                  "<select " +
                    i.attr("text-field") +
                    '="text"' +
                    i.attr("value-field") +
                    '="value"' +
                    i.attr("source") +
                    "='" +
                    (f ? f.replace(/\'/g, "&apos;") : f) +
                    "'" +
                    i.attr("role") +
                    '="dropdownlist"/>'
                )
                  .attr(e)
                  .appendTo(t);
                n(
                  "<span " +
                    i.attr("for") +
                    '="' +
                    u.field +
                    '" class="k-invalid-msg"/>'
                )
                  .hide()
                  .appendTo(t);
              },
            },
            b = {
              number: function (t, i) {
                var f = r(i);
                f = u(t, f);
                n('<input type="number"/>').attr(f).appendTo(t);
              },
              date: function (t, i) {
                var f = r(i);
                f = u(t, f);
                n('<input type="date"/>').attr(f).appendTo(t);
              },
              string: function (t, i) {
                var f = r(i);
                f = u(t, f);
                n('<input type="text" />').attr(f).appendTo(t);
              },
              boolean: function (t, i) {
                var f = r(i);
                f = u(t, f);
                n('<input type="checkbox" />').attr(f).appendTo(t);
              },
              values: function (t, i) {
                var f,
                  e = r(i),
                  o = i.values,
                  s = n("<select />");
                e = u(t, e);
                for (f in o)
                  n(
                    '<option value="' +
                      o[f].value +
                      '">' +
                      o[f].text +
                      "</option>"
                  ).appendTo(s);
                s.attr(e).appendTo(t);
              },
            },
            ut = e.extend({
              init: function (t, i) {
                var r = this;
                i.target &&
                  ((i.$angular = i.target.options.$angular),
                  i.target.pane && (r._isMobile = !0));
                e.fn.init.call(r, t, i);
                r._validateProxy = n.proxy(r._validate, r);
                r.refresh();
              },
              events: [p],
              options: {
                name: "Editable",
                editors: rt,
                mobileEditors: b,
                clearContainer: !0,
                errorTemplate:
                  '<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-i-warning"> </span>#=message#<div class="k-callout k-callout-n"></div></div>',
                skipFocus: !1,
              },
              editor: function (n, t) {
                var r = this,
                  h = r._isMobile ? b : r.options.editors,
                  e = f(n),
                  c = e ? n.field : n,
                  a = r.options.model || {},
                  v = e && n.values,
                  p = v ? "values" : s(t),
                  l = e && n.editor,
                  u = l ? n.editor : h[p],
                  o = r.element.find(
                    "[" +
                      i.attr("container-for") +
                      "=" +
                      c.replace(y, "\\$1") +
                      "]"
                  );
                u = u ? u : h.string;
                l &&
                  "string" == typeof n.editor &&
                  (u = function (t) {
                    t.append(n.editor);
                  });
                o = o.length ? o : r.element;
                u(o, g(!0, {}, e ? n : { field: c }, { model: a }));
              },
              _validate: function (t) {
                var u,
                  r = this,
                  s = t.value,
                  h = r._validationEventInProgress,
                  f = {},
                  e = i.attr("bind"),
                  o = t.field.replace(y, "\\$1"),
                  c = RegExp("(value|checked)\\s*:\\s*" + o + "\\s*(,|$)");
                f[t.field] = t.value;
                u = n(":input[" + e + '*="' + o + '"]', r.element)
                  .filter("[" + i.attr("validate") + "!='false']")
                  .filter(function () {
                    return c.test(n(this).attr(e));
                  });
                u.length > 1 &&
                  (u = u.filter(function () {
                    var t = n(this);
                    return !t.is(":radio") || t.val() == s;
                  }));
                try {
                  r._validationEventInProgress = !0;
                  (r.validatable.validateInput(u) &&
                    (h || !r.trigger(p, { values: f }))) ||
                    t.preventDefault();
                } finally {
                  r._validationEventInProgress = !1;
                }
              },
              end: function () {
                return this.validatable.validate();
              },
              destroy: function () {
                var n = this;
                n.angular("cleanup", function () {
                  return { elements: n.element };
                });
                e.fn.destroy.call(n);
                n.options.model.unbind("set", n._validateProxy);
                n.options.model.unbind(o, n._validateProxy);
                i.unbind(n.element);
                n.validatable && n.validatable.destroy();
                i.destroy(n.element);
                n.element.removeData("kendoValidator");
                n.element.is("[" + i.attr("role") + "=editable]") &&
                  n.element.removeAttr(i.attr("role"));
              },
              refresh: function () {
                var l,
                  v,
                  e,
                  b,
                  a,
                  y,
                  p,
                  d,
                  r = this,
                  s = r.options.fields || [],
                  u = r.options.clearContainer ? r.element.empty() : r.element,
                  c = r.options.model || {},
                  w = {};
                for (n.isArray(s) || (s = [s]), l = 0, v = s.length; l < v; l++)
                  (e = s[l]),
                    (b = f(e)),
                    (a = b ? e.field : e),
                    (y = (c.fields || c)[a]),
                    h(y, w),
                    r.editor(e, y);
                if (
                  (r.options.target &&
                    r.angular("compile", function () {
                      return {
                        elements: u,
                        data: u.map(function () {
                          return { dataItem: c };
                        }),
                      };
                    }),
                  !v)
                ) {
                  p = c.fields || c;
                  for (a in p) h(p[a], w);
                }
                k(u);
                r.validatable && r.validatable.destroy();
                i.bind(u, r.options.model);
                r.options.model.unbind("set", r._validateProxy);
                r.options.model.bind("set", r._validateProxy);
                r.options.model.unbind(o, r._validateProxy);
                r.options.model.bind(o, r._validateProxy);
                r.validatable = new i.ui.Validator(u, {
                  validateOnBlur: !1,
                  errorTemplate: r.options.errorTemplate || t,
                  rules: w,
                });
                r.options.skipFocus ||
                  ((d = u.find(":kendoFocusable").eq(0).focus()),
                  nt && d.focus());
              },
            });
          c.plugin(ut);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.window.min", ["kendo.draganddrop.min", "kendo.popup.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function it(n) {
            return t !== n;
          }
          function u(n, t) {
            return parseInt(n.css(t), 10) || 0;
          }
          function e(n, t, i) {
            return n && isNaN(n) && ("" + n).indexOf("px") < 0
              ? n
              : Math.max(
                  Math.min(parseInt(n, 10), i === 1 / 0 ? i : parseInt(i, 10)),
                  t === -(1 / 0) ? t : parseInt(t, 10)
                );
          }
          function pi() {
            return !this.type || this.type.toLowerCase().indexOf("script") >= 0;
          }
          function rt(t) {
            for (
              var u,
                f,
                r = { top: t.offsetTop, left: t.offsetLeft },
                i = t.offsetParent;
              i;

            )
              (r.top += i.offsetTop),
                (r.left += i.offsetLeft),
                (u = n(i).css("overflowX")),
                (f = n(i).css("overflowY")),
                ("auto" !== f && "scroll" !== f) || (r.top -= i.scrollTop),
                ("auto" !== u && "scroll" !== u) || (r.left -= i.scrollLeft),
                (i = i.offsetParent);
            return r;
          }
          function yt(n) {
            var t = this;
            t.owner = n;
            t._preventDragging = !1;
            t._draggable = new wt(n.wrapper, {
              filter: ">" + v,
              group: n.wrapper.id + "-resizing",
              dragstart: r(t.dragstart, t),
              drag: r(t.drag, t),
              dragend: r(t.dragend, t),
            });
            t._draggable.userEvents.bind("press", r(t.addOverlay, t));
            t._draggable.userEvents.bind("release", r(t.removeOverlay, t));
          }
          function pt(n, t) {
            var i = this;
            i.owner = n;
            i._preventDragging = !1;
            i._draggable = new wt(n.wrapper, {
              filter: t,
              group: n.wrapper.id + "-moving",
              dragstart: r(i.dragstart, i),
              drag: r(i.drag, i),
              dragend: r(i.dragend, i),
              dragcancel: r(i.dragcancel, i),
            });
            i._draggable.userEvents.stopPropagation = !1;
          }
          var i = window.kendo,
            ut = i.ui.Widget,
            wi = i.ui.Popup.TabKeyTrap,
            wt = i.ui.Draggable,
            bt = n.isPlainObject,
            bi = i._activeElement,
            nt = i._outerWidth,
            st = i._outerHeight,
            r = n.proxy,
            s = n.extend,
            ki = n.each,
            a = i.template,
            ft = "body",
            f = ".kendoWindow",
            ht = ".kendoWindowModal",
            w = ".k-window",
            ct = ".k-window-title",
            o = ct + "bar",
            h = ".k-window-content",
            di = ".k-dialog-content",
            v = ".k-resize-handle",
            b = ".k-overlay",
            k = "k-content-frame",
            kt = "k-i-loading",
            dt = "k-state-hover",
            gt = "k-state-focused",
            ni = "k-window-maximized",
            d = ":visible",
            y = "hidden",
            g = "cursor",
            lt = "open",
            at = "activate",
            ti = "deactivate",
            ii = "close",
            et = "refresh",
            ri = "resizeStart",
            ui = "resizeEnd",
            fi = "dragstart",
            ei = "dragend",
            oi = "error",
            l = "overflow",
            ot = "original-overflow-rule",
            tt = "zIndex",
            si =
              ".k-window-actions .k-i-window-minimize,.k-window-actions .k-i-window-maximize",
            hi = ".k-i-pin",
            ci = ".k-i-unpin",
            li = hi + "," + ci,
            p = ".k-window-titlebar .k-window-action",
            ai = ".k-window-titlebar .k-i-refresh",
            vi = "WindowEventsHandled",
            yi = /^0[a-z]*$/i,
            gi = i.isLocalUrl,
            vt = {
              small: "k-window-sm",
              medium: "k-window-md",
              large: "k-window-lg",
            },
            nr = ut.extend({
              init: function (u, e) {
                var c,
                  tt,
                  rt,
                  l,
                  a,
                  v,
                  ft,
                  b,
                  g,
                  s = this,
                  nt = {},
                  et = !1,
                  ot = e && e.actions && !e.actions.length;
                ut.fn.init.call(s, u, e);
                e = s.options;
                l = e.position;
                u = s.element;
                a = e.content;
                b = n(window);
                ot && (e.actions = []);
                s.appendTo = n(e.appendTo);
                s.containment = e.draggable.containment
                  ? n(e.draggable.containment).first()
                  : null;
                a && !bt(a) && (a = e.content = { url: a });
                u.find("script").filter(pi).remove();
                u.parent().is(s.appendTo) ||
                  s.containment ||
                  (l.top !== t && l.left !== t) ||
                  (u.is(d)
                    ? ((nt = u.offset()), (et = !0))
                    : ((tt = u.css("visibility")),
                      (rt = u.css("display")),
                      u.css({ visibility: y, display: "" }),
                      (nt = u.offset()),
                      u.css({ visibility: tt, display: rt })),
                  l.top === t && (l.top = nt.top),
                  l.left === t && (l.left = nt.left));
                (it(e.visible) && null !== e.visible) || (e.visible = u.is(d));
                c = s.wrapper = u.closest(w);
                (u.is(".k-content") && c[0]) ||
                  (u.addClass("k-window-content k-content"),
                  s._createWindow(u, e),
                  (c = s.wrapper = u.closest(w)),
                  s.title(s.options.title),
                  s._dimensions());
                s.minTop = s.minLeft = -(1 / 0);
                s.maxTop = s.maxLeft = 1 / 0;
                s._position();
                a && s.refresh(a);
                e.visible && s.toFront();
                v = c.children(h);
                s._tabindex(v);
                e.visible &&
                  e.modal &&
                  s._overlay(c.is(d)).css({ opacity: 0.5 });
                c.on("mouseenter" + f, p, r(s._buttonEnter, s))
                  .on("mouseleave" + f, p, r(s._buttonLeave, s))
                  .on("click" + f, "> " + p, r(s._windowActionHandler, s))
                  .on("keydown" + f, r(s._keydown, s))
                  .on("focus" + f, r(s._focus, s))
                  .on("blur" + f, r(s._blur, s));
                v.on("keydown" + f, r(s._keydown, s))
                  .on("focus" + f, r(s._focus, s))
                  .on("blur" + f, r(s._blur, s));
                ft = v.find("." + k)[0];
                ft &&
                  !b.data(vi) &&
                  (b.on("blur" + f, function () {
                    var t,
                      r = n(document.activeElement).parent(h);
                    r.length && ((t = i.widgetInstance(r)), t._focus());
                  }),
                  b.on("focus" + f, function () {
                    n(h)
                      .not(di)
                      .each(function (t, r) {
                        i.widgetInstance(n(r))._blur();
                      });
                  }),
                  b.data(vi, !0));
                this._resizable();
                this._draggable();
                e.pinned && this.wrapper.is(":visible") && s.pin();
                g = u.attr("id");
                g &&
                  ((g += "_wnd_title"),
                  c.children(o).children(ct).attr("id", g),
                  v.attr({ role: "dialog", "aria-labelledby": g }));
                c.add(c.children(".k-resize-handle," + o)).on(
                  "mousedown" + f,
                  r(s.toFront, s)
                );
                s.touchScroller = i.touchScroller(u);
                s._resizeHandler = r(s._onDocumentResize, s);
                s._marker = i.guid().substring(0, 8);
                n(window).on("resize" + f + s._marker, s._resizeHandler);
                e.visible && (s.trigger(lt), s.trigger(at));
                i.notify(s);
                this.options.modal &&
                  ((this._tabKeyTrap = new wi(c)),
                  this._tabKeyTrap.trap(),
                  (this._tabKeyTrap.shouldTrap = function () {
                    return v.data("isFront");
                  }));
              },
              _buttonEnter: function (t) {
                n(t.currentTarget).addClass(dt);
              },
              _buttonLeave: function (t) {
                n(t.currentTarget).removeClass(dt);
              },
              _focus: function () {
                this.wrapper.addClass(gt);
              },
              _blur: function () {
                this.wrapper.removeClass(gt);
              },
              _dimensions: function () {
                var i,
                  r,
                  t = this.wrapper,
                  n = this.options,
                  c = n.width,
                  l = n.height,
                  f = n.maxHeight,
                  o = n.size,
                  s = ["minWidth", "minHeight", "maxWidth", "maxHeight"],
                  h = "content-box" == t.css("box-sizing"),
                  a = h
                    ? u(t, "border-left-width") + u(t, "border-right-width")
                    : 0,
                  v = h
                    ? u(t, "border-top-width") + u(t, "border-bottom-width")
                    : 0,
                  y = h ? u(t, "padding-top") : 0;
                for (
                  this.containment &&
                    !this._isPinned &&
                    (this._updateBoundaries(),
                    (n.maxHeight = Math.min(
                      this.containment.height - (v + y),
                      f
                    )),
                    (n.maxWidth = Math.min(
                      this.containment.width - a,
                      n.maxWidth
                    ))),
                    i = 0;
                  i < s.length;
                  i++
                )
                  (r = n[s[i]] || ""), r != 1 / 0 && t.css(s[i], r);
                f != 1 / 0 && this.element.css("maxHeight", f);
                t.width(c ? e(c, n.minWidth, n.maxWidth) : "");
                t.height(l ? e(l, n.minHeight, n.maxHeight) : "");
                n.visible || t.hide();
                o && vt[o] && t.addClass(vt[o]);
              },
              _position: function () {
                var t = this.wrapper,
                  n = this.options.position;
                this._updateBoundaries();
                this.containment &&
                  ((n.top = Math.min(this.minTop + (n.top || 0), this.maxTop)),
                  (n.left = Math.min(
                    this.minLeft + (n.left || 0),
                    this.maxLeft
                  )));
                0 === n.top && (n.top = "" + n.top);
                0 === n.left && (n.left = "" + n.left);
                t.css({ top: n.top || "", left: n.left || "" });
              },
              _updateBoundaries: function () {
                var n = this.containment;
                return n
                  ? ((n.width = n.innerWidth()),
                    (n.height = n.innerHeight()),
                    parseInt(n.width, 10) > n[0].clientWidth &&
                      (n.width -= i.support.scrollbar()),
                    parseInt(n.height, 10) > n[0].clientHeight &&
                      (n.height -= i.support.scrollbar()),
                    (n.position = rt(n[0])),
                    this._isPinned
                      ? ((this.minTop = this.minLeft = -(1 / 0)),
                        (this.maxTop = this.maxLeft = 1 / 0))
                      : ((this.minTop = n.scrollTop()),
                        (this.minLeft = n.scrollLeft()),
                        (this.maxLeft =
                          this.minLeft + n.width - nt(this.wrapper, !0)),
                        (this.maxTop =
                          this.minTop + n.height - st(this.wrapper, !0))),
                    t)
                  : null;
              },
              _animationOptions: function (n) {
                var t = this.options.animation;
                return (
                  (t && t[n]) ||
                  { open: { effects: {} }, close: { hide: !0, effects: {} } }[n]
                );
              },
              _resize: function () {
                i.resize(this.element.children());
              },
              _resizable: function () {
                var i = this.options.resizable,
                  t = this.wrapper;
                this.resizing &&
                  (t
                    .off("dblclick" + f)
                    .children(v)
                    .remove(),
                  this.resizing.destroy(),
                  (this.resizing = null));
                i &&
                  (t.on(
                    "dblclick" + f,
                    o,
                    r(function (t) {
                      n(t.target).closest(".k-window-action").length ||
                        this.toggleMaximization();
                    }, this)
                  ),
                  ki("n e s w se sw ne nw".split(" "), function (n, i) {
                    t.append(c.resizeHandle(i));
                  }),
                  (this.resizing = new yt(this)));
                t = null;
              },
              _draggable: function () {
                var n = this.options.draggable;
                this.dragging &&
                  (this.dragging.destroy(), (this.dragging = null));
                n && (this.dragging = new pt(this, n.dragHandle || o));
              },
              _actions: function () {
                var r = this.options,
                  t = r.actions,
                  u = r.pinned,
                  f = this.wrapper.children(o),
                  e = f.find(".k-window-actions"),
                  s = ["maximize", "minimize"];
                t = n.map(t, function (n) {
                  return (
                    (n = u && "pin" === n.toLowerCase() ? "unpin" : n),
                    {
                      name: s.indexOf(n.toLowerCase()) > -1 ? "window-" + n : n,
                    }
                  );
                });
                e.html(i.render(c.action, t));
              },
              setOptions: function (n) {
                var r,
                  u,
                  i = this,
                  f = i.options.size,
                  e = JSON.parse(JSON.stringify(n));
                s(n.position, i.options.position);
                s(n.position, e.position);
                ut.fn.setOptions.call(i, n);
                r = i.options.scrollable !== !1;
                i.restore();
                t !== n.title && i.title(n.title);
                i.wrapper.removeClass(vt[f]);
                i._dimensions();
                i._position();
                i._resizable();
                i._draggable();
                i._actions();
                t !== n.modal &&
                  ((u = i.options.visible !== !1),
                  i._enableDocumentScrolling(),
                  i._overlay(n.modal && u));
                i.element.css(l, r ? "" : "hidden");
              },
              events: [
                lt,
                at,
                ti,
                ii,
                "minimize",
                "maximize",
                et,
                ri,
                "resize",
                ui,
                fi,
                ei,
                oi,
              ],
              options: {
                name: "Window",
                animation: {
                  open: {
                    effects: {
                      zoom: { direction: "in" },
                      fade: { direction: "in" },
                    },
                    duration: 350,
                  },
                  close: {
                    effects: {
                      zoom: { direction: "out", properties: { scale: 0.7 } },
                      fade: { direction: "out" },
                    },
                    duration: 350,
                    hide: !0,
                  },
                },
                title: "",
                actions: ["Close"],
                autoFocus: !0,
                modal: !1,
                size: "auto",
                resizable: !0,
                draggable: !0,
                minWidth: 90,
                minHeight: 50,
                maxWidth: 1 / 0,
                maxHeight: 1 / 0,
                pinned: !1,
                scrollable: !0,
                position: {},
                content: null,
                visible: null,
                height: null,
                width: null,
                appendTo: "body",
                isMaximized: !1,
                isMinimized: !1,
              },
              _closable: function () {
                return (
                  n.inArray(
                    "close",
                    n.map(this.options.actions, function (n) {
                      return n.toLowerCase();
                    })
                  ) > -1
                );
              },
              _keydown: function (n) {
                var f,
                  h,
                  p,
                  w,
                  v,
                  y,
                  t = this,
                  l = t.options,
                  s = i.keys,
                  o = n.keyCode,
                  r = t.wrapper,
                  c = 10,
                  a = l.isMaximized,
                  b = l.isMinimized;
                o == s.ESC &&
                  t._closable() &&
                  (n.stopPropagation(), t._close(!1));
                n.target != n.currentTarget ||
                  t._closing ||
                  (n.altKey && 82 == o && t.refresh(),
                  n.altKey &&
                    80 == o &&
                    (t.options.pinned ? t.unpin() : t.pin()),
                  n.altKey && o == s.UP
                    ? b
                      ? (t.restore(), t.element.focus())
                      : a || (t.maximize(), t.element.focus())
                    : n.altKey &&
                      o == s.DOWN &&
                      (b || a
                        ? a && (t.restore(), t.element.focus())
                        : (t.minimize(), t.wrapper.focus())),
                  (f = i.getOffset(r)),
                  t.containment && !t._isPinned && (f = t.options.position),
                  !l.draggable ||
                    n.ctrlKey ||
                    n.altKey ||
                    a ||
                    (t._updateBoundaries(),
                    o == s.UP
                      ? ((f.top = e(f.top - c, t.minTop, t.maxTop)),
                        (h = r.css("top", f.top)))
                      : o == s.DOWN
                      ? ((f.top = e(f.top + c, t.minTop, t.maxTop)),
                        (h = r.css("top", f.top)))
                      : o == s.LEFT
                      ? ((f.left = e(f.left - c, t.minLeft, t.maxLeft)),
                        (h = r.css("left", f.left)))
                      : o == s.RIGHT &&
                        ((f.left = e(f.left + c, t.minLeft, t.maxLeft)),
                        (h = r.css("left", f.left)))),
                  l.resizable &&
                    n.ctrlKey &&
                    !a &&
                    !b &&
                    (o == s.UP
                      ? ((h = !0), (w = r.height() - c))
                      : o == s.DOWN &&
                        ((h = !0),
                        (w =
                          t.containment && !t._isPinned
                            ? Math.min(
                                r.height() + c,
                                t.containment.height -
                                  f.top -
                                  u(r, "padding-top") -
                                  u(r, "borderBottomWidth") -
                                  u(r, "borderTopWidth")
                              )
                            : r.height() + c)),
                    o == s.LEFT
                      ? ((h = !0), (p = r.width() - c))
                      : o == s.RIGHT &&
                        ((h = !0),
                        (p =
                          t.containment && !t._isPinned
                            ? Math.min(
                                r.width() + c,
                                t.containment.width -
                                  f.left -
                                  u(r, "borderLeftWidth") -
                                  u(r, "borderRightWidth")
                              )
                            : r.width() + c)),
                    h &&
                      ((v = e(p, l.minWidth, l.maxWidth)),
                      (y = e(w, l.minHeight, l.maxHeight)),
                      isNaN(v) || (r.width(v), (t.options.width = v + "px")),
                      isNaN(y) || (r.height(y), (t.options.height = y + "px")),
                      t.resize())),
                  h && n.preventDefault());
              },
              _overlay: function (t) {
                var i = this.containment
                    ? this.containment.children(b)
                    : this.appendTo.children(b),
                  r = this.wrapper;
                return (
                  i.length || (i = n("<div class='k-overlay' />")),
                  i
                    .insertBefore(r[0])
                    .toggle(t)
                    .css(tt, parseInt(r.css(tt), 10) - 1),
                  this.options.modal.preventScroll &&
                    !this.containment &&
                    this._stopDocumentScrolling(),
                  i
                );
              },
              _actionForIcon: function (n) {
                var t = /\bk-i(-\w+)+\b/.exec(n[0].className)[0];
                return {
                  "k-i-close": "_close",
                  "k-i-window-maximize": "maximize",
                  "k-i-window-minimize": "minimize",
                  "k-i-window-restore": "restore",
                  "k-i-refresh": "refresh",
                  "k-i-pin": "pin",
                  "k-i-unpin": "unpin",
                }[t];
              },
              _windowActionHandler: function (i) {
                var u, r;
                if (!this._closing)
                  return (
                    (u = n(i.target)
                      .closest(".k-window-action")
                      .find(".k-icon")),
                    (r = this._actionForIcon(u)),
                    r ? (i.preventDefault(), this[r](), !1) : t
                  );
              },
              _modals: function () {
                var t = this,
                  i = n(w)
                    .filter(function () {
                      var r = n(this),
                        u = t._object(r),
                        i = u && u.options;
                      return (
                        i &&
                        i.modal &&
                        i.visible &&
                        i.appendTo === t.options.appendTo &&
                        r.is(d)
                      );
                    })
                    .sort(function (t, i) {
                      return +n(t).css("zIndex") - +n(i).css("zIndex");
                    });
                return (t = null), i;
              },
              _object: function (n) {
                var u = n.children(h),
                  r = i.widgetInstance(u);
                return r ? r : t;
              },
              center: function () {
                var i,
                  r,
                  t = this,
                  o = t.options.position,
                  f = t.wrapper,
                  e = n(window),
                  s = 0,
                  h = 0;
                return t.options.isMaximized
                  ? t
                  : (t.options.pinned && !t._isPinned && t.pin(),
                    t.options.pinned ||
                      ((s = e.scrollTop()), (h = e.scrollLeft())),
                    this.containment && !t.options.pinned
                      ? ((i = this.minTop + (this.maxTop - this.minTop) / 2),
                        (r = this.minLeft + (this.maxLeft - this.minLeft) / 2))
                      : ((t._scrollIsAppended = !0),
                        (r = h + Math.max(0, (e.width() - f.width()) / 2)),
                        (i =
                          s +
                          Math.max(
                            0,
                            (e.height() - f.height() - u(f, "paddingTop")) / 2
                          ))),
                    f.css({ left: r, top: i }),
                    (o.top = i),
                    (o.left = r),
                    t);
              },
              title: function (r) {
                var f,
                  s,
                  l,
                  a,
                  h = this,
                  v = !0,
                  u = h.wrapper,
                  e = u.children(o),
                  p = e.children(ct);
                return arguments.length
                  ? (n.isPlainObject(r)
                      ? ((f = t !== r.text ? r.text : ""),
                        (v = r.encoded !== !1))
                      : (f = r),
                    f === !1
                      ? (u.addClass("k-window-titleless"),
                        u.css("padding-top", 0),
                        e.remove())
                      : (e.length
                          ? p.html(v ? i.htmlEncode(f) : f)
                          : (u.prepend(
                              c.titlebar({ title: v ? i.htmlEncode(f) : f })
                            ),
                            h._actions(),
                            (e = u.children(o))),
                        (a = u.css("visibility")),
                        (l = u.css("display")),
                        a === y
                          ? (u.css({ display: "" }),
                            (s = parseInt(st(e), 10)),
                            u.css({ display: l }))
                          : (u.css({ visibility: y, display: "" }),
                            (s = parseInt(st(e), 10)),
                            u.css({ visibility: a, display: l })),
                        u.css("padding-top", s),
                        e.css("margin-top", -s)),
                    (h.options.title = f),
                    h)
                  : p.html();
              },
              content: function (n, t) {
                var r = this.wrapper.children(h),
                  u = r.children(".km-scroll-container");
                return (
                  (r = u[0] ? u : r),
                  it(n)
                    ? (this.angular("cleanup", function () {
                        return { elements: r.children() };
                      }),
                      i.destroy(this.element.children()),
                      r.empty().html(n),
                      this.angular("compile", function () {
                        for (var i = [], n = r.length; --n >= 0; )
                          i.push({ dataItem: t });
                        return { elements: r.children(), data: i };
                      }),
                      this)
                    : r.html()
                );
              },
              open: function () {
                var u,
                  c,
                  f,
                  t = this,
                  e = t.wrapper,
                  o = t.options,
                  s = this._animationOptions("open"),
                  a = e.children(h),
                  w = this.containment && !t._isPinned,
                  v = w ? this.containment : n(document);
                return (
                  t.trigger(lt) ||
                    (t._closing && e.kendoStop(!0, !0),
                    (t._closing = !1),
                    t.toFront(),
                    o.autoFocus && t.element.focus(),
                    (o.visible = !0),
                    o.modal &&
                      ((c = !!t._modals().length),
                      (u = t._overlay(c)),
                      u.kendoStop(!0, !0),
                      s.duration && i.effects.Fade && !c
                        ? ((f = i.fx(u).fadeIn()),
                          f.duration(s.duration || 0),
                          f.endValue(0.5),
                          f.play())
                        : u.css("opacity", 0.5),
                      u.show(),
                      n(window).on("focus" + ht, function () {
                        a.data("isFront") &&
                          !n(document.activeElement).closest(a).length &&
                          t.element.focus();
                      })),
                    e.is(d) ||
                      (a.css(l, y),
                      t.wrapper.find(p).addClass("k-bare"),
                      e
                        .show()
                        .kendoStop()
                        .kendoAnimate({
                          effects: s.effects,
                          duration: s.duration,
                          complete: r(this._activate, this),
                        }))),
                  o.isMaximized &&
                    ((t._containerScrollTop = v.scrollTop()),
                    (t._containerScrollLeft = v.scrollLeft()),
                    t._stopDocumentScrolling()),
                  this.options.pinned && !this._isPinned && this.pin(),
                  t
                );
              },
              _activate: function () {
                var n = this.options.scrollable !== !1;
                this.options.autoFocus && this.element.focus();
                this.element.css(l, n ? "" : "hidden");
                i.resize(this.element.children());
                this.trigger(at);
              },
              _removeOverlay: function (r) {
                var u,
                  e = this._modals(),
                  f = this.options,
                  s = f.modal && !e.length,
                  h = f.modal ? this._overlay(!0) : n(t),
                  o = this._animationOptions("close");
                s
                  ? (!r && o.duration && i.effects.Fade
                      ? ((u = i.fx(h).fadeOut()),
                        u.duration(o.duration || 0),
                        u.startValue(0.5),
                        u.play())
                      : this._overlay(!1).remove(),
                    f.modal.preventScroll && this._enableDocumentScrolling())
                  : e.length &&
                    (this._object(e.last())._overlay(!0),
                    f.modal.preventScroll && this._stopDocumentScrolling());
              },
              _close: function (t) {
                var u,
                  i = this,
                  f = i.wrapper,
                  s = i.options,
                  c = this._animationOptions("open"),
                  e = this._animationOptions("close"),
                  l = this.containment && !i._isPinned,
                  o = l ? this.containment : n(document);
                i._closing ||
                  ((u = i.trigger(ii, { userTriggered: !t })),
                  (i._closing = !u),
                  f.is(d) &&
                    !u &&
                    ((s.visible = !1),
                    n(w).each(function (t, i) {
                      var r = n(i).children(h);
                      i != f &&
                        r.find("> ." + k).length > 0 &&
                        r.children(b).remove();
                    }),
                    this._removeOverlay(),
                    i.wrapper.find(p).removeClass("k-bare"),
                    f
                      .kendoStop()
                      .kendoAnimate({
                        effects: e.effects || c.effects,
                        reverse: e.reverse === !0,
                        duration: e.duration,
                        complete: r(this._deactivate, this),
                      }),
                    n(window).off(ht)),
                  i.options.isMaximized &&
                    (i._enableDocumentScrolling(),
                    i._containerScrollTop &&
                      i._containerScrollTop > 0 &&
                      o.scrollTop(i._containerScrollTop),
                    i._containerScrollLeft &&
                      i._containerScrollLeft > 0 &&
                      o.scrollLeft(i._containerScrollLeft)));
              },
              _deactivate: function () {
                var t,
                  n = this;
                n.wrapper.hide().css("opacity", "");
                n.trigger(ti);
                n.options.modal &&
                  ((t = n._object(n._modals().last())), t && t.toFront());
              },
              close: function () {
                return this._close(!0), this;
              },
              _actionable: function (t) {
                return n(t).is(p + "," + p + " .k-icon,:input,a");
              },
              _shouldFocus: function (t) {
                var r = bi(),
                  i = this.element;
                return (
                  this.options.autoFocus &&
                  !n(r).is(i) &&
                  !this._actionable(t) &&
                  (!i.find(r).length || !i.find(t).length)
                );
              },
              toFront: function (t) {
                var f,
                  e,
                  i = this,
                  r = i.wrapper,
                  o = r[0],
                  l = i.containment && !i._isPinned,
                  u = +r.css(tt),
                  a = u,
                  s = (t && t.target) || null;
                return (
                  n(w).each(function (t, i) {
                    var f = n(i),
                      e = f.css(tt),
                      r = f.children(h);
                    isNaN(e) || (u = Math.max(+e, u));
                    r.data("isFront", i == o);
                    i != o &&
                      r.find("> ." + k).length > 0 &&
                      r.append(c.overlay);
                  }),
                  (!r[0].style.zIndex || a < u) && r.css(tt, u + 2),
                  i.element.find("> .k-overlay").remove(),
                  i._shouldFocus(s) &&
                    (i.isMinimized()
                      ? i.wrapper.focus()
                      : n(s).is(b)
                      ? setTimeout(function () {
                          i.element.focus();
                        })
                      : i.element.focus(),
                    (f = l ? i.containment.scrollTop() : n(window).scrollTop()),
                    (e = parseInt(r.position().top, 10)),
                    !i.options.pinned &&
                      e > 0 &&
                      e < f &&
                      (f > 0 ? n(window).scrollTop(e) : r.css("top", f))),
                  (r = null),
                  i
                );
              },
              toggleMaximization: function () {
                return this._closing
                  ? this
                  : this[this.options.isMaximized ? "restore" : "maximize"]();
              },
              restore: function () {
                var f,
                  t = this,
                  i = t.options,
                  u = i.minHeight,
                  r = t.restoreOptions,
                  o =
                    t.containment && !t._isPinned ? t.containment : n(document);
                return i.isMaximized || i.isMinimized
                  ? (u && u != 1 / 0 && t.wrapper.css("min-height", u),
                    r &&
                      !i.isMaximized &&
                      ((r.height = e(
                        r.height,
                        t.options.minHeight,
                        t.options.maxHeight
                      )),
                      (f = i.position.top + parseInt(r.height, 10) > t.maxTop),
                      f &&
                        ((i.position.top = e(
                          i.position.top,
                          t.minTop,
                          t.maxTop - parseInt(r.height, 10)
                        )),
                        s(r, { left: i.position.left, top: i.position.top }))),
                    t.wrapper
                      .css({
                        position: i.pinned ? "fixed" : "absolute",
                        left: r.left,
                        top: r.top,
                        width: r.width,
                        height: r.height,
                      })
                      .removeClass(ni)
                      .find(".k-window-content,.k-resize-handle")
                      .show()
                      .end()
                      .find(".k-window-titlebar .k-i-window-restore")
                      .parent()
                      .remove()
                      .end()
                      .end()
                      .find(si)
                      .parent()
                      .show()
                      .end()
                      .end()
                      .find(li)
                      .parent()
                      .show(),
                    i.isMaximized
                      ? t.wrapper.find(".k-i-window-maximize").parent().focus()
                      : i.isMinimized &&
                        t.wrapper.find(".k-i-window-minimize").parent().focus(),
                    (t.options.width = r.width),
                    (t.options.height = r.height),
                    t.options.modal.preventScroll ||
                      t._enableDocumentScrolling(),
                    t._containerScrollTop &&
                      t._containerScrollTop > 0 &&
                      o.scrollTop(t._containerScrollTop),
                    t._containerScrollLeft &&
                      t._containerScrollLeft > 0 &&
                      o.scrollLeft(t._containerScrollLeft),
                    (i.isMaximized = i.isMinimized = !1),
                    t.wrapper.removeAttr("tabindex"),
                    t.wrapper.removeAttr("aria-labelled-by"),
                    t.resize(),
                    t)
                  : t;
              },
              _sizingAction: function (n, t) {
                var i = this,
                  r = i.wrapper,
                  u = r[0].style,
                  f = i.options;
                return f.isMaximized || f.isMinimized
                  ? i
                  : ((i.restoreOptions = { width: u.width, height: u.height }),
                    r
                      .children(v)
                      .hide()
                      .end()
                      .children(o)
                      .find(si)
                      .parent()
                      .hide()
                      .eq(0)
                      .before(c.action({ name: "window-restore" })),
                    t.call(i),
                    i.wrapper
                      .children(o)
                      .find(li)
                      .parent()
                      .toggle("maximize" !== n),
                    i.trigger(n),
                    r.find(".k-i-window-restore").parent().focus(),
                    i);
              },
              maximize: function () {
                return (
                  this._sizingAction("maximize", function () {
                    var i = this,
                      r = i.wrapper,
                      t = this.containment && !i._isPinned,
                      u = r.position(),
                      f = n(document);
                    s(i.restoreOptions, {
                      left: u.left + (t ? this.containment.scrollLeft() : 0),
                      top: u.top + (t ? this.containment.scrollTop() : 0),
                    });
                    this._containerScrollTop = t
                      ? this.containment.scrollTop()
                      : f.scrollTop();
                    this._containerScrollLeft = t
                      ? this.containment.scrollLeft()
                      : f.scrollLeft();
                    i._stopDocumentScrolling();
                    r.css({
                      top: t ? this.containment.scrollTop() : 0,
                      left: t ? this.containment.scrollLeft() : 0,
                      position: t ? "absolute" : "fixed",
                    }).addClass(ni);
                    i.options.isMaximized = !0;
                    i._onDocumentResize();
                  }),
                  this
                );
              },
              _stopDocumentScrolling: function () {
                var u,
                  f,
                  i = this,
                  r = i.containment;
                return r && !i._isPinned
                  ? (i._storeOverflowRule(r),
                    r.css(l, y),
                    i.wrapper.css({
                      maxWidth: r.innerWidth(),
                      maxHeight: r.innerHeight(),
                    }),
                    t)
                  : ((u = n("body")),
                    i._storeOverflowRule(u),
                    u.css(l, y),
                    (f = n("html")),
                    i._storeOverflowRule(f),
                    f.css(l, y),
                    t);
              },
              _enableDocumentScrolling: function () {
                var i = this,
                  r = i.containment;
                return r && !i._isPinned
                  ? (i._restoreOverflowRule(r),
                    i.wrapper.css({ maxWidth: r.width, maxHeight: r.height }),
                    t)
                  : (i._restoreOverflowRule(n(document.body)),
                    i._restoreOverflowRule(n("html")),
                    t);
              },
              _storeOverflowRule: function (n) {
                if (!this._isOverflowStored(n)) {
                  var t = n.get(0).style.overflow;
                  "string" == typeof t && n.data(ot, t);
                }
              },
              _isOverflowStored: function (n) {
                return "string" == typeof n.data(ot);
              },
              _restoreOverflowRule: function (n) {
                var i = n.data(ot);
                null !== i && i !== t
                  ? (n.css(l, i), n.removeData(ot))
                  : n.css(l, "");
              },
              isMaximized: function () {
                return this.options.isMaximized;
              },
              minimize: function () {
                return (
                  this._sizingAction("minimize", function () {
                    var n = this;
                    n.wrapper.css({ height: "", minHeight: "" });
                    n.element.hide();
                    n.options.isMinimized = !0;
                  }),
                  this.wrapper.attr("tabindex", 0),
                  this.wrapper.attr(
                    "aria-labelled-by",
                    this.element.attr("aria-labelled-by")
                  ),
                  this._updateBoundaries(),
                  this
                );
              },
              isMinimized: function () {
                return this.options.isMinimized;
              },
              pin: function () {
                var t = this,
                  e = n(window),
                  i = t.wrapper,
                  f = t.options,
                  r = f.position,
                  h = this.containment
                    ? rt(i[0]).top + u(this.containment, "borderTopWidth")
                    : u(i, "top"),
                  c = this.containment
                    ? rt(i[0]).left + u(this.containment, "borderLeftWidth")
                    : u(i, "left");
                t.options.isMaximized ||
                  ((r.top = h),
                  (r.left = c),
                  !t._scrollIsAppended ||
                    (this.containment &&
                      "fixed" === this.containment.css("position")) ||
                    ((r.top -= e.scrollTop()),
                    (r.left -= e.scrollLeft()),
                    (t._scrollIsAppended = !1)),
                  i.css(s(r, { position: "fixed" })),
                  i
                    .children(o)
                    .find(hi)
                    .addClass("k-i-unpin")
                    .removeClass("k-i-pin"),
                  (t._isPinned = !0),
                  (t.options.pinned = !0),
                  this.containment &&
                    ((f.maxWidth = f.maxHeight = 1 / 0),
                    i.css({ maxWidth: "", maxHeight: "" })));
              },
              unpin: function () {
                var t = this,
                  a = n(window),
                  r = t.wrapper,
                  f = t.options,
                  l = t.options.position,
                  i = t.containment,
                  h = parseInt(r.css("top"), 10) + a.scrollTop(),
                  c = parseInt(r.css("left"), 10) + a.scrollLeft();
                t.options.isMaximized ||
                  ((t._isPinned = !1),
                  (t._scrollIsAppended = !0),
                  (t.options.pinned = !1),
                  i &&
                    (t._updateBoundaries(),
                    (f.maxWidth = Math.min(i.width, f.maxWidth)),
                    (f.maxHeight = Math.min(
                      i.height - u(r, "padding-top"),
                      f.maxHeight
                    )),
                    r.css({ maxWidth: f.maxWidth, maxHeight: f.maxHeight }),
                    (h =
                      h < i.position.top
                        ? t.minTop
                        : h > i.position.top + i.height
                        ? t.maxTop
                        : h +
                          i.scrollTop() -
                          (i.position.top + u(i, "border-top-width"))),
                    (c =
                      c < i.position.left
                        ? t.minLeft
                        : c > i.position.left + i.width
                        ? t.maxLeft
                        : c +
                          i.scrollLeft() -
                          (i.position.left + u(i, "border-left-width")))),
                  (l.top = e(h, t.minTop, t.maxTop)),
                  (l.left = e(c, t.minLeft, t.maxLeft)),
                  r.css(s(l, { position: "" })),
                  r
                    .children(o)
                    .find(ci)
                    .addClass("k-i-pin")
                    .removeClass("k-i-unpin"));
              },
              _onDocumentResize: function () {
                var f,
                  e,
                  o,
                  s,
                  h,
                  t = this,
                  r = t.wrapper,
                  l = n(window),
                  a = i.support.zoomLevel(),
                  c = "content-box" == r.css("box-sizing");
                t.options.isMaximized &&
                  ((o = c
                    ? u(r, "border-left-width") + u(r, "border-right-width")
                    : 0),
                  (s = c
                    ? u(r, "border-top-width") + u(r, "border-bottom-width")
                    : 0),
                  (h = c ? u(r, "padding-top") : 0),
                  t.containment && !t._isPinned
                    ? ((f = t.containment.innerWidth() - o),
                      (e = t.containment.innerHeight() - (s + h)))
                    : ((f = l.width() / a - o), (e = l.height() / a - (s + h))),
                  r.css({ width: f, height: e }),
                  (t.options.width = f),
                  (t.options.height = e),
                  t.resize());
              },
              refresh: function (t) {
                var e,
                  u,
                  o,
                  i = this,
                  h = i.options,
                  l = n(i.element);
                return (
                  bt(t) || (t = { url: t }),
                  (t = s({}, h.content, t)),
                  (u = it(h.iframe) ? h.iframe : t.iframe),
                  (o = t.url),
                  o
                    ? (it(u) || (u = !gi(o)),
                      u
                        ? ((e = l.find("." + k)[0]),
                          e
                            ? (e.src = o || e.src)
                            : l.html(c.contentFrame(s({}, h, { content: t }))),
                          l
                            .find("." + k)
                            .unbind("load" + f)
                            .on("load" + f, r(this._triggerRefresh, this)))
                        : i._ajaxRequest(t))
                    : (t.template && i.content(a(t.template)({})),
                      i.trigger(et)),
                  l.toggleClass("k-window-iframecontent", !!u),
                  i
                );
              },
              _triggerRefresh: function () {
                this.trigger(et);
              },
              _ajaxComplete: function () {
                clearTimeout(this._loadingIconTimeout);
                this.wrapper.find(ai).removeClass(kt);
              },
              _ajaxError: function (n, t) {
                this.trigger(oi, { status: t, xhr: n });
              },
              _ajaxSuccess: function (n) {
                return function (t) {
                  var i = t;
                  n && (i = a(n)(t || {}));
                  this.content(i, t);
                  this.element.prop("scrollTop", 0);
                  this.trigger(et);
                };
              },
              _showLoading: function () {
                this.wrapper.find(ai).addClass(kt);
              },
              _ajaxRequest: function (t) {
                this._loadingIconTimeout = setTimeout(
                  r(this._showLoading, this),
                  100
                );
                n.ajax(
                  s(
                    {
                      type: "GET",
                      dataType: "html",
                      cache: !1,
                      error: r(this._ajaxError, this),
                      complete: r(this._ajaxComplete, this),
                      success: r(this._ajaxSuccess(t.template), this),
                    },
                    t
                  )
                );
              },
              _destroy: function () {
                this.resizing && this.resizing.destroy();
                this.dragging && this.dragging.destroy();
                this.wrapper
                  .off(f)
                  .children(h)
                  .off(f)
                  .end()
                  .find(".k-resize-handle,.k-window-titlebar")
                  .off(f);
                n(window).off("resize" + f + this._marker);
                n(window).off(ht);
                n(window).off(f);
                clearTimeout(this._loadingIconTimeout);
                ut.fn.destroy.call(this);
                this.unbind(t);
                i.destroy(this.wrapper);
                this._removeOverlay(!0);
              },
              destroy: function () {
                this._destroy();
                this.wrapper.empty().remove();
                this.wrapper = this.appendTo = this.element = n();
              },
              _createWindow: function () {
                var u,
                  t,
                  r = this.element,
                  f = this.options,
                  e = i.support.isRtl(r);
                f.scrollable === !1 && r.css("overflow", "hidden");
                t = n(c.wrapper(f));
                u = r.find("iframe:not(.k-content)").map(function () {
                  var n = this.getAttribute("src");
                  return (this.src = ""), n;
                });
                t.toggleClass("k-rtl", e)
                  .append(r)
                  .find("iframe:not(.k-content)")
                  .each(function (n) {
                    this.src = u[n];
                  });
                this.containment
                  ? this.containment.prepend(t)
                  : this.appendTo && t.appendTo(this.appendTo);
                t.find(".k-window-title").css(
                  e ? "left" : "right",
                  nt(t.find(".k-window-actions")) + 10
                );
                r.css("visibility", "").show();
                r.find("[data-role=editor]").each(function () {
                  var t = n(this).data("kendoEditor");
                  t && t.refresh();
                });
                t = r = null;
              },
            }),
            c = {
              wrapper: a("<div class='k-widget k-window' />"),
              action: a(
                "<a role='button' href='\\#' class='k-button k-bare k-button-icon k-window-action' aria-label='#= name #'><span class='k-icon k-i-#= name.toLowerCase() #'></span></a>"
              ),
              titlebar: a(
                "<div class='k-window-titlebar k-header'><span class='k-window-title'>#= title #</span><div class='k-window-actions' /></div>"
              ),
              overlay: "<div class='k-overlay' />",
              contentFrame: a(
                "<iframe frameborder='0' title='#= title #' class='" +
                  k +
                  "' src='#= content.url #'>This page requires frames in order to show content</iframe>"
              ),
              resizeHandle: a(
                "<div class='k-resize-handle k-resize-#= data #'></div>"
              ),
            };
          yt.prototype = {
            addOverlay: function () {
              this.owner.wrapper.append(c.overlay);
            },
            removeOverlay: function () {
              this.owner.wrapper.find(b).remove();
            },
            dragstart: function (t) {
              var e,
                c,
                l,
                a,
                o,
                s,
                h,
                r = this,
                f = r.owner,
                u = f.wrapper;
              r._preventDragging = f.trigger(ri);
              r._preventDragging ||
                ((r.elementPadding = parseInt(u.css("padding-top"), 10)),
                (r.initialPosition = i.getOffset(u, "position")),
                (r.resizeDirection = t.currentTarget
                  .prop("className")
                  .replace("k-resize-handle k-resize-", "")),
                (r.initialSize = { width: u.width(), height: u.height() }),
                f._updateBoundaries(),
                (r.containerOffset = f.containment
                  ? f.containment.position
                  : i.getOffset(f.appendTo, "position")),
                (e = u.offsetParent()),
                e.is("html")
                  ? (r.containerOffset.top = r.containerOffset.left = 0)
                  : ((c = e.css("margin-top")),
                    (l = e.css("margin-left")),
                    (a = !yi.test(c) || !yi.test(l)),
                    a &&
                      ((o = rt(u[0])),
                      (s =
                        o.left -
                        r.containerOffset.left -
                        r.initialPosition.left),
                      (h =
                        o.top - r.containerOffset.top - r.initialPosition.top),
                      (r._relativeElMarginLeft = s > 1 ? s : 0),
                      (r._relativeElMarginTop = h > 1 ? h : 0),
                      (r.initialPosition.left += r._relativeElMarginLeft),
                      (r.initialPosition.top += r._relativeElMarginTop))),
                u.children(v).not(t.currentTarget).hide(),
                n(ft).css(g, t.currentTarget.css(g)));
            },
            drag: function (t) {
              var s, r, y, u, f, p, o, a, v, nt, tt, w, h, l, c, k, d, g, it, b;
              this._preventDragging ||
                ((s = this),
                (r = s.owner),
                (y = r.wrapper),
                (u = r.options),
                (f = u.position),
                (p = s.resizeDirection),
                (o = s.containerOffset),
                (a = s.initialPosition),
                (v = s.initialSize),
                (nt = r.containment && !r._isPinned),
                (tt = i.support.isRtl(r.containment)),
                (w =
                  nt && tt && r.containment.innerWidth() > r.containment.width
                    ? i.support.scrollbar()
                    : 0),
                (h = nt
                  ? {
                      top: r.containment.scrollTop(),
                      left: r.containment.scrollLeft(),
                    }
                  : { top: 0, left: 0 }),
                (g = Math.max(t.x.location, 0)),
                (it = Math.max(t.y.location, 0)),
                p.indexOf("e") >= 0
                  ? ((l =
                      r.containment &&
                      g - v.width >= r.maxLeft - h.left + o.left + w
                        ? r.maxLeft + w - a.left + v.width - h.left
                        : g - a.left - o.left),
                    y.width(e(l, u.minWidth, u.maxWidth)))
                  : p.indexOf("w") >= 0 &&
                    ((d = a.left + v.width + o.left),
                    (l = e(d - g, u.minWidth, u.maxWidth)),
                    (f.left =
                      d -
                      l -
                      o.left -
                      w -
                      (s._relativeElMarginLeft || 0) +
                      h.left),
                    r.containment &&
                      f.left <= r.minLeft &&
                      ((f.left = r.minLeft),
                      (l = e(
                        d - w - f.left - o.left + h.left,
                        u.minWidth,
                        u.maxWidth
                      ))),
                    y.css({ left: f.left, width: l })),
                (b = it),
                r.options.pinned && (b -= n(window).scrollTop()),
                p.indexOf("s") >= 0
                  ? ((c = b - a.top - s.elementPadding - o.top),
                    b - v.height - s.elementPadding >=
                      r.maxTop + o.top - h.top &&
                      (c = r.maxTop - a.top + v.height - h.top),
                    y.height(e(c, u.minHeight, u.maxHeight)))
                  : p.indexOf("n") >= 0 &&
                    ((k = a.top + v.height + o.top),
                    (c = e(k - b, u.minHeight, u.maxHeight)),
                    (f.top =
                      k - c - o.top - (s._relativeElMarginTop || 0) + h.top),
                    f.top <= r.minTop &&
                      r.containment &&
                      ((f.top = r.minTop),
                      (c = e(
                        k - f.top - o.top + h.top,
                        u.minHeight,
                        u.maxHeight
                      ))),
                    y.css({ top: f.top, height: c })),
                l && (r.options.width = l + "px"),
                c && (r.options.height = c + "px"),
                r.resize());
            },
            dragend: function (t) {
              if (!this._preventDragging) {
                var r = this,
                  i = r.owner,
                  u = i.wrapper;
                return (
                  u.children(v).not(t.currentTarget).show(),
                  n(ft).css(g, ""),
                  i.touchScroller && i.touchScroller.reset(),
                  27 == t.keyCode &&
                    u.css(r.initialPosition).css(r.initialSize),
                  i.trigger(ui),
                  !1
                );
              }
            },
            destroy: function () {
              this._draggable && this._draggable.destroy();
              this._draggable = this.owner = null;
            },
          };
          pt.prototype = {
            dragstart: function (t) {
              var r = this.owner,
                o = r.options.draggable,
                u = r.element,
                f = u.find(".k-window-actions"),
                e = i.getOffset(r.appendTo);
              this._preventDragging = r.trigger(fi) || !o;
              this._preventDragging ||
                r.isMaximized() ||
                ((r.initialWindowPosition = i.getOffset(r.wrapper, "position")),
                (r.initialPointerPosition = {
                  left: r.options.position.left,
                  top: r.options.position.top,
                }),
                (r.startPosition = {
                  left: t.x.client - r.initialWindowPosition.left,
                  top: t.y.client - r.initialWindowPosition.top,
                }),
                r._updateBoundaries(),
                r.containment ||
                  ((r.minLeft =
                    f.length > 0
                      ? nt(f) + parseInt(f.css("right"), 10) - nt(u)
                      : 20 - nt(u)),
                  (r.minLeft -= e.left),
                  (r.minTop = -e.top)),
                r.wrapper.append(c.overlay).children(v).hide(),
                n(ft).css(g, t.currentTarget.css(g)));
            },
            drag: function (t) {
              var o,
                s,
                r = this.owner,
                u = r.options.position,
                f = r.options.draggable.axis;
              this._preventDragging ||
                r.isMaximized() ||
                ((f && "x" !== f.toLowerCase()) ||
                  ((o = t.x.client - r.startPosition.left),
                  r.containment &&
                    !r._isPinned &&
                    (o += r.containment.scrollLeft()),
                  (u.left = e(o, r.minLeft, r.maxLeft))),
                (f && "y" !== f.toLowerCase()) ||
                  ((s = t.y.client - r.startPosition.top),
                  r.containment &&
                    !r._isPinned &&
                    (s += r.containment.scrollTop()),
                  (u.top = e(s, r.minTop, r.maxTop))),
                i.support.transforms
                  ? n(r.wrapper).css(
                      "transform",
                      "translate(" +
                        (u.left - r.initialPointerPosition.left) +
                        "px, " +
                        (u.top - r.initialPointerPosition.top) +
                        "px)"
                    )
                  : n(r.wrapper).css(u));
            },
            _finishDrag: function () {
              var t = this.owner;
              t.wrapper
                .children(v)
                .toggle(!t.options.isMinimized)
                .end()
                .find(b)
                .remove();
              n(ft).css(g, "");
            },
            dragcancel: function (n) {
              this._preventDragging ||
                (this._finishDrag(),
                n.currentTarget
                  .closest(w)
                  .css(this.owner.initialWindowPosition));
            },
            dragend: function () {
              var t = this.owner;
              if (!this._preventDragging && !t.isMaximized())
                return (
                  n(t.wrapper).css(t.options.position).css("transform", ""),
                  this._finishDrag(),
                  t.trigger(ei),
                  !1
                );
            },
            destroy: function () {
              this._draggable && this._draggable.destroy();
              this._draggable = this.owner = null;
            },
          };
          i.ui.plugin(nr);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.pane.min", ["kendo.view.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var t = window.kendo,
            o = t.roleSelector,
            s = t.ui,
            r = s.Widget,
            a = t.ViewEngine,
            u = t.View,
            v = n.extend,
            h = "navigate",
            c = "viewShow",
            l = "sameViewRequested",
            f = t.support.mobileOS,
            y = f.ios && !f.appMode && f.flatVersion >= 700,
            p = "#:back",
            w = ".",
            i = {
              pane: "k-pane",
              paneWrapper: "k-pane-wrapper",
              collapsiblePane: "k-collapsible-pane",
              vertical: "k-vertical",
            },
            e = r.extend({
              init: function (n, f) {
                var e = this;
                r.fn.init.call(e, n, f);
                f = e.options;
                n = e.element;
                n.addClass(i.pane);
                e.options.collapsible && n.addClass(i.collapsiblePane);
                this.history = [];
                this.historyCallback = function (n, t, i) {
                  var r = e.transition;
                  return (
                    (e.transition = null),
                    y && i && (r = "none"),
                    e.viewEngine.showView(n, r, t)
                  );
                };
                this._historyNavigate = function (n) {
                  if (n === p) {
                    if (1 === e.history.length) return;
                    e.history.pop();
                    n = e.history[e.history.length - 1];
                  } else n instanceof u && (n = ""), e.history.push(n);
                  e.historyCallback(n, t.parseQueryStringParams(n));
                };
                this._historyReplace = function (n) {
                  var i = t.parseQueryStringParams(n);
                  e.history[e.history.length - 1] = n;
                  e.historyCallback(n, i);
                };
                e.viewEngine = new a(
                  v(
                    {},
                    {
                      container: n,
                      transition: f.transition,
                      modelScope: f.modelScope,
                      rootNeeded: !f.initial,
                      serverNavigation: f.serverNavigation,
                      remoteViewURLPrefix: f.root || "",
                      layout: f.layout,
                      $angular: f.$angular,
                      showStart: function () {
                        e.closeActiveDialogs();
                      },
                      after: function () {},
                      viewShow: function (n) {
                        e.trigger(c, n);
                      },
                      loadStart: function () {},
                      loadComplete: function () {},
                      sameViewRequested: function () {
                        e.trigger(l);
                      },
                      viewTypeDetermined: function (n) {
                        (n.remote && e.options.serverNavigation) ||
                          e.trigger(h, { url: n.url });
                      },
                    },
                    this.options.viewEngine
                  )
                );
                this._setPortraitWidth();
                t.onResize(function () {
                  e._setPortraitWidth();
                });
              },
              closeActiveDialogs: function () {
                var i = this.element
                  .find(o("actionsheet popover modalview"))
                  .filter(":visible");
                i.each(function () {
                  t.widgetInstance(n(this), s).close();
                });
              },
              navigateToInitial: function () {
                var n = this.options.initial;
                return n && this.navigate(n), n;
              },
              options: {
                name: "Pane",
                portraitWidth: "",
                transition: "",
                layout: "",
                collapsible: !1,
                initial: null,
                modelScope: window,
              },
              events: [h, c, l],
              append: function (n) {
                return this.viewEngine.append(n);
              },
              destroy: function () {
                var n = this;
                r.fn.destroy.call(n);
                n.viewEngine && n.viewEngine.destroy();
              },
              navigate: function (n, t) {
                n instanceof u && (n = n.id);
                this.transition = t;
                this._historyNavigate(n);
              },
              replace: function (n, t) {
                n instanceof u && (n = n.id);
                this.transition = t;
                this._historyReplace(n);
              },
              view: function () {
                return this.viewEngine.view();
              },
              _setPortraitWidth: function () {
                var n,
                  r = this.options.portraitWidth;
                r &&
                  ((n = t.mobile.application.element.is(w + i.vertical)
                    ? r
                    : "auto"),
                  this.element.css("width", n));
              },
            });
          e.wrap = function (n, r) {
            var f, u;
            return (
              n.is(o("view")) ||
                (n = n
                  .wrap(
                    "<div data-" +
                      t.ns +
                      'role="view" data-stretch="true"></div>'
                  )
                  .parent()),
              (f = n
                .wrap(
                  '<div class="' +
                    i.paneWrapper +
                    ' k-widget"><div></div></div>'
                )
                .parent()),
              (u = new e(f, r)),
              u.navigate(""),
              u
            );
          };
          t.Pane = e;
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.progressbar.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var o = window.kendo,
            nt = o.ui,
            f = nt.Widget,
            u = "horizontal",
            l = "vertical",
            a = "k-progressbar",
            tt = "k-progressbar-reverse",
            s = "k-progressbar-indeterminate",
            v = "k-complete",
            y = "k-state-selected",
            p = "k-progress-status",
            h = "k-state-selected",
            w = "k-state-default",
            b = "k-state-disabled",
            i = { VALUE: "value", PERCENT: "percent", CHUNK: "chunk" },
            k = "change",
            d = "complete",
            it = "boolean",
            r = Math,
            rt = n.extend,
            e = n.proxy,
            c = 100,
            ut = 400,
            ft = 3,
            g = {
              progressStatus:
                "<span class='k-progress-status-wrap k-progress-end'><span class='k-progress-status'></span></span>",
            },
            et = f.extend({
              init: function (n, t) {
                var i = this;
                f.fn.init.call(this, n, t);
                t = i.options;
                i._progressProperty = t.orientation === u ? "width" : "height";
                i._fields();
                t.value = i._validateValue(t.value);
                i._validateType(t.type);
                i._wrapper();
                i._progressAnimation();
                t.value !== t.min && t.value !== !1 && i._updateProgress();
              },
              setOptions: function (n) {
                var t = this;
                f.fn.setOptions.call(t, n);
                n.hasOwnProperty("reverse") &&
                  t.wrapper.toggleClass("k-progressbar-reverse", n.reverse);
                n.hasOwnProperty("enable") && t.enable(n.enable);
                t._progressAnimation();
                t._validateValue();
                t._updateProgress();
              },
              events: [k, d],
              options: {
                name: "ProgressBar",
                orientation: u,
                reverse: !1,
                min: 0,
                max: 100,
                value: 0,
                enable: !0,
                type: i.VALUE,
                chunkCount: 5,
                showStatus: !0,
                animation: {},
              },
              _fields: function () {
                var t = this;
                t._isStarted = !1;
                t.progressWrapper = t.progressStatus = n();
              },
              _validateType: function (t) {
                var r = !1;
                if (
                  (n.each(i, function (n, i) {
                    if (i === t) return (r = !0), !1;
                  }),
                  !r)
                )
                  throw Error(o.format("Invalid ProgressBar type '{0}'", t));
              },
              _wrapper: function () {
                var f,
                  t = this,
                  r = (t.wrapper = t.element),
                  n = t.options,
                  e = n.orientation;
                r.addClass("k-widget " + a);
                r.addClass(a + "-" + (e === u ? u : l));
                n.enable === !1 && r.addClass(b);
                n.reverse && r.addClass(tt);
                n.value === !1 && r.addClass(s);
                n.type === i.CHUNK
                  ? t._addChunkProgressWrapper()
                  : n.showStatus &&
                    ((t.progressStatus = t.wrapper
                      .prepend(g.progressStatus)
                      .find("." + p)),
                    (f = n.value !== !1 ? n.value : n.min),
                    t.progressStatus.text(
                      n.type === i.VALUE
                        ? f
                        : t._calculatePercentage(f).toFixed() + "%"
                    ));
              },
              value: function (n) {
                return this._value(n);
              },
              _value: function (n) {
                var u,
                  i = this,
                  r = i.options;
                return n === t
                  ? r.value
                  : (typeof n !== it
                      ? ((n = i._roundValue(n)),
                        isNaN(n) ||
                          ((u = i._validateValue(n)),
                          u !== r.value &&
                            (i.wrapper.removeClass(s),
                            (r.value = u),
                            (i._isStarted = !0),
                            i._updateProgress())))
                      : n || (i.wrapper.addClass(s), (r.value = !1)),
                    t);
              },
              _roundValue: function (n) {
                n = parseFloat(n);
                var t = r.pow(10, ft);
                return r.floor(n * t) / t;
              },
              _validateValue: function (n) {
                var i = this,
                  t = i.options;
                if (n !== !1) {
                  if (n <= t.min || n === !0) return t.min;
                  if (n >= t.max) return t.max;
                } else if (n === !1) return !1;
                return isNaN(i._roundValue(n)) ? t.min : n;
              },
              _updateProgress: function () {
                var n = this,
                  t = n.options,
                  r = n._calculatePercentage();
                t.type === i.CHUNK
                  ? (n._updateChunks(r), n._onProgressUpdateAlways(t.value))
                  : n._updateProgressWrapper(r);
              },
              _updateChunks: function (n) {
                var f,
                  i = this,
                  t = i.options,
                  o = t.chunkCount,
                  s = parseInt((c / o) * 100, 10) / 100,
                  a = parseInt(100 * n, 10) / 100,
                  e = r.floor(a / s);
                f = i.wrapper.find(
                  (t.orientation === u && !t.reverse) ||
                    (t.orientation === l && t.reverse)
                    ? "li.k-item:lt(" + e + ")"
                    : "li.k-item:gt(-" + (e + 1) + ")"
                );
                i.wrapper
                  .find("." + h)
                  .removeClass(h)
                  .addClass(w);
                f.removeClass(w).addClass(h);
              },
              _updateProgressWrapper: function (n) {
                var t = this,
                  i = t.options,
                  u = t.wrapper.find("." + y),
                  f = t._isStarted ? t._animation.duration : 0,
                  r = {};
                0 === u.length && t._addRegularProgressWrapper();
                r[t._progressProperty] = n + "%";
                t.progressWrapper.animate(r, {
                  duration: f,
                  start: e(t._onProgressAnimateStart, t),
                  progress: e(t._onProgressAnimate, t),
                  complete: e(t._onProgressAnimateComplete, t, i.value),
                  always: e(t._onProgressUpdateAlways, t, i.value),
                });
              },
              _onProgressAnimateStart: function () {
                this.progressWrapper.show();
              },
              _onProgressAnimate: function (n) {
                var r,
                  t = this,
                  u = t.options,
                  f = parseFloat(n.elem.style[t._progressProperty], 10);
                u.showStatus &&
                  ((r =
                    1e4 /
                    parseFloat(
                      t.progressWrapper[0].style[t._progressProperty]
                    )),
                  t.progressWrapper
                    .find(".k-progress-status-wrap")
                    .css(t._progressProperty, r + "%"));
                u.type !== i.CHUNK &&
                  f <= 98 &&
                  t.progressWrapper.removeClass(v);
              },
              _onProgressAnimateComplete: function (n) {
                var f,
                  t = this,
                  u = t.options,
                  e = parseFloat(
                    t.progressWrapper[0].style[t._progressProperty]
                  );
                u.type !== i.CHUNK && e > 98 && t.progressWrapper.addClass(v);
                u.showStatus &&
                  ((f =
                    u.type === i.VALUE
                      ? n
                      : u.type == i.PERCENT
                      ? t._calculatePercentage(n).toFixed() + "%"
                      : r.floor(t._calculatePercentage(n)) + "%"),
                  t.progressStatus.text(f));
                n === u.min && t.progressWrapper.hide();
              },
              _onProgressUpdateAlways: function (n) {
                var t = this,
                  i = t.options;
                t._isStarted && t.trigger(k, { value: n });
                n === i.max && t._isStarted && t.trigger(d, { value: i.max });
              },
              enable: function (n) {
                var i = this,
                  r = i.options;
                r.enable = t === n || n;
                i.wrapper.toggleClass(b, !r.enable);
              },
              destroy: function () {
                var n = this;
                f.fn.destroy.call(n);
              },
              _addChunkProgressWrapper: function () {
                var r,
                  n = this,
                  t = n.options,
                  u = n.wrapper,
                  f = c / t.chunkCount,
                  i = "";
                for (
                  t.chunkCount <= 1 && (t.chunkCount = 1),
                    i += "<ul class='k-reset'>",
                    r = t.chunkCount - 1;
                  r >= 0;
                  r--
                )
                  i += "<li class='k-item k-state-default'></li>";
                i += "</ul>";
                u.append(i)
                  .find(".k-item")
                  .css(n._progressProperty, f + "%")
                  .first()
                  .addClass("k-first")
                  .end()
                  .last()
                  .addClass("k-last");
                n._normalizeChunkSize();
              },
              _normalizeChunkSize: function () {
                var n = this,
                  u = n.options,
                  t = n.wrapper.find(".k-item:last"),
                  i = parseFloat(t[0].style[n._progressProperty]),
                  r = c - u.chunkCount * i;
                r > 0 && t.css(n._progressProperty, i + r + "%");
              },
              _addRegularProgressWrapper: function () {
                var t = this;
                t.progressWrapper = n("<div class='" + y + "'></div>").appendTo(
                  t.wrapper
                );
                t.options.showStatus &&
                  (t.progressWrapper.append(g.progressStatus),
                  (t.progressStatus = t.wrapper.find("." + p)));
              },
              _calculateChunkSize: function () {
                var n = this,
                  t = n.options.chunkCount,
                  i = n.wrapper.find("ul.k-reset");
                return (parseInt(i.css(n._progressProperty), 10) - (t - 1)) / t;
              },
              _calculatePercentage: function (n) {
                var i = this,
                  u = i.options,
                  e = n !== t ? n : u.value,
                  f = u.min,
                  o = u.max;
                return (
                  (i._onePercent = r.abs((o - f) / 100)),
                  r.abs((e - f) / i._onePercent)
                );
              },
              _progressAnimation: function () {
                var n = this,
                  t = n.options,
                  i = t.animation;
                n._animation =
                  i === !1
                    ? { duration: 0 }
                    : rt({ duration: ut }, t.animation);
              },
            });
          o.ui.plugin(et);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("pdf/pako.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function () {
          kendo.pdf = kendo.pdf || {};
          kendo.pdf.supportsDeflate = function () {
            return window.pako && "function" == typeof window.pako.deflate;
          };
          kendo.pdf.deflate = function (n) {
            return window.pako.deflate(n);
          };
        })(),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "pdf/core.min",
      [
        "pdf/pako.min",
        "kendo.core.min",
        "kendo.color.min",
        "kendo.drawing.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n) {
          function u(n) {
            function g() {
              return t >= i;
            }
            function u() {
              return t < i ? n[t++] : 0;
            }
            function r(r) {
              c(t);
              n[t++] = 255 & r;
              t > i && (i = t);
            }
            function f() {
              return (u() << 8) | u();
            }
            function e(n) {
              r(n >> 8);
              r(n);
            }
            function nt() {
              var n = f();
              return n >= 32768 ? n - 65536 : n;
            }
            function tt(n) {
              e(n < 0 ? n + 65536 : n);
            }
            function s() {
              return 65536 * f() + f();
            }
            function h(n) {
              e((n >>> 16) & 65535);
              e(65535 & n);
            }
            function y() {
              var n = s();
              return n >= 2147483648 ? n - 4294967296 : n;
            }
            function p(n) {
              h(n < 0 ? n + 4294967296 : n);
            }
            function it() {
              return s() / 65536;
            }
            function ut(n) {
              h(Math.round(65536 * n));
            }
            function ft() {
              return y() / 65536;
            }
            function et(n) {
              p(Math.round(65536 * n));
            }
            function w(n) {
              return b(n, u);
            }
            function ot(n) {
              return String.fromCharCode.apply(String, w(n));
            }
            function o(n) {
              for (var t = 0; t < n.length; ++t) r(n.charCodeAt(t));
            }
            function b(n, t) {
              for (var r = Array(n), i = 0; i < n; ++i) r[i] = t();
              return r;
            }
            var c,
              l,
              a,
              k,
              d,
              t = 0,
              i = 0;
            return (
              null == n ? (n = v ? new Uint8Array(256) : []) : (i = n.length),
              (c = v
                ? function (t) {
                    if (t >= n.length) {
                      var i = new Uint8Array(Math.max(t + 256, 2 * n.length));
                      i.set(n, 0);
                      n = i;
                    }
                  }
                : function () {}),
              (l = v
                ? function () {
                    return new Uint8Array(n.buffer, 0, i);
                  }
                : function () {
                    return n;
                  }),
              (a = v
                ? function (r) {
                    if ("string" == typeof r) return o(r);
                    var u = r.length;
                    c(t + u);
                    n.set(r, t);
                    t += u;
                    t > i && (i = t);
                  }
                : function (n) {
                    if ("string" == typeof n) return o(n);
                    for (var t = 0; t < n.length; ++t) r(n[t]);
                  }),
              (k = v
                ? function (t, i) {
                    if (n.buffer.slice)
                      return new Uint8Array(n.buffer.slice(t, t + i));
                    var r = new Uint8Array(i);
                    return r.set(new Uint8Array(n.buffer, t, i)), r;
                  }
                : function (t, i) {
                    return n.slice(t, t + i);
                  }),
              (d = {
                eof: g,
                readByte: u,
                writeByte: r,
                readShort: f,
                writeShort: e,
                readLong: s,
                writeLong: h,
                readFixed: it,
                writeFixed: ut,
                readShort_: nt,
                writeShort_: tt,
                readLong_: y,
                writeLong_: p,
                readFixed_: ft,
                writeFixed_: et,
                read: w,
                write: a,
                readString: ot,
                writeString: o,
                times: b,
                get: l,
                slice: k,
                offset: function (n) {
                  return null != n ? ((t = n), d) : t;
                },
                skip: function (n) {
                  t += n;
                },
                toString: function () {
                  throw Error(
                    "FIX CALLER.  BinaryStream is no longer convertible to string!"
                  );
                },
                length: function () {
                  return i;
                },
                saveExcursion: function (n) {
                  var i = t;
                  try {
                    return n();
                  } finally {
                    t = i;
                  }
                },
                writeBase64: function (n) {
                  window.atob ? o(window.atob(n)) : a(rt.decode(n));
                },
                base64: function () {
                  return rt.encode(l());
                },
              })
            );
          }
          function gr(n) {
            for (var t, u, r = [], i = 0, f = n.length; i < f; )
              (t = n.charCodeAt(i++)),
                t >= 55296 && t <= 56319 && i < f
                  ? ((u = n.charCodeAt(i++)),
                    56320 == (64512 & u)
                      ? r.push(((1023 & t) << 10) + (1023 & u) + 65536)
                      : (r.push(t), i--))
                  : r.push(t);
            return r;
          }
          function nu(n) {
            return n
              .map(function (n) {
                var t = "";
                return (
                  n > 65535 &&
                    ((n -= 65536),
                    (t += String.fromCharCode(((n >>> 10) & 1023) | 55296)),
                    (n = 56320 | (1023 & n))),
                  t + String.fromCharCode(n)
                );
              })
              .join("");
          }
          function tu(n) {
            for (
              var i = window.atob(n), r = new Uint8Array(i.length), t = 0;
              t < i.length;
              t++
            )
              r[t] = i.charCodeAt(t);
            return r;
          }
          function iu(n) {
            for (var i = new Uint8Array(n.length), t = 0; t < n.length; t++)
              i[t] = n[t];
            return i;
          }
          function ru(n) {
            return window.atob ? tu(n) : iu(rt.decode(n));
          }
          function b(n, t) {
            return Object.prototype.hasOwnProperty.call(n, t);
          }
          function ct(n) {
            return Object.keys(n)
              .sort(function (n, t) {
                return n - t;
              })
              .map(parseFloat);
          }
          function ci(n) {
            var r, t, i;
            for (
              this.raw = n,
                this.scalerType = n.readLong(),
                this.tableCount = n.readShort(),
                this.searchRange = n.readShort(),
                this.entrySelector = n.readShort(),
                this.rangeShift = n.readShort(),
                r = this.tables = {},
                t = 0;
              t < this.tableCount;
              ++t
            )
              (i = {
                tag: n.readString(4),
                checksum: n.readLong(),
                offset: n.readLong(),
                length: n.readLong(),
              }),
                (r[i.tag] = i);
          }
          function c(n) {
            function t(n, t) {
              this.definition = t;
              this.length = t.length;
              this.offset = t.offset;
              this.file = n;
              this.rawData = n.raw;
              this.parse(n.raw);
            }
            t.prototype.raw = function () {
              return this.rawData.slice(this.offset, this.length);
            };
            for (var i in n) b(n, i) && (t[i] = t.prototype[i] = n[i]);
            return t;
          }
          function uu() {
            for (var t = "", i = ui + "", n = 0; n < i.length; ++n)
              t += String.fromCharCode(i.charCodeAt(n) - -17);
            return ++ui, t;
          }
          function li(n) {
            this.font = n;
            this.subset = {};
            this.unicodes = {};
            this.ogid2ngid = { 0: 0 };
            this.ngid2ogid = { 0: 0 };
            this.ncid2ogid = {};
            this.next = this.firstChar = 1;
            this.nextGid = 1;
            this.psName = uu() + "+" + this.font.psName;
          }
          function ai(n, t) {
            var e,
              o,
              s,
              f,
              r = this,
              i = (r.contents = u(n));
            if ("ttcf" == i.readString(4)) {
              if (
                ((o = function () {
                  i.offset(e);
                  r.parse();
                }),
                !t)
              )
                throw Error("Must specify a name for TTC files");
              for (i.readLong(), s = i.readLong(), f = 0; f < s; ++f)
                if (((e = i.readLong()), i.saveExcursion(o), r.psName == t))
                  return;
              throw Error("Font " + t + " not found in collection");
            }
            i.offset(0);
            r.parse();
          }
          function lt() {
            function n() {
              for (var i, u, e = arguments, f = 0; f < arguments.length; ++f) {
                if (((i = e[f]), void 0 === i))
                  throw Error("Cannot output undefined to PDF");
                if (i instanceof vt) i.beforeRender(n), i.render(n);
                else if (oi(i)) lu(i, n);
                else if (cu(i)) au(i, n);
                else if ("number" == typeof i) {
                  if (isNaN(i)) throw Error("Cannot output NaN to PDF");
                  u = i.toFixed(7);
                  u.indexOf(".") >= 0 && (u = u.replace(/\.?0+$/, ""));
                  "-0" == u && (u = "0");
                  t.writeString(u);
                } else
                  /string|boolean/.test(typeof i)
                    ? t.writeString(i + "")
                    : "function" == typeof i.get
                    ? t.write(i.get())
                    : "object" == typeof i &&
                      (i ? n(new r(i)) : t.writeString("null"));
              }
            }
            var f = 0,
              t = u();
            return (
              (n.writeData = function (n) {
                t.write(n);
              }),
              (n.withIndent = function (t) {
                ++f;
                t(n);
                --f;
              }),
              (n.indent = function () {
                n(i, pi("", 2 * f, "  "));
                n.apply(null, arguments);
              }),
              (n.offset = function () {
                return t.offset();
              }),
              (n.toString = function () {
                throw Error("FIX CALLER");
              }),
              (n.get = function () {
                return t.get();
              }),
              (n.stream = function () {
                return t;
              }),
              n
            );
          }
          function fu(n, t) {
            var i = n.beforeRender,
              r = n.render;
            n.beforeRender = function () {};
            n.render = function (n) {
              n(t, " 0 R");
            };
            n.renderFull = function (u) {
              n._offset = u.offset();
              u(t, " 0 obj ");
              i.call(n, u);
              r.call(n, u);
              u(" endobj");
            };
          }
          function vi(n) {
            var r, i, t;
            if (
              ("function" != typeof n &&
                ((r = n),
                (n = function (n, t) {
                  return n in r ? r[n] : t;
                })),
              (i = n("paperSize", ei.a4)),
              !i)
            )
              return {};
            if ("string" == typeof i && ((i = ei[i.toLowerCase()]), null == i))
              throw Error("Unknown paper size");
            return (
              (i[0] = p(i[0])),
              (i[1] = p(i[1])),
              n("landscape", !1) &&
                (i = [Math.max(i[0], i[1]), Math.min(i[0], i[1])]),
              (t = n("margin")),
              t &&
                ("string" == typeof t || "number" == typeof t
                  ? ((t = p(t, 0)),
                    (t = { left: t, top: t, right: t, bottom: t }))
                  : (t = {
                      left: p(t.left, 0),
                      top: p(t.top, 0),
                      right: p(t.right, 0),
                      bottom: p(t.bottom, 0),
                    }),
                n("addMargin") &&
                  ((i[0] += t.left + t.right), (i[1] += t.top + t.bottom))),
              { paperSize: i, margin: t }
            );
          }
          function at(n) {
            function s(t, i) {
              return n && null != n[t] ? n[t] : i;
            }
            var c,
              a,
              v,
              y,
              u = this,
              f = lt(),
              p = 0,
              h = [];
            u.getOption = s;
            u.attach = function (n) {
              return h.indexOf(n) < 0 && (fu(n, ++p), h.push(n)), n;
            };
            u.pages = [];
            u.FONTS = {};
            u.IMAGES = {};
            u.GRAD_COL_FUNCTIONS = {};
            u.GRAD_OPC_FUNCTIONS = {};
            u.GRAD_COL = {};
            u.GRAD_OPC = {};
            c = u.attach(new lr());
            a = u.attach(new ar());
            s("autoPrint") &&
              ((v = {}),
              (v.JavaScript = new r({
                Names: [
                  new e("JS"),
                  u.attach(
                    new r({ S: t("JavaScript"), JS: new e("print(true);") })
                  ),
                ],
              })),
              (c.props.Names = new r(v)));
            c.setPages(a);
            y = u.attach(
              new r({
                Producer: new e(s("producer", "Kendo UI PDF Generator")),
                Title: new e(s("title", "")),
                Author: new e(s("author", "")),
                Subject: new e(s("subject", "")),
                Keywords: new e(s("keywords", "")),
                Creator: new e(s("creator", "Kendo UI PDF Generator")),
                CreationDate: s("date", new Date()),
              })
            );
            u.addPage = function (n) {
              var f,
                e,
                t,
                o = vi(function (t, i) {
                  return n && null != n[t] ? n[t] : i;
                }),
                r = o.paperSize,
                i = o.margin,
                s = r[0],
                h = r[1];
              return (
                i && ((s -= i.left + i.right), (h -= i.top + i.bottom)),
                (f = new l(lt(), null, !0)),
                (e = {
                  Contents: u.attach(f),
                  Parent: a,
                  MediaBox: [0, 0, r[0], r[1]],
                }),
                (t = new wr(u, e)),
                (t._content = f),
                a.addPage(u.attach(t)),
                t.transform(1, 0, 0, -1, 0, r[1]),
                i && (t.translate(i.left, i.top), t.rect(0, 0, s, h), t.clip()),
                u.pages.push(t),
                t
              );
            };
            u.render = function () {
              var n, t;
              for (f("%PDF-1.4", i, "%ÂÁÚÏÎ", i, i), n = 0; n < h.length; ++n)
                h[n].renderFull(f), f(i, i);
              for (
                t = f.offset(),
                  f("xref", i, 0, " ", h.length + 1, i),
                  f("0000000000 65535 f ", i),
                  n = 0;
                n < h.length;
                ++n
              )
                f(o(h[n]._offset, 10), " 00000 n ", i);
              return (
                f(i),
                f("trailer", i),
                f(new r({ Size: h.length + 1, Root: c, Info: y }), i, i),
                f("startxref", i, t, i),
                f("%%EOF", i),
                f.stream().offset(0)
              );
            };
          }
          function eu(n, t) {
            function r() {
              window.console &&
                (window.console.error
                  ? window.console.error("Cannot load URL: %s", n)
                  : window.console.log("Cannot load URL: %s", n));
              t(null);
            }
            var u, i;
            return fi.msie && (u = /^data:.*?;base64,/i.exec(n))
              ? void t(ru(n.substr(u[0].length)))
              : ((i = new XMLHttpRequest()),
                i.open("GET", n, !0),
                v && (i.responseType = "arraybuffer"),
                (i.onload = function () {
                  200 == i.status || 304 == i.status
                    ? t(
                        v
                          ? new Uint8Array(i.response)
                          : new window.VBArray(i.responseBody).toArray()
                      )
                    : r();
                }),
                (i.onerror = r),
                void i.send(null));
          }
          function ou(n, t) {
            var i = ut[n];
            i
              ? t(i)
              : eu(n, function (i) {
                  if (null == i) throw Error("Cannot load font from " + n);
                  var r = new ai(i);
                  ut[n] = r;
                  t(r);
                });
          }
          function yi() {
            w = {};
          }
          function su(n, t, i) {
            function h(n) {
              r.src = n;
              r.complete && !fi.msie ? l() : ((r.onload = l), (r.onerror = s));
            }
            function c() {
              var h, a, k, v, c, y, f, o, p, l, b;
              t || (t = { width: r.width, height: r.height });
              h = document.createElement("canvas");
              h.width = t.width;
              h.height = t.height;
              a = h.getContext("2d");
              a.drawImage(r, 0, 0, t.width, t.height);
              try {
                k = a.getImageData(0, 0, t.width, t.height);
              } catch (d) {
                return void s();
              } finally {
                e && URL.revokeObjectURL(e);
              }
              for (v = !1, c = u(), y = u(), f = k.data, o = 0; o < f.length; )
                c.writeByte(f[o++]),
                  c.writeByte(f[o++]),
                  c.writeByte(f[o++]),
                  (p = f[o++]),
                  p < 255 && (v = !0),
                  y.writeByte(p);
              v
                ? (r = new pu(t.width, t.height, c, y))
                : ((l = h.toDataURL("image/jpeg")),
                  (l = l.substr(l.indexOf(";base64,") + 8)),
                  (b = u()),
                  b.writeBase64(l),
                  (r = new bi(b)));
              i((w[n] = r));
            }
            function s() {
              i((w[n] = "ERROR"));
            }
            function l() {
              if (
                (t &&
                  (t.width >= r.width || t.height >= r.height) &&
                  (t = null),
                !t && o && /^image\/jpe?g$/i.test(o.type))
              ) {
                var f = new FileReader();
                f.onload = function () {
                  try {
                    var t = new bi(u(new Uint8Array(this.result)));
                    URL.revokeObjectURL(e);
                    i((w[n] = t));
                  } catch (r) {
                    c();
                  }
                };
                f.readAsArrayBuffer(o);
              } else c();
            }
            var e,
              o,
              f,
              r = w[n];
            r
              ? i(r)
              : ((r = new Image()),
                /^data:/i.test(n) || (r.crossOrigin = "Anonymous"),
                v && !/^data:/i.test(n)
                  ? ((f = new XMLHttpRequest()),
                    (f.onload = function () {
                      o = f.response;
                      e = URL.createObjectURL(o);
                      h(e);
                    }),
                    (f.onerror = s),
                    f.open("GET", n, !0),
                    (f.responseType = "blob"),
                    f.send())
                  : h(n));
          }
          function hu(n) {
            return function (t, i) {
              function f() {
                0 == --r && i();
              }
              var r = t.length,
                u = r;
              if (0 === r) return i();
              for (; u-- > 0; ) n(t[u], f);
            };
          }
          function pi(n, t, i) {
            for (; n.length < t; ) n = i + n;
            return n;
          }
          function o(n, t) {
            return pi(n + "", t, "0");
          }
          function tt(n, t) {
            return Object.prototype.hasOwnProperty.call(n, t);
          }
          function cu(n) {
            return n instanceof Date;
          }
          function lu(n, t) {
            t("[");
            n.length > 0 &&
              t.withIndent(function () {
                for (var i = 0; i < n.length; ++i)
                  i > 0 && i % 8 == 0 ? t.indent(n[i]) : t(" ", n[i]);
              });
            t(" ]");
          }
          function au(n, t) {
            t(
              "(D:",
              o(n.getUTCFullYear(), 4),
              o(n.getUTCMonth() + 1, 2),
              o(n.getUTCDate(), 2),
              o(n.getUTCHours(), 2),
              o(n.getUTCMinutes(), 2),
              o(n.getUTCSeconds(), 2),
              "Z)"
            );
          }
          function wi(n) {
            return n * (72 / 25.4);
          }
          function vu(n) {
            return wi(10 * n);
          }
          function yu(n) {
            return 72 * n;
          }
          function p(n, t) {
            var i, r;
            if ("number" == typeof n) return n;
            if (
              "string" == typeof n &&
              ((i = /^\s*([0-9.]+)\s*(mm|cm|in|pt)\s*$/.exec(n)),
              i && ((r = parseFloat(i[1])), !isNaN(r)))
            )
              return "pt" == i[2] ? r : { mm: wi, cm: vu, in: yu }[i[2]](r);
            if (null != t) return t;
            throw Error("Can't parse unit: " + n);
          }
          function vt() {}
          function s(n, t, i) {
            i || (i = vt);
            n.prototype = new i();
            for (var r in t) tt(t, r) && (n.prototype[r] = t[r]);
            return n;
          }
          function t(n) {
            return tt(ot, n) ? ot[n] : (ot[n] = new si(n));
          }
          function bi(n) {
            var u, f, r, e, o, s, h, c, i;
            if ((n.offset(0), (o = n.readShort()), 65496 != o))
              throw Error("Invalid JPEG image");
            for (; !n.eof(); ) {
              if (((s = n.readByte()), 255 != s))
                throw Error("Invalid JPEG image");
              if (
                ((h = n.readByte()), (c = n.readShort()), vr.indexOf(h) >= 0)
              ) {
                e = n.readByte();
                f = n.readShort();
                u = n.readShort();
                r = n.readByte();
                break;
              }
              n.skip(c - 2);
            }
            if (null == r) throw Error("Invalid JPEG image");
            switch (
              ((i = {
                Type: t("XObject"),
                Subtype: t("Image"),
                Width: u,
                Height: f,
                BitsPerComponent: e,
                Filter: t("DCTDecode"),
              }),
              r)
            ) {
              case 1:
                i.ColorSpace = t("DeviceGray");
                break;
              case 3:
                i.ColorSpace = t("DeviceRGB");
                break;
              case 4:
                i.ColorSpace = t("DeviceCMYK");
                i.Decode = [1, 0, 1, 0, 1, 0, 1, 0];
            }
            this.asStream = function () {
              n.offset(0);
              var r = new l(n, i);
              return (r._resourceName = t("I" + ++y)), r;
            };
          }
          function pu(n, i, r, u) {
            this.asStream = function (f) {
              var o = new l(
                  u,
                  {
                    Type: t("XObject"),
                    Subtype: t("Image"),
                    Width: n,
                    Height: i,
                    BitsPerComponent: 8,
                    ColorSpace: t("DeviceGray"),
                  },
                  !0
                ),
                e = new l(
                  r,
                  {
                    Type: t("XObject"),
                    Subtype: t("Image"),
                    Width: n,
                    Height: i,
                    BitsPerComponent: 8,
                    ColorSpace: t("DeviceRGB"),
                    SMask: f.attach(o),
                  },
                  !0
                );
              return (e._resourceName = t("I" + ++y)), e;
            };
          }
          function g(n) {
            return n
              .map(function (n) {
                return oi(n)
                  ? g(n)
                  : "number" == typeof n
                  ? (Math.round(1e3 * n) / 1e3).toFixed(3)
                  : n;
              })
              .join(" ");
          }
          function wu(n, t, i, u, f, e, o) {
            var h = g([t, i, u, f, e, o]),
              s = n.GRAD_COL_FUNCTIONS[h];
            return (
              s ||
                (s = n.GRAD_COL_FUNCTIONS[h] =
                  n.attach(
                    new r({
                      FunctionType: 2,
                      Domain: [0, 1],
                      Range: [0, 1, 0, 1, 0, 1],
                      N: 1,
                      C0: [t, i, u],
                      C1: [f, e, o],
                    })
                  )),
              s
            );
          }
          function bu(n, t, i) {
            var f = g([t, i]),
              u = n.GRAD_OPC_FUNCTIONS[f];
            return (
              u ||
                (u = n.GRAD_OPC_FUNCTIONS[f] =
                  n.attach(
                    new r({
                      FunctionType: 2,
                      Domain: [0, 1],
                      Range: [0, 1],
                      N: 1,
                      C0: [t],
                      C1: [i],
                    })
                  )),
              u
            );
          }
          function ku(n, t) {
            function h(n) {
              return 1 == n.length
                ? n[0]
                : {
                    FunctionType: 3,
                    Functions: n,
                    Domain: [0, 1],
                    Bounds: s,
                    Encode: a,
                  };
            }
            for (
              var e, f, r, u, o = !1, c = [], l = [], s = [], a = [], i = 1;
              i < t.length;
              ++i
            )
              (e = t[i - 1]),
                (f = t[i]),
                (r = e.color),
                (u = f.color),
                l.push(wu(n, r.r, r.g, r.b, u.r, u.g, u.b)),
                (r.a < 1 || u.a < 1) && (o = !0),
                s.push(f.offset),
                a.push(0, 1);
            if (o)
              for (i = 1; i < t.length; ++i)
                (e = t[i - 1]),
                  (f = t[i]),
                  (r = e.color),
                  (u = f.color),
                  c.push(bu(n, r.a, u.a));
            return (
              s.pop(), { hasAlpha: o, colors: h(l), opacities: o ? h(c) : null }
            );
          }
          function du(n, i, u, f, e, o) {
            var s, h, c;
            return (
              o ||
                ((c = [i].concat(f)),
                u.forEach(function (n) {
                  c.push(n.offset, n.color.r, n.color.g, n.color.b);
                }),
                (h = g(c)),
                (s = n.GRAD_COL[h])),
              s ||
                ((s = new r({
                  Type: t("Shading"),
                  ShadingType: i ? 3 : 2,
                  ColorSpace: t("DeviceRGB"),
                  Coords: f,
                  Domain: [0, 1],
                  Function: e,
                  Extend: [!0, !0],
                })),
                n.attach(s),
                (s._resourceName = "S" + ++y),
                h && (n.GRAD_COL[h] = s)),
              s
            );
          }
          function gu(n, i, u, f, e, o) {
            var s, h, c;
            return (
              o ||
                ((c = [i].concat(f)),
                u.forEach(function (n) {
                  c.push(n.offset, n.color.a);
                }),
                (h = g(c)),
                (s = n.GRAD_OPC[h])),
              s ||
                ((s = new r({
                  Type: t("ExtGState"),
                  AIS: !1,
                  CA: 1,
                  ca: 1,
                  SMask: {
                    Type: t("Mask"),
                    S: t("Luminosity"),
                    G: n.attach(
                      new l("/a0 gs /s0 sh", {
                        Type: t("XObject"),
                        Subtype: t("Form"),
                        FormType: 1,
                        BBox: o
                          ? [o.left, o.top + o.height, o.left + o.width, o.top]
                          : [0, 1, 1, 0],
                        Group: {
                          Type: t("Group"),
                          S: t("Transparency"),
                          CS: t("DeviceGray"),
                          I: !0,
                        },
                        Resources: {
                          ExtGState: { a0: { CA: 1, ca: 1 } },
                          Shading: {
                            s0: {
                              ColorSpace: t("DeviceGray"),
                              Coords: f,
                              Domain: [0, 1],
                              ShadingType: i ? 3 : 2,
                              Function: e,
                              Extend: [!0, !0],
                            },
                          },
                        },
                      })
                    ),
                  },
                })),
                n.attach(s),
                (s._resourceName = "O" + ++y),
                h && (n.GRAD_OPC[h] = s)),
              s
            );
          }
          function nf(n, t, i) {
            var u = "radial" == t.type,
              r = ku(n, t.stops),
              f = u
                ? [t.start.x, t.start.y, t.start.r, t.end.x, t.end.y, t.end.r]
                : [t.start.x, t.start.y, t.end.x, t.end.y],
              e = du(n, u, t.stops, f, r.colors, t.userSpace && i),
              o = r.hasAlpha
                ? gu(n, u, t.stops, f, r.opacities, t.userSpace && i)
                : null;
            return { hasAlpha: r.hasAlpha, shading: e, opacity: o };
          }
          function tf(n) {
            return n.replace(/^\s*(['"])(.*)\1\s*$/, "$2");
          }
          function yt(n) {
            var i,
              t =
                /^\s*((normal|italic)\s+)?((normal|small-caps)\s+)?((normal|bold|\d+)\s+)?(([0-9.]+)(px|pt))(\/(([0-9.]+)(px|pt)|normal))?\s+(.*?)\s*$/i.exec(
                  n
                );
            return t
              ? ((i = t[8] ? parseInt(t[8], 10) : 12),
                {
                  italic: t[2] && "italic" == t[2].toLowerCase(),
                  variant: t[4],
                  bold: t[6] && /bold|700/i.test(t[6]),
                  fontSize: i,
                  lineHeight: t[12]
                    ? "normal" == t[12]
                      ? i
                      : parseInt(t[12], 10)
                    : null,
                  fontFamily: t[14].split(/\s*,\s*/g).map(tf),
                })
              : { fontSize: 12, fontFamily: "sans-serif" };
          }
          function pt(n) {
            function e(t) {
              return (
                n.bold && (t += "|bold"),
                n.italic && (t += "|italic"),
                t.toLowerCase()
              );
            }
            var u,
              t,
              i,
              r = n.fontFamily;
            if (r instanceof Array)
              for (i = 0; i < r.length && ((u = e(r[i])), !(t = f[u])); ++i);
            else t = f[r.toLowerCase()];
            for (; "function" == typeof t; ) t = t();
            return t || (t = "Times-Roman"), t;
          }
          function a(n, t) {
            n = n.toLowerCase();
            f[n] = function () {
              return f[t];
            };
            f[n + "|bold"] = function () {
              return f[t + "|bold"];
            };
            f[n + "|italic"] = function () {
              return f[t + "|italic"];
            };
            f[n + "|bold|italic"] = function () {
              return f[t + "|bold|italic"];
            };
          }
          function ki(n, t) {
            if (1 == arguments.length) for (var i in n) tt(n, i) && ki(i, n[i]);
            else
              switch (((n = n.toLowerCase()), (f[n] = t), n)) {
                case "dejavu sans":
                  f["sans-serif"] = t;
                  break;
                case "dejavu sans|bold":
                  f["sans-serif|bold"] = t;
                  break;
                case "dejavu sans|italic":
                  f["sans-serif|italic"] = t;
                  break;
                case "dejavu sans|bold|italic":
                  f["sans-serif|bold|italic"] = t;
                  break;
                case "dejavu serif":
                  f.serif = t;
                  break;
                case "dejavu serif|bold":
                  f["serif|bold"] = t;
                  break;
                case "dejavu serif|italic":
                  f["serif|italic"] = t;
                  break;
                case "dejavu serif|bold|italic":
                  f["serif|bold|italic"] = t;
                  break;
                case "dejavu mono":
                  f.monospace = t;
                  break;
                case "dejavu mono|bold":
                  f["monospace|bold"] = t;
                  break;
                case "dejavu mono|italic":
                  f["monospace|italic"] = t;
                  break;
                case "dejavu mono|bold|italic":
                  f["monospace|bold|italic"] = t;
              }
          }
          function rf(n, t) {
            var e = n[0],
              o = n[1],
              s = n[2],
              h = n[3],
              c = n[4],
              l = n[5],
              i = t[0],
              r = t[1],
              u = t[2],
              f = t[3],
              a = t[4],
              v = t[5];
            return [
              e * i + o * u,
              e * r + o * f,
              s * i + h * u,
              s * r + h * f,
              c * i + l * u + a,
              c * r + l * f + v,
            ];
          }
          function uf(n) {
            return (
              1 === n[0] &&
              0 === n[1] &&
              0 === n[2] &&
              1 === n[3] &&
              0 === n[4] &&
              0 === n[5]
            );
          }
          function wt(n, t) {
            function i(n, t, i) {
              return i || (i = s), i.pdf && null != i.pdf[n] ? i.pdf[n] : t;
            }
            function e() {
              function u(n) {
                var u,
                  f,
                  e,
                  o,
                  l,
                  s = n.options,
                  t = kf(n),
                  c = t.bbox;
                n = t.root;
                u = i("paperSize", i("paperSize", "auto"), s);
                f = !1;
                "auto" == u &&
                  (c
                    ? ((e = c.getSize()),
                      (u = [e.width, e.height]),
                      (f = !0),
                      (o = c.getOrigin()),
                      (t = new h.Group()),
                      t.transform(new d.Matrix(1, 0, 0, 1, -o.x, -o.y)),
                      t.append(n),
                      (n = t))
                    : (u = "A4"));
                l = r.addPage({
                  paperSize: u,
                  margin: i("margin", i("margin"), s),
                  addMargin: f,
                  landscape: i("landscape", i("landscape", !1), s),
                });
                di(n, l, r);
              }
              if (!(--o > 0)) {
                var r = new at({
                  producer: i("producer"),
                  title: i("title"),
                  author: i("author"),
                  subject: i("subject"),
                  keywords: i("keywords"),
                  creator: i("creator"),
                  date: i("date"),
                  autoPrint: i("autoPrint"),
                });
                c ? n.children.forEach(u) : u(n);
                t(r.render(), r);
              }
            }
            var o,
              f = [],
              r = {},
              s = n.options,
              c = i("multiPage"),
              u = i("imgDPI");
            u && yi();
            n.traverse(function (n) {
              kt(
                {
                  Image: function (n) {
                    var t,
                      i,
                      f = n.src();
                    u
                      ? ((t = n.bbox().size),
                        (i = r[f]),
                        (t = {
                          width: Math.ceil((t.width * u) / 72),
                          height: Math.ceil((t.height * u) / 72),
                        }),
                        i &&
                          ((t.width = Math.max(i.width, t.width)),
                          (t.height = Math.max(i.height, t.height))),
                        (r[f] = t))
                      : (r[f] = null);
                  },
                  Text: function (n) {
                    var i = yt(n.options.font),
                      t = pt(i);
                    f.indexOf(t) < 0 && f.push(t);
                  },
                },
                n
              );
            });
            o = 2;
            ft(f, e);
            et(r, e);
          }
          function it(n, t) {
            wt(n, function (n) {
              t("data:application/pdf;base64," + n.base64());
            });
          }
          function bt(n, t) {
            wt(n, function (n) {
              t(new window.Blob([n.get()], { type: "application/pdf" }));
            });
          }
          function ff(t, i, r, u) {
            window.Blob && !ni.safari
              ? bt(t, function (t) {
                  n.saveAs({ dataURI: t, fileName: i });
                  u && u(t);
                })
              : it(t, function (t) {
                  n.saveAs({ dataURI: t, fileName: i, proxyURL: r });
                  u && u(t);
                });
          }
          function kt(n, t) {
            var i = n[t.nodeType];
            return i ? i.call.apply(i, arguments) : t;
          }
          function di(n, t, i) {
            var f, u, r;
            n.options._pdfDebug && t.comment("BEGIN: " + n.options._pdfDebug);
            f = n.transform();
            u = n.opacity();
            t.save();
            null != u && u < 1 && t.setOpacity(u);
            ef(n, t, i);
            of(n, t, i);
            f && ((r = f.matrix()), t.transform(r.a, r.b, r.c, r.d, r.e, r.f));
            sf(n, t, i);
            kt(
              {
                Path: cf,
                MultiPath: lf,
                Circle: af,
                Arc: vf,
                Text: yf,
                Image: wf,
                Group: pf,
                Rect: bf,
              },
              n,
              t,
              i
            );
            t.restore();
            n.options._pdfDebug && t.comment("END: " + n.options._pdfDebug);
          }
          function ef(n, t) {
            var i,
              u,
              f,
              e,
              o,
              s,
              r = n.stroke && n.stroke();
            if (r) {
              if ((i = r.color)) {
                if (((i = gt(i)), null == i)) return;
                t.setStrokeColor(i.r, i.g, i.b);
                1 != i.a && t.setStrokeOpacity(i.a);
              }
              if (((u = r.width), null != u)) {
                if (0 === u) return;
                t.setLineWidth(u);
              }
              f = r.dashType;
              f && t.setDashPattern(br[f], 0);
              e = r.lineCap;
              e && t.setLineCap(kr[e]);
              o = r.lineJoin;
              o && t.setLineJoin(dr[o]);
              s = r.opacity;
              null != s && t.setStrokeOpacity(s);
            }
          }
          function of(n, t) {
            var i,
              u,
              r = n.fill && n.fill();
            if (r && !(r instanceof h.Gradient)) {
              if ((i = r.color)) {
                if (((i = gt(i)), null == i)) return;
                t.setFillColor(i.r, i.g, i.b);
                1 != i.a && t.setFillOpacity(i.a);
              }
              u = r.opacity;
              null != u && t.setFillOpacity(u);
            }
          }
          function sf(n, t, i) {
            var r = n.clip();
            r && (dt(r, t, i), t.clip());
          }
          function k(n) {
            return (
              n &&
              (n instanceof h.Gradient ||
                (n.color &&
                  !/^(none|transparent)$/i.test(n.color) &&
                  (null == n.width || n.width > 0) &&
                  (null == n.opacity || n.opacity > 0)))
            );
          }
          function gi(n, t, i, r) {
            var o,
              s,
              c,
              f,
              v,
              e,
              l,
              a,
              u = n.fill();
            if (u instanceof h.Gradient)
              return (
                r ? t.clipStroke() : t.clip(),
                (o = u instanceof h.RadialGradient),
                o
                  ? ((s = { x: u.center().x, y: u.center().y, r: 0 }),
                    (c = { x: u.center().x, y: u.center().y, r: u.radius() }))
                  : ((s = { x: u.start().x, y: u.start().y }),
                    (c = { x: u.end().x, y: u.end().y })),
                (f = u.stops.elements().map(function (n) {
                  var i,
                    t = n.offset();
                  return (
                    (t = /%$/.test(t) ? parseFloat(t) / 100 : parseFloat(t)),
                    (i = gt(n.color())),
                    (i.a *= n.opacity()),
                    { offset: t, color: i }
                  );
                })),
                f.unshift(f[0]),
                f.push(f[f.length - 1]),
                (v = {
                  userSpace: u.userSpace(),
                  type: o ? "radial" : "linear",
                  start: s,
                  end: c,
                  stops: f,
                }),
                (e = n.rawBBox()),
                (l = e.topLeft()),
                (a = e.getSize()),
                (e = { left: l.x, top: l.y, width: a.width, height: a.height }),
                t.gradient(v, e),
                !0
              );
          }
          function nt(n, t, i) {
            k(n.fill()) && k(n.stroke())
              ? gi(n, t, i, !0) || t.fillStroke()
              : k(n.fill())
              ? gi(n, t, i, !1) || t.fill()
              : k(n.stroke())
              ? t.stroke()
              : t.nop();
          }
          function hf(n, t) {
            var i,
              r,
              f,
              u = n.segments;
            if (4 == u.length && n.options.closed) {
              for (i = [], r = 0; r < u.length; ++r) {
                if (u[r].controlIn()) return !1;
                i[r] = u[r].anchor();
              }
              if (
                (f =
                  (i[0].y == i[1].y &&
                    i[1].x == i[2].x &&
                    i[2].y == i[3].y &&
                    i[3].x == i[0].x) ||
                  (i[0].x == i[1].x &&
                    i[1].y == i[2].y &&
                    i[2].x == i[3].x &&
                    i[3].y == i[0].y))
              )
                return (
                  t.rect(i[0].x, i[0].y, i[2].x - i[0].x, i[2].y - i[0].y), !0
                );
            }
          }
          function dt(n, t, i) {
            var s,
              u,
              f,
              r,
              e,
              o,
              h = n.segments;
            if (0 !== h.length && !hf(n, t, i)) {
              for (u = 0; u < h.length; ++u)
                (f = h[u]),
                  (r = f.anchor()),
                  s
                    ? ((e = s.controlOut()),
                      (o = f.controlIn()),
                      e && o
                        ? t.bezier(e.x, e.y, o.x, o.y, r.x, r.y)
                        : t.lineTo(r.x, r.y))
                    : t.moveTo(r.x, r.y),
                  (s = f);
              n.options.closed && t.close();
            }
          }
          function cf(n, t, i) {
            dt(n, t, i);
            nt(n, t, i);
          }
          function lf(n, t, i) {
            for (var u = n.paths, r = 0; r < u.length; ++r) dt(u[r], t, i);
            nt(n, t, i);
          }
          function af(n, t, i) {
            var r = n.geometry();
            t.circle(r.center.x, r.center.y, r.radius);
            nt(n, t, i);
          }
          function vf(n, t, i) {
            var u,
              r = n.geometry().curvePoints();
            for (t.moveTo(r[0].x, r[0].y), u = 1; u < r.length; )
              t.bezier(r[u].x, r[u++].y, r[u].x, r[u++].y, r[u].x, r[u++].y);
            nt(n, t, i);
          }
          function yf(n, t) {
            var i,
              r = yt(n.options.font),
              u = n._position;
            n.fill() && n.stroke()
              ? (i = ht.fillAndStroke)
              : n.fill()
              ? (i = ht.fill)
              : n.stroke() && (i = ht.stroke);
            t.transform(1, 0, 0, -1, u.x, u.y + r.fontSize);
            t.beginText();
            t.setFont(pt(r), r.fontSize);
            t.setTextRenderingMode(i);
            t.showText(n.content(), n._pdfRect ? n._pdfRect.width() : null);
            t.endText();
          }
          function pf(n, t, i) {
            var u, r;
            for (
              n._pdfLink && t.addLink(n._pdfLink.url, n._pdfLink),
                u = n.children,
                r = 0;
              r < u.length;
              ++r
            )
              di(u[r], t, i);
          }
          function wf(n, t) {
            var r,
              u,
              i,
              f = n.src();
            f &&
              ((r = n.rect()),
              (u = r.getOrigin()),
              (i = r.getSize()),
              t.transform(i.width, 0, 0, -i.height, u.x, u.y + i.height),
              t.drawImage(f));
          }
          function bf(n, t, i) {
            var r = n.geometry();
            t.rect(r.origin.x, r.origin.y, r.size.width, r.size.height);
            nt(n, t, i);
          }
          function gt(t) {
            var i = n.parseColor(t, !0);
            return i ? i.toRGB() : null;
          }
          function kf(n) {
            function t(n) {
              return (e = !0), n;
            }
            function r(n) {
              return (
                n.visible() && n.opacity() > 0 && (k(n.fill()) || k(n.stroke()))
              );
            }
            function o(n) {
              for (var i, r = [], t = 0; t < n.length; ++t)
                (i = s(n[t])), null != i && r.push(i);
              return r;
            }
            function c(n, t) {
              var r,
                f = i,
                e = u;
              n.transform() && (u = u.multiplyCopy(n.transform().matrix()));
              r = n.clip();
              r &&
                ((r = r.bbox()),
                r && ((r = r.bbox(u)), (i = i ? d.Rect.intersect(i, r) : r)));
              try {
                return t();
              } finally {
                i = f;
                u = e;
              }
            }
            function l(n) {
              if (null == i) return !1;
              var t = n.rawBBox().bbox(u);
              return i && t && (t = d.Rect.intersect(t, i)), t;
            }
            function s(i) {
              return c(i, function () {
                if (!(i instanceof h.Group || i instanceof h.MultiPath)) {
                  var u = l(i);
                  if (!u) return t(null);
                  f = f ? d.Rect.union(f, u) : u;
                }
                return kt(
                  {
                    Path: function (n) {
                      return 0 !== n.segments.length && r(n) ? n : t(null);
                    },
                    MultiPath: function (n) {
                      if (!r(n)) return t(null);
                      var i = new h.MultiPath(n.options);
                      return (
                        (i.paths = o(n.paths)),
                        0 === i.paths.length ? t(null) : i
                      );
                    },
                    Circle: function (n) {
                      return r(n) ? n : t(null);
                    },
                    Arc: function (n) {
                      return r(n) ? n : t(null);
                    },
                    Text: function (n) {
                      return /\S/.test(n.content()) && r(n) ? n : t(null);
                    },
                    Image: function (n) {
                      return n.visible() && n.opacity() > 0 ? n : t(null);
                    },
                    Group: function (i) {
                      if (!(i.visible() && i.opacity() > 0)) return t(null);
                      var r = new h.Group(i.options);
                      return (
                        (r.children = o(i.children)),
                        (r._pdfLink = i._pdfLink),
                        i === n || 0 !== r.children.length || i._pdfLink
                          ? r
                          : t(null)
                      );
                    },
                    Rect: function (n) {
                      return r(n) ? n : t(null);
                    },
                  },
                  i
                );
              });
            }
            var e,
              i = !1,
              u = d.Matrix.unit(),
              f = null;
            do (e = !1), (n = s(n));
            while (n && e);
            return { root: n, bbox: f };
          }
          function df(n, t) {
            var i,
              r = ii.createPromise();
            for (i in t)
              ("margin" == i && n.options.pdf && n.options.pdf._ignoreMargin) ||
                n.options.set("pdf." + i, t[i]);
            return it(n, r.resolve), r;
          }
          function gf(n, t) {
            var i,
              r = ii.createPromise();
            for (i in t)
              ("margin" == i && n.options.pdf && n.options.pdf._ignoreMargin) ||
                n.options.set("pdf." + i, t[i]);
            return (
              window.Blob && !ni.safari ? bt(n, r.resolve) : it(n, r.resolve), r
            );
          }
          var nr,
            ni,
            ti,
            h,
            ii,
            d,
            v,
            rt,
            tr,
            ir,
            rr,
            ur,
            fr,
            er,
            or,
            sr,
            ri,
            hr,
            ui,
            fi,
            i,
            y,
            ei,
            ut,
            w,
            ft,
            et,
            oi,
            e,
            cr,
            si,
            ot,
            r,
            l,
            lr,
            ar,
            vr,
            yr,
            st,
            pr,
            wr,
            f,
            hi,
            ht,
            br,
            kr,
            dr;
          window.kendo.pdf = window.kendo.pdf || {};
          nr = n.support;
          ni = nr.browser;
          ti = n.pdf;
          h = n.drawing;
          ii = h.util;
          d = n.geometry;
          v =
            "undefined" != typeof Uint8Array &&
            n.support.browser &&
            (!n.support.browser.msie || n.support.browser.version > 9);
          rt = (function () {
            var n =
              "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
            return {
              decode: function (t) {
                for (
                  var s,
                    e,
                    u,
                    o,
                    h,
                    c,
                    l,
                    i = t.replace(/[^A-Za-z0-9\+\/\=]/g, ""),
                    r = 0,
                    a = i.length,
                    f = [];
                  r < a;

                )
                  (s = n.indexOf(i.charAt(r++))),
                    (e = n.indexOf(i.charAt(r++))),
                    (u = n.indexOf(i.charAt(r++))),
                    (o = n.indexOf(i.charAt(r++))),
                    (h = (s << 2) | (e >>> 4)),
                    (c = ((15 & e) << 4) | (u >>> 2)),
                    (l = ((3 & u) << 6) | o),
                    f.push(h),
                    64 != u && f.push(c),
                    64 != o && f.push(l);
                return f;
              },
              encode: function (t) {
                for (
                  var u, f, e, h, c, o, r, i = 0, s = t.length, l = "";
                  i < s;

                )
                  (u = t[i++]),
                    (f = t[i++]),
                    (e = t[i++]),
                    (h = u >>> 2),
                    (c = ((3 & u) << 4) | (f >>> 4)),
                    (o = ((15 & f) << 2) | (e >>> 6)),
                    (r = 63 & e),
                    i - s == 2 ? (o = r = 64) : i - s == 1 && (r = 64),
                    (l +=
                      n.charAt(h) + n.charAt(c) + n.charAt(o) + n.charAt(r));
                return l;
              },
            };
          })();
          ci.prototype = {
            readTable: function (n, t) {
              var i = this.tables[n];
              if (!i) throw Error("Table " + n + " not found in directory");
              return (this[n] = i.table = new t(this, i));
            },
            render: function (n) {
              var h,
                i,
                s,
                e,
                r,
                f,
                c,
                l,
                y = this,
                o = Object.keys(n).length,
                a = Math.pow(2, Math.floor(Math.log(o) / Math.LN2)),
                v = 16 * a,
                p = Math.floor(Math.log(a) / Math.LN2),
                w = 16 * o - v,
                t = u();
              t.writeLong(this.scalerType);
              t.writeShort(o);
              t.writeShort(v);
              t.writeShort(p);
              t.writeShort(w);
              h = 16 * o;
              i = t.offset() + h;
              s = null;
              e = u();
              for (r in n)
                if (b(n, r))
                  for (
                    f = n[r],
                      t.writeString(r),
                      t.writeLong(y.checksum(f)),
                      t.writeLong(i),
                      t.writeLong(f.length),
                      e.write(f),
                      "head" == r && (s = i),
                      i += f.length;
                    i % 4;

                  )
                    e.writeByte(0), i++;
              return (
                t.write(e.get()),
                (c = this.checksum(t.get())),
                (l = 2981146554 - c),
                t.offset(s + 8),
                t.writeLong(l),
                t.get()
              );
            },
            checksum: function (n) {
              n = u(n);
              for (var t = 0; !n.eof(); ) t += n.readLong();
              return 4294967295 & t;
            },
          };
          tr = c({
            parse: function (n) {
              n.offset(this.offset);
              this.version = n.readLong();
              this.revision = n.readLong();
              this.checkSumAdjustment = n.readLong();
              this.magicNumber = n.readLong();
              this.flags = n.readShort();
              this.unitsPerEm = n.readShort();
              this.created = n.read(8);
              this.modified = n.read(8);
              this.xMin = n.readShort_();
              this.yMin = n.readShort_();
              this.xMax = n.readShort_();
              this.yMax = n.readShort_();
              this.macStyle = n.readShort();
              this.lowestRecPPEM = n.readShort();
              this.fontDirectionHint = n.readShort_();
              this.indexToLocFormat = n.readShort_();
              this.glyphDataFormat = n.readShort_();
            },
            render: function (n) {
              var t = u();
              return (
                t.writeLong(this.version),
                t.writeLong(this.revision),
                t.writeLong(0),
                t.writeLong(this.magicNumber),
                t.writeShort(this.flags),
                t.writeShort(this.unitsPerEm),
                t.write(this.created),
                t.write(this.modified),
                t.writeShort_(this.xMin),
                t.writeShort_(this.yMin),
                t.writeShort_(this.xMax),
                t.writeShort_(this.yMax),
                t.writeShort(this.macStyle),
                t.writeShort(this.lowestRecPPEM),
                t.writeShort_(this.fontDirectionHint),
                t.writeShort_(n),
                t.writeShort_(this.glyphDataFormat),
                t.get()
              );
            },
          });
          ir = c({
            parse: function (n) {
              n.offset(this.offset);
              var t = this.file.head.indexToLocFormat;
              this.offsets =
                0 === t
                  ? n.times(this.length / 2, function () {
                      return 2 * n.readShort();
                    })
                  : n.times(this.length / 4, n.readLong);
            },
            offsetOf: function (n) {
              return this.offsets[n];
            },
            lengthOf: function (n) {
              return this.offsets[n + 1] - this.offsets[n];
            },
            render: function (n) {
              for (
                var i = u(), r = n[n.length - 1] > 65535, t = 0;
                t < n.length;
                ++t
              )
                r ? i.writeLong(n[t]) : i.writeShort(n[t] / 2);
              return { format: r ? 1 : 0, table: i.get() };
            },
          });
          rr = c({
            parse: function (n) {
              n.offset(this.offset);
              this.version = n.readLong();
              this.ascent = n.readShort_();
              this.descent = n.readShort_();
              this.lineGap = n.readShort_();
              this.advanceWidthMax = n.readShort();
              this.minLeftSideBearing = n.readShort_();
              this.minRightSideBearing = n.readShort_();
              this.xMaxExtent = n.readShort_();
              this.caretSlopeRise = n.readShort_();
              this.caretSlopeRun = n.readShort_();
              this.caretOffset = n.readShort_();
              n.skip(8);
              this.metricDataFormat = n.readShort_();
              this.numOfLongHorMetrics = n.readShort();
            },
            render: function (n) {
              var t = u();
              return (
                t.writeLong(this.version),
                t.writeShort_(this.ascent),
                t.writeShort_(this.descent),
                t.writeShort_(this.lineGap),
                t.writeShort(this.advanceWidthMax),
                t.writeShort_(this.minLeftSideBearing),
                t.writeShort_(this.minRightSideBearing),
                t.writeShort_(this.xMaxExtent),
                t.writeShort_(this.caretSlopeRise),
                t.writeShort_(this.caretSlopeRun),
                t.writeShort_(this.caretOffset),
                t.write([0, 0, 0, 0, 0, 0, 0, 0]),
                t.writeShort_(this.metricDataFormat),
                t.writeShort(n.length),
                t.get()
              );
            },
          });
          ur = c({
            parse: function (n) {
              n.offset(this.offset);
              this.version = n.readLong();
              this.numGlyphs = n.readShort();
              this.maxPoints = n.readShort();
              this.maxContours = n.readShort();
              this.maxComponentPoints = n.readShort();
              this.maxComponentContours = n.readShort();
              this.maxZones = n.readShort();
              this.maxTwilightPoints = n.readShort();
              this.maxStorage = n.readShort();
              this.maxFunctionDefs = n.readShort();
              this.maxInstructionDefs = n.readShort();
              this.maxStackElements = n.readShort();
              this.maxSizeOfInstructions = n.readShort();
              this.maxComponentElements = n.readShort();
              this.maxComponentDepth = n.readShort();
            },
            render: function (n) {
              var t = u();
              return (
                t.writeLong(this.version),
                t.writeShort(n.length),
                t.writeShort(this.maxPoints),
                t.writeShort(this.maxContours),
                t.writeShort(this.maxComponentPoints),
                t.writeShort(this.maxComponentContours),
                t.writeShort(this.maxZones),
                t.writeShort(this.maxTwilightPoints),
                t.writeShort(this.maxStorage),
                t.writeShort(this.maxFunctionDefs),
                t.writeShort(this.maxInstructionDefs),
                t.writeShort(this.maxStackElements),
                t.writeShort(this.maxSizeOfInstructions),
                t.writeShort(this.maxComponentElements),
                t.writeShort(this.maxComponentDepth),
                t.get()
              );
            },
          });
          fr = c({
            parse: function (n) {
              var t, i, r;
              n.offset(this.offset);
              t = this.file;
              i = t.hhea;
              this.metrics = n.times(i.numOfLongHorMetrics, function () {
                return { advance: n.readShort(), lsb: n.readShort_() };
              });
              r = t.maxp.numGlyphs - t.hhea.numOfLongHorMetrics;
              this.leftSideBearings = n.times(r, n.readShort_);
            },
            forGlyph: function (n) {
              var t = this.metrics,
                i = t.length;
              return n < i
                ? t[n]
                : {
                    advance: t[i - 1].advance,
                    lsb: this.leftSideBearings[n - i],
                  };
            },
            render: function (n) {
              for (var i, f = this, r = u(), t = 0; t < n.length; ++t)
                (i = f.forGlyph(n[t])),
                  r.writeShort(i.advance),
                  r.writeShort_(i.lsb);
              return r.get();
            },
          });
          er = (function () {
            function n(n) {
              this.raw = n;
            }
            function t(n) {
              var u, s, t;
              for (
                this.raw = n, u = this.glyphIds = [], s = this.idOffsets = [];
                ;

              ) {
                if (
                  ((t = n.readShort()),
                  s.push(n.offset()),
                  u.push(n.readShort()),
                  !(t & f))
                )
                  break;
                n.skip(t & i ? 4 : 2);
                t & o ? n.skip(8) : t & e ? n.skip(4) : t & r && n.skip(2);
              }
            }
            var i, r, f, e, o;
            return (
              (n.prototype = {
                compound: !1,
                render: function () {
                  return this.raw.get();
                },
              }),
              (i = 1),
              (r = 8),
              (f = 32),
              (e = 64),
              (o = 128),
              (t.prototype = {
                compound: !0,
                render: function (n) {
                  for (
                    var r, f = this, i = u(this.raw.get()), t = 0;
                    t < this.glyphIds.length;
                    ++t
                  )
                    (r = f.glyphIds[t]),
                      i.offset(f.idOffsets[t]),
                      i.writeShort(n[r]);
                  return i.get();
                },
              }),
              c({
                parse: function () {
                  this.cache = {};
                },
                glyphFor: function (i) {
                  var o,
                    s,
                    c,
                    l,
                    r,
                    h,
                    a,
                    v,
                    y,
                    p,
                    f,
                    e = this.cache;
                  return b(e, i)
                    ? e[i]
                    : ((o = this.file.loca),
                      (s = o.lengthOf(i)),
                      0 === s
                        ? (e[i] = null)
                        : ((c = this.rawData),
                          (l = this.offset + o.offsetOf(i)),
                          (r = u(c.slice(l, s))),
                          (h = r.readShort_()),
                          (a = r.readShort_()),
                          (v = r.readShort_()),
                          (y = r.readShort_()),
                          (p = r.readShort_()),
                          (f = e[i] = h == -1 ? new t(r) : new n(r)),
                          (f.numberOfContours = h),
                          (f.xMin = a),
                          (f.yMin = v),
                          (f.xMax = y),
                          (f.yMax = p),
                          f));
                },
                render: function (n, t, i) {
                  for (var s, e, f = u(), o = [], r = 0; r < t.length; ++r)
                    (s = t[r]),
                      (e = n[s]),
                      o.push(f.offset()),
                      e && f.write(e.render(i));
                  return o.push(f.offset()), { table: f.get(), offsets: o };
                },
              })
            );
          })();
          or = (function () {
            function n(n, t) {
              this.text = n;
              this.length = n.length;
              this.platformID = t.platformID;
              this.platformSpecificID = t.platformSpecificID;
              this.languageID = t.languageID;
              this.nameID = t.nameID;
            }
            return c({
              parse: function (t) {
                var e, o, f, r, u, i, s;
                for (
                  t.offset(this.offset),
                    t.readShort(),
                    e = t.readShort(),
                    o = this.offset + t.readShort(),
                    f = t.times(e, function () {
                      return {
                        platformID: t.readShort(),
                        platformSpecificID: t.readShort(),
                        languageID: t.readShort(),
                        nameID: t.readShort(),
                        length: t.readShort(),
                        offset: t.readShort() + o,
                      };
                    }),
                    r = this.strings = {},
                    u = 0;
                  u < f.length;
                  ++u
                )
                  (i = f[u]),
                    t.offset(i.offset),
                    (s = t.readString(i.length)),
                    r[i.nameID] || (r[i.nameID] = []),
                    r[i.nameID].push(new n(s, i));
                this.postscriptEntry = r[6][0];
                this.postscriptName = this.postscriptEntry.text.replace(
                  /[^\x20-\x7F]/g,
                  ""
                );
              },
              render: function (t) {
                var r,
                  i,
                  o,
                  h,
                  s,
                  f,
                  l = this,
                  e = this.strings,
                  c = 0;
                for (r in e) b(e, r) && (c += e[r].length);
                i = u();
                o = u();
                i.writeShort(0);
                i.writeShort(c);
                i.writeShort(6 + 12 * c);
                for (r in e)
                  if (b(e, r))
                    for (
                      h = 6 == r ? [new n(t, l.postscriptEntry)] : e[r], s = 0;
                      s < h.length;
                      ++s
                    )
                      (f = h[s]),
                        i.writeShort(f.platformID),
                        i.writeShort(f.platformSpecificID),
                        i.writeShort(f.languageID),
                        i.writeShort(f.nameID),
                        i.writeShort(f.length),
                        i.writeShort(o.offset()),
                        o.writeString(f.text);
                return i.write(o.get()), i.get();
              },
            });
          })();
          sr = (function () {
            var n =
              ".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore grave a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave ecircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent sterling section bullet paragraph germandbls registered copyright trademark acute dieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu partialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash questiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft guillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash quotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute Ucircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla hungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth eth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior onehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla Cacute cacute Ccaron ccaron dcroat".split(
                /\s+/g
              );
            return c({
              parse: function (n) {
                var t,
                  i,
                  r = this;
                switch (
                  (n.offset(this.offset),
                  (this.format = n.readLong()),
                  (this.italicAngle = n.readFixed_()),
                  (this.underlinePosition = n.readShort_()),
                  (this.underlineThickness = n.readShort_()),
                  (this.isFixedPitch = n.readLong()),
                  (this.minMemType42 = n.readLong()),
                  (this.maxMemType42 = n.readLong()),
                  (this.minMemType1 = n.readLong()),
                  (this.maxMemType1 = n.readLong()),
                  this.format)
                ) {
                  case 131072:
                    for (
                      t = n.readShort(),
                        this.glyphNameIndex = n.times(t, n.readShort),
                        this.names = [],
                        i = this.offset + this.length;
                      n.offset() < i;

                    )
                      r.names.push(n.readString(n.readByte()));
                    break;
                  case 151552:
                    t = n.readShort();
                    this.offsets = n.read(t);
                    break;
                  case 262144:
                    this.map = n.times(this.file.maxp.numGlyphs, n.readShort);
                }
              },
              glyphFor: function (t) {
                switch (this.format) {
                  case 65536:
                    return n[t] || ".notdef";
                  case 131072:
                    var i = this.glyphNameIndex[t];
                    return i < n.length
                      ? n[i]
                      : this.names[i - n.length] || ".notdef";
                  case 151552:
                  case 196608:
                    return ".notdef";
                  case 262144:
                    return this.map[t] || 65535;
                }
              },
              render: function (t) {
                var r,
                  e,
                  f,
                  i,
                  h,
                  o,
                  s,
                  c = this;
                if (196608 == this.format) return this.raw();
                for (
                  r = u(this.rawData.slice(this.offset, 32)),
                    r.writeLong(131072),
                    r.offset(32),
                    e = [],
                    f = [],
                    i = 0;
                  i < t.length;
                  ++i
                )
                  (h = t[i]),
                    (o = c.glyphFor(h)),
                    (s = n.indexOf(o)),
                    s >= 0
                      ? e.push(s)
                      : (e.push(n.length + f.length), f.push(o));
                for (r.writeShort(t.length), i = 0; i < e.length; ++i)
                  r.writeShort(e[i]);
                for (i = 0; i < f.length; ++i)
                  r.writeByte(f[i].length), r.writeString(f[i]);
                return r.get();
              },
            });
          })();
          ri = (function () {
            function n(n, t, i) {
              var r = this;
              r.platformID = n.readShort();
              r.platformSpecificID = n.readShort();
              r.offset = t + n.readLong();
              n.saveExcursion(function () {
                var u, t, f, c, l, o, s, a, v, h, y, e, p, w, b, k, d;
                switch ((n.offset(r.offset), (r.format = n.readShort()))) {
                  case 0:
                    for (
                      r.length = n.readShort(),
                        r.language = n.readShort(),
                        t = 0;
                      t < 256;
                      ++t
                    )
                      i[t] = n.readByte();
                    break;
                  case 4:
                    for (
                      r.length = n.readShort(),
                        r.language = n.readShort(),
                        f = n.readShort() / 2,
                        n.skip(6),
                        c = n.times(f, n.readShort),
                        n.skip(2),
                        l = n.times(f, n.readShort),
                        o = n.times(f, n.readShort_),
                        s = n.times(f, n.readShort),
                        a = (r.length + r.offset - n.offset()) / 2,
                        v = n.times(a, n.readShort),
                        t = 0;
                      t < f;
                      ++t
                    )
                      for (h = l[t], y = c[t], u = h; u <= y; ++u)
                        0 === s[t]
                          ? (e = u + o[t])
                          : ((p = s[t] / 2 - (f - t) + (u - h)),
                            (e = v[p] || 0),
                            0 !== e && (e += o[t])),
                          (i[u] = 65535 & e);
                    break;
                  case 6:
                    for (
                      r.length = n.readShort(),
                        r.language = n.readShort(),
                        u = n.readShort(),
                        w = n.readShort();
                      w-- > 0;

                    )
                      i[u++] = n.readShort();
                    break;
                  case 12:
                    for (
                      n.readShort(),
                        r.length = n.readLong(),
                        r.language = n.readLong(),
                        b = n.readLong();
                      b-- > 0;

                    )
                      for (
                        u = n.readLong(), k = n.readLong(), d = n.readLong();
                        u <= k;

                      )
                        i[u++] = d++;
                    break;
                  default:
                    window.console &&
                      window.console.error(
                        "Unhandled CMAP format: " + r.format
                      );
                }
              });
            }
            function t(n, t) {
              function w(i) {
                return t[n[i]];
              }
              for (
                var s,
                  g,
                  b,
                  f,
                  k,
                  y,
                  nt,
                  tt,
                  h,
                  c,
                  l,
                  e,
                  it,
                  d,
                  p,
                  i,
                  rt = ct(n),
                  a = [],
                  v = [],
                  o = null,
                  ut = null,
                  r = 0;
                r < rt.length;
                ++r
              )
                (s = rt[r]),
                  (g = w(s)),
                  (b = g - s),
                  (null != o && b === ut) ||
                    (o && v.push(o), a.push(s), (ut = b)),
                  (o = s);
              for (
                o && v.push(o),
                  v.push(65535),
                  a.push(65535),
                  f = a.length,
                  k = 2 * f,
                  y = 2 * Math.pow(2, Math.floor(Math.log(f) / Math.LN2)),
                  nt = Math.log(y / 2) / Math.LN2,
                  tt = k - y,
                  h = [],
                  c = [],
                  l = [],
                  r = 0;
                r < f;
                ++r
              ) {
                if (((e = a[r]), (it = v[r]), 65535 == e)) {
                  h.push(0);
                  c.push(0);
                  break;
                }
                if (((d = w(e)), e - d >= 32768))
                  for (
                    h.push(0), c.push(2 * (l.length + f - r)), p = e;
                    p <= it;
                    ++p
                  )
                    l.push(w(p));
                else h.push(d - e), c.push(0);
              }
              return (
                (i = u()),
                i.writeShort(3),
                i.writeShort(1),
                i.writeLong(12),
                i.writeShort(4),
                i.writeShort(16 + 8 * f + 2 * l.length),
                i.writeShort(0),
                i.writeShort(k),
                i.writeShort(y),
                i.writeShort(nt),
                i.writeShort(tt),
                v.forEach(i.writeShort),
                i.writeShort(0),
                a.forEach(i.writeShort),
                h.forEach(i.writeShort_),
                c.forEach(i.writeShort),
                l.forEach(i.writeShort),
                i.get()
              );
            }
            return c({
              parse: function (t) {
                var r,
                  i = this,
                  u = i.offset;
                t.offset(u);
                i.codeMap = {};
                i.version = t.readShort();
                r = t.readShort();
                i.tables = t.times(r, function () {
                  return new n(t, u, i.codeMap);
                });
              },
              render: function (n, i) {
                var r = u();
                return (
                  r.writeShort(0), r.writeShort(1), r.write(t(n, i)), r.get()
                );
              },
            });
          })();
          hr = c({
            parse: function (n) {
              n.offset(this.offset);
              this.version = n.readShort();
              this.averageCharWidth = n.readShort_();
              this.weightClass = n.readShort();
              this.widthClass = n.readShort();
              this.type = n.readShort();
              this.ySubscriptXSize = n.readShort_();
              this.ySubscriptYSize = n.readShort_();
              this.ySubscriptXOffset = n.readShort_();
              this.ySubscriptYOffset = n.readShort_();
              this.ySuperscriptXSize = n.readShort_();
              this.ySuperscriptYSize = n.readShort_();
              this.ySuperscriptXOffset = n.readShort_();
              this.ySuperscriptYOffset = n.readShort_();
              this.yStrikeoutSize = n.readShort_();
              this.yStrikeoutPosition = n.readShort_();
              this.familyClass = n.readShort_();
              this.panose = n.times(10, n.readByte);
              this.charRange = n.times(4, n.readLong);
              this.vendorID = n.readString(4);
              this.selection = n.readShort();
              this.firstCharIndex = n.readShort();
              this.lastCharIndex = n.readShort();
              this.version > 0 &&
                ((this.ascent = n.readShort_()),
                (this.descent = n.readShort_()),
                (this.lineGap = n.readShort_()),
                (this.winAscent = n.readShort()),
                (this.winDescent = n.readShort()),
                (this.codePageRange = n.times(2, n.readLong)),
                this.version > 1 &&
                  ((this.xHeight = n.readShort()),
                  (this.capHeight = n.readShort()),
                  (this.defaultChar = n.readShort()),
                  (this.breakChar = n.readShort()),
                  (this.maxContext = n.readShort())));
            },
            render: function () {
              return this.raw();
            },
          });
          ui = 1e5;
          li.prototype = {
            use: function (n) {
              var i,
                r,
                u,
                t = this;
              return "string" == typeof n
                ? gr(n).reduce(function (n, i) {
                    return n + String.fromCharCode(t.use(i));
                  }, "")
                : ((i = t.unicodes[n]),
                  i ||
                    ((i = t.next++),
                    (t.subset[i] = n),
                    (t.unicodes[n] = i),
                    (r = t.font.cmap.codeMap[n]),
                    r &&
                      ((t.ncid2ogid[i] = r),
                      null == t.ogid2ngid[r] &&
                        ((u = t.nextGid++),
                        (t.ogid2ngid[r] = u),
                        (t.ngid2ogid[u] = r)))),
                  i);
            },
            encodeText: function (n) {
              return this.use(n);
            },
            glyphIds: function () {
              return ct(this.ogid2ngid);
            },
            glyphsFor: function (n, t) {
              var i,
                r,
                u,
                f = this;
              for (t || (t = {}), i = 0; i < n.length; ++i)
                (r = n[i]),
                  t[r] ||
                    ((u = t[r] = f.font.glyf.glyphFor(r)),
                    u && u.compound && f.glyphsFor(u.glyphIds, t));
              return t;
            },
            render: function () {
              var t,
                u,
                s,
                i,
                n,
                f,
                e,
                h,
                r = this,
                o = this.glyphsFor(this.glyphIds());
              for (t in o)
                b(o, t) &&
                  ((t = parseInt(t, 10)),
                  null == r.ogid2ngid[t] &&
                    ((u = r.nextGid++),
                    (r.ogid2ngid[t] = u),
                    (r.ngid2ogid[u] = t)));
              return (
                (s = ct(this.ngid2ogid)),
                (i = s.map(function (n) {
                  return this.ngid2ogid[n];
                }, this)),
                (n = this.font),
                (f = n.glyf.render(o, i, this.ogid2ngid)),
                (e = n.loca.render(f.offsets)),
                (this.lastChar = this.next - 1),
                (h = {
                  cmap: ri.render(this.ncid2ogid, this.ogid2ngid),
                  glyf: f.table,
                  loca: e.table,
                  hmtx: n.hmtx.render(i),
                  hhea: n.hhea.render(i),
                  maxp: n.maxp.render(i),
                  post: n.post.render(i),
                  name: n.name.render(this.psName),
                  head: n.head.render(e.format),
                  "OS/2": n.os2.render(),
                }),
                this.font.directory.render(h)
              );
            },
            cidToGidMap: function () {
              for (
                var i, f, e = this, t = u(), r = 0, n = this.firstChar;
                n < this.next;
                ++n
              ) {
                for (; r < n; ) t.writeShort(0), r++;
                i = e.ncid2ogid[n];
                i ? ((f = e.ogid2ngid[i]), t.writeShort(f)) : t.writeShort(0);
                r++;
              }
              return t.get();
            },
          };
          ai.prototype = {
            parse: function () {
              var n = (this.directory = new ci(this.contents));
              this.head = n.readTable("head", tr);
              this.loca = n.readTable("loca", ir);
              this.hhea = n.readTable("hhea", rr);
              this.maxp = n.readTable("maxp", ur);
              this.hmtx = n.readTable("hmtx", fr);
              this.glyf = n.readTable("glyf", er);
              this.name = n.readTable("name", or);
              this.post = n.readTable("post", sr);
              this.cmap = n.readTable("cmap", ri);
              this.os2 = n.readTable("OS/2", hr);
              this.psName = this.name.postscriptName;
              this.ascent = this.os2.ascent || this.hhea.ascent;
              this.descent = this.os2.descent || this.hhea.descent;
              this.lineGap = this.os2.lineGap || this.hhea.lineGap;
              this.scale = 1e3 / this.head.unitsPerEm;
            },
            widthOfGlyph: function (n) {
              return this.hmtx.forGlyph(n).advance * this.scale;
            },
            makeSubset: function () {
              return new li(this);
            },
          };
          fi = n.support.browser;
          i = "\n";
          y = 0;
          ei = {
            a0: [2383.94, 3370.39],
            a1: [1683.78, 2383.94],
            a2: [1190.55, 1683.78],
            a3: [841.89, 1190.55],
            a4: [595.28, 841.89],
            a5: [419.53, 595.28],
            a6: [297.64, 419.53],
            a7: [209.76, 297.64],
            a8: [147.4, 209.76],
            a9: [104.88, 147.4],
            a10: [73.7, 104.88],
            b0: [2834.65, 4008.19],
            b1: [2004.09, 2834.65],
            b2: [1417.32, 2004.09],
            b3: [1000.63, 1417.32],
            b4: [708.66, 1000.63],
            b5: [498.9, 708.66],
            b6: [354.33, 498.9],
            b7: [249.45, 354.33],
            b8: [175.75, 249.45],
            b9: [124.72, 175.75],
            b10: [87.87, 124.72],
            c0: [2599.37, 3676.54],
            c1: [1836.85, 2599.37],
            c2: [1298.27, 1836.85],
            c3: [918.43, 1298.27],
            c4: [649.13, 918.43],
            c5: [459.21, 649.13],
            c6: [323.15, 459.21],
            c7: [229.61, 323.15],
            c8: [161.57, 229.61],
            c9: [113.39, 161.57],
            c10: [79.37, 113.39],
            executive: [521.86, 756],
            folio: [612, 936],
            legal: [612, 1008],
            letter: [612, 792],
            tabloid: [792, 1224],
          };
          ut = {
            "Times-Roman": !0,
            "Times-Bold": !0,
            "Times-Italic": !0,
            "Times-BoldItalic": !0,
            Helvetica: !0,
            "Helvetica-Bold": !0,
            "Helvetica-Oblique": !0,
            "Helvetica-BoldOblique": !0,
            Courier: !0,
            "Courier-Bold": !0,
            "Courier-Oblique": !0,
            "Courier-BoldOblique": !0,
            Symbol: !0,
            ZapfDingbats: !0,
          };
          w = {};
          ft = hu(ou);
          et = function (n, t) {
            function u() {
              0 == --r && t();
            }
            var i = Object.keys(n),
              r = i.length;
            return 0 === r
              ? t()
              : void i.forEach(function (t) {
                  su(t, n[t], u);
                });
          };
          at.prototype = {
            loadFonts: ft,
            loadImages: et,
            getFont: function (n) {
              var t = this.FONTS[n];
              if (!t) {
                if (((t = ut[n]), !t))
                  throw Error("Font " + n + " has not been loaded");
                t = this.attach(t === !0 ? new yr(n) : new st(this, t));
                this.FONTS[n] = t;
              }
              return t;
            },
            getImage: function (n) {
              var t = this.IMAGES[n];
              if (!t) {
                if (((t = w[n]), !t))
                  throw Error("Image " + n + " has not been loaded");
                if ("ERROR" === t) return null;
                t = this.IMAGES[n] = this.attach(t.asStream(this));
              }
              return t;
            },
            getOpacityGS: function (n, i) {
              var o,
                u,
                f,
                e = parseFloat(n).toFixed(3);
              return (
                (n = parseFloat(e)),
                (e += i ? "S" : "F"),
                (o = this._opacityGSCache || (this._opacityGSCache = {})),
                (u = o[e]),
                u ||
                  ((f = { Type: t("ExtGState") }),
                  i ? (f.CA = n) : (f.ca = n),
                  (u = this.attach(new r(f))),
                  (u._resourceName = t("GS" + ++y)),
                  (o[e] = u)),
                u
              );
            },
            dict: function (n) {
              return new r(n);
            },
            name: function (n) {
              return t(n);
            },
            stream: function (n, t) {
              return new l(t, n);
            },
          };
          oi =
            Array.isArray ||
            function (n) {
              return n instanceof Array;
            };
          vt.prototype.beforeRender = function () {};
          e = s(
            function (n) {
              this.value = n;
            },
            {
              render: function (n) {
                for (var i = "", r = this.value, t = 0; t < r.length; ++t)
                  i += String.fromCharCode(255 & r.charCodeAt(t));
                n("(", i.replace(/([\(\)\\])/g, "\\$1"), ")");
              },
              toString: function () {
                return this.value;
              },
            }
          );
          cr = s(
            function (n) {
              this.value = n;
            },
            {
              render: function (n) {
                var t,
                  i = this;
                for (n("<"), t = 0; t < this.value.length; ++t)
                  n(o(i.value.charCodeAt(t).toString(16), 4));
                n(">");
              },
            },
            e
          );
          si = s(
            function (n) {
              this.name = n;
            },
            {
              render: function (n) {
                n("/" + this.escape());
              },
              escape: function () {
                return this.name.replace(/[^\x21-\x7E]/g, function (n) {
                  return "#" + o(n.charCodeAt(0).toString(16), 2);
                });
              },
              toString: function () {
                return this.name;
              },
            }
          );
          ot = {};
          si.get = t;
          r = s(
            function (n) {
              this.props = n;
            },
            {
              render: function (n) {
                var i = this.props,
                  r = !0;
                n("<<");
                n.withIndent(function () {
                  for (var u in i)
                    tt(i, u) &&
                      !/^_/.test(u) &&
                      ((r = !1), n.indent(t(u), " ", i[u]));
                });
                r || n.indent();
                n(">>");
              },
            }
          );
          l = s(
            function (n, t, i) {
              if ("string" == typeof n) {
                var r = u();
                r.write(n);
                n = r;
              }
              this.data = n;
              this.props = t || {};
              this.compress = i;
            },
            {
              render: function (n) {
                var f = this.data.get(),
                  u = this.props;
                this.compress &&
                  ti.supportsDeflate() &&
                  (u.Filter
                    ? u.Filter instanceof Array || (u.Filter = [u.Filter])
                    : (u.Filter = []),
                  u.Filter.unshift(t("FlateDecode")),
                  (f = ti.deflate(f)));
                u.Length = f.length;
                n(new r(u), " stream", i);
                n.writeData(f);
                n(i, "endstream");
              },
            }
          );
          lr = s(
            function () {
              this.props = { Type: t("Catalog") };
            },
            {
              setPages: function (n) {
                this.props.Pages = n;
              },
            },
            r
          );
          ar = s(
            function () {
              this.props = { Type: t("Pages"), Kids: [], Count: 0 };
            },
            {
              addPage: function (n) {
                this.props.Kids.push(n);
                this.props.Count++;
              },
            },
            r
          );
          vr = [
            192, 193, 194, 195, 197, 198, 199, 201, 202, 203, 205, 206, 207,
          ];
          yr = s(
            function (n) {
              this.props = {
                Type: t("Font"),
                Subtype: t("Type1"),
                BaseFont: t(n),
              };
              this._resourceName = t("F" + ++y);
            },
            {
              encodeText: function (n) {
                return new e(n + "");
              },
            },
            r
          );
          st = s(
            function (n, i, r) {
              var f, u;
              r = this.props = r || {};
              r.Type = t("Font");
              r.Subtype = t("Type0");
              r.Encoding = t("Identity-H");
              this._pdf = n;
              this._font = i;
              this._sub = i.makeSubset();
              this._resourceName = t("F" + ++y);
              f = i.head;
              this.name = i.psName;
              u = this.scale = i.scale;
              this.bbox = [f.xMin * u, f.yMin * u, f.xMax * u, f.yMax * u];
              this.italicAngle = i.post.italicAngle;
              this.ascent = i.ascent * u;
              this.descent = i.descent * u;
              this.lineGap = i.lineGap * u;
              this.capHeight = i.os2.capHeight || this.ascent;
              this.xHeight = i.os2.xHeight || 0;
              this.stemV = 0;
              this.familyClass = (i.os2.familyClass || 0) >> 8;
              this.isSerif = this.familyClass >= 1 && this.familyClass <= 7;
              this.isScript = 10 == this.familyClass;
              this.flags =
                (i.post.isFixedPitch ? 1 : 0) |
                (this.isSerif ? 2 : 0) |
                (this.isScript ? 8 : 0) |
                (0 !== this.italicAngle ? 64 : 0) |
                32;
            },
            {
              encodeText: function (n) {
                return new cr(this._sub.encodeText(n + ""));
              },
              getTextWidth: function (n, t) {
                for (
                  var r, f = this, u = 0, e = this._font.cmap.codeMap, i = 0;
                  i < t.length;
                  ++i
                )
                  (r = e[t.charCodeAt(i)]), (u += f._font.widthOfGlyph(r || 0));
                return (u * n) / 1e3;
              },
              beforeRender: function () {
                var c,
                  f,
                  a,
                  o,
                  n = this,
                  i = n._sub,
                  v = i.render(),
                  w = new l(u(v), { Length1: v.length }, !0),
                  b = n._pdf.attach(
                    new r({
                      Type: t("FontDescriptor"),
                      FontName: t(n._sub.psName),
                      FontBBox: n.bbox,
                      Flags: n.flags,
                      StemV: n.stemV,
                      ItalicAngle: n.italicAngle,
                      Ascent: n.ascent,
                      Descent: n.descent,
                      CapHeight: n.capHeight,
                      XHeight: n.xHeight,
                      FontFile2: n._pdf.attach(w),
                    })
                  ),
                  k = i.ncid2ogid,
                  s = i.firstChar,
                  h = i.lastChar,
                  y = [];
                !(function p(t, i) {
                  if (t <= h) {
                    var r = k[t];
                    null == r
                      ? p(t + 1)
                      : (i || y.push(t, (i = [])),
                        i.push(n._font.widthOfGlyph(r)),
                        p(t + 1, i));
                  }
                })(s);
                c = new r({
                  Type: t("Font"),
                  Subtype: t("CIDFontType2"),
                  BaseFont: t(n._sub.psName),
                  CIDSystemInfo: new r({
                    Registry: new e("Adobe"),
                    Ordering: new e("Identity"),
                    Supplement: 0,
                  }),
                  FontDescriptor: b,
                  FirstChar: s,
                  LastChar: h,
                  DW: Math.round(n._font.widthOfGlyph(0)),
                  W: y,
                  CIDToGIDMap: n._pdf.attach(n._makeCidToGidMap()),
                });
                f = n.props;
                f.BaseFont = t(n._sub.psName);
                f.DescendantFonts = [n._pdf.attach(c)];
                a = new pr(s, h, i.subset);
                o = new l(lt(), null, !0);
                o.data(a);
                f.ToUnicode = n._pdf.attach(o);
              },
              _makeCidToGidMap: function () {
                return new l(u(this._sub.cidToGidMap()), null, !0);
              },
            },
            r
          );
          pr = s(
            function (n, t, i) {
              this.firstChar = n;
              this.lastChar = t;
              this.map = i;
            },
            {
              render: function (n) {
                n.indent("/CIDInit /ProcSet findresource begin");
                n.indent("12 dict begin");
                n.indent("begincmap");
                n.indent("/CIDSystemInfo <<");
                n.indent("  /Registry (Adobe)");
                n.indent("  /Ordering (UCS)");
                n.indent("  /Supplement 0");
                n.indent(">> def");
                n.indent("/CMapName /Adobe-Identity-UCS def");
                n.indent("/CMapType 2 def");
                n.indent("1 begincodespacerange");
                n.indent("  <0000><ffff>");
                n.indent("endcodespacerange");
                var t = this;
                n.indent(t.lastChar - t.firstChar + 1, " beginbfchar");
                n.withIndent(function () {
                  for (var f, u, r, i = t.firstChar; i <= t.lastChar; ++i) {
                    for (
                      f = t.map[i],
                        u = nu([f]),
                        n.indent("<", o(i.toString(16), 4), ">", "<"),
                        r = 0;
                      r < u.length;
                      ++r
                    )
                      n(o(u.charCodeAt(r).toString(16), 4));
                    n(">");
                  }
                });
                n.indent("endbfchar");
                n.indent("endcmap");
                n.indent("CMapName currentdict /CMap defineresource pop");
                n.indent("end");
                n.indent("end");
              },
            }
          );
          wr = s(
            function (n, i) {
              this._pdf = n;
              this._rcount = 0;
              this._textMode = !1;
              this._fontResources = {};
              this._gsResources = {};
              this._xResources = {};
              this._patResources = {};
              this._shResources = {};
              this._opacity = 1;
              this._matrix = [1, 0, 0, 1, 0, 0];
              this._annotations = [];
              this._font = null;
              this._fontSize = null;
              this._contextStack = [];
              i = this.props = i || {};
              i.Type = t("Page");
              i.ProcSet = [
                t("PDF"),
                t("Text"),
                t("ImageB"),
                t("ImageC"),
                t("ImageI"),
              ];
              i.Resources = new r({
                Font: new r(this._fontResources),
                ExtGState: new r(this._gsResources),
                XObject: new r(this._xResources),
                Pattern: new r(this._patResources),
                Shading: new r(this._shResources),
              });
              i.Annots = this._annotations;
            },
            {
              _out: function () {
                this._content.data.apply(null, arguments);
              },
              transform: function (n, t, r, u, f, e) {
                uf(arguments) ||
                  ((this._matrix = rf(arguments, this._matrix)),
                  this._out(n, " ", t, " ", r, " ", u, " ", f, " ", e, " cm"),
                  this._out(i));
              },
              translate: function (n, t) {
                this.transform(1, 0, 0, 1, n, t);
              },
              scale: function (n, t) {
                this.transform(n, 0, 0, t, 0, 0);
              },
              rotate: function (n) {
                var t = Math.cos(n),
                  i = Math.sin(n);
                this.transform(t, i, -i, t, 0, 0);
              },
              beginText: function () {
                this._textMode = !0;
                this._out("BT", i);
              },
              endText: function () {
                this._textMode = !1;
                this._out("ET", i);
              },
              _requireTextMode: function () {
                if (!this._textMode)
                  throw Error(
                    "Text mode required; call page.beginText() first"
                  );
              },
              _requireFont: function () {
                if (!this._font)
                  throw Error("No font selected; call page.setFont() first");
              },
              setFont: function (n, t) {
                this._requireTextMode();
                null == n
                  ? (n = this._font)
                  : n instanceof st || (n = this._pdf.getFont(n));
                null == t && (t = this._fontSize);
                this._fontResources[n._resourceName] = n;
                this._font = n;
                this._fontSize = t;
                this._out(n._resourceName, " ", t, " Tf", i);
              },
              setTextLeading: function (n) {
                this._requireTextMode();
                this._out(n, " TL", i);
              },
              setTextRenderingMode: function (n) {
                this._requireTextMode();
                this._out(n, " Tr", i);
              },
              showText: function (n, t) {
                var r, u;
                this._requireFont();
                n.length > 1 &&
                  t &&
                  this._font instanceof st &&
                  ((r = this._font.getTextWidth(this._fontSize, n)),
                  (u = (t / r) * 100),
                  this._out(u, " Tz "));
                this._out(this._font.encodeText(n), " Tj", i);
              },
              showTextNL: function (n) {
                this._requireFont();
                this._out(this._font.encodeText(n), " '", i);
              },
              addLink: function (n, i) {
                var u = this._toPage({ x: i.left, y: i.bottom }),
                  f = this._toPage({ x: i.right, y: i.top });
                this._annotations.push(
                  new r({
                    Type: t("Annot"),
                    Subtype: t("Link"),
                    Rect: [u.x, u.y, f.x, f.y],
                    Border: [0, 0, 0],
                    A: new r({ Type: t("Action"), S: t("URI"), URI: new e(n) }),
                  })
                );
              },
              setStrokeColor: function (n, t, r) {
                this._out(n, " ", t, " ", r, " RG", i);
              },
              setOpacity: function (n) {
                this.setFillOpacity(n);
                this.setStrokeOpacity(n);
                this._opacity *= n;
              },
              setStrokeOpacity: function (n) {
                if (n < 1) {
                  var t = this._pdf.getOpacityGS(this._opacity * n, !0);
                  this._gsResources[t._resourceName] = t;
                  this._out(t._resourceName, " gs", i);
                }
              },
              setFillColor: function (n, t, r) {
                this._out(n, " ", t, " ", r, " rg", i);
              },
              setFillOpacity: function (n) {
                if (n < 1) {
                  var t = this._pdf.getOpacityGS(this._opacity * n, !1);
                  this._gsResources[t._resourceName] = t;
                  this._out(t._resourceName, " gs", i);
                }
              },
              gradient: function (n, t) {
                var r, u, f;
                this.save();
                this.rect(t.left, t.top, t.width, t.height);
                this.clip();
                n.userSpace ||
                  this.transform(t.width, 0, 0, t.height, t.left, t.top);
                r = nf(this._pdf, n, t);
                u = r.shading._resourceName;
                this._shResources[u] = r.shading;
                r.hasAlpha &&
                  ((f = r.opacity._resourceName),
                  (this._gsResources[f] = r.opacity),
                  this._out("/" + f + " gs "));
                this._out("/" + u + " sh", i);
                this.restore();
              },
              setDashPattern: function (n, t) {
                this._out(n, " ", t, " d", i);
              },
              setLineWidth: function (n) {
                this._out(n, " w", i);
              },
              setLineCap: function (n) {
                this._out(n, " J", i);
              },
              setLineJoin: function (n) {
                this._out(n, " j", i);
              },
              setMitterLimit: function (n) {
                this._out(n, " M", i);
              },
              save: function () {
                this._contextStack.push(this._context());
                this._out("q", i);
              },
              restore: function () {
                this._out("Q", i);
                this._context(this._contextStack.pop());
              },
              moveTo: function (n, t) {
                this._out(n, " ", t, " m", i);
              },
              lineTo: function (n, t) {
                this._out(n, " ", t, " l", i);
              },
              bezier: function (n, t, r, u, f, e) {
                this._out(n, " ", t, " ", r, " ", u, " ", f, " ", e, " c", i);
              },
              bezier1: function (n, t, r, u) {
                this._out(n, " ", t, " ", r, " ", u, " y", i);
              },
              bezier2: function (n, t, r, u) {
                this._out(n, " ", t, " ", r, " ", u, " v", i);
              },
              close: function () {
                this._out("h", i);
              },
              rect: function (n, t, r, u) {
                this._out(n, " ", t, " ", r, " ", u, " re", i);
              },
              ellipse: function (n, t, i, r) {
                function u(t) {
                  return n + t;
                }
                function f(n) {
                  return t + n;
                }
                var e = 0.55228474983079356;
                this.moveTo(u(0), f(r));
                this.bezier(u(i * e), f(r), u(i), f(r * e), u(i), f(0));
                this.bezier(u(i), f(-r * e), u(i * e), f(-r), u(0), f(-r));
                this.bezier(u(-i * e), f(-r), u(-i), f(-r * e), u(-i), f(0));
                this.bezier(u(-i), f(r * e), u(-i * e), f(r), u(0), f(r));
              },
              circle: function (n, t, i) {
                this.ellipse(n, t, i, i);
              },
              stroke: function () {
                this._out("S", i);
              },
              nop: function () {
                this._out("n", i);
              },
              clip: function () {
                this._out("W n", i);
              },
              clipStroke: function () {
                this._out("W S", i);
              },
              closeStroke: function () {
                this._out("s", i);
              },
              fill: function () {
                this._out("f", i);
              },
              fillStroke: function () {
                this._out("B", i);
              },
              drawImage: function (n) {
                var t = this._pdf.getImage(n);
                t &&
                  ((this._xResources[t._resourceName] = t),
                  this._out(t._resourceName, " Do", i));
              },
              comment: function (n) {
                var t = this;
                n.split(/\r?\n/g).forEach(function (n) {
                  t._out("% ", n, i);
                });
              },
              _context: function (n) {
                return null == n
                  ? { opacity: this._opacity, matrix: this._matrix }
                  : ((this._opacity = n.opacity),
                    void (this._matrix = n.matrix));
              },
              _toPage: function (n) {
                var t = this._matrix,
                  i = t[0],
                  r = t[1],
                  u = t[2],
                  f = t[3],
                  e = t[4],
                  o = t[5];
                return { x: i * n.x + u * n.y + e, y: r * n.x + f * n.y + o };
              },
            },
            r
          );
          f = {
            serif: "Times-Roman",
            "serif|bold": "Times-Bold",
            "serif|italic": "Times-Italic",
            "serif|bold|italic": "Times-BoldItalic",
            "sans-serif": "Helvetica",
            "sans-serif|bold": "Helvetica-Bold",
            "sans-serif|italic": "Helvetica-Oblique",
            "sans-serif|bold|italic": "Helvetica-BoldOblique",
            monospace: "Courier",
            "monospace|bold": "Courier-Bold",
            "monospace|italic": "Courier-Oblique",
            "monospace|bold|italic": "Courier-BoldOblique",
            zapfdingbats: "ZapfDingbats",
            "zapfdingbats|bold": "ZapfDingbats",
            "zapfdingbats|italic": "ZapfDingbats",
            "zapfdingbats|bold|italic": "ZapfDingbats",
          };
          a("Times New Roman", "serif");
          a("Courier New", "monospace");
          a("Arial", "sans-serif");
          a("Helvetica", "sans-serif");
          a("Verdana", "sans-serif");
          a("Tahoma", "sans-serif");
          a("Georgia", "sans-serif");
          a("Monaco", "monospace");
          a("Andale Mono", "monospace");
          hi = {
            fill: 0,
            stroke: 1,
            fillAndStroke: 2,
            invisible: 3,
            fillAndClip: 4,
            strokeAndClip: 5,
            fillStrokeClip: 6,
            clip: 7,
          };
          ht = hi;
          br = {
            dash: [4],
            dashDot: [4, 2, 1, 2],
            dot: [1, 2],
            longDash: [8, 2],
            longDashDot: [8, 2, 1, 2],
            longDashDotDot: [8, 2, 1, 2, 1, 2],
            solid: [],
          };
          kr = { butt: 0, round: 1, square: 2 };
          dr = { miter: 0, round: 1, bevel: 2 };
          n.deepExtend(n.pdf, {
            Document: at,
            BinaryStream: u,
            defineFont: ki,
            parseFontDef: yt,
            getFontURL: pt,
            loadFonts: ft,
            loadImages: et,
            getPaperOptions: vi,
            clearImageCache: yi,
            TEXT_RENDERING_MODE: hi,
            exportPDF: df,
            exportPDFToBlob: gf,
            saveAs: ff,
            toDataURL: it,
            toBlob: bt,
            render: wt,
          });
          n.drawing.exportPDF = n.pdf.exportPDF;
          n.drawing.pdf = n.pdf;
        })(kendo),
        kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("pdf/mixins.min", ["pdf/core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          kendo.PDFMixin = {
            extend: function (n) {
              n.events.push("pdfExport");
              n.options.pdf = this.options;
              n.saveAsPDF = this.saveAsPDF;
              n._drawPDF = this._drawPDF;
              n._drawPDFShadow = this._drawPDFShadow;
            },
            options: {
              fileName: "Export.pdf",
              proxyURL: "",
              paperSize: "auto",
              allPages: !1,
              landscape: !1,
              margin: null,
              title: null,
              author: null,
              subject: null,
              keywords: null,
              creator: "Kendo UI PDF Generator v." + kendo.version,
              date: null,
            },
            saveAsPDF: function () {
              var t,
                i = new n.Deferred(),
                r = i.promise(),
                u = { promise: r };
              if (!this.trigger("pdfExport", u))
                return (
                  (t = this.options.pdf),
                  (t.multiPage = t.multiPage || t.allPages),
                  this._drawPDF(i)
                    .then(function (n) {
                      return kendo.drawing.exportPDF(n, t);
                    })
                    .done(function (n) {
                      kendo.saveAs({
                        dataURI: n,
                        fileName: t.fileName,
                        proxyURL: t.proxyURL,
                        forceProxy: t.forceProxy,
                        proxyTarget: t.proxyTarget,
                      });
                      i.resolve();
                    })
                    .fail(function (n) {
                      i.reject(n);
                    }),
                  r
                );
            },
            _drawPDF: function (t) {
              var i = new n.Deferred();
              return (
                kendo.drawing
                  .drawDOM(this.wrapper)
                  .done(function (n) {
                    var r = {
                      page: n,
                      pageNumber: 1,
                      progress: 1,
                      totalPages: 1,
                    };
                    t.notify(r);
                    i.resolve(r.page);
                  })
                  .fail(function (n) {
                    i.reject(n);
                  }),
                i
              );
            },
            _drawPDFShadow: function (t, i) {
              var f, u, r;
              return (
                (t = t || {}),
                (f = this.wrapper),
                (u = n("<div class='k-pdf-export-shadow'>")),
                t.width && u.css({ width: t.width, overflow: "visible" }),
                f.before(u),
                u.append(t.content || f.clone(!0, !0)),
                (r = n.Deferred()),
                setTimeout(function () {
                  var n = kendo.drawing.drawDOM(u, i);
                  n.always(function () {
                    u.remove();
                  })
                    .then(function () {
                      r.resolve.apply(r, arguments);
                    })
                    .fail(function () {
                      r.reject.apply(r, arguments);
                    })
                    .progress(function () {
                      r.progress.apply(r, arguments);
                    });
                }, 15),
                r.promise()
              );
            },
          };
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.pdf.min",
      ["kendo.core.min", "kendo.drawing.min", "pdf/core.min", "pdf/mixins.min"],
      n
    );
  })(
    function () {},
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.dialog.min", ["kendo.core.min", "kendo.popup.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function k(n) {
            return t !== n;
          }
          function st(n, t, i) {
            return Math.max(
              Math.min(parseInt(n, 10), i === 1 / 0 ? i : parseInt(i, 10)),
              parseInt(t, 10)
            );
          }
          function ht(n) {
            return n.keyCode == s.ENTER || n.keyCode == s.SPACEBAR;
          }
          var r,
            e,
            ct,
            lt,
            at,
            vt,
            yt,
            pt,
            i = window.kendo,
            o = i.ui.Widget,
            hi = i.ui.Popup.TabKeyTrap,
            u = n.proxy,
            f = i.template,
            s = i.keys,
            ci = n.isFunction,
            a = "kendoWindow",
            li = ".k-dialog",
            wt = ".k-window",
            d = ".k-dialog-close",
            ai = "k-content k-window-content k-dialog-content",
            bt = ".k-window-content",
            kt = ".k-content",
            dt = "k-scroll",
            g = "k-dialog-titleless",
            nt = ".k-dialog-title",
            tt = nt + "bar",
            h = ".k-dialog-buttongroup",
            v = ".k-button",
            vi = "k-alert",
            yi = "k-confirm",
            pi = "k-prompt",
            y = ".k-textbox",
            wi = ".k-overlay",
            c = ":visible",
            l = "zIndex",
            gt = "body",
            ni = "initOpen",
            ti = "touchstart",
            ii = "touchmove",
            p = "open",
            ri = "close",
            ui = "show",
            it = "hide",
            rt = "width",
            ut = {
              small: "k-window-sm",
              medium: "k-window-md",
              large: "k-window-lg",
            },
            fi = "hidden",
            w = "overflow",
            b = "original-overflow-rule",
            ft = "tap-y",
            et = 100,
            ei = i.support.cssFlexbox,
            oi = Math.ceil,
            si = ":not(link,meta,script,style)",
            ot = o.extend({
              init: function (n, t) {
                var r = this;
                o.fn.init.call(r, n, t);
                r._init(r.element, r.options);
                i.notify(r);
              },
              _init: function (i, f) {
                var o,
                  e = this;
                e._centerCallback = u(e._center, e);
                e.appendTo = n(gt);
                (k(f.visible) && null !== f.visible) || (f.visible = i.is(c));
                e.wrapperTemplate === t && (e.wrapperTemplate = r.wrapper);
                e._createDialog();
                o = e.wrapper = i.closest(li);
                f._defaultFocus === t && (e._defaultFocus = i[0]);
                e._tabindex(i);
                e._dimensions();
                this._tabKeyTrap = new hi(o);
                e.options.visible ? e._triggerOpen() : e.wrapper.hide();
              },
              setOptions: function (r) {
                var f,
                  u = this,
                  e = u.options.size;
                r = n.extend(u.options, r);
                o.fn.setOptions.call(u, r);
                r.title !== t && u.title(r.title);
                r.content &&
                  (i.destroy(u.element.children()), u.element.html(r.content));
                r.actions &&
                  (u.wrapper.children(h).remove(),
                  u._createActionbar(u.wrapper));
                u.wrapper.show();
                u._closable(u.wrapper);
                u.wrapper.removeClass(ut[e]);
                u._dimensions();
                r.visible ? u._triggerOpen() : u.wrapper.hide();
                t !== r.modal &&
                  ((f = u.options.visible !== !1),
                  u._enableDocumentScrolling(),
                  u._overlay(r.modal && f));
              },
              _dimensions: function () {
                for (
                  var r,
                    s = this,
                    t = s.wrapper,
                    n = s.options,
                    u = n.width,
                    f = n.height,
                    e = n.size,
                    o = ["minWidth", "minHeight", "maxWidth", "maxHeight"],
                    i = 0;
                  i < o.length;
                  i++
                )
                  (r = n[o[i]]), r && r != 1 / 0 && t.css(o[i], r);
                this._setElementMaxHeight();
                u &&
                  (("" + u).indexOf("%") > 0
                    ? t.width(u)
                    : t.outerWidth(st(u, n.minWidth, n.maxWidth)));
                f &&
                  (("" + f).indexOf("%") > 0
                    ? t.height(f)
                    : t.outerHeight(st(f, n.minHeight, n.maxHeight)),
                  this._setElementHeight());
                e && ut[e] && t.addClass(ut[e]);
              },
              _setElementMaxHeight: function () {
                var i,
                  t,
                  n = this,
                  r = n.element,
                  u = n.options.maxHeight;
                u != 1 / 0 &&
                  ((i = n._paddingBox(r)),
                  (t = parseFloat(u, 10) - n._uiHeight() - i.vertical),
                  t > 0 && r.css({ maxHeight: oi(t) + "px" }));
              },
              _paddingBox: function (n) {
                var t = parseFloat(n.css("padding-top"), 10),
                  i = parseFloat(n.css("padding-left"), 10),
                  r = parseFloat(n.css("padding-bottom"), 10),
                  u = parseFloat(n.css("padding-right"), 10);
                return { vertical: t + r, horizontal: i + u };
              },
              _setElementHeight: function () {
                var n = this,
                  t = n.element,
                  r = n.options.height,
                  u = n._paddingBox(t),
                  i = parseFloat(r, 10) - n._uiHeight() - u.vertical;
                i < 0 && (i = 0);
                t.css({ height: oi(i) + "px" });
                this._applyScrollClassName(t);
              },
              _applyScrollClassName: function (n) {
                var t = n.get(0).scrollHeight > n.outerHeight();
                t ? n.addClass(dt) : n.removeClass(dt);
              },
              _uiHeight: function () {
                var r = this,
                  n = r.wrapper,
                  t = n.children(h),
                  u = (t[0] && t[0].offsetHeight) || 0,
                  i = n.children(tt),
                  f = (i[0] && i[0].offsetHeight) || 0;
                return u + f;
              },
              _overlay: function (t) {
                var i = this.appendTo.children(wi),
                  u = this.wrapper;
                return (
                  i.length || (i = n(r.overlay)),
                  i
                    .insertBefore(u[0])
                    .toggle(t)
                    .css(l, parseInt(u.css(l), 10) - 1),
                  t ? this._waiAriaOverlay() : this._removeWaiAriaOverlay(),
                  this.options.modal.preventScroll &&
                    this._stopDocumentScrolling(),
                  i
                );
              },
              _waiAriaOverlay: function () {
                var t = this.wrapper;
                this._overlayedNodes = t
                  .prevAll(si)
                  .add(t.nextAll(si))
                  .each(function () {
                    var t = n(this);
                    t.data("ariaHidden", t.attr("aria-hidden"));
                    t.attr("aria-hidden", "true");
                  });
              },
              _removeWaiAriaOverlay: function () {
                return (
                  this._overlayedNodes &&
                  this._overlayedNodes.each(function () {
                    var t = n(this),
                      i = t.data("ariaHidden");
                    i ? t.attr("aria-hidden", i) : t.removeAttr("aria-hidden");
                  })
                );
              },
              _closeClick: function (n) {
                n.preventDefault();
                this.close(!1);
              },
              _closeKeyHandler: function (n) {
                (ht(n) || n.keyCode == s.ESC) && this.close(!1);
              },
              _keydown: function (n) {
                var t = this,
                  i = t.options,
                  r = n.keyCode;
                r == s.ESC && !t._closing && i.closable && t.close(!1);
              },
              _createDialog: function () {
                var u = this,
                  f = u.element,
                  e = u.options,
                  h = i.support.isRtl(f),
                  o = n(r.titlebar(e)),
                  s = (f.id || i.guid()) + "_title",
                  t = n(u.wrapperTemplate(e));
                t.toggleClass("k-rtl", h);
                f.addClass(ai);
                u.appendTo.append(t);
                e.title !== !1
                  ? (t.append(o), o.attr("id", s), t.attr("aria-labelledby", s))
                  : t.addClass(g);
                u._closable(t);
                t.append(f);
                e.content && (i.destroy(f.children()), f.html(e.content));
                e.actions.length && u._createActionbar(t);
              },
              _closable: function (n) {
                var t = this,
                  i = t.options,
                  e = n.children(tt),
                  f = e.find(".k-window-actions"),
                  o = f.length
                    ? f.find(".k-dialog-close")
                    : n.find(".k-dialog-close");
                o.remove();
                i.closable !== !1 &&
                  (i.title !== !1 && f.length
                    ? f.append(r.close(i))
                    : n.prepend(r.close(i)),
                  n.autoApplyNS(a),
                  t.element.autoApplyNS(a),
                  n
                    .find(d)
                    .on("click", u(t._closeClick, t))
                    .on("keydown", u(t._closeKeyHandler, t)),
                  t.element.on("keydown", u(t._keydown, t)));
              },
              _createActionbar: function (t) {
                var u = "stretched" === this.options.buttonLayout,
                  f = u ? "stretched" : "normal",
                  i = n(r.actionbar({ buttonLayout: f }));
                this._addButtons(i);
                u && !ei && this._normalizeButtonSize(i);
                t.append(i);
              },
              _addButtons: function (t) {
                for (
                  var e,
                    h,
                    c,
                    i = this,
                    v = i.options,
                    y = u(i._actionClick, i),
                    p = u(i._actionKeyHandler, i),
                    l = i.options.actions,
                    o = l.length,
                    s = Math.round(et / o),
                    f = 0;
                  f < o;
                  f++
                )
                  (e = l[f]),
                    (h = i._mergeTextWithOptions(e)),
                    (c = n(r.action(e))
                      .autoApplyNS(a)
                      .html(h)
                      .appendTo(t)
                      .data("action", e.action)
                      .on("click", y)
                      .on("keydown", p)),
                    "stretched" !== v.buttonLayout ||
                      ei ||
                      (f == o - 1 && (s = et - f * s), c.css(rt, s + "%"));
              },
              _mergeTextWithOptions: function (n) {
                var t = n.text;
                return t ? f(t)(this.options) : "";
              },
              _normalizeButtonSize: function (n) {
                var u = this,
                  f = u.options,
                  t = n.children(v + ":last"),
                  i = parseFloat(t[0] ? t[0].style[rt] : 0),
                  r = et - f.actions.length * i;
                r > 0 && t.css(rt, i + r + "%");
              },
              _tabindex: function (n) {
                var t,
                  r = this,
                  i = r.wrapper,
                  u = i.find(d),
                  f = i.find(h + " " + v);
                o.fn._tabindex.call(this, n);
                t = n.attr("tabindex");
                u.attr("tabIndex", t);
                f.attr("tabIndex", t);
              },
              _actionClick: function (n) {
                this.wrapper.is(c) && this._runActionBtn(n.currentTarget);
              },
              _actionKeyHandler: function (n) {
                ht(n)
                  ? this._runActionBtn(n.currentTarget)
                  : n.keyCode == s.ESC && this.close(!1);
              },
              _runActionBtn: function (t) {
                var i,
                  u,
                  r = this;
                r._closing ||
                  ((i = n(t).data("action")),
                  (u = ci(i) && i({ sender: r }) === !1),
                  u || r.close(!1));
              },
              _triggerOpen: function () {
                var n = this,
                  t = n.options,
                  i = n.wrapper;
                n.toFront();
                n._triggerInitOpen();
                n.trigger(p);
                t.modal &&
                  (n._overlay(i.is(c)).css({ opacity: 0.5 }), n._focusDialog());
              },
              open: function () {
                var t,
                  e,
                  r,
                  n = this,
                  o = n.wrapper,
                  f = this._animationOptions(p),
                  s = n.options;
                return (
                  this._triggerInitOpen(),
                  n.trigger(p) ||
                    (n._closing && o.kendoStop(!0, !0),
                    (n._closing = !1),
                    n.toFront(),
                    (s.visible = !0),
                    s.modal &&
                      ((e = !!n._modals().length),
                      (t = n._overlay(e)),
                      t.kendoStop(!0, !0),
                      f.duration && i.effects.Fade && !e
                        ? ((r = i.fx(t).fadeIn()),
                          r.duration(f.duration || 0),
                          r.endValue(0.5),
                          r.play())
                        : t.css("opacity", 0.5),
                      t.show()),
                    o
                      .show()
                      .kendoStop()
                      .kendoAnimate({
                        effects: f.effects,
                        duration: f.duration,
                        complete: u(n._openAnimationEnd, n),
                      }),
                    o.show()),
                  n
                );
              },
              _animationOptions: function (n) {
                var t = this.options.animation;
                return (
                  (t && t[n]) ||
                  { open: { effects: {} }, close: { hide: !0, effects: {} } }[n]
                );
              },
              _openAnimationEnd: function () {
                this.options.modal && this._focusDialog();
                this.trigger(ui);
              },
              _triggerInitOpen: function () {
                k(this._initOpenTriggered) ||
                  ((this._initOpenTriggered = !0), this.trigger(ni));
              },
              toFront: function () {
                var i = this,
                  r = i.wrapper,
                  t = +r.css(l),
                  u = t;
                return (
                  i.center(),
                  n(wt).each(function (i, r) {
                    var f = n(r),
                      u = f.css(l);
                    isNaN(u) || (t = Math.max(+u, t));
                  }),
                  (!r[0].style.zIndex || u < t) && r.css(l, t + 2),
                  i.element.find("> .k-overlay").remove(),
                  (r = null),
                  i
                );
              },
              close: function (n) {
                return (
                  arguments.length || (n = !0),
                  this._close(n),
                  this._stopCenterOnResize(),
                  this
                );
              },
              _close: function (n) {
                var t = this,
                  r = t.wrapper,
                  f = t.options,
                  e = this._animationOptions("open"),
                  i = this._animationOptions("close");
                if (r.is(c) && !t.trigger(ri, { userTriggered: !n })) {
                  if (t._closing) return;
                  t._closing = !0;
                  f.visible = !1;
                  this._removeOverlay();
                  r.kendoStop().kendoAnimate({
                    effects: i.effects || e.effects,
                    reverse: i.reverse === !0,
                    duration: i.duration,
                    complete: u(this._closeAnimationEnd, this),
                  });
                }
                return t;
              },
              center: function () {
                this._center();
                this._centerOnResize();
              },
              _center: function () {
                var i = this,
                  t = i.wrapper,
                  r = n(window),
                  u = 0 + Math.max(0, (r.width() - t.width()) / 2),
                  f =
                    0 +
                    Math.max(
                      0,
                      (r.height() -
                        t.height() -
                        parseInt(t.css("paddingTop"), 10)) /
                        2
                    );
                return t.css({ left: u, top: f }), i;
              },
              _centerOnResize: function () {
                this._trackResize ||
                  (i.onResize(this._centerCallback), (this._trackResize = !0));
              },
              _stopCenterOnResize: function () {
                i.unbindResize(this._centerCallback);
                this._trackResize = !1;
              },
              _removeOverlay: function () {
                var n = this._modals(),
                  t = this.options,
                  i = t.modal && !n.length;
                i
                  ? (this._overlay(!1).remove(),
                    t.modal.preventScroll && this._enableDocumentScrolling())
                  : n.length &&
                    (this._object(n.last())._overlay(!0),
                    t.modal.preventScroll && this._stopDocumentScrolling());
              },
              _stopDocumentScrolling: function () {
                var t,
                  u,
                  r = this,
                  f = n("body");
                r._storeOverflowRule(f);
                f.css(w, fi);
                t = n("html");
                u = t[0];
                r._storeOverflowRule(t);
                t.css(w, fi);
                i.support.mobileOS.ios &&
                  (u.addEventListener(ti, r._touchStart, { passive: !1 }),
                  u.addEventListener(ii, r._touchMove, { passive: !1 }));
              },
              _touchStart: function (t) {
                n(this).data(ft, t.changedTouches[0].pageY);
              },
              _touchMove: function (t) {
                var r = t.target,
                  i = n(t.target),
                  u = t.changedTouches[0].pageY - n(this).data(ft) > 0,
                  f =
                    (i.is(bt) && u && 0 === i.scrollTop()) ||
                    (!u && i.scrollTop() === r.scrollHeight - r.clientHeight);
                (i.is(bt) && !f) || t.preventDefault();
              },
              _enableDocumentScrolling: function () {
                var t = this,
                  f = n(document.body),
                  r = n("html"),
                  u = r[0];
                t._restoreOverflowRule(f);
                t._restoreOverflowRule(r);
                i.support.mobileOS.ios &&
                  (r.removeData(ft),
                  u.removeEventListener(ti, t._touchStart, { passive: !1 }),
                  u.removeEventListener(ii, t._touchMove, { passive: !1 }));
              },
              _storeOverflowRule: function (n) {
                if (!this._isOverflowStored(n)) {
                  var t = n.get(0).style.overflow;
                  "string" == typeof t && n.data(b, t);
                }
              },
              _isOverflowStored: function (n) {
                return "string" == typeof n.data(b);
              },
              _restoreOverflowRule: function (n) {
                var i = n.data(b);
                null !== i && i !== t
                  ? (n.css(w, i), n.removeData(b))
                  : n.css(w, "");
              },
              _closeAnimationEnd: function () {
                var t,
                  n = this;
                n._closing = !1;
                n.wrapper.hide().css("opacity", "");
                n.trigger(it);
                n.options.modal &&
                  ((t = n._object(n._modals().last())), t && t.toFront());
              },
              _modals: function () {
                var t = this,
                  i = n(wt)
                    .filter(function () {
                      var r = n(this),
                        u = t._object(r),
                        i = u && u.options;
                      return (
                        i &&
                        i.modal &&
                        t.options.appendTo == i.appendTo &&
                        i.visible &&
                        r.is(c)
                      );
                    })
                    .sort(function (t, i) {
                      return +n(t).css("zIndex") - +n(i).css("zIndex");
                    });
                return (t = null), i;
              },
              _object: function (n) {
                var u = n.children(kt),
                  r = i.widgetInstance(u);
                return r ? r : t;
              },
              destroy: function () {
                var t = this;
                t._destroy();
                o.fn.destroy.call(t);
                t.wrapper.remove();
                t.wrapper = t.element = n();
              },
              _destroy: function () {
                var n = this,
                  t = "." + a;
                n.wrapper.off(t);
                n.element.off(t);
                n.wrapper.find(d + "," + h + " > " + v).off(t);
                n._stopCenterOnResize();
              },
              title: function (t) {
                var f = this,
                  e = f.wrapper,
                  h = f.options,
                  u = e.children(tt),
                  o = u.children(nt),
                  s = i.htmlEncode(t);
                return arguments.length
                  ? (t === !1
                      ? (u.remove(), e.addClass(g))
                      : (u.length ||
                          ((u = n(r.titlebar(h)).prependTo(e)),
                          (o = u.children(nt)),
                          e.removeClass(g)),
                        o.html(s)),
                    (f.options.title = s),
                    f)
                  : o.html();
              },
              content: function (n, t) {
                var u = this,
                  r = u.wrapper.children(kt);
                return k(n)
                  ? (this.angular("cleanup", function () {
                      return { elements: r.children() };
                    }),
                    i.destroy(r.children()),
                    r.html(n),
                    this.angular("compile", function () {
                      for (var i = [], n = r.length; --n >= 0; )
                        i.push({ dataItem: t });
                      return { elements: r.children(), data: i };
                    }),
                    (u.options.content = n),
                    u)
                  : r.html();
              },
              _focusDialog: function () {
                this._defaultFocus && this._focus(this._defaultFocus);
                this._tabKeyTrap.trap();
              },
              _focus: function (n) {
                n && n.focus();
              },
              events: [ni, p, ri, ui, it],
              options: {
                title: "",
                buttonLayout: "stretched",
                actions: [],
                modal: !0,
                size: "auto",
                width: null,
                height: null,
                minWidth: 0,
                minHeight: 0,
                maxWidth: 1 / 0,
                maxHeight: 1 / 0,
                content: null,
                visible: null,
                appendTo: gt,
                closable: !0,
              },
            }),
            bi = ot.extend({
              options: { name: "Dialog", messages: { close: "Close" } },
            });
          i.ui.plugin(bi);
          e = ot.extend({
            _init: function (n, t) {
              var i = this;
              i.wrapperTemplate = r.alertWrapper;
              t._defaultFocus = null;
              i._ensureContentId(n);
              ot.fn._init.call(i, n, t);
              i.bind(it, u(i.destroy, i));
              i._ariaDescribedBy();
              i._initFocus();
            },
            _ensureContentId: function (t) {
              var r = n(t);
              r.attr("id") || r.attr("id", i.guid() + "_k-popup");
            },
            _ariaDescribedBy: function () {
              this.wrapper.attr("aria-describedby", this.element.attr("id"));
            },
            _initFocus: function () {
              var n = this.options;
              this._defaultFocus = this._chooseEntryFocus();
              this._defaultFocus && n.visible && n.modal && this._focusDialog();
            },
            _chooseEntryFocus: function () {
              return this.wrapper.find(h + " > " + v)[0];
            },
            options: {
              title: window.location.host,
              closable: !1,
              messages: {
                okText: "OK",
                cancel: "Cancel",
                promptInput: "Input",
              },
            },
          });
          ct = e.extend({
            _init: function (n, t) {
              var i = this;
              e.fn._init.call(i, n, t);
              i.wrapper.addClass(vi);
            },
            options: {
              name: "Alert",
              modal: !0,
              actions: [{ text: "#: messages.okText #" }],
            },
          });
          i.ui.plugin(ct);
          lt = function (t) {
            return n(r.alert)
              .kendoAlert({ content: t })
              .data("kendoAlert")
              .open();
          };
          at = e.extend({
            _init: function (t, i) {
              var r = this;
              e.fn._init.call(r, t, i);
              r.wrapper.addClass(yi);
              r.result = n.Deferred();
            },
            options: {
              name: "Confirm",
              modal: !0,
              actions: [
                {
                  text: "#: messages.okText #",
                  primary: !0,
                  action: function (n) {
                    n.sender.result.resolve();
                  },
                },
                {
                  text: "#: messages.cancel #",
                  action: function (n) {
                    n.sender.result.reject();
                  },
                },
              ],
            },
          });
          i.ui.plugin(at);
          vt = function (t) {
            var i = n(r.confirm)
              .kendoConfirm({ content: t })
              .data("kendoConfirm")
              .open();
            return i.result;
          };
          yt = e.extend({
            _init: function (t, i) {
              var r = this;
              e.fn._init.call(r, t, i);
              r.wrapper.addClass(pi);
              r._createPrompt();
              r.result = n.Deferred();
            },
            _createPrompt: function () {
              var t = this.options.value,
                i = n(r.promptInputContainer(this.options)).insertAfter(
                  this.element
                );
              t && i.children(y).val(t);
              this._defaultFocus = this._chooseEntryFocus();
              this._focusDialog();
            },
            _chooseEntryFocus: function () {
              return this.wrapper.find(y)[0];
            },
            options: {
              name: "Prompt",
              modal: !0,
              value: "",
              actions: [
                {
                  text: "#: messages.okText #",
                  primary: !0,
                  action: function (n) {
                    var t = n.sender,
                      i = t.wrapper.find(y).val();
                    t.result.resolve(i);
                  },
                },
                {
                  text: "#: messages.cancel #",
                  action: function (n) {
                    var t = n.sender,
                      i = t.wrapper.find(y).val();
                    n.sender.result.reject(i);
                  },
                },
              ],
            },
          });
          i.ui.plugin(yt);
          pt = function (t, i) {
            var u = n(r.prompt)
              .kendoPrompt({ content: t, value: i })
              .data("kendoPrompt")
              .open();
            return u.result;
          };
          r = {
            wrapper: f(
              "<div class='k-widget k-window k-dialog' role='dialog' />"
            ),
            action: f(
              "<button type='button' class='k-button# if (data.primary) { # k-primary# } role='button' #'></button>"
            ),
            titlebar: f(
              "<div class='k-window-titlebar k-dialog-titlebar k-header'><span class='k-window-title k-dialog-title'>#: title #</span><div class='k-window-actions k-dialog-actions' /></div>"
            ),
            close: f(
              "<a role='button' href='\\#' class='k-button k-bare k-button-icon k-window-action k-dialog-action k-dialog-close' title='#: messages.close #' aria-label='#: messages.close #' tabindex='-1'><span class='k-icon k-i-close'></span></a>"
            ),
            actionbar: f(
              "<div class='k-dialog-buttongroup k-dialog-button-layout-#: buttonLayout #' role='toolbar' />"
            ),
            overlay: "<div class='k-overlay' />",
            alertWrapper: f(
              "<div class='k-widget k-window k-dialog' role='alertdialog' />"
            ),
            alert: "<div />",
            confirm: "<div />",
            prompt: "<div />",
            promptInputContainer: f(
              "<div class='k-prompt-container'><input type='text' class='k-textbox' title='#: messages.promptInput #' aria-label='#: messages.promptInput #' /></div>"
            ),
          };
          i.alert = lt;
          i.confirm = vt;
          i.prompt = pt;
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.grid.min",
      [
        "kendo.data.min",
        "kendo.columnsorter.min",
        "kendo.editable.min",
        "kendo.window.min",
        "kendo.filtermenu.min",
        "kendo.columnmenu.min",
        "kendo.groupable.min",
        "kendo.pager.min",
        "kendo.selectable.min",
        "kendo.sortable.min",
        "kendo.reorderable.min",
        "kendo.resizable.min",
        "kendo.ooxml.min",
        "kendo.excel.min",
        "kendo.pane.min",
        "kendo.progressbar.min",
        "kendo.pdf.min",
        "kendo.dialog.min",
        "kendo.pane.min",
        "kendo.switch.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function yr(n, t) {
            return "[" + i.attr(n) + "=" + t + "]";
          }
          function di(n) {
            return Array(n + 1).join('<td class="k-group-cell">&nbsp;</td>');
          }
          function dt(n) {
            var t,
              i = " ";
            if (n) {
              if (typeof n === w) return n;
              for (t in n) "" !== n[t] && (i += t + '="' + n[t] + '"');
            }
            return i;
          }
          function tf(t, i) {
            n("th, th .k-grid-filter, th .k-link", t)
              .add(document.body)
              .css("cursor", i);
          }
          function kt(t, i, r, u, f) {
            var e,
              o = i;
            for (i = n(), f = f || 1, e = 0; e < f; e++) i = i.add(t.eq(o + e));
            "number" == typeof r
              ? i[u ? "insertBefore" : "insertAfter"](t.eq(r))
              : i.appendTo(r);
          }
          function it(t, i, r) {
            return n(t).add(i).find(r);
          }
          function ko(n, t, i) {
            var f, s, u, o;
            for (i = ui(i) ? i : [i], f = 0, s = i.length; f < s; f++)
              (u = i[f]),
                a(u) &&
                  u.click &&
                  ((o = u.name || u.text),
                  t.on(
                    y + r,
                    "a.k-grid-" + (o || "").replace(/\s/g, ""),
                    { commandName: o },
                    e(u.click, n)
                  ));
          }
          function rf(n, t, r, u) {
            return ai(n, function (n) {
              var o, e;
              return (
                (n = typeof n === w ? { field: n } : n),
                (n.parentIds = u),
                (ct(n) && !r) ||
                  ((n.attributes = rr(n.attributes)),
                  (n.footerAttributes = rr(n.footerAttributes)),
                  (n.headerAttributes = rr(n.headerAttributes)),
                  (o = !0)),
                (e = i.guid()),
                (n.headerAttributes = f({ headers: u }, n.headerAttributes)),
                n.headerAttributes.id
                  ? (e = n.headerAttributes.id)
                  : (n.headerAttributes = f({ id: e }, n.headerAttributes)),
                n.columns &&
                  (n.columns = rf(n.columns, t, o, u ? u + " " + e : e)),
                f({ encoded: t, hidden: o }, n)
              );
            });
          }
          function pr(n, t) {
            var i = [];
            return wr(n, t, i), i[i.length - 1];
          }
          function wr(n, t, i) {
            var r, u;
            for (i = i || [], r = 0; r < t.length; r++) {
              if (n === t[r]) return !0;
              if (t[r].columns) {
                if (((u = i.length), i.push(t[r]), wr(n, t[r].columns, i)))
                  return !0;
                i.splice(u, i.length - u);
              }
            }
            return !1;
          }
          function go(n, t) {
            uf(n, t, t);
          }
          function uf(n, t, i) {
            var r = i ? ss : rr;
            n.hidden = !t;
            n.attributes = r(n.attributes);
            n.footerAttributes = r(n.footerAttributes);
            n.headerAttributes = r(n.headerAttributes);
          }
          function ns(n, t) {
            br(n);
            var i = n._hideByMedia;
            uf(n, t, i ? n.matchesMedia : t);
          }
          function br(n) {
            n.matchesMedia = ff(n);
          }
          function ff(n) {
            return (
              n && (ni(n.media) || (!ni(n.media) && i.matchesMedia(n.media)))
            );
          }
          function gt() {
            return "none" !== this.style.display;
          }
          function ts(t) {
            return "none" !== n(t)[0].style.display;
          }
          function ct(n) {
            return o([n]).length > 0;
          }
          function o(n) {
            return v(n, function (n) {
              var t = !n.hidden && n.matchesMedia !== !1;
              return t && n.columns && (t = o(n.columns).length > 0), t;
            });
          }
          function ef(n) {
            for (var t, r = [], i = 0; i < n.length; i++) {
              if (((t = n[i]), !ni(t.media))) {
                if (!ni(t.minScreenWidth))
                  throw Error(
                    "Using 'media' and 'minScreenWidth' options at the same time is not supported."
                  );
                r.push(t);
              }
              t.columns && (r = r.concat(ef(t.columns)));
            }
            return r;
          }
          function ni(n) {
            return t === n;
          }
          function is(t) {
            return n(t).map(function () {
              return this.toArray();
            });
          }
          function rs(n, t, i) {
            var r = si(c(t)),
              u = si(ut(t)),
              f = n.rowSpan;
            n.rowSpan = i
              ? r > u
                ? f - (r - u) || 1
                : f + (u - r)
              : r > u
              ? f + (r - u)
              : f - (u - r) || 1;
          }
          function of(t, i, r, u, f, e, o, s) {
            var l,
              a,
              h = si(t),
              c = si([i]);
            h > c &&
              ((l = Array(o + 1).join(
                '<th class="k-group-cell k-header" scope="col">&nbsp;</th>'
              )),
              (a = e.children(":not(.k-filter-row)")),
              n(Array(h - c + 1).join("<tr>" + l + "</tr>")).insertAfter(
                a.last()
              ));
            es(e, h - c);
            hf(r, u, f, e, s);
          }
          function sf(t, r, f) {
            var e, h, c, s, l, a, o, v;
            for (
              f = f || 0,
                c = r,
                r = u(r),
                s = {},
                l = t.find(">tr:not(.k-filter-row)"),
                a = function () {
                  var t = n(this);
                  return (
                    !t.hasClass("k-group-cell") &&
                    !t.hasClass("k-hierarchy-cell")
                  );
                },
                o = 0,
                v = r.length;
              o < v;
              o++
            )
              (e = ti(r[o], c)),
                s[e.row] ||
                  (s[e.row] = l.eq(e.row).find(".k-header").filter(a)),
                (h = s[e.row].eq(e.cell)),
                h.attr(i.attr("index"), f + o);
            return r.length;
          }
          function si(n) {
            for (var i, r = 0, t = 0; t < n.length; t++)
              n[t].columns && ((i = si(n[t].columns)), i > r && (r = i));
            return 1 + r;
          }
          function hf(t, i, r, u, f) {
            for (
              var o,
                s = kr(t[0], i),
                c = r.find(
                  ">tr:not(.k-filter-row):eq(" + s.row + ")>th.k-header"
                ),
                h = n(),
                l = s.cell,
                e = 0;
              e < t.length;
              e++
            )
              h = h.add(c.eq(l + e));
            for (
              u.find(">tr:not(.k-filter-row)").eq(s.row)[f](h), o = [], e = 0;
              e < t.length;
              e++
            )
              t[e].columns && (o = o.concat(t[e].columns));
            o.length && hf(o, i, r, u, f);
          }
          function ti(n, t, i, r) {
            var f, u;
            for (
              i = i || 0, r = r || {}, r[i] = r[i] || 0, u = 0;
              u < t.length;
              u++
            ) {
              if (t[u] == n) {
                f = { cell: r[i], row: i };
                break;
              }
              if (t[u].columns && (f = ti(n, t[u].columns, i + 1, r))) break;
              r[i]++;
            }
            return f;
          }
          function us(n, t, i, r) {
            var u,
              f,
              e = !!i.locked;
            do (u = n[t]), (t += r ? 1 : -1), (f = !!u.locked);
            while (
              u &&
              t > -1 &&
              t < n.length &&
              u != i &&
              !u.columns &&
              f === e
            );
            return u;
          }
          function cf(n, t, i, r, u) {
            var o, e, f, c, h;
            return t.columns
              ? ((t = t.columns), t[r ? 0 : t.length - 1])
              : ((o = pr(t, n)),
                (e = o ? o.columns : n),
                (f = s(t, e)),
                0 === f && r
                  ? f++
                  : (f == e.length - 1 && !r) || (!i.locked && !t.columns && !r)
                  ? f--
                  : (f > 0 || (0 === f && !r)) && f++,
                (c = s(i, e)),
                (t = us(e, f, i, c > f)),
                (h = s(t, u)),
                (!t.columns || (h && h !== e.length - 1)) &&
                t &&
                t != i &&
                t.columns
                  ? cf(n, t, i, r, u)
                  : null);
          }
          function kr(n, t, i, r) {
            var f, u;
            for (
              i = i || 0, r = r || {}, r[i] = r[i] || 0, u = 0;
              u < t.length;
              u++
            ) {
              if (t[u] == n) {
                f = { cell: r[i], row: i };
                break;
              }
              if (t[u].columns && (f = kr(n, t[u].columns, i + 1, r))) break;
              t[u].hidden || r[i]++;
            }
            return f;
          }
          function gi(n) {
            var t = rt(c(n));
            return t.concat(rt(ut(n)));
          }
          function nr(n, t, i, r) {
            var f = n[i],
              e = n[r],
              u = pr(f, t);
            return (t = u ? u.columns : t), s(e, t);
          }
          function rt(n) {
            for (var i = [], r = [], t = 0; t < n.length; t++)
              i.push(n[t]), n[t].columns && (r = r.concat(n[t].columns));
            return r.length && (i = i.concat(rt(r))), i;
          }
          function ii(n) {
            for (var t, r = 0, i = 0; i < n.length; i++)
              (t = n[i]), t.columns ? (r += ii(t.columns)) : t.hidden && r++;
            return r;
          }
          function lf(n) {
            for (var t, u = 0, i = 0, r = n.length; i < r; i++)
              (t = n[i].style.width),
                t && t.indexOf("%") == -1 && (u += parseInt(t, 10));
            return u;
          }
          function fs(n, t) {
            for (
              var r,
                u = n.find(
                  "tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)"
                ),
                i = 0;
              i < u.length;
              i++
            )
              (r = u[i].rowSpan), r > 1 && (u[i].rowSpan = r - t || 1);
          }
          function es(n, t) {
            for (
              var r = n.find(
                  "tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)"
                ),
                i = 0;
              i < r.length;
              i++
            )
              r[i].rowSpan += t;
          }
          function dr(t) {
            for (
              var r = t.find("tr:not(.k-filter-row)"),
                f = r
                  .filter(function () {
                    return !n(this).children().length;
                  })
                  .remove().length,
                u = r.find("th:not(.k-group-cell,.k-hierarchy-cell)"),
                i = 0;
              i < u.length;
              i++
            )
              u[i].rowSpan > 1 && (u[i].rowSpan -= f);
            return r.length - f;
          }
          function tr(n, t, i, r, u) {
            for (var o, e = [], f = 0, s = n.length; f < s; f++)
              (o = i[r] || []),
                o.push(t.eq(u + f)),
                (i[r] = o),
                n[f].columns && (e = e.concat(n[f].columns));
            e.length && tr(e, t, i, r + 1, u + n.length);
          }
          function c(n) {
            return v(n, function (n) {
              return n.locked;
            });
          }
          function ut(n) {
            return v(n, function (n) {
              return !n.locked;
            });
          }
          function gr(n) {
            return v(n, function (n) {
              return !n.locked && ct(n);
            });
          }
          function ir(n) {
            return v(n, function (n) {
              return n.locked && ct(n);
            });
          }
          function ft(n) {
            for (var i = [], t = 0; t < n.length; t++)
              n[t].hidden ||
                (n[t].columns
                  ? (i = i.concat(ft(n[t].columns)))
                  : i.push(n[t]));
            return i;
          }
          function nu(n) {
            for (var i = [], t = 0; t < n.length; t++)
              n[t].columns && (i = i.concat(n[t].columns));
            return i;
          }
          function u(n) {
            for (var i = [], t = 0; t < n.length; t++)
              n[t].columns ? (i = i.concat(u(n[t].columns))) : i.push(n[t]);
            return i;
          }
          function os(n) {
            var t,
              i = [];
            for (n = u(n), t = 0; t < n.length; t++)
              "string" == typeof n[t]
                ? i.push(n[t])
                : n[t].field && i.push(n[t].field);
            return i;
          }
          function d(r) {
            var f,
              e = r.find(">tr:not(.k-filter-row)"),
              o = function () {
                var t = n(this);
                return (
                  !t.hasClass("k-group-cell") && !t.hasClass("k-hierarchy-cell")
                );
              },
              u = n();
            return (
              e.length > 1 &&
                (u = e
                  .find("th")
                  .filter(o)
                  .filter(function () {
                    return this.rowSpan > 1;
                  })),
              (u = u.add(e.last().find("th").filter(o))),
              (f = i.attr("index")),
              u.sort(function (i, r) {
                var u, e;
                return (
                  (i = n(i)),
                  (r = n(r)),
                  (u = i.attr(f)),
                  (e = r.attr(f)),
                  u === t && (u = n(i).index()),
                  e === t && (e = n(r).index()),
                  (u = parseInt(u, 10)),
                  (e = parseInt(e, 10)),
                  u > e ? 1 : u < e ? -1 : 0
                );
              }),
              u
            );
          }
          function af(t) {
            var h,
              e,
              r,
              u,
              o,
              i,
              f,
              v = t.closest("table"),
              s = n().add(t),
              c = t.closest("tr"),
              l = v.find("tr:not(.k-filter-row)"),
              a = l.index(c);
            if (a > 0) {
              for (
                h = l.eq(a - 1),
                  e = h
                    .find("th:not(.k-group-cell,.k-hierarchy-cell)")
                    .filter(function () {
                      return !n(this).attr("rowspan");
                    }),
                  r = 0,
                  u = c
                    .find("th:not(.k-group-cell,.k-hierarchy-cell)")
                    .index(t),
                  o = t
                    .prevAll(":not(.k-group-cell,.k-hierarchy-cell)")
                    .filter(function () {
                      return this.colSpan > 1;
                    }),
                  i = 0;
                i < o.length;
                i++
              )
                r += o[i].colSpan || 1;
              for (u += Math.max(r - 1, 0), r = 0, i = 0; i < e.length; i++)
                if (
                  ((f = e.eq(i)),
                  (r += f.attr("data-colspan")
                    ? f[0].getAttribute("data-colspan")
                    : 1),
                  u >= i && u < r)
                ) {
                  s = af(f).add(s);
                  break;
                }
            }
            return s;
          }
          function hi(t) {
            var u,
              f,
              r,
              e,
              l,
              o,
              s,
              y = t.closest("thead"),
              h = n().add(t),
              a = t.closest("tr"),
              v = y.find("tr:not(.k-filter-row)"),
              p = v.index(a) + t[0].rowSpan,
              c = i.attr("colspan");
            if (p <= v.length - 1) {
              for (
                u = a.next(),
                  f = t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)"),
                  f = f.filter(function () {
                    return !this.rowSpan || 1 === this.rowSpan;
                  }),
                  e = 0,
                  r = 0;
                r < f.length;
                r++
              )
                e += parseInt(f.eq(r).attr(c), 10) || 1;
              for (
                l = u.find("th:not(.k-group-cell,.k-hierarchy-cell)"),
                  o = parseInt(t.attr(c), 10) || 1,
                  r = 0;
                r < o;

              )
                (u = l.eq(r + e)),
                  (h = h.add(hi(u))),
                  (s = parseInt(u.attr(c), 10)),
                  s > 1 && (o -= s - 1),
                  r++;
            }
            return h;
          }
          function vf(t, i, r, u) {
            var f,
              e = t;
            return (
              u && t.empty(),
              ps
                ? (t[0].innerHTML = r)
                : ((f = document.createElement("div")),
                  (f.innerHTML = "<table><tbody>" + r + "</tbody></table>"),
                  (t = f.firstChild.firstChild),
                  i[0].replaceChild(t, e[0]),
                  (t = n(t))),
              t
            );
          }
          function rr(n) {
            n = n || {};
            var t = n.style;
            return (
              t
                ? ((t = t.replace(/display:[^;]*/i, "display:none")),
                  t.match(/display:/i) ||
                    (t = t.replace(/(.*)?/i, "display:none;$1")))
                : (t = "display:none"),
              f({}, n, { style: t })
            );
          }
          function ss(n) {
            n = n || {};
            var t = n.style;
            return (
              t && (n.style = t.replace(/(display\s*:\s*none\s*;?)*/gi, "")), n
            );
          }
          function ri(t, r, u, f) {
            var o,
              e = t.find(">colgroup"),
              s = ai(r, function (n) {
                return (
                  (o = n.width),
                  o && 0 !== parseInt(o, 10)
                    ? i.format(
                        '<col style="width:{0}"/>',
                        typeof o === w ? o : o + "px"
                      )
                    : "<col />"
                );
              });
            (u || e.find(".k-hierarchy-col").length) &&
              s.splice(0, 0, '<col class="k-hierarchy-col" />');
            e.length && e.remove();
            e = n(Array(f + 1).join('<col class="k-group-col">') + s.join(""));
            e.is("colgroup") || (e = n("<colgroup/>").append(e));
            t.prepend(e);
            h.msie &&
              8 == h.version &&
              (t.css("display", "inline-table"),
              window.setTimeout(function () {
                t.css("display", "");
              }, 1));
          }
          function hs(n, t) {
            for (
              var f = 0,
                r = n.find("th:not(.k-group-cell)"),
                i = 0,
                u = t.length;
              i < u;
              i++
            )
              t[i].locked &&
                (r.eq(i).insertBefore(r.eq(f)),
                (r = n.find("th:not(.k-group-cell)")),
                f++);
          }
          function yf(n) {
            for (var i, u = {}, t = 0, r = n.length; t < r; t++)
              (i = n[t]), (u[i.value] = i.text);
            return u;
          }
          function pf(n, t, r, u) {
            var e = r && r.length && a(r[0]) && "value" in r[0],
              f = e ? yf(r)[n] : n;
            return (
              (f = null != f ? f : ""),
              t ? i.format(t, f) : u === !1 ? f : i.htmlEncode(f)
            );
          }
          function wt(n, t, i) {
            for (var u, f = 0, r = n[f]; r; ) {
              if (
                ((u = !!i || "none" !== r.style.display),
                u && !eh.test(r.className) && --t < 0)
              ) {
                r.style.display = i ? "" : "none";
                break;
              }
              r = n[++f];
            }
          }
          function wf(t, i) {
            for (var r, u, f = 0, e = t.length; f < e; f += 1)
              (u = t.eq(f)),
                u.is(".k-grouping-row,.k-detail-row")
                  ? ((r = u
                      .children(":not(.k-group-cell):first,.k-detail-cell")
                      .last()),
                    r.attr("colspan", parseInt(r.attr("colspan"), 10) - 1))
                  : (u.hasClass("k-grid-edit-row") &&
                      (r = u.children(".k-edit-container")[0]) &&
                      ((r = n(r)),
                      r.attr("colspan", parseInt(r.attr("colspan"), 10) - 1),
                      r.find("col").eq(i).remove(),
                      (u = r.find("tr:first"))),
                    wt(u[0].cells, i, !1));
          }
          function tu(n) {
            for (
              var t, r = [], i = 0;
              i < n.length &&
              ((t = n[i]), "field" in t && "value" in t && "items" in t);
              i++
            )
              r.push(t), t.hasSubgroups && (r = r.concat(tu(t.items)));
            return r;
          }
          function bf(n) {
            for (
              var t, r = [], i = 0;
              i < n.length &&
              ((t = n[i]), "field" in t && "value" in t && "items" in t);
              i++
            )
              t.hasSubgroups && (r = r.concat(bf(t.items))),
                r.push(t.aggregates);
            return r;
          }
          function kf(t, i) {
            for (var r, u, e, f = 0, s = t.length; f < s; f += 1)
              (u = t.eq(f)),
                u.is(".k-grouping-row,.k-detail-row")
                  ? ((r = u
                      .children(":not(.k-group-cell):first,.k-detail-cell")
                      .last()),
                    r.attr("colspan", parseInt(r.attr("colspan"), 10) + 1))
                  : (u.hasClass("k-grid-edit-row") &&
                      (r = u.children(".k-edit-container")[0]) &&
                      ((r = n(r)),
                      r.attr("colspan", parseInt(r.attr("colspan"), 10) + 1),
                      ri(r.find(">form>table"), o(e), !1, 0),
                      (u = r.find("tr:first"))),
                    wt(u[0].cells, i, !0));
          }
          function df(n, t, i) {
            i = i || 1;
            for (var r, u = 0, f = n.length; u < f; u++)
              (r = n.eq(u).children().last()),
                r.attr("colspan", parseInt(r.attr("colspan"), 10) + i),
                (r = t.eq(u).children().last()),
                r.attr("colspan", parseInt(r.attr("colspan"), 10) - i);
          }
          function gf(n) {
            for (
              var r = 0, u = n.find(">colgroup>col"), t = 0, i = u.length;
              t < i;
              t += 1
            )
              r += parseInt(u[t].style.width, 10);
            return r;
          }
          function cs(n, t) {
            var r, u, i, f;
            n = n[0];
            t = t[0];
            n.rows.length !== t.rows.length &&
              ((r = n.offsetHeight),
              (u = t.offsetHeight),
              r > u
                ? ((i = t.rows[t.rows.length - 1]),
                  vo.test(i.className) && (i = t.rows[t.rows.length - 2]),
                  (f = r - u))
                : ((i = n.rows[n.rows.length - 1]),
                  vo.test(i.className) && (i = n.rows[n.rows.length - 2]),
                  (f = u - r)),
              (i.style.height = i.offsetHeight + f + "px"));
          }
          function ci(n, t) {
            var i,
              r = n.offsetHeight,
              u = t.offsetHeight;
            r > u ? (i = r + "px") : r < u && (i = u + "px");
            i && (n.style.height = t.style.height = i);
          }
          function iu(n, t) {
            var r, u, i;
            if ((typeof n === w && n === t) || (a(n) && n.name === t)) return n;
            if (ui(n))
              for (r = 0, u = n.length; r < u; r++)
                if (((i = n[r]), (typeof i === w && i === t) || i.name === t))
                  return i;
            return null;
          }
          function b(t, r) {
            if (r === !0) {
              t = n(t);
              var u = t.parent().scrollLeft();
              i.focusElement(t);
              t.parent().scrollLeft(u);
            } else
              n(t)
                .one("focusin", function (n) {
                  n.preventDefault();
                })
                .focus();
          }
          function ls(n, i) {
            return n.options.groupable && (i.groupable || i.groupable === t);
          }
          function as(t, i) {
            return !!n.grep(t, function (n) {
              return n.field === i;
            }).length;
          }
          function ur(n, t) {
            return (
              !(!n.field || n.selectable) &&
              !(t.editable && !t.editable(n.field)) &&
              !(n.editable && !n.editable(t))
            );
          }
          function ne(t) {
            return n(t).is(
              ":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,label.k-checkbox-label,.k-input,.k-multiselect-wrap,.k-picker-wrap,.k-picker-wrap>.k-selected-color,.k-tool-icon,.k-dropdown"
            );
          }
          function te(r) {
            var f = n(r.currentTarget),
              e = f.is("th"),
              o = this.table.add(this.lockedTable),
              s = this.thead.parent().add(n(">table", this.lockedHeader)),
              h = ne(r.target),
              c = n(r.target).is(".k-checkbox-label, .k-checkbox"),
              l = n(r.target),
              u = f.closest("table")[0];
            return h && f.find(i.roleSelector("filtercell")).length
              ? (this._setCurrent(f), t)
              : ((u !== o[0] && u !== o[1] && u !== s[0] && u !== s[1]) ||
                  l.is("a.k-i-expand, a.k-i-collapse") ||
                  (this.options.navigatable && this._setCurrent(f, !1, c),
                  (!e && h) ||
                    setTimeout(function () {
                      (ch && n(i._activeElement()).hasClass("k-widget")) ||
                        (!n(i._activeElement()).is(yt) &&
                          ne(i._activeElement()) &&
                          n.contains(u, i._activeElement())) ||
                        b(u, !0);
                    }),
                  e && !i.support.touch && r.preventDefault()),
                t);
          }
          function ie(n, t) {
            if (!t) return 0;
            var r = 0;
            return i.support.browser.webkit && (r = n.width()), r;
          }
          function vs(n) {
            return (
              n &&
              (n.hasClass("k-edit-cell") ||
                n.parent().hasClass("k-grid-edit-row"))
            );
          }
          function fr(n) {
            return (
              '<td colspan="#=data.colspan +' +
              n +
              '#"><p class="k-reset"><a class="k-icon k-i-collapse" href="\\#" tabindex="-1" ' +
              ei +
              '="' +
              ar +
              '"></a>#=data.text#</p></td>'
            );
          }
          function ys(n) {
            return '<td colspan="' + n + '"><p class="k-reset">&nbsp;</p></td>';
          }
          function er(n, t, i) {
            return (
              '<tr role="row" class="k-grouping-row">' +
              di(t) +
              '<td colspan="' +
              n +
              '" aria-expanded="true"><p class="k-reset"><a class="k-icon k-i-collapse" href="#" tabindex="-1" ' +
              ei +
              '="' +
              ar +
              '"></a>' +
              i +
              "</p></td></tr>"
            );
          }
          function re(n) {
            return (
              '<tr role="row" class="k-grouping-row"><td colspan="' +
              n +
              '" aria-expanded="true"><p class="k-reset">&nbsp;</p></td></tr>'
            );
          }
          var i = window.kendo,
            lt = i.ui,
            ue = i.data.DataSource,
            fe = i.data.ObservableObject,
            ps = i.support.tbodyInnerHtml,
            at = i._activeElement,
            li = lt.Widget,
            st = i._outerWidth,
            vt = i._outerHeight,
            l = i.keys,
            a = n.isPlainObject,
            f = n.extend,
            ai = n.map,
            v = n.grep,
            ui = n.isArray,
            s = n.inArray,
            ee = Array.prototype.push,
            e = n.proxy,
            fi = i.isFunction,
            oe = n.isEmptyObject,
            ru = n.contains,
            nt = Math,
            et = ".",
            uu = "progress",
            fu = "error",
            ws = "k-hierarchy-cell",
            p =
              ":not(.k-group-cell):not(.k-hierarchy-cell:not(:has(.k-icon.k-i-collapse,.k-icon.k-i-expand))):visible",
            bs =
              "tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",
            ht = "tr:not(.k-footer-template):visible",
            ot =
              ":not(.k-group-cell):not(.k-detail-cell):not(.k-hierarchy-cell):visible",
            bt =
              "tr:not(.k-grouping-row):not(.k-detail-row):not(.k-footer-template):not(.k-group-footer):visible",
            se = bt + ":first",
            ks = bt + ":last",
            he = ht + ":first>" + ot + ":first",
            or = "th.k-header:not(.k-group-cell):not(.k-hierarchy-cell)",
            r = ".kendoGrid",
            ds = "k-grid-content-locked",
            gs = "k-group-cell",
            sr = "edit",
            hr = "beforeEdit",
            eu = "save",
            ou = "remove",
            su = "detailInit",
            ce = "filterMenuInit",
            le = "columnMenuInit",
            ae = "filterMenuOpen",
            ve = "columnMenuOpen",
            ye = "cellClose",
            k = "change",
            hu = "columnHide",
            cu = "columnShow",
            pe = "saveChanges",
            lu = "dataBound",
            we = "detailExpand",
            be = "detailCollapse",
            au = "itemchange",
            vu = "page",
            yu = "paging",
            pu = "scroll",
            cr = "sync",
            vi = "k-state-focused",
            ke = ":kendoFocusable",
            yi = "k-state-selected",
            wu = "k-checkbox",
            yt = "input[data-role='checkbox']." + wu,
            de = "k-grid-norecords",
            ge = "k-link",
            no = "k-icon",
            to = "k-sort-order",
            io = "k-header-column-menu",
            ro = "k-grid-filter",
            uo = "resize",
            bu = "columnResize",
            fo = "columnReorder",
            eo = "columnLock",
            oo = "columnUnlock",
            so = "navigate",
            y = "click",
            nh = "mousedown",
            lr = "height",
            pi = "tabIndex",
            pt = "function",
            w = "string",
            ho = "bottom",
            ku = "container-for",
            du = "field",
            co = "input",
            gu = "incell",
            th = "inline",
            ih = "uid",
            lo = 1,
            rh = "colSpan",
            wi = "overflow",
            uh = "hidden",
            ao = "group-sort",
            ar = "Collapse",
            nf = "Expand",
            ei = "aria-label",
            fh = /(\}|\#)/gi,
            bi = /#/gi,
            vr = "[\\x20\\t\\r\\n\\f]",
            eh = RegExp(
              "(^|" + vr + ")(k-group-cell|k-hierarchy-cell)(" + vr + "|$)"
            ),
            vo = RegExp("(^|" + vr + ")(k-filter-row)(" + vr + "|$)"),
            oh =
              '# if (iconClass) {#<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#"><span class="#=iconClass#"></span>#=text#</a># } else { #<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#">#=text#</a># } #',
            sh =
              '# var checkboxGuid = kendo.guid(); #<input class="' +
              wu +
              '" data-role="checkbox" id="#= checkboxGuid #" aria-label="Select row" aria-checked="false" type="checkbox"><label for="#= checkboxGuid #" class="k-checkbox-label k-no-text">&\\#8203;</label>',
            hh =
              '# var checkboxGuid = kendo.guid(); #<input class="' +
              wu +
              '" data-role="checkbox" aria-label="Select all rows" aria-checked="false" type="checkbox" id="#= checkboxGuid #"><label for="#= checkboxGuid #" class="k-checkbox-label k-no-text">##&\\#8203;##</label>',
            tt = !1,
            h = i.support.browser,
            ki = h.msie && 7 == h.version,
            ch = h.msie && 8 == h.version,
            yo = h.msie && 11 === h.version,
            po = /Mac OS/.test(navigator.userAgent),
            wo = {
              content: "k-content",
              widget: "k-widget",
              scrollContainer: "k-scroll-container",
            },
            bo = li.extend({
              init: function (n, t) {
                var i = this;
                li.fn.init.call(i, n, t);
                i._refreshHandler = e(i.refresh, i);
                i.setDataSource(t.dataSource);
                i.wrap();
              },
              setDataSource: function (n) {
                var t = this;
                t.dataSource && t.dataSource.unbind(k, t._refreshHandler);
                t.dataSource = n;
                t.dataSource.bind(k, t._refreshHandler);
                t.dataSource.options.useRanges = !0;
              },
              options: {
                name: "VirtualScrollable",
                itemHeight: n.noop,
                prefetch: !0,
                maxScrollHeight: 25e4,
              },
              events: [yu, vu, pu],
              destroy: function () {
                var n = this;
                li.fn.destroy.call(n);
                n.dataSource.unbind(k, n._refreshHandler);
                n.wrapper.add(n.verticalScrollbar).off(r);
                clearTimeout(n._timeout);
                n._scrollingTimeout && clearTimeout(n._scrollingTimeout);
                n.drag && (n.drag.destroy(), (n.drag = null));
                n.wrapper = n.element = n.verticalScrollbar = null;
                n._refreshHandler = null;
              },
              wrap: function () {
                var u,
                  t = this,
                  o = i.support.scrollbar() + 1,
                  f = t.element;
                f.css({ width: "auto", overflow: "hidden" }).css(
                  tt ? "padding-left" : "padding-right",
                  o
                );
                t.content = f.children().first();
                u = t.wrapper = t.content
                  .wrap('<div class="k-virtual-scrollable-wrap"/>')
                  .parent()
                  .bind(
                    "DOMMouseScroll" + r + " mousewheel" + r,
                    e(t._wheelScroll, t)
                  );
                t._wrapper();
                i.support.kineticScrollNeeded &&
                  (t.drag = new i.UserEvents(t.wrapper, {
                    global: !0,
                    allowSelection: !0,
                    start: function (n) {
                      n.sender.capture();
                    },
                    move: function (n) {
                      t.verticalScrollbar.scrollTop(
                        t.verticalScrollbar.scrollTop() - n.y.delta
                      );
                      u.scrollLeft(u.scrollLeft() - n.x.delta);
                      n.preventDefault();
                    },
                  }));
                t.verticalScrollbar = n(
                  '<div class="k-scrollbar k-scrollbar-vertical" />'
                )
                  .css({ width: o })
                  .appendTo(f)
                  .bind("scroll" + r, e(t._scroll, t));
              },
              _wrapper: function () {
                var n = this;
                yo &&
                  (n.wrapper.css({ "overflow-y": pu }),
                  n.element.css(tt ? "padding-left" : "padding-right", 0));
              },
              _wheelScroll: function (n) {
                if (!n.ctrlKey) {
                  var r = this.verticalScrollbar,
                    u = r.scrollTop(),
                    t = i.wheelDeltaY(n);
                  !t ||
                    (t > 0 && 0 === u) ||
                    (t < 0 && u + r[0].clientHeight == r[0].scrollHeight) ||
                    (n.preventDefault(),
                    this.verticalScrollbar.scrollTop(u + -t));
                }
              },
              _scroll: function (n) {
                var i = this,
                  f = !i.options.prefetch,
                  r = n.currentTarget.scrollTop,
                  h = i.dataSource,
                  u = i.itemHeight,
                  c = h.skip() || 0,
                  l = i._rangeStart || c,
                  e = i.element.innerHeight(),
                  o = !!(i._scrollbarTop && i._scrollbarTop > r),
                  s = nt.max(nt.floor(r / u), 0),
                  a = o ? nt.ceil(e / u) : nt.floor(e / u),
                  v = nt.max(s + a, 0);
                return i._preventScroll
                  ? ((i._preventScroll = !1), t)
                  : ((i._scrollTop = r - l * u),
                    (i._scrollbarTop = r),
                    (i._scrolling = f),
                    i._fetch(s, v, o) ||
                      (i.wrapper[0].scrollTop = i._scrollTop),
                    i.trigger(pu),
                    f &&
                      (i._scrollingTimeout && clearTimeout(i._scrollingTimeout),
                      (i._scrollingTimeout = setTimeout(function () {
                        i._scrolling = !1;
                        i._page(i._rangeStart, i.dataSource.take());
                      }, 100))),
                    t);
              },
              scrollToTop: function () {
                this._scrollTo(0);
              },
              scrollToBottom: function () {
                var n = this.verticalScrollbar;
                this._scrollTo(n[0].scrollHeight - n.height());
              },
              _scrollWrapperToTop: function () {
                this.wrapper.scrollTop(0);
              },
              _scrollWrapperToBottom: function () {
                this.wrapper.scrollTop(this.wrapper[0].scrollHeight);
              },
              _scrollWrapperOnColumnResize: function () {
                var n = this,
                  t = this.wrapper,
                  r = t.scrollTop();
                t[0].scrollWidth > t[0].clientWidth
                  ? ((!n._wrapperScrolled && r) || n._isScrolledToBottom()) &&
                    (t.scrollTop(r + i.support.scrollbar()),
                    (n._scrollTop = t.scrollTop()),
                    (n._wrapperScrolled = !0))
                  : n._wrapperScrolled &&
                    (n._isWrapperScrolledToBottom() ||
                      (t.scrollTop(r - i.support.scrollbar()),
                      (n._scrollTop = t.scrollTop())),
                    (n._wrapperScrolled = !1));
              },
              _scrollTo: function (n) {
                var t = this,
                  i = t.verticalScrollbar;
                i.scrollTop() !== n && (t._preventScroll = !0);
                t.wrapper.scrollTop(n);
                t._scrollTop = t.wrapper.scrollTop();
                i.scrollTop(n);
                t._scrollbarTop = i.scrollTop();
              },
              _isScrolledToTop: function () {
                return 0 === this.verticalScrollbar.scrollTop();
              },
              _isScrolledToBottom: function () {
                var n = this.verticalScrollbar,
                  t = n.scrollTop();
                return (
                  t > 0 && t >= parseInt(n[0].scrollHeight - n.height(), 10)
                );
              },
              _isWrapperScrolledToBottom: function () {
                var n = this.wrapper;
                return (
                  n.scrollTop() >= parseInt(n[0].scrollHeight - n.height(), 10)
                );
              },
              itemIndex: function (n) {
                var t = this._rangeStart || this.dataSource.skip() || 0;
                return t + n;
              },
              _isElementVisible: function (n) {
                return this._isElementVisibleInWrapper(n);
              },
              _isElementVisibleInWrapper: function (t) {
                var i,
                  r,
                  f = this,
                  u = f.wrapper;
                return (
                  (t = n(t)),
                  !!(
                    t[0] &&
                    ru(u[0], t[0]) &&
                    ((i = t.offset().top - u.offset().top),
                    (r = t.outerHeight() / 2),
                    (i >= 0 || nt.abs(i) <= r) && nt.floor(i + r) <= u.height())
                  )
                );
              },
              position: function (n) {
                var t,
                  i = this._rangeStart || this.dataSource.skip() || 0,
                  r = this.dataSource.pageSize();
                return (t = n > i ? n - i + 1 : i - n - 1), t > r ? r : t;
              },
              scrollIntoView: function (n) {
                var t = this.wrapper[0],
                  i = t.clientHeight,
                  r = this._isScrolledToBottom()
                    ? t.scrollTop
                    : this._scrollTop || t.scrollTop,
                  u = n[0].offsetTop,
                  f = n[0].offsetHeight;
                r > u
                  ? (this.verticalScrollbar[0].scrollTop -= i / 2)
                  : u + f >= r + i &&
                    (this.verticalScrollbar[0].scrollTop += i / 2);
              },
              _fetch: function (t, i, r) {
                var f = this,
                  o = f.dataSource,
                  a = f.itemHeight,
                  u = o.take(),
                  e = f._rangeStart || o.skip() || 0,
                  s = nt.floor(t / u) * u,
                  l = !1,
                  v = 0.33,
                  c = f.verticalScrollbar,
                  y = h.webkit ? 1 : 0;
                return (
                  t < e
                    ? ((l = !0),
                      (e = nt.max(0, i - u)),
                      (f._scrollTop = c.scrollTop() - e * a),
                      f._page(e, u))
                    : i >= e + u && !r
                    ? ((l = !0),
                      (e = nt.min(t, o.total() - u)),
                      (f._scrollTop =
                        c.scrollTop() >=
                        c[0].scrollHeight - c[0].offsetHeight - y
                          ? f.wrapper[0].scrollHeight -
                            f.wrapper[0].offsetHeight
                          : a),
                      f._page(e, u))
                    : !f._fetching &&
                      f.options.prefetch &&
                      (t < s + u - u * v &&
                        t > u &&
                        o.prefetch(s - u, u, n.noop),
                      i > s + u * v && o.prefetch(s + u, u, n.noop)),
                  l
                );
              },
              fetching: function () {
                return this._fetching;
              },
              _page: function (t, r, u) {
                var f = this,
                  o = !f.options.prefetch,
                  e = f.dataSource;
                u = fi(u) ? u : n.noop;
                f.trigger(yu, { skip: t, take: r }) ||
                  (clearTimeout(f._timeout),
                  (f._fetching = !0),
                  (f._rangeStart = t),
                  e.inRange(t, r)
                    ? (i.ui.progress(n(f.wrapper).parent(), !0),
                      e.range(t, r, function () {
                        i.ui.progress(n(f.wrapper).parent(), !1);
                        u();
                        f.trigger(vu);
                      }))
                    : (o || i.ui.progress(f.wrapper.parent(), !0),
                      (f._timeout = setTimeout(function () {
                        f._scrolling ||
                          (o && i.ui.progress(f.wrapper.parent(), !0),
                          e.range(t, r, function () {
                            i.ui.progress(f.wrapper.parent(), !1);
                            u();
                            f.trigger(vu);
                          }));
                      }, 100))));
              },
              repaintScrollbar: function (n) {
                for (
                  var r = this,
                    e = "",
                    u = r.options.maxScrollHeight,
                    h = r.dataSource,
                    c = i.support.kineticScrollNeeded
                      ? 0
                      : i.support.scrollbar(),
                    o = r.wrapper[0],
                    l = r._isScrolledToBottom(),
                    a = (r.itemHeight = r.options.itemHeight() || 0),
                    v = o.scrollWidth > o.offsetWidth ? c : 0,
                    s = h.total() * a + v,
                    f = 0;
                  f < nt.floor(s / u);
                  f++
                )
                  e += '<div style="width:1px;height:' + u + 'px"></div>';
                s % u &&
                  (e +=
                    '<div style="width:1px;height:' + (s % u) + 'px"></div>');
                r.verticalScrollbar.html(e);
                l && !r._isScrolledToBottom() && r.scrollToBottom();
                t !== r._scrollTop &&
                  n &&
                  ((o.scrollTop = r._scrollTop),
                  r._scrollWrapperOnColumnResize());
              },
              refresh: function (n) {
                var r = this,
                  f = r.dataSource,
                  e = r._rangeStart,
                  u = (n || {}).action,
                  o =
                    r._isScrolledToBottom() ||
                    !u ||
                    (u !== au && u !== ou && u !== cr);
                i.ui.progress(r.wrapper.parent(), !1);
                clearTimeout(r._timeout);
                r.repaintScrollbar(o);
                r.drag && r.drag.cancel();
                t === e ||
                  r._fetching ||
                  ((!u || (u !== cr && u !== au)) && (r._rangeStart = f.skip()),
                  1 !== f.page() ||
                    (u && (u === cr || u === au)) ||
                    (r.verticalScrollbar[0].scrollTop = 0));
                r._fetching = !1;
              },
            }),
            g = {
              create: {
                text: "Add new record",
                className: "k-grid-add",
                iconClass: "k-icon k-i-plus",
              },
              cancel: {
                text: "Cancel changes",
                className: "k-grid-cancel-changes",
                iconClass: "k-icon k-i-cancel",
              },
              save: {
                text: "Save changes",
                className: "k-grid-save-changes",
                iconClass: "k-icon k-i-check",
              },
              destroy: {
                text: "Delete",
                className: "k-grid-delete",
                iconClass: "k-icon k-i-close",
              },
              edit: {
                text: "Edit",
                className: "k-grid-edit",
                iconClass: "k-icon k-i-edit",
              },
              update: {
                text: "Update",
                className: "k-primary k-grid-update",
                iconClass: "k-icon k-i-check",
              },
              canceledit: {
                text: "Cancel",
                className: "k-grid-cancel",
                iconClass: "k-icon k-i-cancel",
              },
              excel: {
                text: "Export to Excel",
                className: "k-grid-excel",
                iconClass: "k-icon k-i-file-excel",
              },
              pdf: {
                text: "Export to PDF",
                className: "k-grid-pdf",
                iconClass: "k-icon k-i-file-pdf",
              },
            },
            oi = i.ui.DataBoundWidget.extend({
              init: function (t, u, f) {
                var e = this;
                u = ui(u) ? { dataSource: u } : u;
                li.fn.init.call(e, t, u);
                f && (e._events = f);
                tt = i.support.isRtl(t);
                e._element();
                e._aria();
                e._columns(n.extend(!0, [], e.options.columns));
                e._dataSource();
                e._tbody();
                e._pageable();
                e._thead();
                e._groupable();
                e._toolbar();
                e._setContentHeight();
                e._templates();
                e._navigatable();
                e._selectable();
                e._clipboard();
                e._details();
                e._editable();
                e._attachCustomCommandsEvent();
                e._adaptiveColumns();
                e._minScreenSupport();
                e.options.autoBind
                  ? e.dataSource.fetch()
                  : ((e._group = e._groups() > 0), e._footer());
                e.lockedContent &&
                  (e.wrapper.addClass("k-grid-lockedcolumns"),
                  (e._resizeHandler = function () {
                    e.resize();
                  }),
                  n(window).on("resize" + r, e._resizeHandler));
                i.notify(e);
              },
              events: [
                k,
                "dataBinding",
                "cancel",
                lu,
                we,
                be,
                su,
                ce,
                ae,
                le,
                ve,
                sr,
                hr,
                eu,
                ou,
                pe,
                ye,
                bu,
                fo,
                cu,
                hu,
                eo,
                oo,
                so,
                "page",
                "sort",
                "filter",
                "group",
                "groupExpand",
                "groupCollapse",
              ],
              setDataSource: function (n) {
                var i,
                  t = this,
                  r = t.options.scrollable;
                t.options.dataSource = n;
                t._dataSource();
                t._pageable();
                t._thead();
                r &&
                  (r.virtual
                    ? ((i = t.content.find(">.k-virtual-scrollable-wrap")),
                      i.scrollLeft(ie(i, tt)))
                    : ((i = t.tbody), t.content.scrollLeft(ie(i, tt))));
                t.options.groupable && t._groupable();
                t.virtualScrollable &&
                  t.virtualScrollable.setDataSource(t.options.dataSource);
                t.options.navigatable && t._navigatable();
                t.options.selectable && t._selectable();
                t.options.autoBind && t.dataSource.fetch();
              },
              options: {
                name: "Grid",
                columns: [],
                toolbar: null,
                autoBind: !0,
                filterable: !1,
                scrollable: !0,
                sortable: !1,
                selectable: !1,
                allowCopy: !1,
                navigatable: !1,
                pageable: !1,
                persistSelection: !1,
                editable: !1,
                groupable: !1,
                rowTemplate: "",
                altRowTemplate: "",
                search: !1,
                noRecords: !1,
                dataSource: {},
                height: null,
                resizable: !1,
                reorderable: !1,
                columnMenu: !1,
                detailTemplate: null,
                columnResizeHandleWidth: 3,
                mobile: "",
                messages: {
                  editable: {
                    cancelDelete: "Cancel",
                    confirmation:
                      "Are you sure you want to delete this record?",
                    confirmDelete: "Delete",
                  },
                  commands: {
                    create: g.create.text,
                    cancel: g.cancel.text,
                    save: g.save.text,
                    destroy: g.destroy.text,
                    edit: g.edit.text,
                    update: g.update.text,
                    canceledit: g.canceledit.text,
                    excel: g.excel.text,
                    pdf: g.pdf.text,
                  },
                  search: "Search...",
                  noRecords: "No records available.",
                  expandCollapseColumnHeader: "",
                  groupHeader: "Press ctrl + space to group",
                  ungroupHeader: "Press ctrl + space to ungroup",
                },
              },
              destroy: function () {
                var u,
                  t = this;
                t._angularItems("cleanup");
                t._destroyColumnAttachments();
                li.fn.destroy.call(t);
                this._navigatableTables &&
                  (this._navigatableTables.off(r),
                  (this._navigatableTables = null));
                t._resizeHandler &&
                  n(window).off("resize" + r, t._resizeHandler);
                t.pager && t.pager.element && t.pager.destroy();
                t.timer && clearTimeout(t.timer);
                t._progressTimeOut && clearTimeout(t._progressTimeOut);
                t._collapseGroupsTimeOut &&
                  clearTimeout(t._collapseGroupsTimeOut);
                t._endlessFetchTimeOut && clearTimeout(t._endlessFetchTimeOut);
                t.pager = null;
                t._destroyGroupable();
                t.options.reorderable &&
                  t.wrapper.data("kendoReorderable").destroy();
                t.selectable &&
                  t.selectable.element &&
                  (t.selectable.destroy(),
                  t.clearArea(),
                  (t._selectedIds = null),
                  t.copyHandler &&
                    (t.wrapper.off("keydown", t.copyHandler),
                    t.unbind(t.copyHandler)),
                  t.updateClipBoardState &&
                    (t.unbind(t.updateClipBoardState),
                    (t.updateClipBoardState = null)),
                  t.clearAreaHandler &&
                    t.wrapper.off("keyup", t.clearAreaHandler));
                t.selectable = null;
                t.resizable &&
                  (t.resizable.destroy(),
                  t._resizeUserEvents &&
                    (t._resizeHandleDocumentClickHandler &&
                      n(document).off(
                        "click",
                        t._resizeHandleDocumentClickHandler
                      ),
                    t._resizeUserEvents.destroy(),
                    (t._resizeUserEvents = null)),
                  (t.resizable = null));
                t._destroyVirtualScrollable();
                t._destroyEditable();
                t.dataSource &&
                  (t.dataSource
                    .unbind(k, t._refreshHandler)
                    .unbind(uu, t._progressHandler)
                    .unbind(fu, t._errorHandler),
                  (t._refreshHandler =
                    t._progressHandler =
                    t._errorHandler =
                      null));
                u = t.element
                  .add(t.wrapper)
                  .add(t.table)
                  .add(t.thead)
                  .add(t.wrapper.find(">.k-grid-toolbar"));
                t.content &&
                  (u = u
                    .add(t.content)
                    .add(t.content.find(">.k-virtual-scrollable-wrap")));
                t.lockedHeader && t._removeLockedContainers();
                t.pane && t.pane.destroy();
                t._isMobile &&
                  (t.wrapper.off("transitionend" + r),
                  t.wrapper.off("contextmenu" + r));
                t.minScreenResizeHandler &&
                  n(window).off("resize", t.minScreenResizeHandler);
                t._detachColumnMediaResizeHandler();
                t._draggableInstance &&
                  t._draggableInstance.element &&
                  t._draggableInstance.destroy();
                t._draggableInstance = null;
                u.off(r);
                i.destroy(t.wrapper);
                t.rowTemplate =
                  t.altRowTemplate =
                  t.lockedRowTemplate =
                  t.lockedAltRowTemplate =
                  t.detailTemplate =
                  t.footerTemplate =
                  t.groupFooterTemplate =
                  t.lockedGroupFooterTemplate =
                  t.noRecordsTemplate =
                    null;
                t.scrollables =
                  t.thead =
                  t.tbody =
                  t.element =
                  t.table =
                  t.content =
                  t.footer =
                  t.wrapper =
                  t.lockedTable =
                  t.lockedContent =
                  t.lockedHeader =
                  t.lockedFooter =
                  t._groupableClickHandler =
                  t._groupRows =
                  t._setContentWidthHandler =
                    null;
              },
              getOptions: function () {
                var r,
                  u,
                  e,
                  o = this.options;
                return (
                  (o.dataSource = null),
                  (r = f(!0, {}, this.options)),
                  (r.columns = i.deepExtend([], this.columns)),
                  (u = this.dataSource),
                  (e = u.options.data && u._data),
                  (u.options.data = null),
                  (r.dataSource = n.extend(!0, {}, u.options)),
                  (u.options.data = e),
                  (r.dataSource.data = e),
                  (r.dataSource.page = u.page()),
                  (r.dataSource.filter = n.extend(!0, {}, u.filter())),
                  (r.dataSource.pageSize = u.pageSize()),
                  (r.dataSource.sort = u.sort()),
                  (r.dataSource.group = u.group()),
                  (r.dataSource.aggregate = u.aggregate()),
                  r.dataSource.transport &&
                    (r.dataSource.transport.dataSource = null),
                  r.pageable &&
                    r.pageable.pageSize &&
                    (r.pageable.pageSize = u.pageSize()),
                  (r.$angular = t),
                  r
                );
              },
              setOptions: function (n) {
                var t,
                  e,
                  r,
                  f,
                  u = this.getOptions();
                i.deepExtend(u, n);
                n.dataSource || (u.dataSource = this.dataSource);
                t = this.wrapper;
                e = this._events;
                r = this.element;
                this.destroy();
                this.options = null;
                this._isMobile &&
                  ((f = t.closest(i.roleSelector("pane")).parent()),
                  f.after(t),
                  f.remove(),
                  t.removeClass("k-grid-mobile"));
                t[0] !== r[0] && (t.before(r), t.remove());
                r.empty();
                this.init(r, u, e);
                this._setEvents(u);
              },
              items: function () {
                return this.lockedContent
                  ? this._items(this.tbody).add(
                      this._items(this.lockedTable.children("tbody"))
                    )
                  : this._items(this.tbody);
              },
              _items: function (t) {
                return t.children().filter(function () {
                  var t = n(this);
                  return (
                    !t.hasClass("k-grouping-row") &&
                    !t.hasClass("k-detail-row") &&
                    !t.hasClass("k-group-footer")
                  );
                });
              },
              dataItems: function () {
                var t,
                  r,
                  n,
                  u = i.ui.DataBoundWidget.fn.dataItems.call(this);
                if (this.lockedContent) {
                  for (t = u.length, r = Array(2 * t), n = t; --n >= 0; )
                    r[n] = r[n + t] = u[n];
                  u = r;
                }
                return u;
              },
              _destroyColumnAttachments: function () {
                var t = this;
                t.resizeHandle = null;
                t.thead &&
                  (this.angular("cleanup", function () {
                    return { elements: t.thead.get() };
                  }),
                  t.thead
                    .add(t.lockedHeader)
                    .find("th")
                    .each(function () {
                      var t = n(this),
                        i = t.data("kendoFilterMenu"),
                        r = t.data("kendoColumnSorter"),
                        u = t.data("kendoColumnMenu");
                      i && i.destroy();
                      r && r.destroy();
                      u && u.destroy();
                    }));
              },
              _attachCustomCommandsEvent: function () {
                for (
                  var t, i = this, f = u(i.columns || []), n = 0, r = f.length;
                  n < r;
                  n++
                )
                  (t = f[n].command), t && ko(i, i.wrapper, t);
              },
              _aria: function () {
                var n = this.element.attr("id") || "aria";
                n && (this._cellId = n + "_active_cell");
              },
              _element: function () {
                var t = this,
                  i = t.element;
                i.is("table") ||
                  ((i = t.options.scrollable
                    ? t.element.find("> .k-grid-content > table")
                    : t.element.children("table")),
                  i.length || (i = n("<table />").appendTo(t.element)));
                ki && i.attr("cellspacing", 0);
                t.table = i.attr("role", t._hasDetails() ? "treegrid" : "grid");
                t._wrapper();
              },
              _createResizeHandle: function (t, u) {
                var s,
                  c,
                  f,
                  l,
                  a,
                  v,
                  o = this,
                  y = o.options.columnResizeHandleWidth,
                  p = o.options.scrollable,
                  e = o.resizeHandle;
                e &&
                  o.lockedContent &&
                  e.data("th")[0] !== u[0] &&
                  (e.off(r).remove(), (e = null));
                e ||
                  ((e = o.resizeHandle =
                    n(
                      '<div class="k-resize-handle"><div class="k-resize-handle-inner"></div></div>'
                    )),
                  t.append(e));
                s =
                  u.offset().left +
                  t.scrollLeft() -
                  parseFloat(u.css("marginLeft")) -
                  (t.offset().left + parseFloat(t.css("borderLeftWidth")));
                tt
                  ? p &&
                    ((f = u.closest(
                      ".k-grid-header-wrap, .k-grid-header-locked"
                    )),
                    (l = h.msie ? f.scrollLeft() : 0),
                    (a = h.webkit
                      ? f[0].scrollWidth - f[0].offsetWidth - f.scrollLeft()
                      : 0),
                    (v = h.mozilla
                      ? f[0].scrollWidth -
                        f[0].offsetWidth -
                        (f[0].scrollWidth - f[0].offsetWidth - f.scrollLeft())
                      : 0),
                    (s -= a - v + l))
                  : (s += u[0].offsetWidth);
                c =
                  u.offset().top -
                  parseFloat(u.css("marginTop")) -
                  (t.offset().top + parseFloat(t.css("borderTopWidth")));
                e.css({
                  top: c,
                  left: s - (3 * y) / 2,
                  height: vt(u),
                  width: 3 * y,
                })
                  .data("th", u)
                  .show();
                e.off("dblclick" + r).on("dblclick" + r, function () {
                  o._autoFitLeafColumn(parseInt(u.attr(i.attr("index")), 10));
                });
              },
              _positionColumnResizeHandle: function () {
                var u = this,
                  f = u.lockedHeader ? u.lockedHeader.find("thead:first") : n();
                u.thead
                  .add(f)
                  .on(
                    "mousemove" + r,
                    "tr:not(.k-filter-row) > th",
                    function (r) {
                      var e = t !== r.buttons ? r.buttons : r.which || r.button,
                        f = n(this);
                      f.hasClass("k-group-cell") ||
                        f.hasClass("k-hierarchy-cell") ||
                        (t !== e && 0 !== e) ||
                        f[0].hasAttribute(i.attr(rh)) ||
                        u._createResizeHandle(f.closest("div"), f);
                    }
                  );
              },
              _resizeHandleDocumentClick: function (t) {
                n(t.target).closest(".k-column-active").length ||
                  (n(document).off(t),
                  this._resetResizeHandleHeader(),
                  this._hideResizeHandle());
              },
              _resetResizeHandleHeader: function () {
                var t;
                this.resizeHandle &&
                  ((t = n(this.resizeHandle).data("th")),
                  t &&
                    (t
                      .find(et + ge)
                      .find(et + no)
                      .show(),
                    t.find(et + to).show(),
                    t.find(et + io).show(),
                    t.find(et + ro).show()));
              },
              _hideResizeHandle: function () {
                this.resizeHandle &&
                  (this.resizeHandle.data("th").removeClass("k-column-active"),
                  this.lockedContent && !this._isMobile
                    ? (this.resizeHandle.off(r).remove(),
                      (this.resizeHandle = null))
                    : this.resizeHandle.hide());
              },
              _positionColumnResizeHandleTouch: function () {
                var t = this,
                  r = t.lockedHeader ? t.lockedHeader.find("thead:first") : n();
                t._resizeUserEvents = new i.UserEvents(r.add(t.thead), {
                  filter: "th:not(.k-group-cell):not(.k-hierarchy-cell)",
                  threshold: 10,
                  minHold: 500,
                  hold: function (i) {
                    var r = n(i.target);
                    i.preventDefault();
                    t.resizeHandle &&
                      (t.resizeHandle.data("th").removeClass("k-column-active"),
                      t._resetResizeHandleHeader());
                    r.addClass("k-column-active");
                    r.find(et + ge)
                      .find(et + no)
                      .hide();
                    r.find(et + to).hide();
                    r.find(et + io).hide();
                    r.find(et + ro).hide();
                    t._createResizeHandle(r.closest("div"), r);
                    t._resizeHandleDocumentClickHandler ||
                      (t._resizeHandleDocumentClickHandler = e(
                        t._resizeHandleDocumentClick,
                        t
                      ));
                    n(document).on(
                      "click",
                      t._resizeHandleDocumentClickHandler
                    );
                  },
                });
              },
              resizeColumn: function (r, u) {
                var y,
                  p,
                  c,
                  e,
                  f = this,
                  o = !!r.locked,
                  g = !!r.hidden,
                  k = this.options,
                  w = i.support.mobileOS ? 0 : i.support.scrollbar(),
                  l = o ? s(r, ir(f.columns)) : s(r, gr(f.columns)),
                  a = o ? f.lockedTable : f.table,
                  b = f.footer || n(),
                  d = o
                    ? f.lockedHeader.find("table")
                    : f.thead.closest("table"),
                  h = r.minResizableWidth || 10,
                  v = st(o ? a.find("tbody") : f.tbody);
                return g
                  ? ((r.width = u > h ? u : h), t)
                  : (f.footer &&
                      f.lockedContent &&
                      (b = f.footer.children(
                        o ? ".k-grid-footer-locked" : ".k-grid-footer-wrap"
                      )),
                    (y = k.scrollable
                      ? d
                          .find(
                            "col:not(.k-group-col,.k-hierarchy-col):eq(" +
                              l +
                              ")"
                          )
                          .add(
                            a
                              .children("colgroup")
                              .find(
                                "col:not(.k-group-col):not(.k-hierarchy-col):eq(" +
                                  l +
                                  ")"
                              )
                          )
                          .add(
                            b
                              .find("colgroup")
                              .find(
                                "col:not(.k-group-col):not(.k-hierarchy-col):eq(" +
                                  l +
                                  ")"
                              )
                          )
                      : a
                          .find("colgroup")
                          .find(
                            "col:not(.k-group-col):not(.k-hierarchy-col):eq(" +
                              l +
                              ")"
                          )),
                    k.scrollable
                      ? ((p = !1),
                        (c = f.wrapper.width() - w),
                        (e = u = u > h ? u : h),
                        o &&
                          v - u + e > c &&
                          ((e = u + (c - v - 2 * w)),
                          e < 0 && (e = u),
                          (p = !0)),
                        e > 10 &&
                          e >= h &&
                          (y.css("width", e),
                          v &&
                            ((e = p ? c - 2 * w : v + (u - r.width)),
                            a.add(d).add(b).css("width", e),
                            o || (f._footerWidth = e))),
                        f._scrollVirtualWrapperOnColumnResize())
                      : u > 10 && u >= h && y.css("width", u),
                    (r.width = u),
                    f._applyLockedContainersWidth(),
                    f._syncLockedContentHeight(),
                    f._syncLockedHeaderHeight(),
                    t);
              },
              _resizable: function () {
                var c,
                  l,
                  e,
                  a,
                  o,
                  f,
                  v,
                  r,
                  t = this,
                  s = t.options,
                  p = this._isMobile,
                  y = i.support.mobileOS ? 0 : i.support.scrollbar();
                s.resizable &&
                  ((c = s.scrollable
                    ? t.wrapper.find(".k-grid-header-wrap:first")
                    : t.wrapper),
                  p
                    ? t._positionColumnResizeHandleTouch(c)
                    : t._positionColumnResizeHandle(c),
                  t.resizable && t.resizable.destroy(),
                  (t.resizable = new lt.Resizable(c.add(t.lockedHeader), {
                    handle: (s.scrollable ? "" : ">") + ".k-resize-handle",
                    hint: function (i) {
                      return n('<div class="k-grid-resize-indicator" />').css({
                        height: vt(i.data("th")) + t.tbody.attr("clientHeight"),
                      });
                    },
                    start: function (i) {
                      var w, c, y, b, k;
                      r = n(i.currentTarget).data("th");
                      p && t._hideResizeHandle();
                      w = r.closest("table");
                      c = n.inArray(
                        r[0],
                        d(r.closest("thead")).filter(":visible")
                      );
                      f = w.parent().hasClass("k-grid-header-locked");
                      y = f ? t.lockedTable : t.table;
                      b = t.footer || n();
                      t.footer &&
                        t.lockedContent &&
                        (b = t.footer.children(
                          f ? ".k-grid-footer-locked" : ".k-grid-footer-wrap"
                        ));
                      tf(t.wrapper, "col-resize");
                      v = s.scrollable
                        ? w
                            .find(
                              "col:not(.k-group-col):not(.k-hierarchy-col):eq(" +
                                c +
                                ")"
                            )
                            .add(
                              y
                                .children("colgroup")
                                .find(
                                  "col:not(.k-group-col):not(.k-hierarchy-col):eq(" +
                                    c +
                                    ")"
                                )
                            )
                            .add(
                              b
                                .find("colgroup")
                                .find(
                                  "col:not(.k-group-col):not(.k-hierarchy-col):eq(" +
                                    c +
                                    ")"
                                )
                            )
                        : y
                            .children("colgroup")
                            .find(
                              "col:not(.k-group-col):not(.k-hierarchy-col):eq(" +
                                c +
                                ")"
                            );
                      k = n.map(t.columns, function (n) {
                        return !n.hidden &&
                          ((f && n.locked) || (!f && !n.locked))
                          ? n
                          : null;
                      });
                      l = i.x.location;
                      e = st(r);
                      a = u(k)[c].minResizableWidth || 10;
                      o = st(f ? y.children("tbody") : t.tbody);
                      h.webkit && t.wrapper.addClass("k-grid-column-resizing");
                    },
                    resize: function (i) {
                      var h,
                        k,
                        d,
                        b,
                        p,
                        u,
                        w = tt ? -1 : 1,
                        c = e + i.x.location * w - l * w;
                      s.scrollable
                        ? (f && t.lockedFooter
                            ? (h = t.lockedFooter.children("table"))
                            : t.footer &&
                              (h = t.footer.find(">.k-grid-footer-wrap>table")),
                          (h && h[0]) || (h = n()),
                          (k = r.closest("table")),
                          (d = f ? t.lockedTable : t.table),
                          (b = !1),
                          (p = t.wrapper.width() - y),
                          (u = c),
                          f &&
                            o - e + u > p &&
                            ((u = e + (p - o - 2 * y)),
                            u < 0 && (u = c),
                            (b = !0)),
                          u > 10 &&
                            u >= a &&
                            (v.css("width", u),
                            o &&
                              ((u = b
                                ? p - 2 * y
                                : o + i.x.location * w - l * w),
                              d.add(k).add(h).css("width", u),
                              f || (t._footerWidth = u))),
                          t._scrollVirtualWrapperOnColumnResize())
                        : c > 10 && c >= a && v.css("width", c);
                    },
                    resizeend: function () {
                      var f,
                        s,
                        n,
                        o = st(r);
                      tf(t.wrapper, "");
                      h.webkit &&
                        t.wrapper.removeClass("k-grid-column-resizing");
                      e != o &&
                        ((s = t.lockedHeader
                          ? t.lockedHeader
                              .find("thead:first tr:first")
                              .add(t.thead.find("tr:first"))
                          : r.parent()),
                        (n = r.attr(i.attr("index"))),
                        n ||
                          (n = s
                            .find(
                              "th:not(.k-group-cell):not(.k-hierarchy-cell)"
                            )
                            .index(r)),
                        (f = u(t.columns)[n]),
                        (f.width = o),
                        t.trigger(bu, { column: f, oldWidth: e, newWidth: o }),
                        t._applyLockedContainersWidth(),
                        t._syncLockedContentHeight(),
                        t._syncLockedHeaderHeight());
                      t._resetResizeHandleHeader();
                      t._hideResizeHandle();
                      r = null;
                    },
                  })));
              },
              _draggable: function () {
                var u,
                  t = this;
                t.options.reorderable &&
                  (t._draggableInstance && t._draggableInstance.destroy(),
                  (u = t.wrapper.children(".k-grid-header")),
                  (t._draggableInstance = t.wrapper
                    .kendoDraggable({
                      group: i.guid(),
                      autoScroll: !0,
                      filter: t.content
                        ? ".k-grid-header:first " + or
                        : "table:first>.k-grid-header " + or,
                      dragstart: function () {
                        u.children(".k-grid-header-wrap")
                          .unbind("scroll" + r + "scrolling")
                          .bind("scroll" + r + "scrolling", function (n) {
                            t.virtualScrollable
                              ? t.content
                                  .find(">.k-virtual-scrollable-wrap")
                                  .scrollLeft(this.scrollLeft)
                              : t.scrollables
                                  .not(n.currentTarget)
                                  .scrollLeft(this.scrollLeft);
                          });
                      },
                      dragend: function () {
                        t._resetResizeHandleHeader();
                        u.children(".k-grid-header-wrap").unbind(
                          "scroll" + r + "scrolling"
                        );
                      },
                      drag: function () {
                        t._hideResizeHandle();
                      },
                      hint: function (t) {
                        var r = t.attr(i.attr("title"));
                        return (
                          r && (r = i.htmlEncode(r)),
                          n(
                            '<div class="k-header k-reorder-clue k-drag-clue" />'
                          )
                            .html(r || t.attr(i.attr("field")) || t.text())
                            .prepend(
                              '<span class="k-icon k-drag-status k-i-cancel" />'
                            )
                        );
                      },
                    })
                    .data("kendoDraggable")));
              },
              _reorderable: function () {
                var t = this;
                t.options.reorderable &&
                  (t.wrapper.data("kendoReorderable") &&
                    t.wrapper.data("kendoReorderable").destroy(),
                  t.wrapper.kendoReorderable({
                    draggable: t._draggableInstance,
                    dragOverContainers: function (n, i) {
                      var r = gi(t.columns);
                      return (
                        r[n].lockable !== !1 && nr(r, t.columns, n, i) > -1
                      );
                    },
                    inSameContainer: function (i) {
                      return (
                        n(i.source).parent()[0] === n(i.target).parent()[0] &&
                        nr(
                          gi(t.columns),
                          t.columns,
                          i.sourceIndex,
                          i.targetIndex
                        ) > -1
                      );
                    },
                    change: function (n) {
                      var i = gi(t.columns),
                        r = i[n.oldIndex],
                        u = nr(i, t.columns, n.oldIndex, n.newIndex);
                      t.trigger(fo, {
                        newIndex: u,
                        oldIndex: s(r, i),
                        column: r,
                      });
                      t.reorderColumn(u, r, "before" === n.position);
                    },
                  }));
              },
              _reorderHeader: function (n, t, i, r) {
                for (
                  var l,
                    v,
                    e,
                    o,
                    u = this,
                    s = ti(n[0], u.columns),
                    a = ti(t, u.columns),
                    f = [],
                    h = 0;
                  h < n.length;
                  h++
                )
                  n[h].columns && (f = f.concat(n[h].columns));
                v = r
                  ? it(
                      r,
                      r,
                      "tr:eq(" +
                        s.row +
                        ")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"
                    )
                  : it(
                      u.lockedHeader,
                      u.thead,
                      "tr:eq(" +
                        s.row +
                        ")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"
                    );
                e = c(n).length;
                o = c([t]).length;
                f.length
                  ? (e > 0 && 0 === o
                      ? ((l = "prepend"),
                        of(
                          n,
                          t,
                          f,
                          u.columns,
                          u.lockedHeader.find("thead"),
                          u.thead,
                          this._groups(),
                          l
                        ))
                      : 0 === e &&
                        o > 0 &&
                        ((l =
                          0 !== a.cell || !n[0].columns || t.columns || u._group
                            ? "append"
                            : "prepend"),
                        of(
                          n,
                          t,
                          f,
                          ut(u.columns),
                          u.thead,
                          u.lockedHeader.find("thead"),
                          this._groups(),
                          l
                        )),
                    (t.columns || s.cell - a.cell > 1 || a.cell - s.cell > 1) &&
                      ((t = cf(u.columns, t, n[0], i, u.columns)),
                      t &&
                        (e > 0 && 0 === o
                          ? u._reorderHeader(f, t, i, u.thead)
                          : 0 === e && o > 0
                          ? u._reorderHeader(f, t, i, u.lockedHead)
                          : u._reorderHeader(f, t, i))))
                  : e !== o && rs(v[s.cell], u.columns, e);
                kt(v, s.cell, a.cell, i, n.length);
              },
              _reorderContent: function (t, i, r) {
                var a,
                  e,
                  b,
                  g,
                  v,
                  tt,
                  f = this,
                  rt = n(),
                  ot = t[0],
                  k = o(t),
                  y = s(ot, u(f.columns)),
                  h = s(i, u(f.columns)),
                  l = s(k[0], ft(f.columns)),
                  p = s(i, ft(f.columns)),
                  nt = c(f.columns).length,
                  et = !!i.locked,
                  w = f.footer || f.wrapper.find(".k-grid-footer"),
                  d = (a = p);
                for (
                  i.hidden &&
                    ((b = et ? c(f.columns) : ut(f.columns)),
                    o(b).length > 0
                      ? ((d =
                          a =
                          p =
                            this._findClosestVisibleColumnIndex(b, h)),
                        (e = o(b.slice(h)).length > 0))
                      : et
                      ? ((p = f.lockedTable.find("colgroup")),
                        (d = f.lockedHeader.find("colgroup")),
                        (a = n(f.lockedFooter).find(">table>colgroup")))
                      : ((p = f.tbody.prev()),
                        (d = f.thead.prev()),
                        (a = w
                          .find(".k-grid-footer-wrap")
                          .find(">table>colgroup")))),
                    f._hasFilterRow() &&
                      kt(
                        f.wrapper.find(
                          ".k-filter-row th:not(.k-group-cell,.k-hierarchy-cell)"
                        ),
                        y,
                        h,
                        r,
                        t.length
                      ),
                    l >= 0 &&
                      kt(
                        it(
                          f.lockedHeader,
                          f.thead.prev(),
                          "col:not(.k-group-col,.k-hierarchy-col)"
                        ),
                        l,
                        d,
                        e ? e : r,
                        k.length
                      ),
                    f.options.scrollable &&
                      l >= 0 &&
                      kt(
                        it(
                          f.lockedTable,
                          f.tbody.prev(),
                          "col:not(.k-group-col,.k-hierarchy-col)"
                        ),
                        l,
                        p,
                        e ? e : r,
                        k.length
                      ),
                    w &&
                      w.length &&
                      (l >= 0 &&
                        kt(
                          it(
                            f.lockedFooter,
                            w.find(".k-grid-footer-wrap"),
                            ">table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"
                          ),
                          l,
                          a,
                          e ? e : r,
                          k.length
                        ),
                      kt(
                        w.find(
                          ".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"
                        ),
                        y,
                        h,
                        r,
                        t.length
                      )),
                    g = f.tbody.children(":not(.k-grouping-row,.k-detail-row)"),
                    f.lockedTable &&
                      (nt > h
                        ? nt <= y &&
                          df(
                            f.lockedTable.find(">tbody>tr.k-grouping-row"),
                            f.table.find(">tbody>tr.k-grouping-row"),
                            t.length
                          )
                        : nt > y &&
                          df(
                            f.table.find(">tbody>tr.k-grouping-row"),
                            f.lockedTable.find(">tbody>tr.k-grouping-row"),
                            t.length
                          ),
                      (rt = f.lockedTable.find(
                        ">tbody>tr:not(.k-grouping-row,.k-detail-row)"
                      ))),
                    v = 0,
                    tt = g.length;
                  v < tt;
                  v += 1
                )
                  kt(
                    it(rt[v], g[v], ">td:not(.k-group-cell,.k-hierarchy-cell)"),
                    y,
                    h,
                    r,
                    t.length
                  );
              },
              _findClosestVisibleColumnIndex: function (n, t) {
                var i =
                    o(n.slice(t)).length > 0
                      ? n.slice(t)
                      : n.slice(0, t + 1).reverse(),
                  r = o(i)[0];
                return s(r, o(this.columns));
              },
              _autoFitLeafColumn: function (n) {
                this.autoFitColumn(u(this.columns)[n]);
              },
              autoFitColumn: function (t) {
                var r,
                  ft,
                  w,
                  o,
                  b,
                  nt,
                  et,
                  ot,
                  c,
                  ht,
                  tt,
                  k,
                  f,
                  lt,
                  l,
                  g,
                  it,
                  y,
                  p,
                  at,
                  i = this,
                  vt = i.options,
                  e = i.columns,
                  pt = i.lockedHeader
                    ? d(i.lockedHeader.find(">table>thead")).filter(gt).length
                    : 0,
                  ut = "col:not(.k-group-col):not(.k-hierarchy-col)",
                  yt = "td:visible:not(.k-group-cell):not(.k-hierarchy-cell)";
                if (
                  ((t =
                    "number" == typeof t
                      ? e[t]
                      : a(t)
                      ? v(rt(e), function (n) {
                          return n === t;
                        })[0]
                      : v(rt(e), function (n) {
                          return n.field === t;
                        })[0]),
                  t && ct(t))
                ) {
                  for (
                    nt = t.minResizableWidth,
                      r = s(t, u(e)),
                      o = t.locked,
                      w = o
                        ? i.lockedHeader.children("table")
                        : i.thead.parent(),
                      ft = w.find("[data-index='" + r + "']"),
                      c = o ? i.lockedTable : i.table,
                      ht = i.footer || n(),
                      i.footer &&
                        i.lockedContent &&
                        (ht = i.footer.children(
                          o ? ".k-grid-footer-locked" : ".k-grid-footer-wrap"
                        )),
                      tt = ht.find("table").first(),
                      i.lockedHeader && !o && (r -= pt),
                      k = 0;
                    k < e.length && e[k] !== t;
                    k++
                  )
                    e[k].hidden && r--;
                  if (
                    (vt.scrollable
                      ? ((b = w
                          .find(ut)
                          .eq(r)
                          .add(c.children("colgroup").find(ut).eq(r))
                          .add(tt.find("colgroup").find(ut).eq(r))),
                        o || ((et = c.parent()), (ot = et.scrollLeft())))
                      : (b = c.children("colgroup").find(ut).eq(r)),
                    (f = w.add(c).add(tt)),
                    (lt = st(ft)),
                    b.width(""),
                    f.css("table-layout", "fixed"),
                    b.width("auto"),
                    f.addClass("k-autofitting"),
                    f.css("table-layout", ""),
                    (l =
                      Math.ceil(
                        Math.max(
                          st(ft),
                          st(
                            c
                              .find("tr:not(.k-grouping-row)")
                              .eq(0)
                              .children(yt)
                              .eq(r)
                          ),
                          st(tt.find("tr").eq(0).children(yt).eq(r))
                        )
                      ) + 1),
                    nt && nt > l && (l = nt),
                    b.width(l),
                    (t.width = l),
                    vt.scrollable)
                  ) {
                    for (
                      g = w.find("col"), y = 0, p = 0, at = g.length;
                      p < at;
                      p += 1
                    )
                      if (
                        ((it = g[p].style.width), it && it.indexOf("%") == -1)
                      )
                        y += parseInt(it, 10);
                      else {
                        if (!g.eq(p).hasClass("k-group-col")) {
                          y = 0;
                          break;
                        }
                        y += parseInt(g.eq(p).width(), 10);
                      }
                    y &&
                      f.each(function () {
                        this.style.width = y + "px";
                      });
                  }
                  h.msie &&
                    8 == h.version &&
                    (f.css("display", "inline-table"),
                    setTimeout(function () {
                      f.css("display", "table");
                    }, 1));
                  f.removeClass("k-autofitting");
                  ot && et.scrollLeft(ot);
                  i.trigger(bu, { column: t, oldWidth: lt, newWidth: l });
                  i._applyLockedContainersWidth();
                  i._syncLockedContentHeight();
                  i._syncLockedHeaderHeight();
                }
              },
              reorderColumn: function (n, i, r) {
                var l,
                  a,
                  f = this,
                  p = pr(i, f.columns),
                  y = p ? p.columns : f.columns,
                  o = s(i, y),
                  e = y[n],
                  h = !!e.locked,
                  w = c(f.columns).length,
                  b = v(u(f.columns), function (n) {
                    return n.groupHeaderColumnTemplate;
                  });
                o !== n &&
                  ((!i.locked && h && 1 == ut(f.columns).length) ||
                    (i.locked && !h && 1 == w) ||
                    (f._hideResizeHandle(),
                    r === t && (r = n < o),
                    (a = [i]),
                    f._reorderHeader(a, e, r),
                    f.lockedHeader && (dr(f.thead), dr(f.lockedHeader)),
                    e.columns &&
                      ((e = u(e.columns)), (e = e[r ? 0 : e.length - 1])),
                    i.columns && (a = u(i.columns)),
                    f._reorderContent(a, e, r),
                    (l = !!i.locked),
                    (l = l != h),
                    (i.locked = h),
                    y.splice(r ? n : n + 1, 0, i),
                    y.splice(o < n ? o : o + 1, 1),
                    f._updateLockedCols(),
                    f._updateCols(),
                    f._templates(),
                    f._updateColumnCellIndex(),
                    f._updateColumnSorters(),
                    b.length > 0 && f._renderGroupRows(),
                    f._updateTablesWidth(),
                    f._applyLockedContainersWidth(),
                    f._syncLockedHeaderHeight(),
                    f._syncLockedContentHeight(),
                    f._updateFirstColumnClass(),
                    l &&
                      (h
                        ? f.trigger(eo, { column: i })
                        : f.trigger(oo, { column: i }))));
              },
              _updateColumnCellIndex: function () {
                var n,
                  t = 0;
                this.lockedHeader &&
                  ((n = this.lockedHeader.find("thead")),
                  (t = sf(n, c(this.columns))));
                sf(this.thead, ut(this.columns), t);
              },
              lockColumn: function (n) {
                var i,
                  t = this.columns;
                n =
                  "number" == typeof n
                    ? t[n]
                    : v(t, function (t) {
                        return t.field === n;
                      })[0];
                !n ||
                  n.locked ||
                  n.hidden ||
                  ((i = c(t).length - 1), this.reorderColumn(i, n, !1));
              },
              unlockColumn: function (n) {
                var i,
                  t = this.columns;
                n =
                  "number" == typeof n
                    ? t[n]
                    : v(t, function (t) {
                        return t.field === n;
                      })[0];
                n &&
                  n.locked &&
                  !n.hidden &&
                  ((i = c(t).length), this.reorderColumn(i, n, !0));
              },
              cellIndex: function (t) {
                var i = 0;
                return (
                  this.lockedTable &&
                    !n.contains(this.lockedTable[0], t[0]) &&
                    (i = u(c(this.columns)).length),
                  n(t)
                    .parent()
                    .children("td:not(.k-group-cell,.k-hierarchy-cell)")
                    .index(t) + i
                );
              },
              _modelForContainer: function (t) {
                t = n(t);
                t.is("tr") ||
                  "popup" === this._editMode() ||
                  (t = t.closest("tr"));
                var r = t.attr(i.attr("uid"));
                return this.dataSource.getByUid(r);
              },
              _editable: function () {
                var f,
                  t = this,
                  e = t.selectable && t.selectable.options.multiple,
                  u = t.options.editable,
                  o = function () {
                    var r = at(),
                      i = t._editContainer;
                    i &&
                      i[0] &&
                      !n.contains(i[0], r) &&
                      i[0] !== r &&
                      !n(r).closest(".k-animation-container").length &&
                      (t.editable.end()
                        ? t.closeCell()
                        : t._scrollVirtualWrapper());
                  };
                u &&
                  (this.wrapper.addClass("k-editable"),
                  (f = t._editMode()),
                  "incell" === f
                    ? (t.table
                        .add(t.lockedTable)
                        .on("mousedown" + r, ht + ">" + ot, function (r) {
                          var u = n(r.target);
                          "incell" === t._editMode() &&
                            u.hasClass("k-checkbox-label") &&
                            u.prev().attr(i.attr("bind")) &&
                            r.preventDefault();
                        }),
                      u.update !== !1 &&
                        (po &&
                          t.wrapper
                            .on(
                              y + r,
                              ".k-edit-cell > input[type='checkbox']",
                              function (t) {
                                n(t.target).focus();
                              }
                            )
                            .on(y + r, ".k-edit-cell", function (t) {
                              n(t.target).is("input") ||
                                n(t.currentTarget)
                                  .find("input[type='checkbox']")
                                  .focus();
                            })
                            .on(
                              nh + r,
                              "tr:not(.k-grouping-row) > td",
                              function (i) {
                                var r = t._editContainer;
                                t._mousedownOnEditCell = !(
                                  !r ||
                                  !r[0] ||
                                  (!n.contains(r[0], i.target) &&
                                    r[0] !== i.target)
                                );
                              }
                            ),
                        t.wrapper
                          .on(
                            i.support.touch ? "touchstart" + r : y + r,
                            "tr:not(.k-grouping-row) > td",
                            function (r) {
                              var u = n(this),
                                f =
                                  t.lockedTable &&
                                  u.closest("table")[0] === t.lockedTable[0];
                              t._mousedownOnEditCell = !1;
                              u.hasClass("k-hierarchy-cell") ||
                                u.hasClass("k-detail-cell") ||
                                u.hasClass("k-group-cell") ||
                                u.hasClass("k-edit-cell") ||
                                u.has("a.k-grid-delete").length ||
                                u.has("button.k-grid-delete").length ||
                                (u.closest("tbody")[0] !== t.tbody[0] && !f) ||
                                n(r.target).is(":input") ||
                                (t.editable
                                  ? t.editable.end()
                                    ? ((e || i.support.mobileOS) &&
                                        n(at()).blur(),
                                      t.closeCell(),
                                      t.editCell(u))
                                    : t._scrollVirtualWrapper()
                                  : t.editCell(u));
                            }
                          )
                          .on("focusin" + r, function () {
                            n.contains(this, at()) ||
                              (clearTimeout(t.timer), (t.timer = null));
                          })
                          .on("focusout" + r, function (n) {
                            var i = !0;
                            po && t._mousedownOnEditCell && (i = !1);
                            t._mousedownOnEditCell = !1;
                            i &&
                              (t.timer = setTimeout(function () {
                                o(n);
                              }, 1));
                          })))
                    : u.update !== !1 &&
                      (t.wrapper.on(
                        y + r,
                        "tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",
                        function (i) {
                          i.preventDefault();
                          t.editRow(n(this).closest("tr"));
                        }
                      ),
                      t._isVirtualInlineEditable() &&
                        t.wrapper.on(
                          "focusout" + r,
                          "tr:not(.k-grouping-row) > td",
                          function () {
                            t.editable &&
                              !t.editable.end() &&
                              t._scrollVirtualWrapper();
                          }
                        )),
                  u.destroy !== !1
                    ? t.wrapper.on(
                        y + r,
                        "tbody>tr:not(.k-detail-row,.k-grouping-row):visible .k-grid-delete",
                        function (i) {
                          i.preventDefault();
                          i.stopPropagation();
                          t.removeRow(n(this).closest("tr"));
                        }
                      )
                    : t.wrapper.on(
                        y + r,
                        "tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete",
                        function (n) {
                          n.stopPropagation();
                          t._confirmation() || n.preventDefault();
                        }
                      ));
              },
              editCell: function (t) {
                var i, f, r, e;
                if (
                  ((t = n(t)),
                  (i = this),
                  (f = u(i.columns)[i.cellIndex(t)]),
                  (r = i._modelForContainer(t)),
                  i.closeCell(),
                  r && ur(f, r) && !f.command)
                ) {
                  if (i.trigger(hr, { model: r })) return;
                  i._attachModelChange(r);
                  i._editContainer = t;
                  i._shouldClearEditableState && i._clearEditableState();
                  i.editable = t
                    .addClass("k-edit-cell")
                    .kendoEditable({
                      fields: {
                        field: f.field,
                        format: f.format,
                        editor: f.editor,
                        values: f.values,
                      },
                      model: r,
                      target: i,
                      change: function (n) {
                        i.trigger(eu, {
                          values: n.values,
                          container: t,
                          model: r,
                        }) && n.preventDefault();
                      },
                      skipFocus: !(
                        !i._isVirtualIncellEditable() || !i._editableState
                      ),
                    })
                    .data("kendoEditable");
                  e = t.parent().addClass("k-grid-edit-row");
                  i.lockedContent &&
                    (ci(e[0], i._relatedRow(e).addClass("k-grid-edit-row")[0]),
                    i._syncLockedScroll());
                  i.trigger(sr, { container: t, model: r });
                }
              },
              _adjustLockedHorizontalScrollBar: function () {
                var n = this.table,
                  t = n.parent(),
                  r =
                    n[0].offsetWidth > t[0].clientWidth
                      ? i.support.scrollbar()
                      : 0;
                this.lockedContent.height(t[0].offsetHeight - r);
              },
              _syncLockedScroll: function () {
                this.lockedContent[0].scrollTop = this.content[0].scrollTop;
                this.virtualScrollable &&
                  (this.lockedContent[0].scrollTop = this.wrapper.find(
                    ".k-virtual-scrollable-wrap"
                  )[0].scrollTop);
              },
              _syncLockedContentHeight: function () {
                this.lockedTable &&
                  (this.touchScroller ||
                    this._adjustLockedHorizontalScrollBar(),
                  this._adjustRowsHeight(this.table, this.lockedTable));
              },
              _syncLockedHeaderHeight: function () {
                var n, t;
                this.lockedHeader &&
                  ((n = this.lockedHeader.children("table")),
                  (t = this.thead.parent()),
                  this._adjustRowsHeight(n, t),
                  cs(n, t));
              },
              _syncLockedFooterHeight: function () {
                this.lockedFooter &&
                  this.footer &&
                  this.footer.length &&
                  this._adjustRowsHeight(
                    this.lockedFooter.children("table"),
                    this.footer.find(".k-grid-footer-wrap > table")
                  );
              },
              _destroyEditable: function () {
                var n = this,
                  t = function () {
                    if (n.editable) {
                      var t = n.editView
                        ? n.editView.element
                        : n._editContainer;
                      t &&
                        (t.off(
                          y + r,
                          "a.k-grid-cancel",
                          n._editCancelClickHandler
                        ),
                        t.off(
                          y + r,
                          "a.k-grid-update",
                          n._editUpdateClickHandler
                        ));
                      n._detachModelChange();
                      n.editable.destroy();
                      n.editable = null;
                      n._editContainer = null;
                      n._destroyEditView();
                      n._editableIsClosing = null;
                    }
                  };
                n.editable &&
                  ("popup" !== n._editMode() || n._isMobile
                    ? t()
                    : n._editableIsClosing
                    ? n._editContainer.data("kendoWindow").bind("deactivate", t)
                    : ((n._editableIsClosing = !0),
                      n._editContainer
                        .data("kendoWindow")
                        .bind("deactivate", t)
                        .close()));
                n._confirmDialog &&
                  (n._confirmDialog.close(),
                  n._confirmDialog.destroy(),
                  (n._confirmDialog = null));
              },
              _destroyEditView: function () {
                this.editView &&
                  (this.editView.purge(),
                  (this.editView = null),
                  this.pane.navigate(""));
              },
              _attachModelChange: function (n) {
                var t = this;
                t._modelChangeHandler = function (n) {
                  t._modelChange({ field: n.field, model: this });
                };
                n.bind("change", t._modelChangeHandler);
              },
              _detachModelChange: function () {
                var n = this,
                  i = n._editContainer,
                  t = n._modelForContainer(i);
                t && t.unbind(k, n._modelChangeHandler);
              },
              closeCell: function (n) {
                var e,
                  r,
                  f,
                  t = this,
                  i = t._editContainer;
                i &&
                  ((f = t._modelForContainer(i)),
                  (n && t.trigger("cancel", { container: i, model: f })) ||
                    (t.trigger(ye, {
                      type: n ? "cancel" : "save",
                      model: f,
                      container: i,
                    }),
                    i.removeClass("k-edit-cell"),
                    (e = u(t.columns)[t.cellIndex(i)]),
                    (r = i.parent().removeClass("k-grid-edit-row")),
                    t.lockedContent &&
                      t._relatedRow(r).removeClass("k-grid-edit-row"),
                    t._destroyEditable(),
                    t._displayCell(i, e, f),
                    t._shouldClearEditableState && t._clearEditableState(),
                    t.trigger("itemChange", { item: r, data: f, ns: lt }),
                    t.lockedContent &&
                      ci(
                        r.css("height", "")[0],
                        t._relatedRow(r).css("height", "")[0]
                      )));
              },
              _displayCell: function (n, t, r) {
                var u = this,
                  o = { storage: {}, count: 0 },
                  h = f({}, i.Template, u.options.templateSettings),
                  s = i.template(u._cellTmpl(t, o), h);
                o.count > 0 && (s = e(s, o.storage));
                n.empty().html(s(r));
                u.angular("compile", function () {
                  return { elements: n, data: [{ dataItem: r }] };
                });
              },
              removeRow: function (n) {
                this._confirmation(n) && this._removeRow(n);
              },
              _removeRow: function (t) {
                var r,
                  e,
                  o,
                  f,
                  i = this,
                  u = i._editMode();
                "incell" !== u && i.cancelRow();
                t = n(t);
                i.lockedContent && (t = t.add(i._relatedRow(t)));
                t = t.hide();
                r = i._modelForContainer(t);
                r && !i.trigger(ou, { row: t, model: r })
                  ? ((f = i.dataSource.options.schema),
                    i._selectedIds &&
                      f &&
                      f.model &&
                      ((e = fi(i.dataSource.options.schema.model)
                        ? i.dataSource.options.schema.model.fn.idField
                        : i.dataSource.options.schema.model.id),
                      (o = r[e]),
                      delete i._selectedIds[o]),
                    i.dataSource.remove(r),
                    ("inline" !== u && "popup" !== u) || i.dataSource.sync())
                  : "incell" === u && i._destroyEditable();
              },
              _editMode: function () {
                var t = "incell",
                  n = this.options.editable;
                return (
                  n !== !0 && (t = "string" == typeof n ? n : n.mode || t), t
                );
              },
              editRow: function (t) {
                var o,
                  s,
                  h,
                  f = this;
                t instanceof fe
                  ? (o = t)
                  : ((t = n(t)), (o = f._modelForContainer(t)));
                s = f._editMode();
                f.cancelRow();
                o &&
                  ((t = f.tbody.children(
                    "[" + i.attr("uid") + "=" + o.uid + "]"
                  )),
                  f._attachModelChange(o),
                  "popup" === s
                    ? f._createPopupEditor(o)
                    : "inline" === s
                    ? f._createInlineEditor(t, o)
                    : "incell" === s &&
                      n(t)
                        .children(p)
                        .each(function () {
                          var t = n(this),
                            i = u(f.columns)[f.cellIndex(t)];
                          if (
                            ((o = f._modelForContainer(t)),
                            o &&
                              (!o.editable || o.editable(i.field)) &&
                              i.field &&
                              !i.selectable)
                          )
                            return f.editCell(t), !1;
                        }),
                  (h = f.editView ? f.editView.element : f._editContainer),
                  h &&
                    (this._editCancelClickHandler ||
                      (this._editCancelClickHandler = e(
                        this._editCancelClick,
                        this
                      )),
                    h.on(
                      y + r,
                      "a.k-grid-cancel",
                      this._editCancelClickHandler
                    ),
                    this._editUpdateClickHandler ||
                      (this._editUpdateClickHandler = e(
                        this._editUpdateClick,
                        this
                      )),
                    h.on(
                      y + r,
                      "a.k-grid-update",
                      this._editUpdateClickHandler
                    )));
              },
              _editUpdateClick: function (n) {
                n.preventDefault();
                n.stopPropagation();
                this.saveRow();
              },
              _editCancelClick: function (t) {
                var r,
                  i = this,
                  u = i.options.navigatable,
                  f = i.editable.options.model,
                  e = i.editView ? i.editView.element : i._editContainer;
                t.preventDefault();
                t.stopPropagation();
                i.trigger("cancel", { container: e, model: f }) ||
                  ((r = i.items().index(n(i.current()).parent())),
                  i.cancelRow(),
                  u &&
                    (i._setCurrent(
                      i.items().eq(r).children().filter(ot).first()
                    ),
                    b(i.table, !0)));
              },
              _createPopupEditor: function (r) {
                var s,
                  c,
                  l,
                  d,
                  v,
                  et,
                  st,
                  ht,
                  ct,
                  p,
                  tt,
                  y,
                  g,
                  o = this,
                  h =
                    "<div " +
                    i.attr("uid") +
                    '="' +
                    r.uid +
                    '" class="k-popup-edit-form' +
                    (o._isMobile ? " k-mobile-list" : "") +
                    '"><' +
                    (o._isMobile ? "ul" : "div") +
                    ' class="k-edit-form-container">',
                  it = [],
                  nt = u(o.columns),
                  lt = i.guid(),
                  rt = o.options.editable,
                  k = rt.template,
                  ut = a(rt) ? rt.window : {},
                  ft = f({}, i.Template, o.options.templateSettings);
                if (!o.trigger(hr, { model: r })) {
                  if (((ut = ut || {}), k))
                    for (
                      typeof k === w && (k = i.unescape(k)),
                        h += i.template(k, ft)(r),
                        l = 0,
                        d = nt.length;
                      l < d;
                      l++
                    )
                      (s = nt[l]),
                        s.command &&
                          ((p = iu(s.command, "edit")), p && (c = p));
                  else
                    for (l = 0, d = nt.length; l < d; l++)
                      (s = nt[l]),
                        s.selectable ||
                          (s.command
                            ? s.command &&
                              ((p = iu(s.command, "edit")), p && (c = p))
                            : o._isMobile
                            ? ((h += '<li class="k-item">'),
                              ur(s, r)
                                ? (it.push({
                                    field: s.field,
                                    title: s.title,
                                    format: s.format,
                                    editor: s.editor,
                                    values: s.values,
                                  }),
                                  (h +=
                                    '<label class="k-label"><span class="k-item-title">' +
                                    (s.title || s.field || "") +
                                    "</span>"),
                                  (h +=
                                    '<div id="' +
                                    s.field +
                                    "_" +
                                    lt +
                                    '" ' +
                                    i.attr("container-for") +
                                    '="' +
                                    s.field +
                                    '"></div>'))
                                : ((y = { storage: {}, count: 0 }),
                                  (v = i.template(o._cellTmpl(s, y), ft)),
                                  y.count > 0 && (v = e(v, y.storage)),
                                  (h +=
                                    '<label class="k-label k-no-click"><span class="k-item-title">' +
                                    (s.title || s.field || "") +
                                    "</span>"),
                                  (h +=
                                    '<span class="k-no-editor">' +
                                    v(r) +
                                    "</span>")),
                              (h += "</label></li>"))
                            : ((h +=
                                '<div class="k-edit-label"><label for="' +
                                s.field +
                                '">' +
                                (s.title || s.field || "") +
                                "</label></div>"),
                              ur(s, r)
                                ? (it.push({
                                    field: s.field,
                                    title: s.title,
                                    format: s.format,
                                    editor: s.editor,
                                    values: s.values,
                                  }),
                                  (h +=
                                    "<div " +
                                    i.attr("container-for") +
                                    '="' +
                                    s.field +
                                    '" class="k-edit-field"></div>'))
                                : ((y = { storage: {}, count: 0 }),
                                  (v = i.template(o._cellTmpl(s, y), ft)),
                                  y.count > 0 && (v = e(v, y.storage)),
                                  (h +=
                                    '<div class="k-edit-field">' +
                                    v(r) +
                                    "</div>"))));
                  c &&
                    a(c) &&
                    (a(c.text) && ((et = c.text.update), (st = c.text.cancel)),
                    a(c.iconClass) &&
                      ((ht = c.iconClass.update), (ct = c.iconClass.cancel)),
                    c.attr && (tt = c.attr));
                  o._isMobile
                    ? ((h += "</ul></div>"),
                      (o.editView = o.pane.append(
                        "<div data-" +
                          i.ns +
                          'role="view" class="k-grid-edit-form"><div data-' +
                          i.ns +
                          'role="header" class="k-header"><a href="\\#" class="k-header-cancel k-link k-grid-cancel" title="#=messages.cancel#" aria-label="#=messages.cancel#"><span class="k-icon k-i-arrow-chevron-left"></span></a>' +
                          (o.options.messages.commands.edit || "Edit") +
                          '<a href="\\#" class="k-header-done k-link k-grid-update" title="#=messages.done#" aria-label="#=messages.done#"><span class="k-icon k-i-check"></span></a></div><div data-' +
                          i.ns +
                          'role="content" class="' +
                          wo.content +
                          '">' +
                          h +
                          "</div></div>"
                      )),
                      (g = o._editContainer =
                        o.editView.element.find(".k-popup-edit-form")))
                    : ((h += '<div class="k-edit-buttons k-state-default">'),
                      (h +=
                        o._createButton({
                          name: "update",
                          text: et,
                          attr: tt,
                          iconClass: ht,
                        }) +
                        o._createButton({
                          name: "canceledit",
                          text: st,
                          attr: tt,
                          iconClass: ct,
                        })),
                      (h += "</div></div></div>"),
                      (g = o._editContainer =
                        n(h)
                          .appendTo(o.wrapper)
                          .eq(0)
                          .kendoWindow(
                            f(
                              {
                                modal: !0,
                                resizable: !1,
                                draggable: !0,
                                title:
                                  o.options.messages.commands.edit || "Edit",
                                visible: !1,
                                close: function (i) {
                                  if (i.userTriggered) {
                                    if (
                                      (i.sender.element.focus(),
                                      o.trigger("cancel", {
                                        container: g,
                                        model: r,
                                      }))
                                    )
                                      return i.preventDefault(), t;
                                    var u = o
                                      .items()
                                      .index(n(o.current()).parent());
                                    o._editableIsClosing = !0;
                                    o.cancelRow();
                                    o.options.navigatable &&
                                      (o._setCurrent(
                                        o
                                          .items()
                                          .eq(u)
                                          .children()
                                          .filter(ot)
                                          .first()
                                      ),
                                      b(o.table, !0));
                                  }
                                },
                              },
                              ut
                            )
                          )));
                  o.editable = o._editContainer
                    .kendoEditable({
                      fields: it,
                      model: r,
                      clearContainer: !1,
                      target: o,
                    })
                    .data("kendoEditable");
                  o._openPopUpEditor();
                  o.trigger(sr, { container: g, model: r });
                }
              },
              _openPopUpEditor: function () {
                var n = this,
                  t = n._editContainer
                    ? n._editContainer.data("kendoWindow")
                    : null,
                  i = (n.options.editable || {}).window || {};
                this._isMobile
                  ? this.pane.navigate(this.editView, this._editAnimation)
                  : t && (i.position || t.center(), t.open());
              },
              _createInlineEditor: function (t, r) {
                var e,
                  s,
                  o,
                  f = this,
                  h = [];
                f.trigger(hr, { model: r }) ||
                  (f.lockedContent && (t = t.add(f._relatedRow(t))),
                  t
                    .children(":not(.k-group-cell,.k-hierarchy-cell)")
                    .each(function () {
                      if (
                        ((s = n(this)),
                        (e = u(f.columns)[f.cellIndex(s)]),
                        !e.command && ur(e, r))
                      )
                        h.push({
                          field: e.field,
                          title: e.title,
                          format: e.format,
                          editor: e.editor,
                          values: e.values,
                        }),
                          s.attr(i.attr("container-for"), e.field),
                          s.empty();
                      else if (e.command && (o = iu(e.command, "edit"))) {
                        s.empty();
                        var c, l, v, y, t;
                        a(o) &&
                          (a(o.text) &&
                            ((c = o.text.update), (l = o.text.cancel)),
                          a(o.iconClass) &&
                            ((v = o.iconClass.update),
                            (y = o.iconClass.cancel)),
                          o.attr && (t = o.attr));
                        n(
                          f._createButton({
                            name: "update",
                            text: c,
                            attr: t,
                            iconClass: v,
                          }) +
                            f._createButton({
                              name: "canceledit",
                              text: l,
                              attr: t,
                              iconClass: y,
                            })
                        ).appendTo(s);
                      }
                    }),
                  (f._editContainer = t),
                  f._editContainer.addClass("k-grid-edit-row"),
                  f._shouldClearEditableState && f._clearEditableState(),
                  (f.editable = new i.ui.Editable(f._editContainer, {
                    target: f,
                    fields: h,
                    model: r,
                    skipFocus: !!(
                      f._isVirtualInlineEditable() &&
                      f._editableState &&
                      f._editableState.field
                    ),
                    clearContainer: !1,
                  })),
                  t.length > 1 &&
                    (ci(t[0], t[1]), f._applyLockedContainersWidth()),
                  f.trigger(sr, { container: t, model: r }));
              },
              cancelRow: function (n) {
                var r,
                  t = this,
                  u = t._editContainer;
                if (u) {
                  if (
                    ((r = t._modelForContainer(u)),
                    !r ||
                      (n && t.trigger("cancel", { container: u, model: r })))
                  )
                    return;
                  t._destroyEditable();
                  t.dataSource.cancelChanges(r);
                  t._clearEditableState();
                  t._displayRow(
                    "popup" !== t._editMode()
                      ? u
                      : t.tbody.find("[" + i.attr("uid") + "=" + r.uid + "]")
                  );
                }
              },
              saveRow: function () {
                var i,
                  t = this,
                  r = this._editContainer,
                  f = this._modelForContainer(r),
                  u = n.Deferred();
                return r && this.editable
                  ? ((i = t.editable && t.editable.end()),
                    !i || this.trigger(eu, { container: r, model: f })
                      ? (i || t._scrollVirtualWrapper(), u.reject().promise())
                      : (t._clearEditableState(), this.dataSource.sync()))
                  : u.resolve().promise();
              },
              _displayRow: function (t) {
                var r,
                  u,
                  e,
                  o,
                  s,
                  i = this,
                  f = i._modelForContainer(t),
                  c = t.hasClass("k-state-selected"),
                  h = t.hasClass("k-alt");
                f &&
                  (i.lockedContent &&
                    ((r = n(
                      (h ? i.lockedAltRowTemplate : i.lockedRowTemplate)(f)
                    )),
                    i._relatedRow(t.last()).replaceWith(r)),
                  i.angular("cleanup", function () {
                    return { elements: t.get() };
                  }),
                  (u = n((h ? i.altRowTemplate : i.rowTemplate)(f))),
                  t.is(":visible") || u.hide(),
                  t.replaceWith(u),
                  i.trigger("itemChange", { item: u, data: f, ns: lt }),
                  r &&
                    r.length &&
                    i.trigger("itemChange", { item: r, data: f, ns: lt }),
                  (o = u),
                  (s = [{ dataItem: f }]),
                  r && r.length && ((o = u.add(r)), s.push({ dataItem: f })),
                  i.angular("compile", function () {
                    return { elements: o.get(), data: s };
                  }),
                  c &&
                    (i.options.selectable || i._checkBoxSelection) &&
                    i.select(u.add(r)),
                  r && ci(u[0], r[0]),
                  (e = u.next()),
                  e.hasClass("k-detail-row") &&
                    e.is(":visible") &&
                    u
                      .find(".k-hierarchy-cell .k-icon")
                      .removeClass("k-i-expand")
                      .addClass("k-i-collapse"));
              },
              _showMessage: function (t, r) {
                var f,
                  u = this;
                return u._isMobile
                  ? ((f = u._confirmDialog =
                      new i.ui.Confirm(n("<div />").appendTo(document.body), {
                        modal: { preventScroll: !0 },
                        closable: !1,
                        title: !1,
                        content: t.title,
                        messages: {
                          okText: t.confirmDelete,
                          cancel: t.cancelDelete,
                        },
                        open: function () {
                          u.content.data(wi, u.content.css(wi));
                          u.content.css(wi, uh);
                        },
                        close: function () {
                          u.content.css(wi, u.content.data(wi));
                        },
                      })),
                    f.result
                      .done(function () {
                        u._removeRow(r);
                      })
                      .fail(function () {
                        var n = u._confirmDialog;
                        n && (n.close(), n.destroy());
                      }),
                    !1)
                  : window.confirm(t.title);
              },
              _confirmation: function (n) {
                var i = this,
                  r = i.options.editable,
                  t =
                    r === !0 || typeof r === w
                      ? i.options.messages.editable.confirmation
                      : r.confirmation;
                return (
                  a(r) &&
                    typeof r.mode === w &&
                    typeof t !== pt &&
                    typeof t !== w &&
                    t !== !1 &&
                    (t = i.options.messages.editable.confirmation),
                  t === !1 ||
                    null == t ||
                    (typeof t === pt && (t = t(i._modelForContainer(n))),
                    i._showMessage(
                      {
                        confirmDelete:
                          r.confirmDelete ||
                          i.options.messages.editable.confirmDelete,
                        cancelDelete:
                          r.cancelDelete ||
                          i.options.messages.editable.cancelDelete,
                        title:
                          t === !0
                            ? i.options.messages.editable.confirmation
                            : t,
                      },
                      n
                    ))
                );
              },
              cancelChanges: function () {
                var n = this;
                n.dataSource.cancelChanges();
                n._isVirtualEditable() &&
                  n._virtualPageToTop(function () {
                    n.virtualScrollable.scrollToTop();
                  });
              },
              saveChanges: function () {
                var n = this,
                  t = n.editable && n.editable.end();
                (!t && n.editable) || n.trigger(pe)
                  ? t || n._scrollVirtualWrapper()
                  : n.dataSource.sync();
              },
              addRow: function () {
                var i,
                  f,
                  n = this,
                  t = n.dataSource,
                  e = n._editMode(),
                  o = n.options.editable.createAt || "",
                  r = t.pageSize(),
                  u = t.view() || [],
                  s = o.toLowerCase() === ho,
                  h = n._isVirtualEditable();
                (n.editable && n.editable.end()) || !n.editable
                  ? ("incell" != e && n.cancelRow(),
                    (i = t.indexOf(u[0])),
                    s &&
                      ((i += u.length),
                      r &&
                        !t.options.serverPaging &&
                        r <= u.length &&
                        (i -= 1)),
                    i < 0 &&
                      (i = t.page() > t.totalPages() ? (t.page() - 1) * r : 0),
                    n.options.navigatable &&
                      "incell" == e &&
                      n._removeCurrent(),
                    h
                      ? n._virtualAddRow()
                      : ((f = t.insert(i, {})), n._editModel(f)))
                  : n._scrollVirtualWrapper();
              },
              _editModel: function (n) {
                var f,
                  e,
                  r,
                  u,
                  t = this,
                  s = t.options.editable.createAt || "",
                  o = t._editMode();
                n &&
                  ((f = n.uid),
                  (e = t.lockedContent ? t.lockedTable : t.table),
                  (r = e.find("tr[" + i.attr("uid") + "=" + f + "]")),
                  (u = r
                    .children("td:not(.k-group-cell,.k-hierarchy-cell)")
                    .eq(t._firstEditableColumnIndex(r))),
                  "inline" === o && r.length
                    ? t.editRow(r)
                    : "popup" === o
                    ? t.editRow(n)
                    : u.length && t.editCell(u),
                  "bottom" == s.toLowerCase() &&
                    t.lockedContent &&
                    (t.lockedContent[0].scrollTop = t.content[0].scrollTop =
                      t.table[0].offsetHeight));
              },
              _virtualAddRow: function () {
                var n = this,
                  t = (n.options.editable.createAt || "").toLowerCase() === ho;
                n._clearEditableState();
                t ? n._virtualAddRowAtBottom() : n._virtualAddRowAtTop();
              },
              _virtualAddRowAtTop: function () {
                var t,
                  n = this,
                  i = n.dataSource,
                  r = n.virtualScrollable;
                1 === i.page()
                  ? ((t = i.insert(0, {})), n._editModel(t), r.scrollToTop())
                  : n._virtualPageToTop(function () {
                      t = i.insert(0, {});
                      n._editModel(t);
                      r.scrollToTop();
                    });
              },
              _virtualAddRowAtBottom: function () {
                var t,
                  n = this,
                  i = n.dataSource,
                  u = n.virtualScrollable,
                  r = i.total();
                i.at(r - 1) instanceof fe
                  ? ((t = i.insert(r, {})),
                    n._virtualPageToBottom(function () {
                      n._editModel(t);
                      u.scrollToBottom();
                    }))
                  : n._virtualPageToBottom(function () {
                      t = i.insert(r, {});
                      n._editModel(t);
                      u.scrollToBottom();
                    });
              },
              _virtualPageToTop: function (n) {
                var t = this;
                t._virtualPage(0, t.dataSource.take(), function () {
                  n();
                });
              },
              _virtualPageToBottom: function (n) {
                var i = this,
                  r = i.dataSource,
                  t = r.take(),
                  u = r.total(),
                  f = u > t ? u - t : 0;
                i._virtualPage(f, t, function () {
                  n();
                });
              },
              _virtualPage: function (n, t, i) {
                var r = this;
                r._isVirtualEditable() &&
                  ((r.virtualScrollable._preventScroll = !0),
                  r.virtualScrollable._page(n, t, i));
              },
              _firstEditableColumnIndex: function (n) {
                for (
                  var t,
                    e = this,
                    o = u(e.columns),
                    r = e._modelForContainer(n),
                    i = 0,
                    f = o.length;
                  i < f;
                  i++
                )
                  if (
                    ((t = o[i]),
                    r &&
                      (!r.editable || r.editable(t.field)) &&
                      !t.command &&
                      t.field &&
                      t.hidden !== !0)
                  )
                    return i;
                return -1;
              },
              _toolbar: function () {
                var f,
                  t = this,
                  s = t.wrapper,
                  u = t.options.toolbar,
                  o = t.options.editable;
                u &&
                  ((f = t.wrapper.find(".k-grid-toolbar")),
                  f.length ||
                    (fi(u) ||
                      ((u =
                        typeof u === w
                          ? u
                          : t._toolbarTmpl(u).replace(bi, "\\#")),
                      (u = e(i.template(u), t))),
                    (f = n('<div class="k-header k-grid-toolbar" />')
                      .html(u({}))
                      .prependTo(s)),
                    t.angular("compile", function () {
                      return { elements: f.get() };
                    })),
                  o &&
                    o.create !== !1 &&
                    f
                      .on(y + r, ".k-grid-add", function (n) {
                        n.preventDefault();
                        t.addRow();
                      })
                      .on(y + r, ".k-grid-cancel-changes", function (n) {
                        n.preventDefault();
                        t.cancelChanges();
                      })
                      .on(y + r, ".k-grid-save-changes", function (n) {
                        n.preventDefault();
                        t.saveChanges();
                      }),
                  f.on(y + r, ".k-grid-excel", function (n) {
                    n.preventDefault();
                    t.saveAsExcel();
                  }),
                  f.on(y + r, ".k-grid-pdf", function (n) {
                    n.preventDefault();
                    t.saveAsPDF();
                  }),
                  f.on(co + r, ".k-grid-search input", function (n) {
                    var i = n.currentTarget;
                    clearTimeout(t._searchTimeOut);
                    t._searchTimeOut = setTimeout(function () {
                      var r, n, u, e, f;
                      if (
                        ((t._searchTimeOut = null),
                        (r = t.options),
                        (n = r.search ? r.search.fields : null),
                        (u = { filters: [], logic: "or" }),
                        (e = i.value),
                        n || (n = os(r.columns)),
                        t.dataSource.options.endless &&
                          ((t.dataSource.options.endless = null),
                          (t._endlessPageSize = t.dataSource.options.pageSize)),
                        e)
                      )
                        for (f = 0; f < n.length; f++)
                          u.filters.push({
                            field: n[f],
                            operator: "contains",
                            value: e,
                          });
                      else u = {};
                      t.dataSource.filter(u);
                    }, 300);
                  }));
              },
              _toolbarTmpl: function (n) {
                var t,
                  u,
                  f,
                  r = this,
                  i = "";
                if (ui(n))
                  for (t = 0, u = n.length; t < u; t++)
                    (f =
                      "string" == typeof n[t]
                        ? n[t].toLowerCase()
                        : (n[t].name || "").toLowerCase()),
                      "search" === f
                        ? ((i +=
                            "<span class='k-textbox k-grid-search k-display-flex'>"),
                          (i +=
                            "<input autocomplete='off' placeholder='" +
                            r.options.messages.search +
                            "' title='" +
                            r.options.messages.search +
                            "' class='k-input' />"),
                          (i +=
                            "<span class='k-input-icon'><span class='k-icon k-i-search'></span></span>"),
                          (i += "</span>"))
                        : (i += r._createButton(n[t]));
                return i;
              },
              _createButton: function (n) {
                var e,
                  h = n.template || oh,
                  r = typeof n === w ? n : n.name || n.text,
                  c = g[r]
                    ? g[r].className
                    : "k-grid-" + (r || "").replace(/\s/g, ""),
                  u = { className: c, text: r, attr: "", iconClass: "" },
                  o = this.options.messages.commands;
                if (!(r || (a(n) && n.template)))
                  throw Error("Custom commands should have name specified");
                return (
                  a(n)
                    ? ((n = f(!0, {}, n)),
                      n.className && s(u.className, n.className.split(" ")) < 0
                        ? (n.className += " " + u.className)
                        : n.className === t && (n.className = u.className),
                      "edit" === r &&
                        ((n = f(!0, {}, n)),
                        (n.text = a(n.text) ? n.text.edit : n.text),
                        (n.iconClass = a(n.iconClass)
                          ? n.iconClass.edit
                          : n.iconClass)),
                      n.attr &&
                        (a(n.attr) && (n.attr = dt(n.attr)),
                        typeof n.attr === w &&
                          ((e = n.attr.match(/class="(.+?)"/)),
                          e &&
                            s(e[1], n.className.split(" ")) < 0 &&
                            (n.className += " " + e[1]))),
                      (u = f(!0, u, g[r], { text: o[r] }, n)))
                    : (u = f(!0, u, g[r], { text: o[r] })),
                  i.template(h)(u)
                );
              },
              _hasFooters: function () {
                return (
                  !!this.footerTemplate ||
                  !!this.groupFooterTemplate ||
                  (this.footer && this.footer.length > 0) ||
                  this.wrapper.find(".k-grid-footer").length > 0
                );
              },
              _groupable: function () {
                var t = this;
                t._groupableClickHandler
                  ? t.table
                      .add(t.lockedTable)
                      .off(y + r, t._groupableClickHandler)
                  : (t._groupableClickHandler = function (i) {
                      var u = n(this),
                        r = u.closest("tr"),
                        f = t._groupRows
                          ? t._groupRows[
                              t.wrapper.find(".k-grouping-row").index(r)
                            ]
                          : {};
                      u.hasClass("k-i-collapse")
                        ? t.trigger("groupCollapse", {
                            group: f,
                            element: r,
                          }) || t.collapseGroup(r)
                        : t.trigger("groupExpand", { group: f, element: r }) ||
                          t.expandGroup(r);
                      i.preventDefault();
                      i.stopPropagation();
                    });
                t._isLocked()
                  ? t.lockedTable.on(
                      y + r,
                      ".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",
                      t._groupableClickHandler
                    )
                  : t.table.on(
                      y + r,
                      ".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",
                      t._groupableClickHandler
                    );
                t._attachGroupable();
              },
              _attachGroupable: function () {
                var t = this,
                  r = t.wrapper,
                  u = t.options.groupable,
                  o = or + "[" + i.attr("field") + "]",
                  e = t.content
                    ? ".k-grid-header:first " + o
                    : "table:first>.k-grid-header " + o;
                u &&
                  u.enabled !== !1 &&
                  (r.has("div.k-grouping-header")[0] ||
                    n("<div>&nbsp;</div>")
                      .addClass("k-grouping-header")
                      .prependTo(r),
                  t.groupable && t._destroyGroupable(),
                  h.chrome &&
                    (r
                      .find("div.k-grouping-header")
                      .css("touch-action", "none"),
                    r.find(e).css("touch-action", "none")),
                  (t.groupable = new lt.Groupable(
                    r,
                    f({}, u, {
                      draggable: t._draggableInstance,
                      groupContainer: ">div.k-grouping-header",
                      dataSource: t.dataSource,
                      draggableElements: e,
                      filter: e,
                      allowDrag: t.options.reorderable,
                      change: function (n) {
                        t.trigger("group", { groups: n.groups })
                          ? n.preventDefault()
                          : (t._clearEditableState(),
                            t.dataSource.options.endless &&
                              ((t.dataSource.options.endless = null),
                              (t._endlessPageSize =
                                t.dataSource.options.pageSize),
                              (t.dataSource._skip = 0),
                              (t.dataSource._pageSize = t.dataSource._take =
                                t._endlessPageSize),
                              (t.dataSource._page = 1)));
                      },
                    })
                  )),
                  t._addGroupableOptionsToHeader());
              },
              _addGroupableOptionsToHeader: function () {
                for (
                  var u,
                    t,
                    f = this,
                    r = rt(f.columns),
                    e = {},
                    h = "",
                    o = f._headerCells(),
                    s = "",
                    n = 0;
                  n < r.length;
                  n++
                )
                  (h = r[n].field), (e[r[n].field] = r[n]);
                for (n = 0; n < o.length; n++)
                  (u = o.eq(n)),
                    (s = u.attr(i.attr(du))),
                    (t = e[s]),
                    t &&
                      t.groupable &&
                      t.groupable.sort &&
                      u.data(ao, t.groupable.sort);
              },
              _destroyGroupable: function () {
                var n = this;
                n.groupable &&
                  n.groupable.element &&
                  n.groupable.element.kendoGroupable("destroy");
                n.groupable = null;
                n._removeGroupableOptionsFromHeader();
              },
              _removeGroupableOptionsFromHeader: function () {
                for (
                  var i = this, t = i._headerCells(), n = 0;
                  n < t.length;
                  n++
                )
                  t.eq(n).removeData(ao);
              },
              _continuousItems: function (t, i) {
                var r, o, s, h, f, l, e, u;
                if (this.lockedContent) {
                  for (
                    r = this,
                      o = r.table.add(r.lockedTable),
                      s = n(t, o[0]),
                      h = n(t, o[1]),
                      f = i ? c(r.columns).length : 1,
                      l = i ? r.columns.length - f : 1,
                      e = [],
                      u = 0;
                    u < s.length;
                    u += f
                  )
                    ee.apply(e, s.slice(u, u + f)), ee.apply(e, h.splice(0, l));
                  return e;
                }
              },
              _selectable: function () {
                var h,
                  f,
                  o,
                  v,
                  u = this,
                  e = [],
                  c = u._isLocked(),
                  a = u.options.selectable;
                a &&
                  (u.selectable && u.selectable.destroy(),
                  (u._selectedIds = {}),
                  (a = i.ui.Selectable.parseOptions(a)),
                  (h = a.multiple),
                  (f = a.cell),
                  u._hasDetails() && (e[e.length] = ".k-detail-row"),
                  (u.options.groupable || u._hasFooters() || u._groups()) &&
                    (e[e.length] = ".k-grouping-row,.k-group-footer"),
                  (e = e.join(",")),
                  "" !== e && (e = ":not(" + e + ")"),
                  (o = u.table),
                  c && (o = o.add(u.lockedTable)),
                  (v = ">" + (f ? bs : "tbody>tr" + e)),
                  (u.selectable = new i.ui.Selectable(o, {
                    filter: v,
                    aria: !0,
                    multiple: h,
                    change: function () {
                      var n;
                      f || u._persistSelectedRows();
                      u._checkBoxSelection &&
                        ((n = u.selectable.value()),
                        u._uncheckCheckBoxes(),
                        u._checkRows(n),
                        u._toggleHeaderCheckState(
                          n.length && n.length === u.items().length ? !0 : !1
                        ));
                      u.trigger(k);
                    },
                    useAllItems: c && h && f,
                    relatedTarget: function (t) {
                      var e, i, r, o;
                      if (!f && c) {
                        for (i = n(), r = 0, o = t.length; r < o; r++)
                          (e = u._relatedRow(t[r])),
                            s(e[0], t) < 0 && (i = i.add(e));
                        return i;
                      }
                    },
                    continuousItems: function () {
                      return u._continuousItems(v, f);
                    },
                  })),
                  u.options.navigatable &&
                    o.on("keydown" + r, function (i) {
                      var r = u.current(),
                        e = i.target;
                      if (
                        i.keyCode === l.SPACEBAR &&
                        !i.shiftKey &&
                        n.inArray(e, o) > -1 &&
                        !r.is(".k-edit-cell,.k-header") &&
                        r
                          .parent()
                          .is(
                            ":not(.k-grouping-row,.k-detail-row,.k-group-footer)"
                          )
                      ) {
                        if (
                          (i.preventDefault(),
                          i.stopPropagation(),
                          (r = f ? r : r.parent()),
                          c && !f && (r = r.add(u._relatedRow(r))),
                          h)
                        )
                          if (i.ctrlKey) {
                            if (r.hasClass(yi))
                              return u._deselectCheckRows(r), t;
                          } else u.selectable.clear();
                        else u.selectable.clear();
                        f || (u.selectable._lastActive = r);
                        u.selectable.value(r);
                      } else !f && (n(e).is("td") || (n(e).is("table") && s(e, this._navigatableTables))) && ((i.shiftKey && i.keyCode == l.LEFT) || (i.shiftKey && i.keyCode == l.RIGHT) || (i.shiftKey && i.keyCode == l.UP) || (i.shiftKey && i.keyCode == l.DOWN) || (i.keyCode === l.SPACEBAR && i.shiftKey)) && (i.preventDefault(), i.stopPropagation(), (r = r.parent()), c && (r = r.add(u._relatedRow(r))), h ? (u.selectable._lastActive || (u.selectable._lastActive = r), u.selectable.selectRange(u.selectable._firstSelectee(), r)) : (u.selectable.clear(), u.selectable.value(r)));
                    }));
              },
              _clipboard: function () {
                var n,
                  t = this.options,
                  i = t.selectable;
                i &&
                  t.allowCopy &&
                  ((n = this),
                  t.navigatable ||
                    n.table
                      .add(n.lockedTable)
                      .attr("tabindex", 0)
                      .on(
                        "mousedown" + r + " keydown" + r,
                        ".k-detail-cell",
                        function (n) {
                          n.target !== n.currentTarget &&
                            n.stopImmediatePropagation();
                        }
                      )
                      .on("mousedown" + r, ht + ">" + ot, e(te, n)),
                  (n.copyHandler = e(n.copySelection, n)),
                  (n.updateClipBoardState = function () {
                    n.areaClipBoard &&
                      n.areaClipBoard.val(n.getTSV()).focus().select();
                  }),
                  n.bind("change", n.updateClipBoardState),
                  n.wrapper.on("keydown", n.copyHandler),
                  (n.clearAreaHandler = e(n.clearArea, n)),
                  n.wrapper.on("keyup", n.clearAreaHandler));
              },
              copySelection: function (t) {
                (t instanceof jQuery.Event && !t.ctrlKey && !t.metaKey) ||
                  n(t.target).is("input:visible,textarea:visible") ||
                  (window.getSelection && "" + window.getSelection()) ||
                  (document.selection &&
                    document.selection.createRange().text) ||
                  (this.areaClipBoard ||
                    (this.areaClipBoard = n("<textarea />")
                      .css({
                        position: "fixed",
                        top: "50%",
                        left: "50%",
                        opacity: 0,
                        width: 0,
                        height: 0,
                      })
                      .appendTo(this.wrapper)),
                  this.areaClipBoard.val(this.getTSV()).focus().select());
              },
              getTSV: function () {
                var o,
                  t,
                  f,
                  s,
                  u,
                  e,
                  i = this,
                  r = i.select(),
                  l = "\t",
                  h = i.options.allowCopy,
                  a = !0;
                return (
                  n.isPlainObject(h) && h.delimeter && (l = h.delimeter),
                  (o = ""),
                  r.length &&
                    (r.eq(0).is("tr") && (r = r.find("td:not(.k-group-cell)")),
                    a && r.filter(":visible"),
                    (t = []),
                    (f = this.columns.length),
                    (s = i._isLocked() && c(i.columns).length),
                    (u = !0),
                    n.each(r, function (r, e) {
                      var c, h, o, l;
                      e = n(e);
                      c = e.closest("tr");
                      h = c.index();
                      o = e.index();
                      a && (o -= e.prevAll(":hidden").length);
                      s && u && (u = n.contains(i.lockedTable[0], e[0]));
                      i._groups() && u && (o -= i._groups());
                      o = u ? o : o + s;
                      f > o && (f = o);
                      l = e.text();
                      t[h] || (t[h] = []);
                      t[h][o] = l;
                    }),
                    (e = t.length),
                    (t = n.each(t, function (n, i) {
                      i && ((t[n] = i.slice(f)), e > n && (e = n));
                    })),
                    n.each(t.slice(e), function (n, t) {
                      o += t ? t.join(l) + "\r\n" : "\r\n";
                    })),
                  o
                );
              },
              clearArea: function (t) {
                var i;
                this.areaClipBoard &&
                  t &&
                  t.target === this.areaClipBoard[0] &&
                  ((i = this.options.navigatable
                    ? n(this.current()).closest("table")
                    : this.table),
                  b(i, !0));
                this.areaClipBoard &&
                  (this.areaClipBoard.remove(), (this.areaClipBoard = null));
              },
              _adaptiveColumns: function () {
                var n = this;
                n._anyColumnHasMediaQuery() &&
                  (n._setColumnsMediaVisibility(n.columns),
                  n._attachColumnMediaResizeHandler());
              },
              _anyColumnHasMediaQuery: function () {
                return this._columnsWithMediaQuery().length;
              },
              _columnsWithMediaQuery: function () {
                return ef(this.columns);
              },
              _attachColumnMediaResizeHandler: function () {
                var t = this;
                t._detachColumnMediaResizeHandler();
                t._columnMediaResizeHandler = e(t._onColumnMediaResize, t);
                n(window).on(uo + r, t._columnMediaResizeHandler);
              },
              _detachColumnMediaResizeHandler: function () {
                var t = this;
                t._columnMediaResizeHandler &&
                  n(window).off(uo + r, t._columnMediaResizeHandler);
              },
              _onColumnMediaResize: function () {
                var n = this;
                n._setColumnsMediaVisibility(n.columns);
                n._setContentMediaWidth();
              },
              _setColumnsMediaVisibility: function (n) {
                for (var i = n || [], t = 0; t < i.length; t++)
                  this._setColumnMediaVisibility(i[t]);
              },
              _setColumnMediaVisibility: function (n) {
                var t = this;
                ni(n.media)
                  ? t._setColumnsMediaVisibility(n.columns)
                  : ff(n)
                  ? (t._showColumnByMedia(n),
                    n.hidden || t._setColumnsMediaVisibility(n.columns))
                  : t._hideColumnByMedia(n);
              },
              _showColumnByMedia: function (n) {
                n.hidden || this.showColumn(n);
                br(n);
              },
              _hideColumnByMedia: function (n) {
                var t = n.hidden;
                t ||
                  ((n._hideByMedia = !0),
                  this.hideColumn(n),
                  (n._hideByMedia = !1),
                  (n.hidden = t));
                br(n);
              },
              _setContentMediaWidth: function () {
                var u,
                  i,
                  l,
                  f,
                  a,
                  v,
                  y,
                  p,
                  e,
                  w,
                  r,
                  o,
                  b,
                  s,
                  h,
                  t = this,
                  k = t.options,
                  c = t._isLocked();
                if (
                  k.scrollable &&
                  k.resizable &&
                  (c && t.lockedFooter
                    ? (u = t.lockedFooter.children("table"))
                    : t.footer &&
                      (u = t.footer.find(">.k-grid-footer-wrap>table")),
                  (u && u[0]) || (u = n()),
                  (i = c
                    ? t.wrapper.find(".k-grid-header-locked").find("table")
                    : t.wrapper.find(".k-grid-header").find("table")),
                  (l = c ? t.lockedTable : t.table),
                  (f = i.find("th")),
                  (a = i.find("colgroup")),
                  (v = f.length),
                  (y = f.filter(gt).length),
                  (p = f.length - y),
                  (e = 0),
                  "" !== i[0].style.width && parseFloat(i[0].style.width) !== e)
                ) {
                  for (w = i.css("width"), r = 0; r < v; r++)
                    ts(f[r]) &&
                      ((b = Math.max(r, r - p)),
                      (s = a.children()[b]),
                      (h = s ? s.style.width : ""),
                      "" !== h
                        ? (o = parseFloat(h))
                        : (i.css("width", "auto"),
                          (o = st(f.eq(r))),
                          i.css("width", w)),
                      (e += o));
                  l.css("width", e - 1);
                  i.css("width", e);
                  u.css("width", e);
                }
              },
              _minScreenSupport: function () {
                var t = this.hideMinScreenCols();
                t &&
                  ((this.minScreenResizeHandler = e(
                    this.hideMinScreenCols,
                    this
                  )),
                  n(window).on("resize", this.minScreenResizeHandler));
              },
              hideMinScreenCols: function () {
                var n = this.columns,
                  t = window.innerWidth > 0 ? window.innerWidth : screen.width;
                return this._iterateMinScreenCols(n, t);
              },
              _iterateMinScreenCols: function (n, i) {
                for (var r, f, e = !1, u = 0; u < n.length; u++)
                  (r = n[u]),
                    (f = r.minScreenWidth),
                    f !== t &&
                      null !== f &&
                      ((e = !0),
                      f > i ? this.hideColumn(r) : this.showColumn(r)),
                    !r.hidden &&
                      r.columns &&
                      (e = this._iterateMinScreenCols(r.columns, i) || e);
                return e;
              },
              _relatedRow: function (t) {
                var i,
                  r,
                  u = this.lockedTable;
                return (
                  (t = n(t)),
                  u
                    ? ((i = t.closest(this.table.add(this.lockedTable))),
                      (r = i.find(">tbody>tr").index(t)),
                      (i = i[0] === this.table[0] ? u : this.table),
                      i.find(">tbody>tr").eq(r))
                    : t
                );
              },
              _relatedCell: function (t) {
                var i,
                  r,
                  u = this.lockedTable;
                return (
                  (t = n(t)),
                  u
                    ? ((i = t.closest(this.table.add(this.lockedTable))),
                      (r = i.find(">tbody>tr>td").index(t)),
                      (i = i[0] === this.table[0] ? u : this.table),
                      i.find(">tbody>tr>td").index(r))
                    : t
                );
              },
              clearSelection: function () {
                var n = this;
                return (
                  n.selectable && !n._checkBoxSelection && n.selectable.clear(),
                  n._checkBoxSelection
                    ? (n._deselectCheckRows(n.select()), t)
                    : (n.options.persistSelection
                        ? n._persistSelectedRows()
                        : (n._selectedIds = {}),
                      n.trigger(k),
                      t)
                );
              },
              select: function (n) {
                var r = this,
                  u = r.selectable,
                  e = i.ui.Selectable.parseOptions(this.options.selectable),
                  f = e.cell;
                return (
                  (n = r.table.add(r.lockedTable).find(n)),
                  n.length
                    ? (u && !u.options.multiple && (u.clear(), (n = n.first())),
                      r._isLocked() &&
                        (n = n.add(
                          n.map(function () {
                            return f
                              ? r._relatedCell(this)
                              : r._relatedRow(this);
                          })
                        )),
                      u && !r._checkBoxSelection
                        ? u.value(n)
                        : (r._checkRows(n),
                          r.select().length === r.items().length &&
                            r._toggleHeaderCheckState(!0),
                          f || r._persistSelectedRows(),
                          r.trigger(k)),
                      t)
                    : u
                    ? u.value()
                    : r.items().filter("." + yi)
                );
              },
              _toggleHeaderCheckState: function (n) {
                var t = this;
                n
                  ? t.thead
                      .add(t.lockedHeader)
                      .find("tr " + yt)
                      .prop("checked", !0)
                      .attr("aria-checked", !0)
                      .attr("aria-label", "Deselect all rows")
                  : t.thead
                      .add(t.lockedHeader)
                      .find("tr " + yt)
                      .prop("checked", !1)
                      .attr("aria-checked", !1)
                      .attr("aria-label", "Select all rows");
              },
              _uncheckCheckBoxes: function () {
                var n = this,
                  t = n.table.add(n.lockedTable);
                t.find("tbody " + yt)
                  .attr("aria-checked", !1)
                  .prop("checked", !1)
                  .attr("aria-label", "Select row");
              },
              _deselectCheckRows: function (t) {
                var i = this;
                t = i.table.add(i.lockedTable).find(t);
                i._isLocked() &&
                  (t = t.add(
                    t.map(function () {
                      return i._relatedRow(this);
                    })
                  ));
                t.each(function () {
                  n(this)
                    .removeClass(yi)
                    .find(yt)
                    .attr("aria-checked", !1)
                    .prop("checked", !1)
                    .attr("aria-label", "Select row");
                });
                i._toggleHeaderCheckState(!1);
                i._persistSelectedRows();
                i.trigger(k);
              },
              _checkRows: function (t) {
                t.each(function () {
                  n(this)
                    .addClass(yi)
                    .find(yt)
                    .prop("checked", !0)
                    .attr("aria-label", "Deselect row")
                    .attr("aria-checked", !0);
                });
              },
              _persistSelectedRows: function () {
                var i,
                  r,
                  f,
                  u,
                  n = this,
                  e = n.items(),
                  s = n.dataSource.options,
                  t = s.schema,
                  o = {};
                if (
                  t &&
                  t.model &&
                  n._data &&
                  (f = fi(t.model) ? t.model.fn.idField : t.model.id)
                )
                  for (
                    n.select().each(function () {
                      r = n.dataItem(this);
                      o[r[f]] = !0;
                    }),
                      u = 0;
                    u < e.length;
                    u++
                  )
                    (r = n.dataItem(e[u])),
                      (i = r[f]),
                      o[i]
                        ? (n._selectedIds[i] = !0)
                        : delete n._selectedIds[i];
              },
              selectedKeyNames: function () {
                var t,
                  i = this,
                  n = [];
                for (t in i._selectedIds) n.push(t);
                return n.sort(), n;
              },
              _updateCurrentAttr: function (t, i) {
                var r = n(t).data("headerId");
                n(t)
                  .removeClass(vi)
                  .closest("table")
                  .removeAttr("aria-activedescendant");
                r
                  ? ((r = r.replace(this._cellId, "")), n(t).attr("id", r))
                  : n(t).removeAttr("id");
                i.data("headerId", i.attr("id"))
                  .attr("id", this._cellId)
                  .addClass(vi)
                  .closest("table")
                  .attr("aria-activedescendant", this._cellId);
                this._current = i;
              },
              _scrollCurrent: function () {
                var t,
                  r,
                  f,
                  e,
                  i,
                  o,
                  u = this._current,
                  h = this.options.scrollable;
                u &&
                  h &&
                  ((t = u.parent()),
                  (r = t.closest("table").parent()),
                  (f = r.is(".k-grid-content-locked,.k-grid-header-locked")),
                  (e = r.is(
                    ".k-grid-content-locked,.k-grid-content,.k-virtual-scrollable-wrap"
                  )),
                  (i = n(this.content)
                    .find(">.k-virtual-scrollable-wrap")
                    .addBack()
                    .last()[0]),
                  e &&
                    (h.virtual
                      ? ((o = Math.max(s(t[0], this._items(t.parent())), 0)),
                        (this._rowVirtualIndex =
                          this.virtualScrollable.itemIndex(o)),
                        this.virtualScrollable.scrollIntoView(t))
                      : this._scrollTo(this._relatedRow(t)[0], i)),
                  this.lockedContent &&
                    (this.lockedContent[0].scrollTop = i.scrollTop),
                  f || this._scrollTo(u[0], i));
              },
              current: function (n) {
                return this._setCurrent(n, !0);
              },
              _setCurrent: function (t, i, r) {
                var u = this._current;
                return (
                  (t = n(t)),
                  t.length &&
                    ((u && u[0] === t[0]) ||
                      (this._updateCurrentAttr(u, t),
                      r || this._scrollCurrent(),
                      i || this.trigger(so, { element: t }))),
                  t &&
                    t.length &&
                    (this._lastCellIndex = t.parent().children(p).index(t)),
                  this._current
                );
              },
              _removeCurrent: function () {
                this._current &&
                  (this._current.removeClass(vi), (this._current = null));
              },
              _scrollTo: function (t, r) {
                var s,
                  v = t.tagName.toLowerCase(),
                  u = "td" === v || "th" === v,
                  e = t[u ? "offsetLeft" : "offsetTop"],
                  y = t[u ? "offsetWidth" : "offsetHeight"],
                  f = r[u ? "scrollLeft" : "scrollTop"],
                  c = r[u ? "clientWidth" : "clientHeight"],
                  p = e + y,
                  o = 0,
                  l = 0,
                  a = 0;
                tt &&
                  u &&
                  ((s = n(t).closest("table")[0]),
                  h.msie
                    ? (l = s.offsetLeft)
                    : h.mozilla && (a = s.offsetLeft - i.support.scrollbar()));
                f = Math.abs(f + l - a);
                o = f > e ? e : p > f + c ? (y <= c ? p - c : e) : f;
                o = Math.abs(o + l) + a;
                r[u ? "scrollLeft" : "scrollTop"] = o;
              },
              _navigatable: function () {
                var f,
                  o,
                  u,
                  t = this;
                t.options.navigatable &&
                  ((f = t.table.add(t.lockedTable)),
                  (o = t.thead.parent().add(n(">table", t.lockedHeader))),
                  (u = f),
                  t.options.scrollable && ((u = u.add(o)), o.attr(pi, -1)),
                  (this._navigatableTables = u),
                  u.off(
                    "mousedown" +
                      r +
                      " focus" +
                      r +
                      " focusout" +
                      r +
                      " keydown" +
                      r
                  ),
                  o
                    .on("keydown" + r, e(t._openHeaderMenu, t))
                    .find("a.k-link")
                    .attr("tabIndex", -1),
                  f
                    .attr(pi, nt.max(f.attr(pi) || 0, 0))
                    .on("keydown" + r, ".k-detail-cell", function (n) {
                      n.target !== n.currentTarget &&
                        n.stopImmediatePropagation();
                    }),
                  u
                    .on(
                      i.support.touch ? "touchstart" + r : "mousedown" + r,
                      ht + ">" + ot,
                      e(te, t)
                    )
                    .on("focus" + r, e(t._tableFocus, t))
                    .on("focusout" + r, e(t._tableBlur, t))
                    .on("keydown" + r, e(t._tableKeyDown, t)));
              },
              _openHeaderMenu: function (n) {
                n.altKey &&
                  n.keyCode == l.DOWN &&
                  (this.current()
                    .find(".k-grid-filter, .k-header-column-menu")
                    .click(),
                  n.stopImmediatePropagation());
              },
              _setTabIndex: function (n) {
                this._navigatableTables.attr(pi, -1);
                n.attr(pi, 0);
              },
              _tableFocus: function (t) {
                var i = this.current(),
                  r = n(t.currentTarget);
                i && i.is(":visible")
                  ? i.addClass(vi)
                  : this._setCurrent(r.find(he));
                this._setTabIndex(r);
              },
              _tableBlur: function () {
                var n = this.current();
                n && n.removeClass(vi);
              },
              _tableKeyDown: function (i) {
                var r,
                  u = this.current(),
                  o =
                    this.virtualScrollable && this.virtualScrollable.fetching(),
                  e = n(i.target),
                  f =
                    !i.isDefaultPrevented() &&
                    !e.is(":button,a,:input,a>.k-icon");
                return o
                  ? (i.preventDefault(), t)
                  : ((u = u
                      ? u
                      : n(this.lockedTable)
                          .add(
                            this.options.scrollable ? this.table : this.tbody
                          )
                          .find(he)),
                    u.length &&
                      ((r = !1),
                      f &&
                        i.keyCode == l.UP &&
                        (r = this._moveUp(u, i.shiftKey)),
                      f &&
                        i.keyCode == l.DOWN &&
                        (r = this._moveDown(u, i.shiftKey)),
                      f &&
                        i.keyCode == (tt ? l.LEFT : l.RIGHT) &&
                        (r = this._moveRight(
                          u,
                          i.altKey,
                          i.shiftKey,
                          i.ctrlKey,
                          i.currentTarget
                        )),
                      f &&
                        i.keyCode == (tt ? l.RIGHT : l.LEFT) &&
                        (r = this._moveLeft(
                          u,
                          i.altKey,
                          i.shiftKey,
                          i.ctrlKey,
                          i.currentTarget
                        )),
                      f &&
                        i.keyCode == l.PAGEDOWN &&
                        (r = this._handlePageDown()),
                      f && i.keyCode == l.PAGEUP && (r = this._handlePageUp()),
                      f &&
                        i.keyCode == l.HOME &&
                        (r = this._handleHome(u, i.ctrlKey)),
                      f &&
                        i.keyCode == l.END &&
                        (r = this._handleEnd(u, i.ctrlKey)),
                      f &&
                        i.keyCode == l.SPACEBAR &&
                        (r = this._handleSpaceKey(u, i.ctrlKey)),
                      (i.keyCode != l.ENTER && i.keyCode != l.F2) ||
                        (r = this._handleEnterKey(u, i.currentTarget, e)),
                      i.keyCode == l.ESC &&
                        (r = this._handleEscKey(u, i.currentTarget)),
                      i.keyCode == l.TAB &&
                        (r = this._handleTabKey(
                          u,
                          i.currentTarget,
                          i.shiftKey
                        )),
                      r && (i.preventDefault(), i.stopPropagation())),
                    t);
              },
              _moveLeft: function (t, i, r, u, f) {
                var e,
                  h,
                  s = t.parent(),
                  o = s.parent();
                return (
                  i
                    ? this.collapseRow(s)
                    : u && t.is(".k-header") && this.options.reorderable
                    ? this._moveColumn(t, !0)
                    : ((h = o.find(ht).index(s)),
                      (e = this._prevHorizontalCell(o, t, h)),
                      e[0] ||
                        (r
                          ? this.lockedTable
                            ? ((e = this._relatedRow(s)),
                              n.contains(this.lockedTable[0], s[0]) &&
                                (e = e.prevAll(bt + ":first")),
                              (e = e.children(p + ":last")))
                            : (e = this._tabNext(t, f, !0))
                          : ((o = this._horizontalContainer(o)),
                            (e = this._prevHorizontalCell(o, t, h)),
                            e[0] !== t[0] && b(o.parent(), !0))),
                      this._setCurrent(e)),
                  !0
                );
              },
              _moveRight: function (t, i, r, u, f) {
                var e,
                  h,
                  s = t.parent(),
                  o = s.parent();
                return (
                  i
                    ? this.expandRow(s)
                    : u && t.is(".k-header") && this.options.reorderable
                    ? this._moveColumn(t, !1)
                    : ((h = o.find(ht).index(s)),
                      (e = this._nextHorizontalCell(o, t, h)),
                      e[0] ||
                        (r
                          ? this.lockedTable
                            ? ((e = this._relatedRow(s)),
                              n.contains(this.table[0], s[0]) &&
                                (e = e.nextAll(bt + ":first")),
                              (e = e.children(p + ":first")))
                            : (e = this._tabNext(t, f, !1))
                          : ((o = this._horizontalContainer(o, !0)),
                            (e = this._nextHorizontalCell(o, t, h)),
                            e[0] !== t[0] && b(o.parent(), !0))),
                      this._setCurrent(e)),
                  !0
                );
              },
              _moveUp: function (n, t) {
                var i,
                  u,
                  r = n.parent().parent();
                return (
                  t
                    ? ((i = n.parent()),
                      (i = i.prevAll(bt + ":first")),
                      (i = n.parent().is(bt)
                        ? i.children().eq(n.index())
                        : i.children(p + ":last")))
                    : ((i = this._prevVerticalCell(r, n)),
                      i[0] ||
                        ((this._lastCellIndex = 0),
                        (r = this._verticalContainer(r, !0)),
                        (i = this._prevVerticalCell(r, n)),
                        i[0] && b(r.parent(), !0))),
                  (u = this._lastCellIndex || 0),
                  this._setCurrent(i),
                  (this._lastCellIndex = u),
                  !0
                );
              },
              _moveDown: function (n, t) {
                var i,
                  u,
                  r = n.parent().parent();
                return (
                  t
                    ? ((i = n.parent()),
                      (i = i.nextAll(bt + ":first")),
                      (i = n.parent().is(bt)
                        ? i.children().eq(n.index())
                        : i.children(p + ":first")))
                    : ((i = this._nextVerticalCell(r, n)),
                      i[0] ||
                        ((this._lastCellIndex = 0),
                        (r = this._verticalContainer(r)),
                        (i = this._nextVerticalCell(r, n)),
                        i[0] && b(r.parent(), !0))),
                  (u = this._lastCellIndex || 0),
                  this._setCurrent(i),
                  (this._lastCellIndex = u),
                  !0
                );
              },
              _moveColumn: function (t, i) {
                var e = this.wrapper
                    .data()
                    .kendoReorderable.element.find(
                      this._draggableInstance.options.filter + ":visible"
                    ),
                  u = o(gi(this.columns)),
                  r = e.index(n(t)),
                  s = i ? -1 : 1,
                  h = u[r],
                  f = nr(u, this.columns, r, r + s);
                f >= 0 && this.reorderColumn(f, h, i);
              },
              _handleHome: function (n, t) {
                var i,
                  r = n.parent(),
                  u = r.parent(),
                  e =
                    this.lockedTable &&
                    this.lockedTable.children("tbody")[0] === u[0],
                  f = u[0] === this.tbody[0];
                if (
                  (t
                    ? (i = this.lockedTable
                        ? this.lockedTable.find(se + ">" + ot + ":first")
                        : this.table.find(se + ">" + ot + ":first"))
                    : (f || e) &&
                      (f && this.lockedTable && (r = this._relatedRow(r)),
                      (i = r.children(p + ":first"))),
                  i && i.length)
                )
                  return this._setCurrent(i), !0;
              },
              _handleEnd: function (n, t) {
                var i,
                  r = n.parent(),
                  u = r.parent(),
                  e =
                    this.lockedTable &&
                    this.lockedTable.children("tbody")[0] === u[0],
                  f = u[0] === this.tbody[0];
                if (
                  (t
                    ? (i = this.table.find(ks + ">" + ot + ":last"))
                    : (f || e) &&
                      (!f && this.lockedTable && (r = this._relatedRow(r)),
                      (i = r.children(p + ":last"))),
                  i && i.length)
                )
                  return this._setCurrent(i), !0;
              },
              _handlePageDown: function () {
                return (
                  !!this.options.pageable &&
                  (this.dataSource.page(this.dataSource.page() + 1), !0)
                );
              },
              _handlePageUp: function () {
                return (
                  !!this.options.pageable &&
                  (this.dataSource.page(this.dataSource.page() - 1), !0)
                );
              },
              _handleTabKey: function (t, i, r) {
                var u,
                  f = this.options.editable && "incell" == this._editMode();
                return (
                  !(!f || t.is("th")) &&
                  ((u = n(at()).closest(".k-edit-cell")),
                  u[0] && u[0] !== t[0] && (t = u),
                  (u = this._tabNext(t, i, r)),
                  !!u.length &&
                    (this._handleEditing(t, u, u.closest("table")), !0))
                );
              },
              _handleEscKey: function (t, i) {
                var r,
                  u = at(),
                  f = "incell" == this._editMode();
                return vs(t)
                  ? (f
                      ? this.closeCell(!0)
                      : ((r = n(t).parent().index()),
                        u && u.blur(),
                        this.cancelRow(!0),
                        r >= 0 &&
                          this._setCurrent(
                            this.items().eq(r).children(ot).first()
                          )),
                    h.msie && h.version < 9 && document.body.focus(),
                    b(i, !0),
                    !0)
                  : !!t.has(u).length && (b(i, !0), !0);
              },
              _toggleCurrent: function (n, t) {
                var i = n.parent();
                return i.is(".k-grouping-row")
                  ? (i.find(".k-icon:first").click(), !0)
                  : !(t || !i.is(".k-master-row")) &&
                      (i.find(".k-icon:first").click(), !0);
              },
              _handleSpaceKey: function (t, r) {
                var f,
                  e,
                  s,
                  o,
                  u = this;
                if (r && u.groupable && t.hasClass("k-header"))
                  return (
                    (f = u.groupable.descriptors()),
                    (e = t.attr(i.attr("field"))),
                    (s = u.groupable.aggregates()),
                    (o = t.attr(i.attr("title")) || e),
                    u.groupable._canDrag(t)
                      ? (f.push({ field: e, dir: "asc", aggregates: s || [] }),
                        (o += " " + u.options.messages.ungroupHeader))
                      : ((f = n.grep(f, function (n) {
                          return n.field !== e;
                        })),
                        (o += " " + u.options.messages.groupHeader)),
                    t.attr("aria-label", o),
                    u.dataSource.group(f),
                    !0
                  );
              },
              _handleEnterKey: function (t, i, r) {
                var f,
                  e,
                  o =
                    this.options.editable &&
                    this.options.editable.update !== !1,
                  u = r.closest("[role=gridcell]");
                return (
                  r.is("table") || n.contains(t[0], r[0]) || (t = u),
                  t.is("th")
                    ? ((f = t.find(".k-link")),
                      f.length ? f.click() : t.find(yt).focus(),
                      !0)
                    : !!this._toggleCurrent(t, o) ||
                      ((e = t.find(":kendoFocusable:first")),
                      e[0] &&
                      !t.hasClass("k-edit-cell") &&
                      t.hasClass("k-state-focused")
                        ? (e.focus(), !0)
                        : !(!o || r.is(":button,.k-button,textarea")) &&
                          (u[0] || (u = t), this._handleEditing(u, !1, i), !0))
                );
              },
              _nextHorizontalCell: function (n, t, i) {
                var r,
                  f,
                  u,
                  e = t.nextAll(p);
                return e.length ||
                  ((r = n.find(ht)), (f = r.index(t.parent())), f != -1)
                  ? e.first()
                  : t.hasClass("k-header")
                  ? ((u = []),
                    tr(
                      [c(this.columns)[0]],
                      hi(r.eq(0).children(":visible").first()),
                      u,
                      0,
                      0
                    ),
                    u[i] ? u[i][0] : t)
                  : t.parent().hasClass("k-filter-row")
                  ? r.last().children(p).first()
                  : r.eq(i).children(p).first();
              },
              _prevHorizontalCell: function (n, t, i) {
                var r,
                  e,
                  u,
                  f,
                  o = t.prevAll(p);
                return o.length ||
                  ((r = n.find(ht)), (e = r.index(t.parent())), e != -1)
                  ? o.first()
                  : t.hasClass("k-header")
                  ? ((u = []),
                    (f = c(this.columns)),
                    tr(
                      [f[f.length - 1]],
                      hi(r.eq(0).children().last()),
                      u,
                      0,
                      0
                    ),
                    u[i] ? u[i][0] : t)
                  : t.parent().hasClass("k-filter-row")
                  ? r.last().children(p).last()
                  : r.eq(i).children(p).last();
              },
              _currentDataIndex: function (n, i) {
                var r,
                  u = i.attr("data-index");
                return u
                  ? ((r = c(this.columns).length),
                    r && !n.closest("div").hasClass("k-grid-content-locked")[0]
                      ? u - r
                      : u)
                  : t;
              },
              _prevVerticalCell: function (t, i) {
                var f,
                  u = i.parent(),
                  o = t.children(ht),
                  e = o.index(u),
                  r = this._currentDataIndex(t, i);
                if (r || i.hasClass("k-header"))
                  return (f = af(i)), f.eq(f.length - 2);
                if (
                  ((r = Math.max(
                    u.children(p).index(i),
                    this._lastCellIndex || 0
                  )),
                  u.hasClass("k-filter-row"))
                )
                  return d(t).filter(gt).eq(r);
                if (e == -1) {
                  if (((u = t.find("tr.k-filter-row:visible")), !u[0]))
                    return (
                      (this._hasDetails() ||
                        i.parent().find(".k-hierarchy-cell").length) &&
                        r &&
                        r--,
                      d(t).filter(gt).eq(r)
                    );
                } else u = 0 === e ? n() : o.eq(e - 1);
                return (f = u.children(p)), f.eq(f.length > r ? r : 0);
              },
              _nextVerticalCell: function (n, i) {
                var e,
                  o,
                  s,
                  h,
                  f,
                  a,
                  u = i.parent(),
                  c = n.children(ht),
                  l = c.index(u),
                  r = this._currentDataIndex(n, i);
                if (l != -1 && r === t && i.hasClass("k-header"))
                  return hi(i).eq(1);
                if (
                  ((r = r ? parseInt(r, 10) : u.children(p).index(i)),
                  (r = Math.max(r, this._lastCellIndex || 0)),
                  l == -1
                    ? ((u = c.eq(0)),
                      (this._hasDetails() ||
                        u.find(".k-hierarchy-cell").length) &&
                        r++)
                    : (u = c.eq(l + i[0].rowSpan)),
                  (o = r),
                  this._currentDataIndex(n, i) !== t)
                )
                  for (
                    s = u.children(
                      ":not(.k-group-cell):not(.k-hierarchy-cell)"
                    ),
                      h = s.filter(":hidden"),
                      f = 0,
                      a = h.length;
                    f < a;
                    f++
                  )
                    s.index(h[f]) < r && o--;
                return (r = o), (e = u.children(p)), e.eq(e.length > r ? r : 0);
              },
              _verticalContainer: function (n, t) {
                var r = n.parent(),
                  u = this._navigatableTables.length,
                  f = Math.floor(u / 2),
                  i = s(r[0], this._navigatableTables);
                return (
                  t && (f *= -1),
                  (i += f),
                  (i >= 0 || i < u) && (r = this._navigatableTables.eq(i)),
                  r.find(t ? ">thead" : ">tbody")
                );
              },
              _horizontalContainer: function (n, t) {
                var r,
                  i,
                  u = this._navigatableTables.length;
                return u <= 2
                  ? n
                  : ((r = n.parent()),
                    (i = s(r[0], this._navigatableTables)),
                    (i += t ? 1 : -1),
                    !t || (2 != i && i != u)
                      ? !t && (1 == i || i < 0)
                        ? n
                        : this._navigatableTables.eq(i).find("thead, tbody")
                      : n);
              },
              _tabNext: function (n, t, i) {
                var u = !0,
                  r = i ? n.prevAll(p + ":first") : n.nextAll(":visible:first");
                return (
                  r.length ||
                    ((r = n.parent()),
                    this.lockedTable &&
                      ((u =
                        (i && t == this.lockedTable[0]) ||
                        (!i && t == this.table[0])),
                      (r = this._relatedRow(r))),
                    u &&
                      (r = r[i ? "prevAll" : "nextAll"](
                        "tr:not(.k-grouping-row):not(.k-detail-row):visible:first"
                      )),
                    (r = r.children(p + (i ? ":last" : ":first")))),
                  r
                );
              },
              _handleEditing: function (i, r, u) {
                var c,
                  l,
                  f = this,
                  e = n(at()),
                  o = f._editMode(),
                  a = h.msie,
                  v = a && h.version < 9,
                  s = f._editContainer,
                  y = f.options.editable && f.options.editable.update !== !1;
                if (
                  ((u = n(u)),
                  (l =
                    "incell" == o
                      ? i.hasClass("k-edit-cell")
                      : i.parent().hasClass("k-grid-edit-row")),
                  f.editable)
                ) {
                  if (
                    (n.contains(s[0], e[0]) &&
                      (h.opera || v
                        ? e.blur().change().triggerHandler("blur")
                        : (e.blur(), a && e.blur())),
                    !f.editable)
                  )
                    return b(u), t;
                  if (!f.editable.end())
                    return (
                      f._setCurrent(
                        "incell" == o ? s : s.children().filter(p).first()
                      ),
                      (c = s.find(":kendoFocusable:first")[0]),
                      c && c.focus(),
                      t
                    );
                  "incell" == o ? f.closeCell() : (f.saveRow(), (l = !0));
                }
                r && f._setCurrent(r);
                v && document.body.focus();
                b(u, !0);
                y &&
                  ((!l && !r) || r) &&
                  (o === gu
                    ? n(f.current()).hasClass(ws) || f.editCell(f.current())
                    : f.editRow(f.current().parent()));
              },
              _wrapper: function () {
                var n = this,
                  r = n.table,
                  i = n.options.height,
                  t = n.element;
                t.is("div") || (t = t.wrap("<div/>").parent());
                n.wrapper = t.addClass("k-grid k-widget k-display-block");
                i && (n.wrapper.css(lr, i), r.css(lr, "auto"));
                n._initMobile();
              },
              _initMobile: function () {
                var u,
                  t = this.options,
                  n = this;
                this._isMobile =
                  (t.mobile === !0 && i.support.mobileOS) ||
                  "phone" === t.mobile ||
                  "tablet" === t.mobile;
                this._isMobile &&
                  ((u = this.wrapper
                    .addClass("k-grid-mobile")
                    .wrap(
                      "<div data-" +
                        i.ns +
                        'stretch="true" data-' +
                        i.ns +
                        'role="view" data-' +
                        i.ns +
                        'init-widgets="false"></div>'
                    )
                    .parent()),
                  (this.pane = this._createPane(u)),
                  (this.view = this.pane.view()),
                  t.height
                    ? this.pane.element.parent().css(lr, t.height)
                    : this.pane.element
                        .parent()
                        .css(lr, this.wrapper[0].style.height),
                  (this._editAnimation = "slide"),
                  n.wrapper.on("transitionend" + r, function (n) {
                    n.stopPropagation();
                  }),
                  n.wrapper.on("contextmenu" + r, "th a", function (n) {
                    return n.preventDefault(), !1;
                  }),
                  this.view.bind("showStart", function () {
                    n._isLocked() &&
                      (n._updateTablesWidth(),
                      n._applyLockedContainersWidth(),
                      n._syncLockedContentHeight(),
                      n._syncLockedHeaderHeight(),
                      n._syncLockedFooterHeight());
                  }));
              },
              _createPane: function (n) {
                return i.Pane.wrap(n, {
                  viewEngine: {
                    viewOptions: {
                      renderOnInit: !0,
                      wrap: !1,
                      wrapInSections: !0,
                      detachOnHide: !1,
                      detachOnDestroy: !1,
                    },
                  },
                });
              },
              _tbody: function () {
                var t,
                  i = this,
                  r = i.table;
                t = r.find(">tbody");
                t.length || (t = n("<tbody/>").appendTo(r));
                i.tbody = t.attr("role", "rowgroup");
              },
              _scrollable: function () {
                var f,
                  o,
                  s,
                  h,
                  c,
                  l,
                  u,
                  t = this,
                  y = t.options,
                  e = y.scrollable,
                  a = e !== !0 && e.virtual && !t.virtualScrollable,
                  v =
                    !i.support.kineticScrollNeeded || a
                      ? i.support.scrollbar()
                      : 0;
                e &&
                  ((f = t.wrapper.children(".k-grid-header")),
                  f[0] ||
                    (f = n('<div class="k-grid-header" />').insertBefore(
                      t.table
                    )),
                  f.css(
                    tt ? "padding-left" : "padding-right",
                    e.virtual ? v + 1 : v
                  ),
                  (o = n('<table role="grid" />')),
                  ki && o.attr("cellspacing", 0),
                  o.width(t.table[0].style.width),
                  o.append(t.thead),
                  f
                    .empty()
                    .append(
                      n(
                        '<div class="k-grid-header-wrap k-auto-scrollable" />'
                      ).append(o)
                    ),
                  (t.content = t.table.parent()),
                  t.content.is(
                    ".k-virtual-scrollable-wrap, " + et + wo.scrollContainer
                  ) && (t.content = t.content.parent()),
                  t.content.is(".k-grid-content, .k-virtual-scrollable-wrap") ||
                    (t.content = t.table
                      .wrap('<div class="k-grid-content k-auto-scrollable" />')
                      .parent()),
                  a && t._createVirtualScrollable(),
                  (s = f.children(".k-grid-header-wrap")),
                  (t.scrollables = s.add(t.content)),
                  (h = t.wrapper.find(".k-grid-footer")),
                  h.length &&
                    (t.scrollables = t.scrollables.add(
                      h.children(".k-grid-footer-wrap")
                    )),
                  s.unbind("scroll" + r).bind("scroll" + r, function (n) {
                    t._scrollLeft !== this.scrollLeft &&
                      t.scrollables
                        .not(n.currentTarget)
                        .scrollLeft(this.scrollLeft);
                  }),
                  e.virtual
                    ? t.content
                        .find(">.k-virtual-scrollable-wrap")
                        .unbind("scroll" + r)
                        .bind("scroll" + r, function () {
                          t.scrollables.scrollLeft(this.scrollLeft);
                          t.lockedContent &&
                            (t.lockedContent[0].scrollTop = this.scrollTop);
                        })
                    : ((c = e.endless),
                      (l = t.dataSource.options.pageSize),
                      c && (t._endlessPageSize = l),
                      t.content
                        .unbind("scroll" + r)
                        .bind("scroll" + r, function (n) {
                          t._scrollLeft = this.scrollLeft;
                          t.scrollables
                            .not(n.currentTarget)
                            .scrollLeft(t._scrollLeft);
                          t.lockedContent &&
                            n.currentTarget == t.content[0] &&
                            (t.lockedContent[0].scrollTop = this.scrollTop);
                          c &&
                            this.scrollTop +
                              this.clientHeight -
                              this.scrollHeight >=
                              -10 &&
                            !t._endlessFetchInProgress &&
                            t._endlessPageSize < t.dataSource.total() &&
                            ((t._skipRerenderItemsCount = t._endlessPageSize),
                            (t._endlessPageSize = t._endlessPageSize + l),
                            (t.dataSource.options.endless = !0),
                            (t._endlessFetchInProgress = !0),
                            t.dataSource.pageSize(t._endlessPageSize));
                        }),
                      (u = t.content.data("kendoTouchScroller")),
                      u && u.destroy(),
                      (u = i.touchScroller(t.content)),
                      u &&
                        u.movable &&
                        ((t.touchScroller = u),
                        u.movable.bind("change", function (n) {
                          t.scrollables.scrollLeft(-n.sender.x);
                          t.lockedContent &&
                            t.lockedContent.scrollTop(-n.sender.y);
                        }),
                        t.one(lu, function (n) {
                          n.sender.wrapper.addClass("k-grid-backface");
                        }))));
              },
              _createVirtualScrollable: function () {
                var n = this;
                n.virtualScrollable && n.virtualScrollable.destroy();
                n.virtualScrollable = new bo(n.content, {
                  dataSource: n.dataSource,
                  itemHeight: function () {
                    return n._averageRowHeight();
                  },
                  page: function () {
                    n._restoreEditableState();
                  },
                  scroll: function () {
                    n._focusEditable();
                  },
                });
                n.virtualScrollable.bind(yu, e(n._onVirtualPaging, n));
              },
              _onVirtualPaging: function () {
                var n = this;
                n._cacheEditableState();
                n._isVirtualIncellEditable() &&
                  ((n._shouldClearEditableState = !1),
                  n.closeCell(),
                  (n._shouldClearEditableState = !0));
              },
              _isVirtualEditable: function () {
                return (
                  this._isVirtualIncellEditable() ||
                  this._isVirtualInlineEditable() ||
                  this._isVirtualPopupEditable()
                );
              },
              _isVirtualInlineEditable: function () {
                return this.virtualScrollable && this._editMode() === th;
              },
              _isVirtualIncellEditable: function () {
                return this.virtualScrollable && this._editMode() === gu;
              },
              _isVirtualPopupEditable: function () {
                return this.virtualScrollable && "popup" === this._editMode();
              },
              _scrollVirtualWrapper: function () {
                var t = this,
                  n = t.virtualScrollable;
                (t._isVirtualInlineEditable() ||
                  t._isVirtualIncellEditable()) &&
                  (n._isScrolledToBottom()
                    ? n._scrollWrapperToBottom()
                    : n._isScrolledToTop() && n._scrollWrapperToTop());
              },
              _scrollVirtualWrapperOnColumnResize: function () {
                var n = this.virtualScrollable;
                n && n._scrollWrapperOnColumnResize();
              },
              _restoreEditableState: function () {
                var u,
                  r,
                  t = this,
                  f = t._editableState || {},
                  i = f.model,
                  e = t.dataSource,
                  o = t._isVirtualInlineEditable(),
                  s = t._isVirtualIncellEditable();
                (o || s) &&
                  i &&
                  e._getByUid(i.uid, e.view()) &&
                  (o
                    ? ((t._shouldClearEditableState = !1),
                      t.editRow(i),
                      t._focusEditable())
                    : s &&
                      ((u = t.tbody.children(yr(ih, i.uid))),
                      (r = n(u).children(yr(du, f.field))),
                      r[0] &&
                        ((t._shouldClearEditableState = !1),
                        t.editCell(r),
                        t._focusEditable())));
                t._shouldClearEditableState = !0;
              },
              _focusEditable: function () {
                var n = this,
                  i = (n._editableState || {}).field,
                  t = n._editContainer;
                t &&
                  !ru(t[0], at()) &&
                  n._canFocusEditable() &&
                  (n._isVirtualInlineEditable()
                    ? t.find(yr(ku, i)).find(ke).eq(0).focus()
                    : n._isVirtualIncellEditable() && t.find(ke).eq(0).focus());
              },
              _canFocusEditable: function () {
                var n = this;
                return (
                  (n._isVirtualIncellEditable() ||
                    n._isVirtualInlineEditable()) &&
                  n.virtualScrollable._isElementVisible(n._editContainer)
                );
              },
              _cacheEditableState: function () {
                var t,
                  u,
                  r = this,
                  f = r._editContainer,
                  e = f ? r._modelForContainer(f) : null,
                  o = r._isVirtualInlineEditable(),
                  s = r._isVirtualIncellEditable();
                (o || s) &&
                  e &&
                  (r._clearEditableState(),
                  (t = n(at())),
                  f &&
                    t[0] &&
                    ru(f[0], t[0]) &&
                    (t.change(),
                    (u = i.widgetInstance(t, i.ui)),
                    u &&
                      fi(u.value) &&
                      t.is(co) &&
                      (u.value(t.val()), u.trigger(k))),
                  o
                    ? (r._editableState = {
                        model: e,
                        field: t
                          .closest("[" + i.attr(ku) + "]")
                          .attr(i.attr(ku)),
                      })
                    : s &&
                      (r._editableState = {
                        model: e,
                        field: f.attr(i.attr(du)),
                      }));
              },
              _clearEditableState: function () {
                var n = this;
                n.virtualScrollable && (n._editableState = null);
              },
              _destroyVirtualScrollable: function () {
                var n = this;
                n._clearEditableState();
                n.virtualScrollable &&
                  n.virtualScrollable.element &&
                  n.virtualScrollable.destroy();
                n.virtualScrollable = null;
              },
              _renderNoRecordsContent: function () {
                var i,
                  t = this;
                t.options.noRecords &&
                  ((i = t.table.parent().children("." + de)),
                  i.length &&
                    (t.angular("cleanup", function () {
                      return { elements: i.get() };
                    }),
                    i.remove()),
                  (t.dataSource && t.dataSource.view().length) ||
                    ((i = n(t.noRecordsTemplate({})).insertAfter(t.table)),
                    t.angular("compile", function () {
                      return { elements: i.get(), data: [{}] };
                    })));
              },
              _setContentWidth: function (t) {
                var r,
                  i = this,
                  f = "k-grid-content-expander",
                  o = '<div class="' + f + '"></div>',
                  u = i.resizable;
                i.options.scrollable &&
                  i.wrapper.is(":visible") &&
                  ((r = i.table.parent().children("." + f)),
                  (i._setContentWidthHandler = e(i._setContentWidth, i)),
                  i.dataSource && i.dataSource.view().length
                    ? r[0] &&
                      (r.remove(),
                      u && u.unbind("resize", i._setContentWidthHandler))
                    : (r[0] ||
                        ((r = n(o).appendTo(i.table.parent())),
                        u && u.bind("resize", i._setContentWidthHandler)),
                      i.thead &&
                        (r.width(i.thead.width()),
                        isNaN(parseFloat(t, 10)) || i.content.scrollLeft(t))),
                  i._applyLockedContainersWidth(),
                  i._syncLockedContentHeight(),
                  i.lockedHeader &&
                    0 === i.table[0].clientWidth &&
                    (i.table[0].style.width = "1px"));
              },
              _applyLockedContainersWidth: function () {
                if (this.options.scrollable && this.lockedHeader) {
                  var r,
                    u = this.thead.parent(),
                    f = u.parent(),
                    t = this.wrapper[0].clientWidth,
                    e = this._groups(),
                    o = i.support.scrollbar(),
                    h = this.lockedHeader.find(
                      ">table>colgroup>col:not(.k-group-col, .k-hierarchy-col)"
                    ),
                    c = u.find(
                      ">colgroup>col:not(.k-group-col, .k-hierarchy-col)"
                    ),
                    n = lf(h),
                    s = lf(c);
                  e > 0 &&
                    (n +=
                      st(this.lockedHeader.find(".k-group-cell:first")) * e);
                  n >= t && (n = t - 3 * o);
                  this.lockedHeader.add(this.lockedContent).width(n);
                  f[0].style.width = f.parent().width() - n - 2 + "px";
                  u.add(this.table).width(s);
                  this.virtualScrollable && !yo && (t -= o);
                  this.content[0].style.width = t - n - 2 + "px";
                  this.lockedFooter &&
                    this.lockedFooter.length &&
                    (this.lockedFooter.width(n),
                    (r = this.footer.find(".k-grid-footer-wrap")),
                    (r[0].style.width = f[0].clientWidth + "px"),
                    r.children().first().width(s));
                }
              },
              _setContentHeight: function () {
                var t,
                  f,
                  n = this,
                  u = n.options,
                  o = n.wrapper.children(".k-grid-header"),
                  r = i.support.scrollbar(),
                  e = (u.scrollable || {}).height;
                u.scrollable &&
                  n.wrapper.is(":visible") &&
                  (e &&
                    "" === n.content[0].style.height &&
                    (n.content[0].style.height = e),
                  (t = n.wrapper.innerHeight()),
                  (t -= vt(o)),
                  n.pager &&
                    n.pager.element.is(":visible") &&
                    (t -= vt(n.pager.element)),
                  u.groupable &&
                    (t -= vt(n.wrapper.children(".k-grouping-header"))),
                  u.toolbar && (t -= vt(n.wrapper.children(".k-grid-toolbar"))),
                  n.footerTemplate &&
                    (t -= vt(n.wrapper.children(".k-grid-footer"))),
                  (f = function (n) {
                    var t, i;
                    return (
                      !!n[0].style.height ||
                      ((t = n.height()),
                      n.height("auto"),
                      (i = n.height()),
                      t != i ? (n.height(""), !0) : (n.height(""), !1))
                    );
                  }),
                  f(n.wrapper) &&
                    (t > 2 * r
                      ? (n.lockedContent &&
                          ((r =
                            n.table[0].offsetWidth >
                            n.table.parent()[0].clientWidth
                              ? r
                              : 0),
                          n.lockedContent.height(t - r)),
                        n.content.height(t))
                      : n.content.height(2 * r + 1)));
              },
              _averageRowHeight: function () {
                var i,
                  n = this,
                  r = n._items(n.tbody).length,
                  t = n._rowHeight;
                return 0 === r
                  ? t
                  : (n._rowHeight ||
                      ((n._rowHeight = t = vt(n.table) / r),
                      (n._sum = t),
                      (n._measures = 1)),
                    (i = vt(n.table) / r),
                    t !== i &&
                      (n._measures++,
                      (n._sum += i),
                      (n._rowHeight = n._sum / n._measures)),
                    t);
              },
              _dataSource: function () {
                var r,
                  n = this,
                  u = n.options,
                  i = u.dataSource;
                i = ui(i) ? { data: i } : i;
                a(i) &&
                  (f(i, { table: n.table, fields: n.columns }),
                  (r = u.pageable),
                  a(r) && r.pageSize !== t && (i.pageSize = r.pageSize));
                n.dataSource && n._refreshHandler
                  ? n.dataSource
                      .unbind(k, n._refreshHandler)
                      .unbind(uu, n._progressHandler)
                      .unbind(fu, n._errorHandler)
                  : ((n._refreshHandler = e(n.refresh, n)),
                    (n._progressHandler = e(n._requestStart, n)),
                    (n._errorHandler = e(n._error, n)));
                n.dataSource = ue
                  .create(i)
                  .bind(k, n._refreshHandler)
                  .bind(uu, n._progressHandler)
                  .bind(fu, n._errorHandler);
              },
              _error: function () {
                this._progress(!1);
              },
              _requestStart: function () {
                this._progress(!0);
              },
              _modelChange: function (t) {
                var o,
                  s,
                  a,
                  f,
                  v,
                  l,
                  w,
                  b,
                  k,
                  y,
                  r = this,
                  d = r.tbody,
                  h = t.model,
                  e = r.tbody.find("tr[" + i.attr("uid") + "=" + h.uid + "]"),
                  g = e.hasClass("k-alt"),
                  c = r._items(d).index(e),
                  p = r.lockedContent;
                if (
                  (p && (o = r._relatedRow(e)),
                  e.add(o).children(".k-edit-cell").length &&
                    !r.options.rowTemplate)
                )
                  e.add(o)
                    .children(":not(.k-group-cell,.k-hierarchy-cell)")
                    .each(function () {
                      s = n(this);
                      a = u(r.columns)[r.cellIndex(s)];
                      a.field === t.field &&
                        (s.hasClass("k-edit-cell")
                          ? s.addClass("k-dirty-cell")
                          : r._displayCell(s, a, h));
                    });
                else if (!e.hasClass("k-grid-edit-row")) {
                  for (
                    l = n().add(e),
                      p &&
                        ((f = (
                          g ? r.lockedAltRowTemplate : r.lockedRowTemplate
                        )(h)),
                        (l = l.add(o)),
                        o.replaceWith(f)),
                      r.angular("cleanup", function () {
                        return { elements: l.get() };
                      }),
                      f = (g ? r.altRowTemplate : r.rowTemplate)(h),
                      e.replaceWith(f),
                      f = r._items(d).eq(c),
                      y = [{ dataItem: h }],
                      p &&
                        ((e = e.add(o)),
                        (o = r._relatedRow(f)[0]),
                        ci(f[0], o),
                        (f = f.add(o)),
                        y.push({ dataItem: h })),
                      r.angular("compile", function () {
                        return { elements: f.get(), data: y };
                      }),
                      v = r.options.selectable,
                      (v || r._checkBoxSelection) &&
                        e.hasClass("k-state-selected") &&
                        r.select(f),
                      b = l.children(":not(.k-group-cell,.k-hierarchy-cell)"),
                      w = f.children(":not(.k-group-cell,.k-hierarchy-cell)"),
                      c = 0,
                      k = r.columns.length;
                    c < k;
                    c++
                  )
                    (a = r.columns[c]),
                      (s = w.eq(c)),
                      v &&
                        b.eq(c).hasClass("k-state-selected") &&
                        s.addClass("k-state-selected");
                  r.trigger("itemChange", { item: f, data: h, ns: lt });
                }
              },
              _pageable: function () {
                var u,
                  t = this,
                  r = t.options.pageable;
                r &&
                  ((u = t.wrapper.children("div.k-grid-pager")),
                  u.length ||
                    (u = n('<div class="k-pager-wrap k-grid-pager"/>').appendTo(
                      t.wrapper
                    )),
                  t.pager && t.pager.destroy(),
                  (t.pager =
                    "object" == typeof r && r instanceof i.ui.Pager
                      ? r
                      : new i.ui.Pager(
                          u,
                          f({}, r, { dataSource: t.dataSource })
                        )),
                  t.pager.bind("pageChange", function (n) {
                    t.trigger("page", { page: n.index }) && n.preventDefault();
                  }),
                  t._togglePagerVisibility());
              },
              _footer: function () {
                var f,
                  e,
                  o,
                  t = this,
                  s = t.dataSource.aggregates(),
                  r = "",
                  h = t.footerTemplate,
                  u = t.options,
                  i = t.footer || t.wrapper.find(".k-grid-footer");
                h
                  ? ((r = n(t._wrapFooter(h(s)))),
                    i.length
                      ? ((e = r),
                        t.angular("cleanup", function () {
                          return { elements: i.get() };
                        }),
                        i.replaceWith(e),
                        (i = t.footer = e))
                      : (i = t.footer =
                          u.scrollable
                            ? u.pageable
                              ? r.insertBefore(
                                  t.wrapper.children("div.k-grid-pager")
                                )
                              : r.appendTo(t.wrapper)
                            : r.insertBefore(t.tbody)),
                    t.angular("compile", function () {
                      return {
                        elements: i
                          .find("td:not(.k-group-cell, .k-hierarchy-cell)")
                          .get(),
                        data: ai(t.columns, function (n) {
                          return { column: n, aggregate: s[n.field] };
                        }),
                      };
                    }))
                  : i && !t.footer && (t.footer = i);
                i.length &&
                  (u.scrollable &&
                    ((f = i
                      .attr("tabindex", -1)
                      .children(".k-grid-footer-wrap")),
                    (t.scrollables = n(
                      t.scrollables
                        .filter(function () {
                          return !n(this).is(".k-grid-footer-wrap");
                        })
                        .toArray()
                    ).add(f))),
                  t._footerWidth &&
                    i.find("table").css("width", t._footerWidth),
                  f &&
                    ((o = t.content.scrollLeft()),
                    u.scrollable !== !0 &&
                      u.scrollable.virtual &&
                      (o = t.wrapper
                        .find(".k-virtual-scrollable-wrap")
                        .scrollLeft()),
                    f.scrollLeft(o)));
                t.lockedContent &&
                  (t._appendLockedColumnFooter(),
                  t._applyLockedContainersWidth(),
                  t._syncLockedFooterHeight());
              },
              _wrapFooter: function (t) {
                var u = this,
                  r = "",
                  f = i.support.mobileOS ? 0 : i.support.scrollbar();
                return u.options.scrollable
                  ? ((r = n(
                      '<div class="k-grid-footer"><div class="k-grid-footer-wrap"><table' +
                        (ki ? ' cellspacing="0"' : "") +
                        "><tbody>" +
                        t +
                        "</tbody></table></div></div>"
                    )),
                    u._appendCols(r.find("table")),
                    r.css(tt ? "padding-left" : "padding-right", f),
                    r)
                  : '<tfoot class="k-grid-footer">' + t + "</tfoot>";
              },
              _columnMenu: function () {
                var a,
                  r,
                  y,
                  k,
                  o,
                  p,
                  h,
                  g,
                  l,
                  n = this,
                  w = u(n.columns),
                  s = n.options,
                  e = s.columnMenu,
                  tt =
                    v(n.columns, function (n) {
                      return n.columns !== t;
                    }).length > 0,
                  it = this._isMobile,
                  rt = function (t) {
                    n.trigger(le, { field: t.field, container: t.container });
                  },
                  ut = function (t) {
                    n.trigger(ve, { field: t.field, container: t.container });
                  },
                  ft = function (n) {
                    b(n.closest("table"), !0);
                  },
                  et = function (t) {
                    n.trigger("sort", { sort: t.sort })
                      ? t.preventDefault()
                      : (n._clearEditableState(),
                        n.dataSource.options.endless &&
                          ((n.dataSource.options.endless = null),
                          (n._endlessPageSize = n.dataSource.options.pageSize),
                          n.dataSource.pageSize(
                            n.dataSource.options.pageSize
                          )));
                  },
                  ot = function (t) {
                    n.trigger("filter", { filter: t.filter, field: t.field })
                      ? t.preventDefault()
                      : (n._clearEditableState(),
                        n.dataSource.options.endless &&
                          ((n.dataSource.options.endless = null),
                          (n._endlessPageSize = n.dataSource.options.pageSize),
                          n.dataSource.pageSize(
                            n.dataSource.options.pageSize
                          )));
                  },
                  nt = s.$angular;
                if (e)
                  for (
                    "boolean" == typeof e && (e = {}),
                      n._setColumnsMediaVisibility(w),
                      p = d(n.thead),
                      h = 0,
                      g = p.length;
                    h < g;
                    h++
                  )
                    (r = w[h]),
                      (l = p.eq(h)),
                      r.command ||
                        (!r.field && !l.attr("data-" + i.ns + "field")) ||
                        ((a = l.data("kendoColumnMenu")),
                        a && a.destroy(),
                        (k =
                          r.sortable !== !1 &&
                          e.sortable !== !1 &&
                          s.sortable !== !1 &&
                          f({}, s.sortable, {
                            compare: (r.sortable || {}).compare,
                          })),
                        (o =
                          !(
                            !s.filterable ||
                            r.filterable === !1 ||
                            e.filterable === !1
                          ) && f({ pane: n.pane }, s.filterable, r.filterable)),
                        r.filterable &&
                          r.filterable.dataSource &&
                          ((o.forceUnique = !1),
                          (o.checkSource = r.filterable.dataSource)),
                        o && (o.format = r.format),
                        (y = {
                          dataSource: n.dataSource,
                          values: r.values,
                          columns: e.columns,
                          sortable: k,
                          filterable: o,
                          messages: e.messages,
                          owner: n,
                          closeCallback: ft,
                          init: rt,
                          open: ut,
                          pane: n.pane,
                          sort: et,
                          filtering: ot,
                          filter: it ? ":not(.k-column-active)" : "",
                          lockedColumns:
                            !tt && r.lockable !== !1 && c(w).length > 0,
                        }),
                        nt && (y.$angular = nt),
                        l.kendoColumnMenu(y));
              },
              _headerCells: function () {
                return n(this.thead)
                  .find("th")
                  .filter(function () {
                    var t = n(this);
                    return (
                      !t.hasClass("k-group-cell") &&
                      !t.hasClass("k-hierarchy-cell")
                    );
                  });
              },
              _filterable: function () {
                var s,
                  l,
                  h,
                  t,
                  a,
                  r,
                  c,
                  n = this,
                  e = u(n.columns),
                  v = function (t) {
                    n.trigger(ce, { field: t.field, container: t.container });
                  },
                  y = function (n) {
                    b(n.closest("table"), !0);
                  },
                  p = function (t) {
                    n.trigger("filter", { filter: t.filter, field: t.field })
                      ? t.preventDefault()
                      : (n._clearEditableState(),
                        n.dataSource.options.endless &&
                          ((n.dataSource.options.endless = null),
                          (n._endlessPageSize = n.dataSource.options.pageSize),
                          n.dataSource.pageSize(
                            n.dataSource.options.pageSize
                          )));
                  },
                  k = function (t) {
                    n.trigger(ae, { field: t.field, container: t.container });
                  },
                  o = n.options.filterable;
                if (
                  (o &&
                    typeof o.mode == w &&
                    o.mode.indexOf("menu") == -1 &&
                    (o = !1),
                  o && !n.options.columnMenu)
                )
                  for (l = d(n.thead), t = 0, a = l.length; t < a; t++)
                    (h = l.eq(t)),
                      e[t].filterable !== !1 &&
                        !e[t].command &&
                        (e[t].field || h.attr("data-" + i.ns + "field")) &&
                        ((s = h.data("kendoFilterMenu")),
                        s && s.destroy(),
                        (s = h.data("kendoFilterMultiCheck")),
                        s && s.destroy(),
                        (r = e[t].filterable),
                        (c = f({}, o, r, {
                          dataSource: n.dataSource,
                          values: e[t].values,
                          format: e[t].format,
                          closeCallback: y,
                          title: e[t].title || e[t].field,
                          init: v,
                          open: k,
                          pane: n.pane,
                          change: p,
                        })),
                        r &&
                          r.messages &&
                          (c.messages = f(!0, {}, o.messages, r.messages)),
                        r &&
                          r.dataSource &&
                          ((c.forceUnique = !1),
                          (c.checkSource = r.dataSource)),
                        r && r.multi
                          ? h.kendoFilterMultiCheck(c)
                          : h.kendoFilterMenu(c));
              },
              _filterRow: function () {
                var l,
                  a,
                  v,
                  b,
                  k,
                  d,
                  h,
                  s,
                  r,
                  y,
                  p,
                  o,
                  c,
                  e,
                  w,
                  t = this;
                if (t._hasFilterRow())
                  for (
                    a = t.options.$angular,
                      v = u(t.columns),
                      b = t.options.filterable,
                      k = t.thead.find(".k-filter-row"),
                      d = function (n) {
                        t.trigger("filter", {
                          filter: n.filter,
                          field: n.field,
                        })
                          ? n.preventDefault()
                          : (t._clearEditableState(),
                            t.dataSource.options.endless &&
                              ((t.dataSource.options.endless = null),
                              (t._endlessPageSize =
                                t.dataSource.options.pageSize),
                              t.dataSource.pageSize(
                                t.dataSource.options.pageSize
                              )));
                      },
                      this._updateHeader(this.dataSource.group().length),
                      h = 0;
                    h < v.length;
                    h++
                  )
                    if (
                      ((r = v[h]),
                      (y = t.options.filterable.operators),
                      (p = !1),
                      (o = n("<th/>")),
                      (c = r.field),
                      r.hidden && o.hide(),
                      k.append(o),
                      c && r.filterable !== !1)
                    ) {
                      if (
                        ((e = (r.filterable && r.filterable.cell) || {}),
                        (s = t.options.dataSource),
                        s instanceof ue && (s = t.options.dataSource.options),
                        (w = f(!0, {}, b.messages)),
                        r.filterable && f(!0, w, r.filterable.messages),
                        e.enabled === !1)
                      ) {
                        o.html("&nbsp;");
                        continue;
                      }
                      e.dataSource && ((s = e.dataSource), (p = !0));
                      r.filterable &&
                        r.filterable.operators &&
                        (y = r.filterable.operators);
                      l = {
                        column: r,
                        dataSource: t.dataSource,
                        suggestDataSource: s,
                        customDataSource: p,
                        field: c,
                        messages: w,
                        values: r.values,
                        template: e.template,
                        delay: e.delay,
                        inputWidth: e.inputWidth,
                        suggestionOperator: e.suggestionOperator,
                        minLength: e.minLength,
                        dataTextField: e.dataTextField,
                        operator: e.operator,
                        operators: y,
                        showOperators: e.showOperators,
                        change: d,
                      };
                      a && (l.$angular = a);
                      n("<span/>")
                        .attr(i.attr("field"), c)
                        .appendTo(o)
                        .kendoFilterCell(l);
                    } else o.html("&nbsp;");
              },
              _sortable: function () {
                var n,
                  o,
                  s,
                  e,
                  r,
                  h,
                  t = this,
                  l = u(t.columns),
                  c = t.options.sortable,
                  a = function (n) {
                    t.trigger("sort", { sort: n.sort })
                      ? n.preventDefault()
                      : t._clearEditableState();
                  };
                if (c) {
                  for (e = d(t.thead), r = 0, h = e.length; r < h; r++)
                    (n = l[r]),
                      n.sortable !== !1 &&
                        !n.command &&
                        n.field &&
                        ((s = e.eq(r)),
                        (o = s.data("kendoColumnSorter")),
                        o && o.destroy(),
                        s
                          .attr("data-" + i.ns + "field", n.field)
                          .kendoColumnSorter(
                            f({}, c, n.sortable, {
                              dataSource: t.dataSource,
                              aria: !0,
                              filter: ":not(.k-column-active)",
                              change: a,
                            })
                          ));
                  e = null;
                }
              },
              _columns: function (t) {
                var s,
                  o,
                  h,
                  f = this,
                  l = f.table,
                  p = l.find("col"),
                  a = f.element.find("thead tr"),
                  v = f.options.dataSource;
                if (
                  ((t = t.length
                    ? t
                    : ai(l.find("th"), function (t, r) {
                        t = n(t);
                        var f = t.attr(i.attr("sortable")),
                          e = t.attr(i.attr("filterable")),
                          o = t.attr(i.attr("type")),
                          s = t.attr(i.attr("groupable")),
                          u = t.attr(i.attr("field")),
                          h = t.attr(i.attr("title")),
                          c = t.attr(i.attr("menu"));
                        return (
                          u || (u = t.text().replace(/\s|[^A-z0-9]/g, "")),
                          {
                            field: u,
                            type: o,
                            title: h,
                            sortable: "false" !== f,
                            filterable: "false" !== e,
                            groupable: "false" !== s,
                            menu: c,
                            template: t.attr(i.attr("template")),
                            width: p.eq(r).css("width"),
                          }
                        );
                      })),
                  (s = !(
                    f.table.find("tbody tr").length > 0 &&
                    (!v || !v.transport)
                  )),
                  f.options.scrollable)
                ) {
                  if (
                    ((h = t),
                    (o = c(t)),
                    (t = ut(t)),
                    o.length > 0 && 0 === t.length)
                  )
                    throw Error(
                      "There should be at least one non locked column"
                    );
                  hs(f.element.find("tr:has(th):first"), h);
                  t = o.concat(t);
                }
                a.length && t.length && f._updateColumnIDs(t, a.first());
                f.columns = rf(t, s);
                n.grep(u(f.columns), function (n) {
                  return n.selectable;
                }).length &&
                  ((f._selectedIds = {}),
                  (f._checkBoxSelection = !0),
                  f.wrapper.on(
                    y + r,
                    "tbody > tr " + yt,
                    e(f._checkboxClick, f)
                  ),
                  f.wrapper.on(
                    y + r,
                    "thead > tr " + yt,
                    e(f._headerCheckboxClick, f)
                  ));
              },
              _updateColumnIDs: function (n, t) {
                var u, r, i;
                if (n.length) {
                  for (u = t.find("th"), i = 0; i < n.length; i++)
                    (r = u.eq(i).attr("id")),
                      r &&
                        (n[i].headerAttributes = f(n[i].headerAttributes, {
                          id: r,
                        }));
                  this._updateColumnIDs(nu(n), t.next());
                }
              },
              _headerCheckboxClick: function (t) {
                var i = this,
                  r = n(t.target),
                  f = r.prop("checked"),
                  u = r.closest(".k-grid.k-widget").getKendoGrid();
                i === u && (f ? i.select(u.items()) : i.clearSelection());
              },
              _checkboxClick: function (t) {
                var r = this,
                  i = n(t.target).closest("tr"),
                  u = !i.hasClass(yi);
                r === i.closest(".k-grid.k-widget").getKendoGrid() &&
                  (u ? r.select(i) : r._deselectCheckRows(i));
              },
              _groups: function () {
                var n = this.dataSource.group();
                return n ? n.length : 0;
              },
              _tmpl: function (n, r, u, o) {
                var c,
                  w,
                  s,
                  g,
                  l,
                  h = this,
                  v = f({}, i.Template, h.options.templateSettings),
                  nt = v.paramName,
                  b = r.length,
                  y = { storage: {}, count: 0 },
                  k = h._hasDetails(),
                  a = [],
                  d = h._groups(),
                  tt = h.options.navigatable,
                  it = i.attr("field"),
                  p = "";
                if (!n) {
                  for (
                    n = "<tr",
                      u && a.push("k-alt"),
                      k && a.push("k-master-row"),
                      a.length && (n += ' class="' + a.join(" ") + '"'),
                      b &&
                        (n +=
                          " " +
                          i.attr("uid") +
                          '="#=' +
                          i.expr("uid", v.paramName) +
                          '#"'),
                      n += " role='row'>",
                      d > 0 && !o && (n += di(d)),
                      k &&
                        (n +=
                          '<td class="k-hierarchy-cell" aria-expanded="false"><a class="k-icon k-i-expand" href="\\#" ' +
                          ei +
                          '="' +
                          nf +
                          '" tabindex="-1"></a></td>'),
                      c = 0;
                    c < b;
                    c++
                  )
                    (s = r[c]),
                      (w = s.template),
                      (g = typeof w),
                      (l = s.field),
                      h._editMode() === gu &&
                        l &&
                        ((s.attributes = s.attributes || {}),
                        h.virtualScrollable && (s.attributes[it] = l),
                        (p = h._dirtyCellTemplate(l, nt)),
                        (s.attributes["class"] = s.attributes["class"] || ""),
                        s.attributes["class"].indexOf(p) < 0 &&
                          (s.attributes["class"] += p)),
                      s.command &&
                        ((s.attributes = s.attributes || {}),
                        t !== s.attributes["class"]
                          ? (s.attributes["class"] += " k-command-cell")
                          : (s.attributes["class"] = "k-command-cell")),
                      (n += "<td" + dt(s.attributes)),
                      tt &&
                        (n +=
                          " aria-describedby='" + s.headerAttributes.id + "'"),
                      (n += " role='gridcell'>"),
                      (n += h._cellTmpl(s, y)),
                      (n += "</td>");
                  n += "</tr>";
                }
                return (
                  (n = i.template(n, v)), y.count > 0 ? e(n, y.storage) : n
                );
              },
              _dirtyCellTemplate: function (n, t) {
                var r;
                return n && t
                  ? ((r =
                      "[" === n.charAt(0)
                        ? i.expr(n, t + ".dirtyFields")
                        : t + ".dirtyFields['" + n + "']"),
                    "#= " +
                      t +
                      " && " +
                      t +
                      ".dirty && " +
                      t +
                      ".dirtyFields && " +
                      r +
                      " ? ' k-dirty-cell' : '' #")
                  : "";
              },
              _headerCellText: function (n) {
                var e = this,
                  o = f({}, i.Template, e.options.templateSettings),
                  t = n.headerTemplate,
                  u = typeof t,
                  r = n.title || n.field || "";
                return (
                  u === pt ? (r = i.template(t, o)({})) : u === w && (r = t), r
                );
              },
              _cellTmpl: function (n, t) {
                var e,
                  v,
                  o = this,
                  y = f({}, i.Template, o.options.templateSettings),
                  c = n.template,
                  h = y.paramName,
                  u = n.field,
                  r = "",
                  l = n.format,
                  p = typeof c,
                  s = n.values;
                if (n.command) {
                  if (ui(n.command)) {
                    for (e = 0, v = n.command.length; e < v; e++)
                      r += n.command[e].visible
                        ? i.format(
                            "#= {0}(data)? '{1}':'' #",
                            n.command[e].visible,
                            o
                              ._createButton(n.command[e])
                              .replace(bi, "\\#")
                              .replace(/'/gi, "\\'")
                          )
                        : o._createButton(n.command[e]).replace(bi, "\\#");
                    return r;
                  }
                  return o._createButton(n.command).replace(bi, "\\#");
                }
                return n.selectable
                  ? sh
                  : ((r += o._dirtyIndicatorTemplate(u, h)),
                    p === pt
                      ? ((t.storage["tmpl" + t.count] = c),
                        (r += "#=this.tmpl" + t.count + "(" + h + ")#"),
                        t.count++)
                      : p === w
                      ? (r += c)
                      : s && s.length && a(s[0]) && "value" in s[0] && u
                      ? ((r +=
                          "#var v =" +
                          i.stringify(yf(s)).replace(bi, "\\#") +
                          "#"),
                        (r += "#var f = v["),
                        y.useWithBlock || (r += h + "."),
                        (r += u + "]#"),
                        (r += "${f != null ? f : ''}"))
                      : ((r += n.encoded ? "#:" : "#="),
                        l &&
                          (r +=
                            'kendo.format("' + l.replace(fh, "\\$1") + '",'),
                        u
                          ? ((u = i.expr(u, h)), (r += u + "==null?'':" + u))
                          : (r += "''"),
                        l && (r += ")"),
                        (r += "#")),
                    r);
              },
              _dirtyIndicatorTemplate: function (n, t) {
                var r;
                return n && t
                  ? ((r =
                      "[" === n.charAt(0)
                        ? i.expr(n, t + ".dirtyFields")
                        : t + ".dirtyFields['" + n + "']"),
                    "#= " +
                      t +
                      " && " +
                      t +
                      ".dirty && " +
                      t +
                      ".dirtyFields && " +
                      r +
                      " ? '<span class=\"k-dirty\"></span>' : '' #")
                  : "";
              },
              _templates: function () {
                var t = this,
                  i = t.options,
                  l = t.dataSource,
                  s = l.group(),
                  p = t.footer || t.wrapper.find(".k-grid-footer"),
                  f = l.aggregate(),
                  h = u(t.columns),
                  r = u(c(t.columns)),
                  e = i.scrollable ? u(ut(t.columns)) : h,
                  a = v(o(r), function (n, t) {
                    return n.groupHeaderColumnTemplate && 0 !== t;
                  }),
                  y = v(o(e), function (n) {
                    return n.groupHeaderColumnTemplate;
                  });
                if (i.scrollable && r.length) {
                  if (i.rowTemplate || i.altRowTemplate)
                    throw Error(
                      "Having both row template and locked columns is not supported"
                    );
                  t.rowTemplate = t._tmpl(i.rowTemplate, e, !1, !0);
                  t.altRowTemplate = t._tmpl(
                    i.altRowTemplate || i.rowTemplate,
                    e,
                    !0,
                    !0
                  );
                  t.lockedRowTemplate = t._tmpl(i.rowTemplate, r);
                  t.lockedAltRowTemplate = t._tmpl(
                    i.altRowTemplate || i.rowTemplate,
                    r,
                    !0
                  );
                } else
                  (t.rowTemplate = t._tmpl(i.rowTemplate, e)),
                    (t.altRowTemplate = t._tmpl(
                      i.altRowTemplate || i.rowTemplate,
                      e,
                      !0
                    ));
                t._hasDetails() &&
                  (t.detailTemplate = t._detailTmpl(i.detailTemplate || ""));
                ((t._group && !oe(f)) ||
                  (!oe(f) && !p.length) ||
                  v(h, function (n) {
                    return n.footerTemplate;
                  }).length) &&
                  (t.footerTemplate = t._footerTmpl(
                    h,
                    f,
                    "footerTemplate",
                    "k-footer-template"
                  ));
                s &&
                  v(h, function (n) {
                    return n.groupFooterTemplate;
                  }).length &&
                  ((f = n.map(s, function (n) {
                    return n.aggregates;
                  })),
                  (t.groupFooterTemplate = t._footerTmpl(
                    e,
                    f,
                    "groupFooterTemplate",
                    "k-group-footer",
                    r.length
                  )),
                  i.scrollable &&
                    r.length &&
                    (t.lockedGroupFooterTemplate = t._footerTmpl(
                      r,
                      f,
                      "groupFooterTemplate",
                      "k-group-footer"
                    )));
                s && (a.length || y.length)
                  ? ((f = n.map(s, function (n) {
                      return n.aggregates;
                    })),
                    (t.groupHeaderColumnTemplate = t._groupHeaderTmpl(
                      o(e),
                      f,
                      "groupHeaderColumnTemplate",
                      "k-grouping-row",
                      r.length,
                      y
                    )),
                    i.scrollable &&
                      r.length &&
                      (t.lockedGroupHeaderColumnTemplate = t._groupHeaderTmpl(
                        o(r),
                        f,
                        "groupHeaderColumnTemplate",
                        "k-grouping-row",
                        0,
                        a
                      )))
                  : ((t.groupHeaderColumnTemplate = null),
                    (t.lockedGroupHeaderColumnTemplate = null));
                t.options.noRecords &&
                  (t.noRecordsTemplate = t._noRecordsTmpl());
              },
              _noRecordsTmpl: function () {
                var r,
                  f,
                  u,
                  s =
                    this.options.scrollable && !this.wrapper[0].style.height
                      ? ' style="margin:0 auto;position:static;"'
                      : "",
                  t = { storage: {}, count: 0 },
                  o = n.extend({}, i.Template, this.options.templateSettings),
                  h = o.paramName,
                  e = "";
                return (
                  (r = this.options.noRecords.template
                    ? this.options.noRecords.template
                    : i.format(
                        '<div class="k-grid-norecords-template"{1}>{0}</div>',
                        this.options.messages.noRecords,
                        s
                      )),
                  (f = typeof r),
                  "function" === f
                    ? ((t.storage["tmpl" + t.count] = r),
                      (e += "#=this.tmpl" + t.count + "(" + h + ")#"),
                      t.count++)
                    : "string" === f && (e += r),
                  (u = i.template(
                    i.format('<div class="{0}">{1}</div>', de, e),
                    o
                  )),
                  t.count > 0 && (u = n.proxy(u, t.storage)),
                  u
                );
              },
              _footerTmpl: function (n, t, r, u, o) {
                var l,
                  p,
                  h,
                  w,
                  c,
                  a = this,
                  y = f({}, i.Template, a.options.templateSettings),
                  b = y.paramName,
                  s = "",
                  k = {},
                  v = 0,
                  d = {},
                  g = a._groups(),
                  nt = a.dataSource._emptyAggregates(t);
                for (
                  s += '<tr class="' + u + '">',
                    g > 0 && !o && (s += di(g)),
                    a._hasDetails() &&
                      (s += '<td class="k-hierarchy-cell">&nbsp;</td>'),
                    l = 0,
                    p = n.length;
                  l < p;
                  l++
                )
                  (c = n[l]),
                    (h = c[r]),
                    (w = typeof h),
                    (s += "<td" + dt(c.footerAttributes) + ">"),
                    h
                      ? (w !== pt &&
                          ((d = nt[c.field]
                            ? f({}, y, { paramName: b + "['" + c.field + "']" })
                            : {}),
                          (h = i.template(h, d))),
                        (k["tmpl" + v] = h),
                        (s += "#=this.tmpl" + v + "(" + b + ")#"),
                        v++)
                      : (s += "&nbsp;"),
                    (s += "</td>");
                return (
                  (s += "</tr>"), (s = i.template(s, y)), v > 0 ? e(s, k) : s
                );
              },
              _groupHeaderTmpl: function (n, r, u, o, h, c) {
                var y,
                  d,
                  v,
                  g,
                  p,
                  k = this,
                  w = f({}, i.Template, k.options.templateSettings),
                  nt = w.paramName,
                  l = "",
                  tt = {},
                  b = 0,
                  it = {},
                  rt = k.dataSource._emptyAggregates(r),
                  a = c.length ? s(c[0], n) : -1;
                if (
                  ((l += '<tr role="row" class="' + o + '">'),
                  h ||
                    (l +=
                      '# for (var i = 0; i < data.groupCells; i++) { #<td class="k-group-cell">&nbsp;</td># } #'),
                  k._hasDetails() &&
                    (l += '<td class="k-hierarchy-cell">&nbsp;</td>'),
                  a < 0)
                )
                  return (l += h ? "" : fr(n.length)), t;
                if (a < lo && c.length <= 1 && !h)
                  return (l += h ? "" : fr(n.length)), i.template(l, w);
                for (
                  a < lo
                    ? ((a = h ? 0 : 1), (l += h ? "" : fr(a)))
                    : (l += h ? ys(a) : fr(a)),
                    y = a,
                    d = n.length;
                  y < d;
                  y++
                )
                  (p = n[y]),
                    (v = p[u]),
                    (g = typeof v),
                    (l += "<td>"),
                    v
                      ? (g !== pt &&
                          ((it = rt[p.field]
                            ? f({}, w, {
                                paramName: nt + "['" + p.field + "']",
                              })
                            : {}),
                          (v = i.template(v, it))),
                        (tt["tmpl" + b] = v),
                        (l += "#=this.tmpl" + b + "(" + nt + ")#"),
                        b++)
                      : (l += "&nbsp;"),
                    (l += "</td>");
                return (
                  (l += "</tr>"), (l = i.template(l, w)), b > 0 ? e(l, tt) : l
                );
              },
              _detailTmpl: function (n) {
                var s = this,
                  t = "",
                  h = f({}, i.Template, s.options.templateSettings),
                  v = h.paramName,
                  c = {},
                  r = 0,
                  l = s._groups(),
                  a = o(u(s.columns)).length,
                  y = typeof n;
                return (
                  (t += '<tr class="k-detail-row">'),
                  l > 0 && (t += di(l)),
                  (t +=
                    '<td class="k-hierarchy-cell"></td><td class="k-detail-cell"' +
                    (a ? ' colspan="' + a + '"' : "") +
                    ">"),
                  y === pt
                    ? ((c["tmpl" + r] = n),
                      (t += "#=this.tmpl" + r + "(" + v + ")#"),
                      r++)
                    : (t += n),
                  (t += "</td></tr>"),
                  (t = i.template(t, h)),
                  r > 0 ? e(t, c) : t
                );
              },
              _hasDetails: function () {
                var n = this;
                return (
                  null !== n.options.detailTemplate ||
                  (n._events[su] || []).length
                );
              },
              _hasFilterRow: function () {
                var t = this.options.filterable,
                  r = t && typeof t.mode == w && t.mode.indexOf("row") != -1,
                  i = this.columns,
                  u = n.grep(i, function (n) {
                    return n.filterable === !1;
                  });
                return i.length && u.length == i.length && (r = !1), r;
              },
              _details: function () {
                var t = this;
                if (
                  t.options.scrollable &&
                  t._hasDetails() &&
                  c(t.columns).length
                )
                  throw Error(
                    "Having both detail template and locked columns is not supported"
                  );
                t.table.on(
                  y + r,
                  ".k-hierarchy-cell .k-i-expand, .k-hierarchy-cell .k-i-collapse",
                  function (i) {
                    var r,
                      e,
                      o = n(this),
                      s = o.closest("td.k-hierarchy-cell"),
                      u = o.hasClass("k-i-expand"),
                      f = o.closest("tr.k-master-row"),
                      h = t.detailTemplate,
                      c = t._hasDetails(),
                      l = u ? ar : nf,
                      a = !!u;
                    return (
                      o
                        .toggleClass("k-i-expand", !u)
                        .toggleClass("k-i-collapse", u)
                        .attr(ei, l),
                      s.attr("aria-expanded", a),
                      (r = f.next()),
                      c &&
                        !r.hasClass("k-detail-row") &&
                        ((e = t.dataItem(f)),
                        (r = n(h(e))
                          .addClass(f.hasClass("k-alt") ? "k-alt" : "")
                          .insertAfter(f)),
                        t.angular("compile", function () {
                          return { elements: r.get(), data: [{ dataItem: e }] };
                        }),
                        t.trigger(su, {
                          masterRow: f,
                          detailRow: r,
                          data: e,
                          detailCell: r.find(".k-detail-cell"),
                        })),
                      t.trigger(u ? we : be, { masterRow: f, detailRow: r }),
                      r.toggle(u),
                      i.preventDefault(),
                      !1
                    );
                  }
                );
              },
              dataItem: function (t) {
                if (((t = n(t)[0]), !t)) return null;
                for (
                  var f = this.tbody.children(),
                    u = t.sectionRowIndex,
                    r = u,
                    i = 0;
                  i < u;
                  i++
                )
                  /k-grouping-row|k-detail-row|k-group-footer/.test(
                    f[i].className
                  ) && r--;
                return this._data[r];
              },
              expandRow: function (t) {
                n(t).find("> td .k-i-expand").click();
              },
              collapseRow: function (t) {
                n(t).find("> td .k-i-collapse").click();
              },
              _createHeaderCells: function (n, r) {
                for (
                  var e,
                    c,
                    a,
                    v,
                    h,
                    l = this,
                    f = "",
                    p = l.options.messages,
                    w = u(l.columns),
                    b = l.dataSource.group(),
                    o = 0,
                    y = n.length;
                  o < y;
                  o++
                )
                  (e = n[o].column || n[o]),
                    (c = l._headerCellText(e)),
                    (v = ""),
                    (h = s(e, w)),
                    e.selectable
                      ? ((f += "<th scope='col'" + dt(e.headerAttributes)),
                        r && !n[o].colSpan && (f += " rowspan='" + r + "'"),
                        h > -1 && (f += i.attr("index") + "='" + h + "'"),
                        (c = e.headerTemplate ? c : i.template(hh)({})),
                        (f += ">" + c + "</th>"))
                      : e.command
                      ? ((f += "<th scope='col'" + dt(e.headerAttributes)),
                        r && !n[o].colSpan && (f += " rowspan='" + r + "'"),
                        h > -1 && (f += i.attr("index") + "='" + h + "'"),
                        (f += ">" + c + "</th>"))
                      : (e.field &&
                          (v = i.attr("field") + "='" + e.field + "' "),
                        (f += "<th scope='col' role='columnheader' " + v),
                        (f += " aria-haspopup='true'"),
                        r && !n[o].colSpan && (f += " rowspan='" + r + "'"),
                        n[o].colSpan > 1
                          ? ((f +=
                              'colspan="' +
                              (n[o].colSpan - ii(e.columns)) +
                              '" '),
                            (f +=
                              i.attr("colspan") + "='" + n[o].colSpan + "'"))
                          : 1 === n[o].colSpan &&
                            (f +=
                              i.attr("colspan") + "='" + n[o].colSpan + "'"),
                        e.title &&
                          ((a = e.title
                            .replace('"', "&quot;")
                            .replace(/'/g, "'")),
                          (f += i.attr("title") + '="' + a + '" ')),
                        e.groupable !== t &&
                          (f +=
                            i.attr("groupable") + "='" + e.groupable + "' "),
                        ls(l, e) &&
                          ((f += "aria-label='" + (a || e.field) + " "),
                          (f += as(b, e.field)
                            ? p.ungroupHeader
                            : p.groupHeader),
                          (f += "' ")),
                        e.aggregates &&
                          e.aggregates.length &&
                          (f +=
                            i.attr("aggregates") + "='" + e.aggregates + "'"),
                        h > -1 && (f += i.attr("index") + "='" + h + "'"),
                        (f += dt(e.headerAttributes)),
                        (f += ">" + c + "</th>"));
                return f;
              },
              _appendLockedColumnContent: function () {
                for (
                  var f,
                    i,
                    e,
                    r = this.columns,
                    o = this.table.find("colgroup"),
                    a = o.find("col:not(.k-group-col,.k-hierarchy-col)"),
                    s = n(),
                    c = 0,
                    l = 0,
                    t = 0,
                    h = r.length;
                  t < h;
                  t++
                )
                  if (r[t].locked)
                    if (ct(r[t])) {
                      for (
                        i = 1,
                          r[t].columns &&
                            (i = u(r[t].columns).length - ii(r[t].columns)),
                          i = i || 1,
                          e = 0;
                        e < i;
                        e++
                      )
                        s = s.add(a.eq(t + l + e - c));
                      l += i - 1;
                    } else c++;
                f = n(
                  '<div class="k-grid-content-locked"><table' +
                    (ki ? ' cellspacing="0"' : "") +
                    "><colgroup/><tbody></tbody></table></div>"
                );
                o.detach();
                f.find("colgroup").append(s);
                o.insertBefore(this.table.find("tbody"));
                this.lockedContent = f.insertBefore(this.content);
                this.lockedTable = f.children("table");
              },
              _appendLockedColumnFooter: function () {
                var t,
                  e,
                  i = this,
                  s = i.footer,
                  l = s.find(".k-footer-template>td"),
                  a = s.find(".k-grid-footer-wrap>table>colgroup>col"),
                  h = n(
                    '<div class="k-grid-footer-locked"><table><colgroup /><tbody><tr class="k-footer-template"></tr></tbody></table></div>'
                  ),
                  v = i._groups(),
                  r = n(),
                  f = n();
                for (
                  r = r.add(l.filter(".k-group-cell")),
                    t = 0,
                    e = u(c(i.columns)).length;
                  t < e;
                  t++
                )
                  r = r.add(l.eq(t + v));
                for (
                  f = f.add(a.filter(".k-group-col")),
                    t = 0,
                    e = o(u(ir(i.columns))).length;
                  t < e;
                  t++
                )
                  f = f.add(a.eq(t + v));
                r.appendTo(h.find("tr"));
                f.appendTo(h.find("colgroup"));
                i.lockedFooter = h.prependTo(s);
              },
              _appendLockedColumnHeader: function (t) {
                for (
                  var c,
                    d,
                    g,
                    o,
                    nt,
                    s,
                    a,
                    v,
                    y,
                    f = this,
                    r = this.columns,
                    e = [],
                    p = 0,
                    w = n(),
                    ut = f._hasFilterRow(),
                    tt = 0,
                    b = n(),
                    h = 0,
                    it = n(),
                    k = f.thead
                      .prev()
                      .find("col:not(.k-group-col,.k-hierarchy-col)"),
                    ft = f.thead.find(
                      "tr:first .k-header:not(.k-group-cell,.k-hierarchy-cell)"
                    ),
                    et = f.thead
                      .find(".k-filter-row")
                      .find("th:not(.k-group-cell,.k-hierarchy-cell)"),
                    rt = 0,
                    i = 0,
                    l = r.length;
                  i < l;
                  i++
                ) {
                  if (r[i].locked) {
                    if (
                      ((nt = ft.eq(i)),
                      (h = u(r[i].columns || []).length),
                      ct(r[i]))
                    ) {
                      for (
                        s = null,
                          r[i].columns && (s = h - ii(r[i].columns)),
                          s = s || 1,
                          a = 0;
                        a < s;
                        a++
                      )
                        w = w.add(k.eq(i + rt + a - p));
                      rt += s - 1;
                    }
                    for (
                      tr([r[i]], hi(nt), e, 0, 0), h = h || 1, v = 0;
                      v < h;
                      v++
                    )
                      b = b.add(et.eq(tt + v));
                    tt += h;
                  }
                  r[i].columns && (p += ii(r[i].columns));
                  ct(r[i]) || p++;
                }
                if (e.length) {
                  for (
                    c =
                      '<div class="k-grid-header-locked" style="width:1px"><table' +
                      (ki ? ' cellspacing="0"' : "") +
                      "><colgroup/><thead>",
                      c += Array(e.length + 1).join("<tr></tr>"),
                      c +=
                        (ut ? '<tr class="k-filter-row" />' : "") +
                        "</thead></table></div>",
                      o = n(c),
                      k = o.find("colgroup"),
                      k.append(f.thead.prev().find("col.k-group-col").add(w)),
                      d = o.find("thead tr:not(.k-filter-row)"),
                      i = 0,
                      l = e.length;
                    i < l;
                    i++
                  )
                    (it = is(e[i])),
                      d
                        .eq(i)
                        .append(
                          f.thead.find("tr:eq(" + i + ") .k-group-cell").add(it)
                        );
                  return (
                    (y = dr(this.thead)),
                    e.length < y && fs(o, y - e.length),
                    (g = o.find(".k-filter-row")),
                    g.append(
                      f.thead.find(".k-filter-row .k-group-cell").add(b)
                    ),
                    (this.lockedHeader = o.prependTo(t)),
                    this.thead.find(".k-group-cell").remove(),
                    !0
                  );
                }
                return !1;
              },
              _removeLockedContainers: function () {
                var n = this.lockedHeader
                  .add(this.lockedContent)
                  .add(this.lockedFooter);
                i.destroy(n);
                n.off(r).remove();
                this.lockedHeader =
                  this.lockedContent =
                  this.lockedFooter =
                    null;
                this.selectable = null;
              },
              _thead: function () {
                var o,
                  f,
                  v,
                  b,
                  nt,
                  y,
                  p,
                  tt,
                  k,
                  t = this,
                  l = t.columns,
                  w = t._hasDetails() && l.length,
                  it = t._hasFilterRow(),
                  a = "",
                  h = t.table.find(">thead"),
                  rt = t.element.find("thead:first").length > 0,
                  g = t.options.messages.expandCollapseColumnHeader;
                if (
                  (h.length || (h = n("<thead/>").insertBefore(t.tbody)),
                  t.lockedHeader && t.thead
                    ? ((f = t.thead
                        .find("tr:has(th):not(.k-filter-row)")
                        .html("")),
                      f.remove(),
                      (f = n()),
                      t._removeLockedContainers())
                    : (f = t.element.find(
                        rt
                          ? "thead:first tr:has(th):not(.k-filter-row)"
                          : "tr:has(th):first"
                      )),
                  f.length)
                ) {
                  for (o = 0; o < l.length; o++)
                    (b = s(l[o], u(l))),
                      (nt = d(f.parent())
                        .filter("th:not(.k-group-cell):not(.k-hierarchy-cell)")
                        .eq(b)),
                      l[o].hidden && b >= 0 && (nt[0].style.display = "none");
                  t._updateHeadersAttr(nu(l));
                } else if (((f = h.children().first()), !f.length)) {
                  for (
                    v = [{ rowSpan: 1, cells: [], index: 0 }],
                      t._prepareColumns(v, l),
                      o = 0;
                    o < v.length;
                    o++
                  )
                    (a += "<tr>"),
                      w &&
                        (a +=
                          '<th class="k-hierarchy-cell" scope="col">' +
                          g +
                          "</th>"),
                      (a += t._createHeaderCells(v[o].cells, v[o].rowSpan)),
                      (a += "</tr>");
                  f = n(a);
                }
                it &&
                  ((y = n("<tr/>")),
                  y.addClass("k-filter-row"),
                  (w || f.find(".k-hierarchy-cell").length) &&
                    y.prepend(
                      '<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'
                    ),
                  (p = (t.thead || h).find(".k-filter-row")),
                  p.length && (i.destroy(p), p.remove()),
                  h.append(y));
                f.children().length
                  ? w &&
                    !f.find(".k-hierarchy-cell")[0] &&
                    f.prepend(
                      '<th class="k-hierarchy-cell" scope="col">' +
                        (g ? g : "&nbsp;") +
                        "</th>"
                    )
                  : ((a = ""),
                    w &&
                      (a +=
                        '<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'),
                    (a += t._createHeaderCells(l)),
                    f.html(a));
                f.attr("role", "row").find("th").addClass("k-header");
                t.options.scrollable || h.addClass("k-grid-header");
                f.find("script").remove().end().prependTo(h);
                t.thead && t._destroyColumnAttachments();
                this.angular("cleanup", function () {
                  return { elements: h.find("th" + ot).get() };
                });
                this.angular("compile", function () {
                  return {
                    elements: h.find(or).get(),
                    data: ai(l, function (n) {
                      return { column: n };
                    }),
                  };
                });
                t.thead = h.attr("role", "rowgroup");
                t._sortable();
                t._filterable();
                t._filterRow();
                t._scrollable();
                t._columnMenu();
                k = this.options.scrollable && c(this.columns).length;
                k &&
                  ((tt = t._appendLockedColumnHeader(
                    t.thead.closest(".k-grid-header")
                  )),
                  t._appendLockedColumnContent(),
                  t.lockedContent.bind(
                    "DOMMouseScroll" + r + " mousewheel" + r,
                    e(t._wheelScroll, t)
                  ),
                  t._updateLockedCols());
                t._updateCols();
                t._updateColumnCellIndex();
                t._updateFirstColumnClass();
                t._resizable();
                t._draggable();
                t._reorderable();
                t._updateHeader(t._groups());
                k &&
                  (tt && t._syncLockedHeaderHeight(),
                  t._applyLockedContainersWidth());
                t.groupable && t._attachGroupable();
              },
              _retrieveFirstColumn: function (t, i) {
                var r,
                  u = n();
                if (i.length && t[0]) {
                  for (r = t[0]; r.columns && r.columns.length; )
                    (r = r.columns[0]), (i = i.filter(":not(:first())"));
                  u = u.add(i);
                }
                return u;
              },
              _updateFirstColumnClass: function () {
                var r,
                  u,
                  t = this,
                  i = t.columns || [],
                  f = t._hasDetails() && i.length;
                f ||
                  t._groups() ||
                  ((r = t.thead.find(">tr:not(.k-filter-row):not(:first)")),
                  (i = ut(i)),
                  (u = t._retrieveFirstColumn(i, r)),
                  t._isLocked() &&
                    ((r = t.lockedHeader.find(
                      "thead>tr:not(.k-filter-row):not(:first)"
                    )),
                    (i = c(t.columns)),
                    (u = u.add(t._retrieveFirstColumn(i, r)))),
                  u.each(function () {
                    var t = n(this).find("th");
                    t.removeClass("k-first");
                    t.eq(0).addClass("k-first");
                  }));
              },
              _prepareColumns: function (n, t, i, r) {
                for (
                  var f,
                    e = r || n[n.length - 1],
                    o = n[e.index + 1],
                    s = 0,
                    u = 0;
                  u < t.length;
                  u++
                )
                  (f = { column: t[u], colSpan: 0 }),
                    e.cells.push(f),
                    t[u].columns &&
                      t[u].columns.length &&
                      (o ||
                        ((o = { rowSpan: 0, cells: [], index: n.length }),
                        n.push(o)),
                      (f.colSpan = t[u].columns.length),
                      this._prepareColumns(n, t[u].columns, f, o),
                      (s += f.colSpan - 1),
                      (e.rowSpan = n.length - e.index));
                i && (i.colSpan += s);
              },
              _wheelScroll: function (n) {
                var t, u, r;
                n.ctrlKey ||
                  ((t = this.content),
                  this.options.scrollable.virtual &&
                    (t = this.virtualScrollable.verticalScrollbar),
                  (u = t.scrollTop()),
                  (r = i.wheelDeltaY(n)),
                  r &&
                    (t[0].scrollHeight > t[0].clientHeight &&
                      ((t[0].scrollTop <
                        t[0].scrollHeight - t[0].clientHeight &&
                        r < 0) ||
                        (t[0].scrollTop > 0 && r > 0)) &&
                      n.preventDefault(),
                    t.scrollTop(u + -r)));
              },
              _isLocked: function () {
                return null != this.lockedHeader;
              },
              _updateHeaderCols: function () {
                var n = this.thead.parent().add(this.table);
                this._isLocked()
                  ? ri(n, ft(gr(this.columns)), this._hasDetails(), 0)
                  : ri(n, ft(o(this.columns)), this._hasDetails(), 0);
              },
              _updateColumnSorters: function () {
                var t,
                  f,
                  i,
                  n,
                  e,
                  r = this,
                  o = d(r.thead),
                  s = u(r.columns);
                if (r.options.sortable)
                  for (n = 0, e = o.length; n < e; n++)
                    (t = s[n]),
                      t.sortable !== !1 &&
                        !t.command &&
                        t.field &&
                        ((f = o.eq(n)),
                        (i = f.data("kendoColumnSorter")),
                        i && i.refresh());
              },
              _updateHeadersAttr: function (n) {
                var i, t, r;
                if (n.length) {
                  for (i = this, t = 0; t < n.length; t++)
                    n[t].headerAttributes &&
                      ((r = i.element.find(
                        "[id='" + n[t].headerAttributes.id + "']"
                      )),
                      r.attr("headers", n[t].headerAttributes.headers));
                  i._updateHeadersAttr(nu(n));
                }
              },
              _updateCols: function (n) {
                n = n || this.thead.parent().add(this.table);
                this._appendCols(n, this._isLocked());
              },
              _updateLockedCols: function (n) {
                this._isLocked() &&
                  ((n =
                    n || this.lockedHeader.find("table").add(this.lockedTable)),
                  ri(
                    n,
                    ft(ir(this.columns)),
                    this._hasDetails(),
                    this._groups()
                  ));
              },
              _appendCols: function (n, t) {
                t
                  ? ri(n, ft(gr(this.columns)), this._hasDetails(), 0)
                  : ri(
                      n,
                      ft(o(this.columns)),
                      this._hasDetails(),
                      this._groups()
                    );
              },
              _autoColumns: function (n) {
                if (n && n.toJSON) {
                  var r,
                    u,
                    t = this;
                  n = n.toJSON();
                  u = !(
                    t.table.find("tbody tr").length > 0 &&
                    (!t.dataSource || !t.dataSource.transport)
                  );
                  for (r in n)
                    t.columns.push({
                      field: r,
                      encoded: u,
                      headerAttributes: { id: i.guid() },
                    });
                  t._thead();
                  t._templates();
                }
              },
              _rowsHtml: function (n, t) {
                for (
                  var r = this,
                    f = "",
                    e = t.rowTemplate,
                    o = t.altRowTemplate,
                    i = 0,
                    u = n.length;
                  i < u;
                  i++
                )
                  r._skipRerenderItemsCount > 0
                    ? r._skipRerenderItemsCount--
                    : (f += i % 2 ? o(n[i]) : e(n[i])),
                    r._data.push(n[i]);
                return f;
              },
              _groupData: function (n, t, i) {
                var r,
                  s = this,
                  h = s._groupAggregatesDefaultObject || {},
                  e = n.items,
                  u = f({}, h, n.aggregates),
                  c = f(
                    {},
                    { field: n.field, value: n.value, items: e, aggregates: u },
                    n.aggregates[i ? i.field : n.field]
                  ),
                  o = {};
                if (!t)
                  for (r in u)
                    o[r] = f({}, u[r], {
                      group: { field: n.field, value: n.value, items: e },
                    });
                return f({}, o, c);
              },
              _groupRowHtml: function (n, t, r, e, h, c, l) {
                var p,
                  nt,
                  w,
                  a = this,
                  b = "",
                  tt = n.field,
                  y =
                    v(u(a.columns), function (n) {
                      return n.field == tt;
                    })[0] || {},
                  it = o(a.columns)[0],
                  ft = it ? it.groupHeaderColumnTemplate : null,
                  k = y.groupHeaderTemplate ? y.groupHeaderTemplate : ft,
                  d =
                    (y.title || tt) +
                    ": " +
                    pf(n.value, y.format, y.values, y.encoded),
                  g = n.items,
                  et = a._groups(),
                  rt = h.groupFooterTemplate,
                  ut = h.groupHeaderColumnTemplate;
                if (
                  ((h.groupFooterTemplate ||
                    h.groupHeaderColumnTemplate ||
                    y.groupHeaderTemplate) &&
                    (w = a._groupData(
                      n,
                      !1,
                      !(
                        y.groupHeaderTemplate ||
                        !o(a.columns)[0].groupHeaderColumnTemplate
                      ) && o(a.columns)[0]
                    )),
                  k && !c && (d = typeof k === pt ? k(w) : i.template(k)(w)),
                  a._skipRerenderItemsCount
                    ? e(t, r, d)
                    : (b += ut
                        ? ut(
                            f({}, w, {
                              groupCells: r,
                              colspan: et - r,
                              text: d,
                            })
                          )
                        : e(t, r, d)),
                  n.hasSubgroups)
                )
                  for (p = 0, nt = g.length; p < nt; p++)
                    b += a._groupRowHtml(
                      g[p],
                      c ? t : t - 1,
                      r + 1,
                      e,
                      h,
                      c,
                      l && p === g.length - 1
                    );
                else b += a._rowsHtml(g, h);
                return (
                  rt &&
                    (l
                      ? s(n.value, a._skippedGroups) ||
                        a._skippedGroups.push(n.value)
                      : (a._skippedGroups.length &&
                          a._skippedGroups[0] === n.value &&
                          a._skippedGroups.shift(),
                        a._skipRerenderItemsCount || (b += rt(w)))),
                  b
                );
              },
              collapseGroup: function (t) {
                var s,
                  h,
                  r,
                  c,
                  i,
                  u,
                  f = this,
                  l = t,
                  a = this.options.groupable,
                  v = a.showFooter,
                  o = v ? 0 : 1,
                  e = n();
                for (
                  t = n(t),
                    this._isLocked() &&
                      (t.closest("div").hasClass("k-grid-content-locked")
                        ? (e = this.tbody
                            .children("tr:eq(" + t.index() + ")")
                            .nextAll("tr"))
                        : ((e = t.nextAll("tr")),
                          (t = this.lockedTable.find(
                            ">tbody>tr:eq(" + t.index() + ")"
                          )))),
                    s = t.find(".k-group-cell").length,
                    t
                      .find(".k-i-collapse")
                      .addClass("k-i-expand")
                      .removeClass("k-i-collapse"),
                    t
                      .find("td[aria-expanded='true']:first")
                      .attr("aria-expanded", !1)
                      .find("a")
                      .attr(ei, nf),
                    t = t.nextAll("tr"),
                    u = [],
                    r = 0,
                    c = t.length;
                  r < c &&
                  ((i = t.eq(r)),
                  (h = i.find(".k-group-cell").length),
                  i.hasClass("k-grouping-row")
                    ? o++
                    : i.hasClass("k-group-footer") && o--,
                  !(h <= s || (i.hasClass("k-group-footer") && o < 0)));
                  r++
                )
                  e.length && u.push(e[r]), u.push(i[0]);
                n(u).hide();
                this.options.scrollable.endless &&
                  this.content &&
                  (clearTimeout(f._collapseGroupsTimeOut),
                  (f._collapseGroupsTimeOut = setTimeout(function () {
                    f.content.scroll();
                    f._groupToCollapse = l;
                  })));
              },
              expandGroup: function (t) {
                var f, s, e, i, h, u, r, a, c, o, l;
                for (
                  t = n(t),
                    f = this,
                    s = f.options.groupable.showFooter,
                    u = n(),
                    c = [],
                    o = 1,
                    this._isLocked() &&
                      (t.closest("div").hasClass("k-grid-content-locked")
                        ? (u = this.tbody
                            .children("tr:eq(" + t.index() + ")")
                            .nextAll("tr"))
                        : ((u = t.nextAll("tr")),
                          (t = this.lockedTable.find(
                            ">tbody>tr:eq(" + t.index() + ")"
                          )))),
                    e = t.find(".k-group-cell").length,
                    t
                      .find(".k-i-expand")
                      .addClass("k-i-collapse")
                      .removeClass("k-i-expand"),
                    t
                      .find("td[aria-expanded='false']:first")
                      .attr("aria-expanded", !0)
                      .find("a")
                      .attr(ei, ar),
                    t = t.nextAll("tr"),
                    r = 0,
                    a = t.length;
                  r < a &&
                  ((i = t.eq(r)),
                  (h = i.find(".k-group-cell").length),
                  !(h <= e));
                  r++
                )
                  h != e + 1 ||
                    i.hasClass("k-detail-row") ||
                    (i.show(),
                    u.eq(r).show(),
                    i.hasClass("k-grouping-row") &&
                      i.find(".k-icon").hasClass("k-i-collapse") &&
                      f.expandGroup(i),
                    i.hasClass("k-master-row") &&
                      i.find(".k-icon").hasClass("k-i-collapse") &&
                      (i.next().show(), u.eq(r + 1).show())),
                    i.hasClass("k-grouping-row") &&
                      (s && c.push(i.is(":visible")), o++),
                    i.hasClass("k-group-footer") &&
                      (s && ((l = c.pop()), i.toggle(l), u.eq(r).toggle(l)),
                      1 == o ? (i.show(), u.eq(r).show()) : o--);
                0 === e &&
                  f.options.scrollable.endless &&
                  this._isLocked() &&
                  f._syncLockedContentHeight();
              },
              _updateHeader: function (t) {
                var r = this,
                  i = r._isLocked() ? r.lockedHeader.find("thead") : r.thead,
                  f = i.find("tr.k-filter-row").find("th.k-group-cell").length,
                  u = i.find("tr:first").find("th.k-group-cell").length,
                  e = i.children("tr:not(:first)").filter(function () {
                    return !n(this).children(":visible").length;
                  });
                t > u
                  ? (n(
                      Array(t - u + 1).join(
                        '<th class="k-group-cell k-header" scope="col">' +
                          r.options.messages.expandCollapseColumnHeader +
                          "</th>"
                      )
                    ).prependTo(i.children("tr:not(.k-filter-row)")),
                    r.element.is(":visible") &&
                      e.find("th.k-group-cell").hide())
                  : t < u &&
                    i.find("tr").each(function () {
                      n(this)
                        .find("th.k-group-cell")
                        .filter(":eq(" + t + "),:gt(" + t + ")")
                        .remove();
                    });
                t > f &&
                  n(
                    Array(t - f + 1).join(
                      '<th class="k-group-cell k-header" scope="col">&nbsp;</th>'
                    )
                  ).prependTo(i.find(".k-filter-row"));
              },
              _firstDataItem: function (n, t) {
                return (
                  n &&
                    t &&
                    (n = n.hasSubgroups
                      ? this._firstDataItem(n.items[0], t)
                      : n.items[0]),
                  n
                );
              },
              _updateTablesWidth: function () {
                var i,
                  t = this;
                t._isLocked() &&
                  ((i = n(
                    ">.k-grid-footer>.k-grid-footer-wrap>table",
                    t.wrapper
                  )
                    .add(t.thead.parent())
                    .add(t.table)),
                  (t._footerWidth = gf(i.eq(0))),
                  i.width(t._footerWidth),
                  (i = n(
                    ">.k-grid-footer>.k-grid-footer-locked>table",
                    t.wrapper
                  )
                    .add(t.lockedHeader.find(">table"))
                    .add(t.lockedTable)),
                  i.width(gf(i.eq(0))));
              },
              hideColumn: function (i) {
                var ft,
                  y,
                  f,
                  k,
                  p,
                  g,
                  nt,
                  et,
                  e,
                  tt,
                  ut,
                  r = this,
                  c = 0,
                  w = r.footer || r.wrapper.find(".k-grid-footer"),
                  l = r.columns,
                  b = r.lockedHeader
                    ? d(r.lockedHeader.find(">table>thead")).filter(gt).length
                    : 0,
                  ot = v(u(r.columns), function (n) {
                    return n.groupHeaderColumnTemplate;
                  });
                if (
                  ((i =
                    "number" == typeof i
                      ? l[i]
                      : a(i)
                      ? v(rt(l), function (n) {
                          return n === i;
                        })[0]
                      : v(rt(l), function (n) {
                          return n.field === i;
                        })[0]),
                  i && ct(i))
                ) {
                  if (
                    ((tt = r._columnVisibilitySetter(i)),
                    i.columns && i.columns.length)
                  ) {
                    for (
                      g = kr(i, l),
                        tt(i, !1),
                        wt(
                          it(
                            n(">table>thead", r.lockedHeader),
                            r.thead,
                            ">tr:eq(" + g.row + ")>th"
                          ),
                          g.cell,
                          !1
                        ),
                        f = 0;
                      f < i.columns.length;
                      f++
                    )
                      this.hideColumn(i.columns[f]);
                    return r.trigger(hu, { column: i }), t;
                  }
                  if (
                    ((e = s(i, o(u(l)))),
                    tt(i, !1),
                    r._setParentsVisibility(i, !1),
                    r._templates(),
                    r._updateCols(),
                    r._updateLockedCols(),
                    (ut = r.thead),
                    (nt = e),
                    r.lockedHeader && b > e
                      ? (ut = r.lockedHeader.find(">table>thead"))
                      : (nt -= b),
                    (ft = d(ut).filter(gt).eq(nt)),
                    (ft[0].style.display = "none"),
                    wt(
                      it(
                        n(">table>thead", r.lockedHeader),
                        r.thead,
                        ">tr.k-filter-row>th"
                      ),
                      e,
                      !1
                    ),
                    w[0] &&
                      (r._updateCols(w.find(">.k-grid-footer-wrap>table")),
                      r._updateLockedCols(
                        w.find(">.k-grid-footer-locked>table")
                      ),
                      wt(w.find(".k-footer-template>td"), e, !1)),
                    r.lockedTable && b > e
                      ? wf(r.lockedTable.find(">tbody>tr"), e)
                      : wf(r.tbody.children(), e - b),
                    r.lockedTable)
                  )
                    r._updateTablesWidth(),
                      r._applyLockedContainersWidth(),
                      r._syncLockedContentHeight(),
                      r._syncLockedHeaderHeight(),
                      r._syncLockedFooterHeight();
                  else {
                    for (
                      k = r.thead.prev().find("col"), f = 0, et = k.length;
                      f < et;
                      f += 1
                    ) {
                      if (
                        ((p = k[f].style.width), !p || p.indexOf("%") != -1)
                      ) {
                        c = 0;
                        break;
                      }
                      c += parseInt(p, 10);
                    }
                    y = n(
                      ">.k-grid-header table:first,>.k-grid-footer table:first",
                      r.wrapper
                    ).add(r.table);
                    r._footerWidth = null;
                    c &&
                      (y.each(function () {
                        this.style.width = c + "px";
                      }),
                      (r._footerWidth = c),
                      r._setContentWidth());
                    h.msie &&
                      8 == h.version &&
                      (y.css("display", "inline-table"),
                      setTimeout(function () {
                        y.css("display", "table");
                      }, 1));
                  }
                  r._updateFirstColumnClass();
                  ot.length > 0 && r._renderGroupRows();
                  r.trigger(hu, { column: i });
                }
              },
              _setParentsVisibility: function (t, r) {
                var e,
                  u,
                  h,
                  f,
                  c,
                  l = this,
                  a = l.columns,
                  s = [],
                  v = l._columnVisibilitySetter(t),
                  y = r
                    ? function (n) {
                        return o(n.columns).length && n.hidden;
                      }
                    : function (n) {
                        return !o(n.columns).length && !n.hidden;
                      };
                if (wr(t, a, s) && s.length)
                  for (e = s.length - 1; e >= 0; e--)
                    (u = s[e]),
                      (h = ti(u, a)),
                      (f = it(
                        n(">table>thead", this.lockedHeader),
                        this.thead,
                        ">tr:eq(" +
                          h.row +
                          ")>th:not(.k-group-cell):not(.k-hierarchy-cell)"
                      ).eq(h.cell)),
                      y(u) && (v(u, r), (f[0].style.display = r ? "" : "none")),
                      f.filter("[" + i.attr("colspan") + "]").length &&
                        ((c = parseInt(f.attr(i.attr("colspan")), 10)),
                        (f[0].colSpan = c - ii(u.columns) || 1));
              },
              showColumn: function (i) {
                var f,
                  ut,
                  ft,
                  p,
                  o,
                  w,
                  b,
                  k,
                  g,
                  c,
                  et,
                  e,
                  nt,
                  tt,
                  r = this,
                  h = r.columns,
                  l = r.footer || r.wrapper.find(".k-grid-footer"),
                  y = r.lockedHeader
                    ? d(r.lockedHeader.find(">table>thead")).length
                    : 0,
                  ot = v(u(r.columns), function (n) {
                    return n.groupHeaderColumnTemplate;
                  });
                if (
                  ("number" == typeof i
                    ? ((c = i), (i = h[i]))
                    : a(i)
                    ? n.each(rt(h), function (n, t) {
                        if (t === i) return (i = t), (c = n), !1;
                      })
                    : n.each(rt(h), function (n, t) {
                        if (t.field === i) return (i = t), (c = n), !1;
                      }),
                  i && !ct(i))
                ) {
                  if (
                    ((nt = r._columnVisibilitySetter(i)),
                    i.columns && i.columns.length)
                  ) {
                    for (
                      b = ti(i, h),
                        et = rt(r.options.columns)[c],
                        nt(i, !0),
                        wt(
                          it(
                            n(">table>thead", r.lockedHeader),
                            r.thead,
                            ">tr:eq(" + b.row + ")>th"
                          ),
                          b.cell,
                          !0
                        ),
                        f = 0;
                      f < i.columns.length;
                      f++
                    )
                      et.columns[f].hidden || this.showColumn(i.columns[f]);
                    return r.trigger(cu, { column: i }), t;
                  }
                  if (
                    ((e = s(i, u(h))),
                    nt(i, !0),
                    r._setParentsVisibility(i, !0),
                    r._templates(),
                    r._updateCols(),
                    r._updateLockedCols(),
                    (tt = r.thead),
                    (w = e),
                    r.lockedHeader && y > e
                      ? (tt = r.lockedHeader.find(">table>thead"))
                      : (w -= y),
                    (ft = d(tt).eq(w)),
                    (ft[0].style.display = ""),
                    wt(
                      it(
                        n(">table>thead", r.lockedHeader),
                        r.thead,
                        ">tr.k-filter-row>th"
                      ),
                      e,
                      !0
                    ),
                    l[0] &&
                      (r._updateCols(l.find(">.k-grid-footer-wrap>table")),
                      r._updateLockedCols(
                        l.find(">.k-grid-footer-locked>table")
                      ),
                      wt(l.find(".k-footer-template>td"), e, !0)),
                    r.lockedTable && y > e
                      ? kf(r.lockedTable.find(">tbody>tr"), e)
                      : kf(r.tbody.children(), e - y),
                    r.lockedTable)
                  )
                    r._updateTablesWidth(),
                      r._applyLockedContainersWidth(),
                      r._syncLockedContentHeight(),
                      r._syncLockedHeaderHeight();
                  else if (
                    ((p = n(
                      ">.k-grid-header table:first,>.k-grid-footer table:first",
                      r.wrapper
                    ).add(r.table)),
                    i.width)
                  ) {
                    for (
                      o = 0,
                        g = r.thead.prev().find("col"),
                        f = 0,
                        ut = g.length;
                      f < ut;
                      f += 1
                    ) {
                      if (((k = g[f].style.width), k.indexOf("%") > -1)) {
                        o = 0;
                        break;
                      }
                      o += parseInt(k, 10);
                    }
                    r._footerWidth = null;
                    o &&
                      (p.each(function () {
                        this.style.width = o + "px";
                      }),
                      (r._footerWidth = o),
                      r._setContentWidth());
                  } else p.width("");
                  r._updateFirstColumnClass();
                  ot.length > 0 && r._renderGroupRows();
                  r.trigger(cu, { column: i });
                }
              },
              _columnVisibilitySetter: function (n) {
                var t = n || {};
                return ni(t.media) ? go : ns;
              },
              _progress: function (n) {
                var t = this.element,
                  r =
                    this.options.scrollable && this.options.scrollable.endless;
                this._editContainer && "popup" === this._editMode()
                  ? (t = this._editContainer)
                  : this.lockedContent || r
                  ? (t = this.wrapper)
                  : this.element.is("table")
                  ? (t = this.element.parent())
                  : this.content && this.content.length && (t = this.content);
                r && n
                  ? i.ui.progress(t, n, {
                      height: this.content.height(),
                      top: this.content[0].offsetTop,
                      opacity: !0,
                    })
                  : i.ui.progress(t, n);
              },
              _resize: function (n, t) {
                this._syncLockedContentHeight();
                this._syncLockedHeaderHeight();
                this.content &&
                  (this._setContentWidth(), this._setContentHeight());
                this.lockedTable && this._syncLockedScroll();
                this.virtualScrollable &&
                  (t || this._rowHeight) &&
                  (t && (this._rowHeight = null),
                  this.virtualScrollable.repaintScrollbar());
                this.pager && this.pager.element && this.pager.resize(t);
              },
              _isActiveInTable: function () {
                var t = at();
                return (
                  !!t &&
                  (this.table[0] === t ||
                    n.contains(this.table[0], t) ||
                    (this._isLocked() &&
                      (this.lockedTable[0] === t ||
                        n.contains(this.lockedTable[0], t))))
                );
              },
              refresh: function (t) {
                var l,
                  a,
                  v,
                  r = this,
                  f = r.dataSource.view(),
                  y = r.options.navigatable,
                  e = n(r.current()),
                  h = !1,
                  u = (r.dataSource.group() || []).length,
                  c = u + ft(o(r.columns)).length;
                (t &&
                  "itemchange" === t.action &&
                  (r.editable || r.options.scrollable.endless) &&
                  ("popup" != this._editMode() ||
                    ("popup" === this._editMode() && !r._editableIsClosing))) ||
                  (t &&
                    "remove" === t.action &&
                    r.editable &&
                    r.editable.options.model &&
                    s(r.editable.options.model, t.items) > -1 &&
                    r.editable.options.model.unbind(k, r._modelChangeHandler),
                  (t = t || {}),
                  r.trigger("dataBinding", {
                    action: t.action || "rebind",
                    index: t.index,
                    items: t.items,
                  }) ||
                    (t.action === cr &&
                      r._isVirtualEditable() &&
                      (r._destroyEditable(), r._clearEditableState()),
                    r._angularItems("cleanup"),
                    r._endlessFetchInProgress ||
                      (y &&
                        (r._isActiveInTable() ||
                          (r._editContainer &&
                            r._editContainer.data("kendoWindow"))) &&
                        ((h = e.is("th")),
                        (l = h
                          ? e
                              .parent()
                              .children(":not(.k-group-cell)")
                              .index(e[0])
                          : Math.max(r.cellIndex(e), 0))),
                      r._destroyEditable()),
                    r.options.scrollable && r.options.scrollable.endless
                      ? (clearTimeout(r._progressTimeOut),
                        (r._progressTimeOut = setTimeout(function () {
                          r._endlessFetchInProgress || r._progress(!1);
                        }, 100)))
                      : r._progress(!1),
                    r._hideResizeHandle(),
                    (r._data = []),
                    r.columns.length ||
                      (r._autoColumns(r._firstDataItem(f[0], u)),
                      (c = u + r.columns.length)),
                    (r._group = u > 0 || r._group),
                    r._group &&
                      (r._templates(),
                      r._updateCols(),
                      r._updateLockedCols(),
                      r._updateHeader(u),
                      (r._group = u > 0),
                      (r._groupRows = tu(f))),
                    r.content && (a = r.content.scrollLeft()),
                    (v = r._skipRerenderItemsCount),
                    r._renderContent(f, c, u),
                    r.options.scrollable &&
                      r.options.scrollable.endless &&
                      this.lockedContent &&
                      (r._skipRerenderItemsCount = v),
                    r._renderLockedContent(f, c, u),
                    r._footer(),
                    r._renderNoRecordsContent(),
                    r._togglePagerVisibility(),
                    r._setContentHeight(),
                    r._setContentWidth(r.content && a),
                    r.lockedTable &&
                      (r.options.scrollable.virtual
                        ? r.content
                            .find(">.k-virtual-scrollable-wrap")
                            .trigger("scroll")
                        : r.touchScroller
                        ? r.touchScroller.movable.trigger("change")
                        : (r.wrapper.one("scroll", function (n) {
                            n.stopPropagation();
                          }),
                          r.content.trigger("scroll"))),
                    r._endlessFetchInProgress || r._restoreCurrent(l, h),
                    r.touchScroller && r.touchScroller.contentResized(),
                    r.selectable && r.selectable.resetTouchEvents(),
                    r._muteAngularRebind(function () {
                      r._angularItems("compile");
                    }),
                    r._checkBoxSelection && r._toggleHeaderCheckState(!1),
                    r.options.persistSelection &&
                    ((r.selectable &&
                      !i.ui.Selectable.parseOptions(r.options.selectable)
                        .cell) ||
                      r._checkBoxSelection) &&
                    r.items().length
                      ? r._restoreSelection()
                      : (r._selectedIds = {}),
                    r.trigger(lu)));
              },
              _restoreCurrent: function (i, r) {
                var f, u, e;
                i === t ||
                  i < 0 ||
                  (this._removeCurrent(),
                  r
                    ? this._setCurrent(
                        this.thead.find("th:not(.k-group-cell)").eq(i)
                      )
                    : ((f = 0),
                      this._rowVirtualIndex
                        ? (f = this.virtualScrollable.position(
                            this._rowVirtualIndex
                          ))
                        : (i = 0),
                      (u = n()),
                      this.lockedTable &&
                        (u = this.lockedTable.find(">tbody>tr").eq(f)),
                      (u = u.add(this.tbody.children().eq(f))),
                      (e = u
                        .find(">td:not(.k-group-cell):not(.k-hierarchy-cell)")
                        .eq(i)),
                      this._setCurrent(e)),
                  this._current && b(this._current.closest("table")[0], !0));
              },
              _restoreSelection: function () {
                var t,
                  n = this,
                  i = n.items(),
                  r = fi(n.dataSource.options.schema.model)
                    ? n.dataSource.options.schema.model.fn.idField
                    : n.dataSource.options.schema.model.id;
                t = v(i, function (t) {
                  var i = n.dataItem(t)[r];
                  if (n._selectedIds[i]) return t;
                });
                n.select(t);
              },
              _angularItems: function (n) {
                i.ui.DataBoundWidget.fn._angularItems.call(this, n);
                "cleanup" !== n ||
                  (this.dataSource && this.dataSource.options.endless) ||
                  this._cleanupDetailItems();
                this._angularGroupItems(n);
                this._angularGroupFooterItems(n);
              },
              _cleanupDetailItems: function () {
                var n = this;
                n._hasDetails() &&
                  (n.angular("cleanup", function () {
                    return { elements: n.tbody.children(".k-detail-row") };
                  }),
                  n.tbody.find(".k-detail-cell").empty());
              },
              _angularGroupItems: function (t) {
                var i = this,
                  r = i.tbody;
                i.lockedContent && (r = i.lockedTable.find("tbody"));
                i._group &&
                  i.angular(t, function () {
                    return {
                      elements: r.children(".k-grouping-row"),
                      data: n.map(tu(i.dataSource.view()), function (n) {
                        return { dataItem: n };
                      }),
                    };
                  });
              },
              _angularGroupFooterItems: function (t) {
                var i = this,
                  r = i.tbody;
                i.lockedContent && (r = i.element);
                i._group &&
                  i.groupFooterTemplate &&
                  i.angular(t, function () {
                    return {
                      elements: r.find(".k-group-footer"),
                      data: n.map(bf(i.dataSource.view()), function (n) {
                        return { dataItem: n };
                      }),
                    };
                  });
              },
              _renderContent: function (n, t, i) {
                var u,
                  s,
                  h,
                  o,
                  r = this,
                  f = "",
                  e = null != r.lockedContent,
                  c = null,
                  l = r.options.scrollable,
                  a = {
                    rowTemplate: r.rowTemplate,
                    altRowTemplate: r.altRowTemplate,
                    groupFooterTemplate: r.groupFooterTemplate,
                    groupHeaderColumnTemplate: r.groupHeaderColumnTemplate,
                  };
                if (
                  (l &&
                    l.endless &&
                    !r.dataSource.options.endless &&
                    ((r._skipRerenderItemsCount = 0),
                    r.content && (r.content[0].scrollTop = 0)),
                  (c = r._skipRerenderItemsCount > 0),
                  (t = e ? t - ft(ir(r.columns)).length : t),
                  i > 0)
                )
                  for (
                    t = e ? t - i : t,
                      r.detailTemplate && t++,
                      r.groupFooterTemplate &&
                        (r._groupAggregatesDefaultObject =
                          r.dataSource.aggregates()),
                      r.options.scrollable.endless &&
                        (o = r.dataSource.flatView().length),
                      u = 0,
                      s = n.length;
                    u < s;
                    u++
                  )
                    r._skippedGroups || (r._skippedGroups = []),
                      (h =
                        o && u === n.length - 1 && o !== r.dataSource.total()),
                      (f += r._groupRowHtml(n[u], t, 0, e ? re : er, a, e, h));
                else f += r._rowsHtml(n, a);
                c
                  ? (r.tbody.append(f),
                    clearTimeout(r._endlessFetchTimeOut),
                    (r._endlessFetchTimeOut = setTimeout(function () {
                      r._groupToCollapse &&
                        (r.collapseGroup(r._groupToCollapse),
                        (r._groupToCollapse = null));
                    })),
                    (r._endlessFetchInProgress = null))
                  : (r.tbody = vf(r.tbody, r.table, f, this.options.$angular));
              },
              _renderGroupRows: function () {
                var g,
                  y,
                  nt,
                  p,
                  tt,
                  r,
                  h,
                  w,
                  b,
                  et,
                  l,
                  k,
                  it,
                  e,
                  s,
                  rt,
                  ot,
                  t = this,
                  d = t._groupRows,
                  st = t.wrapper.find(".k-grouping-row"),
                  a = t._groups(),
                  ht = null != t.lockedContent;
                st.each(function (st, ct) {
                  e = n(ct);
                  et = e.closest("table").parent();
                  l = et.is("." + ds);
                  y = ft(l ? o(c(t.columns)) : o(ut(t.columns)));
                  s = e.find("." + gs).length;
                  ht
                    ? ((g = l ? er : re),
                      (nt = l ? y.length + a - s : y.length))
                    : ((g = er), (nt = y.length + a - s));
                  p = st >= d.length ? d[st - d.length] : d[st];
                  tt = p.field;
                  r =
                    v(u(t.columns), function (n) {
                      return n.field == tt;
                    })[0] || {};
                  ot =
                    !(
                      r.groupHeaderTemplate ||
                      !o(t.columns)[0].groupHeaderColumnTemplate
                    ) && o(t.columns)[0];
                  h = r.groupHeaderTemplate
                    ? r.groupHeaderTemplate
                    : o(t.columns)[0].groupHeaderColumnTemplate;
                  w =
                    (r.title || tt) +
                    ": " +
                    pf(p.value, r.format, r.values, r.encoded);
                  a = a;
                  b = t._groupData(p, !1, ot);
                  rt = l
                    ? t.lockedGroupHeaderColumnTemplate
                    : t.groupHeaderColumnTemplate;
                  h && (w = typeof h === pt ? h(b) : i.template(h)(b));
                  k = e.prev().length ? e.prev() : e.parent();
                  it = n(
                    rt
                      ? rt(f({}, b, { groupCells: s, colspan: a - s, text: w }))
                      : g(nt, s, w)
                  );
                  k.is("tbody") ? k.prepend(it) : k.after(it);
                  e.remove();
                });
              },
              _renderLockedContent: function (n, t, i) {
                var r,
                  s,
                  f,
                  e = "",
                  h = null,
                  c = {
                    rowTemplate: this.lockedRowTemplate,
                    altRowTemplate: this.lockedAltRowTemplate,
                    groupFooterTemplate: this.lockedGroupFooterTemplate,
                    groupHeaderColumnTemplate:
                      this.lockedGroupHeaderColumnTemplate,
                  };
                if (this.lockedContent) {
                  if (
                    ((f = this.lockedTable),
                    (h = this._skipRerenderItemsCount > 0),
                    i > 0)
                  )
                    for (
                      t -= o(u(ut(this.columns))).length, r = 0, s = n.length;
                      r < s;
                      r++
                    )
                      e += this._groupRowHtml(
                        n[r],
                        t,
                        0,
                        er,
                        c,
                        !1,
                        this.options.scrollable.endless && r === n.length - 1
                      );
                  else e = this._rowsHtml(n, c);
                  h
                    ? f.children("tbody").append(e)
                    : vf(f.children("tbody"), f, e, this.options.$angular);
                  this._syncLockedContentHeight();
                }
              },
              _togglePagerVisibility: function () {
                this.options.pageable.alwaysVisible === !1 &&
                  this.wrapper
                    .find(".k-grid-pager")
                    .toggle(
                      this.dataSource.total() >= this.dataSource.pageSize()
                    );
              },
              _adjustRowsHeight: function (n, t) {
                for (
                  var f,
                    e,
                    o,
                    r = n[0].rows,
                    s = r.length,
                    u = t[0].rows,
                    h = n.add(t),
                    l = h.length,
                    c = [],
                    i = 0;
                  i < s && u[i];
                  i++
                )
                  r[i].style.height &&
                    (r[i].style.height = u[i].style.height = "");
                for (i = 0; i < s && u[i]; i++)
                  (f = r[i].offsetHeight),
                    (e = u[i].offsetHeight),
                    (o = 0),
                    f > e ? (o = f) : f < e && (o = e),
                    c.push(o);
                for (i = 0; i < l; i++) h[i].style.display = "none";
                for (i = 0; i < s; i++)
                  c[i] &&
                    (r[i].style.height = u[i].style.height = c[i] + 1 + "px");
                for (i = 0; i < l; i++) h[i].style.display = "";
              },
            });
          i.ExcelMixin && i.ExcelMixin.extend(oi.prototype);
          i.PDFMixin &&
            (i.PDFMixin.extend(oi.prototype),
            (oi.prototype._drawPDF_autoPageBreak = function (r) {
              function y() {
                c && s !== t
                  ? (u.one("change", a), u.page(s))
                  : (f.refresh(), a());
              }
              function a() {
                l.appendTo(document.body);
                var t = n.extend({}, f.options.pdf, {
                  _destructive: !0,
                  progress: function (n) {
                    r.notify({
                      page: n.page,
                      pageNumber: n.pageNum,
                      progress: 0.5 + n.pageNum / n.totalPages / 2,
                      totalPages: n.totalPages,
                    });
                  },
                });
                i.drawing
                  .drawDOM(e, t)
                  .always(function () {
                    l.remove();
                  })
                  .then(function (n) {
                    h.resolve(n);
                  })
                  .fail(function (n) {
                    h.reject(n);
                  });
              }
              function o() {
                var n = u.page(),
                  t = c ? u.totalPages() : 1;
                v.append(p.find("tr"));
                n < t ? u.page(n + 1) : (u.unbind("change", o), y());
              }
              var v,
                s,
                f = this,
                h = new n.Deferred(),
                u = f.dataSource,
                c = f.options.pdf.allPages,
                p = f.wrapper.find('table[role$="grid"] > tbody'),
                l = n("<div>").css({
                  position: "absolute",
                  left: -1e4,
                  top: -1e4,
                }),
                e = f.wrapper
                  .clone()
                  .css({ height: "auto", width: "auto" })
                  .appendTo(l);
              return (
                e
                  .find(".k-grid-content")
                  .css({ height: "auto", width: "auto", overflow: "visible" }),
                e
                  .find('table[role$="grid"], .k-grid-footer table')
                  .css({ height: "auto", width: "100%", overflow: "visible" }),
                e
                  .find(".k-grid-pager, .k-grid-toolbar, .k-grouping-header")
                  .remove(),
                e
                  .find(".k-grid-header, .k-grid-footer, .k-auto-scrollable")
                  .css({ paddingRight: 0 }),
                this._initPDFProgress(r),
                (v = e.find('table[role$="grid"] > tbody').empty()),
                (s = u.page()),
                c ? (u.bind("change", o), u.page(1)) : o(),
                h.promise()
              );
            }),
            (oi.prototype._drawPDF = function (r) {
              function l() {
                o && c !== t
                  ? (u.unbind("change", h),
                    u.one("change", function () {
                      e.resolve(s);
                    }),
                    u.page(c))
                  : e.resolve(s);
              }
              function h() {
                f._drawPDFShadow(
                  { width: f.wrapper.width() },
                  { avoidLinks: f.options.pdf.avoidLinks }
                )
                  .done(function (n) {
                    var t = u.page(),
                      i = o ? u.totalPages() : 1,
                      f = {
                        page: n,
                        pageNumber: t,
                        progress: t / i,
                        totalPages: i,
                      };
                    r.notify(f);
                    s.append(f.page);
                    t < i ? u.page(t + 1) : l();
                  })
                  .fail(function (n) {
                    e.reject(n);
                  });
              }
              var e,
                u,
                o,
                s,
                c,
                f = this;
              return f.options.pdf.paperSize &&
                "auto" != f.options.pdf.paperSize
                ? f._drawPDF_autoPageBreak(r)
                : ((e = new n.Deferred()),
                  (u = f.dataSource),
                  (o = f.options.pdf.allPages),
                  this._initPDFProgress(r),
                  (s = new i.drawing.Group()),
                  (c = u.page()),
                  o ? (u.bind("change", h), u.page(1)) : h(),
                  e.promise());
            }),
            (oi.prototype._initPDFProgress = function (t) {
              var u,
                r = n(
                  "<div class='k-loading-pdf-mask'><div class='k-loading-color'/></div>"
                );
              r.prepend(
                this.wrapper
                  .clone()
                  .css({ position: "absolute", top: 0, left: 0 })
              );
              this.wrapper.append(r);
              u = n("<div class='k-loading-pdf-progress'>")
                .appendTo(r)
                .kendoProgressBar({
                  type: "chunk",
                  chunkCount: 10,
                  min: 0,
                  max: 1,
                  value: 0,
                })
                .data("kendoProgressBar");
              t.progress(function (n) {
                u.value(n.progress);
              }).always(function () {
                i.destroy(r);
                r.remove();
              });
            }));
          lt.plugin(oi);
          lt.plugin(bo);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.listview.min",
      ["kendo.data.min", "kendo.editable.min", "kendo.selectable.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          var i = window.kendo,
            f = "change",
            c = "cancel",
            l = "dataBound",
            a = "dataBinding",
            o = i.ui.Widget,
            r = i.keys,
            v = ">*:not(.k-loading-mask)",
            y = "progress",
            p = "error",
            s = "k-state-focused",
            w = "k-state-selected",
            h = "k-edit-item",
            b = "edit",
            k = "remove",
            d = "save",
            g = "mousedown",
            rt = "click",
            nt = "touchstart",
            u = ".kendoListView",
            e = n.proxy,
            tt = i._activeElement,
            it = i.ui.progress,
            ut = i.data.DataSource,
            ft = i.ui.DataBoundWidget.extend({
              init: function (t, r) {
                var u = this;
                r = n.isArray(r) ? { dataSource: r } : r;
                o.fn.init.call(u, t, r);
                r = u.options;
                u.wrapper = t = u.element;
                t[0].id && (u._itemId = t[0].id + "_lv_active");
                u._element();
                u._dataSource();
                u._templates();
                u._navigatable();
                u._selectable();
                u._pageable();
                u._crudHandlers();
                u._scrollable();
                u.options.autoBind && u.dataSource.fetch();
                i.notify(u);
              },
              events: [f, c, a, l, b, k, d],
              options: {
                name: "ListView",
                autoBind: !0,
                selectable: !1,
                navigatable: !1,
                height: null,
                template: "",
                altTemplate: "",
                editTemplate: "",
              },
              setOptions: function (n) {
                o.fn.setOptions.call(this, n);
                this._templates();
                this.selectable &&
                  (this.selectable.destroy(), (this.selectable = null));
                this._selectable();
              },
              _templates: function () {
                var n = this.options;
                this.template = i.template(n.template || "");
                this.altTemplate = i.template(n.altTemplate || n.template);
                this.editTemplate = i.template(n.editTemplate || "");
              },
              _item: function (n) {
                return this.element.children()[n]();
              },
              items: function () {
                return this.element.children();
              },
              dataItem: function (t) {
                var r = i.attr("uid"),
                  u = n(t)
                    .closest("[" + r + "]")
                    .attr(r);
                return this.dataSource.getByUid(u);
              },
              setDataSource: function (n) {
                this.options.dataSource = n;
                this._dataSource();
                this.options.autoBind && n.fetch();
              },
              _unbindDataSource: function () {
                var n = this;
                n.dataSource
                  .unbind(f, n._refreshHandler)
                  .unbind(y, n._progressHandler)
                  .unbind(p, n._errorHandler);
              },
              _dataSource: function () {
                var n = this;
                n.dataSource && n._refreshHandler
                  ? n._unbindDataSource()
                  : ((n._refreshHandler = e(n.refresh, n)),
                    (n._progressHandler = e(n._progress, n)),
                    (n._errorHandler = e(n._error, n)));
                n.dataSource = ut
                  .create(n.options.dataSource)
                  .bind(f, n._refreshHandler)
                  .bind(y, n._progressHandler)
                  .bind(p, n._errorHandler);
              },
              _progress: function (n) {
                var t = this.element;
                it(t, n, { opacity: !0 });
              },
              _error: function () {
                it(this.element, !1);
              },
              _element: function () {
                var n = this.options.height;
                this.element
                  .addClass("k-widget k-listview")
                  .attr("role", "listbox");
                n && this.element.css("height", n);
              },
              refresh: function (n) {
                var e,
                  h,
                  f,
                  u,
                  s,
                  r = this,
                  o = r.dataSource.view(),
                  c = "",
                  y = r.template,
                  w = r.altTemplate,
                  b = tt(),
                  v = r._endlessFetchInProgress,
                  p = v ? r._skipRerenderItemsCount : 0,
                  k = r.options.scrollable;
                if (((n = n || {}), "itemchange" === n.action))
                  return (
                    r._hasBindingTarget() ||
                      r.editable ||
                      ((e = n.items[0]),
                      (f = r
                        .items()
                        .filter("[" + i.attr("uid") + "=" + e.uid + "]")),
                      f.length > 0 &&
                        ((u = f.index()),
                        r.angular("cleanup", function () {
                          return { elements: [f] };
                        }),
                        f.replaceWith(y(e)),
                        (f = r.items().eq(u)),
                        f.attr(i.attr("uid"), e.uid),
                        r.angular("compile", function () {
                          return { elements: [f], data: [{ dataItem: e }] };
                        }),
                        r.trigger("itemChange", { item: f, data: e }))),
                    t
                  );
                if (
                  !r.trigger(a, {
                    action: n.action || "rebind",
                    items: n.items,
                    index: n.index,
                  })
                ) {
                  for (
                    r._angularItems("cleanup"),
                      v || r._destroyEditable(),
                      u = p,
                      s = o.length;
                    u < s;
                    u++
                  )
                    c += u % 2 ? w(o[u]) : y(o[u]);
                  for (
                    v ? r.element.append(c) : r.element.html(c),
                      h = r.items().not(".k-loading-mask"),
                      u = p,
                      s = o.length;
                    u < s;
                    u++
                  )
                    h.eq(u)
                      .attr(i.attr("uid"), o[u].uid)
                      .attr("role", "option")
                      .attr("aria-selected", "false");
                  r.element[0] === b &&
                    r.options.navigatable &&
                    (r._focusNext
                      ? r.current(r.current().next())
                      : k || r.current(h.eq(0)));
                  r._angularItems("compile");
                  r._progress(!1);
                  r._endlessFetchInProgress = null;
                  r.trigger(l, {
                    action: n.action || "rebind",
                    items: n.items,
                    index: n.index,
                  });
                }
              },
              _pageable: function () {
                var u,
                  f,
                  t = this,
                  r = t.options.pageable;
                n.isPlainObject(r) &&
                  ((f = r.pagerId),
                  (u = n.extend({}, r, {
                    dataSource: t.dataSource,
                    pagerId: null,
                  })),
                  (t.pager = new i.ui.Pager(n("#" + f), u)));
              },
              _selectable: function () {
                var o,
                  e,
                  n = this,
                  s = n.options.selectable,
                  h = n.options.navigatable;
                s &&
                  ((o = i.ui.Selectable.parseOptions(s).multiple),
                  (n.selectable = new i.ui.Selectable(n.element, {
                    aria: !0,
                    multiple: o,
                    filter: v,
                    change: function () {
                      n.trigger(f);
                    },
                  })),
                  h &&
                    n.element.on("keydown" + u, function (i) {
                      if (i.keyCode === r.SPACEBAR) {
                        if (
                          ((e = n.current()),
                          i.target == i.currentTarget && i.preventDefault(),
                          o)
                        )
                          if (i.ctrlKey) {
                            if (e && e.hasClass(w)) return e.removeClass(w), t;
                          } else n.selectable.clear();
                        else n.selectable.clear();
                        n.selectable.value(e);
                      }
                    }));
              },
              _scrollable: function () {
                var t,
                  n = this,
                  i = n.options.scrollable;
                i &&
                  (n.element.css({
                    "overflow-y": "scroll",
                    position: "relative",
                    "-webkit-overflow-scrolling": "touch",
                  }),
                  "endless" === i &&
                    ((t = n._endlessPageSize = n.dataSource.options.pageSize),
                    n.element.off("scroll" + u).on("scroll" + u, function () {
                      this.scrollTop + this.clientHeight - this.scrollHeight >=
                        -15 &&
                        !n._endlessFetchInProgress &&
                        n._endlessPageSize < n.dataSource.total() &&
                        ((n._skipRerenderItemsCount = n._endlessPageSize),
                        (n._endlessPageSize = n._skipRerenderItemsCount + t),
                        (n.dataSource.options.endless = !0),
                        (n._endlessFetchInProgress = !0),
                        n.dataSource.pageSize(n._endlessPageSize));
                    })));
              },
              current: function (n) {
                var r = this,
                  f = r.element,
                  i = r._current,
                  u = r._itemId;
                return n === t
                  ? i
                  : (i &&
                      i[0] &&
                      (i[0].id === u && i.removeAttr("id"),
                      i.removeClass(s),
                      f.removeAttr("aria-activedescendant")),
                    n &&
                      n[0] &&
                      ((u = n[0].id || u),
                      r._scrollTo(n[0]),
                      f.attr("aria-activedescendant", u),
                      n.addClass(s).attr("id", u)),
                    (r._current = n),
                    t);
              },
              _scrollTo: function (t) {
                var i,
                  f,
                  u = this,
                  e = !1,
                  r = "scroll";
                "auto" == u.wrapper.css("overflow") ||
                u.wrapper.css("overflow") == r ||
                u.wrapper.css("overflow-y") == r
                  ? (i = u.wrapper[0])
                  : ((i = window), (e = !0));
                f = function (u, f) {
                  var o = e ? n(t).offset()[u.toLowerCase()] : t["offset" + u],
                    s = t["client" + f],
                    h = n(i)[r + u](),
                    c = n(i)[f.toLowerCase()]();
                  o + s > h + c
                    ? n(i)[r + u](o + s - c)
                    : o < h && n(i)[r + u](o);
                };
                f("Top", "Height");
                f("Left", "Width");
              },
              _navigatable: function () {
                var t = this,
                  o = t.options.navigatable,
                  f = t.element,
                  c = function (r) {
                    t.current(n(r.currentTarget));
                    n(r.target).is(":button,a,:input,a>.k-icon,textarea") ||
                      i.focusElement(f);
                  };
                o &&
                  (t._tabindex(),
                  f
                    .on("focus" + u, function () {
                      var n = t._current;
                      (n && n.is(":visible")) || (n = t._item("first"));
                      t.current(n);
                    })
                    .on("focusout" + u, function () {
                      t._current && t._current.removeClass(s);
                    })
                    .on("keydown" + u, function (u) {
                      var l,
                        v,
                        o = u.keyCode,
                        e = t.current(),
                        y = n(u.target),
                        p = !y.is(":button,textarea,a,a>.t-icon,input"),
                        a = y.is(":text,:password"),
                        s = i.preventDefault,
                        c = f.find("." + h),
                        w = tt(),
                        b = t.options.scrollable;
                      if (
                        !(
                          (!p && !a && r.ESC != o) ||
                          (a && r.ESC != o && r.ENTER != o)
                        )
                      )
                        if (r.UP === o || r.LEFT === o)
                          e && e[0] && (e = e.prev()),
                            e && e[0]
                              ? t.current(e)
                              : b || t.current(t._item("last")),
                            s(u);
                        else if (r.DOWN === o || r.RIGHT === o)
                          b
                            ? "endless" !== t.options.scrollable ||
                              e.next().length
                              ? ((e = e.next()), e && e[0] && t.current(e))
                              : ((t.element[0].scrollTop =
                                  t.element[0].scrollHeight),
                                (t._focusNext = !0))
                            : ((e = e.next()),
                              t.current(e && e[0] ? e : t._item("first"))),
                            s(u);
                        else if (r.PAGEUP === o)
                          t.current(null),
                            t.dataSource.page(t.dataSource.page() - 1),
                            s(u);
                        else if (r.PAGEDOWN === o)
                          t.current(null),
                            t.dataSource.page(t.dataSource.page() + 1),
                            s(u);
                        else if (r.HOME === o)
                          t.current(t._item("first")), s(u);
                        else if (r.END === o) t.current(t._item("last")), s(u);
                        else if (r.ENTER === o)
                          0 !== c.length && (p || a)
                            ? ((l = t.items().index(c)),
                              w && w.blur(),
                              t.save(),
                              (v = function () {
                                t.element.trigger("focus");
                                t.current(t.items().eq(l));
                              }),
                              t.one("dataBound", v))
                            : "" !== t.options.editTemplate && t.edit(e);
                        else if (r.ESC === o) {
                          if (((c = f.find("." + h)), 0 === c.length)) return;
                          l = t.items().index(c);
                          t.cancel();
                          t.element.trigger("focus");
                          t.current(t.items().eq(l));
                        }
                    }),
                  f.on(g + u + " " + nt + u, v, e(c, t)));
              },
              clearSelection: function () {
                var n = this;
                n.selectable.clear();
                n.trigger(f);
              },
              select: function (i) {
                var u = this,
                  r = u.selectable;
                return (
                  (i = n(i)),
                  i.length
                    ? (r.options.multiple || (r.clear(), (i = i.first())),
                      r.value(i),
                      t)
                    : r.value()
                );
              },
              _destroyEditable: function () {
                var n = this;
                n.editable && (n.editable.destroy(), delete n.editable);
              },
              _modelFromElement: function (n) {
                var t = n.attr(i.attr("uid"));
                return this.dataSource.getByUid(t);
              },
              _closeEditable: function () {
                var r,
                  u,
                  f,
                  n = this,
                  t = n.editable,
                  e = n.template;
                return (
                  t &&
                    (t.element.index() % 2 && (e = n.altTemplate),
                    n.angular("cleanup", function () {
                      return { elements: [t.element] };
                    }),
                    (r = n._modelFromElement(t.element)),
                    n._destroyEditable(),
                    (f = t.element.index()),
                    t.element.replaceWith(e(r)),
                    (u = n.items().eq(f)),
                    u.attr(i.attr("uid"), r.uid),
                    n._hasBindingTarget() && i.bind(u, r),
                    n.angular("compile", function () {
                      return { elements: [u], data: [{ dataItem: r }] };
                    })),
                  !0
                );
              },
              edit: function (n) {
                var u,
                  f,
                  t = this,
                  r = t._modelFromElement(n),
                  e = r.uid;
                t.cancel();
                n = t.items().filter("[" + i.attr("uid") + "=" + e + "]");
                f = n.index();
                n.replaceWith(t.editTemplate(r));
                u = t.items().eq(f).addClass(h).attr(i.attr("uid"), r.uid);
                t.editable = u
                  .kendoEditable({
                    model: r,
                    clearContainer: !1,
                    errorTemplate: !1,
                    target: t,
                  })
                  .data("kendoEditable");
                t.trigger(b, { model: r, item: u });
              },
              save: function () {
                var r,
                  t,
                  n = this,
                  i = n.editable;
                i &&
                  ((t = i.element),
                  (r = n._modelFromElement(t)),
                  i.end() &&
                    !n.trigger(d, { model: r, item: t }) &&
                    (n._closeEditable(), n.dataSource.sync()));
              },
              remove: function (n) {
                var t = this,
                  i = t.dataSource,
                  r = t._modelFromElement(n);
                t.editable &&
                  (i.cancelChanges(t._modelFromElement(t.editable.element)),
                  t._closeEditable());
                t.trigger(k, { model: r, item: n }) ||
                  (n.hide(), i.remove(r), i.sync());
              },
              add: function () {
                var r,
                  n = this,
                  t = n.dataSource,
                  i = t.indexOf((t.view() || [])[0]);
                i < 0 && (i = 0);
                n.cancel();
                r = t.insert(i, {});
                n.edit(n.element.find("[data-uid='" + r.uid + "']"));
              },
              cancel: function () {
                var t,
                  i,
                  n = this,
                  r = n.dataSource;
                n.editable &&
                  ((t = n.editable.element),
                  (i = n._modelFromElement(t)),
                  n.trigger(c, { model: i, container: t }) ||
                    (r.cancelChanges(i), n._closeEditable()));
              },
              _crudHandlers: function () {
                var t = this,
                  r = g + u,
                  f = nt + u,
                  e = rt + u;
                t.element.on(r + " " + f, ".k-edit-button", function (r) {
                  r.preventDefault();
                  var u = n(this).closest("[" + i.attr("uid") + "]");
                  setTimeout(function () {
                    t.edit(u);
                  });
                });
                t.element.on(r + " " + f, ".k-delete-button", function (r) {
                  r.preventDefault();
                  var u = n(this).closest("[" + i.attr("uid") + "]");
                  setTimeout(function () {
                    t.remove(u);
                  });
                });
                t.element.on(e, ".k-update-button", function (n) {
                  t.save();
                  n.preventDefault();
                });
                t.element.on(e, ".k-cancel-button", function (n) {
                  t.cancel();
                  n.preventDefault();
                });
              },
              destroy: function () {
                var n = this;
                o.fn.destroy.call(n);
                n._unbindDataSource();
                n._destroyEditable();
                n.element.off(u);
                n._endlessFetchInProgress =
                  n._endlessPageSize =
                  n._skipRerenderItemsCount =
                  n._focusNext =
                    null;
                n.pager && n.pager.destroy();
                i.destroy(n.element);
              },
            });
          i.ui.plugin(ft);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.listbox.min",
      ["kendo.draganddrop.min", "kendo.data.min", "kendo.selectable.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function ut(t) {
            return n.map(t, function (t) {
              return n(t).index();
            });
          }
          function kt(n) {
            return t === n;
          }
          function bi(n) {
            return n
              .clone()
              .removeClass(tt)
              .removeClass(l)
              .addClass(i.format("{0} {1} {2}", b, sr, ur))
              .width(n.width());
          }
          function dt() {
            return n("<li>").addClass(fr);
          }
          function ki(t) {
            return n(t).is(
              ":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,label.k-checkbox-label,.k-input,.k-multiselect-wrap,.k-picker-wrap,.k-picker-wrap>.k-selected-color,.k-tool-icon,.k-dropdown"
            );
          }
          var r,
            d,
            gt,
            ft,
            ni,
            ti,
            et,
            ot,
            st,
            ii,
            ri,
            p,
            i = window.kendo,
            g = i.attr,
            di = i.data,
            u = i.keys,
            gi = i.template,
            ui = i.ui.Widget,
            nr = di.DataSource,
            fi = i.ui.Selectable,
            ei = i.ui.DataBoundWidget,
            ht = i.Class,
            s = n.extend,
            e = n.noop,
            f = n.proxy,
            w = "-",
            oi = ".",
            tr = " ",
            si = "#",
            nt = "kendoListBox",
            v = oi + nt,
            h = "k-state-disabled",
            b = "k-state-selected",
            o = ".k-item:not(.k-state-disabled)",
            ir = ".k-list:not(.k-state-disabled) >" + o,
            c = "k-listbox-toolbar",
            rr = "li > a.k-button:not(.k-state-disabled)",
            l = "k-state-focused",
            ur = "k-drag-clue",
            fr = "k-drop-hint",
            er = "k-reset k-list",
            or = ".k-reset.k-list",
            sr = "k-reset",
            hi = "click" + v,
            hr = "keydown" + v,
            cr = "blur" + v,
            lr = i._outerWidth,
            ar = i._outerHeight,
            y = "change",
            ci = "dataBound",
            ct = "add",
            a = "remove",
            lt = "reorder",
            at = "moveUp",
            vt = "moveDown",
            yt = "transferTo",
            pt = "transferFrom",
            wt = "transferAllTo",
            bt = "transferAllFrom",
            tt = "k-ghost",
            it = "uid",
            k = "tabindex",
            vr = "command",
            li = "dragstart",
            ai = "drag",
            vi = "drop",
            yi = "dragend",
            yr = "ul.k-reset.k-list>li.k-item",
            rt = "right",
            pi = "bottom",
            pr = [c + w + "left", c + w + rt, c + w + "top", c + w + pi],
            wi = ei.extend({
              init: function (n, t) {
                var i = this;
                ui.fn.init.call(i, n, t);
                i._wrapper();
                i._list();
                n = i.element.attr("multiple", "multiple").hide();
                n[0] &&
                  !i.options.dataSource &&
                  ((i.options.dataTextField =
                    i.options.dataTextField || "text"),
                  (i.options.dataValueField =
                    i.options.dataValueField || "value"));
                i._templates();
                i._selectable();
                i._dataSource();
                i._createToolbar();
                i._createDraggable();
                i._createNavigatable();
              },
              destroy: function () {
                var n = this;
                ei.fn.destroy.call(n);
                isNaN(n._listTabIndex) ||
                  (n._getList().off(), (n._listTabIndex = null));
                n._unbindDataSource();
                n._destroySelectable();
                n._destroyToolbar();
                n.wrapper.off(v);
                n._target && (n._target = null);
                n._draggable &&
                  (n._draggable.destroy(), (n.placeholder = null));
                i.destroy(n.element);
              },
              setOptions: function (n) {
                ui.fn.setOptions.call(this, n);
                this._templates();
                this._dataSource();
              },
              events: [y, ci, ct, a, lt, li, ai, vi, yi],
              options: {
                name: "ListBox",
                autoBind: !0,
                template: "",
                dataTextField: "",
                dataValueField: "",
                selectable: "single",
                draggable: null,
                dropSources: [],
                connectWith: "",
                navigatable: !0,
                toolbar: { position: rt, tools: [] },
                messages: {
                  tools: {
                    remove: "Delete",
                    moveUp: "Move Up",
                    moveDown: "Move Down",
                    transferTo: "Transfer To",
                    transferFrom: "Transfer From",
                    transferAllTo: "Transfer All To",
                    transferAllFrom: "Transfer All From",
                  },
                },
              },
              add: function (n) {
                var t,
                  i = this,
                  r = n && n.length ? n : [n],
                  u = r.length;
                for (i._unbindDataSource(), t = 0; t < u; t++) i._addItem(r[t]);
                i._bindDataSource();
                i._syncElement();
              },
              _addItem: function (t) {
                var i = this,
                  r = i.templates.itemTemplate({
                    item: t,
                    r: i.templates.itemContent,
                  });
                n(r).attr(g(it), t.uid).appendTo(i._getList());
                "string" == typeof t
                  ? i.dataSource._data.push(t)
                  : i.dataSource.add(t);
              },
              _addItemAt: function (t, i) {
                var r = this,
                  u = r.templates.itemTemplate({
                    item: t,
                    r: r.templates.itemContent,
                  });
                r._unbindDataSource();
                "string" == typeof t
                  ? (r._insertElementAt(u, i), r.dataSource._data.push(t))
                  : (r._insertElementAt(n(u).attr(g(it), t.uid), i),
                    r.dataSource.add(t));
                r._bindDataSource();
                r._syncElement();
              },
              _insertElementAt: function (t, i) {
                var u = this,
                  r = u._getList();
                i > 0
                  ? n(t).insertAfter(r.children().eq(i - 1))
                  : n(r).prepend(t);
              },
              _createNavigatable: function () {
                var n = this,
                  t = n.options;
                t.navigatable &&
                  n
                    ._getList()
                    .on(hi, o, f(n._click, n))
                    .on(hr, f(n._keyDown, n))
                    .on(cr, f(n._blur, n));
              },
              _getTabIndex: function () {
                var t,
                  n = this;
                return isNaN(n._listTabIndex)
                  ? ((t = n.element.attr(k)),
                    (n._listTabIndex = isNaN(t) ? 0 : t),
                    n.element.removeAttr(k),
                    n._listTabIndex)
                  : n._listTabIndex;
              },
              _blur: function () {
                this._target &&
                  (this._target.removeClass(l),
                  this._getList().removeAttr("aria-activedescendant"));
                this._target = null;
              },
              _click: function (t) {
                var r = this,
                  u = n(t.currentTarget),
                  f = r._target,
                  e = ki(t.target);
                f && f.removeClass(l);
                r._target = u;
                u.addClass(l);
                r._getList().attr("aria-activedescendant", u.attr("id"));
                r._getList()[0] === i._activeElement() || e || r.focus();
              },
              _getNavigatableItem: function (n) {
                var i,
                  t = this;
                return (
                  (i = t._target ? t._target : t.items().filter(o).first()),
                  n === u.UP && t._target && (i = t._target.prevAll(o).first()),
                  n === u.DOWN &&
                    t._target &&
                    (i = t._target.nextAll(o).first()),
                  i.length ? i : null
                );
              },
              _scrollIntoView: function (n) {
                var i, r, t, u, f;
                n &&
                  (n[0] && (n = n[0]),
                  (i = this._getList().parent()[0]),
                  (r = n.offsetTop),
                  (t = i.scrollTop),
                  (u = i.clientHeight),
                  (f = r + n.offsetHeight),
                  t > r ? (t = r) : f > t + u && (t = f - u),
                  (i.scrollTop = t));
              },
              _keyDown: function (n) {
                var f,
                  i = this,
                  r = n.keyCode,
                  e = i._getNavigatableItem(r);
                if (
                  (i._target && i._target.removeClass(l),
                  (!n.shiftKey || n.ctrlKey || (r !== u.DOWN && r !== u.UP)) &&
                    (i._shiftSelecting = !1),
                  r == u.DELETE)
                )
                  i._executeCommand(a),
                    i._target &&
                      (i._target.removeClass(l),
                      i._getList().removeAttr("aria-activedescendant"),
                      (i._target = null)),
                    (f = !0);
                else if (r === u.DOWN || r === u.UP) {
                  if (!e) return n.preventDefault(), t;
                  if (n.shiftKey && !n.ctrlKey)
                    i._shiftSelecting ||
                      (i.clearSelection(), (i._shiftSelecting = !0)),
                      i._target && e.hasClass("k-state-selected")
                        ? (i._target.removeClass(b), i.trigger(y))
                        : i.select(
                            "single" == i.options.selectable
                              ? e
                              : e.add(i._target)
                          );
                  else {
                    if (n.shiftKey && n.ctrlKey)
                      return (
                        i._executeCommand(r === u.DOWN ? vt : at),
                        i._scrollIntoView(i._target),
                        n.preventDefault(),
                        t
                      );
                    n.shiftKey ||
                      n.ctrlKey ||
                      ("multiple" === i.options.selectable &&
                        i.clearSelection(),
                      i.select(e));
                  }
                  i._target = e;
                  i._target
                    ? (i._target.addClass(l),
                      i._scrollIntoView(i._target),
                      i
                        ._getList()
                        .attr("aria-activedescendant", i._target.attr("id")))
                    : i._getList().removeAttr("aria-activedescendant");
                  f = !0;
                } else
                  r == u.SPACEBAR
                    ? (n.ctrlKey && i._target
                        ? i._target.hasClass(b)
                          ? (i._target.removeClass(b), i.trigger(y))
                          : i.select(i._target)
                        : (i.clearSelection(), i.select(i._target)),
                      (f = !0))
                    : n.ctrlKey && r == u.RIGHT
                    ? (i._executeCommand(n.shiftKey ? wt : yt),
                      (i._target = i.select().length ? i.select() : null),
                      (f = !0))
                    : n.ctrlKey &&
                      r == u.LEFT &&
                      (i._executeCommand(n.shiftKey ? bt : pt), (f = !0));
                f && n.preventDefault();
              },
              focus: function () {
                i.focusElement(this._getList());
              },
              _createDraggable: function () {
                var r,
                  t = this,
                  u = t.options.draggable;
                if (u) {
                  if (((r = u.hint), !t.options.selectable))
                    throw Error("Dragging requires selection to be enabled");
                  r || (r = bi);
                  t._draggable = new i.ui.Draggable(t.wrapper, {
                    filter: u.filter ? u.filter : yr,
                    hint: i.isFunction(r) ? r : n(r),
                    dragstart: f(t._dragstart, t),
                    dragcancel: f(t._clear, t),
                    drag: f(t._drag, t),
                    dragend: f(t._dragend, t),
                  });
                }
              },
              _dragstart: function (r) {
                var u = this,
                  f = (u.draggedElement = r.currentTarget),
                  e = u.options.draggable.placeholder,
                  o = u.dataItem(f),
                  s = { dataItems: o, items: n(f), draggableEvent: r };
                return u.options.draggable.enabled === !1
                  ? (r.preventDefault(), t)
                  : (e || (e = dt),
                    (u.placeholder = n(i.isFunction(e) ? e.call(u, f) : e)),
                    f.is(oi + h)
                      ? r.preventDefault()
                      : u.trigger(li, s)
                      ? r.preventDefault()
                      : (u.clearSelection(), u.select(f), f.addClass(tt)),
                    t);
              },
              _clear: function () {
                this.draggedElement.removeClass(tt);
                this.placeholder.remove();
              },
              _findElementUnderCursor: function (t) {
                var r = i.elementUnderCursor(t),
                  u = t.sender;
                return (
                  (n.contains(u.hint[0], r) || u.hint[0] === r) &&
                    (u.hint.hide(),
                    (r = i.elementUnderCursor(t)),
                    u.hint.show()),
                  r
                );
              },
              _findTarget: function (t) {
                var e,
                  r,
                  u = this,
                  i = u._findElementUnderCursor(t),
                  o = n(i),
                  f = u._getList();
                return n.contains(f[0], i)
                  ? ((e = u.items()),
                    (i = o.is("li") ? i : o.closest("li")[0]),
                    (r = e.filter(i)[0] || e.has(i)[0]),
                    r
                      ? ((r = n(r)),
                        r.hasClass(h) ? null : { element: r, listBox: u })
                      : null)
                  : f[0] == i || f.parent()[0] == i
                  ? { element: n(f), appendToBottom: !0, listBox: u }
                  : u._searchConnectedListBox(o);
              },
              _getElementCenter: function (n) {
                var t = n.length ? i.getOffset(n) : null;
                return t && ((t.top += ar(n) / 2), (t.left += lr(n) / 2)), t;
              },
              _searchConnectedListBox: function (t) {
                var i,
                  u,
                  r,
                  f,
                  e = t;
                return (
                  (f = t.hasClass("k-list-scroller k-selectable")
                    ? t
                    : t.closest(".k-list-scroller.k-selectable")),
                  f.length
                    ? ((i = f
                        .parent()
                        .find("[data-role='listbox']")
                        .getKendoListBox()),
                      i &&
                      n.inArray(this.element[0].id, i.options.dropSources) !==
                        -1
                        ? ((u = i.items()),
                          (t = t.is("li") ? t[0] : t.closest("li")[0]),
                          (r = u.filter(t)[0] || u.has(t)[0]),
                          r
                            ? ((r = n(r)),
                              r.hasClass(h) ? null : { element: r, listBox: i })
                            : !u.length ||
                              e.hasClass("k-list-scroller k-selectable") ||
                              e.hasClass("k-reset k-list")
                            ? {
                                element: i._getList(),
                                listBox: i,
                                appendToBottom: !0,
                              }
                            : null)
                        : null)
                    : null
                );
              },
              _drag: function (i) {
                var o,
                  s,
                  f,
                  r = this,
                  e = r.draggedElement,
                  u = r._findTarget(i),
                  h = { left: i.x.location, top: i.y.location },
                  c = r.dataItem(e),
                  l = { dataItems: [c], items: n(e), draggableEvent: i };
                if (r.trigger(ai, l)) return i.preventDefault(), t;
                if (u) {
                  if (
                    ((o = this._getElementCenter(u.element)),
                    (s = {
                      left: Math.round(h.left - o.left),
                      top: Math.round(h.top - o.top),
                    }),
                    u.appendToBottom)
                  )
                    return r._movePlaceholder(u, null, e), t;
                  s.top < 0 ? (f = "prev") : s.top > 0 && (f = "next");
                  f &&
                    u.element[0] != r.placeholder[0] &&
                    r._movePlaceholder(u, f, e);
                } else r.placeholder.parent().length && r.placeholder.remove();
              },
              _movePlaceholder: function (t, r, u) {
                var f = this,
                  o = f.placeholder,
                  e = t.listBox.options.draggable;
                o.parent().length &&
                  (f.placeholder.remove(),
                  (f.placeholder = n(
                    e && e.placeholder
                      ? i.isFunction(e.placeholder)
                        ? e.placeholder.call(f, u)
                        : e.placeholder
                      : dt.call(f, u)
                  )));
                r
                  ? "prev" === r
                    ? t.element.before(f.placeholder)
                    : "next" === r && t.element.after(f.placeholder)
                  : t.element.append(f.placeholder);
              },
              _dragend: function (i) {
                var r = this,
                  u = r.draggedElement,
                  h = r.items(),
                  e = h.not(r.draggedElement).index(r.placeholder),
                  c = h.not(r.placeholder).index(r.draggedElement),
                  l = r.dataItem(u),
                  f = { dataItems: [l], items: n(u) },
                  o = r.placeholder
                    .closest(".k-widget.k-listbox")
                    .find("[data-role='listbox']")
                    .getKendoListBox();
                return r.trigger(vi, s({}, f, { draggableEvent: i }))
                  ? (i.preventDefault(), this._clear(), t)
                  : (e >= 0
                      ? e === c ||
                        r.trigger(lt, s({}, f, { offset: e - c })) ||
                        (u.removeClass(tt), r.reorder(u, e))
                      : o &&
                        (r.trigger(a, f) || r.remove(n(u)),
                        o.trigger(ct, f) ||
                          o._addItemAt(l, o.items().index(r.placeholder))),
                    r._clear(),
                    (r._draggable.dropped = !0),
                    r.trigger(yi, s({}, f, { draggableEvent: i })),
                    r._updateToolbar(),
                    r._updateAllToolbars(),
                    t);
              },
              reorder: function (t, i) {
                var r = this,
                  f = r.dataSource,
                  e = r.dataItem(t),
                  o = f.at(i),
                  s = r.items()[i],
                  u = n(t);
                e &&
                  s &&
                  o &&
                  (r._removeElement(u),
                  r._insertElementAt(u, i),
                  r._updateToolbar());
              },
              remove: function (t) {
                var r,
                  i = this,
                  u = i._getItems(t),
                  f = u.length;
                for (i._unbindDataSource(), r = 0; r < f; r++)
                  i._removeItem(n(u[r]));
                i._bindDataSource();
                i._syncElement();
                i._updateToolbar();
                i._updateAllToolbars();
              },
              _removeItem: function (n) {
                var t,
                  i,
                  u = this,
                  f = u.dataSource,
                  r = u.dataItem(n);
                if (r && f) {
                  if ("string" == typeof r) {
                    for (t = f._data, i = 0; i < t.length; i++)
                      if (r === t[i]) {
                        t[i] = t[t.length - 1];
                        t.pop();
                        break;
                      }
                  } else f.remove(r);
                  u._removeElement(n);
                }
              },
              _removeElement: function (t) {
                i.destroy(t);
                n(t).off().remove();
              },
              dataItem: function (t) {
                var i = g(it),
                  r =
                    n(t).attr(i) ||
                    n(t)
                      .closest("[" + i + "]")
                      .attr(i);
                return r ? this.dataSource.getByUid(r) : n(t).html();
              },
              _dataItems: function (t) {
                for (var r = [], u = n(t), f = u.length, i = 0; i < f; i++)
                  r.push(this.dataItem(u.eq(i)));
                return r;
              },
              items: function () {
                var n = this._getList();
                return n.children();
              },
              select: function (n) {
                var t,
                  r = this,
                  i = r.selectable;
                return kt(n)
                  ? i.value()
                  : ((t = r.items().filter(n).filter(ir)),
                    i.options.multiple || (i.clear(), (t = t.first())),
                    i.value(t));
              },
              clearSelection: function () {
                var t = this,
                  n = t.selectable;
                n && n.clear();
              },
              enable: function (t, i) {
                for (
                  var u = this,
                    e = !!kt(i) || !!i,
                    f = u._getItems(t),
                    o = f.length,
                    r = 0;
                  r < o;
                  r++
                )
                  u._enableItem(n(f[r]), e);
                u._updateAllToolbars();
              },
              _enableItem: function (t, i) {
                var r = this,
                  u = r.dataItem(t);
                u &&
                  (i ? n(t).removeClass(h) : n(t).addClass(h).removeClass(b));
              },
              setDataSource: function (n) {
                var t = this;
                t.options.dataSource = n;
                t._dataSource();
              },
              _dataSource: function () {
                var t = this,
                  r = t.options,
                  i = r.dataSource || {};
                i = n.isArray(i) ? { data: i } : i;
                i.select = t.element;
                i.fields = [
                  { field: r.dataTextField },
                  { field: r.dataValueField },
                ];
                t._unbindDataSource();
                t.dataSource = nr.create(i);
                t._bindDataSource();
                t.options.autoBind && t.dataSource.fetch();
              },
              _bindDataSource: function () {
                var n = this,
                  t = n.dataSource;
                n._dataChangeHandler = f(n.refresh, n);
                t && t.bind(y, n._dataChangeHandler);
              },
              _unbindDataSource: function () {
                var n = this,
                  t = n.dataSource;
                t && t.unbind(y, n._dataChangeHandler);
              },
              _wrapper: function () {
                var r = this,
                  t = r.element,
                  i = t.parent("div.k-listbox");
                i[0] ||
                  ((i = t
                    .wrap(
                      '<div class="k-widget k-listbox" unselectable="on" />'
                    )
                    .parent()),
                  (i[0].style.cssText = t[0].style.cssText),
                  (i[0].title = t[0].title),
                  n('<div class="k-list-scroller" />').insertBefore(t));
                r.wrapper = i.addClass(t[0].className).css("display", "");
                r._innerWrapper = n(i[0].firstChild);
              },
              _list: function () {
                var t = this;
                n("<ul class='" + er + "' role='listbox'></ul>").appendTo(
                  t._innerWrapper
                );
                t.options.navigatable && t._getList().attr(k, t._getTabIndex());
              },
              _templates: function () {
                var t,
                  r = this,
                  n = this.options;
                t =
                  n.template && "string" == typeof n.template
                    ? i.template(n.template)
                    : n.template
                    ? n.template
                    : i.template("${" + i.expr(n.dataTextField, "data") + "}", {
                        useWithBlock: !1,
                      });
                r.templates = {
                  itemTemplate: i.template(
                    "# var item = data.item, r = data.r; # <li class='k-item' role='option' aria-selected='false'>#=r(item)#</li>",
                    { useWithBlock: !1 }
                  ),
                  itemContent: t,
                  toolbar: "<div class='" + c + "'></div>",
                };
              },
              refresh: function () {
                for (
                  var n = this,
                    i = n.dataSource.view(),
                    u = n.templates.itemTemplate,
                    r = "",
                    t = 0;
                  t < i.length;
                  t++
                )
                  r += u({ item: i[t], r: n.templates.itemContent });
                n._getList().html(r);
                n._setItemIds();
                n._createToolbar();
                n._syncElement();
                n._updateToolbar();
                n._updateAllToolbars();
                n.trigger(ci);
              },
              _syncElement: function () {
                for (
                  var i = "", t = this.dataSource.view(), n = 0;
                  n < t.length;
                  n++
                )
                  i += this._option(
                    t[n][this.options.dataValueField] || t[n],
                    t[n][this.options.dataTextField] || t[n],
                    !0
                  );
                this.element.html(i);
              },
              _option: function (n, r) {
                var u = "<option";
                return (
                  n !== t &&
                    ((n += ""),
                    n.indexOf('"') !== -1 && (n = n.replace(/"/g, "&quot;")),
                    (u += ' value="' + n + '"')),
                  (u += " selected>"),
                  r !== t && (u += i.htmlEncode(r)),
                  u + "</option>"
                );
              },
              _setItemIds: function () {
                for (
                  var i = this,
                    r = i.items(),
                    t = i.dataSource.view(),
                    u = t.length,
                    n = 0;
                  n < u;
                  n++
                )
                  r.eq(n).attr(g(it), t[n].uid).attr("id", t[n].uid);
              },
              _selectable: function () {
                var n = this,
                  i = n.options.selectable,
                  t = fi.parseOptions(i);
                t.multiple && n.element.attr("aria-multiselectable", "true");
                n.selectable = new fi(n._innerWrapper, {
                  aria: !0,
                  multiple: t.multiple,
                  filter: o,
                  change: f(n._onSelect, n),
                });
              },
              _onSelect: function () {
                var n = this;
                n._updateToolbar();
                n._updateAllToolbars();
                n.trigger(y);
              },
              _destroySelectable: function () {
                var n = this;
                n.selectable &&
                  n.selectable.element &&
                  (n.selectable.destroy(), (n.selectable = null));
              },
              _getList: function () {
                return this.wrapper.find(or);
              },
              _getItems: function (n) {
                return this.items().filter(n);
              },
              _createToolbar: function () {
                var r,
                  t = this,
                  i = t.options.toolbar,
                  u = i.position || rt,
                  e = u === pi ? "insertAfter" : "insertBefore",
                  f = i.tools || [],
                  o = t.options.messages;
                t._destroyToolbar();
                t.wrapper.removeClass(pr.join(tr));
                f.length &&
                  f.length > 0 &&
                  ((r = n(t.templates.toolbar)[e](t._innerWrapper)),
                  (t.toolbar = new p(r, s({}, i, { listBox: t, messages: o }))),
                  t.wrapper.addClass(c + w + u));
              },
              _destroyToolbar: function () {
                var n = this;
                n.toolbar && (n.toolbar.destroy(), (n.toolbar = null));
              },
              _executeCommand: function (n) {
                var t = this,
                  i = r.current.create(n, { listBox: t });
                i && (i.execute(), t._updateToolbar(), t._updateAllToolbars());
              },
              _updateToolbar: function () {
                var n = this.toolbar;
                n && n._updateToolStates();
              },
              _updateAllToolbars: function () {
                for (
                  var i,
                    r = n("select[data-role='listbox']"),
                    u = r.length,
                    t = 0;
                  t < u;
                  t++
                )
                  (i = n(r[t]).data(nt)), i && i._updateToolbar();
              },
            });
          i.ui.plugin(wi);
          r = ht.extend({
            init: function () {
              this._commands = [];
            },
            register: function (n, t) {
              this._commands.push({ commandName: n, commandType: t });
            },
            create: function (n, t) {
              for (
                var r,
                  u,
                  f = this._commands,
                  e = f.length,
                  o = n ? n.toLowerCase() : "",
                  i = 0;
                i < e;
                i++
              )
                if (((u = f[i]), u.commandName.toLowerCase() === o)) {
                  r = u;
                  break;
                }
              if (r) return new r.commandType(t);
            },
          });
          r.current = new r();
          d = ht.extend({
            init: function (n) {
              var t = this;
              t.options = s({}, t.options, n);
              t.listBox = t.options.listBox;
            },
            options: { listBox: null },
            getItems: function () {
              return n(this.listBox.select());
            },
            execute: e,
            canExecute: e,
          });
          gt = d.extend({
            execute: function () {
              var i = this,
                n = i.listBox,
                t = i.getItems();
              n.trigger(a, { dataItems: n._dataItems(t), items: t }) ||
                n.remove(t);
            },
            canExecute: function () {
              return this.listBox.select().length > 0;
            },
          });
          r.current.register(a, gt);
          ft = d.extend({
            execute: function () {
              var n = this;
              n.canExecute() && n.moveItems();
            },
            canExecute: e,
            moveItems: function () {
              var u,
                t = this,
                r = t.listBox,
                f = t.options,
                e = t.getItems(),
                o = f.offset,
                s = ut(e),
                i = n.makeArray(e.sort(t.itemComparer)),
                h = f.moveAction;
              if (
                !r.trigger(lt, {
                  dataItems: r._dataItems(i),
                  items: n(i),
                  offset: o,
                })
              )
                for (; i.length > 0 && s.length > 0; )
                  (u = i[h]()), r.reorder(u, s[h]() + o);
            },
            options: { offset: 0, moveAction: "pop" },
            itemComparer: function (t, i) {
              var r = n(t).index(),
                u = n(i).index();
              return r === u ? 0 : r > u ? 1 : -1;
            },
          });
          ni = ft.extend({
            options: { offset: -1, moveAction: "shift" },
            canExecute: function () {
              var t = this.getItems(),
                n = ut(t);
              return n.length > 0 && n[0] > 0;
            },
          });
          r.current.register(at, ni);
          ti = ft.extend({
            options: { offset: 1, moveAction: "pop" },
            canExecute: function () {
              var t = this,
                r = t.getItems(),
                i = ut(r);
              return (
                i.length > 0 && n(i).last()[0] < t.listBox.items().length - 1
              );
            },
          });
          r.current.register(vt, ti);
          et = d.extend({
            options: { filter: o },
            execute: function () {
              var n = this,
                i = n.getSourceListBox(),
                t = n.getItems().filter(n.options.filter),
                r = i ? i._dataItems(t) : [],
                u = n.getDestinationListBox(),
                f = n.getUpdatedSelection(t);
              u &&
                t.length > 0 &&
                (u.trigger(ct, { dataItems: r, items: t }) || u.add(r),
                i.trigger(a, { dataItems: r, items: t }) ||
                  (i.remove(t), n.updateSelection(f)));
            },
            getUpdatedSelection: function (t) {
              var r = this,
                i = r.options.filter,
                u = r.getSourceListBox(),
                e = u ? u.items().filter(i).last() : null,
                o = n(t).filter(e).length > 0,
                f = o ? n(t).prevAll(i)[0] : n(t).nextAll(i)[0];
              return 1 === n(t).length && f ? f : null;
            },
            updateSelection: function (t) {
              var i = this.getSourceListBox();
              i && t && (n(i.select(n(t))), i._scrollIntoView(t));
            },
            getSourceListBox: e,
            getDestinationListBox: e,
          });
          ot = et.extend({
            canExecute: function () {
              var n = this.getSourceListBox();
              return !!n && n.select().length > 0;
            },
            getSourceListBox: function () {
              return this.listBox;
            },
            getDestinationListBox: function () {
              var t = this.getSourceListBox();
              return t && t.options.connectWith
                ? n(si + t.options.connectWith).data(nt)
                : null;
            },
            getItems: function () {
              var t = this.getSourceListBox();
              return t ? n(t.select()) : n();
            },
          });
          r.current.register(yt, ot);
          st = et.extend({
            canExecute: function () {
              var n = this.getSourceListBox();
              return !!n && n.select().length > 0;
            },
            getSourceListBox: function () {
              var t = this.getDestinationListBox();
              return t && t.options.connectWith
                ? n(si + t.options.connectWith).data(nt)
                : null;
            },
            getDestinationListBox: function () {
              return this.listBox;
            },
            getItems: function () {
              var t = this.getSourceListBox();
              return t ? n(t.select()) : n();
            },
          });
          r.current.register(pt, st);
          ii = ot.extend({
            canExecute: function () {
              var n = this.getSourceListBox();
              return !!n && n.items().filter(o).length > 0;
            },
            getItems: function () {
              var t = this.getSourceListBox();
              return t ? t.items() : n();
            },
            getUpdatedSelection: e,
            updateSelection: e,
          });
          r.current.register(wt, ii);
          ri = st.extend({
            canExecute: function () {
              var n = this.getSourceListBox();
              return !!n && n.items().filter(o).length > 0;
            },
            getItems: function () {
              var t = this.getSourceListBox();
              return t ? t.items() : n();
            },
            getUpdatedSelection: e,
            updateSelection: e,
          });
          r.current.register(bt, ri);
          p = ht.extend({
            init: function (t, i) {
              var r = this;
              r.element = n(t).addClass(c);
              r.options = s({}, r.options, i);
              r.listBox = r.options.listBox;
              r._initTemplates();
              r._createTools();
              r._updateToolStates();
              r._attachEventHandlers();
            },
            destroy: function () {
              var n = this;
              n._detachEventHandlers();
              i.destroy(n.element);
              n.element.remove();
              n.element = null;
            },
            options: { position: rt, tools: [] },
            _initTemplates: function () {
              this.templates = {
                tool: gi(
                  "<li><a href='\\\\#' class='k-button k-button-icon' data-command='#= command #' title='#= text #' aria-label='#= text #' role='button'><span class='k-icon #= iconClass #'></span></a></li>"
                ),
              };
            },
            _createTools: function () {
              for (
                var r,
                  i = this,
                  u = i.options.tools,
                  e = u.length,
                  o = i.options.messages.tools,
                  f = i._createToolList(),
                  t = 0;
                t < e;
                t++
              )
                (r = s({}, p.defaultTools[u[t]], { text: o[u[t]] })),
                  r && f.append(n(i.templates.tool(r)));
              i.element.append(f);
            },
            _createToolList: function () {
              return n("<ul class='k-reset' />");
            },
            _attachEventHandlers: function () {
              var n = this;
              n.element.on(hi, rr, f(n._onToolClick, n));
            },
            _detachEventHandlers: function () {
              this.element.off(v).find("*").off(v);
            },
            _onToolClick: function (t) {
              t.preventDefault();
              this._executeToolCommand(n(t.currentTarget).data(vr));
            },
            _executeToolCommand: function (n) {
              var i = this,
                t = i.listBox;
              t && t._executeCommand(n);
            },
            _updateToolStates: function () {
              for (
                var t = this, i = t.options.tools, r = i.length, n = 0;
                n < r;
                n++
              )
                t._updateToolState(i[n]);
            },
            _updateToolState: function (t) {
              var f = this,
                i = r.current.create(t, { listBox: f.listBox }),
                u = f.element.find("[data-command='" + t + "']")[0];
              u &&
                i &&
                i.canExecute &&
                (i.canExecute()
                  ? n(u).removeClass(h).removeAttr(k)
                  : n(u).addClass(h).attr(k, "-1"));
            },
          });
          p.defaultTools = {
            remove: { command: a, iconClass: "k-i-x" },
            moveUp: { command: at, iconClass: "k-i-arrow-60-up" },
            moveDown: { command: vt, iconClass: "k-i-arrow-60-down" },
            transferTo: { command: yt, iconClass: "k-i-arrow-60-right" },
            transferFrom: { command: pt, iconClass: "k-i-arrow-60-left" },
            transferAllTo: {
              command: wt,
              iconClass: "k-i-arrow-double-60-right",
            },
            transferAllFrom: {
              command: bt,
              iconClass: "k-i-arrow-double-60-left",
            },
          };
          s(wi, { ToolBar: p });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.upload.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function it(t) {
            return n
              .map(rt(t), function (n) {
                return n.name;
              })
              .join(", ");
          }
          function rt(n) {
            var t = n[0];
            return t.files
              ? ut(t.files)
              : [{ name: ti(t.value), extension: ft(t.value), size: null }];
          }
          function ut(t) {
            return n.map(t, function (n) {
              return ni(n);
            });
          }
          function ni(n) {
            var t = n.name || n.fileName;
            return {
              name: i.htmlEncode(t),
              extension: ft(t),
              size: "number" == typeof n.size ? n.size : n.fileSize,
              rawFile: n,
            };
          }
          function ft(n) {
            var t = n.match(fi);
            return t ? t[0] : "";
          }
          function ti(n) {
            var t = n.lastIndexOf("\\");
            return t != -1 ? n.substr(t + 1) : n;
          }
          function l(t, r) {
            var u = i.guid();
            return n.map(t, function (n) {
              return (n.uid = r ? i.guid() : u), n;
            });
          }
          function et(n, t) {
            for (
              var r = ii(t.allowedExtensions),
                u = t.maxFileSize,
                f = t.minFileSize,
                i = 0;
              i < n.length;
              i++
            )
              ri(n[i], r), ui(n[i], f, u);
          }
          function ii(t) {
            return n.map(t, function (n) {
              var t = "." === n.substring(0, 1) ? n : "." + n;
              return t.toLowerCase();
            });
          }
          function ri(t, i) {
            i.length > 0 &&
              i.indexOf(t.extension.toLowerCase()) < 0 &&
              ((t.validationErrors = t.validationErrors || []),
              n.inArray(dt, t.validationErrors) === -1 &&
                t.validationErrors.push(dt));
          }
          function ui(t, i, r) {
            0 !== i &&
              t.size < i &&
              ((t.validationErrors = t.validationErrors || []),
              n.inArray(kt, t.validationErrors) === -1 &&
                t.validationErrors.push(kt));
            0 !== r &&
              t.size > r &&
              ((t.validationErrors = t.validationErrors || []),
              n.inArray(bt, t.validationErrors) === -1 &&
                t.validationErrors.push(bt));
          }
          function ot(n) {
            var t,
              i = 0;
            if ("number" != typeof n[0].size) return "";
            for (t = 0; t < n.length; t++) n[t].size && (i += n[t].size);
            return (
              (i /= 1024),
              i < 1024 ? i.toFixed(2) + " KB" : (i / 1024).toFixed(2) + " MB"
            );
          }
          function st(t) {
            return !t.multiple && n(".k-file", t.wrapper).length > 1;
          }
          function ht(i, r, u, f) {
            var e, o;
            return r._supportsRemove()
              ? ((e = i.data("fileNames")),
                (o = n.map(e, function (n) {
                  return n.name;
                })),
                f === !1
                  ? (r._removeFileEntry(i), t)
                  : (r._submitRemove(
                      o,
                      u,
                      function (n, t, u) {
                        var f = r.trigger(g, {
                          operation: "remove",
                          files: e,
                          response: n,
                          XMLHttpRequest: u,
                        });
                        f || r._removeFileEntry(i);
                      },
                      function (n) {
                        st(r) && r._removeFileEntry(i);
                        r.trigger(s, {
                          operation: "remove",
                          files: e,
                          XMLHttpRequest: n,
                        });
                        b("Server response: " + n.responseText);
                      }
                    ),
                    t))
              : ((!st(r) && f) || r._removeFileEntry(i), t);
          }
          function ct(t, i, r) {
            var u = !1,
              f = "";
            try {
              f = n.parseJSON(lt(t));
              u = !0;
            } catch (e) {
              r();
            }
            u && i(f);
          }
          function lt(n) {
            return (t !== n && "" !== n) || (n = "{}"), n;
          }
          function a(n) {
            n.stopPropagation();
            n.preventDefault();
          }
          function v(n, t, i, r) {
            var u, f;
            n.on("dragenter" + t, function (n) {
              i(n);
              f = new Date();
              u ||
                (u = setInterval(function () {
                  var n = new Date() - f;
                  n > 100 && (r(), clearInterval(u), (u = null));
                }, 100));
            }).on("dragover" + t, function () {
              f = new Date();
            });
          }
          function at(n) {
            return n.is(".k-file-progress, .k-file-success, .k-file-error");
          }
          function r(t) {
            return n(t.target).closest(".k-file");
          }
          var y,
            p,
            i = window.kendo,
            o = i.ui.Widget,
            w = i.antiForgeryTokens,
            b = i.logToConsole,
            fi = /\.([^\.]+)$/,
            f = ".kendoUpload",
            k = "select",
            d = "upload",
            g = "success",
            s = "error",
            vt = "complete",
            h = "cancel",
            yt = "clear",
            nt = "pause",
            pt = "resume",
            wt = "progress",
            u = "remove",
            e = "validationErrors",
            bt = "invalidMaxFileSize",
            kt = "invalidMinFileSize",
            dt = "invalidFileExtension",
            ei = 1e3,
            oi = 2e3,
            c = {
              loading: "k-i-loading",
              warning: "k-i-warning",
              success: "k-i-check",
            },
            tt = o.extend({
              init: function (t, r) {
                var e,
                  s,
                  h,
                  u = this;
                o.fn.init.call(u, t, r);
                u.name = t.name;
                u.multiple = u.options.multiple;
                u.directory = u.options.directory;
                u.localization = u.options.localization;
                e = u.element;
                u.wrapper = e.closest(".k-upload");
                0 === u.wrapper.length && (u.wrapper = u._wrapInput(e));
                u._activeInput(e);
                u.toggle(u.options.enabled);
                s = u._ns = f + "-" + i.guid();
                e.closest("form")
                  .on("submit" + s, n.proxy(u._onParentFormSubmit, u))
                  .on("reset" + s, n.proxy(u._onParentFormReset, u));
                u.options.async.saveUrl
                  ? ((u._module = u._supportsFormData() ? new p(u) : new y(u)),
                    (u._async = !0),
                    (h = u.options.files),
                    h.length > 0 && u._renderInitialFiles(h))
                  : (u._module = new gt(u));
                u._supportsDrop() &&
                  ("" !== u.options.dropZone
                    ? u._setupCustomDropZone()
                    : u._setupDropZone());
                u.wrapper
                  .on("click", ".k-upload-action", n.proxy(u._onFileAction, u))
                  .on(
                    "click",
                    ".k-clear-selected",
                    n.proxy(u._onClearSelected, u)
                  )
                  .on(
                    "click",
                    ".k-upload-selected",
                    n.proxy(u._onUploadSelected, u)
                  );
                u.element.val() && u._onInputChange({ target: u.element });
              },
              events: [k, d, g, s, vt, h, yt, wt, u, nt, pt],
              options: {
                name: "Upload",
                enabled: !0,
                multiple: !0,
                directory: !1,
                showFileList: !0,
                template: "",
                files: [],
                async: {
                  autoRetryAfter: 0,
                  bufferChunkSize: 1e7,
                  maxAutoRetries: 1,
                  removeVerb: "POST",
                  autoUpload: !0,
                  withCredentials: !0,
                  accept: "*/*; q=0.5, application/json",
                  useArrayBuffer: !1,
                },
                localization: {
                  select: "Select files...",
                  cancel: "Cancel",
                  retry: "Retry",
                  remove: "Remove",
                  pause: "Pause",
                  resume: "Resume",
                  clearSelectedFiles: "Clear",
                  uploadSelectedFiles: "Upload",
                  dropFilesHere: "Drop files here to upload",
                  invalidFiles:
                    "Invalid file(s). Please check file upload requirements.",
                  statusUploading: "uploading",
                  statusUploaded: "uploaded",
                  statusWarning: "warning",
                  statusFailed: "failed",
                  headerStatusUploading: "Uploading...",
                  headerStatusPaused: "Paused",
                  headerStatusUploaded: "Done",
                  invalidMaxFileSize: "File size too large.",
                  invalidMinFileSize: "File size too small.",
                  invalidFileExtension: "File type not allowed.",
                },
                validation: {
                  allowedExtensions: [],
                  maxFileSize: 0,
                  minFileSize: 0,
                },
                dropZone: "",
              },
              setOptions: function (n) {
                var t = this,
                  i = t.element;
                o.fn.setOptions.call(t, n);
                t.multiple = t.options.multiple;
                t.directory = t.options.directory;
                i.attr("multiple", !!t._supportsMultiple() && t.multiple);
                t.directory &&
                  (i.attr("webkitdirectory", t.directory),
                  i.attr("directory", t.directory));
                t.toggle(t.options.enabled);
              },
              enable: function (n) {
                n = t === n || n;
                this.toggle(n);
              },
              disable: function () {
                this.toggle(!1);
              },
              toggle: function (n) {
                n = t === n ? n : !n;
                this.wrapper.toggleClass("k-state-disabled", n);
                this.element.prop("disabled", n);
              },
              focus: function () {
                this.element.focus();
              },
              destroy: function () {
                var t = this,
                  i = n(t.options.dropZone);
                n(document)
                  .add(n(".k-dropzone", t.wrapper))
                  .add(t.wrapper.closest("form"))
                  .off(t._ns);
                i.length > 0 && i.off(t._ns);
                n(t.element).off(f);
                o.fn.destroy.call(t);
              },
              pause: function (t) {
                this._module.onPause({ target: n(t, this.wrapper) });
                var i = t.find(".k-i-pause-sm");
                i.removeClass("k-i-pause-sm")
                  .addClass("k-i-play-sm")
                  .attr("title", this.localization.resume);
                n(i).parent().attr("aria-label", this.localization.resume);
              },
              resume: function (t) {
                this._module.onResume({ target: n(t, this.wrapper) });
                var i = t.find(".k-i-play-sm");
                i.removeClass("k-i-play-sm")
                  .addClass("k-i-pause-sm")
                  .attr("title", this.localization.pause);
                n(i).parent().attr("aria-label", this.localization.pause);
              },
              upload: function () {
                var n = this;
                n._module.onSaveSelected();
              },
              getFiles: function () {
                for (
                  var r,
                    i,
                    e = this,
                    u = [],
                    f = e.wrapper.find(".k-file"),
                    t = 0;
                  t < f.length;
                  t++
                )
                  if ((r = n(f[t]).data("fileNames")))
                    for (i = 0; i < r.length; i++) u.push(r[i]);
                return u;
              },
              clearAllFiles: function () {
                var n = this,
                  t = n.wrapper.find(".k-file");
                t.each(function (t, i) {
                  n._removeFileByDomElement(i, !1);
                });
              },
              removeAllFiles: function () {
                var n = this,
                  t = n.wrapper.find(".k-file");
                t.each(function (t, i) {
                  n._removeFileByDomElement(i, !0);
                });
              },
              removeFileByUid: function (n) {
                this._removeFileByUid(n, !0);
              },
              clearFileByUid: function (n) {
                this._removeFileByUid(n, !1);
              },
              _removeFileByUid: function (t, r) {
                var u,
                  f = this;
                "string" == typeof t &&
                  ((u = n(
                    ".k-file[" + i.attr("uid") + '="' + t + '"]',
                    f.wrapper
                  )),
                  u.length > 0 && f._removeFileByDomElement(u, r));
              },
              clearFile: function (n) {
                this._removeFile(n, !1);
              },
              removeFile: function (n) {
                this._removeFile(n, !0);
              },
              _removeFile: function (t, i) {
                var r,
                  u = this,
                  f = u.wrapper.find(".k-file");
                "function" == typeof t &&
                  f.each(function (f, e) {
                    r = n(e).data("fileNames");
                    t(r) && u._removeFileByDomElement(e, i);
                  });
              },
              _removeFileByDomElement: function (t, i) {
                var f,
                  r = this,
                  u = { target: n(t, r.wrapper) };
                r.options.async.saveUrl
                  ? (n(t).hasClass("k-file-progress")
                      ? r._module.onCancel(u)
                      : r._module.onRemove(u, {}, i),
                    (f = n(".k-file", r.wrapper)),
                    0 === f.length
                      ? r._hideHeaderUploadstatus()
                      : r._updateHeaderUploadStatus())
                  : r._module.onRemove(u, {}, i);
              },
              _addInput: function (t) {
                if (t[0].nodeType) {
                  var i = this,
                    r = t.clone().val("");
                  r.insertAfter(i.element).data(
                    "kendo" + i.options.prefix + i.options.name,
                    i
                  );
                  n(i.element)
                    .hide()
                    .attr("tabindex", "-1")
                    .removeAttr("id")
                    .off(f);
                  i._activeInput(r);
                  i.element.focus();
                }
              },
              _activeInput: function (t) {
                var i = this,
                  r = i.wrapper;
                i.element = t;
                i.directory &&
                  (t.attr("webkitdirectory", i.directory),
                  t.attr("directory", i.directory));
                t.attr("multiple", !!i._supportsMultiple() && i.multiple)
                  .attr("autocomplete", "off")
                  .on("click" + f, function (n) {
                    r.hasClass("k-state-disabled") && n.preventDefault();
                  })
                  .on("focus" + f, function () {
                    n(this).parent().addClass("k-state-focused");
                  })
                  .on("blur" + f, function () {
                    n(this).parent().removeClass("k-state-focused");
                  })
                  .on("change" + f, n.proxy(i._onInputChange, i))
                  .on("keydown" + f, n.proxy(i._onInputKeyDown, i));
              },
              _onInputKeyDown: function (n) {
                var r = this,
                  t = r.wrapper.find(".k-upload-action:visible:first");
                n.keyCode === i.keys.TAB &&
                  t.length > 0 &&
                  !n.shiftKey &&
                  (n.preventDefault(), t.focus());
              },
              _onInputChange: function (t) {
                var f,
                  i = this,
                  r = n(t.target),
                  u = l(i._inputFiles(r), i._isAsyncNonBatch());
                et(u, i.options.validation);
                f = i.trigger(k, { files: u });
                f
                  ? (i._addInput(r), r.remove())
                  : i._module.onSelect({ target: r }, u);
              },
              _readDirectory: function (t) {
                var i = new n.Deferred(),
                  f = t.createReader(),
                  r = [],
                  u = function () {
                    f.readEntries(function (n) {
                      n.length ? ((r = r.concat(n)), u()) : i.resolve(r);
                    }, i.reject);
                  };
                return u(), i.promise();
              },
              _readFile: function (n) {
                var t = this,
                  i = n.fullPath;
                n.file(
                  function (n) {
                    n.relativePath = i.slice(1);
                    t.droppedFolderFiles.push(n);
                    t.droppedFolderCounter--;
                    0 === t.droppedFolderCounter &&
                      setTimeout(function () {
                        0 === t.droppedFolderCounter &&
                          t.droppedFolderFiles.length &&
                          (t._proceedDroppedItems(t.droppedFolderFiles),
                          (t.droppedFolderFiles = []));
                      }, 0);
                  },
                  function () {
                    b("File error.");
                  }
                );
              },
              _traverseFileTree: function (n, t) {
                var i = this;
                t || i.droppedFolderCounter--;
                this._readDirectory(n).then(function (n) {
                  i.droppedFolderCounter += n.length;
                  for (var t = 0; t < n.length; t++)
                    n[t].isFile
                      ? i._readFile(n[t])
                      : n[t].isDirectory && i._traverseFileTree(n[t]);
                });
              },
              _onDrop: function (n) {
                var f,
                  i,
                  u,
                  r = n.originalEvent.dataTransfer,
                  t = this,
                  e = r.files;
                if ((a(n), t.options.directoryDrop && r.items))
                  for (
                    f = r.items.length,
                      t.droppedFolderCounter = 0,
                      t.droppedFolderFiles = [],
                      i = 0;
                    i < f;
                    i++
                  )
                    r.items[i].webkitGetAsEntry
                      ? ((u = r.items[i].webkitGetAsEntry()),
                        u.isDirectory
                          ? t._traverseFileTree(u, !0)
                          : u.isFile && t.droppedFolderFiles.push(r.files[i]))
                      : t._proceedDroppedItems(e);
                else t._proceedDroppedItems(e);
              },
              _proceedDroppedItems: function (t) {
                var u,
                  i = this,
                  r = l(ut(t), i._isAsyncNonBatch());
                t.length > 0 &&
                  !i.wrapper.hasClass("k-state-disabled") &&
                  (!i.multiple && r.length > 1 && r.splice(1, r.length - 1),
                  et(r, i.options.validation),
                  (u = i.trigger(k, { files: r })),
                  u ||
                    i._module.onSelect(
                      { target: n(".k-dropzone", i.wrapper) },
                      r
                    ));
              },
              _filesContainValidationErrors: function (t) {
                var i = !1;
                return (
                  n(t).each(function (n, t) {
                    if (t[e] && t[e].length > 0) return (i = !0), !1;
                  }),
                  i
                );
              },
              _isAsyncNonBatch: function () {
                return (this._async && !this.options.async.batch) || !1;
              },
              _renderInitialFiles: function (n) {
                var i,
                  r,
                  f = this,
                  t = 0;
                for (n = l(n, !0), t = 0; t < n.length; t++)
                  (i = n[t]),
                    (r = f._enqueueFile(i.name, { fileNames: [i] })),
                    r.addClass("k-file-success").data("files", [n[t]]),
                    f._supportsRemove() && f._fileAction(r, u);
              },
              _prepareTemplateData: function (n, t) {
                for (
                  var u = t.fileNames, i = {}, f = 0, r = 0, r = 0;
                  r < u.length;
                  r++
                )
                  f += u[r].size;
                return (i.name = n), (i.size = f), (i.files = t.fileNames), i;
              },
              _prepareDefaultSingleFileEntryTemplate: function (t) {
                var f = this,
                  i = t.fileNames[0],
                  o = ot(t.fileNames),
                  r = i[e],
                  u = "";
                return (
                  (u +=
                    r && r.length > 0
                      ? "<li class='k-file k-file-invalid'><span class='k-progress'></span><span class='k-file-invalid-extension-wrapper'><span class='k-file-invalid-icon'>!</span><span class='k-file-state'></span></span><span class='k-file-name-size-wrapper'><span class='k-file-name k-file-name-invalid' title='" +
                        i.name +
                        "'>" +
                        i.name +
                        "</span><span class='k-file-validation-message'>" +
                        f.localization[r[0]] +
                        "</span></span>"
                      : "<li class='k-file'><span class='k-progress'></span><span class='k-file-extension-wrapper'><span class='k-file-extension'>" +
                        i.extension.substring(1) +
                        "</span><span class='k-file-state'></span></span><span class='k-file-name-size-wrapper'><span class='k-file-name' title='" +
                        i.name +
                        "'>" +
                        i.name +
                        "</span><span class='k-file-size'>" +
                        o +
                        "</span></span>"),
                  (u += "<strong class='k-upload-status'></strong>"),
                  n(u)
                );
              },
              _prepareDefaultMultipleFileEntriesTemplate: function (t) {
                var f,
                  i,
                  o = this,
                  u = t.fileNames,
                  s = o._filesContainValidationErrors(u),
                  h = ot(u),
                  r = "";
                for (
                  r += s
                    ? "<li class='k-file k-file-invalid'><span class='k-progress'></span><span class='k-multiple-files-invalid-extension-wrapper'><span class='k-file-invalid-icon'>!</span>"
                    : "<li class='k-file'><span class='k-progress'></span><span class='k-multiple-files-extension-wrapper'>",
                    r += "<span class='k-file-state'></span></span>",
                    u.sort(function (n, t) {
                      return n[e] ? -1 : t[e] ? 1 : 0;
                    }),
                    r += "<span class='k-file-name-size-wrapper'>",
                    f = 0;
                  f < u.length;
                  f++
                )
                  (i = u[f]),
                    (r +=
                      i[e] && i[e].length > 0
                        ? "<span class='k-file-name k-file-name-invalid' title='" +
                          i.name +
                          "'>" +
                          i.name +
                          "</span>"
                        : "<span class='k-file-name' title='" +
                          i.name +
                          "'>" +
                          i.name +
                          "</span>");
                return (
                  (r += s
                    ? "<span class='k-file-validation-message'>" +
                      o.localization.invalidFiles +
                      "</span>"
                    : "<span class='k-file-information'>Total: " +
                      u.length +
                      " files, " +
                      h +
                      "</span>"),
                  (r += "</span><strong class='k-upload-status'></strong>"),
                  n(r)
                );
              },
              _enqueueFile: function (t, r) {
                var s,
                  e,
                  c,
                  l,
                  f = this,
                  a = r.fileNames[0].uid,
                  o = n(".k-upload-files", f.wrapper),
                  v = f.options,
                  h = v.template;
                return (
                  0 === o.length &&
                    ((o = n(
                      "<ul class='k-upload-files k-reset'></ul>"
                    ).appendTo(f.wrapper)),
                    f.options.showFileList || o.hide(),
                    f.wrapper.removeClass("k-upload-empty")),
                  (s = n(".k-file", o)),
                  h
                    ? ((c = f._prepareTemplateData(t, r)),
                      (h = i.template(h)),
                      (e = n("<li class='k-file'>" + h(c) + "</li>")),
                      e.find(".k-upload-action").addClass("k-button"),
                      f.angular("compile", function () {
                        return { elements: e, data: [c] };
                      }))
                    : (e =
                        1 === r.fileNames.length
                          ? f._prepareDefaultSingleFileEntryTemplate(r)
                          : f._prepareDefaultMultipleFileEntriesTemplate(r)),
                  e.attr(i.attr("uid"), a).appendTo(o).data(r),
                  f._async || n(".k-progress", e).width("100%"),
                  !f.multiple &&
                    s.length > 0 &&
                    ((l = { files: s.data("fileNames"), headers: {} }),
                    f.trigger(u, l) ||
                      f._module.onRemove({ target: n(s, f.wrapper) }, l)),
                  e
                );
              },
              _removeFileEntry: function (t) {
                var i,
                  f,
                  e,
                  u = this,
                  r = t.closest(".k-upload-files");
                t.remove();
                i = n(".k-file", r);
                f = n(".k-file-success, .k-file-error", r);
                e = n(".k-file-invalid", r);
                (f.length !== i.length && e.length !== i.length) ||
                  this._hideUploadButton();
                0 === i.length
                  ? (r.remove(),
                    u.wrapper.addClass("k-upload-empty"),
                    u._hideHeaderUploadstatus())
                  : u._updateHeaderUploadStatus();
              },
              _fileAction: function (n, t, i) {
                var r,
                  u = {
                    remove: "k-i-x",
                    cancel: "k-i-cancel",
                    retry: "k-i-retry",
                    pause: "k-i-pause-sm",
                  },
                  f = {
                    remove: "k-i-close",
                    cancel: "k-i-close",
                    retry: "k-i-reload-sm",
                    pause: "k-i-pause-sm",
                  };
                u.hasOwnProperty(t) &&
                  (i || this._clearFileAction(n),
                  this.options.template
                    ? ((r = n.find(".k-upload-action").first()),
                      r.find(".k-icon").length
                        ? r.next(".k-upload-action").length &&
                          r
                            .next(".k-upload-action")
                            .addClass("k-button")
                            .append(
                              "<span class='k-icon " +
                                f[t] +
                                " " +
                                u[t] +
                                "' title='" +
                                this.localization[t] +
                                "'aria-label='" +
                                this.localization[t] +
                                "'></span>"
                            )
                            .show()
                        : r
                            .addClass("k-button")
                            .append(
                              "<span class='k-icon " +
                                f[t] +
                                " " +
                                u[t] +
                                "' title='" +
                                this.localization[t] +
                                "'aria-label='" +
                                this.localization[t] +
                                "'></span>"
                            )
                            .show())
                    : (i ||
                        n.find(".k-upload-status .k-upload-action").remove(),
                      n
                        .find(".k-upload-status")
                        .append(
                          this._renderAction(u[t], this.localization[t], f[t])
                        )));
              },
              _fileState: function (t, i) {
                var r = this.localization,
                  f = {
                    uploading: { text: r.statusUploading },
                    uploaded: { text: r.statusUploaded },
                    failed: { text: r.statusFailed },
                  },
                  u = f[i];
                u && n("span.k-file-state", t).text(u.text);
              },
              _renderAction: function (t, i, r) {
                return "" !== t
                  ? n(
                      "<button type='button' class='k-button k-upload-action' aria-label='" +
                        i +
                        "'><span class='k-icon " +
                        r +
                        " " +
                        t +
                        "' title='" +
                        i +
                        "'></span></button>"
                    )
                      .on("focus", function () {
                        n(this).addClass("k-state-focused");
                      })
                      .on("blur", function () {
                        n(this).removeClass("k-state-focused");
                      })
                  : n(
                      "<button type='button' class='k-button'>" +
                        i +
                        "</button>"
                    );
              },
              _clearFileAction: function (t) {
                n(".k-upload-action", t).empty().hide();
              },
              _onFileAction: function (t) {
                var o,
                  f,
                  r,
                  s,
                  c,
                  e,
                  i = this;
                return (
                  i.wrapper.hasClass("k-state-disabled") ||
                    ((o = n(t.target).closest(".k-upload-action")),
                    (f = o.find(".k-icon")),
                    (r = o.closest(".k-file")),
                    (s = r.data("fileNames")),
                    (c = i._filesContainValidationErrors(s)),
                    (e = { files: s, headers: {} }),
                    (i._retryClicked = !1),
                    f.hasClass("k-i-x")
                      ? i.trigger(u, e) ||
                        i._module.onRemove({ target: n(r, i.wrapper) }, e, !c)
                      : f.hasClass("k-i-cancel")
                      ? (i.trigger(h, e),
                        i._module.onCancel({ target: n(r, i.wrapper) }),
                        i._checkAllComplete(),
                        i._updateHeaderUploadStatus())
                      : f.hasClass("k-i-pause-sm")
                      ? (i.trigger(nt, e),
                        i.pause(r),
                        i._updateHeaderUploadStatus())
                      : f.hasClass("k-i-play-sm")
                      ? (i.trigger(pt, e), i.resume(r))
                      : f.hasClass("k-i-retry") &&
                        (n(".k-i-warning", r).remove(),
                        n(".k-progress", r).finish().show(),
                        i._module.onRetry({ target: n(r, i.wrapper) }),
                        (i._retryClicked = !0))),
                  !1
                );
              },
              _onUploadSelected: function () {
                var n = this,
                  t = n.wrapper;
                return (
                  t.hasClass("k-state-disabled") ||
                    this._module.onSaveSelected(),
                  !1
                );
              },
              _onClearSelected: function () {
                var n = this,
                  t = n.wrapper;
                return (
                  t.hasClass("k-state-disabled") ||
                    n.trigger(yt, {}) ||
                    n.clearAllFiles(),
                  !1
                );
              },
              _onFileProgress: function (t, i) {
                var f, u;
                i > 100 && (i = 100);
                this.options.template
                  ? n(".k-progress", t.target).width(i + "%")
                  : ((f = n(".k-upload-pct", t.target)),
                    (u = n(".k-i-warning", t.target)),
                    u.length
                      ? u
                          .removeClass("k-i-warning")
                          .removeClass("k-icon")
                          .addClass("k-upload-pct")
                      : 0 === f.length &&
                        n(".k-upload-status", t.target).prepend(
                          "<span class='k-upload-pct'></span>"
                        ),
                    100 !== i
                      ? n(".k-upload-pct", t.target).text(i + "%")
                      : n(".k-upload-pct", t.target).remove(),
                    n(".k-progress", t.target).width(i + "%"));
                this.trigger(wt, {
                  files: r(t).data("fileNames"),
                  percentComplete: i,
                });
              },
              _onUploadSuccess: function (n, t, i) {
                var f = this,
                  e = r(n),
                  o = f.trigger(g, {
                    files: e.data("fileNames"),
                    response: t,
                    operation: "upload",
                    XMLHttpRequest: i,
                  });
                o
                  ? f._setUploadErrorState(e)
                  : (f._fileState(e, "uploaded"),
                    e.removeClass("k-file-progress").addClass("k-file-success"),
                    f._updateHeaderUploadStatus(),
                    f._supportsRemove()
                      ? f._fileAction(e, u)
                      : f._clearFileAction(e));
                f._hideUploadProgress(e);
                f._checkAllComplete();
              },
              _onUploadError: function (n, t) {
                var i = this,
                  f = i._module,
                  u = r(n),
                  e = u.data("uid");
                i._setUploadErrorState(u);
                i.trigger(s, {
                  operation: "upload",
                  files: u.data("fileNames"),
                  XMLHttpRequest: t,
                });
                b("Server response: " + t.responseText);
                i.options.async.chunkSize
                  ? f._decreasePosition && f._decreasePosition(e)
                  : i._hideUploadProgress(u);
                i._checkAllComplete();
                this.options.async.autoRetryAfter && this._autoRetryAfter(u);
              },
              _autoRetryAfter: function (n) {
                var i = this,
                  t = this._module.retries;
                t &&
                  (t[n.data("uid")] || (t[n.data("uid")] = 1),
                  t[n.data("uid")] <= this.options.async.maxAutoRetries &&
                    (t[n.data("uid")]++,
                    setTimeout(function () {
                      i._module.performUpload(n);
                    }, this.options.async.autoRetryAfter)));
              },
              _setUploadErrorState: function (t) {
                var i,
                  r = this;
                r._fileState(t, "failed");
                t.removeClass("k-file-progress").addClass("k-file-error");
                r._updateUploadProgress(t);
                i = n(".k-upload-pct", t);
                i.length > 0
                  ? (i.parent().find(".k-i-warning").length ||
                      i
                        .removeClass("k-upload-pct")
                        .addClass("k-icon k-i-warning"),
                    i.empty())
                  : n(".k-upload-status", t).prepend(
                      "<span class='k-icon k-i-warning'></span>"
                    );
                this._updateHeaderUploadStatus();
                this._fileAction(t, "retry");
                this._fileAction(t, u, !0);
                r._retryClicked && t.find(".k-i-retry").parent().focus();
              },
              _updateUploadProgress: function (t) {
                var u,
                  i,
                  f,
                  r = this;
                r.options.async.chunkSize
                  ? ((u = t.data("uid")),
                    r._module.metaData &&
                      ((i = r._module.metaData[u]),
                      i &&
                        ((f = i.totalChunks
                          ? Math.round((i.chunkIndex / i.totalChunks) * 100)
                          : 100),
                        r._onFileProgress({ target: n(t, r.wrapper) }, f))))
                  : n(".k-progress", t).width("100%");
              },
              _hideUploadProgress: function (t) {
                n(".k-progress", t)
                  .delay(ei)
                  .fadeOut(oi, function () {
                    n(this).css("width", "0%");
                  });
              },
              _showUploadButton: function () {
                var t = this,
                  i = n(".k-upload-selected", t.wrapper),
                  r = n(".k-clear-selected", t.wrapper);
                0 === i.length &&
                  ((i = t
                    ._renderAction("", this.localization.uploadSelectedFiles)
                    .addClass("k-upload-selected")),
                  (r = t
                    ._renderAction("", this.localization.clearSelectedFiles)
                    .addClass("k-clear-selected")));
                this.wrapper.append(r, i);
              },
              _hideUploadButton: function () {
                n(
                  ".k-upload-selected, .k-clear-selected",
                  this.wrapper
                ).remove();
              },
              _showHeaderUploadStatus: function (t) {
                var r = this,
                  u = r.localization,
                  f = n(".k-dropzone", r.wrapper),
                  i = n(".k-upload-status-total", r.wrapper);
                0 !== i.length && i.remove();
                i =
                  '<strong class="k-upload-status k-upload-status-total"><span class="k-icon"></span></strong>';
                t
                  ? ((i = n(i).append(u.headerStatusUploading)),
                    i.find(".k-icon").addClass(c.loading))
                  : ((i = n(i).append(u.headerStatusUploaded)),
                    i.find(".k-icon").addClass(c.warning));
                f.length > 0
                  ? f.append(i)
                  : n(".k-upload-button", r.wrapper).after(i);
              },
              _updateHeaderUploadStatus: function () {
                var u,
                  r,
                  t = this,
                  i = n(".k-upload-status-total", this.wrapper),
                  f = n(".k-file", t.wrapper).not(
                    ".k-file-success, .k-file-error, .k-file-invalid"
                  ),
                  o = n(".k-file-invalid", t.wrapper),
                  s = n(".k-file-error", t.wrapper),
                  e = n(".k-file", t.wrapper).find(".k-i-play-sm");
                !e.length ||
                (e.length !== f.length && t.options.async.concurrent)
                  ? (0 === f.length || o.length > 0 || s.length > 0) &&
                    ((u = n(
                      ".k-file.k-file-error, .k-file.k-file-invalid",
                      t.wrapper
                    )),
                    (i = n(".k-upload-status-total", t.wrapper)),
                    (r = n(".k-icon", i)
                      .removeClass()
                      .addClass("k-icon")
                      .addClass(0 !== u.length ? c.warning : c.success)),
                    i.html(r).append(t.localization.headerStatusUploaded))
                  : ((r = n(".k-icon", i)
                      .removeClass()
                      .addClass("k-icon")
                      .addClass("k-i-pause-sm")),
                    i.html(r).append(t.localization.headerStatusPaused));
              },
              _hideHeaderUploadstatus: function () {
                n(".k-upload-status-total", this.wrapper).remove();
              },
              _onParentFormSubmit: function () {
                var i,
                  u = this,
                  r = u.element;
                t !== this._module.onAbort && this._module.onAbort();
                r.value ||
                  ((i = n(r)),
                  i.attr("disabled", "disabled"),
                  window.setTimeout(function () {
                    i.removeAttr("disabled");
                  }, 0));
              },
              _onParentFormReset: function () {
                n(".k-upload-files", this.wrapper).remove();
              },
              _supportsFormData: function () {
                return "undefined" != typeof FormData;
              },
              _supportsMultiple: function () {
                var n = this._userAgent().indexOf("Windows") > -1;
                return !(
                  i.support.browser.opera ||
                  (i.support.browser.safari && n)
                );
              },
              _supportsDrop: function () {
                var n = this._userAgent().toLowerCase(),
                  t = /chrome/.test(n),
                  i = !t && /safari/.test(n),
                  r = i && /windows/.test(n);
                return (
                  !r && this._supportsFormData() && this.options.async.saveUrl
                );
              },
              _userAgent: function () {
                return navigator.userAgent;
              },
              _setupDropZone: function () {
                var t = this,
                  r = t._ns,
                  i = n(".k-dropzone", t.wrapper)
                    .append(
                      n(
                        "<em class='k-dropzone-hint'>" +
                          t.localization.dropFilesHere +
                          "</em>"
                      )
                    )
                    .on("dragenter" + r, a)
                    .on("dragover" + r, function (n) {
                      n.preventDefault();
                    })
                    .on("drop" + r, n.proxy(t._onDrop, t));
                v(
                  i,
                  r,
                  function () {
                    i.closest(".k-upload").hasClass("k-state-disabled") ||
                      i.addClass("k-dropzone-hovered");
                  },
                  function () {
                    i.removeClass("k-dropzone-hovered");
                  }
                );
                t._bindDocumentDragEventWrappers(i);
              },
              _setupCustomDropZone: function () {
                var r,
                  t = this,
                  i = n(t.options.dropZone);
                n(".k-dropzone", t.wrapper).append(
                  n(
                    "<em class='k-dropzone-hint'>" +
                      t.localization.dropFilesHere +
                      "</em>"
                  )
                );
                r = t._ns;
                i.on("dragenter" + r, a)
                  .on("dragover" + r, function (n) {
                    n.preventDefault();
                  })
                  .on("drop" + r, n.proxy(t._onDrop, t));
                v(
                  i,
                  r,
                  function (r) {
                    t.wrapper.hasClass("k-state-disabled") ||
                      (i.removeClass("k-dropzone-hovered"),
                      n(r.target).addClass("k-dropzone-hovered"));
                  },
                  function () {
                    i.removeClass("k-dropzone-hovered");
                    i.find(".k-dropzone-hovered").removeClass(
                      "k-dropzone-hovered"
                    );
                  }
                );
                t._bindDocumentDragEventWrappers(i);
              },
              _bindDocumentDragEventWrappers: function (t) {
                var i = this,
                  r = i._ns;
                v(
                  n(document),
                  r,
                  function () {
                    i.wrapper.hasClass("k-state-disabled") ||
                      (t.addClass("k-dropzone-active"),
                      t.closest(".k-upload").removeClass("k-upload-empty"));
                  },
                  function () {
                    t.removeClass("k-dropzone-active");
                    0 === n("li.k-file", t.closest(".k-upload")).length &&
                      t.closest(".k-upload").addClass("k-upload-empty");
                  }
                );
              },
              _supportsRemove: function () {
                return !!this.options.async.removeUrl;
              },
              _submitRemove: function (t, i, r, u) {
                var e = this,
                  o = e.options.async.removeField || "fileNames",
                  f = n.extend(i.data, w());
                f[o] = t;
                jQuery.ajax({
                  type: this.options.async.removeVerb,
                  dataType: "json",
                  dataFilter: lt,
                  url: this.options.async.removeUrl,
                  traditional: !0,
                  data: f,
                  headers: i.headers,
                  success: r,
                  error: u,
                  xhrFields: {
                    withCredentials: this.options.async.withCredentials,
                  },
                });
              },
              _wrapInput: function (n) {
                var t = this,
                  i = t.options;
                return (
                  n.wrap(
                    "<div class='k-widget k-upload'><div class='k-dropzone'><div class='k-button k-upload-button' aria-label='" +
                      this.localization.select +
                      "'></div></div></div>"
                  ),
                  i.async.saveUrl
                    ? n.closest(".k-upload").addClass("k-upload-async")
                    : n.closest(".k-upload").addClass("k-upload-sync"),
                  n.closest(".k-upload").addClass("k-upload-empty"),
                  n
                    .closest(".k-button")
                    .append("<span>" + this.localization.select + "</span>"),
                  n.closest(".k-upload")
                );
              },
              _checkAllComplete: function () {
                0 === n(".k-file.k-file-progress", this.wrapper).length &&
                  this.trigger(vt);
              },
              _inputFiles: function (n) {
                return rt(n);
              },
            }),
            gt = function (n) {
              this.name = "syncUploadModule";
              this.element = n.wrapper;
              this.upload = n;
              this.element
                .closest("form")
                .attr("enctype", "multipart/form-data")
                .attr("encoding", "multipart/form-data");
            };
          gt.prototype = {
            onSelect: function (t, i) {
              var e,
                o,
                r = this.upload,
                f = n(t.target),
                s = r._filesContainValidationErrors(i);
              r._addInput(f);
              e = { fileNames: i };
              s ? f.remove() : (e.relatedInput = f);
              o = r._enqueueFile(it(f), e);
              s && r._hideUploadProgress(o);
              r._fileAction(o, u);
            },
            onRemove: function (n) {
              var t = r(n),
                i = t.data("relatedInput");
              i && i.remove();
              this.upload._removeFileEntry(t);
            },
          };
          y = function (n) {
            this.name = "iframeUploadModule";
            this.element = n.wrapper;
            this.upload = n;
            this.iframes = [];
          };
          tt._frameId = 0;
          y.prototype = {
            onSelect: function (t, i) {
              var r = this.upload,
                o = n(t.target),
                f = r._filesContainValidationErrors(i),
                e = this.prepareUpload(o, i, f);
              r.options.async.autoUpload
                ? f
                  ? (r._fileAction(e, u), r._showHeaderUploadStatus(!1))
                  : this.performUpload(e)
                : (r._fileAction(e, u),
                  f ? r._updateHeaderUploadStatus() : r._showUploadButton());
              f && r._hideUploadProgress(e);
            },
            prepareUpload: function (t, i, r) {
              var e,
                o,
                u,
                s,
                f = this.upload,
                h = n(f.element),
                c = f.options.async.saveField || t.attr("name");
              return (
                f._addInput(t),
                t.attr("name", c),
                r
                  ? (t.remove(), (o = { fileNames: i }))
                  : ((u = this.createFrame(f.name + "_" + tt._frameId++)),
                    this.registerFrame(u),
                    (s = this.createForm(
                      f.options.async.saveUrl,
                      u.attr("name")
                    ).append(h)),
                    (o = { frame: u, relatedInput: h, fileNames: i })),
                (e = f._enqueueFile(it(t), o)),
                u && u.data({ form: s, file: e }),
                e
              );
            },
            performUpload: function (t) {
              var f,
                e,
                o,
                u = { files: t.data("fileNames") },
                r = t.data("frame"),
                i = this.upload;
              if (i.trigger(d, u))
                i._removeFileEntry(r.data("file")),
                  this.cleanupFrame(r),
                  this.unregisterFrame(r);
              else {
                i._hideUploadButton();
                i._showHeaderUploadStatus(!0);
                r.appendTo(document.body);
                f = r
                  .data("form")
                  .attr("action", i.options.async.saveUrl)
                  .appendTo(document.body);
                u.data = n.extend({}, u.data, w());
                for (e in u.data)
                  (o = f.find("input[name='" + e + "']")),
                    0 === o.length &&
                      (o = n("<input>", { type: "hidden", name: e }).prependTo(
                        f
                      )),
                    o.val(u.data[e]);
                i._fileAction(t, h);
                i._fileState(t, "uploading");
                n(t).removeClass("k-file-error").addClass("k-file-progress");
                r.one("load", n.proxy(this.onIframeLoad, this));
                f[0].submit();
              }
            },
            onSaveSelected: function () {
              var t = this,
                i = t.upload;
              n(".k-file", this.element).each(function () {
                var r = n(this),
                  u = at(r),
                  f = i._filesContainValidationErrors(r.data("fileNames"));
                u || f || t.performUpload(r);
              });
            },
            onIframeLoad: function (t) {
              var i,
                r = n(t.target);
              try {
                i = r.contents().text();
              } catch (u) {
                i = "Error trying to get server response: " + u;
              }
              this.processResponse(r, i);
            },
            processResponse: function (t, i) {
              var f = t.data("file"),
                r = this,
                u = { responseText: i };
              ct(
                i,
                function (i) {
                  n.extend(u, { statusText: "OK", status: "200" });
                  r.upload._onFileProgress(
                    { target: n(f, r.upload.wrapper) },
                    100
                  );
                  r.upload._onUploadSuccess(
                    { target: n(f, r.upload.wrapper) },
                    i,
                    u
                  );
                  r.cleanupFrame(t);
                  r.unregisterFrame(t);
                },
                function () {
                  n.extend(u, { statusText: "error", status: "500" });
                  r.upload._onUploadError(
                    { target: n(f, r.upload.wrapper) },
                    u
                  );
                }
              );
            },
            onCancel: function (t) {
              var i = n(t.target).data("frame");
              this.stopFrameSubmit(i);
              this.cleanupFrame(i);
              this.unregisterFrame(i);
              this.upload._removeFileEntry(i.data("file"));
            },
            onRetry: function (n) {
              var t = r(n);
              this.performUpload(t);
            },
            onRemove: function (n, t, i) {
              var f = this,
                e = f.upload,
                u = r(n),
                o = u.data("frame");
              o
                ? (f.unregisterFrame(o),
                  e._removeFileEntry(u),
                  f.cleanupFrame(o))
                : u.hasClass("k-file-success")
                ? ht(u, e, t, i)
                : e._removeFileEntry(u);
            },
            onAbort: function () {
              var t = this.element,
                i = this;
              n.each(this.iframes, function () {
                n("input", this.data("form")).appendTo(t);
                i.stopFrameSubmit(this[0]);
                this.data("form").remove();
                this.remove();
              });
              this.iframes = [];
            },
            createFrame: function (t) {
              return n(
                "<iframe name='" +
                  t +
                  "' id='" +
                  t +
                  "' style='display:none;' />"
              );
            },
            createForm: function (t, i) {
              return n(
                "<form enctype='multipart/form-data' method='POST' action='" +
                  t +
                  "' target='" +
                  i +
                  "'/>"
              );
            },
            stopFrameSubmit: function (n) {
              t !== n.stop
                ? n.stop()
                : n.document && n.document.execCommand("Stop");
            },
            registerFrame: function (n) {
              this.iframes.push(n);
            },
            unregisterFrame: function (t) {
              this.iframes = n.grep(this.iframes, function (n) {
                return n.attr("name") != t.attr("name");
              });
            },
            cleanupFrame: function (n) {
              var t = n.data("form");
              n.data("file").data("frame", null);
              setTimeout(function () {
                t.remove();
                n.remove();
              }, 1);
            },
          };
          p = function (n) {
            this.name = "formDataUploadModule";
            this.element = n.wrapper;
            this.upload = n;
            this.position = {};
            this.metaData = {};
            this.cancelled = {};
            this.resume = {};
            this.paused = {};
            this.retries = {};
          };
          p.prototype = {
            onSelect: function (t, i) {
              var f,
                e,
                r = this.upload,
                o = this,
                s = n(t.target),
                h = this.prepareUpload(s, i);
              n.each(h, function (t) {
                f = r._filesContainValidationErrors(n(this.data("fileNames")));
                r.options.async.autoUpload
                  ? f
                    ? (r._fileAction(this, u), r._showHeaderUploadStatus(!1))
                    : r.options.async.chunkSize
                    ? (o.prepareChunk(this),
                      (e = this.prev()),
                      (r.options.async.concurrent ||
                        (0 === t && !e.length) ||
                        (0 === t && e.hasClass("k-file-success"))) &&
                        o.performUpload(this))
                    : o.performUpload(this)
                  : (r._fileAction(this, u),
                    f
                      ? r._updateHeaderUploadStatus()
                      : (r._showUploadButton(), this.addClass("k-toupload")));
                f && r._hideUploadProgress(this);
              });
            },
            prepareUpload: function (t, i) {
              var r = this.enqueueFiles(i);
              return (
                t.is("input") &&
                  (n.each(r, function () {
                    n(this).data("relatedInput", t);
                  }),
                  t.data("relatedFileEntries", r),
                  this.upload._addInput(t)),
                r
              );
            },
            enqueueFiles: function (t) {
              var f,
                e,
                i,
                u,
                r = this.upload,
                s = t.length,
                o = [];
              if (r.options.async.batch === !0)
                (f = n
                  .map(t, function (n) {
                    return n.name;
                  })
                  .join(", ")),
                  (r.directory || r.options.directoryDrop) &&
                    n(t).each(function () {
                      (this.rawFile.webkitRelativePath ||
                        this.rawFile.relativePath) &&
                        (this.name =
                          this.rawFile.webkitRelativePath ||
                          this.rawFile.relativePath);
                    }),
                  (u = r._enqueueFile(f, { fileNames: t })),
                  u.data("files", t),
                  o.push(u);
              else
                for (e = 0; e < s; e++)
                  (i = t[e]),
                    (f = i.name),
                    (r.directory || r.options.directoryDrop) &&
                      (i.rawFile.webkitRelativePath ||
                        i.rawFile.relativePath) &&
                      (i.name =
                        i.rawFile.webkitRelativePath || i.rawFile.relativePath),
                    (u = r._enqueueFile(f, { fileNames: [i] })),
                    u.data("files", [i]),
                    o.push(u);
              return o;
            },
            performUpload: function (t) {
              var f,
                e,
                i = this.upload,
                u = this.createFormData(),
                o = this.createXHR(),
                r = { files: t.data("fileNames"), XMLHttpRequest: o };
              if (i.trigger(d, r)) this.removeFileEntry(t);
              else {
                if (
                  (0 === t.find(".k-i-cancel").length &&
                    (i.options.async.chunkSize && i._fileAction(t, nt),
                    i._fileAction(t, h, i.options.async.chunkSize)),
                  i.wrapper.find(".k-toupload").length || i._hideUploadButton(),
                  i._showHeaderUploadStatus(!0),
                  r.formData)
                )
                  u = r.formData;
                else {
                  r.data = n.extend({}, r.data, w());
                  for (e in r.data) u.append(e, r.data[e]);
                  f = t.data("files");
                  f && this.populateFormData(u, f);
                }
                i._fileState(t, "uploading");
                n(t).removeClass("k-file-error").addClass("k-file-progress");
                i.options.async.useArrayBuffer && window.FileReader
                  ? this._readFile(i.options.async.saveUrl, u, t, o)
                  : this.postFormData(i.options.async.saveUrl, u, t, o);
              }
            },
            _readFile: function (i, r, u, f) {
              var e = this,
                o = e.upload,
                s = u.data("files")[0],
                h = new FileReader();
              h.onload = function (h) {
                try {
                  e.fileArrayBuffer = e.fileArrayBuffer
                    ? e._appendBuffer(e.fileArrayBuffer, h.target.result)
                    : h.target.result;
                } catch (c) {
                  return o._onUploadError({ target: n(u, o.wrapper) }, f), t;
                }
                e.position[s.uid] > s.size
                  ? (e.postFormData(
                      o.options.async.saveUrl,
                      e.fileArrayBuffer,
                      u,
                      f
                    ),
                    (e.fileArrayBuffer = null))
                  : e._readFile(i, r, u, f);
              };
              h.onerror = function () {
                o._onUploadError({ target: n(u, o.wrapper) }, f);
              };
              h.readAsArrayBuffer(e._getCurrentChunk(s.rawFile, s.uid));
            },
            _appendBuffer: function (n, t) {
              var i = new Uint8Array(n.byteLength + t.byteLength);
              return (
                i.set(new Uint8Array(n), 0),
                i.set(new Uint8Array(t), n.byteLength),
                i.buffer
              );
            },
            onSaveSelected: function () {
              var t = this,
                i = t.upload;
              n(".k-toupload", this.element)
                .filter(function () {
                  var t = n(this),
                    r = at(t),
                    u = i._filesContainValidationErrors(t.data("fileNames"));
                  return !r && !u;
                })
                .each(function (r) {
                  var u = n(this),
                    f = u.prev();
                  u.removeClass("k-toupload");
                  i.options.async.chunkSize
                    ? (t.prepareChunk(u),
                      (i.options.async.concurrent ||
                        (0 === r && !f.length) ||
                        (0 === r && f.hasClass("k-file-success")) ||
                        f.hasClass("k-file-error")) &&
                        t.performUpload(u))
                    : t.performUpload(u);
                });
            },
            onCancel: function (n) {
              var t = r(n);
              this.upload.options.async.chunkSize &&
                (this.cancelled[t.data("uid")] = !0);
              this.stopUploadRequest(t);
              this.removeFileEntry(t);
            },
            onPause: function (n) {
              var u = r(n),
                t = u.data("uid"),
                i = this.upload.options.async;
              i.chunkSize &&
                ((this.retries[t] = i.maxAutoRetries + 1),
                (this.paused[t] = !0),
                (this.resume[t] = !1));
            },
            onResume: function (n) {
              var t = r(n),
                i = t.data("uid");
              this.upload.options.async.chunkSize &&
                (delete this.paused[i],
                (this.resume[i] = !0),
                (this.retries[t.data("uid")] = 1),
                this._increaseChunkIndex(i),
                this.performUpload(t));
            },
            onRetry: function (n) {
              var t = r(n),
                i = this.upload.options.async;
              i.chunkSize &&
                ((this.retries[t.data("uid")] = i.maxAutoRetries + 1),
                delete this.paused[t.data("uid")]);
              this.performUpload(t);
            },
            onRemove: function (n, t, i) {
              var f = this,
                o = f.upload,
                u = r(n),
                e = this.upload.options.async;
              e.chunkSize &&
                (this.retries[u.data("uid")] = e.maxAutoRetries + 1);
              u.hasClass("k-file-success")
                ? ht(u, o, t, i)
                : f.removeFileEntry(u);
            },
            createXHR: function () {
              return new XMLHttpRequest();
            },
            postFormData: function (n, t, i, r) {
              var f,
                u = this;
              i.data("request", r);
              r.addEventListener(
                "load",
                function (n) {
                  u.onRequestSuccess.call(u, n, i);
                },
                !1
              );
              r.addEventListener(
                s,
                function (n) {
                  u.onRequestError.call(u, n, i);
                },
                !1
              );
              r.upload.addEventListener(
                "progress",
                function (n) {
                  u.onRequestProgress.call(u, n, i);
                },
                !1
              );
              r.open("POST", n, !0);
              r.withCredentials = this.upload.options.async.withCredentials;
              f = this.upload.options.async.accept;
              f && r.setRequestHeader("Accept", f);
              r.send(t);
            },
            createFormData: function () {
              return new FormData();
            },
            populateFormData: function (n, t) {
              var f,
                r,
                u,
                e,
                o = t.length,
                i = this.upload;
              if (i.options.async.chunkSize)
                (u = t[0].uid),
                  (f = this._getCurrentChunk(t[0].rawFile, u)),
                  n.append(i.options.async.saveField || i.name, f),
                  (e = JSON.stringify(this.metaData[u])),
                  n.append("metadata", e);
              else
                for (r = 0; r < o; r++)
                  n.append(i.options.async.saveField || i.name, t[r].rawFile);
              return n;
            },
            onRequestSuccess: function (t, i) {
              function f() {
                r.upload._onUploadError({ target: n(i, r.upload.wrapper) }, u);
              }
              function e(t) {
                var e = r.upload.options.async.batch,
                  o = r.upload.options.async.chunkSize,
                  s = r.upload.options.async.concurrent,
                  f = t.fileUid;
                r.paused[f] ||
                  r.cancelled[f] ||
                  (delete r.retries[f],
                  !o || e || t.uploaded
                    ? !o ||
                      e ||
                      s ||
                      !i.next().length ||
                      i.next().hasClass("k-toupload")
                      ? (r.upload._onFileProgress(
                          { target: n(i, r.upload.wrapper) },
                          100
                        ),
                        r.upload._onUploadSuccess(
                          { target: n(i, r.upload.wrapper) },
                          t,
                          u
                        ),
                        r.cleanupFileEntry(i))
                      : (r.upload._onFileProgress(
                          { target: n(i, r.upload.wrapper) },
                          100
                        ),
                        r._resetChunkIndex(f),
                        r.upload._onUploadSuccess(
                          { target: n(i, r.upload.wrapper) },
                          t,
                          u
                        ),
                        r.performUpload(i.next()))
                    : (r._increaseChunkIndex(f), r.performUpload(i)));
              }
              var u = t.target,
                r = this;
              u.status >= 200 && u.status <= 299
                ? ct(u.responseText, e, f)
                : f();
            },
            onRequestError: function (t, i) {
              var r = t.target;
              this.upload._onUploadError(
                { target: n(i, this.upload.wrapper) },
                r
              );
            },
            cleanupFileEntry: function (t) {
              var i = t.data("relatedInput"),
                r = !0;
              i &&
                (n.each(i.data("relatedFileEntries") || [], function () {
                  this.parent().length > 0 &&
                    this[0] != t[0] &&
                    (r = r && this.hasClass("k-file-success"));
                }),
                r && i.remove());
            },
            removeFileEntry: function (n) {
              var t = this.upload.options.async.chunkSize,
                i = this.upload.options.async.concurrent,
                r = this.upload.wrapper.find(".k-upload-selected").length > 0;
              this.cleanupFileEntry(n);
              !t || i || r || (n.next().length && this.performUpload(n.next()));
              this.upload._removeFileEntry(n);
            },
            onRequestProgress: function (t, i) {
              var r,
                u = Math.round((100 * t.loaded) / t.total),
                f = i.data("uid");
              this.upload.options.async.chunkSize &&
                ((r = this.metaData[f]),
                (u =
                  r && r.totalChunks
                    ? Math.round((r.chunkIndex / r.totalChunks) * 100)
                    : 100));
              this.upload._onFileProgress(
                { target: n(i, this.upload.wrapper) },
                u
              );
            },
            stopUploadRequest: function (n) {
              n.data("request").abort();
            },
            prepareChunk: function (n) {
              var i = n.data("files")[0],
                t = i.rawFile,
                r = i.uid,
                u = this.upload.options.async.chunkSize;
              this.position[r] = 0;
              this.metaData[r] = {
                chunkIndex: 0,
                contentType: t.type,
                fileName: t.name,
                relativePath: i.name,
                totalFileSize: t.size,
                totalChunks: Math.ceil(t.size / u),
                uploadUid: r,
              };
            },
            _decreaseChunkIndex: function (n) {
              this.metaData[n].chunkIndex--;
            },
            _increaseChunkIndex: function (n) {
              this.metaData[n].chunkIndex++;
            },
            _resetChunkIndex: function (n) {
              this.metaData[n].chunkIndex = 0;
            },
            _decreasePosition: function (n) {
              this.position[n] -= this.upload.options.async.chunkSize;
            },
            _getCurrentChunk: function (n, t) {
              var i,
                u = this.position[t],
                r = this.upload.options.async,
                f = r.chunkSize || r.bufferChunkSize;
              return (
                this.position[t] || (this.position[t] = 0),
                (this.position[t] += f),
                (i = this._getChunker(n)) ? n[i](u, this.position[t]) : n
              );
            },
            _getChunker: function (n) {
              return n.slice
                ? "slice"
                : n.mozSlice
                ? "mozSlice"
                : n.webkitSlice
                ? "webkitSlice"
                : null;
            },
          };
          i.ui.plugin(tt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.filebrowser.min",
      ["kendo.listview.min", "kendo.dropdownlist.min", "kendo.upload.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function ft(n, t, i) {
            var r, u;
            n.on("dragenter" + e, function () {
              t();
              u = new Date();
              r ||
                (r = setInterval(function () {
                  var n = new Date() - u;
                  n > 100 && (i(), clearInterval(r), (r = null));
                }, 100));
            }).on("dragover" + e, function () {
              u = new Date();
            });
          }
          function k(n, i) {
            return (n !== t && n.match(/\/$/)) || (n = (n || "") + "/"), n + i;
          }
          function d(n) {
            if (!n) return "";
            var t = " bytes";
            return (
              n >= 1073741824
                ? ((t = " GB"), (n /= 1073741824))
                : n >= 1048576
                ? ((t = " MB"), (n /= 1048576))
                : n >= 1024 && ((t = " KB"), (n /= 1024)),
              Math.round(100 * n) / 100 + t
            );
          }
          function et(n, t) {
            var i = n[t];
            return v(i) ? i.from || i.field || t : i;
          }
          var ot,
            g,
            nt,
            tt,
            i = window.kendo,
            o = i.ui.Widget,
            v = n.isPlainObject,
            r = n.proxy,
            p = n.extend,
            y = i.support.placeholder,
            it = i.support.browser,
            rt = i.isFunction,
            w = /(^\/|\/$)/g,
            s = "change",
            ut = "apply",
            l = "error",
            a = "click",
            e = ".kendoFileBrowser",
            h = ".kendoBreadcrumbs",
            c = ".kendoSearchBox",
            f = "name",
            b = "size",
            u = "type",
            st = { field: u, dir: "asc" },
            ht = i.template(
              '<li class="k-tile-empty"><strong>${text}</strong></li>'
            ),
            ct =
              '<div class="k-widget k-filebrowser-toolbar k-header k-floatwrap"><div class="k-toolbar-wrap"># if (showUpload) { # <div class="k-widget k-upload"><div class="k-button k-button-icontext k-upload-button"><span class="k-icon k-i-plus"></span>#=messages.uploadFile#<input type="file" name="file" /></div></div># } ## if (showCreate) { #<button type="button" class="k-button k-button-icon"><span class="k-icon k-i-folder-add" /></button># } ## if (showDelete) { #<button type="button" class="k-button k-button-icon k-state-disabled"><span class="k-icon k-i-close" /></button>&nbsp;# } #</div><div class="k-tiles-arrange"><label>#=messages.orderBy#: <select /></label></div></div>';
          p(!0, i.data, {
            schemas: {
              filebrowser: {
                data: function (n) {
                  return n.items || n || [];
                },
                model: {
                  id: "name",
                  fields: { name: "name", size: "size", type: "type" },
                },
              },
            },
          });
          p(!0, i.data, {
            transports: {
              filebrowser: i.data.RemoteTransport.extend({
                init: function (t) {
                  i.data.RemoteTransport.fn.init.call(
                    this,
                    n.extend(!0, {}, this.options, t)
                  );
                },
                _call: function (t, r) {
                  r.data = n.extend({}, r.data, { path: this.options.path() });
                  rt(this.options[t])
                    ? this.options[t].call(this, r)
                    : i.data.RemoteTransport.fn[t].call(this, r);
                },
                read: function (n) {
                  this._call("read", n);
                },
                create: function (n) {
                  this._call("create", n);
                },
                destroy: function (n) {
                  this._call("destroy", n);
                },
                update: function () {},
                options: {
                  read: { type: "POST" },
                  update: { type: "POST" },
                  create: { type: "POST" },
                  destroy: { type: "POST" },
                },
              }),
            },
          });
          ot =
            it.msie && it.version < 8
              ? function (n) {
                  return n.offsetTop;
                }
              : function (t) {
                  return t.offsetTop - n(t).height();
                };
          g = o.extend({
            init: function (n, t) {
              var i = this;
              t = t || {};
              o.fn.init.call(i, n, t);
              i.element.addClass("k-filebrowser");
              i.element
                .on(
                  a + e,
                  ".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-close)",
                  r(i._deleteClick, i)
                )
                .on(
                  a + e,
                  ".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-folder-add)",
                  r(i._addClick, i)
                )
                .on(
                  "keydown" + e,
                  "li.k-state-selected input",
                  r(i._directoryKeyDown, i)
                )
                .on(
                  "blur" + e,
                  "li.k-state-selected input",
                  r(i._directoryBlur, i)
                );
              i._dataSource();
              i.refresh();
              i.path(i.options.path);
            },
            options: {
              name: "FileBrowser",
              messages: {
                uploadFile: "Upload",
                orderBy: "Arrange by",
                orderByName: "Name",
                orderBySize: "Size",
                directoryNotFound: "A directory with this name was not found.",
                emptyFolder: "Empty Folder",
                deleteFile: 'Are you sure you want to delete "{0}"?',
                invalidFileType:
                  'The selected file "{0}" is not valid. Supported file types are {1}.',
                overwriteFile:
                  'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',
                dropFilesHere: "drop file here to upload",
                search: "Search",
              },
              transport: {},
              path: "/",
              fileTypes: "*.*",
            },
            events: [l, s, ut],
            destroy: function () {
              var n = this;
              o.fn.destroy.call(n);
              n.dataSource.unbind(l, n._errorHandler);
              n.element.add(n.list).add(n.toolbar).off(e);
              i.destroy(n.element);
            },
            value: function () {
              var n,
                r = this,
                e = r._selectedItem(),
                t = r.options.transport.fileUrl;
              if (e && "f" === e.get(u))
                return (
                  (n = k(r.path(), e.get(f)).replace(w, "")),
                  t && (n = rt(t) ? t(n) : i.format(t, encodeURIComponent(n))),
                  n
                );
            },
            _selectedItem: function () {
              var t = this.listView,
                n = t.select();
              if (n.length)
                return this.dataSource.getByUid(n.attr(i.attr("uid")));
            },
            _toolbar: function () {
              var t = this,
                f = i.template(ct),
                u = t.options.messages,
                e = [
                  { text: u.orderByName, value: "name" },
                  { text: u.orderBySize, value: "size" },
                ];
              t.toolbar = n(
                f({
                  messages: u,
                  showUpload: t.options.transport.uploadUrl,
                  showCreate: t.options.transport.create,
                  showDelete: t.options.transport.destroy,
                })
              )
                .appendTo(t.element)
                .find(".k-upload input")
                .kendoUpload({
                  multiple: !1,
                  localization: { dropFilesHere: u.dropFilesHere },
                  async: {
                    saveUrl: t.options.transport.uploadUrl,
                    autoUpload: !0,
                  },
                  upload: r(t._fileUpload, t),
                  error: function (n) {
                    t._error({ xhr: n.XMLHttpRequest, status: "error" });
                  },
                })
                .end();
              t.upload = t.toolbar.find(".k-upload input").data("kendoUpload");
              t.arrangeBy = t.toolbar
                .find(".k-tiles-arrange select")
                .kendoDropDownList({
                  dataSource: e,
                  dataTextField: "text",
                  dataValueField: "value",
                  change: function () {
                    t.orderBy(this.value());
                  },
                })
                .data("kendoDropDownList");
              t._attachDropzoneEvents();
            },
            _attachDropzoneEvents: function () {
              var t = this;
              t.options.transport.uploadUrl &&
                (ft(
                  n(document.documentElement),
                  n.proxy(t._dropEnter, t),
                  n.proxy(t._dropLeave, t)
                ),
                (t._scrollHandler = r(t._positionDropzone, t)));
            },
            _dropEnter: function () {
              this._positionDropzone();
              n(document).on("scroll" + e, this._scrollHandler);
            },
            _dropLeave: function () {
              this._removeDropzone();
              n(document).off("scroll" + e, this._scrollHandler);
            },
            _positionDropzone: function () {
              var t = this,
                n = t.element,
                i = n.offset();
              t.toolbar
                .find(".k-dropzone")
                .addClass("k-filebrowser-dropzone")
                .offset(i)
                .css({
                  width: n[0].clientWidth,
                  height: n[0].clientHeight,
                  lineHeight: n[0].clientHeight + "px",
                });
            },
            _removeDropzone: function () {
              this.toolbar
                .find(".k-dropzone")
                .removeClass("k-filebrowser-dropzone")
                .css({
                  width: "",
                  height: "",
                  lineHeight: "",
                  top: "",
                  left: "",
                });
            },
            _deleteClick: function () {
              var n = this,
                t = n.listView.select(),
                r = i.format(
                  n.options.messages.deleteFile,
                  t.find("strong").text()
                );
              t.length && n._showMessage(r, "confirm") && n.listView.remove(t);
            },
            _addClick: function () {
              this.createDirectory();
            },
            _getFieldName: function (n) {
              return et(this.dataSource.reader.model.fields, n);
            },
            _fileUpload: function (n) {
              var r,
                t = this,
                e = t.options,
                o = e.fileTypes,
                c = RegExp(
                  ("(" + o.split(",").join(")|(") + ")").replace(
                    /\*\./g,
                    ".*."
                  ),
                  "i"
                ),
                u = n.files[0].name,
                l = n.files[0].size,
                s = f,
                h = b;
              c.test(u)
                ? ((n.data = { path: t.path() }),
                  (r = t._createFile(u, l)),
                  r
                    ? t.upload.one("success", function (n) {
                        var u = t._insertFileToList(r);
                        u._override &&
                          (u.set(s, n.response[t._getFieldName(s)]),
                          u.set(h, n.response[t._getFieldName(h)]),
                          t.listView.dataSource.pushUpdate(u));
                        t._tiles = t.listView
                          .items()
                          .filter("[" + i.attr("type") + "=f]");
                      })
                    : n.preventDefault())
                : (n.preventDefault(),
                  t._showMessage(i.format(e.messages.invalidFileType, u, o)));
            },
            _findFile: function (n) {
              var t,
                r,
                e,
                i = this.dataSource.data(),
                o = u,
                s = f;
              for (n = n.toLowerCase(), t = 0, e = i.length; t < e; t++)
                if ("f" === i[t].get(o) && i[t].get(s).toLowerCase() === n) {
                  r = i[t];
                  break;
                }
              return r;
            },
            _createFile: function (n, t) {
              var e = this,
                r = {},
                s = u,
                o = e._findFile(n);
              return o
                ? e._showMessage(
                    i.format(e.options.messages.overwriteFile, n),
                    "confirm"
                  )
                  ? ((o._override = !0), o)
                  : null
                : ((r[s] = "f"), (r[f] = n), (r[b] = t), r);
            },
            _insertFileToList: function (n) {
              var f, i, r, t, e;
              if (n._override) return n;
              for (
                i = this.dataSource, r = i.view(), t = 0, e = r.length;
                t < e;
                t++
              )
                if ("f" === r[t].get(u)) {
                  f = t;
                  break;
                }
              return i.insert(++f, n);
            },
            createDirectory: function () {
              for (
                var n = this,
                  s = 0,
                  h = u,
                  e = f,
                  c = n.dataSource.data(),
                  l = n._nameDirectory(),
                  r = new n.dataSource.reader.model(),
                  t = 0,
                  o = c.length;
                t < o;
                t++
              )
                "d" === c[t].get(h) && (s = t);
              r.set(h, "d");
              r.set(e, l);
              n.listView
                .one("dataBound", function () {
                  var t = n.listView
                    .items()
                    .filter("[" + i.attr("uid") + "=" + r.uid + "]");
                  t.length && this.edit(t);
                  this.element.scrollTop(
                    t.attr("offsetTop") - this.element[0].offsetHeight
                  );
                  setTimeout(function () {
                    n.listView.element.find(".k-edit-item input").select();
                  });
                })
                .one("save", function (t) {
                  var i = t.model.get(e);
                  i
                    ? t.model.set(
                        e,
                        n._nameExists(i, r.uid) ? n._nameDirectory() : i
                      )
                    : t.model.set(e, l);
                });
              n.dataSource.insert(++s, r);
            },
            _directoryKeyDown: function (n) {
              13 == n.keyCode && n.currentTarget.blur();
            },
            _directoryBlur: function () {
              this.listView.save();
            },
            _nameExists: function (n, t) {
              for (
                var r = this.dataSource.data(),
                  o = u,
                  s = f,
                  i = 0,
                  e = r.length;
                i < e;
                i++
              )
                if (
                  "d" === r[i].get(o) &&
                  r[i].get(s).toLowerCase() === n.toLowerCase() &&
                  r[i].uid !== t
                )
                  return !0;
              return !1;
            },
            _nameDirectory: function () {
              for (
                var e,
                  i = "New folder",
                  r = this.dataSource.data(),
                  o = [],
                  c = u,
                  h = f,
                  t = 0,
                  s = r.length;
                t < s;
                t++
              )
                "d" === r[t].get(c) &&
                  r[t].get(h).toLowerCase().indexOf(i.toLowerCase()) > -1 &&
                  o.push(r[t].get(h));
              if (n.inArray(i, o) > -1) {
                t = 2;
                do (e = i + " (" + t + ")"), t++;
                while (n.inArray(e, o) > -1);
                i = e;
              }
              return i;
            },
            orderBy: function (n) {
              this.dataSource.sort([
                { field: u, dir: "asc" },
                { field: n, dir: "asc" },
              ]);
            },
            search: function (n) {
              this.dataSource.filter({
                field: f,
                operator: "contains",
                value: n,
              });
            },
            _content: function () {
              var t = this;
              t.list = n('<ul class="k-reset k-floats k-tiles" />')
                .appendTo(t.element)
                .on("dblclick" + e, "li", r(t._dblClick, t));
              t.listView = new i.ui.ListView(t.list, {
                dataSource: t.dataSource,
                template: t._itemTmpl(),
                editTemplate: t._editTmpl(),
                selectable: !0,
                autoBind: !1,
                dataBinding: function (n) {
                  t.toolbar
                    .find(".k-i-close")
                    .parent()
                    .addClass("k-state-disabled");
                  ("remove" !== n.action && "sync" !== n.action) ||
                    (n.preventDefault(), i.ui.progress(t.listView.element, !1));
                },
                dataBound: function () {
                  t.dataSource.view().length
                    ? (t._tiles = this.items().filter(
                        "[" + i.attr("type") + "=f]"
                      ))
                    : this.wrapper.append(
                        ht({ text: t.options.messages.emptyFolder })
                      );
                },
                change: r(t._listViewChange, t),
              });
            },
            _dblClick: function (t) {
              var e,
                r = this,
                u = n(t.currentTarget);
              u.hasClass("k-edit-item") && r._directoryBlur();
              u.filter("[" + i.attr("type") + "=d]").length
                ? ((e = r.dataSource.getByUid(u.attr(i.attr("uid")))),
                  e &&
                    (r.path(k(r.path(), e.get(f))),
                    r.breadcrumbs.value(r.path())))
                : u.filter("[" + i.attr("type") + "=f]").length &&
                  r.trigger(ut);
            },
            _listViewChange: function () {
              var n = this._selectedItem();
              n &&
                (this.toolbar
                  .find(".k-i-close")
                  .parent()
                  .removeClass("k-state-disabled"),
                this.trigger(s, { selected: n }));
            },
            _dataSource: function () {
              var o,
                n = this,
                u = n.options,
                t = u.transport,
                s = p({}, st),
                h = { field: f, dir: "asc" },
                e = { type: t.type || "filebrowser", sort: [s, h] };
              v(t) && ((t.path = r(n.path, n)), (e.transport = t));
              v(u.schema)
                ? (e.schema = u.schema)
                : t.type &&
                  v(i.data.schemas[t.type]) &&
                  (o = i.data.schemas[t.type]);
              n.dataSource && n._errorHandler
                ? n.dataSource.unbind(l, n._errorHandler)
                : (n._errorHandler = r(n._error, n));
              n.dataSource = i.data.DataSource.create(e).bind(
                l,
                n._errorHandler
              );
            },
            _navigation: function () {
              var t = this,
                i = n(
                  '<div class="k-floatwrap"><input/><input/></div>'
                ).appendTo(this.element);
              t.breadcrumbs = i
                .find("input:first")
                .kendoBreadcrumbs({
                  value: t.options.path,
                  change: function () {
                    t.path(this.value());
                  },
                })
                .data("kendoBreadcrumbs");
              t.searchBox = i
                .parent()
                .find("input:last")
                .kendoSearchBox({
                  label: t.options.messages.search,
                  change: function () {
                    t.search(this.value());
                  },
                })
                .data("kendoSearchBox");
            },
            _error: function (n) {
              var i,
                r,
                t = this;
              t.trigger(l, n) ||
                ((i = n.xhr.status),
                "error" == n.status
                  ? "404" == i
                    ? t._showMessage(t.options.messages.directoryNotFound)
                    : "0" != i &&
                      t._showMessage(
                        "Error! The requested URL returned " +
                          i +
                          " - " +
                          n.xhr.statusText
                      )
                  : "timeout" == i && t._showMessage("Error! Server timeout."),
                (r = t.dataSource),
                r.hasChanges() && r.cancelChanges());
            },
            _showMessage: function (n, t) {
              return window[t || "alert"](n);
            },
            refresh: function () {
              var n = this;
              n._navigation();
              n._toolbar();
              n._content();
            },
            _editTmpl: function () {
              var n =
                '<li class="k-tile k-state-selected" ' +
                i.attr("uid") +
                '="#=uid#" ';
              return (
                (n += i.attr("type") + '="${' + u + '}">'),
                (n += "#if(" + u + ' == "d") { #'),
                (n +=
                  '<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>'),
                (n += "#}else{#"),
                (n +=
                  '<div class="k-thumb"><span class="k-icon k-i-loading"></span></div>'),
                (n += "#}#"),
                (n += "#if(" + u + ' == "d") { #'),
                (n +=
                  '<input class="k-input" ' +
                  i.attr("bind") +
                  '="value:' +
                  f +
                  '"/>'),
                (n += "#}#"),
                (n += "</li>"),
                r(i.template(n), { sizeFormatter: d })
              );
            },
            _itemTmpl: function () {
              var n = '<li class="k-tile" ' + i.attr("uid") + '="#=uid#" ';
              return (
                (n += i.attr("type") + '="${' + u + '}">'),
                (n += "#if(" + u + ' == "d") { #'),
                (n +=
                  '<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>'),
                (n += "#}else{#"),
                (n +=
                  '<div class="k-thumb"><span class="k-icon k-i-file"></span></div>'),
                (n += "#}#"),
                (n += "<strong>${" + f + "}</strong>"),
                (n +=
                  "#if(" +
                  u +
                  ' == "f") { # <span class="k-filesize">${this.sizeFormatter(' +
                  b +
                  ")}</span> #}#"),
                (n += "</li>"),
                r(i.template(n), { sizeFormatter: d })
              );
            },
            path: function (n) {
              var r = this,
                i = r._path || "";
              return n !== t
                ? ((r._path = n.replace(w, "") + "/"),
                  r.dataSource.read({ path: r._path }),
                  t)
                : (i && (i = i.replace(w, "")),
                  "/" === i || "" === i ? "" : i + "/");
            },
          });
          nt = o.extend({
            init: function (n, t) {
              var i = this;
              t = t || {};
              o.fn.init.call(i, n, t);
              y && i.element.attr("placeholder", i.options.label);
              i._wrapper();
              i.element
                .on("keydown" + c, r(i._keydown, i))
                .on("change" + c, r(i._updateValue, i));
              i.wrapper.on(a + c, "a", r(i._click, i));
              y ||
                i.element
                  .on("focus" + c, r(i._focus, i))
                  .on("blur" + c, r(i._blur, i));
            },
            options: { name: "SearchBox", label: "Search", value: "" },
            events: [s],
            destroy: function () {
              var n = this;
              n.wrapper.add(n.element).add(n.label).off(c);
              o.fn.destroy.call(n);
            },
            _keydown: function (n) {
              13 === n.keyCode && this._updateValue();
            },
            _click: function (n) {
              n.preventDefault();
              this._updateValue();
            },
            _updateValue: function () {
              var n = this,
                t = n.element.val();
              t !== n.value() && (n.value(t), n.trigger(s));
            },
            _blur: function () {
              this._updateValue();
              this._toggleLabel();
            },
            _toggleLabel: function () {
              y || this.label.toggle(!this.element.val());
            },
            _focus: function () {
              this.label.hide();
            },
            _wrapper: function () {
              var t = this.element,
                i = t.parents(".k-search-wrap");
              t[0].style.width = "";
              t.addClass("k-input");
              i.length ||
                ((i = t
                  .wrap(n('<div class="k-widget k-search-wrap k-textbox"/>'))
                  .parent()),
                y ||
                  n(
                    '<label style="display:block">' +
                      this.options.label +
                      "</label>"
                  ).insertBefore(t),
                n('<a href="#" class="k-icon k-i-zoom k-search"/>').appendTo(
                  i
                ));
              this.wrapper = i;
              this.label = i.find(">label");
            },
            value: function (n) {
              var i = this;
              return n !== t
                ? ((i.options.value = n), i.element.val(n), i._toggleLabel(), t)
                : i.options.value;
            },
          });
          tt = o.extend({
            init: function (n, t) {
              var i = this;
              t = t || {};
              o.fn.init.call(i, n, t);
              i._wrapper();
              i.wrapper
                .on("focus" + h, "input", r(i._focus, i))
                .on("blur" + h, "input", r(i._blur, i))
                .on("keydown" + h, "input", r(i._keydown, i))
                .on(a + h, "a.k-i-arrow-60-up:first", r(i._rootClick, i))
                .on(a + h, "a:not(.k-i-arrow-60-up)", r(i._click, i));
              i.value(i.options.value);
            },
            options: { name: "Breadcrumbs", gap: 50 },
            events: [s],
            destroy: function () {
              var n = this;
              o.fn.destroy.call(n);
              n.wrapper
                .add(n.wrapper.find("input"))
                .add(n.wrapper.find("a"))
                .off(h);
            },
            _update: function (n) {
              n = "/" === (n || "").charAt(0) ? n : "/" + (n || "");
              n !== this.value() && (this.value(n), this.trigger(s));
            },
            _click: function (t) {
              t.preventDefault();
              this._update(
                this._path(
                  n(t.target).prevAll("a:not(.k-i-arrow-60-up)").addBack()
                )
              );
            },
            _rootClick: function (n) {
              n.preventDefault();
              this._update("");
            },
            _focus: function () {
              var n = this,
                t = n.element;
              n.overlay.hide();
              n.element.val(n.value());
              setTimeout(function () {
                t.select();
              });
            },
            _blur: function () {
              if (!this.overlay.is(":visible")) {
                var n = this,
                  t = n.element,
                  i = t.val().replace(/\/{2,}/g, "/");
                n.overlay.show();
                t.val("");
                n._update(i);
              }
            },
            _keydown: function (n) {
              var t = this;
              13 === n.keyCode &&
                (t._blur(),
                setTimeout(function () {
                  t.overlay.find("a:first").focus();
                }));
            },
            _wrapper: function () {
              var i,
                r = this.element,
                t = r.parents(".k-breadcrumbs");
              r[0].style.width = "";
              r.addClass("k-input");
              t.length ||
                (t = r
                  .wrap(n('<div class="k-widget k-breadcrumbs k-textbox"/>'))
                  .parent());
              i = t.find(".k-breadcrumbs-wrap");
              i.length ||
                (i = n('<div class="k-breadcrumbs-wrap"/>').appendTo(t));
              this.wrapper = t;
              this.overlay = i;
            },
            refresh: function () {
              var f,
                e,
                i,
                o,
                r = "",
                u = this.value();
              for (
                (u !== t && u.match(/^\//)) || (u = "/" + (u || "")),
                  f = u.split("/"),
                  i = 0,
                  o = f.length;
                i < o;
                i++
              )
                (e = f[i]),
                  e &&
                    (r ||
                      (r +=
                        '<a href="#" class="k-icon k-i-arrow-60-up" title="Go to parent folder"></a>'),
                    (r += '<a class="k-link" href="#">' + f[i] + "</a>"),
                    (r +=
                      '<span class="k-icon k-i-arrow-60-right" title="Go to child folder"></span>'));
              this.overlay.empty().append(n(r));
              this._adjustSectionWidth();
            },
            _adjustSectionWidth: function () {
              var t,
                i = this,
                f = i.wrapper,
                r = f.width() - i.options.gap,
                u = i.overlay.find("a");
              u.each(function (i) {
                t = n(this);
                t.parent().width() > r &&
                  (i == u.length - 1 ? t.width(r) : t.prev().addBack().hide());
              });
            },
            value: function (n) {
              return n !== t
                ? ((this._value = n.replace(/\/{2,}/g, "/")), this.refresh(), t)
                : this._value;
            },
            _path: function (t) {
              return (
                "/" +
                n
                  .map(t, function (t) {
                    return n(t).text();
                  })
                  .join("/")
              );
            },
          });
          i.ui.plugin(g);
          i.ui.plugin(tt);
          i.ui.plugin(nt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.imagebrowser.min", ["kendo.filebrowser.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function w(n, i) {
            return (n !== t && n.match(/\/$/)) || (n = (n || "") + "/"), n + i;
          }
          function b(n) {
            if (!n) return "";
            var t = " bytes";
            return (
              n >= 1073741824
                ? ((t = " GB"), (n /= 1073741824))
                : n >= 1048576
                ? ((t = " MB"), (n /= 1048576))
                : n >= 1024 && ((t = " KB"), (n /= 1024)),
              Math.round(100 * n) / 100 + t
            );
          }
          var c,
            l,
            i = window.kendo,
            a = i.ui.FileBrowser,
            e = n.isPlainObject,
            r = n.proxy,
            o = n.extend,
            v = i.support.browser,
            s = i.isFunction,
            k = /(^\/|\/$)/g,
            y = "error",
            h = ".kendoImageBrowser",
            u = "name",
            p = "size",
            f = "type",
            d = { field: f, dir: "asc" },
            g = i.template(
              '<li class="k-tile-empty"><strong>${text}</strong></li>'
            );
          o(!0, i.data, {
            schemas: {
              imagebrowser: {
                data: function (n) {
                  return n.items || n || [];
                },
                model: {
                  id: "name",
                  fields: { name: "name", size: "size", type: "type" },
                },
              },
            },
          });
          o(!0, i.data, {
            transports: {
              imagebrowser: i.data.RemoteTransport.extend({
                init: function (t) {
                  i.data.RemoteTransport.fn.init.call(
                    this,
                    n.extend(!0, {}, this.options, t)
                  );
                },
                _call: function (t, r) {
                  r.data = n.extend({}, r.data, { path: this.options.path() });
                  s(this.options[t])
                    ? this.options[t].call(this, r)
                    : i.data.RemoteTransport.fn[t].call(this, r);
                },
                read: function (n) {
                  this._call("read", n);
                },
                create: function (n) {
                  this._call("create", n);
                },
                destroy: function (n) {
                  this._call("destroy", n);
                },
                update: function () {},
                options: {
                  read: { type: "POST" },
                  update: { type: "POST" },
                  create: { type: "POST" },
                  destroy: { type: "POST" },
                },
              }),
            },
          });
          c =
            v.msie && v.version < 8
              ? function (n) {
                  return n.offsetTop;
                }
              : function (t) {
                  return t.offsetTop - n(t).height();
                };
          l = a.extend({
            init: function (n, t) {
              var i = this;
              t = t || {};
              a.fn.init.call(i, n, t);
              i.element.addClass("k-imagebrowser");
            },
            options: {
              name: "ImageBrowser",
              fileTypes: "*.png,*.gif,*.jpg,*.jpeg",
            },
            value: function () {
              var n,
                r = this,
                e = r._selectedItem(),
                t = r.options.transport.imageUrl;
              if (e && "f" === e.get(f))
                return (
                  (n = w(r.path(), e.get(u)).replace(k, "")),
                  t && (n = s(t) ? t(n) : i.format(t, encodeURIComponent(n))),
                  n
                );
            },
            _fileUpload: function (n) {
              var f,
                r = this,
                o = r.options,
                s = o.fileTypes,
                l = RegExp(
                  ("(" + s.split(",").join(")|(") + ")").replace(
                    /\*\./g,
                    ".*."
                  ),
                  "i"
                ),
                e = n.files[0].name,
                a = n.files[0].size,
                h = u,
                c = p;
              l.test(e)
                ? ((n.data = { path: r.path() }),
                  (f = r._createFile(e, a)),
                  f
                    ? ((f._uploading = !0),
                      r.upload.one("error", function () {
                        f = t;
                      }),
                      r.upload.one("success", function (n) {
                        if (f) {
                          delete f._uploading;
                          var t = r._insertFileToList(f);
                          t._override &&
                            (t.set(h, n.response[r._getFieldName(h)]),
                            t.set(c, n.response[r._getFieldName(c)]),
                            r.listView.dataSource.pushUpdate(t));
                          r._tiles = r.listView
                            .items()
                            .filter("[" + i.attr("type") + "=f]");
                          r._scroll();
                        }
                      }))
                    : n.preventDefault())
                : (n.preventDefault(),
                  r._showMessage(i.format(o.messages.invalidFileType, e, s)));
            },
            _content: function () {
              var t = this;
              t.list = n('<ul class="k-reset k-floats k-tiles" />')
                .appendTo(t.element)
                .on("scroll" + h, r(t._scroll, t))
                .on("dblclick" + h, "li", r(t._dblClick, t));
              t.listView = new i.ui.ListView(t.list, {
                dataSource: t.dataSource,
                template: t._itemTmpl(),
                editTemplate: t._editTmpl(),
                selectable: !0,
                autoBind: !1,
                dataBinding: function (n) {
                  t.toolbar
                    .find(".k-i-close")
                    .parent()
                    .addClass("k-state-disabled");
                  ("remove" !== n.action && "sync" !== n.action) ||
                    (n.preventDefault(), i.ui.progress(t.listView.element, !1));
                },
                dataBound: function () {
                  t.dataSource.view().length
                    ? ((t._tiles = this.items().filter(
                        "[" + i.attr("type") + "=f]"
                      )),
                      t._scroll())
                    : this.wrapper.append(
                        g({ text: t.options.messages.emptyFolder })
                      );
                },
                change: r(t._listViewChange, t),
              });
            },
            _dataSource: function () {
              var h,
                n = this,
                f = n.options,
                t = f.transport,
                c = o({}, d),
                l = { field: u, dir: "asc" },
                s = { type: t.type || "imagebrowser", sort: [c, l] };
              e(t) && ((t.path = r(n.path, n)), (s.transport = t));
              e(f.schema)
                ? (s.schema = f.schema)
                : t.type &&
                  e(i.data.schemas[t.type]) &&
                  (h = i.data.schemas[t.type]);
              n.dataSource && n._errorHandler
                ? n.dataSource.unbind(y, n._errorHandler)
                : (n._errorHandler = r(n._error, n));
              n.dataSource = i.data.DataSource.create(s).bind(
                y,
                n._errorHandler
              );
            },
            _loadImage: function (t) {
              var f = this,
                l = n(t),
                e = f.dataSource.getByUid(l.attr(i.attr("uid"))),
                o = e.get(u),
                r = f.options.transport.thumbnailUrl,
                c = n("<img />", { alt: o }),
                a = "?";
              e._uploading ||
                (c.hide().on("load" + h, function () {
                  n(this).prev().remove().end().addClass("k-image").fadeIn();
                }),
                l.find(".k-i-loading").after(c),
                s(r)
                  ? (r = r(f.path(), encodeURIComponent(o)))
                  : (r.indexOf("?") >= 0 && (a = "&"),
                    (r = r + a + "path=" + encodeURIComponent(f.path() + o)),
                    e._override &&
                      ((r += "&_=" + new Date().getTime()),
                      delete e._override)),
                c.attr("src", r),
                (t.loaded = !0));
            },
            _scroll: function () {
              var n = this;
              n.options.transport &&
                n.options.transport.thumbnailUrl &&
                (clearTimeout(n._timeout),
                (n._timeout = setTimeout(function () {
                  var u = i._outerHeight(n.list),
                    t = n.list.scrollTop(),
                    r = t + u;
                  n._tiles.each(function () {
                    var i = c(this),
                      u = i + this.offsetHeight;
                    if (
                      (((i >= t && i < r) || (u >= t && u < r)) &&
                        n._loadImage(this),
                      i > r)
                    )
                      return !1;
                  });
                  n._tiles = n._tiles.filter(function () {
                    return !this.loaded;
                  });
                }, 250)));
            },
            _itemTmpl: function () {
              var t = this,
                n = '<li class="k-tile" ' + i.attr("uid") + '="#=uid#" ';
              return (
                (n += i.attr("type") + '="${' + f + '}">'),
                (n += "#if(" + f + ' == "d") { #'),
                (n +=
                  '<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>'),
                (n += "#}else{#"),
                (n +=
                  t.options.transport && t.options.transport.thumbnailUrl
                    ? '<div class="k-thumb"><span class="k-icon k-i-loading"></span></div>'
                    : '<div class="k-thumb"><span class="k-icon k-i-file"></span></div>'),
                (n += "#}#"),
                (n += "<strong>${" + u + "}</strong>"),
                (n +=
                  "#if(" +
                  f +
                  ' == "f") { # <span class="k-filesize">${this.sizeFormatter(' +
                  p +
                  ")}</span> #}#"),
                (n += "</li>"),
                r(i.template(n), { sizeFormatter: b })
              );
            },
          });
          i.ui.plugin(l);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("util/undoredostack.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        var t = n.Observable.extend({
          init: function (t) {
            n.Observable.fn.init.call(this, t);
            this.clear();
          },
          events: ["undo", "redo"],
          push: function (n) {
            this.stack = this.stack.slice(0, this.currentCommandIndex + 1);
            this.currentCommandIndex = this.stack.push(n) - 1;
          },
          undo: function () {
            if (this.canUndo()) {
              var n = this.stack[this.currentCommandIndex--];
              n.undo();
              this.trigger("undo", { command: n });
            }
          },
          redo: function () {
            if (this.canRedo()) {
              var n = this.stack[++this.currentCommandIndex];
              n.redo();
              this.trigger("redo", { command: n });
            }
          },
          clear: function () {
            this.stack = [];
            this.currentCommandIndex = -1;
          },
          canUndo: function () {
            return this.currentCommandIndex >= 0;
          },
          canRedo: function () {
            return this.currentCommandIndex != this.stack.length - 1;
          },
        });
        n.deepExtend(n, { util: { UndoRedoStack: t } });
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "editor/main.min",
      [
        "util/undoredostack.min",
        "kendo.combobox.min",
        "kendo.dropdownlist.min",
        "kendo.window.min",
        "kendo.colorpicker.min",
      ],
      n
    );
  })(
    function () {
      !(function (n, t) {
        var c,
          p,
          l,
          y,
          i = window.kendo,
          w = i.Class,
          a = i.ui.Widget,
          s = i.support.mobileOS,
          h = i.support.browser,
          v = n.extend,
          f = n.proxy,
          tt = i.deepExtend,
          r = i.keys,
          b = "select",
          k = "select.k-select-overlay",
          d = "k-placeholder",
          g = "placeholder",
          it = 200,
          rt = "en",
          nt = w.extend({
            init: function (n) {
              this.options = n;
            },
            getHtml: function () {
              var n = this.options;
              return i.template(n.template, { useWithBlock: !1 })(n);
            },
          }),
          e = {
            editorWrapperTemplate:
              '<table cellspacing="4" cellpadding="0" class="k-widget k-editor k-header" role="presentation"><tbody><tr role="presentation"><td class="k-editor-toolbar-wrap" role="presentation"><ul class="k-editor-toolbar" role="toolbar" /></td></tr><tr><td class="k-editable-area" /></tr></tbody></table>',
            buttonTemplate:
              '# var iconCssClass= "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));#<a tabindex="0" role="button" class="k-tool"#= data.popup ? " data-popup" : "" # unselectable="on" title="#= data.title #" aria-label="#= data.title #"><span unselectable="on" class="k-tool-icon #= iconCssClass #"></span></a>',
            tableWizardButtonTemplate:
              '# var iconCssClass= "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));#<a tabindex="0" role="button" class="k-tool"#= data.popup ? " data-popup" : "" # unselectable="on" title="#= data.title #"><span unselectable="on" class="k-tool-icon #= iconCssClass #"></span><span class="k-tool-text">#= data.title #</span></a>',
            colorPickerTemplate:
              '<input class="k-colorpicker k-icon k-i-#= data.cssClass.replace("k-", "") #" />',
            comboBoxTemplate:
              '<select title="#= data.title #" aria-label="#= data.title #" class="#= data.cssClass #" />',
            dropDownListTemplate:
              '<span class="k-editor-dropdown"><select title="#= data.title #" aria-label="#= data.title #" class="#= data.cssClass #" /></span>',
            separatorTemplate: '<span class="k-separator" />',
            overflowAnchorTemplate:
              '<a tabindex="0" role="button" class="k-tool k-overflow-anchor" data-popup unselectable="on" title="#= data.title #" aria-label="#= data.title #" aria-haspopup="true" aria-expanded="false"><span unselectable="on" class="k-icon k-i-more-vertical"></span></a>',
            formatByName: function (t, i) {
              for (var r = 0; r < i.length; r++)
                if (n.inArray(t, i[r].tags) >= 0) return i[r];
            },
            getToolCssClass: function (n) {
              var t = {
                superscript: "sup-script",
                subscript: "sub-script",
                justifyLeft: "align-left",
                justifyCenter: "align-center",
                justifyRight: "align-right",
                justifyFull: "align-justify",
                insertUnorderedList: "list-unordered",
                insertOrderedList: "list-ordered",
                import: "login",
                indent: "indent-increase",
                outdent: "indent-decrease",
                createLink: "link-horizontal",
                unlink: "unlink-horizontal",
                insertImage: "image",
                insertFile: "file-add",
                viewHtml: "html",
                foreColor: "foreground-color",
                backColor: "paint",
                createTable: "table-insert",
                addColumnLeft: "table-column-insert-left",
                addColumnRight: "table-column-insert-right",
                addRowAbove: "table-row-insert-above",
                addRowBelow: "table-row-insert-below",
                deleteRow: "table-row-delete",
                deleteColumn: "table-column-delete",
                mergeCellsHorizontally: "cells-merge-horizontally",
                mergeCellsVertically: "cells-merge-vertically",
                splitCellHorizontally: "cell-split-horizontally",
                splitCellVertically: "cell-split-vertically",
                tableWizard: "table-properties",
                tableWizardInsert: "table-wizard",
                cleanFormatting: "clear-css",
              }[n];
              return t ? t : n;
            },
            registerTool: function (n, t) {
              var i = t.options;
              i &&
                i.template &&
                (i.template.options.cssClass = "k-" + e.getToolCssClass(n));
              t.name || ((t.options.name = n), (t.name = n.toLowerCase()));
              u.defaultTools[n] = t;
            },
            registerFormat: function (n, t) {
              u.fn.options.formats[n] = t;
            },
            cacheComments: function (n, t) {
              for (var i in t) n = n.replace(t[i], "{" + i + "}");
              return n;
            },
            retrieveComments: function (n, t) {
              for (var i in t) n = n.replace("{" + i + "}", t[i]);
              return n;
            },
          },
          ut =
            !s ||
            (s.ios && s.flatVersion >= 500) ||
            (!s.ios && t !== document.documentElement.contentEditable),
          o = {
            basic: ["bold", "italic", "underline"],
            alignment: ["justifyLeft", "justifyCenter", "justifyRight"],
            lists: ["insertUnorderedList", "insertOrderedList"],
            indenting: ["indent", "outdent"],
            links: ["createLink", "unlink"],
            tables: [
              "tableWizard",
              "createTable",
              "addColumnLeft",
              "addColumnRight",
              "addRowAbove",
              "addRowBelow",
              "deleteRow",
              "deleteColumn",
              "mergeCellsHorizontally",
              "mergeCellsVertically",
              "splitCellHorizontally",
              "splitCellVertically",
            ],
          },
          u = a.extend({
            init: function (r, u) {
              var s,
                l,
                y,
                p,
                w,
                h,
                o = this,
                c = i.ui.editor,
                b = c.Dom;
              ut &&
                (a.fn.init.call(o, r, u),
                (o.options = tt({}, o.options, u)),
                (o.options.tools = o.options.tools.slice()),
                (r = o.element),
                (h = r[0]),
                (p = b.name(h)),
                this._registerHandler(
                  r.closest("form"),
                  "submit",
                  f(o.update, o, t)
                ),
                (y = v({}, o.options)),
                (y.editor = o),
                "textarea" == p
                  ? (o._wrapTextarea(),
                    (l = o.wrapper.find(".k-editor-toolbar")),
                    h.id && l.attr("aria-controls", h.id))
                  : (o.element
                      .attr("contenteditable", !0)
                      .addClass("k-widget k-editor k-editor-inline"),
                    (y.popup = !0),
                    (l = n(
                      '<ul class="k-editor-toolbar" role="toolbar" />'
                    ).insertBefore(r))),
                (o.toolbar = new c.Toolbar(l[0], y)),
                o.toolbar.bindTo(o),
                "textarea" == p &&
                  setTimeout(function () {
                    var t = o.wrapper[0].style.height,
                      n = parseInt(t, 10),
                      i = o.wrapper.height();
                    t.indexOf("px") > 0 &&
                      !isNaN(n) &&
                      i > n &&
                      o.wrapper.height(n - (i - n));
                  }),
                o._resizable(),
                o._initializeContentElement(o),
                (o.keyboard = new c.Keyboard([
                  new c.BackspaceHandler(o),
                  new c.TypingHandler(o),
                  new c.SystemHandler(o),
                  new c.SelectAllHandler(o),
                ])),
                (o.clipboard = new c.Clipboard(this)),
                (o.undoRedoStack = new i.util.UndoRedoStack()),
                u && u.value
                  ? (s = u.value)
                  : o.textarea
                  ? ((s = h.value),
                    o.options.encoded &&
                      n.trim(h.defaultValue).length &&
                      (s = h.defaultValue),
                    (w = b.getAllComments(n("<div></div>").html(s)[0])),
                    (s = e.cacheComments(s, w)),
                    (s = s.replace(/[\r\n\v\f\t ]+/gi, " ")),
                    (s = e.retrieveComments(s, w)))
                  : (s = h.innerHTML),
                o.value(s || "﻿"),
                this._registerHandler(document, {
                  mousedown: function () {
                    o._endTyping();
                  },
                  mouseup: function (n) {
                    o._mouseup(n);
                  },
                }),
                o._initializeImmutables(),
                o.toolbar.resize(),
                i.notify(o));
            },
            setOptions: function (n) {
              var t = this;
              a.fn.setOptions.call(t, n);
              n.tools && t.toolbar.bindTo(t);
              this._initializePlaceholder();
            },
            _togglePlaceholder: function (t) {
              var i = this,
                f = i.body,
                r = n(f),
                u = i.options.placeholder;
              i.textarea &&
                u &&
                (r.attr("aria-label", function () {
                  return t ? u : "";
                }),
                r.toggleClass(d, t));
            },
            _endTyping: function () {
              var n = this.keyboard;
              try {
                n.isTypingInProgress() &&
                  (n.endTyping(!0), this.saveSelection());
              } catch (t) {}
            },
            _selectionChange: function () {
              this._selectionStarted = !1;
              this.saveSelection();
              this.trigger("select", {});
            },
            _resizable: function () {
              var u,
                f,
                r = this.options.resizable,
                e = n.isPlainObject(r)
                  ? r.content === t || r.content === !0
                  : r;
              e &&
                this.textarea &&
                ((u = n(
                  "<div class='k-resize-handle'><span class='k-icon k-i-arrow-45-down-right' /></div>"
                ).insertAfter(this.textarea)),
                this.wrapper.addClass("k-resizable"),
                this.wrapper.kendoResizable(
                  v({}, this.options.resizable, {
                    draggableElement: u,
                    start: function (t) {
                      var i = (this.editor = n(t.currentTarget).closest(
                        ".k-editor"
                      ));
                      this.initialSize = i.height();
                      i.find("td:last").append("<div class='k-overlay' />");
                    },
                    resize: function (n) {
                      var i = n.y.initialDelta,
                        t = this.initialSize + i,
                        r = this.options.min || 0,
                        u = this.options.max || 1 / 0;
                      t = Math.min(u, Math.max(r, t));
                      this.editor.height(t);
                    },
                    resizeend: function () {
                      this.editor.find(".k-overlay").remove();
                      this.editor = null;
                    },
                  })
                ),
                i.support.mobileOS.ios &&
                  ((f = this.wrapper.getKendoResizable()),
                  (f.draggable.options.ignore = k)));
            },
            _initializeTableResizing: function () {
              var n = this;
              i.ui.editor.TableResizing.create(n);
              n._showTableResizeHandlesProxy = f(n._showTableResizeHandles, n);
              n.bind(b, n._showTableResizeHandlesProxy);
            },
            _destroyTableResizing: function () {
              var n = this,
                t = n.tableResizing;
              t && (t.destroy(), (n.tableResizing = null));
              n._showTableResizeHandlesProxy &&
                n.unbind(b, n._showTableResizeHandlesProxy);
            },
            _showTableResizeHandles: function () {
              var t = this,
                n = t.tableResizing;
              n && n.showResizeHandles();
            },
            _initializeColumnResizing: function () {
              i.ui.editor.ColumnResizing.create(this);
            },
            _destroyColumnResizing: function () {
              var n = this;
              n.columnResizing &&
                (n.columnResizing.destroy(), (n.columnResizing = null));
            },
            _initializeRowResizing: function () {
              i.ui.editor.RowResizing.create(this);
            },
            _destroyRowResizing: function () {
              var n = this;
              n.rowResizing &&
                (n.rowResizing.destroy(), (n.rowResizing = null));
            },
            _wrapTextarea: function () {
              var i = this,
                t = i.element,
                u = t[0].style.width,
                f = t[0].style.height,
                o = e.editorWrapperTemplate,
                r = n(o).insertBefore(t).width(u).height(f),
                s = r.find(".k-editable-area");
              t.attr("autocomplete", "off")
                .appendTo(s)
                .addClass("k-content k-raw-content")
                .css("display", "none");
              i.textarea = t;
              i.wrapper = r;
            },
            _createContentElement: function (t) {
              var r,
                o,
                u,
                f = this,
                e = f.textarea,
                c = f.options.domain,
                l = c || document.domain,
                h = "",
                a = 'javascript:""',
                v = "";
              return (
                e.hide(),
                (r = n("<iframe />", {
                  title: f.options.messages.editAreaTitle,
                  frameBorder: "0",
                })[0]),
                n(r)
                  .css("display", "")
                  .addClass("k-content")
                  .attr("tabindex", e[0].tabIndex)
                  .insertBefore(e),
                (c || l != location.hostname) &&
                  ((h = '<script>document.domain="' + l + '"</script>'),
                  (a = "javascript:document.write('" + h + "')"),
                  (r.src = a)),
                (o = r.contentWindow || r),
                (u = o.document || r.contentDocument),
                n(r).one("load", function () {
                  f.toolbar.decorateFrom(u.body);
                }),
                (v =
                  document
                    .getElementsByTagName("html")[0]
                    .getAttribute("lang") || rt),
                u.open(),
                u.write(
                  "<!DOCTYPE html><html lag='" +
                    v +
                    "'><head><meta charset='utf-8' /><title>Kendo UI Editor content</title><style>html{padding:0;margin:0;height:100%;min-height:100%;cursor:text;}body{padding:0;margin:0;}body{box-sizing:border-box;font-size:12px;font-family:Verdana,Geneva,sans-serif;margin-top:-1px;padding:5px .4em 0;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;" +
                    (i.support.isRtl(e) ? "direction:rtl;" : "") +
                    (s.ios ? "word-break:keep-all;" : "") +
                    "}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em}h3{font-size:1.16em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.7em}p{margin:0 0 1em;}.k-marker{display:none;}.k-paste-container,.Apple-style-span{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}ul,ol{padding-left:2.5em}span{-ms-high-contrast-adjust:none;}a{color:#00a}code{font-size:1.23em}telerik\\3Ascript{display: none;}.k-table{width:100%;border-spacing:0;margin: 0 0 1em;}.k-table td{min-width:1px;padding:.2em .3em;}.k-table,.k-table td{outline:0;border: 1px dotted #ccc;}.k-table p{margin:0;padding:0;}.k-column-resize-handle-wrapper {position: absolute; height: 10px; width:10px; cursor: col-resize; z-index: 2;}.k-column-resize-handle {width: 100%; height: 100%;}.k-column-resize-handle > .k-column-resize-marker {width:2px; height:100%; margin:0 auto; background-color:#00b0ff; display:none; opacity:0.8;}.k-row-resize-handle-wrapper {position: absolute; cursor: row-resize; z-index:2; width: 10px; height: 10px;}.k-row-resize-handle {display: table; width: 100%; height: 100%;}.k-row-resize-marker-wrapper{display: table-cell; height:100%; width:100%; margin:0; padding:0; vertical-align: middle;}.k-row-resize-marker{margin: 0; padding:0; width:100%; height:2px; background-color: #00b0ff; opacity:0.8; display:none;}.k-table-resize-handle-wrapper {position: absolute; background-color: #fff; border: 1px solid #000; z-index: 100; width: 5px; height: 5px;}.k-table-resize-handle {width: 100%; height: 100%;}.k-table-resize-handle.k-resize-east{cursor:e-resize;}.k-table-resize-handle.k-resize-north{cursor:n-resize;}.k-table-resize-handle.k-resize-northeast{cursor:ne-resize;}.k-table-resize-handle.k-resize-northwest{cursor:nw-resize;}.k-table-resize-handle.k-resize-south{cursor:s-resize;}.k-table-resize-handle.k-resize-southeast{cursor:se-resize;}.k-table-resize-handle.k-resize-southwest{cursor:sw-resize;}.k-table-resize-handle.k-resize-west{cursor:w-resize;}.k-table.k-table-resizing{opacity:0.6;}.k-placeholder{color:grey}k\\:script{display:none;}</style>" +
                    h +
                    n
                      .map(t, function (n) {
                        return "<link rel='stylesheet' href='" + n + "'>";
                      })
                      .join("") +
                    "</head><body autocorrect='off' contenteditable='true'></body></html>"
                ),
                u.close(),
                o
              );
            },
            _blur: function () {
              var n = this.textarea,
                t = n ? n.val() : this._oldValue,
                i = this.options.encoded ? this.encodedValue() : this.value();
              this.update();
              n && n.trigger("blur");
              i != t && (this.trigger("change"), n && n.trigger("change"));
            },
            _spellCorrect: function (n) {
              var r,
                u = !1;
              this._registerHandler(n.body, {
                contextmenu: function () {
                  n.one("select", function () {
                    r = null;
                  });
                  n._spellCorrectTimeout = setTimeout(function () {
                    r = new i.ui.editor.RestorePoint(n.getRange(), n.body);
                    u = !1;
                  }, 10);
                },
                input: function () {
                  if (r)
                    return i.support.browser.mozilla && !u
                      ? ((u = !0), t)
                      : (i.ui.editor._finishUpdate(n, r), t);
                },
              });
            },
            _registerHandler: function (t, r, u) {
              var e,
                f,
                o,
                h = this,
                s = ".kendoEditor";
              if (
                ((t = n(t)), this._handlers || (this._handlers = []), t.length)
              )
                if (n.isPlainObject(r))
                  for (o in r)
                    r.hasOwnProperty(o) && this._registerHandler(t, o, r[o]);
                else
                  for (
                    e = i.applyEventMap(r).split(" "), f = 0;
                    f < e.length;
                    f++
                  )
                    h._handlers.push({
                      element: t,
                      type: e[f] + s,
                      handler: u,
                    }),
                      t.on(e[f] + s, u);
            },
            _deregisterHandlers: function () {
              for (var t, i = this._handlers, n = 0; n < i.length; n++)
                (t = i[n]), t.element.off(t.type, t.handler);
              this._handlers = [];
            },
            _initializeContentElement: function () {
              var e,
                s,
                h,
                o,
                c,
                u = this;
              u.textarea
                ? ((u.window = u._createContentElement(u.options.stylesheets)),
                  (e = u.document =
                    u.window.contentDocument || u.window.document),
                  e.body ||
                    ((o = e.createElement("body")),
                    o.setAttribute("contenteditable", "true"),
                    o.setAttribute("autocorrect", "off"),
                    e.getElementsByTagName("html")[0].appendChild(o),
                    (c = setInterval(function () {
                      n(u.document).find("body").length > 1 &&
                        (n(u.document).find("body:last").remove(),
                        window.clearInterval(c));
                    }, 10))),
                  (u.body = e.body),
                  (s = u.window),
                  (h = e),
                  this._registerHandler(e, "mouseup", f(this._mouseup, this)))
                : ((u.window = window),
                  (e = u.document = document),
                  (u.body = u.element[0]),
                  (s = u.body),
                  (h = u.body),
                  u.toolbar.decorateFrom(u.body));
              this._registerHandler(s, "blur", f(this._blur, this));
              u._registerHandler(h, "down", f(u._mousedown, u));
              try {
                e.execCommand("enableInlineTableEditing", null, !1);
              } catch (l) {}
              i.support.touch &&
                this._registerHandler(e, {
                  keydown: function () {
                    i._activeElement() != e.body && u.window.focus();
                  },
                });
              this._initializePlaceholder();
              this._spellCorrect(u);
              this._registerHandler(u.body, {
                keydown: function (n) {
                  var i, o, s, h, a, c, v, l, e, y;
                  return (
                    ((n.keyCode !== r.BACKSPACE && n.keyCode !== r.DELETE) ||
                      "true" === u.body.getAttribute("contenteditable")) &&
                    (n.keyCode === r.F10
                      ? (setTimeout(f(u.toolbar.focus, u.toolbar), 100),
                        (u.toolbar.preventPopupHide = !0),
                        n.preventDefault(),
                        t)
                      : ((n.keyCode != r.LEFT && n.keyCode != r.RIGHT) ||
                          ((i = u.getRange()),
                          (o = n.keyCode == r.LEFT),
                          (s = i[o ? "startContainer" : "endContainer"]),
                          (h = i[o ? "startOffset" : "endOffset"]),
                          (a = o ? -1 : 1),
                          (c = h + a),
                          (v = o ? c : h),
                          3 == s.nodeType &&
                            "﻿" == s.nodeValue[v] &&
                            (i.setStart(s, c),
                            i.collapse(!0),
                            u.selectRange(i))),
                        (l = u.toolbar.tools),
                        (e = u.keyboard.toolFromShortcut(l, n)),
                        (y = e ? l[e].options : {}),
                        e && !y.keyPressCommand
                          ? (n.preventDefault(),
                            /^(undo|redo)$/.test(e) || u.keyboard.endTyping(!0),
                            u.trigger("keydown", n),
                            u.exec(e),
                            u._runPostContentKeyCommands(n),
                            !1)
                          : (u.keyboard.clearTimeout(),
                            u.keyboard.keydown(n),
                            t)))
                  );
                },
                keypress: function (n) {
                  setTimeout(function () {
                    u._runPostContentKeyCommands(n);
                    u._showTableResizeHandles();
                  }, 0);
                },
                keyup: function (t) {
                  var i = [
                    r.BACKSPACE,
                    r.TAB,
                    r.PAGEUP,
                    r.PAGEDOWN,
                    r.END,
                    r.HOME,
                    r.LEFT,
                    r.UP,
                    r.RIGHT,
                    r.DOWN,
                    r.INSERT,
                    r.DELETE,
                  ];
                  (n.inArray(t.keyCode, i) > -1 ||
                    (65 == t.keyCode &&
                      t.ctrlKey &&
                      !t.altKey &&
                      !t.shiftKey)) &&
                    (window.clearTimeout(this._refreshInterval),
                    (this._refreshInterval = window.setTimeout(function () {
                      u._selectionChange();
                    }, it)));
                  u.keyboard.keyup(t);
                },
                click: function (n) {
                  var t,
                    r = i.ui.editor.Dom;
                  "img" === r.name(n.target) &&
                    ((t = u.createRange()),
                    t.selectNode(n.target),
                    u.selectRange(t));
                },
                "cut copy paste drop dragover": function (n) {
                  u.clipboard["on" + n.type](n);
                },
                focusin: function () {
                  u.body.hasAttribute("contenteditable") &&
                    (n(this).addClass("k-state-active"),
                    u.toolbar.show(),
                    u._togglePlaceholder(!1));
                },
                focusout: function () {
                  setTimeout(function () {
                    var f,
                      t = i._activeElement(),
                      e = u.body,
                      r = u.toolbar;
                    r.options.popup &&
                      ((f = r.window.element.get(0)),
                      f &&
                        !n.contains(f, t) &&
                        f != t &&
                        (r.preventPopupHide = !1));
                    t == e ||
                      n.contains(e, t) ||
                      n(t).is(".k-editortoolbar-dragHandle") ||
                      r.focused() ||
                      (n(e).removeClass("k-state-active"), r.hide());
                    u._togglePlaceholder(!u.value().trim());
                  }, 10);
                },
              });
              u._initializeColumnResizing();
              u._initializeRowResizing();
              u._initializeTableResizing();
            },
            _initializePlaceholder: function () {
              var r,
                i,
                t = this,
                u = t.options.placeholder;
              t.textarea &&
                u &&
                ((r =
                  "<style id='" +
                  g +
                  "'>." +
                  d +
                  ":before { content: '" +
                  u +
                  "'; }</style>"),
                (i = n(t.document.head)),
                i.find("#" + g).remove(),
                i.append(r),
                t._togglePlaceholder(!t.value().trim()));
            },
            _initializeImmutables: function () {
              var n = this,
                t = i.ui.editor;
              n.options.immutables && (n.immutables = new t.Immutables(n));
            },
            _mousedown: function (t) {
              var i,
                r = this;
              r._selectionStarted = !0;
              n(r.body).parents(".k-window").length && t.stopPropagation();
              h.gecko ||
                ((i = n(t.target).closest("a[href]")),
                (2 == t.which || (1 == t.which && t.ctrlKey)) &&
                  i &&
                  i.is("a[href]") &&
                  window.open(i.attr("href"), "_new"),
                t.target.tagName &&
                  "html" === t.target.tagName.toLowerCase() &&
                  setTimeout(function () {
                    r.body.focus();
                  }, 0));
            },
            _mouseup: function (t) {
              var r = this;
              (i.support.mobileOS.ios && t && n(t.target).is(k)) ||
                (r._selectionStarted &&
                  setTimeout(function () {
                    r._selectionChange();
                  }, 1));
            },
            _runPostContentKeyCommands: function (n) {
              for (
                var i,
                  r,
                  u,
                  e = this.getRange(),
                  f = this.keyboard.toolsFromShortcut(this.toolbar.tools, n),
                  t = 0;
                t < f.length;
                t++
              )
                (i = f[t]),
                  (r = i.options),
                  r.keyPressCommand &&
                    ((u = new r.command({ range: e })),
                    u.changesContent() &&
                      (this.keyboard.endTyping(!0), this.exec(i.name)));
            },
            refresh: function () {
              var t,
                n = this;
              n.textarea &&
                (n._destroyResizings(),
                (t = n.value()),
                n.textarea.val(t),
                n.wrapper.find("iframe").remove(),
                n._initializeContentElement(n),
                n.value(t));
            },
            events: [
              "select",
              "change",
              "execute",
              "error",
              "paste",
              "keydown",
              "keyup",
            ],
            options: {
              name: "Editor",
              messages: {
                bold: "Bold",
                italic: "Italic",
                underline: "Underline",
                strikethrough: "Strikethrough",
                superscript: "Superscript",
                subscript: "Subscript",
                justifyCenter: "Center text",
                justifyLeft: "Align text left",
                justifyRight: "Align text right",
                justifyFull: "Justify",
                insertUnorderedList: "Insert unordered list",
                insertOrderedList: "Insert ordered list",
                indent: "Indent",
                outdent: "Outdent",
                createLink: "Insert hyperlink",
                unlink: "Remove hyperlink",
                insertImage: "Insert image",
                insertFile: "Insert file",
                insertHtml: "Insert HTML",
                viewHtml: "View HTML",
                fontName: "Select font family",
                fontNameInherit: "(inherited font)",
                fontSize: "Select font size",
                fontSizeInherit: "(inherited size)",
                formatBlock: "Format",
                formatting: "Format",
                foreColor: "Color",
                backColor: "Background color",
                style: "Styles",
                emptyFolder: "Empty Folder",
                editAreaTitle: "Editable area. Press F10 for toolbar.",
                uploadFile: "Upload",
                overflowAnchor: "More tools",
                orderBy: "Arrange by:",
                orderBySize: "Size",
                orderByName: "Name",
                invalidFileType:
                  'The selected file "{0}" is not valid. Supported file types are {1}.',
                deleteFile: 'Are you sure you want to delete "{0}"?',
                overwriteFile:
                  'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',
                directoryNotFound: "A directory with this name was not found.",
                imageWebAddress: "Web address",
                imageAltText: "Alternate text",
                imageWidth: "Width (px)",
                imageHeight: "Height (px)",
                fileWebAddress: "Web address",
                fileTitle: "Title",
                fileText: "Text",
                linkWebAddress: "Web address",
                linkText: "Text",
                linkToolTip: "ToolTip",
                linkOpenInNewWindow: "Open link in new window",
                dialogUpdate: "Update",
                dialogInsert: "Insert",
                dialogOk: "Ok",
                dialogCancel: "Cancel",
                cleanFormatting: "Clean formatting",
                createTable: "Create a table",
                createTableHint: "Create a {0} x {1} table",
                addColumnLeft: "Add column on the left",
                addColumnRight: "Add column on the right",
                addRowAbove: "Add row above",
                addRowBelow: "Add row below",
                deleteRow: "Delete row",
                deleteColumn: "Delete column",
                mergeCellsHorizontally: "Merge cells horizontally",
                mergeCellsVertically: "Merge cells vertically",
                splitCellHorizontally: "Split cells horizontally",
                splitCellVertically: "Split cells vertically",
                tableWizard: "Table Wizard",
                tableTab: "Table",
                cellTab: "Cell",
                accessibilityTab: "Accessibility",
                caption: "Caption",
                summary: "Summary",
                width: "Width",
                height: "Height",
                units: "Units",
                cellSpacing: "Cell Spacing",
                cellPadding: "Cell Padding",
                cellMargin: "Cell Margin",
                alignment: "Alignment",
                background: "Background",
                cssClass: "CSS Class",
                id: "ID",
                border: "Border",
                borderStyle: "Border Style",
                collapseBorders: "Collapse borders",
                wrapText: "Wrap text",
                associateCellsWithHeaders: "Associate cells with headers",
                alignLeft: "Align Left",
                alignCenter: "Align Center",
                alignRight: "Align Right",
                alignLeftTop: "Align Left Top",
                alignCenterTop: "Align Center Top",
                alignRightTop: "Align Right Top",
                alignLeftMiddle: "Align Left Middle",
                alignCenterMiddle: "Align Center Middle",
                alignRightMiddle: "Align Right Middle",
                alignLeftBottom: "Align Left Bottom",
                alignCenterBottom: "Align Center Bottom",
                alignRightBottom: "Align Right Bottom",
                alignRemove: "Remove Alignment",
                columns: "Columns",
                rows: "Rows",
                selectAllCells: "Select All Cells",
                exportAs: "Export As",
                import: "Import",
                print: "Print",
              },
              placeholder: "",
              formats: {},
              encoded: !0,
              domain: null,
              resizable: !1,
              deserialization: { custom: null },
              serialization: { entities: !0, semantic: !0, scripts: !1 },
              pasteCleanup: {
                all: !1,
                css: !1,
                custom: null,
                keepNewLines: !1,
                msAllFormatting: !1,
                msConvertLists: !0,
                msTags: !0,
                none: !1,
                span: !1,
              },
              stylesheets: [],
              dialogOptions: {
                modal: !0,
                resizable: !1,
                draggable: !0,
                animation: !1,
              },
              imageBrowser: null,
              fileBrowser: null,
              fontName: [
                { text: "Arial", value: "Arial, Helvetica, sans-serif" },
                {
                  text: "Courier New",
                  value: '"Courier New", Courier, monospace',
                },
                { text: "Georgia", value: "Georgia, serif" },
                { text: "Impact", value: "Impact, Charcoal, sans-serif" },
                {
                  text: "Lucida Console",
                  value: '"Lucida Console", Monaco, monospace',
                },
                { text: "Tahoma", value: "Tahoma, Geneva, sans-serif" },
                {
                  text: "Times New Roman",
                  value: '"Times New Roman", Times, serif',
                },
                {
                  text: "Trebuchet MS",
                  value: '"Trebuchet MS", Helvetica, sans-serif',
                },
                { text: "Verdana", value: "Verdana, Geneva, sans-serif" },
              ],
              fontSize: [
                { text: "1 (8pt)", value: "xx-small" },
                { text: "2 (10pt)", value: "x-small" },
                { text: "3 (12pt)", value: "small" },
                { text: "4 (14pt)", value: "medium" },
                { text: "5 (18pt)", value: "large" },
                { text: "6 (24pt)", value: "x-large" },
                { text: "7 (36pt)", value: "xx-large" },
              ],
              formatBlock: [
                { text: "Paragraph", value: "p" },
                { text: "Quotation", value: "blockquote" },
                { text: "Heading 1", value: "h1" },
                { text: "Heading 2", value: "h2" },
                { text: "Heading 3", value: "h3" },
                { text: "Heading 4", value: "h4" },
                { text: "Heading 5", value: "h5" },
                { text: "Heading 6", value: "h6" },
              ],
              tools: [].concat.call(
                ["formatting"],
                o.basic,
                o.alignment,
                o.lists,
                o.indenting,
                o.links,
                ["insertImage"],
                o.tables
              ),
            },
            destroy: function () {
              var n = this;
              a.fn.destroy.call(this);
              this._endTyping(!0);
              this._deregisterHandlers();
              clearTimeout(this._spellCorrectTimeout);
              this._focusOutside();
              this.toolbar.destroy();
              n._destroyUploadWidget();
              n._destroyResizings();
              i.destroy(this.wrapper);
            },
            _destroyResizings: function () {
              var n = this;
              n._destroyTableResizing();
              i.ui.editor.TableResizing.dispose(n);
              n._destroyRowResizing();
              i.ui.editor.RowResizing.dispose(n);
              n._destroyColumnResizing();
              i.ui.editor.ColumnResizing.dispose(n);
            },
            _focusOutside: function () {
              if (i.support.browser.msie && this.textarea) {
                var t = n(
                  "<input style='position:fixed;left:1px;top:1px;width:1px;height:1px;font-size:0;border:0;opacity:0' />"
                )
                  .appendTo(document.body)
                  .focus();
                t.blur().remove();
              }
            },
            _destroyUploadWidget: function () {
              var n = this;
              n._uploadWidget &&
                (n._uploadWidget.destroy(), (n._uploadWidget = null));
            },
            state: function (n) {
              var r,
                t,
                e = u.defaultTools[n],
                f = e && (e.options.finder || e.finder),
                o = i.ui.editor.RangeUtils;
              return (
                !!f &&
                ((r = this.getRange()),
                (t = o.textNodes(r)),
                !t.length && r.collapsed && (t = [r.startContainer]),
                f.getFormat ? f.getFormat(t) : f.isFormatted(t))
              );
            },
            value: function (n) {
              var r = this.body,
                u = i.ui.editor,
                f = this.options,
                e = u.Serializer.domToXhtml(r, f.serialization);
              return n === t
                ? e
                : (n != e &&
                    (u.Serializer.htmlToDom(n, r, f.deserialization),
                    (this.selectionRestorePoint = null),
                    this.update(),
                    this.toolbar.refreshTools()),
                  t);
            },
            saveSelection: function (t) {
              t = t || this.getRange();
              var u = t.commonAncestorContainer,
                r = this.body;
              (u == r || n.contains(r, u)) &&
                (this.selectionRestorePoint = new i.ui.editor.RestorePoint(
                  t,
                  r
                ));
            },
            _focusBody: function () {
              var t,
                n = this.body,
                r = this.wrapper && this.wrapper.find("iframe")[0],
                u = this.document.documentElement,
                f = i._activeElement();
              !r && n.scrollHeight > n.clientHeight
                ? ((t = n.scrollTop), n.focus(), (n.scrollTop = t))
                : f != n &&
                  f != r &&
                  ((t = u.scrollTop), n.focus(), (u.scrollTop = t));
            },
            restoreSelection: function () {
              this._focusBody();
              this.selectionRestorePoint &&
                this.selectRange(this.selectionRestorePoint.toRange());
            },
            focus: function () {
              this.restoreSelection();
            },
            update: function (n) {
              n =
                n || this.options.encoded ? this.encodedValue() : this.value();
              this.textarea
                ? (this.textarea.val(n), this._togglePlaceholder(!n.trim()))
                : (this._oldValue = n);
            },
            encodedValue: function () {
              return i.ui.editor.Dom.encode(this.value());
            },
            createRange: function (n) {
              return i.ui.editor.RangeUtils.createRange(n || this.document);
            },
            getSelection: function () {
              return i.ui.editor.SelectionUtils.selectionFromDocument(
                this.document
              );
            },
            selectRange: function (n) {
              this._focusBody();
              var t = this.getSelection();
              t.removeAllRanges();
              t.addRange(n);
              this.saveSelection(n);
            },
            getRange: function () {
              var t = this.getSelection(),
                n =
                  t && t.rangeCount > 0 ? t.getRangeAt(0) : this.createRange(),
                i = this.document;
              return (
                n.startContainer != i ||
                  n.endContainer != i ||
                  n.startOffset ||
                  n.endOffset ||
                  (n.setStart(this.body, 0), n.collapse(!0)),
                n
              );
            },
            _containsRange: function (n) {
              var t = i.ui.editor.Dom,
                r = this.body;
              return (
                n &&
                t.isAncestorOrSelf(r, n.startContainer) &&
                t.isAncestorOrSelf(r, n.endContainer)
              );
            },
            _deleteSavedRange: function () {
              "_range" in this && delete this._range;
            },
            selectedHtml: function () {
              return i.ui.editor.Serializer.domToXhtml(
                this.getRange().cloneContents()
              );
            },
            paste: function (t, r) {
              this.focus();
              var u = new i.ui.editor.InsertHtmlCommand(
                n.extend({ range: this.getRange(), html: t }, r)
              );
              u.editor = this;
              u.exec();
            },
            exec: function (n, i) {
              var h,
                e,
                c,
                s,
                r = this,
                o = null;
              if (!n)
                throw Error(
                  "kendoEditor.exec(): `name` parameter cannot be empty"
                );
              if (
                "true" !== r.body.getAttribute("contenteditable") &&
                "print" !== n &&
                "pdf" !== n &&
                "exportAs" !== n
              )
                return !1;
              if (
                ((n = n.toLowerCase()),
                r.keyboard.isTypingInProgress() ||
                  (r._focusBody(), r.selectRange(r._range || r.getRange())),
                (e = r.toolbar.toolById(n)),
                !e)
              )
                for (s in u.defaultTools)
                  if (s.toLowerCase() == n) {
                    e = u.defaultTools[s];
                    break;
                  }
              if (e) {
                if (
                  ((h = r.getRange()),
                  e.command &&
                    (o = e.command(
                      v(
                        { range: h, body: r.body, immutables: !!r.immutables },
                        i
                      )
                    )),
                  (c = r.trigger("execute", { name: n, command: o })))
                )
                  return;
                if (/^(undo|redo)$/i.test(n)) r.undoRedoStack[n]();
                else if (o && (r.execCommand(o), o.async))
                  return (o.change = f(r._selectionChange, r)), t;
                r._selectionChange();
              }
            },
            execCommand: function (n) {
              n.managesUndoRedo || this.undoRedoStack.push(n);
              n.editor = this;
              n.exec();
            },
          });
        u.defaultTools = {
          undo: { options: { key: "Z", ctrl: !0 } },
          redo: { options: { key: "Y", ctrl: !0 } },
        };
        i.ui.plugin(u);
        c = w.extend({
          init: function (n) {
            this.options = n;
          },
          initialize: function (n, t) {
            n.attr({
              unselectable: "on",
              title: t.title,
              "aria-label": t.title,
            });
          },
          command: function (n) {
            return new this.options.command(n);
          },
          update: n.noop,
        });
        c.exec = function (n, t, i) {
          n.exec(t, { value: i });
        };
        e.registerTool(
          "separator",
          new c({ template: new nt({ template: e.separatorTemplate }) })
        );
        p = h.msie && h.version < 9 ? "﻿" : "";
        l = "﻿";
        y = l;
        (h.msie || h.edge) && (y = l = "&nbsp;");
        v(i.ui, {
          editor: {
            ToolTemplate: nt,
            EditorUtils: e,
            Tool: c,
            _bomFill: p,
            emptyElementContent: l,
            emptyTableCellContent: y,
          },
        });
        i.PDFMixin &&
          (i.PDFMixin.extend(u.prototype),
          (u.prototype._drawPDF = function () {
            return i.drawing.drawDOM(this.body, this.options.pdf);
          }),
          (u.prototype.saveAsPDF = function () {
            var t,
              r = new n.Deferred(),
              u = r.promise(),
              f = { promise: u };
            if (!this.trigger("pdfExport", f))
              return (
                (t = this.options.pdf),
                this._drawPDF(r)
                  .then(function (n) {
                    return i.drawing.exportPDF(n, t);
                  })
                  .done(function (n) {
                    i.saveAs({
                      dataURI: n,
                      fileName: t.fileName,
                      proxyURL: t.proxyURL,
                      proxyTarget: t.proxyTarget,
                      forceProxy: t.forceProxy,
                    });
                    r.resolve();
                  })
                  .fail(function (n) {
                    r.reject(n);
                  }),
                u
              );
          }));
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/dom.min", ["editor/main.min"], n);
  })(
    function () {
      !(function (n) {
        function i(n) {
          for (var r = {}, t = 0, i = n.length; t < i; t++) r[n[t]] = !0;
          return r;
        }
        var a,
          f,
          v,
          e,
          y,
          r,
          p,
          w,
          b,
          k,
          t,
          u = window.kendo,
          o = n.map,
          d = n.extend,
          s = u.support.browser,
          h = "style",
          g = "float",
          nt = "cssFloat",
          tt = "styleFloat",
          it = "class",
          rt = "k-marker",
          c = i(
            "area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed".split(
              ","
            )
          ),
          ut =
            "p,div,h1,h2,h3,h4,h5,h6,address,applet,blockquote,button,center,dd,dir,dl,dt,fieldset,form,frameset,hr,iframe,isindex,map,menu,noframes,noscript,object,pre,script,table,tbody,td,tfoot,th,thead,tr,header,article,nav,footer,section,aside,main,figure,figcaption".split(
              ","
            ),
          l = ut.concat(["ul", "ol", "li"]),
          ft = i(l),
          ht = i(
            "area,base,br,col,command,embed,hr,img,input,keygen,link,menuitem,meta,param,source,track,wbr".split(
              ","
            )
          ),
          et =
            "span,em,a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,strike,strong,sub,sup,textarea,tt,u,var,data,time,mark,ruby".split(
              ","
            ),
          ot = i(et),
          ct = i(
            "checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(
              ","
            )
          ),
          st = function (n) {
            1 == n.nodeType && n.normalize();
          };
        s.msie &&
          s.version >= 8 &&
          (st = function (n) {
            if (1 == n.nodeType && n.firstChild)
              for (var r = n.firstChild, i = r; ; ) {
                if (((i = i.nextSibling), !i)) break;
                3 == i.nodeType &&
                  3 == r.nodeType &&
                  ((i.nodeValue = r.nodeValue + i.nodeValue), t.remove(r));
                r = i;
              }
          });
        a = /^\s+$/;
        f = /^[\n\r\t]+$/;
        v = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i;
        e = /\ufeff/g;
        y = /^(\s+|\ufeff)$/;
        p =
          "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(
            ","
          );
        w = /[<>\&]/g;
        b = /[\u00A0-\u2666<>\&]/g;
        k = {
          34: "quot",
          38: "amp",
          39: "apos",
          60: "lt",
          62: "gt",
          160: "nbsp",
          161: "iexcl",
          162: "cent",
          163: "pound",
          164: "curren",
          165: "yen",
          166: "brvbar",
          167: "sect",
          168: "uml",
          169: "copy",
          170: "ordf",
          171: "laquo",
          172: "not",
          173: "shy",
          174: "reg",
          175: "macr",
          176: "deg",
          177: "plusmn",
          178: "sup2",
          179: "sup3",
          180: "acute",
          181: "micro",
          182: "para",
          183: "middot",
          184: "cedil",
          185: "sup1",
          186: "ordm",
          187: "raquo",
          188: "frac14",
          189: "frac12",
          190: "frac34",
          191: "iquest",
          192: "Agrave",
          193: "Aacute",
          194: "Acirc",
          195: "Atilde",
          196: "Auml",
          197: "Aring",
          198: "AElig",
          199: "Ccedil",
          200: "Egrave",
          201: "Eacute",
          202: "Ecirc",
          203: "Euml",
          204: "Igrave",
          205: "Iacute",
          206: "Icirc",
          207: "Iuml",
          208: "ETH",
          209: "Ntilde",
          210: "Ograve",
          211: "Oacute",
          212: "Ocirc",
          213: "Otilde",
          214: "Ouml",
          215: "times",
          216: "Oslash",
          217: "Ugrave",
          218: "Uacute",
          219: "Ucirc",
          220: "Uuml",
          221: "Yacute",
          222: "THORN",
          223: "szlig",
          224: "agrave",
          225: "aacute",
          226: "acirc",
          227: "atilde",
          228: "auml",
          229: "aring",
          230: "aelig",
          231: "ccedil",
          232: "egrave",
          233: "eacute",
          234: "ecirc",
          235: "euml",
          236: "igrave",
          237: "iacute",
          238: "icirc",
          239: "iuml",
          240: "eth",
          241: "ntilde",
          242: "ograve",
          243: "oacute",
          244: "ocirc",
          245: "otilde",
          246: "ouml",
          247: "divide",
          248: "oslash",
          249: "ugrave",
          250: "uacute",
          251: "ucirc",
          252: "uuml",
          253: "yacute",
          254: "thorn",
          255: "yuml",
          402: "fnof",
          913: "Alpha",
          914: "Beta",
          915: "Gamma",
          916: "Delta",
          917: "Epsilon",
          918: "Zeta",
          919: "Eta",
          920: "Theta",
          921: "Iota",
          922: "Kappa",
          923: "Lambda",
          924: "Mu",
          925: "Nu",
          926: "Xi",
          927: "Omicron",
          928: "Pi",
          929: "Rho",
          931: "Sigma",
          932: "Tau",
          933: "Upsilon",
          934: "Phi",
          935: "Chi",
          936: "Psi",
          937: "Omega",
          945: "alpha",
          946: "beta",
          947: "gamma",
          948: "delta",
          949: "epsilon",
          950: "zeta",
          951: "eta",
          952: "theta",
          953: "iota",
          954: "kappa",
          955: "lambda",
          956: "mu",
          957: "nu",
          958: "xi",
          959: "omicron",
          960: "pi",
          961: "rho",
          962: "sigmaf",
          963: "sigma",
          964: "tau",
          965: "upsilon",
          966: "phi",
          967: "chi",
          968: "psi",
          969: "omega",
          977: "thetasym",
          978: "upsih",
          982: "piv",
          8226: "bull",
          8230: "hellip",
          8242: "prime",
          8243: "Prime",
          8254: "oline",
          8260: "frasl",
          8472: "weierp",
          8465: "image",
          8476: "real",
          8482: "trade",
          8501: "alefsym",
          8592: "larr",
          8593: "uarr",
          8594: "rarr",
          8595: "darr",
          8596: "harr",
          8629: "crarr",
          8656: "lArr",
          8657: "uArr",
          8658: "rArr",
          8659: "dArr",
          8660: "hArr",
          8704: "forall",
          8706: "part",
          8707: "exist",
          8709: "empty",
          8711: "nabla",
          8712: "isin",
          8713: "notin",
          8715: "ni",
          8719: "prod",
          8721: "sum",
          8722: "minus",
          8727: "lowast",
          8730: "radic",
          8733: "prop",
          8734: "infin",
          8736: "ang",
          8743: "and",
          8744: "or",
          8745: "cap",
          8746: "cup",
          8747: "int",
          8756: "there4",
          8764: "sim",
          8773: "cong",
          8776: "asymp",
          8800: "ne",
          8801: "equiv",
          8804: "le",
          8805: "ge",
          8834: "sub",
          8835: "sup",
          8836: "nsub",
          8838: "sube",
          8839: "supe",
          8853: "oplus",
          8855: "otimes",
          8869: "perp",
          8901: "sdot",
          8968: "lceil",
          8969: "rceil",
          8970: "lfloor",
          8971: "rfloor",
          9001: "lang",
          9002: "rang",
          9674: "loz",
          9824: "spades",
          9827: "clubs",
          9829: "hearts",
          9830: "diams",
          338: "OElig",
          339: "oelig",
          352: "Scaron",
          353: "scaron",
          376: "Yuml",
          710: "circ",
          732: "tilde",
          8194: "ensp",
          8195: "emsp",
          8201: "thinsp",
          8204: "zwnj",
          8205: "zwj",
          8206: "lrm",
          8207: "rlm",
          8211: "ndash",
          8212: "mdash",
          8216: "lsquo",
          8217: "rsquo",
          8218: "sbquo",
          8220: "ldquo",
          8221: "rdquo",
          8222: "bdquo",
          8224: "dagger",
          8225: "Dagger",
          8240: "permil",
          8249: "lsaquo",
          8250: "rsaquo",
          8364: "euro",
        };
        t = {
          block: ft,
          inline: ot,
          findNodeIndex: function (n, t) {
            var i = 0;
            if (!n) return -1;
            for (;;) {
              if (((n = n.previousSibling), !n)) break;
              (t && 3 == n.nodeType) || i++;
            }
            return i;
          },
          isDataNode: function (n) {
            return n && null !== n.nodeValue && null !== n.data;
          },
          isAncestorOf: function (i, r) {
            try {
              return (
                !t.isDataNode(i) &&
                (n.contains(i, t.isDataNode(r) ? r.parentNode : r) ||
                  r.parentNode == i)
              );
            } catch (u) {
              return !1;
            }
          },
          isAncestorOrSelf: function (n, i) {
            return t.isAncestorOf(n, i) || n == i;
          },
          findClosestAncestor: function (n, i) {
            if (t.isAncestorOf(n, i))
              for (; i && i.parentNode != n; ) i = i.parentNode;
            return i;
          },
          getAllComments: function (n) {
            for (
              var i = [],
                r = document.createNodeIterator(
                  n,
                  NodeFilter.SHOW_COMMENT,
                  function () {
                    return NodeFilter.FILTER_ACCEPT;
                  },
                  !1
                ),
                t = r.nextNode();
              t;

            )
              i.push(t.nodeValue), (t = r.nextNode());
            return i;
          },
          getNodeLength: function (n) {
            return t.isDataNode(n) ? n.length : n.childNodes.length;
          },
          splitDataNode: function (n, i) {
            for (
              var f, u = n.cloneNode(!1), e = "", r = n.nextSibling;
              r && 3 == r.nodeType && r.nodeValue;

            )
              (e += r.nodeValue), (f = r), (r = r.nextSibling), t.remove(f);
            n.deleteData(i, n.length);
            u.deleteData(0, i);
            u.nodeValue += e;
            t.insertAfter(u, n);
          },
          attrEquals: function (n, i) {
            var r, f;
            for (r in i)
              if (
                ((f = n[r]),
                r == g && (f = n[u.support.cssFloat ? nt : tt]),
                "object" == typeof f)
              ) {
                if (!t.attrEquals(f, i[r])) return !1;
              } else if (f != i[r]) return !1;
            return !0;
          },
          blockParentOrBody: function (n) {
            return t.parentOfType(n, l) || n.ownerDocument.body;
          },
          blockParents: function (i) {
            for (var u, f = [], r = 0, e = i.length; r < e; r++)
              (u = t.parentOfType(i[r], t.blockElements)),
                u && n.inArray(u, f) < 0 && f.push(u);
            return f;
          },
          windowFromDocument: function (n) {
            return n.defaultView || n.parentWindow;
          },
          normalize: st,
          blockElements: l,
          nonListBlockElements: ut,
          inlineElements: et,
          empty: c,
          fillAttrs: ct,
          nodeTypes: {
            ELEMENT_NODE: 1,
            ATTRIBUTE_NODE: 2,
            TEXT_NODE: 3,
            CDATA_SECTION_NODE: 4,
            ENTITY_REFERENCE_NODE: 5,
            ENTITY_NODE: 6,
            PROCESSING_INSTRUCTION_NODE: 7,
            COMMENT_NODE: 8,
            DOCUMENT_NODE: 9,
            DOCUMENT_TYPE_NODE: 10,
            DOCUMENT_FRAGMENT_NODE: 11,
            NOTATION_NODE: 12,
          },
          toHex: function (n) {
            var t = v.exec(n);
            return t
              ? "#" +
                  o(t.slice(1), function (n) {
                    return (
                      (n = parseInt(n, 10).toString(16)),
                      n.length > 1 ? n : "0" + n
                    );
                  }).join("")
              : n;
          },
          encode: function (n, t) {
            var i = !t || t.entities ? b : w;
            return n.replace(i, function (n) {
              var i = n.charCodeAt(0),
                t = k[i];
              return t ? "&" + t + ";" : n;
            });
          },
          isBom: function (n) {
            return n && 3 === n.nodeType && /^[\ufeff]+$/.test(n.nodeValue);
          },
          stripBom: function (n) {
            return (n || "").replace(e, "");
          },
          stripBomNode: function (n) {
            t.isBom(n) && n.parentNode.removeChild(n);
          },
          insignificant: function (n) {
            var i = n.attributes;
            return (
              "k-marker" == n.className ||
              (t.is(n, "br") &&
                ("k-br" == n.className ||
                  i._moz_dirty ||
                  i._moz_editor_bogus_node))
            );
          },
          tableCell: function (n) {
            return t.is(n, "td") || t.is(n, "th");
          },
          significantNodes: function (i) {
            return n.grep(i, function (n) {
              var i = t.name(n);
              return (
                "br" != i &&
                !t.insignificant(n) &&
                !t.emptyTextNode(n) &&
                !(1 == n.nodeType && !c[i] && t.emptyNode(n))
              );
            });
          },
          emptyTextNode: function (n) {
            return n && 3 == n.nodeType && y.test(n.nodeValue);
          },
          emptyNode: function (n) {
            return 1 == n.nodeType && !t.significantNodes(n.childNodes).length;
          },
          name: function (n) {
            return n.nodeName.toLowerCase();
          },
          significantChildNodes: function (i) {
            return n.grep(i.childNodes, function (n) {
              return 3 != n.nodeType || !t.isWhitespace(n);
            });
          },
          lastTextNode: function (n) {
            var i,
              r = null;
            if (3 == n.nodeType) return n;
            for (i = n.lastChild; i; i = i.previousSibling)
              if ((r = t.lastTextNode(i))) return r;
            return r;
          },
          is: function (n, i) {
            return n && t.name(n) == i;
          },
          isMarker: function (n) {
            return n.className == rt;
          },
          isWhitespace: function (n) {
            return a.test(n.nodeValue);
          },
          allWhitespaceContent: function (n) {
            for (var i = n.firstChild; i && t.isWhitespace(i); )
              i = i.nextSibling;
            return !i;
          },
          isEmptyspace: function (n) {
            return f.test(n.nodeValue);
          },
          htmlIndentSpace: function (i) {
            var s, o, r, u, h, c;
            return (
              !(!t.isDataNode(i) || !t.isWhitespace(i)) &&
              (!!f.test(i.nodeValue) ||
                ((s = function (n, i) {
                  for (; n[i]; )
                    if (((n = n[i]), t.significantNodes([n]).length > 0))
                      return n;
                }),
                (o = i.parentNode),
                (r = s(i, "previousSibling")),
                (u = s(i, "nextSibling")),
                e.test(i.nodeValue)
                  ? !(!r && !u)
                  : !!n(o).is("tr,tbody,thead,tfoot,table,ol,ul") ||
                    !!(
                      (t.isBlock(o) || t.is(o, "body")) &&
                      ((h = r && t.isBlock(r)),
                      (c = u && t.isBlock(u)),
                      (!u && h) || (!r && c) || (h && c))
                    )))
            );
          },
          isBlock: function (n) {
            return ft[t.name(n)];
          },
          isSelfClosing: function (n) {
            return ht[t.name(n)];
          },
          isEmpty: function (n) {
            return c[t.name(n)];
          },
          isInline: function (n) {
            return ot[t.name(n)];
          },
          isBr: function (n) {
            return "br" == t.name(n);
          },
          list: function (n) {
            var i = n ? t.name(n) : "";
            return "ul" == i || "ol" == i || "dl" == i;
          },
          scrollContainer: function (n) {
            var i = t.windowFromDocument(n),
              r = (i.contentWindow || i).document || i.ownerDocument || i;
            return "BackCompat" == r.compatMode
              ? r.body
              : r.scrollingElement || r.documentElement;
          },
          scrollTo: function (i, r) {
            var u,
              o,
              f,
              e,
              s = i.ownerDocument,
              l = t.windowFromDocument(s),
              h = l.innerHeight,
              c = t.scrollContainer(s);
            t.isDataNode(i)
              ? r
                ? ((e = t.create(s, "span", { innerHTML: "&#xfeff;" })),
                  t.insertBefore(e, i),
                  (u = n(e)))
                : (u = n(i.parentNode))
              : (u = n(i));
            o = u.offset().top;
            f = u[0].offsetHeight;
            (!r && f) ||
              (f =
                parseInt(u.css("line-height"), 10) ||
                Math.ceil(1.2 * parseInt(u.css("font-size"), 10)) ||
                15);
            e && t.remove(e);
            f + o > c.scrollTop + h && (c.scrollTop = f + o - h);
          },
          persistScrollTop: function (n) {
            r = t.scrollContainer(n).scrollTop;
          },
          offset: function (n, i) {
            for (
              var u = { top: n.offsetTop, left: n.offsetLeft },
                r = n.offsetParent;
              r && (!i || t.isAncestorOf(i, r));

            )
              (u.top += r.offsetTop),
                (u.left += r.offsetLeft),
                (r = r.offsetParent);
            return u;
          },
          restoreScrollTop: function (n) {
            "number" == typeof r &&
              ((t.scrollContainer(n).scrollTop = r), (r = void 0));
          },
          insertAt: function (n, t, i) {
            n.insertBefore(t, n.childNodes[i] || null);
          },
          insertBefore: function (n, t) {
            return t.parentNode ? t.parentNode.insertBefore(n, t) : t;
          },
          insertAfter: function (n, t) {
            return t.parentNode.insertBefore(n, t.nextSibling);
          },
          remove: function (n) {
            n.parentNode && n.parentNode.removeChild(n);
          },
          removeChildren: function (n) {
            for (; n.firstChild; ) n.removeChild(n.firstChild);
          },
          removeTextSiblings: function (n) {
            for (
              var t = n.parentNode;
              n.nextSibling && 3 == n.nextSibling.nodeType;

            )
              t.removeChild(n.nextSibling);
            for (; n.previousSibling && 3 == n.previousSibling.nodeType; )
              t.removeChild(n.previousSibling);
          },
          trim: function (n) {
            for (var i, r = n.childNodes.length - 1; r >= 0; r--)
              (i = n.childNodes[r]),
                t.isDataNode(i)
                  ? t.stripBom(i.nodeValue).length || t.remove(i)
                  : i.className != rt &&
                    (t.trim(i),
                    ((!t.isEmpty(i) && 0 === i.childNodes.length) ||
                      (t.isBlock(i) && t.allWhitespaceContent(i))) &&
                      t.remove(i));
            return n;
          },
          closest: function (n, i) {
            for (
              "string" == typeof i && (i = [i]);
              n && i.indexOf(t.name(n)) < 0;

            )
              n = n.parentNode;
            return n;
          },
          closestBy: function (n, t, i) {
            for (; n && !t(n); ) {
              if (i && i(n)) return null;
              n = n.parentNode;
            }
            return n;
          },
          sibling: function (n, t) {
            do n = n[t];
            while (n && 1 != n.nodeType);
            return n;
          },
          next: function (n) {
            return t.sibling(n, "nextSibling");
          },
          prev: function (n) {
            return t.sibling(n, "previousSibling");
          },
          parentOfType: function (n, i) {
            do n = n.parentNode;
            while (n && !t.ofType(n, i));
            return n;
          },
          ofType: function (i, r) {
            return n.inArray(t.name(i), r) >= 0;
          },
          changeTag: function (n, i, r) {
            var f,
              c,
              e,
              s,
              o,
              u = t.create(n.ownerDocument, i),
              l = n.attributes;
            if (!r)
              for (f = 0, c = l.length; f < c; f++)
                (o = l[f]),
                  o.specified &&
                    ((e = o.nodeName),
                    (s = o.nodeValue),
                    e == it
                      ? (u.className = s)
                      : e == h
                      ? (u.style.cssText = n.style.cssText)
                      : u.setAttribute(e, s));
            for (; n.firstChild; ) u.appendChild(n.firstChild);
            return t.insertBefore(u, n), t.remove(n), u;
          },
          editableParent: function (n) {
            for (; n && (3 == n.nodeType || "true" !== n.contentEditable); )
              n = n.parentNode;
            return n;
          },
          wrap: function (n, i) {
            return t.insertBefore(i, n), i.appendChild(n), i;
          },
          unwrap: function (n) {
            for (var t = n.parentNode; n.firstChild; )
              t.insertBefore(n.firstChild, n);
            t.removeChild(n);
          },
          wrapper: function (i) {
            var r = t.closestBy(i, function (n) {
              return (
                n.parentNode &&
                t.significantNodes(n.parentNode.childNodes).length > 1
              );
            });
            if (!n(r).is("body,.k-editor")) return r;
          },
          create: function (n, i, r) {
            return t.attr(n.createElement(i), r);
          },
          createEmptyNode: function (n, i, r) {
            var u = t.attr(n.createElement(i), r);
            return (u.innerHTML = "﻿"), u;
          },
          attr: function (n, i) {
            i = d({}, i);
            i && h in i && (t.style(n, i.style), delete i.style);
            for (var r in i)
              null === i[r]
                ? (n.removeAttribute(r), delete i[r])
                : "className" == r && (n[r] = i[r]);
            return d(n, i);
          },
          mergeAttributes: function (t, i) {
            t.attributes.length &&
              n.each(t.attributes, function () {
                "contenteditable" !== this.name &&
                  n(i).attr(this.name, this.value);
              });
          },
          style: function (t, i) {
            n(t).css(i || {});
          },
          unstyle: function (n, t) {
            for (var i in t)
              i == g && (i = u.support.cssFloat ? nt : tt), (n.style[i] = "");
            "" === n.style.cssText && n.removeAttribute(h);
          },
          inlineStyle: function (i, r, u) {
            var e,
              f = n(t.create(i.ownerDocument, r, u));
            return (
              i.appendChild(f[0]),
              (e = o(p, function (n) {
                return s.msie && "line-height" == n && "1px" == f.css(n)
                  ? "line-height:1.5"
                  : n + ":" + f.css(n);
              }).join(";")),
              f.remove(),
              e
            );
          },
          getEffectiveBackground: function (n) {
            var i = n.css("background-color") || "";
            return i.indexOf("rgba(0, 0, 0, 0") < 0 && "transparent" !== i
              ? i
              : "html" === n[0].tagName.toLowerCase()
              ? "Window"
              : t.getEffectiveBackground(n.parent());
          },
          innerText: function (n) {
            var t = n.innerHTML;
            return (
              (t = t.replace(/<!--(.|\s)*?-->/gi, "")),
              (t = t.replace(/<\/?[^>]+?\/?>/gm, ""))
            );
          },
          removeClass: function (t, i) {
            for (
              var r = " " + t.className + " ",
                e = i.split(" "),
                u = 0,
                f = e.length;
              u < f;
              u++
            )
              r = r.replace(" " + e[u] + " ", " ");
            r = n.trim(r);
            r.length ? (t.className = r) : t.removeAttribute(it);
          },
          commonAncestor: function () {
            var n,
              r,
              t,
              e,
              u,
              i = arguments.length,
              f = [],
              o = 1 / 0,
              s = null;
            if (!i) return null;
            if (1 == i) return arguments[0];
            for (n = 0; n < i; n++) {
              for (r = [], t = arguments[n]; t; ) r.push(t), (t = t.parentNode);
              f.push(r.reverse());
              o = Math.min(o, r.length);
            }
            if (1 == i) return f[0][0];
            for (n = 0; n < o; n++) {
              for (e = f[0][n], u = 1; u < i; u++) if (e != f[u][n]) return s;
              s = e;
            }
            return s;
          },
          closestSplittableParent: function (i) {
            var r, f, u;
            return (
              (r =
                1 == i.length
                  ? t.parentOfType(i[0], ["ul", "ol"])
                  : t.commonAncestor.apply(null, i)),
              r ||
                (r =
                  t.parentOfType(i[0], ["p", "td"]) || i[0].ownerDocument.body),
              t.isInline(r) && (r = t.blockParentOrBody(r)),
              (f = o(i, t.editableParent)),
              (u = t.commonAncestor(f)[0]),
              n.contains(r, u) && (r = u),
              r
            );
          },
          closestEditable: function (i, r) {
            var u,
              f = t.editableParent(i);
            return (
              (u = t.ofType(i, r) ? i : t.parentOfType(i, r)),
              u && f && n.contains(u, f) ? (u = f) : !u && f && (u = f),
              u
            );
          },
          closestEditableOfType: function (i, r) {
            var u = t.closestEditable(i, r);
            if (u && t.ofType(u, r) && !n(u).is(".k-editor")) return u;
          },
          filter: function (n, i, r) {
            var u = function (i) {
              return t.name(i) == n;
            };
            return t.filterBy(i, u, r);
          },
          filterBy: function (n, t, i) {
            for (var u, r = 0, e = n.length, f = []; r < e; r++)
              (u = t(n[r])), ((u && !i) || (!u && i)) && f.push(n[r]);
            return f;
          },
          ensureTrailingBreaks: function (i) {
            var u = n(i).find("p,td,th"),
              f = u.length,
              r = 0;
            if (f) for (; r < f; r++) t.ensureTrailingBreak(u[r]);
            else t.ensureTrailingBreak(i);
          },
          removeTrailingBreak: function (t) {
            n(t).find("br[type=_moz],.k-br").remove();
          },
          ensureTrailingBreak: function (n) {
            var r, i, u;
            t.removeTrailingBreak(n);
            r = n.lastChild;
            i = r && t.name(r);
            (!i ||
              ("br" != i && "img" != i) ||
              ("br" == i && "k-br" != r.className)) &&
              ((u = n.ownerDocument.createElement("br")),
              (u.className = "k-br"),
              n.appendChild(u));
          },
          reMapTableColumns: function (n, i) {
            t._mapColIndices(n, i);
          },
          clearTableMappings: function (t, i) {
            n(t)
              .find("[" + i + "]")
              .removeAttr(i);
          },
          _mapColIndices: function (n, t) {
            for (var e, i, f, u, o = {}, r = 0; r < n.rows.length; r++)
              for (e = n.rows[r].cells, i = 0, f = 0; f < e.length; f++, i++) {
                if (
                  ((u = e[f]),
                  u.rowSpan > 1 && this._mapColspan(u.rowSpan, r, i, o),
                  o[r])
                )
                  for (; o[r][i]; ) i++;
                u.setAttribute(t, i);
                u.colSpan > 1 && (i = i + u.colSpan - 1);
              }
          },
          _mapColspan: function (n, t, i, r) {
            for (var f = i, u = t + 1; u < t + n; u++) {
              if ((r[u] || ((r[u] = {}), (r[u].length = 0)), r[t]))
                for (; r[t][f]; ) f++;
              r[u][f] = !0;
              r[u].length++;
            }
          },
        };
        u.ui.editor.Dom = t;
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/serializer.min", ["editor/dom.min"], n);
  })(
    function () {
      !(function (n, t) {
        var s,
          h,
          c,
          r,
          u = window.kendo,
          f = u.ui.editor,
          i = f.Dom,
          w = n.extend,
          l = "xx-small,x-small,small,medium,large,x-large,xx-large".split(","),
          a = /"/g,
          b = /<br[^>]*>/i,
          v = /^\d+(\.\d*)?(px)?$/i,
          k = /<p>(?:&nbsp;)?<\/p>/i,
          y =
            /(\*?[-#\/\*\\\w]+(?:\[[0-9a-z_-]+\])?)\s*:\s*((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/g,
          d = /^sizzle-\d+/i,
          p = /^k-script-/i,
          g = /\s*onerror\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/i,
          e = '<br class="k-br">',
          o = document.createElement("div");
        o.innerHTML = " <hr>";
        s = 3 === o.firstChild.nodeType;
        o = null;
        h = n.isFunction;
        c = "td";
        r = {
          toEditableHtml: function (n) {
            return (n || "")
              .replace(/<!\[CDATA\[(.*)?\]\]>/g, "<!--[CDATA[$1]]-->")
              .replace(/<(\/?)script([^>]*)>/gi, "<$1k:script$2>")
              .replace(/<img([^>]*)>/gi, function (n) {
                return n.replace(g, "");
              })
              .replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/gi, "$1")
              .replace(/^<(table|blockquote)/i, e + "<$1")
              .replace(/^[\s]*(&nbsp;|\u00a0)/i, "$1")
              .replace(/<\/(table|blockquote)>$/i, "</$1>" + e);
          },
          _toEditableImmutables: function (t) {
            for (
              var o = f.Immutables.immutable,
                s = i.emptyTextNode,
                r = t.firstChild,
                u = t.lastChild;
              s(r);

            )
              r = r.nextSibling;
            for (; s(u); ) u = u.previousSibling;
            r && o(r) && n(e).prependTo(t);
            u && o(u) && n(e).appendTo(t);
          },
          _fillEmptyElements: function (t) {
            n(t)
              .find("p,td")
              .each(function () {
                var t,
                  r = n(this);
                if (/^\s*$/g.test(r.text()) && !r.find("img,input").length) {
                  for (t = this; t.firstChild && 3 != t.firstChild.nodeType; )
                    t = t.firstChild;
                  1 != t.nodeType ||
                    i.empty[i.name(t)] ||
                    (t.innerHTML = i.is(t, "td")
                      ? u.ui.editor.emptyTableCellContent
                      : u.ui.editor.emptyElementContent);
                }
              });
          },
          _removeSystemElements: function (t) {
            n(".k-paste-container", t).remove();
          },
          _resetOrderedLists: function (n) {
            for (
              var t, r, u = n.getElementsByTagName("ol"), i = 0;
              i < u.length;
              i++
            )
              (t = u[i]),
                (r = t.getAttribute("start")),
                t.setAttribute("start", 1),
                r ? t.setAttribute("start", r) : t.removeAttribute(r);
          },
          _preventScriptExecution: function (t) {
            n(t)
              .find("*")
              .each(function () {
                for (
                  var t, r, f = this.attributes, u = [], n = 0, i = f.length;
                  n < i;
                  n++
                )
                  (t = f[n]),
                    (r = t.nodeName),
                    t.specified &&
                      /^on/i.test(r) &&
                      (this.setAttribute("k-script-" + r, t.value), u.push(r));
                for (n = 0, i = u.length; n < i; n++)
                  this.removeAttribute(u[n]);
              });
          },
          htmlToDom: function (t, f, e) {
            var l = u.support.browser,
              a = l.msie,
              v = a && l.version < 9,
              o = "originalsrc",
              s = "originalhref",
              c = e || {},
              y = c.immutables;
            return (
              (t = r.toEditableHtml(t)),
              v &&
                ((t = "<br/>" + t),
                (t = t.replace(
                  /href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,
                  s + '="$1"'
                )),
                (t = t.replace(
                  /src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,
                  o + '="$1"'
                ))),
              h(c.custom) && (t = c.custom(t) || t),
              (f.innerHTML = t),
              y && y.deserialize(f),
              v
                ? (i.remove(f.firstChild),
                  n(f)
                    .find("k\\:script,script,link,img,a")
                    .each(function () {
                      var n = this;
                      n[s] &&
                        (n.setAttribute("href", n[s]), n.removeAttribute(s));
                      n[o] &&
                        (n.setAttribute("src", n[o]), n.removeAttribute(o));
                    }))
                : a && (i.normalize(f), r._resetOrderedLists(f)),
              r._preventScriptExecution(f),
              r._fillEmptyElements(f),
              r._removeSystemElements(f),
              r._toEditableImmutables(f),
              n("table", f).addClass("k-table"),
              f
            );
          },
          domToXhtml: function (r, e) {
            function it(t) {
              return n.grep(t, function (n) {
                return "style" != n.name;
              });
            }
            function h(n, t) {
              o.push("<" + t);
              g(n);
              o.push(">");
            }
            function et(t) {
              var f,
                u,
                r,
                e = n.trim,
                s = e(t),
                o = [];
              for (y.lastIndex = 0; ; ) {
                if (((f = y.exec(s)), !f)) break;
                u = e(f[1].toLowerCase());
                r = e(f[2]);
                "font-size-adjust" != u &&
                  "font-stretch" != u &&
                  (u.indexOf("color") >= 0
                    ? (r = i.toHex(r))
                    : u.indexOf("font") >= 0
                    ? (r = r.replace(a, "'"))
                    : /\burl\(/g.test(r) && (r = r.replace(a, "")),
                  o.push({ property: u, value: r }));
              }
              return o;
            }
            function ot(n) {
              for (var i = et(n), t = 0; t < i.length; t++)
                o.push(i[t].property),
                  o.push(":"),
                  o.push(i[t].value),
                  o.push(";");
            }
            function w(n) {
              for (
                var u, r, f, t, h = [], c = n.attributes, o = 0, s = c.length;
                o < s;
                o++
              )
                (u = c[o]),
                  (r = u.nodeName),
                  (f = u.value),
                  (t = u.specified),
                  "value" == r && "value" in n && n.value
                    ? (t = !0)
                    : "type" == r && "text" == f
                    ? (t = !0)
                    : "class" != r || f
                    ? d.test(r)
                      ? (t = !1)
                      : "complete" == r
                      ? (t = !1)
                      : "altHtml" == r
                      ? (t = !1)
                      : "start" == r && i.is(n, "ul")
                      ? (t = !1)
                      : "start" == r && i.is(n, "ol") && "1" == f
                      ? (t = !1)
                      : r.indexOf("_moz") >= 0
                      ? (t = !1)
                      : p.test(r)
                      ? (t = !!e.scripts)
                      : "data-role" == r &&
                        "resizable" == f &&
                        (i.is(n, "tr") || i.is(n, "td")) &&
                        (t = !1)
                    : (t = !1),
                  t && h.push(u);
              return h;
            }
            function g(r, f) {
              var s, b, a, e, h, c, l, y;
              if (
                ((f = f || w(r)),
                i.is(r, "img") &&
                  ((c = r.style.width),
                  (l = r.style.height),
                  (y = n(r)),
                  c &&
                    v.test(c) &&
                    (y.attr("width", parseInt(c, 10)),
                    i.unstyle(r, { width: t })),
                  l &&
                    v.test(l) &&
                    (y.attr("height", parseInt(l, 10)),
                    i.unstyle(r, { height: t }))),
                f.length)
              )
                for (s = 0, b = f.length; s < b; s++)
                  (a = f[s]),
                    (e = a.nodeName),
                    (h = a.value),
                    ("class" == e && "k-table" == h) ||
                      ((e = e.replace(p, "")),
                      o.push(" "),
                      o.push(e),
                      o.push('="'),
                      "style" == e
                        ? ot(h || r.style.cssText)
                        : o.push(
                            "src" == e || "href" == e
                              ? u.htmlEncode(r.getAttribute(e, 2))
                              : i.fillAttrs[e]
                              ? e
                              : h
                          ),
                      o.push('"'));
            }
            function nt(n, t, i) {
              for (var r = n.firstChild; r; r = r.nextSibling) ht(r, t, i);
            }
            function rt(n) {
              return n.nodeValue.replace(/\ufeff/g, "");
            }
            function st(n) {
              if (i.isBom(n)) {
                do {
                  if (
                    ((n = n.parentNode),
                    i.is(n, c) && 1 === n.childNodes.length)
                  )
                    return !0;
                  if (1 !== n.childNodes.length) return !1;
                } while (!i.isBlock(n));
                return !0;
              }
              return !1;
            }
            function ht(r, u, h) {
              var c,
                l,
                w,
                a,
                v,
                y,
                p = r.nodeType;
              if (ft && f.Immutables.immutable(r)) o.push(ft.serialize(r));
              else if (1 == p) {
                if (
                  ((c = i.name(r)),
                  (y = n(r)),
                  y.hasClass("k-table-resize-handle-wrapper") ||
                    y.hasClass("k-column-resize-handle-wrapper") ||
                    y.hasClass("k-row-resize-handle-wrapper"))
                )
                  return;
                if (!c || i.insignificant(r)) return;
                if (!e.scripts && ("script" == c || "k:script" == c)) return;
                if (
                  ((l = tt[c]),
                  l && (t === l.semantic || e.semantic ^ l.semantic))
                )
                  return l.start(r), nt(r, !1, l.skipEncoding), l.end(r), t;
                o.push("<");
                o.push(c);
                g(r);
                i.empty[c]
                  ? o.push(" />")
                  : (o.push(">"),
                    nt(r, u || i.is(r, "pre")),
                    o.push("</"),
                    o.push(c),
                    o.push(">"));
              } else if (3 == p) {
                if (st(r)) return o.push("&nbsp;"), t;
                a = rt(r);
                !u &&
                  s &&
                  ((w = r.parentNode),
                  (v = r.previousSibling),
                  v || (v = (i.isInline(w) ? w : r).previousSibling),
                  (v && "" !== v.innerHTML && !i.isBlock(v)) ||
                    (a = a.replace(/^[\r\n\v\f\t ]+/, "")),
                  (a = a.replace(/ +/, " ")));
                o.push(h ? a : i.encode(a, e));
              } else
                4 == p
                  ? (o.push("<![CDATA["), o.push(r.data), o.push("]]>"))
                  : 8 == p &&
                    (r.data.indexOf("[CDATA[") < 0
                      ? (o.push("<!--"), o.push(r.data), o.push("-->"))
                      : (o.push("<!"), o.push(r.data), o.push(">")));
            }
            function ct(n) {
              var t = n.childNodes.length,
                r = t && 3 == n.firstChild.nodeType;
              return r && (1 == t || (2 == t && i.insignificant(n.lastChild)));
            }
            function ut() {
              n.isFunction(e.custom) && (o = e.custom(o) || o);
            }
            var o = [],
              ft = e && e.immutables,
              tt = {
                iframe: {
                  start: function (n) {
                    h(n, "iframe");
                  },
                  end: function () {
                    o.push("</iframe>");
                  },
                },
                "k:script": {
                  start: function (n) {
                    h(n, "script");
                  },
                  end: function () {
                    o.push("</script>");
                  },
                  skipEncoding: !0,
                },
                span: {
                  semantic: !0,
                  start: function (t) {
                    var u,
                      f,
                      r = t.style,
                      s = w(t),
                      e = it(s);
                    e.length && (o.push("<span"), g(t, e), o.push(">"));
                    "underline" == r.textDecoration && o.push("<u>");
                    u = [];
                    r.color && u.push('color="' + i.toHex(r.color) + '"');
                    r.fontFamily && u.push('face="' + r.fontFamily + '"');
                    r.fontSize &&
                      ((f = n.inArray(r.fontSize, l)),
                      u.push('size="' + f + '"'));
                    u.length && o.push("<font " + u.join(" ") + ">");
                  },
                  end: function (n) {
                    var t = n.style;
                    (t.color || t.fontFamily || t.fontSize) &&
                      o.push("</font>");
                    "underline" == t.textDecoration && o.push("</u>");
                    it(w(n)).length && o.push("</span>");
                  },
                },
                strong: {
                  semantic: !0,
                  start: function (n) {
                    h(n, "b");
                  },
                  end: function () {
                    o.push("</b>");
                  },
                },
                em: {
                  semantic: !0,
                  start: function (n) {
                    h(n, "i");
                  },
                  end: function () {
                    o.push("</i>");
                  },
                },
                b: {
                  semantic: !1,
                  start: function (n) {
                    h(n, "strong");
                  },
                  end: function () {
                    o.push("</strong>");
                  },
                },
                i: {
                  semantic: !1,
                  start: function (n) {
                    h(n, "em");
                  },
                  end: function () {
                    o.push("</em>");
                  },
                },
                u: {
                  semantic: !1,
                  start: function (t) {
                    var i, u, r;
                    o.push("<span");
                    i = w(t);
                    u = n(i).filter(function (n, t) {
                      return "style" == t.name;
                    })[0];
                    r = {
                      nodeName: "style",
                      value: "text-decoration:underline;",
                    };
                    u &&
                      ((r.value = u.value),
                      /text-decoration/i.test(r.value) ||
                        (r.value = "text-decoration:underline;" + r.value),
                      i.splice(n.inArray(u, i), 1));
                    i.push(r);
                    g(t, i);
                    o.push(">");
                  },
                  end: function () {
                    o.push("</span>");
                  },
                },
                font: {
                  semantic: !1,
                  start: function (n) {
                    var t, r, u;
                    o.push('<span style="');
                    t = n.getAttribute("color");
                    r = l[n.getAttribute("size")];
                    u = n.getAttribute("face");
                    t && (o.push("color:"), o.push(i.toHex(t)), o.push(";"));
                    u && (o.push("font-family:"), o.push(u), o.push(";"));
                    r && (o.push("font-size:"), o.push(r), o.push(";"));
                    o.push('">');
                  },
                  end: function () {
                    o.push("</span>");
                  },
                },
              };
            return (
              (tt.script = tt["k:script"]),
              (e = e || {}),
              t === e.semantic && (e.semantic = !0),
              ct(r)
                ? ((o = i.encode(
                    rt(r.firstChild).replace(/[\r\n\v\f\t ]+/, " "),
                    e
                  )),
                  ut(),
                  o)
                : (nt(r),
                  (o = o.join("")),
                  ut(),
                  "" === o.replace(b, "").replace(k, "") ? "" : o)
            );
          },
        };
        w(f, { Serializer: r });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/components.min", ["editor/serializer.min"], n);
  })(
    function () {
      !(function (n, t) {
        var i = window.kendo,
          r = i.ui.DropDownList,
          u = i.ui.editor.Dom,
          f = r.extend({
            init: function (t, u) {
              var f = this;
              r.fn.init.call(f, t, u);
              i.support.mobileOS.ios &&
                (this._initSelectOverlay(),
                this.bind("dataBound", n.proxy(this._initSelectOverlay, this)));
              f.text(f.options.title);
              f.element.attr("title", f.options.title);
              f.wrapper.attr("title", f.options.title);
              f.bind("open", function () {
                if (f.options.autoSize) {
                  var n,
                    t = f.list;
                  t.css({ whiteSpace: "nowrap", width: "auto" });
                  n = t.width();
                  n > 0 ? (n += 20) : (n = f._listWidth);
                  t.css("width", n + i.support.scrollbar());
                  f._listWidth = n;
                }
              });
            },
            options: { name: "SelectBox", index: -1 },
            _initSelectOverlay: function () {
              for (
                var t,
                  f,
                  e,
                  o = this,
                  c = o.value(),
                  s = this.dataSource.view(),
                  u = "",
                  h = i.htmlEncode,
                  r = 0;
                r < s.length;
                r++
              )
                (t = s[r]),
                  (u += "<option value='" + h(t.value) + "'"),
                  t.value == c && (u += " selected"),
                  (u += ">" + h(t.text) + "</option>");
              f = n("<select class='k-select-overlay'>" + u + "</select>");
              e = n(this.element).closest(".k-widget");
              e.next(".k-select-overlay").remove();
              f.insertAfter(e);
              f.on("change", function () {
                o.value(this.value);
                o.trigger("change");
              });
            },
            value: function (n) {
              var i = this,
                u = r.fn.value.call(i, n);
              return n === t
                ? u
                : (r.fn.value.call(i) || i.text(i.options.title), t);
            },
            decorate: function (t) {
              var i,
                e,
                o,
                r,
                s = this,
                h = s.dataSource,
                f = h.data();
              for (
                t &&
                  s.list.css(
                    "background-color",
                    u.getEffectiveBackground(n(t))
                  ),
                  i = 0;
                i < f.length;
                i++
              )
                (e = f[i].tag || "span"),
                  (o = f[i].className),
                  (r = u.inlineStyle(t, e, { className: o })),
                  (r = r.replace(/"/g, "'")),
                  (f[i].style = r + ";display:inline-block");
              h.trigger("change");
            },
          });
        i.ui.plugin(f);
        i.ui.editor.SelectBox = f;
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/range.min", ["editor/components.min"], n);
  })(
    function () {
      !(function (n) {
        function ft(n, i, r, f) {
          var e, h, o, s;
          if (n == i) return f - r;
          for (e = i; e && e.parentNode != n; ) e = e.parentNode;
          if (e) return u(e) - r;
          for (e = n; e && e.parentNode != i; ) e = e.parentNode;
          if (e) return f - u(e) - 1;
          for (h = t.commonAncestor(n, i), o = n; o && o.parentNode != h; )
            o = o.parentNode;
          for (o || (o = h), s = i; s && s.parentNode != h; ) s = s.parentNode;
          return s || (s = h), o == s ? 0 : u(s) - u(o);
        }
        function d(n, t) {
          function i(n) {
            try {
              return (
                ft(
                  n.startContainer,
                  n.endContainer,
                  n.startOffset,
                  n.endOffset
                ) < 0
              );
            } catch (t) {
              return !0;
            }
          }
          i(n) &&
            (t
              ? ((n.commonAncestorContainer = n.endContainer =
                  n.startContainer),
                (n.endOffset = n.startOffset))
              : ((n.commonAncestorContainer = n.startContainer =
                  n.endContainer),
                (n.startOffset = n.endOffset)),
            (n.collapsed = !0));
        }
        function g(n) {
          n.collapsed =
            n.startContainer == n.endContainer && n.startOffset == n.endOffset;
          for (
            var i = n.startContainer;
            i && i != n.endContainer && !t.isAncestorOf(i, n.endContainer);

          )
            i = i.parentNode;
          n.commonAncestorContainer = i;
        }
        function et(n) {
          var i = n.duplicate(),
            r = n.duplicate();
          return (
            i.collapse(!0),
            r.collapse(!1),
            t.commonAncestor(
              n.parentElement(),
              i.parentElement(),
              r.parentElement()
            )
          );
        }
        function nt(n, i, u) {
          var s,
            f = i[u ? "startContainer" : "endContainer"],
            c = i[u ? "startOffset" : "endOffset"],
            l = 0,
            a = r(f),
            v = a ? f : f.childNodes[c] || null,
            o = a ? f.parentNode : f,
            h = i.ownerDocument,
            e = h.body.createTextRange();
          (3 != f.nodeType && 4 != f.nodeType) || (l = c);
          o || (o = h.body);
          "img" == o.nodeName.toLowerCase()
            ? (e.moveToElementText(o),
              e.collapse(!1),
              n.setEndPoint(u ? "StartToStart" : "EndToStart", e))
            : ((s = o.insertBefore(t.create(h, "a"), v)),
              e.moveToElementText(s),
              t.remove(s),
              e[u ? "moveStart" : "moveEnd"]("character", l),
              e.collapse(!1),
              n.setEndPoint(u ? "StartToStart" : "EndToStart", e));
        }
        function tt(n, i, f, e) {
          var p,
            s,
            a,
            l,
            v,
            c,
            y,
            o = t.create(i.ownerDocument, "a"),
            h = n.duplicate(),
            b = e ? "StartToStart" : "StartToEnd",
            w = !1;
          o.innerHTML = "﻿";
          h.collapse(e);
          s = h.parentElement();
          t.isAncestorOrSelf(f, s) || (s = f);
          do
            w
              ? s.insertBefore(o, o.previousSibling)
              : (s.appendChild(o), (w = !0)),
              h.moveToElementText(o);
          while ((p = h.compareEndPoints(b, n)) > 0 && o.previousSibling);
          a = o.nextSibling;
          p == -1 && r(a)
            ? (h.setEndPoint(e ? "EndToStart" : "EndToEnd", n),
              t.remove(o),
              (c = [a, h.text.length]))
            : ((l = !e && o.previousSibling),
              (v = e && o.nextSibling),
              r(v)
                ? (c = [v, 0])
                : r(l)
                ? (c = [l, l.length])
                : ((y = u(o)),
                  (c =
                    s.nextSibling && y == s.childNodes.length - 1
                      ? [s.nextSibling, 0]
                      : [s, y])),
              t.remove(o));
          i[e ? "setStart" : "setEnd"].apply(i, c);
        }
        var f,
          y,
          p,
          w,
          it,
          rt,
          ut,
          h,
          i,
          l = window.kendo,
          o = l.Class,
          ot = n.extend,
          e = l.ui.editor,
          b = l.support.browser,
          t = e.Dom,
          u = t.findNodeIndex,
          r = t.isDataNode,
          a = t.findClosestAncestor,
          k = t.getNodeLength,
          c = t.normalize,
          v = {
            selectionFromWindow: function (n) {
              return "getSelection" in n ? n.getSelection() : new y(n.document);
            },
            selectionFromRange: function (n) {
              var t = i.documentFromRange(n);
              return v.selectionFromDocument(t);
            },
            selectionFromDocument: function (n) {
              return v.selectionFromWindow(t.windowFromDocument(n));
            },
          },
          s = o.extend({
            init: function (t) {
              n.extend(this, {
                ownerDocument: t,
                startContainer: t,
                endContainer: t,
                commonAncestorContainer: t,
                startOffset: 0,
                endOffset: 0,
                collapsed: !0,
              });
            },
            setStart: function (n, t) {
              this.startContainer = n;
              this.startOffset = t;
              g(this);
              d(this, !0);
            },
            setEnd: function (n, t) {
              this.endContainer = n;
              this.endOffset = t;
              g(this);
              d(this, !1);
            },
            setStartBefore: function (n) {
              this.setStart(n.parentNode, u(n));
            },
            setStartAfter: function (n) {
              this.setStart(n.parentNode, u(n) + 1);
            },
            setEndBefore: function (n) {
              this.setEnd(n.parentNode, u(n));
            },
            setEndAfter: function (n) {
              this.setEnd(n.parentNode, u(n) + 1);
            },
            selectNode: function (n) {
              this.setStartBefore(n);
              this.setEndAfter(n);
            },
            selectNodeContents: function (n) {
              this.setStart(n, 0);
              this.setEnd(
                n,
                n[1 === n.nodeType ? "childNodes" : "nodeValue"].length
              );
            },
            collapse: function (n) {
              var t = this;
              n
                ? t.setEnd(t.startContainer, t.startOffset)
                : t.setStart(t.endContainer, t.endOffset);
            },
            deleteContents: function () {
              var n = this,
                t = n.cloneRange();
              n.startContainer != n.commonAncestorContainer &&
                n.setStartAfter(a(n.commonAncestorContainer, n.startContainer));
              n.collapse(!0),
                (function i(n) {
                  for (; n.next(); )
                    n.hasPartialSubtree()
                      ? i(n.getSubtreeIterator())
                      : n.remove();
                })(new f(t));
            },
            cloneContents: function () {
              var n = i.documentFromRange(this);
              return (function t(i) {
                for (var r, u = n.createDocumentFragment(); (r = i.next()); )
                  (r = r.cloneNode(!i.hasPartialSubtree())),
                    i.hasPartialSubtree() &&
                      r.appendChild(t(i.getSubtreeIterator())),
                    u.appendChild(r);
                return u;
              })(new f(this));
            },
            extractContents: function () {
              var t,
                n = this,
                r = n.cloneRange();
              return (
                n.startContainer != n.commonAncestorContainer &&
                  n.setStartAfter(
                    a(n.commonAncestorContainer, n.startContainer)
                  ),
                n.collapse(!0),
                (t = i.documentFromRange(n)),
                (function u(i) {
                  for (var r, f = t.createDocumentFragment(); (r = i.next()); )
                    i.hasPartialSubtree()
                      ? ((r = r.cloneNode(!1)),
                        r.appendChild(u(i.getSubtreeIterator())))
                      : i.remove(n.originalRange),
                      f.appendChild(r);
                  return f;
                })(new f(r))
              );
            },
            insertNode: function (n) {
              var i = this;
              r(i.startContainer)
                ? (i.startOffset != i.startContainer.nodeValue.length &&
                    t.splitDataNode(i.startContainer, i.startOffset),
                  t.insertAfter(n, i.startContainer))
                : t.insertAt(i.startContainer, n, i.startOffset);
              i.setStart(i.startContainer, i.startOffset);
            },
            cloneRange: function () {
              return n.extend(new s(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 n = this.startContainer.nodeName,
                t = this.endContainer.nodeName;
              return (
                ("#text" == n ? this.startContainer.nodeValue : n) +
                "(" +
                this.startOffset +
                ") : " +
                ("#text" == t ? this.endContainer.nodeValue : t) +
                "(" +
                this.endOffset +
                ")"
              );
            },
          });
        s.fromNode = function (n) {
          return new s(n.ownerDocument);
        };
        f = o.extend({
          init: function (t) {
            if (
              (n.extend(this, {
                range: t,
                _current: null,
                _next: null,
                _end: null,
              }),
              !t.collapsed)
            ) {
              var i = t.commonAncestorContainer;
              this._next =
                t.startContainer != i || r(t.startContainer)
                  ? a(i, t.startContainer)
                  : t.startContainer.childNodes[t.startOffset];
              this._end =
                t.endContainer != i || r(t.endContainer)
                  ? a(i, t.endContainer).nextSibling
                  : t.endContainer.childNodes[t.endOffset];
            }
          },
          hasNext: function () {
            return !!this._next;
          },
          next: function () {
            var n = this,
              t = (n._current = n._next);
            return (
              (n._next =
                n._current && n._current.nextSibling != n._end
                  ? n._current.nextSibling
                  : null),
              r(n._current) &&
                (n.range.endContainer == n._current &&
                  ((t = t.cloneNode(!0)),
                  t.deleteData(
                    n.range.endOffset,
                    t.length - n.range.endOffset
                  )),
                n.range.startContainer == n._current &&
                  ((t = t.cloneNode(!0)),
                  t.deleteData(0, n.range.startOffset))),
              t
            );
          },
          traverse: function (n) {
            function r() {
              return (
                (t._current = t._next),
                (t._next =
                  t._current && t._current.nextSibling != t._end
                    ? t._current.nextSibling
                    : null),
                t._current
              );
            }
            for (var i, t = this; (i = r()); )
              t.hasPartialSubtree() ? t.getSubtreeIterator().traverse(n) : n(i);
            return i;
          },
          remove: function (n) {
            var e,
              s,
              o,
              f,
              h,
              i = this,
              c = i.range.startContainer == i._current,
              l = i.range.endContainer == i._current;
            r(i._current) && (c || l)
              ? ((e = c ? i.range.startOffset : 0),
                (s = l ? i.range.endOffset : i._current.length),
                (o = s - e),
                n &&
                  (c || l) &&
                  (i._current == n.startContainer &&
                    e <= n.startOffset &&
                    (n.startOffset -= o),
                  i._current == n.endContainer &&
                    s <= n.endOffset &&
                    (n.endOffset -= o)),
                i._current.deleteData(e, o))
              : ((f = i._current.parentNode),
                !n ||
                  (i.range.startContainer != f && i.range.endContainer != f) ||
                  ((h = u(i._current)),
                  f == n.startContainer &&
                    h <= n.startOffset &&
                    (n.startOffset -= 1),
                  f == n.endContainer && h < n.endOffset && (n.endOffset -= 1)),
                t.remove(i._current));
          },
          hasPartialSubtree: function () {
            return (
              !r(this._current) &&
              (t.isAncestorOrSelf(this._current, this.range.startContainer) ||
                t.isAncestorOrSelf(this._current, this.range.endContainer))
            );
          },
          getSubtreeIterator: function () {
            return new f(this.getSubRange());
          },
          getSubRange: function () {
            var n = this,
              i = n.range.cloneRange();
            return (
              i.selectNodeContents(n._current),
              t.isAncestorOrSelf(n._current, n.range.startContainer) &&
                i.setStart(n.range.startContainer, n.range.startOffset),
              t.isAncestorOrSelf(n._current, n.range.endContainer) &&
                i.setEnd(n.range.endContainer, n.range.endOffset),
              i
            );
          },
        });
        y = o.extend({
          init: function (n) {
            this.ownerDocument = n;
            this.rangeCount = 1;
          },
          addRange: function (n) {
            var t = this.ownerDocument.body.createTextRange();
            nt(t, n, !1);
            nt(t, n, !0);
            t.select();
          },
          removeAllRanges: function () {
            var n = this.ownerDocument.selection;
            "None" != n.type && n.empty();
          },
          getRangeAt: function () {
            var f,
              l,
              o,
              t,
              i,
              e,
              h,
              c,
              n = new s(this.ownerDocument),
              a = this.ownerDocument.selection;
            try {
              if (
                ((f = a.createRange()),
                (l = f.item ? f.item(0) : f.parentElement()),
                l.ownerDocument != this.ownerDocument)
              )
                return n;
            } catch (v) {
              return n;
            }
            if ("Control" == a.type) n.selectNode(f.item(0));
            else if (
              ((o = et(f)),
              tt(f, n, o, !0),
              tt(f, n, o, !1),
              9 == n.startContainer.nodeType &&
                n.setStart(n.endContainer, n.startOffset),
              9 == n.endContainer.nodeType &&
                n.setEnd(n.startContainer, n.endOffset),
              0 === f.compareEndPoints("StartToEnd", f) && n.collapse(!1),
              (t = n.startContainer),
              (i = n.endContainer),
              (e = this.ownerDocument.body),
              !(
                n.collapsed ||
                0 !== n.startOffset ||
                n.endOffset != k(n.endContainer) ||
                (t == i && r(t) && t.parentNode == e)
              ))
            ) {
              for (
                h = !1, c = !1;
                0 === u(t) && t == t.parentNode.firstChild && t != e;

              )
                (t = t.parentNode), (h = !0);
              for (
                ;
                u(i) == k(i.parentNode) - 1 &&
                i == i.parentNode.lastChild &&
                i != e;

              )
                (i = i.parentNode), (c = !0);
              t == e &&
                i == e &&
                h &&
                c &&
                (n.setStart(t, 0), n.setEnd(i, k(e)));
            }
            return n;
          },
        });
        p = o.extend({
          init: function (n) {
            this.enumerate = function () {
              function i(n) {
                if (
                  t.is(n, "img") ||
                  (3 == n.nodeType &&
                    (!t.isEmptyspace(n) || "﻿" == n.nodeValue))
                )
                  r.push(n);
                else for (n = n.firstChild; n; ) i(n), (n = n.nextSibling);
              }
              var r = [];
              return new f(n).traverse(i), r;
            };
          },
        });
        w = f.extend({
          hasPartialSubtree: function () {
            var n = e.Immutables && e.Immutables.immutable;
            return n && !n(this._current) && f.fn.hasPartialSubtree.call(this);
          },
          getSubtreeIterator: function () {
            return new w(this.getSubRange());
          },
        });
        it = o.extend({
          init: function (n) {
            this.enumerate = function () {
              function i(n) {
                if (u && !u(n))
                  if (
                    t.is(n, "img") ||
                    (3 == n.nodeType &&
                      (!t.isEmptyspace(n) || "﻿" == n.nodeValue))
                  )
                    r.push(n);
                  else for (n = n.firstChild; n; ) i(n), (n = n.nextSibling);
              }
              var r = [],
                u = e.Immutables && e.Immutables.immutable;
              return new w(n).traverse(i), r;
            };
          },
        });
        rt = o.extend({
          init: function (n, r, u) {
            var f = this;
            f.range = n;
            f.rootNode = i.documentFromRange(n);
            f.body = r || f.getEditable(n);
            "body" != t.name(f.body) && (f.rootNode = f.body);
            f.startContainer = f.nodeToPath(n.startContainer);
            f.endContainer = f.nodeToPath(n.endContainer);
            f.startOffset = f.offset(n.startContainer, n.startOffset);
            f.endOffset = f.offset(n.endContainer, n.endOffset);
            f.immutables = u && u.immutables;
            f.immutables &&
              (f.serializedImmutables = e.Immutables.removeImmutables(f.body));
            f.html = f.body.innerHTML;
            f.immutables &&
              !f.serializedImmutables.empty &&
              e.Immutables.restoreImmutables(f.body, f.serializedImmutables);
          },
          index: function (n) {
            for (var t, i = 0, r = n.nodeType; (n = n.previousSibling); )
              (t = n.nodeType), (3 == t && r == t) || i++, (r = t);
            return i;
          },
          getEditable: function (n) {
            for (
              var t = n.commonAncestorContainer;
              t &&
              (3 == t.nodeType ||
                (t.attributes &&
                  (!t.attributes.contentEditable ||
                    "false" ==
                      t.attributes.contentEditable.nodeValue.toLowerCase())));

            )
              t = t.parentNode;
            return t;
          },
          restoreHtml: function () {
            var n = this;
            t.removeChildren(n.body);
            n.body.innerHTML = n.html;
            n.immutables &&
              !n.serializedImmutables.empty &&
              e.Immutables.restoreImmutables(n.body, n.serializedImmutables);
          },
          offset: function (n, t) {
            if (3 == n.nodeType)
              for (; (n = n.previousSibling) && 3 == n.nodeType; )
                t += n.nodeValue.length;
            return t;
          },
          nodeToPath: function (n) {
            for (var t = []; n != this.rootNode; )
              t.push(this.index(n)), (n = n.parentNode);
            return t;
          },
          toRangePoint: function (n, t, i, r) {
            for (var u = this.rootNode, e = i.length, f = r; e--; )
              u = u.childNodes[i[e]];
            for (; u && 3 == u.nodeType && u.nodeValue.length < f; )
              (f -= u.nodeValue.length), (u = u.nextSibling);
            u && f >= 0 && n[t ? "setStart" : "setEnd"](u, f);
          },
          toRange: function () {
            var n = this,
              t = n.range.cloneRange();
            return (
              n.toRangePoint(t, !0, n.startContainer, n.startOffset),
              n.toRangePoint(t, !1, n.endContainer, n.endOffset),
              t
            );
          },
        });
        ut = o.extend({
          init: function () {
            this.caret = null;
          },
          addCaret: function (n) {
            var u = this,
              r = (u.caret = t.create(i.documentFromRange(n), "span", {
                className: "k-marker",
              }));
            return (
              n.insertNode(r),
              t.stripBomNode(r.previousSibling),
              t.stripBomNode(r.nextSibling),
              n.selectNode(r),
              r
            );
          },
          removeCaret: function (n) {
            var f,
              h,
              e,
              o,
              s = this,
              i = s.caret.previousSibling,
              l = 0;
            i && (l = r(i) ? i.nodeValue.length : u(i));
            f = s.caret.parentNode;
            h = i ? u(i) : 0;
            t.remove(s.caret);
            c(f);
            e = f.childNodes[h];
            r(e)
              ? n.setStart(e, l)
              : e
              ? ((o = t.lastTextNode(e)),
                o
                  ? n.setStart(o, o.nodeValue.length)
                  : n[i ? "setStartAfter" : "setStartBefore"](e))
              : (b.msie ||
                  f.innerHTML ||
                  (f.innerHTML = '<br _moz_dirty="" />'),
                n.selectNodeContents(f));
            n.collapse(!0);
          },
          add: function (n, r) {
            var f,
              e,
              u = this,
              s = n.collapsed && !i.isExpandable(n),
              o = i.documentFromRange(n);
            return (
              r && n.collapsed && (u.addCaret(n), (n = i.expand(n))),
              (f = n.cloneRange()),
              f.collapse(!1),
              (u.end = t.create(o, "span", { className: "k-marker" })),
              f.insertNode(u.end),
              (f = n.cloneRange()),
              f.collapse(!0),
              (u.start = u.end.cloneNode(!0)),
              f.insertNode(u.start),
              u._removeDeadMarkers(u.start, u.end),
              s &&
                ((e = o.createTextNode("﻿")),
                t.insertAfter(e.cloneNode(), u.start),
                t.insertBefore(e, u.end)),
              c(n.commonAncestorContainer),
              n.setStartBefore(u.start),
              n.setEndAfter(u.end),
              n
            );
          },
          _removeDeadMarkers: function (n, i) {
            n.previousSibling &&
              "﻿" == n.previousSibling.nodeValue &&
              t.remove(n.previousSibling);
            i.nextSibling &&
              "﻿" == i.nextSibling.nodeValue &&
              t.remove(i.nextSibling);
          },
          _normalizedIndex: function (n) {
            for (var i = u(n), t = n; t.previousSibling; )
              3 == t.nodeType && 3 == t.previousSibling.nodeType && i--,
                (t = t.previousSibling);
            return i;
          },
          remove: function (n) {
            var y,
              p,
              k,
              s,
              e,
              h,
              o,
              l,
              a,
              v,
              w,
              b,
              f = this,
              i = f.start,
              u = f.end;
            for (c(n.commonAncestorContainer); !i.nextSibling && i.parentNode; )
              i = i.parentNode;
            for (; !u.previousSibling && u.parentNode; ) u = u.parentNode;
            if (
              ((y =
                i.previousSibling &&
                3 == i.previousSibling.nodeType &&
                i.nextSibling &&
                3 == i.nextSibling.nodeType),
              (p =
                u.previousSibling &&
                3 == u.previousSibling.nodeType &&
                u.nextSibling &&
                3 == u.nextSibling.nodeType),
              (k = y && p),
              (i = i.nextSibling),
              (u = u.previousSibling),
              (s = i === u && t.isBom(i)),
              s && i.length > 1 && (i.nodeValue = i.nodeValue.charAt(0)),
              (e = s),
              (h = !1),
              i == f.end &&
                ((h = !!f.start.previousSibling),
                (i = u = f.start.previousSibling || f.end.nextSibling),
                (e = !0)),
              t.remove(f.start),
              t.remove(f.end),
              !i || !u)
            )
              return (
                n.selectNodeContents(n.commonAncestorContainer),
                void n.collapse(!0)
              );
            if (
              ((o = e ? (r(i) ? i.nodeValue.length : i.childNodes.length) : 0),
              (l = r(u) ? u.nodeValue.length : u.childNodes.length),
              3 == i.nodeType)
            )
              for (; i.previousSibling && 3 == i.previousSibling.nodeType; )
                (i = i.previousSibling), (o += i.nodeValue.length);
            if (3 == u.nodeType)
              for (; u.previousSibling && 3 == u.previousSibling.nodeType; )
                (u = u.previousSibling), (l += u.nodeValue.length);
            a = i.parentNode;
            v = u.parentNode;
            w = this._normalizedIndex(i);
            b = this._normalizedIndex(u);
            c(a);
            3 == i.nodeType && (i = a.childNodes[w]);
            c(v);
            3 == u.nodeType && (u = v.childNodes[b]);
            e
              ? (3 == i.nodeType
                  ? n.setStart(i, o)
                  : n[h ? "setStartAfter" : "setStartBefore"](i),
                n.collapse(!0))
              : (3 == i.nodeType ? n.setStart(i, o) : n.setStartBefore(i),
                3 == u.nodeType ? n.setEnd(u, l) : n.setEndAfter(u));
            f.caret && f.removeCaret(n);
          },
        });
        h = /[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/;
        i = {
          nodes: function (n) {
            var r = i.textNodes(n);
            return (
              r.length ||
                (n.selectNodeContents(n.commonAncestorContainer),
                (r = i.textNodes(n)),
                r.length ||
                  (r = t.significantChildNodes(n.commonAncestorContainer))),
              r
            );
          },
          textNodes: function (n) {
            return new p(n).enumerate();
          },
          editableTextNodes: function (n) {
            var t = [],
              i = e.Immutables && e.Immutables.immutableParent;
            return (
              i && !i(n.commonAncestorContainer) && (t = new it(n).enumerate()),
              t
            );
          },
          documentFromRange: function (n) {
            var t = n.startContainer;
            return 9 == t.nodeType ? t : t.ownerDocument;
          },
          createRange: function (n) {
            return b.msie && b.version < 9 ? new s(n) : n.createRange();
          },
          selectRange: function (n) {
            var t,
              r = i.image(n);
            r && (n.setStartAfter(r), n.setEndAfter(r));
            t = v.selectionFromRange(n);
            t.removeAllRanges();
            t.addRange(n);
          },
          stringify: function (n) {
            return l.format(
              "{0}:{1} - {2}:{3}",
              t.name(n.startContainer),
              n.startOffset,
              t.name(n.endContainer),
              n.endOffset
            );
          },
          split: function (n, i, r) {
            function u(u) {
              var f,
                e = n.cloneRange();
              e.collapse(u);
              e[u ? "setStartBefore" : "setEndAfter"](i);
              f = e.extractContents();
              r && (f = t.trim(f));
              t[u ? "insertBefore" : "insertAfter"](f, i);
            }
            u(!0);
            u(!1);
          },
          mapAll: function (t, i) {
            var r = [];
            return (
              new f(t).traverse(function (t) {
                var u = i(t);
                u && n.inArray(u, r) < 0 && r.push(u);
              }),
              r
            );
          },
          getAll: function (n, r) {
            var u = r;
            return (
              "string" == typeof r &&
                (r = function (n) {
                  return t.is(n, u);
                }),
              i.mapAll(n, function (n) {
                if (r(n)) return n;
              })
            );
          },
          getMarkers: function (n) {
            return i.getAll(n, function (n) {
              return "k-marker" == n.className;
            });
          },
          image: function (n) {
            var t = i.getAll(n, "img");
            if (1 == t.length) return t[0];
          },
          isStartOf: function (n, i) {
            var r, u, f;
            if (0 !== n.startOffset) return !1;
            for (
              r = n.cloneRange();
              0 === r.startOffset && r.startContainer != i;

            ) {
              for (
                u = t.findNodeIndex(r.startContainer),
                  f = r.startContainer.parentNode;
                u > 0 && f[u - 1] && t.insignificant(f[u - 1]);

              )
                u--;
              r.setStart(f, u);
            }
            return 0 === r.startOffset && r.startContainer == i;
          },
          isEndOf: function (n, i) {
            function o(n) {
              t.insignificant(n) ||
                (t.isDataNode(n) && /^[\ufeff]*$/.test(n.nodeValue)) ||
                e.push(n);
            }
            var u,
              e,
              r = n.cloneRange();
            return (
              r.collapse(!1),
              (u = r.startContainer),
              t.isDataNode(u) &&
                r.startOffset == t.getNodeLength(u) &&
                (r.setStart(u.parentNode, t.findNodeIndex(u) + 1),
                r.collapse(!0)),
              r.setEnd(i, t.getNodeLength(i)),
              (e = []),
              new f(r).traverse(o),
              !e.length
            );
          },
          wrapSelectedElements: function (n) {
            function i(n, i) {
              var r,
                u = t.getNodeLength(i);
              if (n == u) return !0;
              for (r = n; r < u; r++)
                if (!t.insignificant(i.childNodes[r])) return !1;
              return !0;
            }
            for (
              var r = t.editableParent(n.startContainer),
                u = t.editableParent(n.endContainer);
              0 === n.startOffset && n.startContainer != r;

            )
              n.setStart(
                n.startContainer.parentNode,
                t.findNodeIndex(n.startContainer)
              );
            for (; i(n.endOffset, n.endContainer) && n.endContainer != u; )
              n.setEnd(
                n.endContainer.parentNode,
                t.findNodeIndex(n.endContainer) + 1
              );
            return n;
          },
          expand: function (n) {
            var f,
              e,
              i,
              u,
              t = n.cloneRange(),
              o =
                t.startContainer.childNodes[
                  0 === t.startOffset ? 0 : t.startOffset - 1
                ],
              s = t.endContainer.childNodes[t.endOffset];
            return r(o) && r(s)
              ? ((f = o.nodeValue),
                (e = s.nodeValue),
                f && e
                  ? ((i = f.split("").reverse().join("").search(h)),
                    (u = e.search(h)),
                    i && u
                      ? ((u = u == -1 ? e.length : u),
                        (i = i == -1 ? 0 : f.length - i),
                        t.setStart(o, i),
                        t.setEnd(s, u),
                        t)
                      : t)
                  : t)
              : t;
          },
          isExpandable: function (n) {
            var t,
              r,
              u,
              f,
              e,
              o,
              s = n.startContainer,
              c = i.documentFromRange(n);
            return (
              s != c &&
              s != c.body &&
              ((t = n.cloneRange()),
              !!(r = s.nodeValue) &&
                ((u = r.substring(0, t.startOffset)),
                (f = r.substring(t.startOffset)),
                (e = 0),
                (o = 0),
                u && (e = u.split("").reverse().join("").search(h)),
                f && (o = f.search(h)),
                e && o))
            );
          },
        };
        ot(e, {
          SelectionUtils: v,
          W3CRange: s,
          RangeIterator: f,
          W3CSelection: y,
          RangeEnumerator: p,
          RestorePoint: rt,
          Marker: ut,
          RangeUtils: i,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/immutables.min", ["editor/range.min"], n);
  })(
    function () {
      !(function (n, t) {
        var f = window.kendo,
          p = f.Class,
          o = f.ui.editor,
          i = o.Dom,
          w = f.template,
          h = o.RangeUtils,
          l = ["ul", "ol", "tbody", "thead", "table"],
          e = "k-immutable",
          a = "[" + e + "]",
          b = "[contenteditable='false']",
          k = function (t) {
            return n(t).is("body,.k-editor");
          },
          v = function (n) {
            return (
              n.getAttribute && "false" == n.getAttribute("contenteditable")
            );
          },
          r = function (n) {
            return i.closestBy(n, v, k);
          },
          d = function (n) {
            var t = r(n.startContainer),
              i = r(n.endContainer);
            (t || i) && (t && n.setStartBefore(t), i && n.setEndAfter(i));
          },
          c = function (n) {
            if (r(n.commonAncestorContainer)) return !0;
            if (r(n.startContainer) || r(n.endContainer)) {
              var t = h.editableTextNodes(n);
              if (0 === t.length) return !0;
            }
            return !1;
          },
          y = function (n) {
            for (
              var i = "",
                r =
                  "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                t = n || 10;
              t > 0;
              --t
            )
              i += r.charAt(Math.round(Math.random() * (r.length - 1)));
            return i;
          },
          g = function (t) {
            var r,
              u,
              o,
              f = { empty: !0 };
            return (
              n(t)
                .find(b)
                .each(function (t, s) {
                  r = i.name(s);
                  u = y();
                  o = "<" + r + " " + e + "='" + u + "'></" + r + ">";
                  f[u] = { node: s, style: n(s).attr("style") };
                  f.empty = !1;
                  n(s).replaceWith(o);
                }),
              f
            );
          },
          nt = function (t, i) {
            var u, r;
            n(t)
              .find(a)
              .each(function (t, f) {
                u = f.getAttribute(e);
                r = i[u];
                n(f).replaceWith(r.node);
                r.style != n(r.node).attr("style") &&
                  n(r.node).removeAttr("style").attr("style", r.style);
              });
          },
          tt = function (n) {
            var t = f.keys;
            return n === t.BACKSPACE || n == t.DELETE;
          },
          s = function (n) {
            var i = n ? n.options : t;
            i && i.finder && i.finder._initOptions({ immutables: !0 });
          },
          u = p.extend({
            init: function (t) {
              this.editor = t;
              this.serializedImmutables = {};
              this.options = n.extend(
                {},
                t && t.options && t.options.immutables
              );
              var i = t.toolbar.tools;
              s(i.justifyLeft);
              s(i.justifyCenter);
              s(i.justifyRight);
              s(i.justifyFull);
            },
            serialize: function (n) {
              var i,
                t = this._toHtml(n);
              return (
                t.indexOf(e) === -1
                  ? ((i = this.randomId()),
                    (t = t.replace(/>/, " " + e + '="' + i + '">')))
                  : (i = t.match(/k-immutable\s*=\s*['"](.*)['"]/)[1]),
                (this.serializedImmutables[i] = n),
                t
              );
            },
            _toHtml: function (n) {
              var t,
                r = this.options.serialization,
                u = typeof r;
              switch (u) {
                case "string":
                  return w(r)(n);
                case "function":
                  return r(n);
                default:
                  return (t = i.name(n)), "<" + t + "></" + t + ">";
              }
            },
            deserialize: function (t) {
              var i = this,
                r = this.options.deserialization;
              n(a, t).each(function () {
                var u = this.getAttribute(e),
                  t = i.serializedImmutables[u];
                f.isFunction(r) && r(this, t);
                n(this).replaceWith(t);
              });
              i.serializedImmutables = {};
            },
            randomId: function (n) {
              return y(n);
            },
            keydown: function (n, t) {
              var i = tt(n.keyCode),
                r =
                  (i && this._cancelDeleting(n, t)) ||
                  (!i && this._cancelTyping(n, t));
              if (r) return n.preventDefault(), !0;
            },
            _cancelTyping: function (n, t) {
              var r = this.editor,
                i = r.keyboard;
              return (
                t.collapsed && !i.typingInProgress && i.isTypingKey(n) && c(t)
              );
            },
            _cancelDeleting: function (n, t) {
              var u,
                r,
                e,
                o,
                s = f.keys,
                h = n.keyCode === s.BACKSPACE,
                a = n.keyCode == s.DELETE;
              if (!h && !a) return !1;
              if (((u = !1), t.collapsed)) {
                if (c(t)) return !0;
                if (
                  ((r = this.nextImmutable(t, a)),
                  r &&
                    h &&
                    ((e = i.closest(t.commonAncestorContainer, "li")),
                    e && ((o = i.closest(r, "li")), o && o !== e)))
                )
                  return u;
                if (r && !i.tableCell(r)) {
                  if (
                    i.parentOfType(r, l) ===
                    i.parentOfType(t.commonAncestorContainer, l)
                  ) {
                    for (; r && 1 == r.parentNode.childNodes.length; )
                      r = r.parentNode;
                    if (i.tableCell(r)) return u;
                    this._removeImmutable(r, t);
                  }
                  u = !0;
                }
              }
              return u;
            },
            nextImmutable: function (n, t) {
              var u,
                f = n.commonAncestorContainer;
              if (
                i.isBom(f) ||
                (t && h.isEndOf(n, f)) ||
                (!t && h.isStartOf(n, f))
              ) {
                if (((u = this._nextNode(f, t)), u && i.isBlock(u) && !r(u)))
                  for (
                    ;
                    u &&
                    u.children &&
                    u.children[t ? 0 : u.children.length - 1];

                  )
                    u = u.children[t ? 0 : u.children.length - 1];
                return r(u);
              }
            },
            _removeImmutable: function (n, t) {
              var r = this.editor,
                u = new o.RestorePoint(t, r.body);
              i.remove(n);
              o._finishUpdate(r, u);
            },
            _nextNode: function (n, t) {
              for (
                var r, f = t ? "nextSibling" : "previousSibling", u = n;
                u && !r;

              )
                (r = u[f]),
                  r &&
                    i.isDataNode(r) &&
                    /^\s|[\ufeff]$/.test(r.nodeValue) &&
                    ((u = r), (r = u[f])),
                  r || (u = u.parentNode);
              return r;
            },
          });
        u.immutable = v;
        u.immutableParent = r;
        u.expandImmutablesIn = d;
        u.immutablesContext = c;
        u.toolsToBeUpdated = [
          "bold",
          "italic",
          "underline",
          "strikethrough",
          "superscript",
          "subscript",
          "forecolor",
          "backcolor",
          "fontname",
          "fontsize",
          "createlink",
          "unlink",
          "autolink",
          "addcolumnleft",
          "addcolumnright",
          "addrowabove",
          "addrowbelow",
          "deleterow",
          "deletecolumn",
          "mergecells",
          "formatting",
          "cleanformatting",
        ];
        u.removeImmutables = g;
        u.restoreImmutables = nt;
        o.Immutables = u;
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/command.min", ["editor/immutables.min"], n);
  })(
    function () {
      !(function (n) {
        function s(n, t) {
          var i = (n.selectionRestorePoint = new r(n.getRange(), n.body)),
            u = new o(t, i);
          return (u.editor = n), n.undoRedoStack.push(u), i;
        }
        var t = window.kendo,
          u = t.Class,
          i = t.ui.editor,
          f = i.Dom,
          r = i.RestorePoint,
          h = i.Marker,
          e = n.extend,
          c = u.extend({
            init: function (n) {
              this.options = n;
              this.restorePoint = new r(n.range, n.body, {
                immutables: n.immutables,
              });
              this.marker = new h();
              this.formatter = n.formatter;
            },
            getRange: function () {
              return this.restorePoint.toRange();
            },
            lockRange: function (n) {
              return this.marker.add(this.getRange(), n);
            },
            releaseRange: function (n) {
              this.marker.remove(n);
              this.editor.selectRange(n);
            },
            undo: function () {
              var n = this.restorePoint;
              n.restoreHtml();
              this.editor.selectRange(n.toRange());
            },
            redo: function () {
              this.exec();
            },
            createDialog: function (i, r) {
              var u = this.editor;
              return n(i)
                .appendTo(document.body)
                .kendoWindow(e({}, u.options.dialogOptions, r))
                .closest(".k-window")
                .toggleClass("k-rtl", t.support.isRtl(u.wrapper))
                .end();
            },
            exec: function () {
              var n = this.lockRange(!0);
              this.formatter.editor = this.editor;
              this.formatter.toggle(n);
              this.releaseRange(n);
            },
            immutables: function () {
              return this.editor && this.editor.options.immutables;
            },
            expandImmutablesIn: function (n) {
              this.immutables() &&
                (t.ui.editor.Immutables.expandImmutablesIn(n),
                (this.restorePoint = new r(n, this.editor.body)));
            },
          }),
          o = u.extend({
            init: function (n, t) {
              this.body = n.body;
              this.startRestorePoint = n;
              this.endRestorePoint = t;
            },
            redo: function () {
              f.removeChildren(this.body);
              this.body.innerHTML = this.endRestorePoint.html;
              this.editor.selectRange(this.endRestorePoint.toRange());
            },
            undo: function () {
              f.removeChildren(this.body);
              this.body.innerHTML = this.startRestorePoint.html;
              this.editor.selectRange(this.startRestorePoint.toRange());
            },
          });
        e(i, { _finishUpdate: s, Command: c, GenericCommand: o });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/toolbar.min", ["editor/range.min"], n);
  })(
    function () {
      !(function (n, t) {
        var l,
          i = window.kendo,
          a = i.ui,
          u = a.editor,
          c = a.Widget,
          s = n.extend,
          h = n.proxy,
          r = i.keys,
          f = ".kendoEditor",
          v = u.EditorUtils,
          w = u.ToolTemplate,
          b = u.Tool,
          y = i._outerWidth,
          k = i._outerHeight,
          e = "overflowAnchor",
          o =
            ".k-tool-group:visible a.k-tool:not(.k-state-disabled),.k-tool.k-overflow-anchor:visible,.k-tool-group:visible .k-widget.k-colorpicker,.k-tool-group:visible .k-selectbox,.k-tool-group:visible .k-dropdown,.k-tool-group:visible .k-combobox .k-input",
          p = {
            "k-i-sup-script": "superscript",
            "k-i-sub-script": "subscript",
            "k-i-align-left": "justifyLeft",
            "k-i-align-center": "justifyCenter",
            "k-i-align-right": "justifyRight",
            "k-i-align-justify": "justifyFull",
            "k-i-list-unordered": "insertUnorderedList",
            "k-i-list-ordered": "insertOrderedList",
            "k-i-login": "import",
            "k-i-indent-increase": "indent",
            "k-i-indent-decrease": "outdent",
            "k-i-link-horizontal": "createLink",
            "k-i-unlink-horizontal": "unlink",
            "k-i-image": "insertImage",
            "k-i-file-add": "insertFile",
            "k-i-html": "viewHtml",
            "k-i-foreground-color": "foreColor",
            "k-i-paint": "backColor",
            "k-i-table-insert": "createTable",
            "k-i-table-column-insert-left": "addColumnLeft",
            "k-i-table-column-insert-right": "addColumnRight",
            "k-i-table-row-insert-above": "addRowAbove",
            "k-i-table-row-insert-below": "addRowBelow",
            "k-i-table-row-delete": "deleteRow",
            "k-i-table-column-delete": "deleteColumn",
            "k-i-table-properties": "tableWizard",
            "k-i-table-wizard": "tableWizardInsert",
            "k-i-clear-css": "cleanFormatting",
            "k-i-cells-merge-horizontally": "mergeCellsHorizontally",
            "k-i-cells-merge-vertically": "mergeCellsVertically",
            "k-i-cell-split-horizontally": "splitCellHorizontally",
            "k-i-cell-split-vertically": "splitCellVertically",
          },
          d = b.extend({
            initialize: function (t, i) {
              t.attr({ unselectable: "on" });
              var r = i.editor.toolbar;
              t.attr("aria-controls", i.editor.element.attr("id")).on(
                "click",
                n.proxy(function () {
                  this.overflowPopup.toggle();
                }, r)
              );
            },
            options: { name: e },
            command: n.noop,
            update: n.noop,
            destroy: n.noop,
          });
        v.registerTool(
          e,
          new d({
            key: "",
            ctrl: !0,
            template: new w({ template: v.overflowAnchorTemplate }),
          })
        );
        l = c.extend({
          init: function (n, t) {
            var r = this;
            t = s({}, t, { name: "EditorToolbar" });
            c.fn.init.call(r, n, t);
            t.popup && r._initPopup();
            t.resizable &&
              t.resizable.toolbar &&
              ((r._resizeHandler = i.onResize(function () {
                r.resize(!0);
              })),
              r.element.addClass("k-toolbar-resizable"));
          },
          events: ["execute"],
          groups: {
            basic: ["bold", "italic", "underline", "strikethrough"],
            scripts: ["subscript", "superscript"],
            alignment: [
              "justifyLeft",
              "justifyCenter",
              "justifyRight",
              "justifyFull",
            ],
            links: ["insertImage", "insertFile", "createLink", "unlink"],
            lists: [
              "insertUnorderedList",
              "insertOrderedList",
              "indent",
              "outdent",
            ],
            tablesInsert: ["createTable"],
            tablesAddDelete: [
              "addColumnLeft",
              "addColumnRight",
              "addRowAbove",
              "addRowBelow",
              "deleteRow",
              "deleteColumn",
            ],
            tablesMerge: [
              "mergeCellsHorizontally",
              "mergeCellsVertically",
              "splitCellHorizontally",
              "splitCellVertically",
            ],
            advanced: [
              "viewHtml",
              "cleanFormatting",
              "print",
              "pdf",
              "exportAs",
              "import",
            ],
            fonts: ["fontName", "fontSize"],
            colors: ["foreColor", "backColor"],
          },
          overflowFlaseTools: [
            "formatting",
            "fontName",
            "fontSize",
            "foreColor",
            "backColor",
            "insertHtml",
          ],
          _initPopup: function () {
            var t = this;
            this.window = n(this.element)
              .wrap("<div class='editorToolbarWindow k-header' />")
              .parent()
              .prepend(
                "<button class='k-button k-bare k-editortoolbar-dragHandle'><span class='k-icon k-i-handler-drag' /></button>"
              )
              .kendoWindow({
                title: !1,
                resizable: !1,
                draggable: { dragHandle: ".k-editortoolbar-dragHandle" },
                animation: {
                  open: { effects: "fade:in" },
                  close: { effects: "fade:out" },
                },
                minHeight: 42,
                visible: !1,
                autoFocus: !1,
                actions: [],
                dragend: function () {
                  this._moved = !0;
                },
              })
              .on("mousedown", function (i) {
                n(i.target).is(".k-icon") || (t.preventPopupHide = !0);
              })
              .on("focusout", function () {
                t.options.editor.element.focusout();
              })
              .data("kendoWindow");
          },
          _toggleOverflowStyles: function (n, t) {
            n.find("> li")
              .toggleClass("k-item k-state-default", t)
              .find(".k-tool:not(.k-state-disabled),.k-overflow-button")
              .toggleClass("k-overflow-button k-button", t);
          },
          _initOverflowPopup: function (t) {
            var r = this;
            r.overflowPopup = n(
              "<ul class='k-editor-overflow-popup k-overflow-container k-list-container'></ul>"
            )
              .appendTo("body")
              .kendoPopup({
                anchor: t,
                origin: i.support.isRtl(r.element)
                  ? "bottom left"
                  : "bottom right",
                position: i.support.isRtl(r.element) ? "top left" : "top right",
                copyAnchorStyles: !1,
                open: function (n) {
                  this.element.is(":empty") && n.preventDefault();
                  r._toggleOverflowStyles(this.element, !0);
                  t.attr("aria-expanded", !0);
                },
                close: function () {
                  t.attr("aria-expanded", !1);
                },
                activate: h(r.focusOverflowPopup, r),
              })
              .data("kendoPopup");
          },
          items: function () {
            var t,
              n,
              i = this.options.resizable && this.options.resizable.toolbar;
            return (
              (n = this.element.children().find("> *, select")),
              i &&
                ((t = this.overflowPopup),
                (n = n.add(t.element.children().find("> *")))),
              n
            );
          },
          focused: function () {
            return (
              this.element.find(".k-state-focused").length > 0 ||
              this.preventPopupHide ||
              (this.overflowPopup && this.overflowPopup.visible())
            );
          },
          toolById: function (n) {
            var t,
              i = this.tools;
            for (t in i) if (t.toLowerCase() == n) return i[t];
          },
          toolGroupFor: function (t) {
            var i,
              r = this.groups;
            if (this.isCustomTool(t)) return "custom";
            for (i in r) if (n.inArray(t, r[i]) >= 0) return i;
          },
          bindTo: function (t) {
            var i = this,
              u = i.window;
            i._editor && i._editor.unbind("select", h(i.resize, i));
            i._editor = t;
            i.options.resizable &&
              i.options.resizable.toolbar &&
              t.options.tools.push(e);
            i.tools = i.expandTools(t.options.tools);
            i.render();
            i.element.find(".k-combobox .k-input").keydown(function (t) {
              var i = n(this).closest(".k-combobox").data("kendoComboBox"),
                u = t.keyCode;
              u == r.RIGHT || u == r.LEFT
                ? i.close()
                : u == r.DOWN &&
                  (i.dropDown.isOpened() ||
                    (t.stopImmediatePropagation(), i.open()));
            });
            i._attachEvents();
            i.items().each(function () {
              var e,
                r = i._toolName(this),
                u = "moreVertical" !== r ? i.tools[r] : i.tools.overflowAnchor,
                o = u && u.options,
                s = t.options.messages,
                h = (o && o.tooltip) || s[r],
                f = n(this);
              u &&
                u.initialize &&
                (("fontSize" != r && "fontName" != r) ||
                  ((e = s[r + "Inherit"]),
                  f
                    .find("input")
                    .val(e)
                    .end()
                    .find("span.k-input")
                    .text(e)
                    .end()),
                u.initialize(f, {
                  title: i._appendShortcutSequence(h, u),
                  editor: i._editor,
                }),
                f.closest(".k-widget", i.element).addClass("k-editor-widget"),
                f
                  .closest(".k-colorpicker", i.element)
                  .next(".k-colorpicker")
                  .addClass("k-editor-widget"));
            });
            t.bind("select", h(i.resize, i));
            i.update();
            u && u.wrapper.css({ top: "", left: "", width: "" });
          },
          show: function () {
            var n,
              u,
              f,
              t = this,
              r = t.window,
              o = t.options.editor,
              e = i.support.browser;
            r &&
              ((n = r.wrapper),
              (u = o.element),
              (n.is(":visible") && t.window.options.visible) ||
                (n[0].style.width || n.width(this._getWindowWidth()),
                r._moved ||
                  ((f = u.offset()),
                  n.css({
                    top: Math.max(
                      0,
                      parseInt(f.top, 10) -
                        k(n) -
                        parseInt(t.window.element.css("padding-bottom"), 10)
                    ),
                    left: Math.max(0, parseInt(f.left, 10)),
                  })),
                (e.msie || e.edge) && t._overlaps(u)
                  ? setTimeout(function () {
                      r.open();
                    }, 0)
                  : r.open()));
          },
          _getWindowWidth: function () {
            var n = this,
              t = n.window.wrapper,
              i = n.options.editor.element;
            return (
              y(i) -
              parseInt(t.css("border-left-width"), 10) -
              parseInt(t.css("border-right-width"), 10)
            );
          },
          _overlaps: function (n) {
            var t = this.window.wrapper,
              i = t.offset(),
              r = i.left,
              u = i.top,
              f = n.offset(),
              e = f.left,
              o = f.top;
            return !(
              e + n.width() < r ||
              e > r + t.width() ||
              o + n.height() < u ||
              o > u + t.height()
            );
          },
          hide: function () {
            this.window && this.window.close();
          },
          focus: function () {
            var n = "tabIndex",
              i = this.element,
              t = this._editor.element.attr(n);
            i.attr(n, t || 0)
              .focus()
              .find(o)
              .first()
              .focus();
            t || 0 === t || i.removeAttr(n);
          },
          focusOverflowPopup: function () {
            var n = "tabIndex",
              t = this.overflowPopup.element,
              i = this._editor.element.attr(n);
            t.closest(".k-animation-container").addClass("k-overflow-wrapper");
            t.attr(n, i || 0)
              .find(o)
              .first()
              .focus();
            i || 0 === i || t.removeAttr(n);
          },
          _appendShortcutSequence: function (n, t) {
            if (!t.key) return n;
            var i = n + " (";
            return (
              t.ctrl && (i += "Ctrl + "),
              t.shift && (i += "Shift + "),
              t.alt && (i += "Alt + "),
              i + (t.key + ")")
            );
          },
          _nativeTools: [
            "insertLineBreak",
            "insertParagraph",
            "redo",
            "undo",
            "autoLink",
          ],
          tools: {},
          isCustomTool: function (n) {
            return !(n in i.ui.Editor.defaultTools);
          },
          expandTools: function (t) {
            for (
              var e,
                r,
                o,
                l = this._nativeTools,
                c = i.deepExtend({}, i.ui.Editor.defaultTools),
                h = {},
                f = 0;
              f < t.length;
              f++
            )
              (e = t[f]),
                (o = e.name),
                n.isPlainObject(e)
                  ? o && c[o]
                    ? ((h[o] = s({}, c[o])), s(h[o].options, e))
                    : ((r = s(
                        { cssClass: "k-i-gear", type: "button", title: "" },
                        e
                      )),
                      r.name || (r.name = "custom"),
                      (r.cssClass = "k-" + r.name),
                      r.template ||
                        "button" != r.type ||
                        ((r.template = u.EditorUtils.buttonTemplate),
                        (r.title = r.title || r.tooltip)),
                      (h[o] = { options: r }))
                  : c[e] && (h[e] = c[e]);
            for (f = 0; f < l.length; f++) h[l[f]] || (h[l[f]] = c[l[f]]);
            return h;
          },
          render: function () {
            function tt(t) {
              var r;
              return (
                t.getHtml
                  ? (r = t.getHtml())
                  : (n.isFunction(t) || (t = i.template(t)), (r = t(u))),
                n.trim(r)
              );
            }
            function a() {
              f.children().length &&
                (nt && (f.data("position", g), g++), f.appendTo(k));
            }
            function v(t) {
              t !== e
                ? ((f = n("<li class='k-tool-group' role='presentation' />")),
                  f.data("overflow", n.inArray(t, l) === -1))
                : (f = n("<li class='k-overflow-tools' />"));
            }
            var u,
              o,
              p,
              r,
              w,
              y,
              f,
              c,
              t = this,
              b = t.tools,
              it = t._editor.element,
              k = t.element.empty(),
              s = t._editor.options.tools,
              d = i.support.browser,
              g = 0,
              nt = t.options.resizable && t.options.resizable.toolbar,
              l = this.overflowFlaseTools;
            for (
              k.empty(), s.length && (r = s[0].name || s[0]), v(r, l), c = 0;
              c < s.length;
              c++
            )
              (r = s[c].name || s[c]),
                (u = b[r] && b[r].options),
                !u && n.isPlainObject(r) && (u = r),
                (o = u && u.template),
                "break" == r &&
                  (a(),
                  n("<li class='k-row-break' />").appendTo(t.element),
                  v(r, l)),
                o &&
                  ((y = t.toolGroupFor(r)),
                  (w == y && r != e) || (a(), v(r, l), (w = y)),
                  r == e &&
                    (o.options.title = t.options.messages.overflowAnchor),
                  (o = tt(o)),
                  (p = n(o).appendTo(f)),
                  "custom" == y && (a(), v(r, l)),
                  u.exec && p.hasClass("k-tool") && p.click(h(u.exec, it[0])));
            a();
            n(t.element).children(":has(> .k-tool)").addClass("k-button-group");
            t.options.popup &&
              d.msie &&
              d.version < 9 &&
              t.window.wrapper.find("*").attr("unselectable", "on");
            t.updateGroups();
            nt && t._initOverflowPopup(t.element.find(".k-overflow-anchor"));
            t.angular("compile", function () {
              return { elements: t.element };
            });
          },
          updateGroups: function () {
            n(this.element)
              .children()
              .each(function () {
                n(this).addClass("k-state-disabled");
                n(this)
                  .children()
                  .filter(function () {
                    return !n(this).hasClass("k-state-disabled");
                  })
                  .removeClass("k-group-end")
                  .first()
                  .addClass("k-group-start")
                  .end()
                  .last()
                  .addClass("k-group-end")
                  .end()
                  .parent()
                  .removeClass("k-state-disabled")
                  .css("display", "");
              });
          },
          decorateFrom: function (t) {
            this.items()
              .filter(".k-decorated")
              .each(function () {
                var i = n(this).data("kendoSelectBox");
                i && i.decorate(t);
              });
          },
          destroy: function () {
            c.fn.destroy.call(this);
            var n,
              t = this.tools;
            for (n in t) t[n].destroy && t[n].destroy();
            this.window && this.window.destroy();
            this._resizeHandler && i.unbindResize(this._resizeHandler);
            this.overflowPopup && this.overflowPopup.destroy();
          },
          _attachEvents: function () {
            var t = this,
              i = t.overflowPopup ? t.overflowPopup.element : n([]);
            t.attachToolsEvents(t.element.add(i));
          },
          attachToolsEvents: function (t) {
            var u = this,
              e = "[role=button].k-tool",
              s = e + ":not(.k-state-disabled)",
              h = e + ".k-state-disabled",
              c = [e, ".k-dropdown", ".k-colorpicker"].join(",");
            t.off(f)
              .on("mouseenter" + f, s, function () {
                n(this).addClass("k-state-hover");
              })
              .on("mouseleave" + f, s, function () {
                n(this).removeClass("k-state-hover");
              })
              .on("mousedown" + f, c, function (n) {
                n.preventDefault();
              })
              .on("keydown" + f, o, function (t) {
                function h(n, t, i) {
                  var r = t.find(o),
                    u = r.index(s) + n;
                  return (
                    i && (u = Math.max(0, Math.min(r.length - 1, u))), r[u]
                  );
                }
                var c,
                  f,
                  l,
                  s = this,
                  a = u.options.resizable && u.options.resizable.toolbar,
                  v = i.support.isRtl(u.element) ? -1 : 1,
                  e = t.keyCode;
                e == r.RIGHT || e == r.LEFT
                  ? (f = n(s).is(".k-dropdown")
                      ? n(s)
                      : h(e == r.RIGHT ? 1 * v : -1 * v, u.element, !0))
                  : !a || (e != r.UP && e != r.DOWN)
                  ? e == r.HOME
                    ? ((f = u.element.find(o)[0]), t.preventDefault())
                    : e == r.END
                    ? ((c = u.element.find(o).filter(function () {
                        return "hidden" !== n(this).css("visibility");
                      })),
                      (f = c[c.length - 1]),
                      t.preventDefault())
                    : e == r.ESC
                    ? (u.overflowPopup &&
                        u.overflowPopup.visible() &&
                        u.overflowPopup.close(),
                      (f = u._editor))
                    : e != r.TAB ||
                      t.ctrlKey ||
                      t.altKey ||
                      ((l =
                        a &&
                        n(s.parentElement).hasClass("k-overflow-tool-group")
                          ? u.overflowPopup.element
                          : u.element),
                      t.shiftKey
                        ? (f = h(-1, l))
                        : ((f = h(1, l)),
                          (f &&
                            "hidden" !==
                              n(f)
                                .closest(".k-overflow-tools")
                                .css("visibility")) ||
                            (f = u._editor)))
                  : (f = h(e == r.DOWN ? 1 : -1, u.overflowPopup.element, !0));
                f && (t.preventDefault(), f.focus());
                (e !== r.ENTER && e !== r.SPACEBAR) ||
                  !n(s).is("a") ||
                  n(s).attr("href") ||
                  u._executeToolCommand(s, t);
              })
              .on("click" + f, s, function (n) {
                u._executeToolCommand(this, n);
              })
              .on("click" + f, h, function (n) {
                n.preventDefault();
              });
          },
          _executeToolCommand: function (t, i) {
            var r = this,
              u = n(t);
            i.preventDefault();
            i.stopPropagation();
            u.removeClass("k-state-hover");
            u.is("[data-popup]") || r._editor.exec(r._toolName(t));
          },
          _toolName: function (t) {
            var u, f, r;
            if (t)
              return (
                (u = t.className),
                /k-tool\b/i.test(u) && (u = t.firstChild.className),
                (f = n.grep(u.split(" "), function (n) {
                  return !/^k-(widget|tool|tool-icon|icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(
                    n
                  );
                })),
                f[0]
                  ? ((r = f[0]),
                    p[r] && (r = p[r]),
                    r.indexOf("k-i-") >= 0
                      ? i.toCamelCase(r.substring(r.indexOf("k-i-") + 4))
                      : r.substring(r.lastIndexOf("-") + 1))
                  : "custom"
              );
          },
          refreshTools: function () {
            var t = this,
              f = t._editor,
              r = f.getRange(),
              i = u.RangeUtils.textNodes(r),
              e = f.options.immutables,
              o = t._immutablesContext(r);
            i = u.Dom.filterBy(i, u.Dom.htmlIndentSpace, !0);
            i.length || (i = [r.startContainer]);
            t.items().each(function () {
              var u,
                r = t.tools[t._toolName(this)];
              r &&
                ((u = n(this)),
                r.update && r.update(u, i),
                e && t._updateImmutablesState(r, u, o));
            });
            this.update();
          },
          _immutablesContext: function (n) {
            if (this._editor.options.immutables)
              return n.collapsed
                ? u.Immutables.immutablesContext(n)
                : 0 === u.RangeUtils.editableTextNodes(n).length;
          },
          _updateImmutablesState: function (i, r, f) {
            var e,
              o,
              s,
              a,
              h,
              v = i.name,
              c = r,
              l = i.options.trackImmutables;
            if (
              (l === t &&
                (l = n.inArray(v, u.Immutables.toolsToBeUpdated) > -1),
              l)
            ) {
              if (((e = f ? "none" : ""), !r.is(".k-tool"))) {
                o = r.data();
                for (s in o)
                  if (s.match(/^kendo[A-Z][a-zA-Z]*/)) {
                    a = o[s];
                    c = a.wrapper;
                    break;
                  }
              }
              c.css("display", e);
              h = c.closest("li");
              0 === h.children(":visible").length && h.css("display", e);
            }
          },
          update: function () {
            this.updateGroups();
          },
          _resize: function (n) {
            var r = n.width,
              u = this.options.resizable && this.options.resizable.toolbar,
              i = this.overflowPopup,
              f = this.options.editor.element,
              t = this.window;
            this.refreshTools();
            u &&
              (t &&
                (t.wrapper.width(this._getWindowWidth()),
                t._moved ||
                  t.wrapper.css({
                    left: Math.max(0, parseInt(f.offset().left, 10)),
                  })),
              i.visible() && i.close(!0),
              this._refreshWidths(),
              this._shrink(r),
              this._stretch(r),
              this._toggleOverflowStyles(this.element, !1),
              this._toggleOverflowStyles(this.overflowPopup.element, !0),
              this.element
                .children("li.k-overflow-tools")
                .css(
                  "visibility",
                  i.element.is(":empty") ? "hidden" : "visible"
                ));
          },
          _refreshWidths: function () {
            this.element.children("li").each(function (t, i) {
              var r = n(i);
              r.data("outerWidth", y(r, !0));
            });
          },
          _shrink: function (n) {
            var r, i, t;
            if (n < this._groupsWidth())
              for (
                i = this._visibleGroups().filter(":not(.k-overflow-tools)"),
                  t = i.length - 1;
                t >= 0 && ((r = i.eq(t)), !(n > this._groupsWidth()));
                t--
              )
                this._hideGroup(r);
          },
          _stretch: function (n) {
            var r, i, t;
            if (n > this._groupsWidth())
              for (
                i = this._hiddenGroups(), t = 0;
                t < i.length &&
                ((r = i.eq(t)),
                !(n < this._groupsWidth()) && this._showGroup(r, n));
                t++
              );
          },
          _hiddenGroups: function () {
            var i = this.overflowPopup,
              t = this.element.children("li.k-tool-group").filter(":hidden");
            return (
              (t = t.add(i.element.children("li"))),
              t.sort(function (t, i) {
                return n(t).data("position") > n(i).data("position") ? 1 : -1;
              }),
              t
            );
          },
          _visibleGroups: function () {
            return this.element
              .children("li.k-tool-group, li.k-overflow-tools")
              .filter(":visible");
          },
          _groupsWidth: function () {
            var t = 0;
            return (
              this._visibleGroups().each(function () {
                t += n(this).data("outerWidth");
              }),
              Math.ceil(t)
            );
          },
          _hideGroup: function (n) {
            if (n.data("overflow")) {
              var t = this.overflowPopup;
              n.detach().prependTo(t.element).addClass("k-overflow-tool-group");
            } else n.hide();
          },
          _showGroup: function (t, i) {
            var r, u;
            return (
              !(
                !(t.length && i > this._groupsWidth() + t.data("outerWidth")) ||
                t.hasClass("k-state-disabled")
              ) &&
              (t.hasClass("k-overflow-tool-group")
                ? ((r = t.data("position")),
                  0 === r
                    ? t.detach().prependTo(this.element)
                    : ((u = this.element.children().filter(function (t, i) {
                        return n(i).data("position") === r - 1;
                      })),
                      t.detach().insertAfter(u)),
                  t.removeClass("k-overflow-tool-group"))
                : t.show(),
              !0)
            );
          },
        });
        n.extend(u, { Toolbar: l });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/viewhtml.min", ["editor/command.min"], n);
  })(
    function () {
      !(function (n, t) {
        var u = window.kendo,
          o = n.extend,
          i = u.ui.editor,
          f = i.EditorUtils,
          e = i.Command,
          s = i.Tool,
          h = i.ToolTemplate,
          c = i.Dom,
          r = e.extend({
            init: function (n) {
              var t = this;
              t.options = n;
              e.fn.init.call(t, n);
              t.attributes = null;
              t.async = !0;
            },
            exec: function () {
              function p(n) {
                o.deserialization.immutables = i.immutables;
                i.value(s.find(v).val());
                o.deserialization.immutables = t;
                h(n);
                a.change && a.change();
                i.trigger("change");
              }
              function h(n) {
                n.preventDefault();
                s.data("kendoWindow").destroy();
                i.immutables && (i.immutables.serializedImmutables = {});
                i.focus();
              }
              var e,
                l,
                a = this,
                i = a.editor,
                o = i.options,
                y = i.options.messages,
                s = n(u.template(r.template)(y)).appendTo(document.body),
                v = ".k-editor-textarea";
              o.serialization.immutables = i.immutables;
              l = c.getAllComments(i.body);
              e = f.cacheComments(i.value(), l);
              e = r.indent(e);
              e = f.retrieveComments(e, l);
              o.serialization.immutables = t;
              this.createDialog(s, { title: y.viewHtml, close: h, visible: !1 })
                .find(v)
                .val(e)
                .end()
                .find(".k-dialog-update")
                .click(p)
                .end()
                .find(".k-dialog-close")
                .click(h)
                .end()
                .data("kendoWindow")
                .center()
                .open();
              s.find(v).focus();
            },
          });
        o(r, {
          template:
            "<div class='k-editor-dialog k-popup-edit-form k-viewhtml-dialog'><div class='k-edit-form-container'></div><textarea class='k-editor-textarea k-input'></textarea><div class='k-edit-buttons k-state-default'><button class='k-dialog-update k-button k-primary'>#: dialogUpdate #</button><button class='k-dialog-close k-button'>#: dialogCancel #</button></div></div></div>",
          indent: function (n) {
            return n
              .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$/, "");
          },
        });
        u.ui.editor.ViewHtmlCommand = r;
        i.EditorUtils.registerTool(
          "viewHtml",
          new s({
            command: r,
            template: new h({ template: f.buttonTemplate, title: "View HTML" }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/format.min", ["editor/command.min"], n);
  })(
    function () {
      !(function (n) {
        var f = window.kendo,
          e = n.extend,
          t = f.ui.editor,
          i = t.Tool,
          r = t.Command,
          o = t.EditorUtils,
          u = r.extend({
            init: function (n) {
              n.formatter = n.formatter();
              var t = n.formatter.finder;
              t &&
                o.formatByName("immutable", t.format) &&
                t._initOptions({ immutables: n.immutables });
              r.fn.init.call(this, n);
            },
          }),
          s = i.extend({
            init: function (n) {
              i.fn.init.call(this, n);
            },
            command: function (n) {
              var t = this;
              return new u(e(n, { formatter: t.options.formatter }));
            },
            update: function (n, t) {
              var i = this.options.finder.isFormatted(t);
              n.toggleClass("k-state-selected", i);
              n.attr("aria-pressed", i);
            },
          });
        n.extend(t, { FormatCommand: u, FormatTool: s });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/inlineformat.min", ["editor/plugins/format.min"], n);
  })(
    function () {
      !(function (n) {
        var u = window.kendo,
          nt = u.Class,
          i = u.ui.editor,
          s = u.ui.Editor.fn.options.formats,
          r = i.EditorUtils,
          h = i.Tool,
          f = i.ToolTemplate,
          tt = i.FormatTool,
          t = i.Dom,
          v = i.RangeUtils,
          c = n.extend,
          e = i.EditorUtils.registerTool,
          l = i.EditorUtils.registerFormat,
          k = "mousedown.kendoEditor",
          rt = "keydown.kendoEditor",
          y = "k-marker",
          a = nt.extend({
            init: function (n) {
              this.format = n;
            },
            numberOfSiblings: function (n) {
              for (
                var r = 0, u = 0, f = 0, i = n.parentNode, t = i.firstChild;
                t;
                t = t.nextSibling
              )
                t != n &&
                  (t.className == y ? f++ : 3 == t.nodeType ? r++ : u++);
              return f > 1 &&
                i.firstChild.className == y &&
                i.lastChild.className == y
                ? 0
                : u + r;
            },
            findSuitable: function (n, i) {
              var r, u;
              if (!i && this.numberOfSiblings(n) > 0) return null;
              for (
                r = n.parentNode, u = this.format[0].tags;
                !t.ofType(r, u);

              ) {
                if (this.numberOfSiblings(r) > 0) return null;
                r = r.parentNode;
              }
              return r;
            },
            findFormat: function (n) {
              for (
                var i,
                  u,
                  f,
                  e = this.format,
                  s = t.attrEquals,
                  r = 0,
                  o = e.length;
                r < o;
                r++
              ) {
                if (
                  ((i = n),
                  (u = e[r].tags),
                  (f = e[r].attr),
                  i && t.ofType(i, u) && s(i, f))
                )
                  return i;
                for (; i; )
                  if (((i = t.parentOfType(i, u)), i && s(i, f))) return i;
              }
              return null;
            },
            isFormatted: function (n) {
              for (var t = 0, i = n.length; t < i; t++)
                if (this.findFormat(n[t])) return !0;
              return !1;
            },
          }),
          p = nt.extend({
            init: function (n, t) {
              this.finder = new a(n);
              this.attributes = c({}, n[0].attr, t);
              this.tag = n[0].tags[0];
            },
            wrap: function (n) {
              return t.wrap(
                n,
                t.create(n.ownerDocument, this.tag, this.attributes)
              );
            },
            activate: function (n, t) {
              this.finder.isFormatted(t)
                ? (this.split(n), this.remove(t))
                : this.apply(t);
            },
            toggle: function (n) {
              var i = this.immutables() ? v.editableTextNodes : v.textNodes,
                t = i(n);
              t.length > 0 && this.activate(n, t);
            },
            immutables: function () {
              return this.editor && this.editor.options.immutables;
            },
            apply: function (n) {
              var t,
                u,
                i,
                r,
                f = [];
              if (n.length > 1)
                for (t = 0, u = n.length; t < u; t++)
                  (i = n[t]), (r = this.format(i, !0)), f.push(r);
              else (i = n[0]), (r = this.format(i, !1));
              this.consolidate(f);
            },
            format: function (n, i) {
              var r = this.finder.findSuitable(n),
                u = this.attributes,
                f = u ? u.style || {} : {};
              if (r)
                t.is(r, "font") &&
                  (f.color && r.removeAttribute("color"),
                  f.fontName && r.removeAttribute("face"),
                  f.fontSize && r.removeAttribute("size")),
                  t.attr(r, u);
              else {
                for (
                  ;
                  !t.isBlock(n.parentNode) &&
                  1 == n.parentNode.childNodes.length &&
                  "true" !== n.parentNode.contentEditable &&
                  i;

                )
                  n = n.parentNode;
                r = this.wrap(n);
              }
              return r;
            },
            remove: function (n) {
              for (var i, r = 0, u = n.length; r < u; r++)
                (i = this.finder.findFormat(n[r])),
                  i &&
                    (this.attributes && this.attributes.style
                      ? (t.unstyle(i, this.attributes.style),
                        i.style.cssText || i.attributes["class"] || t.unwrap(i))
                      : t.unwrap(i));
            },
            split: function (n) {
              var t,
                i,
                r = v.textNodes(n),
                u = r.length;
              if (u > 0)
                for (t = 0; t < u; t++)
                  (i = this.finder.findFormat(r[t])), i && v.split(n, i, !0);
            },
            consolidate: function (n) {
              for (var i, r; n.length > 1; )
                if (
                  ((i = n.pop()),
                  (r = n[n.length - 1]),
                  i.previousSibling &&
                    i.previousSibling.className == y &&
                    r.appendChild(i.previousSibling),
                  i.tagName == r.tagName &&
                    i.previousSibling == r &&
                    i.style.cssText == r.style.cssText &&
                    i.className === r.className)
                ) {
                  for (; i.firstChild; ) r.appendChild(i.firstChild);
                  t.remove(i);
                }
            },
          }),
          w = a.extend({
            init: function (n, t) {
              this.format = n;
              this.greedyProperty = t;
              a.fn.init.call(this, n);
            },
            getInlineCssValue: function (i) {
              var r,
                v,
                u,
                y,
                p,
                e,
                o,
                f,
                w,
                s,
                h,
                c,
                l = i.attributes,
                a = n.trim;
              if (l)
                for (r = 0, v = l.length; r < v; r++)
                  if (
                    ((u = l[r]),
                    (y = u.nodeName),
                    (p = u.nodeValue),
                    u.specified && "style" == y)
                  )
                    for (
                      e = a(p || i.style.cssText).split(";"),
                        f = 0,
                        w = e.length;
                      f < w;
                      f++
                    )
                      if (((o = e[f]), o.length)) {
                        if (
                          ((s = o.split(":")),
                          (h = a(s[0].toLowerCase())),
                          (c = a(s[1])),
                          h != this.greedyProperty)
                        )
                          continue;
                        return h.indexOf("color") >= 0 ? t.toHex(c) : c;
                      }
            },
            getFormatInner: function (i) {
              for (
                var e,
                  o = n(t.isDataNode(i) ? i.parentNode : i),
                  u = o
                    .parentsUntil("[contentEditable]")
                    .addBack()
                    .toArray()
                    .reverse(),
                  r = 0,
                  f = u.length;
                r < f;
                r++
              )
                if (
                  (e =
                    "className" == this.greedyProperty
                      ? u[r].className
                      : this.getInlineCssValue(u[r]))
                )
                  return e;
              return "inherit";
            },
            getFormat: function (n) {
              for (
                var r = this.getFormatInner(n[0]), t = 1, i = n.length;
                t < i;
                t++
              )
                if (r != this.getFormatInner(n[t])) return "";
              return r;
            },
            isFormatted: function (n) {
              return "" !== this.getFormat(n);
            },
          }),
          d = p.extend({
            init: function (n, t, i) {
              p.fn.init.call(this, n, t);
              this.values = t;
              this.finder = new w(n, i);
              i && (this.greedyProperty = u.toCamelCase(i));
            },
            activate: function (n, t) {
              var i = this.greedyProperty,
                r = "apply";
              this.split(n);
              i && "inherit" == this.values.style[i] && (r = "remove");
              this[r](t);
            },
          }),
          o = tt.extend({
            init: function (n) {
              tt.fn.init.call(
                this,
                c(n, {
                  finder: new a(n.format),
                  formatter: function () {
                    return new p(n.format);
                  },
                })
              );
            },
          }),
          it = h.extend({
            update: function (n, t) {
              var i = n.data(this.type);
              i.close();
              i.value(this.finder.getFormat(t));
            },
          }),
          g = it.extend({
            init: function (n) {
              h.fn.init.call(this, n);
              this.type =
                u.support.browser.msie || u.support.touch
                  ? "kendoDropDownList"
                  : "kendoComboBox";
              this.format = [{ tags: ["span", "font"] }];
              this.finder = new w(this.format, n.cssAttr);
            },
            command: function (n) {
              var t = this.options,
                u = this.format,
                r = {};
              return new i.FormatCommand(
                c(n, {
                  formatter: function () {
                    return (
                      (r[t.domAttr] = n.value),
                      new d(u, { style: r }, t.cssAttr)
                    );
                  },
                })
              );
            },
            initialize: function (n, t) {
              var s,
                f,
                e,
                i = t.editor,
                r = this.options,
                o = r.name,
                c = [];
              r.defaultValue &&
                (c = [
                  {
                    text: i.options.messages[r.defaultValue[0].text],
                    value: r.defaultValue[0].value,
                  },
                ]);
              s = c.concat(r.items ? r.items : i.options[o] || []);
              n.attr({ title: t.title });
              n[this.type]({
                dataTextField: "text",
                dataValueField: "value",
                dataSource: s,
                change: function () {
                  i._range = f;
                  h.exec(i, o, this.value());
                },
                close: function () {
                  setTimeout(function () {
                    i._deleteSavedRange();
                  }, 0);
                },
                highlightFirst: !1,
              });
              n.closest(".k-widget")
                .removeClass("k-" + o)
                .find("*")
                .addBack()
                .attr("unselectable", "on");
              e = n.data(this.type);
              e.value("inherit");
              e.wrapper
                .on(k, ".k-select,.k-input", function () {
                  var n = i.getRange();
                  f = i._containsRange(n) ? n : f;
                })
                .on(rt, function (n) {
                  n.keyCode === u.keys.ENTER &&
                    (i._deleteSavedRange(), n.preventDefault());
                });
            },
          }),
          b = h.extend({
            init: function (n) {
              h.fn.init.call(this, n);
              this.format = [{ tags: ["span", "font"] }];
              this.finder = new w(this.format, n.cssAttr);
            },
            options: { palette: "websafe" },
            update: function () {
              this._widget.close();
            },
            command: function (n) {
              var t = this.options,
                u = this.format,
                r = {};
              return new i.FormatCommand(
                c(n, {
                  formatter: function () {
                    return (
                      (r[t.domAttr] = n.value),
                      new d(u, { style: r }, t.cssAttr)
                    );
                  },
                })
              );
            },
            initialize: function (t, i) {
              var f = this,
                e = i.editor,
                s = this.name,
                o = c({}, b.fn.options, this.options),
                l = o.palette,
                a = o.columns;
              t = this._widget = new u.ui.ColorPicker(t, {
                toolIcon: "k-icon k-i-" + r.getToolCssClass(o.name),
                palette: l,
                columns: a,
                change: function () {
                  var n = t.value();
                  u.support.browser.msie &&
                    f.storedRange &&
                    f._inputFocused &&
                    e.selectRange(f.storedRange);
                  n && h.exec(e, s, n);
                  delete f.storedRange;
                  delete f._inputFocused;
                  e.focus();
                },
                open: function (t) {
                  var i = t.sender;
                  f.storedRange = e.getRange();
                  i._popup.element.on(k, function (t) {
                    n(t.target).is("input.k-color-value") || t.preventDefault();
                  });
                  i._popup.element.is("[unselectable='on']") ||
                    i._popup.element
                      .attr({ unselectable: "on" })
                      .find("*:not(input)")
                      .attr("unselectable", "on")
                      .end()
                      .find("input")
                      .on("focus", function () {
                        f._inputFocused = !0;
                      });
                },
                close: function (n) {
                  n.sender._popup.element.off(k);
                  u.support.browser.msie &&
                    f.storedRange &&
                    f._inputFocused &&
                    e.selectRange(f.storedRange);
                },
                activate: function (n) {
                  n.preventDefault();
                  "rgba(255, 255, 255, 0)" !== n.sender._value.toCssRgba() &&
                    t.trigger("change");
                },
              });
              t.wrapper
                .attr({ title: i.title, unselectable: "on" })
                .find("*:not(input)")
                .attr("unselectable", "on");
              t.value("transparent");
            },
          });
        c(i, {
          InlineFormatFinder: a,
          InlineFormatter: p,
          DelayedExecutionTool: it,
          GreedyInlineFormatFinder: w,
          GreedyInlineFormatter: d,
          InlineFormatTool: o,
          FontTool: g,
          ColorTool: b,
        });
        l("bold", [
          { tags: ["strong", "b"] },
          { tags: ["span"], attr: { style: { fontWeight: "bold" } } },
        ]);
        e(
          "bold",
          new o({
            key: "B",
            ctrl: !0,
            format: s.bold,
            template: new f({ template: r.buttonTemplate, title: "Bold" }),
          })
        );
        l("italic", [
          { tags: ["em", "i"] },
          { tags: ["span"], attr: { style: { fontStyle: "italic" } } },
        ]);
        e(
          "italic",
          new o({
            key: "I",
            ctrl: !0,
            format: s.italic,
            template: new f({ template: r.buttonTemplate, title: "Italic" }),
          })
        );
        l("underline", [
          { tags: ["span"], attr: { style: { textDecoration: "underline" } } },
          { tags: ["u"] },
        ]);
        e(
          "underline",
          new o({
            key: "U",
            ctrl: !0,
            format: s.underline,
            template: new f({ template: r.buttonTemplate, title: "Underline" }),
          })
        );
        l("strikethrough", [
          { tags: ["del", "strike"] },
          {
            tags: ["span"],
            attr: { style: { textDecoration: "line-through" } },
          },
        ]);
        e(
          "strikethrough",
          new o({
            format: s.strikethrough,
            template: new f({
              template: r.buttonTemplate,
              title: "Strikethrough",
            }),
          })
        );
        l("superscript", [{ tags: ["sup"] }]);
        e(
          "superscript",
          new o({
            format: s.superscript,
            template: new f({
              template: r.buttonTemplate,
              title: "Superscript",
            }),
          })
        );
        l("subscript", [{ tags: ["sub"] }]);
        e(
          "subscript",
          new o({
            format: s.subscript,
            template: new f({ template: r.buttonTemplate, title: "Subscript" }),
          })
        );
        e(
          "foreColor",
          new b({
            cssAttr: "color",
            domAttr: "color",
            name: "foreColor",
            template: new f({
              template: r.colorPickerTemplate,
              title: "Color",
            }),
          })
        );
        e(
          "backColor",
          new b({
            cssAttr: "background-color",
            domAttr: "backgroundColor",
            name: "backColor",
            template: new f({
              template: r.colorPickerTemplate,
              title: "Background Color",
            }),
          })
        );
        e(
          "fontName",
          new g({
            cssAttr: "font-family",
            domAttr: "fontFamily",
            name: "fontName",
            defaultValue: [{ text: "fontNameInherit", value: "inherit" }],
            template: new f({
              template: r.comboBoxTemplate,
              title: "Font Name",
            }),
          })
        );
        e(
          "fontSize",
          new g({
            cssAttr: "font-size",
            domAttr: "fontSize",
            name: "fontSize",
            defaultValue: [{ text: "fontSizeInherit", value: "inherit" }],
            template: new f({
              template: r.comboBoxTemplate,
              title: "Font Size",
            }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/link.min", ["editor/plugins/inlineformat.min"], n);
  })(
    function () {
      !(function (n, t) {
        function b(n, t) {
          for (var i = n.length; i-- && !t.test(n[i]); );
          return i;
        }
        function ct(n, t) {
          var i = t.exec(n);
          return i ? i.index : -1;
        }
        var u = window.kendo,
          s = u.Class,
          lt = n.extend,
          h = n.proxy,
          r = u.ui.editor,
          i = r.Dom,
          e = r.RangeUtils,
          k = r.EditorUtils,
          f = r.Command,
          o = r.Tool,
          d = r.ToolTemplate,
          g = r.InlineFormatter,
          at = r.InlineFormatFinder,
          c = e.textNodes,
          nt = e.editableTextNodes,
          l = r.EditorUtils.registerTool,
          tt = u.keys,
          a = "http://",
          it = /^\w*:\/\//,
          vt = /[\w\/\$\-_\*\?]/i,
          rt = s.extend({
            findSuitable: function (n) {
              return i.parentOfType(n, ["a"]);
            },
          }),
          v = s.extend({
            init: function () {
              this.finder = new rt();
            },
            apply: function (n, t) {
              var r,
                s,
                h,
                u,
                f,
                l,
                o,
                a = this.immutables ? nt(n) : c(n);
              if (t.innerText) {
                for (
                  s = e.documentFromRange(n),
                    r = e.getMarkers(n),
                    n.deleteContents(),
                    u = i.create(s, "a", t),
                    n.insertNode(u),
                    f = u.parentNode,
                    "a" == i.name(f) && i.insertAfter(u, f),
                    i.emptyNode(f) && i.remove(f),
                    l = u,
                    o = 0;
                  o < r.length;
                  o++
                )
                  i.insertAfter(r[o], l), (l = r[o]);
                r.length &&
                  (i.insertBefore(s.createTextNode("﻿"), r[1] || r[0]),
                  i.insertAfter(s.createTextNode("﻿"), r[1] || r[0]),
                  n.setStartBefore(r[0]),
                  n.setEndAfter(r[r.length - 1]));
              } else
                (h = new g([{ tags: ["a"] }], t)),
                  (h.finder = this.finder),
                  h.apply(a);
            },
          }),
          ut = f.extend({
            init: function (n) {
              var t = this;
              n.formatter = {
                toggle: function (n) {
                  var i = t.immutables() ? nt(n) : c(n);
                  new g([{ tags: ["a"] }]).remove(i);
                },
              };
              this.options = n;
              f.fn.init.call(this, n);
            },
          }),
          ft = f.extend({
            init: function (n) {
              var t;
              this.options = n;
              f.fn.init.call(this, n);
              this.formatter = new v();
              n.url
                ? (this.exec = function () {
                    this.formatter.immutables = t && t.immutables();
                    this.formatter.apply(n.range, {
                      href: n.url,
                      innerText: n.text || n.url,
                      target: n.target,
                    });
                  })
                : ((this.attributes = null), (this.async = !0));
            },
            _dialogTemplate: function () {
              return u.template(
                "<div class=\"k-editor-dialog k-popup-edit-form\"><div class=\"k-edit-form-container\"><div class='k-edit-label'><label for='k-editor-link-url'>#: messages.linkWebAddress #</label></div><div class='k-edit-field'><input type='text' class='k-textbox' id='k-editor-link-url'></div><div class='k-edit-label k-editor-link-text-row'><label for='k-editor-link-text'>#: messages.linkText #</label></div><div class='k-edit-field k-editor-link-text-row'><input type='text' class='k-textbox' id='k-editor-link-text'></div><div class='k-edit-label'><label for='k-editor-link-title'>#: messages.linkToolTip #</label></div><div class='k-edit-field'><input type='text' class='k-textbox' id='k-editor-link-title'></div><div class='k-edit-label'></div><div class='k-edit-field'><input type='checkbox' class='k-checkbox' id='k-editor-link-target'><label for='k-editor-link-target' class='k-checkbox-label'>#: messages.linkOpenInNewWindow #</label></div><div class='k-edit-buttons k-state-default'><button class=\"k-dialog-insert k-button k-primary\">#: messages.dialogInsert #</button><button class=\"k-dialog-close k-button\">#: messages.dialogCancel #</button></div></div></div>"
              )({ messages: this.editor.options.messages });
            },
            exec: function () {
              var r,
                t,
                f,
                u,
                e = this.editor.options.messages;
              this._initialText = "";
              this._range = this.lockRange(!0);
              this.formatter.immutables = this.immutables();
              r = c(this._range);
              t = r.length ? this.formatter.finder.findSuitable(r[0]) : null;
              f = r.length && "img" == i.name(r[0]);
              u = this.createDialog(this._dialogTemplate(), {
                title: e.createLink,
                close: h(this._close, this),
                visible: !1,
              });
              t && (this._range.selectNodeContents(t), (r = c(this._range)));
              this._initialText = this.linkText(r);
              u.find(".k-dialog-insert")
                .click(h(this._apply, this))
                .end()
                .find(".k-dialog-close")
                .click(h(this._close, this))
                .end()
                .find(".k-edit-field input")
                .keydown(h(this._keydown, this))
                .end()
                .find("#k-editor-link-url")
                .val(this.linkUrl(t))
                .end()
                .find("#k-editor-link-text")
                .val(this._initialText)
                .end()
                .find("#k-editor-link-title")
                .val(t ? t.title : "")
                .end()
                .find("#k-editor-link-target")
                .attr("checked", !!t && "_blank" == t.target)
                .end()
                .find(".k-editor-link-text-row")
                .toggle(!f);
              this._dialog = u.data("kendoWindow").center().open();
              n("#k-editor-link-url", u).focus().select();
            },
            _keydown: function (n) {
              var t = u.keys;
              n.keyCode == t.ENTER
                ? this._apply(n)
                : n.keyCode == t.ESC && this._close(n);
            },
            _apply: function (t) {
              var e,
                u,
                o,
                f = this._dialog.element,
                r = n("#k-editor-link-url", f).val(),
                s = n("#k-editor-link-text", f);
              r &&
                r != a &&
                (r.indexOf("@") > 0 &&
                  !/^(\w+:)|(\/\/)/i.test(r) &&
                  (r = "mailto:" + r),
                (this.attributes = { href: r }),
                (e = n("#k-editor-link-title", f).val()),
                e && (this.attributes.title = e),
                s.is(":visible") &&
                  ((u = s.val()),
                  u || this._initialText
                    ? u &&
                      u !== this._initialText &&
                      (this.attributes.innerText = i.stripBom(u))
                    : (this.attributes.innerText = r)),
                (o = n("#k-editor-link-target", f).is(":checked")),
                (this.attributes.target = o ? "_blank" : null),
                this.formatter.apply(this._range, this.attributes));
              this._close(t);
              this.change && this.change();
            },
            _close: function (n) {
              n.preventDefault();
              this._dialog.destroy();
              i.windowFromDocument(e.documentFromRange(this._range)).focus();
              this.releaseRange(this._range);
            },
            linkUrl: function (n) {
              return n ? n.getAttribute("href", 2) : a;
            },
            linkText: function (n) {
              for (var r = "", t = 0; t < n.length; t++) r += n[t].nodeValue;
              return i.stripBom(r || "");
            },
            redo: function () {
              var n = this.lockRange(!0);
              this.formatter.apply(n, this.attributes);
              this.releaseRange(n);
            },
          }),
          et = f.extend({
            init: function (n) {
              f.fn.init.call(this, n);
              this.formatter = new v();
            },
            exec: function () {
              var i,
                r,
                n,
                t = this.detectLink();
              t &&
                ((i = this.getRange()),
                (r = new u.ui.editor.Marker()),
                (n = i.cloneRange()),
                n.setStart(t.start.node, t.start.offset),
                n.setEnd(t.end.node, t.end.offset),
                (i = this.lockRange()),
                r.add(n),
                this.formatter.apply(n, {
                  href: this._ensureWebProtocol(t.text),
                }),
                r.remove(n),
                this.releaseRange(i));
            },
            detectLink: function () {
              var r,
                u,
                f = this.getRange(),
                n = f.startContainer,
                t = f.startOffset,
                e = n.previousSibling;
              return (
                !e &&
                  ((i.isBom(n) && !n.nextSibling) || (!t && i.isDataNode(n))) &&
                  ((n = n.parentNode), (t = 0)),
                (r = new p({
                  node: n,
                  offset: t,
                  cancelAtNode: function (n) {
                    return n && "a" === i.name(n);
                  },
                })),
                (u = new st(r)),
                u.detectLink()
              );
            },
            changesContent: function () {
              return !!this.detectLink();
            },
            _ensureWebProtocol: function (n) {
              var t = this._hasProtocolPrefix(n);
              return t ? n : this._prefixWithWebProtocol(n);
            },
            _hasProtocolPrefix: function (n) {
              return it.test(n);
            },
            _prefixWithWebProtocol: function (n) {
              return a + n;
            },
          }),
          ot = o.extend({
            init: function (t) {
              this.options = t;
              this.finder = new at([{ tags: ["a"] }]);
              o.fn.init.call(this, n.extend(t, { command: ut }));
            },
            initialize: function (n, t) {
              o.fn.initialize.call(this, n, t);
              n.addClass("k-state-disabled");
            },
            update: function (n, t) {
              n.toggleClass(
                "k-state-disabled",
                !this.finder.isFormatted(t)
              ).removeClass("k-state-hover");
            },
          }),
          st = s.extend({
            init: function (n) {
              this.traverser = n;
              this.start = y();
              this.end = y();
              this.text = "";
            },
            detectLink: function () {
              var u,
                t,
                f,
                e,
                r = this.traverser.node,
                o = this.traverser.offset;
              if (i.isDataNode(r)) {
                if (
                  ((u = r.data.substring(0, o)), /\s{2}$/.test(i.stripBom(u)))
                )
                  return;
              } else
                0 === o &&
                  ((t = i.closestEditableOfType(r, i.blockElements)),
                  t &&
                    t.previousSibling &&
                    this.traverser.init({ node: t.previousSibling }));
              return (
                this.traverser.traverse(n.proxy(this._detectEnd, this)),
                this.end.blank() ||
                  ((this.traverser = this.traverser.clone(this.end)),
                  this.traverser.traverse(n.proxy(this._detectStart, this)),
                  this._isLinkDetected() ||
                    ((f = this.traverser.extendOptions(this.start)),
                    (e = new w(f)),
                    e.traverse(n.proxy(this._skipStartPuntuation, this)),
                    this._isLinkDetected() || (this.start = y()))),
                this.start.blank()
                  ? null
                  : { start: this.start, end: this.end, text: this.text }
              );
            },
            _isLinkDetected: function () {
              return it.test(this.text) || /^w{3}\./i.test(this.text);
            },
            _detectEnd: function (n, t) {
              var i = b(n, vt);
              if (i > -1)
                return (this.end.node = t), (this.end.offset = i + 1), !1;
            },
            _detectStart: function (n, t) {
              var i = b(n, /\s/),
                r = i + 1;
              if (
                ((this.text = n.substring(r) + this.text),
                (this.start.node = t),
                (this.start.offset = r),
                i > -1)
              )
                return !1;
            },
            _skipStartPuntuation: function (n, t, i) {
              var r = ct(n, /\w/),
                u = r;
              if (
                (r === -1 && (u = n.length),
                (this.text = this.text.substring(u)),
                (this.start.node = t),
                (this.start.offset = u + (0 | i)),
                r > -1)
              )
                return !1;
            },
          }),
          y = function () {
            return {
              node: null,
              offset: null,
              blank: function () {
                return null === this.node && null === this.offset;
              },
            };
          },
          ht = s.extend({
            init: function (r) {
              this.node = r.node;
              this.offset =
                r.offset === t
                  ? (i.isDataNode(this.node) && this.node.length) || 0
                  : r.offset;
              this.cancelAtNode = r.cancelAtNode || this.cancelAtNode || n.noop;
            },
            traverse: function (n) {
              n &&
                ((this.cancel = !1), this._traverse(n, this.node, this.offset));
            },
            _traverse: function (n, r, u) {
              var o, s, f, e;
              if (r && !this.cancel) {
                if (3 !== r.nodeType)
                  return (
                    (s = this.edgeNode(r)),
                    (this.cancel = this.cancel || this.cancelAtNode(s)),
                    this._traverse(n, s)
                  );
                if (
                  ((o = r.data),
                  u !== t && (o = this.subText(o, u)),
                  (this.cancel = n(o, r, u) === !1),
                  (f = this.next(r)),
                  !f)
                )
                  for (e = r.parentNode; !f && i.isInline(e); )
                    (f = this.next(e)), (e = e.parentNode);
                this.cancel = this.cancel || this.cancelAtNode(f);
                this._traverse(n, f);
              }
            },
            extendOptions: function (t) {
              return n.extend(
                {
                  node: this.node,
                  offset: this.offset,
                  cancelAtNode: this.cancelAtNode,
                },
                t || {}
              );
            },
            edgeNode: function () {},
            next: function () {},
            subText: function () {},
          }),
          p = ht.extend({
            subText: function (n, t) {
              return n.substring(0, t);
            },
            next: function (n) {
              return n.previousSibling;
            },
            edgeNode: function (n) {
              return n.lastChild;
            },
            clone: function (n) {
              var t = this.extendOptions(n);
              return new p(t);
            },
          }),
          w = ht.extend({
            subText: function (n, t) {
              return n.substring(t);
            },
            next: function (n) {
              return n.nextSibling;
            },
            edgeNode: function (n) {
              return n.firstChild;
            },
            clone: function (n) {
              var t = this.extendOptions(n);
              return new w(t);
            },
          });
        lt(u.ui.editor, {
          LinkFormatFinder: rt,
          LinkFormatter: v,
          UnlinkCommand: ut,
          LinkCommand: ft,
          AutoLinkCommand: et,
          UnlinkTool: ot,
          DomTextLinkDetection: st,
          LeftDomTextTraverser: p,
          RightDomTextTraverser: w,
        });
        l(
          "createLink",
          new o({
            key: "K",
            ctrl: !0,
            command: ft,
            template: new d({
              template: k.buttonTemplate,
              title: "Create Link",
            }),
          })
        );
        l(
          "unlink",
          new ot({
            key: "K",
            ctrl: !0,
            shift: !0,
            template: new d({
              template: k.buttonTemplate,
              title: "Remove Link",
            }),
          })
        );
        l(
          "autoLink",
          new o({
            key: [tt.ENTER, tt.SPACEBAR],
            keyPressCommand: !0,
            command: et,
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/formatblock.min", ["editor/plugins/format.min"], n);
  })(
    function () {
      !(function (n) {
        var u,
          a = window.kendo,
          v = a.Class,
          y = n.extend,
          i = a.ui.editor,
          e = a.ui.Editor.fn.options.formats,
          t = i.Dom,
          o = i.ToolTemplate,
          w = i.FormatTool,
          r = i.EditorUtils,
          s = r.registerTool,
          h = r.registerFormat,
          p = i.RangeUtils,
          c = v.extend({
            init: function (n) {
              this.format = n;
            },
            contains: function (n, i) {
              for (var u, r = 0, f = i.length; r < f; r++)
                if (((u = i[r]), !u || !t.isAncestorOrSelf(n, u))) return !1;
              return !0;
            },
            findSuitable: function (i) {
              for (
                var f, e, s = this.format, u = [], r = 0, o = i.length;
                r < o;
                r++
              ) {
                for (
                  e = s.length - 1;
                  e >= 0 &&
                  !(f = t.ofType(i[r], s[e].tags)
                    ? i[r]
                    : t.closestEditableOfType(i[r], s[e].tags));
                  e--
                );
                if (!f || "true" === f.contentEditable) return [];
                n.inArray(f, u) < 0 && u.push(f);
              }
              for (this._resolveListsItems(u), r = 0, o = u.length; r < o; r++)
                if (this.contains(u[r], u)) return [u[r]];
              return u;
            },
            _resolveListsItems: function (n) {
              for (var u, i, r = 0; r < n.length; r++)
                (u = n[r]),
                  (i = t.is(u, "li") ? u : t.wrapper(u)),
                  (i = i && t.list(i) ? i.children[0] : i),
                  t.is(i, "li") && (u = n[r] = i);
            },
            findFormat: function (n) {
              for (
                var r,
                  f,
                  e,
                  o,
                  s = this.format,
                  c = t.editableParent(n),
                  l = this.options && this.options.immutables,
                  a = i.Immutables,
                  u = 0,
                  h = s.length;
                u < h;
                u++
              ) {
                if (
                  ((r = n),
                  (f = s[u].tags),
                  (e = s[u].attr),
                  l &&
                    f &&
                    "immutable" == f[0] &&
                    ((o = a.immutableParent(r)), o && t.attrEquals(o, e)))
                )
                  return r;
                for (; r && t.isAncestorOf(c, r); ) {
                  if (t.ofType(r, f) && t.attrEquals(r, e)) return r;
                  r = r.parentNode;
                }
              }
              return null;
            },
            getFormat: function (n) {
              var i,
                u,
                e = this,
                f = function (n) {
                  return e.findFormat(t.isDataNode(n) ? n.parentNode : n);
                },
                r = f(n[0]);
              if (!r) return "";
              for (i = 1, u = n.length; i < u; i++) if (r != f(n[i])) return "";
              return r.nodeName.toLowerCase();
            },
            isFormatted: function (n) {
              for (var t = 0, i = n.length; t < i; t++)
                if (!this.findFormat(n[t])) return !1;
              return !0;
            },
          }),
          l = v.extend({
            init: function (n, t) {
              this.format = n;
              this.values = t;
              this.finder = new c(n);
            },
            wrap: function (n, i, r) {
              var o,
                h,
                u,
                s,
                f,
                e =
                  1 == r.length
                    ? t.blockParentOrBody(r[0])
                    : t.commonAncestor.apply(null, r);
              for (
                t.isInline(e) && (e = t.blockParentOrBody(e)),
                  o = t.significantChildNodes(e),
                  h = t.findNodeIndex(o[0]),
                  u = t.create(e.ownerDocument, n, i),
                  s = 0;
                s < o.length;
                s++
              )
                (f = o[s]),
                  t.isBlock(f)
                    ? (t.attr(f, i),
                      u.childNodes.length &&
                        (t.insertBefore(u, f), (u = u.cloneNode(!1))),
                      (h = t.findNodeIndex(f) + 1))
                    : u.appendChild(f);
              u.firstChild && t.insertAt(e, u, h);
            },
            apply: function (i) {
              function o(n) {
                return y({}, n && n.attr, v);
              }
              var u,
                s,
                c,
                l,
                h,
                f,
                e,
                a,
                v = this.values;
              if (
                (this._handleImmutables(i, !0),
                (s = t.filter("img", i)),
                (c = r.formatByName("img", this.format)),
                (l = o(c)),
                n.each(s, function () {
                  t.attr(this, l);
                }),
                s.length != i.length)
              )
                if (
                  ((h = t.filter("img", i, !0)),
                  (f = this.finder.findSuitable(h)),
                  f.length)
                )
                  for (e = 0, a = f.length; e < a; e++)
                    (u = r.formatByName(t.name(f[e]), this.format)),
                      t.attr(f[e], o(u));
                else (u = this.format[0]), this.wrap(u.tags[0], o(u), h);
            },
            _handleImmutables: function (n, u) {
              var o, s, h, f, e;
              if (
                this.immutables() &&
                (o = r.formatByName("immutable", this.format))
              )
                for (s = i.Immutables, h = n.length - 1, f = h; f >= 0; f--)
                  (e = s.immutableParent(n[f])),
                    e &&
                      (e !== n[f + 1] &&
                        (u ? t.attr(e, o.attr) : t.unstyle(e, o.attr.style)),
                      n.splice(f, 1));
            },
            immutables: function () {
              return this.editor && this.editor.options.immutables;
            },
            remove: function (n) {
              var f, e, i, u, o;
              for (
                this._handleImmutables(n, !1), f = 0, e = n.length;
                f < e;
                f++
              )
                (i = this.finder.findFormat(n[f])),
                  i &&
                    ((o = t.name(i)),
                    (u = r.formatByName(o, this.format)),
                    u.attr.style && t.unstyle(i, u.attr.style),
                    u.attr.className && t.removeClass(i, u.attr.className));
            },
            toggle: function (n) {
              var i = this,
                r = t.filterBy(p.nodes(n), t.htmlIndentSpace, !0);
              i.finder.isFormatted(r) ? i.remove(r) : i.apply(r);
            },
          }),
          b = v.extend({
            init: function (n, t) {
              var i = this;
              i.format = n;
              i.values = t;
              i.finder = new c(n);
            },
            apply: function (n) {
              var u,
                a,
                v,
                y,
                o,
                p,
                s,
                r,
                w,
                h,
                f = this.format,
                e = t.blockParents(n),
                c = f[0].tags[0];
              if (e.length)
                for (u = 0, a = e.length; u < a; u++)
                  (r = e[u]),
                    (w = this.immutables() && i.Immutables.immutableParent(r)),
                    w ||
                      ((s = t.name(r)),
                      "li" == s
                        ? ((v = r.parentNode),
                          (y = new i.ListFormatter(
                            v.nodeName.toLowerCase(),
                            c
                          )),
                          (o = this.editor.createRange()),
                          o.selectNode(e[u]),
                          y.toggle(o))
                        : c && ("td" == s || r.attributes.contentEditable)
                        ? new l(f, this.values).apply(r.childNodes)
                        : ((p = t.changeTag(r, c)), t.attr(p, f[0].attr)));
              else
                (h = new l(f, this.values)),
                  (h.editor = this.editor),
                  h.apply(n);
            },
            toggle: function (n) {
              var i = p.textNodes(n);
              i.length ||
                (n.selectNodeContents(n.commonAncestorContainer),
                (i = p.textNodes(n)),
                i.length ||
                  (i = t.significantChildNodes(n.commonAncestorContainer)));
              this.apply(i);
            },
            immutables: function () {
              return this.editor && this.editor.options.immutables;
            },
          }),
          f = w.extend({
            init: function (n) {
              w.fn.init.call(
                this,
                y(n, {
                  finder: new c(n.format),
                  formatter: function () {
                    return new l(n.format);
                  },
                })
              );
            },
          });
        y(i, {
          BlockFormatFinder: c,
          BlockFormatter: l,
          GreedyBlockFormatter: b,
          BlockFormatTool: f,
        });
        u = ["ul", "ol", "li"];
        h("justifyLeft", [
          {
            tags: t.nonListBlockElements,
            attr: { style: { textAlign: "left" } },
          },
          {
            tags: ["img"],
            attr: {
              style: {
                float: "left",
                display: "",
                marginLeft: "",
                marginRight: "",
              },
            },
          },
          {
            tags: ["immutable"],
            attr: {
              style: {
                float: "left",
                display: "",
                marginLeft: "",
                marginRight: "",
              },
            },
          },
          {
            tags: u,
            attr: { style: { textAlign: "left", listStylePosition: "" } },
          },
        ]);
        s(
          "justifyLeft",
          new f({
            format: e.justifyLeft,
            template: new o({
              template: r.buttonTemplate,
              title: "Justify Left",
            }),
          })
        );
        h("justifyCenter", [
          {
            tags: t.nonListBlockElements,
            attr: { style: { textAlign: "center" } },
          },
          {
            tags: ["img"],
            attr: {
              style: {
                display: "block",
                marginLeft: "auto",
                marginRight: "auto",
                float: "",
              },
            },
          },
          {
            tags: ["immutable"],
            attr: {
              style: {
                display: "block",
                marginLeft: "auto",
                marginRight: "auto",
                float: "",
              },
            },
          },
          {
            tags: u,
            attr: {
              style: { textAlign: "center", listStylePosition: "inside" },
            },
          },
        ]);
        s(
          "justifyCenter",
          new f({
            format: e.justifyCenter,
            template: new o({
              template: r.buttonTemplate,
              title: "Justify Center",
            }),
          })
        );
        h("justifyRight", [
          {
            tags: t.nonListBlockElements,
            attr: { style: { textAlign: "right" } },
          },
          {
            tags: ["img"],
            attr: {
              style: {
                float: "right",
                display: "",
                marginLeft: "",
                marginRight: "",
              },
            },
          },
          {
            tags: ["immutable"],
            attr: {
              style: {
                float: "right",
                display: "",
                marginLeft: "",
                marginRight: "",
              },
            },
          },
          {
            tags: u,
            attr: {
              style: { textAlign: "right", listStylePosition: "inside" },
            },
          },
        ]);
        s(
          "justifyRight",
          new f({
            format: e.justifyRight,
            template: new o({
              template: r.buttonTemplate,
              title: "Justify Right",
            }),
          })
        );
        h("justifyFull", [
          {
            tags: t.nonListBlockElements,
            attr: { style: { textAlign: "justify" } },
          },
          {
            tags: ["img"],
            attr: {
              style: {
                display: "block",
                marginLeft: "auto",
                marginRight: "auto",
                float: "",
              },
            },
          },
          {
            tags: ["immutable"],
            attr: {
              style: {
                display: "block",
                marginLeft: "auto",
                marginRight: "auto",
                float: "",
              },
            },
          },
          {
            tags: u,
            attr: { style: { textAlign: "justify", listStylePosition: "" } },
          },
        ]);
        s(
          "justifyFull",
          new f({
            format: e.justifyFull,
            template: new o({
              template: r.buttonTemplate,
              title: "Justify Full",
            }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/lists.min", ["editor/plugins/formatblock.min"], n);
  })(
    function () {
      !(function (n) {
        var s = window.kendo,
          b = s.Class,
          u = n.extend,
          i = s.ui.editor,
          t = i.Dom,
          f = i.RangeUtils,
          h = i.EditorUtils,
          c = i.Command,
          l = i.ToolTemplate,
          a = i.FormatTool,
          v = i.BlockFormatFinder,
          e = f.textNodes,
          y = i.EditorUtils.registerTool,
          r = v.extend({
            init: function (n) {
              this.tag = n;
              var t = (this.tags = ["ul" == n ? "ol" : "ul", n]);
              v.fn.init.call(this, [{ tags: t }]);
            },
            isFormatted: function (n) {
              for (var r, u = [], i = 0; i < n.length; i++)
                (r = this.findFormat(n[i])),
                  r && t.name(r) == this.tag && u.push(r);
              if (u.length < 1 || u.length != n.length) return !1;
              for (i = 0; i < u.length && u[i].parentNode == r.parentNode; i++)
                if (u[i] != r) return !1;
              return !0;
            },
            findSuitable: function (n) {
              var i = this.findFormat(n[0]);
              return i && t.name(i) == this.tag ? i : null;
            },
          }),
          p = b.extend({
            init: function (n, t) {
              var i = this;
              i.finder = new r(n);
              i.tag = n;
              i.unwrapTag = t;
            },
            isList: function (n) {
              return t.list(n);
            },
            immutables: function () {
              return this.editor && !!this.editor.options.immutables;
            },
            wrap: function (r, u) {
              for (
                var f,
                  e = t.create(r.ownerDocument, "li"),
                  s = this.immutables() ? i.Immutables.immutable : n.noop,
                  o = 0;
                o < u.length;
                o++
              )
                if (((f = u[o]), t.is(f, "li"))) r.appendChild(f);
                else if (this.isList(f))
                  for (; f.firstChild; ) r.appendChild(f.firstChild);
                else if (t.is(f, "td")) {
                  for (; f.firstChild; ) e.appendChild(f.firstChild);
                  r.appendChild(e);
                  f.appendChild(r);
                  r = r.cloneNode(!1);
                  e = e.cloneNode(!1);
                } else
                  e.appendChild(f),
                    t.isBlock(f) &&
                      (r.appendChild(e),
                      s(f) || t.unwrap(f),
                      (e = e.cloneNode(!1)));
              e.firstChild && r.appendChild(e);
            },
            containsAny: function (n, i) {
              for (var r = 0; r < i.length; r++)
                if (t.isAncestorOrSelf(n, i[r])) return !0;
              return !1;
            },
            suitable: function (n, i) {
              if ("k-marker" == n.className) {
                var r = n.nextSibling;
                if (
                  (r && t.isBlock(r)) ||
                  ((r = n.previousSibling), r && t.isBlock(r))
                )
                  return !1;
              }
              return this.containsAny(n, i) || t.isInline(n) || 3 == n.nodeType;
            },
            _parentLists: function (i) {
              var r = t.closestEditable(i);
              return n(i).parentsUntil(r, "ul,ol");
            },
            split: function (n) {
              var s,
                h,
                o,
                r,
                c,
                u,
                i = e(n);
              if (i.length)
                for (
                  s = t.parentOfType(i[0], ["li"]),
                    h = t.parentOfType(i[i.length - 1], ["li"]),
                    n.setStartBefore(s),
                    n.setEndAfter(h),
                    r = 0,
                    c = i.length;
                  r < c;
                  r++
                )
                  (u = this.finder.findFormat(i[r])),
                    u &&
                      ((o = this._parentLists(u)),
                      o.length
                        ? f.split(n, o.last()[0], !0)
                        : f.split(n, u, !0));
            },
            merge: function (n, i) {
              for (
                var r, u = i.previousSibling;
                u &&
                ("k-marker" == u.className ||
                  (3 == u.nodeType && t.isWhitespace(u)));

              )
                u = u.previousSibling;
              if (u && t.name(u) == n) {
                for (; i.firstChild; ) u.appendChild(i.firstChild);
                t.remove(i);
                i = u;
              }
              for (
                r = i.nextSibling;
                r &&
                ("k-marker" == r.className ||
                  (3 == r.nodeType && t.isWhitespace(r)));

              )
                r = r.nextSibling;
              if (r && t.name(r) == n) {
                for (; i.lastChild; ) r.insertBefore(i.lastChild, r.firstChild);
                t.remove(i);
              }
            },
            breakable: function (n) {
              return (
                n != n.ownerDocument.body &&
                !/table|tbody|tr|td/.test(t.name(n)) &&
                !n.attributes.contentEditable
              );
            },
            applyOnSection: function (i, u) {
              function v() {
                o.push(this);
              }
              var e,
                l,
                s,
                a,
                h = this.tag,
                c = t.closestSplittableParent(u),
                o = [],
                f = this.finder.findSuitable(u);
              for (
                f || (f = new r("ul" == h ? "ol" : "ul").findSuitable(u)),
                  /table|tbody/.test(t.name(c))
                    ? (e = n.map(u, function (n) {
                        return t.parentOfType(n, ["td"]);
                      }))
                    : ((e = t.significantChildNodes(c)),
                      n.grep(e, t.isBlock).length &&
                        (e = n.grep(
                          e,
                          n.proxy(function (n) {
                            return this.containsAny(n, u);
                          }, this)
                        )),
                      e.length || (e = u)),
                  l = 0;
                l < e.length;
                l++
              )
                (s = e[l]),
                  (a =
                    (!f || !t.isAncestorOrSelf(f, s)) && this.suitable(s, u)),
                  a &&
                    (f && this.isList(s)
                      ? (n.each(s.children, v), t.remove(s))
                      : o.push(s));
              for (
                o.length == e.length && this.breakable(c) && (o = [c]),
                  f ||
                    ((f = t.create(c.ownerDocument, h)),
                    t.isBlock(o[0]) && t.mergeAttributes(o[0], f),
                    t.insertBefore(f, o[0])),
                  this.wrap(f, o);
                t.isBom(f.nextSibling);

              )
                t.remove(f.nextSibling);
              t.is(f, h) || t.changeTag(f, h);
              this.merge(h, f);
            },
            apply: function (r) {
              function c() {
                f && o.push({ section: f, nodes: s });
              }
              for (
                var f,
                  s,
                  h,
                  e,
                  u = 0,
                  o = [],
                  l = r.length,
                  a = this.immutables() ? i.Immutables.immutableParent : n.noop,
                  u = 0;
                u < l;
                u++
              )
                (e = a(r[u]) || r[u]),
                  (h = t.closestEditable(e, ["td", "body"])),
                  f && h == f ? s.push(e) : (c(), (s = [e]), (f = h));
              for (c(), u = 0; u < o.length; u++)
                this.applyOnSection(o[u].section, o[u].nodes);
            },
            unwrap: function (n) {
              for (
                var f,
                  i,
                  e,
                  u = n.ownerDocument.createDocumentFragment(),
                  o = this.unwrapTag,
                  r = n.firstChild;
                r;
                r = r.nextSibling
              ) {
                for (i = t.create(n.ownerDocument, o || "p"); r.firstChild; )
                  (e = r.firstChild),
                    t.isBlock(e)
                      ? (i.firstChild &&
                          (u.appendChild(i),
                          (i = t.create(n.ownerDocument, o || "p"))),
                        u.appendChild(e))
                      : i.appendChild(e);
                i.firstChild && u.appendChild(i);
              }
              f = this._parentLists(n);
              f[0]
                ? (t.insertAfter(u, f.last()[0]), f.last().remove())
                : t.insertAfter(u, n);
              t.remove(n);
            },
            remove: function (n) {
              for (var i, t = 0, r = n.length; t < r; t++)
                (i = this.finder.findFormat(n[t])), i && this.unwrap(i);
            },
            toggle: function (n) {
              var r,
                u = this,
                i = e(n),
                f = n.commonAncestorContainer;
              i.length ||
                (n.selectNodeContents(f),
                (i = e(n)),
                i.length ||
                  ((r = f.ownerDocument.createTextNode("")),
                  n.startContainer.appendChild(r),
                  (i = [r]),
                  n.selectNode(r.parentNode)));
              i = t.filterBy(i, t.htmlIndentSpace, !0);
              u.finder.isFormatted(i) ? (u.split(n), u.remove(i)) : u.apply(i);
            },
          }),
          w = c.extend({
            init: function (n) {
              n.formatter = new p(n.tag);
              c.fn.init.call(this, n);
            },
          }),
          o = a.extend({
            init: function (n) {
              this.options = n;
              a.fn.init.call(this, u(n, { finder: new r(n.tag) }));
            },
            command: function (n) {
              return new w(u(n, { tag: this.options.tag }));
            },
          });
        u(i, {
          ListFormatFinder: r,
          ListFormatter: p,
          ListCommand: w,
          ListTool: o,
        });
        y(
          "insertUnorderedList",
          new o({
            tag: "ul",
            template: new l({
              template: h.buttonTemplate,
              title: "Insert unordered list",
            }),
          })
        );
        y(
          "insertOrderedList",
          new o({
            tag: "ol",
            template: new l({
              template: h.buttonTemplate,
              title: "Insert ordered list",
            }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/formatting.min", ["editor/plugins/inlineformat.min"], n);
  })(
    function () {
      !(function (n) {
        function a(n) {
          var e,
            u,
            f = i.closestEditableOfType(n, ["li"]);
          f &&
            ((e = new t.ListFormatter(i.name(f.parentNode))),
            (u = r.ui.editor.W3CRange.fromNode(n)),
            u.selectNode(f),
            e.toggle(u));
        }
        var r = window.kendo,
          t = r.ui.editor,
          u = t.Tool,
          e = t.ToolTemplate,
          o = t.DelayedExecutionTool,
          v = t.Command,
          i = t.Dom,
          f = t.EditorUtils,
          s = t.RangeUtils,
          h = f.registerTool,
          c = o.extend({
            init: function (n) {
              var t = this;
              u.fn.init.call(t, r.deepExtend({}, t.options, n));
              t.type = "kendoSelectBox";
              t.finder = {
                getFormat: function () {
                  return "";
                },
              };
            },
            options: {
              items: [
                { text: "Paragraph", value: "p" },
                { text: "Quotation", value: "blockquote" },
                { text: "Heading 1", value: "h1" },
                { text: "Heading 2", value: "h2" },
                { text: "Heading 3", value: "h3" },
                { text: "Heading 4", value: "h4" },
                { text: "Heading 5", value: "h5" },
                { text: "Heading 6", value: "h6" },
              ],
              width: 110,
            },
            toFormattingItem: function (n) {
              var i,
                t = n.value;
              return t
                ? n.tag || n.className
                  ? n
                  : ((i = t.indexOf(".")),
                    0 === i
                      ? (n.className = t.substring(1))
                      : i == -1
                      ? (n.tag = t)
                      : ((n.tag = t.substring(0, i)),
                        (n.className = t.substring(i + 1))),
                    n)
                : n;
            },
            command: function (r) {
              var f = this,
                u = r.value;
              return (
                (u = this.toFormattingItem(u)),
                new t.FormatCommand({
                  range: r.range,
                  formatter: function () {
                    var r,
                      e = (u.tag || u.context || "span").split(","),
                      o = [{ tags: e, attr: { className: u.className || "" } }];
                    return (
                      (r =
                        n.inArray(e[0], i.inlineElements) >= 0
                          ? new t.GreedyInlineFormatter(o)
                          : new t.GreedyBlockFormatter(o)),
                      (r.editor = f.editor),
                      r
                    );
                  },
                })
              );
            },
            initialize: function (n, t) {
              var o,
                i = t.editor,
                e = this.options,
                f = e.name,
                s = this;
              s.editor = i;
              n.width(e.width);
              o = n
                .kendoSelectBox({
                  dataTextField: "text",
                  dataValueField: "value",
                  dataSource: e.items || i.options[f],
                  title: i.options.messages[f],
                  autoSize: !0,
                  change: function () {
                    var n = this.dataItem();
                    n && u.exec(i, f, n.toJSON());
                  },
                  dataBound: function () {
                    for (
                      var t = this.dataSource.data(), n = 0;
                      n < t.length;
                      n++
                    )
                      t[n] = s.toFormattingItem(t[n]);
                  },
                  highlightFirst: !1,
                  template: r.template(
                    '<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>'
                  ),
                })
                .data("kendoSelectBox");
              n.attr("title", t.title);
              o.wrapper.attr("title", t.title);
              n.addClass("k-decorated")
                .closest(".k-widget")
                .removeClass("k-" + f)
                .find("*")
                .addBack()
                .attr("unselectable", "on");
            },
            getFormattingValue: function (t, i) {
              for (var r, o, s, e, h, u, f = 0; f < t.length; f++)
                if (
                  ((r = t[f]),
                  (o = r.tag || r.context || ""),
                  (s = r.className ? "." + r.className : ""),
                  (e = o + s),
                  (h = n(i[0]).closest(e)[0]))
                ) {
                  if (1 == i.length) return r.value;
                  for (u = 1; u < i.length && n(i[u]).closest(e)[0]; u++)
                    if (u == i.length - 1) return r.value;
                }
              return "";
            },
            update: function (t, r) {
              var f,
                s,
                e,
                c,
                u,
                h = n(t).data(this.type);
              if (
                h &&
                ((f = h.dataSource),
                (s = f.data()),
                (u = i.commonAncestor.apply(null, r)),
                u == i.closestEditable(u) || this._ancestor != u)
              ) {
                for (this._ancestor = u, e = 0; e < s.length; e++)
                  (c = s[e].context),
                    (s[e].visible = !c || !!n(u).closest(c).length);
                f.filter([{ field: "visible", operator: "eq", value: !0 }]);
                o.fn.update.call(this, t, r);
                h.value(this.getFormattingValue(f.view(), r));
                h.wrapper.toggleClass("k-state-disabled", !f.view().length);
              }
            },
            destroy: function () {
              this._ancestor = null;
            },
          }),
          l = v.extend({
            exec: function () {
              var t,
                n,
                i,
                r = this.lockRange(!0);
              for (
                this.tagsToClean =
                  this.options.remove ||
                  "strong,em,span,sup,sub,del,b,i,u,font".split(","),
                  s.wrapSelectedElements(r),
                  t = s.mapAll(r, function (n) {
                    return n;
                  }),
                  n = t.length - 1;
                n >= 0;
                n--
              )
                (i = t[n]), this.immutableParent(i) || this.clean(i);
              this.releaseRange(r);
            },
            clean: function (r) {
              var u, o, f, s, e;
              if (r && !i.isMarker(r)) {
                if (((u = i.name(r)), "ul" == u || "ol" == u))
                  for (
                    o = new t.ListFormatter(u),
                      f = r.previousSibling,
                      s = r.nextSibling,
                      o.unwrap(r);
                    f && f != s;
                    f = f.nextSibling
                  )
                    this.clean(f);
                else if ("blockquote" == u) i.changeTag(r, "p");
                else if (1 != r.nodeType || i.insignificant(r)) a(r);
                else {
                  for (e = r.childNodes.length - 1; e >= 0; e--)
                    this.clean(r.childNodes[e]);
                  r.removeAttribute("style");
                  r.removeAttribute("class");
                }
                n.inArray(u, this.tagsToClean) > -1 && i.unwrap(r);
              }
            },
            immutableParent: function (n) {
              return this.immutables() && t.Immutables.immutableParent(n);
            },
          });
        n.extend(t, { FormattingTool: c, CleanFormatCommand: l });
        h(
          "formatting",
          new c({
            template: new e({
              template: f.dropDownListTemplate,
              title: "Format",
            }),
          })
        );
        h(
          "cleanFormatting",
          new u({
            command: l,
            template: new e({
              template: f.buttonTemplate,
              title: "Clean formatting",
            }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "editor/plugins/image.min",
      ["kendo.imagebrowser.min", "editor/command.min"],
      n
    );
  })(
    function () {
      !(function (n, t) {
        var i = window.kendo,
          y = n.extend,
          r = i.ui.editor,
          o = r.EditorUtils,
          f = r.Dom,
          p = o.registerTool,
          w = r.ToolTemplate,
          u = r.RangeUtils,
          s = r.Command,
          h = i.keys,
          e = "#k-editor-image-url",
          c = "#k-editor-image-title",
          l = "#k-editor-image-width",
          a = "#k-editor-image-height",
          v = s.extend({
            init: function (n) {
              var t = this;
              s.fn.init.call(t, n);
              t.async = !0;
              t.attributes = {};
            },
            insertImage: function (n, t) {
              var r,
                i = this.attributes,
                e = u.documentFromRange(t);
              if (i.src && "http://" != i.src) {
                if (
                  ((r = function () {
                    setTimeout(function () {
                      i.width || n.removeAttribute("width");
                      i.height || n.removeAttribute("height");
                      n.removeAttribute("complete");
                    });
                  }),
                  !n)
                )
                  return (
                    (n = f.create(e, "img", i)),
                    (n.onload = n.onerror = r),
                    t.deleteContents(),
                    t.insertNode(n),
                    n.nextSibling || f.insertAfter(e.createTextNode("﻿"), n),
                    r(),
                    t.setStartAfter(n),
                    t.setEndAfter(n),
                    u.selectRange(t),
                    !0
                  );
                n.onload = n.onerror = r;
                f.attr(n, i);
                r();
              }
              return !1;
            },
            _dialogTemplate: function (n) {
              return i.template(
                '<div class="k-editor-dialog k-popup-edit-form"><div class="k-edit-form-container"><div class="k-edit-form-content"># if (showBrowser) { #<div class="k-filebrowser k-imagebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-image-url">#: messages.imageWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-image-url"></div><div class=\'k-edit-label\'><label for="k-editor-image-title">#: messages.imageAltText #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-image-title"></div><div class=\'k-edit-label\'><label for="k-editor-image-width">#: messages.imageWidth #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-image-width"></div><div class=\'k-edit-label\'><label for="k-editor-image-height">#: messages.imageHeight #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-image-height"></div></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div></div>'
              )({ messages: this.editor.options.messages, showBrowser: n });
            },
            redo: function () {
              var n = this,
                t = n.lockRange();
              n.insertImage(u.image(t), t) || n.releaseRange(t);
            },
            exec: function () {
              function k(t) {
                var i = s.element,
                  u = parseInt(i.find(l).val(), 10),
                  f = parseInt(i.find(a).val(), 10);
                n.attributes = {
                  src: i.find(e).val().replace(/ /g, "%20"),
                  alt: i.find(c).val(),
                };
                n.attributes.width = null;
                n.attributes.height = null;
                !isNaN(u) && u > 0 && (n.attributes.width = u);
                !isNaN(f) && f > 0 && (n.attributes.height = f);
                nt = n.insertImage(r, v);
                w(t);
                n.change && n.change();
              }
              function w(t) {
                t.preventDefault();
                s.destroy();
                f.windowFromDocument(u.documentFromRange(v)).focus();
                nt || n.releaseRange(v);
              }
              function it(n) {
                n.keyCode == h.ENTER ? k(n) : n.keyCode == h.ESC && w(n);
              }
              var s,
                o,
                g,
                n = this,
                v = n.lockRange(),
                nt = !1,
                r = u.image(v),
                rt = (r && r.getAttribute("width")) || "",
                ut = (r && r.getAttribute("height")) || "",
                ft = i.support.browser.msie,
                tt = n.editor.options,
                et = tt.messages,
                b = tt.imageBrowser,
                p = !!(
                  i.ui.ImageBrowser &&
                  b &&
                  b.transport &&
                  b.transport.read !== t
                ),
                d = { title: et.insertImage, visible: !1, resizable: p };
              this.expandImmutablesIn(v);
              d.close = w;
              p && (d.width = 750);
              s = this.createDialog(n._dialogTemplate(p), d)
                .toggleClass("k-filebrowser-dialog", p)
                .find(".k-dialog-insert")
                .click(k)
                .end()
                .find(".k-dialog-close")
                .click(w)
                .end()
                .find(".k-edit-field input")
                .keydown(it)
                .end()
                .find(e)
                .val(r ? r.getAttribute("src", 2) : "http://")
                .end()
                .find(c)
                .val(r ? r.alt : "")
                .end()
                .find(l)
                .val(rt)
                .end()
                .find(a)
                .val(ut)
                .end()
                .data("kendoWindow");
              o = s.element;
              p &&
                ((this._imageBrowser = new i.ui.ImageBrowser(
                  o.find(".k-imagebrowser"),
                  y({}, b)
                )),
                this._imageBrowser.bind("change", function (n) {
                  "f" === n.selected.get("type") && o.find(e).val(this.value());
                }),
                this._imageBrowser.bind("apply", k));
              ft &&
                ((g = o.closest(".k-window").height()), o.css("max-height", g));
              s.center().open();
              o.find(e).focus().select();
            },
          });
        i.ui.editor.ImageCommand = v;
        p(
          "insertImage",
          new r.Tool({
            command: v,
            template: new w({
              template: o.buttonTemplate,
              title: "Insert Image",
            }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/import.min", ["editor/main.min"], n);
  })(
    function () {
      !(function (n) {
        var r = window.kendo,
          o = n.extend,
          i = n.proxy,
          t = r.ui.editor,
          u = t.EditorUtils,
          s = t.Command,
          h = t.Tool,
          c = u.registerTool,
          l = t.ToolTemplate,
          f =
            '<div contenteditable="false" class="k-loading-mask" style="width: 100%; height: 100%; position: absolute; top: 0px; left: 0px;"><div class="k-loading-image"></div><div class="k-loading-color"></div></div>',
          e = s.extend({
            exec: function () {
              (
                this.editor._uploadWidget || this._initializeUploadWidget()
              ).element.click();
            },
            _initializeUploadWidget: function () {
              var t = this,
                u = t.editor,
                r = u.options["import"],
                f = n('<input id="editorImport" name="files" type="file" />')
                  .kendoUpload({
                    success: i(t._onUploadSuccess, t),
                    progress: i(t._onUploadProgress, t),
                    select: i(t._onUploadSelect, t),
                    error: i(t._onUploadError, t),
                    complete: i(t._onUploadComplete, t),
                    showFileList: !1,
                    multiple: !1,
                    async: {
                      saveUrl: r.proxyUrl,
                      autoUpload: !0,
                      saveField: "file",
                    },
                    validation: {
                      allowedExtensions: r.allowedExtensions,
                      maxFileSize: r.maxFileSize,
                    },
                  })
                  .getKendoUpload();
              return (u._uploadWidget = f), f;
            },
            _onUploadComplete: function (n) {
              this._trigger("complete", n);
              n.sender.clearAllFiles();
              this._removeLoadingOverlay();
            },
            _onUploadSuccess: function (n) {
              this.editor.value(n.response.html.replace(/<\/?body>/gi, ""));
              this._trigger("success", n);
            },
            _onUploadProgress: function (n) {
              this._trigger("progress", n);
            },
            _onUploadSelect: function (n) {
              this._trigger("select", n);
              n.files[0].validationErrors || this._initLoadingOverlay();
            },
            _onUploadError: function (n) {
              this._trigger("error", n);
            },
            _trigger: function (n, t) {
              var i = this.editor,
                r = i.options["import"];
              "function" == typeof r[n] && r[n].call(i, t);
            },
            _initLoadingOverlay: function () {
              var i = this.editor.body;
              t.Dom.is(i, "body")
                ? (this._iframeWrapper = this._container =
                    this.editor.wrapper
                      .find("iframe")
                      .parent()
                      .css({ position: "relative" })
                      .append(f))
                : (this._container = n(i).append(f));
              r.ui.progress(this._container, !0);
            },
            _removeLoadingOverlay: function () {
              r.ui.progress(this._container, !1);
              n(this._iframeWrapper).css({ position: "" });
              delete this._container;
              delete this._iframeWrapper;
            },
          });
        o(t, { ImportCommand: e });
        c(
          "import",
          new h({
            command: e,
            template: new l({ template: u.buttonTemplate, title: "Import" }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/insert.min", ["editor/command.min"], n);
  })(
    function () {
      !(function (n) {
        var s = window.kendo,
          t = s.ui.editor,
          i = t.Command,
          h = t.GenericCommand,
          r = t.EditorUtils,
          c = r.registerTool,
          u = t.Tool,
          l = t.ToolTemplate,
          f = t.RestorePoint,
          a = n.extend,
          e = i.extend({
            init: function (n) {
              i.fn.init.call(this, n);
              this.managesUndoRedo = !0;
            },
            exec: function () {
              var i,
                n = this.editor,
                t = this.options,
                r = t.range,
                u = n.body,
                e = new f(r, u),
                o = t.html || t.value || "";
              n.selectRange(r);
              n.clipboard.paste(o, t);
              t.postProcess && t.postProcess(n, n.getRange());
              i = new h(e, new f(n.getRange(), u));
              i.editor = n;
              n.undoRedoStack.push(i);
              n.focus();
            },
          }),
          o = u.extend({
            initialize: function (n, i) {
              var r = i.editor,
                f = this.options,
                e = f.items ? f.items : r.options.insertHtml;
              this._selectBox = new t.SelectBox(n, {
                dataSource: e,
                dataTextField: "text",
                dataValueField: "value",
                change: function () {
                  u.exec(r, "insertHtml", this.value());
                },
                title: r.options.messages.insertHtml,
                highlightFirst: !1,
              });
              n.attr("title", i.title);
              this._selectBox.wrapper.attr("title", i.title);
            },
            command: function (n) {
              return new e(n);
            },
            update: function (n) {
              var t =
                n.data("kendoSelectBox") ||
                n.find("select").data("kendoSelectBox");
              t.close();
              t.value(t.options.title);
            },
          });
        a(t, { InsertHtmlCommand: e, InsertHtmlTool: o });
        c(
          "insertHtml",
          new o({
            template: new l({
              template: r.dropDownListTemplate,
              title: "Insert HTML",
              initialValue: "Insert HTML",
            }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/export.min", ["editor/main.min"], n);
  })(
    function () {
      !(function (n) {
        var i = window.kendo,
          o = n.extend,
          s = n.proxy,
          t = i.ui.editor,
          u = t.EditorUtils,
          f = t.Command,
          r = t.Tool,
          h = u.registerTool,
          c = t.ToolTemplate,
          l = f.extend({
            init: function (n) {
              var t = this;
              t.options = n;
              f.fn.init.call(t, n);
              t.attributes = null;
              t.exportType = n.exportType;
            },
            exec: function () {
              var n = this,
                t = this.lockRange(!0);
              n.postToProxy();
              n.releaseRange(t);
            },
            postToProxy: function () {
              this.generateForm().appendTo("body").submit().remove();
            },
            generateForm: function () {
              var t = this,
                i = t.editor.options.exportAs,
                r = n("<form>").attr({
                  action: (i && i.proxyURL) || "",
                  method: "POST",
                });
              return (
                r.append([
                  t.valueInput(),
                  t.exportTypeInput(),
                  t.fileNameInput(),
                ]),
                r
              );
            },
            valueInput: function () {
              var t = this.editor;
              return n("<input>").attr({
                value: t.encodedValue(),
                name: "value",
                type: "hidden",
              });
            },
            exportTypeInput: function () {
              var t = this;
              return n("<input>").attr({
                value: t.exportType,
                name: "exportType",
                type: "hidden",
              });
            },
            fileNameInput: function () {
              var t = this.editor,
                i = t.options.exportAs,
                r = (i && i.fileName) || t.element.attr("id") || "editor";
              return n("<input>").attr({
                value: r,
                name: "fileName",
                type: "hidden",
              });
            },
          }),
          e = r.extend({
            init: function (n) {
              var t = this;
              r.fn.init.call(t, i.deepExtend({}, t.options, n));
              t.type = "kendoSelectBox";
            },
            options: {
              items: [
                { text: "Docx", value: "docx" },
                { text: "Rtf", value: "rtf" },
                { text: "Pdf", value: "pdf" },
                { text: "Html", value: "html" },
                { text: "Plain Text", value: "txt" },
              ],
              width: 115,
            },
            command: function (n) {
              var i = n.value;
              return new t.ExportAsCommand({
                range: n.range,
                exportType: i.exportType,
              });
            },
            initialize: function (n, t) {
              var o,
                r = this,
                u = t.editor,
                f = r.options,
                e = f.name,
                c = s(r.changeHandler, r),
                h = f.items || u.options[e];
              h.unshift({ text: u.options.messages[e], value: "" });
              r.editor = u;
              n.width(f.width);
              o = n
                .kendoSelectBox({
                  dataTextField: "text",
                  dataValueField: "value",
                  dataSource: h,
                  autoSize: !0,
                  change: c,
                  open: function (n) {
                    var t = n.sender;
                    t.items()[0].style.display = "none";
                    t.unbind("open");
                  },
                  highlightFirst: !1,
                  template: i.template(
                    '<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>'
                  ),
                })
                .data("kendoSelectBox");
              n.attr("title", t.title);
              o.wrapper.attr("title", t.title);
              n.addClass("k-decorated")
                .closest(".k-widget")
                .removeClass("k-" + e)
                .find("*")
                .addBack()
                .attr("unselectable", "on");
            },
            changeHandler: function (n) {
              var t = n.sender,
                i = t.dataItem(),
                r = i && i.value;
              this._exec(r);
              t.value("");
            },
            _exec: function (n) {
              n && r.exec(this.editor, this.options.name, { exportType: n });
            },
            destroy: function () {
              this._ancestor = null;
            },
          });
        o(t, { ExportAsTool: e, ExportAsCommand: l });
        h(
          "exportAs",
          new e({
            template: new c({
              template: u.dropDownListTemplate,
              title: "Export As",
            }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/indent.min", ["editor/plugins/formatblock.min"], n);
  })(
    function () {
      !(function (n, t) {
        function u(r, u) {
          var o = "rtl" == n(r).css("direction"),
            e = o ? "Right" : "Left",
            f = "td" != i.name(r) ? "margin" + e : "padding" + e;
          return u === t
            ? r.style[f] || 0
            : (u > 0
                ? (r.style[f] = u + "px")
                : ((r.style[f] = ""),
                  r.style.cssText || r.removeAttribute("style")),
              t);
        }
        var h = window.kendo,
          b = h.Class,
          k = n.extend,
          r = h.ui.editor,
          i = r.Dom,
          o = r.EditorUtils,
          c = o.registerTool,
          f = r.Command,
          e = r.Tool,
          l = r.ToolTemplate,
          a = r.RangeUtils,
          d = i.blockElements,
          v = r.BlockFormatFinder,
          g = r.BlockFormatter,
          s = b.extend({
            init: function () {
              this.finder = new v([{ tags: i.blockElements }]);
            },
            apply: function (t) {
              var e, o, s, v, r, a, h, l, f, y, c, p;
              if (
                ((t = i.filterBy(t, i.htmlIndentSpace, !0)),
                (e = this.finder.findSuitable(t)),
                (o = []),
                (e = this.mapImmutables(e)),
                e.length)
              ) {
                for (s = 0, v = e.length; s < v; s++)
                  i.is(e[s], "li")
                    ? n(e[s]).index()
                      ? n.inArray(e[s].parentNode, o) < 0 && o.push(e[s])
                      : o.push(e[s].parentNode)
                    : o.push(e[s]);
                for (; o.length; )
                  if (((r = o.shift()), i.is(r, "li")))
                    if (
                      ((a = r.parentNode),
                      (h = n(r).prev("li")),
                      (l = h.find("ul,ol").last()),
                      (f = n(r).children("ul,ol")[0]),
                      f && h[0])
                    )
                      l[0]
                        ? (l.append(r), l.append(n(f).children()), i.remove(f))
                        : (h.append(f), f.insertBefore(r, f.firstChild));
                    else
                      for (
                        f = h.children("ul,ol")[0],
                          f ||
                            ((f = i.create(r.ownerDocument, i.name(a))),
                            h.append(f));
                        r && r.parentNode == a;

                      )
                        f.appendChild(r), (r = o.shift());
                  else
                    for (
                      y = parseInt(u(r), 10) + 30, u(r, y), c = 0;
                      c < o.length;
                      c++
                    )
                      n.contains(r, o[c]) && o.splice(c, 1);
              } else
                (p = new g([{ tags: ["p"] }], { style: { marginLeft: 30 } })),
                  p.apply(t);
            },
            mapImmutables: function (t) {
              if (this.immutables) {
                var i = [];
                return n.map(t, function (t) {
                  var u = r.Immutables.immutableParent(t);
                  if (u) {
                    if (n.inArray(u, i) !== -1) return null;
                    i.push(u);
                  }
                  return u || t;
                });
              }
              return t;
            },
            remove: function (t) {
              t = i.filterBy(t, i.htmlIndentSpace, !0);
              var f,
                s,
                l,
                r,
                o,
                c,
                e,
                a,
                h = this.finder.findSuitable(t);
              for (h = this.mapImmutables(h), s = 0, l = h.length; s < l; s++) {
                if (((e = n(h[s])), e.is("li"))) {
                  if (
                    ((r = e.parent()),
                    (o = r.parent()),
                    o.is("li,ul,ol") && !u(r[0]))
                  ) {
                    if (f && n.contains(f, o[0])) continue;
                    c = e.nextAll("li");
                    c.length && n(r[0].cloneNode(!1)).appendTo(e).append(c);
                    o.is("li") ? e.insertAfter(o) : e.appendTo(o);
                    r.children("li").length || r.remove();
                    continue;
                  }
                  if (f == r[0]) continue;
                  f = r[0];
                } else f = h[s];
                a = parseInt(u(f), 10) - 30;
                u(f, a);
              }
            },
          }),
          y = f.extend({
            init: function (t) {
              var i = this;
              t.formatter = {
                toggle: n.proxy(function (n) {
                  var t = new s();
                  t.immutables = this.editor && this.editor.options.immutables;
                  t.apply(a.nodes(n));
                }, i),
              };
              f.fn.init.call(this, t);
            },
          }),
          p = f.extend({
            init: function (t) {
              var i = this;
              t.formatter = {
                toggle: n.proxy(function (n) {
                  var t = new s();
                  t.immutables = this.editor && this.editor.options.immutables;
                  t.remove(a.nodes(n));
                }, i),
              };
              f.fn.init.call(this, t);
            },
          }),
          w = e.extend({
            init: function (n) {
              e.fn.init.call(this, n);
              this.finder = new v([{ tags: d }]);
            },
            initialize: function (t, i) {
              e.fn.initialize.call(this, t, i);
              n.extend(this.options, {
                immutables: i.editor && i.editor.options.immutables,
              });
              t.addClass("k-state-disabled");
            },
            update: function (f, e) {
              for (
                var s,
                  c,
                  o,
                  l,
                  v = this.finder.findSuitable(e),
                  h = 0,
                  a = v.length;
                h < a;
                h++
              )
                if (
                  ((o = v[h]),
                  this.options.immutables &&
                    ((l = r.Immutables.immutableParent(o)), l && (o = l)),
                  (s = u(o)),
                  s ||
                    ((c = n(o).parents("ul,ol").length),
                    (s =
                      (i.is(o, "li") && (c > 1 || u(o.parentNode))) ||
                      (i.ofType(o, ["ul", "ol"]) && c > 0))),
                  s)
                )
                  return f.removeClass("k-state-disabled"), t;
              f.addClass("k-state-disabled").removeClass("k-state-hover");
            },
          });
        k(r, {
          IndentFormatter: s,
          IndentCommand: y,
          OutdentCommand: p,
          OutdentTool: w,
        });
        c(
          "indent",
          new e({
            command: y,
            template: new l({ template: o.buttonTemplate, title: "Indent" }),
          })
        );
        c(
          "outdent",
          new w({
            command: p,
            template: new l({ template: o.buttonTemplate, title: "Outdent" }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/linebreak.min", ["editor/plugins/formatblock.min"], n);
  })(
    function () {
      !(function (n) {
        var e = window.kendo,
          l = n.extend,
          i = e.ui.editor,
          t = i.Dom,
          u = i.Command,
          o = i.Tool,
          a = i.BlockFormatter,
          f = t.normalize,
          r = i.RangeUtils,
          s = i.EditorUtils.registerTool,
          h = u.extend({
            init: function (n) {
              this.options = n;
              u.fn.init.call(this, n);
            },
            _insertMarker: function (n, i) {
              var u,
                r = t.create(n, "a");
              return (
                (r.className = "k-marker"),
                i.insertNode(r),
                r.parentNode ||
                  ((u = i.commonAncestorContainer),
                  (u.innerHTML = ""),
                  u.appendChild(r)),
                f(r.parentNode),
                r
              );
            },
            _moveFocus: function (n, i) {
              var u, f;
              if (t.isEmpty(i)) n.setStartBefore(i);
              else {
                if ((n.selectNodeContents(i), (u = r.textNodes(n)[0]), !u)) {
                  for (; i.childNodes.length && !t.is(i.firstChild, "br"); )
                    i = i.firstChild;
                  u = i;
                }
                t.isEmpty(u)
                  ? n.setStartBefore(u)
                  : (t.emptyNode(u) && (u.innerHTML = "﻿"),
                    (f = u.firstChild || u),
                    t.isDataNode(f) ? n.setStart(f, 0) : n.setStartBefore(f));
              }
            },
            shouldTrim: function (n) {
              var i = "p,h1,h2,h3,h4,h5,h6".split(","),
                r = t.parentOfType(n.startContainer, i),
                u = t.parentOfType(n.endContainer, i);
              return (r && !u) || (!r && u);
            },
            _blankAfter: function (n) {
              for (; n && (t.isMarker(n) || "" === t.stripBom(n.nodeValue)); )
                n = n.nextSibling;
              return !n;
            },
            exec: function () {
              var v,
                c,
                o,
                h,
                u,
                e,
                l,
                p,
                w,
                d,
                b,
                g,
                k,
                y,
                s = this.getRange(),
                nt = r.documentFromRange(s),
                tt = i.emptyElementContent;
              this.expandImmutablesIn(s);
              d = this.shouldTrim(s);
              s.deleteContents();
              u = this._insertMarker(nt, s);
              t.stripBomNode(u.previousSibling);
              t.stripBomNode(u.nextSibling);
              e = t.closestEditableOfType(u, ["li"]);
              l = t.closestEditableOfType(u, "h1,h2,h3,h4,h5,h6".split(","));
              p = t.is(u.parentNode, "table") && u.parentNode;
              e
                ? t.emptyNode(e) &&
                  ((h = t.create(nt, "p")),
                  t.next(e) &&
                    ((w = s.cloneRange()),
                    w.selectNode(e),
                    r.split(w, e.parentNode)),
                  (b = n("br", e)),
                  1 == b.length && b.remove(),
                  (g = e.parentNode),
                  (k = e.parentNode.children.length),
                  (y = k > 1 && 1 == e.childNodes.length && e.children[0]),
                  t.insertAfter(h, g),
                  t.remove(1 == k ? e.parentNode : e),
                  y && y !== u
                    ? (h.appendChild(y), h.appendChild(u))
                    : (h.innerHTML = tt),
                  (o = h))
                : l && this._blankAfter(u)
                ? ((h = this._insertParagraphAfter(l)), t.remove(u), (o = h))
                : p &&
                  ((h = this._insertParagraphAfter(p)), t.remove(u), (o = h));
              o ||
                (e || l || new a([{ tags: ["p"] }]).apply([u]),
                s.selectNode(u),
                (v = t.parentOfType(u, [e ? "li" : l ? t.name(l) : "p"])),
                r.split(s, v, d),
                (c = v.previousSibling),
                t.is(c, "li") &&
                  c.firstChild &&
                  !t.is(c.firstChild, "br") &&
                  (c = c.firstChild),
                (o = v.nextSibling),
                this.clean(c, { links: !0 }),
                this.clean(o, { links: !0 }),
                t.is(o, "li") &&
                  o.firstChild &&
                  !t.is(o.firstChild, "br") &&
                  (o = o.firstChild),
                t.remove(v),
                f(c));
              f(o);
              this._moveFocus(s, o);
              s.collapse(!0);
              t.scrollTo(o, !0);
              r.selectRange(s);
            },
            _insertParagraphAfter: function (n) {
              var f = this.getRange(),
                e = r.documentFromRange(f),
                o = i.emptyElementContent,
                u = t.create(e, "p");
              return t.insertAfter(u, n), (u.innerHTML = o), u;
            },
            clean: function (r, u) {
              var f,
                e = r;
              if (
                (r.firstChild &&
                  t.is(r.firstChild, "br") &&
                  t.remove(r.firstChild),
                t.isDataNode(r) && !r.nodeValue && (r = r.parentNode),
                r)
              ) {
                for (f = !1; r.firstChild && 1 == r.firstChild.nodeType; )
                  (f = f || t.significantNodes(r.childNodes).length > 1),
                    (r = r.firstChild);
                if (
                  (t.isEmpty(r) ||
                    !/^\s*$/.test(r.innerHTML) ||
                    f ||
                    (n(e).find(".k-br").remove(),
                    (r.innerHTML = i.emptyElementContent)),
                  u && u.links)
                )
                  for (; r != e; ) {
                    if (t.is(r, "a") && t.emptyNode(r)) {
                      t.unwrap(r);
                      break;
                    }
                    r = r.parentNode;
                  }
              }
            },
          }),
          c = u.extend({
            init: function (n) {
              this.options = n;
              u.fn.init.call(this, n);
            },
            exec: function () {
              var n,
                u,
                o,
                s,
                c,
                h,
                i = this.getRange();
              this.expandImmutablesIn(i);
              n = t.create(r.documentFromRange(i), "br");
              u = i.startContainer;
              s = e.support.browser;
              c = s.msie && s.version < 11;
              h = t.is(u, "table") && u;
              i.deleteContents();
              h ? t.insertAfter(n, h) : i.insertNode(n);
              f(n.parentNode);
              c ||
                (n.nextSibling && !t.isWhitespace(n.nextSibling)) ||
                ((o = n.cloneNode(!0)),
                (o.className = "k-br"),
                t.insertAfter(o, n));
              i.setStartAfter(n);
              i.collapse(!0);
              t.scrollTo(n.nextSibling || n, !0);
              r.selectRange(i);
            },
          });
        l(i, { ParagraphCommand: h, NewLineCommand: c });
        s("insertLineBreak", new o({ key: 13, shift: !0, command: c }));
        s("insertParagraph", new o({ key: 13, command: h }));
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "editor/plugins/file.min",
      ["kendo.filebrowser.min", "editor/plugins/link.min"],
      n
    );
  })(
    function () {
      !(function (n, t) {
        var i = window.kendo,
          v = n.extend,
          r = i.ui.editor,
          o = r.EditorUtils,
          u = r.Dom,
          y = o.registerTool,
          p = r.ToolTemplate,
          f = r.RangeUtils,
          s = r.Command,
          w = r.LinkFormatter,
          b = f.textNodes,
          h = i.keys,
          e = "#k-editor-file-url",
          c = "#k-editor-file-text",
          l = "#k-editor-file-title",
          a = s.extend({
            init: function (n) {
              var t = this;
              s.fn.init.call(t, n);
              t.formatter = new w();
              t.async = !0;
              t.attributes = {};
            },
            insertFile: function (n, t) {
              var i = this.attributes,
                r = f.documentFromRange(t);
              if (i.href && "http://" != i.href) {
                if (!n)
                  return (
                    (n = u.create(r, "a", { href: i.href })),
                    (n.innerHTML = i.innerHTML),
                    (n.title = i.title),
                    t.deleteContents(),
                    t.insertNode(n),
                    n.nextSibling || u.insertAfter(r.createTextNode("﻿"), n),
                    t.setStartAfter(n),
                    t.setEndAfter(n),
                    f.selectRange(t),
                    !0
                  );
                u.attr(n, i);
              }
              return !1;
            },
            _dialogTemplate: function (n) {
              return i.template(
                '<div class="k-editor-dialog k-popup-edit-form"><div class="k-edit-form-container"><div class="k-edit-form-content"># if (showBrowser) { #<div class="k-filebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-file-url">#: messages.fileWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-file-url"></div><div class=\'k-edit-label\'><label for="k-editor-file-text">#: messages.fileText #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-file-text"></div><div class=\'k-edit-label\'><label for="k-editor-file-title">#: messages.fileTitle #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-file-title"></div></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div></div>'
              )({ messages: this.editor.options.messages, showBrowser: n });
            },
            redo: function () {
              var n = this,
                t = n.lockRange();
              this.formatter.apply(t, this.attributes);
              n.releaseRange(t);
            },
            exec: function () {
              function k(t) {
                var i = s.element,
                  u = i.find(e).val().replace(/ /g, "%20"),
                  f = i.find(c).val(),
                  o = i.find(l).val();
                n.attributes = {
                  href: u,
                  innerHTML: "" !== f ? f : u,
                  title: o,
                };
                tt = n.insertFile(r, a);
                p(t);
                n.change && n.change();
              }
              function p(t) {
                t.preventDefault();
                s.destroy();
                u.windowFromDocument(f.documentFromRange(a)).focus();
                tt || n.releaseRange(a);
              }
              function rt(n) {
                n.keyCode == h.ENTER ? k(n) : n.keyCode == h.ESC && p(n);
              }
              var s,
                o,
                g,
                n = this,
                a = n.lockRange(),
                nt = b(a),
                tt = !1,
                r = nt.length
                  ? this.formatter.finder.findSuitable(nt[0])
                  : null,
                ut = i.support.browser.msie,
                it = n.editor.options,
                ft = it.messages,
                w = it.fileBrowser,
                y = !!(
                  i.ui.FileBrowser &&
                  w &&
                  w.transport &&
                  w.transport.read !== t
                ),
                d = { title: ft.insertFile, visible: !1, resizable: y };
              this.expandImmutablesIn(a);
              d.close = p;
              y && (d.width = 750);
              s = this.createDialog(n._dialogTemplate(y), d)
                .toggleClass("k-filebrowser-dialog", y)
                .find(".k-dialog-insert")
                .click(k)
                .end()
                .find(".k-dialog-close")
                .click(p)
                .end()
                .find(".k-edit-field input")
                .keydown(rt)
                .end()
                .find(e)
                .val(r ? r.getAttribute("href", 2) : "http://")
                .end()
                .find(c)
                .val(r ? r.innerText : "")
                .end()
                .find(l)
                .val(r ? r.title : "")
                .end()
                .data("kendoWindow");
              o = s.element;
              y &&
                ((n._fileBrowser = new i.ui.FileBrowser(
                  o.find(".k-filebrowser"),
                  v({}, w)
                )),
                n._fileBrowser.bind("change", function (n) {
                  "f" === n.selected.get("type") && o.find(e).val(this.value());
                }),
                n._fileBrowser.bind("apply", k));
              ut &&
                ((g = o.closest(".k-window").height()), o.css("max-height", g));
              s.center().open();
              o.find(e).focus().select();
            },
          });
        i.ui.editor.FileCommand = a;
        y(
          "insertFile",
          new r.Tool({
            command: a,
            template: new p({
              template: o.buttonTemplate,
              title: "Insert File",
            }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "editor/plugins/tables.min",
      ["editor/plugins/formatblock.min", "editor/plugins/insert.min"],
      n
    );
  })(
    function () {
      !(function (n, t) {
        var s = window.kendo,
          w = n.extend,
          l = n.proxy,
          r = s.ui.editor,
          i = r.Dom,
          u = r.EditorUtils,
          et = r.RangeUtils,
          ot = r.Command,
          b = "kendoEditor",
          k = "k-state-active",
          v = "k-state-selected",
          a = r.Tool,
          f = r.ToolTemplate,
          y = r.InsertHtmlCommand,
          st = r.BlockFormatFinder,
          e = r.EditorUtils.registerTool,
          ht = s.getTouches,
          ct = s.template,
          lt = "<td style='width:#=width#%;'>#=content#</td>",
          at = new st([{ tags: ["table"] }]),
          d = y.extend({
            init: function (t) {
              var i = n.extend(
                { postProcess: this.postProcess, skipCleaners: !0 },
                t || {}
              );
              y.fn.init.call(this, i);
            },
            _tableHtml: function (n, t) {
              var i, u;
              return (
                (n = n || 1),
                (t = t || 1),
                (i = ct(lt)({
                  width: 100 / t,
                  content: r.emptyTableCellContent,
                })),
                (u = 100 / n),
                "<table class='k-table' data-last>" +
                  Array(n + 1).join(
                    "<tr style='height:" +
                      u +
                      "%;'>" +
                      Array(t + 1).join(i) +
                      "</tr>"
                  ) +
                  "</table>"
              );
            },
            postProcess: function (t, i) {
              var r = n("table[data-last]", t.document).removeAttr("data-last");
              i.setStart(r.find("td")[0], 0);
              i.collapse(!0);
              t.selectRange(i);
            },
            exec: function () {
              var n = this.options;
              n.html = this._tableHtml(n.rows, n.columns);
              y.fn.exec.call(this);
            },
          }),
          c = a.extend({
            initialize: function (t, i) {
              var s, o, h, c;
              a.fn.initialize.call(this, t, i);
              s = n(this.options.popupTemplate)
                .appendTo("body")
                .kendoPopup({
                  anchor: t,
                  copyAnchorStyles: !1,
                  open: l(this._open, this),
                  activate: l(this._activate, this),
                  close: l(this._close, this),
                })
                .data("kendoPopup");
              t.click(l(this._toggle, this)).keydown(l(this._keydown, this));
              o = this._editor = i.editor;
              this._popup = s;
              h = new r.TableWizardTool({
                template: new f({
                  template: u.tableWizardButtonTemplate,
                  title: o.options.messages.tableWizard,
                }),
                command: r.TableWizardCommand,
                insertNewTable: !0,
              });
              e("tableWizardInsert", h);
              c = n(
                "<div class='k-editor-toolbar'>" +
                  h.options.template.getHtml() +
                  "</div>"
              );
              c.appendTo(s.element);
              o.toolbar && o.toolbar.attachToolsEvents(c);
            },
            popup: function () {
              return this._popup;
            },
            _activate: n.noop,
            _open: function () {
              this._popup.options.anchor.addClass(k);
            },
            _close: function () {
              this._popup.options.anchor.removeClass(k);
            },
            _keydown: function (n) {
              var t = s.keys,
                i = n.keyCode;
              i == t.DOWN && n.altKey
                ? this._popup.open()
                : i == t.ESC && this._popup.close();
            },
            _toggle: function (t) {
              var i = n(t.target).closest(".k-tool");
              i.hasClass("k-state-disabled") || this.popup().toggle();
            },
            update: function (n) {
              var t = this.popup();
              t.wrapper && "block" == t.wrapper.css("display") && t.close();
              n.removeClass("k-state-hover");
            },
            destroy: function () {
              this._popup.destroy();
            },
          }),
          g = c.extend({
            init: function (t) {
              this.cols = 8;
              this.rows = 6;
              c.fn.init.call(
                this,
                n.extend(t, {
                  command: d,
                  popupTemplate:
                    "<div class='k-ct-popup'>" +
                    Array(this.cols * this.rows + 1).join(
                      "<span class='k-ct-cell k-state-disabled' />"
                    ) +
                    "<div class='k-status'></div></div>",
                })
              );
            },
            _activate: function () {
              function o(t) {
                var r = n(window);
                return {
                  row: Math.floor((t.clientY + r.scrollTop() - i.top) / c) + 1,
                  col:
                    Math.floor((t.clientX + r.scrollLeft() - i.left) / h) + 1,
                };
              }
              var h,
                c,
                t = this,
                u = t._popup.element,
                f = u.find(".k-ct-cell"),
                l = f.eq(0),
                e = f.eq(f.length - 1),
                i = s.getOffset(l),
                r = s.getOffset(e),
                a = t.cols,
                v = t.rows;
              u.find("*").addBack().attr("unselectable", "on");
              r.left += e[0].offsetWidth;
              r.top += e[0].offsetHeight;
              h = (r.left - i.left) / a;
              c = (r.top - i.top) / v;
              u.autoApplyNS(b)
                .on("mousemove", ".k-ct-cell", function (n) {
                  t._setTableSize(o(n));
                })
                .on("mouseleave", ".k-ct-cell", function () {
                  t._setTableSize();
                })
                .on("down", ".k-ct-cell", function (n) {
                  n.preventDefault();
                  var i = ht(n)[0];
                  t._exec(o(i.location));
                });
            },
            _valid: function (n) {
              return (
                n &&
                n.row > 0 &&
                n.col > 0 &&
                n.row <= this.rows &&
                n.col <= this.cols
              );
            },
            _exec: function (n) {
              this._valid(n) &&
                (this._editor.exec("createTable", {
                  rows: n.row,
                  columns: n.col,
                }),
                this._popup.close());
            },
            _setTableSize: function (t) {
              var i = this._popup.element,
                r = i.find(".k-status"),
                u = i.find(".k-ct-cell"),
                f = this.cols,
                e = this._editor.options.messages;
              this._valid(t)
                ? (r.text(s.format(e.createTableHint, t.row, t.col)),
                  u.each(function (i) {
                    n(this).toggleClass(v, i % f < t.col && i / f < t.row);
                  }))
                : (r.text(e.createTable), u.removeClass(v));
            },
            _keydown: function (n) {
              var t, i, h, e, u, f, r, o;
              c.fn._keydown.call(this, n);
              this._popup.visible() &&
                ((t = s.keys),
                (i = n.keyCode),
                (h = this._popup.element.find(".k-ct-cell")),
                (e = Math.max(h.filter(".k-state-selected").last().index(), 0)),
                (u = Math.floor(e / this.cols)),
                (f = e % this.cols),
                (r = !1),
                i != t.DOWN || n.altKey
                  ? i == t.UP
                    ? ((r = !0), u--)
                    : i == t.RIGHT
                    ? ((r = !0), f++)
                    : i == t.LEFT && ((r = !0), f--)
                  : ((r = !0), u++),
                (o = {
                  row: Math.max(1, Math.min(this.rows, u + 1)),
                  col: Math.max(1, Math.min(this.cols, f + 1)),
                }),
                i == t.ENTER ? this._exec(o) : this._setTableSize(o),
                r && (n.preventDefault(), n.stopImmediatePropagation()));
            },
            _open: function () {
              var n = this._editor.options.messages;
              c.fn._open.call(this);
              this.popup()
                .element.find(".k-status")
                .text(n.createTable)
                .end()
                .find(".k-ct-cell")
                .removeClass(v);
            },
            _close: function () {
              c.fn._close.call(this);
              this.popup().element.off("." + b);
            },
          }),
          h = ot.extend({
            _clearColIndexAtrr: function (n) {
              i.clearTableMappings(n, "col-index");
            },
            _mapColIndices: function (n) {
              i.reMapTableColumns(n, "col-index");
            },
            _findRowSpanCell: function (t, i, r) {
              for (var e, f, u = i; u >= 0; u--)
                if (
                  ((e = t.rows[u]),
                  (f = n(e).find("[col-index=" + r + "]")),
                  f.length)
                )
                  return f;
            },
            _resetTableResizing: function (n) {
              n._destroyResizings();
              n._initializeColumnResizing();
              n._initializeRowResizing();
              n._initializeTableResizing();
            },
          }),
          nt = h.extend({
            exec: function () {
              var c,
                u,
                a,
                t,
                e,
                o,
                v,
                s,
                y = this.lockRange(!0),
                h = i.closest(y.endContainer, ["td", "th"]),
                f = i.closest(h, "table"),
                l = this.options.position || "after";
              if (
                !(!f || (this.immutables() && r.Immutables.immutableParent(h)))
              ) {
                for (
                  this._mapColIndices(f),
                    u = h.parentNode,
                    o = i.findNodeIndex(u, !0),
                    h.rowSpan > 1 &&
                      "after" === l &&
                      (u = f.rows[o + h.rowSpan - 1]),
                    c = f.rows[0].cells.length,
                    a = f.rows[0].cells[c - 1],
                    c =
                      parseInt(a.getAttribute("col-index"), 10) + a.colSpan - 1,
                    e = u.cloneNode(!0),
                    n(e).empty(),
                    s = 0;
                  s <= c;
                  s += t.prop("colSpan")
                )
                  (t = n(u).find("[col-index=" + s + "]")),
                    t.length
                      ? t.prop("rowSpan") > 1 && "after" === l && t
                        ? t.attr("rowspan", t.prop("rowSpan") + 1)
                        : this._appendCell(e, t)
                      : ((o = i.findNodeIndex(u, !0)),
                        (t = this._findRowSpanCell(f, o, s)),
                        (v = t.closest("tr").index()),
                        v + t.prop("rowSpan") - 1 === o && "after" === l
                          ? this._appendCell(e, t)
                          : t.attr("rowspan", t.prop("rowSpan") + 1));
                "before" == l ? i.insertBefore(e, u) : i.insertAfter(e, u);
                this._clearColIndexAtrr(f);
                this.releaseRange(y);
                this._resetTableResizing(this.editor);
              }
            },
            _appendCell: function (n, t) {
              var i;
              i = t.clone();
              i.html(r.emptyTableCellContent);
              i.removeAttr("rowspan");
              i.appendTo(n);
            },
          }),
          tt = h.extend({
            exec: function () {
              var f,
                e,
                t,
                u,
                h = this.lockRange(!0),
                n = i.closest(h.endContainer, ["td", "th"]),
                o = i.closest(n, "table"),
                c = o && o.rows,
                s = this.options.position || "after";
              if (
                !(!n || (this.immutables() && r.Immutables.immutableParent(n)))
              ) {
                for (
                  this._mapColIndices(o),
                    f = parseInt(n.getAttribute("col-index"), 10),
                    n.colSpan > 1 &&
                      "after" === s &&
                      (n.setAttribute("col-index", f + n.colSpan - 1),
                      (f = f + n.colSpan - 1)),
                    e = 0;
                  e < c.length;
                  e++
                )
                  (t = this._processForColSpan(c[e], f, s, n)),
                    t &&
                      ((u = t.cloneNode()),
                      (u.innerHTML = r.emptyTableCellContent),
                      u.removeAttribute("colspan"),
                      "before" == s
                        ? i.insertBefore(u, t)
                        : i.insertAfter(u, t),
                      this._resizeCells(u, t));
                this._clearColIndexAtrr(o);
                this.releaseRange(h);
                this._resetTableResizing(this.editor);
              }
            },
            _processForColSpan: function (i, r, u, f) {
              var e,
                s,
                o = r - 1;
              if (
                ((e = n(i).find("[col-index=" + r + "]")[0]),
                e && e.colSpan > 1 && "after" === u && e !== f)
              )
                return (e.colSpan += 1), t;
              if (e) return e;
              for (
                o;
                o >= 0 &&
                ((e = n(i).find("[col-index=" + o + "]")[0]),
                !(e && e.colSpan > 1));
                o--
              );
              return e
                ? ((s =
                    parseInt(e.getAttribute("col-index"), 10) + e.colSpan - 1),
                  s === r && "after" === u
                    ? e
                    : (r <= s && e.setAttribute("colspan", e.colSpan + 1), t))
                : t;
            },
            _resizeCells: function (n, t) {
              var i,
                f,
                r,
                u = n.style.width;
              u &&
                ((i = parseFloat(u)),
                (f = u.slice(("" + i).length)),
                (r = i / 2 + f),
                (n.style.width = r),
                (t.style.width = r));
            },
          }),
          it = h.extend({
            exec: function () {
              var u,
                o,
                h,
                s = this.lockRange(),
                e = et.mapAll(s, function (t) {
                  return n(t).closest("tr")[0];
                }),
                c = i.closest(s.endContainer, ["td", "th"]),
                f = e[0],
                a = c ? c.rowSpan : 1,
                l = n(e[0]).index(),
                t = i.closest(f, "table");
              if (
                !(!t || (this.immutables() && r.Immutables.immutableParent(f)))
              ) {
                for (o = 0; o < a; o++)
                  e.indexOf(t.rows[l + o]) < 0 && e.push(t.rows[l + o]);
                if (t.rows.length <= e.length)
                  (u = i.next(t)),
                    (u && !i.insignificant(u)) || (u = i.prev(t)),
                    i.remove(t),
                    this._resetTableResizing(this.editor);
                else {
                  for (this._mapColIndices(t), h = 0; h < e.length; h++)
                    (f = e[h]),
                      i.removeTextSiblings(f),
                      (u = i.next(f) || i.prev(f)),
                      (u = u.cells[0]),
                      this._handleRowSpanCells(t, f),
                      i.remove(f);
                  this._clearColIndexAtrr(t);
                }
                u &&
                  (s.setStart(u, 0),
                  s.collapse(!0),
                  this.editor.selectRange(s));
                this._resetTableResizing(this.editor);
              }
            },
            _handleRowSpanCells: function (t, r) {
              for (
                var u,
                  e,
                  o,
                  s = i.findNodeIndex(r, !0),
                  h = parseInt(
                    r.cells[r.cells.length - 1].getAttribute("col-index"),
                    10
                  ),
                  f = 0;
                f <= h;
                f += u.prop("colSpan")
              )
                (u = n(r).find("[col-index=" + f + "]")),
                  u.length &&
                    u.prop("rowSpan") > 1 &&
                    ((o = t.rows[s + 1]),
                    (e = n(o).find("[col-index=" + (f + 1) + "]")),
                    e.length
                      ? e.before(u)
                      : ((e = n(o).find("[col-index=" + (f - 1) + "]")),
                        e.after(u)),
                    this._reduceRowSpan(u)),
                  u.length ||
                    ((u = this._findRowSpanCell(t, s, f)),
                    this._reduceRowSpan(u));
            },
            _reduceRowSpan: function (n) {
              var t = n.prop("rowSpan") - 1;
              t <= 1 ? n.removeAttr("rowspan") : n.attr("rowspan", t);
            },
          }),
          rt = h.extend({
            exec: function () {
              var u,
                e,
                o,
                s,
                c = this.lockRange(),
                t = i.closest(c.endContainer, ["td", "th"]),
                f = i.closest(t, "table"),
                h = f && f.rows,
                l = i.findNodeIndex(t, !0),
                a = h && h[0].cells.length;
              if (
                !(!t || (this.immutables() && r.Immutables.immutableParent(t)))
              ) {
                if (1 == a || t.colSpan == a)
                  (u = i.next(f)),
                    (u && !i.insignificant(u)) || (u = i.prev(f)),
                    i.remove(f),
                    this._resetTableResizing(this.editor);
                else {
                  for (
                    i.removeTextSiblings(t),
                      u = i.next(t) || i.prev(t),
                      this._mapColIndices(f),
                      l = parseInt(t.getAttribute("col-index"), 10),
                      s = 0;
                    s < t.colSpan;
                    s++
                  )
                    for (e = 0; e < h.length; e += o.prop("rowSpan") || 1)
                      (o = n(h[e]).find("[col-index=" + (l + s) + "]")),
                        o.length && o.prop("colSpan") <= 1
                          ? o.remove()
                          : this._handleColSpanCells(h[e], l + s);
                  this._clearColIndexAtrr(f);
                }
                u &&
                  (c.setStart(u, 0),
                  c.collapse(!0),
                  this.editor.selectRange(c));
                this._resetTableResizing(this.editor);
              }
            },
            _handleColSpanCells: function (i, r) {
              var f,
                e,
                u = n(i).find("[col-index=" + r + "]");
              if (u.length && u.prop("colSpan") > 1)
                return (
                  (f = u.clone(!0)),
                  u.after(f),
                  this._reduceColSpan(f),
                  f.attr("col-index", parseInt(u.attr("col-index"), 10) + 1),
                  u.remove(),
                  t
                );
              for (e = r; e >= 0; e--)
                if (((u = n(i).find("[col-index=" + e + "]")), u.length))
                  return (
                    this._reduceColSpan(u),
                    u.attr("col-index", parseInt(u.attr("col-index"), 10) + 1),
                    t
                  );
            },
            _reduceColSpan: function (n) {
              var t = n.prop("colSpan") - 1;
              t <= 1 ? n.removeAttr("colspan") : n.attr("colspan", t);
            },
          }),
          ut = h.extend({
            exec: function () {
              var e,
                s,
                o,
                f,
                h = this.lockRange(),
                u = i.closest(h.endContainer, ["td", "th"]);
              if (
                u &&
                ((e = i.closest(u, "table")),
                (s = u.parentNode),
                (o = i.findNodeIndex(u, !0)),
                (f = s.children[o + 1]),
                !this.immutables() || !r.Immutables.immutableParent(u))
              ) {
                if (
                  (this._mapColIndices(e),
                  (o = parseInt(n(u).attr("col-index"), 10)),
                  (f = n(s)
                    .find(
                      "[col-index=" + (o + 1 + this._getColspan(u) - 1) + "]"
                    )
                    .get(0)),
                  !f || n(f).is("[rowspan]") || n(u).is("[rowspan]"))
                )
                  return this._clearColIndexAtrr(e), this.releaseRange(h), t;
                n(u)
                  .prop("colspan", this._getColspan(u) + this._getColspan(f))
                  .append(i.emptyNode(f) ? "" : "<br/>" + f.innerHTML);
                n(f).remove();
                this._clearColIndexAtrr(e);
                this.releaseRange(h);
              }
            },
            _getColspan: function (n) {
              return parseInt(n.getAttribute("colspan"), 10) || 1;
            },
          }),
          ft = h.extend({
            exec: function () {
              var c,
                e,
                o,
                l,
                s,
                f,
                h = this.lockRange(),
                u = i.closest(h.endContainer, ["td", "th"]);
              if (
                u &&
                ((c = i.closest(u, "tr")),
                (e = i.closest(u, "table")),
                (o = i.findNodeIndex(u, !0)),
                (l = i.findNodeIndex(c, !0)),
                (s = e.rows[l + this._getRowspan(u)]),
                (f = s && s.children[o]),
                !this.immutables() || !r.Immutables.immutableParent(u))
              ) {
                if (
                  (this._mapColIndices(e),
                  (o = n(u).attr("col-index")),
                  (f = n(s)
                    .find("[col-index=" + o + "]")
                    .get(0)),
                  !f || n(f).is("[colspan]") || n(u).is("[colspan]"))
                )
                  return this._clearColIndexAtrr(e), this.releaseRange(h), t;
                n(u)
                  .prop("rowspan", this._getRowspan(u) + this._getRowspan(f))
                  .append(i.emptyNode(f) ? "" : "<br/>" + f.innerHTML);
                n(f).remove();
                this._clearColIndexAtrr(e);
                this.releaseRange(h);
              }
            },
            _getRowspan: function (n) {
              return parseInt(n.getAttribute("rowspan"), 10) || 1;
            },
          }),
          p = h.extend({
            exec: function () {
              var f,
                s = this.lockRange(),
                e = this.options.type,
                u = "row" === e ? "colspan" : "rowspan",
                t = i.closest(s.endContainer, ["td", "th"]),
                o = i.closest(t, "table"),
                h = "<td></td>";
              !t ||
                (this.immutables() && r.Immutables.immutableParent(t)) ||
                ((f =
                  "row" === e
                    ? this._getColspanValue(t) - 1
                    : this._getRowspanValue(t) - 1),
                this._mapColIndices(o),
                "row" === e && n(t).is("[" + u + "]")
                  ? n(t).prop(u, f).width(this._getWidth(o, t)).after(h)
                  : "column" === e &&
                    n(t).is("[" + u + "]") &&
                    this._splitCellVertically(t, o, u, f, h),
                1 === f && n(t).removeAttr(u),
                this._clearColIndexAtrr(o),
                this.releaseRange(s));
            },
            _getRowspanValue: function (n) {
              return parseInt(n.getAttribute("rowspan"), 10);
            },
            _getColspanValue: function (n) {
              return parseInt(n.getAttribute("colspan"), 10);
            },
            _splitCellVertically: function (t, r, u, f, e) {
              var h = i.closest(t, "tr"),
                c = parseInt(n(t).attr("col-index"), 10),
                l = i.findNodeIndex(h, !0),
                o = n(r)
                  .find("tr")
                  .eq(l + f),
                s = o.find("[col-index=" + (c + 1) + "]");
              s.length ? s.before(e) : o.append(e);
              n(t).prop(u, f);
            },
            _getWidth: function (t, i) {
              var u = i.getAttribute("col-index"),
                r = n(t).find("[col-index=" + u + "]:not([colspan])");
              return r.length ? r.width() : parseFloat(n(i).width() / 2);
            },
          }),
          o = a.extend({
            command: function (n) {
              var t = {
                row: { insert: nt, delete: it, merge: ut, split: p },
                column: { insert: tt, delete: rt, merge: ft, split: p },
              };
              return (
                (n = w(n, this.options)),
                (n.action = n.action || "insert"),
                new t[n.type][n.action](n)
              );
            },
            initialize: function (n, t) {
              a.fn.initialize.call(this, n, t);
              n.addClass("k-state-disabled");
            },
            update: function (n, t) {
              var i = !at.isFormatted(t);
              n.toggleClass("k-state-disabled", i);
            },
          });
        w(s.ui.editor, {
          PopupTool: c,
          TableCommand: d,
          InsertTableTool: g,
          TableModificationTool: o,
          InsertRowCommand: nt,
          InsertColumnCommand: tt,
          DeleteRowCommand: it,
          DeleteColumnCommand: rt,
          MergeCellsHorizontallyCommand: ut,
          MergeCellsVerticallyCommand: ft,
          SplitCellCommand: p,
        });
        e(
          "createTable",
          new g({
            template: new f({
              template: u.buttonTemplate,
              popup: !0,
              title: "Create table",
            }),
          })
        );
        e(
          "addColumnLeft",
          new o({
            type: "column",
            position: "before",
            template: new f({
              template: u.buttonTemplate,
              title: "Add column on the left",
            }),
          })
        );
        e(
          "addColumnRight",
          new o({
            type: "column",
            template: new f({
              template: u.buttonTemplate,
              title: "Add column on the right",
            }),
          })
        );
        e(
          "addRowAbove",
          new o({
            type: "row",
            position: "before",
            template: new f({
              template: u.buttonTemplate,
              title: "Add row above",
            }),
          })
        );
        e(
          "addRowBelow",
          new o({
            type: "row",
            template: new f({
              template: u.buttonTemplate,
              title: "Add row below",
            }),
          })
        );
        e(
          "deleteRow",
          new o({
            type: "row",
            action: "delete",
            template: new f({
              template: u.buttonTemplate,
              title: "Delete row",
            }),
          })
        );
        e(
          "deleteColumn",
          new o({
            type: "column",
            action: "delete",
            template: new f({
              template: u.buttonTemplate,
              title: "Delete column",
            }),
          })
        );
        e(
          "mergeCellsHorizontally",
          new o({
            type: "row",
            action: "merge",
            template: new f({
              template: u.buttonTemplate,
              title: "Merge Cell Right",
            }),
          })
        );
        e(
          "mergeCellsVertically",
          new o({
            type: "column",
            action: "merge",
            template: new f({
              template: u.buttonTemplate,
              title: "Merge Cell Down",
            }),
          })
        );
        e(
          "splitCellHorizontally",
          new o({
            type: "row",
            action: "split",
            template: new f({
              template: u.buttonTemplate,
              title: "Split Cell",
            }),
          })
        );
        e(
          "splitCellVertically",
          new o({
            type: "column",
            action: "split",
            template: new f({
              template: u.buttonTemplate,
              title: "Split Cell",
            }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/clipboard.min", ["editor/command.min"], n);
  })(
    function () {
      !(function (n) {
        var u = window.kendo,
          e = u.Class,
          f = u.ui.editor,
          s = f.RangeUtils,
          t = f.Dom,
          g = f.RestorePoint,
          h = f.Marker,
          r = u.support.browser,
          c = n.extend,
          nt = e.extend({
            init: function (n) {
              this.editor = n;
              var t = n.options.pasteCleanup;
              this.cleaners = [
                new l(t),
                new a(t),
                new v(t),
                new y(t),
                new w(t),
                new b(t),
                new o(t),
                new d(t),
              ];
            },
            htmlToFragment: function (n) {
              var f = this.editor,
                r = f.document,
                i = t.create(r, "div"),
                u = r.createDocumentFragment();
              for (i.innerHTML = n; i.firstChild; ) u.appendChild(i.firstChild);
              return u;
            },
            isBlock: function (n) {
              return /<(div|p|ul|ol|table|h[1-6])/i.test(n);
            },
            _startModification: function () {
              var n,
                r,
                i = this.editor;
              if (!this._inProgress)
                return (
                  (this._inProgress = !0),
                  (n = i.getRange()),
                  (r = new g(n, i.body)),
                  t.persistScrollTop(i.document),
                  { range: n, restorePoint: r }
                );
            },
            _endModification: function (n) {
              f._finishUpdate(this.editor, n.restorePoint);
              this.editor._selectionChange();
              this._inProgress = !1;
            },
            _contentModification: function (n, t) {
              var i = this,
                u = i.editor,
                r = i._startModification();
              r &&
                (n.call(i, u, r.range),
                setTimeout(function () {
                  t.call(i, u, r.range);
                  i._endModification(r);
                }));
            },
            _removeBomNodes: function (n) {
              for (var r = s.textNodes(n), i = 0; i < r.length; i++)
                r[i].nodeValue = t.stripBom(r[i].nodeValue) || r[i].nodeValue;
            },
            _onBeforeCopy: function (n) {
              var t = new h();
              t.add(n);
              this._removeBomNodes(n);
              t.remove(n);
              this.editor.selectRange(n);
            },
            oncopy: function () {
              this._onBeforeCopy(this.editor.getRange());
            },
            oncut: function () {
              this._onBeforeCopy(this.editor.getRange());
              this._contentModification(n.noop, n.noop);
            },
            _fileToDataURL: function (t) {
              var i = n.Deferred(),
                r = new FileReader();
              return (
                t instanceof window.File || !t.getAsFile || (t = t.getAsFile()),
                (r.onload = n.proxy(i.resolve, i)),
                r.readAsDataURL(t),
                i.promise()
              );
            },
            _triggerPaste: function (n, t) {
              var i = { html: n || "" };
              i.html = i.html.replace(/\ufeff/g, "");
              this.editor.trigger("paste", i);
              this.paste(i.html, t || {});
            },
            _handleImagePaste: function (n) {
              var t, i;
              if ("FileReader" in window && !(r.msie && r.version > 10))
                return (
                  (t =
                    n.clipboardData ||
                    n.originalEvent.clipboardData ||
                    window.clipboardData ||
                    {}),
                  (i = t.items || t.files),
                  this._insertImages(i)
                );
            },
            _insertImages: function (t) {
              var i, r, u;
              if (
                t &&
                ((i = n.grep(t, function (n) {
                  return /^image\//i.test(n.type);
                })),
                (r = n.grep(t, function (n) {
                  return /^text\/html/i.test(n.type);
                })),
                !r.length && i.length && (u = this._startModification()))
              )
                return (
                  n.when.apply(n, n.map(i, this._fileToDataURL)).done(
                    n.proxy(function () {
                      var t = Array.prototype.slice.call(arguments),
                        i = n
                          .map(t, function (n) {
                            return '<img src="' + n.target.result + '" />';
                          })
                          .join("");
                      this._triggerPaste(i);
                      this._endModification(u);
                    }, this)
                  ),
                  !0
                );
            },
            onpaste: function (i) {
              if ("false" !== this.editor.body.contentEditable) {
                if (this._handleImagePaste(i)) return void i.preventDefault();
                this.expandImmutablesIn();
                this._contentModification(
                  function (r, f) {
                    var s,
                      h,
                      c,
                      e = t.create(r.document, "div", {
                        className: "k-paste-container",
                        innerHTML: "﻿",
                      }),
                      l = u.support.browser,
                      o = r.body;
                    this._decoreateClipboardNode(e, o);
                    o.appendChild(e);
                    l.webkit && this._moveToCaretPosition(e, f);
                    l.msie && l.version < 11
                      ? (i.preventDefault(),
                        (s = r.createRange()),
                        s.selectNodeContents(e),
                        r.selectRange(s),
                        (h = r.document.body.createTextRange()),
                        h.moveToElementText(e),
                        n(o).unbind("paste"),
                        h.execCommand("Paste"),
                        n(o).bind("paste", n.proxy(this.onpaste, this)))
                      : ((c = r.createRange()),
                        c.selectNodeContents(e),
                        r.selectRange(c));
                    f.deleteContents();
                  },
                  function (i, r) {
                    var u,
                      f = "";
                    i.selectRange(r);
                    u = n(i.body).children(".k-paste-container");
                    u.each(function () {
                      var n = this.lastChild;
                      n && t.is(n, "br") && t.remove(n);
                      f += this.innerHTML;
                    });
                    u.remove();
                    this._triggerPaste(f, { clean: !0 });
                  }
                );
              }
            },
            ondragover: function (n) {
              (r.msie || r.edge) && (n.stopPropagation(), n.preventDefault());
            },
            ondrop: function (n) {
              var t, i;
              "FileReader" in window &&
                ((t = (n.originalEvent || n).dataTransfer || {}),
                (i = t.items || t.files),
                this._insertImages(i) && n.preventDefault());
            },
            _decoreateClipboardNode: function (t, i) {
              var u, f, e, o;
              (r.msie || r.webkit) &&
                ((t = n(t)),
                t.css({
                  borderWidth: "0px",
                  width: "0px",
                  height: "0px",
                  overflow: "hidden",
                  margin: "0",
                  padding: "0",
                }),
                r.msie &&
                  ((u = n(i.ownerDocument.documentElement)),
                  t.css({
                    fontVariant: "normal",
                    fontWeight: "normal",
                    lineSpacing: "normal",
                    lineHeight: "normal",
                    textDecoration: "none",
                  }),
                  (f = u.css("color")),
                  f && t.css("color", f),
                  (e = u.css("fontFamily")),
                  e && t.css("fontFamily", e),
                  (o = u.css("fontSize")),
                  o && t.css("fontSize", o)));
            },
            _moveToCaretPosition: function (i, r) {
              var u = this,
                f = u.editor.body,
                e = t.offset(i, f),
                o = u._caretOffset(r, f),
                h = o.left - e.left,
                c = o.top - e.top,
                s = "translate(" + h + "px," + c + "px)";
              n(i).css({ "-webkit-transform": s, transform: s });
            },
            _caretOffset: function (n, i) {
              var s,
                o,
                h,
                f,
                e,
                c,
                l = this.editor,
                u = t.create(l.document, "span", { innerHTML: "﻿" }),
                r = n.startContainer;
              return (
                n.collapsed
                  ? ((o = t.isDataNode(r)),
                    o && (t.isBom(r) || 0 === n.startOffset)
                      ? t.insertBefore(u, r)
                      : o && n.startOffset === r.length
                      ? t.insertAfter(u, r)
                      : (n.insertNode(u), (s = !0)))
                  : ((r = r === i ? r.childNodes[n.startOffset] : r),
                    t.insertBefore(u, r)),
                (h = t.offset(u, i)),
                (f = u.previousSibling),
                (e = u.nextSibling),
                t.remove(u),
                s &&
                  t.isDataNode(f) &&
                  t.isDataNode(e) &&
                  !t.isBom(f) &&
                  !t.isBom(e) &&
                  ((c = f.length),
                  (e.data = f.data + e.data),
                  n.setStart(e, c),
                  t.remove(f),
                  n.collapse(!0),
                  l.selectRange(n)),
                h
              );
            },
            expandImmutablesIn: function (n) {
              var t,
                f,
                r,
                i = this.editor;
              i &&
                i.options.immutables &&
                ((t = i.body),
                (n = n || i.getRange()),
                u.ui.editor.Immutables.expandImmutablesIn(n),
                n.startContainer === t &&
                  0 === n.startOffset &&
                  ((f = t.ownerDocument),
                  (r = f.createTextNode("﻿")),
                  t.insertBefore(r, t.childNodes[0]),
                  n.setStartBefore(r)),
                i.selectRange(n));
            },
            splittableParent: function (n, i) {
              var r, u;
              if (n)
                return (
                  t.closestEditableOfType(i, ["p", "ul", "ol"]) || i.parentNode
                );
              if (
                ((r = i.parentNode), (u = i.ownerDocument.body), t.isInline(r))
              )
                for (; r.parentNode != u && !t.isBlock(r.parentNode); )
                  r = r.parentNode;
              return r;
            },
            paste: function (i, r) {
              var f,
                p,
                d,
                w,
                u,
                g,
                e,
                a,
                nt,
                rt,
                l,
                tt,
                it,
                v,
                b,
                k,
                y,
                o = this.editor;
              if (
                (this.expandImmutablesIn(),
                (r = c({ clean: !1, split: !0 }, r)),
                !r.skipCleaners)
              )
                for (f = 0, p = this.cleaners.length; f < p; f++)
                  this.cleaners[f].applicable(i) &&
                    (i = this.cleaners[f].clean(i));
              if (
                (r.clean &&
                  ((i = i.replace(
                    /(<br>(\s|&nbsp;)*)+(<\/?(div|p|li|col|t))/gi,
                    "$3"
                  )),
                  (i = i.replace(/<(a|span)[^>]*><\/\1>/gi, ""))),
                (i = i.replace(
                  /<(a|span|font)([^>]*)> <\/\1>/gi,
                  "<$1$2>&nbsp;</$1>"
                )),
                (i = i
                  .replace(/^<li/i, "<ul><li")
                  .replace(/li>$/g, "li></ul>")),
                (w = this.isBlock(i)),
                o.focus(),
                (u = o.getRange()),
                u.deleteContents(),
                u.startContainer == o.document && u.selectNodeContents(o.body),
                (g = new h()),
                (e = g.addCaret(u)),
                (a = this.splittableParent(w, e)),
                (nt = !1),
                (rt = a != o.body && !t.is(a, "td")),
                r.split &&
                  rt &&
                  (w || t.isInline(a)) &&
                  (u.selectNode(e), s.split(u, a, !0), (nt = !0)),
                (l = this.htmlToFragment(i)),
                l.firstChild && "k-paste-container" === l.firstChild.className)
              ) {
                for (tt = [], f = 0, p = l.childNodes.length; f < p; f++)
                  tt.push(l.childNodes[f].innerHTML);
                l = this.htmlToFragment(tt.join("<br />"));
              }
              if (
                ((d = l.childNodes),
                n(d)
                  .filter("table")
                  .addClass("k-table")
                  .end()
                  .find("table")
                  .addClass("k-table"),
                n(d).each(function (n, i) {
                  t.isBlock(i) &&
                    !t.isSelfClosing(i) &&
                    "" === i.innerHTML &&
                    i.appendChild(o.document.createTextNode("﻿"));
                }),
                u.insertNode(l),
                (a = this.splittableParent(w, e)),
                nt)
              ) {
                for (; e.parentNode != a; ) t.unwrap(e.parentNode);
                t.unwrap(e.parentNode);
              }
              if (
                (t.normalize(u.commonAncestorContainer),
                (e.style.display = "inline"),
                t.restoreScrollTop(o.document),
                t.scrollTo(e),
                g.removeCaret(u),
                (it = u.commonAncestorContainer.parentNode),
                u.collapsed &&
                  "tbody" == t.name(it) &&
                  (u.setStartAfter(n(it).closest("table")[0]), u.collapse(!0)),
                (v = n(u.commonAncestorContainer.parentNode).closest("table")),
                v.get(0))
              ) {
                for (
                  b = v.parent().contents(), k = b.length - 1, y = b.get(k);
                  null !== y.nodeValue &&
                  (" " === y.nodeValue || "" === y.nodeValue);

                )
                  (k -= 1), (y = b.get(k));
                y !== v.get(0) ||
                  v.parents("table").length ||
                  t.insertAfter(t.createEmptyNode(o.document, "p"), v[0]);
              }
              o.selectRange(u);
            },
          }),
          i = e.extend({
            init: function (n) {
              this.options = n || {};
              this.replacements = [];
            },
            clean: function (n, t) {
              for (
                var f = this, r = t || f.replacements, i = 0, u = r.length;
                i < u;
                i += 2
              )
                n = n.replace(r[i], r[i + 1]);
              return n;
            },
          }),
          l = i.extend({
            init: function (n) {
              i.fn.init.call(this, n);
              this.replacements = [
                /<(\/?)script([^>]*)>/i,
                "<$1telerik:script$2>",
              ];
            },
            applicable: function (n) {
              return !this.options.none && /<script[^>]*>/i.test(n);
            },
          }),
          a = i.extend({
            init: function (n) {
              i.fn.init.call(this, n);
              var t = " ";
              this.replacements = [
                /<span\s+class="Apple-tab-span"[^>]*>\s*<\/span>/gi,
                t,
                /\t/gi,
                t,
                /&nbsp;&nbsp; &nbsp;/gi,
                t,
              ];
            },
            applicable: function (n) {
              return /&nbsp;&nbsp; &nbsp;|class="?Apple-tab-span/i.test(n);
            },
          }),
          v = i.extend({
            init: function (n) {
              i.fn.init.call(this, n);
              this.junkReplacements = [
                /<\?xml[^>]*>/gi,
                "",
                /<!--(.|\n)*?-->/g,
                "",
                /&quot;/g,
                "'",
                /<o:p>&nbsp;<\/o:p>/gi,
                "&nbsp;",
                /<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,
                "",
                /<\/o>/g,
                "",
              ];
              this.replacements = this.junkReplacements.concat([
                /(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g,
                "$1",
                /<br><br>/g,
                "<BR><BR>",
                /<br>(?!\n)/g,
                " ",
                /<table([^>]*)>(\s|&nbsp;)+<t/gi,
                "<table$1><t",
                /<tr[^>]*>(\s|&nbsp;)*<\/tr>/gi,
                "",
                /<tbody[^>]*>(\s|&nbsp;)*<\/tbody>/gi,
                "",
                /<table[^>]*>(\s|&nbsp;)*<\/table>/gi,
                "",
                /<BR><BR>/g,
                "<br>",
                /^\s*(&nbsp;)+/gi,
                "",
                /(&nbsp;|<br[^>]*>)+\s*$/gi,
                "",
                /mso-[^;"]*;?/gi,
                "",
                /<(\/?)b(\s[^>]*)?>/gi,
                "<$1strong$2>",
                /<(\/?)font(\s[^>]*)?>/gi,
                this.convertFontMatch,
                /<(\/?)i(\s[^>]*)?>/gi,
                "<$1em$2>",
                /style=(["|'])\s*\1/g,
                "",
                /(<br[^>]*>)?\n/g,
                function (n, t) {
                  return t ? n : " ";
                },
              ]);
            },
            convertFontMatch: function (n, t, i) {
              var r = /face=['"]([^'"]+)['"]/i.exec(i),
                u = i && r && r[1];
              return t
                ? "</span>"
                : u
                ? '<span style="font-family:' + u + '">'
                : "<span>";
            },
            applicable: function (n) {
              return (
                /class="?Mso/i.test(n) ||
                /style="[^"]*mso-/i.test(n) ||
                /urn:schemas-microsoft-com:office/.test(n)
              );
            },
            stripEmptyAnchors: function (n) {
              return n.replace(/<a([^>]*)>\s*<\/a>/gi, function (n, t) {
                return !t || t.indexOf("href") < 0 ? "" : n;
              });
            },
            listType: function (n, i) {
              var u,
                r = n.innerHTML,
                e = t.innerText(n),
                f = r.match(
                  /^(?:<span [^>]*texhtml[^>]*>)?<span [^>]*(?:Symbol|Wingdings)[^>]*>([^<]+)/i
                ),
                o = f && f[1],
                h = /^[a-z\d]/i.test(o),
                s = function (n) {
                  return n.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/, "");
                };
              return (
                f && (u = !0),
                (r = r.replace(/<\/?\w+[^>]*>/g, "").replace(/&nbsp;/g, " ")),
                (!u && /^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(r)) ||
                (u && /^.\u00a0+/.test(r)) ||
                (o && !h && i)
                  ? { tag: "ul", style: this._guessUnorderedListStyle(s(e)) }
                  : /^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)
                  ? { tag: "ol", style: this._guessOrderedListStyle(s(e)) }
                  : void 0
              );
            },
            _convertToLi: function (n) {
              var i,
                r = t.name(n);
              return (
                1 == n.childNodes.length
                  ? (i =
                      n.firstChild.nodeType === t.nodeTypes.TEXT_NODE
                        ? t.innerText(n)
                        : n.firstChild.innerHTML.replace(
                            /^\w+[\.\)](&nbsp;)+ /,
                            ""
                          ))
                  : (t.remove(n.firstChild),
                    3 == n.firstChild.nodeType &&
                      /^[ivxlcdm]+\.$/i.test(n.firstChild.nodeValue) &&
                      t.remove(n.firstChild),
                    /^(&nbsp;|\s)+$/i.test(n.firstChild.innerHTML) &&
                      t.remove(n.firstChild),
                    (i =
                      "p" != r
                        ? "<" + r + ">" + n.innerHTML + "</" + r + ">"
                        : n.innerHTML)),
                t.remove(n),
                t.create(document, "li", { innerHTML: i })
              );
            },
            _guessUnorderedListStyle: function (n) {
              return /^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(n)
                ? null
                : /^o/.test(n)
                ? "circle"
                : "square";
            },
            _guessOrderedListStyle: function (n) {
              var t = null;
              return (
                /^\d/.test(n) ||
                  (t =
                    (/^[a-z]/.test(n) ? "lower-" : "upper-") +
                    (/^[ivxlcdm]/i.test(n) ? "roman" : "alpha")),
                t
              );
            },
            extractListLevels: function (n) {
              return n.replace(
                /style=['"]?[^'"]*?mso-list:\s?[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,
                function (n, t, i) {
                  return u.format(
                    'data-list="{0}" data-level="{1}" {2}',
                    t,
                    i,
                    n
                  );
                }
              );
            },
            _createList: function (n, i) {
              return t.create(document, n, { style: { listStyleType: i } });
            },
            lists: function (i) {
              for (
                var d,
                  o,
                  l,
                  g,
                  nt,
                  w,
                  b,
                  u,
                  s,
                  f,
                  e,
                  v,
                  k,
                  h,
                  y,
                  tt = n(i).find(t.blockElements.join(",")),
                  p = -1,
                  c = {},
                  rt = ["p", "h1", "h2", "h3", "h4", "h5", "h6"],
                  it = !1,
                  a = 0;
                a < tt.length;
                a++
              )
                (u = tt[a]),
                  (v = n(u).data()),
                  (k = v.list),
                  (d = t.name(u)),
                  (it = !!n(u).parents("table").length),
                  it ||
                    ((h = this.listType(u, v)),
                    (s = h && h.tag),
                    !s || rt.indexOf(d) < 0
                      ? u.innerHTML
                        ? o && !w && o.appendChild(u)
                        : t.remove(u)
                      : r.msie ||
                        ((f = v.level || parseFloat(u.style.marginLeft || 0)),
                        (y = s + k),
                        c[f] || (c[f] = {}),
                        (!l || l < 0) &&
                          ((l = f),
                          (g = k),
                          (nt = n(i).find("[data-list='" + g + "']:last")[0]),
                          (b = this._createList(s, h.style)),
                          t.insertBefore(b, u),
                          (p = f),
                          (c[f][y] = b)),
                        (w = nt === u),
                        (e = c[f][y]),
                        (f > p || !e) &&
                          ((e = this._createList(s, h.style)),
                          (c[f][y] = e),
                          o.appendChild(e)),
                        (o = this._convertToLi(u)),
                        e.appendChild(o),
                        w ? (l = p = -1) : (p = f)));
            },
            removeAttributes: function (n) {
              for (var i = n.attributes, r = i.length; r--; )
                "colspan" != t.name(i[r]) && n.removeAttributeNode(i[r]);
            },
            createColGroup: function (t) {
              var r = t.cells,
                f = n(t).closest("table"),
                i = f.children("colgroup");
              r.length < 2 ||
                (i.length &&
                  ((r = i.children()), i[0].parentNode.removeChild(i[0])),
                (i = n(
                  n
                    .map(r, function (n) {
                      var t = n.width;
                      return t && 0 !== parseInt(t, 10)
                        ? u.format('<col style="width:{0}px;"/>', t)
                        : "<col />";
                    })
                    .join("")
                )),
                i.is("colgroup") || (i = n("<colgroup/>").append(i)),
                i.prependTo(f));
            },
            convertHeaders: function (i) {
              var r,
                u = i.cells,
                f = n.map(u, function (i) {
                  var r = n(i).children("p").children("strong")[0];
                  if (r && "strong" == t.name(r)) return r;
                });
              if (f.length == u.length) {
                for (r = 0; r < f.length; r++) t.unwrap(f[r]);
                for (
                  n(i)
                    .closest("table")
                    .find("colgroup")
                    .after("<thead></thead>")
                    .end()
                    .find("thead")
                    .append(i),
                    r = 0;
                  r < u.length;
                  r++
                )
                  t.changeTag(u[r], "th");
              }
            },
            removeParagraphs: function (i) {
              for (var r, e, o, f, u = 0; u < i.length; u++)
                for (
                  this.removeAttributes(i[u]),
                    o = n(i[u]),
                    f = o.children("p"),
                    r = 0,
                    e = f.length;
                  r < e;
                  r++
                )
                  r < e - 1 && t.insertAfter(t.create(document, "br"), f[r]),
                    t.unwrap(f[r]);
            },
            removeDefaultColors: function (n) {
              for (var i = 0; i < n.length; i++)
                /^\s*color:\s*[^;]*;?$/i.test(n[i].style.cssText) &&
                  t.unwrap(n[i]);
            },
            tables: function (t) {
              for (
                var r, s, o, u, f = n(t).find("table"), e = this, i = 0;
                i < f.length;
                i++
              ) {
                for (r = f[i].rows, o = s = r[0], u = 1; u < r.length; u++)
                  r[u].cells.length > o.cells.length && (o = r[u]);
                e.createColGroup(o);
                e.convertHeaders(s);
                e.removeAttributes(f[i]);
                e.removeParagraphs(f.eq(i).find("td,th"));
                e.removeDefaultColors(f.eq(i).find("span"));
              }
            },
            headers: function (i) {
              for (var u = n(i).find("p.MsoTitle"), r = 0; r < u.length; r++)
                t.changeTag(u[r], "h1");
            },
            removeFormatting: function (t) {
              n(t)
                .find("*")
                .each(function () {
                  n(this).css({ fontSize: "", fontFamily: "" });
                  this.getAttribute("style") ||
                    this.style.cssText ||
                    this.removeAttribute("style");
                });
            },
            clean: function (n) {
              var u,
                r = this,
                f = this.options;
              return (
                f.none
                  ? ((n = i.fn.clean.call(r, n, this.junkReplacements)),
                    (n = r.stripEmptyAnchors(n)))
                  : ((n = f.msConvertLists ? this.extractListLevels(n) : n),
                    (n = i.fn.clean.call(r, n)),
                    (n = r.stripEmptyAnchors(n)),
                    (u = t.create(document, "div", { innerHTML: n })),
                    r.headers(u),
                    f.msConvertLists && r.lists(u),
                    r.tables(u),
                    f.msAllFormatting && r.removeFormatting(u),
                    (n = u.innerHTML.replace(
                      /(<[^>]*)\s+class="?[^"\s>]*"?/gi,
                      "$1"
                    ))),
                n
              );
            },
          }),
          y = i.extend({
            init: function (n) {
              i.fn.init.call(this, n);
              this.replacements = [
                /\s+class="Apple-style-span[^"]*"/gi,
                "",
                /<(div|p|h[1-6])\s+style="[^"]*"/gi,
                "<$1",
                /^<div>(.*)<\/div>$/,
                "$1",
              ];
            },
            applicable: function (n) {
              return /class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(
                n
              );
            },
          }),
          p = i.extend({
            clean: function (n) {
              var i = t.create(document, "div", { innerHTML: n });
              return (i = this.cleanDom(i)), i.innerHTML;
            },
            cleanDom: function (n) {
              return n;
            },
          }),
          w = p.extend({
            cleanDom: function (i) {
              var r = this.collectTags();
              return (
                n(i)
                  .find(r)
                  .each(function () {
                    t.unwrap(this);
                  }),
                i
              );
            },
            collectTags: function () {
              if (this.options.span) return "span";
            },
            applicable: function () {
              return this.options.span;
            },
          }),
          b = p.extend({
            cleanDom: function (t) {
              var i = this.collectAttr(),
                r = n(t).find("[" + i.join("],[") + "]");
              return r.removeAttr(i.join(" ")), t;
            },
            collectAttr: function () {
              return this.options.css ? ["class", "style"] : [];
            },
            applicable: function () {
              return this.options.css;
            },
          }),
          tt = function () {
            this.text = "";
            this.add = function (n) {
              this.text += n;
            };
          },
          k = e.extend({
            init: function (n) {
              this.separators = n || { text: " ", line: "<br/>" };
              this.lines = [];
              this.inlineBlockText = [];
              this.resetLine();
            },
            appendText: function (n) {
              3 === n.nodeType && (n = n.nodeValue);
              this.textContainer.add(n);
            },
            appendInlineBlockText: function (n) {
              this.inlineBlockText.push(n);
            },
            flashInlineBlockText: function () {
              this.inlineBlockText.length &&
                (this.appendText(this.inlineBlockText.join(" ")),
                (this.inlineBlockText = []));
            },
            endLine: function () {
              this.flashInlineBlockText();
              this.resetLine();
            },
            html: function () {
              var n,
                r,
                e,
                u,
                t,
                f,
                o,
                s,
                h = this.separators,
                i = "",
                c = this.lines;
              for (
                this.flashInlineBlockText(), n = 0, r = c.length, e = r - 1;
                n < r;
                n++
              ) {
                for (u = c[n], t = 0, f = u.length, o = f - 1; t < f; t++)
                  (s = u[t].text), (i += s), t !== o && (i += h.text);
                n !== e && (i += h.line);
              }
              return i;
            },
            resetLine: function () {
              this.textContainer = new tt();
              this.line = [];
              this.line.push(this.textContainer);
              this.lines.push(this.line);
            },
          }),
          it = e.extend({
            init: function (n) {
              this.callback = n;
            },
            enumerate: function (n) {
              var i, t;
              n &&
                ((i = this.callback(n)),
                (t = n.firstChild),
                !i && t && this.enumerate(t),
                this.enumerate(n.nextSibling));
            },
          }),
          o = i.extend({
            init: function (t) {
              i.fn.init.call(this, t);
              this.hasText = !1;
              this.enumerator = new it(n.proxy(this.buildText, this));
            },
            clean: function (n) {
              var i = t.create(document, "div", { innerHTML: n });
              return this.cleanDom(i);
            },
            cleanDom: function (n) {
              return (
                (this.separators = this.getDefaultSeparators()),
                (this.htmlLines = new k(this.separators)),
                this.enumerator.enumerate(n.firstChild),
                (this.hasText = !1),
                this.htmlLines.html()
              );
            },
            buildText: function (n) {
              if (t.isDataNode(n)) {
                if (t.isEmptyspace(n)) return;
                this.htmlLines.appendText(
                  n.nodeValue.replace("\n", this.separators.line)
                );
                this.hasText = !0;
              } else {
                if (t.isBlock(n) && this.hasText) {
                  var i = this.actions[t.name(n)] || this.actions.block;
                  return i(this, n);
                }
                t.isBr(n) && this.htmlLines.appendText(this.separators.line);
              }
            },
            applicable: function () {
              var n = this.options;
              return n.all || n.keepNewLines;
            },
            getDefaultSeparators: function () {
              return this.options.all
                ? { text: " ", line: " " }
                : { text: " ", line: "<br/>" };
            },
            actions: {
              ul: n.noop,
              ol: n.noop,
              table: n.noop,
              thead: n.noop,
              tbody: n.noop,
              td: function (n, t) {
                var i = new o({ all: !0 }),
                  r = i.cleanDom(t);
                return n.htmlLines.appendInlineBlockText(r), !0;
              },
              block: function (n) {
                n.htmlLines.endLine();
              },
            },
          }),
          d = i.extend({
            clean: function (n) {
              return this.options.custom(n);
            },
            applicable: function () {
              return "function" == typeof this.options.custom;
            },
          });
        c(f, {
          Clipboard: nt,
          Cleaner: i,
          ScriptCleaner: l,
          TabCleaner: a,
          MSWordFormatCleaner: v,
          WebkitFormatCleaner: y,
          HtmlTagsCleaner: w,
          HtmlAttrCleaner: b,
          HtmlContentCleaner: o,
          HtmlTextLines: k,
          CustomCleaner: d,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/keyboard.min", ["editor/command.min"], n);
  })(
    function () {
      !(function (n) {
        function k(n, t) {
          return (
            t.startContainer === n &&
            t.endContainer === n &&
            0 === t.startOffset &&
            t.endOffset == n.childNodes.length
          );
        }
        function h(n, t, i) {
          for (var r = n ? n[t] : null; r && !i(r); ) r = r[t];
          return r;
        }
        var f = window.kendo,
          r = f.Class,
          i = f.ui.editor,
          e = i.RangeUtils,
          t = i.Dom,
          o = i.RestorePoint,
          c = i.Marker,
          l = f.support.browser,
          a = '<br class="k-br">',
          v = n.extend,
          s = t.nodeTypes,
          y = "previousSibling",
          u = "td,th,caption",
          p = "table,tbody,thead,tfoot,tr",
          d = p + "," + u,
          w = function (t) {
            return !t.collapsed && n(t.commonAncestorContainer).is(p);
          },
          b = r.extend({
            remove: function (i) {
              var s,
                h,
                f,
                o,
                l,
                r,
                a,
                y = this,
                v = new c();
              v.add(i, !1);
              s = e.getAll(i, function (t) {
                return n(t).is(d);
              });
              h = e.documentFromRange(i);
              f = v.start;
              o = v.end;
              l = u.split(",");
              r = t.parentOfType(f, l);
              a = t.parentOfType(o, l);
              y._removeContent(f, r, !0);
              y._removeContent(o, a, !1);
              n(s).each(function (t, i) {
                i = n(i);
                (i.is(u) ? i : i.find(u)).each(function (n, t) {
                  t.innerHTML = "&#65279;";
                });
              });
              r &&
                !f.previousSibling &&
                t.insertBefore(h.createTextNode("﻿"), f);
              a && !o.nextSibling && t.insertAfter(h.createTextNode("﻿"), o);
              r
                ? i.setStartBefore(f)
                : s[0] &&
                  ((r = n(s[0])),
                  (r = r.is(u) ? r : r.find(u).first()),
                  r.length && i.setStart(r.get(0), 0));
              i.collapse(!0);
              t.remove(f);
              t.remove(o);
            },
            _removeContent: function (i, r, u) {
              if (r) {
                var f,
                  e = u ? "nextSibling" : "previousSibling",
                  o = function (t) {
                    for (; t && !t[e]; ) t = t.parentNode;
                    return t && n.contains(r, t) ? t[e] : null;
                  };
                for (i = o(i); i; ) (f = o(i)), t.remove(i), (i = f);
              }
            },
          }),
          g = r.extend({
            init: function (n) {
              this.editor = n;
            },
            keydown: function (t) {
              var r,
                e,
                c,
                a,
                f = this,
                u = f.editor,
                s = u.keyboard,
                y = s.isTypingKey(t),
                h = v(n.Event(), t);
              return (
                f.editor.trigger("keydown", h),
                h.isDefaultPrevented()
                  ? (t.preventDefault(), !0)
                  : !(h.isDefaultPrevented() || !y || s.isTypingInProgress()) &&
                    ((r = u.getRange()),
                    (e = u.body),
                    (f.startRestorePoint = new o(r, e)),
                    w(r) && ((c = new b(u)), c.remove(r), u.selectRange(r)),
                    l.webkit && !r.collapsed && k(e, r) && (e.innerHTML = ""),
                    u.immutables &&
                      i.Immutables.immutablesContext(r) &&
                      ((a = new i.BackspaceHandler(u)), a.deleteSelection(r)),
                    s.startTyping(function () {
                      f.endRestorePoint = i._finishUpdate(
                        u,
                        f.startRestorePoint
                      );
                    }),
                    !0)
              );
            },
            keyup: function (n) {
              var t = this.editor.keyboard;
              return (
                this.editor.trigger("keyup", n),
                !!t.isTypingInProgress() && (t.endTyping(), !0)
              );
            },
          }),
          nt = r.extend({
            init: function (n) {
              this.editor = n;
            },
            _addCaret: function (n) {
              var i = t.create(this.editor.document, "a");
              return (
                !f.support.browser.chrome &&
                  n.firstChild &&
                  n.firstChild.nodeType === s.ELEMENT_NODE &&
                  (n = n.firstChild),
                t.insertAt(n, i, 0),
                t.stripBomNode(i.previousSibling),
                t.stripBomNode(i.nextSibling),
                i
              );
            },
            _restoreCaret: function (n) {
              var i = this.editor.createRange();
              !n.nextSibling && t.isDataNode(n.previousSibling)
                ? i.setStart(n.previousSibling, n.previousSibling.length)
                : i.setStartAfter(n);
              i.collapse(!0);
              this.editor.selectRange(i);
              t.remove(n);
            },
            _handleDelete: function (n) {
              var r,
                f,
                e = n.endContainer,
                u = t.closestEditableOfType(e, t.blockElements);
              return (
                !(!u || !i.RangeUtils.isEndOf(n, u)) &&
                ((r = t.next(u)),
                !(!r || "p" != t.name(r)) &&
                  ((f = this._addCaret(r)),
                  this._merge(u, r),
                  this._restoreCaret(f),
                  !0))
              );
            },
            _cleanBomBefore: function (n) {
              for (
                var i = n.startOffset,
                  r = n.startContainer,
                  u = r.nodeValue,
                  t = 0;
                i - t >= 0 && "﻿" == u[i - t - 1];

              )
                t++;
              t > 0 &&
                (r.deleteData(i - t, t),
                n.setStart(r, Math.max(0, i - t)),
                n.collapse(!0),
                this.editor.selectRange(n));
            },
            _handleBackspace: function (r) {
              var l,
                p,
                w,
                b,
                d,
                a,
                g,
                v,
                c,
                e,
                k,
                nt,
                tt,
                o = r.startContainer,
                f = t.closestEditableOfType(o, ["li"]),
                u = t.closestEditableOfType(
                  o,
                  "p,h1,h2,h3,h4,h5,h6".split(",")
                ),
                s = this.editor;
              if (t.isDataNode(o)) {
                if (r.collapsed && /^\s[\ufeff]+$/.test(o.nodeValue))
                  return (
                    r.setStart(o, 0),
                    r.setEnd(o, o.length),
                    s.selectRange(r),
                    !1
                  );
                this._cleanBomBefore(r);
              }
              return (
                (l = h(u, y, function (n) {
                  return !t.htmlIndentSpace(n);
                })),
                r.collapsed &&
                  r.startOffset !== r.endOffset &&
                  r.startOffset < 0 &&
                  ((r.startOffset = 0), (r.endOffset = 0), s.selectRange(r)),
                (p = f && i.RangeUtils.isStartOf(r, f)),
                (w = f && n(f).index()),
                (b = p && w > 0),
                b && ((u = f), (l = t.prev(f))),
                u && l && t.is(l, "table") && i.RangeUtils.isStartOf(r, u)
                  ? ("" === u.innerText && (u.innerHTML = "﻿"), !0)
                  : i.RangeUtils.isStartOf(r, u) &&
                    (parseInt(u.style.marginLeft, 10) > 0 ||
                      parseInt(u.style.marginRight, 10) > 0)
                  ? (s.exec("outdent"), !0)
                  : (u && l && i.RangeUtils.isStartOf(r, u)) || b
                  ? ((d = this._addCaret(u)),
                    this._merge(l, u),
                    this._restoreCaret(d),
                    !0)
                  : p && 0 === w
                  ? ((a = f.firstChild),
                    a ||
                      ((f.innerHTML = i.emptyElementContent),
                      (a = f.firstChild)),
                    (g = new i.ListFormatter(t.name(f.parentNode), "p")),
                    r.selectNodeContents(f),
                    g.toggle(r),
                    t.insignificant(a) ? r.setStartBefore(a) : r.setStart(a, 0),
                    s.selectRange(r),
                    !0)
                  : ((v = o.childNodes[r.startOffset - 1]),
                    (c = r),
                    (e = v && t.closestEditableOfType(v, ["a"])),
                    (k = h(v || o, y, function (n) {
                      return !t.isDataNode(n) || (!t.isBom(n) && n.length > 0);
                    })),
                    (e || ((0 === r.startOffset || v) && t.is(k, "a"))) &&
                      ((e = e || k),
                      (c = s.createRange()),
                      c.setStart(e, e.childNodes.length),
                      c.collapse(!0)),
                    (e =
                      e ||
                      t.closestEditableOfType(v || c.startContainer, ["a"])),
                    (nt = e && i.RangeUtils.isEndOf(c, e)),
                    nt &&
                      ((tt = new i.UnlinkCommand({
                        range: c,
                        body: s.body,
                        immutables: !!s.immutables,
                      })),
                      s.execCommand(tt),
                      s._selectionChange()),
                    !1)
              );
            },
            _handleSelection: function (r) {
              var l,
                f,
                u,
                s,
                e = r.commonAncestorContainer,
                h = t.closest(e, "table"),
                a = i.emptyElementContent,
                o = this.editor;
              return w(r)
                ? ((l = new b(o)), l.remove(r), o.selectRange(r), !0)
                : ((f = new c()),
                  f.add(r, !1),
                  r.commonAncestorContainer === o.body &&
                    this._surroundFullyContent(f, r),
                  o.immutables && this._handleImmutables(f),
                  this._surroundFullySelectedAnchor(f, r),
                  r.setStartAfter(f.start),
                  r.setEndBefore(f.end),
                  (u = r.startContainer),
                  (s = r.endContainer),
                  r.deleteContents(),
                  "li" === s.tagName.toLocaleLowerCase() &&
                    t.emptyNode(s) &&
                    (r.selectNode(s), r.deleteContents()),
                  h &&
                    "" === n(h).text() &&
                    (r.selectNode(h), r.deleteContents()),
                  (e = r.commonAncestorContainer),
                  "p" === t.name(e) &&
                    "" === e.innerHTML &&
                    ((e.innerHTML = a), r.setStart(e, 0)),
                  this._join(u, s),
                  t.insertAfter(o.document.createTextNode("﻿"), f.start),
                  f.remove(r),
                  (u = r.startContainer),
                  "tr" == t.name(u) &&
                    ((u = u.childNodes[Math.max(0, r.startOffset - 1)]),
                    r.setStart(u, t.getNodeLength(u))),
                  r.collapse(!0),
                  o.selectRange(r),
                  t.isDataNode(u) &&
                    !t.emptyNode(u.parentElement) &&
                    this._cleanBomBefore(r),
                  !0);
            },
            _handleImmutables: function (n) {
              var f = i.Immutables.immutableParent,
                u = f(n.start),
                r = f(n.start);
              u && t.insertBefore(n.start, u);
              r && t.insertAfter(n.end, r);
              u && t.remove(u);
              r && r.parentNode && t.remove(r);
            },
            _surroundFullyContent: function (n, t) {
              var i = t.commonAncestorContainer.children,
                r = i[0],
                u = i[i.length - 1];
              this._moveMarker(n, t, r, u);
            },
            _surroundFullySelectedAnchor: function (t, i) {
              var r = t.start,
                u = n(r).closest("a").get(0),
                f = t.end,
                e = n(f).closest("a").get(0);
              this._moveMarker(t, i, u, e);
            },
            _moveMarker: function (n, i, r, u) {
              var f = n.start,
                o = n.end;
              r && e.isStartOf(i, r) && t.insertBefore(f, r);
              u && e.isEndOf(i, u) && t.insertAfter(o, u);
            },
            _root: function (n) {
              for (
                ;
                n &&
                "body" != t.name(n) &&
                n.parentNode &&
                "body" != t.name(n.parentNode);

              )
                n = n.parentNode;
              return n;
            },
            _join: function (n, i) {
              n = this._root(n);
              i = this._root(i);
              n != i && t.is(i, "p") && this._merge(n, i);
            },
            _merge: function (n, i) {
              for (t.removeTrailingBreak(n); n && i.firstChild; )
                1 == n.nodeType
                  ? ((n = t.list(n) ? n.children[n.children.length - 1] : n),
                    n && n.appendChild(i.firstChild))
                  : n.nodeType === s.TEXT_NODE
                  ? this._mergeWithTextNode(n, i.firstChild)
                  : n.parentNode.appendChild(i.firstChild);
              t.remove(i);
            },
            _mergeWithTextNode: function (n, i) {
              n &&
                n.nodeType === s.TEXT_NODE &&
                (n.nextSibling && this._isCaret(n.nextSibling)
                  ? t.insertAfter(i, n.nextSibling)
                  : t.insertAfter(i, n));
            },
            _isCaret: function (t) {
              return n(t).is("a");
            },
            keydown: function (n) {
              var t,
                e,
                r = this.editor,
                u = r.getRange(),
                s = n.keyCode,
                h = f.keys,
                c = s === h.BACKSPACE,
                l = s == h.DELETE;
              (r.immutables && r.immutables.keydown(n, u)) ||
                ((!c && !l) || u.collapsed
                  ? c
                    ? (t = "_handleBackspace")
                    : l && (t = "_handleDelete")
                  : (t = "_handleSelection"),
                t &&
                  ((e = new o(u, r.body)),
                  this[t](u) && (n.preventDefault(), i._finishUpdate(r, e))));
            },
            deleteSelection: function (n) {
              this._handleSelection(n);
            },
            keyup: n.noop,
          }),
          tt = r.extend({
            init: function (n) {
              this.editor = n;
              this.systemCommandIsInProgress = !1;
            },
            createUndoCommand: function () {
              this.startRestorePoint = this.endRestorePoint = i._finishUpdate(
                this.editor,
                this.startRestorePoint
              );
            },
            changed: function () {
              return (
                !!this.startRestorePoint &&
                this.startRestorePoint.html != this.editor.body.innerHTML
              );
            },
            keydown: function (n) {
              var t = this,
                r = t.editor,
                i = r.keyboard;
              return i.isModifierKey(n)
                ? (i.isTypingInProgress() && i.endTyping(!0),
                  (t.startRestorePoint = new o(r.getRange(), r.body)),
                  !0)
                : !!i.isSystem(n) &&
                    ((t.systemCommandIsInProgress = !0),
                    t.changed() &&
                      ((t.systemCommandIsInProgress = !1),
                      t.createUndoCommand()),
                    !0);
            },
            keyup: function () {
              var n = this;
              return (
                !(!n.systemCommandIsInProgress || !n.changed()) &&
                ((n.systemCommandIsInProgress = !1), n.createUndoCommand(), !0)
              );
            },
          }),
          it = r.extend({
            init: function (n) {
              this.editor = n;
            },
            keydown: function (n) {
              !l.webkit ||
                n.isDefaultPrevented() ||
                !n.ctrlKey ||
                65 != n.keyCode ||
                n.altKey ||
                n.shiftKey ||
                (this.editor.options.immutables &&
                  this._toSelectableImmutables(),
                this._selectEditorBody());
            },
            _selectEditorBody: function () {
              var n = this.editor,
                t = n.getRange();
              t.selectNodeContents(n.body);
              n.selectRange(t);
            },
            _toSelectableImmutables: function () {
              for (
                var s = this.editor,
                  f = s.body,
                  e = i.Immutables.immutable,
                  o = t.emptyTextNode,
                  r = f.firstChild,
                  u = f.lastChild;
                o(r);

              )
                r = r.nextSibling;
              for (; o(u); ) u = u.previousSibling;
              r && e(r) && n(a).prependTo(f);
              u && e(u) && n(a).appendTo(f);
            },
            keyup: n.noop,
          }),
          rt = r.extend({
            init: function (n) {
              this.handlers = n;
              this.typingInProgress = !1;
            },
            isCharacter: function (n) {
              return (
                (n >= 48 && n <= 90) ||
                (n >= 96 && n <= 111) ||
                (n >= 186 && n <= 192) ||
                (n >= 219 && n <= 222) ||
                229 == n
              );
            },
            toolFromShortcut: function (t, i) {
              var u,
                r,
                f = String.fromCharCode(i.keyCode),
                e = this._getShortcutModifier(i, navigator.platform);
              for (u in t)
                if (
                  ((r = n.extend(
                    { ctrl: !1, alt: !1, shift: !1 },
                    t[u].options
                  )),
                  (r.key == f || r.key == i.keyCode) &&
                    r.ctrl == e &&
                    r.alt == i.altKey &&
                    r.shift == i.shiftKey)
                )
                  return u;
            },
            _getShortcutModifier: function (n, t) {
              var i = t.toUpperCase().indexOf("MAC") >= 0;
              return i ? n.metaKey : n.ctrlKey;
            },
            toolsFromShortcut: function (t, i) {
              var u,
                r,
                f,
                s = String.fromCharCode(i.keyCode),
                e = [],
                o = function (n) {
                  return n == s || n == i.keyCode || n == i.charCode;
                };
              for (u in t)
                (r = n.extend({ ctrl: !1, alt: !1, shift: !1 }, t[u].options)),
                  (f = n.isArray(r.key)
                    ? n.grep(r.key, o).length > 0
                    : o(r.key)),
                  f &&
                    r.ctrl == i.ctrlKey &&
                    r.alt == i.altKey &&
                    r.shift == i.shiftKey &&
                    e.push(t[u]);
              return e;
            },
            isTypingKey: function (n) {
              var t = n.keyCode;
              return (
                (this.isCharacter(t) && !n.ctrlKey && !n.altKey) ||
                32 == t ||
                13 == t ||
                8 == t ||
                (46 == t && !n.shiftKey && !n.ctrlKey && !n.altKey)
              );
            },
            isModifierKey: function (n) {
              var t = n.keyCode;
              return (
                (17 == t && !n.shiftKey && !n.altKey) ||
                (16 == t && !n.ctrlKey && !n.altKey) ||
                (18 == t && !n.ctrlKey && !n.shiftKey)
              );
            },
            isSystem: function (n) {
              return 46 == n.keyCode && n.ctrlKey && !n.altKey && !n.shiftKey;
            },
            startTyping: function (n) {
              this.onEndTyping = n;
              this.typingInProgress = !0;
            },
            stopTyping: function () {
              this.typingInProgress && this.onEndTyping && this.onEndTyping();
              this.typingInProgress = !1;
            },
            endTyping: function (t) {
              var i = this;
              i.clearTimeout();
              t
                ? i.stopTyping()
                : (i.timeout = window.setTimeout(
                    n.proxy(i.stopTyping, i),
                    1e3
                  ));
            },
            isTypingInProgress: function () {
              return this.typingInProgress;
            },
            clearTimeout: function () {
              window.clearTimeout(this.timeout);
            },
            notify: function (n, t) {
              for (
                var r = this.handlers, i = 0;
                i < r.length && !r[i][t](n);
                i++
              );
            },
            keydown: function (n) {
              this.notify(n, "keydown");
            },
            keyup: function (n) {
              this.notify(n, "keyup");
            },
          });
        v(i, {
          TypingHandler: g,
          SystemHandler: tt,
          BackspaceHandler: nt,
          SelectAllHandler: it,
          Keyboard: rt,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/exportpdf.min", ["editor/command.min"], n);
  })(
    function () {
      !(function (n) {
        var f = window.kendo,
          t = f.ui.editor,
          i = t.Command,
          r = t.EditorUtils,
          e = r.registerTool,
          o = t.Tool,
          s = t.ToolTemplate,
          h = n.extend,
          u = i.extend({
            init: function (n) {
              this.async = !0;
              i.fn.init.call(this, n);
            },
            exec: function () {
              var t = this,
                i = t.lockRange(!0),
                n = t.editor;
              n._destroyResizings();
              n.saveAsPDF().then(function () {
                t.releaseRange(i);
                n._initializeColumnResizing();
                n._initializeRowResizing();
                n._initializeTableResizing();
              });
            },
          });
        h(t, { ExportPdfCommand: u });
        e(
          "pdf",
          new o({
            command: u,
            template: new s({
              template: r.buttonTemplate,
              title: "Export PDF",
            }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/plugins/print.min", ["editor/command.min"], n);
  })(
    function () {
      !(function (n) {
        var i = window.kendo,
          t = i.ui.editor,
          r = t.Command,
          u = t.EditorUtils,
          e = u.registerTool,
          o = t.Tool,
          s = t.ToolTemplate,
          h = n.extend,
          f = r.extend({
            init: function (n) {
              r.fn.init.call(this, n);
              this.managesUndoRedo = !0;
            },
            exec: function () {
              var n = this.editor;
              i.support.browser.msie
                ? n.document.execCommand("print", !1, null)
                : n.window.print && n.window.print();
            },
          });
        h(t, { PrintCommand: f });
        e(
          "print",
          new o({
            command: f,
            template: new s({ template: u.buttonTemplate, title: "Print" }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("editor/resizing/resizing-utils.min", ["editor/main.min"], n);
  })(
    function () {
      !(function (n) {
        function o(n) {
          var i = n.value,
            r = n.min,
            u = n.max;
          return y(v(t(i), t(u)), t(r));
        }
        function s(t) {
          return t && !f(t).is("body") && t.scrollHeight > t.clientHeight
            ? n.support.scrollbar()
            : 0;
        }
        function h(n, r) {
          return i(n) ? t(n) : (t(n) / r) * 100;
        }
        function i(n) {
          return typeof n === e && d.test(n);
        }
        function c(n) {
          return typeof n === e && g.test(n);
        }
        function l(n) {
          return t(n) + b;
        }
        function a(n) {
          return t(n) + k;
        }
        var r = window,
          u = r.Math,
          v = u.min,
          y = u.max,
          t = r.parseFloat,
          f = n.jQuery,
          p = f.extend,
          w = n.ui.editor,
          b = "%",
          k = "px",
          d = /(\d+)(\.?)(\d*)%/,
          g = /(\d+)(\.?)(\d*)px/,
          e = "string",
          nt = {
            constrain: o,
            getScrollBarWidth: s,
            calculatePercentageRatio: h,
            inPercentages: i,
            inPixels: c,
            toPercentages: l,
            toPixels: a,
          };
        p(w, { ResizingUtils: nt });
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "editor/resizing/table-element-resizing.min",
      [
        "editor/main.min",
        "kendo.resizable.min",
        "editor/resizing/resizing-utils.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        var t = n.jQuery,
          h = t.extend,
          i = t.noop,
          u = t.proxy,
          v = n.ui.editor,
          c = n.Class,
          e = "keydown",
          y = "mousedown",
          p = "mouseenter",
          l = "mouseleave",
          w = "mousemove",
          a = "mouseup",
          b = ",",
          o = ".",
          k = ":last-child",
          r = "table",
          s = c.extend({
            init: function (n, i) {
              var u = this;
              u.options = h({}, u.options, i);
              u.options.tags = t.isArray(u.options.tags)
                ? u.options.tags
                : [u.options.tags];
              t(n).is(r) && ((u.element = n), u._attachEventHandlers());
            },
            destroy: function () {
              var n = this,
                i = n.options.eventNamespace;
              n.element && (t(n.element).off(i), (n.element = null));
              t(n.options.rootElement).off(e + i);
              n._destroyResizeHandle();
            },
            options: {
              tags: [],
              min: 0,
              rootElement: null,
              eventNamespace: "",
              rtl: !1,
              handle: {
                dataAttribute: "",
                height: 0,
                width: 0,
                classNames: {},
                template: "",
              },
            },
            _attachEventHandlers: function () {
              var n = this,
                i = n.options;
              t(n.element).on(
                w + i.eventNamespace,
                i.tags.join(b),
                u(n.detectElementBorderHovering, n)
              );
            },
            resizingInProgress: function () {
              var t = this,
                n = t._resizable;
              return !!n && !!n.resizing;
            },
            resize: i,
            detectElementBorderHovering: function (n) {
              var i = this,
                e = i.options,
                o = e.handle,
                r = t(n.currentTarget),
                u = i.resizeHandle,
                f = o.dataAttribute;
              i.resizingInProgress() ||
                (!r.is(k) && i.elementBorderHovered(r, n)
                  ? u
                    ? u.data(f) &&
                      u.data(f) !== r[0] &&
                      i.showResizeHandle(r, n)
                    : i.showResizeHandle(r, n)
                  : u && i._destroyResizeHandle());
            },
            elementBorderHovered: i,
            showResizeHandle: function (n, t) {
              var i = this;
              0 === t.buttons &&
                (i._initResizeHandle(),
                i.setResizeHandlePosition(n),
                i.setResizeHandleDimensions(),
                i.setResizeHandleDataAttributes(n[0]),
                i._attachResizeHandleEventHandlers(),
                i._initResizable(n),
                i._hideResizeMarker(),
                i.resizeHandle.show());
            },
            _initResizeHandle: function () {
              var n = this,
                i = n.options;
              n._destroyResizeHandle();
              n.resizeHandle = t(i.handle.template).appendTo(i.rootElement);
            },
            setResizeHandlePosition: i,
            setResizeHandleDimensions: i,
            setResizeHandleDataAttributes: function (n) {
              var t = this;
              t.resizeHandle.data(t.options.handle.dataAttribute, n);
            },
            _attachResizeHandleEventHandlers: function () {
              var n = this,
                t = n.options,
                i = t.eventNamespace,
                r = t.handle.classNames.marker,
                u = n.resizeHandle;
              n.resizeHandle
                .on(y + i, function () {
                  u.find(o + r).show();
                })
                .on(a + i, function () {
                  u.find(o + r).hide();
                });
            },
            _hideResizeMarker: function () {
              var n = this;
              n.resizeHandle
                .find(o + n.options.handle.classNames.marker)
                .hide();
            },
            _destroyResizeHandle: function () {
              var n = this;
              n.resizeHandle &&
                (n._destroyResizable(),
                n.resizeHandle.off(n.options.eventNamespace).remove(),
                (n.resizeHandle = null));
            },
            _initResizable: function (t) {
              var i = this;
              i.resizeHandle &&
                (i._destroyResizable(),
                (i._resizable = new n.ui.Resizable(t, {
                  draggableElement: i.resizeHandle[0],
                  start: u(i.onResizeStart, i),
                  resize: u(i.onResize, i),
                  resizeend: u(i.onResizeEnd, i),
                })));
            },
            _destroyResizable: function () {
              var n = this;
              n._resizable && (n._resizable.destroy(), (n._resizable = null));
            },
            onResizeStart: function () {
              this._disableKeyboard();
            },
            onResize: function (n) {
              this.setResizeHandleDragPosition(n);
            },
            setResizeHandleDragPosition: i,
            onResizeEnd: function (n) {
              var t = this;
              t.resize(n);
              t._destroyResizeHandle();
              t._enableKeyboard();
            },
            _enableKeyboard: function () {
              var n = this.options;
              t(n.rootElement).off(e + n.eventNamespace);
            },
            _disableKeyboard: function () {
              var n = this.options;
              t(n.rootElement).on(e + n.eventNamespace, function (n) {
                n.preventDefault();
              });
            },
            _forceResizing: function (n) {
              var t = this._resizable;
              t && t.userEvents && t.userEvents._end(n);
            },
          }),
          f = c.extend({
            create: function (n, i) {
              var u = this,
                f = i.name,
                e = i.eventNamespace;
              t(n.body)
                .on(p + e, r, function (t) {
                  var r = t.currentTarget,
                    e = n[f];
                  t.stopPropagation();
                  e
                    ? e.element === r ||
                      e.resizingInProgress() ||
                      (u._destroyResizing(n, i), u._initResizing(n, r, i))
                    : u._initResizing(n, r, i);
                })
                .on(l + e, r, function (e) {
                  var s,
                    o = n[f];
                  e.stopPropagation();
                  !o ||
                    o.resizingInProgress() ||
                    o.resizeHandle ||
                    ((s = t(o.element).parents(r)[0]),
                    s && (u._destroyResizing(n, i), u._initResizing(n, s, i)));
                })
                .on(l + e, function () {
                  var t = n[f];
                  t && !t.resizingInProgress() && u._destroyResizing(n, i);
                })
                .on(a + e, function (e) {
                  var o,
                    s = n[f];
                  s &&
                    s.resizingInProgress() &&
                    ((o = t(e.target).parents(r)[0]),
                    o &&
                      (s._forceResizing(e),
                      u._destroyResizing(n, i),
                      u._initResizing(n, o, i)));
                });
            },
            dispose: function (n, i) {
              t(n.body).off(i.eventNamespace);
            },
            _initResizing: function (t, i, r) {
              var u = r.name,
                f = r.type;
              t[u] = new f(i, {
                rtl: n.support.isRtl(t.element),
                rootElement: t.body,
              });
            },
            _destroyResizing: function (n, t) {
              var i = t.name;
              n[i] && (n[i].destroy(), (n[i] = null));
            },
          });
        f.current = new f();
        s.create = function (n, t) {
          f.current.create(n, t);
        };
        s.dispose = function (n, t) {
          f.current.dispose(n, t);
        };
        h(v, { TableElementResizing: s });
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "editor/resizing/column-resizing.min",
      [
        "editor/main.min",
        "editor/resizing/resizing-utils.min",
        "editor/resizing/table-element-resizing.min",
        "editor/dom.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        var rt = window,
          ut = rt.Math,
          ft = ut.abs,
          t = n.jQuery,
          et = t.extend,
          o = n.ui.editor,
          p = o.Dom,
          h = o.TableElementResizing,
          u = o.ResizingUtils,
          c = u.constrain,
          w = u.calculatePercentageRatio,
          b = u.getScrollBarWidth,
          k = u.inPercentages,
          d = u.toPercentages,
          l = u.toPixels,
          i = n._outerWidth,
          a = ".kendoEditorColumnResizing",
          g = "k-column-resize-handle",
          nt = "k-column-resize-marker",
          v = "body",
          f = "tbody",
          tt = "td",
          y = "tr",
          r = "col-index",
          it = ",",
          e = "width",
          s = h.extend({
            options: {
              tags: [tt, "th"],
              min: 20,
              rootElement: null,
              eventNamespace: a,
              rtl: !1,
              handle: {
                dataAttribute: "column",
                width: 10,
                height: 0,
                classNames: { handle: g, marker: nt },
                template:
                  '<div class="k-column-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="' +
                  g +
                  '"><div class="' +
                  nt +
                  '"></div></div></div>',
              },
            },
            elementBorderHovered: function (n, r) {
              var s = this,
                u = s.options,
                f = u.handle.width,
                e = n.offset().left + (u.rtl ? 0 : i(n)),
                o = r.clientX + t(n[0].ownerDocument).scrollLeft();
              return o > e - f && o < e + f;
            },
            setResizeHandlePosition: function (n) {
              var u = this,
                o = t(u.element).children(f),
                e = u.options,
                s = e.rtl,
                h = e.handle.width,
                r = t(e.rootElement),
                c = r.is(v) ? 0 : r.scrollTop(),
                l = r.is(v) ? 0 : r.scrollLeft(),
                a = s ? 0 : i(n),
                y = s ? b(r[0]) : 0,
                p =
                  n.offset().left -
                  (r.offset().left + parseFloat(r.css("borderLeftWidth"))) -
                  parseFloat(n.css("marginLeft")),
                w =
                  o.offset().top -
                  (r.offset().top + parseFloat(r.css("borderTopWidth"))) -
                  parseFloat(o.css("marginTop"));
              u.resizeHandle.css({
                top: w + c,
                left: p + a + (l - y) - h / 2,
                position: "absolute",
              });
            },
            setResizeHandleDimensions: function () {
              var n = this,
                i = t(n.element).children(f);
              n.resizeHandle.css({
                width: n.options.handle.width,
                height: i.height(),
              });
            },
            setResizeHandleDragPosition: function (n) {
              var e = this,
                f = t(t(n.currentTarget).data(e.options.handle.dataAttribute)),
                u = e.options,
                r = t(u.rootElement),
                w = u.handle ? u.handle.width : 0,
                a = u.min,
                o = u.rtl,
                k = i(f),
                y =
                  f.offset().left -
                  (r.offset().left + parseFloat(r.css("borderLeftWidth"))) -
                  parseFloat(f.css("marginLeft")),
                p = i(f.next()),
                s = t(e.resizeHandle),
                h = r.is(v) ? 0 : r.scrollLeft(),
                l = o ? b(r[0]) : 0,
                d =
                  s.offset().left -
                  (r.offset().left + parseFloat(r.css("borderLeftWidth"))) -
                  parseFloat(s.css("marginLeft")),
                g = c({
                  value: d + (h - l) + n.x.delta,
                  min: y + (h - l) - (o ? p : 0) + a,
                  max: y + k + (h - l) + (o ? 0 : p) - w - a,
                });
              s.css({ left: g });
            },
            resize: function (n) {
              var o,
                h,
                e,
                s,
                l,
                u = this,
                f = t(t(n.currentTarget).data(u.options.handle.dataAttribute)),
                a = u.options,
                y = a.rtl ? -1 : 1,
                v = a.min,
                w = y * n.x.initialDelta;
              p.reMapTableColumns(u.element, r);
              s = parseInt(f.attr(r), 10);
              f.prop("colSpan") > 1 &&
                ((f = t(u.element)
                  .find("[" + r + "=" + (s + f.prop("colSpan") - 1) + "]")
                  .eq(0)),
                (s = parseInt(f.attr(r), 10)));
              l = t(u.element).find(
                "[" + r + "=" + (s + 1) + "]:not([colspan])"
              );
              u._setTableComputedWidth();
              u._setColumnsComputedWidth();
              e = i(f);
              h = i(l);
              o = c({ value: e + w, min: v, max: e + h - v });
              u._resizeColumn(f[0], o);
              u._resizeTopAndBottomColumns(f[0], o);
              u._resizeAdjacentColumns(parseInt(f.attr(r), 10), h, e, e - o);
              p.clearTableMappings(u.element, r);
            },
            _setTableComputedWidth: function () {
              var n = this.element;
              "" === n.style[e] && (n.style[e] = l(i(t(n))));
            },
            _setColumnsComputedWidth: function () {
              for (
                var s = this,
                  u = t(s.element).children(f),
                  h = i(u),
                  r = u.children(y).children(tt),
                  c = r.length,
                  o = r.map(function () {
                    return i(t(this));
                  }),
                  n = 0;
                n < c;
                n++
              )
                r[n].style[e] = k(r[n].style[e]) ? d(w(o[n], h)) : l(o[n]);
            },
            _resizeTopAndBottomColumns: function (n, i) {
              for (
                var e = this,
                  s = t(n).attr(r),
                  o = t(e.element)
                    .children(f)
                    .children(y)
                    .children(e.options.tags.join(it))
                    .filter(function () {
                      var i = this;
                      return t(i).attr(r) === s && i !== n;
                    }),
                  h = o.length,
                  u = 0;
                u < h;
                u++
              )
                e._resizeColumn(o[u], i);
            },
            _resizeColumn: function (n, r) {
              n.style[e] = k(n.style[e])
                ? d(w(r, i(t(this.element).children(f))))
                : l(r);
            },
            _resizeAdjacentColumns: function (n, i, u, e) {
              for (
                var s = this,
                  h = t(s.element)
                    .children(f)
                    .children(y)
                    .children(s.options.tags.join(it))
                    .filter(function () {
                      return parseInt(t(this).attr(r), 10) === n + 1;
                    }),
                  c = h.length,
                  o = 0;
                o < c;
                o++
              )
                s._resizeAdjacentColumn(h[o], i, u, e);
            },
            _resizeAdjacentColumn: function (n, t, i, r) {
              var u = this,
                f = u.options.min,
                e = c({ value: t + r, min: f, max: ft(i + t - f) });
              u._resizeColumn(n, e);
            },
          });
        s.create = function (n) {
          h.create(n, { name: "columnResizing", type: s, eventNamespace: a });
        };
        s.dispose = function (n) {
          h.dispose(n, { eventNamespace: a });
        };
        et(o, { ColumnResizing: s });
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "editor/resizing/row-resizing.min",
      [
        "editor/main.min",
        "editor/resizing/resizing-utils.min",
        "editor/resizing/table-element-resizing.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        var d = window.Math,
          g = d.abs,
          t = n.jQuery,
          nt = t.extend,
          o = n.ui.editor,
          s = o.TableElementResizing,
          u = o.ResizingUtils,
          tt = u.getScrollBarWidth,
          v = u.constrain,
          y = u.calculatePercentageRatio,
          p = u.inPercentages,
          w = u.toPercentages,
          h = u.toPixels,
          r = n._outerHeight,
          c = ".kendoEditorRowResizing",
          b = "k-row-resize-handle",
          k = "k-row-resize-marker",
          l = "body",
          a = "tr",
          f = "tbody",
          i = "height",
          e = s.extend({
            options: {
              tags: [a],
              min: 20,
              rootElement: null,
              eventNamespace: c,
              rtl: !1,
              handle: {
                dataAttribute: "row",
                width: 0,
                height: 10,
                classNames: { handle: b, marker: k },
                template:
                  '<div class="k-row-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="' +
                  b +
                  '"><div class="k-row-resize-marker-wrapper"><div class="' +
                  k +
                  '"></div></div></div></div>',
              },
            },
            elementBorderHovered: function (n, u) {
              var s = this,
                f = s.options.handle[i],
                e = n.offset().top + r(n),
                o = u.clientY + t(n[0].ownerDocument).scrollTop();
              return o > e - f && o < e + f;
            },
            setResizeHandlePosition: function (n) {
              var e = this,
                f = e.options,
                o = f.handle[i],
                u = t(f.rootElement),
                s = u.is(l) ? 0 : u.scrollTop(),
                h = u.is(l) ? 0 : u.scrollLeft(),
                c = f.rtl ? tt(u[0]) : 0,
                a =
                  n.offset().left -
                  (u.offset().left + parseFloat(u.css("borderLeftWidth"))) -
                  parseFloat(n.css("marginLeft")),
                v =
                  n.offset().top -
                  (u.offset().top + parseFloat(u.css("borderTopWidth"))) -
                  parseFloat(n.css("marginTop"));
              e.resizeHandle.css({
                top: v + r(n) + s - o / 2,
                left: a + (h - c),
                position: "absolute",
              });
            },
            setResizeHandleDimensions: function () {
              var n = this;
              n.resizeHandle.css({
                width: t(n.element).children(f).width(),
                height: n.options.handle[i],
              });
            },
            setResizeHandleDragPosition: function (n) {
              var o = this,
                e = o.options,
                a = e.min,
                s = t(o.element).children(f),
                h = t(o.resizeHandle),
                p = t(n.currentTarget).data(e.handle.dataAttribute),
                y = t(p),
                u = t(e.rootElement),
                c = u.is(l) ? 0 : u.scrollTop(),
                w =
                  s.offset().top -
                  (u.offset().top + parseFloat(u.css("borderTopWidth"))) -
                  parseFloat(s.css("marginTop")),
                b =
                  y.offset().top -
                  (u.offset().top + parseFloat(u.css("borderTopWidth"))) -
                  parseFloat(y.css("marginTop")),
                k =
                  h.offset().top -
                  (Math.max(0, u.offset().top) +
                    parseFloat(u.css("borderTopWidth"))) -
                  parseFloat(h.css("marginTop")),
                d = v({
                  value: k + c + n.y.delta,
                  min: b + c + a,
                  max: w + r(s) + c - e.handle[i] - a,
                });
              h.css({ top: d });
            },
            resize: function (n) {
              var u = this,
                e = u.options,
                o = t(n.currentTarget).data(e.handle.dataAttribute),
                s = r(t(o)),
                c = t(u.element),
                a = r(c),
                y = c.children(f),
                w = y.height(),
                b = o.style[i],
                l = v({
                  value: s + n.y.initialDelta,
                  min: e.min,
                  max: g(w - e.min),
                });
              u._setRowsHeightInPixels();
              o.style[i] = h(l);
              u._setTableHeight(a + (l - s));
              p(b) && u._setRowsHeightInPercentages();
            },
            _setRowsHeightInPixels: function () {
              for (
                var e = this,
                  u = t(e.element).children(f).children(a),
                  o = u.length,
                  s = u.map(function () {
                    return r(t(this));
                  }),
                  n = 0;
                n < o;
                n++
              )
                u[n].style[i] = h(s[n]);
            },
            _setRowsHeightInPercentages: function () {
              for (
                var o = this,
                  e = t(o.element).children(f),
                  s = e.height(),
                  u = e.children(a),
                  h = u.length,
                  c = u.map(function () {
                    return r(t(this));
                  }),
                  n = 0;
                n < h;
                n++
              )
                u[n].style[i] = w(y(c[n], s));
            },
            _setTableHeight: function (n) {
              var r = this.element;
              r.style[i] = p(r.style[i])
                ? w(y(n, t(r).parent().height()))
                : h(n);
            },
          });
        e.create = function (n) {
          s.create(n, { name: "rowResizing", type: e, eventNamespace: c });
        };
        e.dispose = function (n) {
          s.dispose(n, { eventNamespace: c });
        };
        nt(o, { RowResizing: e });
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "editor/resizing/table-resize-handle.min",
      [
        "editor/main.min",
        "kendo.draganddrop.min",
        "editor/resizing/resizing-utils.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        var r,
          k,
          d,
          g,
          nt,
          tt,
          it,
          rt,
          ut,
          i,
          f,
          l,
          ft,
          et,
          a,
          ot,
          st,
          s,
          ht,
          ct,
          lt,
          at,
          t = n.jQuery,
          c = t.extend,
          oi = t.noop,
          h = t.proxy,
          vt = n.ui.editor,
          v = n.Class,
          si = n.ui.Draggable,
          yt = n.Observable,
          hi = vt.ResizingUtils.getScrollBarWidth,
          e = n._outerWidth,
          o = n._outerHeight,
          y = ".kendoEditorTableResizeHandle",
          pt = "k-table-resize-handle",
          wt = "dragStart",
          bt = "drag",
          kt = "dragEnd",
          dt = "halfInside",
          p = "mouseover",
          w = "mouseout",
          ci = "body",
          li = "table",
          gt = "east",
          ni = "north",
          ti = "northeast",
          ii = "northwest",
          ri = "south",
          b = "southeast",
          ui = "southwest",
          fi = "west",
          ai = ".",
          vi = yt.extend({
            init: function (n) {
              var i = this;
              yt.fn.init.call(i);
              i.options = c({}, i.options, n);
              i.element = t(i.options.template).appendTo(i.options.appendTo)[0];
              i._attachEventHandlers();
              i._addStyles();
              i._initDraggable();
              i._initPositioningStrategy();
              i._initDraggingStrategy();
              t(i.element).data(li, i.options.resizableElement);
            },
            destroy: function () {
              var n = this;
              t(n.element).off(y).remove();
              n.element = null;
              n._destroyDraggable();
              n.unbind();
            },
            options: {
              appendTo: null,
              direction: b,
              resizableElement: null,
              rtl: !1,
              template:
                "<div class='k-table-resize-handle-wrapper' unselectable='on' contenteditable='false'><div class='" +
                pt +
                "'></div></div>",
            },
            events: [wt, bt, kt, p, w],
            show: function () {
              this._setPosition();
            },
            _setPosition: function () {
              var n = this,
                i = n._positioningStrategy.getPosition();
              t(n.element).css({
                top: i.top,
                left: i.left,
                position: "absolute",
              });
            },
            _attachEventHandlers: function () {
              var n = this;
              t(n.element)
                .on(p + y, h(n._onMouseOver, n))
                .on(w + y, h(n._onMouseOut, n));
            },
            _onMouseOver: function () {
              this.trigger(p);
            },
            _onMouseOut: function () {
              this.trigger(w);
            },
            _addStyles: function () {
              var n = this;
              t(n.element)
                .children(ai + pt)
                .addClass("k-resize-" + n.options.direction);
            },
            _initPositioningStrategy: function () {
              var t = this,
                n = t.options;
              t._positioningStrategy = r.create({
                name: n.direction,
                handle: t.element,
                resizableElement: n.resizableElement,
                rootElement: n.rootElement,
                rtl: n.rtl,
              });
            },
            _initDraggable: function () {
              var n = this,
                t = n.element;
              !n._draggable &&
                t &&
                (n._draggable = new si(t, {
                  dragstart: h(n._onDragStart, n),
                  drag: h(n._onDrag, n),
                  dragend: h(n._onDragEnd, n),
                }));
            },
            _onDragStart: function () {
              this.trigger(wt);
            },
            _onDrag: function (n) {
              var t = this;
              t.trigger(
                bt,
                t._draggingStrategy.adjustDragDelta({
                  deltaX: n.x.delta,
                  deltaY: n.y.delta,
                  initialDeltaX: n.x.initialDelta,
                  initialDeltaY: n.y.initialDelta,
                })
              );
            },
            _onDragEnd: function () {
              this.trigger(kt);
            },
            _destroyDraggable: function () {
              var n = this;
              n._draggable && (n._draggable.destroy(), (n._draggable = null));
            },
            _initDraggingStrategy: function () {
              var n = this;
              n._draggingStrategy = f.create({ name: n.options.direction });
            },
          }),
          ei = v.extend({
            init: function () {
              this._items = [];
            },
            register: function (n, t) {
              this._items.push({ name: n, type: t });
            },
            create: function (n) {
              for (
                var i,
                  r,
                  u = this._items,
                  f = u.length,
                  e = n.name ? n.name.toLowerCase() : "",
                  t = 0;
                t < f;
                t++
              )
                if (((r = u[t]), r.name.toLowerCase() === e)) {
                  i = r;
                  break;
                }
              if (i) return new i.type(n);
            },
          }),
          u = ei.extend({});
        u.current = new u();
        r = v.extend({
          init: function (n) {
            var t = this;
            t.options = c({}, t.options, n);
          },
          options: {
            handle: null,
            offset: dt,
            resizableElement: null,
            rootElement: null,
            rtl: !1,
          },
          getPosition: function () {
            var n = this,
              t = n.calculatePosition(),
              i = n.applyHandleOffset(t);
            return n.applyScrollOffset(i);
          },
          calculatePosition: oi,
          applyHandleOffset: function (n) {
            var i = this.options,
              r = t(i.handle);
            return i.offset === dt
              ? { top: n.top - o(r) / 2, left: n.left - e(r) / 2 }
              : n;
          },
          applyScrollOffset: function (n) {
            var r = this.options,
              i = t(r.rootElement),
              u = r.rtl ? hi(i[0]) : 0;
            return i.is(ci)
              ? n
              : {
                  top: n.top + (i.scrollTop() || 0),
                  left: n.left + (i.scrollLeft() || 0) - u,
                };
          },
        });
        r.create = function (n) {
          return u.current.create(n);
        };
        k = r.extend({
          calculatePosition: function () {
            var n = t(this.options.resizableElement),
              i = n.position();
            return { top: i.top + o(n) / 2, left: i.left + e(n) };
          },
        });
        u.current.register(gt, k);
        d = r.extend({
          calculatePosition: function () {
            var n = t(this.options.resizableElement),
              i = n.position();
            return { top: i.top, left: i.left + e(n) / 2 };
          },
        });
        u.current.register(ni, d);
        g = r.extend({
          calculatePosition: function () {
            var n = t(this.options.resizableElement),
              i = n.position();
            return { top: i.top, left: i.left + e(n) };
          },
        });
        u.current.register(ti, g);
        nt = r.extend({
          calculatePosition: function () {
            var i = t(this.options.resizableElement),
              n = i.position();
            return { top: n.top, left: n.left };
          },
        });
        u.current.register(ii, nt);
        tt = r.extend({
          calculatePosition: function () {
            var n = t(this.options.resizableElement),
              i = n.position();
            return { top: i.top + o(n), left: i.left + e(n) / 2 };
          },
        });
        u.current.register(ri, tt);
        it = r.extend({
          calculatePosition: function () {
            var n = t(this.options.resizableElement),
              i = n.position();
            return { top: i.top + o(n), left: i.left + e(n) };
          },
        });
        u.current.register(b, it);
        rt = r.extend({
          calculatePosition: function () {
            var n = t(this.options.resizableElement),
              i = n.position();
            return { top: i.top + o(n), left: i.left };
          },
        });
        u.current.register(ui, rt);
        ut = r.extend({
          calculatePosition: function () {
            var n = t(this.options.resizableElement),
              i = n.position();
            return { top: i.top + o(n) / 2, left: i.left };
          },
        });
        u.current.register(fi, ut);
        i = ei.extend({});
        i.current = new i();
        f = v.extend({
          init: function (n) {
            var t = this;
            t.options = c({}, t.options, n);
          },
          options: {
            deltaX: { adjustment: null, modifier: null },
            deltaY: { adjustment: null, modifier: null },
          },
          adjustDragDelta: function (n) {
            var t = this.options,
              i = t.deltaX.adjustment * t.deltaX.modifier,
              r = t.deltaY.adjustment * t.deltaY.modifier;
            return {
              deltaX: n.deltaX * i,
              deltaY: n.deltaY * r,
              initialDeltaX: n.initialDeltaX * i,
              initialDeltaY: n.initialDeltaY * r,
            };
          },
        });
        f.create = function (n) {
          return i.current.create(n);
        };
        l = f.extend({
          options: {
            deltaX: { adjustment: 1, modifier: 1 },
            deltaY: { adjustment: 0, modifier: 0 },
          },
        });
        ft = l.extend({ options: { deltaX: { modifier: 1 } } });
        i.current.register(gt, ft);
        et = l.extend({ options: { deltaX: { modifier: -1 } } });
        i.current.register(fi, et);
        a = f.extend({
          options: {
            deltaX: { adjustment: 0, modifier: 0 },
            deltaY: { adjustment: 1, modifier: 1 },
          },
        });
        ot = a.extend({ options: { deltaY: { modifier: -1 } } });
        i.current.register(ni, ot);
        st = a.extend({ options: { deltaY: { modifier: 1 } } });
        i.current.register(ri, st);
        s = f.extend({
          options: {
            deltaX: { adjustment: 1, modifier: 1 },
            deltaY: { adjustment: 1, modifier: 1 },
          },
        });
        ht = s.extend({
          options: { deltaX: { modifier: 1 }, deltaY: { modifier: -1 } },
        });
        i.current.register(ti, ht);
        ct = s.extend({
          options: { deltaX: { modifier: -1 }, deltaY: { modifier: -1 } },
        });
        i.current.register(ii, ct);
        lt = s.extend({
          options: { deltaX: { modifier: 1 }, deltaY: { modifier: 1 } },
        });
        i.current.register(b, lt);
        at = s.extend({
          options: { deltaX: { modifier: -1 }, deltaY: { modifier: 1 } },
        });
        i.current.register(ui, at);
        c(vt, { TableResizeHandle: vi });
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "editor/resizing/table-resizing.min",
      [
        "editor/main.min",
        "editor/resizing/table-resize-handle.min",
        "editor/resizing/resizing-utils.min",
      ],
      n
    );
  })(
    function () {
      !(function (n, t) {
        function it(n) {
          return t === n;
        }
        var vt = window,
          rt = vt.Math,
          s = rt.min,
          h = rt.max,
          i = n.jQuery,
          b = i.contains,
          c = i.extend,
          e = i.proxy,
          ut = n.support.browser,
          k = n.ui.editor,
          ft = n.Class,
          yt = k.TableResizeHandle,
          u = k.ResizingUtils,
          d = u.calculatePercentageRatio,
          et = u.constrain,
          l = u.inPercentages,
          pt = u.inPixels,
          g = u.toPercentages,
          a = u.toPixels,
          ot = n._outerWidth,
          v = n._outerHeight,
          r = ".kendoEditorTableResizing",
          st = "k-table-resize-handle-wrapper",
          wt = "k-table",
          ht = "k-table-resizing",
          bt = "dragStart",
          kt = "drag",
          dt = "dragEnd",
          nt = "keydown",
          ct = "mousedown",
          gt = "mouseover",
          ni = "mouseout",
          lt = "td",
          y = "tr",
          tt = "tbody",
          at = "table",
          f = "width",
          o = "height",
          ti = ".",
          p = ft.extend({
            init: function (n, t) {
              var r = this;
              r.options = c({}, r.options, t);
              r.handles = [];
              i(n).is(at) && (r.element = n);
            },
            destroy: function () {
              var n = this;
              i(n.element).off(r);
              n.element = null;
              i(n.options.rootElement).off(nt + r);
              n._destroyResizeHandles();
            },
            options: {
              appendHandlesTo: null,
              rtl: !1,
              rootElement: null,
              minWidth: 10,
              minHeight: 10,
              handles: [
                { direction: "northwest" },
                { direction: "north" },
                { direction: "northeast" },
                { direction: "east" },
                { direction: "southeast" },
                { direction: "south" },
                { direction: "southwest" },
                { direction: "west" },
              ],
            },
            resize: function (n) {
              var i = this,
                t = c(
                  {},
                  { deltaX: 0, deltaY: 0, initialDeltaX: 0, initialDeltaY: 0 },
                  n
                );
              i._resizeWidth(t.deltaX, t.initialDeltaX);
              i._resizeHeight(t.deltaY, t.initialDeltaY);
              i.showResizeHandles();
            },
            _resizeWidth: function (n, t) {
              var c,
                v,
                y,
                u,
                r = this,
                o = i(r.element),
                w = o[0].style[f],
                p = ot(o),
                e = o.parent().width(),
                b = r._getMaxDimensionValue(f);
              0 !== n &&
                (it(r._initialElementWidth) && (r._initialElementWidth = p),
                (u = et({
                  value: r._initialElementWidth + t,
                  min: r.options.minWidth,
                  max: b,
                })),
                l(w)
                  ? (p + n > e
                      ? ((v = h(u, e)), (y = s(u, e)))
                      : ((v = s(u, e)), (y = h(u, e))),
                    (c = g(d(v, y))))
                  : (c = a(u)),
                r._setColumnsWidth(),
                (o[0].style[f] = c));
            },
            _resizeHeight: function (n, t) {
              var c,
                y,
                p,
                u,
                r = this,
                e = i(r.element),
                k = e[0].style[o],
                w = v(e),
                nt = e.parent(),
                f = nt.height(),
                tt = r._getMaxDimensionValue(o),
                rt = r.options.minHeight,
                b = r._hasRowsInPixels();
              0 !== n &&
                (it(r._initialElementHeight) && (r._initialElementHeight = w),
                (u = et({
                  value: r._initialElementHeight + t,
                  min: rt,
                  max: tt,
                })),
                b && n < 0 && r._setRowsHeightInPercentages(),
                l(k)
                  ? (w + n > f
                      ? ((y = h(u, f)), (p = s(u, f)))
                      : ((y = s(u, f)), (p = h(u, f))),
                    (c = g(d(y, p))))
                  : (c = a(u)),
                (e[0].style[o] = c),
                b && n < 0 && r._setRowsHeightInPixels());
            },
            _getMaxDimensionValue: function (n) {
              var t = this,
                h = i(t.element),
                u = n.toLowerCase(),
                c = t.options.rtl ? -1 : 1,
                r = i(t.element).parent(),
                e = r[0],
                o = r[u](),
                s = c * (n === f ? r.scrollLeft() : r.scrollTop());
              return e === h.closest(lt)[0]
                ? "" !== e.style[u] || l(t.element.style[u])
                  ? o + s
                  : 1 / 0
                : o + s;
            },
            _setColumnsWidth: function () {
              function o(n) {
                var t = n.style.width;
                return "" !== t ? !!l(t) : !!i(n).hasClass(wt);
              }
              var n,
                s = this,
                t = i(s.element),
                u = t.parent()[0],
                e = t.closest(lt),
                r = e.closest(y).children(),
                h = r.length;
              if (o(t[0]) && u === e[0] && "" === u.style[f])
                for (n = 0; n < h; n++) r[n].style[f] = a(i(r[n]).width());
            },
            _hasRowsInPixels: function () {
              for (
                var r = this, t = i(r.element).children(tt).children(y), n = 0;
                n < t.length;
                n++
              )
                if ("" === t[n].style.height || pt(t[n].style.height))
                  return !0;
              return !1;
            },
            _setRowsHeightInPercentages: function () {
              for (
                var u = this,
                  r = i(u.element).children(tt),
                  f = r.height(),
                  t = r.children(y),
                  e = t.length,
                  s = t.map(function () {
                    return v(i(this));
                  }),
                  n = 0;
                n < e;
                n++
              )
                t[n].style[o] = g(d(s[n], f));
            },
            _setRowsHeightInPixels: function () {
              for (
                var r = this,
                  t = i(r.element).children(tt).children(y),
                  u = t.length,
                  f = t.map(function () {
                    return v(i(this));
                  }),
                  n = 0;
                n < u;
                n++
              )
                t[n].style[o] = a(f[n]);
            },
            showResizeHandles: function () {
              var n = this;
              n._initResizeHandles();
              n._showResizeHandles();
            },
            _initResizeHandles: function () {
              var t,
                n = this,
                r = n.handles,
                i = n.options,
                u = n.options.handles,
                f = u.length;
              if (!(r && r.length > 0)) {
                for (t = 0; t < f; t++)
                  n.handles.push(
                    new yt(
                      c(
                        {
                          appendTo: i.appendHandlesTo,
                          resizableElement: n.element,
                          rootElement: i.rootElement,
                          rtl: i.rtl,
                        },
                        u[t]
                      )
                    )
                  );
                n._bindToResizeHandlesEvents();
              }
            },
            _destroyResizeHandles: function () {
              for (
                var t = this, i = t.handles ? t.handles.length : 0, n = 0;
                n < i;
                n++
              )
                t.handles[n].destroy();
            },
            _showResizeHandles: function () {
              for (
                var t = this, i = t.handles || [], r = i.length, n = 0;
                n < r;
                n++
              )
                t.handles[n].show();
            },
            _bindToResizeHandlesEvents: function () {
              for (
                var t, n = this, r = n.handles || [], u = r.length, i = 0;
                i < u;
                i++
              )
                (t = r[i]),
                  t.bind(bt, e(n._onResizeHandleDragStart, n)),
                  t.bind(kt, e(n._onResizeHandleDrag, n)),
                  t.bind(dt, e(n._onResizeHandleDragEnd, n)),
                  t.bind(gt, e(n._onResizeHandleMouseOver, n)),
                  t.bind(ni, e(n._onResizeHandleMouseOut, n));
            },
            _onResizeHandleDragStart: function () {
              var n = this,
                t = i(n.element);
              t.addClass(ht);
              n._initialElementHeight = v(t);
              n._initialElementWidth = ot(t);
              n._disableKeyboard();
            },
            _onResizeHandleDrag: function (n) {
              this.resize(n);
            },
            _onResizeHandleDragEnd: function () {
              var n = this;
              i(n.element).removeClass(ht);
              n._enableKeyboard();
            },
            _enableKeyboard: function () {
              i(this.options.rootElement).off(nt + r);
            },
            _disableKeyboard: function () {
              i(this.options.rootElement).on(nt + r, function (n) {
                n.preventDefault();
              });
            },
          }),
          w = ft.extend({
            create: function (n) {
              var t = this;
              i(n.body)
                .on(ct + r, at, function (i) {
                  var f = i.target,
                    u = i.currentTarget,
                    e = n.tableResizing,
                    r = e ? e.element : null;
                  if (e) {
                    if (r && u !== r) {
                      if (b(u, r) && r !== f && b(r, f)) return;
                      r !== f &&
                        (n._destroyTableResizing(), t._initResizing(n, u));
                    }
                  } else t._initResizing(n, u);
                  n._showTableResizeHandles();
                })
                .on(ct + r, function (t) {
                  var u = n.tableResizing,
                    f = u ? u.element : null,
                    r = t.target,
                    e = i(r).hasClass(st) || i(r).parents(ti + st).length > 0;
                  !u || f === r || b(f, r) || e || n._destroyTableResizing();
                });
            },
            dispose: function (n) {
              i(n.body).off(r);
            },
            _initResizing: function (t, i) {
              ut.msie ||
                ut.mozilla ||
                (t.tableResizing = new p(i, {
                  appendHandlesTo: t.body,
                  rtl: n.support.isRtl(t.element),
                  rootElement: t.body,
                }));
            },
          });
        w.current = new w();
        p.create = function (n) {
          w.current.create(n);
        };
        p.dispose = function (n) {
          w.current.dispose(n);
        };
        c(k, { TableResizing: p });
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "editor/table-wizard/table-wizard-command.min",
      ["editor/plugins/tables.min"],
      n
    );
  })(
    function () {
      !(function (n, t) {
        var u = window.kendo,
          r = u.ui.editor,
          e = r.EditorUtils,
          o = r.RangeUtils,
          i = r.Dom,
          l = e.registerTool,
          a = r.ToolTemplate,
          s = r.Command,
          h = new r.BlockFormatFinder([{ tags: ["table"] }]),
          v = new r.BlockFormatFinder([{ tags: ["td", "th"] }]),
          y = /([a-z]+|%)$/i,
          f = s.extend({
            exec: function () {
              var i = this,
                f = i.editor,
                e = (i.range = i.lockRange()),
                o = (i._sourceTable = i.options.insertNewTable
                  ? t
                  : i._selectedTable(e)),
                s = (i._selectedTableCells = o ? i._selectedCells(e) : t),
                h = {
                  visible: !1,
                  messages: f.options.messages,
                  closeCallback: n.proxy(i.onDialogClose, i),
                  table: i.parseTable(o, s),
                  dialogOptions: f.options.dialogOptions,
                  isRtl: u.support.isRtl(f.wrapper),
                },
                c = new r.TableWizardDialog(h);
              c.open();
            },
            onDialogClose: function (n) {
              var t = this;
              t.releaseRange(t.range);
              n &&
                (t.options.insertNewTable
                  ? t.insertTable(t.createNewTable(n))
                  : t.updateTable(n, t._sourceTable, t._selectedTableCells));
            },
            releaseRange: function (n) {
              var t = this,
                r = t.editor.document;
              i.windowFromDocument(r).focus();
              s.fn.releaseRange.call(t, n);
            },
            insertTable: function (n) {
              var t = this.range;
              t.insertNode(n);
              t.collapse(!0);
              this.editor.selectRange(t);
              this._ensureFocusableAfterTable(n);
            },
            _ensureFocusableAfterTable: function (t) {
              for (
                var u = n(t).parent().contents(),
                  f = u.length - 1,
                  r = u.get(f);
                null !== r.nodeValue &&
                (" " === r.nodeValue || "" === r.nodeValue);

              )
                (f -= 1), (r = u.get(f));
              r === t &&
                i.insertAfter(i.createEmptyNode(this.editor.document, "p"), t);
            },
            updateTable: function (t, r, u) {
              for (
                var s,
                  a,
                  p,
                  w,
                  b,
                  v,
                  k,
                  h,
                  e = this,
                  f = n(r.rows).toArray(),
                  o = t.tableProperties,
                  y = o.rows,
                  c = o.columns,
                  l = function (n) {
                    return n[n.length - 1];
                  };
                u.length > 1;

              )
                u.pop();
              if (
                ((s = u.length ? l(u).parentNode : l(f)),
                e._deleteTableRows(f, f.length - y),
                f.length < y)
              )
                for (
                  w = n(s).index(),
                    b = s.cells.length,
                    v = y - f.length,
                    p = s.parentNode;
                  v;

                )
                  (a = p.insertRow(w + 1)),
                    e._insertCells(b - a.cells.length, a),
                    v--;
              f[0].cells.length > c &&
                n(f).each(function (n, t) {
                  for (; t.cells.length > c; ) t.deleteCell(-1);
                });
              f[0].cells.length < c &&
                ((k = n(l(u) || l(s.cells)).index()),
                n(f).each(function (n, t) {
                  e._insertCells(c - t.cells.length, t, k + 1);
                }));
              e._updateTableProperties(r, o);
              h = t.cellProperties;
              u[0] && i.attr(u[0], { id: h.id || null });
              (h.selectAllCells ? n(f).children() : n(u)).each(function (n, t) {
                e._updateCellProperties(t, h);
              });
              e._updateCaption(r, o);
              o.cellsWithHeaders = o.cellsWithHeaders || !1;
              e.cellsWithHeadersAssociated(r) != o.cellsWithHeaders &&
                e.associateCellsWithHeader(r, o.cellsWithHeaders);
            },
            _isHeadingRow: function (n) {
              return i.is(n.parentNode, "thead") || i.is(n.cells[0], "th");
            },
            associateCellsWithHeader: function (t, i) {
              var f,
                r,
                u,
                s = new Date().getTime(),
                e = [],
                h = t.rows[0].cells.length,
                c = function () {
                  for (var n = 0; n < h; n++) e[n] = "table" + ++s;
                },
                l = function (t, r) {
                  n(r)[i ? "attr" : "removeAttr"]("id", e[t]);
                },
                a = function (t, r) {
                  n(r)[i ? "attr" : "removeAttr"]("headers", e[t]);
                },
                o = this._isHeadingRow;
              n(t.rows).each(function (i, e) {
                if (o(e))
                  for (
                    f = i,
                      r = t.rows[++f],
                      u = r && !o(r),
                      u && (c(), n(e.cells).each(l));
                    u;

                  )
                    n(r.cells).each(a), (r = t.rows[++f]), (u = r && !o(r));
              });
            },
            cellsWithHeadersAssociated: function (t) {
              var i,
                r = n(t.rows).children(),
                u = this._isHeadingRow,
                f = [];
              return (
                r.each(function (n, t) {
                  t.id && u(t.parentNode) && f.push(t.id);
                }),
                (i = r.filter(function (t, i) {
                  var r = i.getAttribute("headers");
                  return r && !u(i.parentNode) && n.inArray(r, f) > -1;
                })),
                !!i.length
              );
            },
            _insertCells: function (n, t, i) {
              i = isNaN(i) ? -1 : i;
              for (var r, u = 0; u < n; u++)
                (r = t.insertCell(i)), (r.innerHTML = "&nbsp;");
            },
            _deleteTableRows: function (n, t) {
              for (var u, r, f = 0; f < t; f++)
                (u = n.pop()),
                  (r = u.parentNode),
                  r.removeChild(u),
                  r.rows.length || i.remove(r);
            },
            createNewTable: function (n) {
              var h,
                r,
                c,
                u,
                o,
                f = this,
                l = f.editor.document,
                t = n.tableProperties,
                s = n.cellProperties,
                a = s.selectAllCells,
                e = i.create(l, "table");
              for (
                f._updateTableProperties(e, t),
                  f._updateCaption(e, t),
                  h = e.createTBody(),
                  r = 0;
                r < t.rows;
                r++
              )
                for (c = h.insertRow(), u = 0; u < t.columns; u++)
                  (o = c.insertCell()),
                    (o.innerHTML = "&nbsp;"),
                    0 === r && 0 === u && s.id && (o.id = s.id),
                    f._updateCellProperties(
                      o,
                      a || (0 === r && 0 === u) ? s : {}
                    );
              return (
                t.cellsWithHeaders &&
                  f.associateCellsWithHeader(e, t.cellsWithHeaders),
                e
              );
            },
            _updateTableProperties: function (t, r) {
              var u = this._getStylesData(r);
              i.attr(t, {
                cellSpacing: r.cellSpacing || null,
                cellPadding: r.cellPadding || null,
                className: r.className || null,
                id: r.id || null,
                summary: r.summary || null,
                style: u || null,
              });
              n(t).addClass("k-table");
            },
            _updateCellProperties: function (n, t) {
              var r = this._getStylesData(t);
              r.padding = t.cellPadding || null;
              r.margin = t.cellMargin || null;
              i.attr(n, { style: r || null, className: t.className || null });
            },
            _updateCaption: function (n, t) {
              var r, u;
              n.caption && !t.captionContent
                ? n.deleteCaption()
                : t.captionContent &&
                  ((r = n.createCaption()),
                  (r.innerHTML = t.captionContent),
                  (u = this._getAlignmentData(t.captionAlignment)),
                  i.attr(r, {
                    style: {
                      textAlign: u.textAlign,
                      verticalAlign: u.verticalAlign,
                    },
                  }));
            },
            _getStylesData: function (n) {
              var t = this._getAlignmentData(n.alignment),
                i = "wrapText" in n ? (n.wrapText ? "" : "nowrap") : null;
              return {
                width: n.width ? n.width + n.widthUnit : null,
                height: n.height ? n.height + n.heightUnit : null,
                textAlign: t.textAlign,
                verticalAlign: t.verticalAlign,
                backgroundColor: n.bgColor || "",
                borderWidth: n.borderWidth,
                borderStyle: n.borderStyle,
                borderColor: n.borderColor || "",
                borderCollapse: n.collapseBorders ? "collapse" : null,
                whiteSpace: i,
              };
            },
            _getAlignmentData: function (n) {
              var i,
                t = "",
                r = t;
              return (
                n &&
                  (n.indexOf(" ") != -1
                    ? ((i = n.split(" ")), (t = i[0]), (r = i[1]))
                    : (t = n)),
                { textAlign: t, verticalAlign: r }
              );
            },
            parseTable: function (i, r) {
              var e, u, s, o, l, f, a, h, v, c;
              return i
                ? ((e = this),
                  (u = i.style),
                  (s = i.rows),
                  (o = i.caption),
                  (l = n(o ? o.cloneNode(!0) : t)),
                  l.find(".k-marker").remove(),
                  (f = i.className),
                  (f = f.replace(/^k-table\s|\sk-table$/, "")),
                  (f = f.replace(/\sk-table\s/, " ")),
                  (f = f.replace(/^k-table$/, "")),
                  (a = e._getAlignment(i, !0)),
                  (h = o ? e._getAlignment(o) : t),
                  (v = e.cellsWithHeadersAssociated(i)),
                  (c = {
                    tableProperties: {
                      width:
                        u.width || i.width
                          ? parseFloat(u.width || i.width)
                          : null,
                      height:
                        u.height || i.height
                          ? parseFloat(u.height || i.height)
                          : null,
                      columns: s[0] ? s[0].children.length : 0,
                      rows: s.length,
                      widthUnit: e._getUnit(u.width),
                      heightUnit: e._getUnit(u.height),
                      cellSpacing: i.cellSpacing,
                      cellPadding: i.cellPadding,
                      alignment: a.textAlign,
                      bgColor: u.backgroundColor || i.bgColor,
                      className: f,
                      id: i.id,
                      borderWidth: u.borderWidth || i.border,
                      borderColor: u.borderColor,
                      borderStyle: u.borderStyle || "",
                      collapseBorders: !!u.borderCollapse,
                      summary: i.summary,
                      captionContent: o ? l.html() : "",
                      captionAlignment:
                        o && h.textAlign
                          ? h.textAlign + " " + h.verticalAlign
                          : "",
                      cellsWithHeaders: v,
                    },
                    selectedCells: [],
                  }),
                  (c.rows = e.parseTableRows(s, r, c)),
                  c)
                : { tableProperties: {}, selectedCells: [] };
            },
            parseTableRows: function (t, i, r) {
              for (
                var c, e, o, s, h, f, a = this, l = [], u = 0;
                u < t.length;
                u++
              )
                for (
                  c = t[u], e = { cells: [] }, o = c.cells, l.push(e), f = 0;
                  f < o.length;
                  f++
                )
                  (s = o[f]),
                    (h = a.parseCell(s)),
                    n.inArray(s, i) != -1 && r.selectedCells.push(h),
                    e.cells.push(h);
              return l;
            },
            parseCell: function (n) {
              var u,
                r = this,
                t = n.style,
                i = r._getAlignment(n);
              return (
                (i = i.textAlign ? i.textAlign + " " + i.verticalAlign : ""),
                (u = {
                  width:
                    t.width || n.width ? parseFloat(t.width || n.width) : null,
                  height:
                    t.height || n.height
                      ? parseFloat(t.height || n.height)
                      : null,
                  widthUnit: r._getUnit(t.width),
                  heightUnit: r._getUnit(t.height),
                  cellMargin: t.margin,
                  cellPadding: t.padding,
                  alignment: i,
                  bgColor: t.backgroundColor || n.bgColor,
                  className: n.className,
                  id: n.id,
                  borderWidth: t.borderWidth || n.border,
                  borderColor: t.borderColor,
                  borderStyle: t.borderStyle,
                  wrapText: "nowrap" != t.whiteSpace,
                })
              );
            },
            _getAlignment: function (n, t) {
              var i,
                u = n.style,
                r = u.textAlign || n.align || "";
              return t
                ? { textAlign: r }
                : ((i = u.verticalAlign || n.vAlign || ""),
                  r && i
                    ? { textAlign: r, verticalAlign: i }
                    : !r && i
                    ? { textAlign: "left", verticalAlign: i }
                    : r && !i
                    ? { textAlign: r, verticalAlign: "top" }
                    : { textAlign: "", verticalAlign: "" });
            },
            _getUnit: function (n) {
              var t = (n || "").match(y);
              return t ? t[0] : "px";
            },
            _selectedTable: function (n) {
              var t = i.filterBy(o.nodes(n), i.htmlIndentSpace, !0);
              return h.findSuitable(t)[0];
            },
            _selectedCells: function (n) {
              var t = i.filterBy(o.nodes(n), i.htmlIndentSpace, !0);
              return v.findSuitable(t);
            },
          }),
          c = r.Tool.extend({
            command: function (n) {
              return (n.insertNewTable = this.options.insertNewTable), new f(n);
            },
          }),
          p = c.extend({
            update: function (n, t) {
              var i = !h.isFormatted(t);
              n.toggleClass("k-state-disabled", i);
            },
          });
        u.ui.editor.TableWizardTool = c;
        u.ui.editor.TableWizardCommand = f;
        l(
          "tableWizard",
          new p({
            command: f,
            insertNewTable: !1,
            template: new a({
              template: e.buttonTemplate,
              title: "Table Wizard",
            }),
          })
        );
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.tabstrip.min", ["kendo.data.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function et(t) {
            t.children(ct).addClass(pt);
            t.children("a").addClass(o).children(ct).addClass(pt);
            t.filter(
              ":not([disabled]):not([class*=k-state-disabled])"
            ).addClass(l);
            t.filter("li[disabled]")
              .addClass(c)
              .attr("aria-disabled", "true")
              .removeAttr("disabled");
            t.filter(":not([class*=k-state])")
              .children("a")
              .filter(":focus")
              .parent()
              .addClass(r + " " + s);
            t.attr("role", "tab");
            t.filter("." + r).attr("aria-selected", !0);
            t.each(function () {
              var t = n(this);
              t.children("." + o).length ||
                t
                  .contents()
                  .filter(function () {
                    return !(
                      this.nodeName.match(ui) ||
                      (3 == this.nodeType && !ht(this.nodeValue))
                    );
                  })
                  .wrapAll("<span UNSELECTABLE='on' class='" + o + "'/>");
            });
          }
          function p(n) {
            var t = n.children(".k-item");
            t.filter(".k-first:not(:first-child)").removeClass(wt);
            t.filter(".k-last:not(:last-child)").removeClass(vt);
            t.filter(":first-child").addClass(wt);
            t.filter(":last-child").addClass(vt);
          }
          function ot(n, t) {
            return (
              "<span class='k-button k-button-icon k-bare k-tabstrip-" +
              n +
              "' unselectable='on'><span class='k-icon " +
              t +
              "'></span></span>"
            );
          }
          var i = window.kendo,
            ii = i.ui,
            e = i.keys,
            st = n.map,
            g = n.each,
            ht = n.trim,
            u = n.extend,
            ri = i.isFunction,
            h = i.template,
            w = i._outerWidth,
            nt = i._outerHeight,
            b = ii.Widget,
            ui = /^(a|div)$/i,
            f = ".kendoTabStrip",
            ct = "img",
            lt = "href",
            k = "prev",
            tt = "next",
            at = "show",
            o = "k-link",
            vt = "k-last",
            yt = "click",
            fi = ":empty",
            pt = "k-image",
            wt = "k-first",
            it = "select",
            bt = "activate",
            rt = "k-content",
            y = "contentUrl",
            kt = "mouseenter",
            ei = "mouseleave",
            dt = "contentLoad",
            c = "k-state-disabled",
            l = "k-state-default",
            r = "k-state-active",
            a = "k-state-focused",
            ut = "k-state-hover",
            s = "k-tab-on-top",
            ft = ".k-item:not(." + c + ")",
            gt = ".k-item",
            oi = ".k-tabstrip-items > " + ft + ":not(." + r + ")",
            ni = 200,
            v = {
              content: h(
                "<div class='k-content'#= contentAttributes(data) # role='tabpanel'>#= content(item) #</div>"
              ),
              itemWrapper: h(
                "<#= tag(item) # class='k-link'#= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) #</#= tag(item) #>"
              ),
              item: h(
                "<li class='#= wrapperCssClass(group, item) #' role='tab' #=item.active ? \"aria-selected='true'\" : ''#>#= itemWrapper(data) #</li>"
              ),
              image: h("<img class='k-image' alt='' src='#= imageUrl #' />"),
              sprite: h("<span class='k-sprite #= spriteCssClass #'></span>"),
              empty: h(""),
            },
            ti = {
              wrapperCssClass: function (n, t) {
                var i = "k-item",
                  r = t.index;
                return (
                  (i +=
                    t.enabled === !1
                      ? " k-state-disabled"
                      : " k-state-default"),
                  0 === r && (i += " k-first"),
                  r == n.length - 1 && (i += " k-last"),
                  i
                );
              },
              textAttributes: function (n) {
                return n.url ? " href='" + n.url + "'" : "";
              },
              text: function (n) {
                return n.encoded === !1 ? n.text : i.htmlEncode(n.text);
              },
              tag: function (n) {
                return n.url ? "a" : "span";
              },
              contentAttributes: function (n) {
                return n.active !== !0
                  ? " style='display:none' aria-hidden='true' aria-expanded='false'"
                  : "";
              },
              content: function (n) {
                return n.content ? n.content : n.contentUrl ? "" : "&nbsp;";
              },
              contentUrl: function (n) {
                return n.contentUrl
                  ? i.attr("content-url") + '="' + n.contentUrl + '"'
                  : "";
              },
            },
            d = b.extend({
              init: function (t, u) {
                var c,
                  s,
                  h,
                  e = this;
                b.fn.init.call(e, t, u);
                e._animations(e.options);
                u = e.options;
                e._contentUrls = u.contentUrls || [];
                e._wrapper();
                e._isRtl = i.support.isRtl(e.wrapper);
                e._tabindex();
                e._updateClasses();
                e._dataSource();
                u.dataSource && e.dataSource.fetch();
                e._tabPosition();
                e._scrollable();
                e._contentUrls.length
                  ? e.wrapper
                      .find(".k-tabstrip-items > .k-item")
                      .each(function (t, i) {
                        var r = e._contentUrls[t];
                        "string" == typeof r &&
                          n(i)
                            .find(">." + o)
                            .data(y, r);
                      })
                  : (e._contentUrls.length =
                      e.tabGroup.find("li.k-item").length);
                e.wrapper
                  .on(kt + f + " " + ei + f, oi, e._toggleHover)
                  .on("focus" + f, n.proxy(e._active, e))
                  .on("blur" + f, function () {
                    e._current(null);
                  });
                e._keyDownProxy = n.proxy(e._keydown, e);
                u.navigatable && e.wrapper.on("keydown" + f, e._keyDownProxy);
                e.options.value && (c = e.options.value);
                e.wrapper
                  .children(".k-tabstrip-items")
                  .on(yt + f, ".k-state-disabled .k-link", !1)
                  .on(yt + f, " > " + ft, function (t) {
                    var u,
                      r = e.wrapper[0];
                    if (r !== document.activeElement)
                      if ((u = i.support.browser.msie))
                        try {
                          r.setActive();
                        } catch (f) {
                          r.focus();
                        }
                      else r.focus();
                    e._click(n(t.currentTarget)) && t.preventDefault();
                  });
                s = e.tabGroup.children("li." + r);
                h = e.contentHolder(s.index());
                s[0] &&
                  h.length > 0 &&
                  0 === h[0].childNodes.length &&
                  e.activateTab(s.eq(0));
                e.element.attr("role", "tablist");
                e.element[0].id && (e._ariaId = e.element[0].id + "_ts_active");
                e.value(c);
                i.notify(e);
              },
              _active: function () {
                var n = this.tabGroup.children().filter("." + r);
                n = n[0] ? n : this._endItem("first");
                n[0] && this._current(n);
              },
              _endItem: function (n) {
                return this.tabGroup.children(ft)[n]();
              },
              _getItem: function (n) {
                return this.tabGroup.children(gt)[n]();
              },
              _item: function (n, t) {
                var i;
                return (
                  (i = t === k ? "last" : "first"),
                  n
                    ? ((n = n[t]()),
                      n[0] || (n = this.tabGroup.children(gt)[i]()),
                      n.hasClass(c) && n.addClass(a),
                      (n.hasClass(c) || n.hasClass(r)) && (this._focused = n),
                      n)
                    : this._endItem(i)
                );
              },
              _current: function (n) {
                var i = this,
                  f = i._focused,
                  u = i._ariaId;
                return n === t
                  ? f
                  : (f &&
                      (i.tabGroup.children("#" + u).removeAttr("id"),
                      f.removeClass(a)),
                    n &&
                      (n.hasClass(r) || n.addClass(a),
                      i.element.removeAttr("aria-activedescendant"),
                      (u = n[0].id || u),
                      u &&
                        (n.attr("id", u),
                        i.element.attr("aria-activedescendant", u))),
                    (i._focused = n),
                    t);
              },
              _keydown: function (n) {
                var u,
                  i = this,
                  r = n.keyCode,
                  o = i._current(),
                  s = i._isRtl,
                  f = /top|bottom/.test(i.options.tabPosition);
                if (n.target == n.currentTarget && o) {
                  if (r !== e.DOWN || f)
                    if (r !== e.UP || f)
                      if (r === e.RIGHT && f) u = s ? k : tt;
                      else if (r === e.LEFT && f) u = s ? tt : k;
                      else if (r == e.ENTER || r == e.SPACEBAR)
                        i._click(o), n.preventDefault();
                      else {
                        if (r == e.HOME)
                          return (
                            i._click(i._getItem("first")), n.preventDefault(), t
                          );
                        if (r == e.END)
                          return (
                            i._click(i._getItem("last")), n.preventDefault(), t
                          );
                      }
                    else u = k;
                  else u = tt;
                  u && (i._click(i._item(o, u)), n.preventDefault());
                }
              },
              _dataSource: function () {
                var t = this;
                t.dataSource && t._refreshHandler
                  ? t.dataSource.unbind("change", t._refreshHandler)
                  : (t._refreshHandler = n.proxy(t.refresh, t));
                t.dataSource = i.data.DataSource.create(
                  t.options.dataSource
                ).bind("change", t._refreshHandler);
              },
              setDataSource: function (n) {
                var t = this;
                t.options.dataSource = n;
                t._dataSource();
                t.dataSource.fetch();
              },
              _animations: function (n) {
                n &&
                  "animation" in n &&
                  !n.animation &&
                  (n.animation = {
                    open: { effects: {} },
                    close: { effects: {} },
                  });
              },
              refresh: function (n) {
                var t,
                  e,
                  s,
                  h,
                  r = this,
                  u = r.options,
                  c = i.getter(u.dataEncodedField),
                  l = i.getter(u.dataTextField),
                  a = i.getter(u.dataContentField),
                  v = i.getter(u.dataContentUrlField),
                  y = i.getter(u.dataImageUrlField),
                  p = i.getter(u.dataUrlField),
                  w = i.getter(u.dataSpriteCssClass),
                  o = [],
                  f = r.dataSource.view();
                for (
                  n = n || {},
                    s = n.action,
                    s && (f = n.items),
                    t = 0,
                    h = f.length;
                  t < h;
                  t++
                )
                  (e = { text: l(f[t]) }),
                    u.dataEncodedField && (e.encoded = c(f[t])),
                    u.dataContentField && (e.content = a(f[t])),
                    u.dataContentUrlField && (e.contentUrl = v(f[t])),
                    u.dataUrlField && (e.url = p(f[t])),
                    u.dataImageUrlField && (e.imageUrl = y(f[t])),
                    u.dataSpriteCssClass && (e.spriteCssClass = w(f[t])),
                    (o[t] = e);
                if ("add" == n.action)
                  n.index < r.tabGroup.children().length
                    ? r.insertBefore(o, r.tabGroup.children().eq(n.index))
                    : r.append(o);
                else if ("remove" == n.action)
                  for (t = 0; t < f.length; t++) r.remove(n.index);
                else
                  "itemchange" == n.action
                    ? ((t = r.dataSource.view().indexOf(f[0])),
                      n.field === u.dataTextField &&
                        r.tabGroup
                          .children()
                          .eq(t)
                          .find(".k-link")
                          .text(f[0].get(n.field)),
                      n.field === u.dataUrlField &&
                        (r._contentUrls[t] = f[0].get(n.field)))
                    : (r.trigger("dataBinding"),
                      r.remove("li"),
                      (r._contentUrls = []),
                      r.append(o),
                      r.trigger("dataBound"));
              },
              value: function (i) {
                var r = this;
                return i === t
                  ? r.select().text()
                  : (i != r.value() &&
                      r.tabGroup.children().each(function () {
                        n.trim(n(this).text()) == i && r.select(this);
                      }),
                    t);
              },
              items: function () {
                return this.tabGroup[0].children;
              },
              setOptions: function (n) {
                var t = this,
                  i = t.options.animation;
                t._animations(n);
                n.contentUrls && (t._contentUrls = n.contentUrls);
                n.animation = u(!0, i, n.animation);
                n.navigatable
                  ? t.wrapper.on("keydown" + f, t._keyDownProxy)
                  : t.wrapper.off("keydown" + f, t._keyDownProxy);
                b.fn.setOptions.call(t, n);
              },
              events: [
                it,
                bt,
                at,
                "error",
                dt,
                "change",
                "dataBinding",
                "dataBound",
              ],
              options: {
                name: "TabStrip",
                dataEncodedField: "",
                dataTextField: "",
                dataContentField: "",
                dataImageUrlField: "",
                dataUrlField: "",
                dataSpriteCssClass: "",
                dataContentUrlField: "",
                tabPosition: "top",
                animation: {
                  open: { effects: "expand:vertical fadeIn", duration: 200 },
                  close: { duration: 200 },
                },
                collapsible: !1,
                navigatable: !0,
                contentUrls: !1,
                scrollable: { distance: ni },
              },
              destroy: function () {
                var n = this,
                  t = n.scrollWrap;
                b.fn.destroy.call(n);
                n._refreshHandler &&
                  n.dataSource.unbind("change", n._refreshHandler);
                n.wrapper.off(f);
                n.wrapper.children(".k-tabstrip-items").off(f);
                n._scrollableModeActive &&
                  (n._scrollPrevButton.off().remove(),
                  n._scrollNextButton.off().remove());
                i.destroy(n.wrapper);
                t.children(".k-tabstrip").unwrap();
              },
              select: function (t) {
                var i = this;
                return 0 === arguments.length
                  ? i.tabGroup.children("li." + r)
                  : (isNaN(t) || (t = i.tabGroup.children().get(t)),
                    (t = i.tabGroup.find(t)),
                    n(t).each(function (t, u) {
                      u = n(u);
                      u.hasClass(r) ||
                        i.trigger(it, {
                          item: u[0],
                          contentElement: i.contentHolder(u.index())[0],
                        }) ||
                        i.activateTab(u);
                    }),
                    i);
              },
              enable: function (n, t) {
                return this._toggleDisabled(n, t !== !1), this;
              },
              disable: function (n) {
                return this._toggleDisabled(n, !1), this;
              },
              reload: function (t) {
                var i, r;
                return (
                  (t = this.tabGroup.find(t)),
                  (i = this),
                  (r = i._contentUrls),
                  t.each(function () {
                    var t = n(this),
                      u = t.find("." + o).data(y) || r[t.index()],
                      f = i.contentHolder(t.index());
                    u && i.ajaxRequest(t, f, null, u);
                  }),
                  i
                );
              },
              append: function (n) {
                var t = this,
                  i = t._create(n);
                return (
                  g(i.tabs, function (n) {
                    var r = i.contents[n];
                    t.tabGroup.append(this);
                    "bottom" == t.options.tabPosition
                      ? t.tabGroup.before(r)
                      : t._scrollableModeActive
                      ? t._scrollPrevButton.before(r)
                      : t.wrapper.append(r);
                    t.angular("compile", function () {
                      return { elements: [r] };
                    });
                  }),
                  p(t.tabGroup),
                  t._updateContentElements(),
                  t.resize(!0),
                  t
                );
              },
              _appendUrlItem: function (n) {
                this._contentUrls.push(n);
              },
              _moveUrlItem: function (n, t) {
                this._contentUrls.splice(
                  t,
                  0,
                  this._contentUrls.splice(n, 1)[0]
                );
              },
              _removeUrlItem: function (n) {
                this._contentUrls.splice(n, 1);
              },
              insertBefore: function (t, i) {
                i = n(t).is(n(i))
                  ? this.tabGroup.find(i).next()
                  : this.tabGroup.find(i);
                var r = this,
                  u = r._create(t),
                  f = r.element.find("[id='" + i.attr("aria-controls") + "']");
                return (
                  g(u.tabs, function (t) {
                    var e = u.contents[t],
                      o = u.newTabsCreated
                        ? r._contentUrls.length - (u.tabs.length - t)
                        : n(e).index() - 1;
                    i.before(this);
                    f.before(e);
                    r._moveUrlItem(o, n(this).index());
                    r.angular("compile", function () {
                      return { elements: [e] };
                    });
                  }),
                  p(r.tabGroup),
                  r._updateContentElements(u.newTabsCreated),
                  r.resize(!0),
                  r
                );
              },
              insertAfter: function (t, i) {
                i = n(t).is(n(i))
                  ? this.tabGroup.find(i).prev()
                  : this.tabGroup.find(i);
                var r = this,
                  u = r._create(t),
                  f = r.element.find("[id='" + i.attr("aria-controls") + "']");
                return (
                  g(u.tabs, function (t) {
                    var e = u.contents[t],
                      o = u.newTabsCreated
                        ? r._contentUrls.length - (u.tabs.length - t)
                        : n(e).index() - 1;
                    i.after(this);
                    f.after(e);
                    r._moveUrlItem(o, n(this).index());
                    r.angular("compile", function () {
                      return { elements: [e] };
                    });
                  }),
                  p(r.tabGroup),
                  r._updateContentElements(u.newTabsCreated),
                  r.resize(!0),
                  r
                );
              },
              remove: function (t) {
                var u,
                  r = this,
                  f = typeof t;
                return (
                  "string" === f
                    ? (t = r.tabGroup.find(t))
                    : "number" === f && (t = r.tabGroup.children().eq(t)),
                  (u = t.map(function () {
                    var t = n(this).index(),
                      u = r.contentElement(t);
                    return i.destroy(u), r._removeUrlItem(t), u;
                  })),
                  t.remove(),
                  u.empty(),
                  u.remove(),
                  r._updateContentElements(),
                  r.resize(!0),
                  r
                );
              },
              _create: function (t) {
                var r,
                  f,
                  o,
                  e = this,
                  s = !1;
                return (
                  (t = t instanceof i.data.ObservableArray ? t.toJSON() : t),
                  n.isPlainObject(t) || n.isArray(t)
                    ? ((t = n.isArray(t) ? t : [t]),
                      (s = !0),
                      (r = st(t, function (i, r) {
                        return (
                          e._appendUrlItem(t[r].contentUrl || null),
                          n(
                            d.renderItem({
                              group: e.tabGroup,
                              item: u(i, { index: r }),
                            })
                          )
                        );
                      })),
                      (f = st(t, function (t, i) {
                        if ("string" == typeof t.content || t.contentUrl)
                          return n(
                            d.renderContent({ item: u(t, { index: i }) })
                          );
                      })))
                    : ((r =
                        "string" == typeof t && "<" != t[0]
                          ? e.element.find(t)
                          : n(t)),
                      (f = n()),
                      r.each(function () {
                        if (
                          /k-tabstrip-items/.test(this.parentNode.className)
                        ) {
                          var t = e.element.find(
                            "[id='" + this.getAttribute("aria-controls") + "']"
                          );
                          o = t;
                        } else o = n("<div class='" + rt + "'/>");
                        f = f.add(o);
                      }),
                      et(r)),
                  { tabs: r, contents: f, newTabsCreated: s }
                );
              },
              _toggleDisabled: function (t, i) {
                t = this.tabGroup.find(t);
                t.each(function () {
                  n(this)
                    .toggleClass(l, i)
                    .toggleClass(c, !i)
                    .attr("aria-disabled", !i);
                });
              },
              _updateClasses: function () {
                var u,
                  f,
                  e,
                  i = this;
                i.wrapper.addClass("k-widget k-header k-tabstrip");
                i.tabGroup = i.wrapper
                  .children("ul")
                  .addClass("k-tabstrip-items k-reset");
                i.tabGroup[0] ||
                  (i.tabGroup = n(
                    "<ul class='k-tabstrip-items k-reset'/>"
                  ).appendTo(i.wrapper));
                u = i.tabGroup.find("li").addClass("k-item");
                u.length &&
                  ((f = u.filter("." + r).index()),
                  (e = f >= 0 ? f : t),
                  i.tabGroup
                    .contents()
                    .filter(function () {
                      return 3 == this.nodeType && !ht(this.nodeValue);
                    })
                    .remove());
                f >= 0 && u.eq(f).addClass(s);
                i.contentElements = i.wrapper.children("div");
                i.contentElements
                  .addClass(rt)
                  .eq(e)
                  .addClass(r)
                  .css({ display: "block" });
                u.length &&
                  (et(u), p(i.tabGroup), i._updateContentElements(!0));
              },
              _elementId: function (n, t) {
                var u,
                  r = n.attr("id"),
                  f = this.element.attr("id");
                return !r || r.indexOf(f + "-") > -1
                  ? ((u = (f || i.guid()) + "-"), u + (t + 1))
                  : r;
              },
              _updateContentElements: function (t) {
                var u = this,
                  o = u._contentUrls,
                  f = u.tabGroup.children(".k-item"),
                  e = u.wrapper.children("div"),
                  s = u._elementId.bind(u);
                e.length && f.length > e.length
                  ? e.each(function (i) {
                      var u = s(n(this), i),
                        r = f.filter(
                          "[aria-controls=" + (this.id || 0) + "]"
                        )[0];
                      !r && t && (r = f[i]);
                      r && r.setAttribute("aria-controls", u);
                      this.setAttribute("id", u);
                    })
                  : f.each(function (t) {
                      var i = e.eq(t),
                        f = s(i, t);
                      this.setAttribute("aria-controls", f);
                      !i.length && o[t]
                        ? n("<div class='" + rt + "'/>")
                            .appendTo(u.wrapper)
                            .attr("id", f)
                        : (i.attr("id", f),
                          n(this).children(".k-loading")[0] ||
                            o[t] ||
                            n("<span class='k-loading k-complete'/>").prependTo(
                              this
                            ));
                      i.attr("role", "tabpanel");
                      i.filter(":not(." + r + ")")
                        .attr("aria-hidden", !0)
                        .attr("aria-expanded", !1);
                      i.filter("." + r).attr("aria-expanded", !0);
                    });
                u.contentElements = u.contentAnimators =
                  u.wrapper.children("div");
                u.tabsHeight =
                  nt(u.tabGroup) +
                  parseInt(u.wrapper.css("border-top-width"), 10) +
                  parseInt(u.wrapper.css("border-bottom-width"), 10);
                i.kineticScrollNeeded &&
                  i.mobile.ui.Scroller &&
                  (i.touchScroller(u.contentElements),
                  (u.contentElements = u.contentElements.children(
                    ".km-scroll-container"
                  )));
              },
              _wrapper: function () {
                var n = this;
                n.wrapper = n.element.is("ul")
                  ? n.element.wrapAll("<div />").parent()
                  : n.element;
                n.scrollWrap = n.wrapper.parent(".k-tabstrip-wrapper");
                n.scrollWrap[0] ||
                  (n.scrollWrap = n.wrapper
                    .wrapAll("<div class='k-tabstrip-wrapper' />")
                    .parent());
              },
              _tabPosition: function () {
                var n = this,
                  t = n.options.tabPosition;
                n.wrapper.addClass("k-floatwrap k-tabstrip-" + t);
                "bottom" == t && n.tabGroup.appendTo(n.wrapper);
                n.resize(!0);
              },
              _setContentElementsDimensions: function () {
                var t,
                  n,
                  f,
                  i,
                  e,
                  o,
                  r = this,
                  u = r.options.tabPosition;
                ("left" != u && "right" != u) ||
                  ((t = r.wrapper.children(".k-content")),
                  (n = t.filter(":visible")),
                  (f = "margin-" + u),
                  (i = r.tabGroup),
                  (e = w(i)),
                  (o =
                    Math.ceil(i.height()) -
                    parseInt(n.css("padding-top"), 10) -
                    parseInt(n.css("padding-bottom"), 10) -
                    parseInt(n.css("border-top-width"), 10) -
                    parseInt(n.css("border-bottom-width"), 10)),
                  setTimeout(function () {
                    t.css(f, e).css("min-height", o);
                  }));
              },
              _resize: function () {
                this._setContentElementsDimensions();
                this._scrollable();
              },
              _sizeScrollWrap: function (n) {
                var t, i;
                n.is(":visible") &&
                  ((t = this.options.tabPosition),
                  (i =
                    Math.floor(nt(n, !0)) +
                    ("left" === t || "right" === t ? 2 : this.tabsHeight)),
                  this.scrollWrap.css("height", i).css("height"));
              },
              _toggleHover: function (t) {
                n(t.currentTarget).toggleClass(ut, t.type == kt);
              },
              _click: function (n) {
                var i,
                  f,
                  t = this,
                  e = n.find("." + o),
                  u = e.attr(lt),
                  s = t.options.collapsible,
                  h = n.index(),
                  l = t.contentHolder(h),
                  v = n.parent().children(),
                  p = v.filter("." + a);
                if (n.closest(".k-widget")[0] == t.wrapper[0]) {
                  if (n.is("." + c + (s ? "" : ",." + r)))
                    return (
                      p.removeClass(a),
                      (t._focused = n),
                      n.addClass(a),
                      t._current(n),
                      t._scrollableModeActive && t._scrollTabsToItem(n),
                      !0
                    );
                  if (
                    ((f =
                      e.data(y) ||
                      t._contentUrls[h] ||
                      (u &&
                        ("#" == u.charAt(u.length - 1) ||
                          u.indexOf("#" + t.element[0].id + "-") != -1))),
                    (i = !u || f),
                    t.tabGroup.children("[data-animating]").length)
                  )
                    return i;
                  if (t.trigger(it, { item: n[0], contentElement: l[0] }))
                    return !0;
                  if (i !== !1)
                    return s && n.is("." + r)
                      ? (t.deactivateTab(n), !0)
                      : (t.activateTab(n) && (i = !0), i);
                }
              },
              _scrollable: function () {
                var u,
                  e,
                  t,
                  r,
                  o,
                  c,
                  s,
                  h,
                  n = this,
                  l = n.options;
                n._scrollableAllowed() &&
                  (n.wrapper.addClass("k-tabstrip-scrollable"),
                  (u = n.wrapper[0].offsetWidth),
                  (e = n.tabGroup[0].scrollWidth),
                  e > u && !n._scrollableModeActive
                    ? ((n._nowScrollingTabs = !1),
                      (n._isRtl = i.support.isRtl(n.element)),
                      (o = i.support.mobileOS ? "touchstart" : "mousedown"),
                      (c = i.support.mobileOS ? "touchend" : "mouseup"),
                      (s = i.support.browser),
                      (h = n._isRtl && !s.msie && !s.edge),
                      n.wrapper.append(
                        ot("prev", "k-i-arrow-60-left") +
                          ot("next", "k-i-arrow-60-right")
                      ),
                      (t = n._scrollPrevButton =
                        n.wrapper.children(".k-tabstrip-prev")),
                      (r = n._scrollNextButton =
                        n.wrapper.children(".k-tabstrip-next")),
                      n.tabGroup.css({
                        marginLeft: w(t) + 9,
                        marginRight: w(r) + 12,
                      }),
                      t.on(o + f, function () {
                        n._nowScrollingTabs = !0;
                        n._scrollTabsByDelta(
                          l.scrollable.distance * (h ? 1 : -1)
                        );
                      }),
                      r.on(o + f, function () {
                        n._nowScrollingTabs = !0;
                        n._scrollTabsByDelta(
                          l.scrollable.distance * (h ? -1 : 1)
                        );
                      }),
                      t.add(r).on(c + f, function () {
                        n._nowScrollingTabs = !1;
                      }),
                      (n._scrollableModeActive = !0),
                      n._toggleScrollButtons())
                    : n._scrollableModeActive && e <= u
                    ? ((n._scrollableModeActive = !1),
                      n.wrapper.removeClass("k-tabstrip-scrollable"),
                      n._scrollPrevButton.off().remove(),
                      n._scrollNextButton.off().remove(),
                      n.tabGroup.css({ marginLeft: "", marginRight: "" }))
                    : n._scrollableModeActive
                    ? n._toggleScrollButtons()
                    : n.wrapper.removeClass("k-tabstrip-scrollable"));
              },
              _scrollableAllowed: function () {
                var n = this.options;
                return (
                  n.scrollable &&
                    !n.scrollable.distance &&
                    (n.scrollable = { distance: ni }),
                  n.scrollable &&
                    !isNaN(n.scrollable.distance) &&
                    ("top" == n.tabPosition || "bottom" == n.tabPosition)
                );
              },
              _scrollTabsToItem: function (n) {
                var i,
                  f = this,
                  r = f.tabGroup,
                  u = r.scrollLeft(),
                  e = w(n),
                  t = f._isRtl
                    ? n.position().left
                    : n.position().left - r.children().first().position().left,
                  o = r[0].offsetWidth,
                  s = Math.ceil(parseFloat(r.css("padding-left")));
                f._isRtl
                  ? t < 0
                    ? (i = u + t - (o - u) - s)
                    : t + e > o && (i = u + t - e + 2 * s)
                  : u + o < t + e
                  ? (i = t + e - o + 2 * s)
                  : u > t && (i = t - s);
                r.finish().animate(
                  { scrollLeft: i },
                  "fast",
                  "linear",
                  function () {
                    f._toggleScrollButtons();
                  }
                );
              },
              _scrollTabsByDelta: function (n) {
                var t = this,
                  i = t.tabGroup,
                  r = i.scrollLeft();
                i.finish().animate(
                  { scrollLeft: r + n },
                  "fast",
                  "linear",
                  function () {
                    t._nowScrollingTabs && !jQuery.fx.off
                      ? t._scrollTabsByDelta(n)
                      : t._toggleScrollButtons();
                  }
                );
              },
              _toggleScrollButtons: function () {
                var n = this,
                  t = n.tabGroup,
                  r = i.scrollLeft(t);
                n._scrollPrevButton.toggle(0 !== r);
                n._scrollNextButton.toggle(
                  r < t[0].scrollWidth - t[0].offsetWidth - 1
                );
              },
              deactivateTab: function (n) {
                var e = this,
                  o = e.options.animation,
                  f = o.open,
                  t = u({}, o.close),
                  s = t && "effects" in t;
                n = e.tabGroup.find(n);
                t = u(s ? t : u({ reverse: !0 }, f), { hide: !0 });
                i.size(f.effects)
                  ? (n.kendoAddClass(l, { duration: f.duration }),
                    n.kendoRemoveClass(r, { duration: f.duration }))
                  : (n.addClass(l), n.removeClass(r));
                n.removeAttr("aria-selected");
                e.contentAnimators
                  .filter("." + r)
                  .kendoStop(!0, !0)
                  .kendoAnimate(t)
                  .removeClass(r)
                  .attr("aria-hidden", !0);
              },
              activateTab: function (n) {
                var t, v, e, h, tt, p, a, w, it, b, c, f, k, rt, d, g;
                if (!this.tabGroup.children("[data-animating]").length)
                  return (
                    (n = this.tabGroup.find(n)),
                    (t = this),
                    (v = t.options.animation),
                    (e = v.open),
                    (h = u({}, v.close)),
                    (tt = h && "effects" in h),
                    (p = n.parent().children()),
                    (a = p.filter("." + r)),
                    (w = p.index(n)),
                    (it = e && "duration" in e && "effects" in e),
                    (h = u(tt ? h : u({ reverse: !0 }, e), { hide: !0 })),
                    i.size(e.effects)
                      ? (a.kendoRemoveClass(r, { duration: h.duration }),
                        n.kendoRemoveClass(ut, { duration: h.duration }))
                      : (a.removeClass(r), n.removeClass(ut)),
                    (b = t.contentAnimators),
                    t.inRequest && (t.xhr.abort(), (t.inRequest = !1)),
                    0 === b.length
                      ? (t.tabGroup.find("." + s).removeClass(s),
                        n.addClass(s).css("z-index"),
                        n.addClass(r),
                        t._current(n),
                        t.trigger("change"),
                        t._scrollableModeActive && t._scrollTabsToItem(n),
                        !1)
                      : ((c = b.filter("." + r)),
                        (f = t.contentHolder(w)),
                        (k = f.closest(".k-content")),
                        (t.tabsHeight =
                          nt(t.tabGroup) +
                          parseInt(t.wrapper.css("border-top-width"), 10) +
                          parseInt(t.wrapper.css("border-bottom-width"), 10)),
                        t._sizeScrollWrap(c),
                        0 === f.length
                          ? (c
                              .removeClass(r)
                              .attr("aria-hidden", !0)
                              .kendoStop(!0, !0)
                              .kendoAnimate(h),
                            !1)
                          : (n.attr("data-animating", !0),
                            (rt =
                              (n.children("." + o).data(y) ||
                                t._contentUrls[w] ||
                                !1) &&
                              f.is(fi)),
                            (d = function () {
                              a.removeAttr("aria-selected");
                              n.attr("aria-selected", !0);
                              t._current(n);
                              t._sizeScrollWrap(k);
                              k.addClass(r)
                                .removeAttr("aria-hidden")
                                .kendoStop(!0, !0)
                                .attr("aria-expanded", !0)
                                .kendoAnimate(
                                  u(
                                    {
                                      init: function () {
                                        t.trigger(at, {
                                          item: n[0],
                                          contentElement: f[0],
                                        });
                                        i.resize(f);
                                      },
                                    },
                                    e,
                                    {
                                      complete: function () {
                                        n.removeAttr("data-animating");
                                        t.trigger(bt, {
                                          item: n[0],
                                          contentElement: f[0],
                                        });
                                        i.resize(f);
                                        t.scrollWrap
                                          .css("height", "")
                                          .css("height");
                                        it &&
                                          (i.support.browser.msie ||
                                            i.support.browser.edge) &&
                                          f
                                            .finish()
                                            .animate(
                                              { opacity: 0.9 },
                                              "fast",
                                              "linear",
                                              function () {
                                                f.finish().animate(
                                                  { opacity: 1 },
                                                  "fast",
                                                  "linear"
                                                );
                                              }
                                            );
                                      },
                                    }
                                  )
                                );
                            }),
                            (g = function () {
                              rt
                                ? (n.removeAttr("data-animating"),
                                  t.ajaxRequest(n, f, function () {
                                    n.attr("data-animating", !0);
                                    d();
                                    t.trigger("change");
                                  }))
                                : (d(), t.trigger("change"));
                              t._scrollableModeActive && t._scrollTabsToItem(n);
                            }),
                            c.removeClass(r),
                            t.tabGroup.find("." + s).removeClass(s),
                            n.addClass(s).css("z-index"),
                            i.size(e.effects)
                              ? (a.kendoAddClass(l, { duration: e.duration }),
                                n.kendoAddClass(r, { duration: e.duration }))
                              : (a.addClass(l), n.addClass(r)),
                            c.attr("aria-hidden", !0),
                            c.attr("aria-expanded", !1),
                            c.length
                              ? c
                                  .kendoStop(!0, !0)
                                  .kendoAnimate(u({ complete: g }, h))
                              : g(),
                            !0))
                  );
              },
              contentElement: function (r) {
                var u, e, f, o;
                if (isNaN(+r)) return t;
                if (
                  ((u =
                    this.contentElements &&
                    this.contentElements[0] &&
                    !i.kineticScrollNeeded
                      ? this.contentElements
                      : this.contentAnimators),
                  (e = n(this.tabGroup.children()[r]).attr("aria-controls")),
                  u)
                )
                  for (f = 0, o = u.length; f < o; f++)
                    if (u.eq(f).closest(".k-content")[0].id == e) return u[f];
                return t;
              },
              contentHolder: function (t) {
                var r = n(this.contentElement(t)),
                  u = r.children(".km-scroll-container");
                return i.support.touch && u[0] ? u : r;
              },
              ajaxRequest: function (t, r, u, f) {
                var s, p, c, w, l, a, e, b, v, h;
                t = this.tabGroup.find(t);
                s = this;
                p = n.ajaxSettings.xhr;
                c = t.find("." + o);
                w = {};
                l = t.width() / 2;
                a = !1;
                e = t.find(".k-loading").removeClass("k-complete");
                e[0] || (e = n("<span class='k-loading'/>").prependTo(t));
                b = 2 * l - e.width();
                v = function () {
                  e.animate(
                    {
                      marginLeft:
                        (parseInt(e.css("marginLeft"), 10) || 0) < l ? b : 0,
                    },
                    500,
                    v
                  );
                };
                i.support.browser.msie &&
                  i.support.browser.version < 10 &&
                  setTimeout(v, 40);
                f = f || c.data(y) || s._contentUrls[t.index()] || c.attr(lt);
                s.inRequest = !0;
                h = {
                  type: "GET",
                  cache: !1,
                  url: f,
                  dataType: "html",
                  data: w,
                  xhr: function () {
                    var t = this,
                      i = p(),
                      r = t.progressUpload
                        ? "progressUpload"
                        : !!t.progress && "progress";
                    return (
                      i &&
                        n.each([i, i.upload], function () {
                          this.addEventListener &&
                            this.addEventListener(
                              "progress",
                              function (n) {
                                r && t[r](n);
                              },
                              !1
                            );
                        }),
                      (t.noProgress = !(
                        window.XMLHttpRequest &&
                        "upload" in new XMLHttpRequest()
                      )),
                      i
                    );
                  },
                  progress: function (n) {
                    if (n.lengthComputable) {
                      var t = parseInt((n.loaded / n.total) * 100, 10) + "%";
                      e.stop(!0)
                        .addClass("k-progress")
                        .css({ width: t, marginLeft: 0 });
                    }
                  },
                  error: function (n, t) {
                    s.trigger("error", { xhr: n, status: t }) &&
                      this.complete();
                  },
                  stopProgress: function () {
                    clearInterval(a);
                    e.stop(!0).addClass("k-progress")[0].style.cssText = "";
                  },
                  complete: function (n) {
                    s.inRequest = !1;
                    this.noProgress
                      ? setTimeout(this.stopProgress, 500)
                      : this.stopProgress();
                    "abort" == n.statusText && e.remove();
                  },
                  success: function (n) {
                    var c, o, h;
                    e.addClass("k-complete");
                    try {
                      c = this;
                      o = 10;
                      c.noProgress &&
                        (e.width(o + "%"),
                        (a = setInterval(function () {
                          c.progress({
                            lengthComputable: !0,
                            loaded: Math.min(o, 100),
                            total: 100,
                          });
                          o += 10;
                        }, 40)));
                      s.angular("cleanup", function () {
                        return { elements: r.get() };
                      });
                      i.destroy(r);
                      r.html(n);
                    } catch (l) {
                      h = window.console;
                      h &&
                        h.error &&
                        h.error(l.name + ": " + l.message + " in " + f);
                      this.error(this.xhr, "error");
                    }
                    u && u.call(s, r);
                    s.angular("compile", function () {
                      return { elements: r.get() };
                    });
                    s.trigger(dt, { item: t[0], contentElement: r[0] });
                  },
                };
                "object" == typeof f &&
                  ((h = n.extend(!0, {}, h, f)),
                  ri(h.url) && (h.url = h.url()));
                s.xhr = n.ajax(h);
              },
            });
          u(d, {
            renderItem: function (n) {
              n = u({ tabStrip: {}, group: {} }, n);
              var t = v.empty,
                i = n.item;
              return v.item(
                u(
                  n,
                  {
                    image: i.imageUrl ? v.image : t,
                    sprite: i.spriteCssClass ? v.sprite : t,
                    itemWrapper: v.itemWrapper,
                  },
                  ti
                )
              );
            },
            renderContent: function (n) {
              return v.content(u(n, ti));
            },
          });
          i.ui.plugin(d);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "editor/table-wizard/table-wizard-dialog.min",
      ["editor/table-wizard/table-wizard-command.min", "kendo.tabstrip.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var i = window.kendo,
          r = { format: "0", min: 0 },
          t = ["px", "em"],
          u = [
            "solid",
            "dotted",
            "dashed",
            "double",
            "groove",
            "ridge",
            "inset",
            "outset",
            "initial",
            "inherit",
            "none",
            "hidden",
          ],
          f = {
            dataSource: [
              {
                className: "k-icon k-i-table-align-middle-left",
                value: "left",
              },
              {
                className: "k-icon k-i-table-align-middle-center",
                value: "center",
              },
              {
                className: "k-icon k-i-table-align-middle-right",
                value: "right",
              },
              { className: "k-icon k-i-align-remove", value: "" },
            ],
            dataTextField: "className",
            dataValueField: "value",
            template:
              "<span class='#: className #' title='#: tooltip #'></span>",
            valueTemplate:
              "<span class='k-align-group #: className #' title='#: tooltip #'></span>",
          },
          e = {
            dataSource: [
              {
                className: "k-icon k-i-table-align-top-left",
                value: "left top",
              },
              {
                className: "k-icon k-i-table-align-top-center",
                value: "center top",
              },
              {
                className: "k-icon k-i-table-align-top-right",
                value: "right top",
              },
              {
                className: "k-icon k-i-table-align-middle-left",
                value: "left middle",
              },
              {
                className: "k-icon k-i-table-align-middle-center",
                value: "center middle",
              },
              {
                className: "k-icon k-i-table-align-middle-right",
                value: "right middle",
              },
              {
                className: "k-icon k-i-table-align-bottom-left",
                value: "left bottom",
              },
              {
                className: "k-icon k-i-table-align-bottom-center",
                value: "center bottom",
              },
              {
                className: "k-icon k-i-table-align-bottom-right",
                value: "right bottom",
              },
              { className: "k-icon k-i-align-remove", value: "" },
            ],
            dataTextField: "className",
            dataValueField: "value",
            template:
              "<span class='#: className #' title='#: tooltip #'></span>",
            valueTemplate:
              "<span class='k-align-group #: className #' title='#: tooltip #'></span>",
          },
          o = {
            dataSource: [
              {
                className: "k-icon k-i-table-align-top-left",
                value: "left top",
              },
              {
                className: "k-icon k-i-table-align-top-center",
                value: "center top",
              },
              {
                className: "k-icon k-i-table-align-top-right",
                value: "right top",
              },
              {
                className: "k-icon k-i-table-align-bottom-left",
                value: "left bottom",
              },
              {
                className: "k-icon k-i-table-align-bottom-center",
                value: "center bottom",
              },
              {
                className: "k-icon k-i-table-align-bottom-right",
                value: "right bottom",
              },
              { className: "k-icon k-i-align-remove", value: "" },
            ],
            dataTextField: "className",
            dataValueField: "value",
            template:
              "<span class='#: className #' title='#: tooltip #'></span>",
            valueTemplate:
              "<span class='k-align-group #: className #' title='#: tooltip #'></span>",
          },
          s =
            '<div class="k-editor-dialog k-editor-table-wizard-dialog k-action-window k-popup-edit-form"><div class="k-edit-form-container"><div id="k-table-wizard-tabs" class="k-root-tabs"><ul><li class="k-state-active">#= messages.tableTab #</li><li>#= messages.cellTab #</li><li>#= messages.accessibilityTab #</li></ul><div id="k-table-properties"><div class="k-edit-label"><label for="k-editor-table-width">#= messages.width #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-width" /><input id="k-editor-table-width-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-height">#= messages.height #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-height" /><input id="k-editor-table-height-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-columns">#= messages.columns #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-columns" /></div><div class="k-edit-label"><label for="k-editor-table-rows">#= messages.rows #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-rows" /></div><div class="k-edit-label"><label for="k-editor-table-cell-spacing">#= messages.cellSpacing #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-spacing" /></div><div class="k-edit-label"><label for="k-editor-table-cell-padding">#= messages.cellPadding #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-padding" /></div><div class="k-edit-label"><label for="k-editor-table-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-table-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-table-bg">#= messages.background #</label></div><div class="k-edit-field"><input id="k-editor-table-bg" /></div><div class="k-edit-label"><label for="k-editor-css-class">#= messages.cssClass #</label></div><div class="k-edit-field"><input id="k-editor-css-class" class="k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-id">#= messages.id #</label></div><div class="k-edit-field"><input id="k-editor-id" class="k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-border-width">#= messages.border #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-border-width" /><input id="k-editor-border-color" /></div><div class="k-edit-label"><label for="k-editor-border-style">#= messages.borderStyle #</label></div><div class="k-edit-field"><input id="k-editor-border-style" /></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-collapse-borders" type="checkbox" class="k-checkbox" /><label for="k-editor-collapse-borders" class="k-checkbox-label">#= messages.collapseBorders #</label></div></div><div id="k-cell-properties"><div class="k-edit-field"><input id="k-editor-selectAllCells" type="checkbox" class="k-checkbox" /><label for="k-editor-selectAllCells" class="k-checkbox-label">#= messages.selectAllCells #</label></div><div class="k-edit-label"><label for="k-editor-cell-width">#= messages.width #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-width" /><input id="k-editor-cell-width-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-cell-height">#= messages.height #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-height" /><input id="k-editor-cell-height-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-cell-margin">#= messages.cellMargin #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-margin" /></div><div class="k-edit-label"><label for="k-editor-table-cells-padding">#= messages.cellPadding #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cells-padding" /></div><div class="k-edit-label"><label for="k-editor-cell-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-cell-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-cell-bg">#= messages.background #</label></div><div class="k-edit-field"><input id="k-editor-cell-bg" /></div><div class="k-edit-label"><label for="k-editor-cell-css-class">#= messages.cssClass #</label></div><div class="k-edit-field"><input id="k-editor-cell-css-class" class="k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-cell-id">#= messages.id #</label></div><div class="k-edit-field"><input id="k-editor-cell-id" class="k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-cell-border-width">#= messages.border #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-border-width" /><input id="k-editor-cell-border-color" /></div><div class="k-edit-label"><label for="k-editor-cell-border-style">#= messages.borderStyle #</label></div><div class="k-edit-field"><input id="k-editor-cell-border-style" /></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-wrap-text" type="checkbox" class="k-checkbox" /><label for="k-editor-wrap-text" class="k-checkbox-label">#= messages.wrapText #</label></div></div><div id="k-accessibility-properties"><div class="k-edit-label"><label for="k-editor-table-caption">#= messages.caption #</label></div><div class="k-edit-field"><input id="k-editor-table-caption" class="k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-accessibility-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-accessibility-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-accessibility-summary">#= messages.summary #</label></div><div class="k-edit-field"><textarea id="k-editor-accessibility-summary" class="k-textbox"></textarea></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-cells-headers" type="checkbox" class="k-checkbox" /><label for="k-editor-cells-headers" class="k-checkbox-label">#= messages.associateCellsWithHeaders #</label></div></div></div><div class="k-edit-buttons k-state-default"><button class="k-button k-primary k-dialog-ok">#= messages.dialogOk #</button><button class="k-button k-dialog-close">#= messages.dialogCancel #</button></div></div></div>',
          h = i.Class.extend({
            init: function (n) {
              this.options = n;
            },
            open: function () {
              function s(n) {
                n.preventDefault();
                t.destroy();
                f.destroy();
              }
              function a(n) {
                t.collectDialogValues(e);
                s(n);
                t.change && t.change();
                u.closeCallback(e);
              }
              function h(n) {
                s(n);
                u.closeCallback();
              }
              var f,
                r,
                c,
                t = this,
                u = t.options,
                o = u.dialogOptions,
                e = u.table,
                l = u.messages,
                v = i.support.browser.msie;
              o.close = h;
              o.title = l.tableWizard;
              o.visible = u.visible;
              f = n(t._dialogTemplate(l))
                .appendTo(document.body)
                .kendoWindow(o)
                .closest(".k-window")
                .toggleClass("k-rtl", u.isRtl)
                .end()
                .find(".k-dialog-ok")
                .click(a)
                .end()
                .find(".k-dialog-close")
                .click(h)
                .end()
                .data("kendoWindow");
              r = f.element;
              t._initTabStripComponent(r);
              t._initTableViewComponents(r, e);
              t._initCellViewComponents(r, e);
              t._initAccessibilityViewComponents(r, e);
              f.center();
              f.open();
              v &&
                ((c = r.closest(".k-window").height()), r.css("max-height", c));
            },
            _initTabStripComponent: function (n) {
              var t = (this.components = {});
              t.tabStrip = n
                .find("#k-table-wizard-tabs")
                .kendoTabStrip({ animation: !1 })
                .data("kendoTabStrip");
            },
            collectDialogValues: function () {
              var n = this,
                t = n.options.table;
              n._collectTableViewValues(t);
              n._collectCellViewValues(t);
              n._collectAccessibilityViewValues(t);
            },
            _collectTableViewValues: function (n) {
              var t = this.components.tableView,
                i = n.tableProperties;
              i.width = t.width.value();
              i.widthUnit = t.widthUnit.value();
              i.height = t.height.value();
              i.columns = t.columns.value();
              i.rows = t.rows.value();
              i.heightUnit = t.heightUnit.value();
              i.cellSpacing = t.cellSpacing.value();
              i.cellPadding = t.cellPadding.value();
              i.alignment = t.alignment.value();
              i.bgColor = t.bgColor.value();
              i.className = t.className.value;
              i.id = t.id.value;
              i.borderWidth = t.borderWidth.value();
              i.borderColor = t.borderColor.value();
              i.borderStyle = t.borderStyle.value();
              i.collapseBorders = t.collapseBorders.checked;
            },
            _collectCellViewValues: function (n) {
              var t = (n.cellProperties = {}),
                i = this.components.cellView;
              t.selectAllCells = i.selectAllCells.checked;
              t.width = i.width.value();
              t.widthUnit = i.widthUnit.value();
              t.height = i.height.value();
              t.heightUnit = i.heightUnit.value();
              t.cellMargin = i.cellMargin.value();
              t.cellPadding = i.cellPadding.value();
              t.alignment = i.alignment.value();
              t.bgColor = i.bgColor.value();
              t.className = i.className.value;
              t.id = i.id.value;
              t.borderWidth = i.borderWidth.value();
              t.borderColor = i.borderColor.value();
              t.borderStyle = i.borderStyle.value();
              t.wrapText = i.wrapText.checked;
              t.width ||
                ((t.selectAllCells = !0),
                (t.width = 100 / n.tableProperties.columns),
                (t.widthUnit = "%"));
            },
            _collectAccessibilityViewValues: function (n) {
              var t = n.tableProperties,
                i = this.components.accessibilityView;
              t.captionContent = i.captionContent.value;
              t.captionAlignment = i.captionAlignment.value();
              t.summary = i.summary.value;
              t.cellsWithHeaders = i.cellsWithHeaders.checked;
            },
            _addUnit: function (t, i) {
              i && n.inArray(i, t) == -1 && t.push(i);
            },
            _initTableViewComponents: function (n, i) {
              var e = this.components,
                f = (e.tableView = {}),
                r = (i.tableProperties = i.tableProperties || {});
              r.borderStyle = r.borderStyle || "";
              this._addUnit(t, r.widthUnit);
              this._addUnit(t, r.heightUnit);
              this._initNumericTextbox(
                n.find("#k-editor-table-width"),
                "width",
                r,
                f
              );
              this._initNumericTextbox(
                n.find("#k-editor-table-height"),
                "height",
                r,
                f
              );
              this._initNumericTextbox(
                n.find("#k-editor-table-columns"),
                "columns",
                r,
                f,
                { min: 1, value: 4 }
              );
              this._initNumericTextbox(
                n.find("#k-editor-table-rows"),
                "rows",
                r,
                f,
                { min: 1, value: 4 }
              );
              this._initDropDownList(
                n.find("#k-editor-table-width-type"),
                "widthUnit",
                r,
                f,
                t
              );
              this._initDropDownList(
                n.find("#k-editor-table-height-type"),
                "heightUnit",
                r,
                f,
                t
              );
              this._initNumericTextbox(
                n.find("#k-editor-table-cell-spacing"),
                "cellSpacing",
                r,
                f
              );
              this._initNumericTextbox(
                n.find("#k-editor-table-cell-padding"),
                "cellPadding",
                r,
                f
              );
              this._initTableAlignmentDropDown(
                n.find("#k-editor-table-alignment"),
                r
              );
              this._initColorPicker(
                n.find("#k-editor-table-bg"),
                "bgColor",
                r,
                f
              );
              this._initInput(n.find("#k-editor-css-class"), "className", r, f);
              this._initInput(n.find("#k-editor-id"), "id", r, f);
              this._initNumericTextbox(
                n.find("#k-editor-border-width"),
                "borderWidth",
                r,
                f
              );
              this._initColorPicker(
                n.find("#k-editor-border-color"),
                "borderColor",
                r,
                f
              );
              this._initDropDownList(
                n.find("#k-editor-border-style"),
                "borderStyle",
                r,
                f,
                u
              );
              this._initCheckbox(
                n.find("#k-editor-collapse-borders"),
                "collapseBorders",
                r,
                f
              );
            },
            _initCellViewComponents: function (n, i) {
              var r,
                e = this.components,
                f = (e.cellView = {});
              i.selectedCells = i.selectedCells = i.selectedCells || [];
              r = i.selectedCells[0] || { borderStyle: "", wrapText: !0 };
              this._addUnit(t, r.widthUnit);
              this._addUnit(t, r.heightUnit);
              this._initCheckbox(
                n.find("#k-editor-selectAllCells"),
                "selectAllCells",
                i.tableProperties,
                f
              );
              this._initNumericTextbox(
                n.find("#k-editor-cell-width"),
                "width",
                r,
                f
              );
              this._initNumericTextbox(
                n.find("#k-editor-cell-height"),
                "height",
                r,
                f
              );
              this._initDropDownList(
                n.find("#k-editor-cell-width-type"),
                "widthUnit",
                r,
                f,
                t
              );
              this._initDropDownList(
                n.find("#k-editor-cell-height-type"),
                "heightUnit",
                r,
                f,
                t
              );
              this._initNumericTextbox(
                n.find("#k-editor-table-cell-margin"),
                "cellMargin",
                r,
                f
              );
              this._initNumericTextbox(
                n.find("#k-editor-table-cells-padding"),
                "cellPadding",
                r,
                f
              );
              this._initCellAlignmentDropDown(
                n.find("#k-editor-cell-alignment"),
                r
              );
              this._initColorPicker(
                n.find("#k-editor-cell-bg"),
                "bgColor",
                r,
                f
              );
              this._initInput(
                n.find("#k-editor-cell-css-class"),
                "className",
                r,
                f
              );
              this._initInput(n.find("#k-editor-cell-id"), "id", r, f);
              this._initNumericTextbox(
                n.find("#k-editor-cell-border-width"),
                "borderWidth",
                r,
                f
              );
              this._initColorPicker(
                n.find("#k-editor-cell-border-color"),
                "borderColor",
                r,
                f
              );
              this._initDropDownList(
                n.find("#k-editor-cell-border-style"),
                "borderStyle",
                r,
                f,
                u
              );
              this._initCheckbox(
                n.find("#k-editor-wrap-text"),
                "wrapText",
                r,
                f
              );
            },
            _initAccessibilityViewComponents: function (n, t) {
              var u = this.components,
                r = (u.accessibilityView = {}),
                i = t.tableProperties;
              this._initInput(
                n.find("#k-editor-table-caption"),
                "captionContent",
                i,
                r
              );
              this._initAccessibilityAlignmentDropDown(
                n.find("#k-editor-accessibility-alignment"),
                i
              );
              this._initInput(
                n.find("#k-editor-accessibility-summary"),
                "summary",
                i,
                r
              );
              this._initCheckbox(
                n.find("#k-editor-cells-headers"),
                "cellsWithHeaders",
                i,
                r
              );
            },
            _initNumericTextbox: function (t, i, u, f, e) {
              var o = (f[i] = t
                .kendoNumericTextBox(e ? n.extend({}, r, e) : r)
                .data("kendoNumericTextBox"));
              i in u && o.value(parseInt(u[i], 10));
            },
            _initDropDownList: function (n, t, i, r, u) {
              var f = (r[t] = n
                .kendoDropDownList({ dataSource: u })
                .data("kendoDropDownList"));
              this._setComponentValue(f, i, t);
            },
            _initTableAlignmentDropDown: function (n, t) {
              var i = this.options.messages,
                u = this.components.tableView,
                r = f.dataSource;
              r[0].tooltip = i.alignLeft;
              r[1].tooltip = i.alignCenter;
              r[2].tooltip = i.alignRight;
              r[3].tooltip = i.alignRemove;
              this._initAlignmentDropDown(n, f, "alignment", t, u);
            },
            _initCellAlignmentDropDown: function (n, t) {
              var i = this.options.messages,
                u = this.components.cellView,
                r = e.dataSource;
              r[0].tooltip = i.alignLeftTop;
              r[1].tooltip = i.alignCenterTop;
              r[2].tooltip = i.alignRightTop;
              r[3].tooltip = i.alignLeftMiddle;
              r[4].tooltip = i.alignCenterMiddle;
              r[5].tooltip = i.alignRightMiddle;
              r[6].tooltip = i.alignLeftBottom;
              r[7].tooltip = i.alignCenterBottom;
              r[8].tooltip = i.alignRightBottom;
              r[9].tooltip = i.alignRemove;
              this._initAlignmentDropDown(n, e, "alignment", t, u);
            },
            _initAccessibilityAlignmentDropDown: function (n, t) {
              var i = this.options.messages,
                u = this.components.accessibilityView,
                r = o.dataSource;
              r[0].tooltip = i.alignLeftTop;
              r[1].tooltip = i.alignCenterTop;
              r[2].tooltip = i.alignRightTop;
              r[3].tooltip = i.alignLeftBottom;
              r[4].tooltip = i.alignCenterBottom;
              r[5].tooltip = i.alignRightBottom;
              r[6].tooltip = i.alignRemove;
              this._initAlignmentDropDown(n, o, "captionAlignment", t, u);
            },
            _initAlignmentDropDown: function (n, t, i, r, u) {
              var f = (u[i] = n.kendoDropDownList(t).data("kendoDropDownList"));
              f.list.addClass("k-align").css("width", "110px");
              this._setComponentValue(f, r, i);
            },
            _setComponentValue: function (n, t, i) {
              i in t && n.value(t[i]);
            },
            _initColorPicker: function (n, t, i, r) {
              var u = (r[t] = n
                .kendoColorPicker({ buttons: !1, clearButton: !0 })
                .data("kendoColorPicker"));
              i[t] && u.value(i[t]);
            },
            _initInput: function (n, t, i, r) {
              var u = (r[t] = n.get(0));
              t in i && (u.value = i[t]);
            },
            _initCheckbox: function (n, t, i, r) {
              var u = (r[t] = n.get(0));
              t in i && (u.checked = i[t]);
            },
            destroy: function () {
              this._destroyComponents(this.components.tableView);
              this._destroyComponents(this.components.cellView);
              this._destroyComponents(this.components.accessibilityView);
              this._destroyComponents(this.components);
              delete this.components;
            },
            _destroyComponents: function (n) {
              for (var t in n) n[t].destroy && n[t].destroy(), delete n[t];
            },
            _dialogTemplate: function (n) {
              return i.template(s)({ messages: n });
            },
          });
        i.ui.editor.TableWizardDialog = h;
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.editor.min",
      [
        "kendo.combobox.min",
        "kendo.dropdownlist.min",
        "kendo.resizable.min",
        "kendo.window.min",
        "kendo.colorpicker.min",
        "kendo.imagebrowser.min",
        "kendo.numerictextbox.min",
        "util/undoredostack.min",
        "editor/main.min",
        "editor/dom.min",
        "editor/serializer.min",
        "editor/range.min",
        "editor/command.min",
        "editor/components.min",
        "editor/toolbar.min",
        "editor/immutables.min",
        "editor/plugins/viewhtml.min",
        "editor/plugins/link.min",
        "editor/plugins/lists.min",
        "editor/plugins/formatting.min",
        "editor/plugins/image.min",
        "editor/plugins/import.min",
        "editor/plugins/insert.min",
        "editor/plugins/export.min",
        "editor/plugins/indent.min",
        "editor/plugins/linebreak.min",
        "editor/plugins/format.min",
        "editor/plugins/inlineformat.min",
        "editor/plugins/formatblock.min",
        "editor/plugins/file.min",
        "editor/plugins/tables.min",
        "editor/plugins/clipboard.min",
        "editor/plugins/keyboard.min",
        "editor/plugins/exportpdf.min",
        "editor/plugins/print.min",
        "editor/resizing/column-resizing.min",
        "editor/resizing/row-resizing.min",
        "editor/resizing/table-resizing.min",
        "editor/resizing/table-resize-handle.min",
        "editor/table-wizard/table-wizard-command.min",
        "editor/table-wizard/table-wizard-dialog.min",
      ],
      n
    );
  })(
    function () {
      return window.kendo;
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.maskedtextbox.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function i(n) {
            return n + h;
          }
          function ut(n, t) {
            for (var i = 0; i < t.length && n[i] === t[i]; ) i++;
            return i;
          }
          function a(n) {
            return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
          }
          var v = window,
            y = v.Math.min,
            r = v.kendo,
            o = r.caret,
            p = r.keys,
            w = r.ui,
            s = w.Widget,
            h = ".kendoMaskedTextBox",
            u = n.proxy,
            f = window.setTimeout,
            b = "k-state-disabled",
            k = "k-state-invalid",
            d = "disabled",
            g = "readonly",
            e = "change",
            nt = "mouseup",
            c = "drop",
            l = "keydown",
            tt = "paste",
            it = "input",
            rt = i(r.support.propertyChangeEvent ? "propertychange" : it),
            ft = s.extend({
              init: function (t, i) {
                var e,
                  c,
                  u = this;
                s.fn.init.call(u, t, i);
                u._rules = n.extend({}, u.rules, u.options.rules);
                t = u.element;
                e = t[0];
                u._wrapper();
                u._tokenize();
                u._form();
                u.element
                  .addClass("k-textbox")
                  .attr("autocomplete", "off")
                  .on("focus" + h, function () {
                    var n = e.value;
                    n ? u._togglePrompt(!0) : (e.value = u._old = u._emptyMask);
                    u._oldValue = n;
                    u._timeoutId = f(function () {
                      o(t, 0, n ? u._maskLength : 0);
                    });
                  })
                  .on("focusout" + h, function () {
                    var n = t.val();
                    clearTimeout(u._timeoutId);
                    e.value = u._old = "";
                    n !== u._emptyMask && (e.value = u._old = n);
                    u._change();
                    u._togglePrompt();
                  });
                c =
                  t.is("[disabled]") ||
                  n(u.element).parents("fieldset").is(":disabled");
                c ? u.enable(!1) : u.readonly(t.is("[readonly]"));
                u.value(u.options.value || t.val());
                u._validationIcon = n(
                  "<span class='k-icon k-i-warning'></span>"
                ).insertAfter(t);
                r.notify(u);
              },
              options: {
                name: "MaskedTextBox",
                clearPromptChar: !1,
                unmaskOnPost: !1,
                promptChar: "_",
                culture: "",
                rules: {},
                value: "",
                mask: "",
              },
              events: [e],
              rules: {
                0: /\d/,
                9: /\d|\s/,
                "#": /\d|\s|\+|\-/,
                L: /[a-zA-Z]/,
                "?": /[a-zA-Z]|\s/,
                "&": /\S/,
                C: /./,
                A: /[a-zA-Z0-9]/,
                a: /[a-zA-Z0-9]|\s/,
              },
              setOptions: function (t) {
                var i = this;
                s.fn.setOptions.call(i, t);
                i._rules = n.extend({}, i.rules, i.options.rules);
                i._tokenize();
                this._unbindInput();
                this._bindInput();
                i.value(i.element.val());
              },
              destroy: function () {
                var n = this;
                n.element.off(h);
                n._formElement &&
                  (n._formElement.off("reset", n._resetHandler),
                  n._formElement.off("submit", n._submitHandler));
                s.fn.destroy.call(n);
              },
              raw: function () {
                var n = this._unmask(this.element.val(), 0);
                return n.replace(RegExp(a(this.options.promptChar), "g"), "");
              },
              value: function (n) {
                var i = this.element,
                  u = this._emptyMask;
                return n === t
                  ? this.element.val()
                  : (null === n && (n = ""),
                    u
                      ? ((n = this._unmask(n + "")),
                        i.val(n ? u : ""),
                        this._mask(0, this._maskLength, n),
                        (this._unmaskedValue = null),
                        (n = i.val()),
                        (this._oldValue = n),
                        r._activeElement() !== i &&
                          (n === u ? i.val("") : this._togglePrompt()),
                        t)
                      : ((this._oldValue = n), i.val(n), t));
              },
              _togglePrompt: function (n) {
                var i = this.element[0],
                  t = i.value;
                this.options.clearPromptChar &&
                  ((t = n
                    ? this._oldValue
                    : t.replace(RegExp(a(this.options.promptChar), "g"), " ")),
                  (i.value = this._old = t));
              },
              readonly: function (n) {
                this._editable({ readonly: n === t || n, disable: !1 });
              },
              enable: function (n) {
                this._editable({ readonly: !1, disable: !(n = n === t || n) });
              },
              _bindInput: function () {
                var t,
                  f,
                  n = this;
                n._maskLength &&
                  (n.options.$angular && n.element.off(it),
                  n.element
                    .on(i(l), u(n._keydown, n))
                    .on(i(c), u(n._drop, n))
                    .on(i(e), u(n._trackChange, n))
                    .on(rt, u(n._inputHandler, n)),
                  r.support.browser.msie &&
                    ((t = r.support.browser.version),
                    t > 8 &&
                      t < 11 &&
                      ((f = [i(nt), i(c), i(l), i(tt)].join(" ")),
                      n.element.on(f, u(n._legacyIEInputHandler, n)))));
              },
              _unbindInput: function () {
                var n = [rt, i(l), i(nt), i(c), i(tt)].join(" ");
                this.element.off(n);
              },
              _editable: function (n) {
                var t = this,
                  r = t.element,
                  u = t.wrapper,
                  i = n.disable,
                  f = n.readonly;
                t._unbindInput();
                f || i
                  ? (r.attr(d, i).attr(g, f), u.toggleClass(b, i))
                  : (r.removeAttr(d).removeAttr(g),
                    u.removeClass(b),
                    t._bindInput());
              },
              _change: function () {
                var n = this,
                  t = n.value();
                t !== n._oldValue
                  ? ((n._oldValue = t), n.trigger(e), n.element.trigger(e))
                  : "" === t && n.__changing && n.element.trigger(e);
              },
              inputChange: function (n) {
                var i,
                  a,
                  u,
                  h,
                  v,
                  t = this,
                  c = t._old,
                  e = t.element[0],
                  f = e.value,
                  w = o(e),
                  s = w[1],
                  l = f.length - c.length,
                  p = r.support.mobileOS;
                (t.__dropping && l < 0) ||
                  (l === -1 && p.android && "chrome" === p.browser && (n = !0),
                  (i = y(s, ut(f, c))),
                  (a = f.substring(i, s)),
                  (e.value = f.substring(0, i) + t._emptyMask.substring(i)),
                  (u = t._mask(i, s, a)),
                  (h = t._trimStartPromptChars(f.substring(s), y(l, u - i))),
                  (v = t._unmask(h, c.length - h.length)),
                  t._mask(u, u, v),
                  n && (u = t._findCaretPosBackwards(i)),
                  o(e, u),
                  (t.__dropping = !1));
              },
              _trimStartPromptChars: function (n, t) {
                for (
                  var i = this.options.promptChar;
                  t-- > 0 && 0 === n.indexOf(i);

                )
                  n = n.substring(1);
                return n;
              },
              _findCaretPosBackwards: function (n) {
                var t = this._find(n, !0);
                return t < n && (t += 1), t;
              },
              _inputHandler: function () {
                r._activeElement() === this.element[0] &&
                  this.inputChange(this.__backward);
              },
              _legacyIEInputHandler: function (n) {
                var t = this,
                  i = t.element[0],
                  u = i.value,
                  r = n.type;
                t.__pasting = "paste" === r;
                f(function () {
                  ("mouseup" === r && t.__pasting) ||
                    (i.value && i.value !== u && t.inputChange(t.__backward));
                });
              },
              _trackChange: function () {
                var n = this;
                n.__changing = !0;
                f(function () {
                  n.__changing = !1;
                });
              },
              _form: function () {
                var t = this,
                  i = t.element,
                  u = i.attr("form"),
                  r = u ? n("#" + u) : i.closest("form");
                r[0] &&
                  ((t._resetHandler = function () {
                    f(function () {
                      t.value(i[0].value);
                    });
                  }),
                  (t._submitHandler = function () {
                    t.element[0].value = t._old = t.raw();
                  }),
                  t.options.unmaskOnPost && r.on("submit", t._submitHandler),
                  (t._formElement = r.on("reset", t._resetHandler)));
              },
              _keydown: function (n) {
                var t = n.keyCode;
                this.__backward = t === p.BACKSPACE;
                t === p.ENTER && this._change();
              },
              _drop: function () {
                this.__dropping = !0;
              },
              _find: function (n, t) {
                var r = this.element.val() || this._emptyMask,
                  i = 1;
                for (t === !0 && (i = -1); n > -1 || n <= this._maskLength; ) {
                  if (r.charAt(n) !== this.tokens[n]) return n;
                  n += i;
                }
                return -1;
              },
              _mask: function (n, i, u, f) {
                var l,
                  h,
                  a,
                  e,
                  c = this.element[0],
                  s = c.value || this._emptyMask,
                  y = this.options.promptChar,
                  v = 0;
                for (
                  n = this._find(n, f),
                    n > i && (i = n),
                    h = this._unmask(s.substring(i), i),
                    u = this._unmask(u, n),
                    l = u.length,
                    u && (h = h.replace(RegExp("^_{0," + l + "}"), "")),
                    u += h,
                    s = s.split(""),
                    a = u.charAt(v);
                  n < this._maskLength;

                )
                  (s[n] = a || y),
                    (a = u.charAt(++v)),
                    e === t && v > l && (e = n),
                    (n = this._find(n + 1));
                return (
                  (c.value = this._old = s.join("")),
                  r._activeElement() === c &&
                    (e === t && (e = this._maskLength), o(c, e)),
                  e
                );
              },
              _unmask: function (t, i) {
                var u, r, e, f, s, h, c, o;
                if (!t) return "";
                if (this._unmaskedValue === t) return this._unmaskedValue;
                for (
                  t = (t + "").split(""),
                    e = 0,
                    f = i || 0,
                    s = this.options.promptChar,
                    h = t.length,
                    c = this.tokens.length,
                    o = "";
                  f < c &&
                  ((u = t[e]),
                  (r = this.tokens[f]),
                  u === r || u === s
                    ? ((o += u === s ? s : ""), (e += 1), (f += 1))
                    : "string" != typeof r
                    ? ((r && r.test && r.test(u)) || (n.isFunction(r) && r(u))
                        ? ((o += u), (f += 1))
                        : 1 === h && this._blinkInvalidState(),
                      (e += 1))
                    : (f += 1),
                  !(e >= h));

                );
                return (this._unmaskedValue = o), o;
              },
              _wrapper: function () {
                var t = this,
                  i = t.element,
                  n = i[0],
                  r = i
                    .wrap("<span class='k-widget k-maskedtextbox'></span>")
                    .parent();
                r[0].style.cssText = n.style.cssText;
                n.style.width = "100%";
                t.wrapper = r.addClass(n.className);
              },
              _blinkInvalidState: function () {
                var n = this;
                n.wrapper.addClass(k);
                clearTimeout(n._invalidStateTimeout);
                n._invalidStateTimeout = f(u(n._removeInvalidState, n), 100);
              },
              _removeInvalidState: function () {
                var n = this;
                n.wrapper.removeClass(k);
                n._invalidStateTimeout = null;
              },
              _tokenize: function () {
                for (
                  var n,
                    s,
                    t,
                    h,
                    e = [],
                    u = 0,
                    l = this.options.mask || "",
                    o = l.split(""),
                    a = o.length,
                    i = 0,
                    f = "",
                    v = this.options.promptChar,
                    c = r.getCulture(this.options.culture).numberFormat,
                    y = this._rules;
                  i < a;
                  i++
                )
                  if (((n = o[i]), (s = y[n]))) (e[u] = s), (f += v), (u += 1);
                  else
                    for (
                      "." === n || "," === n
                        ? (n = c[n])
                        : "$" === n
                        ? (n = c.currency.symbol)
                        : "\\" === n && ((i += 1), (n = o[i])),
                        n = n.split(""),
                        t = 0,
                        h = n.length;
                      t < h;
                      t++
                    )
                      (e[u] = n[t]), (f += n[t]), (u += 1);
                this.tokens = e;
                this._emptyMask = f;
                this._maskLength = f.length;
              },
            });
          w.plugin(ft);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.toolbar.min",
      ["kendo.core.min", "kendo.userevents.min", "kendo.popup.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function pt(n) {
            n.target.is(".k-toggle-button") ||
              n.target.toggleClass(k, "press" == n.type);
          }
          function wt(t) {
            return (
              (t = n(t)),
              t.hasClass("km-actionsheet")
                ? t.closest(".km-popup-wrapper")
                : t
                    .addClass("km-widget km-actionsheet")
                    .wrap(
                      '<div class="km-actionsheet-wrapper km-actionsheet-tablet km-widget km-popup"></div>'
                    )
                    .parent()
                    .wrap('<div class="km-popup-wrapper k-popup"></div>')
                    .parent()
            );
          }
          function rt(t) {
            n(t.target).closest("a.k-button").length && t.preventDefault();
          }
          function v(t, i) {
            var u = "next" === i ? n.fn.next : n.fn.prev,
              f = "next" === i ? n.fn.first : n.fn.last,
              r = u.call(t);
            return !r.length && t.is("." + l)
              ? t
              : r.is(":kendoFocusable") || !r.length
              ? r
              : r.find(":kendoFocusable").length
              ? f.call(r.find(":kendoFocusable"))
              : v(r, i);
          }
          var d,
            f,
            y,
            p,
            w,
            tt,
            ut,
            ft,
            et,
            ot,
            bt,
            kt,
            dt,
            st,
            ht,
            gt,
            ni,
            i = window.kendo,
            ki = i.Class,
            ct = i.ui.Widget,
            lt = n.proxy,
            b = i.isFunction,
            r = i.keys,
            g = i._outerWidth,
            ti = "k-toolbar",
            o = "k-button",
            it = "k-overflow-button",
            ii = "k-toggle-button",
            u = "k-button-group",
            h = "k-split-button",
            ri = "k-separator",
            ui = "k-spacer",
            at = "spacer",
            fi = "k-popup",
            di = "k-toolbar-resizable",
            k = "k-state-active",
            vt = "k-state-disabled",
            c = "k-state-hidden",
            gi = "k-group-start",
            nr = "k-group-end",
            tr = "k-primary",
            nt = "k-icon",
            ei = "k-i-",
            ir = "k-button-icon",
            rr = "k-button-icontext",
            ur = "k-list-container k-split-container",
            oi = "k-split-button-arrow",
            l = "k-overflow-anchor",
            si = "k-overflow-container",
            hi = "k-toolbar-first-visible",
            ci = "k-toolbar-last-visible",
            a = "click",
            li = "toggle",
            ai = "open",
            vi = "close",
            yi = "overflowOpen",
            pi = "overflowClose",
            wi = "never",
            yt = "auto",
            fr = "always",
            s = "k-overflow-hidden",
            bi = "_optionlist",
            e = i.attr("uid");
          i.toolbar = {};
          d = {
            overflowAnchor:
              '<div tabindex="0" class="k-overflow-anchor k-button"></div>',
            overflowContainer:
              '<ul class="k-overflow-container k-list-container"></ul>',
          };
          i.toolbar.registerComponent = function (n, t, i) {
            d[n] = { toolbar: t, overflow: i };
          };
          f = i.Class.extend({
            addOverflowAttr: function () {
              this.element.attr(
                i.attr("overflow"),
                this.options.overflow || yt
              );
            },
            addUidAttr: function () {
              this.element.attr(e, this.options.uid);
            },
            addIdAttr: function () {
              this.options.id && this.element.attr("id", this.options.id);
            },
            addOverflowIdAttr: function () {
              this.options.id &&
                this.element.attr("id", this.options.id + "_overflow");
            },
            attributes: function () {
              this.options.attributes &&
                this.element.attr(this.options.attributes);
            },
            show: function () {
              this.element.removeClass(c).show();
              this.options.hidden = !1;
            },
            hide: function () {
              this.element.addClass(c).hide();
              this.overflow && this.overflowHidden && this.overflowHidden();
              this.options.hidden = !0;
            },
            remove: function () {
              this.element.remove();
            },
            enable: function (n) {
              n === t && (n = !0);
              this.element.toggleClass(vt, !n);
              this.options.enable = n;
            },
            twin: function () {
              var i = this.element.attr(e);
              return this.overflow && this.options.splitContainerId
                ? n("#" + this.options.splitContainerId)
                    .find("[" + e + "='" + i + "']")
                    .data(this.options.type)
                : this.overflow
                ? this.toolbar.element
                    .find("[" + e + "='" + i + "']")
                    .data(this.options.type)
                : this.toolbar.options.resizable
                ? this.toolbar.popup.element
                    .find("[" + e + "='" + i + "']")
                    .data(this.options.type)
                : t;
            },
          });
          i.toolbar.Item = f;
          y = f.extend({
            init: function (r, u) {
              var f = n(
                r.useButtonTag
                  ? '<button tabindex="0"></button>'
                  : '<a href tabindex="0"></a>'
              );
              this.element = f;
              this.options = r;
              this.toolbar = u;
              this.attributes();
              r.primary && f.addClass(tr);
              r.togglable && (f.addClass(ii), this.toggle(r.selected));
              r.url === t ||
                r.useButtonTag ||
                (f.attr("href", r.url),
                r.mobile && f.attr(i.attr("role"), "button"));
              r.group &&
                (f.attr(i.attr("group"), r.group),
                (this.group = this.toolbar.addToGroup(this, r.group)));
              !r.togglable &&
                r.click &&
                b(r.click) &&
                (this.clickHandler = r.click);
              r.togglable &&
                r.toggle &&
                b(r.toggle) &&
                (this.toggleHandler = r.toggle);
            },
            toggle: function (n, t) {
              n = !!n;
              this.group && n
                ? this.group.select(this)
                : this.group || this.select(n);
              t && this.twin() && this.twin().toggle(n);
            },
            getParentGroup: function () {
              if (this.options.isChild)
                return this.element.closest("." + u).data("buttonGroup");
            },
            _addGraphics: function () {
              var u,
                t,
                r,
                i = this.element,
                f = this.options.icon,
                e = this.options.spriteCssClass,
                o = this.options.imageUrl;
              (e || o || f) &&
                ((u = !0),
                i
                  .contents()
                  .filter(function () {
                    return (
                      !n(this).hasClass("k-sprite") &&
                      !n(this).hasClass(nt) &&
                      !n(this).hasClass("k-image")
                    );
                  })
                  .each(function (t, i) {
                    (1 == i.nodeType ||
                      (3 == i.nodeType && n.trim(i.nodeValue).length > 0)) &&
                      (u = !1);
                  }),
                i.addClass(u ? ir : rr));
              f
                ? ((t = i.children("span." + nt).first()),
                  t[0] ||
                    (t = n('<span class="' + nt + '"></span>').prependTo(i)),
                  t.addClass(ei + f))
                : e
                ? ((t = i.children("span.k-sprite").first()),
                  t[0] ||
                    (t = n(
                      '<span class="k-sprite ' + nt + '"></span>'
                    ).prependTo(i)),
                  t.addClass(e))
                : o &&
                  ((r = i.children("img.k-image").first()),
                  r[0] ||
                    (r = n('<img alt="icon" class="k-image" />').prependTo(i)),
                  r.attr("src", o));
            },
          });
          i.toolbar.Button = y;
          p = y.extend({
            init: function (n, t) {
              y.fn.init.call(this, n, t);
              var i = this.element;
              i.addClass(o);
              this.addIdAttr();
              n.align && i.addClass("k-align-" + n.align);
              "overflow" != n.showText &&
                n.text &&
                i.html(
                  n.mobile
                    ? '<span class="km-text">' + n.text + "</span>"
                    : n.text
                );
              n.hasIcon =
                "overflow" != n.showIcon &&
                (n.icon || n.spriteCssClass || n.imageUrl);
              n.hasIcon && this._addGraphics();
              this.addUidAttr();
              this.addOverflowAttr();
              this.enable(n.enable);
              n.hidden && this.hide();
              this.element.data({ type: "button", button: this });
            },
            select: function (n) {
              n === t && (n = !1);
              this.element.toggleClass(k, n);
              this.options.selected = n;
            },
          });
          i.toolbar.ToolBarButton = p;
          w = y.extend({
            init: function (t, i) {
              this.overflow = !0;
              y.fn.init.call(this, n.extend({}, t), i);
              var r = this.element;
              "toolbar" != t.showText &&
                t.text &&
                r.html(
                  t.mobile
                    ? '<span class="km-text">' + t.text + "</span>"
                    : '<span class="k-text">' + t.text + "</span>"
                );
              t.hasIcon =
                "toolbar" != t.showIcon &&
                (t.icon || t.spriteCssClass || t.imageUrl);
              t.hasIcon && this._addGraphics();
              t.isChild || this._wrap();
              this.addOverflowIdAttr();
              this.attributes();
              this.addUidAttr();
              this.addOverflowAttr();
              this.enable(t.enable);
              r.addClass(it + " " + o);
              t.hidden && this.hide();
              t.togglable && this.toggle(t.selected);
              this.element.data({ type: "button", button: this });
            },
            _wrap: function () {
              this.element = this.element.wrap("<li></li>").parent();
            },
            overflowHidden: function () {
              this.element.addClass(s);
            },
            select: function (n) {
              n === t && (n = !1);
              this.options.isChild
                ? this.element.toggleClass(k, n)
                : this.element.find(".k-button").toggleClass(k, n);
              this.options.selected = n;
            },
          });
          i.toolbar.OverflowButton = w;
          i.toolbar.registerComponent("button", p, w);
          tt = f.extend({
            createButtons: function (t) {
              for (
                var f, e = this.options, u = e.buttons || [], r = 0;
                r < u.length;
                r++
              )
                u[r].uid || (u[r].uid = i.guid()),
                  (f = new t(
                    n.extend(
                      { mobile: e.mobile, isChild: !0, type: "button" },
                      u[r]
                    ),
                    this.toolbar
                  )),
                  f.element.appendTo(this.element);
            },
            refresh: function () {
              this.element
                .children()
                .filter(":not('." + c + "'):first")
                .addClass(gi);
              this.element
                .children()
                .filter(":not('." + c + "'):last")
                .addClass(nr);
            },
          });
          i.toolbar.ButtonGroup = tt;
          ut = tt.extend({
            init: function (t, i) {
              var r = (this.element = n("<div></div>"));
              this.options = t;
              this.toolbar = i;
              this.addIdAttr();
              t.align && r.addClass("k-align-" + t.align);
              this.createButtons(p);
              this.attributes();
              this.addUidAttr();
              this.addOverflowAttr();
              this.refresh();
              r.addClass(u);
              this.element.data({ type: "buttonGroup", buttonGroup: this });
            },
          });
          i.toolbar.ToolBarButtonGroup = ut;
          ft = tt.extend({
            init: function (t, i) {
              var r = (this.element = n("<li></li>"));
              this.options = t;
              this.toolbar = i;
              this.overflow = !0;
              this.addOverflowIdAttr();
              this.createButtons(w);
              this.attributes();
              this.addUidAttr();
              this.addOverflowAttr();
              this.refresh();
              r.addClass((t.mobile ? "" : u) + " k-overflow-group");
              this.element.data({ type: "buttonGroup", buttonGroup: this });
            },
            overflowHidden: function () {
              this.element.addClass(s);
            },
          });
          i.toolbar.OverflowButtonGroup = ft;
          i.toolbar.registerComponent("buttonGroup", ut, ft);
          et = f.extend({
            init: function (t, i) {
              var r = (this.element = n(
                '<div class="' + h + '" tabindex="0"></div>'
              ));
              this.options = t;
              this.toolbar = i;
              this.mainButton = new p(n.extend({}, t, { hidden: !1 }), i);
              this.arrowButton = n(
                '<a class="' +
                  o +
                  " " +
                  oi +
                  '"><span class="' +
                  (t.mobile
                    ? "km-icon km-arrowdown"
                    : "k-icon k-i-arrow-60-down") +
                  '"></span></a>'
              );
              this.popupElement = n('<ul class="' + ur + '"></ul>');
              this.mainButton.element.removeAttr("href tabindex").appendTo(r);
              this.arrowButton.appendTo(r);
              this.popupElement.appendTo(r);
              t.align && r.addClass("k-align-" + t.align);
              t.id || (t.id = t.uid);
              r.attr("id", t.id + "_wrapper");
              this.addOverflowAttr();
              this.addUidAttr();
              this.createMenuButtons();
              this.createPopup();
              this._navigatable();
              this.mainButton.main = !0;
              this.enable(t.enable);
              t.hidden && this.hide();
              r.data({
                type: "splitButton",
                splitButton: this,
                kendoPopup: this.popup,
              });
            },
            _navigatable: function () {
              var t = this;
              t.popupElement.on("keydown", "." + o, function (i) {
                var u = n(i.target).parent();
                i.preventDefault();
                i.keyCode === r.ESC ||
                i.keyCode === r.TAB ||
                (i.altKey && i.keyCode === r.UP)
                  ? (t.toggle(), t.focus())
                  : i.keyCode === r.DOWN
                  ? v(u, "next").focus()
                  : i.keyCode === r.UP
                  ? v(u, "prev").focus()
                  : i.keyCode === r.SPACEBAR || i.keyCode === r.ENTER
                  ? t.toolbar.userEvents.trigger("tap", { target: n(i.target) })
                  : i.keyCode === r.HOME
                  ? u.parent().find(":kendoFocusable").first().focus()
                  : i.keyCode === r.END &&
                    u.parent().find(":kendoFocusable").last().focus();
              });
            },
            createMenuButtons: function () {
              for (
                var r, i = this.options, u = i.menuButtons, t = 0;
                t < u.length;
                t++
              )
                (r = new p(
                  n.extend(
                    { mobile: i.mobile, type: "button", click: i.click },
                    u[t]
                  ),
                  this.toolbar
                )),
                  r.element
                    .wrap("<li></li>")
                    .parent()
                    .appendTo(this.popupElement);
            },
            createPopup: function () {
              var u = this,
                i = this.options,
                r = this.element;
              this.popupElement.attr("id", i.id + bi).attr(e, i.rootUid);
              i.mobile && (this.popupElement = wt(this.popupElement));
              this.popup = this.popupElement
                .kendoPopup({
                  appendTo: i.mobile ? n(i.mobile).children(".km-pane") : null,
                  anchor: r,
                  isRtl: this.toolbar._isRtl,
                  copyAnchorStyles: !1,
                  animation: i.animation,
                  open: function (n) {
                    var i = u.toolbar.trigger(ai, { target: r });
                    return i
                      ? (n.preventDefault(), t)
                      : (u.adjustPopupWidth(n.sender), t);
                  },
                  activate: function () {
                    this.element.find(":kendoFocusable").first().focus();
                  },
                  close: function (n) {
                    var t = u.toolbar.trigger(vi, { target: r });
                    t && n.preventDefault();
                    r.focus();
                  },
                })
                .data("kendoPopup");
              this.popup.element.on(a, "a.k-button", rt);
            },
            adjustPopupWidth: function (n) {
              var t,
                r = n.options.anchor,
                u = g(r);
              i.wrap(n.element).addClass("k-split-wrapper");
              t =
                "border-box" !== n.element.css("box-sizing")
                  ? u - (g(n.element) - n.element.width())
                  : u;
              n.element.css({
                fontFamily: r.css("font-family"),
                "min-width": t,
              });
            },
            remove: function () {
              this.popup.element.off(a, "a.k-button");
              this.popup.destroy();
              this.element.remove();
            },
            toggle: function () {
              (this.options.enable || this.popup.visible()) &&
                this.popup.toggle();
            },
            enable: function (n) {
              n === t && (n = !0);
              this.mainButton.enable(n);
              this.element.toggleClass(vt, !n);
              this.options.enable = n;
            },
            focus: function () {
              this.element.focus();
            },
            hide: function () {
              this.popup && this.popup.close();
              this.element.addClass(c).hide();
              this.options.hidden = !0;
            },
            show: function () {
              this.element.removeClass(c).hide();
              this.options.hidden = !1;
            },
          });
          i.toolbar.ToolBarSplitButton = et;
          ot = f.extend({
            init: function (t, i) {
              var f,
                e,
                r,
                u = (this.element = n('<li class="' + h + '"></li>')),
                o = t.menuButtons;
              for (
                this.options = t,
                  this.toolbar = i,
                  this.overflow = !0,
                  e = (t.id || t.uid) + bi,
                  this.mainButton = new w(n.extend({}, t)),
                  this.mainButton.element.appendTo(u),
                  r = 0;
                r < o.length;
                r++
              )
                (f = new w(
                  n.extend(
                    { mobile: t.mobile, type: "button", splitContainerId: e },
                    o[r]
                  ),
                  this.toolbar
                )),
                  f.element.appendTo(u);
              this.addUidAttr();
              this.addOverflowAttr();
              this.mainButton.main = !0;
              u.data({ type: "splitButton", splitButton: this });
            },
            overflowHidden: function () {
              this.element.addClass(s);
            },
          });
          i.toolbar.OverflowSplitButton = ot;
          i.toolbar.registerComponent("splitButton", et, ot);
          bt = f.extend({
            init: function (t, i) {
              var r = (this.element = n("<div>&nbsp;</div>"));
              this.element = r;
              this.options = t;
              this.toolbar = i;
              this.attributes();
              this.addIdAttr();
              this.addUidAttr();
              this.addOverflowAttr();
              r.addClass(ri);
              r.data({ type: "separator", separator: this });
            },
          });
          kt = f.extend({
            init: function (t, i) {
              var r = (this.element = n("<li>&nbsp;</li>"));
              this.element = r;
              this.options = t;
              this.toolbar = i;
              this.overflow = !0;
              this.attributes();
              this.addUidAttr();
              this.addOverflowIdAttr();
              r.addClass(ri);
              r.data({ type: "separator", separator: this });
            },
            overflowHidden: function () {
              this.element.addClass(s);
            },
          });
          i.toolbar.registerComponent("separator", bt, kt);
          dt = f.extend({
            init: function (t, i) {
              var r = (this.element = n("<div>&nbsp;</div>"));
              this.element = r;
              this.options = t;
              this.toolbar = i;
              r.addClass(ui);
              r.data({ type: at });
            },
          });
          i.toolbar.registerComponent(at, dt);
          st = f.extend({
            init: function (t, i, r) {
              var u = b(t) ? t(i) : t;
              u =
                u instanceof jQuery
                  ? u.wrap("<div></div>").parent()
                  : n("<div></div>").html(u);
              this.element = u;
              this.options = i;
              this.options.type = "template";
              this.toolbar = r;
              this.attributes();
              this.addUidAttr();
              this.addIdAttr();
              this.addOverflowAttr();
              u.data({ type: "template", template: this });
            },
          });
          i.toolbar.TemplateItem = st;
          ht = f.extend({
            init: function (t, i, r) {
              var u = n(b(t) ? t(i) : t);
              u =
                u instanceof jQuery
                  ? u.wrap("<li></li>").parent()
                  : n("<li></li>").html(u);
              this.element = u;
              this.options = i;
              this.options.type = "template";
              this.toolbar = r;
              this.overflow = !0;
              this.attributes();
              this.addUidAttr();
              this.addOverflowIdAttr();
              this.addOverflowAttr();
              u.data({ type: "template", template: this });
            },
            overflowHidden: function () {
              this.element.addClass(s);
            },
          });
          i.toolbar.OverflowTemplateItem = ht;
          gt = ki.extend({
            init: function (n) {
              this.name = n;
              this.buttons = [];
            },
            add: function (n) {
              this.buttons[this.buttons.length] = n;
            },
            remove: function (t) {
              var i = n.inArray(t, this.buttons);
              this.buttons.splice(i, 1);
            },
            select: function (n) {
              for (var i, t = 0; t < this.buttons.length; t++)
                (i = this.buttons[t]), i.select(!1);
              n.select(!0);
              n.twin() && n.twin().select(!0);
            },
          });
          ni = ct.extend({
            init: function (t, r) {
              var s,
                f = this;
              if (
                (ct.fn.init.call(f, t, r),
                (r = f.options),
                (t = f.wrapper = f.element),
                t.addClass(ti + " k-widget"),
                (this.uid = i.guid()),
                (this._isRtl = i.support.isRtl(t)),
                (this._groups = {}),
                t.attr(e, this.uid),
                (f.isMobile =
                  "boolean" == typeof r.mobile
                    ? r.mobile
                    : f.element.closest(".km-root")[0]),
                (f.animation = f.isMobile ? { open: { effects: "fade" } } : {}),
                f.isMobile &&
                  (t.addClass("km-widget"),
                  (nt = "km-icon"),
                  (ei = "km-"),
                  (o = "km-button"),
                  (u = "km-buttongroup"),
                  (k = "km-state-active"),
                  (vt = "km-state-disabled")),
                r.resizable
                  ? (f._renderOverflow(),
                    t.addClass(di),
                    (f.overflowUserEvents = new i.UserEvents(f.element, {
                      threshold: 5,
                      allowSelection: !0,
                      filter: "." + l,
                      tap: lt(f._toggleOverflow, f),
                    })),
                    (f._resizeHandler = i.onResize(function () {
                      f.resize();
                    })))
                  : (f.popup = { element: n([]) }),
                r.items && r.items.length)
              ) {
                for (s = 0; s < r.items.length; s++) f.add(r.items[s]);
                r.resizable && f._shrink(f.element.innerWidth());
              }
              f.userEvents = new i.UserEvents(document, {
                threshold: 5,
                allowSelection: !0,
                filter:
                  "[" +
                  e +
                  "=" +
                  this.uid +
                  "] a." +
                  o +
                  ", [" +
                  e +
                  "=" +
                  this.uid +
                  "] ." +
                  it,
                tap: lt(f._buttonClick, f),
                press: pt,
                release: pt,
              });
              f.element.on(a, "a.k-button", rt);
              f._navigatable();
              r.resizable && f.popup.element.on(a, NaN, rt);
              r.resizable && this._toggleOverflowAnchor();
              i.notify(f);
            },
            events: [a, li, ai, vi, yi, pi],
            options: {
              name: "ToolBar",
              items: [],
              resizable: !0,
              mobile: null,
            },
            addToGroup: function (n, t) {
              var i;
              return (
                (i = this._groups[t]
                  ? this._groups[t]
                  : (this._groups[t] = new gt())),
                i.add(n),
                i
              );
            },
            destroy: function () {
              var t = this;
              t.element.find("." + h).each(function (t, i) {
                n(i).data("kendoPopup").destroy();
              });
              t.element.off(a, "a.k-button");
              t.userEvents.destroy();
              t.options.resizable &&
                (i.unbindResize(t._resizeHandler),
                t.overflowUserEvents.destroy(),
                t.popup.element.off(a, "a.k-button"),
                t.popup.destroy());
              ct.fn.destroy.call(t);
            },
            add: function (t) {
              var f,
                u,
                e,
                o = d[t.type],
                s = t.template,
                r = this,
                c = r.isMobile ? "" : "k-item k-state-default",
                h = t.overflowTemplate;
              if (
                (n.extend(t, {
                  uid: i.guid(),
                  animation: r.animation,
                  mobile: r.isMobile,
                  rootUid: r.uid,
                }),
                t.menuButtons)
              )
                for (e = 0; e < t.menuButtons.length; e++)
                  n.extend(t.menuButtons[e], { uid: i.guid() });
              (s && !h) || t.type === at
                ? (t.overflow = wi)
                : t.overflow || (t.overflow = yt);
              t.overflow !== wi &&
                r.options.resizable &&
                (h
                  ? (u = new ht(h, t, r))
                  : o && ((u = new o.overflow(t, r)), u.element.addClass(c)),
                u &&
                  (t.overflow === yt && u.overflowHidden(),
                  u.element.appendTo(r.popup.container),
                  r.angular("compile", function () {
                    return { elements: u.element.get() };
                  })));
              t.overflow !== fr &&
                (s ? (f = new st(s, t, r)) : o && (f = new o.toolbar(t, r)),
                f &&
                  (f.element.appendTo(r.element),
                  r.angular("compile", function () {
                    return { elements: f.element.get() };
                  })));
            },
            _getItem: function (t) {
              var i,
                u,
                f,
                r,
                e = this.options.resizable;
              return (
                (i = this.element.find(t)),
                i.length ||
                  (i = n(".k-split-container[data-uid=" + this.uid + "]").find(
                    t
                  )),
                (r = i.length ? i.data("type") : ""),
                (u = i.data(r)),
                u
                  ? (u.main &&
                      ((i = i.parent("." + h)),
                      (r = "splitButton"),
                      (u = i.data(r))),
                    e && (f = u.twin()))
                  : e &&
                    ((i = this.popup.element.find(t)),
                    (r = i.length ? i.data("type") : ""),
                    (f = i.data(r)),
                    f &&
                      f.main &&
                      ((i = i.parent("." + h)),
                      (r = "splitButton"),
                      (f = i.data(r)))),
                { type: r, toolbar: u, overflow: f }
              );
            },
            remove: function (n) {
              var t = this._getItem(n);
              t.toolbar && t.toolbar.remove();
              t.overflow && t.overflow.remove();
              this.resize(!0);
            },
            hide: function (n) {
              var i,
                t = this._getItem(n);
              t.toolbar &&
                ("button" === t.toolbar.options.type &&
                t.toolbar.options.isChild
                  ? ((i = t.toolbar.getParentGroup()),
                    t.toolbar.hide(),
                    i && i.refresh())
                  : t.toolbar.options.hidden || t.toolbar.hide());
              t.overflow &&
                ("button" === t.overflow.options.type &&
                t.overflow.options.isChild
                  ? ((i = t.overflow.getParentGroup()),
                    t.overflow.hide(),
                    i && i.refresh())
                  : t.overflow.options.hidden || t.overflow.hide());
              this.resize(!0);
            },
            show: function (n) {
              var t = this._getItem(n);
              t.toolbar &&
                ("button" === t.toolbar.options.type &&
                t.toolbar.options.isChild
                  ? (t.toolbar.show(), t.toolbar.getParentGroup().refresh())
                  : t.toolbar.options.hidden && t.toolbar.show());
              t.overflow &&
                ("button" === t.overflow.options.type &&
                t.overflow.options.isChild
                  ? (t.toolbar.show(), t.overflow.getParentGroup().refresh())
                  : t.overflow.options.hidden && t.overflow.show());
              this.resize(!0);
            },
            enable: function (n, i) {
              var r = this._getItem(n);
              t === i && (i = !0);
              r.toolbar && r.toolbar.enable(i);
              r.overflow && r.overflow.enable(i);
            },
            getSelectedFromGroup: function (n) {
              return this.element
                .find("." + ii + "[data-group='" + n + "']")
                .filter("." + k);
            },
            toggle: function (i, r) {
              var f = n(i),
                u = f.data("button");
              u.options.togglable && (r === t && (r = !0), u.toggle(r, !0));
            },
            _renderOverflow: function () {
              var t = this,
                f = d.overflowContainer,
                s = t._isRtl,
                c = s ? "left" : "right";
              t.overflowAnchor = n(d.overflowAnchor).addClass(o);
              t.element.append(t.overflowAnchor);
              t.isMobile
                ? (t.overflowAnchor.append(
                    '<span class="km-icon km-more"></span>'
                  ),
                  (f = wt(f)))
                : t.overflowAnchor.append(
                    '<span class="k-icon k-i-more-vertical"></span>'
                  );
              t.popup = new i.ui.Popup(f, {
                origin: "bottom " + c,
                position: "top " + c,
                anchor: t.overflowAnchor,
                isRtl: s,
                animation: t.animation,
                appendTo: t.isMobile
                  ? n(t.isMobile).children(".km-pane")
                  : null,
                copyAnchorStyles: !1,
                open: function (r) {
                  var u = i
                    .wrap(t.popup.element)
                    .addClass("k-overflow-wrapper");
                  t.isMobile
                    ? t.popup.container.css(
                        "max-height",
                        parseFloat(n(".km-content:visible").innerHeight()) -
                          15 +
                          "px"
                      )
                    : u.css(
                        "margin-left",
                        (s ? -1 : 1) * ((g(u) - u.width()) / 2 + 1)
                      );
                  t.trigger(yi) && r.preventDefault();
                },
                activate: function () {
                  this.element.find(":kendoFocusable").first().focus();
                },
                close: function (n) {
                  t.trigger(pi) && n.preventDefault();
                  this.element.focus();
                },
              });
              t.popup.element.on("keydown", "." + o, function (i) {
                var o,
                  e = n(i.target),
                  f = e.parent(),
                  s = f.is("." + u) || f.is("." + h);
                i.preventDefault();
                i.keyCode === r.ESC ||
                i.keyCode === r.TAB ||
                (i.altKey && i.keyCode === r.UP)
                  ? (t._toggleOverflow(), t.overflowAnchor.focus())
                  : i.keyCode === r.DOWN
                  ? ((o = !s || (s && e.is(":last-child")) ? f : e),
                    v(o, "next").focus())
                  : i.keyCode === r.UP
                  ? ((o = !s || (s && e.is(":first-child")) ? f : e),
                    v(o, "prev").focus())
                  : i.keyCode === r.SPACEBAR || i.keyCode === r.ENTER
                  ? (t.userEvents.trigger("tap", { target: n(i.target) }),
                    t.overflowAnchor.focus())
                  : i.keyCode === r.HOME
                  ? f.parent().find(":kendoFocusable").first().focus()
                  : i.keyCode === r.END &&
                    f.parent().find(":kendoFocusable").last().focus();
              });
              t.popup.container = t.isMobile
                ? t.popup.element.find("." + si)
                : t.popup.element;
              t.popup.container.attr(e, this.uid);
            },
            _toggleOverflowAnchor: function () {
              var n = !1,
                t = this._isRtl ? "padding-left" : "padding-right";
              n = this.options.mobile
                ? this.popup.element
                    .find("." + si)
                    .children(":not(." + s + ", ." + fi + ")").length > 0
                : this.popup.element.children(":not(." + s + ", ." + fi + ")")
                    .length > 0;
              n
                ? (this.overflowAnchor.css({
                    visibility: "visible",
                    width: "",
                  }),
                  this.wrapper.css(t, this.overflowAnchor.outerWidth(!0)))
                : (this.overflowAnchor.css({
                    visibility: "hidden",
                    width: "1px",
                  }),
                  this.wrapper.css(t, ""));
            },
            _buttonClick: function (i) {
              var c,
                f,
                r,
                h,
                e,
                s,
                v,
                u = this,
                y = i.target.closest("." + oi).length;
              return (
                i.preventDefault(),
                y
                  ? (u._toggle(i), t)
                  : ((f = n(i.target).closest("." + o, u.element)),
                    f.hasClass(l) ||
                      ((r = f.data("button")),
                      !r &&
                        u.popup &&
                        ((f = n(i.target).closest("." + it, u.popup.container)),
                        (r = f.parent("li").data("button"))),
                      r &&
                        r.options.enable &&
                        (r.options.togglable
                          ? ((e = b(r.toggleHandler) ? r.toggleHandler : null),
                            r.toggle(!r.options.selected, !0),
                            (s = {
                              target: f,
                              group: r.options.group,
                              checked: r.options.selected,
                              id: r.options.id,
                              item: r,
                            }),
                            e && e.call(u, s),
                            u.trigger(li, s))
                          : ((e = b(r.clickHandler) ? r.clickHandler : null),
                            (s = {
                              sender: u,
                              target: f,
                              id: r.options.id,
                              item: r,
                            }),
                            e && e.call(u, s),
                            u.trigger(a, s)),
                        r.options.url &&
                          (r.options.attributes &&
                            r.options.attributes.target &&
                            (v = r.options.attributes.target),
                          window.open(r.options.url, v || "_self")),
                        f.hasClass(it) && u.popup.close(),
                        (h = f.closest(".k-split-container")),
                        h[0] &&
                          ((c = h.data("kendoPopup")),
                          (c
                            ? c
                            : h.parents(".km-popup-wrapper").data("kendoPopup")
                          ).close()))),
                    t)
              );
            },
            _navigatable: function () {
              var t = this;
              t.element
                .attr("tabindex", 0)
                .on("focusin", function (t) {
                  var r = n(t.target),
                    i = n(this).find(":kendoFocusable:first");
                  r.is("." + ti) &&
                    0 !== i.length &&
                    (i.is("." + l) && (i = v(i, "next")),
                    i.length && i[0].focus());
                })
                .on("keydown", lt(t._keydown, t));
            },
            _keydown: function (i) {
              var s,
                v,
                y,
                c,
                b,
                k,
                p,
                w,
                d,
                f = n(i.target),
                o = i.keyCode,
                e = this.element.children(":not(.k-separator):visible"),
                a = this._isRtl ? -1 : 1;
              if (
                (o === r.TAB &&
                  ((s = f.parentsUntil(this.element).last()),
                  (v = !1),
                  (y = !1),
                  (c = !1),
                  e.not("." + l).length || (c = !0),
                  s.length || (s = f),
                  s.is("." + l) &&
                    !c &&
                    ((b = e.last()),
                    i.shiftKey && i.preventDefault(),
                    b.is(":kendoFocusable")
                      ? e.last().focus()
                      : e.last().find(":kendoFocusable").last().focus()),
                  i.shiftKey ||
                    e.index(s) !== e.length - 1 ||
                    (v = !s.is("." + u) || f.is(":last-child")),
                  (k =
                    e.index(s) === e.not(".k-overflow-anchor").first().index()),
                  i.shiftKey &&
                    k &&
                    (y = !s.is("." + u) || f.is(":first-child")),
                  v &&
                    this.overflowAnchor &&
                    "hidden" !== this.overflowAnchor.css("visibility") &&
                    !c &&
                    (i.preventDefault(), this.overflowAnchor.focus()),
                  (y || (c && i.shiftKey)) &&
                    (i.preventDefault(),
                    (p = this._getPrevFocusable(this.wrapper)),
                    p && p.focus()),
                  (this._preventNextFocus = !1)),
                i.altKey && o === r.DOWN)
              )
                return (
                  (w = n(document.activeElement).data("splitButton")),
                  (d = n(document.activeElement).is("." + l)),
                  w ? w.toggle() : d && this._toggleOverflow(),
                  t
                );
              if (
                (o === r.SPACEBAR || o === r.ENTER) &&
                !f.is("input, checkbox")
              )
                return (
                  o === r.SPACEBAR && i.preventDefault(),
                  f.is("." + h)
                    ? ((f = f.children().first()),
                      this.userEvents.trigger("tap", { target: f }))
                    : o === r.SPACEBAR &&
                      this.userEvents.trigger("tap", { target: f }),
                  t
                );
              if (o === r.HOME) {
                if (f.is(".k-dropdown") || f.is("input")) return;
                this.overflowAnchor ? e.eq(1).focus() : e.first().focus();
                i.preventDefault();
              } else if (o === r.END) {
                if (f.is(".k-dropdown") || f.is("input")) return;
                this.overflowAnchor &&
                "hidden" != n(this.overflowAnchor).css("visibility")
                  ? this.overflowAnchor.focus()
                  : e.last().focus();
                i.preventDefault();
              } else
                o !== r.RIGHT ||
                this._preventNextFocus ||
                f.is("input, select, .k-dropdown, .k-colorpicker") ||
                !this._getNextElement(i.target, 1 * a)
                  ? o !== r.LEFT ||
                    this._preventNextFocus ||
                    f.is("input, select, .k-dropdown, .k-colorpicker") ||
                    !this._getNextElement(i.target, -1 * a) ||
                    (this._getNextElement(i.target, -1 * a).focus(),
                    i.preventDefault())
                  : (this._getNextElement(i.target, 1 * a).focus(),
                    i.preventDefault());
            },
            _getNextElement: function (t, i) {
              var f = this.element.children(":not(.k-separator):visible"),
                e = f.index(f.index(t) === -1 ? t.parentElement : t),
                o = this.overflowAnchor ? 1 : 0,
                s = i,
                h = 1 === i ? f.length - 1 : o,
                c = 1 === i ? o : f.length - 1,
                r = f[e + i];
              if (
                ((this._preventNextFocus = !1),
                n(t).closest("." + u).length &&
                  !n(t).is(1 === i ? ":last-child" : ":first-child"))
              )
                return n(t)
                  .closest("." + u)
                  .children()[
                  n(t)
                    .closest("." + u)
                    .children()
                    .index(t) + i
                ];
              for (
                this.overflowAnchor &&
                  t === this.overflowAnchor[0] &&
                  i === -1 &&
                  (r = f[f.length - 1]),
                  e === h &&
                    (r =
                      !this.overflowAnchor ||
                      (this.overflowAnchor &&
                        "hidden" === n(this.overflowAnchor).css("visibility"))
                        ? f[c]
                        : this.overflowAnchor);
                !n(r).is(":kendoFocusable");

              ) {
                if (
                  ((r =
                    i === -1 && n(r).closest("." + u).length
                      ? n(r).children(":not(label, div)").last()
                      : n(r).children(":not(label, div)").first()),
                  !r.length && ((s += i), (r = f[e + s]), !r))
                )
                  return this.overflowAnchor;
                this._preventNextFocus = !n(r).closest("." + u).length;
              }
              return r;
            },
            _getPrevFocusable: function (i) {
              if (i.is("html")) return i;
              var u,
                r,
                f = i.prevAll();
              return (
                f.each(function () {
                  return (
                    (r = n(this)),
                    r.is(":kendoFocusable")
                      ? ((u = r), !1)
                      : r.find(":kendoFocusable").length > 0
                      ? ((u = r.find(":kendoFocusable").last()), !1)
                      : t
                  );
                }),
                u ? u : this._getPrevFocusable(i.parent())
              );
            },
            _toggle: function (t) {
              var i = n(t.target)
                .closest("." + h)
                .data("splitButton");
              t.preventDefault();
              i.options.enable && i.toggle();
            },
            _toggleOverflow: function () {
              this.popup.toggle();
            },
            _resize: function (n) {
              var t = n.width;
              this.options.resizable &&
                (this.popup.close(),
                this._shrink(t),
                this._stretch(t),
                this._markVisibles(),
                this._toggleOverflowAnchor());
            },
            _childrenWidth: function () {
              var t = 0;
              return (
                this.element
                  .children(":visible:not(." + c + ", ." + ui + ")")
                  .each(function () {
                    t += g(n(this), !0);
                  }),
                Math.ceil(t)
              );
            },
            _shrink: function (n) {
              var r, i, t;
              if (n < this._childrenWidth())
                for (
                  i = this.element.children(
                    ":visible:not([data-overflow='never'], ." + l + ")"
                  ),
                    t = i.length - 1;
                  t >= 0 && ((r = i.eq(t)), !(n > this._childrenWidth()));
                  t--
                )
                  this._hideItem(r);
            },
            _stretch: function (n) {
              var r, i, t;
              if (n > this._childrenWidth())
                for (
                  i = this.element.children(":hidden:not('." + c + "')"), t = 0;
                  t < i.length &&
                  ((r = i.eq(t)),
                  !(n < this._childrenWidth()) && this._showItem(r, n));
                  t++
                );
            },
            _hideItem: function (n) {
              n.hide();
              this.popup &&
                this.popup.container
                  .find(">li[data-uid='" + n.data("uid") + "']")
                  .removeClass(s);
            },
            _showItem: function (n, t) {
              return (
                !!(n.length && t > this._childrenWidth() + g(n, !0)) &&
                (n.show(),
                this.popup &&
                  this.popup.container
                    .find(">li[data-uid='" + n.data("uid") + "']")
                    .addClass(s),
                !0)
              );
            },
            _markVisibles: function () {
              var n = this.popup.container.children(),
                t = this.element.children(":not(.k-overflow-anchor)"),
                i = n.filter(":not(.k-overflow-hidden)"),
                r = t.filter(":visible");
              n.add(t).removeClass(hi + " " + ci);
              i.first().add(r.first()).addClass(hi);
              i.last().add(r.last()).addClass(ci);
            },
          });
          i.ui.plugin(ni);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mediaplayer.min",
      [
        "kendo.slider.min",
        "kendo.toolbar.min",
        "kendo.dropdownlist.min",
        "kendo.tooltip.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          var u = window.kendo,
            p = "end",
            w = "pause",
            b = "play",
            k = "ready",
            et = "timeChange",
            a = "volumeChange",
            o = "k-i-full-screen",
            s = "k-i-full-screen-exit",
            ot = "k-i-volume-off",
            st = "k-i-volume-down",
            ht = "k-i-volume-up",
            ct = "k-mediaplayer-quality",
            c = "k-i-play",
            d = "k-i-pause",
            g = "k-mediaplayer-titlebar",
            nt = "k-mediaplayer-toolbar",
            tt = "k-mediaplayer-seekbar",
            lt = "k-mediaplayer-volume",
            h = "k-mediaplayer-media",
            at = "k-mediaplayer-overlay",
            v = "k-mediaplayer-yt",
            r = ".",
            l = u.ui,
            e = ".kendoMediaPlayer",
            it = new Date(1970, 0, 1),
            rt = 60 * it.getTimezoneOffset(),
            y = u.ui.Widget,
            ut = n.isArray,
            vt = { shortTime: "mm:ss", longTime: "HH:mm:ss" },
            yt = u.template,
            i = n.proxy,
            ft = u.keys,
            f = {
              htmlPlayer: "<video class='" + h + "'> </video>",
              titleBar: yt(
                "<div class='" +
                  g +
                  "' role='heading'><span class='k-title'>Video Title</span></div>"
              ),
              toolBar:
                "<div class='k-mediaplayer-toolbar-wrap'><div class='" +
                nt +
                "'></div></div>",
              youtubePlayer: "<div class='" + v + "'> </div>",
              toolBarTime:
                "<span class='k-mediaplayer-currenttime'>00:00:00</span> / <span class='k-mediaplayer-duration'>00:00:00</span>",
              slider: "<input class='" + tt + "' value='0' title='seekbar' />",
              volumeSlider: "<input class='" + lt + "' title='volume'/>",
              qualityDropDown:
                "<input class='" + ct + "' title='video quality' />",
              toolTip: "#= kendo.toString(new Date(value), 'HH:mm:ss') #",
            },
            pt = y.extend({
              init: function (t, i) {
                this.wrapper = n(t);
                y.fn.init.call(this, t, i);
                this.wrapper.addClass("k-mediaplayer k-widget");
                i = this.options;
                this._currentIndex = 0;
                this._createTitlebar();
                this._createToolbar();
                this._createDropDown();
                this._createSlider();
                this._createVolumeSlider();
                this._timers = {};
                this._aria();
                this._navigatable();
                i.fullScreen && this.fullScreen(!0);
                i.media && this.media(this.options.media);
                u.notify(this);
              },
              events: [p, w, b, k, et, a],
              options: {
                name: "MediaPlayer",
                autoPlay: !1,
                autoRepeat: !1,
                volume: 100,
                fullScreen: !1,
                mute: !1,
                navigatable: !1,
                forwardSeek: !0,
                media: null,
                messages: {
                  pause: "Pause",
                  play: "Play",
                  mute: "Mute",
                  unmute: "Unmute",
                  quality: "Quality",
                  fullscreen: "Full Screen",
                },
              },
              _msToTime: function (n) {
                var t = new Date(it.getTime());
                return t.setSeconds(n), t;
              },
              _timeToSec: function (n) {
                var t = new Date(n).getTime();
                return t / 1e3;
              },
              _createTitlebar: function () {
                this._titleBar = this.wrapper.find(r + g);
                0 === this._titleBar.length &&
                  (this.wrapper.append(f.titleBar),
                  (this._titleBar = this.wrapper.find(r + g)));
              },
              _createSlider: function () {
                var n = this.wrapper.find(r + tt);
                this._slider ||
                  ((this._sliderDragChangeHandler = i(
                    this._sliderDragChange,
                    this
                  )),
                  (this._sliderDraggingHandler = i(this._sliderDragging, this)),
                  (n = this.wrapper.find(r + tt)),
                  (this._slider = new l.Slider(n[0], {
                    smallStep: 1e3,
                    tickPlacement: "none",
                    showButtons: !1,
                    change: this._sliderDragChangeHandler,
                    slide: this._sliderDraggingHandler,
                    tooltip: { template: f.toolTip },
                    dragHandleTitle: "",
                  })));
              },
              _createVolumeSlider: function () {
                var n = this.wrapper.find(r + lt);
                this._volumeSlider ||
                  ((this._volumeDraggingHandler = i(
                    this._volumeDragging,
                    this
                  )),
                  (this._volumeChangeHandler = i(this._volumeChange, this)),
                  n.width(87),
                  (this._volumeSlider = new l.Slider(n[0], {
                    smallStep: 1,
                    min: 0,
                    max: 100,
                    value: this.options.volume,
                    slide: this._volumeDraggingHandler,
                    change: this._volumeChangeHandler,
                    tickPlacement: "none",
                    showButtons: !1,
                    tooltip: { enabled: !1 },
                    dragHandleTitle: "",
                  })));
              },
              _resetTime: function () {
                this._youTubeVideo
                  ? this._ytmedia.seekTo(0, !0)
                  : (this._media.currentTime = 0);
                this._mediaTimeUpdate();
                n.grep(this._toolBar.options.items, function (n) {
                  return !!n.template;
                }).template = f.toolBarTime;
              },
              _currentUrl: function () {
                var n = this.media();
                return ut(n.source)
                  ? n.source[this._currentIndex].url
                  : n.source;
              },
              _isYouTubeUrl: function () {
                return !!this._currentUrl().match("youtube.com/|youtu.be/");
              },
              _setPlayerUrl: function () {
                var n,
                  t = this._youTubeVideo;
                this.stop();
                this._youTubeVideo = this._isYouTubeUrl();
                t !== this._youTubeVideo &&
                  (this.wrapper.find(r + v).toggle(),
                  this.wrapper.find(r + h).toggle());
                n = this._media || this._ytmedia;
                this._initializePlayer();
                n && (this.mute(this.mute()), this.volume(this.volume()));
                this._youTubeVideo
                  ? this._ytmedia &&
                    (this._videoOverlay && this._videoOverlay.hide(),
                    this.options.autoPlay
                      ? (this._ytmedia.loadVideoById(this._getMediaId()),
                        this._playStateToggle(!0))
                      : (this._ytmedia.cueVideoById(this._getMediaId()),
                        this._playStateToggle(!0)))
                  : (this._videoOverlay.show(),
                    this.wrapper.find(r + h + " > source").remove(),
                    this.wrapper.find(r + h).attr("src", this._currentUrl()),
                    this.options.autoPlay && this.play());
              },
              _createToolbar: function () {
                var t = this.wrapper.find(r + nt);
                0 === t.length &&
                  ((this._toolbarClickHandler = i(this._toolbarClick, this)),
                  this.wrapper.append(f.toolBar),
                  (t = this.wrapper.find(r + nt)),
                  t.width(this.wrapper.find(r + h).width()),
                  (this._toolBar = new l.ToolBar(t, {
                    click: this._toolbarClickHandler,
                    resizable: !1,
                    items: [
                      {
                        type: "button",
                        attributes: { class: "k-play-button" },
                        icon: "play",
                      },
                      {
                        template: f.toolBarTime,
                        attributes: { class: "k-mediaplayer-currenttime-wrap" },
                      },
                      {
                        type: "separator",
                        attributes: { class: "k-toolbar-spacer" },
                      },
                      {
                        type: "button",
                        attributes: { class: "k-volume-button" },
                        icon: "volume-up",
                      },
                      {
                        template: f.volumeSlider,
                        attributes: { class: "k-mediaplayer-volume-wrap" },
                      },
                      {
                        template: f.qualityDropDown,
                        attributes: { class: "k-mediaplayer-quality-wrap" },
                      },
                      {
                        type: "button",
                        attributes: { class: "k-fullscreen-button" },
                        icon: "full-screen",
                      },
                    ],
                  })),
                  this._toolBar.wrapper.off("keydown"),
                  t.before(f.slider),
                  (this._volumeButton = t.find(".k-volume-button")),
                  (this._fullscreenButton = t.find(".k-fullscreen-button")),
                  this._volumeButton.attr(
                    "title",
                    this.options.mute
                      ? this.options.messages.unmute
                      : this.options.messages.mute
                  ),
                  this._volumeButton.attr(
                    "aria-label",
                    this.options.mute
                      ? this.options.messages.unmute
                      : this.options.messages.mute
                  ),
                  this._fullscreenButton.attr(
                    "title",
                    this.options.messages.fullscreen
                  ),
                  this._fullscreenButton.attr(
                    "aria-label",
                    this.options.messages.fullscreen
                  ),
                  t.width("auto"),
                  (this._currentTimeElement = t.find(
                    ".k-mediaplayer-currenttime"
                  )),
                  (this._durationElement = t.find(".k-mediaplayer-duration")),
                  (this._playButton = t.find(".k-play-button")),
                  (this._playButtonSpan = this._playButton.find(".k-i-play")),
                  this.options.autoPlay && this._playStateToggle(!0),
                  n([
                    this._volumeButton[0],
                    t.find(".k-mediaplayer-volume-wrap")[0],
                    t.find(".k-mediaplayer-quality-wrap")[0],
                    this._fullscreenButton[0],
                  ]).wrapAll("<div class='k-align-right' />"),
                  t.find(".k-button").addClass("k-bare"));
              },
              _createDropDown: function () {
                var u = this.wrapper.find(r + ct),
                  n = this.media();
                t === u.data("kendoDropDownList") &&
                  ((this._dropDownSelectHandler = i(
                    this._dropDownSelect,
                    this
                  )),
                  (this._dropDown = new l.DropDownList(u, {
                    dataTextField: "quality",
                    dataValueField: "url",
                    popup: {
                      position: "bottom",
                      origin: "top",
                      appendTo: this.wrapper,
                    },
                    animation: { open: { effects: "slideIn:up", duration: 1 } },
                    select: this._dropDownSelectHandler,
                  })),
                  n &&
                    ut(n.source) &&
                    (this._dropDown.setDataSource(n.source),
                    this._dropDown.select(0)),
                  this._dropDown.wrapper.addClass("k-button k-bare"),
                  this._dropDown.wrapper
                    .attr("title", this.options.messages.quality)
                    .hide(),
                  this._dropDown.wrapper
                    .find("span.k-i-arrow-60-down")
                    .removeClass("k-i-arrow-60-down")
                    .addClass("k-icon k-i-hd"),
                  this._dropDown.list.addClass("k-quality-list"));
              },
              _dropDownSelect: function (n) {
                this._currentIndex !== n.item.index() &&
                  ((this._currentIndex = n.item.index()), this._setPlayerUrl());
              },
              _toolbarClick: function (t) {
                var r,
                  i = n(t.target).children().first(),
                  u = i.hasClass(c);
                this.media() &&
                  ((i.hasClass(c) || i.hasClass(d)) &&
                    (u ? this.play() : this.pause()),
                  (i.hasClass(o) || i.hasClass(s)) &&
                    (this._isInFullScreen
                      ? (i.removeClass(s).addClass(o), this.fullScreen(!1))
                      : (i.removeClass(o).addClass(s), this.fullScreen(!0))),
                  (i.hasClass(ot) || i.hasClass(st) || i.hasClass(ht)) &&
                    ((r = this.mute()), this.mute(!r)));
              },
              _sliderDragging: function () {
                this.media() && (this._isDragging = !0);
              },
              _sliderDragChange: function (n) {
                var t = this,
                  i = n.sender,
                  r = 1e3 * rt;
                this.media() &&
                  ((t._sliderChangeFired = !0),
                  (t._isDragging = !1),
                  !this.options.forwardSeek &&
                  i.value() > this._seekBarLastPosition
                    ? setTimeout(function () {
                        i.value(t._seekBarLastPosition);
                      }, 1)
                    : this._youTubeVideo
                    ? t._ytmedia.seekTo(t._timeToSec(n.value - r))
                    : (t._media.currentTime = t._timeToSec(n.value - r)),
                  t.trigger(et),
                  (t._preventPlay = !0));
              },
              _changeVolumeButtonImage: function (n) {
                var t = this._volumeButton,
                  r = t.find("span"),
                  i = r.attr("class");
                i = i.substring(0, i.lastIndexOf(" "));
                0 === n
                  ? (r.attr("class", i + " " + ot),
                    t.attr("title", this.options.messages.unmute),
                    t.attr("aria-label", this.options.messages.unmute))
                  : n > 0 && n < 51
                  ? (r.attr("class", i + " " + st),
                    t.attr("title", this.options.messages.mute),
                    t.attr("aria-label", this.options.messages.mute))
                  : (r.attr("class", i + " " + ht),
                    t.attr("title", this.options.messages.mute),
                    t.attr("aria-label", this.options.messages.mute));
              },
              _volumeDragging: function (n) {
                this.media() &&
                  (this.volume(n.value),
                  this._changeVolumeButtonImage(n.value),
                  this.trigger(a));
              },
              _volumeChange: function (n) {
                this.media() &&
                  (this.volume(n.value),
                  this._changeVolumeButtonImage(n.value),
                  this.trigger(a));
              },
              _mediaTimeUpdate: function () {
                var t,
                  n = this._youTubeVideo
                    ? this._ytmedia.getCurrentTime()
                    : this._media.currentTime;
                return (
                  (n = n ? n : 0),
                  (t = this._msToTime(n)),
                  this._currentTimeElement.text(
                    u.toString(t, this._timeFormat)
                  ),
                  this._isDragging ||
                    ((this._seekBarLastPosition = 1e3 * (n + rt)),
                    this._slider.value(this._seekBarLastPosition)),
                  this.isPlaying()
                );
              },
              _playStateToggle: function (n) {
                t === n && (n = this._playButtonSpan.is(r + c));
                n
                  ? (this._playButtonSpan.removeClass(c).addClass(d),
                    this._playButton.attr("title", this.options.messages.pause),
                    this._playButton.attr(
                      "aria-label",
                      this.options.messages.pause
                    ))
                  : (this._playButtonSpan.removeClass(d).addClass(c),
                    this._playButton.attr("title", this.options.messages.play),
                    this._playButton.attr(
                      "aria-label",
                      this.options.messages.play
                    ));
              },
              _mediaEnded: function () {
                this._playStateToggle(!1);
                this._currentTimeElement.text(
                  u.toString(this._msToTime(0), this._timeFormat)
                );
                this._slider.value(1e3 * (0 + rt));
                this.trigger(p);
              },
              _mediaPlay: function () {
                this.trigger(b);
              },
              _mediaReady: function () {
                this.trigger(k);
              },
              _mediaDurationChange: function () {
                var n = this._msToTime(
                  this._youTubeVideo
                    ? this._ytmedia.getDuration()
                    : this._media.duration
                );
                this._timeFormat =
                  0 === n.getHours() ? vt.shortTime : vt.longTime;
                this._durationElement.text(u.toString(n, this._timeFormat));
                this._slider.setOptions({
                  min: it.getTime(),
                  max: n.getTime(),
                });
                this._isFirstRun ||
                  (this._resetTime(), (this._isFirstRun = !0));
              },
              _createYoutubePlayer: function () {
                this._mediaTimeUpdateHandler = i(this._mediaTimeUpdate, this);
                this._mediaDurationChangeHandler = i(
                  this._mediaDurationChange,
                  this
                );
                this.wrapper.prepend(f.youtubePlayer);
                this._ytPlayer = this.wrapper.find(r + v)[0];
                n(this._ytPlayer).css({
                  width: this.wrapper.width(),
                  height: this.wrapper.height(),
                });
                window.YT && window.YT.Player
                  ? this._configurePlayer()
                  : (window.onYouTubeIframeAPIReadyRegister ||
                      ((window.onYouTubeIframeAPIReadyRegister = []),
                      n.getScript("https://www.youtube.com/iframe_api"),
                      (window.onYouTubeIframeAPIReady = function () {
                        if (window.onYouTubeIframeAPIReadyRegister)
                          for (
                            var n = 0;
                            n < window.onYouTubeIframeAPIReadyRegister.length;
                            n++
                          )
                            window.onYouTubeIframeAPIReadyRegister[
                              n
                            ]._youtubeApiReady();
                        window.onYouTubeIframeAPIReadyRegister.length = 0;
                        window.onYouTubeIframeAPIReadyRegister = t;
                      })),
                    (window.onYouTubeIframeAPIReadyRegister[
                      window.onYouTubeIframeAPIReadyRegister.length
                    ] = this));
              },
              _poll: function (n, t, i, r) {
                var u = this;
                return (
                  null !== u._timers[n] && clearTimeout(u._timers[n]),
                  (u._timers[n] = setTimeout(
                    (function (r) {
                      return function f() {
                        t.call(r) && (u._timers[n] = setTimeout(f, i));
                      };
                    })(r),
                    i
                  ))
                );
              },
              _youtubeApiReady: function () {
                this._configurePlayer();
              },
              _configurePlayer: function () {
                var n,
                  t = {
                    autoplay: +this.options.autoPlay,
                    wmode: "transparent",
                    controls: 0,
                    rel: 0,
                    showinfo: 0,
                  };
                this._onYouTubePlayerReady = i(
                  this._onYouTubePlayerReady,
                  this
                );
                window.onYouTubePlayerReady = this._onYouTubePlayerReady;
                this._onPlayerStateChangeHandler = i(
                  this._onPlayerStateChange,
                  this
                );
                window.onPlayerStateChange = this._onPlayerStateChange;
                n = new window.YT.Player(this.wrapper.find(r + v)[0], {
                  height: this.wrapper.height(),
                  width: this.wrapper.width(),
                  videoId: this._getMediaId(),
                  playerVars: t,
                  events: {
                    onReady: this._onYouTubePlayerReady,
                    onStateChange: this._onPlayerStateChangeHandler,
                  },
                });
              },
              _onYouTubePlayerReady: function (n) {
                this._ytmedia = n.target;
                this._ytmedia.getIframe().style.width = "100%";
                this._ytmedia.getIframe().style.height = "100%";
                this._youTubeVideo = !0;
                this._mediaDurationChangeHandler();
                this.options.autoPlay
                  ? (this._playStateToggle(!0),
                    this._ytmedia.loadVideoById(this._getMediaId()))
                  : this._ytmedia.cueVideoById(this._getMediaId());
                this.options.mute && this.mute(!0);
                this.trigger(k);
              },
              _updateTitle: function () {
                this.titlebar().text(this.media().title || this.media().source);
              },
              _onPlayerStateChange: function (n) {
                0 === n.data
                  ? (this._slider.value(0),
                    (this._paused = !1),
                    this._playStateToggle(!0),
                    this.trigger(p),
                    this.options.autoRepeat && this.play())
                  : 1 === n.data
                  ? (this._mediaDurationChange(),
                    this._ytmedia.setVolume(this.volume()),
                    this._sliderChangeFired
                      ? (this._sliderChangeFired = !1)
                      : this._uiDisplay(!1),
                    this.trigger(b),
                    this._playStateToggle(!0),
                    this._poll("progress", this._mediaTimeUpdate, 500, this),
                    (this._paused = !1))
                  : 2 === n.data &&
                    (this._paused ||
                      (this._uiDisplay(!0),
                      this._playStateToggle(!1),
                      this.trigger(w),
                      (this._paused = !0)));
              },
              _getMediaId: function () {
                var n = this._currentUrl(),
                  t = n.match(
                    /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/
                  );
                return t && 11 === t[7].length && (n = t[7]), n;
              },
              _mouseClick: function () {
                this.isPaused() ? this.play() : this.pause();
              },
              _initializePlayer: function () {
                this._mouseMoveHandler ||
                  ((this._mouseMoveHandler = i(this._mouseMove, this)),
                  (this._mouseInHandler = i(this._mouseIn, this)),
                  (this._mouseOutHandler = i(this._mouseOut, this)),
                  n(this.wrapper)
                    .on("mouseenter" + e, this._mouseInHandler)
                    .on("mouseleave" + e, this._mouseOutHandler)
                    .on("mousemove" + e, this._mouseMoveHandler));
                !this._ytmedia && this._youTubeVideo
                  ? this._createYoutubePlayer()
                  : this._media ||
                    this._youTubeVideo ||
                    this._createHtmlPlayer();
              },
              _createHtmlPlayer: function () {
                this._videoOverlay ||
                  ((this._mouseClickHanlder = i(this._mouseClick, this)),
                  this.wrapper.append("<div class='" + at + "'></div>"),
                  (this._videoOverlay = this.wrapper
                    .find(".k-mediaplayer-overlay")
                    .on("click" + e, this._mouseClickHanlder)));
                this._mediaTimeUpdateHandler = i(this._mediaTimeUpdate, this);
                this._mediaDurationChangeHandler = i(
                  this._mediaDurationChange,
                  this
                );
                this._mediaEndedHandler = i(this._mediaEnded, this);
                this._mediaCanPlayHandler = i(this._mediaReady, this);
                this._mediaPlayHandler = i(this._mediaPlay, this);
                this._videoOverlay.after(f.htmlPlayer);
                this._media = this.wrapper.find(r + h)[0];
                n(this._media).css({ width: "100%", height: "100%" });
                this.options.mute && this.mute(!0);
                this._media.ontimeupdate = this._mediaTimeUpdateHandler;
                this._media.ondurationchange = this._mediaDurationChangeHandler;
                this._media.oncanplay = this._mediaCanPlayHandler;
                this._media.onplay = this._mediaPlayHandler;
                this._media.onended = this._mediaEndedHandler;
                this._media.loop = this.options.autoRepeat;
              },
              _mouseIn: function () {
                this._uiDisplay(!0);
              },
              _mouseOut: function () {
                this._poll("mouseIdle", this._mouseIdle, 3e3, this);
              },
              _mouseIdle: function () {
                return this._uiDisplay(!1), !1;
              },
              _mouseMove: function () {
                this._titleBar.is(":animated") ||
                  this._toolBar.element.is(":animated") ||
                  this._slider.wrapper.is(":animated") ||
                  this._uiDisplay(!0);
                this._poll("mouseIdle", this._mouseIdle, 3e3, this);
              },
              _uiDisplay: function (n) {
                var t = "slow",
                  i = this._titleBar.add(this._toolBar.element.parent());
                n
                  ? i.fadeIn(t)
                  : (i.fadeOut(t),
                    this.options.navigatable && this.wrapper.focus());
              },
              setOptions: function (n) {
                y.fn.setOptions.call(this, n);
              },
              destroy: function () {
                y.fn.destroy.call(this);
                this.isPaused() || this.pause();
                this.element.off(e);
                this.element.find(r + at).off(e);
                this._timers = null;
                this._mouseMoveHandler = null;
                this._mouseOutHandler = null;
                this._mouseInHandler = null;
                this._mouseClickHanlder = null;
                this._keyDownHandler = null;
                this._fullscreenHandler = null;
                this._toolbarClickHandler = null;
                this._sliderDragChangeHandler = null;
                this._sliderDraggingHandler = null;
                this._volumeDraggingHandler = null;
                this._volumeChangeHandler = null;
                this._youtubeApiReadyHandler = null;
                this._onYouTubePlayerReady = null;
                this._onPlayerStateChangeHandler = null;
                this._dropDownSelectHandler = null;
                this._youTubeVideo
                  ? this._ytmedia.destroy()
                  : ((this._media.ontimeupdate = this._mediaTimeUpdateHandler =
                      null),
                    (this._media.ondurationchange =
                      this._mediaDurationChangeHandler =
                        null),
                    (this._media.oncanplay = this._mediaCanPlayHandler = null),
                    (this._media.onplay = this._mediaPlayHandler = null),
                    (this._media.onended = this._mediaEndedHandler = null),
                    (this._media.src = ""),
                    this._media.remove());
                this._mouseMoveTimer = null;
                clearTimeout(this._mouseMoveTimer);
                u.destroy(this.element);
              },
              seek: function (n) {
                if (t === n)
                  return 1e3 * this._youTubeVideo
                    ? this._ytmedia.getCurrentTime()
                    : this._media
                    ? this._media.currentTime
                    : 0;
                var i = n / 1e3;
                return (
                  this._youTubeVideo
                    ? (i + 3 >= this._ytmedia.getDuration()) | 0
                      ? this._ytmedia.seekTo(
                          (this._ytmedia.getDuration() - 3) | 0,
                          !0
                        )
                      : this._ytmedia.seekTo(i, !0)
                    : (this._media.currentTime = i),
                  this
                );
              },
              play: function () {
                return (
                  this._youTubeVideo
                    ? this._ytmedia.playVideo()
                    : (u.support.mobileOS && this._uiDisplay(!1),
                      this._media.play()),
                  (this._paused = !1),
                  this._playStateToggle(!0),
                  this
                );
              },
              stop: function () {
                return (
                  this._youTubeVideo && this._ytmedia
                    ? this._ytmedia.stopVideo()
                    : this._media &&
                      !this._youTubeVideo &&
                      (u.support.mobileOS && this._uiDisplay(!0),
                      this._media.pause(),
                      (this._media.currentTime = 0)),
                  (this._paused = !0),
                  this._playStateToggle(!1),
                  this
                );
              },
              pause: function () {
                return (
                  this._youTubeVideo
                    ? this._ytmedia.pauseVideo()
                    : (u.support.mobileOS && this._uiDisplay(!0),
                      this._media.pause()),
                  (this._paused = !0),
                  this._playStateToggle(!1),
                  this.trigger(w),
                  this
                );
              },
              toolbar: function () {
                return this._toolBar;
              },
              dropdown: function () {
                return this._dropDown;
              },
              titlebar: function () {
                return this._titleBar;
              },
              fullScreen: function (n) {
                if (t === n) return this._isInFullScreen || !1;
                var i = this.element.get(0);
                n
                  ? (this.element.addClass("k-mediaplayer-fullscreen"),
                    i.requestFullscreen
                      ? i.requestFullscreen()
                      : i.webkitRequestFullscreen
                      ? i.webkitRequestFullscreen()
                      : i.mozRequestFullScreen
                      ? i.mozRequestFullScreen()
                      : i.msRequestFullscreen && i.msRequestFullscreen(),
                    (this._isInFullScreen = !0))
                  : (document.cancelFullscreen
                      ? document.cancelFullscreen()
                      : document.webkitCancelFullScreen
                      ? document.webkitCancelFullScreen()
                      : document.mozCancelFullScreen
                      ? document.mozCancelFullScreen()
                      : document.msCancelFullscreen
                      ? document.msCancelFullscreen()
                      : document.exitFullscreen
                      ? document.exitFullscreen()
                      : document.msExitFullscreen &&
                        document.msExitFullscreen(),
                    this.element.removeClass("k-mediaplayer-fullscreen"),
                    (this._isInFullScreen = !1));
                this._slider.resize();
              },
              volume: function (n) {
                return t === n
                  ? t !== this._volume
                    ? this._volume
                    : (this._volume = this.options.volume)
                  : ((this._volume = n),
                    this.mute(n <= 0),
                    this._youTubeVideo
                      ? this._ytmedia.setVolume(this._volume)
                      : (this._media.volume = this._volume / 100),
                    this._volumeSlider.value(n),
                    t);
              },
              mute: function (n) {
                var i = this._youTubeVideo
                  ? this._ytmedia && this._ytmedia.isMuted()
                  : this._media && this._media.muted;
                return t === n || n === i
                  ? i
                  : (this._youTubeVideo
                      ? n
                        ? this._ytmedia.mute()
                        : this._ytmedia.unMute()
                      : (this._media.muted = n),
                    this._volumeSlider.value(
                      n
                        ? 0
                        : (this._media && 100 * this._media.volume) ||
                            (this._ytmedia && this._ytmedia.getVolume())
                    ),
                    this.trigger(a),
                    this._changeVolumeButtonImage(this._volumeSlider.value()),
                    t);
              },
              isEnded: function () {
                return this._youTubeVideo
                  ? 0 === this._ytmedia.getPlayerState()
                  : this._media.ended;
              },
              media: function (n) {
                var i = this.dropdown();
                return t === n
                  ? t !== this._mediaData
                    ? this._mediaData
                    : (this._mediaData = this.options.media)
                  : (ut(n.source)
                      ? (i.setDataSource(n.source), i.wrapper.show())
                      : i.wrapper.hide(),
                    (this._mediaData = n),
                    this._updateTitle(),
                    this._setPlayerUrl(),
                    t);
              },
              isPaused: function () {
                return this._paused;
              },
              isPlaying: function () {
                return !this.isEnded() && !this._paused;
              },
              _aria: function () {
                this.wrapper.attr("role", "region");
              },
              _navigatable: function () {
                this._fullscreenHandler = i(this._fullscreen, this);
                n(document).on(
                  "webkitfullscreenchange mozfullscreenchange fullscreenchange" +
                    e,
                  this._fullscreenHandler
                );
                this.options.navigatable &&
                  (this.wrapper.attr("tabIndex", 0),
                  (this._keyDownHandler = i(this._keyDown, this)),
                  this.wrapper.on("keydown" + e, this._keyDownHandler));
              },
              _fullscreen: function () {
                var n =
                  document.fullScreen ||
                  document.mozFullScreen ||
                  document.webkitIsFullScreen;
                this._uiDisplay(!0);
                this._slider.resize();
                n ||
                  (this.wrapper
                    .find('span[class*="k-i-fullscreen"]')
                    .removeClass(s)
                    .addClass(o),
                  this.fullScreen(!1));
              },
              _keyDown: function (n) {
                var t, i;
                n.preventDefault();
                t = this.wrapper.find('span[class*="k-i-fullscreen"]');
                n.keyCode === ft.SPACEBAR
                  ? this.isPlaying()
                    ? this.pause()
                    : this.play()
                  : n.keyCode !== ft.ENTER || this._isInFullScreen
                  ? 77 === n.keyCode
                    ? ((i = this.mute()), this.mute(!i))
                    : n.keyCode === ft.ESC &&
                      this._isInFullScreen &&
                      (t.removeClass(s).addClass(o), this.fullScreen(!1))
                  : (t.removeClass(o).addClass(s), this.fullScreen(!0));
              },
              _error: function () {},
              _progress: function () {},
            });
          l.plugin(pt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.pivotgrid.min", ["kendo.dom.min", "kendo.data.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function at(n) {
            var i = "string" == typeof n ? [{ name: n }] : n,
              r = "[object Array]" === l.call(i) ? i : i !== t ? [i] : [];
            return sr(r, function (n) {
              return "string" == typeof n
                ? { name: n }
                : { name: n.name, type: n.type };
            });
          }
          function e(n) {
            var i = "string" == typeof n ? [{ name: [n], expand: !1 }] : n,
              r = "[object Array]" === l.call(i) ? i : i !== t ? [i] : [];
            return sr(r, function (n) {
              return "string" == typeof n
                ? { name: [n], expand: !1 }
                : {
                    name:
                      "[object Array]" === l.call(n.name)
                        ? n.name.slice()
                        : [n.name],
                    expand: n.expand,
                  };
            });
          }
          function ri(n) {
            return n.indexOf(" ") !== -1 && (n = '["' + n + '"]'), n;
          }
          function vt(n, t, r, u) {
            var o, f, s, e;
            if (
              (r || (r = t), u || (u = 0), (e = r.members[u]), e && !e.measure)
            ) {
              if (
                ((s = e.children),
                (f = s.length),
                r === t
                  ? (n[i.stringify([e.name])] = !!f)
                  : f && (n[i.stringify(p(r, u))] = !0),
                f)
              )
                for (o = 0; o < f; o++) vt(n, t, s[o], u);
              vt(n, t, r, u + 1);
            }
          }
          function br(t) {
            var i,
              r,
              u = {};
            t.length && vt(u, t[0]);
            i = [];
            for (r in u) i.push({ name: n.parseJSON(r), expand: u[r] });
            return i;
          }
          function kr(n, t) {
            var r,
              i,
              f,
              u,
              o = t.tuples || [],
              e = o[0];
            if (e && n.length < e.members.length)
              for (r = e.members, i = 0; i < r.length; i++)
                if (!r[i].measure) {
                  for (f = !1, u = 0; u < n.length; u++)
                    if (0 === c(n[u]).indexOf(r[i].hierarchy)) {
                      f = !0;
                      break;
                    }
                  f || n.push({ name: [r[i].name], expand: !1 });
                }
          }
          function dr(n) {
            for (var r = [], i = n.members, t = 0; t < i.length; t++)
              i[t].measure ||
                r.push({ name: [i[t].name], expand: i[t].children.length > 0 });
            return r;
          }
          function gr(n, t, i) {
            var u, r;
            return (
              (n = n || {}),
              kr(t, n),
              i.length > 1 && t.push({ name: w, measure: !0, children: e(i) }),
              (u = { members: t }),
              n.tuples && ((r = k(n.tuples, u)), r.tuple && (t = dr(r.tuple))),
              t
            );
          }
          function nu(n) {
            var t = i.getter(n.field, !0);
            return function (i, r) {
              return n.aggregate(t(i.dataItem), r, i);
            };
          }
          function u(n) {
            return "number" == typeof n && !isNaN(n);
          }
          function ft(n) {
            return n && n.getTime;
          }
          function et(n) {
            return (
              (n[n.length] = { value: "", fmtValue: "", ordinal: n.length }), n
            );
          }
          function ui(n, t, i) {
            if (n.tuples.length < o(t.tuples, i)) return t;
          }
          function tu(n, t, i, r, u) {
            for (
              var f, s, h = n.length, l = o(t, r), c = r.length || 1, e = 0;
              e < i;
              e++
            )
              for (f = 0; f < h; f++)
                (s = fi(n[f], t) * c),
                  (s += f % c),
                  (u[e * h + f].ordinal = e * l + s);
          }
          function iu(n, t, i, r, u) {
            for (var e, o, h = n.length, s = r.length || 1, f = 0; f < h; f++)
              for (o = fi(n[f], t), o *= s, o += f % s, e = 0; e < i; e++)
                u[f * i + e].ordinal = o * i + e;
          }
          function fi(n, t) {
            return k(t, n).index;
          }
          function o(n, t) {
            var r, i, u;
            if (!n.length) return 0;
            for (r = n.slice(), i = r.shift(), u = 1; i; )
              i.members
                ? [].push.apply(r, i.members)
                : i.children &&
                  (i.measure || (u += i.children.length),
                  [].push.apply(r, i.children)),
                (i = r.shift());
            return t.length && (u *= t.length), u;
          }
          function ot(n) {
            return n || (n = { tuples: [] }), n.tuples || (n.tuples = []), n;
          }
          function ei(n, t, i) {
            var e, u, r, f;
            if (!n) return 0;
            for (
              e = Math.max(i.length, 1),
                u = n.members.slice(0, t),
                r = u.shift(),
                f = e;
              r;

            )
              r.name === w
                ? (f += e - 1)
                : r.children
                ? [].push.apply(u, r.children)
                : (f++, [].push.apply(u, r.members)),
                (r = u.shift());
            return f;
          }
          function oi(n, t, i) {
            var u, f, e, o, r, s;
            if (!t[0])
              return { parsedRoot: null, tuples: n, memberIndex: 0, index: 0 };
            if (((u = k(n, t[0])), !u.tuple))
              return { parsedRoot: null, tuples: t, memberIndex: 0, index: 0 };
            if (
              ((f = u.tuple.members),
              (e = t[0].members),
              (o = -1),
              f.length !== e.length)
            )
              return { parsedRoot: null, tuples: t, memberIndex: 0, index: 0 };
            for (r = 0, s = f.length; r < s; r++)
              !f[r].measure &&
                e[r].children[0] &&
                (o == -1 && e[r].children.length && (o = r),
                (f[r].children = e[r].children));
            return (
              (i = Math.max(i.length, 1)),
              {
                parsedRoot: u.tuple,
                index: u.index * i,
                memberIndex: o,
                tuples: n,
              }
            );
          }
          function ru(n, t) {
            var i,
              u,
              r = !0;
            for (n = n.members, t = t.members, i = 0, u = n.length; i < u; i++)
              n[i].measure || t[i].measure || (r = r && c(n[i]) === c(t[i]));
            return r;
          }
          function k(n, t) {
            for (var i, f, e, h, o, r = 0, u = 0, s = n.length; u < s; u++) {
              if (((i = n[u]), ru(i, t))) return { tuple: i, index: r };
              for (r++, e = 0, h = i.members.length; e < h; e++)
                if (
                  ((o = i.members[e]),
                  !o.measure &&
                    ((f = k(o.children, t)), (r += f.index), f.tuple))
                )
                  return { tuple: f.tuple, index: r };
            }
            return { index: r };
          }
          function uu(n, t) {
            for (var r, u = "", i = 0, f = n.length; i < f; i++)
              (r = n[i]), (u += r.name), t[u] || (t[u] = r);
          }
          function fu(n, t) {
            for (
              var i, r, s = n.members, u = "", e = "", f = 0, o = s.length;
              f < o;
              f++
            ) {
              if (((i = s[f]), r)) {
                if (t[u + i.name]) {
                  u += i.name;
                  r = t[u];
                  continue;
                }
                return t[u + i.parentName]
                  ? t[u + i.parentName]
                  : t[e + i.parentName]
                  ? t[e + i.parentName]
                  : t[e];
              }
              if (
                ((u += i.name), (r = t[i.parentName]), !r && ((r = t[u]), !r))
              )
                return null;
              r && (e += r.name);
            }
            return r;
          }
          function eu(n, t) {
            var u, r, i, f;
            if (0 === t.length) return -1;
            for (u = t[0], r = n.members, i = 0, f = r.length; i < f; i++)
              if (r[i].name == u.name) return i;
          }
          function ou(i, r) {
            if (!(r < 0)) {
              var u = {
                name: w,
                measure: !0,
                children: [
                  n.extend(
                    { members: [], dataIndex: i.dataIndex },
                    i.members[r]
                  ),
                ],
              };
              i.members.splice(r, 1, u);
              i.dataIndex = t;
            }
          }
          function si(n, t) {
            var e, o, u, r, i, f;
            if (n.length < 1) return [];
            for (e = [], o = {}, u = eu(n[0], t), r = 0; r < n.length; r++)
              (i = n[r]),
                (i.dataIndex = r),
                ou(i, u),
                (f = fu(i, o)),
                f
                  ? f.children.push(
                      u < 0 || !f.measure ? i : i.members[u].children[0]
                    )
                  : e.push(i),
                uu(i.members, o);
            return e;
          }
          function su(n, t) {
            var f, e, o, u, i, r, h, c, s;
            if (!n || !n.length) return t;
            for (
              f = [],
                e = hi(n),
                o = e.length,
                u = Math.max(t.length / o, 1),
                i = 0;
              i < o;
              i++
            )
              for (h = u * i, c = u * e[i], r = 0; r < u; r++)
                (s = parseInt(c + r, 10)),
                  (f[parseInt(h + r, 10)] = t[s] || {
                    value: "",
                    fmtValue: "",
                    ordinal: s,
                  });
            return f;
          }
          function hu(n, t) {
            var f, e, r, h, i, u, o, s;
            if (!n || !n.length) return t;
            for (
              f = [],
                e = hi(n),
                r = e.length,
                h = Math.max(t.length / r, 1),
                u = 0;
              u < h;
              u++
            )
              for (o = r * u, i = 0; i < r; i++)
                (s = e[i] + o),
                  (f[o + i] = t[s] || { value: "", fmtValue: "", ordinal: s });
            return f;
          }
          function hi(n) {
            var f, i, r, s, e, u, o;
            for (n = n.slice(), f = [], i = n.shift(); i; ) {
              for (
                i.dataIndex !== t && f.push(i.dataIndex),
                  e = 0,
                  r = 0,
                  s = i.members.length;
                r < s;
                r++
              )
                (o = i.members[r]),
                  (u = o.children),
                  o.measure
                    ? [].splice.apply(n, [0, 0].concat(u))
                    : [].splice.apply(n, [e, 0].concat(u)),
                  (e += u.length);
              i = n.shift();
            }
            return f;
          }
          function ci(n) {
            var t = n.split(".");
            return t.length > 2 ? t[0] + "." + t[1] : n;
          }
          function li(n, t) {
            var u = n.length - 1,
              i = n[u],
              r = cu(t, i);
            return (
              r && r.dir
                ? (i =
                    "ORDER(" +
                    i +
                    ".Children," +
                    r.field +
                    ".CurrentMember.MEMBER_CAPTION," +
                    r.dir +
                    ")")
                : (i += ".Children"),
              (n[u] = i),
              n
            );
          }
          function cu(n, t) {
            for (var i = 0, r = n.length; i < r; i++)
              if (0 === t.indexOf(n[i].field)) return n[i];
            return null;
          }
          function ai(n) {
            var i,
              t = "CROSSJOIN({";
            return (
              n.length > 2
                ? ((i = n.pop()), (t += ai(n)))
                : ((t += n.shift()), (i = n.pop())),
              (t += "},{"),
              (t += i),
              t + "})"
            );
          }
          function vi(n, t) {
            var i = n.slice(0);
            return t.length > 1 && i.push("{" + st(t).join(",") + "}"), ai(i);
          }
          function st(n) {
            for (var i, r = 0, f = n.length, u = []; r < f; r++)
              (i = n[r]), u.push(i.name !== t ? i.name : i);
            return u;
          }
          function c(n) {
            return (
              (n = n.name || n),
              "[object Array]" === l.call(n) && (n = n[n.length - 1]),
              n
            );
          }
          function yi(n) {
            for (var r = n.length, i = [], t = 0; t < r; t++)
              i.push(n[t].name[0]);
            return i;
          }
          function pi(n, t) {
            var r,
              f,
              i,
              u = 0,
              e = n.length,
              o = t.length;
            for (t = t.slice(0); u < e; u++)
              for (r = n[u], i = 0; i < o; i++)
                if (((f = ci(t[i])), r.indexOf(f) !== -1)) {
                  t[i] = r;
                  break;
                }
            return {
              names: t,
              expandedIdx: i,
              uniquePath: t.slice(0, i + 1).join(""),
            };
          }
          function wi(n) {
            for (
              var t, r, s, i, h, e, u = [], c = [], f = [], o = 0, a = n.length;
              o < a;
              o++
            )
              if (
                ((t = n[o]),
                (i = t.name),
                (e = !1),
                "[object Array]" !== l.call(i) && (t.name = i = [i]),
                i.length > 1)
              )
                c.push(t);
              else {
                for (h = ci(i[0]), r = 0, s = f.length; r < s; r++)
                  if (0 === f[r].name[0].indexOf(h)) {
                    e = !0;
                    break;
                  }
                e || f.push(t);
                t.expand && u.push(t);
              }
            return (u = u.concat(c)), { root: f, expanded: u };
          }
          function bi(n, t, i) {
            var r,
              l,
              f,
              o,
              h,
              u,
              s,
              e,
              c = "";
            if (
              ((n = n || []),
              (r = wi(n)),
              (l = r.root),
              (f = yi(l)),
              (o = []),
              (r = r.expanded),
              (h = r.length),
              (u = 0),
              (e = []),
              f.length > 1 || t.length > 1)
            ) {
              for (o.push(vi(f, t)); u < h; u++)
                (s = li(r[u].name, i)), (e = pi(s, f).names), o.push(vi(e, t));
              c += o.join(",");
            } else {
              for (; u < h; u++) (s = li(r[u].name, i)), e.push(s[0]);
              c += f.concat(e).join(",");
            }
            return c;
          }
          function lu(n) {
            var t = "",
              u = n.value,
              f = n.field,
              r = n.operator;
            return (
              "in" == r
                ? ((t += "{"), (t += u), (t += "}"))
                : ((t += "neq" == r || "doesnotcontain" == r ? "-" : ""),
                  (t += "Filter("),
                  (t += f + ".MEMBERS"),
                  (t += i.format(gi[r], f, u)),
                  (t += ")")),
              t
            );
          }
          function au(n, t) {
            for (
              var i, u = "", f = n.filters, e = f.length, r = e - 1;
              r >= 0;
              r--
            )
              (i = "SELECT ("),
                (i += lu(f[r])),
                (i += ") ON 0"),
                r == e - 1
                  ? ((i += " FROM [" + t + "]"), (u = i))
                  : (u = i + " FROM ( " + u + " )");
            return u;
          }
          function ki(n, t, i) {
            var f,
              r,
              u = "";
            if (t) {
              u += "<" + n + ">";
              for (r in t)
                (f = t[r]),
                  i &&
                    (r = r
                      .replace(/([A-Z]+(?=$|[A-Z][a-z])|[A-Z]?[a-z]+)/g, "$1_")
                      .toUpperCase()
                      .replace(/_$/, "")),
                  (u += "<" + r + ">" + f + "</" + r + ">");
              u += "</" + n + ">";
            } else u += "<" + n + "/>";
            return u;
          }
          function d(n) {
            if (null == n) return [];
            var t = l.call(n);
            return "[object Array]" !== t ? [n] : n;
          }
          function di(n) {
            for (
              var f,
                r,
                t,
                e = { tuples: [] },
                o = d(i.getter("Tuples.Tuple", !0)(n)),
                s = i.getter("Caption['#text']"),
                h = i.getter("UName['#text']"),
                c = i.getter("LName['#text']"),
                l = i.getter("LNum['#text']"),
                a = i.getter("CHILDREN_CARDINALITY['#text']", !0),
                v = i.getter("['@Hierarchy']"),
                y = i.getter("PARENT_UNIQUE_NAME['#text']", !0),
                u = 0;
              u < o.length;
              u++
            ) {
              for (f = [], r = d(o[u].Member), t = 0; t < r.length; t++)
                f.push({
                  children: [],
                  caption: s(r[t]),
                  name: h(r[t]),
                  levelName: c(r[t]),
                  levelNum: l(r[t]),
                  hasChildren: parseInt(a(r[t]), 10) > 0,
                  parentName: y(r[t]),
                  hierarchy: v(r[t]),
                });
              e.tuples.push({ members: f });
            }
            return e;
          }
          var gi,
            nr,
            tr,
            yt,
            s,
            pt,
            wt,
            ir,
            ht,
            g,
            r,
            a,
            bt,
            p,
            kt,
            rr,
            ur,
            fr,
            dt,
            i = window.kendo,
            gt = i.ui,
            nt = i.Class,
            v = gt.Widget,
            tt = i.data.DataSource,
            er = i._outerWidth,
            or = i._outerHeight,
            l = {}.toString,
            h = function (n) {
              return n;
            },
            sr = n.map,
            f = n.extend,
            ni = i.isFunction,
            y = "change",
            hr = "error",
            w = "Measures",
            cr = "progress",
            ti = "stateReset",
            it = "auto",
            ct = "<div/>",
            rt = ".kendoPivotGrid",
            b = "__row_total__",
            lr = "dataBinding",
            ar = "dataBound",
            vr = "expandMember",
            yr = "collapseMember",
            lt = "k-i-collapse",
            ii = "k-i-expand",
            pr = "<span>#: data.member.caption || data.member.name #</span>",
            vu =
              '<span class="k-icon k-i-kpi-status-#=data.dataItem.value > 0 ? "open" : data.dataItem.value < 0 ? "deny" : "hold"#" title="#:data.dataItem.value#"></span>',
            yu =
              '<span class="k-icon k-i-kpi-trend-#=data.dataItem.value > 0 ? "increase" : data.dataItem.value < 0 ? "decrease" : "equal"#" title="#:data.dataItem.value#"></span>',
            pu =
              '#= data.dataItem ? kendo.htmlEncode(data.dataItem.fmtValue || data.dataItem.value) || "&nbsp;" : "&nbsp;" #',
            wu =
              '<table class="k-pivot-layout"><tr><td><div class="k-pivot-rowheaders"></div></td><td><div class="k-pivot-table k-state-default"></div></td></tr></table>',
            bu = "rows",
            ku = "columns",
            du = {
              sum: function (n, t) {
                var i = t.accumulator;
                return u(i) ? u(n) && (i += n) : (i = n), i;
              },
              count: function (n, t) {
                return (t.accumulator || 0) + 1;
              },
              average: {
                aggregate: function (n, i) {
                  var r = i.accumulator;
                  return (
                    i.count === t && (i.count = 0),
                    u(r) ? u(n) && (r += n) : (r = n),
                    u(n) && i.count++,
                    r
                  );
                },
                result: function (n) {
                  var t = n.accumulator;
                  return u(t) && (t /= n.count), t;
                },
              },
              max: function (n, t) {
                var i = t.accumulator;
                return (
                  u(i) || ft(i) || (i = n),
                  i < n && (u(n) || ft(n)) && (i = n),
                  i
                );
              },
              min: function (n, t) {
                var i = t.accumulator;
                return (
                  u(i) || ft(i) || (i = n),
                  i > n && (u(n) || ft(n)) && (i = n),
                  i
                );
              },
            },
            wr = nt.extend({
              init: function (n) {
                this.options = f({}, this.options, n);
                this.dimensions = this._normalizeDescriptors(
                  "field",
                  this.options.dimensions
                );
                this.measures = this._normalizeDescriptors(
                  "name",
                  this.options.measures
                );
              },
              _normalizeDescriptors: function (n, t) {
                var r, i, u, f;
                if (((t = t || {}), (r = {}), "[object Array]" === l.call(t))) {
                  for (u = 0, f = t.length; u < f; u++)
                    (i = t[u]),
                      "string" == typeof i
                        ? (r[i] = {})
                        : i[n] && (r[i[n]] = i);
                  t = r;
                }
                return t;
              },
              _rootTuples: function (n, i) {
                var r,
                  u,
                  o,
                  e,
                  h = i.length || 1,
                  a = this.dimensions || [],
                  f = 0,
                  c = n.length,
                  s = [],
                  l = [];
                if (c || i.length) {
                  for (f = 0; f < h; f++) {
                    for (r = { members: [] }, e = 0; e < c; e++)
                      (u = n[e]),
                        (o = u.split("&")),
                        (r.members[r.members.length] = {
                          children: [],
                          caption: (a[u] || {}).caption || "All",
                          name: u,
                          levelName: u,
                          levelNum: "0",
                          hasChildren: !0,
                          parentName: o.length > 1 ? o[0] : t,
                          hierarchy: u,
                        });
                    h > 1 &&
                      (r.members[r.members.length] = {
                        children: [],
                        caption: i[f].caption,
                        name: i[f].descriptor.name,
                        levelName: "MEASURES",
                        levelNum: "0",
                        hasChildren: !1,
                        parentName: t,
                        hierarchy: "MEASURES",
                      });
                    s[s.length] = r;
                  }
                  l.push(b);
                }
                return { keys: l, tuples: s };
              },
              _expandedTuples: function (n, i, r) {
                var o,
                  u,
                  b,
                  f,
                  c,
                  l,
                  e,
                  a,
                  v,
                  s,
                  h,
                  k = r.length || 1,
                  d = this.dimensions || [],
                  y = [],
                  w = [];
                for (b in n) {
                  for (
                    f = n[b],
                      e = this._findExpandedMember(i, f.uniquePath),
                      c = y[e.index] || [],
                      l = w[e.index] || [],
                      a = e.member.names,
                      o = 0;
                    o < k;
                    o++
                  ) {
                    for (u = { members: [] }, h = 0; h < a.length; h++)
                      h === e.member.expandedIdx
                        ? ((u.members[u.members.length] = {
                            children: [],
                            caption: f.value,
                            name: f.name,
                            hasChildren: !1,
                            levelNum: 1,
                            levelName: f.parentName + f.name,
                            parentName: f.parentName,
                            hierarchy: f.parentName + f.name,
                          }),
                          0 === o && l.push(p(u, h).join("")))
                        : ((s = a[h]),
                          (v = s.split("&")),
                          (u.members[u.members.length] = {
                            children: [],
                            caption: (d[s] || {}).caption || "All",
                            name: s,
                            levelName: s,
                            levelNum: "0",
                            hasChildren: !0,
                            parentName: v.length > 1 ? v[0] : t,
                            hierarchy: s,
                          }));
                    k > 1 &&
                      (u.members[u.members.length] = {
                        children: [],
                        caption: r[o].caption,
                        name: r[o].descriptor.name,
                        levelName: "MEASURES",
                        levelNum: "0",
                        hasChildren: !0,
                        parentName: t,
                        hierarchy: "MEASURES",
                      });
                    c[c.length] = u;
                  }
                  y[e.index] = c;
                  w[e.index] = l;
                }
                return { keys: w, tuples: y };
              },
              _findExpandedMember: function (n, t) {
                for (var i = 0; i < n.length; i++)
                  if (n[i].uniquePath === t) return { member: n[i], index: i };
              },
              _asTuples: function (n, t, i) {
                var r, u;
                return (
                  (i = i || []),
                  (r = this._rootTuples(t.root, i)),
                  (u = this._expandedTuples(n, t.expanded, i)),
                  {
                    keys: [].concat.apply(r.keys, u.keys),
                    tuples: [].concat.apply(r.tuples, u.tuples),
                  }
                );
              },
              _measuresInfo: function (n, t) {
                for (
                  var i,
                    r,
                    u = 0,
                    s = n && n.length,
                    f = [],
                    e = {},
                    o = {},
                    h = this.measures || {};
                  u < s;
                  u++
                )
                  (r = n[u].descriptor.name),
                    (i = h[r] || {}),
                    f.push(r),
                    i.result && (e[r] = i.result),
                    i.format && (o[r] = i.format);
                return { names: f, formats: o, resultFuncs: e, rowAxis: t };
              },
              _toDataArray: function (n, t, i, r) {
                var y,
                  u,
                  f,
                  e,
                  o,
                  s,
                  c,
                  l,
                  a,
                  h,
                  p = [],
                  w = 1,
                  v = [],
                  k = i.length || 1,
                  d = r.length || 1;
                for (
                  t.rowAxis ? ((v = t.names), (w = v.length)) : (h = t.names),
                    f = 0;
                  f < k;
                  f++
                )
                  for (c = n[i[f] || b], s = 0; s < w; s++)
                    for (t.rowAxis && (h = [v[s]]), e = 0; e < d; e++)
                      for (
                        a = r[e] || b,
                          l = c.items[a],
                          y = a === b ? c.aggregates : l ? l.aggregates : {},
                          o = 0;
                        o < h.length;
                        o++
                      )
                        (u = h[o]),
                          this._addData(
                            p,
                            y[u],
                            t.formats[u],
                            t.resultFuncs[u]
                          );
                return p;
              },
              _addData: function (n, t, r, u) {
                var f,
                  e = "";
                t &&
                  ((t = u ? u(t) : t.accumulator),
                  (e = r ? i.format(r, t) : t));
                f = n.length;
                n[f] = { ordinal: f, value: t || "", fmtValue: e };
              },
              _matchDescriptors: function (n, i, r) {
                for (var f, e, o, u, h = i.names, s = i.expandedIdx; s > 0; )
                  if (
                    ((f = h[--s].split("&")),
                    f.length > 1 &&
                      ((e = f[0]),
                      (o = f[1]),
                      (u = r[e](n)),
                      (u = u !== t && null !== u ? "" + u : u),
                      u != o))
                  )
                    return !1;
                return !0;
              },
              _calculateAggregate: function (n, t, i) {
                for (var u, f, e = {}, r = 0; r < n.length; r++)
                  (f = n[r].descriptor.name),
                    (u = i.aggregates[f] || {}),
                    (u.accumulator = n[r].aggregator(t, u)),
                    (e[f] = u);
                return e;
              },
              _processColumns: function (n, i, r, u, f, e, o, s) {
                for (
                  var h, l, v, b, a, c, y, p, k = f.dataItem, w = 0;
                  w < i.length;
                  w++
                )
                  (l = i[w]),
                    this._matchDescriptors(k, l, r) &&
                      ((p = l.names.slice(0, l.expandedIdx).join("")),
                      (c = l.names[l.expandedIdx]),
                      (h = r[c](k)),
                      (h = h !== t && null !== h ? "" + h : h),
                      (y = c),
                      (c = c + "&" + h),
                      (a = p + c),
                      (v = u[a] || {
                        index: o.columnIndex,
                        parentName: y,
                        name: c,
                        uniquePath: p + y,
                        value: h,
                      }),
                      (b = e.items[a] || { aggregates: {} }),
                      (e.items[a] = {
                        index: v.index,
                        aggregates: this._calculateAggregate(n, f, b),
                      }),
                      s && (u[a] || o.columnIndex++, (u[a] = v)));
              },
              _measureAggregators: function (n) {
                var u,
                  t,
                  r,
                  s,
                  i,
                  f,
                  e = n.measures || [],
                  h = this.measures || {},
                  o = [];
                if (e.length) {
                  for (r = 0, s = e.length; r < s; r++)
                    if (((u = e[r]), (t = h[u.name]), (i = null), t)) {
                      if (((f = t.aggregate), "string" == typeof f)) {
                        if (((i = du[f.toLowerCase()]), !i))
                          throw Error("There is no such aggregate function");
                        t.aggregate = i.aggregate || i;
                        t.result = i.result;
                      }
                      o.push({
                        descriptor: u,
                        caption: t.caption,
                        result: t.result,
                        aggregator: nu(t),
                      });
                    }
                } else
                  o.push({
                    descriptor: { name: "default" },
                    caption: "default",
                    aggregator: function () {
                      return 1;
                    },
                  });
                return o;
              },
              _buildGetters: function (n) {
                for (var t, r, f = {}, u = 0; u < n.length; u++)
                  (r = n[u]),
                    (t = r.split("&")),
                    t.length > 1
                      ? (f[t[0]] = i.getter(t[0], !0))
                      : (f[r] = i.getter(ri(r), !0));
                return f;
              },
              _parseDescriptors: function (n) {
                for (
                  var i = wi(n), r = yi(i.root), u = i.expanded, f = [], t = 0;
                  t < u.length;
                  t++
                )
                  f.push(pi(u[t].name, r));
                return { root: r, expanded: f };
              },
              _filter: function (n, t) {
                var f, r, u;
                if (!t) return n;
                for (r = 0, u = t.filters; r < u.length; r++)
                  (f = u[r]),
                    "in" === f.operator && (u[r] = this._normalizeFilter(f));
                return new i.data.Query(n).filter(t).data;
              },
              _normalizeFilter: function (n) {
                var t,
                  i = n.value.split(","),
                  r = [];
                if (!i.length) return i;
                for (t = 0; t < i.length; t++)
                  r.push({ field: n.field, operator: "eq", value: i[t] });
                return { logic: "or", filters: r };
              },
              process: function (n, i) {
                var d,
                  h,
                  r,
                  u,
                  o,
                  s,
                  a,
                  c,
                  g,
                  f,
                  nt,
                  et,
                  ot,
                  tt,
                  it,
                  rt,
                  v,
                  vt,
                  ut,
                  y,
                  l,
                  w,
                  ft,
                  st,
                  ht,
                  k,
                  ct,
                  lt,
                  at,
                  p;
                if (
                  ((n = n || []),
                  (i = i || {}),
                  (n = this._filter(n, i.filter)),
                  (d = i.measures || []),
                  (h = "rows" === i.measuresAxis),
                  (r = i.columns || []),
                  (u = i.rows || []),
                  !r.length &&
                    u.length &&
                    (!d.length || (d.length && h)) &&
                    ((r = u), (u = []), (h = !1)),
                  r.length || u.length || (h = !1),
                  !r.length && d.length && (r = e(i.measures)),
                  (r = this._parseDescriptors(r)),
                  (u = this._parseDescriptors(u)),
                  (o = {}),
                  (s = {}),
                  (a = {}),
                  (g = { columnIndex: 0 }),
                  (f = this._measureAggregators(i)),
                  (nt = this._buildGetters(r.root)),
                  (et = this._buildGetters(u.root)),
                  (ot = !1),
                  (tt = r.expanded),
                  (it = u.expanded),
                  (vt = 0 !== it.length),
                  (at = n.length),
                  (p = 0),
                  r.root.length || u.root.length)
                )
                  for (ot = !0, p = 0; p < at; p++)
                    for (
                      rt = n[p],
                        v = { dataItem: rt, index: p },
                        w = o[b] || { items: {}, aggregates: {} },
                        this._processColumns(f, tt, nt, s, v, w, g, !vt),
                        w.aggregates = this._calculateAggregate(f, v, w),
                        o[b] = w,
                        ut = 0;
                      ut < it.length;
                      ut++
                    )
                      (y = it[ut]),
                        this._matchDescriptors(rt, y, et)
                          ? ((st = y.names.slice(0, y.expandedIdx).join("")),
                            (l = y.names[y.expandedIdx]),
                            (ht = l),
                            (c = et[l](rt)),
                            (c = c !== t ? "" + c : c),
                            (l = l + "&" + c),
                            (ft = st + l),
                            (a[ft] = {
                              uniquePath: st + ht,
                              parentName: ht,
                              name: l,
                              value: c,
                            }),
                            (k = o[ft] || { items: {}, aggregates: {} }),
                            this._processColumns(f, tt, nt, s, v, k, g, !0),
                            (k.aggregates = this._calculateAggregate(f, v, k)),
                            (o[ft] = k))
                          : this._processColumns(
                              f,
                              tt,
                              nt,
                              s,
                              v,
                              { items: {}, aggregates: {} },
                              g,
                              !0
                            );
                return (
                  ot && at
                    ? (!(f.length > 1) ||
                        (i.columns && i.columns.length) ||
                        (r = { root: [], expanded: [] }),
                      (ct = this._asTuples(s, r, h ? [] : f)),
                      (lt = this._asTuples(a, u, h ? f : [])),
                      (s = ct.tuples),
                      (a = lt.tuples),
                      (o = this._toDataArray(
                        o,
                        this._measuresInfo(f, h),
                        lt.keys,
                        ct.keys
                      )))
                    : (o = s = a = []),
                  {
                    axes: { columns: { tuples: s }, rows: { tuples: a } },
                    data: o,
                  }
                );
              },
            }),
            gu = nt.extend({
              init: function (n, t) {
                this.transport = t;
                this.options = t.options || {};
                this.transport.discover ||
                  (ni(n.discover) && (this.discover = n.discover));
              },
              read: function (n) {
                return this.transport.read(n);
              },
              update: function (n) {
                return this.transport.update(n);
              },
              create: function (n) {
                return this.transport.create(n);
              },
              destroy: function (n) {
                return this.transport.destroy(n);
              },
              discover: function (n) {
                return this.transport.discover
                  ? this.transport.discover(n)
                  : (n.success({}), t);
              },
              catalog: function (i) {
                var r,
                  u = this.options || {};
                return i === t
                  ? (u.connection || {}).catalog
                  : ((r = u.connection || {}),
                    (r.catalog = i),
                    (this.options.connection = r),
                    n.extend(this.transport.options, { connection: r }),
                    t);
              },
              cube: function (n) {
                var i,
                  r = this.options || {};
                return n === t
                  ? (r.connection || {}).cube
                  : ((i = r.connection || {}),
                    (i.cube = n),
                    (this.options.connection = i),
                    f(!0, this.transport.options, { connection: i }),
                    t);
              },
            }),
            ut = tt.extend({
              init: function (t) {
                var i,
                  r = ((t || {}).schema || {}).cube,
                  o = "columns",
                  u = {
                    axes: h,
                    cubes: h,
                    catalogs: h,
                    measures: h,
                    dimensions: h,
                    hierarchies: h,
                    levels: h,
                    members: h,
                  };
                r &&
                  ((u = n.extend(u, this._cubeSchema(r))),
                  (this.cubeBuilder = new wr(r)));
                tt.fn.init.call(this, f(!0, {}, { schema: u }, t));
                this.transport = new gu(
                  this.options.transport || {},
                  this.transport
                );
                this._columns = e(this.options.columns);
                this._rows = e(this.options.rows);
                i = this.options.measures || [];
                "[object Object]" === l.call(i) &&
                  ((o = i.axis || "columns"), (i = i.values || []));
                this._measures = at(i);
                this._measuresAxis = o;
                this._skipNormalize = 0;
                this._axes = {};
              },
              _cubeSchema: function (t) {
                return {
                  dimensions: function () {
                    var n,
                      i = [],
                      r = t.dimensions;
                    for (n in r)
                      i.push({
                        name: n,
                        caption: r[n].caption || n,
                        uniqueName: n,
                        defaultHierarchy: n,
                        type: 1,
                      });
                    return (
                      t.measures &&
                        i.push({ name: w, caption: w, uniqueName: w, type: 2 }),
                      i
                    );
                  },
                  hierarchies: function () {
                    return [];
                  },
                  measures: function () {
                    var n,
                      i = [],
                      r = t.measures;
                    for (n in r)
                      i.push({
                        name: n,
                        caption: n,
                        uniqueName: n,
                        aggregator: n,
                      });
                    return i;
                  },
                  members: n.proxy(function (n, r) {
                    var h,
                      f,
                      u = r.levelUniqueName || r.memberUniqueName,
                      o = this.options.schema.data,
                      a = ni(o) ? o : i.getter(o, !0),
                      c =
                        (this.options.data && a(this.options.data)) ||
                        this._rawData ||
                        [],
                      e = [],
                      s = 0,
                      l = {};
                    if ((u && (u = u.split(".")[0]), !r.treeOp))
                      return (
                        e.push({
                          caption: t.dimensions[u].caption || u,
                          childrenCardinality: "1",
                          dimensionUniqueName: u,
                          hierarchyUniqueName: u,
                          levelUniqueName: u,
                          name: u,
                          uniqueName: u,
                        }),
                        e
                      );
                    for (h = i.getter(ri(u), !0); s < c.length; s++)
                      (f = h(c[s])),
                        (!f && 0 !== f) ||
                          l[f] ||
                          ((l[f] = !0),
                          e.push({
                            caption: f,
                            childrenCardinality: "0",
                            dimensionUniqueName: u,
                            hierarchyUniqueName: u,
                            levelUniqueName: u,
                            name: f,
                            uniqueName: f,
                          }));
                    return e;
                  }, this),
                };
              },
              options: {
                serverSorting: !0,
                serverPaging: !0,
                serverFiltering: !0,
                serverGrouping: !0,
                serverAggregates: !0,
              },
              catalog: function (n) {
                return n === t
                  ? this.transport.catalog()
                  : (this.transport.catalog(n),
                    this._mergeState({}),
                    (this._axes = {}),
                    this.data([]),
                    t);
              },
              cube: function (n) {
                return n === t
                  ? this.transport.cube()
                  : (this.transport.cube(n),
                    (this._axes = {}),
                    this._mergeState({}),
                    this.data([]),
                    t);
              },
              axes: function () {
                return this._axes;
              },
              columns: function (n) {
                return n === t
                  ? this._columns
                  : ((this._skipNormalize += 1),
                    (this._clearAxesData = !0),
                    (this._columns = e(n)),
                    this.query({
                      columns: n,
                      rows: this.rowsAxisDescriptors(),
                      measures: this.measures(),
                      sort: this.sort(),
                      filter: this.filter(),
                    }),
                    t);
              },
              rows: function (n) {
                return n === t
                  ? this._rows
                  : ((this._skipNormalize += 1),
                    (this._clearAxesData = !0),
                    (this._rows = e(n)),
                    this.query({
                      columns: this.columnsAxisDescriptors(),
                      rows: n,
                      measures: this.measures(),
                      sort: this.sort(),
                      filter: this.filter(),
                    }),
                    t);
              },
              measures: function (n) {
                return n === t
                  ? this._measures
                  : ((this._skipNormalize += 1),
                    (this._clearAxesData = !0),
                    this.query({
                      columns: this.columnsAxisDescriptors(),
                      rows: this.rowsAxisDescriptors(),
                      measures: at(n),
                      sort: this.sort(),
                      filter: this.filter(),
                    }),
                    t);
              },
              measuresAxis: function () {
                return this._measuresAxis || "columns";
              },
              _expandPath: function (n, t) {
                var r,
                  o,
                  u,
                  f = "columns" === t ? "columns" : "rows",
                  s = "columns" === t ? "rows" : "columns",
                  i = e(n),
                  h = c(i[i.length - 1]);
                for (
                  this._lastExpanded = f,
                    i = gr(this.axes()[f], i, this.measures()),
                    r = 0;
                  r < i.length;
                  r++
                )
                  if (((o = c(i[r])), o === h)) {
                    if (i[r].expand) return;
                    i[r].expand = !0;
                  } else i[r].expand = !1;
                u = {};
                u[f] = i;
                u[s] = this._descriptorsForAxis(s);
                this._query(u);
              },
              _descriptorsForAxis: function (n) {
                var t = this.axes(),
                  i = this[n]() || [];
                return (
                  t &&
                    t[n] &&
                    t[n].tuples &&
                    t[n].tuples[0] &&
                    (i = br(t[n].tuples || [])),
                  i
                );
              },
              columnsAxisDescriptors: function () {
                return this._descriptorsForAxis("columns");
              },
              rowsAxisDescriptors: function () {
                return this._descriptorsForAxis("rows");
              },
              _process: function (n, t) {
                this._view = n;
                t = t || {};
                t.items = t.items || this._view;
                this.trigger(y, t);
              },
              _query: function (n) {
                var t = this;
                return (
                  n || ((this._skipNormalize += 1), (this._clearAxesData = !0)),
                  t.query(
                    f(
                      {},
                      {
                        page: t.page(),
                        pageSize: t.pageSize(),
                        sort: t.sort(),
                        filter: t.filter(),
                        group: t.group(),
                        aggregate: t.aggregate(),
                        columns: this.columnsAxisDescriptors(),
                        rows: this.rowsAxisDescriptors(),
                        measures: this.measures(),
                      },
                      n
                    )
                  )
                );
              },
              query: function (t) {
                var i = this._mergeState(t);
                return this._data.length && this.cubeBuilder
                  ? (this._params(i),
                    this._updateLocalData(this._pristineData),
                    n.Deferred().resolve().promise())
                  : this.read(i);
              },
              _mergeState: function (n) {
                return (
                  (n = tt.fn._mergeState.call(this, n)),
                  n !== t &&
                    ((this._measures = at(n.measures)),
                    n.columns
                      ? (n.columns = e(n.columns))
                      : n.columns || (this._columns = []),
                    n.rows
                      ? (n.rows = e(n.rows))
                      : n.rows || (this._rows = [])),
                  n
                );
              },
              filter: function (n) {
                return n === t
                  ? this._filter
                  : ((this._skipNormalize += 1),
                    (this._clearAxesData = !0),
                    this._query({ filter: n, page: 1 }),
                    t);
              },
              expandColumn: function (n) {
                this._expandPath(n, "columns");
              },
              expandRow: function (n) {
                this._expandPath(n, "rows");
              },
              success: function (n) {
                var t;
                this.cubeBuilder && (t = (this.reader.data(n) || []).slice(0));
                tt.fn.success.call(this, n);
                t && (this._pristineData = t);
              },
              _processResult: function (n, t) {
                var s, a, v, u, i, r, h, f, e, c, l;
                return (
                  this.cubeBuilder &&
                    ((s = this.cubeBuilder.process(n, this._requestData)),
                    (n = s.data),
                    (t = s.axes)),
                  (f = this.columns()),
                  (e = this.rows()),
                  (c = t.columns && t.columns.tuples),
                  f.length ||
                    !e.length ||
                    !c ||
                    (!this._rowMeasures().length && this.measures().length) ||
                    (t = { columns: {}, rows: t.columns }),
                  f.length ||
                    e.length ||
                    "rows" !== this.measuresAxis() ||
                    !c ||
                    (t = { columns: {}, rows: t.columns }),
                  (this._axes = {
                    columns: ot(this._axes.columns),
                    rows: ot(this._axes.rows),
                  }),
                  (t = { columns: ot(t.columns), rows: ot(t.rows) }),
                  (a = this._normalizeTuples(
                    t.columns.tuples,
                    this._axes.columns.tuples,
                    f,
                    this._columnMeasures()
                  )),
                  (v = this._normalizeTuples(
                    t.rows.tuples,
                    this._axes.rows.tuples,
                    e,
                    this._rowMeasures()
                  )),
                  this._skipNormalize > 0 && (this._skipNormalize -= 1),
                  this.cubeBuilder ||
                    (n = this._normalizeData({
                      columnsLength: t.columns.tuples.length,
                      rowsLength: t.rows.tuples.length,
                      columnIndexes: a,
                      rowIndexes: v,
                      data: n,
                    })),
                  "rows" == this._lastExpanded
                    ? ((u = t.columns.tuples),
                      (r = this._columnMeasures()),
                      (i = ui(t.columns, this._axes.columns, r)),
                      i &&
                        ((h = "columns"),
                        (t.columns = i),
                        tu(u, i.tuples, t.rows.tuples.length, r, n),
                        this.cubeBuilder ||
                          (n = this._normalizeData({
                            columnsLength: o(t.columns.tuples, r),
                            rowsLength: t.rows.tuples.length,
                            data: n,
                          }))))
                    : "columns" == this._lastExpanded &&
                      ((u = t.rows.tuples),
                      (r = this._rowMeasures()),
                      (i = ui(t.rows, this._axes.rows, r)),
                      i &&
                        ((h = "rows"),
                        (t.rows = i),
                        iu(u, i.tuples, t.columns.tuples.length, r, n),
                        this.cubeBuilder ||
                          (n = this._normalizeData({
                            columnsLength: o(t.rows.tuples, r),
                            rowsLength: t.columns.tuples.length,
                            data: n,
                          })))),
                  (this._lastExpanded = null),
                  (l = this._mergeAxes(t, n, h)),
                  (this._axes = l.axes),
                  l.data
                );
              },
              _readData: function (n) {
                var i = this.reader.axes(n),
                  t = this.reader.data(n);
                return (
                  this.cubeBuilder && (this._rawData = t),
                  this._processResult(t, i)
                );
              },
              _createTuple: function (n, t, i) {
                var o,
                  u,
                  f,
                  e,
                  s,
                  h,
                  c,
                  r,
                  v = n.members,
                  y = v.length,
                  l = { members: [] },
                  a = 0;
                for (t && (y -= 1); a < y; a++)
                  (r = v[a]),
                    (u = +r.levelNum),
                    (f = r.name),
                    (e = r.parentName),
                    (c = r.caption || f),
                    (s = r.hasChildren),
                    (h = r.hierarchy),
                    (o = r.levelName),
                    i &&
                      ((c = "All"),
                      0 === u ? (e = r.name) : (u -= 1),
                      (s = !0),
                      (f = h = o = e)),
                    l.members.push({
                      name: f,
                      children: [],
                      caption: c,
                      levelName: o,
                      levelNum: "" + u,
                      hasChildren: s,
                      hierarchy: h,
                      parentName: i ? "" : e,
                    });
                return t && l.members.push({ name: t.name, children: [] }), l;
              },
              _hasRoot: function (n, t, i) {
                var u, f, e, o, s, r, h;
                if (t.length) return k(t, n).tuple;
                for (u = n.members, o = !0, r = 0, h = u.length; r < h; r++)
                  if (
                    ((f = u[r]),
                    (s = +f.levelNum || 0),
                    (e = i[r]),
                    !(0 === s || (e && f.name === c(e))))
                  ) {
                    o = !1;
                    break;
                  }
                return o;
              },
              _mergeAxes: function (n, t, i) {
                var c,
                  u,
                  e,
                  s,
                  y,
                  h = this._columnMeasures(),
                  f = this._rowMeasures(),
                  r = this.axes(),
                  p = o(r.rows.tuples, f),
                  a = n.rows.tuples.length,
                  v = o(r.columns.tuples, h),
                  l = n.columns.tuples.length;
                return (
                  "columns" == i
                    ? ((l = v), (u = n.columns.tuples))
                    : ((u = si(n.columns.tuples, h)), (t = hu(u, t))),
                  (e = oi(r.columns.tuples, u, h)),
                  "rows" == i
                    ? ((a = o(n.rows.tuples, f)), (u = n.rows.tuples))
                    : ((u = si(n.rows.tuples, f)), (t = su(u, t))),
                  (s = oi(r.rows.tuples, u, f)),
                  (r.columns.tuples = e.tuples),
                  (r.rows.tuples = s.tuples),
                  v !== o(r.columns.tuples, h)
                    ? ((c = e.index + ei(e.parsedRoot, e.memberIndex, h)),
                      (y = v + l),
                      (t = this._mergeColumnData(t, c, a, l, y)))
                    : p !== o(r.rows.tuples, f) &&
                      ((c = s.index + ei(s.parsedRoot, s.memberIndex, f)),
                      (t = this._mergeRowData(t, c, a, l))),
                  0 === r.columns.tuples.length &&
                    0 === r.rows.tuples.length &&
                    (t = []),
                  { axes: r, data: t }
                );
              },
              _mergeColumnData: function (n, t, i, r, u) {
                var f,
                  s,
                  e,
                  o = this.data().toJSON(),
                  h = 0,
                  c = Math.max(this._columnMeasures().length, 1);
                for (
                  i = Math.max(i, 1),
                    o.length > 0 && ((h = c), (u -= c)),
                    f = 0;
                  f < i;
                  f++
                )
                  (s = t + f * u),
                    (e = n.splice(0, r)),
                    e.splice(0, h),
                    [].splice.apply(o, [s, 0].concat(e));
                return o;
              },
              _mergeRowData: function (n, t, i, r) {
                var u,
                  e,
                  o,
                  f = this.data().toJSON(),
                  s = Math.max(this._rowMeasures().length, 1);
                for (
                  r = Math.max(r, 1),
                    f.length > 0 && ((i -= s), n.splice(0, r * s)),
                    u = 0;
                  u < i;
                  u++
                )
                  (o = n.splice(0, r)),
                    (e = t * r + u * r),
                    [].splice.apply(f, [e, 0].concat(o));
                return f;
              },
              _columnMeasures: function () {
                var n = this.measures(),
                  t = [];
                return (
                  "columns" === this.measuresAxis() &&
                    (0 === this.columns().length
                      ? (t = n)
                      : n.length > 1 && (t = n)),
                  t
                );
              },
              _rowMeasures: function () {
                var n = this.measures(),
                  t = [];
                return (
                  "rows" === this.measuresAxis() &&
                    (0 === this.rows().length
                      ? (t = n)
                      : n.length > 1 && (t = n)),
                  t
                );
              },
              _updateLocalData: function (n, t) {
                this.cubeBuilder &&
                  (t && (this._requestData = t), (n = this._processResult(n)));
                this._data = this._observe(n);
                this._ranges = [];
                this._addRange(this._data);
                this._total = this._data.length;
                this._pristineTotal = this._total;
                this._process(this._data);
              },
              data: function (n) {
                var i = this;
                return n === t
                  ? i._data
                  : ((this._pristineData = n.slice(0)),
                    this._updateLocalData(n, {
                      columns: this.columns(),
                      rows: this.rows(),
                      measures: this.measures(),
                    }),
                    t);
              },
              _normalizeTuples: function (n, t, i, r) {
                var f,
                  s,
                  h,
                  o = r.length || 1,
                  u = 0,
                  l = [],
                  c = {},
                  e = 0;
                if (n.length) {
                  if (this._skipNormalize <= 0 && !this._hasRoot(n[0], t, i)) {
                    for (this._skipNormalize = 0; u < o; u++)
                      l.push(this._createTuple(n[0], r[u], !0)), (c[u] = u);
                    n.splice.apply(n, [0, n.length].concat(l).concat(n));
                    u = o;
                  }
                  if (r.length)
                    for (h = f = n[u], s = f.members.length - 1; f; ) {
                      if (
                        (e >= o && (e = 0),
                        f.members[s].name !== r[e].name &&
                          (n.splice(u, 0, this._createTuple(f, r[e])),
                          (c[u] = u)),
                        (u += 1),
                        (e += 1),
                        (f = n[u]),
                        o > e && (!f || kt(h, s - 1) !== kt(f, s - 1)))
                      ) {
                        for (; e < o; e++)
                          n.splice(u, 0, this._createTuple(h, r[e])),
                            (c[u] = u),
                            (u += 1);
                        f = n[u];
                      }
                      h = f;
                    }
                  return c;
                }
              },
              _addMissingDataItems: function (n, i) {
                for (
                  ;
                  i.rowIndexes[parseInt(n.length / i.columnsLength, 10)] !== t;

                )
                  for (var r = 0; r < i.columnsLength; r++) n = et(n);
                for (; i.columnIndexes[n.length % i.columnsLength] !== t; )
                  n = et(n);
                return n;
              },
              _normalizeOrdinals: function (n, t, i) {
                var r = i.lastOrdinal;
                if (!t) return et(n);
                if (t.ordinal - r > 1)
                  for (r += 1; r < t.ordinal && n.length < i.length; )
                    (n = this._addMissingDataItems(et(n), i)), (r += 1);
                return (t.ordinal = n.length), (n[n.length] = t), n;
              },
              _normalizeData: function (n) {
                var t,
                  f,
                  r,
                  u = n.data,
                  e = 0,
                  i = [];
                if (
                  ((n.lastOrdinal = 0),
                  (n.columnIndexes = n.columnIndexes || {}),
                  (n.rowIndexes = n.rowIndexes || {}),
                  (n.columnsLength = n.columnsLength || 1),
                  (n.rowsLength = n.rowsLength || 1),
                  (n.length = n.columnsLength * n.rowsLength),
                  (r = n.length),
                  u.length === r)
                )
                  return u;
                for (; i.length < r; )
                  (t = u[e++]),
                    t && (f = t.ordinal),
                    (i = this._normalizeOrdinals(
                      this._addMissingDataItems(i, n),
                      t,
                      n
                    )),
                    (n.lastOrdinal = f);
                return i;
              },
              discover: function (t, i) {
                var r = this,
                  u = r.transport;
                return n
                  .Deferred(function (n) {
                    u.discover(
                      f(
                        {
                          success: function (t) {
                            t = r.reader.parse(t);
                            r._handleCustomErrors(t) ||
                              (i && (t = i(t)), n.resolve(t));
                          },
                          error: function (t, i, u) {
                            n.reject(t);
                            r.error(t, i, u);
                          },
                        },
                        t
                      )
                    );
                  })
                  .promise()
                  .done(function () {
                    r.trigger("schemaChange");
                  });
              },
              schemaMeasures: function () {
                var n = this;
                return n.discover(
                  {
                    data: {
                      command: "schemaMeasures",
                      restrictions: {
                        catalogName: n.transport.catalog(),
                        cubeName: n.transport.cube(),
                      },
                    },
                  },
                  function (t) {
                    return n.reader.measures(t);
                  }
                );
              },
              schemaKPIs: function () {
                var n = this;
                return n.discover(
                  {
                    data: {
                      command: "schemaKPIs",
                      restrictions: {
                        catalogName: n.transport.catalog(),
                        cubeName: n.transport.cube(),
                      },
                    },
                  },
                  function (t) {
                    return n.reader.kpis(t);
                  }
                );
              },
              schemaDimensions: function () {
                var n = this;
                return n.discover(
                  {
                    data: {
                      command: "schemaDimensions",
                      restrictions: {
                        catalogName: n.transport.catalog(),
                        cubeName: n.transport.cube(),
                      },
                    },
                  },
                  function (t) {
                    return n.reader.dimensions(t);
                  }
                );
              },
              schemaHierarchies: function (n) {
                var t = this;
                return t.discover(
                  {
                    data: {
                      command: "schemaHierarchies",
                      restrictions: {
                        catalogName: t.transport.catalog(),
                        cubeName: t.transport.cube(),
                        dimensionUniqueName: n,
                      },
                    },
                  },
                  function (n) {
                    return t.reader.hierarchies(n);
                  }
                );
              },
              schemaLevels: function (n) {
                var t = this;
                return t.discover(
                  {
                    data: {
                      command: "schemaLevels",
                      restrictions: {
                        catalogName: t.transport.catalog(),
                        cubeName: t.transport.cube(),
                        hierarchyUniqueName: n,
                      },
                    },
                  },
                  function (n) {
                    return t.reader.levels(n);
                  }
                );
              },
              schemaCubes: function () {
                var n = this;
                return n.discover(
                  {
                    data: {
                      command: "schemaCubes",
                      restrictions: { catalogName: n.transport.catalog() },
                    },
                  },
                  function (t) {
                    return n.reader.cubes(t);
                  }
                );
              },
              schemaCatalogs: function () {
                var n = this;
                return n.discover(
                  { data: { command: "schemaCatalogs" } },
                  function (t) {
                    return n.reader.catalogs(t);
                  }
                );
              },
              schemaMembers: function (n) {
                var t = this,
                  i = (function (n) {
                    return function (i) {
                      return t.reader.members(i, n);
                    };
                  })(n);
                return t.discover(
                  {
                    data: {
                      command: "schemaMembers",
                      restrictions: f(
                        {
                          catalogName: t.transport.catalog(),
                          cubeName: t.transport.cube(),
                        },
                        n
                      ),
                    },
                  },
                  i
                );
              },
              _params: function (n) {
                this._clearAxesData &&
                  ((this._axes = {}),
                  (this._data = this._observe([])),
                  (this._clearAxesData = !1),
                  this.trigger(ti));
                var t = tt.fn._params.call(this, n);
                return (
                  (t = f(
                    {
                      measures: this.measures(),
                      measuresAxis: this.measuresAxis(),
                      columns: this.columns(),
                      rows: this.rows(),
                    },
                    t
                  )),
                  this.cubeBuilder && (this._requestData = t),
                  t
                );
              },
            });
          ut.create = function (n) {
            n = n && n.push ? { data: n } : n;
            var t = n || {},
              r = t.data;
            if (
              ((t.data = r),
              !(t instanceof ut) && t instanceof i.data.DataSource)
            )
              throw Error(
                "Incorrect DataSource type. Only PivotDataSource instances are supported"
              );
            return t instanceof ut ? t : new ut(t);
          };
          gi = {
            contains: ', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}") > 0',
            doesnotcontain: ', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}")',
            startswith:
              ', Left({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',
            endswith:
              ', Right({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',
            eq: ', {0}.CurrentMember.MEMBER_CAPTION = "{1}"',
            neq: ', {0}.CurrentMember.MEMBER_CAPTION = "{1}"',
          };
          nr = {
            schemaCubes: "MDSCHEMA_CUBES",
            schemaCatalogs: "DBSCHEMA_CATALOGS",
            schemaMeasures: "MDSCHEMA_MEASURES",
            schemaDimensions: "MDSCHEMA_DIMENSIONS",
            schemaHierarchies: "MDSCHEMA_HIERARCHIES",
            schemaLevels: "MDSCHEMA_LEVELS",
            schemaMembers: "MDSCHEMA_MEMBERS",
            schemaKPIs: "MDSCHEMA_KPIS",
          };
          tr = {
            read: function (n) {
              var f,
                r,
                i,
                u,
                e,
                t =
                  '<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Execute xmlns="urn:schemas-microsoft-com:xml-analysis"><Command><Statement>';
              return (
                (t += "SELECT NON EMPTY {"),
                (f = n.columns || []),
                (r = n.rows || []),
                (i = n.measures || []),
                (u = "rows" === n.measuresAxis),
                (e = n.sort || []),
                !f.length &&
                  r.length &&
                  (!i.length || (i.length && u)) &&
                  ((f = r), (r = []), (u = !1)),
                f.length || r.length || (u = !1),
                f.length
                  ? (t += bi(f, u ? [] : i, e))
                  : i.length && !u && (t += st(i).join(",")),
                (t +=
                  "} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS"),
                (r.length || (u && i.length > 1)) &&
                  ((t += ", NON EMPTY {"),
                  (t += r.length ? bi(r, u ? i : [], e) : st(i).join(",")),
                  (t +=
                    "} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON ROWS")),
                n.filter
                  ? ((t += " FROM "),
                    (t += "("),
                    (t += au(n.filter, n.connection.cube)),
                    (t += ")"))
                  : (t += " FROM [" + n.connection.cube + "]"),
                1 == i.length &&
                  f.length &&
                  (t += " WHERE (" + st(i).join(",") + ")"),
                (t +=
                  "</Statement></Command><Properties><PropertyList><Catalog>" +
                  n.connection.catalog +
                  "</Catalog><Format>Multidimensional</Format></PropertyList></Properties></Execute></Body></Envelope>"),
                t.replace(/\&/g, "&amp;")
              );
            },
            discover: function (t) {
              t = t || {};
              var i =
                '<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Discover xmlns="urn:schemas-microsoft-com:xml-analysis">';
              return (
                (i +=
                  "<RequestType>" +
                  (nr[t.command] || t.command) +
                  "</RequestType>"),
                (i +=
                  "<Restrictions>" +
                  ki("RestrictionList", t.restrictions, !0) +
                  "</Restrictions>"),
                t.connection &&
                  t.connection.catalog &&
                  (t.properties = n.extend(
                    {},
                    { Catalog: t.connection.catalog },
                    t.properties
                  )),
                (i +=
                  "<Properties>" +
                  ki("PropertyList", t.properties) +
                  "</Properties>"),
                i + "</Discover></Body></Envelope>"
              );
            },
          };
          yt = i.data.RemoteTransport.extend({
            init: function (n) {
              var t = n;
              n = this.options = f(!0, {}, this.options, n);
              i.data.RemoteTransport.call(this, n);
              ni(t.discover)
                ? (this.discover = t.discover)
                : "string" == typeof t.discover
                ? (this.options.discover = { url: t.discover })
                : t.discover || (this.options.discover = this.options.read);
            },
            setup: function (t, r) {
              return (
                (t.data = t.data || {}),
                n.extend(!0, t.data, { connection: this.options.connection }),
                i.data.RemoteTransport.fn.setup.call(this, t, r)
              );
            },
            options: {
              read: { dataType: "text", contentType: "text/xml", type: "POST" },
              discover: {
                dataType: "text",
                contentType: "text/xml",
                type: "POST",
              },
              parameterMap: function (n, t) {
                return tr[t](n, t);
              },
            },
            discover: function (t) {
              return n.ajax(this.setup(t, "discover"));
            },
          });
          s = {
            cubes: {
              name: i.getter("CUBE_NAME['#text']", !0),
              caption: i.getter("CUBE_CAPTION['#text']", !0),
              description: i.getter("DESCRIPTION['#text']", !0),
              type: i.getter("CUBE_TYPE['#text']", !0),
            },
            catalogs: {
              name: i.getter("CATALOG_NAME['#text']", !0),
              description: i.getter("DESCRIPTION['#text']", !0),
            },
            measures: {
              name: i.getter("MEASURE_NAME['#text']", !0),
              caption: i.getter("MEASURE_CAPTION['#text']", !0),
              uniqueName: i.getter("MEASURE_UNIQUE_NAME['#text']", !0),
              description: i.getter("DESCRIPTION['#text']", !0),
              aggregator: i.getter("MEASURE_AGGREGATOR['#text']", !0),
              groupName: i.getter("MEASUREGROUP_NAME['#text']", !0),
              displayFolder: i.getter("MEASURE_DISPLAY_FOLDER['#text']", !0),
              defaultFormat: i.getter("DEFAULT_FORMAT_STRING['#text']", !0),
            },
            kpis: {
              name: i.getter("KPI_NAME['#text']", !0),
              caption: i.getter("KPI_CAPTION['#text']", !0),
              value: i.getter("KPI_VALUE['#text']", !0),
              goal: i.getter("KPI_GOAL['#text']", !0),
              status: i.getter("KPI_STATUS['#text']", !0),
              trend: i.getter("KPI_TREND['#text']", !0),
              statusGraphic: i.getter("KPI_STATUS_GRAPHIC['#text']", !0),
              trendGraphic: i.getter("KPI_TREND_GRAPHIC['#text']", !0),
              description: i.getter("KPI_DESCRIPTION['#text']", !0),
              groupName: i.getter("MEASUREGROUP_NAME['#text']", !0),
            },
            dimensions: {
              name: i.getter("DIMENSION_NAME['#text']", !0),
              caption: i.getter("DIMENSION_CAPTION['#text']", !0),
              description: i.getter("DESCRIPTION['#text']", !0),
              uniqueName: i.getter("DIMENSION_UNIQUE_NAME['#text']", !0),
              defaultHierarchy: i.getter("DEFAULT_HIERARCHY['#text']", !0),
              type: i.getter("DIMENSION_TYPE['#text']", !0),
            },
            hierarchies: {
              name: i.getter("HIERARCHY_NAME['#text']", !0),
              caption: i.getter("HIERARCHY_CAPTION['#text']", !0),
              description: i.getter("DESCRIPTION['#text']", !0),
              uniqueName: i.getter("HIERARCHY_UNIQUE_NAME['#text']", !0),
              dimensionUniqueName: i.getter(
                "DIMENSION_UNIQUE_NAME['#text']",
                !0
              ),
              displayFolder: i.getter("HIERARCHY_DISPLAY_FOLDER['#text']", !0),
              origin: i.getter("HIERARCHY_ORIGIN['#text']", !0),
              defaultMember: i.getter("DEFAULT_MEMBER['#text']", !0),
            },
            levels: {
              name: i.getter("LEVEL_NAME['#text']", !0),
              caption: i.getter("LEVEL_CAPTION['#text']", !0),
              description: i.getter("DESCRIPTION['#text']", !0),
              uniqueName: i.getter("LEVEL_UNIQUE_NAME['#text']", !0),
              dimensionUniqueName: i.getter(
                "DIMENSION_UNIQUE_NAME['#text']",
                !0
              ),
              displayFolder: i.getter("LEVEL_DISPLAY_FOLDER['#text']", !0),
              orderingProperty: i.getter(
                "LEVEL_ORDERING_PROPERTY['#text']",
                !0
              ),
              origin: i.getter("LEVEL_ORIGIN['#text']", !0),
              hierarchyUniqueName: i.getter(
                "HIERARCHY_UNIQUE_NAME['#text']",
                !0
              ),
            },
            members: {
              name: i.getter("MEMBER_NAME['#text']", !0),
              caption: i.getter("MEMBER_CAPTION['#text']", !0),
              uniqueName: i.getter("MEMBER_UNIQUE_NAME['#text']", !0),
              dimensionUniqueName: i.getter(
                "DIMENSION_UNIQUE_NAME['#text']",
                !0
              ),
              hierarchyUniqueName: i.getter(
                "HIERARCHY_UNIQUE_NAME['#text']",
                !0
              ),
              levelUniqueName: i.getter("LEVEL_UNIQUE_NAME['#text']", !0),
              childrenCardinality: i.getter(
                "CHILDREN_CARDINALITY['#text']",
                !0
              ),
            },
          };
          pt = [
            "axes",
            "catalogs",
            "cubes",
            "dimensions",
            "hierarchies",
            "levels",
            "measures",
          ];
          wt = i.data.XmlDataReader.extend({
            init: function (n) {
              i.data.XmlDataReader.call(this, n);
              this._extend(n);
            },
            _extend: function (n) {
              for (var i, t, r = 0, u = pt.length; r < u; r++)
                (i = pt[r]), (t = n[i]), t && t !== h && (this[i] = t);
            },
            parse: function (n) {
              var t = i.data.XmlDataReader.fn.parse(
                n.replace(/<(\/?)(\w|-)+:/g, "<$1")
              );
              return i.getter("['Envelope']['Body']", !0)(t);
            },
            errors: function (n) {
              var t = i.getter("['Fault']", !0)(n);
              return t
                ? [
                    {
                      faultstring: i.getter("faultstring['#text']", !0)(t),
                      faultcode: i.getter("faultcode['#text']", !0)(t),
                    },
                  ]
                : null;
            },
            axes: function (n) {
              var f, r, t, u;
              for (
                n = i.getter('ExecuteResponse["return"].root', !0)(n),
                  f = d(i.getter("Axes.Axis", !0)(n)),
                  t = { columns: {}, rows: {} },
                  u = 0;
                u < f.length;
                u++
              )
                (r = f[u]),
                  "sliceraxis" !== r["@name"].toLowerCase() &&
                    (t.columns.tuples ? (t.rows = di(r)) : (t.columns = di(r)));
              return t;
            },
            data: function (n) {
              var r, u, f, e, o, t;
              for (
                n = i.getter('ExecuteResponse["return"].root', !0)(n),
                  r = d(i.getter("CellData.Cell", !0)(n)),
                  u = [],
                  f = i.getter("['@CellOrdinal']"),
                  e = i.getter("Value['#text']"),
                  o = i.getter("FmtValue['#text']"),
                  t = 0;
                t < r.length;
                t++
              )
                u.push({
                  value: e(r[t]),
                  fmtValue: o(r[t]),
                  ordinal: parseInt(f(r[t]), 10),
                });
              return u;
            },
            _mapSchema: function (n, t) {
              var u, f, r, e, o;
              for (
                n = i.getter('DiscoverResponse["return"].root', !0)(n),
                  u = d(i.getter("row", !0)(n)),
                  f = [],
                  r = 0;
                r < u.length;
                r++
              ) {
                e = {};
                for (o in t) e[o] = t[o](u[r]);
                f.push(e);
              }
              return f;
            },
            measures: function (n) {
              return this._mapSchema(n, s.measures);
            },
            kpis: function (n) {
              return this._mapSchema(n, s.kpis);
            },
            hierarchies: function (n) {
              return this._mapSchema(n, s.hierarchies);
            },
            levels: function (n) {
              return this._mapSchema(n, s.levels);
            },
            dimensions: function (n) {
              return this._mapSchema(n, s.dimensions);
            },
            cubes: function (n) {
              return this._mapSchema(n, s.cubes);
            },
            catalogs: function (n) {
              return this._mapSchema(n, s.catalogs);
            },
            members: function (n) {
              return this._mapSchema(n, s.members);
            },
          });
          f(!0, i.data, {
            PivotDataSource: ut,
            XmlaTransport: yt,
            XmlaDataReader: wt,
            PivotCubeBuilder: wr,
            transports: { xmla: yt },
            readers: { xmla: wt },
          });
          ir = function (n, t) {
            if (!n) return null;
            for (var i = 0, r = n.length; i < r; i++)
              if (n[i].field === t) return n[i];
            return null;
          };
          ht = function (n, t) {
            for (var u = [], i = 0, r = n.length; i < r; i++)
              n[i].field !== t && u.push(n[i]);
            return u;
          };
          i.ui.PivotSettingTarget = v.extend({
            init: function (t, r) {
              var u = this;
              v.fn.init.call(u, t, r);
              u.element.addClass("k-pivot-setting");
              u.dataSource = i.data.PivotDataSource.create(r.dataSource);
              u._refreshHandler = n.proxy(u.refresh, u);
              u.dataSource.first(y, u._refreshHandler);
              r.template ||
                (u.options.template =
                  "<div data-" +
                  i.ns +
                  'name="${data.name || data}">${data.name || data}' +
                  (u.options.enabled
                    ? '<a class="k-button k-button-icon k-bare"><span class="k-icon k-i-close k-setting-delete"></span></a>'
                    : "") +
                  "</div>");
              u.template = i.template(u.options.template);
              u.emptyTemplate = i.template(u.options.emptyTemplate);
              u._sortable();
              u.element.on("click" + rt, ".k-button,.k-item", function (t) {
                var r = n(t.target),
                  f = r
                    .closest("[" + i.attr("name") + "]")
                    .attr(i.attr("name"));
                f &&
                  (r.hasClass("k-i-close")
                    ? u.remove(f)
                    : u.options.sortable &&
                      r[0] === t.currentTarget &&
                      u.sort({
                        field: f,
                        dir: r.find(".k-i-sort-asc-sm")[0] ? "desc" : "asc",
                      }));
              });
              (r.filterable || r.sortable) &&
                (u.fieldMenu = new gt.PivotFieldMenu(u.element, {
                  messages: u.options.messages.fieldMenu,
                  filter: ".k-setting-fieldmenu",
                  filterable: r.filterable,
                  sortable: r.sortable,
                  dataSource: u.dataSource,
                }));
              u.refresh();
            },
            options: {
              name: "PivotSettingTarget",
              template: null,
              filterable: !1,
              sortable: !1,
              emptyTemplate: "<div class='k-empty'>${data}</div>",
              setting: "columns",
              enabled: !0,
              messages: { empty: "Drop Fields Here" },
            },
            setDataSource: function (n) {
              this.dataSource.unbind(y, this._refreshHandler);
              this.dataSource = this.options.dataSource = n;
              this.fieldMenu && this.fieldMenu.setDataSource(n);
              n.first(y, this._refreshHandler);
              this.refresh();
            },
            _sortable: function () {
              var n = this;
              n.options.enabled &&
                (this.sortable = this.element
                  .kendoSortable({
                    connectWith: this.options.connectWith,
                    hint: n.options.hint,
                    filter: ">*:not(.k-empty)",
                    cursor: "move",
                    start: function (n) {
                      n.item.focus().blur();
                    },
                    change: function (t) {
                      var r = t.item.attr(i.attr("name"));
                      "receive" == t.action
                        ? n.add(r)
                        : "remove" == t.action
                        ? n.remove(r)
                        : "sort" == t.action && n.move(r, t.newIndex);
                    },
                  })
                  .data("kendoSortable"));
            },
            _indexOf: function (n, t) {
              for (var u = -1, i = 0, r = t.length; i < r; i++)
                if (c(t[i]) === n) {
                  u = i;
                  break;
                }
              return u;
            },
            _isKPI: function (n) {
              return "kpi" === n.type || n.measure;
            },
            validate: function (n) {
              var t,
                i,
                r = 2 == n.type || "aggregator" in n || this._isKPI(n);
              return r
                ? "measures" === this.options.setting
                : "measures" === this.options.setting
                ? r
                : ((t = this.dataSource[this.options.setting]()),
                  (i = n.defaultHierarchy || n.uniqueName),
                  !(this._indexOf(i, t) > -1) &&
                    ((t =
                      this.dataSource[
                        "columns" === this.options.setting ? "rows" : "columns"
                      ]()),
                    !(this._indexOf(i, t) > -1)));
            },
            add: function (t) {
              var i,
                u,
                r = this.dataSource[this.options.setting]();
              for (
                t = n.isArray(t) ? t.slice(0) : [t], i = 0, u = t.length;
                i < u;
                i++
              )
                this._indexOf(t[i], r) !== -1 &&
                  (t.splice(i, 1), (i -= 1), (u -= 1));
              t.length &&
                ((r = r.concat(t)), this.dataSource[this.options.setting](r));
            },
            move: function (n, t) {
              var i = this.dataSource[this.options.setting](),
                r = this._indexOf(n, i);
              r > -1 &&
                ((n = i.splice(r, 1)[0]),
                i.splice(t, 0, n),
                this.dataSource[this.options.setting](i));
            },
            remove: function (n) {
              var r = this.dataSource[this.options.setting](),
                u = this._indexOf(n, r),
                i = this.dataSource.sort(),
                t = this.dataSource.filter();
              u > -1 &&
                (t &&
                  ((t.filters = ht(t.filters, n)),
                  (this.dataSource._filter.filters = t.filters),
                  t.filters.length || (this.dataSource._filter = null)),
                i && ((i = ht(i, n)), (this.dataSource._sort = i)),
                r.splice(u, 1),
                this.dataSource[this.options.setting](r));
            },
            sort: function (n) {
              var i = this.options.sortable,
                u = i === !0 || i.allowUnsort,
                f = u && "asc" === n.dir,
                r = this.dataSource.sort() || [],
                t = ht(r, n.field);
              f && r.length !== t.length && (n = null);
              n && t.push(n);
              this.dataSource.sort(t);
            },
            refresh: function () {
              var n,
                i = "",
                u = this.dataSource[this.options.setting](),
                e = u.length,
                r = 0;
              if (e)
                for (; r < e; r++)
                  (n = u[r]),
                    (n = n.name === t ? { name: n } : n),
                    (i += this.template(
                      f({ sortIcon: this._sortIcon(n.name) }, n)
                    ));
              else i = this.emptyTemplate(this.options.messages.empty);
              this.element.html(i);
            },
            destroy: function () {
              v.fn.destroy.call(this);
              this.dataSource.unbind(y, this._refreshHandler);
              this.element.off(rt);
              this.sortable && this.sortable.destroy();
              this.fieldMenu && this.fieldMenu.destroy();
              this.element = null;
              this._refreshHandler = null;
            },
            _sortIcon: function (n) {
              var r = this.dataSource.sort(),
                t = ir(r, c(n)),
                i = "";
              return t && (i = "k-i-sort-" + t.dir), i;
            },
          });
          g = v.extend({
            init: function (r, u) {
              var e,
                o,
                f = this;
              v.fn.init.call(f, r, u);
              f._dataSource();
              f._bindConfigurator();
              f._wrapper();
              f._createLayout();
              f._columnBuilder = e = new rr();
              f._rowBuilder = o = new ur();
              f._contentBuilder = new fr();
              f._templates();
              f.columnsHeader
                .add(f.rowsHeader)
                .on("click", "span.k-icon", function () {
                  var a,
                    r,
                    u,
                    v,
                    s = n(this),
                    c = e,
                    y = "expandColumn",
                    l = s.attr(i.attr("path")),
                    h = { axis: "columns", path: n.parseJSON(l) };
                  s.parent().is("td") &&
                    ((c = o), (y = "expandRow"), (h.axis = "rows"));
                  r = s.hasClass(lt);
                  u = c.metadata[l];
                  v = u.expanded === t;
                  a = r ? yr : vr;
                  h.childrenLoaded = u.maxChildren > u.children;
                  f.trigger(a, h) ||
                    ((c.metadata[l].expanded = !r),
                    s.toggleClass(lt, !r).toggleClass(ii, r),
                    !r && v ? f.dataSource[y](h.path) : f.refresh());
                });
              f._scrollable();
              f.options.autoBind && f.dataSource.fetch();
              i.notify(f);
            },
            events: [lr, ar, vr, yr],
            options: {
              name: "PivotGrid",
              autoBind: !0,
              reorderable: !0,
              filterable: !1,
              sortable: !1,
              height: null,
              columnWidth: 100,
              configurator: "",
              columnHeaderTemplate: null,
              rowHeaderTemplate: null,
              dataCellTemplate: null,
              kpiStatusTemplate: null,
              kpiTrendTemplate: null,
              messages: {
                measureFields: "Drop Data Fields Here",
                columnFields: "Drop Column Fields Here",
                rowFields: "Drop Rows Fields Here",
              },
            },
            _templates: function () {
              var n = this.options.columnHeaderTemplate,
                t = this.options.rowHeaderTemplate,
                r = this.options.dataCellTemplate,
                u = this.options.kpiStatusTemplate,
                f = this.options.kpiTrendTemplate;
              this._columnBuilder.template = i.template(n || pr, {
                useWithBlock: !!n,
              });
              this._contentBuilder.dataTemplate = i.template(r || pu, {
                useWithBlock: !!r,
              });
              this._contentBuilder.kpiStatusTemplate = i.template(u || vu, {
                useWithBlock: !!u,
              });
              this._contentBuilder.kpiTrendTemplate = i.template(f || yu, {
                useWithBlock: !!f,
              });
              this._rowBuilder.template = i.template(t || pr, {
                useWithBlock: !!t,
              });
            },
            _bindConfigurator: function () {
              var t = this.options.configurator;
              t &&
                n(t).kendoPivotConfigurator("setDataSource", this.dataSource);
            },
            cellInfoByElement: function (t) {
              return (
                (t = n(t)), this.cellInfo(t.index(), t.parent("tr").index())
              );
            },
            cellInfo: function (n, t) {
              var f,
                u = this._contentBuilder,
                i = u.columnIndexes[n || 0],
                r = u.rowIndexes[t || 0];
              return i && r
                ? ((f = r.index * u.rowLength + i.index),
                  {
                    columnTuple: i.tuple,
                    rowTuple: r.tuple,
                    measure: i.measure || r.measure,
                    dataItem: this.dataSource.view()[f],
                  })
                : null;
            },
            setDataSource: function (n) {
              this.options.dataSource = n;
              this._dataSource();
              this.measuresTarget && this.measuresTarget.setDataSource(n);
              this.rowsTarget && this.rowsTarget.setDataSource(n);
              this.columnsTarget && this.columnsTarget.setDataSource(n);
              this._bindConfigurator();
              this.options.autoBind && n.fetch();
            },
            setOptions: function (n) {
              v.fn.setOptions.call(this, n);
              this._templates();
            },
            destroy: function () {
              v.fn.destroy.call(this);
              clearTimeout(this._headerReflowTimeout);
            },
            _dataSource: function () {
              var t = this,
                r = t.options.dataSource;
              r = n.isArray(r) ? { data: r } : r;
              t.dataSource && this._refreshHandler
                ? t.dataSource
                    .unbind(y, t._refreshHandler)
                    .unbind(ti, t._stateResetHandler)
                    .unbind(cr, t._progressHandler)
                    .unbind(hr, t._errorHandler)
                : ((t._refreshHandler = n.proxy(t.refresh, t)),
                  (t._progressHandler = n.proxy(t._requestStart, t)),
                  (t._stateResetHandler = n.proxy(t._stateReset, t)),
                  (t._errorHandler = n.proxy(t._error, t)));
              t.dataSource = i.data.PivotDataSource.create(r)
                .bind(y, t._refreshHandler)
                .bind(cr, t._progressHandler)
                .bind(ti, t._stateResetHandler)
                .bind(hr, t._errorHandler);
            },
            _error: function () {
              this._progress(!1);
            },
            _requestStart: function () {
              this._progress(!0);
            },
            _stateReset: function () {
              this._columnBuilder.reset();
              this._rowBuilder.reset();
            },
            _wrapper: function () {
              var n = this.options.height;
              this.wrapper = this.element.addClass("k-widget k-pivot");
              n && this.wrapper.css("height", n);
            },
            _measureFields: function () {
              this.measureFields = n(ct).addClass(
                "k-pivot-toolbar k-header k-settings-measures"
              );
              this.measuresTarget = this._createSettingTarget(
                this.measureFields,
                {
                  setting: "measures",
                  messages: { empty: this.options.messages.measureFields },
                }
              );
            },
            _createSettingTarget: function (t, r) {
              var f =
                  '<span tabindex="0" class="k-button" data-' +
                  i.ns +
                  'name="${data.name}">${data.name}',
                e = r.sortable,
                u = "";
              return (
                e &&
                  ((u += "#if (data.sortIcon) {#"),
                  (u += '<span class="k-icon ${data.sortIcon}-sm"></span>'),
                  (u += "#}#")),
                (r.filterable || e) &&
                  (u +=
                    '<span class="k-icon k-i-more-vertical k-setting-fieldmenu"></span>'),
                this.options.reorderable &&
                  (u +=
                    '<span class="k-icon k-i-close k-setting-delete"></span>'),
                u && (f += '<span class="k-field-actions">' + u + "</span>"),
                (f += "</span>"),
                new i.ui.PivotSettingTarget(
                  t,
                  n.extend(
                    {
                      template: f,
                      emptyTemplate: '<span class="k-empty">${data}</span>',
                      enabled: this.options.reorderable,
                      dataSource: this.dataSource,
                    },
                    r
                  )
                )
              );
            },
            _initSettingTargets: function () {
              this.columnsTarget = this._createSettingTarget(
                this.columnFields,
                {
                  connectWith: this.rowFields,
                  setting: "columns",
                  filterable: this.options.filterable,
                  sortable: this.options.sortable,
                  messages: {
                    empty: this.options.messages.columnFields,
                    fieldMenu: this.options.messages.fieldMenu,
                  },
                }
              );
              this.rowsTarget = this._createSettingTarget(this.rowFields, {
                connectWith: this.columnFields,
                setting: "rows",
                filterable: this.options.filterable,
                sortable: this.options.sortable,
                messages: {
                  empty: this.options.messages.rowFields,
                  fieldMenu: this.options.messages.fieldMenu,
                },
              });
            },
            _createLayout: function () {
              var t = this,
                r = n(wu),
                u = r.find(".k-pivot-rowheaders"),
                e = r.find(".k-pivot-table"),
                f = n(ct).addClass("k-grid k-widget");
              t._measureFields();
              t.columnFields = n(ct).addClass(
                "k-pivot-toolbar k-header k-settings-columns"
              );
              t.rowFields = n(ct).addClass(
                "k-pivot-toolbar k-header k-settings-rows"
              );
              t.columnsHeader = n('<div class="k-grid-header-wrap" />').wrap(
                '<div class="k-grid-header" />'
              );
              t.columnsHeader
                .parent()
                .css("padding-right", i.support.scrollbar());
              t.rowsHeader = n('<div class="k-grid k-widget k-alt"/>');
              t.content = n('<div class="k-grid-content" />');
              u.append(t.measureFields);
              u.append(t.rowFields);
              u.append(t.rowsHeader);
              f.append(t.columnsHeader.parent());
              f.append(t.content);
              e.append(t.columnFields);
              e.append(f);
              t.wrapper.append(r);
              t.columnsHeaderTree = new i.dom.Tree(t.columnsHeader[0]);
              t.rowsHeaderTree = new i.dom.Tree(t.rowsHeader[0]);
              t.contentTree = new i.dom.Tree(t.content[0]);
              t._initSettingTargets();
            },
            _progress: function (n) {
              i.ui.progress(this.wrapper, n);
            },
            _resize: function () {
              this.content[0].firstChild &&
                (this._setSectionsWidth(),
                this._setSectionsHeight(),
                this._setContentWidth(),
                this._setContentHeight(),
                this._columnHeaderReflow());
            },
            _columnHeaderReflow: function () {
              var n = this.columnsHeader.children("table");
              i.support.browser.mozilla &&
                (clearTimeout(this._headerReflowTimeout),
                n.css("table-layout", "auto"),
                (this._headerReflowTimeout = setTimeout(function () {
                  n.css("table-layout", "");
                })));
            },
            _setSectionsWidth: function () {
              var t = this.rowsHeader,
                i = t.parent(".k-pivot-rowheaders").width(it),
                n = Math.max(er(this.measureFields), er(this.rowFields));
              n = Math.max(t.children("table").width(), n);
              i.width(n);
            },
            _setSectionsHeight: function () {
              var t = this.measureFields.height(it).height(),
                i = this.columnFields.height(it).height(),
                n = this.rowFields.height(it).innerHeight(),
                r = this.columnsHeader.height(it).innerHeight(),
                e = n - this.rowFields.height(),
                u = i > t ? i : t,
                f = r > n ? r : n;
              this.measureFields.height(u);
              this.columnFields.height(u);
              this.rowFields.height(f - e);
              this.columnsHeader.height(f);
            },
            _setContentWidth: function () {
              var t = this.content.find("table"),
                i = this.columnsHeader.children("table"),
                r = t.children("colgroup").children().length,
                u = r * this.options.columnWidth,
                n = Math.ceil((u / this.content.width()) * 100);
              n < 100 && (n = 100);
              t.add(i).css("width", n + "%");
              this._resetColspan(i);
            },
            _setContentHeight: function () {
              var r = this,
                f = r.content,
                o = r.rowsHeader,
                n = r.wrapper.innerHeight(),
                u = i.support.scrollbar(),
                e = f[0].offsetHeight === f[0].clientHeight,
                s = r.options.height;
              if (r.wrapper.is(":visible")) {
                if (!n || !s)
                  return (
                    e && (u = 0), f.height("auto"), o.height(f.height() - u), t
                  );
                n -= or(r.columnFields);
                n -= or(r.columnsHeader.parent());
                n <= 2 * u && ((n = 2 * u + 1), e || (n += u));
                f.height(n);
                e && (u = 0);
                o.height(n - u);
              }
            },
            _resetColspan: function (n) {
              var i = this,
                r = n.children("tbody").children(":first").children(":first");
              i._colspan === t && (i._colspan = r.attr("colspan"));
              r.attr("colspan", 1);
              clearTimeout(i._layoutTimeout);
              i._layoutTimeout = setTimeout(function () {
                r.attr("colspan", i._colspan);
                i._colspan = t;
              });
            },
            _axisMeasures: function (n) {
              var r = [],
                i = this.dataSource,
                t = i.measures(),
                u = t.length > 1 || (t[0] && t[0].type);
              return (
                i.measuresAxis() === n && (0 === i[n]().length || u) && (r = t),
                r
              );
            },
            items: function () {
              return [];
            },
            refresh: function () {
              var t,
                n = this,
                f = n.dataSource,
                e = f.axes(),
                h = (e.columns || {}).tuples || [],
                c = (e.rows || {}).tuples || [],
                r = n._columnBuilder,
                u = n._rowBuilder,
                o = {},
                s = {};
              n.trigger(lr, { action: "rebind" }) ||
                ((r.measures = n._axisMeasures(ku)),
                (u.measures = n._axisMeasures(bu)),
                n.columnsHeaderTree.render(r.build(h)),
                n.rowsHeaderTree.render(u.build(c)),
                (o = {
                  indexes: r._indexes,
                  measures: r.measures,
                  metadata: r.metadata,
                }),
                (s = {
                  indexes: u._indexes,
                  measures: u.measures,
                  metadata: u.metadata,
                }),
                n.contentTree.render(n._contentBuilder.build(f.view(), o, s)),
                n._resize(),
                n.touchScroller
                  ? n.touchScroller.contentResized()
                  : ((t = i.touchScroller(n.content)),
                    t &&
                      t.movable &&
                      ((n.touchScroller = t),
                      t.movable.bind("change", function (t) {
                        n.columnsHeader.scrollLeft(-t.sender.x);
                        n.rowsHeader.scrollTop(-t.sender.y);
                      }))),
                n._progress(!1),
                n.trigger(ar));
            },
            _scrollable: function () {
              var t = this,
                r = t.columnsHeader,
                i = t.rowsHeader;
              t.content.scroll(function () {
                r.scrollLeft(this.scrollLeft);
                i.scrollTop(this.scrollTop);
              });
              i.bind(
                "DOMMouseScroll" + rt + " mousewheel" + rt,
                n.proxy(t._wheelScroll, t)
              );
            },
            _wheelScroll: function (t) {
              var r, u;
              t.ctrlKey ||
                ((r = i.wheelDeltaY(t)),
                (u = this.content.scrollTop()),
                r &&
                  (t.preventDefault(),
                  n(t.currentTarget).one("wheel" + rt, !1),
                  this.rowsHeader.scrollTop(u + -r),
                  this.content.scrollTop(u + -r)));
            },
          });
          r = i.dom.element;
          a = i.dom.html;
          bt = function (n, t) {
            return {
              maxChildren: 0,
              children: 0,
              maxMembers: 0,
              members: 0,
              measures: 1,
              levelNum: n,
              parentMember: 0 !== t,
            };
          };
          p = function (n, t) {
            for (var r = [], i = 0; i <= t; i++) r.push(n.members[i].name);
            return r;
          };
          kt = function (n, t) {
            for (var r = "", i = 0; i <= t; i++) r += n.members[i].name;
            return r;
          };
          rr = nt.extend({
            init: function () {
              this.measures = 1;
              this.metadata = {};
            },
            build: function (n) {
              var t = this._tbody(n),
                i = this._colGroup();
              return [r("table", null, [i, t])];
            },
            reset: function () {
              this.metadata = {};
            },
            _colGroup: function () {
              for (var i = this._rowLength(), n = [], t = 0; t < i; t++)
                n.push(r("col", null));
              return r("colgroup", null, n);
            },
            _tbody: function (n) {
              var t = n[0];
              return (
                (this.map = {}),
                (this.rows = []),
                (this.rootTuple = t),
                (this._indexes = []),
                t
                  ? (this._buildRows(t, 0), this._normalize())
                  : this.rows.push(
                      r("tr", null, [r("th", null, [a("&nbsp;")])])
                    ),
                r("tbody", null, this.rows)
              );
            },
            _normalize: function () {
              for (
                var n, f, t, i, r, e = this.rows, o = e.length, u = 0;
                u < o;
                u++
              )
                if (((n = e[u]), 1 !== n.rowSpan))
                  for (i = n.children, t = 0, f = i.length; t < f; t++)
                    (r = i[t]), r.tupleAll && (r.attr.rowSpan = n.rowSpan);
            },
            _rowIndex: function (n) {
              for (
                var i = this.rows, r = i.length, t = 0;
                t < r && i[t] !== n;
                t++
              );
              return t;
            },
            _rowLength: function () {
              var i = this.rows[0] ? this.rows[0].children : [],
                r = i.length,
                n = 0,
                t = 0;
              if (r) for (; t < r; t++) n += i[t].attr.colSpan || 1;
              return n || (n = this.measures), n;
            },
            _row: function (n, t, i) {
              var f,
                e,
                s = this.rootTuple.members[t].name,
                h = n.members[t].levelNum,
                c = s + h,
                o = this.map,
                u = o[c];
              return (
                u
                  ? ((u.notFirst = !1),
                    (u.parentMember && u.parentMember === i) ||
                      ((u.parentMember = i),
                      (u.collapsed = 0),
                      (u.colSpan = 0)))
                  : ((u = r("tr", null, [])),
                    (u.parentMember = i),
                    (u.collapsed = 0),
                    (u.colSpan = 0),
                    (u.rowSpan = 1),
                    (o[c] = u),
                    (f = o[s + (+h - 1)]),
                    f &&
                      ((e = f.children),
                      (u.notFirst =
                        !(
                          !e[1] || e[1].attr.className.indexOf("k-alt") !== -1
                        ) || f.notFirst)),
                    this.rows.splice(this._rowIndex(f) + 1, 0, u)),
                u
              );
            },
            _measures: function (n, t, i) {
              var e,
                f,
                o,
                s = this.map,
                u = s.measureRow;
              for (
                u ||
                  ((u = r("tr", null, [])),
                  (s.measureRow = u),
                  this.rows.push(u)),
                  f = 0,
                  o = n.length;
                f < o;
                f++
              )
                (e = n[f]),
                  u.children.push(
                    this._cell(i || "", [this._content(e, t)], e)
                  );
              return o;
            },
            _content: function (n, t) {
              return a(this.template({ member: n, tuple: t }));
            },
            _cell: function (n, t, i) {
              var u = r("th", { className: "k-header" + n }, t);
              return (u.value = i.caption || i.name), u;
            },
            _buildRows: function (n, u, f) {
              var s,
                h,
                l,
                v,
                y,
                k,
                g,
                w,
                e,
                o,
                it = n.members,
                c = it[u],
                a = it[u + 1],
                nt = [],
                tt = 0,
                b = 0,
                d = 0;
              if (c.measure) return this._measures(c.children, n), t;
              if (
                ((w = i.stringify(p(n, u))),
                (s = this._row(n, u, f)),
                (l = c.children),
                (v = l.length),
                (e = this.metadata[w]),
                e ||
                  ((this.metadata[w] = e = bt(+c.levelNum, u)),
                  (e.rootLevelNum = +this.rootTuple.members[u].levelNum)),
                this._indexes.push({ path: w, tuple: n }),
                c.hasChildren &&
                  (e.expanded === !1 &&
                    ((b = e.maxChildren),
                    (s.collapsed += b),
                    (e.children = 0),
                    (v = 0)),
                  (g = { className: "k-icon " + (v ? lt : ii) }),
                  (g[i.attr("path")] = w),
                  nt.push(r("span", g))),
                nt.push(this._content(c, n)),
                (y = this._cell(s.notFirst ? " k-first" : "", nt, c)),
                s.children.push(y),
                (s.colSpan += 1),
                v)
              ) {
                for (
                  k = this._cell(" k-alt", [this._content(c, n)], c),
                    s.children.push(k);
                  tt < v;
                  tt++
                )
                  h = this._buildRows(l[tt], u, c);
                o = h.colSpan;
                b = h.collapsed;
                y.attr.colSpan = o;
                e.children = o;
                e.members = 1;
                s.colSpan += o;
                s.collapsed += b;
                s.rowSpan = h.rowSpan + 1;
                a &&
                  (a.measure
                    ? (o = this._measures(a.children, n, " k-alt"))
                    : ((h = this._buildRows(n, u + 1)),
                      (o = h.colSpan),
                      (s.collapsed += h.collapsed),
                      (d = h.collapsed)),
                  (k.attr.colSpan = o),
                  (o -= 1),
                  (e.members += o),
                  (s.colSpan += o));
              } else
                a &&
                  (a.measure
                    ? (o = this._measures(a.children, n))
                    : ((h = this._buildRows(n, u + 1)),
                      (o = h.colSpan),
                      (s.collapsed += h.collapsed),
                      (d = h.collapsed)),
                  (e.members = o),
                  o > 1 && ((y.attr.colSpan = o), (s.colSpan += o - 1)));
              return (
                e.maxMembers < e.members + d && (e.maxMembers = e.members + d),
                (l = e.children + b),
                e.maxChildren < l && (e.maxChildren = l),
                ((k || y).tupleAll = !0),
                s
              );
            },
          });
          ur = nt.extend({
            init: function () {
              this.metadata = {};
            },
            build: function (n) {
              var t = this._tbody(n),
                i = this._colGroup();
              return [r("table", null, [i, t])];
            },
            reset: function () {
              this.metadata = {};
            },
            _rowLength: function () {
              for (var t = this.rows[0].children, i = 0, r = 0, n = t[r]; n; )
                (i += n.attr.colSpan || 1), (n = t[++r]);
              return i;
            },
            _colGroup: function () {
              for (var i = this._rowLength(), n = [], t = 0; t < i; t++)
                n.push(r("col", null));
              return r("colgroup", null, n);
            },
            _tbody: function (n) {
              var t = n[0];
              return (
                (this.rootTuple = t),
                (this.rows = []),
                (this.map = {}),
                (this._indexes = []),
                t
                  ? (this._buildRows(t, 0), this._normalize())
                  : this.rows.push(
                      r("tr", null, [r("td", null, [a("&nbsp;")])])
                    ),
                r("tbody", null, this.rows)
              );
            },
            _normalize: function () {
              for (
                var n,
                  t,
                  r,
                  u,
                  o = this.rows,
                  c = o.length,
                  f = 0,
                  e = this.rootTuple.members,
                  s = e[0].name,
                  l = e.length,
                  i = 0,
                  h = this.map;
                f < c;
                f++
              )
                for (n = o[f], i = 0; i < l; i++)
                  (r = this[e[i].name]),
                    (t = n.colSpan["dim" + i]),
                    t && t.colSpan < r && (t.attr.colSpan = r - t.colSpan + 1);
              n = h[s];
              u = h[s + "all"];
              n && (n.children[0].attr.className = "k-first");
              u && (u.children[0].attr.className += " k-first");
            },
            _row: function (n) {
              var t = r("tr", null, n);
              return (t.rowSpan = 1), (t.colSpan = {}), this.rows.push(t), t;
            },
            _content: function (n, t) {
              return a(this.template({ member: n, tuple: t }));
            },
            _cell: function (n, t, i) {
              var u = r("td", { className: n }, t);
              return (u.value = i.caption || i.name), u;
            },
            _buildRows: function (n, t) {
              var v,
                h,
                c,
                y,
                l,
                f,
                w,
                d,
                o,
                b = this.map,
                rt = n.members,
                e = rt[t],
                ut = rt[t + 1],
                a = e.children,
                s = a.length,
                g = +e.levelNum,
                nt = this.rootTuple.members[t].name,
                tt = p(n, t - 1).join(""),
                ft = +this.rootTuple.members[t].levelNum,
                et = tt + (ft === g ? "" : e.parentName || ""),
                u = b[et + "all"] || b[et],
                k = g + 1,
                it = [];
              if (
                (!u || u.hasChild ? (u = this._row()) : (u.hasChild = !0),
                e.measure)
              ) {
                for (
                  w = u.allCell ? "k-grid-footer" : "",
                    u.children.push(
                      this._cell(w, [this._content(a[0], n)], a[0])
                    ),
                    u.rowSpan = s,
                    o = 1;
                  o < s;
                  o++
                )
                  this._row([this._cell(w, [this._content(a[o], n)], a[o])]);
                return u;
              }
              if (
                ((b[tt + e.name] = u),
                (v = i.stringify(p(n, t))),
                (f = this.metadata[v]),
                f || ((this.metadata[v] = f = bt(g, t)), (f.rootLevelNum = ft)),
                this._indexes.push({ path: v, tuple: n }),
                e.hasChildren &&
                  (f.expanded === !1 && ((s = 0), (f.children = 0)),
                  (d = { className: "k-icon " + (s ? lt : ii) }),
                  (d[i.attr("path")] = v),
                  it.push(r("span", d))),
                it.push(this._content(e, n)),
                (w = u.allCell && !s ? "k-grid-footer" : ""),
                (h = this._cell(w, it, e)),
                (h.colSpan = k),
                u.children.push(h),
                (u.colSpan["dim" + t] = h),
                (!this[nt] || this[nt] < k) && (this[nt] = k),
                s)
              ) {
                for (u.allCell = !1, u.hasChild = !1, o = 0; o < s; o++)
                  (y = this._buildRows(a[o], t)),
                    u !== y && (u.rowSpan += y.rowSpan);
                u.rowSpan > 1 && (h.attr.rowSpan = u.rowSpan);
                f.children = u.rowSpan;
                c = this._cell("k-grid-footer", [this._content(e, n)], e);
                c.colSpan = k;
                l = this._row([c]);
                l.colSpan["dim" + t] = c;
                l.allCell = !0;
                b[tt + e.name + "all"] = l;
                ut &&
                  ((y = this._buildRows(n, t + 1)),
                  (c.attr.rowSpan = y.rowSpan));
                u.rowSpan += l.rowSpan;
                f.members = l.rowSpan;
              } else
                ut &&
                  ((u.hasChild = !1),
                  this._buildRows(n, t + 1),
                  ((c || h).attr.rowSpan = u.rowSpan),
                  (f.members = u.rowSpan));
              return (
                f.maxChildren < f.children && (f.maxChildren = f.children),
                f.maxMembers < f.members && (f.maxMembers = f.members),
                u
              );
            },
          });
          fr = nt.extend({
            init: function () {
              this.columnAxis = {};
              this.rowAxis = {};
            },
            build: function (n, i, u) {
              var e,
                o,
                s = i.indexes[0],
                f = i.metadata[s ? s.path : t];
              return (
                (this.columnAxis = i),
                (this.rowAxis = u),
                (this.data = n),
                (this.rowLength = f
                  ? f.maxChildren + f.maxMembers
                  : i.measures.length || 1),
                this.rowLength || (this.rowLength = 1),
                (e = this._tbody()),
                (o = this._colGroup()),
                [r("table", null, [o, e])]
              );
            },
            _colGroup: function () {
              var n = this.columnAxis.measures.length || 1,
                t = [],
                i = 0;
              for (
                this.rows[0] && (n = this.rows[0].children.length);
                i < n;
                i++
              )
                t.push(r("col", null));
              return r("colgroup", null, t);
            },
            _tbody: function () {
              return (
                (this.rows = []),
                this.data[0]
                  ? ((this.columnIndexes = this._indexes(
                      this.columnAxis,
                      this.rowLength
                    )),
                    (this.rowIndexes = this._indexes(
                      this.rowAxis,
                      Math.ceil(this.data.length / this.rowLength)
                    )),
                    this._buildRows())
                  : this.rows.push(
                      r("tr", null, [r("td", null, [a("&nbsp;")])])
                    ),
                r("tbody", null, this.rows)
              );
            },
            _indexes: function (n, i) {
              var s,
                u,
                r,
                y,
                f,
                h,
                e = [],
                p = n.indexes,
                b = n.metadata,
                c = n.measures,
                l = c.length || 1,
                a = 0,
                o = 0,
                v = 0,
                w = p.length;
              if (!w) {
                for (r = 0; r < l; r++)
                  e[r] = { index: r, measure: c[r], tuple: null };
                return e;
              }
              for (; v < w; v++) {
                if (
                  ((s = p[v]),
                  (u = b[s.path]),
                  (f = u.children + u.members),
                  (h = 0),
                  f && (f -= l),
                  u.expanded === !1 &&
                    u.children !== u.maxChildren &&
                    (h = u.maxChildren),
                  u.parentMember && u.levelNum === u.rootLevelNum && (f = -1),
                  f > -1)
                ) {
                  for (r = 0; r < l; r++)
                    (y = f + r),
                      u.children || (y += o),
                      (e[f + o + r] = {
                        children: f,
                        index: a,
                        measure: c[r],
                        tuple: s.tuple,
                      }),
                      (a += 1);
                  for (; e[o] !== t; ) o += 1;
                }
                if (o === i) break;
                a += h;
              }
              return e;
            },
            _buildRows: function () {
              for (var n, i = this.rowIndexes, r = i.length, t = 0; t < r; t++)
                (n = i[t]), n && this.rows.push(this._buildRow(n));
            },
            _buildRow: function (n) {
              for (
                var i,
                  o,
                  h,
                  u,
                  f,
                  s,
                  e,
                  y = n.index * this.rowLength,
                  l = this.columnIndexes,
                  p = l.length,
                  v = [],
                  c = 0;
                c < p;
                c++
              )
                (i = l[c]),
                  i !== t &&
                    ((f = {}),
                    i.children && (f.className = "k-alt"),
                    (u = ""),
                    (s = this.data[y + i.index]),
                    (e = i.measure || n.measure),
                    (o = {
                      columnTuple: i.tuple,
                      rowTuple: n.tuple,
                      measure: e,
                      dataItem: s,
                    }),
                    "" !== s.value &&
                      e &&
                      e.type &&
                      ("status" === e.type
                        ? (u = this.kpiStatusTemplate(o))
                        : "trend" === e.type && (u = this.kpiTrendTemplate(o))),
                    u || (u = this.dataTemplate(o)),
                    (h = r("td", f, [a(u)])),
                    (h.value = s.value),
                    v.push(h));
              return (
                (f = {}),
                n.children && (f.className = "k-grid-footer"),
                r("tr", f, v)
              );
            },
          });
          gt.plugin(g);
          i.PivotExcelExporter = i.Class.extend({
            init: function (n) {
              this.options = n;
              this.widget = n.widget;
              this.dataSource = this.widget.dataSource;
            },
            _columns: function () {
              var n,
                r = this.widget.columnsHeaderTree.children[0],
                u = this.widget.rowsHeaderTree.children[0],
                f = r.children[0].children.length,
                i = u.children[0].children.length,
                e = this.widget.options.columnWidth,
                t = [];
              if (i && this.dataSource.data()[0])
                for (n = 0; n < i; n++) t.push({ autoWidth: !0 });
              for (n = 0; n < f; n++) t.push({ autoWidth: !1, width: e });
              return t;
            },
            _cells: function (n, t, i) {
              for (var s, r, o, u, f, h = [], e = 0, c = n.length; e < c; e++) {
                for (r = [], o = n[e].children, s = o.length, u = 0; u < s; u++)
                  (f = o[u]),
                    r.push({
                      background: "#7a7a7a",
                      color: "#fff",
                      value: f.value,
                      colSpan: f.attr.colSpan || 1,
                      rowSpan: f.attr.rowSpan || 1,
                    });
                i && i(r, e);
                h.push({ cells: r, type: t });
              }
              return h;
            },
            _rows: function () {
              var n,
                t,
                i = this.widget.columnsHeaderTree.children[0],
                r = this.widget.rowsHeaderTree.children[0],
                o = i.children[0].children.length,
                u = r.children[0].children.length,
                f = i.children[1].children,
                s = r.children[1].children,
                h = this.widget.contentTree.children[0].children[1].children,
                e = this._cells(f, "header");
              return (
                u &&
                  e[0].cells.splice(0, 0, {
                    background: "#7a7a7a",
                    color: "#fff",
                    value: "",
                    colSpan: u,
                    rowSpan: f.length,
                  }),
                (n = function (n, t) {
                  for (var r, i, u = 0, f = h[t].children; u < o; u++)
                    (r = f[u]),
                      (i = +r.value),
                      isNaN(i) && (i = r.value),
                      n.push({
                        background: "#dfdfdf",
                        color: "#333",
                        value: i,
                        colSpan: 1,
                        rowSpan: 1,
                      });
                }),
                (t = this._cells(s, "data", n)),
                e.concat(t)
              );
            },
            _freezePane: function () {
              var n = this.widget.columnsHeaderTree.children[0],
                t = this.widget.rowsHeaderTree.children[0],
                i = t.children[0].children.length,
                r = n.children[1].children;
              return { colSplit: i, rowSplit: r.length };
            },
            workbook: function () {
              var t;
              return (
                this.dataSource.view()[0]
                  ? ((t = n.Deferred()), t.resolve())
                  : (t = this.dataSource.fetch()),
                t.then(
                  n.proxy(function () {
                    return {
                      sheets: [
                        {
                          columns: this._columns(),
                          rows: this._rows(),
                          freezePane: this._freezePane(),
                          filter: null,
                        },
                      ],
                    };
                  }, this)
                )
              );
            },
          });
          dt = {
            extend: function (t) {
              t.events.push("excelExport");
              t.options.excel = n.extend(t.options.excel, this.options);
              t.saveAsExcel = this.saveAsExcel;
            },
            options: { proxyURL: "", filterable: !1, fileName: "Export.xlsx" },
            saveAsExcel: function () {
              var t = this.options.excel || {},
                r = new i.PivotExcelExporter({ widget: this });
              r.workbook().then(
                n.proxy(function (n) {
                  if (!this.trigger("excelExport", { workbook: n })) {
                    var r = new i.ooxml.Workbook(n);
                    r.toDataURLAsync().then(function (r) {
                      i.saveAs({
                        dataURI: r,
                        fileName: n.fileName || t.fileName,
                        proxyURL: t.proxyURL,
                        forceProxy: t.forceProxy,
                      });
                    });
                  }
                }, this)
              );
            },
          };
          i.PivotExcelMixin = dt;
          i.ooxml && i.ooxml.Workbook && dt.extend(g.prototype);
          i.PDFMixin &&
            (i.PDFMixin.extend(g.prototype),
            (g.fn._drawPDF = function () {
              return this._drawPDFShadow(
                { width: this.wrapper.width() },
                { avoidLinks: this.options.pdf.avoidLinks }
              );
            }));
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.pivot.fieldmenu.min",
      [
        "kendo.pivotgrid.min",
        "kendo.menu.min",
        "kendo.window.min",
        "kendo.treeview.min",
        "kendo.dropdownlist.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function a(n, t) {
            for (var u = [], i = 0, r = n.length; i < r; i++)
              n[i].field !== t && u.push(n[i]);
            return u;
          }
          function e(n, t, i) {
            var r, u, e, f;
            if (!n) return [];
            for (n = n.filters, r = 0, u = [], e = n.length; r < e; r++)
              (f = n[r].operator),
                ((i || "in" === f) && f !== i) ||
                  n[r].field !== t ||
                  u.push(n[r]);
            return u;
          }
          function v(t, i, r) {
            var f,
              u = 0,
              o = r.length;
            if ((t = e(t, i, "in")[0]))
              for (f = t.value.split(","); u < o; u++)
                r[u].checked = n.inArray(r[u].uniqueName, f) >= 0;
            else for (; u < o; u++) r[u].checked = !0;
          }
          function h(n, t) {
            for (var r = n.length, i = 0; i < r; i++)
              n[i].checked && 0 !== n[i].level() && t.push(n[i].uniqueName),
                n[i].hasChildren && h(n[i].children.view(), t);
          }
          var i = window.kendo,
            u = i.ui,
            c = "kendoContextMenu",
            r = n.proxy,
            f = ".kendoPivotFieldMenu",
            s = u.Widget,
            o = "k-filter-item",
            l = "aria-label",
            y = s.extend({
              init: function (n, t) {
                s.fn.init.call(this, n, t);
                this._dataSource();
                this._layout();
                i.notify(this);
              },
              events: [],
              options: {
                name: "PivotFieldMenu",
                filter: null,
                filterable: !0,
                sortable: !0,
                messages: {
                  info: "Show items with value that:",
                  sortAscending: "Sort Ascending",
                  sortDescending: "Sort Descending",
                  filterFields: "Fields Filter",
                  filter: "Filter",
                  include: "Include Fields...",
                  title: "Fields to include",
                  clear: "Clear",
                  ok: "OK",
                  cancel: "Cancel",
                  operators: {
                    contains: "Contains",
                    doesnotcontain: "Does not contain",
                    startswith: "Starts with",
                    endswith: "Ends with",
                    eq: "Is equal to",
                    neq: "Is not equal to",
                  },
                },
              },
              _layout: function () {
                var t = this.options;
                this.wrapper = n(
                  i.template(w)({
                    ns: i.ns,
                    filterable: t.filterable,
                    sortable: t.sortable,
                    messages: t.messages,
                  })
                );
                this.menu = this.wrapper[c]({
                  filter: t.filter,
                  target: this.element,
                  orientation: "vertical",
                  showOn: "click",
                  closeOnClick: !1,
                  open: r(this._menuOpen, this),
                  select: r(this._select, this),
                  copyAnchorStyles: !1,
                }).data(c);
                this._createWindow();
                t.filterable && this._initFilterForm();
              },
              _initFilterForm: function () {
                var n = this.menu.element.find("." + o),
                  t = r(this._filter, this);
                this._filterOperator = new i.ui.DropDownList(n.find("select"));
                this._filterValue = n.find(".k-textbox");
                this._updateFilterAriaLabel();
                n.on("submit" + f, t)
                  .on("click" + f, ".k-button-filter", t)
                  .on("click" + f, ".k-button-clear", r(this._reset, this));
              },
              _setFilterForm: function (n) {
                var t = this._filterOperator,
                  i = "",
                  r = "";
                n && ((i = n.operator), (r = n.value));
                t.value(i);
                t.value() || t.select(0);
                this._filterValue.val(r);
              },
              _clearFilters: function (n) {
                var i,
                  u,
                  t = this.dataSource.filter() || {},
                  r = 0;
                for (
                  t.filters = t.filters || [], i = e(t, n), u = i.length;
                  r < u;
                  r++
                )
                  t.filters.splice(t.filters.indexOf(i[r]), 1);
                return t;
              },
              _convert: function (t) {
                var r = this.dataSource.options.schema,
                  i = ((r.model || {}).fields || {})[this.currentMember];
                return (
                  i &&
                    ("number" === i.type
                      ? (t = parseFloat(t))
                      : "boolean" === i.type && (t = !!n.parseJSON(t))),
                  t
                );
              },
              _filter: function (n) {
                var u,
                  r,
                  i = this,
                  f = i._convert(i._filterValue.val());
                return (
                  n.preventDefault(),
                  "" === f
                    ? (i.menu.close(), t)
                    : ((u = {
                        field: i.currentMember,
                        operator: i._filterOperator.value(),
                        value: f,
                      }),
                      (r = i._clearFilters(i.currentMember)),
                      r.filters.push(u),
                      i.dataSource.filter(r),
                      i.menu.close(),
                      t)
                );
              },
              _updateFilterAriaLabel: function () {
                var n = this.menu.element.find("." + o),
                  t = this._filterOperator.value(),
                  i = this.options.messages.operators[t];
                n.find("select").attr(l, i);
              },
              _reset: function (n) {
                var t = this,
                  i = t._clearFilters(t.currentMember);
                n.preventDefault();
                i.filters[0] || (i = {});
                t.dataSource.filter(i);
                t._setFilterForm(null);
                t.menu.close();
              },
              _sort: function (n) {
                var i = this.currentMember,
                  t = this.dataSource.sort() || [];
                t = a(t, i);
                t.push({ field: i, dir: n });
                this.dataSource.sort(t);
                this.menu.close();
              },
              setDataSource: function (n) {
                this.options.dataSource = n;
                this._dataSource();
              },
              _dataSource: function () {
                this.dataSource = i.data.PivotDataSource.create(
                  this.options.dataSource
                );
              },
              _createWindow: function () {
                var t = this.options.messages;
                this.includeWindow = n(i.template(b)({ messages: t }))
                  .on("click" + f, ".k-button-ok", r(this._applyIncludes, this))
                  .on(
                    "click" + f,
                    ".k-button-cancel",
                    r(this._closeWindow, this)
                  );
                this.includeWindow = new u.Window(this.includeWindow, {
                  title: t.title,
                  visible: !1,
                  resizable: !1,
                  open: r(this._windowOpen, this),
                });
              },
              _applyIncludes: function (n) {
                var i,
                  r = [],
                  f = this.treeView.dataSource.view(),
                  o = f[0].checked,
                  t = this.dataSource.filter(),
                  u = e(t, this.currentMember, "in")[0];
                h(f, r);
                u &&
                  (o
                    ? (t.filters.splice(t.filters.indexOf(u), 1),
                      t.filters.length || (t = {}))
                    : (u.value = r.join(",")),
                  (i = t));
                r.length &&
                  (i ||
                    o ||
                    ((i = {
                      field: this.currentMember,
                      operator: "in",
                      value: r.join(","),
                    }),
                    t && (t.filters.push(i), (i = t))));
                i && this.dataSource.filter(i);
                this._closeWindow(n);
              },
              _closeWindow: function (n) {
                n.preventDefault();
                this.includeWindow.close();
              },
              _treeViewDataSource: function () {
                var n = this;
                return i.data.HierarchicalDataSource.create({
                  schema: {
                    model: {
                      id: "uniqueName",
                      hasChildren: function (n) {
                        return parseInt(n.childrenCardinality, 10) > 0;
                      },
                    },
                  },
                  transport: {
                    read: function (t) {
                      var i = {},
                        r = n.treeView.dataSource.get(t.data.uniqueName),
                        u = t.data.uniqueName;
                      u
                        ? ((i.memberUniqueName = r.uniqueName.replace(
                            /\&/g,
                            "&amp;"
                          )),
                          (i.treeOp = 1))
                        : (i.levelUniqueName = n.currentMember + ".[(ALL)]");
                      n.dataSource
                        .schemaMembers(i)
                        .done(function (i) {
                          v(n.dataSource.filter(), n.currentMember, i);
                          t.success(i);
                        })
                        .fail(t.error);
                    },
                  },
                });
              },
              _createTreeView: function (n) {
                var t = this;
                t.treeView = new u.TreeView(n, {
                  autoBind: !1,
                  dataSource: t._treeViewDataSource(),
                  dataTextField: "caption",
                  template: "#: data.item.caption || data.item.name #",
                  checkboxes: { checkChildren: !0 },
                  dataBound: function () {
                    u.progress(t.includeWindow.element, !1);
                  },
                });
              },
              _menuOpen: function (t) {
                if (t.event) {
                  var r = i.attr("name");
                  this.currentMember = n(t.event.target)
                    .closest("[" + r + "]")
                    .attr(r);
                  this.options.filterable &&
                    this._setFilterForm(
                      e(this.dataSource.filter(), this.currentMember)[0]
                    );
                }
              },
              _select: function (t) {
                var i = n(t.item);
                n(".k-pivot-filter-window")
                  .not(this.includeWindow.element)
                  .kendoWindow("close");
                i.hasClass("k-include-item")
                  ? this.includeWindow.center().open()
                  : i.hasClass("k-sort-asc")
                  ? this._sort("asc")
                  : i.hasClass("k-sort-desc")
                  ? this._sort("desc")
                  : i.hasClass(o) && this._updateFilterAriaLabel();
              },
              _windowOpen: function () {
                this.treeView ||
                  this._createTreeView(
                    this.includeWindow.element.find(".k-treeview")
                  );
                u.progress(this.includeWindow.element, !0);
                this.treeView.dataSource.read();
              },
              destroy: function () {
                s.fn.destroy.call(this);
                this.menu && (this.menu.destroy(), (this.menu = null));
                this.treeView &&
                  (this.treeView.destroy(), (this.treeView = null));
                this.includeWindow &&
                  (this.includeWindow.destroy(), (this.includeWindow = null));
                this.wrapper = null;
                this.element = null;
              },
            }),
            p =
              '<div class="k-filterable k-content" tabindex="-1" data-role="fieldmenu"><form class="k-filter-menu"><div><div class="k-filter-help-text">#=messages.info#</div><select>#for(var op in messages.operators){#<option value="#=op#">#=messages.operators[op]#</option>#}#</select><input class="k-textbox" type="text" ' +
              l +
              '="#=messages.filter#" title="#=messages.filter#" /><div><a class="k-button k-primary k-button-filter" href="\\#">#=messages.filter#</a><a class="k-button k-button-clear" href="\\#">#=messages.clear#</a></div></div></form></div>',
            w =
              '<ul class="k-pivot-fieldmenu"># if (sortable) {#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span>${messages.sortDescending}</span></li># if (filterable) {#<li class="k-separator"></li># } ## } ## if (filterable) {#<li class="k-item k-include-item"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.include}</span></li><li class="k-separator"></li><li class="k-item ' +
              o +
              '"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.filterFields}</span><ul><li>' +
              p +
              "</li></ul></li># } #</ul>",
            b =
              '<div class="k-popup-edit-form k-pivot-filter-window"><div class="k-edit-form-container"><div class="k-treeview"></div><div class="k-edit-buttons k-state-default"><a class="k-button k-primary k-button-ok" href="\\#">${messages.ok}</a><a class="k-button k-button-cancel" href="\\#">${messages.cancel}</a></div></div>';
          u.plugin(y);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.filter.min", ["kendo.core.min", "kendo.buttongroup.min"], n);
  })(
    function () {
      var t = {
          number:
            "<input type='text' title='#=field#' data-#=ns#role='numerictextbox' data-#=ns#bind='value: value'/>",
          string:
            "<input type='text' title='#=field#' class='k-textbox' data-#=ns#bind='value: value'/>",
          boolean:
            "# var checkboxGuid = kendo.guid(); # <input class='k-checkbox' data-role='checkbox' id='#= checkboxGuid #' data-#=ns#bind='checked: value' type='checkbox'><label for='#= checkboxGuid #' class='k-checkbox-label k-no-text'>&\\#8203;</label>",
          date: "<input type='text' title='#=field#' data-#=ns#role='datepicker' data-#=ns#bind='value: value'/>",
        },
        i =
          "<select data-#=ns#bind='value: operator' title='#=operatorsLabel#' data-#=ns#role='dropdownlist'>#for(var op in operators){#<option value='#=op#'>#=operators[op]#</option>#}#</select>",
        n =
          "<div data-#=ns#bind='value: logic' data-#=ns#role='filterbuttongroup'>#for(var op in operators){#<span value='#=op#'>#=operators[op]#</span>#}#</div>",
        r =
          "<ul class='k-filter-container'><li class='k-filter-group-main'></li></ul>",
        u =
          "<div class='k-filter-toolbar'><div class='k-toolbar' id='#=uid#'><div class='k-filter-toolbar-item'>" +
          n +
          "</div><div class='k-filter-toolbar-item'><button data-role='button' class='k-button k-button-icon' role='button' aria-disabled='false' title='#=addExpression#' aria-label='#=addExpression#' tabindex='0'><span class='k-icon k-i-filter-add-expression'></span></button></div><div class='k-filter-toolbar-item'><button data-role='button' class='k-button k-button-icon' role='button' aria-disabled='false' title='#=addGroup#' aria-label='#=addGroup#' tabindex='0'><span class='k-icon k-i-filter-add-group'></span></button></div><div class='k-filter-toolbar-item'><button data-role='button' class='k-button-flat k-button k-button-icon' role='button' title='#=close#' aria-label='#=close#' aria-disabled='false' tabindex='0'><span class='k-icon k-i-close'></span></button></div></div></div>",
        f =
          "<li class='k-filter-item'><div class='k-filter-toolbar'><div class='k-toolbar'><div class='k-filter-toolbar-item'>" +
          n +
          "</div><div class='k-filter-toolbar-item'><button data-role='button' class='k-button k-button-icon' role='button' title='#=addExpression#' aria-label='#=addExpression#' aria-disabled='false' tabindex='0'><span class='k-icon k-i-filter-add-expression'></span></button></div><div class='k-filter-toolbar-item'><button data-role='button' class='k-button k-button-icon' role='button' title='#=addGroup#' aria-label='#=addGroup#' aria-disabled='false' tabindex='0'><span class='k-icon k-i-filter-add-group'></span></button></div><div class='k-filter-toolbar-item'><button data-role='button' class='k-button-flat k-button k-button-icon' role='button' title='#=close#' aria-label='#=close#' aria-disabled='false' tabindex='0'><span class='k-icon k-i-close'></span></button></div></div></div></li>",
        e =
          "<li class='k-filter-item'><div class='k-filter-toolbar'><div class='k-toolbar' id='#=uid#'><div class='k-filter-toolbar-item k-filter-field'><select data-#=ns#bind='value: field' title='#=fieldsLabel#' class='k-filter-dropdown' data-auto-width='true' data-#=ns#role='dropdownlist'>#for(var current in fields){#<option value='#=fields[current].name#'>#=fields[current].label#</option>#}#</select></div><div class='k-filter-toolbar-item k-filter-operator'></div><div class='k-filter-toolbar-item k-filter-value'></div><div class='k-filter-toolbar-item'><button data-role='button' class='k-button-flat k-button k-button-icon' role='button' title='#=close#' aria-label='#=close#' aria-disabled='false' tabindex='0'><span class='k-icon k-i-close'></span></button></div></div></div></li>";
      return (
        (function (n) {
          function s(n, t) {
            var i, r;
            if (n.uid === t) return n;
            if (n.filters)
              for (i = 0; i < n.filters.length; i++)
                if ((r = s(n.filters[i], t))) return r;
          }
          var o = window.kendo,
            h = o.ui,
            a = h.Widget,
            v = h.ButtonGroup,
            y = "change",
            p = ".kendoFilter",
            c = "Is equal to",
            l = "Is not equal to",
            w = n.proxy,
            b = v.extend({
              init: function (n, t) {
                var i = this;
                v.fn.init.call(i, n, t);
              },
              options: { name: "FilterButtonGroup" },
              value: function (n) {
                return void 0 === n
                  ? this._value
                  : ((this._value = n),
                    v.fn.select.call(
                      this,
                      this.wrapper.find("[value='" + n + "']")[0]
                    ),
                    void this.trigger(y));
              },
              select: function (t) {
                t !== -1 && this.value(n(t).attr("value"));
              },
            }),
            k = a.extend({
              init: function (t, i) {
                var u,
                  r = this;
                a.fn.init.call(r, t, i);
                r.element = n(t).addClass("k-widget k-filter");
                r.dataSource = i.dataSource;
                r.operators = n.extend(r.options.operators, i.operators);
                r._getFieldsInfo();
                r._modelChangeHandler = w(r._modelChange, r);
                r._renderMain();
                i.expression && r._addExpressionTree(r.filterModel);
                r._renderApplyButton();
                r.options.expressionPreview &&
                  (r._previewContainer ||
                    (r._previewContainer = n(
                      '<div class="k-filter-preview"></div>'
                    ).insertAfter(r.element.children().eq(0))),
                  (u = r._createPreview(r.filterModel.toJSON())),
                  r._previewContainer.html(u));
                r._attachEvents();
              },
              events: [y],
              options: {
                name: "Filter",
                dataSource: null,
                expression: null,
                applyButton: !1,
                fields: [],
                mainLogic: "and",
                messages: {
                  and: "And",
                  or: "Or",
                  apply: "Apply",
                  close: "Close",
                  addExpression: "Add Expression",
                  fields: "Fields",
                  operators: "Operators",
                  addGroup: "Add Group",
                },
                operators: {
                  string: {
                    eq: c,
                    neq: l,
                    startswith: "Starts with",
                    contains: "Contains",
                    doesnotcontain: "Does not contain",
                    endswith: "Ends with",
                    isnull: "Is null",
                    isnotnull: "Is not null",
                    isempty: "Is empty",
                    isnotempty: "Is not empty",
                    isnullorempty: "Has no value",
                    isnotnullorempty: "Has value",
                  },
                  number: {
                    eq: c,
                    neq: l,
                    gte: "Is greater than or equal to",
                    gt: "Is greater than",
                    lte: "Is less than or equal to",
                    lt: "Is less than",
                    isnull: "Is null",
                    isnotnull: "Is not null",
                  },
                  date: {
                    eq: c,
                    neq: l,
                    gte: "Is after or equal to",
                    gt: "Is after",
                    lte: "Is before or equal to",
                    lt: "Is before",
                    isnull: "Is null",
                    isnotnull: "Is not null",
                  },
                  boolean: { eq: c, neq: l },
                },
              },
              applyFilter: function () {
                var n = this.filterModel.toJSON();
                this.dataSource.filter(
                  this._hasFieldsFilter(n.filters || []) ? n : {}
                );
              },
              destroy: function () {
                this.element.off(p);
                o.destroy(this.element.find(".k-filter-group-main"));
                this._previewContainer = null;
                this._applyButton = null;
                this._modelChangeHandler = null;
                a.fn.destroy.call(this);
              },
              setOptions: function (n) {
                o.deepExtend(this.options, n);
                this.destroy();
                this.element.empty();
                this.init(this.element, this.options);
              },
              getOptions: function () {
                var t = n.extend(!0, {}, this.options);
                return (
                  delete t.dataSource,
                  (t.expression = this.filterModel.toJSON()),
                  t
                );
              },
              _addExpressionTree: function (n) {
                var i, t;
                if (n.filters)
                  for (
                    i = this.element.find("[id=" + n.uid + "]"), t = 0;
                    t < n.filters.length;
                    t++
                  )
                    n.filters[t].logic
                      ? this._addGroup(i, n.filters[t])
                      : this._addExpression(i, n.filters[t]),
                      n.filters[t].filters &&
                        this._addExpressionTree(n.filters[t]);
              },
              _attachEvents: function () {
                var t = this;
                t.element.on("click" + p, "button.k-button", function (i) {
                  var r, f, u;
                  i.preventDefault();
                  r = n(i.currentTarget);
                  f = r.find("span");
                  u = (f.length ? f : r).attr("class").split("-").pop();
                  "close" == u
                    ? t._removeExpression(r.closest(".k-toolbar"))
                    : "expression" == u
                    ? t._addExpression(r.closest(".k-toolbar"))
                    : "group" == u
                    ? t._addGroup(r.closest(".k-toolbar"))
                    : "apply" == u && t.applyFilter();
                });
              },
              _addExpression: function (t, i) {
                var u,
                  r = this,
                  l = t.attr("id"),
                  f = t.closest(".k-filter-toolbar").next("ul.k-filter-lines"),
                  h = i ? r._fields[i.field] : r._defaultField,
                  c = "";
                i
                  ? (u = i)
                  : ((u = s(r.filterModel, l)),
                    u.filters || u.set("filters", []),
                    (u = r._addNewModel(u.filters, h)));
                f.length ||
                  (f = n("<ul class='k-filter-lines'></ul>").appendTo(
                    t.closest("li")
                  ));
                c = n(
                  o.template(e)({
                    fields: r._fields,
                    operators: r.operators[h.type],
                    close: r.options.messages.close,
                    fieldsLabel: r.options.messages.fields,
                    uid: u.uid,
                    ns: o.ns,
                  })
                ).appendTo(f);
                r._addExpressionControls(c.find(".k-toolbar"), h, u);
                i || r._expressionChange();
              },
              _addExpressionControls: function (n, t, i) {
                var f = n.find(".k-filter-toolbar-item"),
                  r = f.eq(1),
                  u = f.eq(2);
                o.destroy(r);
                o.destroy(u);
                r.empty();
                u.empty();
                this._appendOperators(r, t);
                this._appendEditor(u, t);
                this._bindModel(n, i);
                this._showHideEditor(n, i);
              },
              _appendOperators: function (t, r) {
                n(
                  o.template(i)({
                    operators: this.operators[r.type],
                    operatorsLabel: this.options.messages.operators,
                    ns: o.ns,
                  })
                ).appendTo(t);
              },
              _appendEditor: function (t, i) {
                o.isFunction(i.editor)
                  ? i.editor(t, n.extend(!0, {}, { field: i.name }))
                  : n(
                      o.template(i.editor)({ ns: o.ns, field: i.name })
                    ).appendTo(t);
              },
              _addNewModel: function (n, t) {
                var i;
                return (
                  n.push({ field: t.name }),
                  (i = n[n.length - 1]),
                  i.set("value", t.defaultValue),
                  i.set("operator", "eq"),
                  i
                );
              },
              _addGroup: function (t, i) {
                var h,
                  u = this,
                  r = u.filterModel,
                  c = t.attr("id"),
                  e = t.closest(".k-filter-toolbar").next("ul.k-filter-lines");
                i
                  ? (r = i)
                  : ((r = s(r, c)),
                    r.filters || r.set("filters", []),
                    r.filters.push({ logic: u.options.mainLogic }),
                    (r = r.filters[r.filters.length - 1]));
                e.length ||
                  (e = n("<ul class='k-filter-lines'></ul>").appendTo(
                    t.closest("li")
                  ));
                h = n(
                  o.template(f)({
                    operators: {
                      and: u.options.messages.and,
                      or: u.options.messages.or,
                    },
                    addExpression: u.options.messages.addExpression,
                    addGroup: u.options.messages.addGroup,
                    close: u.options.messages.close,
                    ns: o.ns,
                  })
                ).appendTo(e);
                u._bindModel(h.find(".k-toolbar"), r);
                i || u._expressionChange();
              },
              _bindModel: function (n, t) {
                n.attr("id", t.uid);
                t.bind("change", this._modelChangeHandler);
                o.bind(n, t);
                n.parent().attr(o.attr("stop"), !0);
              },
              _createPreview: function (n) {
                var i,
                  r,
                  t = "",
                  u = !1,
                  e = this._hasFieldsFilter(n.filters || []),
                  f = "";
                if (!n.filters || !n.filters.length || !e) return "";
                for (
                  t += '<span class="k-filter-preview-bracket">(</span>', r = 0;
                  r < n.filters.length;
                  r++
                )
                  (i = n.filters[r]),
                    i.filters &&
                      ((f = this._createPreview(i)),
                      f &&
                        (u &&
                          (t +=
                            '<span class="k-filter-preview-operator"> ' +
                            n.logic.toLocaleUpperCase() +
                            " </span>"),
                        (u = !0)),
                      (t += f)),
                    i.field &&
                      (u &&
                        (t +=
                          '<span class="k-filter-preview-operator"> ' +
                          n.logic.toLocaleUpperCase() +
                          " </span>"),
                      (u = !0),
                      (t +=
                        '<span class="k-filter-preview-field">' +
                        this._fields[i.field].label +
                        "</span>"),
                      (t +=
                        '<span class="k-filter-preview-criteria"> ' +
                        this._getOperatorText(i.field, i.operator)),
                      i.operator.indexOf("is") < 0
                        ? ((t += " </span>"),
                          (t +=
                            "<span class='k-filter-preview-value'>'" +
                            o.htmlEncode(i.value) +
                            "'</span>"))
                        : (t += "</span>"));
                return t + '<span class="k-filter-preview-bracket">)</span>';
              },
              _expressionChange: function () {
                var n = this,
                  t = n.filterModel.toJSON(),
                  i = "";
                n.options.expressionPreview &&
                  ((i = n._createPreview(t)), n._previewContainer.html(i));
                n.trigger(y, { expression: t });
              },
              _getOperatorText: function (n, t) {
                var i = this._fields[n].type;
                return this.options.operators[i][t];
              },
              _getFieldsInfo: function () {
                var i,
                  u,
                  r = this,
                  f = r.options.fields.length
                    ? r.options.fields
                    : (r.options.dataSource.options.schema.model || {}).fields;
                r._fields = {};
                for (u in f)
                  (i = f[u]),
                    (i = n.extend(
                      !0,
                      {},
                      {
                        name: i.name || u,
                        editor: i.editorTemplate || t[i.type || "string"],
                        defaultValue: i.defaultValue || "",
                        type: i.type || "string",
                        label: i.label || i.name || u,
                      }
                    )),
                    (r._fields[i.name] = i),
                    r._defaultField || (r._defaultField = i);
              },
              _hasFieldsFilter: function (n, t) {
                t = !!t;
                for (var i = 0; i < n.length; i++)
                  if (
                    (n[i].filters &&
                      (t = this._hasFieldsFilter(n[i].filters, t)),
                    n[i].field)
                  )
                    return !0;
                return t;
              },
              _modelChange: function (n) {
                var u,
                  i,
                  r,
                  f,
                  t = this,
                  e = t.element.find("[id=" + n.sender.uid + "]");
                return (
                  t._showHideEditor(e, n.sender),
                  "field" !== n.field
                    ? void ("filters" !== n.field && t._expressionChange())
                    : ((u = n.sender.field),
                      (i = n.sender.parent()),
                      (r = t._fields[u]),
                      (f = t._addNewModel(i, r)),
                      n.sender.unbind("change", t._modelChangeHandler),
                      i.remove(n.sender),
                      t._addExpressionControls(e, r, f),
                      void t._expressionChange())
                );
              },
              _renderMain: function () {
                var t = this;
                n(r).appendTo(t.element);
                t.filterModel = o.observable(
                  t.options.expression
                    ? t.options.expression
                    : { logic: t.options.mainLogic }
                );
                n(
                  o.template(u)({
                    operators: {
                      and: t.options.messages.and,
                      or: t.options.messages.or,
                    },
                    addExpression: t.options.messages.addExpression,
                    addGroup: t.options.messages.addGroup,
                    close: t.options.messages.close,
                    uid: t.filterModel.uid,
                    ns: o.ns,
                  })
                ).appendTo(t.element.find("li:first"));
                t._bindModel(t.element.find(".k-toolbar:first"), t.filterModel);
              },
              _removeExpression: function (n) {
                var r,
                  u,
                  i = this,
                  f = n.attr("id"),
                  t = n.closest("li"),
                  e = t.hasClass("k-filter-group-main");
                e
                  ? ((t = t.find(".k-filter-lines")),
                    i.filterModel.filters &&
                      (i.filterModel.filters.empty(),
                      delete i.filterModel.filters))
                  : ((u = s(i.filterModel, f)),
                    (r = u.parent()),
                    u.unbind("change", i._modelChangeHandler),
                    r.remove(u),
                    r.length || delete r.parent().filters,
                    t.siblings().length || (t = t.parent()));
                o.destroy(t);
                t.remove();
                i._expressionChange();
              },
              _renderApplyButton: function () {
                var t = this;
                t.options.applyButton &&
                  (t._applyButton ||
                    (t._applyButton = n(
                      o.format(
                        '<button type="button" aria-label="{0}" title="{0}" class="k-button k-filter-apply">{0}</button>',
                        t.options.messages.apply
                      )
                    ).appendTo(t.element)));
              },
              _showHideEditor: function (n, t) {
                var i, r;
                t.logic ||
                  ((i = t.operator),
                  (r = n.find(".k-filter-toolbar-item:eq(2)")),
                  "isnull" == i ||
                  "isnotnull" == i ||
                  "isempty" == i ||
                  "isnotempty" == i ||
                  "isnullorempty" == i ||
                  "isnotnullorempty" == i
                    ? r.hide()
                    : r.show());
              },
            });
          h.plugin(k);
          h.plugin(b);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.filtercell.min",
      [
        "kendo.autocomplete.min",
        "kendo.datepicker.min",
        "kendo.numerictextbox.min",
        "kendo.combobox.min",
        "kendo.dropdownlist.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function u(t) {
            var i = "string" == typeof t ? t : t.operator;
            return n.inArray(i, b) > -1;
          }
          function v(t, i) {
            var r,
              f,
              u = [];
            if (n.isPlainObject(t))
              if (t.hasOwnProperty("filters")) u = t.filters;
              else if (t.field == i) return t;
            for (n.isArray(t) && (u = t), r = 0; r < u.length; r++)
              if ((f = v(u[r], i))) return f;
          }
          function y(t, i) {
            t.filters &&
              (t.filters = n.grep(t.filters, function (n) {
                return y(n, i), n.filters ? n.filters.length : n.field != i;
              }));
          }
          function w(n, t) {
            var r = i.getter(t, !0);
            return function (t) {
              for (var i, u, f = n(t), e = [], o = 0, s = {}; o < f.length; )
                (i = f[o++]),
                  (u = r(i)),
                  s.hasOwnProperty(u) || (e.push(i), (s[u] = !0));
              return e;
            };
          }
          var i = window.kendo,
            p = i.ui,
            h = i.data.DataSource,
            c = p.Widget,
            r = "change",
            l = "boolean",
            a = "enums",
            f = "string",
            e = "Is equal to",
            o = "Is not equal to",
            s = n.proxy,
            b = [
              "isnull",
              "isnotnull",
              "isempty",
              "isnotempty",
              "isnullorempty",
              "isnotnullorempty",
            ],
            k = c.extend({
              init: function (e, o) {
                var b, h, g, nt, tt, it, v, y, p, k, rt, d, w;
                if (
                  ((e = n(e).addClass("k-filtercell")),
                  (b = this.wrapper = n("<span/>").appendTo(e)),
                  (h = this),
                  (tt = o),
                  (y = h.operators = o.operators || {}),
                  (p = h.input =
                    n("<input/>")
                      .attr(i.attr("bind"), "value: value")
                      .appendTo(b)),
                  (k = o ? o.suggestDataSource : null),
                  k && (o = n.extend({}, o, { suggestDataSource: {} })),
                  c.fn.init.call(h, e[0], o),
                  k && (h.options.suggestDataSource = k),
                  (o = h.options),
                  (g = h.dataSource = o.dataSource),
                  (h.model = g.reader.model),
                  (v = o.type = f),
                  (rt = i.getter("reader.model.fields", !0)(g) || {}),
                  (d = rt[o.field]),
                  d && d.type && (v = o.type = d.type),
                  o.values && (o.type = v = a),
                  (y = y[v] || o.operators[v]),
                  !tt.operator)
                )
                  for (it in y) {
                    o.operator = it;
                    break;
                  }
                h._parse = function (n) {
                  return null != n ? n + "" : n;
                };
                h.model &&
                  h.model.fields &&
                  ((w = h.model.fields[o.field]),
                  w && w.parse && (h._parse = s(w.parse, w)));
                h.defaultOperator = o.operator;
                h.viewModel = nt = i.observable({
                  operator: o.operator,
                  value: null,
                  operatorVisible: function () {
                    var n = this.get("value");
                    return (
                      (null !== n && n !== t && "undefined" != n) ||
                      (u(this.get("operator")) && !h._clearInProgress)
                    );
                  },
                });
                nt.bind(r, s(h.updateDsFilter, h));
                v == f && h.initSuggestDataSource(o);
                null !== o.inputWidth &&
                  (p.addClass("k-sized-input"), p.width(o.inputWidth));
                p.attr("aria-label", h._getColumnTitle());
                p.attr("title", h._getColumnTitle());
                h._setInputType(o, v);
                v != l && o.showOperators !== !1
                  ? h._createOperatorDropDown(y)
                  : (n('<div unselectable="on" />')
                      .css("display", "none")
                      .text("eq")
                      .appendTo(b),
                    b.addClass("k-operator-hidden"));
                h._createClearIcon();
                i.bind(this.wrapper, nt);
                v == f && (o.template || h.setAutoCompleteSource());
                v == a && h.setComboBoxSource(h.options.values);
                h._refreshUI();
                h._refreshHandler = s(h._refreshUI, h);
                h.dataSource.bind(r, h._refreshHandler);
              },
              _setInputType: function (t, r) {
                var o,
                  c,
                  v,
                  s,
                  h,
                  u = this,
                  e = u.input;
                "function" == typeof t.template
                  ? (t.template.call(u.viewModel, {
                      element: u.input,
                      dataSource: u.suggestDataSource,
                    }),
                    u._angularItems("compile"))
                  : r == f
                  ? e
                      .attr(i.attr("role"), "autocomplete")
                      .attr(i.attr("text-field"), t.dataTextField || t.field)
                      .attr(i.attr("filter"), t.suggestionOperator)
                      .attr(i.attr("delay"), t.delay)
                      .attr(i.attr("min-length"), t.minLength)
                      .attr(i.attr("value-primitive"), !0)
                  : "date" == r
                  ? e.attr(i.attr("role"), "datepicker")
                  : r == l
                  ? (e.remove(),
                    (o = n("<input type='radio'/>")),
                    (c = u.wrapper),
                    (v = i.guid()),
                    (s = n("<label/>").text(t.messages.isTrue).append(o)),
                    o
                      .attr(i.attr("bind"), "checked:value")
                      .attr("name", v)
                      .val("true"),
                    (h = s.clone().text(t.messages.isFalse)),
                    o.clone().val("false").appendTo(h),
                    c.append([s, h]))
                  : "number" == r
                  ? e
                      .attr(i.attr("role"), "numerictextbox")
                      .attr("title", u._getColumnTitle())
                  : r == a &&
                    e
                      .attr(i.attr("role"), "combobox")
                      .attr(i.attr("text-field"), "text")
                      .attr(i.attr("suggest"), !0)
                      .attr(i.attr("filter"), "contains")
                      .attr(i.attr("value-field"), "value")
                      .attr(i.attr("value-primitive"), !0);
              },
              _getColumnTitle: function () {
                var n = this.options.column;
                return n ? n.title || n.field : "";
              },
              _createOperatorDropDown: function (t) {
                var r,
                  u,
                  f = [],
                  e = this.viewModel;
                for (r in t) f.push({ text: t[r], value: r });
                u = n(
                  '<input class="k-dropdown-operator" ' +
                    i.attr("bind") +
                    '="value: operator"/>'
                ).appendTo(this.wrapper);
                this.operatorDropDown = u
                  .kendoDropDownList({
                    dataSource: f,
                    dataTextField: "text",
                    dataValueField: "value",
                    open: function () {
                      this.popup.element.width(150);
                    },
                    valuePrimitive: !0,
                  })
                  .data("kendoDropDownList");
                e.bind("change", function () {
                  var n = t[e.operator];
                  u.attr("aria-label", n);
                });
                this.operatorDropDown.wrapper
                  .find(".k-i-arrow-60-down")
                  .removeClass("k-i-arrow-60-down")
                  .addClass("k-i-filter");
              },
              initSuggestDataSource: function (n) {
                var i = n.suggestDataSource;
                i instanceof h ||
                  (!n.customDataSource && i && (i.group = t),
                  (i = this.suggestDataSource = h.create(i)));
                n.customDataSource ||
                  ((i._pageSize = t),
                  (i.reader.data = w(i.reader.data, this.options.field)));
                this.suggestDataSource = i;
              },
              setAutoCompleteSource: function () {
                var n = this.input.data("kendoAutoComplete");
                n && n.setDataSource(this.suggestDataSource);
              },
              setComboBoxSource: function (n) {
                var i = h.create({ data: n }),
                  t = this.input.data("kendoComboBox");
                t && t.setDataSource(i);
              },
              _refreshUI: function () {
                var t = this,
                  i = v(t.dataSource.filter(), this.options.field) || {},
                  r = t.viewModel;
                t.manuallyUpdatingVM = !0;
                i = n.extend(!0, {}, i);
                t.options.type == l &&
                  r.value !== i.value &&
                  t.wrapper.find(":radio").prop("checked", !1);
                i.operator && r.set("operator", i.operator);
                r.set("value", i.value);
                t.manuallyUpdatingVM = !1;
              },
              updateDsFilter: function (i) {
                var e,
                  o,
                  s,
                  h,
                  f = this,
                  c = f.viewModel;
                f.manuallyUpdatingVM ||
                  ("operator" == i.field && c.value === t && !u(c)) ||
                  ("operator" == i.field &&
                    f._clearInProgress &&
                    null !== c.value) ||
                  ((e = n.extend({}, f.viewModel.toJSON(), {
                    field: f.options.field,
                  })),
                  (o = { logic: "and", filters: [] }),
                  (s = !1),
                  ((e.value !== t && null !== e.value) ||
                    (u(e) && !this._clearInProgress)) &&
                    (o.filters.push(e),
                    (s = f.trigger(r, { filter: o, field: f.options.field }))),
                  (f._clearInProgress || null === e.value) &&
                    (s = f.trigger(r, {
                      filter: null,
                      field: f.options.field,
                    })),
                  s ||
                    ((h = f._merge(o)),
                    f.dataSource.filter(h.filters.length ? h : {})));
              },
              _merge: function (t) {
                var e,
                  f,
                  s,
                  o = this,
                  h = t.logic || "and",
                  r = t.filters,
                  i = o.dataSource.filter() || { filters: [], logic: "and" };
                for (y(i, o.options.field), f = 0, s = r.length; f < s; f++)
                  (e = r[f]), (e.value = o._parse(e.value));
                return (
                  (r = n.grep(r, function (n) {
                    return ("" !== n.value && null !== n.value) || u(n);
                  })),
                  r.length &&
                    (i.filters.length
                      ? ((t.filters = r),
                        "and" !== i.logic &&
                          ((i.filters = [
                            { logic: i.logic, filters: i.filters },
                          ]),
                          (i.logic = "and")),
                        i.filters.push(r.length > 1 ? t : r[0]))
                      : ((i.filters = r), (i.logic = h))),
                  i
                );
              },
              _createClearIcon: function () {
                var t = this;
                n(
                  "<button type='button' class='k-button k-button-icon' title = " +
                    t.options.messages.clear +
                    "/>"
                )
                  .attr("aria-label", t.options.messages.clear)
                  .attr(i.attr("bind"), "visible:operatorVisible")
                  .html("<span class='k-icon k-i-filter-clear'/>")
                  .click(s(t.clearFilter, t))
                  .appendTo(t.wrapper);
              },
              clearFilter: function () {
                this._clearInProgress = !0;
                u(this.viewModel.operator) &&
                  this.viewModel.set("operator", this.defaultOperator);
                this.viewModel.set("value", null);
                this._clearInProgress = !1;
              },
              _angularItems: function (n) {
                var t = this.wrapper.closest("th").get(),
                  i = this.options.column;
                this.angular(n, function () {
                  return { elements: t, data: [{ column: i }] };
                });
              },
              destroy: function () {
                var n = this;
                n.filterModel = null;
                n.operatorDropDown = null;
                n._angularItems("cleanup");
                n._refreshHandler &&
                  (n.dataSource.bind(r, n._refreshHandler),
                  (n._refreshHandler = null));
                i.unbind(n.element);
                c.fn.destroy.call(n);
                i.destroy(n.element);
              },
              events: [r],
              options: {
                name: "FilterCell",
                delay: 200,
                minLength: 1,
                inputWidth: null,
                values: t,
                customDataSource: !1,
                field: "",
                dataTextField: "",
                type: "string",
                suggestDataSource: null,
                suggestionOperator: "startswith",
                operator: "eq",
                showOperators: !0,
                template: null,
                messages: {
                  isTrue: "is true",
                  isFalse: "is false",
                  filter: "Filter",
                  clear: "Clear",
                  operator: "Operator",
                },
                operators: {
                  string: {
                    eq: e,
                    neq: o,
                    startswith: "Starts with",
                    contains: "Contains",
                    doesnotcontain: "Does not contain",
                    endswith: "Ends with",
                    isnull: "Is null",
                    isnotnull: "Is not null",
                    isempty: "Is empty",
                    isnotempty: "Is not empty",
                    isnullorempty: "Has no value",
                    isnotnullorempty: "Has value",
                  },
                  number: {
                    eq: e,
                    neq: o,
                    gte: "Is greater than or equal to",
                    gt: "Is greater than",
                    lte: "Is less than or equal to",
                    lt: "Is less than",
                    isnull: "Is null",
                    isnotnull: "Is not null",
                  },
                  date: {
                    eq: e,
                    neq: o,
                    gte: "Is after or equal to",
                    gt: "Is after",
                    lte: "Is before or equal to",
                    lt: "Is before",
                    isnull: "Is null",
                    isnotnull: "Is not null",
                  },
                  enums: {
                    eq: e,
                    neq: o,
                    isnull: "Is null",
                    isnotnull: "Is not null",
                  },
                },
              },
            });
          p.plugin(k);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.panelbar.min", ["kendo.data.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function h(t) {
            t = n(t);
            t.filter(".k-first:not(:first-child)").removeClass(bt);
            t.filter(".k-last:not(:last-child)").removeClass(wt);
            t.filter(":first-child").addClass(bt);
            t.filter(":last-child").addClass(wt);
          }
          function li(t) {
            var u = t,
              i = t.children("ul"),
              r = u.children(".k-link").children(".k-icon");
            t.hasClass("k-panelbar") ||
              (!r.length && i.length
                ? (r = n("<span class='k-icon' />").appendTo(u))
                : (i.length && i.children().length) ||
                  (r.remove(), i.remove()));
          }
          var r = window.kendo,
            g = r.ui,
            c = r.keys,
            i = n.extend,
            nt = n.proxy,
            lt = n.each,
            at = n.isArray,
            e = r.template,
            vt = g.Widget,
            yt = r.data.HierarchicalDataSource,
            ai = /^(ul|a|div)$/i,
            s = ".kendoPanelBar",
            gt = "img",
            pt = "href",
            wt = "k-last",
            tt = "k-link",
            u = "." + tt,
            it = "error",
            f = ".k-item",
            b = ".k-group:visible",
            ni = "k-image",
            bt = "k-first",
            rt = "change",
            kt = "expand",
            ti = "select",
            ut = "k-content",
            ii = "activate",
            ft = "collapse",
            ri = "dataBound",
            ui = "mouseenter",
            vi = "mouseleave",
            fi = "contentLoad",
            yi = "undefined",
            l = "k-state-active",
            y = "> .k-panel",
            k = "> .k-content",
            pi = "string",
            ei = "k-state-focused",
            o = "k-state-disabled",
            p = "k-state-selected",
            et = "." + p,
            a = "k-state-highlight",
            d = f + ":not(.k-state-disabled)",
            oi = "> " + d + " > " + u + ", .k-panel > " + d + " > " + u,
            wi = f + ".k-state-disabled > .k-link",
            si = "> li > " + et + ", .k-panel > li > " + et,
            bi = "k-state-default",
            dt = "aria-disabled",
            w = "aria-expanded",
            ot = "aria-hidden",
            st = "aria-selected",
            v = ":visible",
            ki = ":empty",
            hi = "single",
            ht = {
              text: "dataTextField",
              url: "dataUrlField",
              spriteCssClass: "dataSpriteCssClassField",
              imageUrl: "dataImageUrlField",
            },
            ct = {
              aria: function (n) {
                var t = "";
                return (
                  (n.items || n.content || n.contentUrl || n.expanded) &&
                    (t += w + "='" + (n.expanded ? "true" : "false") + "' "),
                  n.enabled === !1 && (t += dt + "='true'"),
                  t
                );
              },
              wrapperCssClass: function (n, t) {
                var i = "k-item",
                  r = t.index;
                return (
                  (i +=
                    t.enabled === !1
                      ? " " + o
                      : t.expanded === !0
                      ? " " + l
                      : " k-state-default"),
                  0 === r && (i += " k-first"),
                  r == n.length - 1 && (i += " k-last"),
                  t.cssClass && (i += " " + t.cssClass),
                  i
                );
              },
              textClass: function (n, t) {
                var i = tt;
                return (
                  t.firstLevel && (i += " k-header"),
                  n.selected && (i += " " + p),
                  i
                );
              },
              textAttributes: function (n) {
                return n ? " href='" + n + "'" : "";
              },
              arrowClass: function (n) {
                return (
                  "k-icon" +
                  (n.expanded
                    ? " k-panelbar-collapse k-i-arrow-60-up"
                    : " k-panelbar-expand k-i-arrow-60-down")
                );
              },
              text: function (n) {
                return n.encoded === !1 ? n.text : r.htmlEncode(n.text);
              },
              groupAttributes: function (n) {
                return n.expanded !== !0 ? " style='display:none'" : "";
              },
              ariaHidden: function (n) {
                return n.expanded !== !0;
              },
              groupCssClass: function () {
                return "k-group k-panel";
              },
              contentAttributes: function (n) {
                return n.item.expanded !== !0 ? " style='display:none'" : "";
              },
              content: function (n) {
                return n.content ? n.content : n.contentUrl ? "" : "&nbsp;";
              },
              contentUrl: function (n) {
                return n.contentUrl ? 'href="' + n.contentUrl + '"' : "";
              },
            },
            ci = function (n) {
              return n.children("span").children(".k-icon");
            },
            di = r.ui.DataBoundWidget.extend({
              init: function (t, i) {
                var f,
                  e,
                  u = this;
                at(i) && (i = { dataSource: i });
                e = i && !!i.dataSource;
                vt.fn.init.call(u, t, i);
                t = u.wrapper = u.element.addClass(
                  "k-widget k-reset k-header k-panelbar"
                );
                i = u.options;
                t[0].id && (u._itemId = t[0].id + "_pb_active");
                u._tabindex();
                u._accessors();
                u._dataSource();
                u._templates();
                u._initData(e);
                u._updateClasses();
                u._animations(i);
                t.on("click" + s, oi, function (t) {
                  u._click(n(t.currentTarget)) && t.preventDefault();
                })
                  .on(ui + s + " " + vi + s, oi, u._toggleHover)
                  .on("click" + s, wi, !1)
                  .on("click" + s, ".k-request-retry", nt(u._retryRequest, u))
                  .on("keydown" + s, n.proxy(u._keydown, u))
                  .on("focus" + s, function () {
                    var n = u.select();
                    u._current(n[0] ? n : u._first());
                  })
                  .on("blur" + s, function () {
                    u._current(null);
                  })
                  .attr("role", "menu");
                f = t.find("li." + l + " > ." + ut);
                f[0] && u.expand(f.parent(), !1);
                i.dataSource || u._angularCompile();
                r.notify(u);
              },
              events: [kt, ft, ti, ii, rt, it, ri, fi],
              options: {
                name: "PanelBar",
                dataSource: {},
                animation: {
                  expand: { effects: "expand:vertical", duration: 200 },
                  collapse: { duration: 200 },
                },
                messages: {
                  loading: "Loading...",
                  requestFailed: "Request failed.",
                  retry: "Retry",
                },
                autoBind: !0,
                loadOnDemand: !0,
                expandMode: "multiple",
                template: "",
                dataTextField: null,
              },
              _angularCompile: function () {
                var n = this;
                n.angular("compile", function () {
                  return {
                    elements: n.element.children("li"),
                    data: [{ dataItem: n.options.$angular }],
                  };
                });
              },
              _angularCompileElements: function (t, i) {
                var r = this;
                r.angular("compile", function () {
                  return {
                    elements: t,
                    data: n.map(i, function (n) {
                      return [{ dataItem: n }];
                    }),
                  };
                });
              },
              _angularCleanup: function () {
                var n = this;
                n.angular("cleanup", function () {
                  return { elements: n.element.children("li") };
                });
              },
              destroy: function () {
                vt.fn.destroy.call(this);
                this.element.off(s);
                this._angularCleanup();
                r.destroy(this.element);
              },
              _initData: function (n) {
                var t = this;
                n &&
                  (t.element.empty(),
                  t.options.autoBind &&
                    (t._progress(!0), t.dataSource.fetch()));
              },
              _templates: function () {
                var t = this,
                  n = t.options,
                  i = nt(t._fieldAccessor, t);
                n.template && typeof n.template == pi
                  ? (n.template = e(n.template))
                  : n.template ||
                    (n.template = e(
                      "# var text = " +
                        i("text") +
                        "(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #"
                    ));
                t.templates = {
                  content: e(
                    "<div role='region' class='k-content'#= contentAttributes(data) #>#= content(item) #</div>"
                  ),
                  group: e(
                    "<ul role='group' aria-hidden='#= ariaHidden(group) #' class='#= groupCssClass(group) #'#= groupAttributes(group) #>#= renderItems(data) #</ul>"
                  ),
                  itemWrapper: e(
                    "# var url = " +
                      i("url") +
                      "(item); ## var imageUrl = " +
                      i("imageUrl") +
                      "(item); ## var spriteCssClass = " +
                      i("spriteCssClass") +
                      "(item); ## var contentUrl = contentUrl(item); ## var tag = url||contentUrl ? 'a' : 'span'; #<#= tag # class='#= textClass(item, group) #' #= contentUrl ##= textAttributes(url) #># if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #' /># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #'></span># } ##= data.panelBar.options.template(data) ##= arrow(data) #</#= tag #>"
                  ),
                  item: e(
                    "<li role='menuitem' #=aria(item)#class='#= wrapperCssClass(group, item) #'" +
                      r.attr("uid") +
                      "='#= item.uid #'>#= itemWrapper(data) ## if (item.items && item.items.length > 0) { ##= subGroup({ items: item.items, panelBar: panelBar, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"
                  ),
                  loading: e(
                    "<div class='k-item'><span class='k-icon k-i-loading'></span> #: data.messages.loading #</div>"
                  ),
                  retry: e(
                    "#: data.messages.requestFailed # <button class='k-button k-request-retry'>#: data.messages.retry #</button>"
                  ),
                  arrow: e("<span class='#= arrowClass(item) #'></span>"),
                  empty: e(""),
                };
              },
              setOptions: function (n) {
                var t = this.options.animation;
                this._animations(n);
                n.animation = i(!0, t, n.animation);
                "dataSource" in n && this.setDataSource(n.dataSource);
                vt.fn.setOptions.call(this, n);
              },
              expand: function (i, r) {
                var u = this,
                  f = {};
                return (
                  (i = this.element.find(i)),
                  u._animating && i.find("ul").is(":visible")
                    ? (u.one("complete", function () {
                        setTimeout(function () {
                          u.expand(i);
                        });
                      }),
                      t)
                    : ((u._animating = !0),
                      (r = r !== !1),
                      i.each(function (t, e) {
                        var s, h;
                        if (
                          ((e = n(e)),
                          (s = i.children(".k-group,.k-content")),
                          s.length || (s = u._addGroupElement(i)),
                          (h = s.add(e.find(k))),
                          !e.hasClass(o) && h.length > 0)
                        ) {
                          if (
                            u.options.expandMode == hi &&
                            u._collapseAllExpanded(e)
                          )
                            return u;
                          i.find("." + a).removeClass(a);
                          e.addClass(a);
                          r ||
                            ((f = u.options.animation),
                            (u.options.animation = {
                              expand: { effects: {} },
                              collapse: { hide: !0, effects: {} },
                            }));
                          u._triggerEvent(kt, e) || u._toggleItem(e, !1, !1);
                          r || (u.options.animation = f);
                        }
                      }),
                      u)
                );
              },
              collapse: function (t, i) {
                var r = this,
                  u = {};
                return (
                  (r._animating = !0),
                  (i = i !== !1),
                  (t = r.element.find(t)),
                  t.each(function (t, f) {
                    f = n(f);
                    var e = f.find(y).add(f.find(k));
                    !f.hasClass(o) &&
                      e.is(v) &&
                      (f.removeClass(a),
                      i ||
                        ((u = r.options.animation),
                        (r.options.animation = {
                          expand: { effects: {} },
                          collapse: { hide: !0, effects: {} },
                        })),
                      r._triggerEvent(ft, f) || r._toggleItem(f, !0),
                      i || (r.options.animation = u));
                  }),
                  r
                );
              },
              updateArrow: function (t) {
                var i = this;
                t = n(t);
                t.children(u)
                  .children(".k-panelbar-collapse, .k-panelbar-expand")
                  .remove();
                t.filter(function () {
                  var t = i.dataItem(this);
                  return t
                    ? t.hasChildren || t.content || t.contentUrl
                    : n(this).find(".k-panel").length > 0 ||
                        n(this).find(".k-content").length > 0;
                })
                  .children(".k-link:not(:has([class*=k-i-arrow]))")
                  .each(function () {
                    var t = n(this),
                      i = t.parent();
                    t.append(
                      "<span class='k-icon " +
                        (i.hasClass(l)
                          ? " k-panelbar-collapse k-i-arrow-60-up"
                          : " k-panelbar-expand k-i-arrow-60-down") +
                        "'/>"
                    );
                  });
              },
              _accessors: function () {
                var t,
                  n,
                  i,
                  u = this,
                  f = u.options,
                  e = u.element;
                for (t in ht)
                  (n = f[ht[t]]),
                    (i = e.attr(r.attr(t + "-field"))),
                    !n && i && (n = i),
                    n || (n = t),
                    at(n) || (n = [n]),
                    (f[ht[t]] = n);
              },
              _progress: function (n, t) {
                var i = this.element,
                  r = this.templates.loading({
                    messages: this.options.messages,
                  });
                1 == arguments.length
                  ? ((t = n), t ? i.html(r) : i.empty())
                  : ci(n)
                      .toggleClass("k-i-loading", t)
                      .removeClass("k-i-refresh");
              },
              _refreshRoot: function (t) {
                var u,
                  f,
                  r,
                  e = this,
                  o = e.element,
                  s = {
                    firstLevel: !0,
                    expanded: !0,
                    length: o.children().length,
                  };
                for (
                  this.element.empty(),
                    u = n.map(t, function (t, r) {
                      return "string" == typeof t
                        ? n(t)
                        : ((t.items = []),
                          n(
                            e.renderItem({ group: s, item: i(t, { index: r }) })
                          ));
                    }),
                    this.element.append(u),
                    f = this.element.children(".k-item"),
                    r = 0;
                  r < t.length;
                  r++
                )
                  this.trigger("itemChange", {
                    item: f.eq(r).find(".k-link").first(),
                    data: t[r],
                    ns: g,
                  });
                this._angularCompileElements(u, t);
              },
              _refreshChildren: function (n, t) {
                var r, i, u, f;
                if (
                  (t.children(".k-group").empty(),
                  (f = n.children.data()),
                  f.length)
                )
                  for (
                    this.append(n.children, t),
                      this.options.loadOnDemand &&
                        this._toggleGroup(t.children(".k-group"), !1),
                      i = t.children(".k-group").children("li"),
                      r = 0;
                    r < i.length;
                    r++
                  )
                    (u = i.eq(r)),
                      this.trigger("itemChange", {
                        item: u.find(".k-link").first(),
                        data: this.dataItem(u),
                        ns: g,
                      });
                else
                  li(t),
                    (i = t.children(".k-group").children("li")),
                    this._angularCompileElements(i, f);
              },
              findByUid: function (t) {
                for (
                  var f,
                    u = this.element.find(".k-item"),
                    e = r.attr("uid"),
                    i = 0;
                  i < u.length;
                  i++
                )
                  if (u[i].getAttribute(e) == t) {
                    f = u[i];
                    break;
                  }
                return n(f);
              },
              refresh: function (n) {
                var r,
                  o,
                  s = this.options,
                  e = n.node,
                  u = n.action,
                  i = n.items,
                  f = this.wrapper,
                  h = s.loadOnDemand;
                if (n.field)
                  return !i[0] || !i[0].level
                    ? void 0
                    : this._updateItems(i, n.field);
                if (
                  (e && ((f = this.findByUid(e.uid)), this._progress(f, !1)),
                  "add" == u
                    ? this._appendItems(n.index, i, f)
                    : "remove" == u
                    ? this.remove(this.findByUid(i[0].uid))
                    : "itemchange" == u
                    ? this._updateItems(i)
                    : "itemloaded" == u
                    ? this._refreshChildren(e, f)
                    : this._refreshRoot(i),
                  "remove" != u)
                )
                  for (r = 0; r < i.length; r++)
                    (h && !i[r].expanded) ||
                      ((o = i[r]), this._hasChildItems(o) && o.load());
                this.trigger(ri, { node: e ? f : t });
              },
              _error: function (n) {
                var t = n.node && this.findByUid(n.node.uid),
                  i = this.templates.retry({ messages: this.options.messages });
                t
                  ? (this._progress(t, !1),
                    this._expanded(t, !1),
                    ci(t).addClass("k-i-refresh"),
                    n.node.loaded(!1))
                  : (this._progress(!1), this.element.html(i));
              },
              _retryRequest: function (n) {
                n.preventDefault();
                this.dataSource.fetch();
              },
              items: function () {
                return this.element.find(".k-item > span:first-child");
              },
              setDataSource: function (n) {
                var t = this.options;
                t.dataSource = n;
                this._dataSource();
                this.options.autoBind &&
                  (this._progress(!0), this.dataSource.fetch());
              },
              _bindDataSource: function () {
                this._refreshHandler = nt(this.refresh, this);
                this._errorHandler = nt(this._error, this);
                this.dataSource.bind(rt, this._refreshHandler);
                this.dataSource.bind(it, this._errorHandler);
              },
              _unbindDataSource: function () {
                var n = this.dataSource;
                n &&
                  (n.unbind(rt, this._refreshHandler),
                  n.unbind(it, this._errorHandler));
              },
              _fieldAccessor: function (t) {
                var f = this.options[ht[t]] || [],
                  u = f.length,
                  i = "(function(item) {";
                return (
                  0 === u
                    ? (i += "return item['" + t + "'];")
                    : ((i +=
                        "var levels = [" +
                        n
                          .map(f, function (n) {
                            return "function(d){ return " + r.expr(n) + "}";
                          })
                          .join(",") +
                        "];"),
                      (i +=
                        "if(item.level){return levels[Math.min(item.level(), " +
                        u +
                        "-1)](item);}else"),
                      (i += "{return levels[" + u + "-1](item)}")),
                  i + "})"
                );
              },
              _dataSource: function () {
                var t = this,
                  i = t.options,
                  n = i.dataSource;
                n &&
                  ((n = at(n) ? { data: n } : n),
                  t._unbindDataSource(),
                  n.fields ||
                    (n.fields = [
                      { field: "text" },
                      { field: "url" },
                      { field: "spriteCssClass" },
                      { field: "imageUrl" },
                    ]),
                  (t.dataSource = yt.create(n)),
                  t._bindDataSource());
              },
              _appendItems: function (t, r, u) {
                var f,
                  e,
                  c,
                  s,
                  h,
                  o = this;
                for (
                  u.hasClass("k-panelbar")
                    ? ((f = u.children("li")), (e = u))
                    : ((e = u.children(".k-group")),
                      e.length || (e = o._addGroupElement(u)),
                      (f = e.children("li"))),
                    c = {
                      firstLevel: u.hasClass("k-panelbar"),
                      expanded: !0,
                      length: f.length,
                    },
                    s = n.map(r, function (t, r) {
                      return n(
                        "string" == typeof t
                          ? t
                          : o.renderItem({ group: c, item: i(t, { index: r }) })
                      );
                    }),
                    typeof t == yi && (t = f.length),
                    h = 0;
                  h < s.length;
                  h++
                )
                  0 === f.length || 0 === t
                    ? e.append(s[h])
                    : s[h].insertAfter(f[t - 1]);
                o._angularCompileElements(s, r);
                o.dataItem(u) &&
                  ((o.dataItem(u).hasChildren = !0), o.updateArrow(u));
              },
              _updateItems: function (t, r) {
                var s,
                  y,
                  e,
                  f,
                  a,
                  h,
                  u = this,
                  c = { panelBar: u.options, item: f, group: {} },
                  v = "expanded" != r;
                if ("selected" == r)
                  t[0][r]
                    ? ((a = u.findByUid(t[0].uid)),
                      a.hasClass(o) || u.select(a, !0))
                    : u.clearSelection();
                else {
                  for (
                    h = n.map(t, function (n) {
                      return u.findByUid(n.uid);
                    }),
                      v &&
                        u.angular("cleanup", function () {
                          return { elements: h };
                        }),
                      s = 0;
                    s < t.length;
                    s++
                  )
                    (c.item = f = t[s]),
                      (c.panelBar = u),
                      (e = h[s]),
                      (y = e.parent()),
                      v &&
                        ((c.group = {
                          firstLevel: y.hasClass("k-panelbar"),
                          expanded: e.parent().hasClass(l),
                          length: e.children().length,
                        }),
                        e.children(".k-link").remove(),
                        e.prepend(
                          u.templates.itemWrapper(
                            i(
                              c,
                              {
                                arrow:
                                  f.hasChildren || f.content || f.contentUrl
                                    ? u.templates.arrow
                                    : u.templates.empty,
                              },
                              ct
                            )
                          )
                        )),
                      "expanded" == r
                        ? u._toggleItem(e, !f[r], !f[r] || "true")
                        : "enabled" == r &&
                          (u.enable(e, f[r]),
                          f[r] || (f.selected && f.set("selected", !1))),
                      e.length &&
                        this.trigger("itemChange", {
                          item: e.find(".k-link").first(),
                          data: f,
                          ns: g,
                        });
                  v &&
                    u.angular("compile", function () {
                      return {
                        elements: h,
                        data: n.map(t, function (n) {
                          return [{ dataItem: n }];
                        }),
                      };
                    });
                }
              },
              _toggleDisabled: function (n, t) {
                n = this.element.find(n);
                n.toggleClass(bi, t).toggleClass(o, !t).attr(dt, !t);
              },
              dataItem: function (t) {
                var u = n(t).closest(f).attr(r.attr("uid")),
                  i = this.dataSource;
                return i && i.getByUid(u);
              },
              select: function (i, r) {
                var f = this;
                return i === t
                  ? f.element.find(si).parent()
                  : ((i = f.element.find(i)),
                    i.length
                      ? i.each(function () {
                          var i = n(this),
                            e = i.children(u);
                          return i.hasClass(o)
                            ? f
                            : (f._updateSelected(e, r), t);
                        })
                      : this._updateSelected(i),
                    f);
              },
              clearSelection: function () {
                this.select(n());
              },
              enable: function (n, t) {
                return this._toggleDisabled(n, t !== !1), this;
              },
              disable: function (n) {
                return this._toggleDisabled(n, !1), this;
              },
              append: function (n, t) {
                t = this.element.find(t);
                var i = this._insert(n, t, t.length ? t.find(y) : null);
                return (
                  lt(i.items, function () {
                    i.group.append(this);
                    h(this);
                  }),
                  this.updateArrow(t),
                  h(i.group.find(".k-first, .k-last")),
                  i.group.height("auto"),
                  this
                );
              },
              insertBefore: function (n, t) {
                t = this.element.find(t);
                var i = this._insert(n, t, t.parent());
                return (
                  lt(i.items, function () {
                    t.before(this);
                    h(this);
                  }),
                  h(t),
                  i.group.height("auto"),
                  this
                );
              },
              insertAfter: function (n, t) {
                t = this.element.find(t);
                var i = this._insert(n, t, t.parent());
                return (
                  lt(i.items, function () {
                    t.after(this);
                    h(this);
                  }),
                  h(t),
                  i.group.height("auto"),
                  this
                );
              },
              remove: function (n) {
                n = this.element.find(n);
                var r = this,
                  t = n.parentsUntil(r.element, f),
                  i = n.parent("ul");
                return (
                  n.remove(),
                  !i ||
                    i.hasClass("k-panelbar") ||
                    i.children(f).length ||
                    i.remove(),
                  t.length && ((t = t.eq(0)), r.updateArrow(t), h(t)),
                  r
                );
              },
              reload: function (t) {
                var i = this;
                t = i.element.find(t);
                t.each(function () {
                  var t = n(this);
                  i._ajaxRequest(t, t.children("." + ut), !t.is(v));
                });
              },
              _first: function () {
                return this.element.children(d).first();
              },
              _last: function () {
                var n = this.element.children(d).last(),
                  t = n.children(b);
                return t[0] ? t.children(d).last() : n;
              },
              _current: function (i) {
                var f = this,
                  r = f._focused,
                  e = f._itemId;
                return i === t
                  ? r
                  : (f.element.removeAttr("aria-activedescendant"),
                    r &&
                      r.length &&
                      (r[0].id === e && r.removeAttr("id"),
                      r.children(u).removeClass(ei)),
                    n(i).length &&
                      ((e = i[0].id || e),
                      i.attr("id", e).children(u).addClass(ei),
                      f.element.attr("aria-activedescendant", e)),
                    (f._focused = i),
                    t);
              },
              _keydown: function (n) {
                var t = this,
                  i = n.keyCode,
                  r = t._current();
                n.target == n.currentTarget &&
                  (i == c.DOWN || i == c.RIGHT
                    ? (t._current(t._nextItem(r)), n.preventDefault())
                    : i == c.UP || i == c.LEFT
                    ? (t._current(t._prevItem(r)), n.preventDefault())
                    : i == c.ENTER || i == c.SPACEBAR
                    ? (t._click(r.children(u)), n.preventDefault())
                    : i == c.HOME
                    ? (t._current(t._first()), n.preventDefault())
                    : i == c.END &&
                      (t._current(t._last()), n.preventDefault()));
              },
              _nextItem: function (n) {
                if (!n) return this._first();
                var i = n.children(b),
                  t = n.nextAll(":visible").first();
                return (
                  i[0] && (t = i.children("." + bt)),
                  t[0] || (t = n.parent(b).parent(f).next()),
                  t[0] || (t = this._first()),
                  t.hasClass(o) && (t = this._nextItem(t)),
                  t
                );
              },
              _prevItem: function (n) {
                if (!n) return this._last();
                var i,
                  t = n.prevAll(":visible").first();
                if (t[0])
                  for (i = t; i[0]; )
                    (i = i.children(b).children("." + wt)), i[0] && (t = i);
                else (t = n.parent(b).parent(f)), t[0] || (t = this._last());
                return t.hasClass(o) && (t = this._prevItem(t)), t;
              },
              _insert: function (t, r, u) {
                var e,
                  s,
                  o,
                  f = this,
                  c = n.isPlainObject(t),
                  h = r && r[0];
                return (
                  h || (u = f.element),
                  (s = {
                    firstLevel: u.hasClass("k-panelbar"),
                    expanded: n(r).hasClass(l),
                    length: u.children().length,
                  }),
                  h &&
                    !u.length &&
                    (u = n(
                      f.renderGroup({ group: s, options: f.options })
                    ).appendTo(r)),
                  c || n.isArray(t) || t instanceof yt
                    ? (t instanceof yt && (t = t.data()),
                      (e = n.map(c ? [t] : t, function (t, r) {
                        return n(
                          "string" == typeof t
                            ? t
                            : f.renderItem({
                                group: s,
                                item: i(t, { index: r }),
                              })
                        );
                      })),
                      h &&
                        ((o = f.dataItem(r)),
                        o
                          ? ((o.hasChildren = !0),
                            r
                              .attr(w, o.expanded)
                              .not("." + l)
                              .children("ul")
                              .attr(ot, !o.expanded))
                          : r.attr(w, !1)))
                    : ((e =
                        "string" == typeof t && "<" != t.charAt(0)
                          ? f.element.find(t)
                          : n(t)),
                      f._updateItemsClasses(e)),
                  t.length || (t = [t]),
                  f._angularCompileElements(e, t),
                  { items: e, group: u }
                );
              },
              _toggleHover: function (t) {
                var i = n(t.currentTarget);
                i.parents("li." + o).length ||
                  i.toggleClass("k-state-hover", t.type == ui);
              },
              _updateClasses: function () {
                var i,
                  r,
                  u,
                  e,
                  f,
                  t = this;
                i = t.element
                  .find("li > ul")
                  .not(function () {
                    return n(this).parentsUntil(".k-panelbar", "div").length;
                  })
                  .addClass("k-group k-panel")
                  .attr("role", "group");
                e = i.parent();
                f = t.dataItem(e);
                u = (f && f.expanded) || !1;
                i.parent()
                  .attr(w, u)
                  .not("." + l)
                  .children("ul")
                  .attr(ot, !u)
                  .hide();
                r = t.element.add(i).children();
                t._updateItemsClasses(r);
                t.updateArrow(r);
                h(r);
              },
              _updateItemsClasses: function (n) {
                for (var i = n.length, t = 0; t < i; t++)
                  this._updateItemClasses(n[t], t);
              },
              _updateItemClasses: function (t, i) {
                var o,
                  f,
                  s = this._selected,
                  e = this.options.contentUrls,
                  h = e && e[i],
                  c = this.element[0];
                t = n(t).addClass("k-item").attr("role", "menuitem");
                r.support.browser.msie &&
                  t
                    .css("list-style-position", "inside")
                    .css("list-style-position", "");
                t.children(gt).addClass(ni);
                f = t.children("a").addClass(tt);
                f[0] && (f.attr("href", h), f.children(gt).addClass(ni));
                t.filter(":not([disabled]):not([class*=k-state])").addClass(
                  "k-state-default"
                );
                t.filter("li[disabled]")
                  .addClass("k-state-disabled")
                  .attr(dt, !0)
                  .removeAttr("disabled");
                t.children("div")
                  .addClass(ut)
                  .attr("role", "region")
                  .attr(ot, !0)
                  .hide()
                  .parent()
                  .attr(w, !1);
                f = t.children(et);
                f[0] &&
                  (s && s.removeAttr(st).children(et).removeClass(p),
                  f.addClass(p),
                  (this._selected = t.attr(st, !0)));
                t.children(u)[0] ||
                  ((o = "<span class='" + tt + "'/>"),
                  e &&
                    e[i] &&
                    t[0].parentNode == c &&
                    (o = '<a class="k-link k-header" href="' + e[i] + '"/>'),
                  t
                    .contents()
                    .filter(function () {
                      return !(
                        this.nodeName.match(ai) ||
                        (3 == this.nodeType && !n.trim(this.nodeValue))
                      );
                    })
                    .wrapAll(o));
                t.parent(".k-panelbar")[0] &&
                  t.children(u).addClass("k-header");
              },
              _click: function (n) {
                var r,
                  e,
                  s,
                  p,
                  h,
                  t,
                  c,
                  l,
                  a,
                  i = this,
                  w = i.element;
                if (
                  !n.parents("li." + o).length &&
                  n.closest(".k-widget")[0] == w[0]
                ) {
                  if (
                    ((h = n.closest(u)),
                    (t = h.closest(f)),
                    i._updateSelected(h),
                    (c = t.children(".k-group,.k-content")),
                    (l = this.dataItem(t)),
                    !c.length &&
                      ((i.options.loadOnDemand && l && l.hasChildren) ||
                        this._hasChildItems(t) ||
                        t.content ||
                        t.contentUrl) &&
                      (c = i._addGroupElement(t)),
                    (e = t.find(y).add(t.find(k))),
                    (s = h.attr(pt)),
                    (p =
                      s &&
                      ("#" == s.charAt(s.length - 1) ||
                        s.indexOf("#" + i.element[0].id + "-") != -1)),
                    (r = !(!p && !e.length)),
                    e.data("animating"))
                  )
                    return r;
                  if ((i._triggerEvent(ti, t) && (r = !0), r !== !1))
                    return i.options.expandMode == hi &&
                      i._collapseAllExpanded(t)
                      ? r
                      : (e.length &&
                          ((a = e.is(v)),
                          i._triggerEvent(a ? ft : kt, t) ||
                            (r = i._toggleItem(t, a))),
                        r);
                }
              },
              _hasChildItems: function (n) {
                return (n.items && n.items.length > 0) || n.hasChildren;
              },
              _toggleItem: function (n, i, r) {
                var e,
                  o,
                  s = this,
                  h = n.find(y),
                  l = n.find(u),
                  a = l.attr(pt),
                  f = s.dataItem(n),
                  c = !i,
                  v = f && f.loaded();
                return f && !r && f.expanded !== c
                  ? (f.set("expanded", c),
                    (e = f.hasChildren || !!f.content || !!f.contentUrl))
                  : (!f || (r && "true" !== r) || v || f.content || f.contentUrl
                      ? h.length
                        ? (this._toggleGroup(h, i), (e = !0))
                        : ((o = n.children("." + ut)),
                          o.length &&
                            ((e = !0),
                            o.is(ki) && a !== t
                              ? s._ajaxRequest(n, o, i)
                              : s._toggleGroup(o, i)))
                      : (s.options.loadOnDemand && this._progress(n, !0),
                        n.children(".k-group,.k-content").remove(),
                        (e = f.hasChildren),
                        f.load()),
                    e);
              },
              _toggleGroup: function (n, r) {
                var u = this,
                  e = u.options.animation,
                  o = e.expand,
                  h = e.collapse && "effects" in e.collapse,
                  s = i({}, e.expand, e.collapse);
                return (
                  h || (s = i(s, { reverse: !0 })),
                  n.is(v) != r
                    ? ((u._animating = !1), t)
                    : (n.attr(ot, !!r),
                      n
                        .parent()
                        .attr(w, !r)
                        .toggleClass(l, !r)
                        .find(
                          "> .k-link > .k-panelbar-collapse,> .k-link > .k-panelbar-expand"
                        )
                        .toggleClass("k-i-arrow-60-up", !r)
                        .toggleClass("k-panelbar-collapse", !r)
                        .toggleClass("k-i-arrow-60-down", r)
                        .toggleClass("k-panelbar-expand", r),
                      r
                        ? ((o = i(s, { hide: !0 })),
                          (o.complete = function () {
                            u._animationCallback();
                          }))
                        : (o = i(
                            {
                              complete: function (n) {
                                u._triggerEvent(ii, n.closest(f));
                                u._animationCallback();
                              },
                            },
                            o
                          )),
                      n.kendoStop(!0, !0).kendoAnimate(o),
                      t)
                );
              },
              _animationCallback: function () {
                var n = this;
                n.trigger("complete");
                n._animating = !1;
              },
              _addGroupElement: function (t) {
                var i = n(
                  '<ul role="group" aria-hidden="true" class="k-group k-panel" style="display:none"></ul>'
                );
                return t.append(i), i;
              },
              _collapseAllExpanded: function (t) {
                var i,
                  r = this,
                  u = !1,
                  e = t.find(y).add(t.find(k));
                return (
                  e.is(v) && (u = !0),
                  e.is(v) ||
                    0 === e.length ||
                    ((i = t.siblings()),
                    i
                      .find(y)
                      .add(i.find(k))
                      .filter(function () {
                        return n(this).is(v);
                      })
                      .each(function (t, i) {
                        i = n(i);
                        u = r._triggerEvent(ft, i.closest(f));
                        u || r._toggleGroup(i, !0);
                      }),
                    r.one("complete", function () {
                      setTimeout(function () {
                        i.each(function (n, t) {
                          var i = r.dataItem(t);
                          i && i.set("expanded", !1);
                        });
                      });
                    })),
                  u
                );
              },
              _ajaxRequest: function (t, i, r) {
                var f = this,
                  e = t.find(".k-panelbar-collapse, .k-panelbar-expand"),
                  s = t.find(u),
                  h = setTimeout(function () {
                    e.addClass("k-i-loading");
                  }, 100),
                  o = s.attr(pt);
                n.ajax({
                  type: "GET",
                  cache: !1,
                  url: o,
                  dataType: "html",
                  data: {},
                  error: function (n, t) {
                    e.removeClass("k-i-loading");
                    f.trigger(it, { xhr: n, status: t }) && this.complete();
                  },
                  complete: function () {
                    clearTimeout(h);
                    e.removeClass("k-i-loading");
                  },
                  success: function (n) {
                    function e() {
                      return { elements: i.get() };
                    }
                    try {
                      f.angular("cleanup", e);
                      i.html(n);
                      f.angular("compile", e);
                    } catch (s) {
                      var u = window.console;
                      u &&
                        u.error &&
                        u.error(s.name + ": " + s.message + " in " + o);
                      this.error(this.xhr, "error");
                    }
                    f._toggleGroup(i, r);
                    f.trigger(fi, { item: t[0], contentElement: i[0] });
                  },
                });
              },
              _triggerEvent: function (n, t) {
                var i = this;
                return i.trigger(n, { item: t[0] });
              },
              _updateSelected: function (n, t) {
                var i = this,
                  u = i.element,
                  r = n.parent(f),
                  e = i._selected,
                  o = i.dataItem(r);
                e && e.removeAttr(st);
                i._selected = r.attr(st, !0);
                u.find(si).removeClass(p);
                u.find("> ." + a + ", .k-panel > ." + a).removeClass(a);
                n.addClass(p);
                n.parentsUntil(u, f).filter(":has(.k-header)").addClass(a);
                i._current(r[0] ? r : null);
                o && o.set("selected", !0);
                t || i.trigger(rt);
              },
              _animations: function (n) {
                n &&
                  "animation" in n &&
                  !n.animation &&
                  (n.animation = {
                    expand: { effects: {} },
                    collapse: { hide: !0, effects: {} },
                  });
              },
              renderItem: function (n) {
                var u,
                  r,
                  t = this;
                return (
                  (n = i({ panelBar: t, group: {} }, n)),
                  (u = t.templates.empty),
                  (r = n.item),
                  t.templates.item(
                    i(
                      n,
                      {
                        itemWrapper: t.templates.itemWrapper,
                        renderContent: t.renderContent,
                        arrow:
                          t._hasChildItems(r) || r.content || r.contentUrl
                            ? t.templates.arrow
                            : u,
                        subGroup:
                          !n.loadOnDemand || r.expanded ? t.renderGroup : u,
                      },
                      ct
                    )
                  )
                );
              },
              renderGroup: function (n) {
                var t = this,
                  r = t.templates || n.panelBar.templates;
                return r.group(
                  i(
                    {
                      renderItems: function (n) {
                        for (
                          var u = "",
                            t = 0,
                            r = n.items,
                            f = r ? r.length : 0,
                            e = i({ length: f }, n.group);
                          t < f;
                          t++
                        )
                          u += n.panelBar.renderItem(
                            i(n, { group: e, item: i({ index: t }, r[t]) })
                          );
                        return u;
                      },
                    },
                    n,
                    ct
                  )
                );
              },
              renderContent: function (n) {
                return n.panelBar.templates.content(i(n, ct));
              },
            });
          r.ui.plugin(di);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.responsivepanel.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var r = n.proxy,
            t = ".kendoResponsivePanel",
            f = "open",
            e = "close",
            i = "click" + t + " touchstart" + t + " touchend" + t,
            u = kendo.ui.Widget,
            o = u.extend({
              init: function (f, e) {
                u.fn.init.call(this, f, e);
                this._guid = "_" + kendo.guid();
                this._toggleHandler = r(this._toggleButtonClick, this);
                this._closeHandler = r(this._close, this);
                n(document.documentElement).on(
                  i,
                  this.options.toggleButton,
                  this._toggleHandler
                );
                this._registerBreakpoint();
                this.element.addClass(
                  "k-rpanel k-rpanel-" +
                    this.options.orientation +
                    " " +
                    this._guid
                );
                this._resizeHandler = r(this.resize, this, !0);
                n(window).on("resize" + t, this._resizeHandler);
              },
              _mediaQuery:
                "@media (max-width: #= breakpoint-1 #px) {.#= guid #.k-rpanel-animate.k-rpanel-left,.#= guid #.k-rpanel-animate.k-rpanel-right {-webkit-transition: -webkit-transform .2s ease-out;-ms-transition: -ms-transform .2s ease-out;transition: transform .2s ease-out;} .#= guid #.k-rpanel-top {overflow: hidden;}.#= guid #.k-rpanel-animate.k-rpanel-top {-webkit-transition: max-height .2s linear;-ms-transition: max-height .2s linear;transition: max-height .2s linear;}} @media (min-width: #= breakpoint #px) {#= toggleButton # { display: none; } .#= guid #.k-rpanel-left { float: left; } .#= guid #.k-rpanel-right { float: right; } .#= guid #.k-rpanel-left, .#= guid #.k-rpanel-right {position: relative;-webkit-transform: translateX(0);-ms-transform: translateX(0);transform: translateX(0);-webkit-transform: translateX(0) translateZ(0);-ms-transform: translateX(0) translateZ(0);transform: translateX(0) translateZ(0);} .k-ie9 .#= guid #.k-rpanel-left { left: 0; } .#= guid #.k-rpanel-top { max-height: none; }}",
              _registerBreakpoint: function () {
                var n = this.options;
                this._registerStyle(
                  kendo.template(this._mediaQuery)({
                    breakpoint: n.breakpoint,
                    toggleButton: n.toggleButton,
                    guid: this._guid,
                  })
                );
              },
              _registerStyle: function (t) {
                var r = n("head,body")[0],
                  i = document.createElement("style");
                r.appendChild(i);
                i.styleSheet
                  ? (i.styleSheet.cssText = t)
                  : i.appendChild(document.createTextNode(t));
              },
              options: {
                name: "ResponsivePanel",
                orientation: "left",
                toggleButton: ".k-rpanel-toggle",
                breakpoint: 640,
                autoClose: !0,
              },
              events: [f, e],
              _resize: function () {
                this.element.removeClass("k-rpanel-animate k-rpanel-expanded");
                n(document.documentElement).off(i, this._closeHandler);
              },
              _toggleButtonClick: function (n) {
                n.preventDefault();
                "touchend" != n.type &&
                  (this.element.hasClass("k-rpanel-expanded")
                    ? this.close()
                    : this.open());
              },
              open: function () {
                this.trigger(f) ||
                  (this.element.addClass("k-rpanel-animate k-rpanel-expanded"),
                  this.options.autoClose &&
                    n(document.documentElement).on(i, this._closeHandler));
              },
              close: function () {
                this.trigger(e) ||
                  (this.element
                    .addClass("k-rpanel-animate")
                    .removeClass("k-rpanel-expanded"),
                  n(document.documentElement).off(i, this._closeHandler));
              },
              _close: function (t) {
                var i = t.isDefaultPrevented(),
                  r = n(t.target).closest(
                    this.options.toggleButton + ",.k-rpanel"
                  );
                r.length || i || this.close();
              },
              destroy: function () {
                u.fn.destroy.call(this);
                n(window).off("resize" + t, this._resizeHandler);
                n(document.documentElement).off(i, this._closeHandler);
              },
            });
          kendo.ui.plugin(o);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.timepicker.min", ["kendo.popup.min", "kendo.dateinput.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function ii() {
            var n = new f(),
              t = new f(n.getFullYear(), n.getMonth(), n.getDate(), 0, 0, 0),
              i = new f(n.getFullYear(), n.getMonth(), n.getDate(), 12, 0, 0);
            return -1 * (t.getTimezoneOffset() - i.getTimezoneOffset());
          }
          function r(n) {
            return (
              60 * n.getHours() * w +
              n.getMinutes() * w +
              1e3 * n.getSeconds() +
              n.getMilliseconds()
            );
          }
          function ri(n) {
            var t = new Date(2100, 0, 1);
            return t.setMinutes(-n), t;
          }
          function rt(n, t, i) {
            var u,
              f = r(t),
              e = r(i);
            return (
              !n ||
              f == e ||
              ((u = r(n)),
              f > u && (u += h),
              e < f && (e += h),
              u >= f && u <= e)
            );
          }
          function ut(n) {
            var t = n.parseFormats;
            n.format = fi(
              n.format || i.getCulture(n.culture).calendars.standard.patterns.t
            );
            t = ti(t) ? t : [t];
            t.splice(0, 0, n.format);
            n.parseFormats = t;
          }
          function ft(n) {
            n.preventDefault();
          }
          function et(n, t) {
            return new Date(
              n.getFullYear(),
              n.getMonth(),
              n.getDate(),
              t.getHours(),
              t.getMinutes(),
              t.getSeconds(),
              t.getMilliseconds()
            );
          }
          var c,
            ot,
            i = window.kendo,
            s = i.keys,
            o = i.parseDate,
            ui = i._activeElement,
            fi = i._extractFormat,
            a = i.support,
            st = a.browser,
            v = i.ui,
            y = v.Widget,
            p = "open",
            ht = "close",
            d = "change",
            u = ".kendoTimePicker",
            ct = "click" + u,
            g = "k-state-default",
            lt = "disabled",
            at = "readonly",
            nt = "li",
            vt = "<span/>",
            yt = "k-state-focused",
            tt = "k-state-hover",
            ei = "mouseenter" + u + " mouseleave" + u,
            pt = "mousedown" + u,
            w = 6e4,
            h = 864e5,
            wt = "k-state-selected",
            it = "k-state-disabled",
            bt = "aria-selected",
            kt = "aria-expanded",
            dt = "aria-hidden",
            gt = "aria-disabled",
            ni = "aria-activedescendant",
            b = "id",
            ti = n.isArray,
            k = n.extend,
            l = n.proxy,
            f = Date,
            e = new f();
          e = new f(e.getFullYear(), e.getMonth(), e.getDate(), 0, 0, 0);
          c = function (t) {
            var r = this,
              f = t.id;
            r.options = t;
            r._dates = [];
            r.ul = n(
              '<ul tabindex="-1" role="listbox" aria-hidden="true" unselectable="on" class="k-list k-reset"/>'
            )
              .css({ overflow: a.kineticScrollNeeded ? "" : "auto" })
              .on(ct, nt, l(r._click, r))
              .on("mouseenter" + u, nt, function () {
                n(this).addClass(tt);
              })
              .on("mouseleave" + u, nt, function () {
                n(this).removeClass(tt);
              });
            r.list = n(
              "<div class='k-list-container k-list-scroller' unselectable='on'/>"
            )
              .append(r.ul)
              .on(pt, ft);
            f &&
              ((r._timeViewID = f + "_timeview"),
              (r._optionID = f + "_option_selected"),
              r.ul.attr(b, r._timeViewID));
            r._popup();
            r._heightHandler = l(r._height, r);
            r.template = i.template(
              '<li tabindex="-1" role="option" class="k-item" unselectable="on">#=data#</li>',
              { useWithBlock: !1 }
            );
          };
          c.prototype = {
            current: function (i) {
              var r = this,
                u = r.options.active;
              return i === t
                ? r._current
                : (r._current &&
                    (r._current.removeClass(wt),
                    r._current &&
                      r._current.length &&
                      (r._current[0].removeAttribute(b),
                      r._current[0].removeAttribute(bt))),
                  i &&
                    ((i = n(i).addClass(wt).attr(b, r._optionID).attr(bt, !0)),
                    r.scroll(i[0])),
                  (r._current = i),
                  u && u(i),
                  t);
            },
            close: function () {
              this.popup.close();
            },
            destroy: function () {
              var n = this;
              n.ul.off(u);
              n.list.off(u);
              n.popup.destroy();
            },
            open: function () {
              var t,
                n = this;
              n.ul[0].firstChild || n.bind();
              t = n.popup._hovered;
              n.popup._hovered = !0;
              n.popup.open();
              setTimeout(function () {
                n.popup._hovered = t;
              }, 1);
              n._current && n.scroll(n._current[0]);
            },
            dataBind: function (n) {
              for (
                var r,
                  u = this,
                  t = u.options,
                  o = t.format,
                  s = i.toString,
                  h = u.template,
                  c = n.length,
                  f = 0,
                  e = "";
                f < c;
                f++
              )
                (r = n[f]), rt(r, t.min, t.max) && (e += h(s(r, o, t.culture)));
              u._html(e);
            },
            refresh: function () {
              var s,
                v,
                e = this,
                t = e.options,
                y = t.format,
                p = ii(),
                nt = p < 0,
                b = i.parseDate(e._value),
                tt = b ? et(b, t.min) : et(new Date(), t.min),
                it = t.min,
                k = t.max,
                c = r(it),
                u = r(k),
                rt = r(ri(t.interval)),
                o = t.interval * w,
                d = i.toString,
                g = e.template,
                n = t.useValueToRender ? tt : new Date(+t.min),
                l = new f(n),
                a = "";
              for (
                v = nt ? (h + p * w) / o : h / o,
                  (c == u && rt !== u) ||
                    (c > u && (u += h), (v = (u - c) / o + 1));
                ;

              ) {
                if (u && (r(n) >= u || l.getDate() != n.getDate())) {
                  s = r(n);
                  l < n && (s += h);
                  s > u && (n = new f(+k));
                  r(n) > 0 && (a += g(d(n, y, t.culture)));
                  break;
                }
                if (l.getDate() != n.getDate()) break;
                a += g(d(n, y, t.culture));
                n.setTime(n.getTime() + o);
              }
              e._html(a);
            },
            bind: function () {
              var n = this,
                t = n.options.dates;
              t && t[0] ? n.dataBind(t) : n.refresh();
            },
            _html: function (n) {
              var t = this;
              t.ul[0].innerHTML = n;
              t.popup.unbind(p, t._heightHandler);
              t.popup.one(p, t._heightHandler);
              t.current(null);
              t.select(t._value);
            },
            scroll: function (n) {
              if (n) {
                var i = this.list[0],
                  r = n.offsetTop,
                  e = n.offsetHeight,
                  t = i.scrollTop,
                  u = i.clientHeight,
                  f = r + e;
                t > r ? (t = r) : f > t + u && (t = f - u);
                i.scrollTop = t;
              }
            },
            select: function (t) {
              var f,
                r = this,
                e = r.options,
                u = r._current;
              t instanceof Date && (t = i.toString(t, e.format, e.culture));
              "string" == typeof t &&
                (u && u.text() === t
                  ? (t = u)
                  : ((t = n.grep(r.ul[0].childNodes, function (n) {
                      return (n.textContent || n.innerText) == t;
                    })),
                    (t = t[0] ? t : null)));
              f = r._distinctSelection(t);
              r.current(f);
            },
            _distinctSelection: function (t) {
              var u,
                f,
                i = this;
              return (
                t &&
                  t.length > 1 &&
                  ((u = r(i._value)),
                  (f = n.inArray(u, i._dates)),
                  (t = i.ul.children()[f])),
                t
              );
            },
            setOptions: function (n) {
              var t = this.options;
              n.min = o(n.min);
              n.max = o(n.max);
              this.options = k(t, n, {
                active: t.active,
                change: t.change,
                close: t.close,
                open: t.open,
              });
              this.bind();
            },
            toggle: function () {
              var n = this;
              n.popup.visible() ? n.close() : n.open();
            },
            value: function (n) {
              var t = this;
              t._value = n;
              t.ul[0].firstChild && t.select(n);
            },
            _click: function (t) {
              var i = this,
                r = n(t.currentTarget),
                f = r.text(),
                u = i.options.dates;
              u && u.length > 0 && (f = u[r.index()]);
              t.isDefaultPrevented() ||
                (i.select(r), i.options.change(f, !0), i.close());
            },
            _height: function () {
              var n = this,
                t = n.list,
                r = t.parent(".k-animation-container"),
                i = n.options.height;
              n.ul[0].children.length &&
                t
                  .add(r)
                  .show()
                  .height(n.ul[0].scrollHeight > i ? i : "auto")
                  .hide();
            },
            _parse: function (n) {
              var u = this,
                t = u.options,
                s = r(t.min) != r(e) ? t.min : null,
                h = r(t.max) != r(e) ? t.max : null,
                i = u._value || s || h || e;
              return n instanceof f
                ? n
                : ((n = o(n, t.parseFormats, t.culture)),
                  n &&
                    (n = new f(
                      i.getFullYear(),
                      i.getMonth(),
                      i.getDate(),
                      n.getHours(),
                      n.getMinutes(),
                      n.getSeconds(),
                      n.getMilliseconds()
                    )),
                  n);
            },
            _adjustListWidth: function () {
              var n,
                u,
                t = this.list,
                r = t[0].style.width,
                f = this.options.anchor,
                e = i._outerWidth;
              (!t.data("width") && r) ||
                ((n = window.getComputedStyle
                  ? window.getComputedStyle(f[0], null)
                  : 0),
                (u = n ? parseFloat(n.width) : e(f)),
                n &&
                  (st.mozilla || st.msie) &&
                  (u +=
                    parseFloat(n.paddingLeft) +
                    parseFloat(n.paddingRight) +
                    parseFloat(n.borderLeftWidth) +
                    parseFloat(n.borderRightWidth)),
                (r = u - (e(t) - t.width())),
                t
                  .css({ fontFamily: f.css("font-family"), width: r })
                  .data("width", r));
            },
            _popup: function () {
              var t = this,
                i = t.list,
                n = t.options,
                r = n.anchor;
              t.popup = new v.Popup(
                i,
                k(n.popup, {
                  anchor: r,
                  open: n.open,
                  close: n.close,
                  animation: n.animation,
                  isRtl: a.isRtl(n.anchor),
                })
              );
            },
            move: function (n) {
              var r = this,
                u = n.keyCode,
                e = r.ul[0],
                i = r._current,
                f = u === s.DOWN;
              if (u === s.UP || f) {
                if (n.altKey) return r.toggle(f), t;
                i = f
                  ? i
                    ? i[0].nextSibling
                    : e.firstChild
                  : i
                  ? i[0].previousSibling
                  : e.lastChild;
                i && r.select(i);
                r.options.change(r._current.text());
                n.preventDefault();
              } else
                (u !== s.ENTER && u !== s.TAB && u !== s.ESC) ||
                  (n.preventDefault(),
                  i && r.options.change(i.text(), !0),
                  r.close());
            },
          };
          c.getMilliseconds = r;
          i.TimeView = c;
          ot = y.extend({
            init: function (t, u) {
              var w,
                h,
                d,
                l,
                a,
                s,
                e = this;
              y.fn.init.call(e, t, u);
              t = e.element;
              u = e.options;
              u.min = o(t.attr("min")) || o(u.min);
              u.max = o(t.attr("max")) || o(u.max);
              ut(u);
              e._initialOptions = k({}, u);
              e._wrapper();
              e.timeView = h = new c(
                k({}, u, {
                  id: t.attr(b),
                  anchor: e.wrapper,
                  format: u.format,
                  change: function (n, i) {
                    i ? e._change(n) : t.val(n);
                  },
                  open: function (n) {
                    e.timeView._adjustListWidth();
                    e.trigger(p)
                      ? n.preventDefault()
                      : (t.attr(kt, !0), w.attr(dt, !1));
                  },
                  close: function (n) {
                    e.trigger(ht)
                      ? n.preventDefault()
                      : (t.attr(kt, !1), w.attr(dt, !0));
                  },
                  active: function (n) {
                    t && t.length && t[0].removeAttribute(ni);
                    n && t.attr(ni, h._optionID);
                  },
                })
              );
              w = h.ul;
              e._icon();
              e._reset();
              try {
                t[0].setAttribute("type", "text");
              } catch (g) {
                t[0].type = "text";
              }
              t.addClass("k-input").attr({
                role: "combobox",
                "aria-expanded": !1,
                "aria-owns": h._timeViewID,
                autocomplete: "off",
              });
              d =
                t.is("[disabled]") ||
                n(e.element).parents("fieldset").is(":disabled");
              d ? e.enable(!1) : e.readonly(t.is("[readonly]"));
              u.dateInput &&
                ((l = u.min),
                (a = u.max),
                (s = new f()),
                r(l) == r(a) &&
                  ((l = new f(
                    s.getFullYear(),
                    s.getMonth(),
                    s.getDate(),
                    0,
                    0,
                    0
                  )),
                  (a = new f(
                    s.getFullYear(),
                    s.getMonth(),
                    s.getDate(),
                    24,
                    0,
                    0
                  ))),
                (e._dateInput = new v.DateInput(t, {
                  culture: u.culture,
                  format: u.format,
                  min: l,
                  max: a,
                  value: u.value,
                  interval: u.interval,
                })));
              e._old = e._update(u.value || e.element.val());
              e._oldText = t.val();
              i.notify(e);
            },
            options: {
              name: "TimePicker",
              min: e,
              max: e,
              format: "",
              dates: [],
              parseFormats: [],
              value: null,
              interval: 30,
              height: 200,
              animation: {},
              dateInput: !1,
            },
            events: [p, ht, d],
            setOptions: function (n) {
              var t = this,
                r = t._value;
              y.fn.setOptions.call(t, n);
              n = t.options;
              ut(n);
              t.timeView.setOptions(n);
              r && t.element.val(i.toString(r, n.format, n.culture));
            },
            dataBind: function (n) {
              ti(n) && this.timeView.dataBind(n);
            },
            _editable: function (n) {
              var t = this,
                r = n.disable,
                f = n.readonly,
                o = t._arrow.off(u),
                i = t.element.off(u),
                e = t._inputWrapper.off(u);
              t._dateInput && t._dateInput._unbindInput();
              f || r
                ? (e.addClass(r ? it : g).removeClass(r ? g : it),
                  i.attr(lt, r).attr(at, f).attr(gt, r))
                : (e.addClass(g).removeClass(it).on(ei, t._toggleHover),
                  i &&
                    i.length &&
                    (i[0].removeAttribute(lt), i[0].removeAttribute(at)),
                  i
                    .attr(gt, !1)
                    .on("keydown" + u, l(t._keydown, t))
                    .on("focusout" + u, l(t._blur, t))
                    .on("focus" + u, function () {
                      t._inputWrapper.addClass(yt);
                    }),
                  t._dateInput && t._dateInput._bindInput(),
                  o.on(ct, l(t._click, t)).on(pt, ft));
            },
            readonly: function (n) {
              this._editable({ readonly: n === t || n, disable: !1 });
            },
            enable: function (n) {
              this._editable({ readonly: !1, disable: !(n = n === t || n) });
            },
            destroy: function () {
              var n = this;
              y.fn.destroy.call(n);
              n.timeView.destroy();
              n.element.off(u);
              n._arrow.off(u);
              n._inputWrapper.off(u);
              n._form && n._form.off("reset", n._resetHandler);
            },
            close: function () {
              this.timeView.close();
            },
            open: function () {
              this.timeView.open();
            },
            min: function (n) {
              return this._option("min", n);
            },
            max: function (n) {
              return this._option("max", n);
            },
            value: function (n) {
              var i = this;
              return n === t
                ? i._value
                : ((i._old = i._update(n)),
                  null === i._old && i.element.val(""),
                  (i._oldText = i.element.val()),
                  t);
            },
            _blur: function () {
              var n = this,
                t = n.element.val();
              n.close();
              t !== n._oldText && n._change(t);
              n._inputWrapper.removeClass(yt);
            },
            _click: function () {
              var n = this,
                t = n.element;
              n.timeView.toggle();
              a.touch || t[0] === ui() || t.trigger("focus");
            },
            _change: function (n) {
              var r,
                u,
                f,
                t = this,
                e = t.element.val();
              n = t._update(n);
              r = !i.calendar.isEqualDate(t._old, n);
              u = r && !t._typing;
              f = e !== t.element.val();
              (u || f) && t.element.trigger(d);
              r && ((t._old = n), (t._oldText = t.element.val()), t.trigger(d));
              t._typing = !1;
            },
            _icon: function () {
              var t,
                i = this,
                r = i.element;
              t = r.next("span.k-select");
              t[0] ||
                (t = n(
                  '<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-clock"></span></span>'
                ).insertAfter(r));
              i._arrow = t.attr({
                role: "button",
                "aria-controls": i.timeView._timeViewID,
              });
            },
            _keydown: function (n) {
              var t = this,
                u = n.keyCode,
                i = t.timeView,
                r = t.element.val();
              i.popup.visible() || n.altKey
                ? (i.move(n),
                  t._dateInput &&
                    n.stopImmediatePropagation &&
                    n.stopImmediatePropagation())
                : u === s.ENTER && r !== t._oldText
                ? t._change(r)
                : (t._typing = !0);
            },
            _option: function (n, i) {
              var r = this,
                u = r.options;
              return i === t
                ? u[n]
                : ((i = r.timeView._parse(i)),
                  i &&
                    ((i = new f(+i)),
                    (u[n] = i),
                    (r.timeView.options[n] = i),
                    r.timeView.bind()),
                  t);
            },
            _toggleHover: function (t) {
              n(t.currentTarget).toggleClass(tt, "mouseenter" === t.type);
            },
            _update: function (n) {
              var r = this,
                u = r.options,
                f = r.timeView,
                t = f._parse(n);
              return (
                rt(t, u.min, u.max) || (t = null),
                (r._value = t),
                r._dateInput && t
                  ? r._dateInput.value(t || n)
                  : r.element.val(i.toString(t || n, u.format, u.culture)),
                f.value(t),
                t
              );
            },
            _wrapper: function () {
              var t,
                r = this,
                i = r.element;
              t = i.parents(".k-timepicker");
              t[0] ||
                ((t = i
                  .wrap(vt)
                  .parent()
                  .addClass("k-picker-wrap k-state-default")),
                (t = t.wrap(vt).parent()));
              t[0].style.cssText = i[0].style.cssText;
              r.wrapper = t
                .addClass("k-widget k-timepicker")
                .addClass(i[0].className);
              i.css({ width: "100%", height: i[0].style.height });
              r._inputWrapper = n(t[0].firstChild);
            },
            _reset: function () {
              var t = this,
                i = t.element,
                r = i.attr("form"),
                u = r ? n("#" + r) : i.closest("form");
              u[0] &&
                ((t._resetHandler = function () {
                  t.value(i[0].defaultValue);
                  t.max(t._initialOptions.max);
                  t.min(t._initialOptions.min);
                }),
                (t._form = u.on("reset", t._resetHandler)));
            },
          });
          v.plugin(ot);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.datetimepicker.min",
      ["kendo.datepicker.min", "kendo.timepicker.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function rt(n) {
            var t = new Date(2100, 0, 1);
            return t.setMinutes(-n), t;
          }
          function ut(n) {
            n.preventDefault();
          }
          function ft(t) {
            var r,
              u = i.getCulture(t.culture).calendars.standard.patterns,
              f = !t.parseFormats.length;
            t.format = ot(t.format || u.g);
            t.timeFormat = r = ot(t.timeFormat || u.t);
            i.DateView.normalize(t);
            f && t.parseFormats.unshift("yyyy-MM-ddTHH:mm:ss");
            n.inArray(r, t.parseFormats) === -1 && t.parseFormats.push(r);
          }
          var i = window.kendo,
            et = i.TimeView,
            f = i.parseDate,
            p = i.support,
            dt = i._activeElement,
            ot = i._extractFormat,
            w = i.calendar,
            b = w.isInRange,
            gt = w.restrictValue,
            e = w.isEqualDatePart,
            st = et.getMilliseconds,
            k = i.ui,
            h = k.Widget,
            d = "open",
            g = "close",
            c = "change",
            r = ".kendoDateTimePicker",
            ni = "click" + r,
            ht = p.mouseAndTouchPresent
              ? i.applyEventMap("up", r.slice(1))
              : ni,
            ct = "disabled",
            lt = "readonly",
            nt = "k-state-default",
            at = "k-state-focused",
            ti = "k-state-hover",
            tt = "k-state-disabled",
            ii = "mouseenter" + r + " mouseleave" + r,
            vt = "mousedown" + r,
            yt = "month",
            pt = "<span/>",
            l = "aria-activedescendant",
            a = "aria-expanded",
            v = "aria-hidden",
            y = "aria-owns",
            wt = "aria-disabled",
            u = Date,
            o = new u(1800, 0, 1),
            s = new u(2099, 11, 31),
            bt = { view: "date" },
            kt = { view: "time" },
            it = n.extend,
            ri = h.extend({
              init: function (t, r) {
                var e,
                  u = this;
                h.fn.init.call(u, t, r);
                t = u.element;
                r = u.options;
                r.disableDates = i.calendar.disabled(r.disableDates);
                r.min = f(t.attr("min")) || f(r.min);
                r.max = f(t.attr("max")) || f(r.max);
                ft(r);
                u._initialOptions = it({}, r);
                u._wrapper();
                u._views();
                u._icons();
                u._reset();
                u._template();
                try {
                  t[0].setAttribute("type", "text");
                } catch (o) {
                  t[0].type = "text";
                }
                t.addClass("k-input").attr({
                  role: "combobox",
                  "aria-expanded": !1,
                  autocomplete: "off",
                });
                u._midnight = u._calculateMidnight(r.min, r.max);
                e =
                  t.is("[disabled]") ||
                  n(u.element).parents("fieldset").is(":disabled");
                e ? u.enable(!1) : u.readonly(t.is("[readonly]"));
                u._createDateInput(r);
                u._old = u._update(r.value || u.element.val());
                u._oldText = t.val();
                i.notify(u);
              },
              options: {
                name: "DateTimePicker",
                value: null,
                format: "",
                timeFormat: "",
                culture: "",
                parseFormats: [],
                dates: [],
                disableDates: null,
                min: new u(o),
                max: new u(s),
                interval: 30,
                height: 200,
                footer: "",
                start: yt,
                depth: yt,
                animation: {},
                month: {},
                ARIATemplate:
                  'Current focused date is #=kendo.toString(data.current, "d")#',
                dateButtonText: "Open the date view",
                timeButtonText: "Open the time view",
                dateInput: !1,
                weekNumber: !1,
              },
              events: [d, g, c],
              setOptions: function (n) {
                var r,
                  c,
                  l,
                  t = this,
                  a = t._value;
                h.fn.setOptions.call(t, n);
                n = t.options;
                n.min = r = f(n.min);
                n.max = c = f(n.max);
                ft(n);
                t._midnight = t._calculateMidnight(n.min, n.max);
                l = n.value || t._value || t.dateView._current;
                r && !e(r, l) && (r = new u(o));
                c && !e(c, l) && (c = new u(s));
                t.dateView.setOptions(n);
                t.timeView.setOptions(
                  it({}, n, { format: n.timeFormat, min: r, max: c })
                );
                t._createDateInput(n);
                t._dateInput ||
                  t.element.val(i.toString(a, n.format, n.culture));
                a && t._updateARIA(a);
              },
              _editable: function (t) {
                var u = this,
                  f = u.element.off(r),
                  h = u._dateIcon.off(r),
                  c = u._timeIcon.off(r),
                  o = u._inputWrapper.off(r),
                  s = t.readonly,
                  e = t.disable;
                s || e
                  ? (o.addClass(e ? tt : nt).removeClass(e ? nt : tt),
                    f.attr(ct, e).attr(lt, s).attr(wt, e))
                  : (o.addClass(nt).removeClass(tt).on(ii, u._toggleHover),
                    f &&
                      f.length &&
                      (f[0].removeAttribute(ct),
                      f[0].removeAttribute(lt, !1),
                      f[0].removeAttribute(wt, !1)),
                    f
                      .on("keydown" + r, n.proxy(u._keydown, u))
                      .on("focus" + r, function () {
                        u._inputWrapper.addClass(at);
                      })
                      .on("focusout" + r, function () {
                        u._inputWrapper.removeClass(at);
                        f.val() !== u._oldText &&
                          (u._change(f.val()),
                          f.val() || u.dateView.current(i.calendar.getToday()));
                        u.close("date");
                        u.close("time");
                      }),
                    h.on(vt, ut).on(ht, function (n) {
                      u.toggle("date");
                      u._focusElement(n.type);
                    }),
                    c.on(vt, ut).on(ht, function (n) {
                      u.toggle("time");
                      u._focusElement(n.type);
                    }));
              },
              _focusElement: function (n) {
                var t = this.element;
                (p.touch &&
                  (!p.mouseAndTouchPresent || (n || "").match(/touch/i))) ||
                  t[0] === dt() ||
                  t.trigger("focus");
              },
              readonly: function (n) {
                this._editable({ readonly: n === t || n, disable: !1 });
              },
              enable: function (n) {
                this._editable({ readonly: !1, disable: !(n = n === t || n) });
              },
              destroy: function () {
                var n = this;
                h.fn.destroy.call(n);
                n.dateView.destroy();
                n.timeView.destroy();
                n.element.off(r);
                n._dateIcon.off(r);
                n._timeIcon.off(r);
                n._inputWrapper.off(r);
                n._form && n._form.off("reset", n._resetHandler);
              },
              close: function (n) {
                "time" !== n && (n = "date");
                this[n + "View"].close();
              },
              open: function (n) {
                "time" !== n && (n = "date");
                this[n + "View"].open();
              },
              min: function (n) {
                return this._option("min", n);
              },
              max: function (n) {
                return this._option("max", n);
              },
              toggle: function (n) {
                var t = "timeView";
                "time" !== n ? (n = "date") : (t = "dateView");
                this[n + "View"].toggle();
                this[t].close();
              },
              value: function (n) {
                var i = this;
                return n === t
                  ? i._value
                  : ((i._old = i._update(n)),
                    null === i._old && i.element.val(""),
                    (i._oldText = i.element.val()),
                    t);
              },
              _change: function (n) {
                var i,
                  r,
                  u,
                  t = this,
                  f = t.element.val();
                n = t._update(n);
                i = +t._old != +n;
                r = i && !t._typing;
                u = f !== t.element.val();
                (r || u) && t.element.trigger(c);
                i &&
                  ((t._old = n), (t._oldText = t.element.val()), t.trigger(c));
                t._typing = !1;
              },
              _option: function (n, i) {
                var l,
                  a,
                  h = this,
                  r = h.options,
                  v = h.timeView,
                  c = v.options,
                  y = h._value || h._old;
                if (i === t) return r[n];
                if ((i = f(i, r.parseFormats, r.culture))) {
                  if (
                    (r.min.getTime() === r.max.getTime() && (c.dates = []),
                    (r[n] = new u(i.getTime())),
                    h.dateView[n](i),
                    (h._midnight = h._calculateMidnight(r.min, r.max)),
                    y && ((l = e(r.min, y)), (a = e(r.max, y))),
                    l || a)
                  ) {
                    if (((c[n] = i), l && !a && (c.max = rt(r.interval)), a)) {
                      if (h._midnight) return v.dataBind([s]), t;
                      l || (c.min = o);
                    }
                  } else (c.max = s), (c.min = o);
                  v.bind();
                }
              },
              _toggleHover: function (t) {
                n(t.currentTarget).toggleClass(ti, "mouseenter" === t.type);
              },
              _update: function (t) {
                var a,
                  l,
                  w,
                  k,
                  g,
                  u = this,
                  h = u.options,
                  v = h.min,
                  d = h.max,
                  y = h.dates,
                  p = u.timeView,
                  nt = u._value,
                  r = f(t, h.parseFormats, h.culture),
                  tt =
                    (null === r && null === nt) ||
                    (r instanceof Date && nt instanceof Date);
                return (
                  h.disableDates &&
                    h.disableDates(r) &&
                    ((r = null), u._old || u.element.val() || (t = null)),
                  +r == +nt && tt
                    ? ((g = i.toString(r, h.format, h.culture)),
                      g !== t &&
                        (u.element.val(null === r ? t : g),
                        t instanceof String && u.element.trigger(c)),
                      r)
                    : (null !== r && e(r, v)
                        ? (r = gt(r, v, d))
                        : b(r, v, d) || (r = null),
                      (u._value = r),
                      p.value(r),
                      u.dateView.value(r),
                      r &&
                        ((w = u._old),
                        (l = p.options),
                        y[0] &&
                          ((y = n.grep(y, function (n) {
                            return e(r, n);
                          })),
                          y[0] && (p.dataBind(y), (k = !0))),
                        k ||
                          (e(r, v) &&
                            ((l.min = v), (l.max = rt(h.interval)), (a = !0)),
                          e(r, d) &&
                            (u._midnight
                              ? (p.dataBind([s]), (k = !0))
                              : ((l.max = d), a || (l.min = o), (a = !0)))),
                        !k &&
                          ((!w && a) || (w && !e(w, r))) &&
                          (a || ((l.max = s), (l.min = o)), p.bind())),
                      u._dateInput && r
                        ? u._dateInput.value(r || t)
                        : u.element.val(
                            i.toString(r || t, h.format, h.culture)
                          ),
                      u._updateARIA(r),
                      r)
                );
              },
              _keydown: function (n) {
                var t = this,
                  r = t.dateView,
                  u = t.timeView,
                  f = t.element.val(),
                  e = r.popup.visible(),
                  o = t._dateInput && n.stopImmediatePropagation;
                n.altKey && n.keyCode === i.keys.DOWN
                  ? t.toggle(e ? "time" : "date")
                  : e
                  ? (r.move(n), t._updateARIA(r._current))
                  : u.popup.visible()
                  ? u.move(n)
                  : n.keyCode === i.keys.ENTER && f !== t._oldText
                  ? t._change(f)
                  : ((t._typing = !0), (o = !1));
                o && n.stopImmediatePropagation();
              },
              _views: function () {
                var h,
                  e,
                  p,
                  w,
                  k,
                  c,
                  n = this,
                  r = n.element,
                  t = n.options,
                  nt = r.attr("id");
                n.dateView = h = new i.DateView(
                  it({}, t, {
                    id: nt,
                    anchor: n.wrapper,
                    change: function () {
                      var f,
                        s,
                        r = h.calendar.value(),
                        c = +r,
                        e = +t.min,
                        o = +t.max;
                      (c !== e && c !== o) ||
                        ((f = c === e ? e : o),
                        (f = new u(n._value || f)),
                        f.setFullYear(
                          r.getFullYear(),
                          r.getMonth(),
                          r.getDate()
                        ),
                        b(f, e, o) && (r = f));
                      n._value &&
                        ((s = i.date.setHours(new Date(r), n._value)),
                        b(s, e, o) && (r = s));
                      n._change(r);
                      n.close("date");
                    },
                    close: function (t) {
                      n.trigger(g, bt)
                        ? t.preventDefault()
                        : (r.attr(a, !1),
                          p.attr(v, !0),
                          e.popup.visible() ||
                            (r && r.length && r[0].removeAttribute(y)));
                    },
                    open: function (i) {
                      n.trigger(d, bt)
                        ? i.preventDefault()
                        : (r.val() !== n._oldText &&
                            ((c = f(r.val(), t.parseFormats, t.culture)),
                            n.dateView[c ? "current" : "value"](c)),
                          p.attr(v, !1),
                          r.attr(a, !0).attr(y, h._dateViewID),
                          n._updateARIA(c));
                    },
                  })
                );
                p = h.div;
                k = t.min.getTime();
                n.timeView = e = new et({
                  id: nt,
                  value: t.value,
                  anchor: n.wrapper,
                  animation: t.animation,
                  format: t.timeFormat,
                  culture: t.culture,
                  height: t.height,
                  interval: t.interval,
                  min: new u(o),
                  max: new u(s),
                  dates: k === t.max.getTime() ? [new Date(k)] : [],
                  parseFormats: t.parseFormats,
                  change: function (f, o) {
                    f = e._parse(f);
                    f < t.min
                      ? ((f = new u(+t.min)), (e.options.min = f))
                      : f > t.max && ((f = new u(+t.max)), (e.options.max = f));
                    o
                      ? ((n._timeSelected = !0), n._change(f))
                      : (r.val(i.toString(f, t.format, t.culture)),
                        h.value(f),
                        n._updateARIA(f));
                  },
                  close: function (t) {
                    n.trigger(g, kt)
                      ? t.preventDefault()
                      : (w.attr(v, !0),
                        r.attr(a, !1),
                        h.popup.visible() ||
                          (r && r.length && r[0].removeAttribute(y)));
                  },
                  open: function (i) {
                    e._adjustListWidth();
                    n.trigger(d, kt)
                      ? i.preventDefault()
                      : (r.val() !== n._oldText &&
                          ((c = f(r.val(), t.parseFormats, t.culture)),
                          n.timeView.value(c)),
                        w.attr(v, !1),
                        r.attr(a, !0).attr(y, e._timeViewID),
                        e.options.active(e.current()));
                  },
                  active: function (n) {
                    r && r.length && r[0].removeAttribute(l);
                    n && r.attr(l, e._optionID);
                  },
                  popup: t.popup,
                  useValueToRender: !0,
                });
                w = e.ul;
              },
              _icons: function () {
                var t = this,
                  r = t.element,
                  u = t.options,
                  i = r.next("span.k-select");
                i[0] ||
                  (i = n(
                    '<span unselectable="on" class="k-select"><span class="k-link k-link-date" aria-label="' +
                      u.dateButtonText +
                      '"><span unselectable="on" class="k-icon k-i-calendar"></span></span><span class="k-link k-link-time" aria-label="' +
                      u.timeButtonText +
                      '"><span unselectable="on" class="k-icon k-i-clock"></span></span></span>'
                  ).insertAfter(r));
                i = i.children();
                t._dateIcon = i
                  .eq(0)
                  .attr("aria-controls", t.dateView._dateViewID);
                t._timeIcon = i
                  .eq(1)
                  .attr("aria-controls", t.timeView._timeViewID);
              },
              _wrapper: function () {
                var t,
                  r = this,
                  i = r.element;
                t = i.parents(".k-datetimepicker");
                t[0] ||
                  ((t = i
                    .wrap(pt)
                    .parent()
                    .addClass("k-picker-wrap k-state-default")),
                  (t = t.wrap(pt).parent()));
                t[0].style.cssText = i[0].style.cssText;
                i.css({ width: "100%", height: i[0].style.height });
                r.wrapper = t
                  .addClass("k-widget k-datetimepicker")
                  .addClass(i[0].className);
                r._inputWrapper = n(t[0].firstChild);
              },
              _reset: function () {
                var t = this,
                  i = t.element,
                  r = i.attr("form"),
                  u = r ? n("#" + r) : i.closest("form");
                u[0] &&
                  ((t._resetHandler = function () {
                    t.value(i[0].defaultValue);
                    t.max(t._initialOptions.max);
                    t.min(t._initialOptions.min);
                  }),
                  (t._form = u.on("reset", t._resetHandler)));
              },
              _template: function () {
                this._ariaTemplate = i.template(this.options.ARIATemplate);
              },
              _createDateInput: function (n) {
                this._dateInput &&
                  (this._dateInput.destroy(), (this._dateInput = null));
                n.dateInput &&
                  (this._dateInput = new k.DateInput(this.element, {
                    culture: n.culture,
                    format: n.format,
                    min: n.min,
                    max: n.max,
                    interval: n.interval,
                  }));
              },
              _calculateMidnight: function (n, t) {
                return st(n) + st(t) === 0;
              },
              _updateARIA: function (n) {
                var i,
                  t = this,
                  r = t.dateView.calendar;
                t.element &&
                  t.element.length &&
                  t.element[0].removeAttribute(l);
                r &&
                  ((i = r._cell),
                  i.attr(
                    "aria-label",
                    t._ariaTemplate({ current: n || r.current() })
                  ),
                  t.element.attr(l, i.attr("id")));
              },
            });
          k.plugin(ri);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.daterangepicker.min",
      ["kendo.core.min", "kendo.multiviewcalendar.min", "kendo.datepicker.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function ot(n) {
            n.preventDefault();
          }
          var y,
            i = window.kendo,
            p = i.ui,
            s = i.keys,
            h = p.Widget,
            w = "month",
            b = "open",
            k = "close",
            r = "change",
            st = "<div />",
            ht = "min",
            ct = "max",
            lt = i.template,
            c = n.extend,
            d = "id",
            g = i.support,
            l = g.mobileOS,
            at = "k-state-selected",
            nt = "aria-expanded",
            tt = "aria-disabled",
            a = "k-state-disabled",
            it = "disabled",
            rt = "readonly",
            v = "k-state-default",
            ut = "aria-hidden",
            u = ".kendoDateRangePicker",
            ft = "click" + u,
            vt = "mousedown" + u,
            et = g.mouseAndTouchPresent
              ? i.applyEventMap("up", u.slice(1))
              : ft,
            e = n.proxy,
            o = i.parseDate,
            f = function (n) {
              i.DateView.call(this, n);
            };
          f.prototype = Object.create(i.DateView.prototype);
          f.prototype._calendar = function () {
            var f,
              t = this,
              r = t.calendar,
              u = t.options;
            r ||
              ((f = n(st)
                .attr(d, i.guid())
                .appendTo(t.popup.element)
                .on(vt, ot)
                .on(ft, "td:has(.k-link)", e(t._click, t))),
              (t.calendar = r = new p.MultiViewCalendar(f)),
              t._setOptions(u),
              i.calendar.makeUnselectable(r.element),
              r.navigate(t._value || t._current, u.start),
              t.calendar.selectRange(t._range || u.range || {}));
          };
          f.prototype._setOptions = function (n) {
            this.calendar.setOptions({
              focusOnNav: !1,
              change: n.change,
              culture: n.culture,
              dates: n.dates,
              depth: n.depth,
              footer: n.footer,
              format: n.format,
              selectable: n.selectable,
              max: n.max,
              min: n.min,
              month: n.month,
              weekNumber: n.weekNumber,
              start: n.start,
              disableDates: n.disableDates,
              range: n.range,
            });
          };
          f.prototype.range = function (n) {
            this._range = n;
            this.calendar &&
              (n.start || n.end
                ? this.calendar.selectRange(n)
                : this.calendar.rangeSelectable.clear());
          };
          f.prototype.move = function (n) {
            var t = this,
              i = n.keyCode,
              u = t.calendar,
              f = (n.ctrlKey && i == s.DOWN) || i == s.ENTER,
              r = !1;
            if (n.altKey)
              i == s.DOWN
                ? (t.open(), n.preventDefault(), (r = !0))
                : i == s.UP && (t.close(), n.preventDefault(), (r = !0));
            else if (t.popup.visible()) {
              if (i == s.ESC || (f && u._cell.hasClass(at)))
                return t.close(), n.preventDefault(), !0;
              t._current = u._move(n, !0);
              r = !0;
            }
            return r;
          };
          f.prototype._click = function (n) {
            l.ios || (l.android && "firefox" == l.browser)
              ? this._range && this._range.end && this.close()
              : this._range &&
                null === this._range.end &&
                n.currentTarget.className.indexOf("k-state-selected") !== -1 &&
                this.close();
          };
          i.DateRangeView = f;
          y = h.extend({
            init: function (n, t) {
              var l,
                a,
                s = this;
              h.fn.init.call(s, n, t);
              n = s.element;
              t = s.options;
              t.disableDates = i.calendar.disabled(t.disableDates);
              t.min = o(n.attr("min")) || o(t.min);
              t.max = o(n.attr("max")) || o(t.max);
              s._initialOptions = c({}, t);
              s._buildHTML();
              s._range = s.options.range;
              s.dateView = new f(
                c({}, t, {
                  id: n.attr(d),
                  anchor: s.wrapper,
                  views: 2,
                  selectable: "range",
                  range: s._range,
                  change: function () {
                    var n = this.selectRange();
                    s.range(n);
                    s.trigger(r);
                    s._startDateInput.trigger(r);
                    s._endDateInput.trigger(r);
                  },
                  close: function (n) {
                    s.trigger(k)
                      ? n.preventDefault()
                      : (s.wrapper.attr(nt, !1), l.attr(ut, !0));
                  },
                  open: function (n) {
                    s.trigger(b)
                      ? n.preventDefault()
                      : (s.wrapper.attr(nt, !0),
                        l.attr(ut, !1),
                        s._updateARIA());
                  },
                })
              );
              l = s.dateView.div;
              s._ariaTemplate = lt(this.options.ARIATemplate);
              s._reset();
              s.wrapper.attr({
                role: "combobox",
                "aria-expanded": !1,
                "aria-owns": s.dateView._dateViewID,
                autocomplete: "off",
              });
              s._inputs
                .on(et + u, e(s._click, s))
                .on("keydown" + u, e(s._keydown, s));
              s._initializeDateInputs();
              a = n.is("[disabled]");
              a ? s.enable(!1) : s.readonly(n.is("[readonly]"));
            },
            options: {
              name: "DateRangePicker",
              labels: !0,
              footer: "",
              format: "",
              culture: "",
              min: new Date(1900, 0, 1),
              max: new Date(2099, 11, 31),
              start: w,
              depth: w,
              animation: {},
              month: {},
              startField: "",
              endField: "",
              dates: [],
              disableDates: null,
              range: null,
              ARIATemplate:
                'Current focused date is #=kendo.toString(data.current, "D")#',
              weekNumber: !1,
              messages: { startLabel: "Start", endLabel: "End" },
            },
            events: [b, k, r],
            setOptions: function (n) {
              var t = this;
              h.fn.setOptions.call(t, n);
              n = t.options;
              n.min = o(n.min);
              n.max = o(n.max);
              t._inputs.off(u);
              this._initializeDateInputs();
              t.dateView.setOptions(n);
              t._range = n.range;
            },
            _click: function () {
              var n = this;
              n._preventInputAction ||
                n.dateView.popup.visible() ||
                n.dateView.open();
            },
            _keydown: function (n) {
              var i = this,
                r = i.dateView,
                u = !1;
              return i._preventInputAction
                ? (n.stopImmediatePropagation(), t)
                : ((u = r.move(n)),
                  i._updateARIA(r._current),
                  u &&
                    n.stopImmediatePropagation &&
                    n.stopImmediatePropagation(),
                  t);
            },
            _updateARIA: function (n) {
              var r,
                i = this,
                t = i.dateView.calendar;
              i.element &&
                i.element.length &&
                i.element[0].removeAttribute("aria-activedescendant");
              t &&
                (n && !t._dateInViews(n) && t.navigate(n),
                (r = t._cellByDate(n || t.current())),
                t._focusCell(r),
                r.attr(
                  "aria-label",
                  i._ariaTemplate({ current: n || t.current() })
                ),
                i.element.attr("aria-activedescendant", r.attr("id")));
            },
            _startChange: function (n) {
              var t = this,
                u = n.sender,
                i = u.value(),
                f = t._endDateInput.value();
              t.options.disableDates(i) && (n.sender.value(null), (i = null));
              t.range({ start: i, end: f });
              t.trigger(r);
            },
            _endChange: function (n) {
              var t = this,
                u = n.sender,
                i = u.value(),
                f = t._startDateInput.value();
              t.options.disableDates(i) && (n.sender.value(null), (i = null));
              t.range({ start: f, end: i });
              t.trigger(r);
            },
            _initializeDateInputs: function () {
              var n = this,
                t = n.options,
                i = t.range || {},
                f = {
                  footer: t.footer,
                  format: t.format,
                  culture: t.culture,
                  min: t.min,
                  max: t.max,
                  start: t.start,
                  startField: t.startField,
                  endField: t.endField,
                  depth: t.depth,
                  animation: t.animation,
                  month: t.month,
                  dates: t.dates,
                  disableDates: t.disableDates,
                  ARIATemplate: t.ARIATemplate,
                  weekNumber: t.weekNumber,
                };
              n._startDateInput &&
                (n._startDateInput.destroy(),
                n._endDateInput.destroy(),
                n.wrapper.empty(),
                n._buildHTML(),
                n._inputs
                  .on(et + u, e(n._click, n))
                  .on("keydown" + u, e(n._keydown, n)));
              n._startDateInput = n._startInput
                .kendoDateInput(c(!0, f, { value: i.start }))
                .getKendoDateInput();
              n._endDateInput = n._endInput
                .kendoDateInput(c(!0, f, { value: i.end }))
                .getKendoDateInput();
              n._startChangeHandler = e(n._startChange, n);
              n._startDateInput.bind(r, n._startChangeHandler);
              n._endChangeHandler = e(n._endChange, n);
              n._endDateInput.bind(r, n._endChangeHandler);
            },
            _buildHTML: function () {
              var t = this,
                r = t.element;
              t.wrapper ||
                (t.wrapper = r.addClass("k-widget k-daterangepicker"));
              t.options.labels
                ? (n(
                    '<span class="k-textbox-container"><input/><label class="k-label">' +
                      t.options.messages.startLabel +
                      "</label></span>"
                  ).appendTo(t.wrapper),
                  n(
                    '<span>&nbsp;</span><span class="k-textbox-container"><input/><label class="k-label">' +
                      t.options.messages.endLabel +
                      "</label></span>"
                  ).appendTo(t.wrapper))
                : n("<input/><span>&nbsp;</span><input/>").appendTo(t.wrapper);
              t._startInput = t.wrapper.find("input").eq(0);
              t._endInput = t.wrapper.find("input").eq(1);
              "" !== t.options.startField &&
                (t._startInput.attr(
                  i.attr("bind"),
                  "value: " + t.options.startField
                ),
                t._startInput.attr("name", t.options.startField));
              "" !== t.options.endField &&
                (t._endInput.attr(
                  i.attr("bind"),
                  "value: " + t.options.endField
                ),
                t._endInput.attr("name", t.options.endField));
              t._inputs = t._startInput.add(t._endInput);
            },
            _option: function (n, i) {
              var u = this,
                r = u.options;
              return i === t
                ? r[n]
                : ((i = o(i, r.parseFormats, r.culture)),
                  i && ((r[n] = new Date(+i)), u.dateView[n](i)),
                  t);
            },
            _reset: function () {
              var t = this,
                i = t.element,
                r = i.attr("form"),
                u = r ? n("#" + r) : i.closest("form");
              u[0] &&
                ((t._resetHandler = function () {
                  t.max(t._initialOptions.max);
                  t.min(t._initialOptions.min);
                }),
                (t._form = u.on("reset", t._resetHandler)));
            },
            _editable: function (t) {
              var i = this,
                u = i._inputs,
                f = t.readonly,
                r = t.disable;
              f || r
                ? (i.wrapper.addClass(r ? a : v).removeClass(r ? v : a),
                  u.attr(it, r).attr(rt, f).attr(tt, r),
                  (i._preventInputAction = !0))
                : (i.wrapper.addClass(v).removeClass(a),
                  n.each(u, function (n, t) {
                    t.removeAttribute(it);
                    t.removeAttribute(rt);
                  }),
                  u.attr(tt, !1),
                  (i._preventInputAction = !1));
            },
            destroy: function () {
              var n = this;
              n._startDateInput &&
                (n._startDateInput.unbind(r, n._startChangeHandler),
                n._startDateInput.destroy(),
                (n._startChangeHandler = null));
              n._endDateInput &&
                (n._endDateInput.unbind(r, n._endChangeHandler),
                n._endDateInput.destroy(),
                (n._endChangeHandler = null));
              n._form && n._form.off("reset", n._resetHandler);
              n._inputs.off(u);
              n._inputs = null;
              n.dateView.destroy();
              n.element.off(u);
              h.fn.destroy.call(n);
            },
            range: function (n) {
              var i = this;
              return n === t
                ? i._range
                : ((i._range = n),
                  i.dateView.range({ start: null, end: null }),
                  n ||
                    (i._startDateInput.value(null),
                    i._endDateInput.value(null)),
                  i._startDateInput.value(n.start ? n.start : null),
                  i._endDateInput.value(n.end ? n.end : null),
                  n.start && !n.end
                    ? i.dateView.range({ start: n.start, end: null })
                    : n.start &&
                      n.start &&
                      +n.start <= +n.end &&
                      i.dateView.range({ start: n.start, end: n.end }),
                  t);
            },
            open: function () {
              this.dateView.open();
            },
            close: function () {
              this.dateView.close();
            },
            min: function (n) {
              return this._option(ht, n);
            },
            max: function (n) {
              return this._option(ct, n);
            },
            readonly: function (n) {
              this._startDateInput.readonly(n);
              this._endDateInput.readonly(n);
              this._editable({ readonly: n === t || n, disable: !1 });
            },
            enable: function (n) {
              this._startDateInput.enable(n);
              this._endDateInput.enable(n);
              n || this.close();
              this._editable({ readonly: !1, disable: !(n = n === t || n) });
            },
          });
          i.ui.plugin(y);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.scrollview.min",
      ["kendo.fx.min", "kendo.data.min", "kendo.draganddrop.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function f(n) {
            return "k-" + n;
          }
          var w,
            b,
            k,
            d,
            g,
            h,
            e,
            nt,
            ut,
            i = window.kendo,
            ft = i.ui,
            r = n.proxy,
            c = i.effects.Transition,
            at = i.ui.Pane,
            vt = i.ui.PaneDimensions,
            tt = ft.DataBoundWidget,
            l = i.data.DataSource,
            o = Math,
            a = o.abs,
            et = o.ceil,
            ot = o.round,
            yt = o.max,
            pt = o.min,
            it = o.floor,
            u = "change",
            v = "click",
            s = "refresh",
            rt = "primary",
            st = "scrollview-page",
            ht = "function",
            ct = "itemChange",
            wt = "cleanup",
            bt = 3,
            kt = -1,
            dt = 0,
            gt = 1,
            y = -1,
            ni = 0,
            p = 1,
            lt = i.Observable.extend({
              init: function (n) {
                var t = this;
                this.dataSource = n;
                this.pendingRequestArray = [];
                this.initialFetch = !1;
                this.useRanges = n.options.serverPaging;
                i.Observable.fn.init.call(this);
                n.bind("change", function () {
                  t._change();
                });
              },
              _change: function () {
                this.trigger("reset", { offset: this.offset });
              },
              page: function (n, t) {
                var i = this;
                this.useRanges ||
                  (this.dataSource.page(n + 1),
                  t ? t(i.dataSource.view()) : i.trigger("page", { page: n }));
                this.useRanges &&
                  this.dataSource.range(
                    n * this.dataSource.pageSize(),
                    this.dataSource.pageSize(),
                    function () {
                      t
                        ? t(i.dataSource.view())
                        : i.trigger("page", { page: n });
                    }
                  );
              },
              scrollTo: function (n) {
                var t = Math.ceil(
                    this.dataSource.total() / this.dataSource.pageSize() || 1
                  ),
                  r = n - 1,
                  u = r - 1,
                  e = n,
                  i = t > 0 && n + 1 >= t ? -1 : n + 1,
                  f = t > 0 && i + 1 >= t ? -1 : i + 1;
                i >= 0 && this.pendingRequestArray.push(i);
                r >= 0 && this.pendingRequestArray.push(r);
                u >= 0 && this.pendingRequestArray.push(u);
                f >= 0 && this.pendingRequestArray.push(f);
                this.page(e);
              },
              getViewData: function () {
                var n,
                  t,
                  i = this.dataSource.view();
                if (this.dataSource.options.pageSize > 1)
                  for (n = [], t = 0; t < i.length; t++) n.push(i[t]);
                else n = i[0];
                return n;
              },
              destroy: function () {
                var n = this;
                n.dataSource.unbind();
                n.dataSource = null;
              },
            });
          i.ui.ScrollViewDataReader = lt;
          w = i.Class.extend({
            init: function (t) {
              var i = this,
                e = n("<ul class='" + f("scrollview-nav") + "'/>"),
                o = n("<div class='" + f("scrollview-nav-wrap") + "'></div>");
              o.append(e);
              t._navigationContainer.append(o);
              this._changeProxy = r(i, "_change");
              this._refreshProxy = r(i, "_refresh");
              t.bind(u, this._changeProxy);
              t.bind(s, this._refreshProxy);
              e.on(v, "li.k-link", r(this._click, t));
              n.extend(i, { element: e, scrollView: t });
            },
            items: function () {
              return this.element.children();
            },
            _refresh: function (n) {
              for (var i = "", t = 0; t < n.pageCount; t++)
                i += '<li class="k-link"></li>';
              this.element.html(i);
              this.items().eq(n.page).addClass(f(rt));
              this.scrollView._toggleNavigation({ currentPage: n.page });
            },
            _change: function (n) {
              var t, i, e, o, r, u;
              n.isDefaultPrevented() ||
                ((t =
                  this.scrollView._navigationContainer.find(
                    ".k-scrollview-nav"
                  )),
                (i = this.scrollView.element.width()),
                (e = (i - t.width()) / 2),
                (o = t.find("li.k-link:eq(0)").outerWidth(!0) / 2),
                this.items().removeClass(f(rt)).eq(n.nextPage).addClass(f(rt)),
                (r =
                  this.items().eq(n.nextPage).length > 0
                    ? this.items().eq(n.nextPage).position().left
                    : 0),
                (r > i / 2 || r < t.scrollLeft() + i / 2) &&
                  ((u = 0),
                  (u =
                    r > i / 2
                      ? t.scrollLeft() + r - i / 2
                      : t.scrollLeft() - (i / 2 - r)),
                  (u += e + o),
                  t.animate({ scrollLeft: u }, 300)),
                this.scrollView._toggleNavigation({
                  currentPage: n.currentPage,
                  nextPage: n.nextPage,
                }));
            },
            _click: function (t) {
              var i = n(t.currentTarget).index();
              this.scrollTo(i);
            },
            destroy: function () {
              this.scrollView.unbind(u, this._changeProxy);
              this.scrollView.unbind(s, this._refreshProxy);
              this.element.off(v);
              this.element.remove();
            },
          });
          i.ui.ScrollViewPager = w;
          b = "transitionEnd";
          k = "dragStart";
          d = "dragEnd";
          g = i.Observable.extend({
            init: function (t, r) {
              var o,
                h,
                e,
                s,
                l,
                v,
                f = this;
              i.Observable.fn.init.call(this);
              this.element = t;
              this.container = t.parent();
              o = new i.ui.Movable(f.element);
              h = new c({
                axis: "x",
                movable: o,
                onEnd: function () {
                  f.trigger(b);
                },
              });
              e = new i.UserEvents(t, {
                fastTap: !0,
                start: function (n) {
                  2 * a(n.x.velocity) >= a(n.y.velocity)
                    ? e.capture()
                    : e.cancel();
                  f.trigger(k, n);
                  h.cancel();
                },
                allowSelection: !0,
                end: function (n) {
                  f.trigger(d, n);
                },
              });
              s = new vt({ element: f.element, container: f.container });
              l = s.x;
              l.bind(u, function () {
                f.trigger(u);
              });
              v = new at({
                dimensions: s,
                userEvents: e,
                movable: o,
                elastic: !0,
              });
              n.extend(f, {
                duration: (r && r.duration) || 1,
                movable: o,
                transition: h,
                userEvents: e,
                dimensions: s,
                dimension: l,
                pane: v,
              });
              this.bind([b, k, d, u], r);
            },
            size: function () {
              return {
                width: this.dimensions.x.getSize(),
                height: this.dimensions.y.getSize(),
              };
            },
            total: function () {
              return this.dimension.getTotal();
            },
            offset: function () {
              return -this.movable.x;
            },
            updateDimension: function () {
              this.dimension.update(!0);
            },
            refresh: function () {
              this.dimensions.refresh();
              this.dimensions.y.enabled = !1;
            },
            moveTo: function (n) {
              this.movable.moveAxis("x", -n);
            },
            transitionTo: function (n, t, i) {
              i
                ? this.moveTo(-n)
                : this.transition.moveTo({
                    location: n,
                    duration: this.duration,
                    ease: t,
                  });
            },
            destroy: function () {
              var n = this;
              n.userEvents.destroy();
              n.unbind();
              n.movable =
                n.tansition =
                n.dimensions =
                n.dimension =
                n.pane =
                  null;
              n.element.remove();
            },
          });
          i.ui.ScrollViewElasticPane = g;
          h = i.Observable.extend({
            init: function (n, t, r) {
              var u = this;
              i.Observable.fn.init.call(this);
              u.element = n;
              u.pane = t;
              u._getPages();
              this.page = 0;
              this.pageSize = r.pageSize || 1;
              this.contentHeight = r.contentHeight;
              this.enablePager = r.enablePager;
              this.pagerOverlay = r.pagerOverlay;
            },
            scrollTo: function (n, i) {
              var r = this;
              (n != r.page || i) &&
                (r.trigger("resize", {
                  currentPage: this.page,
                  nextPage: n,
                  data: t,
                }) ||
                  ((r.page = n),
                  r.pane.transitionTo(
                    -n * r.pane.size().width,
                    c.easeOutExpo,
                    i
                  )));
            },
            paneMoved: function (n, i, r, u) {
              var s,
                e,
                l,
                f = this,
                o = f.pane,
                a = o.size().width * f.pageSize,
                h = ot,
                v = i ? c.easeOutBack : c.easeOutExpo;
              return (
                n === y ? (h = et) : n === p && (h = it),
                (e = h(o.offset() / a)),
                e < 0 || e >= f.pageCount
                  ? ((l = e < 0 ? 0 : -this.page * this.pane.size().width),
                    this.pane.transitionTo(l, v, u))
                  : ((s = yt(f.minSnap, pt(-e * a, f.maxSnap))),
                    e != f.page &&
                      r &&
                      r({ currentPage: f.page, nextPage: e }) &&
                      (s = -f.page * o.size().width),
                    o.transitionTo(s, v, u),
                    t)
              );
            },
            updatePage: function () {
              var n = this.pane,
                t = ot(n.offset() / n.size().width);
              return t != this.page && ((this.page = t), !0);
            },
            forcePageUpdate: function () {
              return this.updatePage();
            },
            resizeTo: function (n) {
              var t,
                u,
                f = this.pane,
                r = n.width;
              this.pageElements.width(r);
              "100%" === this.contentHeight &&
                ((t = this.element.parent().height()),
                this.enablePager === !0 &&
                  ((u = this.element.parent().find("ul.k-scrollview-nav")),
                  !this.pagerOverlay &&
                    u.length &&
                    (t -= i._outerHeight(u, !0))),
                this.element.css("height", t),
                this.pageElements.css("height", t));
              f.updateDimension();
              this._paged || (this.page = it(f.offset() / r));
              this.scrollTo(this.page, !0, !0);
              this.pageCount = it(f.total() / r);
              this.minSnap = -(this.pageCount - 1) * r;
              this.maxSnap = 0;
            },
            _getPages: function () {
              this.pageElements = this.element.find(i.roleSelector("page"));
              this._paged = this.pageElements.length > 0;
            },
            destroy: function () {
              var n = this;
              n.pane = null;
              n.element.remove();
            },
          });
          i.ui.ScrollViewContent = h;
          e = i.Observable.extend({
            init: function (n, t, r) {
              var u = this;
              i.Observable.fn.init.call(this);
              u.element = n;
              u.pane = t;
              u.options = r;
              u._templates();
              u.page = r.page || 0;
              u.pages = [];
              u._initPages();
              u.resizeTo(u.pane.size());
              u.pane.dimension.forceEnabled();
            },
            setDataSource: function (n) {
              this.dataSource = l.create(n);
              this._dataReader();
              this._pendingPageRefresh = !1;
              this._pendingWidgetRefresh = !1;
            },
            _viewShow: function () {
              var n = this;
              n._pendingWidgetRefresh &&
                (setTimeout(function () {
                  n._resetPages();
                }, 0),
                (n._pendingWidgetRefresh = !1));
            },
            _dataReader: function () {
              this.dataReader = new lt(this.dataSource);
              this._pageProxy = r(this, "_onPage");
              this._resetProxy = r(this, "_onReset");
              this.dataReader.bind({
                page: this._pageProxy,
                reset: this._resetProxy,
              });
            },
            _templates: function () {
              var n = this.options.template,
                t = this.options.emptyTemplate,
                u = {},
                f = {};
              typeof n === ht &&
                ((u.template = n), (n = "#=this.template(data)#"));
              this.template = r(i.template(n), u);
              typeof t === ht &&
                ((f.emptyTemplate = t), (t = "#=this.emptyTemplate(data)#"));
              this.emptyTemplate = r(i.template(t), f);
            },
            _initPages: function () {
              for (var t, i = this.pages, r = this.element, n = 0; n < bt; n++)
                (t = new nt(r)), i.push(t);
              this.pane.updateDimension();
            },
            resizeTo: function (n) {
              for (
                var r, f, t = this.pages, e = this.pane, u = 0;
                u < t.length;
                u++
              )
                t[u].setWidth(n.width);
              "auto" === this.options.contentHeight
                ? this.element.css("height", this.pages[1].element.height())
                : "100%" === this.options.contentHeight
                ? ((r = this.element.parent().height()),
                  this.options.enablePager === !0 &&
                    ((f = this.element.parent().find("ul.k-scrollview-nav")),
                    !this.options.pagerOverlay &&
                      f.length &&
                      (r -= i._outerHeight(f, !0))),
                  this.element.css("height", r),
                  t[0].element.css("height", r),
                  t[1].element.css("height", r),
                  t[2].element.css("height", r))
                : this.options.contentHeight &&
                  (t[0].element.css("height", this.options.contentHeight),
                  t[1].element.css("height", this.options.contentHeight),
                  t[2].element.css("height", this.options.contentHeight));
              e.updateDimension();
              this._repositionPages();
              this.width = n.width;
            },
            scrollTo: function (n, i, r) {
              var u = this,
                f = u.dataReader;
              (n != u.page || i) &&
                f.page(n, function (e) {
                  return r
                    ? (f.scrollTo(n), t)
                    : (u.trigger("resize", {
                        currentPage: u.page,
                        nextPage: n,
                        data: e,
                      }) ||
                        (i
                          ? (u.page = n)
                          : ((f.pagerScroll = n > u.page ? -1 : 1),
                            (u.page = n + f.pagerScroll)),
                        f.scrollTo(n)),
                      t);
                });
            },
            paneMoved: function (n, r, u, f) {
              var s,
                h,
                l,
                e = this,
                a = e.pane,
                b = a.size().width,
                c = a.offset(),
                v = Math.abs(c) >= b / 3,
                k = r
                  ? i.effects.Transition.easeOutBack
                  : i.effects.Transition.easeOutExpo,
                w =
                  !!e.dataSource.options.serverPaging &&
                  e.page + 2 > e.pageCount,
                o = 0;
              n === p
                ? 0 !== e.page && (o = -1)
                : n !== y || w
                ? c > 0 && v && !w
                  ? (o = 1)
                  : c < 0 && v && 0 !== e.page && (o = -1)
                : (o = 1);
              s = e.page;
              o &&
                ((s = o > 0 ? s + 1 : s - 1),
                e instanceof i.ui.VirtualScrollViewContent
                  ? (e.dataReader.page(s), (h = e.dataReader.getViewData()))
                  : (h = t),
                h instanceof Array || (h = [h]),
                (l = e.pages ? e.pages[1].element : t));
              u &&
                e.page != s &&
                u({ currentPage: e.page, nextPage: s, element: l, data: h }) &&
                (o = 0);
              0 === o
                ? e._cancelMove(k, f)
                : o === -1
                ? e._moveBackward(f)
                : 1 === o && e._moveForward(f);
            },
            updatePage: function () {
              var n = this.pages;
              return (
                0 !== this.pane.offset() &&
                (this.pane.offset() > 0
                  ? (n.push(this.pages.shift()),
                    this.page++,
                    this.page + 2 < this.pageCount &&
                      this.dataReader.pendingRequestArray.push(this.page + 2),
                    this.page + 1 < this.pageCount &&
                      this.dataReader.page(this.page + 1),
                    this.page + 1 == this.pageCount &&
                      this.setPageContent(this.pages[2], null))
                  : (n.unshift(this.pages.pop()),
                    this.page--,
                    this.page - 2 >= 0 &&
                      this.dataReader.pendingRequestArray.push(this.page - 2),
                    this.page - 1 >= 0 && this.dataReader.page(this.page - 1)),
                this._repositionPages(),
                this._resetMovable(),
                !0)
              );
            },
            forcePageUpdate: function () {
              var n = this.pane.offset(),
                t = (3 * this.pane.size().width) / 4;
              return a(n) > t && this.updatePage();
            },
            _resetMovable: function () {
              this.pane.moveTo(0);
            },
            _moveForward: function (n) {
              this.pane.transitionTo(
                -this.width,
                i.effects.Transition.easeOutExpo,
                n
              );
            },
            _moveBackward: function (n) {
              this.pane.transitionTo(
                this.width,
                i.effects.Transition.easeOutExpo,
                n
              );
            },
            _cancelMove: function (n, t) {
              this.pane.transitionTo(0, n, t);
            },
            _resetPages: function () {
              this.page = this.options.page || 0;
              this._repositionPages();
              this.trigger("reset");
            },
            _onPage: function (n) {
              if (
                (n.page >= this.pageCount &&
                  this.setPageContent(this.pages[2], null),
                this.page == n.page
                  ? !this.dataReader.pagerScroll ||
                    (0 === this.dataReader.pagerScroll &&
                      this.dataReader.initialFetch)
                    ? this.setPageContent(
                        this.pages[1],
                        this.dataReader.getViewData()
                      )
                    : (this.dataReader.pagerScroll < 0
                        ? this._moveForward()
                        : this._moveBackward(),
                      (this.dataReader.pagerScroll = 0),
                      this.setPageContent(
                        this.pages[1],
                        this.dataReader.getViewData()
                      ))
                  : this.page + 1 == n.page
                  ? this.setPageContent(
                      this.pages[2],
                      this.dataReader.getViewData()
                    )
                  : this.page - 1 == n.page &&
                    this.setPageContent(
                      this.pages[0],
                      this.dataReader.getViewData()
                    ),
                this.dataReader.pendingRequestArray.length > 0 &&
                  this.dataReader.initialFetch)
              ) {
                var t = this.dataReader.pendingRequestArray.shift();
                this.dataReader.page(t);
              }
            },
            _onReset: function () {
              this.pageCount = et(
                this.dataSource.total() / this.dataSource.pageSize()
              );
            },
            _repositionPages: function () {
              var n = this.pages;
              n[0].position(kt);
              n[1].position(dt);
              n[2].position(gt);
            },
            setPageContent: function (n, i) {
              var r = this.template,
                u = this.emptyTemplate;
              n.content(null !== i && i !== t ? r(i) : u({}));
            },
            destroy: function () {
              var t,
                n = this,
                i = n.pages;
              for (
                n.dataReader.unbind(),
                  n.dataSource.unbind(),
                  n.dataReader = n.dataSource = n.pane = null,
                  t = 0;
                t < i.length;
                t++
              )
                i[t].destroy();
              n.element.remove();
            },
          });
          i.ui.VirtualScrollViewContent = e;
          nt = i.Class.extend({
            init: function (t) {
              this.element = n("<li class='" + f(st) + "'></li>");
              this.width = t.width();
              this.element.width(this.width);
              t.append(this.element);
            },
            content: function (n) {
              this.element.html(n);
            },
            position: function (n) {
              this.element.css(
                "transform",
                "translate3d(" + this.width * n + "px, 0, 0)"
              );
            },
            setWidth: function (n) {
              this.width = n;
              this.element.width(n);
            },
            destroy: function () {
              var n = this;
              n.element.remove();
              n.element = null;
            },
          });
          i.ui.VirtualPage = nt;
          ut = tt.extend({
            init: function (n, t) {
              var l,
                c,
                o = this;
              tt.fn.init.call(o, n, t);
              t = o.options;
              n = o.element;
              i.stripWhitespace(n[0]);
              n.wrapInner(
                0 === n.children().length
                  ? "<ul class='k-scrollview-wrap'/>"
                  : "<div class='k-scrollview-wrap'/>"
              );
              n.addClass("k-widget " + f("scrollview"));
              o._initNavigation();
              this.options.enablePager
                ? ((this.pager = new w(this)),
                  this.options.pagerOverlay &&
                    n.addClass(f("scrollview-overlay")))
                : ((this._changeProxy = r(o, "_toggleNavigation")),
                  this.bind(u, this._changeProxy));
              o.inner = n.children().first();
              o.page = 0;
              o.inner.css("height", t.contentHeight);
              o.pane = new g(o.inner, {
                duration: this.options.duration,
                transitionEnd: r(this, "_transitionEnd"),
                dragStart: r(this, "_dragStart"),
                dragEnd: r(this, "_dragEnd"),
                change: r(this, s),
              });
              o.bind("resize", function () {
                o.pane.refresh();
              });
              o.page = t.page;
              l = 0 === this.inner.children().length;
              c = l ? new e(o.inner, o.pane, t) : new h(o.inner, o.pane, t);
              c.page = o.page;
              c.bind("reset", function () {
                this._pendingPageRefresh = !1;
                o.trigger(s, { pageCount: c.pageCount, page: c.page });
                o._toggleNavigation({ currentPage: c.page, nextPage: c.page });
              });
              c.bind("resize", function (n) {
                var t = c.page,
                  i = n.nextPage;
                t != i &&
                  (n._defaultPrevented = o.trigger(u, {
                    currentPage: c.page,
                    nextPage: n.nextPage,
                    data: n.data,
                  }));
                o._toggleNavigation({
                  currentPage: c.page,
                  nextPage: n.nextPage,
                });
              });
              c.bind(ct, function (n) {
                o.trigger(ct, n);
                o.angular("compile", function () {
                  return { elements: n.item, data: [{ dataItem: n.data }] };
                });
              });
              c.bind(wt, function (n) {
                o.angular("cleanup", function () {
                  return { elements: n.item };
                });
              });
              o._content = c;
              o.setDataSource(t.dataSource);
              this.viewInit();
              this.viewShow();
            },
            options: {
              name: "ScrollView",
              page: 0,
              duration: 400,
              velocityThreshold: 0.8,
              contentHeight: "auto",
              pageSize: 1,
              bounceVelocityThreshold: 1.6,
              enablePager: !0,
              enableNavigationButtons: !0,
              pagerOverlay: !0,
              autoBind: !0,
              template: "",
              emptyTemplate: "",
            },
            events: ["changing", u, s],
            destroy: function () {
              tt.fn.destroy.call(this);
              this._content.destroy();
              this.pane.destroy();
              this.pager && this.pager.destroy();
              this.inner = null;
              i.destroy(this.element);
            },
            viewInit: function () {
              this.options.autoBind &&
                this._content.scrollTo(this._content.page, !0, !0);
            },
            viewShow: function () {
              this.pane.refresh();
            },
            refresh: function () {
              var n = this._content,
                t = this.options;
              n.resizeTo(this.pane.size());
              this.page = n.page;
              (n instanceof h || n.dataReader.initialFetch) &&
                (t.enablePager
                  ? this.trigger(s, { pageCount: n.pageCount, page: n.page })
                  : this.trigger(u, {
                      pageCount: n.pageCount,
                      currentPage: n.page,
                    }));
            },
            content: function (n) {
              this.element.children().first().html(n);
              this._content._getPages();
              this.pane.refresh();
            },
            scrollTo: function (n, t, i) {
              this._content.scrollTo(n, t, i);
            },
            prev: function () {
              var n = this,
                i = n._content.page - 1;
              n._content instanceof e
                ? n._content.paneMoved(p, t, function (t) {
                    return n.trigger(u, t);
                  })
                : i > -1 && n.scrollTo(i);
            },
            next: function () {
              var n = this,
                i = n._content.page + 1;
              n._content instanceof e
                ? n._content.paneMoved(y, t, function (t) {
                    return n.trigger(u, t);
                  })
                : i < n._content.pageCount && n.scrollTo(i);
            },
            setDataSource: function (n) {
              var i,
                t = this;
              this._content instanceof e &&
                ((i = !n),
                n instanceof l
                  ? ((n.options.pageSize = n.options.pageSize || 1),
                    (this.dataSource = n = new l(n.options)))
                  : (this.dataSource = l.create(n)),
                this._content.setDataSource(this.dataSource),
                this.options.autoBind &&
                  !i &&
                  this.dataSource.fetch(function () {
                    t._content.dataReader.initialFetch = !0;
                    t.scrollTo(t._content.page, !0, !0);
                    t._content.trigger("reset");
                  }));
            },
            items: function () {
              return this.element.find(".k-" + st);
            },
            _dragStart: function () {
              this._content.forcePageUpdate();
            },
            _dragEnd: function (n) {
              var f = this,
                t = n.x.velocity,
                r = this.options.velocityThreshold,
                i = ni,
                e = a(t) > this.options.bounceVelocityThreshold;
              t > r ? (i = p) : t < -r && (i = y);
              this._content.paneMoved(i, e, function (n) {
                return f.trigger(u, n);
              });
            },
            _transitionEnd: function () {
              this._content.updatePage();
            },
            _initNavigation: function () {
              var t = this,
                i = (t._navigationContainer = n(
                  "<div class='k-scrollview-elements'></div>"
                )),
                u = n(
                  '<a class="k-scrollview-prev"><span class="k-icon k-i-arrowhead-w"></span></a>'
                ).hide(),
                f = n(
                  '<a class="k-scrollview-next"><span class="k-icon k-i-arrowhead-e"></span></a>'
                ).hide();
              i.append(u);
              i.append(f);
              t.element.append(i);
              i.on(v, "a.k-scrollview-prev", r(t.prev, t));
              i.on(v, "a.k-scrollview-next", r(t.next, t));
            },
            _toggleNavigation: function (n) {
              var t =
                  n.nextPage || 0 === n.nextPage ? n.nextPage : n.currentPage,
                i = this._navigationContainer,
                r = i.find(">a.k-scrollview-prev"),
                u = i.find(">a.k-scrollview-next");
              r.hide();
              u.hide();
              (t || 0 === t) &&
                (0 !== t && r.show(),
                t != this._content.pageCount - 1 && u.show());
            },
          });
          ft.plugin(ut);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.splitter.min", ["kendo.resizable.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function p(n) {
            return ht.test(n);
          }
          function w(n) {
            return st.test(n) || /^\d+$/.test(n);
          }
          function h(n) {
            return !p(n) && !w(n);
          }
          function b(n, t) {
            var i = parseInt(n, 10);
            return p(n) && (i = Math.floor((i * t) / 100)), i;
          }
          function v(n, i) {
            return function (u, f) {
              var e,
                o = this.element.find(u).data(r);
              return 1 == arguments.length
                ? o[n]
                : ((o[n] = f),
                  i &&
                    ((e = this.element.data("kendo" + this.options.name)),
                    e.resize(!0)),
                  t);
            };
          }
          function k(n) {
            var t = this,
              i = n.orientation;
            t.owner = n;
            t._element = n.element;
            t.orientation = i;
            ot(t, i === e ? g : d);
            t._resizable = new f.ui.Resizable(n.element, {
              orientation: i,
              handle:
                ".k-splitbar-draggable-" +
                i +
                "[data-marker=" +
                n._marker +
                "]",
              hint: u(t._createHint, t),
              start: u(t._start, t),
              max: u(t._max, t),
              min: u(t._min, t),
              invalidClass: "k-restricted-size-" + i,
              resizeend: u(t._stop, t),
            });
          }
          var d,
            g,
            f = window.kendo,
            nt = f.ui,
            o = f.keys,
            ot = n.extend,
            u = n.proxy,
            y = nt.Widget,
            st = /^\d+(\.\d+)?px$/i,
            ht = /^\d+(\.\d+)?%$/i,
            i = ".kendoSplitter",
            c = "expand",
            l = "collapse",
            tt = "contentLoad",
            it = "error",
            rt = "layoutChange",
            e = "horizontal",
            s = "vertical",
            ct = "mouseenter",
            ut = "click",
            r = "pane",
            lt = "mouseleave",
            ft = "k-state-focused",
            et = "k-" + r,
            a = "." + et,
            at = y.extend({
              init: function (n, t) {
                var u,
                  r = this;
                y.fn.init.call(r, n, t);
                r.wrapper = r.element;
                r.options.orientation &&
                  (u = r.options.orientation.toLowerCase() != s);
                r.orientation = u ? e : s;
                r._dimension = u ? "width" : "height";
                r._keys = {
                  decrease: u ? o.LEFT : o.UP,
                  increase: u ? o.RIGHT : o.DOWN,
                };
                r._resizeStep = 10;
                r._marker = f.guid().substring(0, 8);
                r._initPanes();
                r.resizing = new k(r);
                r.element.triggerHandler("init" + i);
              },
              events: [c, l, tt, it, "resize", rt],
              _addOverlays: function () {
                this._panes().append(
                  "<div class='k-splitter-overlay k-overlay' />"
                );
              },
              _removeOverlays: function () {
                this._panes().children(".k-splitter-overlay").remove();
              },
              _attachEvents: function () {
                var t = this,
                  r = t.options.orientation;
                t.element
                  .children(".k-splitbar-draggable-" + r)
                  .on("keydown" + i, u(t._keydown, t))
                  .on("mousedown" + i, function (n) {
                    n.currentTarget.focus();
                  })
                  .on("focus" + i, function (t) {
                    n(t.currentTarget).addClass(ft);
                  })
                  .on("blur" + i, function (i) {
                    n(i.currentTarget).removeClass(ft);
                    t.resizing && t.resizing.end();
                  })
                  .on(ct + i, function () {
                    n(this).addClass("k-splitbar-" + t.orientation + "-hover");
                  })
                  .on(lt + i, function () {
                    n(this).removeClass(
                      "k-splitbar-" + t.orientation + "-hover"
                    );
                  })
                  .on("mousedown" + i, u(t._addOverlays, t))
                  .end()
                  .children(".k-splitbar")
                  .on("dblclick" + i, u(t._togglePane, t))
                  .children(".k-collapse-next, .k-collapse-prev")
                  .on(ut + i, t._arrowClick(l))
                  .end()
                  .children(".k-expand-next, .k-expand-prev")
                  .on(ut + i, t._arrowClick(c))
                  .end()
                  .end();
                n(window).on("resize" + i + t._marker, u(t.resize, t, !1));
                n(document).on(
                  "mouseup" + i + t._marker,
                  u(t._removeOverlays, t)
                );
              },
              _detachEvents: function () {
                var t = this;
                t.element
                  .children(".k-splitbar-draggable-" + t.orientation)
                  .off(i)
                  .end()
                  .children(".k-splitbar")
                  .off("dblclick" + i)
                  .children(
                    ".k-collapse-next, .k-collapse-prev, .k-expand-next, .k-expand-prev"
                  )
                  .off(i);
                n(window).off(i + t._marker);
                n(document).off(i + t._marker);
              },
              options: { name: "Splitter", orientation: e, panes: [] },
              destroy: function () {
                y.fn.destroy.call(this);
                this._detachEvents();
                this.resizing && this.resizing.destroy();
                f.destroy(this.element);
                this.wrapper = this.element = null;
              },
              _keydown: function (t) {
                var s,
                  r = this,
                  u = t.keyCode,
                  i = r.resizing,
                  f = n(t.currentTarget),
                  h = r._keys,
                  a = u === h.increase,
                  e = u === h.decrease;
                a || e
                  ? (t.ctrlKey
                      ? ((s = f[e ? "next" : "prev"]()),
                        i && i.isResizing() && i.end(),
                        s[r._dimension]()
                          ? r._triggerAction(l, f[e ? "prev" : "next"]())
                          : r._triggerAction(c, s))
                      : i && i.move((e ? -1 : 1) * r._resizeStep, f),
                    t.preventDefault())
                  : u === o.HOME
                  ? (i.move(-i._maxPosition, f), t.preventDefault())
                  : u === o.END
                  ? (i.move(i._maxPosition, f), t.preventDefault())
                  : u === o.ENTER && i && (i.end(), t.preventDefault());
              },
              _initPanes: function () {
                var n = this.options.panes || [],
                  t = this;
                this.element
                  .addClass("k-widget")
                  .addClass("k-splitter")
                  .children()
                  .each(function (i, r) {
                    "script" != r.nodeName.toLowerCase() &&
                      t._initPane(r, n[i]);
                  });
                this.resize();
              },
              _initPane: function (t, i) {
                t = n(t).attr("role", "group").addClass(et);
                t.data(r, i ? i : {}).toggleClass(
                  "k-scrollable",
                  !i || i.scrollable !== !1
                );
                this.ajaxRequest(t);
              },
              ajaxRequest: function (n, t, i) {
                var e,
                  u = this;
                n = u.element.find(n);
                e = n.data(r);
                t = t || e.contentUrl;
                t &&
                  (n.append(
                    "<span class='k-icon k-i-loading k-pane-loading' />"
                  ),
                  f.isLocalUrl(t)
                    ? jQuery.ajax({
                        url: t,
                        data: i || {},
                        type: "GET",
                        dataType: "html",
                        success: function (t) {
                          u.angular("cleanup", function () {
                            return { elements: n.get() };
                          });
                          n.html(t);
                          u.angular("compile", function () {
                            return { elements: n.get() };
                          });
                          u.trigger(tt, { pane: n[0] });
                        },
                        error: function (t, i) {
                          u.trigger(it, { pane: n[0], status: i, xhr: t });
                        },
                      })
                    : n
                        .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 (n, t) {
                this.trigger(n, { pane: t[0] }) || this[n](t[0]);
              },
              _togglePane: function (t) {
                var i,
                  u = this,
                  r = n(t.target);
                r.closest(".k-splitter")[0] == u.element[0] &&
                  ((i = r.children(".k-icon:not(.k-resize-handle)")),
                  1 === i.length &&
                    (i.is(".k-collapse-prev")
                      ? u._triggerAction(l, r.prev())
                      : i.is(".k-collapse-next")
                      ? u._triggerAction(l, r.next())
                      : i.is(".k-expand-prev")
                      ? u._triggerAction(c, r.prev())
                      : i.is(".k-expand-next") &&
                        u._triggerAction(c, r.next())));
              },
              _arrowClick: function (t) {
                var i = this;
                return function (r) {
                  var f,
                    u = n(r.target);
                  u.closest(".k-splitter")[0] == i.element[0] &&
                    ((f = u.is(".k-" + t + "-prev")
                      ? u.parent().prev()
                      : u.parent().next()),
                    i._triggerAction(t, f));
                };
              },
              _updateSplitBar: function (n, t, i) {
                var u = function (n, t) {
                    return t ? "<div class='k-icon " + n + "' />" : "";
                  },
                  r = this.orientation,
                  l = t.resizable !== !1 && i.resizable !== !1,
                  h = t.collapsible,
                  f = t.collapsed,
                  c = i.collapsible,
                  o = i.collapsed;
                n.addClass("k-splitbar k-state-default k-splitbar-" + r)
                  .attr("role", "separator")
                  .attr("aria-expanded", !(f || o))
                  .removeClass("k-splitbar-" + r + "-hover")
                  .toggleClass("k-splitbar-draggable-" + r, l && !f && !o)
                  .toggleClass("k-splitbar-static-" + r, !l && !h && !c)
                  .html(
                    u(
                      "k-collapse-prev k-i-arrow-60-up",
                      h && !f && !o && r == s
                    ) +
                      u(
                        "k-collapse-prev k-i-arrow-60-left",
                        h && !f && !o && r == e
                      ) +
                      u(
                        "k-expand-prev k-i-arrow-60-down",
                        h && f && !o && r == s
                      ) +
                      u(
                        "k-expand-prev k-i-arrow-60-right",
                        h && f && !o && r == e
                      ) +
                      u("k-resize-handle k-i-hbar", l && r == s) +
                      u("k-resize-handle k-i-vbar", l && r == e) +
                      u(
                        "k-collapse-next k-i-arrow-60-down",
                        c && !o && !f && r == s
                      ) +
                      u(
                        "k-collapse-next k-i-arrow-60-right",
                        c && !o && !f && r == e
                      ) +
                      u(
                        "k-expand-next k-i-arrow-60-up",
                        c && o && !f && r == s
                      ) +
                      u(
                        "k-expand-next k-i-arrow-60-left",
                        c && o && !f && r == e
                      )
                  );
                l || h || c || n.removeAttr("tabindex");
              },
              _updateSplitBars: function () {
                var t = this;
                this.element.children(".k-splitbar").each(function () {
                  var i = n(this),
                    f = i.prevAll(a).first().data(r),
                    u = i.nextAll(a).first().data(r);
                  u && t._updateSplitBar(i, f, u);
                });
              },
              _removeSplitBars: function () {
                this.element.children(".k-splitbar").remove();
              },
              _panes: function () {
                return this.element ? this.element.children(a) : n();
              },
              _resize: function () {
                var p,
                  ut,
                  c,
                  o,
                  w,
                  k,
                  d,
                  ft,
                  g,
                  nt,
                  i = this,
                  s = i.element,
                  l = s.children(a),
                  v = i.orientation == e,
                  tt = s.children(".k-splitbar"),
                  it = tt.length,
                  y = v ? "width" : "height",
                  u = s[y]();
                i.wrapper.addClass("k-splitter-resizing");
                0 === it
                  ? ((it = l.length - 1),
                    l
                      .slice(0, it)
                      .after(
                        "<div tabindex='0' class='k-splitbar' data-marker='" +
                          i._marker +
                          "' />"
                      ),
                    i._updateSplitBars(),
                    (tt = s.children(".k-splitbar")))
                  : i._updateSplitBars();
                tt.each(function () {
                  u -= this[v ? "offsetWidth" : "offsetHeight"];
                });
                p = 0;
                ut = 0;
                c = n();
                l.css({ position: "absolute", top: 0 })[y](function () {
                  var f,
                    e = n(this),
                    i = e.data(r) || {};
                  if ((e.removeClass("k-state-collapsed"), i.collapsed))
                    (f = i.collapsedSize ? b(i.collapsedSize, u) : 0),
                      e.css("overflow", "hidden").addClass("k-state-collapsed");
                  else {
                    if (h(i.size)) return (c = c.add(this)), t;
                    f = b(i.size, u);
                  }
                  return ut++, (p += f), f;
                });
                u -= p;
                o = c.length;
                w = Math.floor(u / o);
                c.slice(0, o - 1)
                  .css(y, w)
                  .end()
                  .eq(o - 1)
                  .css(y, u - (o - 1) * w);
                k = 0;
                d = v ? "height" : "width";
                ft = v ? "left" : "top";
                g = v ? "offsetWidth" : "offsetHeight";
                0 === o &&
                  ((nt = l
                    .filter(function () {
                      return !(n(this).data(r) || {}).collapsed;
                    })
                    .last()),
                  nt[y](u + nt[0][g]));
                s.children()
                  .css(d, s[d]())
                  .each(function (n, t) {
                    "script" != t.tagName.toLowerCase() &&
                      ((t.style[ft] = Math.floor(k) + "px"), (k += t[g]));
                  });
                i._detachEvents();
                i._attachEvents();
                i.wrapper.removeClass("k-splitter-resizing");
                f.resize(l);
                i.trigger(rt);
              },
              toggle: function (n, i) {
                var u,
                  f = this;
                n = f.element.find(n);
                u = n.data(r);
                (i || u.collapsible) &&
                  (1 == arguments.length &&
                    (i = u.collapsed !== t && u.collapsed),
                  (u.collapsed = !i),
                  u.collapsed
                    ? n.css("overflow", "hidden")
                    : n.css("overflow", ""),
                  f.resize(!0));
              },
              collapse: function (n) {
                this.toggle(n, !1);
              },
              expand: function (n) {
                this.toggle(n, !0);
              },
              _addPane: function (n, t, i) {
                var r = this;
                return (
                  i.length &&
                    (r.options.panes.splice(t, 0, n),
                    r._initPane(i, n),
                    r._removeSplitBars(),
                    r.resize(!0)),
                  i
                );
              },
              append: function (t) {
                t = t || {};
                var i = this,
                  r = n("<div />").appendTo(i.element);
                return i._addPane(t, i.options.panes.length, r);
              },
              insertBefore: function (t, i) {
                i = n(i);
                t = t || {};
                var r = this,
                  u = r.wrapper.children(".k-pane").index(i),
                  f = n("<div />").insertBefore(n(i));
                return r._addPane(t, u, f);
              },
              insertAfter: function (t, i) {
                i = n(i);
                t = t || {};
                var r = this,
                  u = r.wrapper.children(".k-pane").index(i),
                  f = n("<div />").insertAfter(n(i));
                return r._addPane(t, u + 1, f);
              },
              remove: function (t) {
                var i = this;
                return (
                  (t = i.wrapper.find(t)),
                  t.length &&
                    (f.destroy(t),
                    t.each(function (t, r) {
                      i.options.panes.splice(
                        i.wrapper.children(".k-pane").index(r),
                        1
                      );
                      n(r).remove();
                    }),
                    i._removeSplitBars(),
                    i.options.panes.length && i.resize(!0)),
                  i
                );
              },
              size: v("size", !0),
              min: v("min"),
              max: v("max"),
            });
          nt.plugin(at);
          d = {
            sizingProperty: "height",
            sizingDomProperty: "offsetHeight",
            alternateSizingProperty: "width",
            positioningProperty: "top",
            mousePositioningProperty: "pageY",
          };
          g = {
            sizingProperty: "width",
            sizingDomProperty: "offsetWidth",
            alternateSizingProperty: "height",
            positioningProperty: "left",
            mousePositioningProperty: "pageX",
          };
          k.prototype = {
            press: function (n) {
              this._resizable.press(n);
            },
            move: function (n, t) {
              this.pressed || (this.press(t), (this.pressed = !0));
              this._resizable.target || this._resizable.press(t);
              this._resizable.move(n);
            },
            end: function () {
              this._resizable.end();
              this.pressed = !1;
            },
            destroy: function () {
              this._resizable.destroy();
              this._resizable = this._element = this.owner = null;
            },
            isResizing: function () {
              return this._resizable.resizing;
            },
            _createHint: function (t) {
              var i = this;
              return n(
                "<div class='k-ghost-splitbar k-ghost-splitbar-" +
                  i.orientation +
                  " k-state-default' />"
              ).css(i.alternateSizingProperty, t[i.alternateSizingProperty]());
            },
            _start: function (t) {
              var i = this,
                s = n(t.currentTarget),
                h = s.prev(),
                u = s.next(),
                c = h.data(r),
                l = u.data(r),
                f = parseInt(h[0].style[i.positioningProperty], 10),
                e =
                  parseInt(u[0].style[i.positioningProperty], 10) +
                  u[0][i.sizingDomProperty] -
                  s[0][i.sizingDomProperty],
                a = parseInt(i._element.css(i.sizingProperty), 10),
                o = function (n) {
                  var t = parseInt(n, 10);
                  return (w(n) ? t : (a * t) / 100) || 0;
                },
                v = o(c.min),
                y = o(c.max) || e - f,
                p = o(l.min),
                b = o(l.max) || e - f;
              i.previousPane = h;
              i.nextPane = u;
              i._maxPosition = Math.min(e - p, f + y);
              i._minPosition = Math.max(f + v, e - b);
            },
            _max: function () {
              return this._maxPosition;
            },
            _min: function () {
              return this._minPosition;
            },
            _stop: function (t) {
              var s,
                c,
                u,
                e,
                l,
                y,
                p,
                o,
                i = this,
                v = n(t.currentTarget),
                w = i.owner;
              return (
                w._panes().children(".k-splitter-overlay").remove(),
                t.keyCode !== f.keys.ESC &&
                  ((s = t.position),
                  (c = v.prev()),
                  (u = v.next()),
                  (e = c.data(r)),
                  (l = u.data(r)),
                  (y = s - parseInt(c[0].style[i.positioningProperty], 10)),
                  (p =
                    parseInt(u[0].style[i.positioningProperty], 10) +
                    u[0][i.sizingDomProperty] -
                    s -
                    v[0][i.sizingDomProperty]),
                  (o = i._element.children(a).filter(function () {
                    return h(n(this).data(r).size);
                  }).length),
                  (!h(e.size) || o > 1) &&
                    (h(e.size) && o--, (e.size = y + "px")),
                  (!h(l.size) || o > 1) && (l.size = p + "px"),
                  w.resize(!0)),
                !1
              );
            },
          };
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.scheduler.view.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (kendo.ui.scheduler = {}),
        (function (n) {
          function v(n, t) {
            function r(n, u) {
              var e, f;
              if ((u = u[t]))
                for (e = i[n] = i[n] || [], f = 0; f < u.length; f++)
                  e.push(u[f]), r(n + 1, u[f]);
            }
            var i = [];
            return r(0, n), i;
          }
          function c() {
            return t.support.cssBorderSpacing ? "" : 'cellspacing="0"';
          }
          function e(t, i) {
            return t.length
              ? '<table role="presentation"' +
                  c() +
                  ' class="' +
                  n.trim("k-scheduler-table " + (i || "")) +
                  '"><tr>' +
                  t.join("</tr><tr>") +
                  "</tr></table>"
              : "";
          }
          function g(n, t) {
            return n.length
              ? "<div style='position:relative'>" + e(n, t) + "</div>"
              : "";
          }
          function nt(t, i, r) {
            var u,
              f = [];
            if (r > 0) for (u = 0; u < t; u++) f.push("<th>&#8203;</th>");
            return (
              i &&
                f.push(
                  '<th class="k-scheduler-times-all-day">' + i.text + "</th>"
                ),
              r < 1
                ? n()
                : n('<div class="k-scheduler-times">' + e(f) + "</div>")
            );
          }
          function tt(t, i, r) {
            for (
              var u, o, h, y, s, c, l, a, v, p = [], f = 0;
              f < t.length;
              f++
            ) {
              for (o = t[f], h = [], y = i / o.length, u = 0; u < o.length; u++)
                (s = o[u]),
                  h.push(
                    '<th colspan="' +
                      (s.colspan || y) +
                      '" class="' +
                      (s.className || "") +
                      '">' +
                      s.text +
                      "</th>"
                  );
              p.push(h.join(""));
            }
            if (((c = []), r)) {
              for (
                l = t[t.length - 1], a = [], v = r.cellContent, u = 0;
                u < l.length;
                u++
              )
                a.push(
                  '<td class="' +
                    (l[u].className || "") +
                    '">' +
                    (v ? v(u) : "&nbsp;") +
                    "</td>"
                );
              c.push(a.join(""));
            }
            return n(
              '<div class="k-scheduler-header k-state-default"><div class="k-scheduler-header-wrap">' +
                e(p) +
                g(c, "k-scheduler-header-all-day") +
                "</div></div>"
            );
          }
          function it(t, i, r) {
            for (
              var u, f, c, s, h, l = Array(i).join().split(","), a = [], o = 0;
              o < t.length;
              o++
            )
              for (f = t[o], c = i / f.length, u = 0; u < f.length; u++)
                (s = f[u].className || ""),
                  (h = f[u].text),
                  f[u].allDay && (s = "k-scheduler-times-all-day"),
                  r &&
                    s.indexOf("k-scheduler-group-cell") !== -1 &&
                    (h =
                      '<span class="k-scheduler-group-text">' + h + "</span>"),
                  (l[c * u] +=
                    '<th class="' + s + '" rowspan="' + c + '">' + h + "</th>");
            for (u = 0; u < i; u++) a.push(l[u]);
            return i < 1
              ? n()
              : n('<div class="k-scheduler-times">' + e(a) + "</div>");
          }
          function rt() {
            return n(
              '<div class="k-scheduler-content"><table role="presentation"' +
                c() +
                ' class="k-scheduler-table"/></div>'
            );
          }
          function ut() {
            return (l = l ? l : t.support.scrollbar());
          }
          function ft(n, t, i) {
            for (var e, r, s, u, f = n.length - 1; f >= 0; f--)
              (e = o(n[f])),
                (r = e.start),
                (u = e.end),
                (s = r <= t && u >= t),
                (s || (r >= t && u <= i) || (t <= r && i >= r)) &&
                  (r < t && (t = r), u > i && (i = u));
            return et(n, t, i);
          }
          function o(n) {
            return { start: n.start, end: n.end };
          }
          function et(n, t, i) {
            for (var u, f = [], r = 0; r < n.length; r++)
              (u = o(n[r])),
                ((u.start < t && u.end > t) || (u.start >= t && u.end <= i)) &&
                  f.push(n[r]);
            return f;
          }
          function ot(n) {
            return y(n);
          }
          function st(n) {
            return y(n);
          }
          function y(n) {
            for (var e, i, t, r, s, h, u = [], f = 0; f < n.length; f++) {
              for (
                e = n[f], i = o(e), t = null, r = 0, s = u.length;
                r < s;
                r++
              )
                if (((h = i.start > u[r].end), i.start < u[r].start || h)) {
                  t = u[r];
                  t.end < i.end && (t.end = i.end);
                  break;
                }
              t ||
                ((t = { start: i.start, end: i.end, events: [] }), u.push(t));
              t.events.push(e);
            }
            return u;
          }
          function p(t, i, r, u) {
            var f = [];
            return (
              n.each(i, function (n, i) {
                var o = i.className
                    ? "k-slot-cell " + i.className
                    : "k-slot-cell",
                  e = { text: i.text, className: o };
                e[t] = u && !i.minorTicks ? p(t, i.columns, r, u) : r;
                f.push(e);
              }),
              f
            );
          }
          function u(i, r, f, e, o, s) {
            var l,
              c,
              a,
              h = r[0],
              v = [];
            if (h) {
              if (o && f)
                n.each(o, function (n, t) {
                  t[i] =
                    s && !t.minorTicks
                      ? u(i, r, t.columns, e, t.columns, s)
                      : u(i, r, null, e);
                }),
                  (v = o);
              else
                for (l = h.dataSource.view(), c = 0; c < l.length; c++)
                  (a = {
                    text: e({
                      text: t.htmlEncode(t.getter(h.dataTextField)(l[c])),
                      color: t.getter(h.dataColorField)(l[c]),
                      field: h.field,
                      title: h.title,
                      name: h.name,
                      value: t.getter(h.dataValueField)(l[c]),
                    }),
                    className: "k-slot-cell k-scheduler-group-cell",
                  }),
                    (a[i] = u(i, r.slice(1), f, e)),
                    v.push(a);
              return v;
            }
            return f;
          }
          function ht(i) {
            return function (r) {
              if (n.isArray(r) || r instanceof t.data.ObservableArray) {
                for (var u = 0; u < r.length; u++) if (r[u] == i) return !0;
                return !1;
              }
              return r == i;
            };
          }
          function ct(n) {
            n.className = n.className.replace(w, "") + " k-state-selected";
          }
          var l,
            i,
            w,
            t = window.kendo,
            b = t.ui,
            s = t.date.getDate,
            a = b.Widget,
            f = t._outerHeight,
            r = t.keys,
            k = ".kendoSchedulerView",
            lt = "k-event-inverse",
            at = 1024,
            vt = Math,
            yt =
              '<div class="k-marquee k-scheduler-marquee"><div class="k-marquee-color"></div><div class="k-marquee-text"><div class="k-label-top"></div><div class="k-label-bottom"></div></div></div>',
            pt = t.Class.extend({
              init: function (n, t) {
                this._index = n;
                this._timeSlotCollections = [];
                this._daySlotCollections = [];
                this._isRtl = t;
              },
              addTimeSlotCollection: function (n, t) {
                return this._addCollection(n, t, this._timeSlotCollections);
              },
              addDaySlotCollection: function (n, t) {
                return this._addCollection(n, t, this._daySlotCollections);
              },
              _addCollection: function (n, t, i) {
                var r = new kt(n, t, this._index, i.length);
                return i.push(r), r;
              },
              timeSlotCollectionCount: function () {
                return this._timeSlotCollections.length;
              },
              daySlotCollectionCount: function () {
                return this._daySlotCollections.length;
              },
              daySlotByPosition: function (n, t, i) {
                return this._slotByPosition(n, t, this._daySlotCollections, i);
              },
              timeSlotByPosition: function (n, t, i) {
                return this._slotByPosition(n, t, this._timeSlotCollections, i);
              },
              _slotByPosition: function (n, t, i, r) {
                for (var s, e, u, l, a, f, h, c, o = 0; o < i.length; o++)
                  for (s = i[o], e = 0; e < s.count(); e++)
                    if (
                      ((u = s.at(e)),
                      (l = u.offsetWidth),
                      (a = u.offsetHeight),
                      (h = u.offsetLeft + l),
                      (c = u.offsetTop + a),
                      r || (f = s.at(e + 1)),
                      f &&
                        (f.offsetLeft != u.offsetLeft
                          ? (h = this._isRtl
                              ? u.offsetLeft + (u.offsetLeft - f.offsetLeft)
                              : f.offsetLeft)
                          : (c = f.offsetTop)),
                      n >= u.offsetLeft && n < h && t >= u.offsetTop && t < c)
                    )
                      return u;
              },
              refresh: function () {
                for (var n = 0; n < this._daySlotCollections.length; n++)
                  this._daySlotCollections[n].refresh();
                for (n = 0; n < this._timeSlotCollections.length; n++)
                  this._timeSlotCollections[n].refresh();
              },
              timeSlotRanges: function (n, t) {
                var i,
                  u = this._timeSlotCollections,
                  r = this._startSlot(n, u);
                if (
                  (!r.inRange && n >= r.slot.end && (r = null),
                  (i = r),
                  n < t && (i = this._endSlot(t, u)),
                  i && !i.inRange && t <= i.slot.start && (i = null),
                  null === r && null === i)
                )
                  return [];
                if (null === r) {
                  if (i.slot.end <= n) return [];
                  r = { inRange: !0, slot: u[i.slot.collectionIndex].first() };
                }
                if (null === i) {
                  if (r.slot.start >= t) return [];
                  i = { inRange: !0, slot: u[r.slot.collectionIndex].last() };
                }
                return this._continuousRange(wt, u, r, i);
              },
              daySlotRanges: function (n, i, r) {
                var u,
                  e = this._daySlotCollections,
                  f = this._startSlot(n, e, r);
                if (
                  (!f.inRange && n >= f.slot.end && (f = null),
                  (u = f),
                  n < i && (u = this._endSlot(i, e, r)),
                  u && !u.inRange && i <= u.slot.start && (u = null),
                  null === f && null === u)
                )
                  return [];
                if (null === f) {
                  if (u.slot.end <= n) return [];
                  do (n += t.date.MS_PER_DAY), (f = this._startSlot(n, e, r));
                  while (!f.inRange && n >= f.slot.end);
                }
                if (null === u) {
                  if (f.slot.start >= i) return [];
                  do (i -= t.date.MS_PER_DAY), (u = this._endSlot(i, e, r));
                  while (!u.inRange && i <= u.slot.start);
                }
                return this._continuousRange(bt, e, f, u);
              },
              _continuousRange: function (n, t, i, r) {
                for (
                  var o,
                    s,
                    h,
                    f,
                    e,
                    a = i.slot,
                    v = r.slot,
                    c = a.collectionIndex,
                    l = v.collectionIndex,
                    y = [],
                    u = c;
                  u <= l;
                  u++
                )
                  (o = t[u]),
                    (s = o.first()),
                    (h = o.last()),
                    (f = !1),
                    (e = !1),
                    u == c && (e = !i.inRange),
                    u == l && (f = !r.inRange),
                    s.start < a.start && (s = a),
                    h.start > v.start && (h = v),
                    c < l &&
                      (u == c ? (f = !0) : u == l ? (e = !0) : (f = e = !0)),
                    y.push(
                      new n({
                        start: s,
                        end: h,
                        collection: o,
                        head: f,
                        tail: e,
                      })
                    );
                return y;
              },
              slotRanges: function (n, i) {
                var r = n._startTime || t.date.toUtcTime(n.start),
                  u = n._endTime || t.date.toUtcTime(n.end);
                return (
                  void 0 === i && (i = n.isMultiDay()),
                  i
                    ? this.daySlotRanges(r, u, n.isAllDay)
                    : this.timeSlotRanges(r, u)
                );
              },
              ranges: function (n, i, r, u) {
                return (
                  "number" != typeof n && (n = t.date.toUtcTime(n)),
                  "number" != typeof i && (i = t.date.toUtcTime(i)),
                  r ? this.daySlotRanges(n, i, u) : this.timeSlotRanges(n, i)
                );
              },
              _startCollection: function (n, t) {
                for (var r, i = 0; i < t.length; i++)
                  if (((r = t[i]), r.startInRange(n))) return r;
                return null;
              },
              _endCollection: function (n, t, i) {
                for (var u, r = 0; r < t.length; r++)
                  if (((u = t[r]), u.endInRange(n, i))) return u;
                return null;
              },
              _getCollections: function (n) {
                return n ? this._daySlotCollections : this._timeSlotCollections;
              },
              continuousSlot: function (n, t) {
                var r = t ? -1 : 1,
                  u = this._getCollections(n.isDaySlot),
                  i = u[n.collectionIndex + r];
                if (i) return i[t ? "last" : "first"]();
              },
              firstSlot: function () {
                var n = this._getCollections(this.daySlotCollectionCount());
                return n[0].first();
              },
              lastSlot: function () {
                var n = this._getCollections(this.daySlotCollectionCount());
                return n[n.length - 1].last();
              },
              upSlot: function (n, t, i) {
                var r = this,
                  u = function (n, i, u) {
                    var f = 0 === u;
                    if (!t && !n && f && r.daySlotCollectionCount())
                      return r._daySlotCollections[0].at(i);
                  };
                return (
                  this.timeSlotCollectionCount() || (t = !0),
                  this._verticalSlot(n, -1, u, i)
                );
              },
              downSlot: function (n, t, i) {
                var r = this,
                  u = function (n, i, u) {
                    if (!t && n && r.timeSlotCollectionCount())
                      return r._timeSlotCollections[u].at(0);
                  };
                return (
                  this.timeSlotCollectionCount() || (t = !0),
                  this._verticalSlot(n, 1, u, i)
                );
              },
              leftSlot: function (n, t) {
                return this._horizontalSlot(n, -1, t);
              },
              rightSlot: function (n, t) {
                return this._horizontalSlot(n, 1, t);
              },
              _horizontalSlot: function (n, t, i) {
                var u,
                  f = n.index,
                  r = n.isDaySlot,
                  e = n.collectionIndex,
                  o = this._getCollections(r);
                return (
                  (r = !i && r),
                  r ? (f += t) : (e += t),
                  (u = o[e]),
                  u ? u.at(f) : void 0
                );
              },
              _verticalSlot: function (n, t, i, r) {
                var f,
                  e = n.index,
                  u = n.isDaySlot,
                  o = n.collectionIndex,
                  s = this._getCollections(u);
                return (n = i(u, o, e))
                  ? n
                  : ((u = !r && u),
                    u ? (o += t) : (e += t),
                    (f = s[o]),
                    f ? f.at(e) : void 0);
              },
              _collection: function (n, t) {
                var i = t
                  ? this._daySlotCollections
                  : this._timeSlotCollections;
                return i[n];
              },
              _startSlot: function (n, t, i) {
                var r,
                  u = this._startCollection(n, t),
                  f = !0;
                return (
                  u || ((u = t[0]), (f = !1)),
                  (r = u.slotByStartDate(n, i)),
                  r || ((r = u.first()), (f = !1)),
                  { slot: r, inRange: f }
                );
              },
              _endSlot: function (n, t, i) {
                var r,
                  u = this._endCollection(n, t, i),
                  f = !0;
                return (
                  u || ((u = t[t.length - 1]), (f = !1)),
                  (r = u.slotByEndDate(n, i)),
                  r || ((r = u.last()), (f = !1)),
                  { slot: r, inRange: f }
                );
              },
              getSlotCollection: function (n, t) {
                return this[
                  t ? "getDaySlotCollection" : "getTimeSlotCollection"
                ](n);
              },
              getTimeSlotCollection: function (n) {
                return this._timeSlotCollections[n];
              },
              getDaySlotCollection: function (n) {
                return this._daySlotCollections[n];
              },
            }),
            d = t.Class.extend({
              init: function (t) {
                n.extend(this, t);
              },
              innerHeight: function () {
                for (
                  var i = this.collection,
                    r = this.start.index,
                    u = this.end.index,
                    t = 0,
                    n = r;
                  n <= u;
                  n++
                )
                  t += i.at(n).offsetHeight;
                return t;
              },
              events: function () {
                return this.collection.events();
              },
              addEvent: function (n) {
                this.events().push(n);
              },
              startSlot: function () {
                return this.start.offsetLeft > this.end.offsetLeft
                  ? this.end
                  : this.start;
              },
              endSlot: function () {
                return this.start.offsetLeft > this.end.offsetLeft
                  ? this.start
                  : this.end;
              },
            }),
            wt = d.extend({
              innerHeight: function () {
                for (
                  var i = this.collection,
                    r = this.start.index,
                    u = this.end.index,
                    t = 0,
                    n = r;
                  n <= u;
                  n++
                )
                  t += i.at(n).offsetHeight;
                return t;
              },
              outerRect: function (n, t, i) {
                return this._rect("offset", n, t, i);
              },
              _rect: function (n, i, r, u) {
                var v,
                  y,
                  o,
                  c,
                  s,
                  l,
                  h,
                  a,
                  e = this.start,
                  f = this.end,
                  p = t.support.isRtl(e.element);
                return (
                  "number" != typeof i && (i = t.date.toUtcTime(i)),
                  "number" != typeof r && (r = t.date.toUtcTime(r)),
                  u
                    ? ((v = e.offsetTop),
                      (y = f.offsetTop + f[n + "Height"]),
                      p
                        ? ((o = f.offsetLeft),
                          (c = e.offsetLeft + e[n + "Width"]))
                        : ((o = e.offsetLeft),
                          (c = f.offsetLeft + f[n + "Width"])))
                    : ((s = i - e.start),
                      s < 0 && (s = 0),
                      (l = e.end - e.start),
                      (v = e.offsetTop + (e[n + "Height"] * s) / l),
                      (h = f.end - r),
                      h < 0 && (h = 0),
                      (a = f.end - f.start),
                      (y =
                        f.offsetTop +
                        f[n + "Height"] -
                        (f[n + "Height"] * h) / a),
                      p
                        ? ((o = Math.round(
                            f.offsetLeft + (f[n + "Width"] * h) / a
                          )),
                          (c = Math.round(
                            e.offsetLeft +
                              e[n + "Width"] -
                              (e[n + "Width"] * s) / l
                          )))
                        : ((o = Math.round(
                            e.offsetLeft + (e[n + "Width"] * s) / l
                          )),
                          (c = Math.round(
                            f.offsetLeft +
                              f[n + "Width"] -
                              (f[n + "Width"] * h) / a
                          )))),
                  { top: v, bottom: y, left: 0 === o ? o : o + 1, right: c }
                );
              },
              innerRect: function (n, t, i) {
                return this._rect("client", n, t, i);
              },
            }),
            bt = d.extend({
              innerWidth: function () {
                for (
                  var u = this.collection,
                    t = this.start.index,
                    i = this.end.index,
                    r = 0,
                    f = t !== i ? "offsetWidth" : "clientWidth",
                    n = t;
                  n <= i;
                  n++
                )
                  r += u.at(n)[f];
                return r;
              },
            }),
            kt = t.Class.extend({
              init: function (n, i, r, u) {
                this._slots = [];
                this._events = [];
                this._start = t.date.toUtcTime(n);
                this._end = t.date.toUtcTime(i);
                this._groupIndex = r;
                this._collectionIndex = u;
              },
              refresh: function () {
                for (var n = 0; n < this._slots.length; n++)
                  this._slots[n].refresh();
              },
              startInRange: function (n) {
                return this._start <= n && n < this._end;
              },
              endInRange: function (n, t) {
                var i = t ? n < this._end : n <= this._end;
                return this._start <= n && i;
              },
              slotByStartDate: function (n) {
                var i,
                  r,
                  u = n;
                for (
                  "number" != typeof u && (u = t.date.toUtcTime(n)), i = 0;
                  i < this._slots.length;
                  i++
                )
                  if (((r = this._slots[i]), r.startInRange(u))) return r;
                return null;
              },
              slotByEndDate: function (n, i) {
                var r,
                  u,
                  f = n;
                if (("number" != typeof f && (f = t.date.toUtcTime(n)), i))
                  return this.slotByStartDate(n, !1);
                for (r = 0; r < this._slots.length; r++)
                  if (((u = this._slots[r]), u.endInRange(f))) return u;
                return null;
              },
              count: function () {
                return this._slots.length;
              },
              events: function () {
                return this._events;
              },
              addTimeSlot: function (n, t, i, r) {
                var u = new dt(
                  n,
                  t,
                  i,
                  this._groupIndex,
                  this._collectionIndex,
                  this._slots.length,
                  r
                );
                this._slots.push(u);
              },
              addDaySlot: function (n, t, i, r) {
                var u = new gt(
                  n,
                  t,
                  i,
                  this._groupIndex,
                  this._collectionIndex,
                  this._slots.length,
                  r
                );
                this._slots.push(u);
              },
              first: function () {
                return this._slots[0];
              },
              last: function () {
                return this._slots[this._slots.length - 1];
              },
              at: function (n) {
                return this._slots[n];
              },
            }),
            h = t.Class.extend({
              init: function (n, t, i, r, u, f) {
                this.element = n;
                this.clientWidth = n.clientWidth;
                this.clientHeight = n.clientHeight;
                this.offsetWidth = n.offsetWidth;
                this.offsetHeight = n.offsetHeight;
                this.offsetTop = n.offsetTop;
                this.offsetLeft = n.offsetLeft;
                this.start = t;
                this.end = i;
                this.element = n;
                this.groupIndex = r;
                this.collectionIndex = u;
                this.index = f;
                this.isDaySlot = !1;
              },
              refresh: function () {
                var n = this.element;
                this.clientWidth = n.clientWidth;
                this.clientHeight = n.clientHeight;
                this.offsetWidth = n.offsetWidth;
                this.offsetHeight = n.offsetHeight;
                this.offsetTop = n.offsetTop;
                this.offsetLeft = n.offsetLeft;
              },
              startDate: function () {
                return t.timezone.toLocalDate(this.start);
              },
              endDate: function () {
                return t.timezone.toLocalDate(this.end);
              },
              startInRange: function (n) {
                return this.start <= n && n < this.end;
              },
              endInRange: function (n) {
                return this.start < n && n <= this.end;
              },
              startOffset: function () {
                return this.start;
              },
              endOffset: function () {
                return this.end;
              },
            }),
            dt = h.extend({
              init: function (n, t, i, r, u, f, e) {
                h.fn.init.apply(this, arguments);
                this.isHorizontal = !!e;
              },
              offsetX: function (n, t) {
                return n ? this.offsetLeft + t : this.offsetLeft + t;
              },
              startInRange: function (n) {
                return this.start <= n && n < this.end;
              },
              endInRange: function (n) {
                return this.start < n && n <= this.end;
              },
              startOffset: function (i, r, u) {
                var s, f, e, o, h;
                if (u) return this.start;
                if (
                  ((s = n(this.element).offset()),
                  (f = this.end - this.start),
                  this.isHorizontal)
                ) {
                  if (
                    ((h = t.support.isRtl(this.element)),
                    (e = i - s.left),
                    (o = Math.floor(f * (e / this.offsetWidth))),
                    h)
                  )
                    return this.start + f - o;
                } else
                  (e = r - s.top),
                    (o = Math.floor(f * (e / this.offsetHeight)));
                return this.start + o;
              },
              endOffset: function (i, r, u) {
                var s, f, e, o, h;
                if (u) return this.end;
                if (
                  ((s = n(this.element).offset()),
                  (f = this.end - this.start),
                  this.isHorizontal)
                ) {
                  if (
                    ((h = t.support.isRtl(this.element)),
                    (e = i - s.left),
                    (o = Math.floor(f * (e / this.offsetWidth))),
                    h)
                  )
                    return this.start + f - o;
                } else
                  (e = r - s.top),
                    (o = Math.floor(f * (e / this.offsetHeight)));
                return this.start + o;
              },
            }),
            gt = h.extend({
              init: function (n, t, i, r, u, f, e) {
                if (
                  (h.fn.init.apply(this, arguments),
                  (this.eventCount = e),
                  (this.isDaySlot = !0),
                  this.element.children.length)
                ) {
                  var o = this.element.children[0];
                  this.firstChildHeight = o.offsetHeight;
                  this.firstChildTop = o.offsetTop;
                } else (this.firstChildHeight = 3), (this.firstChildTop = 0);
              },
              startDate: function () {
                var n = new Date(this.start);
                return t.timezone.apply(n, "Etc/UTC");
              },
              endDate: function () {
                var n = new Date(this.end);
                return t.timezone.apply(n, "Etc/UTC");
              },
              startInRange: function (n) {
                return this.start <= n && n < this.end;
              },
              endInRange: function (n) {
                return this.start < n && n <= this.end;
              },
            });
          t.ui.SchedulerView = a.extend({
            init: function (i, r) {
              a.fn.init.call(this, i, r);
              this._normalizeOptions();
              this._scrollbar = ut();
              this._isRtl = t.support.isRtl(i);
              this._resizeHint = n();
              this._moveHint = n();
              this._cellId = t.guid();
              this._resourcesForGroups();
              this._selectedSlots = [];
            },
            visibleEndDate: function () {
              return this.endDate();
            },
            _normalizeOptions: function () {
              var n = this.options;
              n.startTime && n.startTime.setMilliseconds(0);
              n.endTime && n.endTime.setMilliseconds(0);
              n.workDayStart && n.workDayStart.setMilliseconds(0);
              n.workDayEnd && n.workDayEnd.setMilliseconds(0);
            },
            _isMobile: function () {
              var n = this.options;
              return (
                (n.mobile === !0 && t.support.mobileOS) ||
                "phone" === n.mobile ||
                "tablet" === n.mobile
              );
            },
            _addResourceView: function () {
              var n = new pt(this.groups.length, this._isRtl);
              return this.groups.push(n), n;
            },
            dateForTitle: function () {
              return t.format(
                this.options.selectedDateFormat,
                this.startDate(),
                this.endDate()
              );
            },
            shortDateForTitle: function () {
              return t.format(
                this.options.selectedShortDateFormat,
                this.startDate(),
                this.endDate()
              );
            },
            mobileDateForTitle: function () {
              return t.format(
                this.options.selectedMobileDateFormat ||
                  this.options.selectedShortDateFormat,
                this.startDate(),
                this.endDate()
              );
            },
            _changeGroup: function (n, t) {
              var r = t ? "prevGroupSlot" : "nextGroupSlot",
                i = this[r](n.start, n.groupIndex, n.isAllDay);
              return (
                i && (n.groupIndex += t ? -1 : 1),
                this._isGroupedByDate() &&
                  !i &&
                  (n.groupIndex = t ? this.groups.length - 1 : 0),
                i
              );
            },
            _changeDate: function (n, t, i) {
              var u,
                r,
                e,
                f = this.groups[n.groupIndex];
              if (i) {
                if (
                  ((u = f._getCollections(!1)),
                  (r = f.daySlotCollectionCount()
                    ? t.index - 1
                    : t.collectionIndex - 1),
                  r >= 0)
                )
                  return u[r]._slots[u[r]._slots.length - 1];
              } else if (
                ((u = f._getCollections(f.daySlotCollectionCount())),
                (r = f.daySlotCollectionCount() ? 0 : t.collectionIndex + 1),
                (e = f.daySlotCollectionCount() ? t.collectionIndex + 1 : 0),
                u[r] && u[r]._slots[e])
              )
                return u[r]._slots[e];
            },
            _changeGroupContinuously: function () {
              return null;
            },
            _changeViewPeriod: function () {
              return !1;
            },
            _isInRange: function (n, t) {
              return (
                !!(n && t && this.options.min && this.options.max) &&
                (s(n) <= s(this.options.min) || s(t) >= s(this.options.max))
              );
            },
            _horizontalSlots: function (n, t, i, r) {
              var e,
                o,
                f,
                s = r ? "leftSlot" : "rightSlot",
                u = { startSlot: t[0].start, endSlot: t[t.length - 1].end },
                h = this.groups[n.groupIndex],
                c = this._isVerticallyGrouped();
              return (
                i ||
                  ((e = this._normalizeHorizontalSelection(n, t, r)),
                  e && (u.startSlot = u.endSlot = e)),
                this._isGroupedByDate() && !i
                  ? ((o = this._changeGroup(n, r)),
                    o
                      ? (u.startSlot = u.endSlot = o)
                      : (u = this._getNextHorizontalRange(h, s, u)))
                  : ((u.startSlot = h[s](u.startSlot)),
                    (u.endSlot = h[s](u.endSlot)),
                    i ||
                      c ||
                      (u.startSlot && u.endSlot) ||
                      (u.startSlot = u.endSlot = this._changeGroup(n, r))),
                (u.startSlot && u.endSlot) ||
                  this._isGroupedByDate() ||
                  ((f = this._continuousSlot(n, t, r)),
                  (f = this._changeGroupContinuously(n, f, i, r)),
                  f && (u.startSlot = u.endSlot = f)),
                u
              );
            },
            _getNextHorizontalRange: function (n, t, i) {
              return (
                this._isVerticallyGrouped() ||
                  ((i.startSlot = n[t](i.startSlot)),
                  (i.endSlot = n[t](i.endSlot))),
                i
              );
            },
            _verticalSlots: function (n, t, i, r) {
              var f,
                e,
                o = this.groups[n.groupIndex],
                u = { startSlot: t[0].start, endSlot: t[t.length - 1].end };
              return (
                i ||
                  ((f = this._normalizeVerticalSelection(n, t, r)),
                  f && (u.startSlot = u.endSlot = f)),
                (e = r ? "upSlot" : "downSlot"),
                (u = this._getNextVerticalRange(o, e, u, i)),
                i ||
                  !this._isVerticallyGrouped() ||
                  (u.startSlot && u.endSlot) ||
                  (u.startSlot = u.endSlot =
                    this._isGroupedByDate()
                      ? this._changeDate(n, f, r)
                      : this._changeGroup(n, r)),
                u
              );
            },
            _getNextVerticalRange: function (n, t, i, r) {
              return (
                (i.startSlot = n[t](i.startSlot, r)),
                (i.endSlot = n[t](i.endSlot, r)),
                i
              );
            },
            _normalizeHorizontalSelection: function () {
              return null;
            },
            _normalizeVerticalSelection: function (n, t, i) {
              return i ? t[0].start : t[t.length - 1].end;
            },
            _continuousSlot: function () {
              return null;
            },
            _footer: function () {
              var r,
                i = this,
                u = i.options;
              i._isMobile() &&
                ((r = '<div class="k-header k-scheduler-footer">'),
                (r +=
                  '<span class="k-state-default k-scheduler-today"><a href="#" class="k-link">'),
                (r += u.messages.today + "</a></span>"),
                (r += "</div>"),
                (i.footer = n(r).appendTo(i.element)));
              i.footer &&
                i.footer.on("click" + k, ".k-scheduler-today", function (n) {
                  var f, o, r, e, s;
                  n.preventDefault();
                  f = i.options.timezone;
                  o = "today";
                  r = new Date();
                  f
                    ? ((s = t.timezone.offset(r, f)),
                      (e = t.timezone.convert(r, r.getTimezoneOffset(), s)))
                    : (e = r);
                  i.trigger("navigate", {
                    view: i.name || u.name,
                    action: o,
                    date: e,
                  });
                });
            },
            constrainSelection: function (n) {
              var t,
                i = this.groups[0];
              this.inRange(n)
                ? i.daySlotCollectionCount()
                  ? i.timeSlotCollectionCount() || (n.isAllDay = !0)
                  : (n.isAllDay = !1)
                : ((t = i.firstSlot()),
                  (n.isAllDay = t.isDaySlot),
                  (n.start = t.startDate()),
                  (n.end = t.endDate()));
              this.groups[n.groupIndex] || (n.groupIndex = 0);
            },
            move: function (n, t, i) {
              var s,
                f,
                h,
                u,
                e,
                c,
                o = !1,
                l = this.groups[n.groupIndex],
                a = this._isGroupedByDate() && this._isVerticallyGrouped();
              if (
                (l.timeSlotCollectionCount() || (n.isAllDay = !0),
                (s = l.ranges(n.start, n.end, n.isAllDay, !1)),
                t === r.DOWN || t === r.UP)
              ) {
                if (
                  ((o = !0),
                  (u = t === r.UP),
                  this._updateDirection(n, s, i, u, !0),
                  (e = this._verticalSlots(n, s, i, u)),
                  !e.startSlot && !i && this._changeViewPeriod(n, u, !a))
                )
                  return o;
              } else if (
                (t === r.LEFT || t === r.RIGHT) &&
                ((o = !0),
                (u = t === r.LEFT),
                this._updateDirection(n, s, i, u, !1),
                (e = this._horizontalSlots(n, s, i, u)),
                !e.startSlot && !i && this._changeViewPeriod(n, u, a))
              )
                return o;
              return (
                o &&
                  ((f = e.startSlot),
                  (h = e.endSlot),
                  i
                    ? ((c = n.backward),
                      c && f
                        ? (n.start = f.startDate())
                        : !c && h && (n.end = h.endDate()))
                    : f &&
                      h &&
                      ((n.isAllDay = f.isDaySlot),
                      (n.start = f.startDate()),
                      (n.end = h.endDate())),
                  (n.events = [])),
                o
              );
            },
            moveToEventInGroup: function (t, i, r, u) {
              var a,
                f,
                h,
                e,
                s = t._continuousEvents || [],
                c = u ? -1 : 1,
                l = s.length,
                o = u ? l - 1 : 0;
              if (r.length)
                for (h = r[r.length - 1], e = 0; e < s.length; e++)
                  s[e].uid === h && (o = e + c);
              for (; o < l && o > -1; ) {
                if (
                  ((f = s[o]),
                  ((!u && f.start.startDate() >= i.startDate()) ||
                    (u && f.start.startDate() <= i.startDate())) &&
                    f &&
                    n.inArray(f.uid, r) === -1)
                ) {
                  a = !!f;
                  break;
                }
                o += c;
              }
              return f;
            },
            moveToEvent: function (n, t) {
              var i,
                l,
                a,
                r,
                h,
                u,
                e = n.groupIndex,
                o = this.groups[e],
                f = o.ranges(n.start, n.end, n.isAllDay, !1)[0].start,
                v = this.groups.length,
                c = t ? -1 : 1,
                s = n.events;
              if (this._isGroupedByDate())
                if (
                  ((l = this._getAllEvents()),
                  (a = this._getUniqueEvents(l)),
                  (r = this._getSortedEvents(a)),
                  0 === s.length)
                )
                  (h = this._getNextEventIndexBySlot(f, r, e)),
                    t && h--,
                    (i = r[h]);
                else
                  for (
                    u = this._getStartIdx(s, r);
                    u < r.length &&
                    u > -1 &&
                    (s.length > 0 &&
                      (f = this._getSelectedSlot(f, r, i, u, c, t)),
                    f);

                  ) {
                    if (
                      ((!t && r[u].start.startDate() >= f.startDate()) ||
                        (t && r[u].start.startDate() <= f.startDate())) &&
                      s[0] != r[u].uid
                    ) {
                      i = r[u];
                      break;
                    }
                    u += c;
                  }
              else
                for (
                  ;
                  e < v &&
                  e > -1 &&
                  ((i = this.moveToEventInGroup(o, f, s, t)),
                  (e += c),
                  (o = this.groups[e]),
                  o && !i);

                )
                  (s = []), (f = t ? o.lastSlot() : o.firstSlot(!0));
              return (
                i &&
                  ((n.events = [i.uid]),
                  (n.start = i.start.startDate()),
                  (n.end = i.end.endDate()),
                  (n.isAllDay = i.start.isDaySlot),
                  (n.groupIndex = i.start.groupIndex)),
                !!i
              );
            },
            current: function (n) {
              return void 0 === n
                ? this._current
                : ((this._current = n),
                  void (
                    this.content.has(n) && this._scrollTo(n, this.content[0])
                  ));
            },
            select: function (n) {
              this.clearSelection();
              this._selectEvents(n) || this._selectSlots(n);
            },
            _getNextEventIndexBySlot: function (n, i, r) {
              for (
                var f, e = 0, o = t.date.getDate(n.startDate()), u = 0;
                u < i.length;
                u++
              )
                if (((f = t.date.getDate(i[u].start.startDate())), o > f)) e++;
                else if (
                  o.getTime() === f.getTime() &&
                  r > i[u].start.groupIndex
                )
                  e++;
                else {
                  if (
                    !(
                      o.getTime() === f.getTime() &&
                      r >= i[u].start.groupIndex &&
                      n.startDate() > i[u].start.startDate()
                    )
                  )
                    break;
                  e++;
                }
              return e;
            },
            _getSelectedSlot: function (n, t, i, r, u, f) {
              var o, e;
              return (
                t[r + u] &&
                  t[r].start.groupIndex !== t[r + u].start.groupIndex &&
                  ((o = t[r + u].start.groupIndex),
                  (e = this.groups[o]),
                  (e && !i) || (n = null),
                  (n = f ? e.lastSlot() : e.firstSlot(!0))),
                n
              );
            },
            _getStartIdx: function (t, i) {
              var r = 0;
              return (
                n.each(i, function () {
                  return this.uid !== t[0] && void r++;
                }),
                r
              );
            },
            _getAllEvents: function () {
              for (var t = [], i = this.groups, n = 0; n < i.length; n++)
                i[n]._continuousEvents &&
                  (t = t.concat(i[n]._continuousEvents));
              return t;
            },
            _getUniqueEvents: function (n) {
              for (var u, i, r = [], t = 0; t < n.length; t++) {
                for (u = !1, i = 0; i < r.length; i++)
                  if (n[t].uid === r[i].uid) {
                    u = !0;
                    break;
                  }
                u || r.push(n[t]);
              }
              return r;
            },
            _getSortedEvents: function (i) {
              return i.sort(function (i, r) {
                var f = i.start.startDate(),
                  e = r.start.startDate(),
                  u = t.date.getDate(f) - t.date.getDate(e);
                return (
                  0 === u && (u = i.start.groupIndex - r.start.groupIndex),
                  0 === u && (u = f.getTime() - e.getTime()),
                  0 === u &&
                    (i.start.isDaySlot && !r.start.isDaySlot && (u = -1),
                    !i.start.isDaySlot && r.start.isDaySlot && (u = 1)),
                  0 === u && (u = n(i.element).index() - n(r.element).index()),
                  u
                );
              });
            },
            _selectSlots: function (n) {
              var i,
                t,
                r,
                u,
                f,
                o,
                e,
                s = n.isAllDay,
                h = this.groups[n.groupIndex];
              for (
                h.timeSlotCollectionCount() || (s = !0),
                  this._selectedSlots = [],
                  i = h.ranges(n.start, n.end, s, !1),
                  u = 0;
                u < i.length;
                u++
              )
                for (
                  f = i[u], o = f.collection, e = f.start.index;
                  e <= f.end.index;
                  e++
                )
                  (r = o.at(e)),
                    (t = r.element),
                    t.setAttribute("aria-selected", !0),
                    ct(t),
                    this._selectedSlots.push({
                      start: r.startDate(),
                      end: r.endDate(),
                      element: t,
                    });
              n.backward && (t = i[0].start.element);
              this.current(t);
            },
            _selectEvents: function (t) {
              var r,
                u,
                i,
                e = !1,
                o = t.events,
                f = this._getAllEvents(),
                s = f.length;
              if (!o[0] || !f[0]) return e;
              for (i = n(), t.events = [], r = 0; r < s; r++)
                n.inArray(f[r].uid, o) > -1 &&
                  ((u = f[r]),
                  (i = i.add(u.element)),
                  t.events.indexOf(u.uid) === -1 && t.events.push(u.uid));
              return (
                i[0] &&
                  (i.addClass("k-state-selected").attr("aria-selected", !0),
                  this.current(i.last()[0]),
                  (this._selectedSlots = []),
                  (e = !0)),
                e
              );
            },
            inRange: function (n) {
              var i = this.startDate(),
                r = t.date.addDays(this.endDate(), 1),
                u = n.start,
                f = n.end;
              return i <= u && u < r && i < f && f <= r;
            },
            _resourceValue: function (n, i) {
              return n.valuePrimitive && (i = t.getter(n.dataValueField)(i)), i;
            },
            _resourceBySlot: function (n) {
              var r,
                u,
                i,
                f,
                o,
                e = this.groupedResources,
                s = {};
              if (e.length)
                for (r = n.groupIndex, u = e.length - 1; u >= 0; u--)
                  (i = e[u]),
                    (f = this._resourceValue(
                      i,
                      i.dataSource.view()[r % i.dataSource.total()]
                    )),
                    i.multiple && (f = [f]),
                    (o = t.setter(i.field)),
                    o(s, f),
                    (r = Math.floor(r / i.dataSource.total()));
              return s;
            },
            _createResizeHint: function (t, i, r, u) {
              return n(yt).css({ left: t, top: i, width: r, height: u });
            },
            _removeResizeHint: function () {
              this._resizeHint.remove();
              this._resizeHint = n();
            },
            _removeMoveHint: function (t) {
              t
                ? (this._moveHint.filter("[data-uid='" + t + "']").remove(),
                  (this._moveHint = this._moveHint.filter(
                    "[data-uid!='" + t + "']"
                  )))
                : (this._moveHint.remove(), (this._moveHint = n()));
            },
            _scrollTo: function (n, t) {
              var i = n.offsetTop,
                f = n.offsetHeight,
                r = t.scrollTop,
                u = t.clientHeight,
                e = i + f,
                o = 0;
              o = r > i ? i : e > r + u ? (f <= u ? e - u : i) : r;
              t.scrollTop = o;
            },
            _inverseEventColor: function (n) {
              var t = n.css("color"),
                r = new i(t).isDark(),
                u = n.css("background-color"),
                f = new i(u).isDark();
              r == f && n.addClass(lt);
            },
            _eventTmpl: function (i, r) {
              var f,
                h = this.options,
                o = n.extend({}, t.Template, h.templateSettings),
                c = o.paramName,
                e = "",
                s = typeof i,
                u = { storage: {}, count: 0 };
              return (
                "function" === s
                  ? ((u.storage["tmpl" + u.count] = i),
                    (e += "#=this.tmpl" + u.count + "(" + c + ")#"),
                    u.count++)
                  : "string" === s && (e += i),
                (f = t.template(t.format(r, e), o)),
                u.count > 0 && (f = n.proxy(f, u.storage)),
                f
              );
            },
            eventResources: function (n) {
              var o,
                i,
                a,
                r,
                s,
                h,
                u,
                f,
                e,
                v,
                c = [],
                l = this.options;
              if (!l.resources) return c;
              for (o = 0; o < l.resources.length; o++)
                if (
                  ((i = l.resources[o]),
                  (a = i.field),
                  (r = t.getter(a)(n)),
                  null != r)
                )
                  for (
                    i.multiple || (r = [r]), s = i.dataSource.view(), h = 0;
                    h < r.length;
                    h++
                  ) {
                    for (
                      u = null,
                        f = r[h],
                        i.valuePrimitive || (f = t.getter(i.dataValueField)(f)),
                        e = 0;
                      e < s.length;
                      e++
                    )
                      if (s[e].get(i.dataValueField) == f) {
                        u = s[e];
                        break;
                      }
                    null !== u &&
                      ((v = t.getter(i.dataColorField)(u)),
                      c.push({
                        field: i.field,
                        title: i.title,
                        name: i.name,
                        text: t.getter(i.dataTextField)(u),
                        value: f,
                        color: v,
                      }));
                  }
              return c;
            },
            createLayout: function (i) {
              var u,
                s,
                r,
                f,
                o,
                e = -1;
              for (i.rows || (i.rows = []), u = 0; u < i.rows.length; u++)
                if (i.rows[u].allDay) {
                  e = u;
                  break;
                }
              s = i.rows[e];
              e >= 0 && i.rows.splice(e, 1);
              r = this.columnLevels = v(i, "columns");
              f = this.rowLevels = v(i, "rows");
              this.table = n(
                '<table role="presentation"' +
                  c() +
                  ' class="k-scheduler-layout k-scheduler-' +
                  this.name +
                  'view"><tbody></tbody></table>'
              );
              o = f[f.length - 1].length;
              this.table.find("tbody:first").append(this._topSection(r, s, o));
              this.table
                .find("tbody:first")
                .append(this._bottomSection(r, f, o));
              this.element.append(this.table);
              this._isMobile() &&
                r.length > 1 &&
                "horizontal" === this._groupOrientation() &&
                t._outerWidth(n(window)) < at &&
                (this.table
                  .find(".k-scheduler-content .k-scheduler-table")
                  .width(100 * r[r.length - 2].length + "%"),
                this.table
                  .find(".k-scheduler-header .k-scheduler-table")
                  .width(100 * r[r.length - 2].length + "%"));
              this._scroller();
            },
            refreshLayout: function () {
              for (
                var l,
                  a,
                  r,
                  v,
                  s,
                  i = this,
                  y = i.element.find(">.k-scheduler-toolbar"),
                  u = i.element.innerHeight(),
                  h = this._scrollbar,
                  e = 0,
                  c = this._isRtl ? "left" : "right",
                  o = 0;
                o < y.length;
                o++
              )
                u -= f(y.eq(o));
              i.datesHeader && (e = f(i.datesHeader));
              i.timesHeader && f(i.timesHeader) > e && (e = f(i.timesHeader));
              i.datesHeader &&
                i.timesHeader &&
                ((l = i.datesHeader.find("table:first tr")),
                i.timesHeader.find("tr").height(function (t) {
                  n(this).height(l.eq(t).height());
                }));
              e && (u -= e);
              i.footer && (u -= f(i.footer));
              a = function (n) {
                var t, i;
                return (
                  !!n[0].style.height ||
                  ((t = n.height()),
                  n.height("auto"),
                  (i = n.height()),
                  t != i ? (n.height(""), !0) : (n.height(""), !1))
                );
              };
              r = i.content[0];
              v = t.support.kineticScrollNeeded ? 0 : h;
              a(i.element) &&
                (i.content.height(u > 2 * h ? u : 2 * h + 1),
                i.times.height(r.clientHeight),
                (s = i.times.find("table")),
                s.length && s.height(i.content.find("table")[0].clientHeight));
              r.offsetWidth - r.clientWidth > 0
                ? (i.table.addClass("k-scrollbar-v"),
                  i.datesHeader.css(
                    "padding-" + c,
                    v -
                      parseInt(
                        i.datesHeader.children().css("border-" + c + "-width"),
                        10
                      )
                  ))
                : i.datesHeader.css("padding-" + c, "");
              r.offsetHeight - r.clientHeight > 0 ||
              r.clientHeight > i.content.children(".k-scheduler-table").height()
                ? i.table.addClass("k-scrollbar-h")
                : i.table.removeClass("k-scrollbar-h");
            },
            _topSection: function (t, i, r) {
              var u,
                f = t[t.length - 1].length;
              return (
                (this.timesHeader = nt(t.length, i, r)),
                (this.datesHeader = tt(t, f, i)),
                (u =
                  "<tr " +
                  (this._isMobile() ? "class='k-mobile-header'" : "") +
                  ">"),
                n(u).append(
                  this.timesHeader.add(this.datesHeader).wrap("<td>").parent()
                )
              );
            },
            _bottomSection: function (t, i, r) {
              return (
                (this.times = it(i, r, this._isMobile())),
                (this.content = rt(t[t.length - 1], i[i.length - 1])),
                n("<tr>").append(
                  this.times.add(this.content).wrap("<td>").parent()
                )
              );
            },
            _scroller: function () {
              var i,
                r = this;
              this.content.bind("scroll" + k, function () {
                r.datesHeader
                  .find(">.k-scheduler-header-wrap")
                  .scrollLeft(this.scrollLeft);
                r.times.scrollTop(this.scrollTop);
              });
              i = t.touchScroller(this.content, {
                avoidScrolling: function (t) {
                  return (
                    n(t.event.target).closest(".k-event.k-event-active")
                      .length > 0
                  );
                },
              });
              i &&
                i.movable &&
                ((this._touchScroller = i),
                (this.content = i.scrollElement),
                i.movable.bind("change", function (n) {
                  r.datesHeader
                    .find(">.k-scheduler-header-wrap")
                    .scrollLeft(-n.sender.x);
                  r.times.scrollTop(-n.sender.y);
                }));
            },
            _resourcesForGroups: function () {
              var t,
                u,
                i,
                f,
                e = [],
                n = this.options.group,
                r = this.options.resources;
              if (((n = n && n.resources ? n.resources : []), r && n.length))
                for (t = 0, u = r.length; t < u; t++)
                  for (i = 0, f = n.length; i < f; i++)
                    r[t].name === n[i] && e.push(r[t]);
              this.groupedResources = e;
            },
            _createDateLayout: function (n, t, i) {
              return p("rows", n, t, i);
            },
            _createColumnsLayout: function (n, t, i, r, f) {
              return u("columns", n, t, i, r, f);
            },
            _groupOrientation: function () {
              var n = this.options.group;
              return n && n.resources ? n.orientation : "horizontal";
            },
            _isGroupedByDate: function () {
              return this.options.group && this.options.group.date;
            },
            _isVerticallyGrouped: function () {
              return (
                this.groupedResources.length &&
                "vertical" === this._groupOrientation()
              );
            },
            _createRowsLayout: function (n, t, i, r) {
              return u("rows", n, t, i, r);
            },
            selectionByElement: function () {
              return null;
            },
            clearSelection: function () {
              this.content
                .find(".k-state-selected")
                .removeAttr("id")
                .attr("aria-selected", !1)
                .removeClass("k-state-selected");
            },
            destroy: function () {
              var n = this;
              a.fn.destroy.call(this);
              n.table && (t.destroy(n.table), n.table.remove());
              n.footer && (t.destroy(n.footer), n.footer.remove());
              n.groups = null;
              n.table = null;
              n.content = null;
              n.times = null;
              n.datesHeader = null;
              n.timesHeader = null;
              n.footer = null;
              n._resizeHint = null;
              n._moveHint = null;
            },
            calendarInfo: function () {
              return t.getCulture().calendars.standard;
            },
            prevGroupSlot: function (n, t, i) {
              var r,
                u = this.groups[t],
                f = u.ranges(n, n, i, !1)[0].start;
              if (!(t <= 0))
                return this._isGroupedByDate()
                  ? f
                  : this._isVerticallyGrouped()
                  ? u.timeSlotCollectionCount()
                    ? ((r = u._collection(i ? f.index : f.collectionIndex, !1)),
                      r.last())
                    : ((r = u._collection(u.daySlotCollectionCount() - 1, !0)),
                      r.at(f.index))
                  : u.timeSlotCollectionCount()
                  ? ((r = u._collection(
                      i ? 0 : u.timeSlotCollectionCount() - 1,
                      i
                    )),
                    i ? r.last() : r.at(f.index))
                  : ((r = u._collection(f.collectionIndex, !0)), r.last());
            },
            nextGroupSlot: function (n, t, i) {
              var r,
                e,
                u = this.groups[t],
                f = u.ranges(n, n, i, !1)[0].start;
              if (!(t >= this.groups.length - 1))
                return this._isGroupedByDate()
                  ? f
                  : this._isVerticallyGrouped()
                  ? u.timeSlotCollectionCount()
                    ? ((e = u.daySlotCollectionCount()),
                      (r = u._collection(e ? 0 : f.collectionIndex, e)),
                      i ? r.first() : r.at(f.collectionIndex))
                    : ((r = u._collection(0, !0)), r.at(f.index))
                  : u.timeSlotCollectionCount()
                  ? ((r = u._collection(0, i)), i ? r.first() : r.at(f.index))
                  : ((r = u._collection(f.collectionIndex, !0)), r.first());
            },
            _eventOptionsForMove: function () {
              return {};
            },
            _updateEventForResize: function () {},
            _updateEventForSelection: function (n) {
              return n;
            },
          });
          i = function (n) {
            var o,
              s,
              f,
              r,
              u,
              t = this,
              e = i.formats;
            if (1 === arguments.length)
              for (n = t.resolveColor(n), r = 0; r < e.length; r++)
                (o = e[r].re),
                  (s = e[r].process),
                  (f = o.exec(n)),
                  f && ((u = s(f)), (t.r = u[0]), (t.g = u[1]), (t.b = u[2]));
            else
              (t.r = arguments[0]), (t.g = arguments[1]), (t.b = arguments[2]);
            t.r = t.normalizeByte(t.r);
            t.g = t.normalizeByte(t.g);
            t.b = t.normalizeByte(t.b);
          };
          i.prototype = {
            resolveColor: function (n) {
              return (
                (n = n || "#000"),
                "#" == n.charAt(0) && (n = n.substr(1, 6)),
                (n = n.replace(/ /g, "")),
                (n = n.toLowerCase()),
                (n = i.namedColors[n] || n)
              );
            },
            normalizeByte: function (n) {
              return n < 0 || isNaN(n) ? 0 : n > 255 ? 255 : n;
            },
            percBrightness: function () {
              var n = this;
              return vt.sqrt(
                0.241 * n.r * n.r + 0.691 * n.g * n.g + 0.068 * n.b * n.b
              );
            },
            isDark: function () {
              var n = this,
                t = n.percBrightness();
              return t < 180;
            },
          };
          i.formats = [
            {
              re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
              process: function (n) {
                return [
                  parseInt(n[1], 10),
                  parseInt(n[2], 10),
                  parseInt(n[3], 10),
                ];
              },
            },
            {
              re: /^(\w{2})(\w{2})(\w{2})$/,
              process: function (n) {
                return [
                  parseInt(n[1], 16),
                  parseInt(n[2], 16),
                  parseInt(n[3], 16),
                ];
              },
            },
            {
              re: /^(\w{1})(\w{1})(\w{1})$/,
              process: function (n) {
                return [
                  parseInt(n[1] + n[1], 16),
                  parseInt(n[2] + n[2], 16),
                  parseInt(n[3] + n[3], 16),
                ];
              },
            },
          ];
          i.namedColors = {
            aqua: "00ffff",
            azure: "f0ffff",
            beige: "f5f5dc",
            black: "000000",
            blue: "0000ff",
            brown: "a52a2a",
            coral: "ff7f50",
            cyan: "00ffff",
            darkblue: "00008b",
            darkcyan: "008b8b",
            darkgray: "a9a9a9",
            darkgreen: "006400",
            darkorange: "ff8c00",
            darkred: "8b0000",
            dimgray: "696969",
            fuchsia: "ff00ff",
            gold: "ffd700",
            goldenrod: "daa520",
            gray: "808080",
            green: "008000",
            greenyellow: "adff2f",
            indigo: "4b0082",
            ivory: "fffff0",
            khaki: "f0e68c",
            lightblue: "add8e6",
            lightgrey: "d3d3d3",
            lightgreen: "90ee90",
            lightpink: "ffb6c1",
            lightyellow: "ffffe0",
            lime: "00ff00",
            limegreen: "32cd32",
            linen: "faf0e6",
            magenta: "ff00ff",
            maroon: "800000",
            mediumblue: "0000cd",
            navy: "000080",
            olive: "808000",
            orange: "ffa500",
            orangered: "ff4500",
            orchid: "da70d6",
            pink: "ffc0cb",
            plum: "dda0dd",
            purple: "800080",
            red: "ff0000",
            royalblue: "4169e1",
            salmon: "fa8072",
            silver: "c0c0c0",
            skyblue: "87ceeb",
            slateblue: "6a5acd",
            slategray: "708090",
            snow: "fffafa",
            steelblue: "4682b4",
            tan: "d2b48c",
            teal: "008080",
            tomato: "ff6347",
            turquoise: "40e0d0",
            violet: "ee82ee",
            wheat: "f5deb3",
            white: "ffffff",
            whitesmoke: "f5f5f5",
            yellow: "ffff00",
            yellowgreen: "9acd32",
          };
          w = /\s*k-state-selected/;
          n.extend(b.SchedulerView, {
            createColumns: ot,
            createRows: st,
            rangeIndex: o,
            collidingEvents: ft,
            groupEqFilter: ht,
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.scheduler.dayview.min", ["kendo.scheduler.view.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function b(n) {
            var t = new Date(1980, 1, 1, 0, 0, 0);
            return h(t, r(n)), t;
          }
          function e(n, t, i) {
            return n >= t && n <= i;
          }
          function l(n, t, i, r) {
            return (r = r ? n <= i : n < i), n > t && r;
          }
          function y(n, t, r, u) {
            var e,
              f = n._continuousEvents,
              s = f[f.length - 1],
              h = o(t.start.startDate()).getTime();
            if (u && s && o(s.start.startDate()).getTime() == h) {
              for (
                e = f.length - 1;
                e > -1 &&
                !(f[e].isAllDay || o(f[e].start.startDate()).getTime() < h);
                e--
              );
              f.splice(e + 1, 0, {
                element: r,
                isAllDay: !0,
                uid: r.attr(i.attr("uid")),
                start: t.start,
                end: t.end,
              });
            } else
              f.push({
                element: r,
                isAllDay: u,
                uid: r.attr(i.attr("uid")),
                start: t.start,
                end: t.end,
              });
          }
          function it(n) {
            var i = [],
              t = n.workWeekStart % 7,
              r = Math.abs(n.workWeekEnd % 7);
            for (i.push(t); r != t; ) t > 6 ? (t -= 7) : t++, i.push(t);
            return i;
          }
          var i = window.kendo,
            k = i.ui,
            d = i.support.browser,
            h = i.date.setTime,
            f = k.SchedulerView,
            g = i._outerWidth,
            a = i._outerHeight,
            c = n.extend,
            rt = n.proxy,
            o = i.date.getDate,
            p = i.date.MS_PER_MINUTE,
            u = i.date.MS_PER_DAY,
            w = "k-current-time",
            nt = "k-current-time-arrow",
            tt = "k-event-inverse",
            ut = 0.8666,
            r = i.date.getMilliseconds,
            s = ".kendoMultiDayView",
            ft = i.template(
              '<div title="(#=kendo.format("{0:t} - {1:t}", start, end)#): #=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template k-event-time">#:kendo.format("{0:t} - {1:t}", start, end)#</div><div class="k-event-template">${title}</div></div>'
            ),
            et = i.template(
              '<div title="(#=kendo.format("{0:t}", start)#): #=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template">${title}</div></div>'
            ),
            ot = i.template(
              "#var dateString = isMobile ? kendo.toString(date,'ddd')[0] : kendo.toString(date,'ddd M/dd'); #<span class='k-link k-nav-day'>#=dateString#</span>"
            ),
            st =
              '<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color#; border-color: #=resources[0].color#"class="k-event"#} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span>#if(resizable && !singleDay && !data.tail && !data.middle){#<span class="k-resize-handle k-resize-w"></span>#}##if(resizable && !singleDay && !data.head && !data.middle){#<span class="k-resize-handle k-resize-e"></span>#}#</div>',
            ht =
              '<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#" #if (resources[0]) { #style="background-color:#=resources[0].color #; border-color: #=resources[0].color#"class="k-event"#} else {#class="k-event"#}#><span class="k-event-actions"># if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}#</span><span class="k-event-top-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-up"></span># } #</span><span class="k-event-bottom-actions"># if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-down"></span># } #</span># if(resizable && !data.tail && !data.middle) {#<span class="k-resize-handle k-resize-n"></span># } ## if(resizable && !data.head && !data.middle) {#<span class="k-resize-handle k-resize-s"></span># } #</div>',
            v = f.extend({
              init: function (n, t) {
                var i = this;
                f.fn.init.call(i, n, t);
                i.title = i.options.title || i.options.name;
                i._workDays = it(i.options);
                i._templates();
                i._editable();
                i.calculateDateRange();
                i._groups();
                i._currentTime(!0);
              },
              _currentTimeMarkerUpdater: function () {
                this._updateCurrentTimeMarker(new Date());
              },
              _updateCurrentTimeMarker: function (t) {
                var s,
                  k,
                  tt,
                  h,
                  c,
                  e,
                  l,
                  v,
                  o,
                  it,
                  rt,
                  y,
                  r,
                  p,
                  u,
                  b,
                  f = this.options;
                for (
                  f.currentTimeMarker.useLocalTimezone === !1 &&
                    ((s = f.dataSource.options.schema.timezone),
                    f.dataSource &&
                      s &&
                      ((k = i.timezone.offset(t, s)),
                      (t = i.timezone.convert(t, t.getTimezoneOffset(), k)))),
                    this.times.find("." + w).remove(),
                    this.content.find("." + w).remove(),
                    tt =
                      f.group && "horizontal" != f.group.orientation
                        ? this.groups.length
                        : 1,
                    h = this.times.find("tr:first th:first"),
                    c = this.times.find("tr:first th:last"),
                    e = 0;
                  e < tt;
                  e++
                ) {
                  if (((l = this.groups[e]), !l)) return;
                  if (
                    ((v = i.date.toUtcTime(t)),
                    (o = l.timeSlotRanges(v, v + 1)),
                    0 === o.length)
                  )
                    return;
                  it = o[0].collection;
                  rt = it.slotByStartDate(t);
                  rt &&
                    ((y = "<div class='" + w + "'></div>"),
                    (r = n(y).prependTo(this.times)),
                    (p = Math.round(
                      o[0].innerRect(t, new Date(t.getTime() + 1), !1).top
                    )),
                    (u = {}),
                    (b = this.content[0].scrollWidth),
                    (d.msie || d.edge) && (b -= 1),
                    this._isRtl
                      ? ((u.right = h.position().left + a(h) - a(c)),
                        r.addClass(nt + "-left"))
                      : ((u.left = c.position().left),
                        r.addClass(nt + "-right")),
                    (u.top = p - (g(r) * ut) / 2),
                    r.css(u),
                    n(y)
                      .prependTo(this.content)
                      .css({
                        top: p,
                        height: "1px",
                        right: 0,
                        width: b,
                        left: 0,
                      }));
                }
              },
              _currentTime: function (n) {
                var i = this,
                  r = i.options.currentTimeMarker;
                r !== !1 &&
                  r.updateInterval !== t &&
                  (i._currentTimeMarkerUpdater(),
                  n &&
                    (i._currentTimeUpdateTimer = setInterval(
                      rt(this._currentTimeMarkerUpdater, i),
                      r.updateInterval
                    )));
              },
              _updateResizeHint: function (n, t, r, u) {
                var s,
                  h,
                  c,
                  v,
                  y,
                  e,
                  o,
                  p,
                  l,
                  w,
                  b,
                  a,
                  k = n.isMultiDay(),
                  g = this.groups[t],
                  d = g.ranges(r, u, k, n.isAllDay);
                for (this._removeResizeHint(), y = 0; y < d.length; y++)
                  if (
                    ((e = d[y]),
                    (o = e.startSlot()),
                    this._isGroupedByDate() && k)
                  )
                    for (p = o.index; p <= e.end.index; p++)
                      (l = e.collection._slots[p]),
                        (s = l.offsetWidth),
                        (h = l.clientHeight),
                        (c = l.offsetTop),
                        (v = f.fn._createResizeHint.call(
                          this,
                          l.offsetLeft,
                          c,
                          s,
                          h
                        )),
                        (this._resizeHint = this._resizeHint.add(v));
                  else
                    (s = o.offsetWidth),
                      (h = o.clientHeight),
                      (c = o.offsetTop),
                      k
                        ? (s = e.innerWidth())
                        : ((w = e.outerRect(r, u, this.options.snap)),
                          (c = w.top),
                          (h = w.bottom - w.top)),
                      (v = f.fn._createResizeHint.call(
                        this,
                        o.offsetLeft,
                        c,
                        s,
                        h
                      )),
                      (this._resizeHint = this._resizeHint.add(v));
                b = "t";
                a = this.content;
                k &&
                  ((b = "M/dd"),
                  (a = this.element.find(
                    ".k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div"
                  )),
                  a.length || (a = this.content));
                this._resizeHint.appendTo(a);
                this._resizeHint.find(".k-label-top,.k-label-bottom").text("");
                this._resizeHint
                  .first()
                  .addClass("k-first")
                  .find(".k-label-top")
                  .text(i.toString(i.timezone.toLocalDate(r), b));
                this._resizeHint
                  .last()
                  .addClass("k-last")
                  .find(".k-label-bottom")
                  .text(i.toString(i.timezone.toLocalDate(u), b));
              },
              _updateMoveHint: function (t, u, f) {
                var a,
                  w,
                  v,
                  h,
                  o,
                  e,
                  b,
                  y,
                  k,
                  p,
                  c = t.isMultiDay(),
                  g = this.groups[u],
                  l = i.date.toUtcTime(t.start) + f,
                  s = l + t.duration(),
                  d = g.ranges(l, s, c, t.isAllDay);
                for (
                  l = i.timezone.toLocalDate(l),
                    s = i.timezone.toLocalDate(s),
                    this._removeMoveHint(t.uid),
                    !c &&
                      (0 === r(s) || r(s) < r(this.startTime())) &&
                      d.length > 1 &&
                      d.pop(),
                    a = n(),
                    w = 0;
                  w < d.length;
                  w++
                )
                  if (
                    ((v = d[w]),
                    (h = v.start),
                    (e = { left: h.offsetLeft + 2, top: h.offsetTop }),
                    this._isGroupedByDate() && c)
                  )
                    for (b = h.index; b <= v.end.index; b++)
                      (y = v.collection._slots[b]),
                        (e.left = this._isRtl
                          ? 0.1 * y.clientWidth + y.offsetLeft + 2
                          : y.offsetLeft + 2),
                        (e.height = y.offsetHeight),
                        (e.width = 0.9 * y.clientWidth - 4),
                        (o = this._createEventElement(
                          t.clone({ start: l, end: s }),
                          !c
                        )),
                        t.inverseColor && o.addClass(tt),
                        this._appendMoveHint(o, e),
                        (a = a.add(o));
                  else
                    this._isRtl &&
                      (e.left = 0.1 * h.clientWidth + h.offsetLeft + 2),
                      c
                        ? (e.width = v.innerWidth() - 4)
                        : ((k = v.outerRect(l, s, this.options.snap)),
                          (e.top = k.top),
                          (e.height = k.bottom - k.top),
                          (e.width = 0.9 * h.clientWidth - 4)),
                      (o = this._createEventElement(
                        t.clone({ start: l, end: s }),
                        !c
                      )),
                      t.inverseColor && o.addClass(tt),
                      this._appendMoveHint(o, e),
                      (a = a.add(o));
                p = this.content;
                c &&
                  ((p = this.element.find(
                    ".k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div"
                  )),
                  p.length || (p = this.content));
                a.appendTo(p);
              },
              _appendMoveHint: function (n, t) {
                n.addClass("k-event-drag-hint");
                n.css(t);
                this._moveHint = this._moveHint.add(n);
              },
              _slotByPosition: function (n, t) {
                var u, i, f, r;
                for (
                  this._isVerticallyGrouped()
                    ? ((i = this.content.offset()),
                      (t += this.content[0].scrollTop),
                      (n += this.content[0].scrollLeft))
                    : (i = this.element
                        .find(
                          ".k-scheduler-header-wrap:has(.k-scheduler-header-all-day)"
                        )
                        .find(">div")
                        .offset()),
                    i && ((n -= i.left), (t -= i.top)),
                    n = Math.ceil(n),
                    t = Math.ceil(t),
                    r = 0;
                  r < this.groups.length;
                  r++
                )
                  if (
                    ((f = this.groups[r]),
                    (u = f.daySlotByPosition(n, t, this._isGroupedByDate())))
                  )
                    return u;
                for (
                  i && ((n += i.left), (t += i.top)),
                    i = this.content.offset(),
                    n -= i.left,
                    t -= i.top,
                    this._isVerticallyGrouped() ||
                      ((t += this.content[0].scrollTop),
                      (n += this.content[0].scrollLeft)),
                    n = Math.ceil(n),
                    t = Math.ceil(t),
                    r = 0;
                  r < this.groups.length;
                  r++
                )
                  if (((f = this.groups[r]), (u = f.timeSlotByPosition(n, t))))
                    return u;
                return null;
              },
              _groupCount: function () {
                var n = this.groupedResources,
                  t = this._isGroupedByDate();
                return n.length
                  ? "vertical" === this._groupOrientation()
                    ? t
                      ? this._columnCountForLevel(n.length - 1)
                      : this._rowCountForLevel(n.length - 1)
                    : t
                    ? this._columnCountForLevel(n.length) /
                      this._columnCountForLevel(0)
                    : this._columnCountForLevel(n.length) /
                      this._columnOffsetForResource(n.length)
                  : 1;
              },
              _columnCountInResourceView: function () {
                var n = this.groupedResources,
                  t = this._isGroupedByDate();
                return !n.length || this._isVerticallyGrouped()
                  ? t
                    ? this._rowCountForLevel(0)
                    : this._columnCountForLevel(0)
                  : t
                  ? this._columnCountForLevel(0)
                  : this._columnOffsetForResource(n.length);
              },
              _timeSlotGroups: function (n, t) {
                var f,
                  o,
                  s,
                  i,
                  e,
                  u,
                  l,
                  h,
                  a,
                  c,
                  v = this._timeSlotInterval(),
                  y = n,
                  w = this._isGroupedByDate(),
                  p = this.content.find("tr:not(.k-scheduler-header-all-day)");
                for (
                  p.attr("role", "row"),
                    e = p.length,
                    this._isVerticallyGrouped() &&
                      (w && (y = t), (e = Math.floor(e / y))),
                    u = 0;
                  u < y;
                  u++
                )
                  for (
                    l = 0,
                      h = 0,
                      this._isVerticallyGrouped() ? (l = u) : (h = u),
                      s = l * e;
                    s < (l + 1) * e;

                  ) {
                    if (
                      ((a = p[s].children),
                      s % e == 0 && (o = r(new Date(+this.startTime()))),
                      (c = 0),
                      w)
                    )
                      if (this._isVerticallyGrouped())
                        for (i = 0; i < n; i++)
                          (f = this.groups[i]),
                            this._addTimeSlotGroup(f, a, i, o, v, u);
                      else
                        for (f = this.groups[u], i = h; i < n * t; i += n)
                          this._addTimeSlotGroup(f, a, i, o, v, c), c++;
                    else
                      for (f = this.groups[u], i = h * t; i < (h + 1) * t; i++)
                        this._addTimeSlotGroup(f, a, i, o, v, c), c++;
                    o += v;
                    s++;
                  }
              },
              _addTimeSlotGroup: function (n, t, i, r, u, f) {
                var h,
                  s,
                  c,
                  e = t[i],
                  l = n.getTimeSlotCollection(f),
                  o = this._dates[f];
                o &&
                  e &&
                  ((h = Date.UTC(o.getFullYear(), o.getMonth(), o.getDate())),
                  (s = h + r),
                  (c = s + u),
                  e.setAttribute("role", "gridcell"),
                  e.setAttribute("aria-selected", !1),
                  l.addTimeSlot(e, s, c));
              },
              _addDaySlotGroup: function (n, t, r, u, f) {
                var o,
                  s = t[r],
                  e = this._dates[f];
                e &&
                  ((o = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())),
                  s.setAttribute("role", "gridcell"),
                  s.setAttribute("aria-selected", !1),
                  n.addDaySlot(s, o, o + i.date.MS_PER_DAY));
              },
              _daySlotGroups: function (n, t) {
                var s,
                  i,
                  r,
                  c,
                  u,
                  f,
                  h,
                  e,
                  o,
                  l = n,
                  a = this._isGroupedByDate();
                for (
                  this._isVerticallyGrouped()
                    ? (a && (l = t),
                      (s = this.element.find(".k-scheduler-header-all-day")))
                    : (s = this.element.find(".k-scheduler-header-all-day tr")),
                    s.attr("role", "row"),
                    r = 0;
                  r < l;
                  r++
                )
                  if (
                    ((c = 0),
                    this._isVerticallyGrouped() && (c = r),
                    (h = s[c].children),
                    (e = 0),
                    this._isVerticallyGrouped() || (e = r),
                    (o = 0),
                    a)
                  )
                    if (this._isVerticallyGrouped())
                      for (i = 0; i < n; i++)
                        (u = this.groups[i]),
                          (f = u.getDaySlotCollection(0)),
                          this._addDaySlotGroup(f, h, i, t, r);
                    else
                      for (
                        u = this.groups[r],
                          f = u.getDaySlotCollection(0),
                          i = e;
                        i < n * t;
                        i += n
                      )
                        this._addDaySlotGroup(f, h, i, t, o), o++;
                  else
                    for (
                      u = this.groups[r],
                        f = u.getDaySlotCollection(0),
                        i = e * t;
                      i < (e + 1) * t;
                      i++
                    )
                      this._addDaySlotGroup(f, h, i, t, o), o++;
              },
              _groups: function () {
                var t,
                  r,
                  n,
                  u = this._groupCount(),
                  f = this._columnCountInResourceView();
                for (this.groups = [], t = 0; t < u; t++) {
                  for (r = this._addResourceView(t), n = 0; n < f; n++)
                    this._dates[n] &&
                      r.addTimeSlotCollection(
                        this._dates[n],
                        i.date.addDays(this._dates[n], 1)
                      );
                  this.options.allDaySlot &&
                    r.addDaySlotCollection(
                      this._dates[0],
                      i.date.addDays(this._dates[this._dates.length - 1], 1)
                    );
                }
                this._timeSlotGroups(u, f);
                this.options.allDaySlot && this._daySlotGroups(u, f);
              },
              options: {
                name: "MultiDayView",
                selectedDateFormat: "{0:D}",
                selectedShortDateFormat: "{0:d}",
                selectedMobileDateFormat: "{0:MMM} {0:dd} - {1:dd}",
                allDaySlot: !0,
                showWorkHours: !1,
                title: "",
                startTime: i.date.today(),
                endTime: i.date.today(),
                minorTickCount: 2,
                majorTick: 60,
                majorTimeHeaderTemplate:
                  "<span class='k-time-text'>#=kendo.toString(date, 'h:mm')#</span> <span class='k-time-period'>#=kendo.toString(date, 'tt')#</span>",
                minorTimeHeaderTemplate: "&\\#8203;",
                groupHeaderTemplate: "#=text#",
                slotTemplate: "&nbsp;",
                allDaySlotTemplate: "&nbsp;",
                eventTemplate: ft,
                allDayEventTemplate: et,
                dateHeaderTemplate: ot,
                editable: !0,
                workDayStart: new Date(1980, 1, 1, 8, 0, 0),
                workDayEnd: new Date(1980, 1, 1, 17, 0, 0),
                workWeekStart: 1,
                workWeekEnd: 5,
                footer: { command: "workDay" },
                messages: {
                  allDay: "all day",
                  showFullDay: "Show full day",
                  showWorkDay: "Show business hours",
                },
                currentTimeMarker: {
                  updateInterval: 1e4,
                  useLocalTimezone: !0,
                },
              },
              events: ["remove", "add", "edit"],
              _templates: function () {
                var n = this.options,
                  t = c({}, i.Template, n.templateSettings);
                this.eventTemplate = this._eventTmpl(n.eventTemplate, ht);
                this.allDayEventTemplate = this._eventTmpl(
                  n.allDayEventTemplate,
                  st
                );
                this.majorTimeHeaderTemplate = i.template(
                  n.majorTimeHeaderTemplate,
                  t
                );
                this.minorTimeHeaderTemplate = i.template(
                  n.minorTimeHeaderTemplate,
                  t
                );
                this.dateHeaderTemplate = i.template(n.dateHeaderTemplate, t);
                this.slotTemplate = i.template(n.slotTemplate, t);
                this.allDaySlotTemplate = i.template(n.allDaySlotTemplate, t);
                this.groupHeaderTemplate = i.template(n.groupHeaderTemplate, t);
              },
              _editable: function () {
                this.options.editable &&
                  (this._isMobile()
                    ? this._touchEditable()
                    : this._mouseEditable());
              },
              _mouseEditable: function () {
                var t = this;
                t.element.on(
                  "click" + s,
                  ".k-event a:has(.k-i-close)",
                  function (r) {
                    t.trigger("remove", {
                      uid: n(this).closest(".k-event").attr(i.attr("uid")),
                    });
                    r.preventDefault();
                  }
                );
                t.options.editable.create !== !1 &&
                  t.element
                    .on(
                      "dblclick" + s,
                      ".k-scheduler-content td",
                      function (i) {
                        var r, u;
                        n(this)
                          .parent()
                          .hasClass("k-scheduler-header-all-day") ||
                          ((r = t._slotByPosition(i.pageX, i.pageY)),
                          r &&
                            ((u = t._resourceBySlot(r)),
                            t.trigger("add", {
                              eventInfo: c(
                                { start: r.startDate(), end: r.endDate() },
                                u
                              ),
                            })),
                          i.preventDefault());
                      }
                    )
                    .on(
                      "dblclick" + s,
                      ".k-scheduler-header-all-day td",
                      function (n) {
                        var u,
                          r = t._slotByPosition(n.pageX, n.pageY);
                        r &&
                          ((u = t._resourceBySlot(r)),
                          t.trigger("add", {
                            eventInfo: c(
                              {},
                              {
                                isAllDay: !0,
                                start: i.date.getDate(r.startDate()),
                                end: i.date.getDate(r.startDate()),
                              },
                              u
                            ),
                          }));
                        n.preventDefault();
                      }
                    );
                t.options.editable.update !== !1 &&
                  t.element.on("dblclick" + s, ".k-event", function (r) {
                    t.trigger("edit", {
                      uid: n(this).closest(".k-event").attr(i.attr("uid")),
                    });
                    r.preventDefault();
                  });
              },
              _touchEditable: function () {
                var r = this,
                  u = 0;
                i.support.mobileOS.android && (u = 5);
                r.options.editable.create !== !1 &&
                  ((r._addUserEvents = new i.UserEvents(r.element, {
                    threshold: u,
                    filter: ".k-scheduler-content td",
                    useClickAsTap: !i.support.browser.edge,
                    tap: function (i) {
                      var f, e, u, o;
                      r._scrolling ||
                        n(i.target)
                          .parent()
                          .hasClass("k-scheduler-header-all-day") ||
                        ((f = i.x.location !== t ? i.x.location : i.x),
                        (e = i.y.location !== t ? i.y.location : i.y),
                        (u = r._slotByPosition(f, e)),
                        u &&
                          ((o = r._resourceBySlot(u)),
                          r.trigger("add", {
                            eventInfo: c(
                              { start: u.startDate(), end: u.endDate() },
                              o
                            ),
                          })),
                        i.preventDefault());
                    },
                  })),
                  (r._allDayUserEvents = new i.UserEvents(r.element, {
                    threshold: u,
                    useClickAsTap: !i.support.browser.edge,
                    filter: ".k-scheduler-header-all-day td",
                    tap: function (n) {
                      var f, e, u, o;
                      r._scrolling ||
                        ((f = n.x.location !== t ? n.x.location : n.x),
                        (e = n.y.location !== t ? n.y.location : n.y),
                        (u = r._slotByPosition(f, e)),
                        u &&
                          ((o = r._resourceBySlot(u)),
                          r.trigger("add", {
                            eventInfo: c(
                              {},
                              {
                                isAllDay: !0,
                                start: i.date.getDate(u.startDate()),
                                end: i.date.getDate(u.startDate()),
                              },
                              o
                            ),
                          })),
                        n.preventDefault());
                    },
                  })));
                r.options.editable.update !== !1 &&
                  (r._editUserEvents = new i.UserEvents(r.element, {
                    threshold: u,
                    useClickAsTap: !i.support.browser.edge,
                    filter: ".k-event",
                    tap: function (t) {
                      var u, f;
                      r._scrolling ||
                        ((u = n(t.target).closest(".k-event")),
                        (f = n(t.touch.initialTouch)),
                        f.hasClass("k-i-close")
                          ? r.trigger("remove", { uid: u.attr(i.attr("uid")) })
                          : u.hasClass("k-event-active") ||
                            r.trigger("edit", { uid: u.attr(i.attr("uid")) }),
                        t.preventDefault());
                    },
                  }));
              },
              _layout: function (n) {
                for (
                  var o,
                    u,
                    t = [],
                    f = [],
                    s = this.options,
                    r = this,
                    h = r._isGroupedByDate(),
                    e = 0;
                  e < n.length;
                  e++
                )
                  (o = {}),
                    (o.text = r.dateHeaderTemplate({
                      date: n[e],
                      isMobile: r._isMobile(),
                    })),
                    i.date.isToday(n[e]) && (o.className = "k-today"),
                    t.push(o);
                return (
                  (u = this.groupedResources),
                  s.allDaySlot &&
                    f.push({
                      text: s.messages.allDay,
                      allDay: !0,
                      cellContent: function (t) {
                        var i = t;
                        return (
                          (t =
                            u.length && "vertical" !== r._groupOrientation()
                              ? t % n.length
                              : t),
                          r.allDaySlotTemplate({
                            date: n[t],
                            resources: function () {
                              return r._resourceBySlot({ groupIndex: i });
                            },
                          })
                        );
                      },
                    }),
                  this._forTimeRange(
                    this.startTime(),
                    this.endTime(),
                    function (n, t, i, u) {
                      var e = t
                          ? r.majorTimeHeaderTemplate
                          : r.minorTimeHeaderTemplate,
                        o = {
                          text: e({ date: n }),
                          className: u ? "k-slot-cell" : "",
                        };
                      f.push(o);
                    }
                  ),
                  u.length &&
                    ("vertical" === this._groupOrientation()
                      ? h
                        ? ((f = this._createDateLayout(t, f)),
                          (t = this._createColumnsLayout(
                            u,
                            null,
                            this.groupHeaderTemplate
                          )))
                        : (f = this._createRowsLayout(
                            u,
                            f,
                            this.groupHeaderTemplate
                          ))
                      : (t = h
                          ? this._createColumnsLayout(
                              u,
                              t,
                              this.groupHeaderTemplate,
                              t
                            )
                          : this._createColumnsLayout(
                              u,
                              t,
                              this.groupHeaderTemplate
                            ))),
                  { columns: t, rows: f }
                );
              },
              _footer: function () {
                var r,
                  f,
                  u,
                  t = this.options;
                t.footer !== !1 &&
                  ((r = '<div class="k-header k-scheduler-footer">'),
                  (f = t.footer.command),
                  this._isMobile() &&
                    ((r +=
                      '<span class="k-state-default k-scheduler-today"><a href="#" class="k-link">'),
                    (r += t.messages.today + "</a></span>")),
                  f && "workDay" === f
                    ? this._isMobile()
                      ? ((r +=
                          '<span class="k-state-default k-scheduler-fullday"><a href="#" class="k-link">'),
                        (r +=
                          (t.showWorkHours
                            ? t.messages.showFullDay
                            : t.messages.showWorkDay) + "</a></span>"))
                      : ((r += '<ul class="k-reset k-header">'),
                        (r +=
                          '<li class="k-state-default k-scheduler-fullday"><a href="#" class="k-link"><span class="k-icon k-i-clock"></span>'),
                        (r +=
                          (t.showWorkHours
                            ? t.messages.showFullDay
                            : t.messages.showWorkDay) + "</a></li>"),
                        (r += "</ul>"))
                    : (r += "&nbsp;"),
                  (r += "</div>"),
                  (this.footer = n(r).appendTo(this.element)),
                  (u = this),
                  this.footer.on(
                    "click" + s,
                    ".k-scheduler-fullday",
                    function (n) {
                      n.preventDefault();
                      u.trigger("navigate", {
                        view: u.name || t.name,
                        date: t.date,
                        isWorkDay: !t.showWorkHours,
                      });
                    }
                  ),
                  this.footer.on(
                    "click" + s,
                    ".k-scheduler-today",
                    function (n) {
                      var f, o, r, e, s;
                      n.preventDefault();
                      f = u.options.timezone;
                      o = "today";
                      r = new Date();
                      f
                        ? ((s = i.timezone.offset(r, f)),
                          (e = i.timezone.convert(r, r.getTimezoneOffset(), s)))
                        : (e = r);
                      u.trigger("navigate", {
                        view: u.name || t.name,
                        action: o,
                        date: e,
                      });
                    }
                  ));
              },
              _forTimeRange: function (n, t, i, f) {
                var k, l, o, a, d, s, e, nt, g, v, c, y, w, tt, it, rt;
                for (
                  n = b(n),
                    t = b(t),
                    k = this,
                    l = r(n),
                    o = r(t),
                    a = k.options.minorTickCount,
                    d = k.options.majorTick * p,
                    s = d / a || 1,
                    e = new Date(+n),
                    nt = e.getDate(),
                    v = 0,
                    y = "",
                    c = u / s,
                    l != o && (l > o && (o += u), (c = (o - l) / s)),
                    c = Math.round(c);
                  v < c;
                  v++
                )
                  (w = v % (d / s)),
                    (tt = 0 === w),
                    (it = w < a - 1),
                    (rt = w === a - 1),
                    (y += i(e, tt, it, rt)),
                    h(e, s, !1);
                return (
                  o &&
                    ((g = r(e)),
                    nt < e.getDate() && (g += u),
                    g > o && (e = new Date(+t))),
                  f && (y += f(e)),
                  y
                );
              },
              _content: function (n) {
                var o,
                  h,
                  i,
                  t = this,
                  v = t.options,
                  y = t.startTime(),
                  p = this.endTime(),
                  r = 1,
                  c = 1,
                  l = n.length,
                  u = "",
                  w = this.groupedResources,
                  a = this.allDaySlotTemplate,
                  f = !1,
                  e = t._isGroupedByDate(),
                  s = 0;
                for (
                  w.length &&
                    ((f = "vertical" === t._groupOrientation()),
                    f
                      ? ((c = this._rowCountForLevel(
                          this.rowLevels.length - 2
                        )),
                        e &&
                          (r = this._columnCountForLevel(
                            this.columnLevels.length - 1
                          )),
                        v.allDaySlot &&
                          (o = function (i) {
                            var u,
                              f = '<tr class="k-scheduler-header-all-day">',
                              o = e ? 0 : i,
                              h = function () {
                                return t._resourceBySlot({ groupIndex: o });
                              };
                            if (e)
                              for (; o < r; o++)
                                f +=
                                  "<td>" +
                                  a({ date: n[s], resources: h }) +
                                  "</td>";
                            else
                              for (u = 0; u < n.length; u++)
                                f +=
                                  "<td>" +
                                  a({ date: n[u], resources: h }) +
                                  "</td>";
                            return f + "</tr>";
                          }))
                      : (r = e
                          ? this._columnCountForLevel(
                              this.columnLevels.length - 1
                            ) / this._columnCountForLevel(0)
                          : this._columnCountForLevel(
                              this.columnLevels.length - 2
                            ))),
                    u += "<tbody>",
                    h = function (u, o, h) {
                      var c,
                        y,
                        p,
                        v = "",
                        a = 0;
                      if (
                        ((v = "<tr" + (h ? ' class="k-middle-row"' : "") + ">"),
                        e)
                      )
                        for (c = 0, y = l; c < y; c++) {
                          for (a = 0; a < r; a++)
                            (p = c),
                              f && (p = s),
                              (v = t._addCellsToContent(v, n, u, p, a, i));
                          if (f) break;
                        }
                      else
                        for (; a < r; a++)
                          for (c = 0, y = l; c < y; c++)
                            v = t._addCellsToContent(v, n, u, c, a, i);
                      return v + "</tr>";
                    },
                    i = 0;
                  i < c;
                  i++
                )
                  (u += o ? o(i) : ""),
                    (u += this._forTimeRange(y, p, h)),
                    f && s++;
                u += "</tbody>";
                this.content.find("table").append(u);
              },
              _addCellsToContent: function (n, t, r, u, f, e) {
                var s,
                  h = this,
                  o = "",
                  c = this.slotTemplate,
                  l = "vertical" === this._groupOrientation(),
                  a = function (n) {
                    return function () {
                      return h._resourceBySlot({ groupIndex: n });
                    };
                  };
                return (
                  i.date.isToday(t[u]) && (o += "k-today"),
                  (i.date.getMilliseconds(r) <
                    i.date.getMilliseconds(this.options.workDayStart) ||
                    i.date.getMilliseconds(r) >=
                      i.date.getMilliseconds(this.options.workDayEnd) ||
                    !this._isWorkDay(t[u])) &&
                    (o += " k-nonwork-hour"),
                  (n += "<td" + ("" !== o ? ' class="' + o + '"' : "") + ">"),
                  (s = i.date.getDate(t[u])),
                  i.date.setTime(s, i.date.getMilliseconds(r)),
                  (n += c({
                    date: s,
                    resources: a(l && !h._isGroupedByDate() ? e : f),
                  })),
                  n + "</td>"
                );
              },
              _isWorkDay: function (n) {
                for (
                  var r = n.getDay(), i = this._workDays, t = 0;
                  t < i.length;
                  t++
                )
                  if (i[t] === r) return !0;
                return !1;
              },
              _render: function (t) {
                var r,
                  i = this;
                t = t || [];
                this._dates = t;
                this._startDate = t[0];
                this._endDate = t[t.length - 1 || 0];
                this.createLayout(this._layout(t));
                this._content(t);
                this._footer();
                this.refreshLayout();
                r = this.element.find(".k-scheduler-header-all-day td");
                r.length &&
                  (this._allDayHeaderHeight = r.first()[0].clientHeight);
                i.element.on("click" + s, ".k-nav-day", function (t) {
                  var u,
                    f = n(t.currentTarget).closest("th"),
                    e = f.offset(),
                    o = 0,
                    r = a(f);
                  i._isGroupedByDate() &&
                    (i._isVerticallyGrouped()
                      ? ((o = g(i.times)), (r = 0))
                      : (r = a(i.datesHeader)));
                  u = i._slotByPosition(e.left + o, e.top + r);
                  i.trigger("navigate", { view: "day", date: u.startDate() });
                });
              },
              startTime: function () {
                var n = this.options;
                return n.showWorkHours ? n.workDayStart : n.startTime;
              },
              endTime: function () {
                var n = this.options;
                return n.showWorkHours ? n.workDayEnd : n.endTime;
              },
              startDate: function () {
                return this._startDate;
              },
              endDate: function () {
                return this._endDate;
              },
              _end: function (n) {
                var t = r(this.endTime()) || u;
                return n && (t = 0), new Date(this._endDate.getTime() + t);
              },
              nextDate: function () {
                return i.date.nextDay(this.endDate());
              },
              previousDate: function () {
                return i.date.previousDay(this.startDate());
              },
              calculateDateRange: function () {
                this._render([this.options.date]);
              },
              destroy: function () {
                var n = this;
                n._currentTimeUpdateTimer &&
                  clearInterval(n._currentTimeUpdateTimer);
                n.datesHeader && n.datesHeader.off(s);
                n.element && n.element.off(s);
                n.footer && n.footer.remove();
                f.fn.destroy.call(this);
                this._isMobile() &&
                  n.options.editable &&
                  (n.options.editable.create !== !1 &&
                    (n._addUserEvents.destroy(), n._allDayUserEvents.destroy()),
                  n.options.editable.update !== !1 &&
                    n._editUserEvents.destroy());
              },
              inRange: function (n) {
                var t,
                  u,
                  e,
                  o,
                  s = f.fn.inRange.call(this, n);
                return n.isAllDay
                  ? s
                  : ((t = r(this.startTime())),
                    (u = r(this.endTime()) || i.date.MS_PER_DAY),
                    (e = r(n.start)),
                    (o = r(n.end) || i.date.MS_PER_DAY),
                    s && t <= e && o <= u);
              },
              selectionByElement: function (n) {
                var t = n.offset();
                return this._slotByPosition(t.left, t.top);
              },
              _timeSlotInterval: function () {
                var n = this.options;
                return (n.majorTick / n.minorTickCount) * p;
              },
              _timeSlotIndex: function (n) {
                var t = this.options,
                  i = r(n),
                  u = r(this.startTime()),
                  f = (t.majorTick / t.minorTickCount) * p;
                return (i - u) / f;
              },
              _slotIndex: function (n, t) {
                return t ? this._dateSlotIndex(n) : this._timeSlotIndex(n);
              },
              _dateSlotIndex: function (n, t) {
                for (
                  var s, h, f = this._dates || [], r = 0, o = f.length;
                  r < o;
                  r++
                )
                  if (
                    ((s = i.date.getDate(f[r])),
                    (h = new Date(
                      i.date.getDate(f[r]).getTime() + u - (t ? 0 : 1)
                    )),
                    e(n, s, h))
                  )
                    return r * 1;
                return -1;
              },
              _positionAllDayEvent: function (t, i) {
                var r,
                  c,
                  e,
                  l,
                  h,
                  o,
                  a,
                  y = i.innerWidth(),
                  u = i.start.index,
                  s = i.end.index,
                  v = f.collidingEvents(i.events(), u, s),
                  p = this._headerColumnCount || 0,
                  w = u !== s ? 5 : 4,
                  b = this._allDayHeaderHeight,
                  k = i.startSlot();
                for (
                  t.css({ left: k.offsetLeft + 2, width: y - w }),
                    i.addEvent({ slotIndex: u, start: u, end: s, element: t }),
                    v.push({ slotIndex: u, start: u, end: s, element: t }),
                    r = f.createRows(v),
                    r.length &&
                      r.length > p &&
                      (this._headerColumnCount = r.length),
                    c = i.start.offsetTop,
                    e = 0,
                    l = r.length;
                  e < l;
                  e++
                )
                  for (h = r[e].events, o = 0, a = h.length; o < a; o++)
                    n(h[o].element).css({ top: c + e * b });
              },
              _arrangeColumns: function (n, t, i, r) {
                var o,
                  c,
                  l,
                  s,
                  p,
                  a,
                  h,
                  u,
                  w,
                  e,
                  b,
                  v,
                  y = r.start;
                for (
                  n = { element: n, slotIndex: y.index, start: t, end: t + i },
                    c = y.clientWidth,
                    l = 0.1 * c,
                    p = r.events(),
                    a = f.collidingEvents(p, n.start, n.end),
                    r.addEvent(n),
                    a.push(n),
                    o = f.createColumns(a),
                    h = (c - l) / o.length,
                    u = 0,
                    w = o.length;
                  u < w;
                  u++
                )
                  for (s = o[u].events, e = 0, b = s.length; e < b; e++)
                    (v = h - 4),
                      (s[e].element[0].style.width = (v > 0 ? v : h) + "px"),
                      (s[e].element[0].style.left =
                        (this._isRtl ? l : 0) +
                        y.offsetLeft +
                        u * h +
                        2 +
                        "px");
              },
              _positionEvent: function (n, t, i) {
                var f = n._startTime || n.start,
                  e = n._endTime || n.end,
                  r = i.innerRect(f, e, !1),
                  u = r.bottom - r.top - 2;
                u < 0 && (u = 0);
                t.css({ top: r.top, height: u });
                this._arrangeColumns(t, r.top, t[0].clientHeight, i);
              },
              _createEventElement: function (t, f, s, h) {
                var tt,
                  a,
                  l,
                  it,
                  k,
                  d,
                  ut = f ? this.eventTemplate : this.allDayEventTemplate,
                  rt = this.options,
                  y = rt.editable,
                  ft = this._isMobile(),
                  et = y && y.destroy !== !1 && !ft,
                  ot = y && y.resize !== !1,
                  g = o(this.startDate()),
                  v = o(this.endDate()),
                  nt = r(this.startTime()),
                  p = r(this.endTime()),
                  w = t._time("start"),
                  b = t._time("end");
                return (
                  nt >= p &&
                    (p = r(new Date(this.endTime().getTime() + u - 1))),
                  f || t.isAllDay || (v = new Date(v.getTime() + u)),
                  (a = t.start),
                  (l = t.end),
                  t.isAllDay && (l = o(t.end)),
                  (!e(o(a), g, v) && !e(l, g, v)) || (f && w < nt && b > p)
                    ? (tt = !0)
                    : o(a) < g || (f && w < nt)
                    ? (h = !0)
                    : ((l > v && !f) || (f && b > p)) && (s = !0),
                  (it = this.eventResources(t)),
                  t._startTime &&
                    w !== i.date.getMilliseconds(t.start) &&
                    ((a = new Date(w)), (a = i.timezone.apply(a, "Etc/UTC"))),
                  t._endTime &&
                    b !== i.date.getMilliseconds(t.end) &&
                    ((l = new Date(b)), (l = i.timezone.apply(l, "Etc/UTC"))),
                  (k = c(
                    {},
                    {
                      ns: i.ns,
                      resizable: ot,
                      showDelete: et,
                      middle: tt,
                      head: s,
                      tail: h,
                      singleDay: 1 == this._dates.length,
                      resources: it,
                      inverseColor: !1,
                      messages: rt.messages,
                    },
                    t,
                    { start: a, end: l }
                  )),
                  (d = n(ut(k))),
                  this.angular("compile", function () {
                    return { elements: d, data: [{ dataItem: k }] };
                  }),
                  d
                );
              },
              _isInTimeSlot: function (n) {
                var s,
                  o = this.startTime(),
                  t = this.endTime(),
                  f = n._startTime || n.start,
                  e = n._endTime || n.end;
                return (
                  r(t) === r(i.date.getDate(t)) &&
                    ((t = i.date.getDate(t)), h(t, u - 1)),
                  n._date("end") > n._date("start") &&
                    (e = +n._date("end") + (u - 1)),
                  (e = n._endTime ? e - n._date("end") : r(new Date(e))),
                  (f = n._startTime ? f - n._date("start") : r(new Date(f))),
                  (t = r(t)),
                  (o = r(o)),
                  (o === f && f === e) ||
                    ((s = f !== t),
                    l(f, o, t, s) || l(e, o, t, s) || l(o, f, e) || l(t, f, e))
                );
              },
              _isInDateSlot: function (n) {
                var o = this.groups[0],
                  t = o.firstSlot().start,
                  f = o.lastSlot().end - 1,
                  r = i.date.toUtcTime(n.start),
                  u = i.date.toUtcTime(n.end);
                return (
                  (e(r, t, f) || e(u, t, f) || e(t, r, u) || e(f, r, u)) &&
                  (!e(u, t, t) || e(u, r, r) || n.isAllDay)
                );
              },
              _updateAllDayHeaderHeight: function (n) {
                var i, t;
                if (
                  this._height !== n &&
                  ((this._height = n),
                  (i = this.element.find(".k-scheduler-header-all-day td")),
                  i.length)
                )
                  for (
                    i
                      .parent()
                      .add(
                        this.element.find(".k-scheduler-times-all-day").parent()
                      )
                      .height(n),
                      t = 0;
                    t < this.groups.length;
                    t++
                  )
                    this.groups[t].refresh();
              },
              _renderEvents: function (n, t) {
                for (
                  var r,
                    h,
                    p,
                    f,
                    o,
                    i,
                    s,
                    l,
                    e,
                    w,
                    c,
                    d,
                    rt,
                    g,
                    nt,
                    b,
                    k,
                    a,
                    tt,
                    ut = this.datesHeader.find(
                      ".k-scheduler-header-wrap > div"
                    ),
                    ft = this._isGroupedByDate(),
                    v = 0,
                    it = n.length;
                  v < it;
                  v++
                )
                  if (((r = n[v]), this._isInDateSlot(r)))
                    if (
                      ((h = r.isAllDay || r.duration() >= u),
                      (p =
                        h && !this._isVerticallyGrouped() ? ut : this.content),
                      h)
                    ) {
                      if (
                        this.options.allDaySlot &&
                        ((e = this.groups[t]),
                        e._continuousEvents || (e._continuousEvents = []),
                        (o = e.slotRanges(r)),
                        o.length)
                      )
                        if (
                          ((i = o[0]),
                          (g = i.start.index),
                          (nt = i.end.index),
                          ft && g !== nt)
                        )
                          for (
                            s = i.start.start,
                              l = i.end.end,
                              b = new Date(s),
                              k = new Date(s),
                              a = i.start.index;
                            a <= i.end.index;
                            a++
                          )
                            (f = this._createEventElement(
                              r,
                              !h,
                              a !== nt,
                              a !== g
                            )),
                              (tt = e.daySlotRanges(b, k, !0)[0]),
                              k.setDate(k.getDate() + 1),
                              b.setDate(b.getDate() + 1),
                              this._positionAllDayEvent(f, tt),
                              y(e, tt, f, !0),
                              f.appendTo(p),
                              this._inverseEventColor(f);
                        else
                          (f = this._createEventElement(r, !h)),
                            this._positionAllDayEvent(f, o[0]),
                            y(e, o[0], f, !0),
                            f.appendTo(p),
                            this._inverseEventColor(f);
                    } else if (this._isInTimeSlot(r))
                      for (
                        e = this.groups[t],
                          e._continuousEvents || (e._continuousEvents = []),
                          o = e.slotRanges(r),
                          w = o.length,
                          c = 0;
                        c < w;
                        c++
                      )
                        (i = o[c]),
                          (s = r.start),
                          (l = r.end),
                          w > 1 &&
                            (0 === c
                              ? (l = i.end.endDate())
                              : c == w - 1
                              ? (s = i.start.startDate())
                              : ((s = i.start.startDate()),
                                (l = i.end.endDate()))),
                          (d = r.clone({
                            start: s,
                            end: l,
                            _startTime: r._startTime,
                            _endTime: r.endTime,
                          })),
                          this._isInTimeSlot(d) &&
                            ((rt = i.head),
                            (f = this._createEventElement(r, !h, rt, i.tail)),
                            f.appendTo(p),
                            this._inverseEventColor(f),
                            this._positionEvent(d, f, i),
                            y(e, i, f, !1));
              },
              render: function (t) {
                var r, f, s, u;
                for (
                  this._headerColumnCount = 0,
                    this._groups(),
                    this.element.find(".k-event").remove(),
                    t = new i.data.Query(t)
                      .sort([
                        { field: "start", dir: "asc" },
                        { field: "end", dir: "desc" },
                      ])
                      .toArray(),
                    r = [],
                    this._eventsByResource(t, this.groupedResources, r),
                    f = n.map(this._dates, function (t) {
                      return Math.max.apply(
                        null,
                        n.map(r, function (i) {
                          return n.grep(i, function (n) {
                            return n.isMultiDay() && e(t, o(n.start), o(n.end));
                          }).length;
                        })
                      );
                    }),
                    s = Math.max.apply(null, f),
                    this._updateAllDayHeaderHeight(
                      (s + 1) * this._allDayHeaderHeight
                    ),
                    u = 0;
                  u < r.length;
                  u++
                )
                  this._renderEvents(r[u], u);
                this.refreshLayout();
                this._currentTime(!1);
                this.trigger("activate");
              },
              _eventsByResource: function (n, t, r) {
                var o,
                  u,
                  h,
                  s,
                  e = t[0];
                if (e)
                  for (o = e.dataSource.view(), u = 0; u < o.length; u++)
                    (h = this._resourceValue(e, o[u])),
                      (s = new i.data.Query(n)
                        .filter({
                          field: e.field,
                          operator: f.groupEqFilter(h),
                        })
                        .toArray()),
                      t.length > 1
                        ? this._eventsByResource(s, t.slice(1), r)
                        : r.push(s);
                else r.push(n);
              },
              _columnOffsetForResource: function (n) {
                return (
                  this._columnCountForLevel(n) /
                  this._columnCountForLevel(n - 1)
                );
              },
              _columnCountForLevel: function (n) {
                var t = this.columnLevels[n];
                return t ? t.length : 0;
              },
              _rowCountForLevel: function (n) {
                var t = this.rowLevels[n];
                return t ? t.length : 0;
              },
              clearSelection: function () {
                this.content
                  .add(this.datesHeader)
                  .find(".k-state-selected")
                  .removeAttr("id")
                  .attr("aria-selected", !1)
                  .removeClass("k-state-selected");
              },
              _updateDirection: function (n, t, i, r, u) {
                var o = n.isAllDay,
                  f = t[0].start,
                  e = t[t.length - 1].end;
                i &&
                  (u
                    ? o ||
                      f.index !== e.index ||
                      f.collectionIndex !== e.collectionIndex ||
                      (n.backward = r)
                    : ((o && f.index === e.index) ||
                        (!o && f.collectionIndex === e.collectionIndex)) &&
                      (n.backward = r));
              },
              _changeViewPeriod: function (n, t, i) {
                var s, w, c, b, f, l, e, a, o, v, y, k, p;
                if (!i)
                  return (
                    (s = t ? this.previousDate() : this.nextDate()),
                    (w = n.start),
                    (c = n.end),
                    (b =
                      this._isGroupedByDate() && this._isVerticallyGrouped()),
                    (f = this.groups[n.groupIndex]),
                    (l = t
                      ? f._timeSlotCollections
                      : f._getCollections(f.daySlotCollectionCount())),
                    (e = l[l.length - 1]._slots),
                    (a = t || f.daySlotCollectionCount() ? e.length - 1 : 0),
                    (v = new Date(s)),
                    (y = new Date(s)),
                    !this._isInRange(v, y) &&
                      ((n.start = v),
                      (n.end = y),
                      b
                        ? ((k = new Date(e[a].startDate())),
                          (p = new Date(e[a].endDate())),
                          (o = r(p) ? r(p) : u),
                          h(n.start, r(k)),
                          h(n.end, o),
                          f.daySlotCollectionCount() &&
                            (n.isAllDay = !n.isAllDay))
                        : ((o = n.isAllDay || !r(c) ? u : r(c)),
                          h(n.start, r(w)),
                          h(n.end, o)),
                      this._isVerticallyGrouped() ||
                        (n.groupIndex = t ? this.groups.length - 1 : 0),
                      (n.events = []),
                      !0)
                  );
              },
            });
          c(!0, k, {
            MultiDayView: v,
            DayView: v.extend({
              options: {
                name: "DayView",
                title: "Day",
                selectedMobileDateFormat: "{0:MMM d}",
              },
              name: "day",
            }),
            WeekView: v.extend({
              options: {
                name: "WeekView",
                title: "Week",
                selectedDateFormat: "{0:D} - {1:D}",
                selectedShortDateFormat: "{0:d} - {1:d}",
              },
              name: "week",
              calculateDateRange: function () {
                for (
                  var f = this.options.date,
                    t = i.date.dayOfWeek(f, this.calendarInfo().firstDay, -1),
                    u = [],
                    n = 0,
                    r = 7;
                  n < r;
                  n++
                )
                  u.push(t), (t = i.date.nextDay(t));
                this._render(u);
              },
            }),
            WorkWeekView: v.extend({
              options: {
                name: "WorkWeekView",
                title: "Work Week",
                selectedDateFormat: "{0:D} - {1:D}",
                selectedShortDateFormat: "{0:d} - {1:d}",
              },
              name: "workWeek",
              nextDate: function () {
                var n = i.date.dayOfWeek(
                  i.date.nextDay(this.startDate()),
                  this.calendarInfo().firstDay,
                  1
                );
                return i.date.addDays(n, this._workDays[0]);
              },
              previousDate: function () {
                var t = i.date.dayOfWeek(
                    this.startDate(),
                    this.calendarInfo().firstDay,
                    -1
                  ),
                  n = this._workDays;
                return i.date.addDays(t, n[n.length - 1] - 7);
              },
              calculateDateRange: function () {
                for (
                  var u = this.options.date,
                    t = i.date.dayOfWeek,
                    f = t(u, this.calendarInfo().firstDay, -1),
                    n = t(f, this.options.workWeekStart, 1),
                    e = t(n, this.options.workWeekEnd, 1),
                    r = [];
                  n <= e;

                )
                  r.push(n), (n = i.date.nextDay(n));
                this._render(r);
              },
            }),
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.scheduler.agendaview.min", ["kendo.scheduler.view.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function f(n) {
            for (var r = 0, t = 0, i = n.length; t < i; t++)
              r += n[t].items.length;
            return r;
          }
          function e(n, i) {
            return n.valuePrimitive && (i = t.getter(n.dataValueField)(i)), i;
          }
          function o(n) {
            for (var t, r = 0, f = n.length, i = []; r < f; r++)
              (t = n[r]),
                t.groups
                  ? ((t = u(t.groups)), (i = i.concat(t)))
                  : (i = i.concat(u(t.items)));
            return i;
          }
          function u(n) {
            for (var i = [].concat(n), t = i.shift(), u = [], r = [].push; t; )
              t.groups
                ? r.apply(i, t.groups)
                : t.items
                ? r.apply(i, t.items)
                : r.call(u, t),
                (t = i.shift());
            return u;
          }
          var t = window.kendo,
            i = t.ui,
            r = ".kendoAgendaView",
            s =
              '<div class="k-task" title="#:(data.title || "").replace(/"/g,"\'")#" data-#=kendo.ns#uid="#=uid#"># if (resources[0]) {#<span class="k-scheduler-mark" style="background-color:#=resources[0].color#"></span># } ## if (data.isException()) { #<span class="k-icon k-i-non-recurrence"></span># } else if (data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #<span class="k-scheduler-task-text">{0}</span>#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}#</div>',
            h = t.Class.extend({
              init: function (n) {
                this._view = n;
              },
              _getColumns: function (n, t) {
                return n.concat(t);
              },
              _getGroupsInDay: function () {
                return [];
              },
              _getSumOfItemsForDate: function () {
                return 0;
              },
              _renderTaskGroupsCells: function (n, t, i, r) {
                var u = this._view;
                0 === i &&
                  0 === r &&
                  t.length &&
                  u._renderTaskGroupsCells(n, t);
              },
              _renderDateCell: function (n, i, r, u, f, e) {
                var o = this._view,
                  s = o._isMobile();
                n.push(
                  t.format(
                    '<td class="k-scheduler-datecolumn{3}{2}" rowspan="{0}">{1}</td>',
                    r.length,
                    o._dateTemplate({ date: u, isMobile: s }),
                    f != e.length - 1 || i.length ? "" : " k-last",
                    i.length ? "" : " k-first"
                  )
                );
              },
              _renderDates: function () {},
              _getParents: function (n) {
                return n.splice(0);
              },
              _getGroupsByDate: function () {},
              _renderTaskGroups: function (n, t, i) {
                var r = this._view;
                n.append(r._renderTaskGroups(t, i));
              },
            }),
            c = t.Class.extend({
              init: function (n) {
                this._view = n;
              },
              _getColumns: function (n, t) {
                var i,
                  r,
                  u = this._view;
                return u._isMobile()
                  ? n.concat(t)
                  : ((i = t.slice(0, 1)),
                    (r = t.slice(1)),
                    i.concat(n).concat(r));
              },
              _compareDateGroups: function (n, t, i) {
                return (
                  n[i].text == t[i].text &&
                  (0 === i || this._compareDateGroups(n, t, i - 1))
                );
              },
              _getGroupsInDay: function (n, t) {
                for (var f, i, o, e, r = [], s = null, u = 0; u < n.length; u++)
                  for (f = 0; f < n[u].items.length; f++) {
                    if (((i = 0), 0 === r.length))
                      for (i; i < t[u].length; i++) r.push([1]);
                    else
                      for (i; i < t[u].length; i++)
                        if (this._compareDateGroups(t[u], s, i))
                          r[i][r[i].length - 1]++;
                        else {
                          for (o = r[i][r[i].length - 1] - 1, e = 0; e < o; e++)
                            r[i].push(0);
                          r[i].push(1);
                        }
                    s = t[u];
                  }
                return r;
              },
              _getSumOfItemsForDate: function (n) {
                for (var i = 0, t = 0; t < n.length; t++)
                  i += n[t].items.length;
                return i;
              },
              _renderTaskGroupsCells: function (n, i, r, u, f, e, o, s) {
                var h,
                  c = this._view,
                  l = c._isMobile();
                if (l)
                  0 === r &&
                    0 === u &&
                    i.length &&
                    c._renderTaskGroupsCells(n, i);
                else
                  for (
                    0 === r &&
                      0 === u &&
                      n.push(
                        t.format(
                          '<td class="k-scheduler-datecolumn k-first" rowspan="{0}">{1}</td>',
                          e,
                          c._dateTemplate({ date: o, isMobile: l })
                        )
                      ),
                      h = 0;
                    h < i[r].length;
                    h++
                  )
                    f[h][s] &&
                      n.push(
                        t.format(
                          '<td class="k-scheduler-groupcolumn" rowspan="{0}">{1}</td>',
                          f[h][s],
                          c._groupTemplate({
                            value: i[r][h].text,
                            isMobile: l,
                          }),
                          i[r][h].className
                        )
                      );
              },
              _renderDateCell: function () {},
              _renderDates: function (n) {
                for (
                  var r = this._view,
                    i = r._groupsByDate.sort(function (n, t) {
                      return (
                        n.array[0].value.getTime() - t.array[0].value.getTime()
                      );
                    }),
                    t = 0;
                  t < i.length;
                  t++
                )
                  n.append(r._renderTaskGroups(i[t].array, i[t].groups));
              },
              _getParents: function (n) {
                return n.slice(0);
              },
              _getGroupsByDate: function (n, t, i) {
                var r,
                  o,
                  e,
                  u,
                  f = this._view;
                if (n[t].items)
                  for (r = 0; r < n[t].items.length; r++) {
                    for (
                      o = n[t].items[r].value, e = !1, u = 0;
                      u < f._groupsByDate.length;
                      u++
                    )
                      f._groupsByDate[u].array[0].value.getTime() ===
                        o.getTime() &&
                        ((e = !0),
                        f._groupsByDate[u].array.push(n[t].items[r]),
                        f._groupsByDate[u].groups.push(i));
                    e ||
                      f._groupsByDate.push({
                        array: [n[t].items[r]],
                        groups: [i],
                      });
                  }
              },
              _renderTaskGroups: function () {},
            });
          t.ui.scheduler.AgendaGroupedView = h;
          t.ui.scheduler.AgendaGroupedByDateView = c;
          i.AgendaView = i.SchedulerView.extend({
            init: function (u, f) {
              i.SchedulerView.fn.init.call(this, u, f);
              this._groupedView = this._getGroupedView();
              f = this.options;
              f.editable &&
                (f.editable = n.extend(
                  { delete: !0 },
                  f.editable,
                  { create: !1, update: !1 },
                  { messages: f.messages }
                ));
              this.title = f.title;
              this._eventTemplate = this._eventTmpl(f.eventTemplate, s);
              this._dateTemplate = t.template(f.eventDateTemplate);
              this._groupTemplate = t.template(f.eventGroupTemplate);
              this._timeTemplate = t.template(f.eventTimeTemplate);
              this.element
                .on(
                  "mouseenter" + r,
                  ".k-scheduler-agenda .k-scheduler-content tr",
                  "_mouseenter"
                )
                .on(
                  "mouseleave" + r,
                  ".k-scheduler-agenda .k-scheduler-content tr",
                  "_mouseleave"
                )
                .on(
                  "click" + r,
                  ".k-scheduler-agenda .k-scheduler-content .k-link:has(.k-i-close)",
                  "_remove"
                );
              this._renderLayout(f.date);
            },
            name: "agenda",
            _getGroupedView: function () {
              return this._isGroupedByDate()
                ? new t.ui.scheduler.AgendaGroupedByDateView(this)
                : new t.ui.scheduler.AgendaGroupedView(this);
            },
            _mouseenter: function (t) {
              n(t.currentTarget).addClass("k-state-hover");
            },
            _mouseleave: function (t) {
              n(t.currentTarget).removeClass("k-state-hover");
            },
            _remove: function (i) {
              i.preventDefault();
              this.trigger("remove", {
                uid: n(i.currentTarget).closest(".k-task").attr(t.attr("uid")),
              });
            },
            nextDate: function () {
              return t.date.nextDay(this.startDate());
            },
            startDate: function () {
              return this._startDate;
            },
            endDate: function () {
              return this._endDate;
            },
            previousDate: function () {
              return t.date.previousDay(this.startDate());
            },
            _renderLayout: function (n) {
              this._startDate = n;
              this._endDate = t.date.addDays(n, 7);
              this.createLayout(this._layout());
              this._footer();
              this.table.addClass("k-scheduler-agenda");
            },
            _layout: function () {
              var t,
                i,
                r,
                n = [
                  {
                    text: this.options.messages.time,
                    className: "k-scheduler-timecolumn",
                  },
                  { text: this.options.messages.event },
                ];
              if (
                (this._isMobile() ||
                  n.splice(0, 0, {
                    text: this.options.messages.date,
                    className: "k-scheduler-datecolumn",
                  }),
                (t = this.groupedResources),
                t.length)
              ) {
                for (i = [], r = 0; r < t.length; r++)
                  i.push({ text: "", className: "k-scheduler-groupcolumn" });
                n = this._groupedView._getColumns(i, n);
              }
              return { columns: n };
            },
            _tasks: function (n) {
              for (var r, u, f, e, i, s, h = [], o = 0; o < n.length; o++)
                if (
                  ((r = n[o]),
                  (u = r.start),
                  (f = r.isAllDay ? t.date.getDate(r.end) : r.end),
                  (e = Math.ceil((f - t.date.getDate(u)) / t.date.MS_PER_DAY)),
                  r.isAllDay && (e += 1),
                  (i = r.clone()),
                  (i.startDate = t.date.getDate(u)),
                  i.startDate >= this.startDate() && h.push(i),
                  e > 1)
                )
                  for (
                    i.end = t.date.nextDay(u), i.head = !0, s = 1;
                    s < e;
                    s++
                  )
                    (u = i.end),
                      (i = r.clone()),
                      (i.start = i.startDate = t.date.getDate(u)),
                      (i.end = t.date.nextDay(u)),
                      s == e - 1
                        ? ((i.end = new Date(
                            i.start.getFullYear(),
                            i.start.getMonth(),
                            i.start.getDate(),
                            f.getHours(),
                            f.getMinutes(),
                            f.getSeconds(),
                            f.getMilliseconds()
                          )),
                          (i.tail = !0))
                        : ((i.isAllDay = !0), (i.middle = !0)),
                      ((t.date.getDate(i.end) <= this.endDate() &&
                        i.start >= this.startDate()) ||
                        t.date.getDate(i.start).getTime() ==
                          this.endDate().getTime()) &&
                        h.push(i);
              return new t.data.Query(h)
                .sort([
                  { field: "start", dir: "asc" },
                  { field: "end", dir: "asc" },
                ])
                .groupBy({ field: "startDate" })
                .toArray();
            },
            _renderTaskGroups: function (n, i) {
              for (
                var e,
                  s,
                  l,
                  f,
                  r,
                  o,
                  h,
                  a = [],
                  v = this.options.editable,
                  p = v && v.destroy !== !1 && !this._isMobile(),
                  c = this._isMobile(),
                  w = this._groupedView._getSumOfItemsForDate(n),
                  b = this._groupedView._getGroupsInDay(n, i),
                  y = 0,
                  u = 0;
                u < n.length;
                u++
              )
                for (
                  e = n[u].value, s = n[u].items, l = t.date.isToday(e), f = 0;
                  f < s.length;
                  f++
                )
                  (r = s[f]),
                    (o = []),
                    (h = c ? [] : o),
                    this._groupedView._renderTaskGroupsCells(
                      h,
                      i,
                      u,
                      f,
                      b,
                      w,
                      e,
                      y
                    ),
                    y++,
                    0 === f &&
                      (c
                        ? (h.push(
                            t.format(
                              '<td class="k-scheduler-datecolumn {1}" colspan="2">{0}</td>',
                              this._dateTemplate({ date: e, isMobile: c }),
                              this.groupedResources.length ? "" : "k-first"
                            )
                          ),
                          a.push(
                            '<tr role="row" aria-selected="false"' +
                              (l ? ' class="k-today">' : ">") +
                              h.join("") +
                              "</tr>"
                          ))
                        : this._groupedView._renderDateCell(o, i, s, e, u, n)),
                    (r.format = r.head
                      ? "{0:t}"
                      : r.tail
                      ? "{1:t}"
                      : "{0:t}-{1:t}"),
                    (r.resources = this.eventResources(r)),
                    o.push(
                      t.format(
                        '<td class="k-scheduler-timecolumn {4}"><div>{0}{1}{2}</div></td><td>{3}</td>',
                        r.tail || r.middle
                          ? '<span class="k-icon k-i-arrow-60-left"></span>'
                          : "",
                        this._timeTemplate(
                          r.clone({
                            start: r._startTime || r.start,
                            end: r.endTime || r.end,
                          })
                        ),
                        r.head || r.middle
                          ? '<span class="k-icon k-i-arrow-60-right"></span>'
                          : "",
                        this._eventTemplate(
                          r.clone({
                            showDelete: p,
                            messages: this.options.messages,
                          })
                        ),
                        !this.groupedResources.length && c ? "k-first" : ""
                      )
                    ),
                    a.push(
                      '<tr role="row" aria-selected="false"' +
                        (l ? ' class="k-today">' : ">") +
                        o.join("") +
                        "</tr>"
                    );
              return a.join("");
            },
            _renderTaskGroupsCells: function (n, i) {
              for (var u = this._isMobile(), r = 0; r < i.length; r++)
                n.push(
                  t.format(
                    '<td class="k-scheduler-groupcolumn{2}" rowspan="{0}">{1}</td>',
                    i[r].rowSpan,
                    this._groupTemplate({ value: i[r].text, isMobile: u }),
                    i[r].className
                  )
                );
            },
            render: function (n) {
              var r,
                u,
                i = this.content.find("table").empty(),
                t = [];
              n.length > 0 &&
                ((r = this.groupedResources),
                r.length
                  ? ((t = this._createGroupConfiguration(n, r, null)),
                    (this._groupsByDate = []),
                    this._renderGroups(t, i, []),
                    this._groupedView._renderDates(i))
                  : ((t = this._tasks(n)),
                    i.append(this._renderTaskGroups(t, []))));
              u = this._eventsList = o(t);
              this._angularItems(i, u);
              this.refreshLayout();
              this.trigger("activate");
            },
            _angularItems: function (n, i) {
              this.angular("compile", function () {
                var r = [],
                  u = i.map(function (i) {
                    return (
                      r.push({ dataItem: i }),
                      n.find(".k-task[" + t.attr("uid") + "=" + i.uid + "]")
                    );
                  });
                return { elements: u, data: r };
              });
            },
            _renderGroups: function (n, t, i) {
              for (var u, r = 0, f = n.length; r < f; r++)
                (u = this._groupedView._getParents(i)),
                  u.push(n[r]),
                  this._groupedView._getGroupsByDate(n, r, u),
                  n[r].groups
                    ? this._renderGroups(n[r].groups, t, u)
                    : this._groupedView._renderTaskGroups(t, n[r].items, u);
            },
            _createGroupConfiguration: function (n, r, u) {
              for (
                var v,
                  h,
                  p,
                  y,
                  o,
                  c,
                  l = r[0],
                  w = [],
                  a = l.dataSource.view(),
                  b = this._isMobile(),
                  s = 0;
                s < a.length;
                s++
              )
                (v = e(l, a[s])),
                  (h = new t.data.Query(n)
                    .filter({
                      field: l.field,
                      operator: i.SchedulerView.groupEqFilter(v),
                    })
                    .toArray()),
                  h.length &&
                    ((p = this._tasks(h)),
                    (y = u ? "" : " k-first"),
                    s === a.length - 1 &&
                      (!u || u.className.indexOf("k-last") > -1) &&
                      (y += " k-last"),
                    (o = {
                      text: t.getter(l.dataTextField)(a[s]),
                      value: v,
                      rowSpan: 0,
                      className: y,
                    }),
                    r.length > 1
                      ? ((o.groups = this._createGroupConfiguration(
                          h,
                          r.slice(1),
                          o
                        )),
                        u && (u.rowSpan += o.rowSpan))
                      : ((o.items = p),
                        (c = f(o.items)),
                        b && (c += o.items.length),
                        (o.rowSpan = c),
                        u && (u.rowSpan += c)),
                    w.push(o));
              return w;
            },
            selectionByElement: function (t) {
              var r, i, u;
              if (
                ((t = n(t)),
                !t.hasClass("k-scheduler-datecolumn") &&
                  this._eventsList.length)
              )
                return (
                  t.is(".k-task") && (t = t.closest("td")),
                  this._isMobile()
                    ? ((u = t.parent()),
                      (r = u
                        .parent()
                        .children()
                        .filter(function () {
                          return n(this).children(
                            ":not(.k-scheduler-datecolumn)"
                          ).length;
                        })
                        .index(u)))
                    : (r = t.parent().index()),
                  (i = this._eventsList[r]),
                  {
                    index: r,
                    start: i.start,
                    end: i.end,
                    isAllDay: i.isAllDay,
                    uid: i.uid,
                  }
                );
            },
            select: function (n) {
              this.clearSelection();
              var t = this.table
                .find(".k-task")
                .eq(n.index)
                .closest("tr")
                .addClass("k-state-selected")
                .attr("aria-selected", !0)[0];
              this.current(t);
            },
            move: function (n, i) {
              var r,
                u = !1,
                f = n.index;
              return (
                i == t.keys.UP
                  ? (f--, (u = !0))
                  : i == t.keys.DOWN && (f++, (u = !0)),
                u &&
                  ((r = this._eventsList[f]),
                  r &&
                    ((n.start = r.start),
                    (n.end = r.end),
                    (n.isAllDay = r.isAllDay),
                    (n.events = [r.uid]),
                    (n.index = f))),
                u
              );
            },
            moveToEvent: function () {
              return !1;
            },
            constrainSelection: function (n) {
              var t = this._eventsList[0];
              t &&
                ((n.start = t.start),
                (n.end = t.end),
                (n.isAllDay = t.isAllDay),
                (n.events = [t.uid]),
                (n.index = 0));
            },
            isInRange: function () {
              return !0;
            },
            destroy: function () {
              this.element && this.element.off(r);
              i.SchedulerView.fn.destroy.call(this);
            },
            options: {
              title: "Agenda",
              name: "agenda",
              editable: !0,
              selectedDateFormat: "{0:D}-{1:D}",
              selectedShortDateFormat: "{0:d} - {1:d}",
              selectedMobileDateFormat: "{0: MMM} {0:dd} - {1:dd}",
              eventTemplate: "#:title#",
              eventTimeTemplate:
                "#if(data.isAllDay) {##=this.options.messages.allDay##} else { ##=kendo.format(format, start, end)## } #",
              eventDateTemplate:
                '# if (!isMobile) { #<strong class="k-scheduler-agendaday">#=kendo.toString(date, "dd")#</strong><em class="k-scheduler-agendaweek">#=kendo.toString(date,"dddd")#</em><span class="k-scheduler-agendadate">#=kendo.toString(date, "y")#</span># } else { #<div class="k-scheduler-datecolumn-wrap"><span class="k-mobile-scheduler-agendadate"><span class="k-mobile-scheduler-agendaday">#=kendo.toString(date, "dd")#</span>&nbsp<span class="k-mobile-scheduler-agendamonth">#=kendo.toString(date, "MMMM")#</span></span><span class="k-mobile-scheduler-agendaweekday">#=kendo.toString(date, "dddd")#</span></div># } #',
              eventGroupTemplate:
                '# if (!isMobile) { #<strong class="k-scheduler-adgendagroup">#=value#</strong># } else { #<span class="k-scheduler-group-text">#=value#</span># } #',
              messages: {
                event: "Event",
                date: "Date",
                time: "Time",
                allDay: "all day",
              },
            },
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.scheduler.monthview.min", ["kendo.scheduler.view.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function l(n, t) {
            return n.slice(t).concat(n.slice(0, t));
          }
          function a(n, i) {
            for (
              var u = i.firstDay,
                r = new Date(
                  n.getFullYear(),
                  n.getMonth(),
                  0,
                  n.getHours(),
                  n.getMinutes(),
                  n.getSeconds(),
                  n.getMilliseconds()
                );
              r.getDay() != u;

            )
              t.date.setTime(r, -1 * v);
            return r;
          }
          function f(n, t, i) {
            var r,
              u = t,
              f = i;
            return (r = n), r >= u && r <= f;
          }
          var t = window.kendo,
            s = t.ui,
            r = s.SchedulerView,
            e = ".kendoMonthView",
            o = n.extend,
            h = t.date.getDate,
            v = t.date.MS_PER_DAY,
            u = 6,
            i = 7,
            c = "k-event-inverse",
            y = t.template(
              '<span class="k-link k-nav-day">#:kendo.toString(date, "dd")#</span>'
            ),
            p =
              '<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color #; border-color: #=resources[0].color#"class="k-event"#} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span>#}#</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span># if(resizable && !data.tail && !data.middle) {#<span class="k-resize-handle k-resize-w"></span>#}## if(resizable && !data.head && !data.middle) {#<span class="k-resize-handle k-resize-e"></span>#}#</div>',
            w = t.template(
              '<div title="#=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template">#:title#</div></div>'
            ),
            b = t.template(
              '<div style="width:#=width#px;left:#=left#px;top:#=top#px" class="k-more-events k-button"><span>...</span></div>'
            ),
            k = t.Class.extend({
              init: function (n) {
                this._view = n;
              },
              _verticalRowCountForLevel: function (n) {
                var t = this._view;
                return t._rowCountForLevel(n);
              },
              _horizontalGroupCountForLevel: function (n) {
                var t = this._view;
                return t._columnCountForLevel(n);
              },
              _getCalendarRowsLength: function (n, t) {
                return t / n;
              },
              _createRows: function (n, t, r, u) {
                for (
                  var e = this._view,
                    s = i,
                    h = e._isVerticallyGrouped(),
                    o = "",
                    f = 0;
                  f < r;
                  f++
                )
                  o += e._createRow(n, t, s, h ? u : f);
                return o;
              },
              _adjustStartDate: function (n) {
                return t.date.addDays(n, i);
              },
              _getContent: function (n, t, i) {
                return n({ date: t, resources: i });
              },
              _getTimeSlotByPosition: function (n, t, i) {
                var r = this._view.groups[i];
                return r.daySlotByPosition(n, t);
              },
              _nextSlotStartDate: function (n) {
                return t.date.nextDay(n);
              },
              _createRowsLayout: function (n, t, i) {
                var r = this._view;
                return r._createRowsLayout(n, t, i);
              },
              _createVerticalColumnsLayout: function (n, t, i, r) {
                return r;
              },
              _createColumnsLayout: function (n, t, i) {
                var r = this._view;
                return r._createColumnsLayout(n, t, i);
              },
              _verticalGroupCount: function (n) {
                var t = this._view;
                return t._rowCountForLevel(n);
              },
              _horizontalGroupCount: function (n) {
                var t = this._view;
                return (
                  t._columnCountForLevel(n) / t._columnOffsetForResource(n)
                );
              },
              _positionEvent: function (n, t, i, r, u, f, e) {
                var s,
                  o = this._view,
                  h = o._isMobile();
                r > 1 &&
                  (0 === e
                    ? (f = i.end.endDate())
                    : e == r - 1
                    ? (u = i.start.startDate())
                    : ((u = i.start.startDate()), (f = i.end.endDate())));
                s = n.clone({ start: u, end: f, head: i.head, tail: i.tail });
                h
                  ? o._positionMobileEvent(i, o._createEventElement(s), t)
                  : o._positionEvent(i, o._createEventElement(s), t);
              },
              _addDaySlotCollections: function (n, r, f) {
                for (
                  var o,
                    s,
                    h,
                    p,
                    w,
                    v,
                    b,
                    c,
                    l,
                    k,
                    a = this._view,
                    y = i,
                    d = u,
                    e = 0;
                  e < n;
                  e++
                )
                  for (
                    o = 0,
                      s = 0,
                      a._isVerticallyGrouped() && (s = e),
                      h = s * d;
                    h < (s + 1) * d;
                    h++
                  )
                    for (
                      p = a.groups[e],
                        w = p.addDaySlotCollection(
                          t.date.addDays(f, o),
                          t.date.addDays(f, o + y)
                        ),
                        v = r[h],
                        b = v.children,
                        c = 0,
                        v.setAttribute("role", "row"),
                        a._isVerticallyGrouped() || (c = e),
                        l = c * y;
                      l < (c + 1) * y;
                      l++
                    )
                      (k = b[l]), a.addDaySlot(w, k, f, o), o++;
              },
              _changePeriodGroupIndex: function (n) {
                var t = this._view;
                return n ? t.groups.length - 1 : 0;
              },
              _createResizeHint: function (n) {
                var t = this._view,
                  i = n.startSlot().offsetLeft,
                  u = n.start.offsetTop,
                  f = n.innerWidth(),
                  e = n.start.clientHeight - 2,
                  o = r.fn._createResizeHint.call(t, i, u, f, e);
                t._appendResizeHint(o);
              },
              _createMoveHint: function (n, t) {
                var u = this._view,
                  i = n.startSlot(),
                  f = n.endSlot(),
                  r = u._createEventElement(
                    t.clone({ head: n.head, tail: n.tail })
                  );
                r.css({
                  left: i.offsetLeft + 2,
                  top: i.offsetTop + i.firstChildHeight,
                  height: u.options.eventHeight,
                  width: n.innerWidth() - (i.index !== f.index ? 5 : 4),
                });
                r.addClass("k-event-drag-hint");
                t.inverseColor && r.addClass(c);
                u._appendMoveHint(r);
              },
            }),
            d = t.Class.extend({
              init: function (n) {
                this._view = n;
              },
              _verticalRowCountForLevel: function () {
                return 1;
              },
              _horizontalGroupCountForLevel: function (n) {
                var t = this._view;
                return t._columnCountForLevel(n + 1) / i;
              },
              _createRows: function (n, r, f) {
                var o,
                  l,
                  s = this._view,
                  h = i,
                  a = s._isVerticallyGrouped(),
                  c = "",
                  e = 0;
                if (a) {
                  for (o = new Date(n), l = s._groupCount(), e; e < u; e++)
                    (c += s._createRow(o, r, l, e)), (o = t.date.addDays(o, h));
                  n = t.date.nextDay(n);
                } else {
                  for (e; e < h; e++)
                    (c += s._createRow(n, r, f, e)), (n = t.date.nextDay(n));
                  n = t.date.addDays(n, h);
                }
                return c;
              },
              _adjustStartDate: function (n, r) {
                var f = this._view,
                  e = f._isVerticallyGrouped();
                return e
                  ? r
                    ? t.date.addDays(n, i * (u - 1) + 1)
                    : t.date.nextDay(n)
                  : t.date.addDays(n, i);
              },
              _getContent: function (n, t, i, r) {
                return 0 === r ? n({ date: t, resources: i }) : "";
              },
              _getTimeSlotByPosition: function (n, t, i) {
                var r = this._view.groups[i];
                return r.daySlotByPosition(n, t, !0);
              },
              _nextSlotStartDate: function (n) {
                return n;
              },
              _getCalendarRowsLength: function () {
                var n = this._view,
                  t = n._isVerticallyGrouped();
                return t ? i : u;
              },
              _createRowsLayout: function (n, t, i, r) {
                var u = this._view;
                return u._createDateLayout(r, null, !1);
              },
              _createVerticalColumnsLayout: function (n, i, r) {
                for (
                  var s,
                    c = this._view,
                    f = n[0],
                    h = [],
                    e = f.dataSource.view(),
                    o = 0;
                  o < e.length * u;
                  o++
                )
                  (s = {
                    text: r({
                      text: t.htmlEncode(
                        t.getter(f.dataTextField)(e[o % e.length])
                      ),
                      color: t.getter(f.dataColorField)(e[o % e.length]),
                      field: f.field,
                      title: f.title,
                      name: f.name,
                      value: t.getter(f.dataValueField)(e[o % e.length]),
                    }),
                    className: "k-slot-cell",
                  }),
                    (s.columns = c._createColumnsLayout(n.slice(1), null, r)),
                    h.push(s);
                return h;
              },
              _createColumnsLayout: function (n, t, i, r) {
                var u = this._view;
                return u._createColumnsLayout(n, t, i, r, !0);
              },
              _verticalGroupCount: function (n) {
                var t = this._view;
                return t._columnCountForLevel(n) / u;
              },
              _horizontalGroupCount: function (n) {
                var t = this._view;
                return t._columnCountForLevel(n) / i;
              },
              _positionEvent: function (n, t, i, r, u, f) {
                for (
                  var o,
                    h,
                    c,
                    s = this._view,
                    l = i.start.index,
                    a = i.end.index,
                    v = s._isMobile(),
                    e = i.start.index;
                  e <= i.end.index;
                  e++
                )
                  (o = i.collection._slots[e]),
                    (h = t.daySlotRanges(o.start, o.start, !0)[0]),
                    (c = n.clone({
                      start: e === l ? u : o.startDate(),
                      end: e === a ? f : o.endDate(),
                      head: e !== a || i.head,
                      tail: e !== l || i.tail,
                    })),
                    v
                      ? s._positionMobileEvent(h, s._createEventElement(c), t)
                      : s._positionEvent(h, s._createEventElement(c), t);
              },
              _addDaySlotCollections: function (n, r, f) {
                for (
                  var o,
                    a,
                    b,
                    v,
                    k,
                    h,
                    s,
                    c,
                    d,
                    g,
                    nt,
                    y,
                    tt,
                    l = this._view,
                    p = i,
                    it = u,
                    w = l._isVerticallyGrouped(),
                    e = 0;
                  e < p;
                  e++
                )
                  for (o = 0; o < it; o++)
                    for (
                      a = 0,
                        b = w ? e : o,
                        v = r[b],
                        k = v.children,
                        h = 0,
                        v.setAttribute("role", "row"),
                        l._isVerticallyGrouped() || (h = e),
                        s = h * n;
                      s < (h + 1) * n;
                      s++
                    )
                      (c = o * p + e),
                        (d = w ? s + o * n : s),
                        (g = k[d]),
                        (nt = w ? s : a),
                        (y = l.groups[nt]),
                        (tt =
                          0 === e
                            ? y.addDaySlotCollection(
                                t.date.addDays(f, c),
                                t.date.addDays(f, c + p)
                              )
                            : y._daySlotCollections[o]),
                        l.addDaySlot(tt, g, f, c),
                        a++;
              },
              _changePeriodGroupIndex: function (n, t, i) {
                var r = this._view;
                return t && r._isVerticallyGrouped()
                  ? n
                    ? r.groups.length - 1
                    : 0
                  : i;
              },
              _createResizeHint: function (n) {
                var u,
                  f,
                  e,
                  o,
                  s,
                  h,
                  t,
                  i = this._view;
                if (i._isVerticallyGrouped())
                  (u = n.startSlot().offsetLeft),
                    (f = n.start.offsetTop),
                    (e = n.startSlot().offsetWidth),
                    (o =
                      n.endSlot().offsetTop +
                      n.startSlot().offsetHeight -
                      n.startSlot().offsetTop -
                      2),
                    (s = r.fn._createResizeHint.call(i, u, f, e, o)),
                    i._appendResizeHint(s);
                else
                  for (h = n.startSlot().index; h <= n.endSlot().index; h++)
                    (t = n.collection._slots[h]),
                      (u = t.offsetLeft),
                      (f = t.offsetTop),
                      (e = t.offsetWidth),
                      (o = t.offsetHeight - 2),
                      (s = r.fn._createResizeHint.call(i, u, f, e, o)),
                      i._appendResizeHint(s);
              },
              _createMoveHint: function (n, t) {
                for (
                  var i,
                    r,
                    f = this._view,
                    e = n.startSlot(),
                    o = n.endSlot(),
                    u = e.index;
                  u <= o.index;
                  u++
                )
                  (i = n.collection._slots[u]),
                    (r = f._createEventElement(
                      t.clone({ head: n.head, tail: n.tail })
                    )),
                    r.css({
                      left: i.offsetLeft,
                      top: i.offsetTop + i.firstChildHeight,
                      height: f.options.eventHeight,
                      width: i.offsetWidth - 2,
                    }),
                    r.addClass("k-event-drag-hint"),
                    t.inverseColor && r.addClass(c),
                    f._appendMoveHint(r);
              },
            });
          t.ui.scheduler.MonthGroupedView = k;
          t.ui.scheduler.MonthGroupedByDateView = d;
          s.MonthView = r.extend({
            init: function (n, t) {
              var i = this;
              r.fn.init.call(i, n, t);
              i._groupedView = i._getGroupedView();
              i.title = i.options.title;
              i._templates();
              i._editable();
              i._renderLayout(i.options.date);
              i._groups();
            },
            name: "month",
            _getGroupedView: function () {
              return this._isGroupedByDate()
                ? new t.ui.scheduler.MonthGroupedByDateView(this)
                : new t.ui.scheduler.MonthGroupedView(this);
            },
            _updateDirection: function (n, t, i, r, u) {
              var e, o, s, f, h;
              i &&
                ((e = t[0].start),
                (o = t[t.length - 1].end),
                (s = e.index === o.index),
                (f = e.collectionIndex === o.collectionIndex),
                (h = u ? (s && f) || f : s && f),
                h && (n.backward = r));
            },
            _changeDate: function (n, t, i) {
              var u,
                r,
                e,
                f = this.groups[n.groupIndex];
              if (i) {
                if (
                  ((u = f._getCollections(f.daySlotCollectionCount())),
                  (r = t.collectionIndex - 1),
                  r >= 0)
                )
                  return u[r]._slots[u[r]._slots.length - 1];
              } else if (
                ((u = f._getCollections(f.daySlotCollectionCount())),
                (r = t.collectionIndex + 1),
                (e = 0),
                u[r] && u[r]._slots[e])
              )
                return u[r]._slots[e];
            },
            _getNextHorizontalRange: function (n, t, i) {
              var r = this._isVerticallyGrouped();
              return (
                (i.startSlot = n[t](i.startSlot, r)),
                (i.endSlot = n[t](i.endSlot, r)),
                i
              );
            },
            _getNextVerticalRange: function (n, t, i, r) {
              var u = this._isVerticallyGrouped() && this._isGroupedByDate();
              return (
                (i.startSlot = n[t](i.startSlot, r, u)),
                (i.endSlot = n[t](i.endSlot, r, u)),
                i
              );
            },
            _changeViewPeriod: function (n, i, r) {
              var u,
                f,
                e = r ? 7 : 1;
              return (
                i && (e *= -1),
                (u = t.date.addDays(n.start, e)),
                (f = t.date.addDays(n.end, e)),
                !this._isInRange(u, f) &&
                  ((n.start = u),
                  (n.end = f),
                  (!r || (r && this._isVerticallyGrouped())) &&
                    (n.groupIndex = this._groupedView._changePeriodGroupIndex(
                      i,
                      r,
                      n.groupIndex
                    )),
                  (n.events = []),
                  !0)
              );
            },
            _continuousSlot: function (n, t, i) {
              var r = n.backward ? 0 : t.length - 1,
                u = this.groups[n.groupIndex];
              return u.continuousSlot(t[r].start, i);
            },
            _changeGroupContinuously: function (n, t, i, r) {
              var u, f, e, o;
              return (
                i ||
                  ((u = n.groupIndex),
                  (f = this.groups.length - 1),
                  (e = this._isVerticallyGrouped()),
                  (o = this.groups[u]),
                  !t && e
                    ? ((t = o[r ? "lastSlot" : "firstSlot"]()),
                      (u += r ? -1 : 1))
                    : t && !e && (u = r ? f : 0),
                  (u < 0 || u > f) && ((u = r ? f : 0), (t = null)),
                  (n.groupIndex = u)),
                t
              );
            },
            _normalizeHorizontalSelection: function (n, t, i) {
              return i ? t[0].start : t[t.length - 1].end;
            },
            _normalizeVerticalSelection: function (n, t) {
              return n.backward ? t[0].start : t[t.length - 1].end;
            },
            _templates: function () {
              var n = this.options,
                i = o({}, t.Template, n.templateSettings);
              this.eventTemplate = this._eventTmpl(n.eventTemplate, p);
              this.dayTemplate = t.template(n.dayTemplate, i);
              this.groupHeaderTemplate = t.template(n.groupHeaderTemplate, i);
            },
            dateForTitle: function () {
              return t.format(
                this.options.selectedDateFormat,
                this._firstDayOfMonth,
                this._lastDayOfMonth
              );
            },
            shortDateForTitle: function () {
              return t.format(
                this.options.selectedShortDateFormat,
                this._firstDayOfMonth,
                this._lastDayOfMonth
              );
            },
            mobileDateForTitle: function () {
              return t.format(
                this.options.selectedMobileDateFormat,
                this._firstDayOfMonth,
                this._lastDayOfMonth
              );
            },
            nextDate: function () {
              return t.date.nextDay(this._lastDayOfMonth);
            },
            previousDate: function () {
              return t.date.previousDay(this._firstDayOfMonth);
            },
            startDate: function () {
              return this._startDate;
            },
            endDate: function () {
              return this._endDate;
            },
            _renderLayout: function (i) {
              var r = this;
              this._firstDayOfMonth = t.date.firstDayOfMonth(i);
              this._lastDayOfMonth = t.date.lastDayOfMonth(i);
              this._startDate = a(i, this.calendarInfo());
              this.createLayout(this._layout());
              this._content();
              this.refreshLayout();
              this.content.on(
                "click" + e,
                ".k-nav-day,.k-more-events",
                function (t) {
                  var i = n(t.currentTarget).offset(),
                    u = r._slotByPosition(i.left, i.top);
                  t.preventDefault();
                  r.trigger("navigate", { view: "day", date: u.startDate() });
                }
              );
              this._footer();
            },
            _editable: function () {
              this.options.editable &&
                (this._isMobile()
                  ? this._touchEditable()
                  : this._mouseEditable());
            },
            _mouseEditable: function () {
              var i = this;
              i.element.on(
                "click" + e,
                ".k-scheduler-monthview .k-event a:has(.k-i-close)",
                function (r) {
                  i.trigger("remove", {
                    uid: n(this).closest(".k-event").attr(t.attr("uid")),
                  });
                  r.preventDefault();
                }
              );
              i.options.editable.create !== !1 &&
                i.element.on(
                  "dblclick" + e,
                  ".k-scheduler-monthview .k-scheduler-content td",
                  function (t) {
                    var u,
                      f = n(t.currentTarget).offset(),
                      r = i._slotByPosition(f.left, f.top);
                    r &&
                      ((u = i._resourceBySlot(r)),
                      i.trigger("add", {
                        eventInfo: o(
                          {
                            isAllDay: !0,
                            start: r.startDate(),
                            end: r.startDate(),
                          },
                          u
                        ),
                      }));
                    t.preventDefault();
                  }
                );
              i.options.editable.update !== !1 &&
                i.element.on(
                  "dblclick" + e,
                  ".k-scheduler-monthview .k-event",
                  function (r) {
                    i.trigger("edit", {
                      uid: n(this).closest(".k-event").attr(t.attr("uid")),
                    });
                    r.preventDefault();
                  }
                );
            },
            _touchEditable: function () {
              var i = this,
                r = 0;
              t.support.mobileOS.android && (r = 5);
              i.options.editable.create !== !1 &&
                (i._addUserEvents = new t.UserEvents(i.element, {
                  threshold: r,
                  useClickAsTap: !t.support.browser.edge,
                  filter: ".k-scheduler-monthview .k-scheduler-content td",
                  tap: function (t) {
                    var u, r, f;
                    i._scrolling ||
                      ((u = n(t.target).offset()),
                      (r = i._slotByPosition(u.left, u.top)),
                      r &&
                        ((f = i._resourceBySlot(r)),
                        i.trigger("add", {
                          eventInfo: o(
                            {
                              isAllDay: !0,
                              start: r.startDate(),
                              end: r.startDate(),
                            },
                            f
                          ),
                        })),
                      t.preventDefault());
                  },
                }));
            },
            selectionByElement: function (t) {
              var i = n(t).offset();
              return this._slotByPosition(i.left, i.top);
            },
            _columnCountForLevel: function (n) {
              var t = this.columnLevels[n];
              return t ? t.length : 0;
            },
            _rowCountForLevel: function (n) {
              var t = this.rowLevels[n];
              return t ? t.length : 0;
            },
            _content: function () {
              var n,
                t = "<tbody>",
                i = 1,
                u = this._groupedView,
                r = this.groupedResources;
              for (
                r.length &&
                  this._isVerticallyGrouped() &&
                  (i = u._verticalRowCountForLevel(r.length - 1)),
                  n = 0;
                n < i;
                n++
              )
                t += this._createCalendar(n);
              t += "</tbody>";
              this.content.find("table").html(t);
            },
            _createCalendar: function (n) {
              var s,
                f,
                h,
                r = this.startDate(),
                y = i * u,
                c = i,
                l = [r],
                e = "",
                a = 1,
                p = this._isVerticallyGrouped(),
                o = this._groupedView,
                v = this.groupedResources;
              for (
                v.length &&
                  (p || (a = o._horizontalGroupCountForLevel(v.length - 1))),
                  this._slotIndices = {},
                  s = o._getCalendarRowsLength(c, y),
                  f = 0;
                f < s;
                f++
              )
                (e += "<tr>"),
                  l.push(r),
                  (h = f * c),
                  (e += o._createRows(r, h, a, n)),
                  (r = o._adjustStartDate(r, f === s - 1)),
                  (e += "</tr>");
              return (
                (this._weekStartDates = l),
                (this._endDate = t.date.previousDay(r)),
                e
              );
            },
            _createRow: function (n, i, r, u) {
              for (
                var o = this,
                  l = o._firstDayOfMonth,
                  a = o._lastDayOfMonth,
                  v = o.dayTemplate,
                  s = "",
                  f = "",
                  c = this._groupedView,
                  y = function () {
                    return o._resourceBySlot({ groupIndex: u });
                  },
                  e = 0;
                e < r;
                e++
              )
                (s = ""),
                  t.date.isToday(n) && (s += "k-today"),
                  t.date.isInDateRange(n, l, a) || (s += " k-other-month"),
                  (f += "<td "),
                  "" !== s && (f += 'class="' + s + '"'),
                  (f += ">"),
                  (f += c._getContent(v, n, y, e)),
                  (f += "</td>"),
                  (o._slotIndices[h(n).getTime()] = i + e),
                  (n = c._nextSlotStartDate(n));
              return f;
            },
            _layout: function () {
              var o,
                i,
                u,
                f = this.calendarInfo(),
                s = this._isMobile()
                  ? f.days.namesShort.map(function (n) {
                      return n[0];
                    })
                  : f.days.names,
                h = l(s, f.firstDay),
                t = n.map(h, function (n) {
                  return { text: n };
                }),
                r = this.groupedResources,
                e = this._groupedView;
              if (r.length)
                if (this._isVerticallyGrouped()) {
                  for (i = [], u = 0; u < 6; u++)
                    i.push({
                      text: "<div>&nbsp;</div>",
                      className: "k-hidden k-slot-cell",
                    });
                  o = e._createRowsLayout(r, i, this.groupHeaderTemplate, t);
                  t = e._createVerticalColumnsLayout(
                    r,
                    i,
                    this.groupHeaderTemplate,
                    t
                  );
                } else
                  t = e._createColumnsLayout(r, t, this.groupHeaderTemplate, t);
              return { columns: t, rows: o };
            },
            _createEventElement: function (i) {
              var u,
                f = this.options,
                r = f.editable,
                e = this._isMobile();
              return (
                (i.showDelete = r && r.destroy !== !1 && !e),
                (i.resizable = r && r.resize !== !1 && !e),
                (i.ns = t.ns),
                (i.resources = this.eventResources(i)),
                (i.inverseColor = !1),
                (i.messages = f.messages || { destroy: "Delete" }),
                (u = n(this.eventTemplate(i))),
                this.angular("compile", function () {
                  return { elements: u, data: [{ dataItem: i }] };
                }),
                u
              );
            },
            _isInDateSlot: function (n) {
              var o = this.groups[0],
                i = o.firstSlot().start,
                e = o.lastSlot().end - 1,
                r = t.date.toUtcTime(n.start),
                u = t.date.toUtcTime(n.end);
              return (
                (f(r, i, e) || f(u, i, e) || f(i, r, u) || f(e, r, u)) &&
                (!f(u, i, i) || f(u, r, r) || n.isAllDay)
              );
            },
            _slotIndex: function (n) {
              return this._slotIndices[h(n).getTime()];
            },
            _positionMobileEvent: function (i, u, f) {
              var o,
                h,
                a,
                c,
                v,
                l,
                s,
                e = i.start;
              i.start.offsetLeft > i.end.offsetLeft && (e = i.end);
              o = i.start.index;
              h = o;
              a = 3;
              c = r.collidingEvents(i.events(), o, h);
              c.push({ element: u, start: o, end: h });
              v = r.createRows(c);
              l = i.collection.at(o);
              s = l.container;
              s ||
                ((s = n(
                  t.format(
                    '<div class="k-events-container" style="top:{0};left:{1};width:{2}"/>',
                    e.offsetTop + e.firstChildTop + e.firstChildHeight + "px",
                    e.offsetLeft + "px",
                    e.offsetWidth + "px"
                  )
                )),
                (l.container = s),
                this.content[0].appendChild(s[0]));
              v.length <= a &&
                (i.addEvent({
                  element: u,
                  start: o,
                  end: h,
                  groupIndex: e.groupIndex,
                }),
                f._continuousEvents.push({
                  element: u,
                  uid: u.attr(t.attr("uid")),
                  start: i.start,
                  end: i.end,
                }),
                s[0].appendChild(u[0]));
            },
            _positionEvent: function (i, u, f) {
              var s,
                h,
                a,
                p,
                d,
                v,
                c,
                g,
                w,
                nt,
                y,
                tt,
                l,
                it,
                e,
                k = this.options.eventHeight,
                o = i.start;
              for (
                i.start.offsetLeft > i.end.offsetLeft && (o = i.end),
                  s = i.start.index,
                  h = i.end.index,
                  a = o.eventCount,
                  p = r.collidingEvents(i.events(), s, h),
                  d = s !== h ? 5 : 4,
                  p.push({ element: u, start: s, end: h }),
                  v = r.createRows(p),
                  c = 0,
                  g = Math.min(v.length, a);
                c < g;
                c++
              )
                for (
                  w = v[c].events,
                    nt =
                      o.offsetTop +
                      o.firstChildTop +
                      o.firstChildHeight +
                      c * k +
                      3 * c +
                      "px",
                    y = 0,
                    tt = w.length;
                  y < tt;
                  y++
                )
                  w[y].element[0].style.top = nt;
              if (v.length > a)
                for (l = s; l <= h; l++)
                  (it = i.collection),
                    (e = it.at(l)),
                    e.more ||
                      ((e.more = n(
                        b({
                          ns: t.ns,
                          start: l,
                          end: l,
                          width: e.clientWidth - 2,
                          left: e.offsetLeft + 2,
                          top:
                            e.offsetTop +
                            e.firstChildTop +
                            e.firstChildHeight +
                            a * k +
                            3 * a,
                        })
                      )),
                      this.content[0].appendChild(e.more[0]));
              else
                i.addEvent({
                  element: u,
                  start: s,
                  end: h,
                  groupIndex: o.groupIndex,
                }),
                  (u[0].style.width = i.innerWidth() - d + "px"),
                  (u[0].style.left = o.offsetLeft + 2 + "px"),
                  (u[0].style.height = k + "px"),
                  f._continuousEvents.push({
                    element: u,
                    uid: u.attr(t.attr("uid")),
                    start: i.start,
                    end: i.end,
                  }),
                  u.appendTo(this.content),
                  this._inverseEventColor(u);
            },
            _slotByPosition: function (n, t) {
              var i,
                r,
                u = this.content.offset();
              for (
                n -= u.left,
                  t -= u.top,
                  t += this.content[0].scrollTop,
                  n += this.content[0].scrollLeft,
                  n = Math.ceil(n),
                  t = Math.ceil(t),
                  i = 0;
                i < this.groups.length;
                i++
              )
                if ((r = this._groupedView._getTimeSlotByPosition(n, t, i)))
                  return r;
              return null;
            },
            _appendResizeHint: function (n) {
              n.appendTo(this.content);
              this._resizeHint = this._resizeHint.add(n);
            },
            _updateResizeHint: function (n, i, r, u) {
              var o, e, f;
              for (
                this._removeResizeHint(),
                  o = this.groups[i],
                  e = o.ranges(r, u, !0, n.isAllDay),
                  f = 0;
                f < e.length;
                f++
              )
                this._groupedView._createResizeHint(e[f]);
              this._resizeHint.find(".k-label-top,.k-label-bottom").text("");
              this._resizeHint
                .first()
                .addClass("k-first")
                .find(".k-label-top")
                .text(t.toString(t.timezone.toLocalDate(r), "M/dd"));
              this._resizeHint
                .last()
                .addClass("k-last")
                .find(".k-label-bottom")
                .text(t.toString(t.timezone.toLocalDate(u), "M/dd"));
            },
            _updateMoveHint: function (n, i, r) {
              var u,
                f = t.date.toUtcTime(n.start) + r,
                o = f + n.duration(),
                s = this.groups[i],
                e = s.ranges(f, o, !0, n.isAllDay);
              for (this._removeMoveHint(n.uid), u = 0; u < e.length; u++)
                this._groupedView._createMoveHint(e[u], n);
            },
            _appendMoveHint: function (n) {
              n.appendTo(this.content);
              this._moveHint = this._moveHint.add(n);
            },
            _groups: function () {
              var n,
                t = this._groupCount(),
                i = this.content[0].getElementsByTagName("tr"),
                r = this.startDate();
              for (this.groups = [], n = 0; n < t; n++)
                this._addResourceView(n);
              this._groupedView._addDaySlotCollections(t, i, r);
            },
            addDaySlot: function (n, i, r, u) {
              var o,
                s = i.clientHeight,
                h = i.children.length ? i.children[0].offsetHeight + 3 : 0,
                f = t.date.addDays(r, u),
                e = t.date.MS_PER_DAY;
              r.getHours() !== f.getHours() &&
                (e += (r.getHours() - f.getHours()) * t.date.MS_PER_HOUR);
              f = t.date.toUtcTime(f);
              e += f;
              o = Math.floor(
                (s - h - this.options.moreButtonHeight) /
                  (this.options.eventHeight + 3)
              );
              i.setAttribute("role", "gridcell");
              i.setAttribute("aria-selected", !1);
              n.addDaySlot(i, f, e, o);
            },
            render: function (n) {
              this.content
                .children(".k-event,.k-more-events,.k-events-container")
                .remove();
              this._groups();
              n = new t.data.Query(n)
                .sort([
                  { field: "start", dir: "asc" },
                  { field: "end", dir: "desc" },
                ])
                .toArray();
              var i = this.groupedResources;
              i.length
                ? this._renderGroups(n, i, 0, 1)
                : this._renderEvents(n, 0);
              this.refreshLayout();
              this.trigger("activate");
            },
            _renderEvents: function (n, i) {
              for (
                var r,
                  f,
                  a,
                  h,
                  u,
                  k,
                  d,
                  e,
                  p,
                  o,
                  w,
                  v,
                  y,
                  s,
                  c,
                  l = 0,
                  b = n.length;
                l < b;
                l++
              )
                if (((r = n[l]), this._isInDateSlot(r)))
                  if (
                    ((u = this.groups[i]),
                    (k = this._groupedView._view),
                    (d = k._isMobile()),
                    u._continuousEvents || (u._continuousEvents = []),
                    (e = u.slotRanges(r, !0)),
                    (p = e.length),
                    d)
                  )
                    for (
                      f = e[0],
                        a = f.start.start,
                        h = f.end.end,
                        o = new Date(f.start.start),
                        w = e[e.length - 1].end.end,
                        v = new Date(o),
                        y = new Date(h);
                      o.getTime() <= w &&
                      r.end >= t.timezone.toLocalDate(o) &&
                      r.start <= t.timezone.toLocalDate(w);

                    )
                      (s = u.daySlotRanges(v.getTime(), y.getTime(), !0)[0]),
                        y.setDate(y.getDate() + 1),
                        v.setDate(v.getDate() + 1),
                        s &&
                          ((s.head = null),
                          (s.middle = null),
                          (s.tail = null),
                          this._groupedView._positionEvent(
                            r,
                            u,
                            s,
                            1,
                            a,
                            h,
                            0
                          )),
                        (o = t.date.addDays(o, 1));
                  else
                    for (c = 0; c < p; c++)
                      (f = e[c]),
                        (a = r.start),
                        (h = r.end),
                        this._groupedView._positionEvent(r, u, f, p, a, h, c);
            },
            _renderGroups: function (n, i, u, f) {
              var s,
                e,
                c,
                h,
                o = i[0];
              if (o)
                for (s = o.dataSource.view(), e = 0; e < s.length; e++)
                  (c = this._resourceValue(o, s[e])),
                    (h = new t.data.Query(n)
                      .filter({ field: o.field, operator: r.groupEqFilter(c) })
                      .toArray()),
                    i.length > 1
                      ? (u = this._renderGroups(h, i.slice(1), u++, f + 1))
                      : this._renderEvents(h, u++);
              return u;
            },
            _groupCount: function () {
              var n = this.groupedResources,
                t = this._groupedView;
              return n.length
                ? this._isVerticallyGrouped()
                  ? t._verticalGroupCount(n.length - 1)
                  : t._horizontalGroupCount(n.length)
                : 1;
            },
            _columnOffsetForResource: function (n) {
              return (
                this._columnCountForLevel(n) / this._columnCountForLevel(n - 1)
              );
            },
            destroy: function () {
              this.table && this.table.removeClass("k-scheduler-monthview");
              this.content && this.content.off(e);
              this.element && this.element.off(e);
              r.fn.destroy.call(this);
              this._isMobile() &&
                this.options.editable &&
                this.options.editable.create !== !1 &&
                this._addUserEvents.destroy();
            },
            events: ["remove", "add", "edit", "navigate"],
            options: {
              title: "Month",
              name: "month",
              eventHeight: 25,
              moreButtonHeight: 13,
              editable: !0,
              selectedDateFormat: "{0:y}",
              selectedShortDateFormat: "{0:y}",
              selectedMobileDateFormat: "{0:MMMM}",
              groupHeaderTemplate: "#=text#",
              dayTemplate: y,
              eventTemplate: w,
            },
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.scheduler.recurrence.min",
      [
        "kendo.dropdownlist.min",
        "kendo.datepicker.min",
        "kendo.numerictextbox.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function p(n, t) {
            var i;
            return (
              0 !== n && n < t ? (i = t - n) : ((i = n % t), i && (i = t - i)),
              i
            );
          }
          function ht(n) {
            var t = n.getMonth(),
              i = vt(n) ? ur[t] : fr[t];
            return i + n.getDate();
          }
          function ct(n, i) {
            var u, f;
            return (
              (n = new Date(n.getFullYear(), n.getMonth(), n.getDate())),
              r(n, 0),
              (u = n.getFullYear()),
              i !== t
                ? (v(n, i, -1), n.setDate(n.getDate() + 4))
                : n.setDate(n.getDate() + (4 - (n.getDay() || 7))),
              r(n, 0),
              (f = Math.floor((n.getTime() - new Date(u, 0, 1, -6)) / 864e5)),
              1 + Math.floor(f / 7)
            );
          }
          function h(n, t) {
            var r = rr(n).getDay(),
              i = 7 - (r + 7 - (t || 7)) || 7;
            return i < 0 && (i += 7), Math.ceil((n.getDate() - i) / 7) + 1;
          }
          function c(n, t) {
            return n + (n < t ? 7 : 0);
          }
          function lt(n, t, i) {
            var f,
              u,
              e,
              o,
              s,
              r = t.offset;
            return r
              ? ((f = new Date(n.getFullYear(), n.getMonth() + 1, 0)),
                (u = h(f, i)),
                (e = c(t.day, i)),
                (o =
                  e <
                  c(new Date(n.getFullYear(), n.getMonth(), 1).getDay(), i)),
                (s = e > c(f.getDay(), i)),
                r < 0 ? (r = u + (r + 1 - (s ? 1 : 0))) : o && (r += 1),
                (u -= s ? 1 : 0),
                r < (o ? 1 : 0) || r > u ? null : r)
              : h(n, i);
          }
          function at(n, t) {
            return h(new Date(n.getFullYear(), n.getMonth() + 1, 0), t);
          }
          function ai(n, t, i) {
            return h(n, i) === lt(n, t, i);
          }
          function vi(n, t, i) {
            for (
              var u, r, f, e, l = c(t.getDay(), i), a = n.length, o = [], s = 0;
              s < a;
              s++
            )
              if (((r = n[s]), (e = h(t, i)), (u = lt(t, r, i)), null !== u))
                if (e < u) o.push(r);
                else if (e === u)
                  if (((f = c(r.day, i)), l < f)) o.push(r);
                  else if (l === f) return null;
            return o;
          }
          function l(n, t, i) {
            for (var r, u = 0, e = n.length, f = []; u < e; u++) {
              if (((r = n[u]), i && (r = i(r)), t === r)) return null;
              t < r && f.push(r);
            }
            return f;
          }
          function e(n, t) {
            for (var i, r = 0, u = n.length; r < u; r++) {
              if (
                ((i = parseInt(n[r], 10)),
                isNaN(i) ||
                  i < t.start ||
                  i > t.end ||
                  (0 === i && t.start < 0))
              )
                return null;
              n[r] = i;
            }
            return n.sort(k);
          }
          function yi(n) {
            for (var r, f, i, u = 0, e = n.length; u < e; u++) {
              if (
                ((r = n[u]),
                (f = r.length),
                (i = r.substring(f - 2).toUpperCase()),
                (i = oi[i]),
                i === t)
              )
                return null;
              n[u] = {
                offset: parseInt(r.substring(0, f - 2), 10) || 0,
                day: i,
              };
            }
            return n;
          }
          function pi(n) {
            for (var t, i, r = 0, f = n.length, u = []; r < f; r++)
              (t = n[r]),
                "string" == typeof t
                  ? (i = t)
                  : ((i = "" + ei[t.day]), t.offset && (i = t.offset + i)),
                u.push(i);
            return "" + u;
          }
          function wi(n) {
            var t = n.getMonth();
            return 1 === t
              ? 1 === new Date(n.getFullYear(), 1, 29).getMonth()
                ? 29
                : 28
              : er[t];
          }
          function vt(n) {
            return (
              (n = n.getFullYear()),
              (n % 4 == 0 && n % 100 != 0) || n % 400 == 0
            );
          }
          function k(n, t) {
            return n - t;
          }
          function yt(n, t) {
            var u,
              i,
              r = 0,
              f = [];
            if (n)
              for (
                n = n.split(n.indexOf(";") !== -1 ? ";" : ","), u = n.length;
                r < u;
                r++
              )
                (i = rt(n[r], t)), i && f.push(i);
            return f;
          }
          function tt(t, i, r) {
            for (
              var f = n.isArray(t) ? t : yt(t, r),
                e = i.getTime() - i.getMilliseconds(),
                u = 0,
                o = f.length;
              u < o;
              u++
            )
              if (f[u].getTime() === e) return !0;
            return !1;
          }
          function pt(n, t) {
            for (var r, u = 0, f = [].concat(n), e = f.length; u < e; u++)
              (r = f[u]),
                (r = i.timezone.convert(
                  r,
                  t || r.getTimezoneOffset(),
                  "Etc/UTC"
                )),
                (f[u] = i.toString(r, sr));
            return f.join(",");
          }
          function bi(n, t) {
            var i = new Date(n);
            switch (t.freq) {
              case "yearly":
                i.setFullYear(i.getFullYear(), 0, 1);
                break;
              case "monthly":
                i.setFullYear(i.getFullYear(), i.getMonth(), 1);
                break;
              case "weekly":
                v(i, t.weekStart, -1);
            }
            return (
              t.hours && i.setHours(0),
              t.minutes && i.setMinutes(0),
              t.seconds && i.setSeconds(0),
              i
            );
          }
          function it(n, t) {
            var i = new Date(n);
            switch (t.freq) {
              case "yearly":
                i.setFullYear(i.getFullYear(), 11, 31);
                break;
              case "monthly":
                i.setFullYear(i.getFullYear(), i.getMonth() + 1, 0);
                break;
              case "weekly":
                v(i, t.weekStart, -1);
                i.setDate(i.getDate() + 6);
            }
            return (
              t.hours && i.setHours(23),
              t.minutes && i.setMinutes(59),
              t.seconds && i.setSeconds(59),
              i
            );
          }
          function ki(n, t, i) {
            for (
              var r, u, s = n.length, o = [], f = 0, e = i.length;
              f < e;
              f++
            )
              (r = i[f]),
                r < 0 ? (r = s + r) : (r -= 1),
                (u = n[r]),
                u && u.start >= t && o.push(u);
            return o;
          }
          function di(n, t, i) {
            for (var u, f = [], r = 0; r < n.length; r++)
              (u = n[r]), tt(t, u.start, i) || f.push(u);
            return f;
          }
          function gi(n, i, r, f) {
            var c,
              rt,
              l,
              p,
              st,
              ht,
              ct,
              lt,
              ui,
              ut,
              ft,
              fi,
              a,
              w,
              ei,
              et,
              s,
              k,
              h,
              g,
              v,
              ot,
              at,
              vt,
              wt,
              bt,
              oi,
              nt,
              kt,
              dt,
              gt,
              ni,
              ti,
              ii,
              ri,
              si,
              e = d(n.recurrenceRule, f),
              y = [];
            if (!e) return [n];
            for (
              g = e.positions,
                v = g ? 0 : 1,
                ut = e.start,
                ft = e.end,
                (ut || ft) &&
                  (n = n.clone({
                    start: ut ? new Date(ut.value[0]) : t,
                    end: ft ? new Date(ft.value[0]) : t,
                  })),
                s = n.start,
                et = s.getTime(),
                ei = b(s),
                w = yt(n.recurrenceException, f),
                !w[0] &&
                  e.exdates &&
                  ((w = e.exdates.value),
                  n.set("recurrenceException", pt(w, f))),
                lt = i = new Date(i),
                r = new Date(r),
                a = e.freq,
                h = vr[a],
                k = e.count,
                e.until && e.until < r && (r = new Date(e.until)),
                fi = "yearly" === a || "monthly" === a || "weekly" === a,
                i < et ||
                k ||
                e.interval > 1 ||
                fi ||
                (("daily" === a || "hourly" === a) && !e.seconds)
                  ? (i = new Date(et))
                  : ((p = i.getHours()),
                    (st = i.getMinutes()),
                    (ht = i.getSeconds()),
                    e.hours || (p = s.getHours()),
                    e.minutes || (st = s.getMinutes()),
                    e.seconds || (ht = s.getSeconds()),
                    i.setHours(p, st, ht, s.getMilliseconds())),
                e._startPeriod = new Date(i),
                g &&
                  ((i = bi(i, e)),
                  (r = it(r, e)),
                  (oi = b(r) - b(i)),
                  oi < 0 &&
                    ((p = i.getHours()),
                    r.setHours(
                      p,
                      i.getMinutes(),
                      i.getSeconds(),
                      i.getMilliseconds()
                    ),
                    u.adjustDST(r, p)),
                  (e._startPeriod = new Date(i)),
                  (e._endPeriod = it(i, e))),
                ct = n.duration(),
                e._startTime = c = u.toInvariantTime(i),
                h.setup && h.setup(e, s, i),
                h.limit(i, r, e);
              i <= r;

            )
              if (
                ((l = new Date(i)),
                ir(l, ct),
                (ui = i >= lt || l > lt),
                ((ui && !tt(w, i, f)) || g) &&
                  ((c = u.toUtcTime(u.getDate(i)) + b(e._startTime)),
                  (rt = c + ct),
                  et !== i.getTime() || ei !== b(e._startTime)
                    ? (n.isAllDay ||
                        ((nt = n.startTimezone || n.endTimezone),
                        (kt = n.endTimezone || n.startTimezone),
                        ((f && nt) || (!f && !nt)) &&
                          ((dt = o(i, f) - o(n.start, f)),
                          (gt = o(l, f) - o(n.end, f)),
                          (ni = o(i, nt) - o(n.start, nt)),
                          (ti = o(l, kt) - o(n.end, kt)),
                          dt !== ni &&
                            ((ii = 6e4 * (dt - ni)),
                            (at = new Date(i.getTime() - ii)),
                            (wt = c - ii)),
                          gt !== ti &&
                            ((ri = 6e4 * (gt - ti)),
                            (vt = new Date(l.getTime() - ri)),
                            (bt = rt - ri)))),
                      y.push(
                        n.toOccurrence({
                          start: at || new Date(i),
                          end: vt || l,
                          _startTime: wt || c,
                          _endTime: bt || rt,
                        })
                      ),
                      (at = vt = wt = bt = null))
                    : ((n._startTime = c), (n._endTime = rt), y.push(n))),
                g)
              ) {
                if (
                  (h.next(i, e),
                  h.limit(i, r, e),
                  i > e._endPeriod &&
                    ((ot = ki(y.slice(v), s, g)),
                    (ot = di(ot, w, f)),
                    (y = y.slice(0, v).concat(ot)),
                    (e._endPeriod = it(i, e)),
                    (v = y.length)),
                  k && k === v)
                )
                  break;
              } else {
                if (k && k === v) break;
                v += 1;
                si = nr(i);
                h.next(i, e);
                si &&
                  "hourly" !== e.freq &&
                  u.toInvariantTime(n.start).getTime() !==
                    u.toInvariantTime(i).getTime() &&
                  (e._startTime = c = new Date(i.getTime() - 36e5));
                h.limit(i, r, e);
              }
            return y;
          }
          function nr(n) {
            var t = n.getTimezoneOffset(),
              i = new Date(n.getTime() - 36e5),
              r = i.getTimezoneOffset();
            return t < r;
          }
          function o(n, t) {
            return t ? i.timezone.offset(n, t) : n.getTimezoneOffset();
          }
          function rt(n, t) {
            return (n = i.parseDate(n, or)), n && t && (n = st.apply(n, t)), n;
          }
          function ut(n, t) {
            for (
              var e, u, i, o, r, s, c = n.split(";"), f = 0, h = c.length;
              f < h;
              f++
            )
              if (
                ((e = c[f].split(":")),
                (u = e[0]),
                (i = e[1]),
                u.indexOf("TZID") !== -1 &&
                  (o = u.substring(u.indexOf("TZID")).split("=")[1]),
                i)
              )
                for (i = i.split(","), r = 0, s = i.length; r < s; r++)
                  i[r] = rt(i[r], o || t);
            if (i) return { value: i, tzid: o };
          }
          function d(r, u) {
            var p,
              o,
              y,
              l,
              s,
              a,
              b,
              v,
              w,
              f = {},
              c = 0,
              h = !1,
              k = function (n, t) {
                var i = n.day,
                  r = t.day;
                return i < v && (i += 7), r < v && (r += 7), i - r;
              };
            if (!r) return null;
            for (
              a = r.split("\n"),
                a[1] ||
                  (r.indexOf("DTSTART") === -1 &&
                    r.indexOf("DTEND") === -1 &&
                    r.indexOf("EXDATE") === -1) ||
                  (a = r.split(" ")),
                c = 0,
                y = a.length;
              c < y;
              c++
            )
              (s = n.trim(a[c])),
                s.indexOf("DTSTART") !== -1
                  ? (f.start = ut(s, u))
                  : s.indexOf("DTEND") !== -1
                  ? (f.end = ut(s, u))
                  : s.indexOf("EXDATE") !== -1
                  ? (f.exdates = ut(s, u))
                  : s.indexOf("RRULE") !== -1
                  ? (l = s.substring(6))
                  : n.trim(s) && (l = s);
            for (l = l.split(";"), c = 0, y = l.length; c < y; c++)
              switch (
                ((b = l[c]),
                (p = b.split("=")),
                (o = n.trim(p[1]).split(",")),
                n.trim(p[0]).toUpperCase())
              ) {
                case "FREQ":
                  f.freq = o[0].toLowerCase();
                  break;
                case "UNTIL":
                  f.until = rt(o[0], u);
                  break;
                case "COUNT":
                  f.count = parseInt(o[0], 10);
                  break;
                case "INTERVAL":
                  f.interval = parseInt(o[0], 10);
                  break;
                case "BYSECOND":
                  f.seconds = e(o, { start: 0, end: 60 });
                  h = !0;
                  break;
                case "BYMINUTE":
                  f.minutes = e(o, { start: 0, end: 59 });
                  h = !0;
                  break;
                case "BYHOUR":
                  f.hours = e(o, { start: 0, end: 23 });
                  h = !0;
                  break;
                case "BYMONTHDAY":
                  f.monthDays = e(o, { start: -31, end: 31 });
                  h = !0;
                  break;
                case "BYYEARDAY":
                  f.yearDays = e(o, { start: -366, end: 366 });
                  h = !0;
                  break;
                case "BYMONTH":
                  f.months = e(o, { start: 1, end: 12 });
                  h = !0;
                  break;
                case "BYDAY":
                  f.weekDays = w = yi(o);
                  h = !0;
                  break;
                case "BYWEEKNO":
                  f.weeks = e(o, { start: -53, end: 53 });
                  h = !0;
                  break;
                case "BYSETPOS":
                  f.positions = e(o, { start: -366, end: 366 });
                  break;
                case "WKST":
                  f.weekStart = v = oi[o[0]];
              }
            return f.freq === t || (f.count !== t && f.until)
              ? null
              : (f.interval || (f.interval = 1),
                v === t && (f.weekStart = v = i.culture().calendar.firstDay),
                w && (f.weekDays = w.sort(k)),
                f.positions && !h && (f.positions = null),
                (f._hasRuleValue = h),
                f);
          }
          function ft(n, t) {
            for (
              var r, f = n.value, u = n.tzid || "", o = f.length, e = 0;
              e < o;
              e++
            )
              (r = f[e]),
                (r = st.convert(r, u || t || r.getTimezoneOffset(), "Etc/UTC")),
                (f[e] = i.toString(r, "yyyyMMddTHHmmssZ"));
            return u && (u = ";TZID=" + u), u + ":" + f.join(",") + " ";
          }
          function et(n, r) {
            var h = n.weekStart,
              u = "FREQ=" + n.freq.toUpperCase(),
              f = n.exdates || "",
              e = n.start || "",
              o = n.end || "",
              s = n.until;
            return (
              n.interval > 1 && (u += ";INTERVAL=" + n.interval),
              n.count && (u += ";COUNT=" + n.count),
              s &&
                ((s = st.convert(s, r || s.getTimezoneOffset(), "Etc/UTC")),
                (u += ";UNTIL=" + i.toString(s, "yyyyMMddTHHmmssZ"))),
              n.months && (u += ";BYMONTH=" + n.months),
              n.weeks && (u += ";BYWEEKNO=" + n.weeks),
              n.yearDays && (u += ";BYYEARDAY=" + n.yearDays),
              n.monthDays && (u += ";BYMONTHDAY=" + n.monthDays),
              n.weekDays && (u += ";BYDAY=" + pi(n.weekDays)),
              n.hours && (u += ";BYHOUR=" + n.hours),
              n.minutes && (u += ";BYMINUTE=" + n.minutes),
              n.seconds && (u += ";BYSECOND=" + n.seconds),
              n.positions && (u += ";BYSETPOS=" + n.positions),
              h !== t && (u += ";WKST=" + ei[h]),
              e && (e = "DTSTART" + ft(e, r)),
              o && (o = "DTEND" + ft(o, r)),
              f && (f = "EXDATE" + ft(f, r)),
              (e || o || f) && (u = e + o + f + "RRULE:" + u),
              u
            );
          }
          var ot,
            wt,
            bt,
            kt,
            dt,
            gt,
            a,
            ni,
            ti,
            ii,
            ri,
            g,
            ui,
            i = window.kendo,
            st = i.timezone,
            tr = i.Class,
            nt = i.ui,
            fi = nt.Widget,
            w = nt.DropDownList,
            u = i.date,
            ir = u.setTime,
            v = u.setDayOfWeek,
            r = u.adjustDST,
            rr = u.firstDayOfMonth,
            b = u.getMilliseconds,
            ur = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366],
            fr = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365],
            er = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
            ei = {
              0: "SU",
              1: "MO",
              2: "TU",
              3: "WE",
              4: "TH",
              5: "FR",
              6: "SA",
            },
            oi = { SU: 0, MO: 1, TU: 2, WE: 3, TH: 4, FR: 5, SA: 6 },
            or = [
              "yyyy-MM-ddTHH:mm:ss.fffzzz",
              "yyyy-MM-ddTHH:mm:sszzz",
              "yyyy-MM-ddTHH:mm:ss",
              "yyyy-MM-ddTHH:mm",
              "yyyy-MM-ddTHH",
              "yyyy-MM-dd",
              "yyyyMMddTHHmmssfffzzz",
              "yyyyMMddTHHmmsszzz",
              "yyyyMMddTHHmmss",
              "yyyyMMddTHHmm",
              "yyyyMMddTHH",
              "yyyyMMdd",
            ],
            si = [
              "months",
              "weeks",
              "yearDays",
              "monthDays",
              "weekDays",
              "hours",
              "minutes",
              "seconds",
            ],
            hi = si.length,
            sr = "yyyyMMddTHHmmssZ",
            hr = {
              months: function (n, t, i) {
                var u = i.months,
                  r = l(u, n.getMonth() + 1),
                  f = !1;
                return (
                  null !== r &&
                    (r.length
                      ? n.setMonth(r[0] - 1, 1)
                      : n.setFullYear(n.getFullYear() + 1, u[0] - 1, 1),
                    (f = !0)),
                  f
                );
              },
              monthDays: function (n, t, i) {
                for (
                  var o,
                    u,
                    f,
                    e = !1,
                    s = n.getHours(),
                    h = function (n) {
                      return n < 0 && (n = o + n + 1), n;
                    };
                  n <= t;

                ) {
                  if (
                    ((u = n.getMonth()),
                    (o = wi(n)),
                    (f = l(i.monthDays, n.getDate(), h)),
                    null === f)
                  )
                    return e;
                  if (((e = !0), f.length)) {
                    if (
                      (n.setMonth(u, f.sort(k)[0]), r(n, s), u === n.getMonth())
                    )
                      break;
                  } else n.setMonth(u + 1, 1);
                }
                return e;
              },
              yearDays: function (n, t, i) {
                for (
                  var u,
                    f,
                    e = !1,
                    o = n.getHours(),
                    s = function (n) {
                      return n < 0 && (n = u + n), n;
                    };
                  n < t;

                ) {
                  if (
                    ((u = vt(n) ? 366 : 365),
                    (f = l(i.yearDays, ht(n), s)),
                    null === f)
                  )
                    return e;
                  if (((e = !0), (u = n.getFullYear()), f.length)) {
                    n.setFullYear(u, 0, f.sort(k)[0]);
                    r(n, o);
                    break;
                  }
                  n.setFullYear(u + 1, 0, 1);
                }
                return e;
              },
              weeks: function (n, t, i) {
                for (
                  var f,
                    u,
                    o,
                    s = i.weekStart,
                    e = !1,
                    h = n.getHours(),
                    c = function (n) {
                      return n < 0 && (n = 53 + n), n;
                    };
                  n < t;

                ) {
                  if (((u = l(i.weeks, ct(n, s), c)), null === u)) return e;
                  if (((e = !0), (f = n.getFullYear()), u.length)) {
                    o = 7 * u.sort(k)[0] - 1;
                    n.setFullYear(f, 0, o);
                    v(n, s, -1);
                    r(n, h);
                    break;
                  }
                  n.setFullYear(f + 1, 0, 1);
                }
                return e;
              },
              weekDays: function (n, t, i) {
                var u,
                  e,
                  o = i.weekDays,
                  f = i.weekStart,
                  s = vi(o, n, f),
                  c = n.getHours();
                if (null === s) return !1;
                if (
                  ((u = s[0]),
                  u || ((u = o[0]), v(n, f)),
                  (e = u.day),
                  u.offset)
                )
                  for (; n <= t && !ai(n, u, f); )
                    h(n, f) === at(n, f)
                      ? (n.setMonth(n.getMonth() + 1, 1), r(n, c))
                      : (n.setDate(n.getDate() + 7), r(n, c), v(n, f, -1));
                return n.getDay() !== e && v(n, e), !0;
              },
              hours: function (n, t, i) {
                var e = i.hours,
                  o = i._startTime,
                  f = o.getHours(),
                  u = l(e, f),
                  s = !1;
                return (
                  null !== u &&
                    ((s = !0),
                    n.setHours(f),
                    r(n, f),
                    u.length
                      ? ((u = u[0]), n.setHours(u))
                      : ((u = n.getHours()),
                        n.setDate(n.getDate() + 1),
                        r(n, u),
                        (u = e[0]),
                        n.setHours(u),
                        r(n, u)),
                    i.minutes && n.setMinutes(0),
                    o.setHours(u, n.getMinutes())),
                  s
                );
              },
              minutes: function (n, t, i) {
                var e = i.minutes,
                  s = n.getMinutes(),
                  u = l(e, s),
                  f = i._startTime.getHours(),
                  o = !1;
                return (
                  null !== u &&
                    ((o = !0),
                    u.length ? (u = u[0]) : ((f += 1), (u = e[0])),
                    i.seconds && n.setSeconds(0),
                    n.setHours(f, u),
                    (f %= 24),
                    r(n, f),
                    i._startTime.setHours(f, u, n.getSeconds())),
                  o
                );
              },
              seconds: function (n, t, i) {
                var e = i.seconds,
                  u = i._startTime.getHours(),
                  f = l(e, n.getSeconds()),
                  r = n.getMinutes(),
                  o = !1;
                return (
                  null !== f &&
                    ((o = !0),
                    f.length
                      ? n.setSeconds(f[0])
                      : ((r += 1),
                        n.setMinutes(r, e[0]),
                        r > 59 && ((r %= 60), (u = (u + 1) % 24))),
                    i._startTime.setHours(u, r, n.getSeconds())),
                  o
                );
              },
            },
            s = tr.extend({
              next: function (n, t) {
                var r,
                  u,
                  i = t._startTime,
                  f = i.getDate();
                if (t.seconds)
                  (u = n.getSeconds() + 1),
                    n.setSeconds(u),
                    i.setSeconds(u),
                    i.setDate(f);
                else {
                  if (!t.minutes) return !1;
                  r = n.getMinutes() + 1;
                  n.setMinutes(r);
                  i.setMinutes(r);
                  i.setDate(f);
                }
                return !0;
              },
              normalize: function (n) {
                var t = n.rule;
                4 === n.idx &&
                  t.hours &&
                  (t._startTime.setHours(0), this._hour(n.date, t));
              },
              limit: function (n, i, r) {
                for (var e, o, f, u, s, h = r.interval; n <= i; ) {
                  for (f = o = t, s = n.getDate(), u = 0; u < hi; u++) {
                    if (((e = si[u]), r[e])) {
                      if (((f = hr[e](n, i, r)), o !== t && f)) break;
                      o = f;
                    }
                    f && this.normalize({ date: n, rule: r, day: s, idx: u });
                  }
                  if ((1 === h || !this.interval(r, n)) && u === hi) break;
                }
              },
              interval: function (n, t) {
                var f,
                  y,
                  w,
                  b,
                  o = new Date(n._startPeriod),
                  e = new Date(t),
                  h = t.getHours(),
                  k = n.weekStart,
                  l = n.interval,
                  a = n.freq,
                  s = !1,
                  i = 0,
                  d = 0,
                  v = 1;
                return (
                  "hourly" === a
                    ? ((f = e.getTimezoneOffset() - o.getTimezoneOffset()),
                      (y = n._startTime.getHours()),
                      (e = e.getTime()),
                      h !== y && (e += (y - h) * u.MS_PER_HOUR),
                      (e -= o),
                      f && (e -= f * u.MS_PER_MINUTE),
                      (f = Math.floor(e / u.MS_PER_HOUR)),
                      (i = p(f, l)),
                      0 !== i && (this._hour(t, n, i), (s = !0)))
                    : "daily" === a
                    ? (u.setTime(e, -o, !0),
                      (f = Math.round(e / u.MS_PER_DAY)),
                      (i = p(f, l)),
                      0 !== i && (this._date(t, n, i), (s = !0)))
                    : "weekly" === a
                    ? ((i = this._getNumberOfWeeksBetweenDates(o, t)),
                      (w = c(t.getDay(), k)),
                      (b = c(o.getDay(), k)),
                      w < b && (i += 1),
                      (i = p(i, l)),
                      0 !== i &&
                        (u.setDayOfWeek(t, n.weekStart, -1),
                        t.setDate(t.getDate() + 7 * i),
                        r(t, h),
                        (s = !0)))
                    : "monthly" === a
                    ? ((f = t.getFullYear() - o.getFullYear()),
                      (f = t.getMonth() - o.getMonth() + 12 * f),
                      (i = p(f, l)),
                      0 !== i &&
                        ((v = n._hasRuleValue ? 1 : t.getDate()),
                        t.setFullYear(t.getFullYear(), t.getMonth() + i, v),
                        r(t, h),
                        (s = !0)))
                    : "yearly" === a &&
                      ((f = t.getFullYear() - o.getFullYear()),
                      (i = p(f, l)),
                      n.months || (d = t.getMonth()),
                      n.yearDays ||
                        n.monthDays ||
                        n.weekDays ||
                        (v = t.getDate()),
                      0 !== i &&
                        (t.setFullYear(t.getFullYear() + i, d, v),
                        r(t, h),
                        (s = !0))),
                  s
                );
              },
              _getNumberOfWeeksBetweenDates: function (n, t) {
                var i = (t - n) / 6048e5,
                  r = Math.floor(i);
                return i - r > 0.99 && (r = Math.round(i)), r;
              },
              _hour: function (n, t, i) {
                var f = t._startTime,
                  u = f.getHours();
                i && (u += i);
                n.setHours(u);
                u %= 24;
                f.setHours(u);
                r(n, u);
              },
              _date: function (n, t, i) {
                var u = n.getHours();
                n.setDate(n.getDate() + i);
                r(n, u) || this._hour(n, t);
              },
            }),
            cr = s.extend({
              next: function (n, t) {
                s.fn.next(n, t) || this._hour(n, t, 1);
              },
              normalize: function (n) {
                var t = n.rule;
                4 === n.idx &&
                  (t._startTime.setHours(0), this._hour(n.date, t));
              },
            }),
            ci = s.extend({
              next: function (n, t) {
                s.fn.next(n, t) || this[t.hours ? "_hour" : "_date"](n, t, 1);
              },
            }),
            lr = ci.extend({
              setup: function (n, t) {
                n.weekDays || (n.weekDays = [{ day: t.getDay(), offset: 0 }]);
              },
            }),
            li = s.extend({
              next: function (n, t) {
                var i, u;
                if (!s.fn.next(n, t))
                  if (t.hours) this._hour(n, t, 1);
                  else if (t.monthDays || t.weekDays || t.yearDays || t.weeks)
                    this._date(n, t, 1);
                  else {
                    for (
                      i = n.getDate(),
                        u = n.getHours(),
                        n.setMonth(n.getMonth() + 1),
                        r(n, u);
                      n.getDate() !== i;

                    )
                      n.setDate(i), r(n, u);
                    this._hour(n, t);
                  }
              },
              normalize: function (n) {
                var i = n.rule,
                  t = n.date,
                  u = t.getHours();
                0 !== n.idx || i.monthDays || i.weekDays
                  ? s.fn.normalize(n)
                  : (t.setDate(n.day), r(t, u));
              },
              setup: function (n, t, i) {
                n.monthDays || n.weekDays || i.setDate(t.getDate());
              },
            }),
            ar = li.extend({
              next: function (n, t) {
                var i,
                  u = n.getHours();
                if (!s.fn.next(n, t))
                  if (t.hours) this._hour(n, t, 1);
                  else if (t.monthDays || t.weekDays || t.yearDays || t.weeks)
                    this._date(n, t, 1);
                  else if (t.months) {
                    for (
                      i = n.getDate(), n.setMonth(n.getMonth() + 1), r(n, u);
                      n.getDate() !== i;

                    )
                      n.setDate(i), r(n, u);
                    this._hour(n, t);
                  } else
                    n.setFullYear(n.getFullYear() + 1),
                      r(n, u),
                      this._hour(n, t);
              },
              setup: function () {},
            }),
            vr = {
              hourly: new cr(),
              daily: new ci(),
              weekly: new lr(),
              monthly: new li(),
              yearly: new ar(),
            },
            f = "click",
            y = "change";
          i.recurrence = {
            rule: { parse: d, serialize: et },
            expand: gi,
            dayInYear: ht,
            weekInYear: ct,
            weekInMonth: h,
            numberOfWeeks: at,
            isException: tt,
            toExceptionString: pt,
          };
          ot = function (n) {
            for (
              var r = i.culture().calendar.days.namesShort,
                f = r.length,
                e = "",
                t = 0,
                u = [];
              t < f;
              t++
            )
              u.push(t);
            for (
              r = r.slice(n).concat(r.slice(0, n)),
                u = u.slice(n).concat(u.slice(0, n)),
                t = 0;
              t < f;
              t++
            )
              e +=
                '<label class="k-check"><input class="k-recur-weekday-checkbox" type="checkbox" value="' +
                u[t] +
                '" /> ' +
                r[t] +
                "</label>";
            return e;
          };
          wt = function (n) {
            for (
              var r = i.culture().calendar.days.names,
                e = r.length,
                u = "",
                t = 0,
                f = [];
              t < e;
              t++
            )
              f.push(t);
            for (
              r = r.slice(n).concat(r.slice(0, n)),
                f = f.slice(n).concat(f.slice(0, n)),
                t = 0;
              t < e;
              t++
            )
              (u += '<li class="k-item"><label class="k-label">'),
                (u += '<span class="k-item-title">' + r[t] + "</span>"),
                (u +=
                  '<input class="k-recur-weekday-checkbox k-check" type="checkbox" value="' +
                  f[t] +
                  '" />'),
                (u += "</label></li>");
            return u;
          };
          bt = i.template(
            '# if (frequency !== "never") { #<div class="k-edit-label"><label>#:messages.repeatEvery#</label></div><div class="k-edit-field"><input class="k-recur-interval" title="#:messages.interval#"/>#:messages.interval#</div># } ## if (frequency === "weekly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field">#=weekDayCheckBoxes(firstWeekDay)#</div># } else if (frequency === "monthly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field"><ul class="k-reset"><li><label><input class="k-recur-month-radio" type="radio" name="month" value="monthday" title="#:messages.day#" />#:messages.day#</label><input class="k-recur-monthday" title="#:messages.day#" /></li><li><input class="k-recur-month-radio" type="radio" name="month" value="weekday" title="#:messages.repeatOn#" /><input class="k-recur-weekday-offset" title="#:messages.repeatOn#" /><input class="k-recur-weekday" title="#:messages.day#" /></li></ul></div># } else if (frequency === "yearly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field"><ul class="k-reset"><li><input class="k-recur-year-radio" type="radio" name="year" value="monthday" title="#:messages.repeatOn#" /><input class="k-recur-month" title="#:messages.repeatOn#" /><input class="k-recur-monthday" title="#:messages.day#" /></li><li><input class="k-recur-year-radio" type="radio" name="year" value="weekday" title="#:messages.repeatOn#" /><input class="k-recur-weekday-offset" title="#:messages.repeatOn#" /><input class="k-recur-weekday" title="#:messages.day#"  />#:messages.of#<input class="k-recur-month" title="#:messages.of#"/></li></ul></div># } ## if (frequency !== "never") { #<div class="k-edit-label"><label>#:end.label#</label></div><div class="k-edit-field"><ul class="k-reset"><li><label><input class="k-recur-end-never" type="radio" name="end" value="never" />#:end.never#</label></li><li><label><input class="k-recur-end-count" type="radio" name="end" value="count" />#:end.after#</label><input class="k-recur-count" title="#:end.occurrence#" />#:end.occurrence#</li><li><label><input class="k-recur-end-until" type="radio" name="end" value="until" />#:end.on#</label><input class="k-recur-until" title="#:end.on#" /></li></ul></div># } #'
          );
          kt = [
            { day: 0, offset: 0 },
            { day: 1, offset: 0 },
            { day: 2, offset: 0 },
            { day: 3, offset: 0 },
            { day: 4, offset: 0 },
            { day: 5, offset: 0 },
            { day: 6, offset: 0 },
          ];
          dt = [
            { day: 1, offset: 0 },
            { day: 2, offset: 0 },
            { day: 3, offset: 0 },
            { day: 4, offset: 0 },
            { day: 5, offset: 0 },
          ];
          gt = [
            { day: 0, offset: 0 },
            { day: 6, offset: 0 },
          ];
          a = fi.extend({
            init: function (n, t) {
              var f,
                r = this,
                e = t && t.frequencies;
              fi.fn.init.call(r, n, t);
              r.wrapper = r.element;
              t = r.options;
              t.start = f = t.start || u.today();
              e && (t.frequencies = e);
              "string" == typeof f &&
                (t.start = i.parseDate(f, "yyyyMMddTHHmmss"));
              null === t.firstWeekDay &&
                (t.firstWeekDay = i.culture().calendar.firstDay);
              r._namespace = "." + t.name;
            },
            options: {
              value: "",
              start: "",
              timezone: "",
              spinners: !0,
              firstWeekDay: null,
              frequencies: ["never", "daily", "weekly", "monthly", "yearly"],
              mobile: !1,
              messages: {
                recurrenceEditorTitle: "Recurrence editor",
                frequencies: {
                  never: "Never",
                  hourly: "Hourly",
                  daily: "Daily",
                  weekly: "Weekly",
                  monthly: "Monthly",
                  yearly: "Yearly",
                },
                hourly: { repeatEvery: "Repeat every: ", interval: " hour(s)" },
                daily: { repeatEvery: "Repeat every: ", interval: " day(s)" },
                weekly: {
                  interval: " week(s)",
                  repeatEvery: "Repeat every: ",
                  repeatOn: "Repeat on: ",
                },
                monthly: {
                  repeatEvery: "Repeat every: ",
                  repeatOn: "Repeat on: ",
                  interval: " month(s)",
                  day: "Day ",
                },
                yearly: {
                  repeatEvery: "Repeat every: ",
                  repeatOn: "Repeat on: ",
                  interval: " year(s)",
                  of: " of ",
                },
                end: {
                  label: "End:",
                  mobileLabel: "Ends",
                  never: "Never",
                  after: "After ",
                  occurrence: " occurrence(s)",
                  on: "On ",
                },
                offsetPositions: {
                  first: "first",
                  second: "second",
                  third: "third",
                  fourth: "fourth",
                  last: "last",
                },
                weekdays: {
                  day: "day",
                  weekday: "weekday",
                  weekend: "weekend day",
                },
              },
            },
            events: ["change"],
            _initInterval: function () {
              var n = this,
                t = n._value;
              n._container.find(".k-recur-interval").kendoNumericTextBox({
                spinners: n.options.spinners,
                value: t.interval || 1,
                decimals: 0,
                format: "#",
                min: 1,
                change: function () {
                  t.interval = this.value();
                  n._trigger();
                },
              });
            },
            _weekDayRule: function (n) {
              var t = this,
                r = (t._weekDay.element || t._weekDay).val(),
                u = +(t._weekDayOffset.element || t._weekDayOffset).val(),
                i = null,
                f = null;
              n ||
                ("day" === r
                  ? ((i = kt), (f = u))
                  : "weekday" === r
                  ? ((i = dt), (f = u))
                  : "weekend" === r
                  ? ((i = gt), (f = u))
                  : (i = [{ offset: u, day: +r }]));
              t._value.weekDays = i;
              t._value.positions = f;
            },
            _weekDayView: function () {
              var i,
                n,
                r,
                e,
                u = this,
                t = u._value.weekDays,
                f = u._value.positions,
                o = u._weekDayOffset;
              t &&
                ((r = t.length),
                f &&
                  (7 === r
                    ? ((n = "day"), (i = f))
                    : 5 === r
                    ? ((n = "weekday"), (i = f))
                    : 2 === r && ((n = "weekend"), (i = f))),
                n || ((t = t[0]), (n = t.day), (i = t.offset || "")),
                (e = o.value ? "value" : "val"),
                o[e](i),
                u._weekDay[e](n));
            },
            _initWeekDay: function () {
              var f,
                t = this,
                u = t.options.messages.weekdays,
                r = t.options.messages.offsetPositions,
                e = t._container.find(".k-recur-weekday"),
                o = function () {
                  t._weekDayRule();
                  t._trigger();
                };
              e[0] &&
                ((t._weekDayOffset = new w(
                  t._container.find(".k-recur-weekday-offset"),
                  {
                    change: o,
                    dataTextField: "text",
                    dataValueField: "value",
                    dataSource: [
                      { text: r.first, value: "1" },
                      { text: r.second, value: "2" },
                      { text: r.third, value: "3" },
                      { text: r.fourth, value: "4" },
                      { text: r.last, value: "-1" },
                    ],
                  }
                )),
                (f = [
                  { text: u.day, value: "day" },
                  { text: u.weekday, value: "weekday" },
                  { text: u.weekend, value: "weekend" },
                ]),
                (t._weekDay = new w(e, {
                  value: t.options.start.getDay(),
                  change: o,
                  dataTextField: "text",
                  dataValueField: "value",
                  dataSource: f.concat(
                    n.map(i.culture().calendar.days.names, function (n, t) {
                      return { text: n, value: t };
                    })
                  ),
                })),
                t._weekDayView());
            },
            _initWeekDays: function () {
              var r,
                o,
                u,
                s,
                h,
                t = this,
                e = t._value,
                i = t._container.find(".k-recur-weekday-checkbox");
              if (
                i[0] &&
                (i.on(f + t._namespace, function () {
                  e.weekDays = n.map(i.filter(":checked"), function (n) {
                    return { day: +n.value, offset: 0 };
                  });
                  t.options.mobile || t._trigger();
                }),
                e.weekDays)
              )
                for (u = 0, s = i.length, h = e.weekDays.length; u < s; u++)
                  for (o = i[u], r = 0; r < h; r++)
                    o.value == e.weekDays[r].day && (o.checked = !0);
            },
            _initMonthDay: function () {
              var n = this,
                t = n._value,
                r = n._container.find(".k-recur-monthday");
              r[0] &&
                (n._monthDay = new i.ui.NumericTextBox(r, {
                  spinners: n.options.spinners,
                  min: 1,
                  max: 31,
                  decimals: 0,
                  format: "#",
                  value: t.monthDays
                    ? t.monthDays[0]
                    : n.options.start.getDate(),
                  change: function () {
                    var i = this.value();
                    t.monthDays = i ? [i] : i;
                    n._trigger();
                  },
                }));
            },
            _initCount: function () {
              var n = this,
                i = n._container.find(".k-recur-count"),
                t = n._value;
              n._count = i
                .kendoNumericTextBox({
                  spinners: n.options.spinners,
                  value: t.count || 1,
                  decimals: 0,
                  format: "#",
                  min: 1,
                  change: function () {
                    t.count = this.value();
                    n._trigger();
                  },
                })
                .data("kendoNumericTextBox");
            },
            _initUntil: function () {
              var n = this,
                u = n._container.find(".k-recur-until"),
                t = n.options.start,
                r = n._value,
                i = r.until;
              n._until = u
                .kendoDatePicker({
                  min: i && i < t ? i : t,
                  value:
                    i ||
                    new Date(
                      t.getFullYear(),
                      t.getMonth(),
                      t.getDate(),
                      23,
                      59,
                      59
                    ),
                  change: function () {
                    var t = this.value();
                    r.until = new Date(
                      t.getFullYear(),
                      t.getMonth(),
                      t.getDate(),
                      23,
                      59,
                      59
                    );
                    n._trigger();
                  },
                })
                .data("kendoDatePicker");
            },
            _trigger: function () {
              this.options.mobile || this.trigger("change");
            },
          });
          ni = a.extend({
            init: function (n, t) {
              var i = this;
              a.fn.init.call(i, n, t);
              i._initFrequency();
              i._initContainer();
              i.value(i.options.value);
            },
            options: { name: "RecurrenceEditor" },
            events: ["change"],
            destroy: function () {
              var n = this;
              n._frequency.destroy();
              n._container
                .find("input[type=radio],input[type=checkbox]")
                .off(f + n._namespace);
              i.destroy(n._container);
              a.fn.destroy.call(n);
            },
            value: function (n) {
              var r,
                i = this,
                u = i.options.timezone;
              return n === t
                ? i._value.freq
                  ? et(i._value, u)
                  : ""
                : ((i._value = d(n, u) || {}),
                  (r = i._value.freq),
                  r ? i._frequency.value(r) : i._frequency.select(0),
                  i._initView(i._frequency.value()),
                  t);
            },
            _initContainer: function () {
              var i = this.element,
                t = n('<div class="k-recur-view" />'),
                r = i.parent(".k-edit-field");
              r[0] ? t.insertAfter(r) : i.append(t);
              this._container = t;
            },
            _initFrequency: function () {
              var i,
                t = this,
                u = t.options,
                r = u.frequencies,
                e = u.messages.frequencies,
                f = n("<input />").attr({
                  title: u.messages.recurrenceEditorTitle,
                });
              r = n.map(r, function (n) {
                return { text: e[n], value: n };
              });
              i = r[0];
              i && "never" === i.value && (i.value = "");
              t.element.append(f);
              t._frequency = new w(f, {
                dataTextField: "text",
                dataValueField: "value",
                dataSource: r,
                change: function () {
                  t._value = {};
                  t._initView(t._frequency.value());
                  t.trigger("change");
                },
              });
            },
            _initView: function (n) {
              var r = this,
                f = r._value,
                u = r.options,
                e = {
                  frequency: n || "never",
                  weekDayCheckBoxes: ot,
                  firstWeekDay: u.firstWeekDay,
                  messages: u.messages[n],
                  end: u.messages.end,
                };
              return (
                i.destroy(r._container),
                r._container.html(bt(e)),
                n
                  ? ((f.freq = n),
                    "weekly" !== n ||
                      f.weekDays ||
                      (f.weekDays = [{ day: u.start.getDay(), offset: 0 }]),
                    r._initInterval(),
                    r._initWeekDays(),
                    r._initMonthDay(),
                    r._initWeekDay(),
                    r._initMonth(),
                    r._initCount(),
                    r._initUntil(),
                    r._period(),
                    r._end(),
                    t)
                  : ((r._value = {}), t)
              );
            },
            _initMonth: function () {
              var u,
                t = this,
                e = t._value,
                r = e.months || [t.options.start.getMonth() + 1],
                f = t._container.find(".k-recur-month");
              f[0] &&
                ((u = {
                  change: function () {
                    e.months = [+this.value()];
                    t.trigger("change");
                  },
                  dataTextField: "text",
                  dataValueField: "value",
                  dataSource: n.map(
                    i.culture().calendar.months.names,
                    function (n, t) {
                      return { text: n, value: t + 1 };
                    }
                  ),
                }),
                (t._month1 = new w(f[0], u)),
                (t._month2 = new w(f[1], u)),
                r && ((r = r[0]), t._month1.value(r), t._month2.value(r)));
            },
            _end: function () {
              var t,
                n = this,
                e = n._value,
                i = n._container,
                r = n._namespace,
                u = function (t) {
                  n._toggleEnd(t.currentTarget.value);
                  n.trigger("change");
                };
              n._buttonNever = i.find(".k-recur-end-never").on(f + r, u);
              n._buttonCount = i.find(".k-recur-end-count").on(f + r, u);
              n._buttonUntil = i.find(".k-recur-end-until").on(f + r, u);
              e.count ? (t = "count") : e.until && (t = "until");
              n._toggleEnd(t);
            },
            _period: function () {
              var n = this,
                t = n._value,
                i = "monthly" === t.freq,
                u = i ? n._toggleMonthDay : n._toggleYear,
                e = ".k-recur-" + (i ? "month" : "year") + "-radio",
                r = n._container.find(e);
              (i || "yearly" === t.freq) &&
                (r.on(f + n._namespace, function (t) {
                  u.call(n, t.currentTarget.value);
                  n.trigger("change");
                }),
                (n._buttonMonthDay = r.eq(0)),
                (n._buttonWeekDay = r.eq(1)),
                u.call(n, t.weekDays ? "weekday" : "monthday"));
            },
            _toggleEnd: function (n) {
              var i,
                r,
                u,
                f,
                t = this;
              "count" === n
                ? (t._buttonCount.prop("checked", !0),
                  (u = !0),
                  (f = !1),
                  (i = t._count.value()),
                  (r = null))
                : "until" === n
                ? (t._buttonUntil.prop("checked", !0),
                  (u = !1),
                  (f = !0),
                  (i = null),
                  (r = t._until.value()))
                : (t._buttonNever.prop("checked", !0),
                  (u = f = !1),
                  (i = r = null));
              t._count && t._count.enable(u);
              t._until && t._until.enable(f);
              t._value.count = i;
              t._value.until = r;
            },
            _toggleMonthDay: function (n) {
              var i,
                t = this,
                u = !1,
                r = !0,
                f = !1;
              "monthday" === n
                ? (t._buttonMonthDay.prop("checked", !0),
                  (i = [t._monthDay.value()]),
                  (u = !0),
                  (r = !1),
                  (f = !0))
                : (t._buttonWeekDay.prop("checked", !0), (i = null));
              t._weekDay.enable(r);
              t._weekDayOffset.enable(r);
              t._monthDay.enable(u);
              t._value.monthDays = i;
              t._weekDayRule(f);
            },
            _toggleYear: function (n) {
              var i,
                t = this,
                r = !1,
                u = !0;
              "monthday" === n
                ? ((r = !0), (u = !1), (i = t._month1.value()))
                : (i = t._month2.value());
              t._month1.enable(r);
              t._month2.enable(u);
              t._value.months = [i];
              t._toggleMonthDay(n);
            },
          });
          nt.plugin(ni);
          ti = i.template(
            '<div data-role="content"><ul><li class="k-item"><label class="k-label"><span class="k-item-title">#:headerTitle#</span><div class="k-recur-pattern"></div></label></li><li class="k-item k-recur-view"></li></ul></div>'
          );
          ii = i.template(
            '# if (frequency !== "never") { #<label class="k-label"><span class="k-item-title">#:messages.repeatEvery#</span><div class="k-recur-editor-wrap"><input class="k-recur-interval" type="number" pattern="\\\\d*"/># if (messages.interval.length) { #<label class="k-recur-editor-text">#:messages.interval#</label># } #</div></label># } ## if (frequency === "weekly") { #<ul class="k-recur-items-wrap"><li class="k-item k-no-click"><label class="k-label"><span class="k-item-title">#:messages.repeatOn#</span></label></li>#=weekDayCheckBoxes(firstWeekDay)#</ul># } else if (frequency === "monthly") { #<ul class="k-recur-items-wrap"><li class="k-item"><label class="k-label"><span class="k-item-title">#:messages.repeatBy#</span><div class="k-repeat-rule"></div></label></li><li class="k-monthday-view k-item" style="display:none"><label class="k-label"><span class="k-item-title">#:messages.day#</span><div><input class="k-recur-monthday" type="number" title="#:messages.day#" pattern="\\\\d*"/></div></label></li><li class="k-weekday-view k-item" style="display:none"><ul class="k-recur-items-wrap"><li class="k-item"><label class="k-label"><span class="k-item-title">#:messages.every#</span><div><select class="k-recur-weekday-offset" title="#:messages.every#"></select></div></label></li><li class="k-item"><label class="k-label"><span class="k-item-title">#:messages.day#</span><div><select class="k-recur-weekday" title="#:messages.day#"></select></div></label></li></ul></li></ul># } else if (frequency === "yearly") { #<ul class="k-recur-items-wrap"><li class="k-item"><label class="k-label"><span class="k-item-title">#:messages.repeatBy#</span><div class="k-repeat-rule"></div></label></li><li class="k-monthday-view k-item" style="display:none"><label class="k-label"><span class="k-item-title">#:messages.day#</span><div><input class="k-recur-monthday" type="number" title="#:messages.day#" pattern="\\\\d*"/></div></label></li><li class="k-weekday-view k-item" style="display:none"><ul class="k-recur-items-wrap"><li class="k-item"><label class="k-label"><span class="k-item-title">#:messages.every#</span><div><select class="k-recur-weekday-offset" title="#:messages.every#"></select></div></label></li><li class="k-item"><label class="k-label"><span class="k-item-title">#:messages.day#</span><div><select class="k-recur-weekday" title="#:messages.day#"></select></div></label></li></ul></li><li class="k-item"><label class="k-label"><span class="k-item-title">#:messages.month#</span><div><select class="k-recur-month" title="#:messages.month#"></select></div></label></li></ul># } #'
          );
          ri = i.template(
            '# if (endPattern === "count") { #<label class="k-label"><span class="k-item-title">#:messages.after#</span><div><input class="k-recur-count" type="number" pattern="\\\\d*" /></div></label># } else if (endPattern === "until") { #<label class="k-label"><span class="k-item-title">#:messages.on#</span><div><input type="date" class="k-recur-until" /></div></label># } #'
          );
          g = i.template(
            '<select class="k-scheduler-select">#for (var i = 0, length = dataSource.length; i < length; i++) {#<option value="#=dataSource[i].value#" #= value === dataSource[i].value  ? "selected" : "" #>#:dataSource[i].text#</option>#}#</select>'
          );
          ui = a.extend({
            init: function (n, t) {
              var r = this;
              a.fn.init.call(r, n, t);
              t = r.options;
              r._optionTemplate = i.template(
                '<option value="#:value#">#:text#</option>'
              );
              r.value(t.value);
              r._pane = t.pane;
              r._initRepeatButton();
              r._initParentRepeatEnd();
              r._defaultValue = r._value;
            },
            options: {
              name: "MobileRecurrenceEditor",
              animations: { left: "slide", right: "slide:right" },
              mobile: !0,
              messages: {
                cancel: "Cancel",
                update: "Save",
                endTitle: "Repeat ends",
                repeatTitle: "Repeat pattern",
                headerTitle: "Repeat event",
                end: {
                  patterns: { never: "Never", after: "After...", on: "On..." },
                  never: "Never",
                  after: "End repeat after",
                  on: "End repeat on",
                },
                daily: { interval: "" },
                hourly: { interval: "" },
                weekly: { interval: "" },
                monthly: {
                  interval: "",
                  repeatBy: "Repeat by: ",
                  dayOfMonth: "Day of the month",
                  dayOfWeek: "Day of the week",
                  repeatEvery: "Repeat every",
                  every: "Every",
                  day: "Day ",
                },
                yearly: {
                  interval: "",
                  repeatBy: "Repeat by: ",
                  dayOfMonth: "Day of the month",
                  dayOfWeek: "Day of the week",
                  repeatEvery: "Repeat every: ",
                  every: "Every",
                  month: "Month",
                  day: "Day",
                },
              },
            },
            events: ["change"],
            value: function (n) {
              var i = this,
                r = i.options.timezone;
              return n === t
                ? i._value.freq
                  ? et(i._value, r)
                  : ""
                : ((i._value = d(n, r) || {}), t);
            },
            destroy: function () {
              this._destroyView();
              i.destroy(this._endFields);
              this.element.off(f + this._namespace);
              a.fn.destroy.call(this);
            },
            _initInterval: function () {
              var n = this,
                t = n._value;
              n._container
                .find(".k-recur-interval")
                .val(n._value.interval || 1)
                .on(y + n._namespace, function (i) {
                  t.interval = i.target.value;
                  n._trigger();
                });
            },
            _initRepeatButton: function () {
              var t = this,
                i = t.options.messages.frequencies[this._value.freq || "never"];
              t._chevronButton = n(
                '<span class="k-icon k-i-arrow-chevron-right"></span>'
              );
              t._repeatValue = n('<span class="">' + i + "</span>");
              t.element.append(t._repeatValue).append(t._chevronButton);
              t.element.parents("li.k-item").on(f + t._namespace, function (n) {
                n.preventDefault();
                t._createView("repeat");
                t._pane.navigate(t._view, t.options.animations.left);
              });
            },
            _endLiItem: function () {
              var n = this;
              return (
                '<li class="k-item"><label class="k-label"><span class="k-item-title">' +
                n.options.messages.end.mobileLabel +
                "</span><label></li>"
              );
            },
            _initParentRepeatEnd: function () {
              var t = this,
                i = n(t._endLiItem()).insertAfter(
                  t.element.parents("li.k-item")
                ),
                r = n(
                  '<div class="k-scheduler-recur-end-wrap"><span class="k-scheduler-recur-end"></span></div>'
                ).appendTo(i.find(".k-label"));
              i.on(f + t._namespace, function (n) {
                n.preventDefault();
                t._navigateToView("repeat");
              });
              t._endParentLabelField = i.toggle(!!t._value.freq);
              t._endParentEndButton = r
                .find(".k-scheduler-recur-end")
                .text(t._endText());
            },
            _initRepeatEnd: function () {
              var t = this,
                i = n(t._endLiItem()).insertAfter(t._container),
                r = n(
                  '<div class="k-scheduler-recur-end-wrap"><span class="k-scheduler-recur-end"></span><span class="k-icon k-i-arrow-chevron-right"></span></div>'
                ).appendTo(i.find(".k-label"));
              i.on(f + t._namespace, function (n) {
                n.preventDefault();
                t._navigateToView("end");
              });
              t._endLabelField = i.toggleClass(
                "k-state-disabled",
                !t._value.freq
              );
              t._endButton = r
                .find(".k-scheduler-recur-end")
                .text(t._endText());
            },
            _navigateToView: function (n) {
              var t = this;
              t._createView(n);
              t._pane.navigate(t._view, t.options.animations.left);
            },
            _endText: function () {
              var n = this._value,
                t = this.options.messages.end,
                r = t.never;
              return (
                n.count
                  ? (r = i.format("{0} {1}", t.after, n.count))
                  : n.until && (r = i.format("{0} {1:d}", t.on, n.until)),
                r
              );
            },
            _initFrequency: function () {
              var t = this,
                r = t.options.messages.frequencies,
                u = g({
                  dataSource: n.map(this.options.frequencies, function (n) {
                    return { text: r[n], value: "never" !== n ? n : "" };
                  }),
                  value: t._value.freq || "",
                  ns: i.ns,
                });
              t._view.element.find(".k-recur-pattern").append(u);
              t._view.element
                .find(".k-scheduler-select")
                .on(y + t._namespace, function (n) {
                  var i = n.target.value;
                  t._value = { freq: i };
                  t._initRepeatView(!0);
                });
            },
            _initEndNavigation: function () {
              var f,
                n = this,
                r = n.options.messages.end.patterns,
                t = n._value,
                u = "";
              t.count ? (u = "count") : t.until && (u = "until");
              f = g({
                dataSource: [
                  { text: r.never, value: "" },
                  { text: r.after, value: "count" },
                  { text: r.on, value: "until" },
                ],
                value: u,
                ns: i.ns,
              });
              n._view.element.find(".k-recur-pattern").append(f);
              n._view.element
                .find(".k-scheduler-select")
                .on(y + n._namespace, function (r) {
                  var e = r.target.value,
                    u = null,
                    f = null;
                  n._initEndView(e);
                  n._count.length
                    ? ((u = n._count.val()), (f = null))
                    : n._until.length &&
                      ((u = null),
                      (f = n._until.val
                        ? i.parseDate(n._until.val(), "yyyy-MM-dd")
                        : n._until.value()));
                  t.count = u;
                  t.until = f;
                });
            },
            _createView: function (t) {
              var i = this,
                u = i.options,
                r = u.messages,
                e = r["repeat" === t ? "repeatTitle" : "endTitle"],
                o =
                  '<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list" id="recurrence"><div data-role="header" class="k-header"><a href="#" class="k-header-cancel k-scheduler-cancel k-link" title="' +
                  r.cancel +
                  '"aria-label="' +
                  r.cancel +
                  '"><span class="k-icon k-i-arrow-chevron-left"></span></a>' +
                  r.headerTitle +
                  '<a href="#" class="k-header-done k-scheduler-update k-link" title="' +
                  r.update +
                  '" aria-label="' +
                  r.update +
                  '"><span class="k-icon k-i-check"></span></a></div>',
                s = i._pane.view().id;
              i._view = i._pane.append(o + ti({ headerTitle: e }));
              i._view.element.on(
                f + i._namespace,
                "a.k-scheduler-cancel, a.k-scheduler-update",
                function (t) {
                  t.preventDefault();
                  t.stopPropagation();
                  n(this).hasClass("k-scheduler-update")
                    ? (i.trigger("change"),
                      (i._defaultValue = n.extend({}, i._value)))
                    : (i._value = i._defaultValue);
                  var u = i._value.freq;
                  i._endParentEndButton.text(i._endText());
                  i._endParentLabelField.toggle(!!u && "never" !== u);
                  i._endButton.text(i._endText());
                  i._repeatValue.text(r.frequencies[u || "never"]);
                  i._pane.one("viewShow", function () {
                    i._destroyView();
                  });
                  i._pane.navigate(s, i.options.animations.right);
                }
              );
              i._container = i._view.element.find(".k-recur-view");
              "repeat" === t
                ? (i._initFrequency(),
                  i._initRepeatView(!0),
                  i._initRepeatEnd())
                : (i._initEndNavigation(), i._initEndView());
            },
            _destroyView: function () {
              this._view &&
                (this._view.destroy(),
                this._view.element.remove(),
                (this._container = null));
              this._view = null;
            },
            _initRepeatView: function (n) {
              var r = this,
                u = r._value.freq || "never",
                s = {
                  frequency: u,
                  weekDayCheckBoxes: n ? wt : ot,
                  firstWeekDay: r.options.firstWeekDay,
                  messages: r.options.messages[u],
                },
                e = ii(s),
                f = (r._container =
                  r._container ||
                  this._pane.view().content.find("li.k-recur-view")),
                o = r._value;
              return (
                r._endLabelField &&
                  r._endLabelField.toggleClass(
                    "k-state-disabled",
                    "never" === u
                  ),
                i.destroy(f),
                f.html(e),
                e
                  ? (f.show(),
                    "weekly" !== u ||
                      o.weekDays ||
                      (o.weekDays = [
                        { day: r.options.start.getDay(), offset: 0 },
                      ]),
                    r._initInterval(),
                    r._initMonthDay(),
                    r._initWeekDays(),
                    r._initWeekDay(),
                    r._initMonth(),
                    r._period(),
                    t)
                  : ((r._value = {}), f.hide(), t)
              );
            },
            _initMonthDay: function () {
              var n = this,
                t = n._value,
                i = (n._monthDay = n._container.find(".k-recur-monthday"));
              i.attr({ min: 1, max: 31 })
                .val(t.monthDays ? t.monthDays[0] : n.options.start.getDate())
                .on(y + n._namespace, function (i) {
                  t.count = i.target.value;
                  n._trigger();
                });
            },
            _initCount: function () {
              var n = this,
                i = (n._count = n._container.find(".k-recur-count")),
                t = n._value;
              i.val(t.count || 1).on(y + n._namespace, function (i) {
                t.count = i.target.value;
                n._trigger();
              });
            },
            _initEndView: function (n) {
              var u,
                r = this,
                f = r._value;
              n === t && (f.count ? (n = "count") : f.until && (n = "until"));
              u = { endPattern: n, messages: r.options.messages.end };
              i.destroy(r._container);
              r._container.html(ri(u));
              r._initCount();
              r._initUntil();
            },
            _initWeekDay: function () {
              var u,
                t = this,
                f = t.options.messages.weekdays,
                r = t.options.messages.offsetPositions,
                e = t._container.find(".k-recur-weekday"),
                o = function () {
                  t._weekDayRule();
                  t.trigger("change");
                };
              e[0] &&
                ((t._weekDayOffset = t._container
                  .find(".k-recur-weekday-offset")
                  .html(
                    t._options([
                      { text: r.first, value: "1" },
                      { text: r.second, value: "2" },
                      { text: r.third, value: "3" },
                      { text: r.fourth, value: "4" },
                      { text: r.last, value: "-1" },
                    ])
                  )
                  .change(o)),
                (u = [
                  { text: f.day, value: "day" },
                  { text: f.weekday, value: "weekday" },
                  { text: f.weekend, value: "weekend" },
                ]),
                (u = u.concat(
                  n.map(i.culture().calendar.days.names, function (n, t) {
                    return { text: n, value: t };
                  })
                )),
                (t._weekDay = e
                  .html(t._options(u))
                  .change(o)
                  .val(t.options.start.getDay())),
                t._weekDayView());
            },
            _initMonth: function () {
              var u,
                t = this,
                f = t._value,
                o = t.options.start,
                e = f.months || [o.getMonth() + 1],
                r = t._container.find(".k-recur-month"),
                s = i.culture().calendar.months.names;
              r[0] &&
                ((u = n.map(s, function (n, t) {
                  return { text: n, value: t + 1 };
                })),
                r.html(t._options(u)).change(function () {
                  f.months = [+this.value];
                }),
                (t._monthSelect = r),
                e && r.val(e[0]));
            },
            _period: function () {
              var r,
                o,
                u,
                n = this,
                t = n._value,
                f = n._container,
                s = n.options.messages[t.freq],
                e = f.find(".k-repeat-rule"),
                h = f.find(".k-weekday-view"),
                c = f.find(".k-monthday-view");
              e[0] &&
                ((r = t.weekDays ? "weekday" : "monthday"),
                (o = g({
                  value: r,
                  dataSource: [
                    { text: s.dayOfMonth, value: "monthday" },
                    { text: s.dayOfWeek, value: "weekday" },
                  ],
                  ns: i.ns,
                })),
                (u = function (i) {
                  var f = n._weekDay.val(),
                    e = n._weekDayOffset.val(),
                    u = n._monthDay.val(),
                    r = n._monthSelect ? n._monthSelect.val() : null;
                  "monthday" === i
                    ? ((t.weekDays = null),
                      (t.monthDays = u ? [u] : u),
                      (t.months = r ? [+r] : r),
                      h.hide(),
                      c.show())
                    : ((t.monthDays = null),
                      (t.months = r ? [+r] : r),
                      (t.weekDays = [{ offset: +e, day: +f }]),
                      h.show(),
                      c.hide());
                }),
                e.append(o),
                e
                  .find(".k-scheduler-select")
                  .on(y + n._namespace, function (n) {
                    u(n.target.value);
                  }),
                u(r));
            },
            _initUntil: function () {
              var t = this,
                f = t._container.find(".k-recur-until"),
                r = t.options.start,
                u = t._value,
                n = u.until,
                e = n && n < r ? n : r;
              t._until = i.support.input.date
                ? f
                    .attr("min", i.toString(e, "yyyy-MM-dd"))
                    .val(i.toString(n || r, "yyyy-MM-dd"))
                    .on("change", function () {
                      u.until = i.parseDate(this.value, "yyyy-MM-dd");
                    })
                : f
                    .kendoDatePicker({
                      min: e,
                      value: n || r,
                      change: function () {
                        u.until = this.value();
                      },
                    })
                    .data("kendoDatePicker");
            },
            _options: function (n, t) {
              var i = 0,
                r = "",
                f = n.length,
                u = this._optionTemplate;
              for (t && (r += u({ value: "", text: t })); i < f; i++)
                r += u(n[i]);
              return r;
            },
          });
          nt.plugin(ui);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.scheduler.timelineview.min", ["kendo.scheduler.view.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function w(n) {
            var t = new Date(1980, 1, 1, 0, 0, 0);
            return r(t, u(n)), t;
          }
          function tt(n) {
            var i = [],
              t = n.workWeekStart % 7,
              r = Math.abs(n.workWeekEnd % 7);
            for (i.push(t); r != t; ) t > 6 ? (t -= 7) : t++, i.push(t);
            return i;
          }
          function b(n) {
            var t,
              i = 0;
            if (n.columns) {
              for (t = 0; t < n.columns.length; t++) i += b(n.columns[t]);
              return (n.colspan = i), i;
            }
            return (n.colspan = 1), 1;
          }
          function it(n, t, i) {
            for (var r, e, f, u = n.length - 1; u >= 0; u--)
              (r = n[u].rectLeft),
                (f = n[u].rectRight),
                (e = r <= t && f >= t),
                (e || (r >= t && f <= i) || (t <= r && i >= r)) &&
                  (r < t && (t = r), f > i && (i = f));
            return rt(n, t, i);
          }
          function rt(n, t, i) {
            for (var u, f = [], r = 0; r < n.length; r++)
              (u = { rectLeft: n[r].rectLeft, rectRight: n[r].rectRight }),
                ((u.rectLeft < t && u.rectRight > t) ||
                  (u.rectLeft >= t && u.rectRight <= i)) &&
                  f.push(n[r]);
            return f;
          }
          var c,
            i = window.kendo,
            k = i.ui,
            r = i.date.setTime,
            s = k.SchedulerView,
            v = i._outerWidth,
            d = i._outerHeight,
            l = n.extend,
            ut = n.proxy,
            f = i.date.getDate,
            u = i.date.getMilliseconds,
            e = i.date.MS_PER_DAY,
            y = i.date.MS_PER_MINUTE,
            h = "k-current-time",
            a = "k-current-time-arrow",
            g = "k-scheduler-header-wrap",
            nt = "k-event-inverse",
            p = 0.8666,
            o = ".kendoTimelineView",
            ft = i.template(
              '<div><div class="k-event-template k-event-time">#:kendo.format("{0:t} - {1:t}", start, end)#</div><div class="k-event-template">${title}</div></div>'
            ),
            et = i.template(
              "<span class='k-link k-nav-day'>#=kendo.format('{0:m}', date)#</span>"
            ),
            ot =
              '<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color#; border-color: #=resources[0].color#"class="k-event" #} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span>#if(resizable && !data.tail){#<span class="k-resize-handle k-resize-w"></span>#}##if(resizable && !data.head){#<span class="k-resize-handle k-resize-e"></span>#}#</div>',
            st = i.Class.extend({
              init: function (n) {
                this._view = n;
              },
              _getTimeSlotByPosition: function (n, t, i) {
                var r = this._view.groups[i];
                return r.timeSlotByPosition(n, t);
              },
              _hideHeaders: function () {
                var n = this._view;
                n.timesHeader.find("table tr:last").hide();
                n.datesHeader.find("table tr:last").hide();
              },
              _setColspan: function (n) {
                b(n);
              },
              _createRowsLayout: function (n, t, i) {
                var r = this._view;
                return r._createRowsLayout(n, t, i);
              },
              _createVerticalColumnsLayout: function (n, t, i, r) {
                return r;
              },
              _createColumnsLayout: function (n, t, i) {
                var r = this._view;
                return r._createColumnsLayout(n, t, i);
              },
              _getRowCount: function () {
                var n = this._view;
                return n._groupCount();
              },
              _getGroupsCount: function () {
                return 1;
              },
              _addContent: function (n, t, r, u, f, e, o, s) {
                for (
                  var l,
                    h,
                    y,
                    a = this._view,
                    v = "",
                    p = a.options,
                    w = function (t) {
                      var u,
                        f = "",
                        r = "",
                        e = function (n) {
                          return function () {
                            return a._resourceBySlot({ groupIndex: n });
                          };
                        };
                      return (
                        i.date.isToday(n[h]) && (r += "k-today"),
                        (i.date.getMilliseconds(t) <
                          i.date.getMilliseconds(p.workDayStart) ||
                          i.date.getMilliseconds(t) >=
                            i.date.getMilliseconds(p.workDayEnd) ||
                          !a._isWorkDay(n[h])) &&
                          (r += " k-nonwork-hour"),
                        (f +=
                          "<td" + ("" !== r ? ' class="' + r + '"' : "") + ">"),
                        (u = i.date.getDate(n[h])),
                        i.date.setTime(u, i.date.getMilliseconds(t)),
                        (f += o({ date: u, resources: e(s ? c : l) })),
                        f + "</td>"
                      );
                    },
                    c = 0;
                  c < u;
                  c++
                ) {
                  for (v += "<tr>", l = 0; l < r; l++)
                    for (h = 0, y = t; h < y; h++)
                      v += a._forTimeRange(f, e, w);
                  v += "</tr>";
                }
                return v;
              },
              _addTimeSlotsCollections: function (n, t, i, r, f) {
                var e,
                  h,
                  b,
                  c,
                  k,
                  l,
                  a,
                  v,
                  y,
                  o,
                  d,
                  s,
                  p = this._view,
                  w = i.length;
                for (f && (w = Math.floor(w / n)), e = 0; e < n; e++)
                  for (
                    h = 0,
                      b = p.groups[e],
                      f && (h = e),
                      k = h * w,
                      l = 0,
                      f || (l = e),
                      a = i[k].children,
                      v = a.length / (f ? 1 : n),
                      y = v / t,
                      o = 0;
                    o < t;
                    o++
                  )
                    for (
                      d = o * y + v * l, c = u(new Date(+p.startTime())), s = 0;
                      s < y;
                      s++
                    )
                      p._addTimeSlotToCollection(b, a, s, d, o, c, r), (c += r);
              },
              _getVerticalGroupCount: function (n) {
                return n;
              },
              _getVerticalRowCount: function (n, t, i) {
                var r = this._view;
                return r._isVerticallyGrouped() ? n[t].maxRowCount : i;
              },
              _renderEvent: function (n, t, i, r, u, f) {
                var s,
                  e = this._view,
                  o = e._createEventElement(
                    i.occurrence,
                    t,
                    u.head || i.head,
                    u.tail || i.tail
                  );
                o.appendTo(f).css({ top: 0, height: e.options.eventHeight });
                s = {
                  start: i.occurrence._startTime || i.occurrence.start,
                  end: i.occurrence._endTime || i.occurrence.end,
                  element: o,
                  uid: t.uid,
                  slotRange: u,
                  rowIndex: 0,
                  offsetTop: 0,
                };
                n.events[t.uid] = s;
                e._inverseEventColor(o);
                e.addContinuousEvent(r, u, o, t.isAllDay);
                e._arrangeRows(s, u, n);
              },
              _verticalCountForLevel: function (n) {
                var t = this._view;
                return t._rowCountForLevel(n);
              },
              _horizontalCountForLevel: function (n) {
                var t = this._view;
                return t._columnCountForLevel(n);
              },
              _updateCurrentVerticalTimeMarker: function (t, i) {
                var r = this._view,
                  u = "<div class='" + h + "'></div>",
                  f = r.datesHeader.find("." + g),
                  e = Math.round(
                    t[0].innerRect(i, new Date(i.getTime() + 1), !1).left
                  ),
                  o = n(u)
                    .prependTo(f)
                    .addClass(a + "-down");
                o.css({
                  left: r._adjustLeftPosition(e - (v(o) * p) / 2),
                  top: f.find("tr:last").prev().position().top,
                });
                n(u)
                  .prependTo(r.content)
                  .css({
                    left: r._adjustLeftPosition(e),
                    width: "1px",
                    height: r.content[0].scrollHeight - 1,
                    top: 0,
                  });
              },
              _changeGroup: function () {
                return t;
              },
              _prevGroupSlot: function (n, t, i) {
                var r,
                  u = this._view;
                return u._isVerticallyGrouped()
                  ? n
                  : ((r = t._collection(0, i)), r.last());
              },
              _nextGroupSlot: function (n, t, i) {
                var r,
                  u = this._view;
                return u._isVerticallyGrouped()
                  ? n
                  : ((r = t._collection(0, i)), r.first());
              },
              _verticalSlots: function (n, t) {
                var i = this._view;
                return i._changeGroup(n, t);
              },
              _verticalMethod: function (n) {
                return n ? "leftSlot" : "rightSlot";
              },
              _normalizeVerticalSelection: function () {
                return t;
              },
              _horizontalSlots: function (n, t, i, r, u, f, e) {
                var s = this._view,
                  o = {};
                return (
                  (o.startSlot = t[i](r)),
                  (o.endSlot = t[i](u)),
                  f ||
                    !s._isHorizontallyGrouped() ||
                    (o.startSlot && o.endSlot) ||
                    (o.startSlot = o.endSlot = s._changeGroup(n, e)),
                  o
                );
              },
              _changeVerticalViewPeriod: function () {
                return !1;
              },
              _changeHorizontalViewPeriod: function (n, t, i, r) {
                var u = this._view;
                return !(
                  (n.startSlot && n.endSlot) ||
                  t ||
                  !u._changeViewPeriod(i, r, !1)
                );
              },
              _updateDirection: function (n, t, i, r) {
                var u = this._view;
                u._updateDirection(n, t, i, r, !0);
              },
              _createMoveHint: function (n, t) {
                var i,
                  r,
                  e,
                  o,
                  u = this._view,
                  s = n.start,
                  f = u._createEventElement(t.occurrence, t.occurrence, !1, !1);
                f.addClass("k-event-drag-hint");
                i = n.innerRect(
                  t.occurrence.start,
                  t.occurrence.end,
                  u.options.snap
                );
                r = i.right - i.left - 2;
                r < 0 && (r = 0);
                e = u._adjustLeftPosition(i.left);
                o = {
                  left: e,
                  top: s.offsetTop,
                  height: s.offsetHeight - 2,
                  width: r,
                };
                f.css(o);
                t.occurrence.inverseColor && f.addClass(nt);
                u._appendMoveHint(f);
              },
              _adjustLeftPosition: function (n) {
                var t = this._view;
                return (
                  t._isRtl &&
                    (n -= t.content[0].scrollWidth - t.content[0].clientWidth),
                  n
                );
              },
            }),
            ht = i.Class.extend({
              init: function (n) {
                this._view = n;
              },
              _getTimeSlotByPosition: function (n, t, i) {
                var r = this._view.groups[i];
                return r.timeSlotByPosition(n, t, !0);
              },
              _hideHeaders: function () {
                var n = this._view;
                n._isVerticallyGrouped()
                  ? n.times.find(".k-last").hide()
                  : (n.timesHeader.find("table tr").eq(2).hide(),
                    n.datesHeader.find("table tr").eq(2).hide());
              },
              _setColspan: function () {},
              _createRowsLayout: function (n, t, i, r) {
                var u = this._view;
                return u._createDateLayout(r, null, !0);
              },
              _createVerticalColumnsLayout: function (n, t, i) {
                var r = this._view;
                return r._createColumnsLayout(n, null, i);
              },
              _createColumnsLayout: function (n, t, i, r) {
                var u = this._view;
                return u._createColumnsLayout(n, t, i, r, !0);
              },
              _getRowCount: function (n) {
                var t = this._view;
                return t._rowCountForLevel(n);
              },
              _getGroupsCount: function () {
                var n = this._view;
                return n._groupCount();
              },
              _addContent: function (n, t, u, f, e, o, s, h) {
                for (
                  var w,
                    l,
                    b,
                    c = this._view,
                    v = "",
                    k = c.options,
                    d = function (t, r, u, f, e, o) {
                      var a,
                        v = "",
                        h = "",
                        y = c._isVerticallyGrouped() ? w : l,
                        p = function (n) {
                          return function () {
                            return c._resourceBySlot({ groupIndex: n });
                          };
                        };
                      return (
                        i.date.isToday(n[l]) && (h += "k-today"),
                        (i.date.getMilliseconds(t) <
                          i.date.getMilliseconds(k.workDayStart) ||
                          i.date.getMilliseconds(t) >=
                            i.date.getMilliseconds(k.workDayEnd) ||
                          !c._isWorkDay(n[y])) &&
                          (h += " k-nonwork-hour"),
                        (v +=
                          "<td" + ("" !== h ? ' class="' + h + '"' : "") + ">"),
                        (a = i.date.getDate(n[l])),
                        i.date.setTime(a, i.date.getMilliseconds(t)),
                        (v += s({ date: a, resources: p(o) })),
                        v + "</td>"
                      );
                    },
                    p = new Date(e),
                    g = c.options.minorTickCount,
                    nt = c.options.majorTick * y,
                    tt = nt / g || 1,
                    a = 0;
                  a < f;
                  a++
                ) {
                  for (
                    v += "<tr>",
                      a % (f / c._dates.length) == 0 &&
                        ((w = a / (f / c._dates.length)),
                        (p = new Date(c._dates[w])),
                        i.date.setTime(p, i.date.getMilliseconds(e))),
                      l = 0,
                      b = t;
                    l < b;
                    l++
                  )
                    if (((v += c._forTimeRange(p, o, d, h, u)), h)) {
                      r(p, tt, !1);
                      break;
                    }
                  v += "</tr>";
                }
                return v;
              },
              _addTimeSlotsCollections: function (n, t, i, r, f) {
                var e,
                  c,
                  l,
                  w,
                  b,
                  o,
                  a,
                  k,
                  v,
                  s,
                  h,
                  d,
                  y = this._view,
                  p = i.length;
                for (f && (p /= t), e = 0; e < t; e++)
                  for (
                    c = 0,
                      f && (c = e),
                      w = c * p,
                      b = 0,
                      o = i[w].children,
                      a = f ? p : o.length / (t * n),
                      k = o.length / t,
                      l = u(new Date(+y.startTime())),
                      s = 0;
                    s < a;
                    s++
                  ) {
                    for (
                      f
                        ? ((v = 0), (o = i[s + a * e].children))
                        : ((v = e * k + n * s), b++),
                        h = 0;
                      h < n;
                      h++
                    )
                      (d = y.groups[h]),
                        y._addTimeSlotToCollection(d, o, h, v, e, l, r);
                    l += r;
                  }
              },
              _getVerticalGroupCount: function () {
                var n = this._view;
                return n.content.find("tr").length;
              },
              _getVerticalRowCount: function (n, t, i) {
                return i;
              },
              _renderEvent: function (n, t, i, r, u, f, e, o) {
                for (
                  var c, h, l, a, v = this._view, y = [], s = u.start.index;
                  s <= u.end.index;
                  s++
                )
                  (c = v._createEventElement(
                    i.occurrence,
                    t,
                    s !== o,
                    s !== e
                  )),
                    c
                      .appendTo(f)
                      .css({ top: 0, height: v.options.eventHeight }),
                    (h = r._timeSlotCollections[0]._slots[s]),
                    (l = r.timeSlotRanges(h.start, h.end, !1)[0]),
                    (a = {
                      start:
                        s === e
                          ? i.occurrence._startTime || i.occurrence.start
                          : h.start,
                      end:
                        s === o
                          ? i.occurrence._endTime || i.occurrence.end
                          : h.end,
                      element: c,
                      uid: t.uid,
                      slotRange: l,
                      rowIndex: 0,
                      offsetTop: 0,
                    }),
                    (n.events[t.uid] = a),
                    y.push(a),
                    v.addContinuousEvent(r, l, c, t.isAllDay),
                    v._arrangeRows(a, l, n);
                n.events[t.uid] = y;
              },
              _verticalCountForLevel: function (n) {
                var t = this._view;
                return t._columnCountForLevel(n);
              },
              _horizontalCountForLevel: function (n, t) {
                var i = this._view;
                return i._columnCountForLevel(t) / i._columnCountForLevel(2);
              },
              _updateCurrentVerticalTimeMarker: function (t, i) {
                var r = this._view,
                  e = r.times.find("tr:first th:first"),
                  o = r.times.find("tr:first th:last"),
                  s = "<div class='" + h + "'></div>",
                  u = n(s).prependTo(r.times),
                  c = Math.round(
                    t[0].innerRect(i, new Date(i.getTime() + 1), !1).top
                  ),
                  f = {};
                this._isRtl
                  ? ((f.right = e.position().left + d(e) - d(o)),
                    u.addClass(a + "-left"))
                  : ((f.left = o.position().left), u.addClass(a + "-right"));
                f.top = c - (v(u) * p) / 2;
                u.css(f);
                n(s)
                  .prependTo(r.content)
                  .css({
                    top: c,
                    height: "1px",
                    right: "1px",
                    width: r.content[0].scrollWidth,
                    left: 0,
                  });
              },
              _changeGroup: function (n, t, i) {
                var r = this._view;
                i || (n.groupIndex = t ? r.groups.length - 1 : 0);
              },
              _prevGroupSlot: function (n) {
                return n;
              },
              _nextGroupSlot: function (n) {
                return n;
              },
              _changeDate: function (n, t, i) {
                var r,
                  u,
                  e = this._view,
                  f = e.groups[n.groupIndex];
                if (t) {
                  if (((r = f._getCollections(!1)), (u = i.index - 1), u >= 0))
                    return r[0]._slots[u];
                } else if (
                  ((r = f._getCollections(!1)),
                  (u = i.index + 1),
                  r[0] && r[0]._slots[u])
                )
                  return r[0]._slots[u];
              },
              _verticalSlots: function (n, t, i) {
                return this._changeDate(n, t, i);
              },
              _verticalMethod: function (n, t) {
                return t
                  ? n
                    ? "upSlot"
                    : "downSlot"
                  : n
                  ? "leftSlot"
                  : "rightSlot";
              },
              _normalizeVerticalSelection: function (n, i, r, u) {
                var f = this._view;
                return u ? t : f._normalizeVerticalSelection(n, i, r);
              },
              _horizontalSlots: function (n, t, i, r, u, f, e) {
                var s = this._view,
                  h = s._changeGroup(n, e),
                  o = {};
                return (
                  h
                    ? (o.startSlot = o.endSlot = h)
                    : s._isVerticallyGrouped() ||
                      ((o.startSlot = t[i](r)), (o.endSlot = t[i](u))),
                  o
                );
              },
              _changeVerticalViewPeriod: function (n, t, i, r) {
                var u = this._view;
                return !(
                  (n.startSlot && n.endSlot) ||
                  t ||
                  !u._changeViewPeriod(i, r, u._isVerticallyGrouped())
                );
              },
              _changeHorizontalViewPeriod: function (n, t, i, r) {
                var u = this._view;
                return (
                  !u._isVerticallyGrouped() &&
                  !(
                    (n.startSlot && n.endSlot) ||
                    t ||
                    !u._changeViewPeriod(i, r, !1)
                  )
                );
              },
              _updateDirection: function (n, t, i, r) {
                var u = this._view;
                u._updateDirection(n, t, i, r, !u._isVerticallyGrouped());
              },
              _createMoveHint: function (n, t) {
                for (
                  var u,
                    i,
                    e,
                    f = this._view,
                    o = n.start,
                    s = n.end,
                    r = o.index;
                  r <= s.index;
                  r++
                )
                  (u = n.collection._slots[r]),
                    (i = f._createEventElement(
                      t.occurrence,
                      t.occurrence,
                      !1,
                      !1
                    )),
                    i.addClass("k-event-drag-hint"),
                    (e = {
                      left: u.offsetLeft + 2,
                      top: u.offsetTop,
                      height: f.options.eventHeight,
                      width: u.offsetWidth,
                    }),
                    i.css(e),
                    t.occurrence.inverseColor && i.addClass(nt),
                    f._appendMoveHint(i);
              },
              _adjustLeftPosition: function (n) {
                var t = this._view;
                return (
                  t._isRtl &&
                    !t._isVerticallyGrouped() &&
                    (n -= t.content[0].scrollWidth - t.content[0].offsetWidth),
                  n
                );
              },
            });
          i.ui.scheduler.TimelineGroupedView = st;
          i.ui.scheduler.TimelineGroupedByDateView = ht;
          c = s.extend({
            init: function (n, t) {
              var i = this;
              s.fn.init.call(i, n, t);
              i._groupedView = i._getGroupedView();
              i.title = i.options.title || i.options.name;
              i._workDays = tt(i.options);
              i._templates();
              i._editable();
              i.calculateDateRange();
              i._groups();
              i._currentTime(!0);
            },
            name: "timeline",
            _getGroupedView: function () {
              return this._isGroupedByDate()
                ? new i.ui.scheduler.TimelineGroupedByDateView(this)
                : new i.ui.scheduler.TimelineGroupedView(this);
            },
            _getNextEventIndexBySlot: function (n, t, r) {
              var f, u;
              if (this._isVerticallyGrouped())
                return i.ui.SchedulerView.fn._getNextEventIndexBySlot.call(
                  this,
                  n,
                  t,
                  r
                );
              for (f = 0, u = 0; u < t.length; u++)
                if (n.startDate() > t[u].start.startDate()) f++;
                else {
                  if (
                    !(
                      n.startDate().getTime() ===
                        t[u].start.startDate().getTime() &&
                      r > t[u].start.groupIndex
                    )
                  )
                    break;
                  f++;
                }
              return f;
            },
            _getSelectedSlot: function (n, t, r, u, f, e) {
              return this._isVerticallyGrouped()
                ? i.ui.SchedulerView.fn._getSelectedSlot.call(
                    this,
                    n,
                    t,
                    r,
                    u,
                    f,
                    e
                  )
                : n;
            },
            _getSortedEvents: function (t) {
              return this._isVerticallyGrouped()
                ? i.ui.SchedulerView.fn._getSortedEvents.call(this, t)
                : t.sort(function (t, i) {
                    var r =
                      t.start.startDate().getTime() -
                      i.start.startDate().getTime();
                    return (
                      0 === r &&
                        (t.start.isDaySlot && !i.start.isDaySlot && (r = -1),
                        !t.start.isDaySlot && i.start.isDaySlot && (r = 1)),
                      0 === r && (r = t.start.groupIndex - i.start.groupIndex),
                      0 === r &&
                        (r = n(t.element).index() - n(i.element).index()),
                      r
                    );
                  });
            },
            _currentTimeMarkerUpdater: function () {
              this._updateCurrentTimeMarker(new Date());
            },
            _updateCurrentTimeMarker: function (t) {
              var e,
                b,
                k,
                f,
                o,
                s,
                r,
                d,
                nt,
                c,
                l,
                y,
                w,
                u = this.options;
              if (
                (this.datesHeader.find("." + h).remove(),
                this.times.find("." + h).remove(),
                this.content.find("." + h).remove(),
                this._isInDateSlot({ start: t, end: t }))
              )
                for (
                  u.currentTimeMarker.useLocalTimezone === !1 &&
                    ((e = u.dataSource.options.schema.timezone),
                    u.dataSource &&
                      e &&
                      ((b = i.timezone.offset(t, e)),
                      (t = i.timezone.convert(t, t.getTimezoneOffset(), b)))),
                    k =
                      u.group && "vertical" != u.group.orientation
                        ? this.groups.length
                        : 1,
                    f = 0;
                  f < k;
                  f++
                ) {
                  if (((o = this.groups[f]), !o)) return;
                  if (
                    ((s = i.date.toUtcTime(t)),
                    (r = o.timeSlotRanges(s, s + 1)),
                    0 === r.length)
                  )
                    return;
                  d = r[0].collection;
                  nt = d.slotByStartDate(t);
                  nt &&
                    (this._isVerticallyGrouped()
                      ? this._groupedView._updateCurrentVerticalTimeMarker(r, t)
                      : ((c = "<div class='" + h + "'></div>"),
                        (l = this.datesHeader.find("." + g)),
                        (y = Math.round(
                          r[0].innerRect(t, new Date(t.getTime() + 1), !1).left
                        )),
                        (w = n(c)
                          .prependTo(l)
                          .addClass(a + "-down")),
                        w.css({
                          left: this._adjustLeftPosition(y - (v(w) * p) / 2),
                          top: l.find("tr:last").prev().position().top,
                        }),
                        n(c)
                          .prependTo(this.content)
                          .css({
                            left: this._adjustLeftPosition(y),
                            width: "1px",
                            height: this.content[0].scrollHeight - 1,
                            top: 0,
                          })));
                }
            },
            _adjustLeftPosition: function (n) {
              return this._groupedView._adjustLeftPosition(n);
            },
            _currentTime: function (n) {
              var i = this,
                r = i.options.currentTimeMarker;
              r !== !1 &&
                r.updateInterval !== t &&
                (i._currentTimeMarkerUpdater(),
                n &&
                  (i._currentTimeUpdateTimer = setInterval(
                    ut(this._currentTimeMarkerUpdater, i),
                    r.updateInterval
                  )));
            },
            _editable: function () {
              this.options.editable &&
                (this._isMobile()
                  ? this._touchEditable()
                  : this._mouseEditable());
            },
            _mouseEditable: function () {
              var t = this;
              t.element.on(
                "click" + o,
                ".k-event a:has(.k-i-close)",
                function (r) {
                  t.trigger("remove", {
                    uid: n(this).closest(".k-event").attr(i.attr("uid")),
                  });
                  r.preventDefault();
                }
              );
              t.options.editable.create !== !1 &&
                t.element.on(
                  "dblclick" + o,
                  ".k-scheduler-content td",
                  function (n) {
                    var r,
                      i = t._slotByPosition(n.pageX, n.pageY);
                    i &&
                      ((r = t._resourceBySlot(i)),
                      t.trigger("add", {
                        eventInfo: l(
                          { start: i.startDate(), end: i.endDate() },
                          r
                        ),
                      }));
                    n.preventDefault();
                  }
                );
              t.options.editable.update !== !1 &&
                t.element.on("dblclick" + o, ".k-event", function (r) {
                  t.trigger("edit", {
                    uid: n(this).closest(".k-event").attr(i.attr("uid")),
                  });
                  r.preventDefault();
                });
            },
            _touchEditable: function () {
              var r = this,
                u = 0;
              i.support.mobileOS.android && (u = 5);
              r.options.editable.create !== !1 &&
                (r._addUserEvents = new i.UserEvents(r.element, {
                  threshold: u,
                  useClickAsTap: !i.support.browser.edge,
                  filter: ".k-scheduler-content td",
                  tap: function (n) {
                    var u, f, i, e;
                    r._scrolling ||
                      ((u = n.x.location !== t ? n.x.location : n.x),
                      (f = n.y.location !== t ? n.y.location : n.y),
                      (i = r._slotByPosition(u, f)),
                      i &&
                        ((e = r._resourceBySlot(i)),
                        r.trigger("add", {
                          eventInfo: l(
                            { start: i.startDate(), end: i.endDate() },
                            e
                          ),
                        })),
                      n.preventDefault());
                  },
                }));
              r.options.editable.update !== !1 &&
                (r._editUserEvents = new i.UserEvents(r.element, {
                  threshold: u,
                  useClickAsTap: !i.support.browser.edge,
                  filter: ".k-event",
                  tap: function (t) {
                    var u, f;
                    r._scrolling ||
                      ((u = n(t.target).closest(".k-event")),
                      (f = n(t.touch.initialTouch)),
                      f.hasClass("k-i-close")
                        ? r.trigger("remove", { uid: u.attr(i.attr("uid")) })
                        : u.hasClass("k-event-active") ||
                          r.trigger("edit", { uid: u.attr(i.attr("uid")) }),
                      t.preventDefault());
                  },
                }));
            },
            _slotByPosition: function (n, t) {
              var e,
                u,
                f,
                r = this.content,
                o = r.offset();
              for (
                n -= o.left,
                  t -= o.top,
                  this._isRtl
                    ? ((f = i.support.browser),
                      f.mozilla
                        ? ((n += r[0].scrollWidth - r[0].offsetWidth),
                          (n += r[0].scrollLeft))
                        : f.msie
                        ? ((n -= r.scrollLeft()),
                          (n += r[0].scrollWidth - r[0].offsetWidth))
                        : f.webkit && (n += r[0].scrollLeft))
                    : (n += r[0].scrollLeft),
                  t += r[0].scrollTop,
                  n = Math.ceil(n),
                  t = Math.ceil(t),
                  u = 0;
                u < this.groups.length;
                u++
              )
                if ((e = this._groupedView._getTimeSlotByPosition(n, t, u)))
                  return e;
              return null;
            },
            options: {
              name: "TimelineView",
              title: "Timeline",
              selectedDateFormat: "{0:D}",
              selectedShortDateFormat: "{0:d}",
              selectedMobileDateFormat: "{0:MMM dd}",
              date: i.date.today(),
              startTime: i.date.today(),
              endTime: i.date.today(),
              showWorkHours: !1,
              minorTickCount: 2,
              editable: !0,
              workDayStart: new Date(1980, 1, 1, 8, 0, 0),
              workDayEnd: new Date(1980, 1, 1, 17, 0, 0),
              workWeekStart: 1,
              workWeekEnd: 5,
              majorTick: 60,
              eventHeight: 25,
              eventMinWidth: 0,
              columnWidth: 100,
              groupHeaderTemplate: "#=text#",
              majorTimeHeaderTemplate: "#=kendo.toString(date, 't')#",
              slotTemplate: "&nbsp;",
              eventTemplate: ft,
              dateHeaderTemplate: et,
              footer: { command: "workDay" },
              currentTimeMarker: { updateInterval: 1e4, useLocalTimezone: !0 },
              messages: {
                defaultRowText: "All events",
                showFullDay: "Show full day",
                showWorkDay: "Show business hours",
              },
            },
            events: ["remove", "add", "edit"],
            _templates: function () {
              var n = this.options,
                t = l({}, i.Template, n.templateSettings);
              this.eventTemplate = this._eventTmpl(n.eventTemplate, ot);
              this.majorTimeHeaderTemplate = i.template(
                n.majorTimeHeaderTemplate,
                t
              );
              this.dateHeaderTemplate = i.template(n.dateHeaderTemplate, t);
              this.slotTemplate = i.template(n.slotTemplate, t);
              this.groupHeaderTemplate = i.template(n.groupHeaderTemplate, t);
            },
            _render: function (t) {
              var i = this;
              t = t || [];
              i._dates = t;
              i._startDate = t[0];
              i._endDate = t[t.length - 1 || 0];
              i._calculateSlotRanges();
              i.createLayout(i._layout(t));
              i._content(t);
              i._footer();
              i._setContentWidth();
              i.refreshLayout();
              i.datesHeader.on("click" + o, ".k-nav-day", function (t) {
                var r = n(t.currentTarget).closest("th"),
                  u = i._slotByPosition(
                    r.offset().left,
                    i.content.offset().top
                  );
                i.trigger("navigate", {
                  view: "timeline",
                  date: u.startDate(),
                });
              });
              i._groupedView._hideHeaders();
            },
            _setContentWidth: function () {
              var u = this.content,
                n = u.width(),
                t = this.content.find("table"),
                f = t.find("tr:first").children().length,
                i = 100,
                r = f * this.options.columnWidth;
              n < r && (i = Math.ceil((r / n) * 100));
              t.add(this.datesHeader.find("table")).css("width", i + "%");
            },
            _calculateSlotRanges: function () {
              var s,
                t,
                h,
                c,
                l = this._dates,
                o = this.startTime(),
                n = this.endTime();
              for (
                n = u(n),
                  o = u(o),
                  n === o ? (n += e - 1) : n < o && (n += e),
                  s = [],
                  t = 0;
                t < l.length;
                t++
              )
                (h = f(l[t])),
                  r(h, o),
                  (c = f(l[t])),
                  r(c, n),
                  s.push({
                    start: i.date.toUtcTime(h),
                    end: i.date.toUtcTime(c),
                  });
              this._slotRanges = s;
            },
            _forTimeRange: function (n, t, i, f, o) {
              var k, v, a, h, d, l, p, c, s, g, b, nt, it, rt, tt, ut;
              for (
                n = w(n),
                  t = w(t),
                  k = this,
                  v = u(n),
                  a = u(t),
                  h = k.options.minorTickCount,
                  d = k.options.majorTick * y,
                  l = d / h || 1,
                  p = new Date(+n),
                  c = 0,
                  g = "",
                  s = e / l,
                  v != a && (v > a && (a += e), (s = (a - v) / l)),
                  s = f ? 1 : Math.round(s),
                  o && (s *= o);
                c < s;
                c++
              )
                (b = c % (d / l)),
                  (nt = 0 === b),
                  (it = b < h - 1),
                  (rt = b === h - 1),
                  (tt = h),
                  s % h != 0 &&
                    ((ut = s - (c + 1) < h), nt && ut && (tt = s % h)),
                  (g += i(p, nt, it, rt, tt, c % o)),
                  f || (o ? c % o == o - 1 && r(p, l, !1) : r(p, l, !1));
              return g;
            },
            _layout: function (n) {
              for (
                var u,
                  r,
                  o = [],
                  t = [],
                  i = this,
                  s = [{ text: i.options.messages.defaultRowText }],
                  f = i._groupedView,
                  h = [],
                  e = 0;
                e < i.options.minorTickCount;
                e++
              )
                h.push({
                  text: "&#8203;",
                  className: "k-last",
                  minorTicks: !0,
                });
              for (
                this._forTimeRange(
                  i.startTime(),
                  i.endTime(),
                  function (n, t, r, u, e) {
                    var s,
                      c = i.majorTimeHeaderTemplate;
                    t &&
                      ((s = {
                        text: c({ date: n }),
                        className: u ? "k-slot-cell" : "",
                        columns: h.slice(0, e),
                      }),
                      f._setColspan(s),
                      o.push(s));
                  }
                ),
                  u = 0;
                u < n.length;
                u++
              )
                t.push({
                  text: i.dateHeaderTemplate({ date: n[u] }),
                  className: "k-slot-cell",
                  columns: o.slice(0),
                });
              return (
                (r = this.groupedResources),
                r.length &&
                  ("vertical" === this._groupOrientation()
                    ? ((s = f._createRowsLayout(
                        r,
                        null,
                        this.groupHeaderTemplate,
                        t
                      )),
                      (t = f._createVerticalColumnsLayout(
                        r,
                        null,
                        this.groupHeaderTemplate,
                        t
                      )))
                    : (t = f._createColumnsLayout(
                        r,
                        t,
                        this.groupHeaderTemplate,
                        t
                      ))),
                { columns: t, rows: s }
              );
            },
            _footer: function () {
              var t,
                f,
                u,
                r = this.options;
              r.footer !== !1 &&
                ((t = '<div class="k-header k-scheduler-footer">'),
                (f = r.footer.command),
                this._isMobile() &&
                  ((t +=
                    '<span class="k-state-default k-scheduler-today"><a href="#" class="k-link">'),
                  (t += r.messages.today + "</a></span>")),
                f && "workDay" === f
                  ? this._isMobile()
                    ? ((t +=
                        '<span class="k-state-default k-scheduler-fullday"><a href="#" class="k-link">'),
                      (t +=
                        (r.showWorkHours
                          ? r.messages.showFullDay
                          : r.messages.showWorkDay) + "</a></span>"))
                    : ((t += '<ul class="k-reset k-header">'),
                      (t +=
                        '<li class="k-state-default k-scheduler-fullday"><a href="#" class="k-link"><span class="k-icon k-i-clock"></span>'),
                      (t +=
                        (r.showWorkHours
                          ? r.messages.showFullDay
                          : r.messages.showWorkDay) + "</a></li>"),
                      (t += "</ul>"))
                  : (t += "&nbsp;"),
                (t += "</div>"),
                (this.footer = n(t).appendTo(this.element)),
                (u = this),
                this.footer.on(
                  "click" + o,
                  ".k-scheduler-fullday",
                  function (n) {
                    n.preventDefault();
                    u.trigger("navigate", {
                      view: u.name || r.name,
                      date: u.startDate(),
                      isWorkDay: !r.showWorkHours,
                    });
                  }
                ),
                this.footer.on("click" + o, ".k-scheduler-today", function (n) {
                  var f, o, t, e, s;
                  n.preventDefault();
                  f = u.options.timezone;
                  o = "today";
                  t = new Date();
                  f
                    ? ((s = i.timezone.offset(t, f)),
                      (e = i.timezone.convert(t, t.getTimezoneOffset(), s)))
                    : (e = t);
                  u.trigger("navigate", {
                    view: u.name || r.name,
                    action: o,
                    date: e,
                  });
                }));
            },
            _columnCountForLevel: function (n) {
              var t = this.columnLevels[n];
              return t ? t.length : 0;
            },
            _rowCountForLevel: function (n) {
              var t = this.rowLevels[n];
              return t ? t.length : 0;
            },
            _isWorkDay: function (n) {
              for (
                var r = n.getDay(), i = this._workDays, t = 0;
                t < i.length;
                t++
              )
                if (i[t] === r) return !0;
              return !1;
            },
            _content: function (n) {
              var t = this,
                e = t.startTime(),
                o = this.endTime(),
                r = 1,
                f = 1,
                s = n.length,
                i = "",
                h = this.groupedResources,
                c = this.slotTemplate,
                u = !1;
              h.length &&
                ((u = "vertical" === t._groupOrientation()),
                u
                  ? ((f = t._groupedView._getRowCount(
                      this.rowLevels.length - 1
                    )),
                    (r = t._groupedView._getGroupsCount()))
                  : (r = t._groupCount()));
              i += "<tbody>";
              i += t._groupedView._addContent(n, s, r, f, e, o, c, u);
              i += "</tbody>";
              this.content.find("table").append(i);
            },
            _groups: function () {
              var e,
                c,
                n,
                t,
                o,
                h,
                l = this._groupCount(),
                s = this._dates,
                a = s.length;
              for (this.groups = [], e = 0; e < l; e++)
                (c = this._addResourceView(e)),
                  (n = s[0]),
                  (t = s[s.length - 1 || 0]),
                  (o = u(this.startTime())),
                  (h = u(this.endTime())),
                  0 !== o &&
                    h <= o &&
                    ((n = f(n)), r(n, o), (t = f(t)), r(t, h)),
                  c.addTimeSlotCollection(n, i.date.addDays(t, 1));
              this._timeSlotGroups(l, a);
            },
            _isHorizontallyGrouped: function () {
              return (
                this.groupedResources.length &&
                "horizontal" === this._groupOrientation()
              );
            },
            _timeSlotGroups: function (n, t) {
              var r = this._timeSlotInterval(),
                u = this._isVerticallyGrouped(),
                i = this.content.find("tr");
              i.attr("role", "row");
              this._groupedView._addTimeSlotsCollections(n, t, i, r, u);
            },
            _addTimeSlotToCollection: function (n, t, i, r, u, f, e) {
              var o = t[i + r],
                c = n.getTimeSlotCollection(0),
                s = this._dates[u],
                l = Date.UTC(s.getFullYear(), s.getMonth(), s.getDate()),
                h = l + f,
                a = h + e;
              o.setAttribute("role", "gridcell");
              o.setAttribute("aria-selected", !1);
              c.addTimeSlot(o, h, a, !0);
            },
            startDate: function () {
              return this._startDate;
            },
            endDate: function () {
              return this._endDate;
            },
            visibleEndDate: function () {
              var t = u(this.startTime()),
                r = u(this.endTime()),
                n = this.endDate();
              return 0 !== t && r <= t && (n = i.date.addDays(n, 1)), n;
            },
            startTime: function () {
              var n = this.options;
              return n.showWorkHours ? n.workDayStart : n.startTime;
            },
            endTime: function () {
              var n = this.options;
              return n.showWorkHours ? n.workDayEnd : n.endTime;
            },
            _timeSlotInterval: function () {
              var n = this.options;
              return (n.majorTick / n.minorTickCount) * y;
            },
            nextDate: function () {
              return i.date.nextDay(this.endDate());
            },
            previousDate: function () {
              return i.date.previousDay(this.startDate());
            },
            calculateDateRange: function () {
              this._render([this.options.date]);
            },
            render: function (n) {
              var t, f, e, r, u;
              for (
                this._headerColumnCount = 0,
                  this._groups(),
                  this.element.find(".k-event").remove(),
                  n = new i.data.Query(n)
                    .sort([
                      { field: "start", dir: "asc" },
                      { field: "end", dir: "desc" },
                    ])
                    .toArray(),
                  t = [],
                  this._eventsByResource(n, this.groupedResources, t),
                  f = [],
                  e = 0,
                  r = 0;
                r < t.length;
                r++
              )
                (u = { groupIndex: r, maxRowCount: 0, events: {} }),
                  f.push(u),
                  this._renderEvents(t[r], r, u),
                  e < u.maxRowCount && (e = u.maxRowCount);
              this._setRowsHeight(f, t.length, e);
              this._positionEvents(f, t.length);
              this._currentTime(!1);
              this.trigger("activate");
            },
            _positionEvents: function (t, i) {
              for (var e, o, r, f, u = 0; u < i; u++) {
                e = t[u].events;
                for (o in e)
                  if (((r = e[o]), n.isArray(r)))
                    for (f = 0; f < r.length; f++) this._positionEvent(r[f]);
                  else this._positionEvent(r);
              }
            },
            _setRowsHeight: function (t, i, r) {
              var u,
                f,
                e,
                o,
                s,
                c = this.options.eventHeight + 2,
                l = this._getBottomRowOffset(),
                h = this._groupedView,
                a = h._getVerticalGroupCount(i);
              for (i = this._isVerticallyGrouped() ? a : 1, u = 0; u < i; u++)
                (f = h._getVerticalRowCount(t, u, r)),
                  (f = f ? f : 1),
                  (e = (c + 2) * f + l),
                  (o = n(this.times.find("tr")[u])),
                  (s = n(this.content.find("tr")[u])),
                  o.height(e),
                  s.height(e);
              this._setContentWidth();
              this.refreshLayout();
              this._refreshSlots();
            },
            _getBottomRowOffset: function () {
              var t,
                i,
                n = 0.5 * this.options.eventHeight,
                r = this._isMobile();
              return (
                r ? ((t = 30), (i = 60)) : ((t = 15), (i = 30)),
                n > i ? (n = i) : n < t && (n = t),
                n
              );
            },
            _positionEvent: function (n) {
              var r,
                u,
                f,
                o = this.options.eventHeight + 2,
                i = n.slotRange.innerRect(n.start, n.end, !1),
                e = this._adjustLeftPosition(i.left),
                t = i.right - i.left - 2;
              t < 0 && (t = 0);
              t < this.options.eventMinWidth &&
                ((r = n.slotRange.collection),
                (u = r._slots[r._slots.length - 1]),
                (f = u.offsetLeft + u.offsetWidth),
                (t = this.options.eventMinWidth),
                f < e + t && (t = f - i.left - 2));
              n.element.css({
                top: n.slotRange.start.offsetTop + n.rowIndex * (o + 2) + "px",
                left: e,
                width: t,
              });
            },
            _refreshSlots: function () {
              for (var n = 0; n < this.groups.length; n++)
                this.groups[n].refresh();
            },
            _eventsByResource: function (n, t, r) {
              var e,
                u,
                h,
                o,
                f = t[0];
              if (f)
                for (e = f.dataSource.view(), u = 0; u < e.length; u++)
                  (h = this._resourceValue(f, e[u])),
                    (o = new i.data.Query(n)
                      .filter({ field: f.field, operator: s.groupEqFilter(h) })
                      .toArray()),
                    t.length > 1
                      ? this._eventsByResource(o, t.slice(1), r)
                      : r.push(o);
              else r.push(n);
            },
            _isInDateSlot: function (n) {
              var t = n.start,
                r = n.end,
                u = f(this._startDate),
                e = i.date.addDays(f(this.visibleEndDate()), 1);
              return t < e && u <= r;
            },
            _isInTimeSlot: function (n) {
              var t,
                f = n._startTime || i.date.toUtcTime(n.start),
                r = n._endTime || i.date.toUtcTime(n.end),
                u = this._slotRanges;
              for (f === r && (r += 1), t = 0; t < u.length; t++)
                if (f < u[t].end && u[t].start < r) return !0;
              return !1;
            },
            _adjustEvent: function (n) {
              var w,
                l = n.start,
                c = n.end,
                a = n._time("start"),
                v = n._time("end"),
                h = u(this.startTime()),
                s = u(this.endTime()),
                o = null,
                t = null,
                y = !1,
                p = !1;
              return (
                n.isAllDay &&
                  ((l = f(l)),
                  (a = 0),
                  (c = f(c)),
                  (v = e),
                  (t = i.date.addDays(c, 1))),
                0 === s && (s = e),
                s <= h
                  ? (a < h && a >= s && ((o = f(l)), r(o, h), (p = !0)),
                    v > s && v <= h && ((t = f(c)), r(t, s), (y = !0)))
                  : (h > a
                      ? ((o = f(l)), r(o, h), (p = !0))
                      : s <= a &&
                        ((o = f(l)),
                        (o = i.date.addDays(o, 1)),
                        r(o, h),
                        (p = !0)),
                    s < v
                      ? ((t = f(c)), r(t, s), (y = !0))
                      : h > v &&
                        ((t = f(c)),
                        (t = i.date.addDays(t, -1)),
                        r(t, s),
                        (y = !0))),
                (w = n.clone({
                  start: o ? o : l,
                  end: t ? t : c,
                  _startTime: o ? i.date.toUtcTime(o) : n._startTime,
                  _endTime: t ? i.date.toUtcTime(t) : n._endTime,
                  isAllDay: !1,
                })),
                { occurrence: w, head: y, tail: p }
              );
            },
            _renderEvents: function (n, t, i) {
              for (
                var r, c, l, o, u, a, s, v, y, f = 0, h = n.length;
                f < h;
                f++
              )
                (r = n[f]),
                  this._isInDateSlot(r) &&
                    ((c = r.isAllDay || r.duration() >= e),
                    (l = this.content),
                    (c || this._isInTimeSlot(r)) &&
                      ((o = this._adjustEvent(r)),
                      (u = this.groups[t]),
                      u._continuousEvents || (u._continuousEvents = []),
                      this._isInTimeSlot(o.occurrence) &&
                        ((a = u.slotRanges(o.occurrence, !1)),
                        (s = a[0]),
                        (v = s.start.index),
                        (y = s.end.index),
                        this._groupedView._renderEvent(
                          i,
                          r,
                          o,
                          u,
                          s,
                          l,
                          v,
                          y
                        ))));
            },
            addContinuousEvent: function (n, t, r, u) {
              var f = n._continuousEvents;
              f.push({
                element: r,
                isAllDay: u,
                uid: r.attr(i.attr("uid")),
                start: t.start,
                end: t.end,
              });
            },
            _createEventElement: function (t, r, u, f) {
              var h,
                c,
                y = this.eventTemplate,
                e = this.options.editable,
                p = this._isMobile(),
                w = e && e.destroy !== !1 && !p,
                b = e && e.resize !== !1,
                a = r._time("start"),
                v = r._time("end"),
                o = r.start,
                s = r.end,
                k = this.eventResources(r);
              return (
                r._startTime &&
                  a !== i.date.getMilliseconds(r.start) &&
                  ((o = new Date(a)), (o = i.timezone.apply(o, "Etc/UTC"))),
                r._endTime &&
                  v !== i.date.getMilliseconds(r.end) &&
                  ((s = new Date(v)), (s = i.timezone.apply(s, "Etc/UTC"))),
                (h = l(
                  {},
                  {
                    ns: i.ns,
                    resizable: b,
                    showDelete: w,
                    head: u,
                    tail: f,
                    singleDay: 1 == this._dates.length,
                    resources: k,
                    inverseColor: !1,
                    messages: this.options.messages,
                  },
                  r,
                  { start: o, end: s }
                )),
                (c = n(y(h))),
                this.angular("compile", function () {
                  return { elements: c, data: [{ dataItem: h }] };
                }),
                c
              );
            },
            _arrangeRows: function (n, t, i) {
              var r,
                u,
                c,
                e,
                f,
                l,
                o = t.start.index,
                a = t.end.index,
                h = n.slotRange.innerRect(n.start, n.end, !1),
                v = h.right + this.options.eventMinWidth,
                y = it(t.events(), h.left, v);
              for (
                t.addEvent({
                  slotIndex: o,
                  start: o,
                  end: a,
                  rectLeft: h.left,
                  rectRight: v,
                  element: n.element,
                  uid: n.uid,
                }),
                  y.push({ start: o, end: a, uid: n.uid }),
                  r = s.createRows(y),
                  i.maxRowCount < r.length && (i.maxRowCount = r.length),
                  u = 0,
                  c = r.length;
                u < c;
                u++
              )
                for (e = r[u].events, f = 0, l = e.length; f < l; f++)
                  i.events[e[f].uid].rowIndex = u;
            },
            _groupCount: function () {
              var n = this.groupedResources,
                t = this._groupedView;
              return n.length
                ? "vertical" === this._groupOrientation()
                  ? t._verticalCountForLevel(n.length - 1)
                  : t._horizontalCountForLevel(
                      n.length - 1,
                      this.columnLevels.length - 1
                    )
                : 1;
            },
            _updateEventForSelection: function (n) {
              var t = this._adjustEvent(n.clone());
              return t.occurrence;
            },
            _eventOptionsForMove: function (n) {
              return n.isAllDay ? { isAllDay: !1 } : {};
            },
            _updateEventForResize: function (n) {
              n.isAllDay && n.set("isAllDay", !1);
            },
            _updateMoveHint: function (n, t, i) {
              var f,
                o,
                u,
                s = this.groups[t],
                r = n.clone({ start: n.start, end: n.end }),
                h = r.duration();
              if (
                ((r.start = new Date(r.start.getTime() + i)),
                (r.end = new Date(+r.start + h)),
                this._removeMoveHint(n.uid),
                this._isInDateSlot(r) &&
                  (r.isAllDay || r.duration() >= e || this._isInTimeSlot(r)))
              )
                for (
                  f = this._adjustEvent(r),
                    o = s.slotRanges(f.occurrence, !1),
                    u = 0;
                  u < o.length;
                  u++
                )
                  this._groupedView._createMoveHint(o[u], f);
            },
            _appendMoveHint: function (n) {
              n.appendTo(this.content);
              this._moveHint = this._moveHint.add(n);
            },
            _updateResizeHint: function (n, t, r, u) {
              var h,
                e,
                l,
                f,
                c,
                o,
                v,
                y,
                p,
                a,
                w,
                k = this.groups[t],
                b = k.ranges(r, u, !1, !1);
              for (this._removeResizeHint(), h = 0; h < b.length; h++) {
                if (
                  ((e = b[h]),
                  (l = e.startSlot()),
                  (f = e.innerRect(r, u, !1)),
                  (f.top = l.offsetTop),
                  (c = f.right - f.left),
                  c < 0)
                )
                  for (o = 0; o < e.events().length; o++)
                    if (e.events()[o].uid === n.uid) {
                      c = e.events()[o].rectRight - f.left;
                      break;
                    }
                v = e.endSlot().offsetTop + l.offsetHeight - f.top;
                y = this._adjustLeftPosition(f.left);
                p = s.fn._createResizeHint.call(this, y, f.top, c, v);
                this._resizeHint = this._resizeHint.add(p);
              }
              a = "t";
              w = this.content;
              this._resizeHint.appendTo(w);
              this._resizeHint.find(".k-label-top,.k-label-bottom").text("");
              this._resizeHint
                .first()
                .addClass("k-first")
                .find(".k-label-top")
                .text(i.toString(i.timezone.toLocalDate(r), a));
              this._resizeHint
                .last()
                .addClass("k-last")
                .find(".k-label-bottom")
                .text(i.toString(i.timezone.toLocalDate(u), a));
            },
            selectionByElement: function (n) {
              var t = n.offset();
              return this._slotByPosition(t.left, t.top);
            },
            _updateDirection: function (n, t, i, r, u) {
              var f = t[0].start,
                e = t[t.length - 1].end;
              i &&
                !u &&
                f.index === e.index &&
                f.collectionIndex === e.collectionIndex &&
                (n.backward = r);
            },
            _changeGroup: function (n, t) {
              var r = t ? "prevGroupSlot" : "nextGroupSlot",
                i = this[r](n.start, n.groupIndex, !1);
              return (
                i && (n.groupIndex += t ? -1 : 1),
                this._groupedView._changeGroup(n, t, i),
                i
              );
            },
            prevGroupSlot: function (n, t, i) {
              var r = this.groups[t],
                u = r.ranges(n, n, i, !1)[0].start;
              if (!(t <= 0)) return this._groupedView._prevGroupSlot(u, r, i);
            },
            nextGroupSlot: function (n, t, i) {
              var r = this.groups[t],
                u = r.ranges(n, n, i, !1)[0].start;
              if (!(t >= this.groups.length - 1))
                return this._groupedView._nextGroupSlot(u, r, i);
            },
            _verticalSlots: function (n, t, i, r) {
              var e = this._groupedView,
                s = e._verticalMethod(r, i),
                u = t[0].start,
                f = t[t.length - 1].end,
                h = this.groups[n.groupIndex],
                o = e._normalizeVerticalSelection(n, t, r, i);
              return (
                o && (u = f = o),
                (u = h[s](u)),
                (f = h[s](f)),
                i ||
                  !this._isVerticallyGrouped() ||
                  (u && f) ||
                  (u = f = e._verticalSlots(n, r, o)),
                { startSlot: u, endSlot: f }
              );
            },
            _horizontalSlots: function (n, t, i, r) {
              var f = r ? "upSlot" : "downSlot",
                e = t[0].start,
                o = t[t.length - 1].end,
                s = this.groups[n.groupIndex],
                u = {};
              return (
                i
                  ? ((u.startSlot = s[f](e)),
                    (u.endSlot = s[f](o)),
                    i ||
                      !this._isHorizontallyGrouped() ||
                      (e && o) ||
                      (u.startSlot = u.endSlot = this._changeGroup(n, r)))
                  : (u = this._groupedView._horizontalSlots(
                      n,
                      s,
                      f,
                      e,
                      o,
                      i,
                      r
                    )),
                u
              );
            },
            _changeViewPeriod: function (n, t) {
              var o,
                s = t ? this.previousDate() : this.nextDate(),
                f = n.start,
                i = n.end,
                h = new Date(s),
                c = new Date(s);
              return (
                !this._isInRange(h, c) &&
                ((n.start = h),
                (n.end = c),
                this._isHorizontallyGrouped() &&
                  (n.groupIndex = t ? this.groups.length - 1 : 0),
                (o = i - f),
                t
                  ? ((i = u(this.endTime())),
                    (i = 0 === i ? e : i),
                    r(n.start, i - o),
                    r(n.end, i))
                  : ((f = u(this.startTime())), r(n.start, f), r(n.end, f + o)),
                (n.events = []),
                !0)
              );
            },
            move: function (n, t, r) {
              var s,
                h,
                u,
                f,
                l,
                e = !1,
                v = this.groups[n.groupIndex],
                o = i.keys,
                a = this._groupedView,
                c = v.ranges(n.start, n.end, !1, !1);
              if (t === o.DOWN || t === o.UP) {
                if (
                  ((e = !0),
                  (u = t === o.UP),
                  a._updateDirection(n, c, r, u),
                  (f = this._verticalSlots(n, c, r, u)),
                  a._changeVerticalViewPeriod(f, r, n, u))
                )
                  return e;
              } else if (
                (t === o.LEFT || t === o.RIGHT) &&
                ((e = !0),
                (u = t === o.LEFT),
                this._updateDirection(n, c, r, u, !1),
                (f = this._horizontalSlots(n, c, r, u)),
                a._changeHorizontalViewPeriod(f, r, n, u))
              )
                return e;
              return (
                e &&
                  ((s = f.startSlot),
                  (h = f.endSlot),
                  r
                    ? ((l = n.backward),
                      l && s
                        ? (n.start = s.startDate())
                        : !l && h && (n.end = h.endDate()))
                    : s &&
                      h &&
                      ((n.start = s.startDate()), (n.end = h.endDate())),
                  (n.events = [])),
                e
              );
            },
            destroy: function () {
              var n = this;
              n.element && n.element.off(o);
              n.footer && n.footer.remove();
              n._currentTimeUpdateTimer &&
                clearInterval(n._currentTimeUpdateTimer);
              s.fn.destroy.call(this);
              this._isMobile() &&
                n.options.editable &&
                (n.options.editable.create !== !1 && n._addUserEvents.destroy(),
                n.options.editable.update !== !1 &&
                  n._editUserEvents.destroy());
            },
          });
          l(!0, k, {
            TimelineView: c,
            TimelineWeekView: c.extend({
              options: {
                name: "TimelineWeekView",
                title: "Timeline Week",
                selectedDateFormat: "{0:D} - {1:D}",
                selectedShortDateFormat: "{0:d} - {1:d}",
                selectedMobileDateFormat: "{0:MMM dd} - {1:dd}",
                majorTick: 120,
              },
              name: "timelineWeek",
              calculateDateRange: function () {
                for (
                  var f = this.options.date,
                    t = i.date.dayOfWeek(f, this.calendarInfo().firstDay, -1),
                    u = [],
                    n = 0,
                    r = 7;
                  n < r;
                  n++
                )
                  u.push(t), (t = i.date.nextDay(t));
                this._render(u);
              },
            }),
            TimelineWorkWeekView: c.extend({
              options: {
                name: "TimelineWorkWeekView",
                title: "Timeline Work Week",
                selectedDateFormat: "{0:D} - {1:D}",
                selectedShortDateFormat: "{0:d} - {1:d}",
                selectedMobileDateFormat: "{0:MMM dd} - {1:dd}",
                majorTick: 120,
              },
              name: "timelineWorkWeek",
              nextDate: function () {
                var n = i.date.dayOfWeek(
                  i.date.nextDay(this.endDate()),
                  this.calendarInfo().firstDay,
                  1
                );
                return i.date.addDays(n, this._workDays[0]);
              },
              previousDate: function () {
                var t = i.date.dayOfWeek(
                    this.startDate(),
                    this.calendarInfo().firstDay,
                    -1
                  ),
                  n = this._workDays;
                return i.date.addDays(t, n[n.length - 1] - 7);
              },
              calculateDateRange: function () {
                for (
                  var r = this.options.date,
                    n = i.date.dayOfWeek(r, this.options.workWeekStart, -1),
                    u = i.date.dayOfWeek(n, this.options.workWeekEnd, 1),
                    t = [];
                  n <= u;

                )
                  t.push(n), (n = i.date.nextDay(n));
                this._render(t);
              },
            }),
            TimelineMonthView: c.extend({
              options: {
                name: "TimelineMonthView",
                title: "Timeline Month",
                selectedDateFormat: "{0:D} - {1:D}",
                selectedShortDateFormat: "{0:d} - {1:d}",
                workDayStart: new Date(1980, 1, 1, 0, 0, 0),
                workDayEnd: new Date(1980, 1, 1, 23, 59, 59),
                footer: !1,
                majorTick: 1440,
                minorTickCount: 1,
              },
              name: "timelineMonth",
              calculateDateRange: function () {
                for (
                  var u = this.options.date,
                    t = i.date.firstDayOfMonth(u),
                    e = i.date.lastDayOfMonth(u),
                    f = [],
                    n = 0,
                    r = e.getDate();
                  n < r;
                  n++
                )
                  f.push(t), (t = i.date.nextDay(t));
                this._render(f);
              },
            }),
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.scheduler.min",
      [
        "kendo.dropdownlist.min",
        "kendo.editable.min",
        "kendo.multiselect.min",
        "kendo.window.min",
        "kendo.datetimepicker.min",
        "kendo.scheduler.recurrence.min",
        "kendo.scheduler.view.min",
        "kendo.scheduler.dayview.min",
        "kendo.scheduler.agendaview.min",
        "kendo.scheduler.monthview.min",
        "kendo.scheduler.timelineview.min",
        "kendo.dialog.min",
        "kendo.pane.min",
        "kendo.pdf.min",
        "kendo.switch.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function gt(n, t) {
            return (
              (t = t || ""),
              n.startTimezone &&
                ((t = n.startTimezone),
                n.endTimezone && (t += " | " + n.endTimezone)),
              t
            );
          }
          function ni(n, t) {
            var r = t.timezone;
            r && (n[i.attr("timezone")] = r);
          }
          function ti(n, t) {
            var r,
              u = t.model.fields[t.field].validation;
            u &&
              ((r = u.validDateValidator),
              r &&
                s(r) &&
                r.message &&
                (n[i.attr("validDate-msg")] = r.message));
          }
          function ii(n, t) {
            var r,
              u = t.model.fields[t.field].validation;
            u &&
              ((r = u.dateCompare),
              r &&
                s(r) &&
                r.message &&
                (n[i.attr("dateCompare-msg")] = r.message));
          }
          function ir(n, t) {
            return function (i) {
              return (i = n(i)), ri(i, "apply", t), i || [];
            };
          }
          function rr(n, t) {
            return function (r) {
              return (
                r &&
                  ("[object Array]" === yr.call(r) ||
                    r instanceof i.data.ObservableArray ||
                    (r = [r])),
                ri(r, "remove", t, !0),
                (r = n(r)),
                r || []
              );
            };
          }
          function ri(n, t, r, u) {
            var f, e, o;
            for (n = n || [], e = 0, o = n.length; e < o; e++)
              (f = n[e]),
                u
                  ? f.startTimezone || f.endTimezone
                    ? r
                      ? ((f.start = i.timezone.convert(
                          f.start,
                          f.startTimezone || f.endTimezone,
                          r
                        )),
                        (f.end = i.timezone.convert(
                          f.end,
                          f.endTimezone || f.startTimezone,
                          r
                        )),
                        (f.start = i.timezone[t](f.start, r)),
                        (f.end = i.timezone[t](f.end, r)))
                      : ((f.start = i.timezone[t](
                          f.start,
                          f.startTimezone || f.endTimezone
                        )),
                        (f.end = i.timezone[t](
                          f.end,
                          f.endTimezone || f.startTimezone
                        )))
                    : r &&
                      ((f.start = i.timezone[t](f.start, r)),
                      (f.end = i.timezone[t](f.end, r)))
                  : f.startTimezone || f.endTimezone
                  ? ((f.start = i.timezone[t](
                      f.start,
                      f.startTimezone || f.endTimezone
                    )),
                    (f.end = i.timezone[t](
                      f.end,
                      f.endTimezone || f.startTimezone
                    )),
                    r &&
                      ((f.start = i.timezone.convert(
                        f.start,
                        f.startTimezone || f.endTimezone,
                        r
                      )),
                      (f.end = i.timezone.convert(
                        f.end,
                        f.endTimezone || f.startTimezone,
                        r
                      ))))
                  : r &&
                    ((f.start = i.timezone[t](f.start, r)),
                    (f.end = i.timezone[t](f.end, r))),
                u && delete f.uid;
            return n;
          }
          function ui(n, t) {
            for (var i, u = n.length, r = 0; r < u; r++)
              if (((i = n[r]), i.uid === t)) return i;
          }
          function fi(n, t, r) {
            return r ? i.timezone.convert(n, t, r) : i.timezone.remove(n, t);
          }
          function ei(n) {
            var t, r;
            return (
              !(
                (n.filter("[name=start]").length &&
                  n.filter("[title=Start]").length) ||
                (n.filter("[name=end]").length &&
                  n.filter("[title=End]").length)
              ) ||
              ((r = i.widgetInstance(n, i.ui)),
              r
                ? ((t = i.parseDate(n.val(), r.options.format)),
                  !!t && r.value())
                : ((t = i.parseDate(n.val())), !!t))
            );
          }
          function ur(n) {
            var o, f, s, t, r, c, l, a, h, v, u, e;
            return (
              !(
                n.filter("[name=end]").length &&
                ((o = n.closest(".k-scheduler-edit-form")),
                (f = o.find("[name=start]:visible")),
                (s = o.find("[name=end]:visible")),
                s[0] &&
                  f[0] &&
                  ((c = i.widgetInstance(f, i.ui)),
                  (l = i.widgetInstance(s, i.ui)),
                  (a = o.data("kendoEditable")),
                  (h = a ? a.options.model : null),
                  c && l
                    ? ((t = c.value()), (r = l.value()))
                    : ((t = i.parseDate(f.val())), (r = i.parseDate(s.val()))),
                  t && r))
              ) ||
              (h &&
                ((v = f.attr(i.attr("timezone"))),
                (u = h.startTimezone),
                (e = h.endTimezone),
                (u = u || e),
                (e = e || u),
                u && ((t = fi(t, u, v)), (r = fi(r, e, v)))),
              t <= r)
            );
          }
          function fr(n, t, i, r) {
            for (var e = n.length, u = [], f = 0; f < e; f++)
              u = u.concat(n[f].expand(t, i, r));
            return u;
          }
          function er(n) {
            return (
              delete n.name,
              delete n.prefix,
              delete n.remove,
              delete n.edit,
              delete n.add,
              delete n.navigate,
              n
            );
          }
          function k(t, r) {
            var u,
              f,
              o = (t.fields || t)[r],
              c = ["url", "email", "number", "date", "boolean"],
              h = o ? o.validation : {},
              l = i.attr("type"),
              a = n.inArray,
              e = {};
            for (u in h)
              (f = h[u]),
                a(u, c) >= 0
                  ? (e[l] = u)
                  : i.isFunction(f) || (e[u] = s(f) ? f.value || u : f),
                (e[i.attr(u + "-msg")] = f.message);
            return e;
          }
          function or(t, r) {
            var u = k(r, t.field);
            return function (f) {
              n(
                i.format(
                  '<select data-{0}bind="value:{1}" title="' + r.title + '">',
                  i.ns,
                  t.field
                )
              )
                .appendTo(f)
                .attr(u)
                .kendoDropDownList({
                  dataTextField: t.dataTextField,
                  dataValueField: t.dataValueField,
                  dataSource: t.dataSource,
                  valuePrimitive: t.valuePrimitive,
                  optionLabel: "None",
                  template: i.format(
                    '<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',
                    t.dataColorField,
                    t.dataTextField
                  ),
                });
            };
          }
          function sr(t, r) {
            var u = k(r, t.field);
            return function (r) {
              for (
                var s = "", e = t.dataSource.view(), f = 0, o = e.length;
                f < o;
                f++
              )
                s += i.format(
                  '<option value="{0}">{1}</option>',
                  i.getter(t.dataValueField)(e[f]),
                  i.getter(t.dataTextField)(e[f])
                );
              n(
                i.format(
                  '<select data-{0}bind="value:{1}">{2}</select>',
                  i.ns,
                  t.field,
                  s,
                  t.valuePrimitive
                )
              )
                .appendTo(r)
                .attr(u);
            };
          }
          function oi(t) {
            var i = k(t.model, t.field);
            return function (t, r) {
              n(
                '<textarea name="description" class="k-textbox" title="' +
                  r.title +
                  '"/>'
              )
                .attr(i)
                .appendTo(t);
            };
          }
          function hr(t, r) {
            var u = k(r, t.field);
            return function (r) {
              n(i.format('<select data-{0}bind="value:{1}">', i.ns, t.field))
                .appendTo(r)
                .attr(u)
                .kendoMultiSelect({
                  dataTextField: t.dataTextField,
                  dataValueField: t.dataValueField,
                  dataSource: t.dataSource,
                  valuePrimitive: t.valuePrimitive,
                  itemTemplate: i.format(
                    '<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',
                    t.dataColorField,
                    t.dataTextField
                  ),
                  tagTemplate: i.format(
                    '<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',
                    t.dataColorField,
                    t.dataTextField
                  ),
                });
            };
          }
          function cr(t, r) {
            var u = k(r, t.field);
            return function (r) {
              for (
                var s = "", e = t.dataSource.view(), f = 0, o = e.length;
                f < o;
                f++
              )
                s += i.format(
                  '<option value="{0}">{1}</option>',
                  i.getter(t.dataValueField)(e[f]),
                  i.getter(t.dataTextField)(e[f])
                );
              n(
                i.format(
                  '<select data-{0}bind="value:{1}" multiple="multiple" data-{0}value-primitive="{3}">{2}</select>',
                  i.ns,
                  t.field,
                  s,
                  t.valuePrimitive
                )
              )
                .appendTo(r)
                .attr(u);
            };
          }
          function vt(n, t) {
            var r,
              f = n.end.getTime() - n.start.getTime(),
              u = new Date(n.start.getTime());
            return (
              i.date.setTime(u, t),
              (r = new Date(u.getTime())),
              i.date.setTime(r, f, !0),
              { start: u, end: r }
            );
          }
          var yt,
            pt,
            ft,
            si,
            hi,
            et,
            ci,
            wt,
            li,
            ai,
            vi,
            yi,
            i = window.kendo,
            pi = i.date,
            ot = pi.MS_PER_DAY,
            c = pi.getDate,
            bt = i.date.getMilliseconds,
            y = i.recurrence,
            f = n.extend({ F10: 121 }, i.keys),
            p = i.ui,
            v = p.Widget,
            lr = p.DataBoundWidget,
            d = "string",
            ar = p.Popup,
            vr = p.Calendar,
            w = i.data.DataSource,
            s = n.isPlainObject,
            e = n.extend,
            l = n.proxy,
            yr = Object.prototype.toString,
            st = n.isArray,
            r = ".kendoScheduler",
            o = "click",
            ht = "mousedown",
            pr = i.support.pointers ? "pointerdown" : "touchstart",
            wi = i.support.pointers ? "pointermove" : "touchmove",
            wr = i.support.pointers ? "pointerup" : "touchend",
            bi = i.support.mousemove,
            g = "change",
            nt = "progress",
            tt = "error",
            ct = "cancel",
            it = "remove",
            ki = "resetSeries",
            kt = "save",
            di = "add",
            rt = "edit",
            u = "k-state-focused",
            h = "k-state-expanded",
            a = ".k-scheduler-views",
            br = "k-event-inverse",
            kr = /(?:value:start|value:end)(?:,|$)/,
            dt = c(new Date()),
            ut = ",",
            gi = /\;/g,
            lt = "recurrenceException",
            dr =
              "Do you want to delete only this event occurrence or the whole series?",
            nr =
              "Do you want to edit only this event occurrence or the whole series?",
            gr = "Are you sure you want to delete this event occurrence?",
            nu = "Are you sure you want to reset the whole series?",
            tu = "Are you sure you want to delete the whole series?",
            iu =
              '<a class="k-button #=className#" #=attr# href="\\#">#=text#</a>',
            ru = i.template(
              '<li class="k-current-view" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>'
            ),
            uu = i.template(
              '<div class="k-floatwrap k-header k-scheduler-toolbar"># if (pdf) { #<ul class="k-reset k-scheduler-tools"><li><a role="button" href="\\#" class="k-button k-pdf"><span class="k-icon k-i-file-pdf"></span>${messages.pdf}</a></li></ul># } #<ul class="k-reset k-scheduler-navigation"><li class="k-state-default k-header k-nav-today"><a role="button" href="\\#" class="k-link" title="${messages.today}">${messages.today}</a></li><li class="k-state-default k-header k-nav-prev"><a role="button" href="\\#" class="k-link" title="${messages.previous}" aria-label="${messages.previous}"><span class="k-icon k-i-arrow-60-left" style="pointer-events: none"></span></a></li><li class="k-state-default k-header k-nav-next"><a role="button" href="\\#" class="k-link" title="${messages.next}" aria-label="${messages.next}"><span class="k-icon k-i-arrow-60-right" style="pointer-events: none"></span></a></li><li class="k-state-default k-nav-current"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-calendar"></span><span class="k-sm-date-format" data-#=ns#bind="text: formattedShortDate"></span><span class="k-lg-date-format" data-#=ns#bind="text: formattedDate"></span></a></li></ul>#if(viewsCount === 1){#<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-link k-scheduler-refresh"><span class="k-icon k-i-reload"></span></a>#}else{#<ul class="k-reset k-header k-scheduler-views">#for(var view in views){#<li class="k-state-default k-view-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>#}#</ul>#}#</div>'
            ),
            fu = i.template(
              '<div class="k-header k-scheduler-toolbar"><ul class="k-reset k-scheduler-tools"># if (pdf) { #<li><a role="button" href="\\#" class="k-button k-pdf"><span class="k-icon k-i-file-pdf"></span></a></li># } #<li><a role="button" href="\\#" class="k-button k-nav-calendar"><span class="k-icon k-i-calendar"></span></a></li># if (editable) { #<li><a role="button" href="\\#" class="k-button k-create-event"><span class="k-icon k-i-plus"></span></a></li># } #</ul>#if(viewsCount === 1){#<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-link k-scheduler-refresh"><span class="k-icon k-i-reload"></span></a>#}else{#<select class="k-scheduler-mobile-views">#for(var view in views){#<option class="k-state-default k-view-#= view.toLowerCase() #" value="#=view#">${views[view].title}</option>#}#</select>#}#</div><div class="k-header k-scheduler-toolbar"><ul class="k-reset k-header k-scheduler-navigation"><li class="k-state-default k-nav-prev"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-chevron-left"></span></a></li><li class="k-state-default k-nav-current"><span class="k-m-date-format" data-#=ns#bind="text: formattedMobileDate"></span><span class="k-y-date-format" data-#=ns#bind="text: formattedYear"></span></li><li class="k-state-default k-nav-next"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-chevron-right"></span></a></li></ul></div>'
            ),
            eu = function (t, r) {
              var u = { name: r.field, title: r.title },
                f = r.model.isAllDay,
                e = i.attr("validate") + "='" + !f + "'",
                o = i.attr("validate") + "='" + f + "'";
              ni(u, r);
              ti(u, r);
              ii(u, r);
              n(
                '<input type="datetime-local" required ' +
                  i.attr("type") +
                  '="datetime-local" ' +
                  i.attr("bind") +
                  '="value:' +
                  r.field +
                  ', invisible:isAllDay" ' +
                  e +
                  "/>"
              )
                .attr(u)
                .appendTo(t);
              n(
                '<input type="date" required ' +
                  i.attr("type") +
                  '="date" ' +
                  i.attr("bind") +
                  '="value:' +
                  r.field +
                  ',visible:isAllDay" ' +
                  o +
                  "/>"
              )
                .attr(u)
                .appendTo(t);
              n(
                "<span " +
                  i.attr("for") +
                  '="' +
                  r.field +
                  '" class="k-invalid-msg"/>'
              )
                .hide()
                .appendTo(t);
            },
            ou = function (t, r) {
              var u = { name: r.field, title: r.title },
                f = r.model.isAllDay,
                e = i.attr("validate") + "='" + !f + "' ",
                o = i.attr("validate") + "='" + f + "' ";
              ni(u, r);
              ti(u, r);
              ii(u, r);
              n(
                '<input type="text" required ' +
                  i.attr("type") +
                  '="date" ' +
                  i.attr("role") +
                  '="datetimepicker" ' +
                  i.attr("bind") +
                  '="value:' +
                  r.field +
                  ',invisible:isAllDay" ' +
                  e +
                  "/>"
              )
                .attr(u)
                .appendTo(t);
              n(
                '<input type="text" required ' +
                  i.attr("type") +
                  '="date" ' +
                  i.attr("role") +
                  '="datepicker" ' +
                  i.attr("bind") +
                  '="value:' +
                  r.field +
                  ',visible:isAllDay" ' +
                  o +
                  "/>"
              )
                .attr(u)
                .appendTo(t);
              n(
                "<span " +
                  i.attr("bind") +
                  '="text: ' +
                  r.field +
                  'Timezone"></span>'
              ).appendTo(t);
              "end" === r.field &&
                n(
                  "<span " +
                    i.attr("bind") +
                    '="text: startTimezone, invisible: endTimezone"></span>'
                ).appendTo(t);
              n(
                "<span " +
                  i.attr("for") +
                  '="' +
                  r.field +
                  '" class="k-invalid-msg"/>'
              )
                .hide()
                .appendTo(t);
            },
            su = function (t, r) {
              n("<div " + i.attr("bind") + '="value:' + r.field + '" />')
                .attr({ name: r.field })
                .appendTo(t)
                .kendoRecurrenceEditor({
                  start: r.model.start,
                  timezone: r.timezone,
                  messages: r.messages,
                });
            },
            hu = function (t, r) {
              n("<div " + i.attr("bind") + '="value:' + r.field + '" />')
                .attr({ name: r.field })
                .appendTo(t)
                .kendoMobileRecurrenceEditor({
                  start: r.model.start,
                  timezone: r.timezone,
                  messages: r.messages,
                  pane: r.pane,
                  value: r.model[r.field],
                });
            },
            cu = function (t, r) {
              n(
                '<input type="checkbox" data-role="switch"' +
                  i.attr("bind") +
                  '="value:' +
                  r.field +
                  '" />'
              ).appendTo(t);
            },
            lu = function (t, i) {
              var r = gt(i.model, i.messages.noTimezone);
              n('<span class="k-timezone-label"></span>').text(r).appendTo(t);
              n(
                '<span class="k-icon k-i-arrow-chevron-right"></span>'
              ).appendTo(t);
              t.closest("li.k-item label").click(i.click);
            },
            au = function (t, i) {
              n(
                '<a href="#" class="k-button" data-bind="invisible:isAllDay">' +
                  i.messages.timezoneEditorButton +
                  "</a>"
              )
                .click(i.click)
                .appendTo(t);
            },
            vu = function (t, r) {
              n(
                '<div class="k-mobiletimezoneeditor" ' +
                  i.attr("bind") +
                  '="value:' +
                  r.field +
                  '" />'
              )
                .attr({ name: r.field })
                .appendTo(t)
                .kendoMobileTimezoneEditor({ optionLabel: r.noTimezone });
            },
            yu = function (r, u) {
              var f = u.visible || u.visible === t;
              n("<div " + i.attr("bind") + '="value:' + u.field + '" />')
                .attr({ name: u.field })
                .toggle(f)
                .appendTo(r)
                .kendoTimezoneEditor({
                  optionLabel: u.noTimezone,
                  title: u.title,
                });
            },
            tr = i.Class.extend({
              init: function (t, i) {
                var r = t.timezone;
                this.reader = i;
                i.model && (this.model = i.model);
                this.timezone = r;
                this.data = ir(n.proxy(this.data, this), r);
                this.serialize = rr(n.proxy(this.serialize, this), r);
              },
              errors: function (n) {
                return this.reader.errors(n);
              },
              parse: function (n) {
                return this.reader.parse(n);
              },
              data: function (n) {
                return this.reader.data(n);
              },
              total: function (n) {
                return this.reader.total(n);
              },
              groups: function (n) {
                return this.reader.groups(n);
              },
              aggregates: function (n) {
                return this.reader.aggregates(n);
              },
              serialize: function (n) {
                return this.reader.serialize(n);
              },
            }),
            at = i.data.Model.define({
              init: function (n) {
                var t = this;
                i.data.Model.fn.init.call(t, n);
                t._defaultId = t.defaults[t.idField];
              },
              _time: function (n) {
                var t = this[n],
                  r = "_" + n + "Time";
                return this[r]
                  ? this[r] - i.date.toUtcTime(i.date.getDate(t))
                  : bt(t);
              },
              _date: function (n) {
                var t = "_" + n + "Time";
                return this[t]
                  ? this[t] - this._time(n)
                  : i.date.getDate(this[n]);
              },
              clone: function (t, i) {
                var u = this.uid,
                  r = new this.constructor(n.extend({}, this.toJSON(), t));
                return i || (r.uid = u), r;
              },
              duration: function () {
                var n = this.end,
                  t = this.start,
                  r =
                    (n.getTimezoneOffset() - t.getTimezoneOffset()) *
                    i.date.MS_PER_MINUTE;
                return n - t - r;
              },
              expand: function (n, t, i) {
                return y ? y.expand(this, n, t, i) : [this];
              },
              update: function (n) {
                for (var t in n) this.set(t, n[t]);
                this._startTime &&
                  this.set("_startTime", i.date.toUtcTime(this.start));
                this._endTime &&
                  this.set("_endTime", i.date.toUtcTime(this.end));
              },
              isMultiDay: function () {
                return this.isAllDay || this.duration() >= i.date.MS_PER_DAY;
              },
              isException: function () {
                return !this.isNew() && this.recurrenceId;
              },
              isOccurrence: function () {
                return this.isNew() && this.recurrenceId;
              },
              isRecurring: function () {
                return !(!this.recurrenceRule && !this.recurrenceId);
              },
              isRecurrenceHead: function () {
                return !(!this.id || !this.recurrenceRule);
              },
              toOccurrence: function (t) {
                return (
                  (t = n.extend(t, {
                    recurrenceException: null,
                    recurrenceRule: null,
                    recurrenceId: this.id || this.recurrenceId,
                  })),
                  (t[this.idField] = this.defaults[this.idField]),
                  this.clone(t, !0)
                );
              },
              toJSON: function () {
                var n = i.data.Model.fn.toJSON.call(this);
                return (
                  (n.uid = this.uid), delete n._startTime, delete n._endTime, n
                );
              },
              shouldSerialize: function (n) {
                return (
                  i.data.Model.fn.shouldSerialize.call(this, n) &&
                  "_defaultId" !== n
                );
              },
              set: function (n, t) {
                var f,
                  r,
                  u,
                  e = this.isAllDay || !1;
                i.data.Model.fn.set.call(this, n, t);
                "isAllDay" == n &&
                  t != e &&
                  ((f = i.date.getDate(this.start)),
                  (r = new Date(this.end)),
                  (u = i.date.getMilliseconds(r)),
                  0 === u && t && (u = ot),
                  this.set("start", f),
                  t === !0
                    ? (i.date.setTime(r, -u), r < f && (r = f))
                    : i.date.setTime(r, ot - u),
                  this.set("end", r));
              },
              id: "id",
              fields: {
                id: { type: "number" },
                title: { defaultValue: "", type: "string" },
                start: {
                  type: "date",
                  validation: { required: !0, validDate: { value: ei } },
                },
                startTimezone: { type: "string" },
                end: {
                  type: "date",
                  validation: {
                    required: !0,
                    validDate: { value: ei },
                    dateCompare: { value: ur },
                  },
                },
                endTimezone: { type: "string" },
                recurrenceRule: { defaultValue: "", type: "string" },
                recurrenceException: { defaultValue: "", type: "string" },
                isAllDay: { type: "boolean", defaultValue: !1 },
                description: { type: "string" },
              },
            }),
            b = w.extend({
              init: function (n) {
                w.fn.init.call(
                  this,
                  e(!0, {}, { schema: { modelBase: at, model: at } }, n)
                );
                this.reader = new tr(this.options.schema, this.reader);
              },
              expand: function (n, t) {
                var r,
                  u = this.view(),
                  f = {};
                return (
                  n &&
                    t &&
                    ((r = t.getTimezoneOffset()),
                    (t = new Date(t.getTime() + ot - 1)),
                    t.getTimezoneOffset() !== r && (t = i.timezone.apply(t, r)),
                    (f = {
                      logic: "or",
                      filters: [
                        {
                          logic: "and",
                          filters: [
                            { field: "start", operator: "gte", value: n },
                            { field: "end", operator: "gte", value: n },
                            { field: "start", operator: "lte", value: t },
                          ],
                        },
                        {
                          logic: "and",
                          filters: [
                            {
                              field: "start",
                              operator: "lte",
                              value: new Date(n.getTime() + ot - 1),
                            },
                            { field: "end", operator: "gte", value: n },
                          ],
                        },
                      ],
                    }),
                    (u = new i.data.Query(fr(u, n, t, this.reader.timezone))
                      .filter(f)
                      .toArray())),
                  u
                );
              },
              cancelChanges: function (n) {
                n && n.isOccurrence() && this._removeExceptionDate(n);
                w.fn.cancelChanges.call(this, n);
              },
              insert: function (n, t) {
                if (t) {
                  if (!(t instanceof at)) {
                    var i = t;
                    t = this._createNewModel();
                    t.accept(i);
                  }
                  return (
                    ((!this._pushCreated && t.isRecurrenceHead()) ||
                      t.recurrenceId) &&
                      ((t = t.recurrenceId ? t : t.toOccurrence()),
                      this._addExceptionDate(t)),
                    w.fn.insert.call(this, n, t)
                  );
                }
              },
              pushCreate: function (n) {
                this._pushCreated = !0;
                w.fn.pushCreate.call(this, n);
                this._pushCreated = !1;
              },
              remove: function (n) {
                return (
                  n.isRecurrenceHead()
                    ? this._removeExceptions(n)
                    : n.isRecurring() && this._addExceptionDate(n),
                  w.fn.remove.call(this, n)
                );
              },
              _removeExceptions: function (n) {
                for (var i = this.data().slice(0), t = i.shift(), r = n.id; t; )
                  t.recurrenceId === r && w.fn.remove.call(this, t),
                    (t = i.shift());
                n.set(lt, "");
              },
              _removeExceptionDate: function (n) {
                var t, r, i, u;
                n.recurrenceId &&
                  ((t = this.get(n.recurrenceId)),
                  t &&
                    ((r = n.defaults.start),
                    (i = RegExp(
                      "(\\" +
                        ut +
                        "?)" +
                        y.toExceptionString(r, this.reader.timezone)
                    )),
                    (u = (t.recurrenceException || "")
                      .replace(gi, ut)
                      .replace(/\,$/, "")),
                    i.test(u)
                      ? t.set(lt, u.replace(i, ""))
                      : ((r = n.start),
                        (i = RegExp(
                          "(\\" +
                            ut +
                            "?)" +
                            y.toExceptionString(r, this.reader.timezone)
                        )),
                        t.set(lt, u.replace(i, "")))));
              },
              _addExceptionDate: function (n) {
                var t,
                  i = n.start,
                  u = this.reader.timezone,
                  f = this.get(n.recurrenceId),
                  r = (f.recurrenceException || "")
                    .replace(gi, ut)
                    .replace(/\,$/, "");
                y.isException(r, i, u) ||
                  ((t = y.toExceptionString(i, u)),
                  (n.defaults.start = i),
                  f.set(lt, r + (r && t ? ut : "") + t));
              },
            });
          b.create = function (n) {
            (st(n) || n instanceof i.data.ObservableArray) && (n = { data: n });
            var t = n || {},
              r = t.data;
            if (
              ((t.data = r),
              !(t instanceof b) && t instanceof i.data.DataSource)
            )
              throw Error(
                "Incorrect DataSource type. Only SchedulerDataSource instances are supported"
              );
            return t instanceof b ? t : new b(t);
          };
          e(!0, i.data, {
            SchedulerDataSource: b,
            SchedulerDataReader: tr,
            SchedulerEvent: at,
          });
          yt = {
            update: { text: "Save", className: "k-primary k-scheduler-update" },
            canceledit: { text: "Cancel", className: "k-scheduler-cancel" },
            destroy: {
              text: "Delete",
              imageClass: "k-i-close",
              className: "k-primary k-scheduler-delete",
              iconClass: "k-icon",
            },
          };
          pt = {
            mobile: {
              dateRange: eu,
              timezonePopUp: lu,
              timezone: vu,
              recurrence: hu,
              description: oi,
              multipleResources: cr,
              resources: sr,
              isAllDay: cu,
            },
            desktop: {
              dateRange: ou,
              timezonePopUp: au,
              timezone: yu,
              recurrence: su,
              description: oi,
              multipleResources: hr,
              resources: or,
            },
          };
          ft = i.Observable.extend({
            init: function (n, t) {
              i.Observable.fn.init.call(this);
              this.element = n;
              this.options = e(!0, {}, this.options, t);
              this.createButton = this.options.createButton;
              this.toggleDateValidationHandler = l(
                this._toggleDateValidation,
                this
              );
            },
            _toggleDateValidation: function (t) {
              if ("isAllDay" == t.field) {
                var r,
                  f,
                  e,
                  o = this.container,
                  s = this.editable.options.model.isAllDay,
                  u = i.attr("bind");
                o.find("[" + u + "*=end],[" + u + "*=start]").each(function () {
                  r = n(this);
                  kr.test(r.attr(u)) &&
                    ((f = r.is(
                      "[" + i.attr("role") + "=datetimepicker],[type*=datetime]"
                    )),
                    (e = s !== f),
                    r.attr(i.attr("validate"), e));
                });
              }
            },
            fields: function (n, t) {
              var e,
                f,
                o = this,
                r = o.options.messages,
                s = o.options.timezone,
                h = function (n) {
                  n.preventDefault();
                  o._initTimezoneEditor(t, this);
                },
                u = [
                  { field: "title", title: r.editor.title },
                  {
                    field: "start",
                    title: r.editor.start,
                    editor: n.dateRange,
                    timezone: s,
                  },
                  {
                    field: "end",
                    title: r.editor.end,
                    editor: n.dateRange,
                    timezone: s,
                  },
                  {
                    field: "isAllDay",
                    title: r.editor.allDayEvent,
                    editor: n.isAllDay,
                  },
                ];
              for (
                i.timezone.windows_zones &&
                  (u.push({
                    field: "timezone",
                    title: r.editor.timezone,
                    editor: n.timezonePopUp,
                    click: h,
                    messages: r.editor,
                    model: t,
                  }),
                  u.push({
                    field: "startTimezone",
                    title: r.editor.startTimezone,
                    editor: n.timezone,
                    noTimezone: r.editor.noTimezone,
                  }),
                  u.push({
                    field: "endTimezone",
                    title: r.editor.endTimezone,
                    editor: n.timezone,
                    noTimezone: r.editor.noTimezone,
                  })),
                  t.recurrenceId ||
                    u.push({
                      field: "recurrenceRule",
                      title: r.editor.repeat,
                      editor: n.recurrence,
                      timezone: s,
                      messages: r.recurrenceEditor,
                      pane: this.pane,
                    }),
                  ("description" in t) &&
                    u.push({
                      field: "description",
                      title: r.editor.description,
                      editor: n.description({ model: t, field: "description" }),
                    }),
                  e = 0;
                e < this.options.resources.length;
                e++
              )
                (f = this.options.resources[e]),
                  u.push({
                    field: f.field,
                    title: f.title,
                    editor: f.multiple
                      ? n.multipleResources(f, t)
                      : n.resources(f, t),
                  });
              return u;
            },
            end: function () {
              return this.editable.end();
            },
            _buildDesktopEditTemplate: function (n, t, r) {
              for (
                var u,
                  o,
                  l = this.options.messages,
                  c = e({}, i.Template, this.options.templateSettings),
                  a = c.paramName,
                  f = "",
                  s = 0,
                  h = t.length;
                s < h;
                s++
              )
                (u = t[s]),
                  "startTimezone" === u.field &&
                    ((f +=
                      '<div class="k-popup-edit-form k-scheduler-edit-form k-scheduler-timezones" style="display:none">'),
                    (f += '<div class="k-edit-form-container">'),
                    (f += '<div class="k-edit-label"></div>'),
                    (f +=
                      '<div class="k-edit-field"><label class="k-check"><input class="k-timezone-toggle" type="checkbox" />' +
                      l.editor.separateTimezones +
                      "</label></div>")),
                  (f +=
                    '<div class="k-edit-label"><label for="' +
                    u.field +
                    '">' +
                    (u.title || u.field || "") +
                    "</label></div>"),
                  !n.editable || n.editable(u.field)
                    ? (r.push(u),
                      (f +=
                        "<div " +
                        i.attr("container-for") +
                        '="' +
                        u.field +
                        '" class="k-edit-field"></div>'))
                    : ((o = "#:"),
                      u.field
                        ? ((u = i.expr(u.field, a)),
                          (o += u + "==null?'':" + u))
                        : (o += "''"),
                      (o += "#"),
                      (o = i.template(o, c)),
                      (f += '<div class="k-edit-field">' + o(n) + "</div>")),
                  "endTimezone" === u.field &&
                    (f += this._createEndTimezoneButton());
              return f;
            },
            _buildMobileEditTemplate: function (n, t, r) {
              var s,
                h,
                u,
                o,
                l = this.options.messages,
                c = e({}, i.Template, this.options.templateSettings),
                a = c.paramName,
                f = "";
              for (f += "<ul>", s = 0, h = t.length; s < h; s++)
                (u = t[s]),
                  ("timezone" !== u.field && "recurrenceRule" !== u.field) ||
                    (f += "</ul><ul>"),
                  "startTimezone" === u.field &&
                    ((f +=
                      '<div class="k-popup-edit-form k-scheduler-edit-form k-scheduler-timezones" style="display:none">'),
                    (f += '<ul><li class="k-item"><label class="k-label">'),
                    (f +=
                      '<span class="k-item-title">' +
                      l.editor.separateTimezones +
                      "</span>"),
                    (f +=
                      '<input class="k-timezone-toggle" data-role="switch" type="checkbox">'),
                    (f += "</label></li>")),
                  !n.editable || n.editable(u.field)
                    ? ((f += '<li class="k-item">'),
                      (f +=
                        "timezone" === u.field
                          ? '<label class="k-label" data-bind="css: { k-state-disabled: isAllDay }">'
                          : '<label class="k-label">'),
                      (f +=
                        '<span class="k-item-title">' +
                        (u.title || u.field || "") +
                        "</span>"),
                      r.push(u),
                      (f +=
                        "<div " +
                        i.attr("container-for") +
                        '="' +
                        u.field +
                        '"></div>'))
                    : ((o = "#:"),
                      (f += '<li class="k-item">'),
                      (f += '<label class="k-label k-no-click">'),
                      (f +=
                        '<span class="k-item-title">' +
                        (u.title || u.field || "") +
                        "</span>"),
                      u.field
                        ? ((u = i.expr(u.field, a)),
                          (o += u + "==null?'':" + u))
                        : (o += "''"),
                      (o += "#"),
                      (o = i.template(o, c)),
                      (f += '<span class="k-no-editor">' + o(n) + "</span>")),
                  (f += "</label></li>"),
                  "recurrenceRule" === u.field && (f += "</ul><ul>"),
                  "endTimezone" === u.field &&
                    (f += this._createEndTimezoneButton());
              return f + "</ul>";
            },
            _buildEditTemplate: function (n, t, r, u) {
              var s = e({}, i.Template, this.options.templateSettings),
                f = this.options.editable.template,
                o = "";
              return (
                f
                  ? (typeof f === d && (f = i.unescape(f)),
                    (o += i.template(f, s)(n)))
                  : (o += u
                      ? '<div data-role="content">' +
                        this._buildMobileEditTemplate(n, t, r) +
                        "</div>"
                      : this._buildDesktopEditTemplate(n, t, r)),
                o
              );
            },
            _createEndTimezoneButton: function () {
              return "</ul></div>";
            },
            _revertTimezones: function (n) {
              n.set("startTimezone", this._startTimezone);
              n.set("endTimezone", this._endTimezone);
              delete this._startTimezone;
              delete this._endTimezone;
            },
          });
          si = ft.extend({
            init: function () {
              ft.fn.init.apply(this, arguments);
              this.pane = i.Pane.wrap(this.element, {
                viewEngine: {
                  viewOptions: {
                    renderOnInit: !0,
                    wrap: !1,
                    wrapInSections: !0,
                    detachOnHide: !1,
                    detachOnDestroy: !1,
                  },
                },
              });
              this.pane.element.parent().css("height", this.options.height);
              this.view = this.pane.view();
            },
            options: { animations: { left: "slide", right: "slide:right" } },
            destroy: function () {
              this.close();
              this.unbind();
              this.pane.destroy();
            },
            _initTimezoneEditor: function (t) {
              var l,
                i = this,
                h = i.pane,
                f = i.options.messages,
                u = i.timezoneView,
                c = u
                  ? u.content.find(".k-scheduler-timezones")
                  : i.container.find(".k-scheduler-timezones"),
                e = c.find("input.k-timezone-toggle").data("kendoSwitch"),
                s = c.find("li.k-item:not(.k-zonepicker):last"),
                a = function (n) {
                  if ("startTimezone" === n.field) {
                    var i = t.startTimezone;
                    e.enable(i);
                    i || (s.hide(), t.set("endTimezone", ""), e.value(!1));
                  }
                };
              i._startTimezone = t.startTimezone || "";
              i._endTimezone = t.endTimezone || "";
              u ||
                ((l =
                  '<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list"><div data-role="header" class="k-header"><a href="\\#" class="k-header-cancel k-scheduler-cancel k-link" title="' +
                  f.cancel +
                  '"aria-label="' +
                  f.cancel +
                  '"><span class="k-icon k-i-arrow-chevron-left"></span></a>' +
                  f.editor.timezoneTitle +
                  '<a href="\\#" class="k-header-done k-scheduler-update k-link" title="' +
                  f.save +
                  '" aria-label="' +
                  f.save +
                  '"><span class="k-icon k-i-check"></span></a></div><div data-role="content"></div>'),
                (this.timezoneView = u = h.append(l)),
                u.contentElement.append(c.show()),
                u.element.on(
                  o + r,
                  ".k-scheduler-cancel, .k-scheduler-update",
                  function (r) {
                    var u, e;
                    r.preventDefault();
                    r.stopPropagation();
                    n(this).hasClass("k-scheduler-cancel") &&
                      i._revertTimezones(t);
                    t.unbind("change", a);
                    u = i._editPane;
                    e = gt(t, f.editor.noTimezone);
                    u.content.find(".k-timezone-label").text(e);
                    h.navigate(u, i.options.animations.right);
                  }
                ),
                e.bind("change", function (n) {
                  s.toggle(n.checked);
                  t.set("endTimezone", "");
                }),
                t.bind("change", a));
              e.value(!!t.endTimezone);
              e.enable(!!t.startTimezone);
              t.endTimezone ? s.show() : s.hide();
              h.navigate(u, i.options.animations.left);
            },
            showDialog: function (t) {
              var i = t.buttons.map(function (n) {
                return { text: n.text, action: n.click };
              });
              i.push({ text: this.options.messages.cancel, primary: !0 });
              n("<div />")
                .appendTo(document.body)
                .kendoDialog({
                  close: function () {
                    this.destroy();
                  },
                  modal: { preventScroll: !0 },
                  closable: !1,
                  title: !1,
                  content: t.text,
                  actions: i,
                });
            },
            editEvent: function (t) {
              var a,
                u,
                c,
                f,
                v,
                y,
                e,
                l = this.pane,
                h = "",
                s = this.options.messages,
                p = s.save,
                w = s.destroy,
                b = s.cancel,
                d = s.editor.editorTitle,
                k = s.resetSeries;
              return (
                (h +=
                  '<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list"' +
                  i.attr("uid") +
                  '="' +
                  t.uid +
                  '"><div data-role="header" class="k-header"><a href="\\#" class="k-header-cancel k-scheduler-cancel k-link" title="' +
                  b +
                  '"aria-label="' +
                  b +
                  '"><span class="k-icon k-i-arrow-chevron-left"></span></a>' +
                  d +
                  '<a href="\\#" class="k-header-done k-scheduler-update k-link" title="' +
                  p +
                  '" aria-label="' +
                  p +
                  '"><span class="k-icon k-i-check"></span></a></div>'),
                (a = this.fields(pt.mobile, t)),
                (u = this),
                (c = []),
                (h += this._buildEditTemplate(t, a, c, !0)),
                (h += "</div>"),
                (f = l.append(h)),
                !t.isNew() &&
                  this.options.editable &&
                  this.options.editable.destroy !== !1 &&
                  t.isRecurrenceHead() &&
                  t.recurrenceException &&
                  ((v =
                    '<ul class="k-edit-buttons"><li class="k-item"><span href="#" class="k-scheduler-resetSeries k-label" aria-label="' +
                    k +
                    '">' +
                    k +
                    "</span></li></ul>"),
                  f.contentElement.append(v)),
                !t.isNew() &&
                  this.options.editable &&
                  this.options.editable.destroy !== !1 &&
                  ((y =
                    '<ul class="k-edit-buttons"><li class="k-item"><span href="#" class="k-scheduler-delete k-label" aria-label="' +
                    w +
                    '">' +
                    w +
                    "</span></li></ul>"),
                  f.contentElement.append(y)),
                (this._editPane = f),
                (e = this.container = f.element),
                (this.editable = e
                  .kendoEditable({
                    fields: c,
                    model: t,
                    clearContainer: !1,
                    target: u.options.target,
                    validateOnBlur: !0,
                  })
                  .data("kendoEditable")),
                this.trigger("edit", { container: e, model: t })
                  ? this.trigger("cancel", { container: e, model: t })
                  : (e.on(
                      o + r,
                      "a.k-scheduler-edit, a.k-scheduler-cancel, a.k-scheduler-update, span.k-scheduler-delete, span.k-scheduler-resetSeries",
                      function (i) {
                        var r, f;
                        i.preventDefault();
                        i.stopPropagation();
                        r = n(this);
                        r.hasClass("k-scheduler-edit")
                          ? l.navigate(
                              this._editPane,
                              u.options.animations.right
                            )
                          : ((f = "cancel"),
                            r.hasClass("k-scheduler-update")
                              ? (f = "save")
                              : r.hasClass("k-scheduler-delete")
                              ? (f = "remove")
                              : r.hasClass("k-scheduler-resetSeries") &&
                                (f = ki),
                            u.trigger(f, { container: e, model: t }));
                      }
                    ),
                    l.navigate(f, u.options.animations.left),
                    t.bind("change", u.toggleDateValidationHandler)),
                this.editable
              );
            },
            _views: function () {
              return this.pane.element
                .find(i.roleSelector("view"))
                .not(this.view.element);
            },
            close: function () {
              var n, i, t, r;
              if (this.container) {
                for (
                  this.pane.navigate("", this.options.animations.right),
                    n = this._views(),
                    t = 0,
                    r = n.length;
                  t < r;
                  t++
                )
                  (i = n.eq(t).data("kendoView")), i && i.purge();
                n.remove();
                this.container = null;
                this.editable &&
                  (this.editable.options.model.unbind(
                    "change",
                    this.toggleDateValidationHandler
                  ),
                  this.editable.destroy(),
                  (this.editable = null));
                this.timezoneView = null;
              }
            },
          });
          hi = ft.extend({
            destroy: function () {
              this.close();
              this.unbind();
            },
            editEvent: function (t) {
              var l,
                v,
                u,
                f = this,
                a = f.options.editable,
                h =
                  "<div " +
                  i.attr("uid") +
                  '="' +
                  t.uid +
                  '" class="k-popup-edit-form k-scheduler-edit-form"><div class="k-edit-form-container">',
                c = f.options.messages,
                p = c.save,
                w = c.cancel,
                b = c.destroy,
                k = c.resetSeries,
                d = this.fields(pt.desktop, t),
                y = [];
              return (
                (h += this._buildEditTemplate(t, d, y, !1)),
                (v = s(a) ? a.window : {}),
                (h += '<div class="k-edit-buttons k-state-default">'),
                (h +=
                  this.createButton({ name: "update", text: p, attr: l }) +
                  this.createButton({ name: "canceledit", text: w, attr: l })),
                !t.isNew() &&
                  a.destroy !== !1 &&
                  t.isRecurrenceHead() &&
                  t.recurrenceException &&
                  (h += this.createButton({
                    name: "resetSeries",
                    text: k,
                    attr: l,
                  })),
                t.isNew() ||
                  a.destroy === !1 ||
                  (h += this.createButton({
                    name: "delete",
                    text: b,
                    attr: l,
                  })),
                (h += "</div></div></div>"),
                (u = this.container =
                  n(h)
                    .appendTo(f.element)
                    .eq(0)
                    .kendoWindow(
                      e(
                        {
                          modal: !0,
                          resizable: !1,
                          draggable: !0,
                          title: c.editor.editorTitle,
                          visible: !1,
                          close: function (n) {
                            n.userTriggered &&
                              f.trigger(ct, { container: u, model: t }) &&
                              n.preventDefault();
                          },
                        },
                        v
                      )
                    )),
                (f.editable = u
                  .kendoEditable({
                    fields: y,
                    model: t,
                    clearContainer: !1,
                    validateOnBlur: !0,
                    target: f.options.target,
                  })
                  .data("kendoEditable")),
                f.trigger(rt, { container: u, model: t })
                  ? f.trigger(ct, { container: u, model: t })
                  : (u.data("kendoWindow").center().open(),
                    u.on(o + r, "a.k-scheduler-cancel", function (n) {
                      n.preventDefault();
                      n.stopPropagation();
                      f.trigger(ct, { container: u, model: t });
                    }),
                    u.on(o + r, "a.k-scheduler-update", function (n) {
                      n.preventDefault();
                      n.stopPropagation();
                      f.trigger("save", { container: u, model: t });
                    }),
                    u.on(o + r, "a.k-scheduler-delete", function (n) {
                      n.preventDefault();
                      n.stopPropagation();
                      f.trigger(it, { container: u, model: t });
                    }),
                    u.on(o + r, "a.k-scheduler-resetSeries", function (n) {
                      n.preventDefault();
                      n.stopPropagation();
                      f.trigger(ki, { container: u, model: t });
                    }),
                    i.cycleForm(u),
                    t.bind("change", f.toggleDateValidationHandler)),
                f.editable
              );
            },
            close: function () {
              var n = this,
                t = function () {
                  n.editable &&
                    (n.editable.options.model.unbind(
                      "change",
                      n.toggleDateValidationHandler
                    ),
                    n.editable.destroy(),
                    (n.editable = null),
                    (n.container = null));
                  n.popup && (n.popup.destroy(), (n.popup = null));
                };
              n.editable
                ? (n._timezonePopup &&
                    n._timezonePopup.data("kendoWindow") &&
                    (n._timezonePopup.data("kendoWindow").destroy(),
                    (n._timezonePopup = null)),
                  n.container.is(":visible")
                    ? n.container
                        .data("kendoWindow")
                        .bind("deactivate", t)
                        .close()
                    : t())
                : t();
            },
            _createEndTimezoneButton: function () {
              var t = this.options.messages,
                n = "";
              return (
                (n += '<div class="k-edit-buttons k-state-default">'),
                (n +=
                  this.createButton({ name: "savetimezone", text: t.save }) +
                  this.createButton({
                    name: "canceltimezone",
                    text: t.cancel,
                  })),
                n + "</div></div></div>"
              );
            },
            showDialog: function (t) {
              var r,
                f,
                e,
                u = i.format(
                  "<div class='k-popup-edit-form'><div class='k-edit-form-container'><p class='k-popup-message'>{0}</p>",
                  t.text
                );
              for (
                u += '<div class="k-edit-buttons k-state-default">', r = 0;
                r < t.buttons.length;
                r++
              )
                u += this.createButton(t.buttons[r]);
              u += "</div></div></div>";
              f = this.element;
              this.popup && this.popup.destroy();
              e = this.popup = n(u)
                .appendTo(f)
                .eq(0)
                .on(o, ".k-button", function (i) {
                  i.preventDefault();
                  e.close();
                  var r = n(i.currentTarget).index();
                  t.buttons[r].click();
                })
                .kendoWindow({
                  modal: !0,
                  resizable: !1,
                  draggable: !1,
                  title: t.title,
                  visible: !1,
                  close: function () {
                    this.destroy();
                    f.focus();
                  },
                })
                .getKendoWindow();
              e.center().open();
            },
            _initTimezoneEditor: function (n, t) {
              var f,
                i = this,
                r = i.container.find(".k-scheduler-timezones"),
                u = r.find("input.k-timezone-toggle"),
                e = r
                  .find(".k-edit-label:last")
                  .add(r.find(".k-edit-field:last")),
                h = r.find(".k-scheduler-savetimezone"),
                c = r.find(".k-scheduler-canceltimezone"),
                o = i._timezonePopup,
                s = function (t) {
                  if ("startTimezone" === t.field) {
                    var i = n.startTimezone;
                    u.prop("disabled", !i);
                    i ||
                      (e.hide(),
                      n.set("endTimezone", ""),
                      u.prop("checked", !1));
                  }
                };
              i._startTimezone = n.startTimezone;
              i._endTimezone = n.endTimezone;
              o ||
                ((i._timezonePopup = o =
                  r.kendoWindow({
                    modal: !0,
                    resizable: !1,
                    draggable: !0,
                    title: i.options.messages.editor.timezoneEditorTitle,
                    visible: !1,
                    close: function (r) {
                      n.unbind("change", s);
                      r.userTriggered && i._revertTimezones(n);
                      t && t.focus();
                    },
                  })),
                u.click(function () {
                  e.toggle(u.prop("checked"));
                  n.set("endTimezone", "");
                }),
                h.click(function (n) {
                  n.preventDefault();
                  f.close();
                }),
                c.click(function (t) {
                  t.preventDefault();
                  i._revertTimezones(n);
                  f.close();
                }),
                n.bind("change", s));
              u.prop("checked", n.endTimezone).prop(
                "disabled",
                !n.startTimezone
              );
              n.endTimezone ? e.show() : e.hide();
              f = o.data("kendoWindow");
              f.center().open();
            },
          });
          et = lr.extend({
            init: function (t, u) {
              var f = this;
              v.fn.init.call(f, t, u);
              (f.options.views && f.options.views.length) ||
                (f.options.views = ["day", "week"]);
              f.resources = [];
              f._initModel();
              f._wrapper();
              f._views();
              f._toolbar();
              f._dataSource();
              f._resources();
              f._resizeHandler = function () {
                f.resize();
              };
              f.wrapper.on(ht + r + " selectstart" + r, function (t) {
                n(t.target).is(":kendoFocusable") || t.preventDefault();
              });
              f.options.editable &&
                f.options.editable.resize !== !1 &&
                f._resizable();
              f._movable();
              f._bindResize();
              f.options.messages &&
                f.options.messages.recurrence &&
                (y.options = f.options.messages.recurrence);
              f._selectable();
              f._touchHandlers();
              f._ariaId = i.guid();
              f._createEditor();
            },
            _bindResize: function () {
              n(window).on("resize" + r, this._resizeHandler);
            },
            _unbindResize: function () {
              n(window).off("resize" + r, this._resizeHandler);
            },
            dataItems: function () {
              for (
                var e,
                  o,
                  u,
                  f,
                  s = this,
                  l = s.items(),
                  h = s._data,
                  c = n.map(l, function (t) {
                    return n(t).attr("data-uid");
                  }),
                  r = {},
                  a = c.length,
                  i = 0;
                i < a;
                i++
              )
                r[c[i]] = null;
              for (o = h.length, i = 0; i < o; i++)
                (u = h[i]), r[u.uid] !== t && (r[u.uid] = u);
              f = [];
              for (e in r) f.push(r[e]);
              return f;
            },
            _isMobile: function () {
              var n = this.options;
              return (
                (n.mobile === !0 && i.support.mobileOS) ||
                "phone" === n.mobile ||
                "tablet" === n.mobile
              );
            },
            _isTouch: function (n) {
              return (
                /touch/.test(n.type) ||
                (n.originalEvent && /touch/.test(n.originalEvent.pointerType))
              );
            },
            _isInverseColor: function (n) {
              return n.hasClass(br);
            },
            _groupsByResource: function (n, t, r, u, f) {
              var s, e, h, c, o, l, a;
              if ((r || (r = []), (s = n[0]))) {
                for (h = s.dataSource.view(), c = 0, o = 0; o < h.length; o++)
                  (l = i.getter(s.dataValueField)(h[o])),
                    (a = t + c + o),
                    (e = this._groupsByResource(n.slice(1), a, r, l, s.field)),
                    (e[s.field] = l),
                    (c = e.groupIndex),
                    f && u && (e[f] = u),
                    1 === n.length && ((e.groupIndex = t + o), r.push(e));
                return e;
              }
              return {};
            },
            data: function () {
              return this._data;
            },
            select: function (r) {
              var s,
                p,
                w,
                h,
                l,
                a,
                b,
                k,
                v,
                f,
                u = this,
                e = u.view(),
                o = u._selection,
                y = e.groups;
              if (r === t)
                return (
                  (w = e._selectedSlots),
                  o
                    ? (o && o.events && (p = u._selectedEvents()),
                      {
                        start: o.start,
                        end: o.end,
                        events: p,
                        slots: w,
                        resources: e._resourceBySlot(o),
                      })
                    : []
                );
              if (!r)
                return (
                  (u._selection = null), (u._old = null), e.clearSelection(), t
                );
              if (
                (n.isArray(r) && (r = { events: r.splice(0) }), r.resources)
              ) {
                l = [];
                a = [];
                e.groupedResources &&
                  u._groupsByResource(e.groupedResources, 0, a);
                for (h in r.resources)
                  l.push({ field: h, operator: "eq", value: r.resources[h] });
                s = new i.data.Query(a).filter(l).toArray();
              }
              return r.events && r.events.length
                ? (u._selectEvents(r.events, s), u._select(), t)
                : (y &&
                    r.start &&
                    r.end &&
                    ((b = c(e._startDate)),
                    (k = i.date.addDays(c(e._endDate), 1)),
                    r.start < k &&
                      b <= r.end &&
                      ((v = s && s.length ? y[s[0].groupIndex] : y[0]),
                      v.timeSlotCollectionCount() || (r.isAllDay = !0),
                      (f = v.ranges(r.start, r.end, r.isAllDay, !1)),
                      f.length &&
                        ((u._selection = {
                          start: i.timezone.toLocalDate(f[0].start.start),
                          end: i.timezone.toLocalDate(f[f.length - 1].end.end),
                          groupIndex: f[0].start.groupIndex,
                          index: f[0].start.index,
                          isAllDay: f[0].start.isDaySlot,
                          events: [],
                        }),
                        u._select()))),
                  t);
            },
            _selectEvents: function (n, t) {
              for (
                var f,
                  r,
                  c,
                  l,
                  e,
                  o,
                  s,
                  h = this,
                  a = h.view(),
                  v = a.groups,
                  y = n.length,
                  p = t && t.length,
                  u = 0;
                u < y;
                u++
              )
                if (v && p) {
                  for (
                    f = v[t[0].groupIndex],
                      r = [],
                      c = f.timeSlotCollectionCount(),
                      l = f.daySlotCollectionCount(),
                      e = 0;
                    e < c;
                    e++
                  )
                    r = r.concat(f.getTimeSlotCollection(e).events());
                  for (o = 0; o < l; o++)
                    r = r.concat(f.getDaySlotCollection(o).events());
                  r = new i.data.Query(r)
                    .filter({
                      field: "element[0].getAttribute('data-uid')",
                      operator: "eq",
                      value: n[u],
                    })
                    .toArray();
                  r[0] && h._createSelection(r[0].element);
                } else
                  (s = a.element.find(
                    i.format(
                      ".k-event[data-uid={0}], .k-task[data-uid={0}]",
                      n[u]
                    )
                  )),
                    s.length && h._createSelection(s[0]);
            },
            _touchHandlers: function () {
              var f,
                o,
                e,
                s,
                h,
                t = this,
                u = t.wrapper,
                c = n.proxy(t._touchMove, t);
              u.on(
                pr + r,
                ".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",
                function (n) {
                  var i = t.wrapper.find(".k-scheduler-content");
                  t._isTouch(n) &&
                    (i.stop(!0, !1),
                    (t._touchPosX = f = t._tapPosition(n, "X")),
                    (t._touchPosY = o = t._tapPosition(n, "Y")),
                    (t._userTouched = !0),
                    (t.view()._scrolling = !1),
                    (h = Date.now()),
                    u.on(
                      wi + r,
                      ".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",
                      c
                    ));
                }
              );
              u.on(
                wr + r,
                ".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",
                function (n) {
                  var l, a, v;
                  t._isTouch(n) &&
                    ((l = Date.now() - h),
                    (a = t.wrapper.find(".k-scheduler-content")),
                    (v = -t._amplitude * (3e3 / l)),
                    (e = t._tapPosition(n, "X")),
                    (s = t._tapPosition(n, "Y")),
                    t._dragging ||
                      (t.options.selectable &&
                        (Math.abs(e - f) <= 10 || Math.abs(s - o) <= 10) &&
                        t._mouseDownSelection(n),
                      !i.support.kineticScrollNeeded &&
                        l < 200 &&
                        Math.abs(e - f) > 10 &&
                        a.animate({ scrollTop: a[0].scrollTop + v }),
                      u.off(
                        wi + r,
                        ".k-scheduler-header-all-day td, .k-scheduler-content td",
                        c
                      )));
                }
              );
            },
            _selectable: function () {
              var f,
                t = this,
                i = t.wrapper;
              t.options.selectable &&
                (t._tabindex(),
                i.on(
                  ht + r,
                  ".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",
                  function (n) {
                    t._isTouch(n) || t._mouseDownSelection(n);
                  }
                ),
                (f = n.proxy(t._mouseMove, t)),
                i.on(
                  ht + r,
                  ".k-scheduler-header-all-day td, .k-scheduler-content td",
                  function (n) {
                    var u = n.which,
                      e = n.button,
                      o = (u && 3 === u) || (e && 2 == e);
                    t._isTouch(n) ||
                      o ||
                      i.on(
                        bi + r,
                        ".k-scheduler-header-all-day td, .k-scheduler-content td",
                        f
                      );
                  }
                ),
                i.on("mouseup" + r + " mousecancel" + r, function () {
                  i.off(
                    bi + r,
                    ".k-scheduler-header-all-day td, .k-scheduler-content td",
                    f
                  );
                }),
                i.on("focus" + r, function () {
                  t._selection || t._userTouched || t._selectFirstSlot();
                  t._select();
                }),
                i.on("focusout" + r, function (i) {
                  t._ctrlKey = t._shiftKey = !1;
                  t.toolbar.find("ul > li").removeClass(u);
                  n(i.relatedTarget).closest(a).length ||
                    t.toolbar.find(a).removeClass(h);
                }),
                i.on("keydown" + r, l(t._keydown, t)),
                i.on("keyup" + r, function (n) {
                  t._ctrlKey = n.ctrlKey;
                  t._shiftKey = n.shiftKey;
                }));
            },
            _mouseDownSelection: function (n) {
              var t = n.which,
                r = n.button,
                f = (t && 3 === t) || (r && 2 == r);
              f ||
                (n.ctrlKey && (this._ctrlKey = n.ctrlKey),
                n.shiftKey && (this._shiftKey = n.shiftKey),
                this._createSelection(n.currentTarget));
              i._activeElement() !== this.wrapper.get(0)
                ? i.focusElement(this.wrapper)
                : this._select();
              this.toolbar.find("ul > li").removeClass(u);
            },
            _selectFirstSlot: function () {
              this._createSelection(
                this.wrapper.find(".k-scheduler-content").find("td:first")
              );
            },
            _select: function () {
              var s,
                h,
                f,
                e,
                c,
                t = this,
                o = t.view(),
                l = t.wrapper,
                u = o.current(),
                r = t._selection,
                a = t._old ? t._old.selection : null,
                v = t._old ? t._old.eventsLength : null;
              if (
                r &&
                (u &&
                  (u.removeAttribute("id"),
                  u.removeAttribute("aria-label"),
                  l.removeAttr("aria-activedescendant")),
                o.select(r),
                (u = o.current()),
                u && (a !== u || (r.events && v !== r.events.length)))
              ) {
                if (
                  ((s = n(u).data("uid")),
                  t._old &&
                    s &&
                    s === n(t._old.selection).data("uid") &&
                    r.events &&
                    t._old.eventsLength === r.events.length)
                )
                  return;
                f = r;
                e = t._selectedEvents();
                c = o._selectedSlots;
                e[0]
                  ? ((f = e[0] || r),
                    (h = i.format(
                      t.options.messages.ariaEventLabel,
                      f.title,
                      f.start,
                      f.start
                    )))
                  : (h = i.format(
                      t.options.messages.ariaSlotLabel,
                      f.start,
                      f.end
                    ));
                u.setAttribute("id", t._ariaId);
                u.setAttribute("aria-label", h);
                l.attr("aria-activedescendant", t._ariaId);
                t._old = { selection: u, eventsLength: e.length };
                t.trigger("change", {
                  start: r.start,
                  end: r.end,
                  events: e,
                  slots: c,
                  resources: o._resourceBySlot(r),
                });
              }
            },
            _selectedEvents: function () {
              for (
                var n, i = this._selection.events, u = i.length, t = 0, r = [];
                t < u;
                t++
              )
                (n = this.occurrenceByUid(i[t])), n && r.push(n);
              return r;
            },
            _tapPosition: function (n, t) {
              return /touch/.test(n.type)
                ? (n.originalEvent || n).changedTouches[0]["page" + t]
                : n["page" + t];
            },
            _touchMove: function (n) {
              var t = this,
                r = t.wrapper.find(".k-scheduler-content"),
                e = r[0].scrollHeight > r[0].clientHeight,
                o = r[0].scrollWidth > r[0].clientWidth,
                u = t._tapPosition(n, "Y"),
                f = t._tapPosition(n, "X"),
                s = r[0].scrollTop - Math.round(u - t._touchPosY),
                h = r[0].scrollLeft - Math.round(f - t._touchPosX),
                c = e && Math.abs(u - t._touchPosY) > 10,
                l = o && Math.abs(u - t._touchPosY) > 10;
              t._dragging ||
                i.support.kineticScrollNeeded ||
                !t._isTouch(n) ||
                ((c || l) &&
                  ((t._amplitude = Math.round(u - t._touchPosY)),
                  (t._touchPosY = u),
                  (t._touchPosX = f),
                  r.animate({ scrollTop: s, scrollLeft: h }, 0),
                  (t.view()._scrolling = !0)));
            },
            _mouseMove: function (t) {
              var i = this;
              clearTimeout(i._moveTimer);
              i._isTouch(t) ||
                (i._moveTimer = setTimeout(function () {
                  var u,
                    f,
                    e,
                    o = i.view(),
                    r = i._selection;
                  r &&
                    ((u = o.selectionByElement(n(t.currentTarget))),
                    u &&
                      r.groupIndex === u.groupIndex &&
                      ((f = u.startDate()),
                      (e = u.endDate()),
                      f >= r.end
                        ? (r.backward = !1)
                        : e <= r.start && (r.backward = !0),
                      r.backward ? (r.start = f) : (r.end = e),
                      i._select()));
                }, 5));
            },
            _viewByIndex: function (n) {
              var t,
                i = this.views;
              for (t in i) {
                if (!n) return t;
                n--;
              }
            },
            _keydown: function (r) {
              var y,
                b,
                nt,
                tt,
                d,
                ut,
                o = this,
                s = r.keyCode,
                k = o.view(),
                p = k.options.editable,
                l = o._selection,
                ft = n.extend(l),
                et = 16 === s || 18 === s || 17 === s || 91 === s || 92 === s,
                g = o.toolbar.find(
                  ".k-scheduler-tools > li,.k-scheduler-navigation > li,.k-scheduler-views > li.k-state-selected:visible, .k-scheduler-views > li.k-current-view:visible"
                ),
                c = o.toolbar.find(a),
                it =
                  n(r.target).closest(a).length ||
                  o.toolbar.find(".k-scheduler-views .k-state-focused").length,
                v = c.children().index(o.toolbar.find("." + u)),
                rt = i.support.isRtl(o.element),
                w = rt ? -1 : 1;
              if (
                (v == -1 &&
                  (v = c.children().index(o.toolbar.find(".k-state-selected"))),
                (o._ctrlKey = r.ctrlKey),
                (o._shiftKey = r.shiftKey),
                s === f.F10)
              )
                return (
                  o.toolbar.find("ul > li:first").focus().addClass(u),
                  r.preventDefault(),
                  t
                );
              if (s === f.TAB) {
                if (o.toolbar.find("." + u).length)
                  return (
                    (b = g.index(o.toolbar.find("." + u))),
                    b === -1 &&
                      o._focusedView &&
                      (b = g.index(
                        o.toolbar.find(".k-scheduler-views > .k-state-selected")
                      )),
                    (nt = r.shiftKey ? g[b - 1] : g[b + 1]),
                    o.toolbar.find("." + u).removeClass(u),
                    nt
                      ? (n(nt).addClass(u).focus(),
                        (o._focusedView = null),
                        r.preventDefault(),
                        t)
                      : (o.element.focus(), r.preventDefault(), t)
                  );
              } else if (s === f.ENTER || s === f.SPACEBAR) {
                if (
                  it &&
                  o._focusedView &&
                  !o._focusedView.hasClass("k-state-selected")
                )
                  return (
                    (tt = o._focusedView.data().name),
                    o.trigger("navigate", {
                      view: tt,
                      action: "changeView",
                      date: o.date(),
                    }) ||
                      (o.view(tt),
                      c.removeClass(h),
                      o.toolbar.find(".k-current-view:visible").length &&
                        (n(document.activeElement).blur(),
                        o.toolbar
                          .find(".k-current-view:visible")
                          .addClass(u)
                          .find(".k-link")
                          .focus())),
                    r.preventDefault(),
                    t
                  );
                if (o.toolbar.find("." + u + ":visible").length)
                  return (
                    o.toolbar.find("." + u + ":visible").click(),
                    r.preventDefault(),
                    t
                  );
              } else if (r.altKey && s === f.DOWN) {
                if (o.toolbar.find("." + u + ":visible").length)
                  return (
                    o.toolbar.find("." + u + ":visible").click(),
                    r.preventDefault(),
                    t
                  );
              } else {
                if (s === f.RIGHT && it)
                  return (
                    n(o.toolbar.find("." + u)).removeClass(u),
                    (o._focusedView = n(
                      rt
                        ? v - 1 == 0
                          ? c.children(":not(.k-current-view):last")
                          : c.children()[v + 1 * w]
                        : v + 1 === c.children().length
                        ? c.children(":not(.k-current-view):first")
                        : c.children()[v + 1 * w]
                    )),
                    o._focusedView.focus().addClass(u),
                    r.preventDefault(),
                    t
                  );
                if (s === f.LEFT && it)
                  return (
                    n(o.toolbar.find("." + u)).removeClass(u),
                    (o._focusedView = n(
                      rt
                        ? v + 1 === c.children().length
                          ? c.children(":not(.k-current-view):first")
                          : c.children()[v - 1 * w]
                        : v - 1 == 0
                        ? c.children(":not(.k-current-view):last")
                        : c.children()[v - 1 * w]
                    )),
                    o._focusedView.focus().addClass(u),
                    r.preventDefault(),
                    t
                  );
                if (s === f.DOWN && o.toolbar.find(a).hasClass(h))
                  return (
                    o.toolbar.find("." + u).removeClass(u),
                    (y = o._focusedView
                      ? c.find(o._focusedView).index()
                      : c
                          .children(".k-scheduler-views > .k-state-selected")
                          .index()),
                    (o._focusedView = n(
                      y + 1 === c.children().length
                        ? c.children(":not(.k-current-view):first")
                        : c.children()[y + 1 * w]
                    )),
                    o._focusedView.focus().addClass(u),
                    r.preventDefault(),
                    t
                  );
                if (s === f.UP && o.toolbar.find(a).hasClass(h))
                  return (
                    o.toolbar.find("." + u).removeClass(u),
                    (y = o._focusedView
                      ? c.find(o._focusedView).index()
                      : c
                          .children(".k-scheduler-views > .k-state-selected")
                          .index()),
                    (o._focusedView = n(
                      y - 1 == 0
                        ? c.children(":not(.k-current-view):last")
                        : c.children()[y - 1 * w]
                    )),
                    o._focusedView.focus().addClass(u),
                    r.preventDefault(),
                    t
                  );
                if (
                  r.altKey &&
                  s === f.DOWN &&
                  o.toolbar.find(".k-nav-current").hasClass(u)
                )
                  return o._showCalendar(), r.preventDefault(), t;
                if (s === f.ESC && o.popup && o.popup.visible())
                  return o.popup.close(), r.preventDefault(), t;
                if (s === f.ESC && o.toolbar.find(a).hasClass(h))
                  return (
                    o.toolbar.find(a).removeClass(h),
                    o.toolbar.find(a).children().removeClass(u),
                    (o._focusedView = null),
                    o.toolbar.find(".k-current-view").focus().addClass(u),
                    r.preventDefault(),
                    t
                  );
              }
              if (!et) {
                if (!l)
                  return (
                    o._selectFirstSlot(), o._select(), o.element.focus(), t
                  );
                s === f.TAB
                  ? k.moveToEvent(l, r.shiftKey) &&
                    (o._select(),
                    document.activeElement.getAttribute("id") !==
                      o.element.attr("id") && o.element.focus(),
                    r.preventDefault())
                  : s === f.ENTER || s === f.SPACEBAR
                  ? l.events.length && p
                    ? p.update !== !1 && o.editEvent(l.events[0])
                    : p &&
                      p.create !== !1 &&
                      (l.isAllDay &&
                        (l = n.extend({}, l, {
                          end: i.date.addDays(l.end, -1),
                        })),
                      r.preventDefault(),
                      o.addEvent(e({}, l, k._resourceBySlot(l))))
                  : s === f.DELETE && p !== !1 && p.destroy !== !1
                  ? o.removeEvent(l.events[0])
                  : s >= 49 && s <= 57
                  ? ((d = o._viewByIndex(s - 49)),
                    d &&
                      !o.trigger("navigate", {
                        view: d,
                        action: "changeView",
                        date: o.date(),
                      }) &&
                      o.view(d))
                  : k.move(l, s, r.shiftKey) &&
                    (k.inRange(l)
                      ? o._select()
                      : ((ut =
                          o.date().getTime() > l.start.getTime()
                            ? "previous"
                            : "next"),
                        o.trigger("navigate", {
                          view: o._selectedViewName,
                          action: ut,
                          date: l.start,
                        })
                          ? ((l.start = ft.start), (l.end = ft.end))
                          : o.date(l.start)),
                    o.toolbar.find("ul > li").removeClass(u),
                    r.preventDefault());
                o._adjustSelectedDate();
              }
            },
            _createSelection: function (t) {
              var u,
                r,
                f = this._selection;
              t = n(t);
              (t.is(".k-event") &&
                ((u = t.attr(i.attr("uid"))),
                f && f.events.indexOf(u) !== -1 && !this._ctrlKey)) ||
                ((f && (this._ctrlKey || this._shiftKey)) ||
                  (f = this._selection = { events: [], groupIndex: 0 }),
                (r = this.view().selectionByElement(t)),
                r && (f.groupIndex = r.groupIndex || 0),
                u && (r = ui(this._data, u)),
                r && r.uid && (u = [r.uid]),
                this._updateSelection(r, u),
                this._adjustSelectedDate());
            },
            _updateSelection: function (n, r, u) {
              var e,
                s,
                o,
                f = this._selection;
              n &&
                f &&
                ((e = this.view()),
                n.uid && (n = e._updateEventForSelection(n)),
                this._shiftKey && f.start && f.end
                  ? ((s = n.end < f.end),
                    (f.end = n.endDate ? n.endDate() : n.end),
                    s &&
                      e._timeSlotInterval &&
                      i.date.setTime(f.end, -e._timeSlotInterval()))
                  : ((f.start = n.startDate ? n.startDate() : n.start),
                    (f.end = n.endDate ? n.endDate() : n.end)),
                (f.isAllDay = "isDaySlot" in n ? n.isDaySlot : n.isAllDay),
                null !== u && u !== t && (f.groupIndex = u),
                (f.index = n.index),
                this._ctrlKey
                  ? ((o = r && r.length ? f.events.indexOf(r[0]) : -1),
                    o > -1
                      ? f.events.splice(o, 1)
                      : (f.events = f.events.concat(r || [])))
                  : (f.events = r || []));
            },
            options: {
              name: "Scheduler",
              date: dt,
              editable: !0,
              autoBind: !0,
              snap: !0,
              mobile: !1,
              timezone: "",
              allDaySlot: !0,
              min: new Date(1900, 0, 1),
              max: new Date(2099, 11, 31),
              toolbar: null,
              workWeekStart: 1,
              workWeekEnd: 5,
              showWorkHours: !1,
              startTime: dt,
              endTime: dt,
              currentTimeMarker: { updateInterval: 1e4, useLocalTimezone: !0 },
              footer: {},
              messages: {
                today: "Today",
                pdf: "Export to PDF",
                save: "Save",
                cancel: "Cancel",
                destroy: "Delete",
                resetSeries: "Reset Series",
                deleteWindowTitle: "Delete event",
                next: "Next",
                previous: "Previous",
                ariaSlotLabel: "Selected from {0:t} to {1:t}",
                ariaEventLabel: "{0} on {1:D} at {2:t}",
                views: {
                  day: "Day",
                  week: "Week",
                  workWeek: "Work Week",
                  agenda: "Agenda",
                  month: "Month",
                  timeline: "Timeline",
                  timelineWeek: "Timeline Week",
                  timelineWorkWeek: "Timeline Work Week",
                  timelineMonth: "Timeline Month",
                },
                recurrenceMessages: {
                  deleteWindowTitle: "Delete Recurring Item",
                  resetSeriesWindowTitle: "Reset Series",
                  deleteWindowOccurrence: "Delete current occurrence",
                  deleteWindowSeries: "Delete the series",
                  editWindowTitle: "Edit Recurring Item",
                  editWindowOccurrence: "Edit current occurrence",
                  editWindowSeries: "Edit the series",
                },
                editable: {
                  confirmation: "Are you sure you want to delete this event?",
                },
                editor: {
                  title: "Title",
                  start: "Start",
                  end: "End",
                  allDayEvent: "All day event",
                  description: "Description",
                  repeat: "Repeat",
                  timezone: "Timezone",
                  startTimezone: "Start timezone",
                  endTimezone: "End timezone",
                  separateTimezones: "Use separate start and end time zones",
                  timezoneEditorTitle: "Timezones",
                  timezoneEditorButton: "Time zone",
                  timezoneTitle: "Time zones",
                  noTimezone: "No timezone",
                  editorTitle: "Event",
                },
              },
              height: null,
              width: null,
              resources: [],
              group: { resources: [], orientation: "horizontal" },
              views: [],
              selectable: !1,
            },
            events: [
              it,
              rt,
              ct,
              kt,
              "add",
              "dataBinding",
              "dataBound",
              "moveStart",
              "move",
              "moveEnd",
              "resizeStart",
              "resize",
              "resizeEnd",
              "navigate",
              "change",
            ],
            destroy: function () {
              var e,
                u,
                f,
                t = this;
              if (
                (v.fn.destroy.call(t),
                t.dataSource &&
                  (t.dataSource.unbind(g, t._refreshHandler),
                  t.dataSource.unbind(nt, t._progressHandler),
                  t.dataSource.unbind(tt, t._errorHandler)),
                t._resourceRefreshHandler)
              )
                for (u = 0; u < t.resources.length; u++)
                  (f = t.resources[u].dataSource),
                    f.unbind(g, t._resourceRefreshHandler),
                    f.unbind(nt, t._resourceProgressHandler),
                    f.unbind(tt, t._resourceErrorHandler);
              t.calendar && (t.calendar.destroy(), t.popup.destroy());
              t.view() && t.view().destroy();
              t._editor && t._editor.destroy();
              this._moveDraggable && this._moveDraggable.destroy();
              this._resizeDraggable && this._resizeDraggable.destroy();
              e = t.element.add(t.wrapper).add(t.toolbar).add(t.popup);
              e.off(r);
              clearTimeout(t._moveTimer);
              t._model = null;
              t.toolbar = null;
              t.element = null;
              n(window).off("resize" + r, t._resizeHandler);
              i.destroy(t.wrapper);
            },
            setDataSource: function (n) {
              this.options.dataSource = n;
              this._dataSource();
              this.options.autoBind && n.fetch
                ? n.fetch()
                : st(n) && this.view(this._selectedView);
            },
            items: function () {
              var n = this.wrapper.find(".k-scheduler-content"),
                t = this.view();
              return t && "agenda" === t.options.name
                ? n.find(".k-task")
                : n
                    .find(".k-event")
                    .add(
                      this.wrapper
                        .find(".k-scheduler-header-wrap")
                        .find(".k-scheduler-header-all-day")
                        .siblings()
                    );
            },
            _movable: function () {
              var f,
                o,
                y,
                h,
                a,
                e,
                s,
                c,
                p,
                k,
                r = this,
                w = 0,
                u = [],
                l = [],
                v = r._isMobile(),
                b = r.options.editable && r.options.editable.move !== !1,
                d = r.options.editable && r.options.editable.resize !== !1;
              (b || (d && v)) &&
                ((r._dragging = !1),
                v && i.support.mobileOS.android && (w = 5),
                (r._moveDraggable = new i.ui.Draggable(r.element, {
                  distance: w,
                  filter: ".k-event",
                  ignore: ".k-resize-handle",
                  holdToDrag: v,
                  autoScroll: !0,
                })),
                b &&
                  r._moveDraggable
                    .bind("dragstart", function (n) {
                      var w,
                        v,
                        l,
                        b,
                        a = r.view(),
                        d = n.currentTarget,
                        g = r._isTouch(n);
                      if (
                        ((r._dragging = !0),
                        !a.options.editable || a.options.editable.move === !1)
                      )
                        return (r._dragging = !1), n.preventDefault(), t;
                      if (g && !d.hasClass("k-event-active"))
                        return (
                          (r._dragging = !1),
                          r.element
                            .find(".k-event-active")
                            .removeClass("k-event-active"),
                          n.preventDefault(),
                          t
                        );
                      if (
                        ((e = r.occurrenceByUid(d.attr(i.attr("uid")))),
                        (s = e.clone()),
                        (k = e.clone()),
                        s.update(a._eventOptionsForMove(s)),
                        (s.inverseColor = r._isInverseColor(d)),
                        (u = []),
                        r._selection)
                      )
                        for (w = r._selection.events, v = 0; v < w.length; v++)
                          (l = r.occurrenceByUid(w[v]).clone()),
                            (b = this.element
                              .find('div.k-event[data-uid="' + l.uid + '"]')
                              .eq(0)),
                            l.update(a._eventOptionsForMove(l)),
                            b.length && (l.inverseColor = r._isInverseColor(b)),
                            u.push(l);
                      else u.push(s);
                      f = a._slotByPosition(
                        n.x.startLocation,
                        n.y.startLocation
                      );
                      y = a._resourceBySlot(f);
                      p = h = f.startOffset(
                        n.x.startLocation,
                        n.y.startLocation,
                        r.options.snap
                      );
                      o = f;
                      c = f;
                      (f && !r.trigger("moveStart", { event: e })) ||
                        n.preventDefault();
                    })
                    .bind("drag", function (t) {
                      var b,
                        k,
                        v,
                        g,
                        d,
                        w = r.view(),
                        y = w._slotByPosition(t.x.location, t.y.location);
                      if (y) {
                        if (
                          ((a = y.startOffset(
                            t.x.location,
                            t.y.location,
                            r.options.snap
                          )),
                          y.isDaySlot !== f.isDaySlot)
                        )
                          if (y.isDaySlot !== c.isDaySlot)
                            for (
                              g = n(f.element).index(),
                                d = n(y.element).parent().children().eq(g),
                                f = w._slotByPosition(
                                  d.offset().left,
                                  d.offset().top
                                ),
                                h = f.startOffset(
                                  t.x.location,
                                  t.y.location,
                                  !0
                                ),
                                l = u.map(function (n) {
                                  return n.clone();
                                }),
                                v = 0;
                              v < u.length;
                              v++
                            )
                              u[v].isAllDay != y.isDaySlot &&
                                ((u[v].isAllDay = y.isDaySlot),
                                (u[v].end = i.date.getDate(u[v].start)),
                                (u[v].start = i.date.getDate(u[v].start)),
                                y.isDaySlot ||
                                  (i.date.setTime(
                                    u[v].start,
                                    i.date.getMilliseconds(w.startTime())
                                  ),
                                  i.date.setTime(
                                    u[v].end,
                                    i.date.getMilliseconds(w.startTime()) +
                                      w._timeSlotInterval()
                                  )));
                          else (f = n.extend(!0, {}, c)), (h = p), (u = l);
                        for (b = a - h, v = 0; v < u.length; v++)
                          w._updateMoveHint(u[v], y.groupIndex, b);
                        if (
                          ((k = vt(s, b)),
                          r.trigger("move", {
                            event: e,
                            slot: {
                              element: y.element,
                              start: y.startDate(),
                              end: y.endDate(),
                              isDaySlot: y.isDaySlot,
                            },
                            resources: w._resourceBySlot(y),
                            start: k.start,
                            end: k.end,
                          }))
                        )
                          for (v = 0; v < u.length; v++)
                            w._updateMoveHint(u[v], y.groupIndex, b);
                        else o = y;
                      }
                    })
                    .bind("dragend", function (t) {
                      var b, f, k, d, p, g, w, v, nt, tt;
                      if (
                        (r.view()._removeMoveHint(),
                        (b = a - h),
                        (f = vt(s, b)),
                        (k = f.start),
                        (d = f.end),
                        (r._dragging = !1),
                        (p = r.view()._resourceBySlot(o)),
                        (g = r.trigger("moveEnd", {
                          event: e,
                          slot: {
                            element: o.element,
                            start: o.startDate(),
                            end: o.endDate(),
                          },
                          start: k,
                          end: d,
                          resources: p,
                        })),
                        !g &&
                          (e.start.getTime() !== k.getTime() ||
                            e.end.getTime() !== d.getTime() ||
                            c.isDaySlot !== o.isDaySlot ||
                            i.stringify(p) !== i.stringify(y)))
                      ) {
                        for (
                          r._isMultiDrag = u.length > 1, w = 0;
                          w < u.length;
                          w++
                        )
                          (v = u[w]),
                            (f = vt(v, b)),
                            (nt = r.view()._eventOptionsForMove(v)),
                            (tt = n.extend(
                              {
                                isAllDay: v.isAllDay,
                                start: f.start,
                                end: f.end,
                              },
                              nt,
                              p
                            )),
                            r._updateEvent(null, v, tt);
                        r._isMultiDrag &&
                          (r.dataSource.sync(), (r._isMultiDrag = !1));
                      }
                      t.currentTarget.removeClass("k-event-active");
                      this.cancelHold();
                      u = [];
                      l = [];
                    })
                    .bind("dragcancel", function () {
                      r.view()._removeMoveHint();
                      this.cancelHold();
                      u = [];
                      l = [];
                    }),
                r._moveDraggable.bind("hold", function (n) {
                  r._isTouch(n) &&
                    (r.element
                      .find(".k-event-active")
                      .removeClass("k-event-active"),
                    r.options.selectable && r._createSelection(n.currentTarget),
                    n.currentTarget.addClass("k-event-active"));
                }));
            },
            _resizable: function () {
              function s(n) {
                var t,
                  i = {
                    "k-resize-e": "east",
                    "k-resize-w": "west",
                    "k-resize-n": "north",
                    "k-resize-s": "south",
                  };
                for (t in i) if (n.hasClass(t)) return i[t];
              }
              var f,
                e,
                o,
                u,
                t,
                r = this,
                h = 0;
              r._isMobile() && i.support.mobileOS.android && (h = 5);
              r._resizeDraggable = new i.ui.Draggable(r.element, {
                distance: h,
                filter: ".k-resize-handle",
                autoScroll: !0,
                dragstart: function (s) {
                  var c = n(s.currentTarget),
                    l = c.closest(".k-event"),
                    a = l.attr(i.attr("uid")),
                    h = r.view();
                  r._dragging = !0;
                  o = r.occurrenceByUid(a);
                  u = o.clone();
                  h._updateEventForResize(u);
                  t = h._slotByPosition(s.x.startLocation, s.y.startLocation);
                  r.trigger("resizeStart", { event: o }) && s.preventDefault();
                  f = i.date.toUtcTime(u.start);
                  e = i.date.toUtcTime(u.end);
                },
                drag: function (h) {
                  var v, l, c, a, y, p;
                  t &&
                    ((v = n(h.currentTarget)),
                    (l = s(v)),
                    (c = r.view()),
                    (a = c._slotByPosition(h.x.location, h.y.location)),
                    a &&
                      t.groupIndex == a.groupIndex &&
                      ((t = a),
                      (y = f),
                      (p = e),
                      "south" == l
                        ? !t.isDaySlot &&
                          t.end - i.date.toUtcTime(u.start) >=
                            c._timeSlotInterval() &&
                          (e = u.isAllDay
                            ? t.startOffset(
                                h.x.location,
                                h.y.location,
                                r.options.snap
                              )
                            : t.endOffset(
                                h.x.location,
                                h.y.location,
                                r.options.snap
                              ))
                        : "north" == l
                        ? !t.isDaySlot &&
                          i.date.toUtcTime(u.end) - t.start >=
                            c._timeSlotInterval() &&
                          (f = t.startOffset(
                            h.x.location,
                            h.y.location,
                            r.options.snap
                          ))
                        : "east" == l
                        ? t.isDaySlot &&
                          i.date.toUtcTime(i.date.getDate(t.endDate())) >=
                            i.date.toUtcTime(i.date.getDate(u.start))
                          ? (e = u.isAllDay
                              ? t.startOffset(
                                  h.x.location,
                                  h.y.location,
                                  r.options.snap
                                )
                              : t.endOffset(
                                  h.x.location,
                                  h.y.location,
                                  r.options.snap
                                ))
                          : !t.isDaySlot &&
                            t.end - i.date.toUtcTime(u.start) >=
                              c._timeSlotInterval() &&
                            (e = t.endOffset(
                              h.x.location,
                              h.y.location,
                              r.options.snap
                            ))
                        : "west" == l &&
                          (t.isDaySlot &&
                          i.date.toUtcTime(i.date.getDate(u.end)) >=
                            i.date.toUtcTime(i.date.getDate(t.startDate()))
                            ? (f = t.startOffset(
                                h.x.location,
                                h.y.location,
                                r.options.snap
                              ))
                            : !t.isDaySlot &&
                              i.date.toUtcTime(u.end) - t.start >=
                                c._timeSlotInterval() &&
                              (f = t.startOffset(
                                h.x.location,
                                h.y.location,
                                r.options.snap
                              ))),
                      r.trigger("resize", {
                        event: o,
                        slot: {
                          element: t.element,
                          start: t.startDate(),
                          end: t.endDate(),
                        },
                        start: i.timezone.toLocalDate(f),
                        end: i.timezone.toLocalDate(e),
                        resources: c._resourceBySlot(t),
                      })
                        ? ((f = y), (e = p))
                        : c._updateResizeHint(u, t.groupIndex, f, e)));
                },
                dragend: function (h) {
                  var v,
                    y = n(h.currentTarget),
                    c = new Date(u.start.getTime()),
                    l = new Date(u.end.getTime()),
                    a = s(y);
                  r._dragging = !1;
                  r.view()._removeResizeHint();
                  "south" == a
                    ? (l = i.timezone.toLocalDate(e))
                    : "north" == a
                    ? (c = i.timezone.toLocalDate(f))
                    : "east" == a
                    ? (l = t.isDaySlot
                        ? i.date.getDate(i.timezone.toLocalDate(e))
                        : i.timezone.toLocalDate(e))
                    : "west" == a &&
                      (t.isDaySlot
                        ? ((c = new Date(i.timezone.toLocalDate(f))),
                          c.setHours(0),
                          c.setMinutes(0))
                        : (c = i.timezone.toLocalDate(f)));
                  v = r.trigger("resizeEnd", {
                    event: o,
                    slot: {
                      element: t.element,
                      start: t.startDate(),
                      end: t.endDate(),
                    },
                    start: c,
                    end: l,
                    resources: r.view()._resourceBySlot(t),
                  });
                  !v &&
                    l.getTime() >= c.getTime() &&
                    ((u.start.getTime() == c.getTime() &&
                      u.end.getTime() == l.getTime()) ||
                      (r.view()._updateEventForResize(o),
                      r._updateEvent(a, o, { start: c, end: l })));
                  t = null;
                  o = null;
                },
                dragcancel: function () {
                  r._dragging = !1;
                  r.view()._removeResizeHint();
                  t = null;
                  o = null;
                },
              });
            },
            _updateEvent: function (n, t, r) {
              var f,
                u = this,
                e = function (n, t) {
                  try {
                    u._preventRefresh = !0;
                    n.update(r);
                    u._convertDates(n);
                  } finally {
                    u._preventRefresh = !1;
                  }
                  u.trigger(kt, { event: n }) ||
                    (t && t(), u._isMultiDrag || u.dataSource.sync());
                },
                o = function (n) {
                  return n.recurrenceRule
                    ? u.dataSource.getByUid(n.uid)
                    : u.dataSource.get(n.recurrenceId);
                },
                s = function () {
                  var s,
                    h,
                    f = o(t);
                  ("south" != n && "north" != n) ||
                    (r.start &&
                      ((s = i.date.getDate(f.start)),
                      i.date.setTime(s, bt(r.start)),
                      (r.start = s)),
                    r.end &&
                      ((h = i.date.getDate(f.end)),
                      i.date.setTime(h, bt(r.end)),
                      (r.end = h)));
                  u.dataSource._removeExceptions(f);
                  e(f);
                },
                h = function () {
                  var n = o(t),
                    r = function () {
                      u._convertDates(n);
                      u._selection && u._selection.events.push(f);
                    },
                    i = n.toOccurrence({ start: t.start, end: t.end }),
                    f = i.uid;
                  e(u.dataSource.add(i), r);
                };
              t.recurrenceRule || t.isOccurrence()
                ? ((f = u.options.messages.recurrenceMessages),
                  u._showRecurringDialog(t, h, s, {
                    title: f.editWindowTitle,
                    text: f.editRecurring ? f.editRecurring : nr,
                    occurrenceText: f.editWindowOccurrence,
                    seriesText: f.editWindowSeries,
                  }))
                : e(u.dataSource.getByUid(t.uid));
            },
            _modelForContainer: function (t) {
              return (
                (t = n(t).closest("[" + i.attr("uid") + "]")),
                this.dataSource.getByUid(t.attr(i.attr("uid")))
              );
            },
            showDialog: function (n) {
              this._editor.showDialog(n);
            },
            focus: function () {
              this.wrapper.focus();
            },
            _confirmation: function (n, t, r) {
              var f,
                e,
                o,
                u,
                h,
                s = this.options.editable;
              s === !0 || s.confirmation !== !1
                ? ((f = this.options.messages),
                  (e = f.deleteWindowTitle),
                  (o =
                    typeof s.confirmation === d
                      ? s.confirmation
                      : f.editable.confirmation),
                  this._isEditorOpened() &&
                    t.isRecurring() &&
                    ((u = this.options.messages.recurrenceMessages),
                    (e = u.deleteWindowTitle),
                    (o = t.isException()
                      ? u.deleteRecurringConfirmation
                        ? u.deleteRecurringConfirmation
                        : gr
                      : u.deleteSeriesConfirmation
                      ? u.deleteSeriesConfirmation
                      : tu),
                    r &&
                      ((e = u.resetSeriesWindowTitle),
                      (o = u.resetSeriesConfirmation
                        ? u.resetSeriesConfirmation
                        : nu))),
                  (h = [
                    {
                      name: "destroy",
                      text: r ? f.resetSeries : f.destroy,
                      click: function () {
                        n();
                      },
                    },
                  ]),
                  (this._isMobile() && i.Pane) ||
                    h.push({
                      name: "canceledit",
                      text: f.cancel,
                      click: function () {
                        n(!0);
                      },
                    }),
                  this._unbindResize(),
                  this.showDialog({ model: t, text: o, title: e, buttons: h }),
                  this._bindResize())
                : n();
            },
            addEvent: function (n) {
              var t,
                r,
                i = this._editor.editable,
                u = this.dataSource;
              n = n || {};
              r = this.trigger("add", { event: n });
              !r &&
                ((i && i.end()) || !i) &&
                (this.cancelEvent(),
                n && n.toJSON && (n = n.toJSON()),
                (t = u.add(n)),
                t && (this.cancelEvent(), this._editEvent(t)));
            },
            saveEvent: function () {
              var i,
                t,
                n,
                r = this._editor;
              r &&
                ((i = r.editable),
                (t = r.container),
                (n = this._modelForContainer(t)),
                t &&
                  i &&
                  i.end() &&
                  !this.trigger(kt, { container: t, event: n }) &&
                  (n.dirty ||
                    n.isOccurrence() ||
                    this._convertDates(n, "remove"),
                  this.dataSource.sync()));
            },
            cancelEvent: function () {
              var n,
                t = this._editor,
                i = t.container;
              i &&
                ((n = this._modelForContainer(i)),
                n &&
                  n.isOccurrence() &&
                  (this._convertDates(n, "remove"),
                  this._convertDates(
                    this.dataSource.get(n.recurrenceId),
                    "remove"
                  )),
                this.dataSource.cancelChanges(n),
                t.close());
            },
            editEvent: function (n) {
              var t = "string" == typeof n ? this.occurrenceByUid(n) : n;
              t &&
                (this.cancelEvent(),
                t.isRecurring()
                  ? this._editRecurringDialog(t)
                  : this._editEvent(t));
            },
            _editEvent: function (n) {
              this._preventRefresh = !0;
              this._unbindResize();
              this._createPopupEditor(n);
              this._bindResize();
            },
            _editRecurringDialog: function (n) {
              var t = this,
                r = function () {
                  n.isException() ? t._editEvent(n) : t.addEvent(n);
                },
                u = function () {
                  n.recurrenceId && (n = t.dataSource.get(n.recurrenceId));
                  t._editEvent(n);
                },
                i = t.options.messages.recurrenceMessages;
              t._showRecurringDialog(n, r, u, {
                title: i.editWindowTitle,
                text: i.editRecurring ? i.editRecurring : nr,
                occurrenceText: i.editWindowOccurrence,
                seriesText: i.editWindowSeries,
              });
            },
            _showRecurringDialog: function (n, t, i, r) {
              var u = this.options.editable,
                f = s(u) ? u.editRecurringMode : "dialog";
              "occurrence" === f || this._isMultiDrag
                ? t()
                : "series" === f
                ? i()
                : (this._unbindResize(),
                  this.showDialog({
                    model: n,
                    title: r.title,
                    text: r.text,
                    buttons: [
                      { text: r.occurrenceText, click: t },
                      { text: r.seriesText, click: i },
                    ],
                  }),
                  this._bindResize());
            },
            _createButton: function (n) {
              var u = n.template || iu,
                t = typeof n === d ? n : n.name || n.text,
                r = {
                  className: "k-scheduler-" + (t || "").replace(/\s/g, ""),
                  text: t,
                  attr: "",
                };
              if (!(t || (s(n) && n.template)))
                throw Error("Custom commands should have name specified");
              return (
                s(n)
                  ? (n.className && (n.className += " " + r.className),
                    "edit" === t &&
                      s(n.text) &&
                      ((n = e(!0, {}, n)), (n.text = n.text.edit)),
                    (r = e(!0, r, yt[t], n)))
                  : (r = e(!0, r, yt[t])),
                i.template(u)(r)
              );
            },
            _convertDates: function (n, t) {
              var f = this.dataSource.reader.timezone,
                r = n.startTimezone,
                u = n.endTimezone,
                e = n.start,
                o = n.start;
              t = t || "apply";
              r = r || u;
              u = u || r;
              r &&
                (f
                  ? "apply" === t
                    ? ((e = i.timezone.convert(n.start, f, r)),
                      (o = i.timezone.convert(n.end, f, u)))
                    : ((e = i.timezone.convert(n.start, r, f)),
                      (o = i.timezone.convert(n.end, u, f)))
                  : ((e = i.timezone[t](n.start, r)),
                    (o = i.timezone[t](n.end, u))),
                n._set("start", e),
                n._set("end", o));
            },
            _createEditor: function () {
              var r,
                n = this;
              r = n._editor =
                this._isMobile() && i.Pane
                  ? new si(
                      this.wrapper,
                      e({}, this.options, {
                        target: this,
                        timezone: n.dataSource.reader.timezone,
                        resources: n.resources,
                        createButton: l(this._createButton, this),
                      })
                    )
                  : new hi(
                      this.wrapper,
                      e({}, this.options, {
                        target: this,
                        createButton: l(this._createButton, this),
                        timezone: n.dataSource.reader.timezone,
                        resources: n.resources,
                      })
                    );
              r.bind("cancel", function (i) {
                return n.trigger("cancel", {
                  container: i.container,
                  event: i.model,
                })
                  ? (i.preventDefault(), t)
                  : ((n._preventRefresh = !1),
                    n.cancelEvent(),
                    n._attemptRefresh && n.refresh(),
                    n.focus(),
                    t);
              });
              r.bind("edit", function (t) {
                n.trigger(rt, { container: t.container, event: t.model }) &&
                  t.preventDefault();
              });
              r.bind("save", function () {
                n._preventRefresh = !1;
                n.saveEvent();
              });
              r.bind("remove", function (t) {
                n._preventRefresh = !1;
                n.removeEvent(t.model);
              });
              r.bind("resetSeries", function (t) {
                n._confirmation(
                  function (i) {
                    n._preventRefresh = !1;
                    i ||
                      (n.dataSource._removeExceptions(t.model), n.saveEvent());
                  },
                  t.model,
                  !0
                );
              });
            },
            _createPopupEditor: function (n) {
              var t = this._editor;
              (n.isNew() && !n.isOccurrence()) ||
                (n.isOccurrence() &&
                  this._convertDates(
                    n.recurrenceId ? this.dataSource.get(n.recurrenceId) : n
                  ),
                this._convertDates(n));
              this.editable = t.editEvent(n);
            },
            removeEvent: function (n) {
              var i = this,
                t = "string" == typeof n ? i.occurrenceByUid(n) : n;
              t &&
                (t.isRecurring()
                  ? i._deleteRecurringDialog(t)
                  : i._confirmation(function (n) {
                      n || i._removeEvent(t);
                    }, t));
            },
            occurrenceByUid: function (n) {
              var t = this.dataSource.getByUid(n);
              return t || (t = ui(this._data, n)), t;
            },
            occurrencesInRange: function (n, t) {
              return new i.data.Query(this._data)
                .filter({
                  logic: "or",
                  filters: [
                    {
                      logic: "and",
                      filters: [
                        { field: "start", operator: "gte", value: n },
                        { field: "end", operator: "gte", value: n },
                        { field: "start", operator: "lt", value: t },
                      ],
                    },
                    {
                      logic: "and",
                      filters: [
                        { field: "start", operator: "lte", value: n },
                        { field: "end", operator: "gt", value: n },
                      ],
                    },
                  ],
                })
                .toArray();
            },
            _removeEvent: function (n) {
              this.trigger(it, { event: n }) ||
                (this.dataSource.remove(n) && this.dataSource.sync());
            },
            _deleteRecurringDialog: function (n) {
              var e,
                o,
                u,
                f,
                r,
                t = this,
                i = n,
                h = t.options.editable,
                a = s(h) ? h.editRecurringMode : "dialog",
                c = function () {
                  var n = i.recurrenceId ? i : i.toOccurrence(),
                    r = t.dataSource.get(n.recurrenceId);
                  t._convertDates(r);
                  t._removeEvent(n);
                },
                l = function () {
                  i.recurrenceId && (i = t.dataSource.get(i.recurrenceId));
                  t._removeEvent(i);
                };
              ("dialog" != a || t._isEditorOpened()) &&
                ((e = function () {
                  t._confirmation(function (n) {
                    n || c();
                  }, i);
                }),
                (o = function () {
                  t._confirmation(function (n) {
                    n || l();
                  }, i);
                }));
              u = o || l;
              f = e || c;
              t._isEditorOpened()
                ? n.isException()
                  ? f()
                  : u()
                : ((r = t.options.messages.recurrenceMessages),
                  t._showRecurringDialog(n, f, u, {
                    title: r.deleteWindowTitle,
                    text: r.deleteRecurring ? r.deleteRecurring : dr,
                    occurrenceText: r.deleteWindowOccurrence,
                    seriesText: r.deleteWindowSeries,
                  }));
            },
            _isEditorOpened: function () {
              return !!this._editor.container;
            },
            _unbindView: function (n) {
              var t = this;
              t.angular("cleanup", function () {
                return { elements: t.items() };
              });
              n.destroy();
            },
            _bindView: function (n) {
              var t = this;
              t.options.editable &&
                (t._viewRemoveHandler && n.unbind(it, t._viewRemoveHandler),
                (t._viewRemoveHandler = function (n) {
                  t.removeEvent(n.uid);
                }),
                n.bind(it, t._viewRemoveHandler),
                t._viewAddHandler && n.unbind(di, t._viewAddHandler),
                (t._viewAddHandler = function (n) {
                  t.addEvent(n.eventInfo);
                }),
                n.bind(di, this._viewAddHandler),
                t._viewEditHandler && n.unbind(rt, t._viewEditHandler),
                (t._viewEditHandler = function (n) {
                  t.editEvent(n.uid);
                }),
                n.bind(rt, this._viewEditHandler));
              t._viewNavigateHandler &&
                n.unbind("navigate", t._viewNavigateHandler);
              t._viewNavigateHandler = function (n) {
                var i, r;
                n.view &&
                  ((i = "isWorkDay" in n),
                  (r = i ? "changeWorkDay" : "changeView"),
                  t.trigger("navigate", {
                    view: n.view,
                    isWorkDay: n.isWorkDay,
                    action: r,
                    date: n.date,
                  }) ||
                    (i && (t._workDayMode = n.isWorkDay),
                    t._selectView(n.view),
                    t.date(n.date)));
              };
              n.bind("navigate", t._viewNavigateHandler);
              t._viewActivateHandler &&
                n.unbind("activate", t._viewActivateHandler);
              t._viewActivateHandler = function () {
                var n = this;
                t._selection &&
                  (n.constrainSelection(t._selection),
                  t._select(),
                  t._adjustSelectedDate());
              };
              n.bind("activate", t._viewActivateHandler);
            },
            _selectView: function (n) {
              var r,
                u,
                f,
                e,
                t = this;
              n &&
                t.views[n] &&
                (t._selectedView && t._unbindView(t._selectedView),
                (t._selectedView = t._renderView(n)),
                (t._selectedViewName = n),
                t._viewsCount > 1 && !t._isMobile()
                  ? ((r = ru({ views: t.views, view: n, ns: i.ns })),
                    (u = t.toolbar.find(".k-scheduler-views li:first-child")),
                    u.is(".k-current-view")
                      ? u.replaceWith(r)
                      : t.toolbar.find(".k-scheduler-views").prepend(r),
                    (f = t.toolbar
                      .find(".k-scheduler-views li")
                      .removeClass("k-state-selected")),
                    f
                      .end()
                      .find(".k-view-" + n.replace(/\./g, "\\.").toLowerCase())
                      .addClass("k-state-selected"))
                  : ((e = t.toolbar.find(".k-scheduler-mobile-views")),
                    e
                      .find("[value=" + n.replace(/\./g, "\\.") + "]")
                      .prop("selected", "selected")));
            },
            view: function (n) {
              var i = this;
              return n ? (i._selectView(n), i.rebind(), t) : i._selectedView;
            },
            viewName: function () {
              return this.view().name;
            },
            _renderView: function (n) {
              var t = this._initializeView(n);
              return (
                this._bindView(t),
                (i.support.mouseAndTouchPresent || i.support.pointers) &&
                  (t.content.css("-ms-touch-action", "pinch-zoom"),
                  t.content.css("touch-action", "pinch-zoom")),
                this._model.set("formattedDate", t.dateForTitle()),
                this._model.set("formattedShortDate", t.shortDateForTitle()),
                this._model.set(
                  "formattedMobileDate",
                  t.mobileDateForTitle
                    ? t.mobileDateForTitle()
                    : t.shortDateForTitle()
                ),
                this._model.set(
                  "formattedYear",
                  i.format("{0:yyyy}", t.startDate())
                ),
                t
              );
            },
            resize: function (n) {
              var t = this.getSize(),
                i = this._size,
                r = this.view();
              r &&
                r.groups &&
                ((!n && i && t.width === i.width && t.height === i.height) ||
                  (this.refresh({ action: "resize" }), (this._size = t)));
            },
            _adjustSelectedDate: function () {
              var t = this._model.selectedDate,
                r = this._selection,
                n = r.start;
              n &&
                !i.date.isInDateRange(t, c(n), c(r.end)) &&
                t.setFullYear(n.getFullYear(), n.getMonth(), n.getDate());
            },
            _initializeView: function (n) {
              var u,
                r,
                t = this.views[n];
              if (t) {
                if (
                  ((u = s(t)),
                  (r = t.type),
                  typeof r === d && (r = i.getter(t.type)(window)),
                  !r)
                )
                  throw Error("There is no such view");
                t = new r(
                  this.wrapper,
                  er(
                    e(!0, {}, this.options, u ? t : {}, {
                      resources: this.resources,
                      date: this.date(),
                      startTime:
                        i.parseDate(t.startTime) ||
                        i.parseDate(this.options.startTime),
                      endTime:
                        i.parseDate(t.endTime) ||
                        i.parseDate(this.options.endTime),
                      showWorkHours: this._workDayMode,
                    })
                  )
                );
              }
              return t;
            },
            _views: function () {
              var n,
                t,
                r,
                f,
                i,
                o,
                u,
                c,
                h,
                l = this.options.views;
              for (
                this.views = {}, this._viewsCount = 0, u = 0, c = l.length;
                u < c;
                u++
              )
                (h = !1),
                  (n = l[u]),
                  (f = s(n)),
                  f
                    ? ((o = i = n.type ? n.type : n),
                      typeof o !== d && ((i = n.name || n.title), (h = !0)))
                    : (o = i = n),
                  (t = ci[i]),
                  t &&
                    !h &&
                    ((n.type = t.type),
                    (t.title = this.options.messages.views[i]),
                    "day" === t.type
                      ? (t.messages = { allDay: this.options.messages.allDay })
                      : "agenda" === t.type &&
                        (t.messages = {
                          event: this.options.messages.event,
                          date: this.options.messages.date,
                          time: this.options.messages.time,
                        })),
                  (n = e({ title: i }, t, f ? n : {})),
                  i &&
                    ((this.views[i] = n),
                    this._viewsCount++,
                    (r && !n.selected) || (r = i));
              r && (this._selectedViewName = r);
            },
            rebind: function () {
              this.dataSource.fetch();
            },
            _dataSource: function () {
              var n = this,
                r = n.options,
                t = r.dataSource;
              t = st(t) ? { data: t } : t;
              !r.timezone || t instanceof b
                ? t instanceof b &&
                  (r.timezone = t.options.schema
                    ? t.options.schema.timezone
                    : "")
                : (t = e(!0, t, { schema: { timezone: r.timezone } }));
              n.dataSource && n._refreshHandler
                ? n.dataSource
                    .unbind(g, n._refreshHandler)
                    .unbind(nt, n._progressHandler)
                    .unbind(tt, n._errorHandler)
                : ((n._refreshHandler = l(n.refresh, n)),
                  (n._progressHandler = l(n._requestStart, n)),
                  (n._errorHandler = l(n._error, n)));
              n.dataSource = i.data.SchedulerDataSource.create(t)
                .bind(g, n._refreshHandler)
                .bind(nt, n._progressHandler)
                .bind(tt, n._errorHandler);
              n.options.dataSource = n.dataSource;
            },
            _error: function () {
              this._progress(!1);
            },
            _requestStart: function () {
              this._progress(!0);
            },
            _progress: function (n) {
              var t = this.element.find(".k-scheduler-content");
              i.ui.progress(t, n);
            },
            _resources: function () {
              for (
                var t,
                  r,
                  f,
                  e,
                  i = this,
                  o = i.options.resources,
                  s = [],
                  u = 0;
                u < o.length;
                u++
              ) {
                if (
                  ((t = o[u]),
                  (r = t.field),
                  (f = t.name || r),
                  (e = t.dataSource),
                  !r || !e)
                )
                  throw Error(
                    'The "field" and "dataSource" options of the scheduler resource are mandatory.'
                  );
                i.resources.push({
                  field: r,
                  name: f,
                  title: t.title || r,
                  dataTextField: t.dataTextField || "text",
                  dataValueField: t.dataValueField || "value",
                  dataColorField: t.dataColorField || "color",
                  valuePrimitive: null == t.valuePrimitive || t.valuePrimitive,
                  multiple: t.multiple || !1,
                  dataSource: i._resourceDataSource(e, f, s),
                });
              }
              i.options.autoBind
                ? n.when.apply(null, s).then(function () {
                    i.view(i._selectedViewName);
                  })
                : i._selectView(i._selectedViewName);
            },
            _resourceDataSource: function (n, t, r) {
              var u = this,
                e = st(n) ? { data: n } : n,
                f = i.data.DataSource.create(e);
              return (
                u.options.autoBind
                  ? r.push(
                      f.fetch(function () {
                        u._bindResourceEvents(this, t);
                      })
                    )
                  : u._bindResourceEvents(f, t),
                f
              );
            },
            _bindResourceEvents: function (n, t) {
              var i = this,
                u = i.options.group && i.options.group.resources.length,
                r = u && i.options.group.resources.indexOf(t) > -1;
              !i._resourceRefreshHandler &&
                r &&
                ((i._resourceRefreshHandler = l(i._refreshResource, i)),
                (i._resourceProgressHandler = l(i._requestStart, i)),
                (i._resourceErrorHandler = l(i._error, i)));
              r &&
                n
                  .bind(g, i._resourceRefreshHandler)
                  .bind(nt, i._resourceProgressHandler)
                  .bind(tt, i._resourceErrorHandler);
            },
            _refreshResource: function () {
              var n = this;
              n.view(n._selectedViewName);
            },
            _initModel: function () {
              var n = this;
              n._model = i.observable({
                selectedDate: new Date(this.options.date),
                formattedDate: "",
                formattedShortDate: "",
              });
              n._model.bind("change", function (t) {
                "selectedDate" === t.field && n.view(n._selectedViewName);
              });
            },
            _wrapper: function () {
              var n = this,
                t = n.options,
                i = t.height,
                r = t.width;
              n.wrapper = n.element
                .addClass("k-widget k-scheduler k-floatwrap")
                .attr("role", "grid")
                .attr("aria-multiselectable", !0);
              n._isMobile() && n.wrapper.addClass("k-scheduler-mobile");
              i && n.wrapper.height(i);
              r && n.wrapper.width(r);
            },
            date: function (n) {
              return (
                null != n &&
                  c(n) >= c(this.options.min) &&
                  c(n) <= c(this.options.max) &&
                  this._model.set("selectedDate", n),
                c(this._model.get("selectedDate"))
              );
            },
            _toolbar: function () {
              var s,
                f,
                u = this,
                e = u.options,
                c = [];
              e.toolbar && (c = n.isArray(e.toolbar) ? e.toolbar : [e.toolbar]);
              s = this._isMobile() ? fu : uu;
              f = n(
                s({
                  messages: e.messages,
                  pdf:
                    n.grep(c, function (n) {
                      return "pdf" == n || "pdf" == n.name;
                    }).length > 0,
                  ns: i.ns,
                  view: u._selectedViewName,
                  views: u.views,
                  viewsCount: u._viewsCount,
                  editable: u.options.editable,
                })
              );
              u.wrapper.append(f);
              u.toolbar = f;
              i.bind(u.toolbar, u._model);
              f.on(o + r, ".k-pdf", function (n) {
                n.preventDefault();
                u.saveAsPDF();
              });
              f.on(o + r, ".k-create-event", function (n) {
                n.preventDefault();
                u.addEvent();
              });
              f.on(o + r, ".k-nav-calendar", function (n) {
                n.preventDefault();
                u._showCalendar(n.target);
              });
              f.on(o + r, ".k-scheduler-navigation li", function (r) {
                var h,
                  e = n(this),
                  f = new Date(u.date()),
                  o = "",
                  s = new Date(),
                  c = u.options.timezone;
                if ((r.preventDefault(), e.hasClass("k-nav-today")))
                  (o = "today"),
                    c
                      ? ((h = i.timezone.offset(s, c)),
                        (f = i.timezone.convert(s, s.getTimezoneOffset(), h)))
                      : (f = s);
                else if (e.hasClass("k-nav-next"))
                  (o = "next"), (f = u.view().nextDate());
                else if (e.hasClass("k-nav-prev"))
                  (o = "previous"), (f = u.view().previousDate());
                else if (e.hasClass("k-nav-current") && !u._isMobile())
                  return u._showCalendar(), t;
                u.trigger("navigate", {
                  view: u._selectedViewName,
                  action: o,
                  date: f,
                }) || u.date(f);
              });
              f.on(
                o + r,
                ".k-scheduler-views li:not(.k-current-view), .k-scheduler-refresh",
                function (t) {
                  t.preventDefault();
                  var r = n(this).attr(i.attr("name"));
                  u.trigger("navigate", {
                    view: r,
                    action: "changeView",
                    date: u.date(),
                  }) || (u.view(r), u.element.find("." + h).removeClass(h));
                }
              );
              f.on(o + r, ".k-scheduler-views li.k-current-view", function (t) {
                t.preventDefault();
                u.element.find(".k-scheduler-views").toggleClass(h);
                n(document).on(ht + r, function (t) {
                  0 === n(t.target).closest(".k-scheduler-views").length &&
                    (u.element.find("." + h).removeClass(h),
                    n(document).off(o + r));
                });
              });
              f.find(".k-scheduler-mobile-views").on("change", function (n) {
                u.view(n.target.value);
              });
              f.find("li").hover(
                function () {
                  n(this).addClass("k-state-hover");
                },
                function () {
                  n(this).removeClass("k-state-hover");
                }
              );
            },
            _showCalendar: function (t) {
              var i = this,
                e = t || i.toolbar.find(".k-nav-current"),
                o = n(
                  '<div class="k-calendar-container"><div class="k-scheduler-calendar"/></div>'
                );
              i.popup ||
                (i.popup = new ar(o, {
                  anchor: e,
                  activate: function () {
                    i.popup &&
                      i.calendar &&
                      (i.popup._toggleResize(!1),
                      i.calendar.element.find("table").focus(),
                      i.popup._toggleResize(!0));
                  },
                  open: function () {
                    i.calendar ||
                      (i.calendar = new vr(
                        this.element.find(".k-scheduler-calendar"),
                        {
                          change: function () {
                            var n = this.value();
                            i.trigger("navigate", {
                              view: i._selectedViewName,
                              action: "changeDate",
                              date: n,
                            }) || (i.date(n), i.popup.close());
                            i._isMobile ||
                              (i._selectedView.element.focus(),
                              i.toolbar
                                .find(".k-nav-current")
                                .focus()
                                .addClass(u));
                          },
                          min: i.options.min,
                          max: i.options.max,
                        }
                      ));
                    i.calendar.element.on("keydown" + r, function (n) {
                      (n.keyCode !== f.ESC && n.keyCode !== f.TAB) ||
                        (i.popup.close(),
                        i._selectedView.element.focus(),
                        i.toolbar.find(".k-nav-current").focus().addClass(u));
                    });
                    i.calendar.value(i.date());
                  },
                  copyAnchorStyles: !1,
                }));
              i.popup.open();
            },
            refresh: function (n) {
              var r = this,
                i = this.view(),
                u =
                  (n &&
                    "itemchange" === n.action &&
                    (this._editor.editable || this._preventRefresh)) ||
                  ("signalr" === this.dataSource.options.type &&
                    this._preventRefresh);
              if (
                (this._progress(!1),
                this.angular("cleanup", function () {
                  return { elements: r.items() };
                }),
                (n = n || {}),
                i)
              )
                return u
                  ? ((this._attemptRefresh =
                      "signalr" === this.dataSource.options.type),
                    t)
                  : (this.trigger("dataBinding", {
                      action: n.action || "rebind",
                      index: n.index,
                      items: n.items,
                    }) ||
                      ((n && "resize" === n.action) ||
                        !this._editor ||
                        this._editor.close(),
                      (this._data = this.dataSource.expand(
                        i.startDate(),
                        i.visibleEndDate()
                      )),
                      i.refreshLayout(),
                      i.render(this._data),
                      this.trigger("dataBound"),
                      (this._attemptRefresh = !1)),
                    t);
            },
            slotByPosition: function (n, t) {
              var i,
                r = this.view();
              return r._slotByPosition
                ? ((i = r._slotByPosition(n, t)),
                  i
                    ? {
                        startDate: i.startDate(),
                        endDate: i.endDate(),
                        groupIndex: i.groupIndex,
                        element: i.element,
                        isDaySlot: i.isDaySlot,
                      }
                    : null)
                : null;
            },
            slotByElement: function (t) {
              var i = n(t).offset();
              return this.slotByPosition(i.left, i.top);
            },
            resourcesBySlot: function (n) {
              return this.view()._resourceBySlot(n);
            },
          });
          ci = {
            day: { type: "kendo.ui.DayView" },
            week: { type: "kendo.ui.WeekView" },
            workWeek: { type: "kendo.ui.WorkWeekView" },
            agenda: { type: "kendo.ui.AgendaView" },
            month: { type: "kendo.ui.MonthView" },
            timeline: { type: "kendo.ui.TimelineView" },
            timelineWeek: { type: "kendo.ui.TimelineWeekView" },
            timelineWorkWeek: { type: "kendo.ui.TimelineWorkWeekView" },
            timelineMonth: { type: "kendo.ui.TimelineMonthView" },
          };
          p.plugin(et);
          i.PDFMixin &&
            (i.PDFMixin.extend(et.prototype),
            (wt = "k-scheduler-pdf-export"),
            (et.fn._drawPDF = function (t) {
              var r,
                u,
                f,
                i = this.wrapper,
                e = i[0].style.cssText;
              return (
                i.css({ width: i.width(), height: i.height() }),
                i.addClass(wt),
                (r = this),
                (u = new n.Deferred()),
                (f = i
                  .find(".k-scheduler-content")
                  .find("table")
                  .css("table-layout", "auto")),
                setTimeout(function () {
                  f.css("table-layout", "fixed");
                  r.resize(!0);
                  r._drawPDFShadow({}, { avoidLinks: r.options.pdf.avoidLinks })
                    .done(function (n) {
                      var i = {
                        page: n,
                        pageNumber: 1,
                        progress: 1,
                        totalPages: 1,
                      };
                      t.notify(i);
                      u.resolve(i.page);
                    })
                    .fail(function (n) {
                      u.reject(n);
                    })
                    .always(function () {
                      i[0].style.cssText = e;
                      i.removeClass(wt);
                      r.resize(!0);
                      r.resize(!0);
                    });
                }),
                u
              );
            }));
          li = v.extend({
            init: function (n, t) {
              var r = this,
                u = i.timezone.windows_zones;
              if (!u || !i.timezone.zones_titles)
                throw Error("kendo.timezones.min.js is not included.");
              v.fn.init.call(r, n, t);
              r.wrapper = r.element;
              r._zonesQuery = new i.data.Query(u);
              r._zoneTitleId = i.guid();
              r._zoneTitlePicker();
              r._zonePicker();
              r._zoneTitle.bind("cascade", function () {
                this.value() || r._zone.wrapper.hide();
              });
              r._zone.bind("cascade", function () {
                r._value = this.value();
                r.trigger("change");
              });
              r.value(r.options.value);
            },
            options: {
              name: "TimezoneEditor",
              value: "",
              optionLabel: "No timezone",
            },
            events: ["change"],
            _zoneTitlePicker: function () {
              var t = this,
                r = n(
                  '<input id="' +
                    t._zoneTitleId +
                    '" aria-label="' +
                    t.options.title +
                    '"/>'
                ).appendTo(t.wrapper);
              t._zoneTitle = new i.ui.DropDownList(r, {
                dataSource: i.timezone.zones_titles,
                dataValueField: "other_zone",
                dataTextField: "name",
                optionLabel: t.options.optionLabel,
              });
            },
            _zonePicker: function () {
              var t = this,
                r = n('<input aria-label="' + t.options.title + '"/>').appendTo(
                  this.wrapper
                );
              t._zone = new i.ui.DropDownList(r, {
                dataValueField: "zone",
                dataTextField: "territory",
                dataSource: t._zonesQuery.data,
                cascadeFrom: t._zoneTitleId,
                dataBound: function () {
                  t._value = this.value();
                  this.wrapper.toggle(this.dataSource.view().length > 1);
                },
              });
              t._zone.wrapper.hide();
            },
            destroy: function () {
              v.fn.destroy.call(this);
              i.destroy(this.wrapper);
            },
            value: function (n) {
              var r,
                i = this;
              return n === t
                ? i._value
                : ((r = i._zonesQuery.filter({
                    field: "zone",
                    operator: "eq",
                    value: n,
                  }).data[0]),
                  r
                    ? (i._zoneTitle.value(r.other_zone), i._zone.value(r.zone))
                    : i._zoneTitle.select(0),
                  t);
            },
          });
          p.plugin(li);
          ai = i.template('<option value="#=other_zone#">#=name#</option>');
          vi = i.template('<option value="#=zone#">#=territory#</option>');
          yi = v.extend({
            init: function (n, t) {
              var r = this,
                u = i.timezone.windows_zones;
              if (!u || !i.timezone.zones_titles)
                throw Error("kendo.timezones.min.js is not included.");
              v.fn.init.call(r, n, t);
              r.wrapper = r.element;
              r._zonesQuery = new i.data.Query(u);
              r._zoneTitlePicker();
              r._zonePicker();
              r.value(r.options.value);
            },
            options: {
              name: "MobileTimezoneEditor",
              optionLabel: "No timezone",
              value: "",
            },
            events: ["change"],
            _bindZones: function (n) {
              var t = n ? this._filter(n) : [];
              this._zone.html(this._options(t, vi));
            },
            _filter: function (n) {
              return this._zonesQuery.filter({
                field: "other_zone",
                operator: "eq",
                value: n,
              }).data;
            },
            _options: function (n, t, i) {
              var r = 0,
                u = "",
                f = n.length;
              for (i && (u += t({ other_zone: "", name: i })); r < f; r++)
                u += t(n[r]);
              return u;
            },
            _zoneTitlePicker: function () {
              var t = this,
                r = t._options(
                  i.timezone.zones_titles,
                  ai,
                  t.options.optionLabel
                );
              t._zoneTitle = n("<select>" + r + "</select>")
                .appendTo(t.wrapper)
                .change(function () {
                  var i = this.value,
                    n = t._zonePickerLabel,
                    r = n.find("select");
                  t._bindZones(i);
                  i && r.children().length > 1 ? n.show() : n.hide();
                  t._value = t._zone[0].value;
                  t.trigger("change");
                });
            },
            _zonePicker: function () {
              var t = this;
              t._zonePickerLabel = n(
                "<li class='k-item k-zonepicker' style='display:none'><label class='k-label'><span class='k-item-title'></span><div></div></label></li>"
              );
              t._zone = n("<select></select>")
                .appendTo(t._zonePickerLabel.find("div"))
                .change(function () {
                  t._value = this.value;
                  t.trigger("change");
                });
              this.wrapper.closest(".k-item").after(t._zonePickerLabel);
              t._bindZones(t._zoneTitle.val());
              t._value = t._zone[0].value;
            },
            destroy: function () {
              v.fn.destroy.call(this);
              i.destroy(this.wrapper);
            },
            value: function (n) {
              var u,
                i = this,
                f = i._zone,
                e = "",
                r = "";
              return n === t
                ? i._value
                : ((u = i._zonesQuery.filter({
                    field: "zone",
                    operator: "eq",
                    value: n,
                  }).data[0]),
                  u && ((r = u.zone), (e = u.other_zone)),
                  i._zoneTitle.val(e),
                  i._bindZones(e),
                  f.val(r),
                  (r = f[0].value),
                  r && f.children.length > 1
                    ? i._zonePickerLabel.show()
                    : i._zonePickerLabel.hide(),
                  (i._value = r),
                  t);
            },
          });
          p.plugin(yi);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.touch.min", ["kendo.core.min", "kendo.userevents.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var t = window.kendo,
            u = t.ui.Widget,
            i = n.proxy,
            r = Math.abs,
            f = 20,
            e = u.extend({
              init: function (n, r) {
                function e(n) {
                  return function (t) {
                    f._triggerTouch(n, t);
                  };
                }
                function o(n) {
                  return function (t) {
                    f.trigger(n, {
                      touches: t.touches,
                      distance: t.distance,
                      center: t.center,
                      event: t.event,
                    });
                  };
                }
                var f = this;
                u.fn.init.call(f, n, r);
                r = f.options;
                n = f.element;
                f.wrapper = n;
                f.events = new t.UserEvents(n, {
                  filter: r.filter,
                  surface: r.surface,
                  minHold: r.minHold,
                  multiTouch: r.multiTouch,
                  allowSelection: !0,
                  fastTap: r.fastTap,
                  press: e("touchstart"),
                  hold: e("hold"),
                  tap: i(f, "_tap"),
                  gesturestart: o("gesturestart"),
                  gesturechange: o("gesturechange"),
                  gestureend: o("gestureend"),
                });
                r.enableSwipe
                  ? (f.events.bind("start", i(f, "_swipestart")),
                    f.events.bind("move", i(f, "_swipemove")))
                  : (f.events.bind("start", i(f, "_dragstart")),
                    f.events.bind("move", e("drag")),
                    f.events.bind("end", e("dragend")));
                t.notify(f);
              },
              events: [
                "touchstart",
                "dragstart",
                "drag",
                "dragend",
                "tap",
                "doubletap",
                "hold",
                "swipe",
                "gesturestart",
                "gesturechange",
                "gestureend",
              ],
              options: {
                name: "Touch",
                surface: null,
                global: !1,
                fastTap: !1,
                filter: null,
                multiTouch: !1,
                enableSwipe: !1,
                minXDelta: 30,
                maxYDelta: 20,
                maxDuration: 1e3,
                minHold: 800,
                doubleTapTimeout: 800,
              },
              cancel: function () {
                this.events.cancel();
              },
              destroy: function () {
                u.fn.destroy.call(this);
                this.events.destroy();
              },
              _triggerTouch: function (n, t) {
                this.trigger(n, { touch: t.touch, event: t.event }) &&
                  t.preventDefault();
              },
              _tap: function (n) {
                var i = this,
                  r = i.lastTap,
                  u = n.touch;
                r &&
                u.endTime - r.endTime < i.options.doubleTapTimeout &&
                t.touchDelta(u, r).distance < f
                  ? (i._triggerTouch("doubletap", n), (i.lastTap = null))
                  : (i._triggerTouch("tap", n), (i.lastTap = u));
              },
              _dragstart: function (n) {
                this._triggerTouch("dragstart", n);
              },
              _swipestart: function (n) {
                2 * r(n.x.velocity) >= r(n.y.velocity) && n.sender.capture();
              },
              _swipemove: function (n) {
                var u = this,
                  i = u.options,
                  t = n.touch,
                  f = n.event.timeStamp - t.startTime,
                  e = t.x.initialDelta > 0 ? "right" : "left";
                r(t.x.initialDelta) >= i.minXDelta &&
                  r(t.y.initialDelta) < i.maxYDelta &&
                  f < i.maxDuration &&
                  (u.trigger("swipe", { direction: e, touch: n.touch }),
                  t.cancel());
              },
            });
          t.ui.plugin(e);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.gantt.list.min",
      [
        "kendo.dom.min",
        "kendo.touch.min",
        "kendo.draganddrop.min",
        "kendo.columnsorter.min",
        "kendo.datetimepicker.min",
        "kendo.editable.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n) {
          function d(n) {
            for (var u = [], f = n.className, t = 0, r = n.level; t < r; t++)
              u.push(i("span", { className: f }));
            return u;
          }
          function y() {
            var i = t._activeElement();
            i && "body" !== i.nodeName.toLowerCase() && n(i).blur();
          }
          var t = window.kendo,
            o = t.dom,
            i = o.element,
            p = o.text,
            w = t.support.browser,
            b = t.support.mobileOS,
            s = t.ui,
            h = s.Widget,
            c = n.extend,
            e = t._outerWidth,
            l = t._outerHeight,
            g = n.map,
            nt = n.isFunction,
            tt = w.msie && w.version < 9,
            a = t.keys,
            it = {
              title: "Title",
              start: "Start Time",
              end: "End Time",
              percentComplete: "% Done",
              parentId: "Predecessor ID",
              id: "ID",
              orderId: "Order ID",
            },
            v = "string",
            u = ".kendoGanttList",
            k = "click",
            f = ".",
            rt =
              "<table style='visibility: hidden;'><tbody><tr style='height:{0}'><td>&nbsp;</td></tr></tbody></table>",
            r = (s.GanttList = h.extend({
              init: function (t, i) {
                h.fn.init.call(this, t, i);
                0 === this.options.columns.length &&
                  this.options.columns.push("title");
                this.dataSource = this.options.dataSource;
                this._columns();
                this._layout();
                this._domTrees();
                this._header();
                this._sortable();
                this._editable();
                this._selectable();
                this._draggable();
                this._resizable();
                this._attachEvents();
                this._adjustHeight();
                this.bind(
                  "render",
                  function () {
                    var t, i;
                    this.options.resizable &&
                      ((t = this.header.find("col")),
                      (i = this.content.find("col")),
                      this.header
                        .find("th")
                        .not(":last")
                        .each(function (r) {
                          var u = e(n(this));
                          t.eq(r).width(u);
                          i.eq(r).width(u);
                        }),
                      t.last().css("width", "auto"),
                      i.last().css("width", "auto"));
                  },
                  !0
                );
              },
              _adjustHeight: function () {
                this.content &&
                  this.content.height(
                    this.element.height() - l(this.header.parent())
                  );
              },
              destroy: function () {
                h.fn.destroy.call(this);
                this._reorderDraggable && this._reorderDraggable.destroy();
                this._tableDropArea && this._tableDropArea.destroy();
                this._contentDropArea && this._contentDropArea.destroy();
                this._columnResizable && this._columnResizable.destroy();
                this.touch && this.touch.destroy();
                this.timer && clearTimeout(this.timer);
                this.content.off(u);
                this.header.find("thead").off(u);
                this.header.find(f + r.link).off(u);
                this.header = null;
                this.content = null;
                this.levels = null;
                t.destroy(this.element);
              },
              options: {
                name: "GanttList",
                selectable: !0,
                editable: !0,
                resizable: !1,
              },
              _attachEvents: function () {
                var t = this,
                  i = r.styles;
                t.content.on(
                  k + u,
                  "td > span." + i.icon + ":not(." + i.iconHidden + ")",
                  function (i) {
                    var u = n(this),
                      r = t._modelFromElement(u);
                    r.set("expanded", !r.get("expanded"));
                    i.stopPropagation();
                  }
                );
              },
              _domTrees: function () {
                this.headerTree = new o.Tree(this.header[0]);
                this.contentTree = new o.Tree(this.content[0]);
              },
              _columns: function () {
                var n = this.options.columns,
                  t = function () {
                    this.field = "";
                    this.title = "";
                    this.editable = !1;
                    this.sortable = !1;
                  };
                this.columns = g(n, function (n) {
                  return (
                    (n = typeof n === v ? { field: n, title: it[n] } : n),
                    c(new t(), n)
                  );
                });
              },
              _layout: function () {
                var o = this,
                  u = this.options,
                  e = this.element,
                  i = r.styles,
                  s = function () {
                    var r,
                      f =
                        typeof u.rowHeight === v
                          ? u.rowHeight
                          : u.rowHeight + "px",
                      i = n(t.format(rt, f));
                    return (
                      o.content.append(i), (r = l(i.find("tr"))), i.remove(), r
                    );
                  };
                e.addClass(i.wrapper)
                  .append(
                    "<div class='" +
                      i.gridHeader +
                      "'><div class='" +
                      i.gridHeaderWrap +
                      "'></div></div>"
                  )
                  .append("<div class='" + i.gridContentWrap + "'></div>");
                this.header = e.find(f + i.gridHeaderWrap);
                this.content = e.find(f + i.gridContent);
                u.rowHeight && (this._rowHeight = s());
              },
              _header: function () {
                var n = this.headerTree,
                  t = i("colgroup", null, this._cols()),
                  r = i("thead", { role: "rowgroup" }, [
                    i("tr", { role: "row" }, this._ths()),
                  ]),
                  u = i(
                    "table",
                    {
                      style: { minWidth: this.options.listWidth + "px" },
                      role: "grid",
                    },
                    [t, r]
                  );
                n.render([u]);
              },
              _render: function (n) {
                var t,
                  r,
                  u,
                  f = {
                    style: { minWidth: this.options.listWidth + "px" },
                    tabIndex: 0,
                    role: "treegrid",
                  };
                this._rowHeight &&
                  (f.style.height = n.length * this._rowHeight + "px");
                this.levels = [{ field: null, value: 0 }];
                t = i("colgroup", null, this._cols());
                r = i("tbody", { role: "rowgroup" }, this._trs(n));
                u = i("table", f, [t, r]);
                this.contentTree.render([u]);
                this.trigger("render");
              },
              _ths: function () {
                for (
                  var n, f, o = this.columns, u = [], t = 0, e = o.length;
                  t < e;
                  t++
                )
                  (n = o[t]),
                    (f = {
                      "data-field": n.field,
                      "data-title": n.title,
                      className: r.styles.header,
                      role: "columnheader",
                    }),
                    u.push(i("th", f, [p(n.title)]));
                return (
                  this.options.resizable &&
                    u.push(
                      i("th", {
                        className: r.styles.header,
                        role: "columnheader",
                      })
                    ),
                  u
                );
              },
              _cols: function () {
                for (
                  var u, f, n, o = this.columns, r = [], t = 0, e = o.length;
                  t < e;
                  t++
                )
                  (u = o[t]),
                    (n = u.width),
                    (f =
                      n && 0 !== parseInt(n, 10)
                        ? { style: { width: typeof n === v ? n : n + "px" } }
                        : null),
                    r.push(i("col", f, []));
                return (
                  this.options.resizable &&
                    r.push(i("col", { style: { width: "1px" } })),
                  r
                );
              },
              _trs: function (n) {
                for (
                  var t,
                    f,
                    e,
                    s = [],
                    u = [],
                    h = r.styles,
                    i = 0,
                    o = n.length;
                  i < o;
                  i++
                )
                  (t = n[i]),
                    (e = this._levels({
                      idx: t.parentId,
                      id: t.id,
                      summary: t.summary,
                    })),
                    (f = { "data-uid": t.uid, "data-level": e, role: "row" }),
                    t.summary && (f["aria-expanded"] = t.expanded),
                    i % 2 != 0 && u.push(h.alt),
                    t.summary && u.push(h.group),
                    u.length && (f.className = u.join(" ")),
                    s.push(this._tds({ task: t, attr: f, level: e })),
                    (u = []);
                return s;
              },
              _tds: function (n) {
                for (
                  var u, r = [], e = this.columns, t = 0, f = e.length;
                  t < f;
                  t++
                )
                  (u = e[t]),
                    r.push(
                      this._td({ task: n.task, column: u, level: n.level })
                    );
                return (
                  this.options.resizable &&
                    r.push(i("td", { role: "gridcell" })),
                  i("tr", n.attr, r)
                );
              },
              _td: function (n) {
                var u,
                  l,
                  e,
                  h = [],
                  a = this.options.resourcesField,
                  o = r.styles,
                  c = n.task,
                  s = n.column,
                  f = c.get(s.field);
                if (s.field == a) {
                  for (f = f || [], u = [], e = 0; e < f.length; e++)
                    u.push(
                      t.format(
                        "{0} [{1}]",
                        f[e].get("name"),
                        f[e].get("formatedValue")
                      )
                    );
                  u = u.join(", ");
                } else u = s.format ? t.format(s.format, f) : f;
                return (
                  "title" === s.field &&
                    ((h = d({ level: n.level, className: o.iconPlaceHolder })),
                    h.push(
                      i("span", {
                        className:
                          o.icon +
                          " " +
                          (c.summary
                            ? c.expanded
                              ? o.iconCollapse
                              : o.iconExpand
                            : o.iconHidden),
                      })
                    ),
                    (l = t.format("{0}, {1:P0}", u, c.percentComplete))),
                  h.push(i("span", { "aria-label": l }, [p(u)])),
                  i("td", { role: "gridcell" }, h)
                );
              },
              _levels: function (n) {
                for (
                  var t,
                    r = this.levels,
                    f = n.summary,
                    e = n.idx,
                    o = n.id,
                    i = 0,
                    u = r.length;
                  i < u;
                  i++
                )
                  if (((t = r[i]), t.field == e))
                    return (
                      f && r.push({ field: o, value: t.value + 1 }), t.value
                    );
              },
              _sortable: function () {
                for (
                  var i,
                    r,
                    u,
                    f = this,
                    s = this.options.resourcesField,
                    h = this.columns,
                    e = this.header.find("th[" + t.attr("field") + "]"),
                    c = function (n) {
                      (0 === f.dataSource.total() ||
                        (f.editable && f.editable.trigger("validate"))) &&
                        n.preventDefault();
                    },
                    n = 0,
                    o = e.length;
                  n < o;
                  n++
                )
                  (i = h[n]),
                    i.sortable &&
                      i.field !== s &&
                      ((u = e.eq(n)),
                      (r = u.data("kendoColumnSorter")),
                      r && r.destroy(),
                      u
                        .attr("data-" + t.ns + "field", i.field)
                        .kendoColumnSorter({
                          dataSource: this.dataSource,
                          change: c,
                        }));
                e = null;
              },
              _selectable: function () {
                var t = this,
                  i = this.options.selectable;
                i &&
                  this.content.on(k + u, "tr", function (i) {
                    var r = n(this);
                    t.editable && t.editable.trigger("validate");
                    i.ctrlKey ? t.clearSelection() : t.select(r);
                  });
              },
              select: function (n) {
                var i = this.content.find(n),
                  t = r.styles.selected;
                return i.length
                  ? (i
                      .siblings(f + t)
                      .removeClass(t)
                      .attr("aria-selected", !1)
                      .end()
                      .addClass(t)
                      .attr("aria-selected", !0),
                    void this.trigger("change"))
                  : this.content.find(f + t);
              },
              clearSelection: function () {
                var n = this.select();
                n.length &&
                  (n.removeClass(r.styles.selected), this.trigger("change"));
              },
              _setDataSource: function (n) {
                this.dataSource = n;
                this._sortable();
              },
              _editable: function () {
                var t = this,
                  f = this.options.editable,
                  i = r.styles,
                  e = "span." + i.icon + ":not(" + i.iconHidden + ")",
                  o = function () {
                    var n = t.editable;
                    n && (n.end() ? t._closeCell() : n.trigger("validate"));
                  },
                  s = function (t) {
                    var r = n(t.currentTarget);
                    r.hasClass(i.editCell) || y();
                  };
                f &&
                  f.update !== !1 &&
                  ((this._startEditHandler = function (i) {
                    var u = i.currentTarget ? n(i.currentTarget) : i,
                      r = t._columnFromElement(u);
                    t.editable ||
                      (r && r.editable && t._editCell({ cell: u, column: r }));
                  }),
                  t.content
                    .on("focusin" + u, function () {
                      clearTimeout(t.timer);
                      t.timer = null;
                    })
                    .on("focusout" + u, function () {
                      t.timer = setTimeout(o, 1);
                    })
                    .on("keydown" + u, function (n) {
                      n.keyCode === a.ENTER && n.preventDefault();
                    })
                    .on("keyup" + u, function (n) {
                      var i,
                        r,
                        u = n.keyCode;
                      switch (u) {
                        case a.ENTER:
                          y();
                          o();
                          break;
                        case a.ESC:
                          t.editable &&
                            ((i = t._editableContainer),
                            (r = t._modelFromElement(i)),
                            t.trigger("cancel", { model: r, cell: i }) ||
                              t._closeCell(!0));
                      }
                    }),
                  b
                    ? (t.touch = t.content
                        .kendoTouch({
                          filter: "td",
                          touchstart: function (n) {
                            s(n.touch);
                          },
                          doubletap: function (i) {
                            n(i.touch.initialTouch).is(e) ||
                              t._startEditHandler(i.touch);
                          },
                        })
                        .data("kendoTouch"))
                    : t.content
                        .on("mousedown" + u, "td", function (n) {
                          s(n);
                        })
                        .on("dblclick" + u, "td", function (i) {
                          n(i.target).is(e) || t._startEditHandler(i);
                        }));
              },
              _editCell: function (i) {
                var c,
                  a = this.options.resourcesField,
                  v = r.styles,
                  f = i.cell,
                  u = i.column,
                  l = this._modelFromElement(f),
                  e = this.dataSource._createNewModel(l.toJSON()),
                  o = e.fields[u.field] || e[u.field],
                  s = o.validation,
                  y = t.attr("type"),
                  p = t.attr("bind"),
                  w = t.attr("format"),
                  h = {
                    name: u.field,
                    required: !!o.validation && o.validation.required === !0,
                  };
                return u.field === a
                  ? void u.editor(f, e)
                  : ((this._editableContent = f.children().detach()),
                    (this._editableContainer = f),
                    f.data("modelCopy", e),
                    ("date" !== o.type && "date" !== n.type(o)) ||
                      (u.format && !/H|m|s|F|g|u/.test(u.format)) ||
                      ((h[p] = "value:" + u.field),
                      (h[y] = "date"),
                      u.format && (h[w] = t._extractFormat(u.format)),
                      (c = function (t, i) {
                        n('<input type="text"/>')
                          .attr(h)
                          .appendTo(t)
                          .kendoDateTimePicker({ format: i.format });
                      })),
                    (this.editable = f
                      .addClass(v.editCell)
                      .kendoEditable({
                        fields: {
                          field: u.field,
                          format: u.format,
                          editor: u.editor || c,
                        },
                        model: e,
                        clearContainer: !1,
                      })
                      .data("kendoEditable")),
                    s &&
                      s.dateCompare &&
                      nt(s.dateCompare) &&
                      s.message &&
                      (n(
                        "<span " +
                          t.attr("for") +
                          '="' +
                          u.field +
                          '" class="k-invalid-msg"/>'
                      )
                        .hide()
                        .appendTo(f),
                      f
                        .find("[name=" + u.field + "]")
                        .attr(t.attr("dateCompare-msg"), s.message)),
                    this.editable.bind("validate", function (n) {
                      var t = this.element
                        .find(":kendoFocusable:first")
                        .focus();
                      tt && t.focus();
                      n.preventDefault();
                    }),
                    void (
                      this.trigger("edit", { model: l, cell: f }) &&
                      this._closeCell(!0)
                    ));
              },
              _closeCell: function (n) {
                var e = r.styles,
                  t = this._editableContainer,
                  f = this._modelFromElement(t),
                  o = this._columnFromElement(t),
                  u = o.field,
                  s = t.data("modelCopy"),
                  i = {};
                i[u] = s.get(u);
                t.empty()
                  .removeData("modelCopy")
                  .removeClass(e.editCell)
                  .append(this._editableContent);
                this.editable.unbind();
                this.editable.destroy();
                this.editable = null;
                this._editableContainer = null;
                this._editableContent = null;
                n ||
                  ("start" === u &&
                    (i.end = new Date(i.start.getTime() + f.duration())),
                  this.trigger("update", { task: f, updateInfo: i }));
              },
              _draggable: function () {
                var u,
                  o = this,
                  e = null,
                  s = !0,
                  i = r.styles,
                  y = t.support.isRtl(this.element),
                  p = "tr[" + t.attr("level") + " = 0]:last",
                  h = {},
                  l = this.options.editable,
                  v = function () {
                    e = null;
                    u = null;
                    s = !0;
                    h = {};
                  },
                  w = function (n) {
                    for (var t = n; t; ) {
                      if (e.get("id") === t.get("id")) {
                        s = !1;
                        break;
                      }
                      t = o.dataSource.taskParent(t);
                    }
                  },
                  k = function () {
                    var i = n(u).height(),
                      r = t.getOffset(u).top;
                    c(u, {
                      beforeLimit: r + 0.25 * i,
                      afterLimit: r + 0.75 * i,
                    });
                  },
                  d = function (n) {
                    var o, r, f, s, e;
                    u &&
                      ((o = n.location),
                      (r = i.dropAdd),
                      (f = "add"),
                      (s = parseInt(u.attr(t.attr("level")), 10)),
                      o <= u.beforeLimit
                        ? ((e = u.prev()),
                          (r = i.dropTop),
                          (f = "insert-before"))
                        : o >= u.afterLimit &&
                          ((e = u.next()),
                          (r = i.dropBottom),
                          (f = "insert-after")),
                      e &&
                        parseInt(e.attr(t.attr("level")), 10) === s &&
                        (r = i.dropMiddle),
                      (h.className = r),
                      (h.command = f));
                  },
                  a = function () {
                    return o._reorderDraggable.hint
                      .children(f + i.dragStatus)
                      .removeClass(i.dropPositions);
                  };
                l &&
                  l.reorder !== !1 &&
                  l.update !== !1 &&
                  ((this._reorderDraggable = this.content
                    .kendoDraggable({
                      distance: 10,
                      holdToDrag: b,
                      group: "listGroup",
                      filter: "tr[data-uid]",
                      ignore: f + i.input,
                      hint: function (t) {
                        return n(
                          '<div class="' + i.header + " " + i.dragClue + '"/>'
                        )
                          .css({
                            width: 300,
                            paddingLeft: t.css("paddingLeft"),
                            paddingRight: t.css("paddingRight"),
                            lineHeight: t.height() + "px",
                            paddingTop: t.css("paddingTop"),
                            paddingBottom: t.css("paddingBottom"),
                          })
                          .append(
                            '<span class="' +
                              i.icon +
                              " " +
                              i.dragStatus +
                              '" /><span class="' +
                              i.dragClueText +
                              '"/>'
                          );
                      },
                      cursorOffset: { top: -20, left: 0 },
                      container: this.content,
                      dragstart: function (n) {
                        var t = o.editable;
                        return t && t.reorder !== !1 && t.trigger("validate")
                          ? void n.preventDefault()
                          : ((e = o._modelFromElement(n.currentTarget)),
                            this.hint
                              .children(f + i.dragClueText)
                              .text(e.get("title")),
                            void (y && this.hint.addClass(i.rtl)));
                      },
                      drag: function (n) {
                        s && (d(n.y), a().addClass(h.className));
                      },
                      dragend: function () {
                        v();
                      },
                      dragcancel: function () {
                        v();
                      },
                    })
                    .data("kendoDraggable")),
                  (this._tableDropArea = this.content
                    .kendoDropTargetArea({
                      distance: 0,
                      group: "listGroup",
                      filter: "tr[data-uid]",
                      dragenter: function (n) {
                        u = n.dropTarget;
                        w(o._modelFromElement(u));
                        k();
                        a().toggleClass(i.dropDenied, !s);
                      },
                      dragleave: function () {
                        s = !0;
                        a();
                      },
                      drop: function () {
                        var n = o._modelFromElement(u),
                          t = n.orderId,
                          i = { parentId: n.parentId };
                        if (s) {
                          switch (h.command) {
                            case "add":
                              i.parentId = n.id;
                              break;
                            case "insert-before":
                              i.orderId =
                                n.parentId === e.parentId &&
                                n.orderId > e.orderId
                                  ? t - 1
                                  : t;
                              break;
                            case "insert-after":
                              i.orderId =
                                n.parentId === e.parentId &&
                                n.orderId > e.orderId
                                  ? t
                                  : t + 1;
                          }
                          o.trigger("update", { task: e, updateInfo: i });
                        }
                      },
                    })
                    .data("kendoDropTargetArea")),
                  (this._contentDropArea = this.element
                    .kendoDropTargetArea({
                      distance: 0,
                      group: "listGroup",
                      filter: f + i.gridContent,
                      drop: function () {
                        var t = o._modelFromElement(o.content.find(p)),
                          n = t.orderId,
                          i = {
                            parentId: null,
                            orderId: null !== e.parentId ? n + 1 : n,
                          };
                        o.trigger("update", { task: e, updateInfo: i });
                      },
                    })
                    .data("kendoDropTargetArea")));
              },
              _resizable: function () {
                var t = this,
                  i = r.styles,
                  o = function (r) {
                    var s,
                      p,
                      u = n(r.currentTarget),
                      f = t.resizeHandle,
                      h = u.position(),
                      c = h.left,
                      a = e(u),
                      v = u.closest("div"),
                      y = r.clientX + n(window).scrollLeft(),
                      o = t.options.columnResizeHandleWidth;
                    return (
                      (c += v.scrollLeft()),
                      f ||
                        (f = t.resizeHandle =
                          n(
                            '<div class="' +
                              i.resizeHandle +
                              '"><div class="' +
                              i.resizeHandleInner +
                              '" /></div>'
                          )),
                      (s = u.offset().left + a),
                      (p = y > s - o && y < s + o)
                        ? (v.append(f),
                          void f
                            .show()
                            .css({
                              top: h.top,
                              left: c + a - o - 1,
                              height: l(u),
                              width: 3 * o,
                            })
                            .data("th", u))
                        : void f.hide()
                    );
                  };
                this.options.resizable &&
                  (this._columnResizable && this._columnResizable.destroy(),
                  this.header.find("thead").on("mousemove" + u, "th", o),
                  (this._columnResizable = this.header
                    .kendoResizable({
                      handle: f + i.resizeHandle,
                      start: function (i) {
                        var r = n(i.currentTarget).data("th"),
                          f = "col:eq(" + r.index() + ")",
                          u = t.header.find("table"),
                          o = t.content.find("table");
                        t.element.addClass("k-grid-column-resizing");
                        this.col = o
                          .children("colgroup")
                          .find(f)
                          .add(u.find(f));
                        this.th = r;
                        this.startLocation = i.x.location;
                        this.columnWidth = e(r);
                        this.table = u.add(o);
                        this.totalWidth =
                          this.table.width() - e(u.find("th:last"));
                      },
                      resize: function (n) {
                        var i = 11,
                          t = n.x.location - this.startLocation;
                        this.columnWidth + t < i && (t = i - this.columnWidth);
                        this.table.css({ minWidth: this.totalWidth + t });
                        this.col.width(this.columnWidth + t);
                      },
                      resizeend: function () {
                        var n, i, r;
                        t.element.removeClass("k-grid-column-resizing");
                        n = Math.floor(this.columnWidth);
                        i = Math.floor(e(this.th));
                        r = t.columns[this.th.index()];
                        t.trigger("columnResize", {
                          column: r,
                          oldWidth: n,
                          newWidth: i,
                        });
                        this.table = this.col = this.th = null;
                      },
                    })
                    .data("kendoResizable")));
              },
              _modelFromElement: function (n) {
                var i = n.closest("tr");
                return this.dataSource.getByUid(i.attr(t.attr("uid")));
              },
              _columnFromElement: function (n) {
                var t = n.closest("td"),
                  i = t.parent(),
                  r = i.children().index(t);
                return this.columns[r];
              },
            }));
          c(!0, s.GanttList, {
            styles: {
              wrapper: "k-treelist k-grid k-widget",
              header: "k-header",
              alt: "k-alt",
              rtl: "k-rtl",
              editCell: "k-edit-cell",
              group: "k-treelist-group",
              gridHeader: "k-grid-header",
              gridHeaderWrap: "k-grid-header-wrap",
              gridContent: "k-grid-content",
              gridContentWrap: "k-grid-content",
              selected: "k-state-selected",
              icon: "k-icon",
              iconCollapse: "k-i-collapse",
              iconExpand: "k-i-expand",
              iconHidden: "k-i-none",
              iconPlaceHolder: "k-icon k-i-none",
              input: "k-input",
              link: "k-link",
              resizeHandle: "k-resize-handle",
              resizeHandleInner: "k-resize-handle-inner",
              dropPositions:
                "k-i-insert-up k-i-insert-down k-i-plus k-i-insert-middle",
              dropTop: "k-i-insert-up",
              dropBottom: "k-i-insert-down",
              dropAdd: "k-i-plus",
              dropMiddle: "k-i-insert-middle",
              dropDenied: "k-i-cancel",
              dragStatus: "k-drag-status",
              dragClue: "k-drag-clue",
              dragClueText: "k-clue-text",
            },
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.gantt.timeline.min",
      ["kendo.dom.min", "kendo.touch.min", "kendo.draganddrop.min"],
      n
    );
  })(
    function () {
      return (
        (function (n) {
          function rt(n) {
            return delete n.name, delete n.prefix, delete n.views, n;
          }
          function ut(n) {
            var i = [],
              t = n.workWeekStart;
            for (i.push(t); n.workWeekEnd != t; )
              t > 6 ? (t -= 7) : t++, i.push(t);
            return i;
          }
          function a() {
            var t = kendo._activeElement();
            t && "body" !== t.nodeName.toLowerCase() && n(t).blur();
          }
          var y,
            f,
            s = kendo.ui.Widget,
            r = kendo.dom.element,
            v = kendo.dom.text,
            p = kendo.dom.html,
            ft = n.isPlainObject,
            h = kendo._outerWidth,
            o = kendo._outerHeight,
            c = n.extend,
            et = n.proxy,
            w = kendo.support.browser,
            u = !1,
            ot = kendo.keys,
            b = kendo.data.Query,
            st = "string",
            e = ".kendoGanttTimeline",
            l = "click",
            ht = "dblclick",
            k = "mousemove",
            ct = "mouseenter",
            d = "mouseleave",
            lt = "keydown",
            t = ".",
            at = kendo.template("#=kendo.toString(start, 't')#"),
            g = kendo.template("#=kendo.toString(start, 'ddd M/dd')#"),
            nt = kendo.template(
              "#=kendo.toString(start, 'ddd M/dd')# - #=kendo.toString(kendo.date.addDays(end, -1), 'ddd M/dd')#"
            ),
            tt = kendo.template("#=kendo.toString(start, 'MMM')#"),
            vt = kendo.template("#=kendo.toString(start, 'yyyy')#"),
            yt = kendo.template(
              '<div class="#=styles.marquee#"><div class="#=styles.marqueeColor#"></div></div>'
            ),
            it = kendo.template(
              '<div style="z-index: 100002;" class="#=styles.tooltipWrapper#"><div class="#=styles.tooltipContent#"><div>#=messages.start#: #=kendo.toString(start, format)#</div><div>#=messages.end#: #=kendo.toString(end, format)#</div></div></div>'
            ),
            pt = kendo.template(
              '<div style="z-index: 100002;" class="#=styles.tooltipWrapper#" ><div class="#=styles.tooltipContent#">#=text#%</div><div class="#=styles.tooltipCallout#" style="left:13px;"></div></div>'
            ),
            wt = kendo.template(
              '<div class="#=kendo.htmlEncode(styles.taskDetails)#"><strong>#=kendo.htmlEncode(task.title)#</strong><div class="#=styles.taskDetailsPercent#">#=kendo.toString(task.percentComplete, "p0")#</div><ul class="#=styles.reset#"><li>#=messages.start#: #=kendo.toString(task.start, "h:mm tt ddd, MMM d")#</li><li>#=messages.end#: #=kendo.toString(task.end, "h:mm tt ddd, MMM d")#</li></ul></div>'
            ),
            bt =
              "<table style='visibility: hidden;'><tbody><tr style='height:{0}'><td>&nbsp;</td></tr></tbody></table>",
            kt = {
              day: { type: "kendo.ui.GanttDayView" },
              week: { type: "kendo.ui.GanttWeekView" },
              month: { type: "kendo.ui.GanttMonthView" },
              year: { type: "kendo.ui.GanttYearView" },
            },
            i = (kendo.ui.GanttView = s.extend({
              init: function (n, r) {
                s.fn.init.call(this, n, r);
                this.title = this.options.title || this.options.name;
                this.header = this.element.find(t + i.styles.gridHeader);
                this.content = this.element.find(t + i.styles.gridContent);
                this.contentWidth = this.content.width();
                this._workDays = ut(this.options);
                this._headerTree = r.headerTree;
                this._taskTree = r.taskTree;
                this._taskTemplate = r.taskTemplate
                  ? kendo.template(
                      r.taskTemplate,
                      c({}, kendo.Template, r.templateSettings)
                    )
                  : null;
                this._dependencyTree = r.dependencyTree;
                this._taskCoordinates = {};
                this._currentTime();
              },
              destroy: function () {
                s.fn.destroy.call(this);
                clearTimeout(this._tooltipTimeout);
                this.headerRow = null;
                this.header = null;
                this.content = null;
                this._dragHint = null;
                this._resizeHint = null;
                this._resizeTooltip = null;
                this._taskTooltip = null;
                this._percentCompleteResizeTooltip = null;
                this._headerTree = null;
                this._taskTree = null;
                this._dependencyTree = null;
              },
              options: {
                showWorkHours: !1,
                showWorkDays: !1,
                workDayStart: new Date(1980, 1, 1, 8, 0, 0),
                workDayEnd: new Date(1980, 1, 1, 17, 0, 0),
                workWeekStart: 1,
                workWeekEnd: 5,
                hourSpan: 1,
                slotSize: 100,
                currentTimeMarker: { updateInterval: 1e4 },
              },
              renderLayout: function () {
                this._slots = this._createSlots();
                this._tableWidth = this._calculateTableWidth();
                this.createLayout(this._layout());
                this._slotDimensions();
                this._adjustHeight();
                this.content
                  .find(t + i.styles.dependenciesWrapper)
                  .width(this._tableWidth);
              },
              _adjustHeight: function () {
                this.content &&
                  this.content.height(this.element.height() - o(this.header));
              },
              createLayout: function (n) {
                var t = this._headers(n),
                  i = this._colgroup(),
                  u = this._headerTree,
                  f = r("tbody", null, t),
                  e = r(
                    "table",
                    {
                      style: { width: this._tableWidth + "px" },
                      role: "presentation",
                    },
                    [i, f]
                  );
                u.render([e]);
                this.headerRow = this.header.find("table:first tr").last();
              },
              _slotDimensions: function () {
                for (
                  var t,
                    i,
                    u = this.headerRow[0].children,
                    f = this._timeSlots(),
                    n = 0,
                    r = u.length;
                  n < r;
                  n++
                )
                  (i = u[n]),
                    (t = f[n]),
                    (t.offsetLeft = i.offsetLeft),
                    (t.offsetWidth = i.offsetWidth);
              },
              render: function (n) {
                var r,
                  f,
                  o = n.length,
                  e = i.styles,
                  h = this._rowsTable(o),
                  c = this._columnsTable(o),
                  l = this._tasksTable(n),
                  s = this.options.currentTimeMarker,
                  u = this.options.calculatedSize;
                this._taskTree.render([h, c, l]);
                r = this.content.find(t + e.rowsTable);
                u &&
                  ((f = u.row * n.length),
                  this.content.find(t + e.tasksTable).height(f),
                  r.height(f));
                this._contentHeight = r.height();
                this._rowHeight = u
                  ? u.row
                  : this._contentHeight / r.find("tr").length;
                this.content
                  .find(t + e.columnsTable)
                  .height(this._contentHeight);
                s !== !1 &&
                  void 0 !== s.updateInterval &&
                  this._renderCurrentTime();
              },
              _rowsTable: function (n) {
                for (
                  var u,
                    f = [],
                    e = i.styles,
                    o = [null, { className: e.alt }],
                    t = 0;
                  t < n;
                  t++
                )
                  (u = r("tr", o[t % 2], [r("td", null, [v(" ")])])), f.push(u);
                return this._createTable(1, f, { className: e.rowsTable });
              },
              _columnsTable: function () {
                for (
                  var e,
                    f,
                    n,
                    t,
                    o = [],
                    s = i.styles,
                    h = this._timeSlots(),
                    l = h.length,
                    c = 0,
                    u = 0;
                  u < l;
                  u++
                )
                  (f = h[u]),
                    (t = {}),
                    (n = f.span),
                    (c += n),
                    1 !== n && (t.colspan = n),
                    f.isNonWorking && (t.className = s.nonWorking),
                    o.push(r("td", t, [v(" ")]));
                return (
                  (e = r("tr", null, o)),
                  this._createTable(c, [e], { className: s.columnsTable })
                );
              },
              _tasksTable: function (n) {
                for (
                  var h,
                    o,
                    f,
                    t,
                    c,
                    s,
                    y = [],
                    l = i.styles,
                    k = (this._taskCoordinates = {}),
                    p = this._calculateMilestoneWidth(),
                    w = Math.round(p.width),
                    a = this.options.resourcesField,
                    d = [l.resource, l.resourceAlt],
                    b = this.options.calculatedSize,
                    g = this._calculateResourcesMargin(),
                    nt = this._calculateTaskBorderWidth(),
                    tt = function (n) {
                      var i = f.left,
                        r = i + f.width;
                      t.isMilestone() && ((i -= w / 2), (r = i + w));
                      k[t.id] = { start: i, end: r, rowIndex: n };
                    },
                    e = 0,
                    v = n.length;
                  e < v;
                  e++
                )
                  (t = n[e]),
                    (f = this._taskPosition(t)),
                    (f.borderWidth = nt),
                    (h = r("tr", null)),
                    (o = r("td")),
                    t.start <= this.end &&
                      t.end >= this.start &&
                      (o.children.push(this._renderTask(n[e], f)),
                      t[a] &&
                        t[a].length &&
                        ((c = u
                          ? this._tableWidth - f.left
                          : Math.max(f.width || p.clientWidth, 0) + f.left),
                        (s = { width: this._tableWidth - (c + g) + "px" }),
                        (s[u ? "right" : "left"] = c + "px"),
                        b && (s.height = b.cell + "px"),
                        o.children.push(
                          r(
                            "div",
                            { className: l.resourcesWrap, style: s },
                            this._renderResources(t[a], d[e % 2])
                          )
                        )),
                      tt(e)),
                    h.children.push(o),
                    y.push(h);
                return this._createTable(1, y, {
                  className: i.styles.tasksTable,
                });
              },
              _createTable: function (n, t, i) {
                for (var f, e, o = [], u = 0; u < n; u++) o.push(r("col"));
                return (
                  (f = r("colgroup", null, o)),
                  (e = r("tbody", null, t)),
                  i.style || (i.style = {}),
                  (i.style.width = this._tableWidth + "px"),
                  (i.role = "presentation"),
                  r("table", i, [f, e])
                );
              },
              _calculateTableWidth: function () {
                for (
                  var n,
                    u = this._timeSlots(),
                    i = 0,
                    f = 0,
                    t = 0,
                    r = u.length;
                  t < r;
                  t++
                )
                  (n = u[t].span), (f += n), n > i && (i = n);
                return Math.round((f * this.options.slotSize) / i);
              },
              _calculateMilestoneWidth: function () {
                var u,
                  r,
                  f = i.styles.task + " " + i.styles.taskMilestone,
                  t = n(
                    "<div class='" +
                      f +
                      "' style='visibility: hidden; position: absolute'>"
                  );
                return (
                  this.content.append(t),
                  (r = t[0].getBoundingClientRect()),
                  (u = {
                    width: r.right - r.left,
                    clientWidth: t[0].clientWidth,
                  }),
                  t.remove(),
                  u
                );
              },
              _calculateResourcesMargin: function () {
                var r,
                  t = n(
                    "<div class='" +
                      i.styles.resourcesWrap +
                      "' style='visibility: hidden; position: absolute'>"
                  );
                return (
                  this.content.append(t),
                  (r = parseInt(t.css(u ? "margin-right" : "margin-left"), 10)),
                  t.remove(),
                  r
                );
              },
              _calculateTaskBorderWidth: function () {
                var r,
                  u,
                  f = i.styles.task + " " + i.styles.taskSingle,
                  t = n(
                    "<div class='" +
                      f +
                      "' style='visibility: hidden; position: absolute'>"
                  );
                return (
                  this.content.append(t),
                  (u = kendo.getComputedStyles(t[0], ["border-left-width"])),
                  (r = parseFloat(u["border-left-width"], 10)),
                  t.remove(),
                  r
                );
              },
              _renderTask: function (n, t) {
                var e,
                  s,
                  c,
                  o = this.options.editable,
                  v = t.left,
                  f = i.styles,
                  y = f.taskWrap,
                  l = this.options.calculatedSize,
                  a = {},
                  h = { className: y, style: { left: v + "px" } };
                return (
                  l && (h.style.height = l.cell + "px"),
                  n.summary
                    ? (s = this._renderSummary(n, t))
                    : n.isMilestone()
                    ? ((s = this._renderMilestone(n, t)),
                      (h.className += " " + f.taskMilestoneWrap))
                    : (s = this._renderSingleTask(n, t)),
                  (e = r("div", h, [s])),
                  o &&
                    o.dependencyCreate !== !1 &&
                    (e.children.push(
                      r("div", { className: f.taskDot + " " + f.taskDotStart })
                    ),
                    e.children.push(
                      r("div", { className: f.taskDot + " " + f.taskDotEnd })
                    )),
                  n.summary ||
                    n.isMilestone() ||
                    !o ||
                    o.dragPercentComplete === !1 ||
                    o.update === !1 ||
                    null !== this._taskTemplate ||
                    ((c = Math.round(t.width * n.percentComplete)),
                    (a[u ? "right" : "left"] = c + "px"),
                    e.children.push(
                      r("div", { className: f.taskDragHandle, style: a })
                    )),
                  e
                );
              },
              _renderSingleTask: function (n, t) {
                var o,
                  f,
                  h,
                  u = i.styles,
                  c = Math.round(t.width * n.percentComplete),
                  s = [],
                  e = this.options.editable;
                return (
                  null !== this._taskTemplate
                    ? (o = p(this._taskTemplate(n)))
                    : ((o = v(n.title)),
                      s.push(
                        r("div", {
                          className: u.taskComplete,
                          style: { width: c + "px" },
                        })
                      )),
                  (f = r("div", { className: u.taskContent }, [
                    r("div", { className: u.taskTemplate }, [o]),
                  ])),
                  s.push(f),
                  e &&
                    (e.destroy !== !1 &&
                      f.children.push(
                        r("span", { className: u.taskActions }, [
                          r(
                            "a",
                            {
                              className: u.link + " " + u.taskDelete,
                              href: "#",
                              "aria-label": "Delete",
                            },
                            [
                              r("span", {
                                className: u.icon + " " + u.iconDelete,
                              }),
                            ]
                          ),
                        ])
                      ),
                    e.resize !== !1 &&
                      e.update !== !1 &&
                      (f.children.push(
                        r("span", {
                          className:
                            u.taskResizeHandle + " " + u.taskResizeHandleWest,
                        })
                      ),
                      f.children.push(
                        r("span", {
                          className:
                            u.taskResizeHandle + " " + u.taskResizeHandleEast,
                        })
                      ))),
                  (h = r(
                    "div",
                    {
                      className: u.task + " " + u.taskSingle,
                      "data-uid": n.uid,
                      style: {
                        width: Math.max(t.width - 2 * t.borderWidth, 0) + "px",
                      },
                    },
                    s
                  ))
                );
              },
              _renderMilestone: function (n) {
                var t = i.styles;
                return r("div", {
                  className: t.task + " " + t.taskMilestone,
                  "data-uid": n.uid,
                });
              },
              _renderSummary: function (n, t) {
                var u = i.styles,
                  f = Math.round(t.width * n.percentComplete);
                return r(
                  "div",
                  {
                    className: u.task + " " + u.taskSummary,
                    "data-uid": n.uid,
                    style: { width: t.width + "px" },
                  },
                  [
                    r(
                      "div",
                      {
                        className: u.taskSummaryProgress,
                        style: { width: f + "px" },
                      },
                      [
                        r("div", {
                          className: u.taskSummaryComplete,
                          style: { width: t.width + "px" },
                        }),
                      ]
                    ),
                  ]
                );
              },
              _renderResources: function (n, t) {
                for (var f, e = [], i = 0, o = n.length; i < o; i++)
                  (f = n[i]),
                    e.push(
                      r(
                        "span",
                        { className: t, style: { color: f.get("color") } },
                        [v(f.get("name"))]
                      )
                    );
                return u && e.reverse(), e;
              },
              _taskPosition: function (n) {
                var t = Math.round,
                  i = t(this._offset(u ? n.end : n.start)),
                  r = t(this._offset(u ? n.start : n.end));
                return { left: i, width: r - i };
              },
              _offset: function (n) {
                var t,
                  r,
                  f,
                  e,
                  o = this._timeSlots(),
                  i = 0;
                return o.length
                  ? ((e = this._slotIndex("start", n)),
                    (t = o[e]),
                    t.end < n
                      ? (i = t.offsetWidth)
                      : t.start <= n &&
                        ((r = n - t.start),
                        (f = t.end - t.start),
                        (i = (r / f) * t.offsetWidth)),
                    u && (i = t.offsetWidth + 1 - i),
                    t.offsetLeft + i)
                  : 0;
              },
              _slotIndex: function (n, t, i) {
                var r,
                  f = this._timeSlots(),
                  u = 0,
                  e = f.length - 1;
                i && (f = [].slice.call(f).reverse());
                do
                  (r = Math.ceil((e + u) / 2)),
                    f[r][n] < t ? (u = r) : (r === e && r--, (e = r));
                while (u !== e);
                return i && (u = f.length - 1 - u), u;
              },
              _timeByPosition: function (r, f, e) {
                var h,
                  c,
                  s,
                  o = this._slotByPosition(r);
                return f
                  ? e
                    ? o.end
                    : o.start
                  : ((h = r - n(t + i.styles.tasksTable).offset().left),
                    (c = o.end - o.start),
                    (s = h - o.offsetLeft),
                    u && (s = o.offsetWidth - s),
                    new Date(o.start.getTime() + c * (s / o.offsetWidth)));
              },
              _slotByPosition: function (r) {
                var f = r - n(t + i.styles.tasksTable).offset().left,
                  e = this._slotIndex("offsetLeft", f, u);
                return this._timeSlots()[e];
              },
              _renderDependencies: function (n) {
                for (
                  var i = [], u = this._dependencyTree, t = 0, r = n.length;
                  t < r;
                  t++
                )
                  i.push.apply(i, this._renderDependency(n[t]));
                u.render(i);
              },
              _renderDependency: function (n) {
                var t,
                  r,
                  i,
                  f,
                  e = this._taskCoordinates[n.predecessorId],
                  o = this._taskCoordinates[n.successorId];
                if (!e || !o) return [];
                for (
                  r =
                    "_render" +
                    ["FF", "FS", "SF", "SS"][u ? 3 - n.type : n.type],
                    t = this[r](e, o),
                    i = 0,
                    f = t.length;
                  i < f;
                  i++
                )
                  t[i].attr["data-uid"] = n.uid;
                return t;
              },
              _renderFF: function (n, t) {
                var i = this._dependencyFF(n, t, !1);
                return (i[i.length - 1].children[0] = this._arrow(!0)), i;
              },
              _renderSS: function (n, t) {
                var i = this._dependencyFF(t, n, !0);
                return (i[0].children[0] = this._arrow(!1)), i.reverse();
              },
              _renderFS: function (n, t) {
                var i = this._dependencyFS(n, t, !1);
                return (i[i.length - 1].children[0] = this._arrow(!1)), i;
              },
              _renderSF: function (n, t) {
                var i = this._dependencyFS(t, n, !0);
                return (i[0].children[0] = this._arrow(!0)), i.reverse();
              },
              _dependencyFF: function (n, t, r) {
                var v,
                  w = this,
                  y = [],
                  e = 0,
                  f = 0,
                  u = 0,
                  o = 0,
                  s = r ? "start" : "end",
                  h = 2,
                  b = 1,
                  c = this._rowHeight,
                  k = 10,
                  g = n.rowIndex * c + Math.floor(c / 2) - 1,
                  l = t.rowIndex * c + Math.floor(c / 2) - 1,
                  a = i.styles,
                  p = function () {
                    y.push(
                      w._line(a.line + " " + a.lineHorizontal, {
                        left: e + "px",
                        top: f + "px",
                        width: u + "px",
                      })
                    );
                  },
                  d = function () {
                    y.push(
                      w._line(a.line + " " + a.lineVertical, {
                        left: e + "px",
                        top: f + "px",
                        height: o + "px",
                      })
                    );
                  };
                return (
                  (e = n[s]),
                  (f = g),
                  (u = k),
                  (v = t[s] - n[s]),
                  v > 0 !== r && (u = Math.abs(v) + k),
                  r ? ((e -= u), (u -= b), p()) : (p(), (e += u - h)),
                  l < f
                    ? ((o = f - l), (o += h), (f = l), d())
                    : ((o = l - f), (o += h), d(), (f += o - h)),
                  (u = Math.abs(e - t[s])),
                  r || ((u -= b), (e -= u)),
                  p(),
                  y
                );
              },
              _dependencyFS: function (n, t, r) {
                var g = this,
                  p = [],
                  o = 0,
                  f = 0,
                  u = 0,
                  e = 0,
                  h = this._rowHeight,
                  nt = Math.floor(h / 2),
                  c = 10,
                  w = 2 * c,
                  b = t.start - n.end,
                  l = 2,
                  k = 1,
                  a = n.rowIndex * h + Math.floor(h / 2) - 1,
                  s = t.rowIndex * h + Math.floor(h / 2) - 1,
                  v = i.styles,
                  d = function () {
                    p.push(
                      g._line(v.line + " " + v.lineHorizontal, {
                        left: o + "px",
                        top: f + "px",
                        width: u + "px",
                      })
                    );
                  },
                  y = function () {
                    p.push(
                      g._line(v.line + " " + v.lineVertical, {
                        left: o + "px",
                        top: f + "px",
                        height: e + "px",
                      })
                    );
                  };
                return (
                  (o = n.end),
                  (f = a),
                  (u = c),
                  r && ((o += k), b > w && (u = b - (c - l)), (u -= k)),
                  d(),
                  (o += u - l),
                  b <= w &&
                    ((e = r ? Math.abs(s - a) - nt : nt),
                    s < a ? ((f -= e), (e += l), y()) : (y(), (f += e)),
                    (u = n.end - t.start + w),
                    u < c && (u = c),
                    (o -= u - l),
                    d()),
                  s < a
                    ? ((e = f - s), (f = s), (e += l), y())
                    : ((e = s - f), y(), (f += e)),
                  (u = t.start - o),
                  r || (u -= k),
                  d(),
                  p
                );
              },
              _line: function (n, t) {
                return r("div", { className: n, style: t });
              },
              _arrow: function (n) {
                return r("span", {
                  className: n ? i.styles.arrowWest : i.styles.arrowEast,
                });
              },
              _colgroup: function () {
                for (
                  var t, i, u = this._timeSlots(), e = u.length, f = [], n = 0;
                  n < e;
                  n++
                )
                  for (t = 0, i = u[n].span; t < i; t++) f.push(r("col"));
                return r("colgroup", null, f);
              },
              _createDragHint: function (n) {
                this._dragHint = n
                  .clone()
                  .addClass(i.styles.dragHint)
                  .css("cursor", "move");
                n.parent().append(this._dragHint);
              },
              _updateDragHint: function (n) {
                var t = this._offset(n);
                this._dragHint.css({ left: t });
              },
              _removeDragHint: function () {
                this._dragHint.remove();
                this._dragHint = null;
              },
              _createResizeHint: function (t) {
                var u,
                  r,
                  f = i.styles,
                  e = this._taskCoordinates[t.id].rowIndex * this._rowHeight,
                  s = this.options,
                  c = s.messages;
                this._resizeHint = n(yt({ styles: f })).css({
                  top: 0,
                  height: this._contentHeight,
                });
                this.content.append(this._resizeHint);
                this._resizeTooltip = n(
                  it({
                    styles: f,
                    start: t.start,
                    end: t.end,
                    messages: c.views,
                    format: s.resizeTooltipFormat,
                  })
                ).css({ top: 0, left: 0 });
                this.content.append(this._resizeTooltip);
                this._resizeTooltipWidth = h(this._resizeTooltip);
                u = o(this._resizeTooltip);
                r = e - u;
                r < 0 && (r = e + this._rowHeight);
                this._resizeTooltipTop = r;
              },
              _updateResizeHint: function (r, f, e) {
                var s = this._offset(u ? f : r),
                  c = this._offset(u ? r : f),
                  y = c - s,
                  o = e !== u ? s : c,
                  l = this._tableWidth - kendo.support.scrollbar(),
                  h = this._resizeTooltipWidth,
                  a = this.options,
                  p = a.messages,
                  v =
                    n(t + i.styles.tasksTable).offset().left -
                    n(t + i.styles.tasksWrapper).offset().left;
                u && (s += v);
                this._resizeHint.css({ left: s, width: y });
                this._resizeTooltip && this._resizeTooltip.remove();
                o -= Math.round(h / 2);
                o < 0 ? (o = 0) : o + h > l && (o = l - h);
                u && (o += v);
                this._resizeTooltip = n(
                  it({
                    styles: i.styles,
                    start: r,
                    end: f,
                    messages: p.views,
                    format: a.resizeTooltipFormat,
                  })
                )
                  .css({ top: this._resizeTooltipTop, left: o, "min-width": h })
                  .appendTo(this.content);
              },
              _removeResizeHint: function () {
                this._resizeHint.remove();
                this._resizeHint = null;
                this._resizeTooltip.remove();
                this._resizeTooltip = null;
              },
              _updatePercentCompleteTooltip: function (r, u, f) {
                var e, s, c, l;
                this._removePercentCompleteTooltip();
                e = this._percentCompleteResizeTooltip = n(
                  pt({ styles: i.styles, text: f })
                ).appendTo(this.element);
                s = Math.round(h(e) / 2);
                c = e.find(t + i.styles.callout);
                l = Math.round(h(c) / 2);
                e.css({ top: r - (o(e) + l), left: u - s });
                c.css("left", s - l);
              },
              _removePercentCompleteTooltip: function () {
                this._percentCompleteResizeTooltip &&
                  this._percentCompleteResizeTooltip.remove();
                this._percentCompleteResizeTooltip = null;
              },
              _updateDependencyDragHint: function (n, t, i) {
                this._removeDependencyDragHint();
                i
                  ? this._creteVmlDependencyDragHint(n, t)
                  : this._creteDependencyDragHint(n, t);
              },
              _creteDependencyDragHint: function (t, r) {
                var e = i.styles,
                  u = r.x - t.x,
                  o = r.y - t.y,
                  s = Math.sqrt(u * u + o * o),
                  f = Math.atan(o / u);
                u < 0 && (f += Math.PI);
                n(
                  "<div class='" +
                    e.line +
                    " " +
                    e.lineHorizontal +
                    " " +
                    e.dependencyHint +
                    "'></div>"
                )
                  .css({
                    top: t.y,
                    left: t.x,
                    width: s,
                    "transform-origin": "0% 0",
                    "-ms-transform-origin": "0% 0",
                    "-webkit-transform-origin": "0% 0",
                    transform: "rotate(" + f + "rad)",
                    "-ms-transform": "rotate(" + f + "rad)",
                    "-webkit-transform": "rotate(" + f + "rad)",
                  })
                  .appendTo(this.content);
              },
              _creteVmlDependencyDragHint: function (t, r) {
                var u = n(
                  "<kvml:line class='" +
                    i.styles.dependencyHint +
                    "' style='position:absolute; top: 0px; left: 0px;' strokecolor='black' strokeweight='2px' from='" +
                    t.x +
                    "px," +
                    t.y +
                    "px' to='" +
                    r.x +
                    "px," +
                    r.y +
                    "px'></kvml:line>"
                ).appendTo(this.content);
                u[0].outerHTML = u[0].outerHTML;
              },
              _removeDependencyDragHint: function () {
                this.content.find(t + i.styles.dependencyHint).remove();
              },
              _createTaskTooltip: function (r, f, e) {
                var y,
                  p = i.styles,
                  w = this.options,
                  s = this.content,
                  a = s.offset(),
                  k = s.width(),
                  v = kendo.scrollLeft(s),
                  d = n(f).parents("tr").first(),
                  b = d.offset(),
                  g =
                    w.tooltip && w.tooltip.template
                      ? kendo.template(w.tooltip.template)
                      : wt,
                  c = u
                    ? e - (a.left + v + kendo.support.scrollbar())
                    : e - (a.left - v),
                  nt = b.top + o(d) - a.top + s.scrollTop(),
                  l = (this._taskTooltip = n(
                    '<div style="z-index: 100002;" class="' +
                      p.tooltipWrapper +
                      '" ><div class="' +
                      p.taskContent +
                      '"></div></div>'
                  ));
                l.css({ left: c, top: nt })
                  .appendTo(s)
                  .find(t + p.taskContent)
                  .append(
                    g({ styles: p, task: r, messages: w.messages.views })
                  );
                o(l) < b.top - a.top &&
                  l.css("top", b.top - a.top - o(l) + s.scrollTop());
                y = h(l);
                y + c - v > k &&
                  ((c -= y), c < v && (c = v + k - (y + 17)), l.css("left", c));
              },
              _removeTaskTooltip: function () {
                this._taskTooltip && this._taskTooltip.remove();
                this._taskTooltip = null;
              },
              _scrollTo: function (n) {
                var i = n.offset().left,
                  r = n.width(),
                  e = i + r,
                  c = n.closest("tr"),
                  s = c.offset().top,
                  p = c.height(),
                  l = s + p,
                  t = this.content,
                  a = t.offset(),
                  h = a.top,
                  w = t.height(),
                  v = h + w,
                  u = a.left,
                  f = t.width(),
                  o = u + f,
                  y = kendo.support.scrollbar();
                s < h
                  ? t.scrollTop(t.scrollTop() + (s - h))
                  : l > v && t.scrollTop(t.scrollTop() + (l + y - v));
                (i < u && r > f && e < o) || (e > o && r < f)
                  ? t.scrollLeft(t.scrollLeft() + (e + y - o))
                  : ((e > o && r > f && i > u) || (i < u && r < f)) &&
                    t.scrollLeft(t.scrollLeft() + (i - u));
              },
              _scrollToDate: function (n) {
                var t,
                  i = this.start,
                  r = this.end;
                n >= i &&
                  n < r &&
                  ((t = this._offset(n)),
                  kendo.support.isRtl(this.element) &&
                    (t = this._tableWidth - t),
                  kendo.scrollLeft(this.content, t));
              },
              _timeSlots: function () {
                return this._slots && this._slots.length
                  ? this._slots[this._slots.length - 1]
                  : [];
              },
              _headers: function (n) {
                for (
                  var e,
                    o,
                    t,
                    s,
                    f,
                    c,
                    l = [],
                    a = i.styles,
                    u = 0,
                    h = n.length;
                  u < h;
                  u++
                ) {
                  for (e = n[u], o = [], f = 0, c = e.length; f < c; f++)
                    (t = e[f]),
                      (s = p(t.text)),
                      o.push(
                        r(
                          "td",
                          {
                            colspan: t.span,
                            className:
                              a.header +
                              (t.isNonWorking ? " " + a.nonWorking : ""),
                          },
                          [s]
                        )
                      );
                  l.push(r("tr", null, o));
                }
                return l;
              },
              _hours: function (n, t) {
                var i,
                  f,
                  u,
                  e = [],
                  r = this.options,
                  o = r.workDayStart.getHours(),
                  h = r.workDayEnd.getHours(),
                  s = r.hourSpan;
                for (
                  n = new Date(n),
                    t = new Date(t),
                    r.showWorkHours && n.setHours(o);
                  n < t;

                )
                  (i = new Date(n)),
                    (u = i.getHours()),
                    (f = u >= o && u < h),
                    i.setHours(i.getHours() + s),
                    u == i.getHours() && i.setHours(i.getHours() + 2 * s),
                    (r.showWorkHours && !f) ||
                      e.push({ start: n, end: i, isNonWorking: !f, span: 1 }),
                    (n = i);
                return e;
              },
              _days: function (n, t) {
                var i,
                  r,
                  u = [];
                for (n = new Date(n), t = new Date(t); n < t; )
                  (i = t < kendo.date.nextDay(n) ? t : kendo.date.nextDay(n)),
                    (r = this._isWorkDay(n)),
                    (this.options.showWorkDays && !r) ||
                      u.push({ start: n, end: i, isNonWorking: !r, span: 1 }),
                    (n = i);
                return u;
              },
              _weeks: function (n, t) {
                var i,
                  r,
                  u,
                  f = [],
                  e = this.calendarInfo().firstDay;
                for (n = new Date(n), t = new Date(t); n < t; )
                  (i = kendo.date.dayOfWeek(kendo.date.addDays(n, 1), e, 1)),
                    i > t && (i = t),
                    (r = this._days(n, i)),
                    (u = r.length),
                    u > 0 &&
                      f.push({ start: r[0].start, end: r[u - 1].end, span: u }),
                    (n = i);
                return f;
              },
              _months: function (n, t) {
                var i,
                  f,
                  r,
                  u,
                  e = [];
                for (n = new Date(n), t = new Date(t); n < t; )
                  (i = new Date(n)),
                    (f = kendo.date.firstDayOfMonth(
                      new Date(i.setMonth(i.getMonth() + 1))
                    )),
                    (i = t < f ? t : f),
                    (r = this._days(n, i)),
                    (u = r.length),
                    u > 0 &&
                      e.push({ start: r[0].start, end: r[u - 1].end, span: u }),
                    (n = i);
                return e;
              },
              _years: function (n, t) {
                var i,
                  r,
                  u,
                  f = [];
                for (n = new Date(n), t = new Date(t); n < t; )
                  (i = new Date(n)),
                    (i = kendo.date.firstDayOfMonth(new Date(i.setMonth(12)))),
                    i >= t && (i = t),
                    (u = i.getMonth() || 12),
                    (r = u - n.getMonth()),
                    f.push({ start: n, end: i, span: r }),
                    (n = i);
                return f;
              },
              _slotHeaders: function (n, t) {
                for (var i, f = [], r = 0, u = n.length; r < u; r++)
                  (i = n[r]),
                    f.push({
                      text: t(i),
                      isNonWorking: !!i.isNonWorking,
                      span: i.span,
                    });
                return f;
              },
              _isWorkDay: function (n) {
                for (
                  var u = n.getDay(), r = this._workDays, t = 0, i = r.length;
                  t < i;
                  t++
                )
                  if (r[t] === u) return !0;
                return !1;
              },
              calendarInfo: function () {
                return kendo.getCulture().calendars.standard;
              },
              _renderCurrentTime: function () {
                var u,
                  r = this._getCurrentTime(),
                  f = this._offset(r),
                  h = n("<div class='k-current-time'></div>"),
                  e = i.styles,
                  o = n(t + e.tasksWrapper),
                  s = n(t + e.tasksTable);
                this.content &&
                  this._timeSlots().length &&
                  (this.content.find(".k-current-time").remove(),
                  (u = this._timeSlots()[this._slotIndex("start", r)]),
                  r < u.start ||
                    r > u.end ||
                    (o.length &&
                      s.length &&
                      (f += s.offset().left - o.offset().left),
                    h
                      .css({
                        left: f + "px",
                        top: "0px",
                        width: "1px",
                        height: this._contentHeight + "px",
                      })
                      .appendTo(this.content)));
              },
              _getCurrentTime: function () {
                return new Date();
              },
              _currentTime: function () {
                var n = this.options.currentTimeMarker;
                n !== !1 &&
                  void 0 !== n.updateInterval &&
                  (this._renderCurrentTime(),
                  (this._currentTimeUpdateTimer = setInterval(
                    et(this._renderCurrentTime, this),
                    n.updateInterval
                  )));
              },
            }));
          c(!0, i, {
            styles: {
              alt: "k-alt",
              reset: "k-reset",
              nonWorking: "k-nonwork-hour",
              header: "k-header",
              gridHeader: "k-grid-header",
              gridHeaderWrap: "k-grid-header-wrap",
              gridContent: "k-grid-content",
              tasksWrapper: "k-gantt-tables",
              rowsTable: "k-gantt-rows",
              columnsTable: "k-gantt-columns",
              tasksTable: "k-gantt-tasks",
              dependenciesWrapper: "k-gantt-dependencies",
              resource: "k-resource",
              resourceAlt: "k-resource k-alt",
              task: "k-task",
              taskSingle: "k-task-single",
              taskMilestone: "k-task-milestone",
              taskSummary: "k-task-summary",
              taskWrap: "k-task-wrap",
              taskMilestoneWrap: "k-milestone-wrap",
              resourcesWrap: "k-resources-wrap",
              taskDot: "k-task-dot",
              taskDotStart: "k-task-start",
              taskDotEnd: "k-task-end",
              taskDragHandle: "k-task-draghandle",
              taskContent: "k-task-content",
              taskTemplate: "k-task-template",
              taskActions: "k-task-actions",
              taskDelete: "k-task-delete",
              taskComplete: "k-task-complete",
              taskDetails: "k-task-details",
              taskDetailsPercent: "k-task-pct",
              link: "k-link",
              icon: "k-icon",
              iconDelete: "k-i-close",
              taskResizeHandle: "k-resize-handle",
              taskResizeHandleWest: "k-resize-w",
              taskResizeHandleEast: "k-resize-e",
              taskSummaryProgress: "k-task-summary-progress",
              taskSummaryComplete: "k-task-summary-complete",
              line: "k-line",
              lineHorizontal: "k-line-h",
              lineVertical: "k-line-v",
              arrowWest: "k-arrow-w",
              arrowEast: "k-arrow-e",
              dragHint: "k-drag-hint",
              dependencyHint: "k-dependency-hint",
              tooltipWrapper: "k-widget k-tooltip k-popup k-group k-reset",
              tooltipContent: "k-tooltip-content",
              tooltipCallout: "k-callout k-callout-s",
              callout: "k-callout",
              marquee: "k-marquee k-gantt-marquee",
              marqueeColor: "k-marquee-color",
            },
          });
          kendo.ui.GanttDayView = i.extend({
            name: "day",
            options: {
              timeHeaderTemplate: at,
              dayHeaderTemplate: g,
              resizeTooltipFormat: "h:mm tt ddd, MMM d",
            },
            range: function (n) {
              var t = this.options.range;
              this.start = kendo.date.getDate(n.start);
              this.end = kendo.date.getDate(n.end);
              (kendo.date.getMilliseconds(n.end) > 0 ||
                this.end.getTime() === this.start.getTime()) &&
                (this.end = kendo.date.addDays(this.end, 1));
              t &&
                t.start &&
                ((this.start = kendo.date.getDate(t.start)),
                this.start.setHours(t.start.getHours()));
              t &&
                t.end &&
                ((this.end = kendo.date.getDate(t.end)),
                this.end.setHours(t.end.getHours()));
            },
            _createSlots: function () {
              for (
                var n,
                  i,
                  r = [],
                  u = this._days(this.start, this.end),
                  f = [],
                  t = 0,
                  e = u.length;
                t < e;
                t++
              )
                (n = u[t]),
                  (i = this._hours(n.start, n.end)),
                  (n.span = i.length),
                  f.push.apply(f, i);
              return r.push(u), r.push(f), r;
            },
            _layout: function () {
              var n = [],
                t = this.options;
              return (
                n.push(
                  this._slotHeaders(
                    this._slots[0],
                    kendo.template(t.dayHeaderTemplate)
                  )
                ),
                n.push(
                  this._slotHeaders(
                    this._slots[1],
                    kendo.template(t.timeHeaderTemplate)
                  )
                ),
                n
              );
            },
          });
          kendo.ui.GanttWeekView = i.extend({
            name: "week",
            options: {
              dayHeaderTemplate: g,
              weekHeaderTemplate: nt,
              resizeTooltipFormat: "h:mm tt ddd, MMM d",
            },
            range: function (n) {
              var i,
                t = this.options.range,
                f = this.calendarInfo(),
                u = f.firstDay,
                r = n.end;
              u === r.getDay() && r.setDate(r.getDate() + 7);
              this.start = kendo.date.getDate(
                kendo.date.dayOfWeek(n.start, u, -1)
              );
              this.end = kendo.date.getDate(kendo.date.dayOfWeek(r, u, 1));
              t && t.start && (this.start = kendo.date.getDate(t.start));
              t &&
                t.end &&
                ((i = new Date(t.end)),
                (this.end =
                  kendo.date.getDate(i) < t.end
                    ? kendo.date.getDate(new Date(i.setDate(i.getDate() + 1)))
                    : kendo.date.getDate(i)));
            },
            _createSlots: function () {
              var n = [];
              return (
                n.push(this._weeks(this.start, this.end)),
                n.push(this._days(this.start, this.end)),
                n
              );
            },
            _layout: function () {
              var n = [],
                t = this.options;
              return (
                n.push(
                  this._slotHeaders(
                    this._slots[0],
                    kendo.template(t.weekHeaderTemplate)
                  )
                ),
                n.push(
                  this._slotHeaders(
                    this._slots[1],
                    kendo.template(t.dayHeaderTemplate)
                  )
                ),
                n
              );
            },
          });
          kendo.ui.GanttMonthView = i.extend({
            name: "month",
            options: {
              weekHeaderTemplate: nt,
              monthHeaderTemplate: tt,
              resizeTooltipFormat: "dddd, MMM d, yyyy",
            },
            range: function (n) {
              var i,
                t = this.options.range;
              this.start = kendo.date.firstDayOfMonth(n.start);
              this.end = kendo.date.addDays(
                kendo.date.getDate(kendo.date.lastDayOfMonth(n.end)),
                1
              );
              t && t.start && (this.start = kendo.date.getDate(t.start));
              t &&
                t.end &&
                ((i = new Date(t.end)),
                (this.end =
                  kendo.date.getDate(i) < t.end
                    ? kendo.date.getDate(new Date(i.setDate(i.getDate() + 1)))
                    : kendo.date.getDate(i)));
            },
            _createSlots: function () {
              var n = [];
              return (
                n.push(this._months(this.start, this.end)),
                n.push(this._weeks(this.start, this.end)),
                n
              );
            },
            _layout: function () {
              var n = [],
                t = this.options;
              return (
                n.push(
                  this._slotHeaders(
                    this._slots[0],
                    kendo.template(t.monthHeaderTemplate)
                  )
                ),
                n.push(
                  this._slotHeaders(
                    this._slots[1],
                    kendo.template(t.weekHeaderTemplate)
                  )
                ),
                n
              );
            },
          });
          kendo.ui.GanttYearView = i.extend({
            name: "year",
            options: {
              yearHeaderTemplate: vt,
              monthHeaderTemplate: tt,
              resizeTooltipFormat: "dddd, MMM d, yyyy",
            },
            range: function (n) {
              var i,
                t = this.options.range;
              this.start = kendo.date.firstDayOfMonth(
                new Date(n.start.setMonth(0))
              );
              this.end = kendo.date.firstDayOfMonth(
                new Date(n.end.setMonth(12))
              );
              t &&
                t.start &&
                (this.start = kendo.date.firstDayOfMonth(t.start));
              t &&
                t.end &&
                ((i = kendo.date.firstDayOfMonth(t.end)),
                (this.end = kendo.date.getDate(
                  new Date(i.setMonth(i.getMonth() + 1))
                )));
            },
            _createSlots: function () {
              var t = [],
                i = this._months(this.start, this.end);
              return (
                n(i).each(function (n, t) {
                  t.span = 1;
                }),
                t.push(this._years(this.start, this.end)),
                t.push(i),
                t
              );
            },
            _layout: function () {
              var n = [],
                t = this.options;
              return (
                n.push(
                  this._slotHeaders(
                    this._slots[0],
                    kendo.template(t.yearHeaderTemplate)
                  )
                ),
                n.push(
                  this._slotHeaders(
                    this._slots[1],
                    kendo.template(t.monthHeaderTemplate)
                  )
                ),
                n
              );
            },
          });
          y = {
            wrapper: "k-timeline k-grid k-widget",
            gridHeader: "k-grid-header",
            gridHeaderWrap: "k-grid-header-wrap",
            gridContent: "k-grid-content",
            gridContentWrap: "k-grid-content",
            tasksWrapper: "k-gantt-tables",
            dependenciesWrapper: "k-gantt-dependencies",
            task: "k-task",
            line: "k-line",
            taskResizeHandle: "k-resize-handle",
            taskResizeHandleWest: "k-resize-w",
            taskDragHandle: "k-task-draghandle",
            taskComplete: "k-task-complete",
            taskDelete: "k-task-delete",
            taskWrapActive: "k-task-wrap-active",
            taskWrap: "k-task-wrap",
            taskDot: "k-task-dot",
            taskDotStart: "k-task-start",
            taskDotEnd: "k-task-end",
            hovered: "k-state-hover",
            selected: "k-state-selected",
            origin: "k-origin",
          };
          f = kendo.ui.GanttTimeline = s.extend({
            init: function (n, t) {
              s.fn.init.call(this, n, t);
              (this.options.views && this.options.views.length) ||
                (this.options.views = ["day", "week", "month"]);
              u = kendo.support.isRtl(n);
              this._wrapper();
              this._domTrees();
              this._views();
              this._selectable();
              this._draggable();
              this._resizable();
              this._percentResizeDraggable();
              this._createDependencyDraggable();
              this._attachEvents();
              this._tooltip();
            },
            options: {
              name: "GanttTimeline",
              messages: {
                views: {
                  day: "Day",
                  week: "Week",
                  month: "Month",
                  year: "Year",
                  start: "Start",
                  end: "End",
                },
              },
              snap: !0,
              selectable: !0,
              editable: !0,
            },
            destroy: function () {
              s.fn.destroy.call(this);
              clearTimeout(this._tooltipTimeout);
              this._currentTimeUpdateTimer &&
                clearInterval(this._currentTimeUpdateTimer);
              this._unbindView(this._selectedView);
              this._moveDraggable && this._moveDraggable.destroy();
              this._resizeDraggable && this._resizeDraggable.destroy();
              this._percentDraggable && this._percentDraggable.destroy();
              this._dependencyDraggable && this._dependencyDraggable.destroy();
              this.touch && this.touch.destroy();
              this._headerTree = null;
              this._taskTree = null;
              this._dependencyTree = null;
              this.wrapper.off(e);
              kendo.destroy(this.wrapper);
            },
            _wrapper: function () {
              var i = f.styles,
                u = this,
                r = this.options,
                e = function () {
                  var e,
                    s,
                    h =
                      typeof r.rowHeight === st
                        ? r.rowHeight
                        : r.rowHeight + "px",
                    f = n(kendo.format(bt, h)),
                    c = u.wrapper.find(t + i.tasksWrapper);
                  return (
                    c.append(f),
                    (e = o(f.find("tr"))),
                    (s = f.find("td").height()),
                    f.remove(),
                    { row: e, cell: s }
                  );
                };
              this.wrapper = this.element
                .addClass(i.wrapper)
                .append(
                  "<div class='" +
                    i.gridHeader +
                    "'><div class='" +
                    i.gridHeaderWrap +
                    "'></div></div>"
                )
                .append(
                  "<div class='" +
                    i.gridContentWrap +
                    "'><div class='" +
                    i.tasksWrapper +
                    "'></div><div class='" +
                    i.dependenciesWrapper +
                    "'></div></div>"
                );
              r.rowHeight && (this._calculatedSize = e());
            },
            _domTrees: function () {
              var n = f.styles,
                i = kendo.dom.Tree,
                r = this.wrapper;
              this._headerTree = new i(r.find(t + n.gridHeaderWrap)[0]);
              this._taskTree = new i(r.find(t + n.tasksWrapper)[0]);
              this._dependencyTree = new i(
                r.find(t + n.dependenciesWrapper)[0]
              );
            },
            _views: function () {
              var n,
                i,
                t,
                r,
                u,
                f,
                e,
                o = this.options.views;
              for (this.views = {}, f = 0, e = o.length; f < e; f++)
                (n = o[f]),
                  (i = ft(n)),
                  (i && n.selectable === !1) ||
                    ((t = i
                      ? "string" != typeof n.type
                        ? n.title
                        : n.type
                      : n),
                    (r = kt[t]),
                    r &&
                      (i && (n.type = r.type),
                      (r.title = this.options.messages.views[t])),
                    (n = c({ title: t }, r, i ? n : {})),
                    t && ((this.views[t] = n), (u && !n.selected) || (u = t)));
              u && (this._selectedViewName = u);
            },
            view: function (n) {
              return (
                n &&
                  (this._selectView(n),
                  this.trigger("navigate", { view: n, action: "changeView" })),
                this._selectedView
              );
            },
            _selectView: function (n) {
              n &&
                this.views[n] &&
                (this._selectedView && this._unbindView(this._selectedView),
                (this._selectedView = this._initializeView(n)),
                (this._selectedViewName = n));
            },
            _viewByIndex: function (n) {
              var t,
                i = this.views;
              for (t in i) {
                if (!n) return t;
                n--;
              }
            },
            _initializeView: function (n) {
              var i,
                r,
                u,
                t = this.views[n];
              if (t) {
                if (
                  ((i = t.type),
                  "string" == typeof i && (i = kendo.getter(t.type)(window)),
                  !i)
                )
                  throw Error("There is no such view");
                r = {};
                c(r, this.options.range, t.range);
                u = t.date || this.options.date;
                t = new i(
                  this.wrapper,
                  rt(
                    c(
                      !0,
                      {
                        headerTree: this._headerTree,
                        taskTree: this._taskTree,
                        dependencyTree: this._dependencyTree,
                        calculatedSize: this._calculatedSize,
                      },
                      t,
                      this.options,
                      { date: u, range: r }
                    )
                  )
                );
              }
              return t;
            },
            _unbindView: function (n) {
              n && n.destroy();
            },
            _range: function (n) {
              var t, i;
              return n && n.length
                ? ((t =
                    new b(n).sort({ field: "start", dir: "asc" }).toArray()[0]
                      .start || new Date()),
                  (i =
                    new b(n).sort({ field: "end", dir: "desc" }).toArray()[0]
                      .end || new Date()),
                  { start: new Date(t), end: new Date(i) })
                : { start: new Date(), end: new Date() };
            },
            _render: function (n) {
              var t = this.view(),
                r = this._range(n),
                i = t.options.date;
              this._tasks = n;
              t.range(r);
              t.renderLayout();
              t.render(n);
              i && t._scrollToDate(i);
            },
            _renderDependencies: function (n) {
              this.view()._renderDependencies(n);
            },
            _taskByUid: function (n) {
              for (var i, r = this._tasks, u = r.length, t = 0; t < u; t++)
                if (((i = r[t]), i.uid === n)) return i;
            },
            _draggable: function () {
              var r,
                i,
                e,
                s,
                n = this,
                h = this.options.snap,
                c = f.styles,
                o = this.options.editable,
                l = function () {
                  n.view()._removeDragHint();
                  r && r.css("opacity", 1);
                  r = null;
                  i = null;
                  n.dragInProgress = !1;
                };
              o &&
                o.move !== !1 &&
                o.update !== !1 &&
                ((this._moveDraggable = new kendo.ui.Draggable(this.wrapper, {
                  distance: 0,
                  filter: t + c.task,
                  holdToDrag: kendo.support.mobileOS,
                  ignore: t + c.taskResizeHandle,
                })),
                this._moveDraggable
                  .bind("dragstart", function (t) {
                    var u = n.view();
                    return (
                      (r = t.currentTarget.parent()),
                      (i = n._taskByUid(t.currentTarget.attr("data-uid"))),
                      n.trigger("moveStart", { task: i })
                        ? void t.preventDefault()
                        : ((e = i.start),
                          (s = u._timeByPosition(t.x.location, h) - e),
                          u._createDragHint(r),
                          r.css("opacity", 0.5),
                          clearTimeout(n._tooltipTimeout),
                          void (n.dragInProgress = !0))
                    );
                  })
                  .bind(
                    "drag",
                    kendo.throttle(function (t) {
                      var f, r, o;
                      n.dragInProgress &&
                        ((f = n.view()),
                        (r = new Date(f._timeByPosition(t.x.location, h) - s)),
                        (o = r),
                        n.trigger("move", { task: i, start: r }) ||
                          ((e = r),
                          u && (o = new Date(e.getTime() + i.duration())),
                          f._updateDragHint(o)));
                    }, 15)
                  )
                  .bind("dragend", function () {
                    n.trigger("moveEnd", { task: i, start: e });
                    l();
                  })
                  .bind("dragcancel", function () {
                    l();
                  })
                  .userEvents.bind("select", function () {
                    a();
                  }));
            },
            _resizable: function () {
              var s,
                i,
                r,
                e,
                o,
                n = this,
                v = this.options.snap,
                h = f.styles,
                c = this.options.editable,
                l = function () {
                  n.view()._removeResizeHint();
                  s = null;
                  i = null;
                  n.dragInProgress = !1;
                };
              c &&
                c.resize !== !1 &&
                c.update !== !1 &&
                ((this._resizeDraggable = new kendo.ui.Draggable(this.wrapper, {
                  distance: 0,
                  filter: t + h.taskResizeHandle,
                  holdToDrag: !1,
                })),
                this._resizeDraggable
                  .bind("dragstart", function (f) {
                    return (
                      (o = f.currentTarget.hasClass(h.taskResizeHandleWest)),
                      u && (o = !o),
                      (s = f.currentTarget.closest(t + h.task)),
                      (i = n._taskByUid(s.attr("data-uid"))),
                      n.trigger("resizeStart", { task: i })
                        ? void f.preventDefault()
                        : ((r = i.start),
                          (e = i.end),
                          n.view()._createResizeHint(i),
                          clearTimeout(n._tooltipTimeout),
                          void (n.dragInProgress = !0))
                    );
                  })
                  .bind(
                    "drag",
                    kendo.throttle(function (t) {
                      var f, u;
                      n.dragInProgress &&
                        ((f = n.view()),
                        (u = f._timeByPosition(t.x.location, v, !o)),
                        o ? (r = u < e ? u : e) : (e = u > r ? u : r),
                        n.trigger("resize", { task: i, start: r, end: e }) ||
                          f._updateResizeHint(r, e, o));
                    }, 15)
                  )
                  .bind("dragend", function () {
                    n.trigger("resizeEnd", {
                      task: i,
                      resizeStart: o,
                      start: r,
                      end: e,
                    });
                    l();
                  })
                  .bind("dragcancel", function () {
                    l();
                  })
                  .userEvents.bind("select", function () {
                    a();
                  }));
            },
            _percentResizeDraggable: function () {
              var e,
                i,
                c,
                l,
                v,
                o,
                s,
                w,
                y,
                b,
                n = this,
                r = f.styles,
                p = this.options.editable,
                k = function () {
                  n.view()._removePercentCompleteTooltip();
                  i = null;
                  e = null;
                  n.dragInProgress = !1;
                },
                d = function (n) {
                  i.find(t + r.taskComplete)
                    .width(n)
                    .end()
                    .siblings(t + r.taskDragHandle)
                    .css(u ? "right" : "left", n);
                };
              p &&
                p.dragPercentComplete !== !1 &&
                p.update !== !1 &&
                ((this._percentDraggable = new kendo.ui.Draggable(
                  this.wrapper,
                  { distance: 0, filter: t + r.taskDragHandle, holdToDrag: !1 }
                )),
                this._percentDraggable
                  .bind("dragstart", function (u) {
                    return n.trigger("percentResizeStart")
                      ? void u.preventDefault()
                      : ((i = u.currentTarget.siblings(t + r.task)),
                        (e = n._taskByUid(i.attr("data-uid"))),
                        (s = e.percentComplete),
                        (c = i.offset()),
                        (l = this.element.offset()),
                        (v = i.find(t + r.taskComplete).width()),
                        (o = h(i)),
                        clearTimeout(n._tooltipTimeout),
                        void (n.dragInProgress = !0));
                  })
                  .bind(
                    "drag",
                    kendo.throttle(function (t) {
                      if (n.dragInProgress) {
                        b = u ? -t.x.initialDelta : t.x.initialDelta;
                        var i = Math.max(0, Math.min(o, v + b));
                        s = Math.round((i / o) * 100);
                        d(i);
                        w = c.top - l.top;
                        y = c.left + i - l.left;
                        u && (y += o - 2 * i);
                        n.view()._updatePercentCompleteTooltip(w, y, s);
                      }
                    }, 15)
                  )
                  .bind("dragend", function () {
                    n.trigger("percentResizeEnd", {
                      task: e,
                      percentComplete: s / 100,
                    });
                    k();
                  })
                  .bind("dragcancel", function () {
                    d(v);
                    k();
                  })
                  .userEvents.bind("select", function () {
                    a();
                  }));
            },
            _createDependencyDraggable: function () {
              var u,
                l,
                v,
                r = this,
                e = n(),
                s = n(),
                y = w.msie && w.version < 9,
                i = f.styles,
                p = this.options.editable,
                b = function () {
                  u.css("display", "").removeClass(i.hovered);
                  u.parent().removeClass(i.origin);
                  u = null;
                  c(!1);
                  s = n();
                  e = n();
                  r.view()._removeDependencyDragHint();
                  r.dragInProgress = !1;
                },
                c = function (n) {
                  s.hasClass(i.origin) ||
                    (s.find(t + i.taskDot).css("display", n ? "block" : ""),
                    e.toggleClass(i.hovered, n));
                };
              p &&
                p.dependencyCreate !== !1 &&
                (y &&
                  document.namespaces &&
                  document.namespaces.add(
                    "kvml",
                    "urn:schemas-microsoft-com:vml",
                    "#default#VML"
                  ),
                (this._dependencyDraggable = new kendo.ui.Draggable(
                  this.wrapper,
                  { distance: 0, filter: t + i.taskDot, holdToDrag: !1 }
                )),
                this._dependencyDraggable
                  .bind("dragstart", function (n) {
                    var f, e;
                    return r.trigger("dependencyDragStart")
                      ? void n.preventDefault()
                      : ((u = n.currentTarget
                          .css("display", "block")
                          .addClass(i.hovered)),
                        u.parent().addClass(i.origin),
                        (f = u.offset()),
                        (e = r.wrapper.find(t + i.tasksWrapper).offset()),
                        (l = Math.round(f.left - e.left + o(u) / 2)),
                        (v = Math.round(f.top - e.top + h(u) / 2)),
                        clearTimeout(r._tooltipTimeout),
                        void (r.dragInProgress = !0));
                  })
                  .bind(
                    "drag",
                    kendo.throttle(function (u) {
                      var f, o, h, a;
                      r.dragInProgress &&
                        (r.view()._removeDependencyDragHint(),
                        (f = n(kendo.elementUnderCursor(u))),
                        (o = r.wrapper.find(t + i.tasksWrapper).offset()),
                        (h = u.x.location - o.left),
                        (a = u.y.location - o.top),
                        r
                          .view()
                          ._updateDependencyDragHint(
                            { x: l, y: v },
                            { x: h, y: a },
                            y
                          ),
                        c(!1),
                        (e = f.hasClass(i.taskDot) ? f : n()),
                        (s = f.closest(t + i.taskWrap)),
                        c(!0));
                    }, 15)
                  )
                  .bind("dragend", function () {
                    var s, n, h, f, o;
                    e.length &&
                      ((s = u.hasClass(i.taskDotStart)),
                      (n = e.hasClass(i.taskDotStart)),
                      (h = s ? (n ? 3 : 2) : n ? 1 : 0),
                      (f = r._taskByUid(
                        u.siblings(t + i.task).attr("data-uid")
                      )),
                      (o = r._taskByUid(
                        e.siblings(t + i.task).attr("data-uid")
                      )),
                      f !== o &&
                        r.trigger("dependencyDragEnd", {
                          type: h,
                          predecessor: f,
                          successor: o,
                        }));
                    b();
                  })
                  .bind("dragcancel", function () {
                    b();
                  })
                  .userEvents.bind("select", function () {
                    a();
                  }));
            },
            _selectable: function () {
              var i = this,
                r = f.styles;
              this.options.selectable &&
                this.wrapper
                  .on(l + e, t + r.task, function (t) {
                    t.stopPropagation();
                    t.ctrlKey
                      ? i.trigger("clear")
                      : i.trigger("select", { uid: n(this).attr("data-uid") });
                  })
                  .on(l + e, t + r.taskWrap, function (t) {
                    t.stopPropagation();
                    n(this).css("z-index", "0");
                    var i = n(document.elementFromPoint(t.clientX, t.clientY));
                    i.hasClass(r.line) && i.click();
                    n(this).css("z-index", "");
                  })
                  .on(l + e, t + r.tasksWrapper, function () {
                    i.selectDependency().length > 0
                      ? i.clearSelection()
                      : i.trigger("clear");
                  })
                  .on(l + e, t + r.line, function (n) {
                    n.stopPropagation();
                    i.selectDependency(this);
                  });
            },
            select: function (n) {
              var r = this.wrapper.find(n),
                i = f.styles;
              return r.length
                ? (this.clearSelection(),
                  r.addClass(i.selected),
                  void (
                    kendo.support.mobileOS &&
                    r.parent().addClass(i.taskWrapActive)
                  ))
                : this.wrapper.find(t + i.task + t + i.selected);
            },
            selectDependency: function (i) {
              var u,
                e = this.wrapper.find(i),
                r = f.styles;
              return e.length
                ? (this.clearSelection(),
                  this.trigger("clear"),
                  (u = n(e).attr("data-uid")),
                  void this.wrapper
                    .find(t + r.line + "[data-uid='" + u + "']")
                    .addClass(r.selected))
                : this.wrapper.find(t + r.line + t + r.selected);
            },
            clearSelection: function () {
              var n = f.styles;
              this.wrapper.find(t + n.selected).removeClass(n.selected);
              kendo.support.mobileOS &&
                this.wrapper
                  .find(t + n.taskWrapActive)
                  .removeClass(n.taskWrapActive);
            },
            _attachEvents: function () {
              var i = this,
                r = f.styles,
                u = this.options.editable;
              u &&
                (this._tabindex(),
                this.wrapper
                  .on(l + e, t + r.taskDelete, function (u) {
                    i.trigger("removeTask", {
                      uid: n(this)
                        .closest(t + r.task)
                        .attr("data-uid"),
                    });
                    u.stopPropagation();
                    u.preventDefault();
                  })
                  .on(lt + e, function (n) {
                    var t,
                      r = i.options.editable;
                    n.keyCode === ot.DELETE &&
                      r &&
                      r.dependencyDestroy !== !1 &&
                      ((t = i.selectDependency()),
                      t.length &&
                        (i.trigger("removeDependency", {
                          uid: t.attr("data-uid"),
                        }),
                        i.clearSelection()));
                  }),
                kendo.support.mobileOS
                  ? (this.touch = this.wrapper
                      .kendoTouch({
                        filter: t + r.task,
                        doubletap: function (t) {
                          i.options.editable.update !== !1 &&
                            i.trigger("editTask", {
                              uid: n(t.touch.currentTarget).attr("data-uid"),
                            });
                        },
                      })
                      .data("kendoTouch"))
                  : this.wrapper.on(ht + e, t + r.task, function (t) {
                      i.options.editable.update !== !1 &&
                        (i.trigger("editTask", {
                          uid: n(this).attr("data-uid"),
                        }),
                        t.stopPropagation(),
                        t.preventDefault());
                    }));
            },
            _tooltip: function () {
              var u,
                i = this,
                o = this.options.tooltip,
                r = f.styles,
                s = function (n) {
                  u = n.clientX;
                };
              (o && o.visible === !1) ||
                (kendo.support.mobileOS
                  ? (this.wrapper
                      .on(l + e, t + r.taskDelete, function (n) {
                        n.stopPropagation();
                        i.view()._removeTaskTooltip();
                      })
                      .on(d + e, t + r.task, function (u) {
                        var f = n(u.relatedTarget).parents(
                          t + r.taskWrap,
                          t + r.task
                        );
                        0 === f.length && i.view()._removeTaskTooltip();
                      }),
                    this.touch &&
                      this.touch
                        .bind("tap", function (t) {
                          var r = t.touch.target,
                            u = i._taskByUid(n(r).attr("data-uid")),
                            f = t.touch.x.client;
                          i.view()._taskTooltip &&
                            i.view()._removeTaskTooltip();
                          i.view()._createTaskTooltip(u, r, f);
                        })
                        .bind("doubletap", function () {
                          i.view()._removeTaskTooltip();
                        }))
                  : this.wrapper
                      .on(ct + e, t + r.task, function () {
                        var t = this,
                          r = i._taskByUid(n(this).attr("data-uid"));
                        i.dragInProgress ||
                          ((i._tooltipTimeout = setTimeout(function () {
                            i.view()._createTaskTooltip(r, t, u);
                          }, 800)),
                          n(this).on(k, s));
                      })
                      .on(d + e, t + r.task, function () {
                        clearTimeout(i._tooltipTimeout);
                        i.view()._removeTaskTooltip();
                        n(this).off(k, s);
                      }));
            },
          });
          c(!0, f, { styles: y });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.gantt.min",
      [
        "kendo.data.min",
        "kendo.popup.min",
        "kendo.window.min",
        "kendo.resizable.min",
        "kendo.gantt.list.min",
        "kendo.gantt.timeline.min",
        "kendo.grid.min",
        "kendo.pdf.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function c(n) {
            return "[" + i.attr("uid") + (n ? "='" + n + "']" : "]");
          }
          function ni(n) {
            return (
              delete n.name,
              delete n.prefix,
              delete n.remove,
              delete n.edit,
              delete n.add,
              delete n.navigate,
              n
            );
          }
          function ti(n) {
            var o, f, t, r, u, e;
            if (n.filter("[name=end], [name=start]").length) {
              for (
                o = n.attr("name"),
                  f = i.widgetInstance(n, i.ui),
                  t = {},
                  r = n;
                r !== window && !u;

              )
                (r = r.parent()), (u = r.data("kendoEditable"));
              return (
                !(e = u ? u.options.model : null) ||
                ((t.start = e.start),
                (t.end = e.end),
                (t[o] = f ? f.value() : i.parseDate(n.val())),
                t.start <= t.end)
              );
            }
            return !0;
          }
          function d(t, r) {
            var e = t.parents("[" + i.attr("role") + '="gantt"]'),
              u = [],
              f = ii(e);
            t.attr(ut, 0);
            r &&
              f.each(function (t, i) {
                u[t] = n(i).scrollTop();
              });
            try {
              t[0].setActive();
            } catch (o) {
              t[0].focus();
            }
            r &&
              f.each(function (t, i) {
                n(i).scrollTop(u[t]);
              });
          }
          function ii(t) {
            return n(t)
              .parentsUntil("body")
              .filter(function (n, t) {
                var r = i.getComputedStyles(t, ["overflow"]);
                return "visible" != r.overflow;
              })
              .add(window);
          }
          var w,
            b,
            g,
            it,
            st,
            ht,
            ct,
            u,
            i = window.kendo,
            e = n.extend({ F10: 121 }, i.keys),
            lt = "matchMedia" in window,
            at = i.support.browser,
            ri = i.support.mobileOS,
            vt = i.Observable,
            a = i.ui.Widget,
            v = i.data.DataSource,
            yt = i.data.ObservableObject,
            ui = i.data.ObservableArray,
            l = i.data.Query,
            k = n.isArray,
            fi = n.inArray,
            ei = i.isFunction,
            s = n.proxy,
            o = n.extend,
            y = n.isPlainObject,
            oi = n.map,
            p = i._outerWidth,
            pt = i._outerHeight,
            f = ".kendoGantt",
            rt = "p0",
            ut = "tabIndex",
            h = "click",
            wt = "width",
            ft = "string",
            si = {
              down: { origin: "bottom left", position: "top left" },
              up: { origin: "top left", position: "bottom left" },
            },
            nt = "aria-activedescendant",
            bt = "gantt_active_cell",
            tt = "action-option-focused",
            r = ".",
            hi = i.template(
              '<button class="#=styles.buttonToggle#" type="button" aria-label="Toggle"><span class="#=styles.iconToggle#"></span></button>'
            ),
            kt =
              '<button class="#=styles.button# #=className#" type="button" #if (action) {#data-action="#=action#"#}#><span class="#=iconClass#"></span><span>#=text#</span></button>',
            ci = '<a class="#=className#" #=attr# href="\\#">#=text#</a>',
            li = i.template(
              '<li class="#=styles.currentView# #=styles.viewButtonDefault#"><a href="\\#" class="#=styles.link#">&nbps;</a></li>'
            ),
            ai = i.template(
              '<ul class="#=styles.viewsWrapper#">#for(var view in views){#<li class="#=styles.viewButtonDefault# #=styles.viewButton#-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a href="\\#" class="#=styles.link#">#=views[view].title#</a></li>#}#</ul>'
            ),
            vi = i.template(
              '<div class="#=styles.popupWrapper#"><ul class="#=styles.popupList#" role="listbox">#for(var i = 0, l = actions.length; i < l; i++){#<li class="#=styles.item#" data-action="#=actions[i].data#" role="option">#=actions[i].text#</span>#}#</ul></div>'
            ),
            yi = function (t, r) {
              var f = { name: r.field, title: r.title },
                u = r.model.fields[r.field].validation;
              u &&
                y(u) &&
                u.message &&
                (f[i.attr("dateCompare-msg")] = u.message);
              n(
                '<input type="text" required ' +
                  i.attr("type") +
                  '="date" ' +
                  i.attr("role") +
                  '="datetimepicker" ' +
                  i.attr("bind") +
                  '="value:' +
                  r.field +
                  '" ' +
                  i.attr("validate") +
                  "='true' />"
              )
                .attr(f)
                .appendTo(t);
              n(
                "<span " +
                  i.attr("for") +
                  '="' +
                  r.field +
                  '" class="k-invalid-msg"/>'
              )
                .hide()
                .appendTo(t);
            },
            pi = function (t, i) {
              n(
                '<a href="#" class="' +
                  i.styles.button +
                  '">' +
                  i.messages.assignButton +
                  "</a>"
              )
                .click(i.click)
                .appendTo(t);
            },
            dt = vt.extend({
              init: function (n, t) {
                vt.fn.init.call(this);
                this.element = n;
                this.options = o(!0, {}, this.options, t);
                this._popup();
              },
              options: { direction: "down", navigatable: !1 },
              _current: function (n) {
                var t = u.styles,
                  i = this.list.find(r + t.focused),
                  f = i[n]();
                f.length &&
                  (i.removeClass(t.focused).removeAttr("id"),
                  f.addClass(t.focused).attr("id", tt),
                  this.list.find("ul").removeAttr(nt).attr(nt, tt));
              },
              _popup: function () {
                var t = this,
                  s = u.styles,
                  c = "li" + r + s.item,
                  a = r + s.toolbar.appendButton,
                  l = this.options.messages.actions,
                  v = this.options.navigatable;
                this.list = n(
                  vi({
                    styles: s,
                    actions: [
                      { data: "add", text: l.addChild },
                      { data: "insert-before", text: l.insertBefore },
                      { data: "insert-after", text: l.insertAfter },
                    ],
                  })
                );
                this.element.append(this.list);
                this.popup = new i.ui.Popup(
                  this.list,
                  o(
                    {
                      anchor: this.element.find(a),
                      open: function () {
                        t._adjustListWidth();
                      },
                      animation: this.options.animation,
                    },
                    si[this.options.direction]
                  )
                );
                this.element.on(h + f, a, function (r) {
                  var f = n(this),
                    u = f.attr(i.attr("action"));
                  r.preventDefault();
                  u
                    ? t.trigger("command", { type: u })
                    : (t.popup.open(),
                      v &&
                        t.list
                          .find("li:first")
                          .addClass(s.focused)
                          .attr("id", tt)
                          .end()
                          .find("ul")
                          .attr({ TABINDEX: 0, "aria-activedescendant": tt })
                          .focus());
                });
                this.list
                  .find(c)
                  .hover(
                    function () {
                      n(this).addClass(s.hovered);
                    },
                    function () {
                      n(this).removeClass(s.hovered);
                    }
                  )
                  .end()
                  .on(h + f, c, function () {
                    t.trigger("command", {
                      type: n(this).attr(i.attr("action")),
                    });
                    t.popup.close();
                  });
                v &&
                  (this.popup.bind("close", function () {
                    t.list
                      .find(c)
                      .removeClass(s.focused)
                      .end()
                      .find("ul")
                      .attr(ut, 0);
                    t.element
                      .parents("[" + i.attr("role") + '="gantt"]')
                      .find(r + s.gridContent + " > table:first")
                      .focus();
                  }),
                  this.list.find("ul").on("keydown" + f, function (n) {
                    var i = n.keyCode;
                    switch (i) {
                      case e.UP:
                        n.preventDefault();
                        t._current("prev");
                        break;
                      case e.DOWN:
                        n.preventDefault();
                        t._current("next");
                        break;
                      case e.ENTER:
                        t.list.find(r + s.focused).click();
                        break;
                      case e.ESC:
                        n.preventDefault();
                        t.popup.close();
                    }
                  }));
              },
              _adjustListWidth: function () {
                var n,
                  f,
                  t = this.list,
                  s = u.styles,
                  i = t[0].style.width,
                  e = this.element.find(r + s.toolbar.appendButton),
                  o = p(t);
                (!t.data(wt) && i) ||
                  ((n = window.getComputedStyle
                    ? window.getComputedStyle(e[0], null)
                    : 0),
                  (f = n ? parseFloat(n.width) : p(e)),
                  n &&
                    (at.mozilla || at.msie) &&
                    (f +=
                      parseFloat(n.paddingLeft) +
                      parseFloat(n.paddingRight) +
                      parseFloat(n.borderLeftWidth) +
                      parseFloat(n.borderRightWidth)),
                  (i =
                    "border-box" !== t.css("box-sizing")
                      ? f - (p(t) - t.width())
                      : f),
                  o > i && (i = o),
                  t
                    .css({ fontFamily: e.css("font-family"), width: i })
                    .data(wt, i));
              },
              destroy: function () {
                clearTimeout(this._focusTimeout);
                this.popup.destroy();
                this.element.off(f);
                this.list.off(f);
                this.unbind();
              },
            }),
            gt = function (n, t) {
              return function (i) {
                var r, u;
                if (
                  ((i = k(i) ? { data: i } : i),
                  (r = i || {}),
                  (u = r.data),
                  (r.data = u),
                  !(r instanceof n) && r instanceof v)
                )
                  throw Error(
                    "Incorrect DataSource type. Only " +
                      t +
                      " instances are supported"
                  );
                return r instanceof n ? r : new n(r);
              };
            },
            et = i.data.Model.define({
              id: "id",
              fields: {
                id: { type: "number" },
                predecessorId: { type: "number" },
                successorId: { type: "number" },
                type: { type: "number" },
              },
            }),
            ot = v.extend({
              init: function (n) {
                v.fn.init.call(
                  this,
                  o(!0, {}, { schema: { modelBase: et, model: et } }, n)
                );
              },
              successors: function (n) {
                return this._dependencies("predecessorId", n);
              },
              predecessors: function (n) {
                return this._dependencies("successorId", n);
              },
              dependencies: function (n) {
                var t = this.predecessors(n),
                  i = this.successors(n);
                return t.push.apply(t, i), t;
              },
              _dependencies: function (n, t) {
                var i = this.view(),
                  r = { field: n, operator: "eq", value: t };
                return new l(i).filter(r).toArray();
              },
            });
          ot.create = gt(ot, "GanttDependencyDataSource");
          b = i.data.Model.define({
            duration: function () {
              var n = this.end,
                t = this.start;
              return n - t;
            },
            isMilestone: function () {
              return 0 === this.duration();
            },
            _offset: function (n) {
              for (var r, i = ["start", "end"], t = 0; t < i.length; t++)
                (r = new Date(this.get(i[t]).getTime() + n)), this.set(i[t], r);
            },
            id: "id",
            fields: {
              id: { type: "number" },
              parentId: {
                type: "number",
                defaultValue: null,
                validation: { required: !0 },
              },
              orderId: { type: "number", validation: { required: !0 } },
              title: { type: "string", defaultValue: "New task" },
              start: { type: "date", validation: { required: !0 } },
              end: {
                type: "date",
                validation: {
                  required: !0,
                  dateCompare: ti,
                  message:
                    "End date should be after or equal to the start date",
                },
              },
              percentComplete: {
                type: "number",
                validation: { required: !0, min: 0, max: 1, step: 0.01 },
              },
              summary: { type: "boolean" },
              expanded: { type: "boolean", defaultValue: !0 },
            },
          });
          g = v.extend({
            init: function (n) {
              v.fn.init.call(
                this,
                o(!0, {}, { schema: { modelBase: b, model: b } }, n)
              );
            },
            remove: function (n) {
              var t = n.get("parentId"),
                i = this.taskAllChildren(n);
              return (
                this._removeItems(i),
                (n = v.fn.remove.call(this, n)),
                this._childRemoved(t, n.get("orderId")),
                n
              );
            },
            add: function (n) {
              if (n)
                return (
                  (n = this._toGanttTask(n)),
                  this.insert(this.taskSiblings(n).length, n)
                );
            },
            insert: function (n, t) {
              if (t)
                return (
                  (t = this._toGanttTask(t)),
                  t.set("orderId", n),
                  (t = v.fn.insert.call(this, n, t)),
                  this._reorderSiblings(t, this.taskSiblings(t).length - 1),
                  this._resolveSummaryFields(this.taskParent(t)),
                  t
                );
            },
            taskChildren: function (n) {
              var i,
                u = this.view(),
                r = { field: "parentId", operator: "eq", value: null },
                f =
                  this._sort && this._sort.length
                    ? this._sort
                    : { field: "orderId", dir: "asc" };
              if (n) {
                if (((i = n.get("id")), i === t || null === i || "" === i))
                  return [];
                r.value = i;
              }
              return new l(u).filter(r).sort(f).toArray();
            },
            taskAllChildren: function (n) {
              var t = [],
                r = this,
                i = function (n) {
                  var u = r.taskChildren(n);
                  t.push.apply(t, u);
                  oi(u, i);
                };
              return n ? i(n) : (t = this.view()), t;
            },
            taskSiblings: function (n) {
              if (!n) return null;
              var t = this.taskParent(n);
              return this.taskChildren(t);
            },
            taskParent: function (n) {
              return n && null !== n.get("parentId")
                ? this.get(n.parentId)
                : null;
            },
            taskLevel: function (n) {
              for (var i = 0, t = this.taskParent(n); null !== t; )
                (i += 1), (t = this.taskParent(t));
              return i;
            },
            taskTree: function (n) {
              for (
                var t, f, r = [], e = this.taskChildren(n), i = 0, u = e.length;
                i < u;
                i++
              )
                (t = e[i]),
                  r.push(t),
                  t.get("expanded") &&
                    ((f = this.taskTree(t)), r.push.apply(r, f));
              return r;
            },
            update: function (n, i) {
              var u,
                f,
                r = this,
                o = function (n, t) {
                  for (
                    var f = r.taskAllChildren(n), i = 0, u = f.length;
                    i < u;
                    i++
                  )
                    f[i]._offset(t);
                },
                e = function (n) {
                  var i = n.field,
                    t = n.sender;
                  switch (i) {
                    case "start":
                      r._resolveSummaryStart(r.taskParent(t));
                      o(t, t.get(i).getTime() - u.getTime());
                      break;
                    case "end":
                      r._resolveSummaryEnd(r.taskParent(t));
                      break;
                    case "percentComplete":
                      r._resolveSummaryPercentComplete(r.taskParent(t));
                      break;
                    case "orderId":
                      r._reorderSiblings(t, u);
                  }
                };
              i.parentId !== t &&
                ((u = n.get("parentId")),
                u !== i.parentId &&
                  (n.set("parentId", i.parentId),
                  r._childRemoved(u, n.get("orderId")),
                  n.set("orderId", r.taskSiblings(n).length - 1),
                  r._resolveSummaryFields(r.taskParent(n))),
                delete i.parentId);
              n.bind("change", e);
              for (f in i) (u = n.get(f)), n.set(f, i[f]);
              n.unbind("change", e);
            },
            _resolveSummaryFields: function (n) {
              n &&
                (this._updateSummary(n),
                this.taskChildren(n).length &&
                  (this._resolveSummaryStart(n),
                  this._resolveSummaryEnd(n),
                  this._resolveSummaryPercentComplete(n)));
            },
            _resolveSummaryStart: function (n) {
              var t = this,
                i = function (n) {
                  for (
                    var r,
                      u = t.taskChildren(n),
                      f = u[0].start.getTime(),
                      i = 1,
                      e = u.length;
                    i < e;
                    i++
                  )
                    (r = u[i].start.getTime()), r < f && (f = r);
                  return new Date(f);
                };
              this._updateSummaryRecursive(n, "start", i);
            },
            _resolveSummaryEnd: function (n) {
              var t = this,
                i = function (n) {
                  for (
                    var r,
                      u = t.taskChildren(n),
                      f = u[0].end.getTime(),
                      i = 1,
                      e = u.length;
                    i < e;
                    i++
                  )
                    (r = u[i].end.getTime()), r > f && (f = r);
                  return new Date(f);
                };
              this._updateSummaryRecursive(n, "end", i);
            },
            _resolveSummaryPercentComplete: function (n) {
              var t = this,
                i = function (n) {
                  var i = t.taskChildren(n),
                    r = new l(i).aggregate([
                      { field: "percentComplete", aggregate: "average" },
                    ]);
                  return r.percentComplete.average;
                };
              this._updateSummaryRecursive(n, "percentComplete", i);
            },
            _updateSummaryRecursive: function (n, t, i) {
              var u, r;
              n &&
                ((u = i(n)),
                n.set(t, u),
                (r = this.taskParent(n)),
                r && this._updateSummaryRecursive(r, t, i));
            },
            _childRemoved: function (n, t) {
              for (
                var u = null === n ? null : this.get(n),
                  f = this.taskChildren(u),
                  i = t,
                  r = f.length;
                i < r;
                i++
              )
                f[i].set("orderId", i);
              this._resolveSummaryFields(u);
            },
            _reorderSiblings: function (n, t) {
              for (
                var r = n.get("orderId"),
                  u = r > t,
                  f = u ? t : r,
                  e = u ? r : t,
                  s = u ? f : f + 1,
                  o = this.taskSiblings(n),
                  e = Math.min(e, o.length - 1),
                  i = f;
                i <= e;
                i++
              )
                o[i] !== n && (o[i].set("orderId", s), (s += 1));
            },
            _updateSummary: function (n) {
              if (null !== n) {
                var t = this.taskChildren(n).length;
                n.set("summary", t > 0);
              }
            },
            _toGanttTask: function (n) {
              if (!(n instanceof b)) {
                var t = n;
                n = this._createNewModel();
                n.accept(t);
              }
              return n;
            },
          });
          g.create = gt(g, "GanttDataSource");
          o(!0, i.data, {
            GanttDataSource: g,
            GanttTask: b,
            GanttDependencyDataSource: ot,
            GanttDependency: et,
          });
          it = { desktop: { dateRange: yi, resources: pi } };
          st = i.Observable.extend({
            init: function (n, t) {
              i.Observable.fn.init.call(this);
              this.element = n;
              this.options = o(!0, {}, this.options, t);
              this.createButton = this.options.createButton;
            },
            fields: function (t, i) {
              var e,
                h = this,
                o = this.options,
                f = o.messages.editor,
                s = o.resources,
                c = function (n) {
                  n.preventDefault();
                  s.editor(
                    h.container.find(r + u.styles.popup.resourcesField),
                    i
                  );
                };
              return (
                o.editable.template
                  ? (e = n.map(i.fields, function (n, t) {
                      return { field: t };
                    }))
                  : ((e = [
                      { field: "title", title: f.title },
                      { field: "start", title: f.start, editor: t.dateRange },
                      { field: "end", title: f.end, editor: t.dateRange },
                      {
                        field: "percentComplete",
                        title: f.percentComplete,
                        format: rt,
                      },
                    ]),
                    i.get(s.field) &&
                      e.push({
                        field: s.field,
                        title: f.resources,
                        messages: f,
                        editor: t.resources,
                        click: c,
                        styles: u.styles.popup,
                      })),
                e
              );
            },
            _buildEditTemplate: function (n, t, r) {
              var c,
                v,
                f,
                e,
                y = this.options.resources,
                h = this.options.editable.template,
                a = o({}, i.Template, this.options.templateSettings),
                p = a.paramName,
                l = u.styles.popup,
                s = "";
              if (h)
                typeof h === ft && (h = i.unescape(h)),
                  (s += i.template(h, a)(n));
              else
                for (c = 0, v = t.length; c < v; c++)
                  (f = t[c]),
                    (s +=
                      '<div class="' +
                      l.editLabel +
                      '"><label for="' +
                      f.field +
                      '">' +
                      (f.title || f.field || "") +
                      "</label></div>"),
                    f.field === y.field &&
                      (s +=
                        '<div class="' +
                        l.resourcesField +
                        '" style="display:none"></div>'),
                    !n.editable || n.editable(f.field)
                      ? (r.push(f),
                        (s +=
                          "<div " +
                          i.attr("container-for") +
                          '="' +
                          f.field +
                          '" class="' +
                          l.editField +
                          '"></div>'))
                      : ((e = "#:"),
                        f.field
                          ? ((f = i.expr(f.field, p)),
                            (e += f + "==null?'':" + f))
                          : (e += "''"),
                        (e += "#"),
                        (e = i.template(e, a)),
                        (s +=
                          '<div class="' +
                          l.editField +
                          '">' +
                          e(n) +
                          "</div>"));
              return s;
            },
          });
          ht = st.extend({
            destroy: function () {
              this.close();
              this.unbind();
            },
            editTask: function (n) {
              this.editable = this._createPopupEditor(n);
            },
            close: function () {
              var n = this,
                t = function () {
                  n.editable &&
                    (n.editable.destroy(),
                    (n.editable = null),
                    (n.container = null));
                  n.popup && (n.popup.destroy(), (n.popup = null));
                };
              this.editable && this.container.is(":visible")
                ? (n.trigger("close", { window: n.container }),
                  this.container
                    .data("kendoWindow")
                    .bind("deactivate", t)
                    .close())
                : t();
            },
            showDialog: function (t) {
              for (
                var s,
                  o,
                  h = t.buttons,
                  f = u.styles.popup,
                  c = i.format(
                    '<div class="{0}"><div class="{1}"><p class="{2}">{3}</p><div class="{4}">',
                    f.form,
                    f.formContainer,
                    f.message,
                    t.text,
                    f.buttonsContainer
                  ),
                  e = 0,
                  l = h.length;
                e < l;
                e++
              )
                c += this.createButton(h[e]);
              c += "</div></div></div>";
              s = this.element;
              this.popup && this.popup.destroy();
              o = this.popup = n(c)
                .appendTo(s)
                .eq(0)
                .on("click", r + f.button, function (t) {
                  t.preventDefault();
                  o.close();
                  var i = n(t.currentTarget).index();
                  h[i].click();
                })
                .kendoWindow({
                  modal: !0,
                  autoFocus: !1,
                  resizable: !1,
                  draggable: !1,
                  title: t.title,
                  visible: !1,
                  deactivate: function () {
                    this.destroy();
                    s.focus();
                  },
                })
                .getKendoWindow();
              o.center().open();
              o.element.find(".k-primary").focus();
            },
            _createPopupEditor: function (t) {
              var e,
                y,
                s = this,
                l = this.options.messages,
                a = u.styles,
                v = a.popup,
                c = i.format(
                  '<div {0}="{1}" class="{2} {3}"><div class="{4}">',
                  i.attr("uid"),
                  t.uid,
                  v.form,
                  v.editForm,
                  v.formContainer
                ),
                w = this.fields(it.desktop, t),
                p = [];
              return (
                (c += this._buildEditTemplate(t, w, p)),
                (c += '<div class="' + v.buttonsContainer + '">'),
                (c += this.createButton({
                  name: "update",
                  text: l.save,
                  className: u.styles.primary,
                })),
                (c += this.createButton({ name: "cancel", text: l.cancel })),
                s.options.editable.destroy !== !1 &&
                  (c += this.createButton({ name: "delete", text: l.destroy })),
                (c += "</div></div></div>"),
                (e = this.container =
                  n(c)
                    .appendTo(this.element)
                    .eq(0)
                    .kendoWindow(
                      o(
                        {
                          modal: !0,
                          resizable: !1,
                          draggable: !0,
                          title: l.editor.editorTitle,
                          visible: !1,
                          close: function (n) {
                            n.userTriggered &&
                              s.trigger("cancel", { container: e, model: t }) &&
                              n.preventDefault();
                          },
                        },
                        {}
                      )
                    )),
                (y = e
                  .kendoEditable({
                    fields: p,
                    model: t,
                    clearContainer: !1,
                    validateOnBlur: !0,
                    target: s.options.target,
                  })
                  .data("kendoEditable")),
                i.cycleForm(e),
                this.trigger("edit", { container: e, model: t })
                  ? s.trigger("cancel", { container: e, model: t })
                  : (e.data("kendoWindow").center().open(),
                    e.on(h + f, r + a.buttonCancel, function (n) {
                      n.preventDefault();
                      n.stopPropagation();
                      s.trigger("cancel", { container: e, model: t });
                    }),
                    e.on(h + f, r + a.buttonSave, function (n) {
                      var r, u, f, i, o;
                      for (
                        n.preventDefault(),
                          n.stopPropagation(),
                          r = s.fields(it.desktop, t),
                          u = {},
                          i = 0,
                          o = r.length;
                        i < o;
                        i++
                      )
                        (f = r[i].field), (u[f] = t.get(f));
                      s.trigger("save", {
                        container: e,
                        model: t,
                        updateInfo: u,
                      });
                    }),
                    e.on(h + f, r + a.buttonDelete, function (n) {
                      n.preventDefault();
                      n.stopPropagation();
                      s.trigger("remove", { container: e, model: t });
                    })),
                y
              );
            },
          });
          ct = a.extend({
            init: function (n, t) {
              a.fn.init.call(this, n, t);
              this.wrapper = this.element;
              this.model = this.options.model;
              this.resourcesField = this.options.resourcesField;
              this.createButton = this.options.createButton;
              this._initContainer();
              this._attachHandlers();
            },
            events: ["save"],
            open: function () {
              this.window.center().open();
            },
            close: function () {
              this.window.bind("deactivate", s(this.destroy, this)).close();
            },
            destroy: function () {
              this._dettachHandlers();
              this.grid.destroy();
              this.grid = null;
              this.window.destroy();
              this.window = null;
              a.fn.destroy.call(this);
              i.destroy(this.wrapper);
              this.element = this.wrapper = null;
            },
            _attachHandlers: function () {
              var t = u.styles,
                e = this.grid,
                o = (this._cancelProxy = s(this._cancel, this));
              this.container.on(h + f, r + t.buttonCancel, this._cancelProxy);
              this._saveProxy = s(this._save, this);
              this.container.on(h + f, r + t.buttonSave, this._saveProxy);
              this.window.bind("close", function (n) {
                n.userTriggered && o(n);
              });
              e.wrapper.on(h + f, "input[type='checkbox']", function () {
                var t = n(this),
                  r = n(t).closest("tr"),
                  u = e.dataSource.getByUid(r.attr(i.attr("uid"))),
                  f = n(t).is(":checked") ? 1 : "";
                u.set("value", f);
              });
            },
            _dettachHandlers: function () {
              this._cancelProxy = null;
              this._saveProxy = null;
              this.container.off(f);
              this.grid.wrapper.off();
            },
            _cancel: function (n) {
              n.preventDefault();
              this.close();
            },
            _save: function (n) {
              n.preventDefault();
              this._updateModel();
              this.wrapper.is(r + u.styles.popup.resourcesField) ||
                this.trigger("save", {
                  container: this.wrapper,
                  model: this.model,
                });
              this.close();
            },
            _initContainer: function () {
              var e = this,
                t = u.styles.popup,
                f = i.format(
                  '<div class="{0} {1}"><div class="{2} {3}"/></div>"',
                  t.form,
                  t.editForm,
                  t.formContainer,
                  t.resourcesFormContainer
                );
              f = n(f);
              this.container = f.find(r + t.resourcesFormContainer);
              this.window = f
                .kendoWindow({
                  modal: !0,
                  resizable: !1,
                  draggable: !0,
                  visible: !1,
                  title: this.options.messages.resourcesEditorTitle,
                  open: function () {
                    e.grid.resize(!0);
                  },
                })
                .data("kendoWindow");
              this._resourceGrid();
              this._createButtons();
            },
            _resourceGrid: function () {
              var r = this,
                t = this.options.messages,
                u = n('<div id="resources-grid"/>').appendTo(this.container);
              this.grid = new i.ui.Grid(u, {
                columns: [
                  {
                    field: "name",
                    title: t.resourcesHeader,
                    template:
                      "<label><input type='checkbox' value='#=name#'# if (value > 0 && value !== null) {#checked='checked'# } #/>#=name#</labe>",
                  },
                  {
                    field: "value",
                    title: t.unitsHeader,
                    template: function (n) {
                      var t = n.format,
                        r = null !== n.value ? n.value : "";
                      return t ? i.toString(r, t) : r;
                    },
                  },
                ],
                height: 280,
                sortable: !0,
                editable: !0,
                filterable: !0,
                dataSource: {
                  data: r.options.data,
                  schema: {
                    model: {
                      id: "id",
                      fields: {
                        id: { from: "id" },
                        name: { from: "name", type: "string", editable: !1 },
                        value: {
                          from: "value",
                          type: "number",
                          validation: this.options.unitsValidation,
                        },
                        format: { from: "format", type: "string" },
                      },
                    },
                  },
                },
                save: function (n) {
                  var t = !!n.values.value;
                  n.container
                    .parent()
                    .find("input[type='checkbox']")
                    .prop("checked", t);
                },
              });
            },
            _createButtons: function () {
              for (
                var r = this.options.buttons,
                  t = '<div class="' + u.styles.popup.buttonsContainer + '">',
                  n = 0,
                  i = r.length;
                n < i;
                n++
              )
                t += this.createButton(r[n]);
              t += "</div>";
              this.container.append(t);
            },
            _updateModel: function () {
              for (
                var t,
                  u = [],
                  i = this.grid.dataSource.data(),
                  n = 0,
                  r = i.length;
                n < r;
                n++
              )
                (t = i[n].get("value")), null !== t && t > 0 && u.push(i[n]);
              this.model[this.resourcesField] = u;
            },
          });
          u = a.extend({
            init: function (n, t, r) {
              k(t) && (t = { dataSource: t });
              w = {
                append: {
                  text: "Add Task",
                  action: "add",
                  className: u.styles.toolbar.appendButton,
                  iconClass: u.styles.toolbar.iconPlus,
                },
                pdf: {
                  text: "Export to PDF",
                  className: u.styles.toolbar.pdfButton,
                  iconClass: u.styles.toolbar.iconPdf,
                },
              };
              a.fn.init.call(this, n, t);
              r && (this._events = r);
              this._wrapper();
              this._resources();
              (this.options.views && this.options.views.length) ||
                (this.options.views = ["day", "week", "month"]);
              this._timeline();
              this._toolbar();
              this._footer();
              this._adjustDimensions();
              this._preventRefresh = !0;
              this.view(this.timeline._selectedViewName);
              this._preventRefresh = !1;
              this._dataSource();
              this._assignments();
              this._dropDowns();
              this._list();
              this._dependencies();
              this._resizable();
              this._scrollable();
              this._dataBind();
              this._attachEvents();
              this._createEditor();
              i.notify(this);
            },
            events: [
              "dataBinding",
              "dataBound",
              "add",
              "edit",
              "remove",
              "cancel",
              "save",
              "change",
              "navigate",
              "moveStart",
              "move",
              "moveEnd",
              "resizeStart",
              "resize",
              "resizeEnd",
              "columnResize",
            ],
            options: {
              name: "Gantt",
              autoBind: !0,
              navigatable: !1,
              selectable: !0,
              editable: !0,
              resizable: !1,
              columnResizeHandleWidth: 3,
              columns: [],
              views: [],
              dataSource: {},
              dependencies: {},
              resources: {},
              assignments: {},
              taskTemplate: null,
              messages: {
                save: "Save",
                cancel: "Cancel",
                destroy: "Delete",
                deleteTaskConfirmation:
                  "Are you sure you want to delete this task?",
                deleteDependencyConfirmation:
                  "Are you sure you want to delete this dependency?",
                deleteTaskWindowTitle: "Delete task",
                deleteDependencyWindowTitle: "Delete dependency",
                views: {
                  day: "Day",
                  week: "Week",
                  month: "Month",
                  year: "Year",
                  start: "Start",
                  end: "End",
                },
                actions: {
                  append: "Add Task",
                  addChild: "Add Child",
                  insertBefore: "Add Above",
                  insertAfter: "Add Below",
                  pdf: "Export to PDF",
                },
                editor: {
                  editorTitle: "Task",
                  resourcesEditorTitle: "Resources",
                  title: "Title",
                  start: "Start",
                  end: "End",
                  percentComplete: "Complete",
                  resources: "Resources",
                  assignButton: "Assign",
                  resourcesHeader: "Resources",
                  unitsHeader: "Units",
                },
              },
              showWorkHours: !0,
              showWorkDays: !0,
              toolbar: null,
              workDayStart: new Date(1980, 1, 1, 8, 0, 0),
              workDayEnd: new Date(1980, 1, 1, 17, 0, 0),
              workWeekStart: 1,
              workWeekEnd: 5,
              hourSpan: 1,
              snap: !0,
              height: 600,
              listWidth: "30%",
              rowHeight: null,
            },
            select: function (n) {
              var i = this.list;
              return n
                ? (i.select(n),
                  this.list.element.find("table[role=treegrid]").focus(),
                  t)
                : i.select();
            },
            clearSelection: function () {
              this.list.clearSelection();
            },
            destroy: function () {
              a.fn.destroy.call(this);
              this.dataSource &&
                (this.dataSource.unbind("change", this._refreshHandler),
                this.dataSource.unbind("progress", this._progressHandler),
                this.dataSource.unbind("error", this._errorHandler));
              this.dependencies &&
                (this.dependencies.unbind(
                  "change",
                  this._dependencyRefreshHandler
                ),
                this.dependencies.unbind(
                  "error",
                  this._dependencyErrorHandler
                ));
              this.timeline &&
                (this.timeline.unbind(), this.timeline.destroy());
              this.list && (this.list.unbind(), this.list.destroy());
              this.footerDropDown && this.footerDropDown.destroy();
              this.headerDropDown && this.headerDropDown.destroy();
              this._editor && this._editor.destroy();
              this._resizeDraggable && this._resizeDraggable.destroy();
              this.toolbar.off(f);
              lt &&
                (this._mediaQuery.removeListener(this._mediaQueryHandler),
                (this._mediaQuery = null));
              n(window).off("resize" + f, this._resizeHandler);
              n(this.wrapper).off(f);
              this.toolbar = null;
              this.footer = null;
            },
            setOptions: function (t) {
              var u,
                r = i.deepExtend({}, this.options, t),
                f = this._events;
              t.views ||
                ((u = this.view().name),
                (r.views = n.map(this.options.views, function (n) {
                  var t = y(n),
                    i = t ? ("string" != typeof n.type ? n.title : n.type) : n;
                  return (
                    u === i
                      ? t
                        ? (n.selected = !0)
                        : (n = { type: i, selected: !0 })
                      : t && (n.selected = !1),
                    n
                  );
                })));
              t.dataSource || (r.dataSource = this.dataSource);
              t.dependencies || (r.dependencies = this.dependencies);
              t.resources || (r.resources = this.resources);
              t.assignments || (r.assignments = this.assignments);
              this.destroy();
              this.element.empty();
              this.options = null;
              this.init(this.element, r, f);
              a.fn._setEvents.call(this, r);
            },
            _attachEvents: function () {
              this._resizeHandler = s(this.resize, this, !1);
              n(window).on("resize" + f, this._resizeHandler);
            },
            _wrapper: function () {
              var n = u.styles,
                e = [n.icon, n.resizeHandle].join(" "),
                t = this.options,
                i = t.height,
                f = t.width;
              this.wrapper = this.element
                .addClass(n.wrapper)
                .append("<div class='" + n.listWrapper + "'><div></div></div>")
                .append(
                  "<div class='" +
                    n.splitBarWrapper +
                    "'><div class='" +
                    e +
                    "'></div></div>"
                )
                .append(
                  "<div class='" + n.timelineWrapper + "'><div></div></div>"
                );
              this.wrapper.find(r + n.list).width(t.listWidth);
              i && this.wrapper.height(i);
              f && this.wrapper.width(f);
              t.rowHeight && this.wrapper.addClass(n.rowHeight);
            },
            _toolbar: function () {
              var y,
                l,
                w,
                o = this,
                t = u.styles,
                b = r + t.toolbar.views + " > li",
                g = r + t.toolbar.pdfButton,
                nt = r + t.buttonToggle,
                p = r + t.gridContent,
                a = n(r + t.list),
                v = n(r + t.timeline),
                k = t.hovered,
                c = this.options.toolbar,
                d = n("<div class='" + t.toolbar.actions + "'>"),
                tt = function (n) {
                  n.matches
                    ? a.css({ display: "none", "max-width": 0 })
                    : (a.css({
                        display: "inline-block",
                        width: "30%",
                        "max-width": "none",
                      }),
                      v.css("display", "inline-block"),
                      o.refresh(),
                      v.find(p).scrollTop(o.scrollTop));
                  o._resize();
                };
              ei(c) ||
                ((c = typeof c === ft ? c : this._actions(c)),
                (c = s(i.template(c), this)));
              w = n(hi({ styles: t.toolbar }));
              l = n(
                ai({ ns: i.ns, views: this.timeline.views, styles: t.toolbar })
              );
              d.append(c({}));
              y = n("<div class='" + t.toolbar.headerWrapper + "'>")
                .append(w)
                .append(l)
                .append(d);
              l.find("li").length > 1 && l.prepend(li({ styles: t.toolbar }));
              this.wrapper.prepend(y);
              this.toolbar = y;
              lt &&
                ((this._mediaQueryHandler = s(tt, this)),
                (this._mediaQuery = window.matchMedia("(max-width: 480px)")),
                this._mediaQuery.addListener(this._mediaQueryHandler));
              y.on(h + f, b, function (u) {
                var f, e, s;
                u.preventDefault();
                f = o.list;
                e = n(this).attr(i.attr("name"));
                s = l.find(r + t.toolbar.currentView);
                s.is(":visible") && s.parent().toggleClass(t.toolbar.expanded);
                (f.editable && f.editable.trigger("validate")) ||
                  (o.trigger("navigate", { view: e }) || o.view(e),
                  o.toolbar.find(r + t.focused).removeClass(t.focused));
              })
                .on("keydown" + f, b, function (i) {
                  var u = n(r + t.toolbar.views).children(
                      ":not(.k-current-view)"
                    ),
                    f = u.index(
                      (o._focusedView && o._focusedView[0]) ||
                        u.closest(r + t.selected)[0]
                    );
                  i.keyCode === e.RIGHT
                    ? (n(o.toolbar.find(r + t.focused)).removeClass(t.focused),
                      (o._focusedView = n(
                        f + 1 === u.length ? u[0] : u[f + 1]
                      )),
                      o._focusedView.focus().addClass(t.focused),
                      i.preventDefault())
                    : i.keyCode === e.LEFT
                    ? (n(o.toolbar.find(r + t.focused)).removeClass(t.focused),
                      (o._focusedView = n(
                        0 === f ? u[u.length - 1] : u[f - 1]
                      )),
                      o._focusedView.focus().addClass(t.focused),
                      i.preventDefault())
                    : i.keyCode === e.DOWN &&
                      o.toolbar
                        .find(r + t.toolbar.currentView)
                        .parent()
                        .hasClass(t.toolbar.expanded)
                    ? (n(o.toolbar.find(r + t.focused)).removeClass(t.focused),
                      (o._focusedView = n(
                        f + 1 === u.length ? u[0] : u[f + 1]
                      )),
                      o._focusedView.focus().addClass(t.focused),
                      i.preventDefault())
                    : i.keyCode === e.UP &&
                      o.toolbar
                        .find(r + t.toolbar.currentView)
                        .parent()
                        .hasClass(t.toolbar.expanded)
                    ? (n(o.toolbar.find(r + t.focused)).removeClass(t.focused),
                      (o._focusedView = n(
                        0 === f ? u[u.length - 1] : u[f - 1]
                      )),
                      o._focusedView.focus().addClass(t.focused),
                      i.preventDefault())
                    : (i.keyCode !== e.ENTER && i.keyCode !== e.SPACEBAR) ||
                      !o._focusedView
                    ? (i.keyCode === e.SPACEBAR ||
                        i.keyCode === e.ENTER ||
                        (i.keyCode === e.DOWN && i.altKey)) &&
                      o.toolbar
                        .find(r + t.toolbar.currentView + " > a")
                        .hasClass(t.focused)
                      ? (o.toolbar
                          .find(r + t.toolbar.currentView)
                          .parent()
                          .toggleClass(t.toolbar.expanded),
                        i.preventDefault())
                      : i.keyCode === e.ESC &&
                        o.toolbar
                          .find(r + t.toolbar.currentView)
                          .parent()
                          .hasClass(t.toolbar.expanded)
                      ? (o.toolbar
                          .find(r + t.toolbar.currentView)
                          .parent()
                          .toggleClass(t.toolbar.expanded)
                          .blur(),
                        (o._focusedView = null),
                        o.toolbar
                          .find(r + t.toolbar.currentView + " > a")
                          .addClass(t.focused)
                          .focus(),
                        i.preventDefault())
                      : i.keyCode >= 49 &&
                        i.keyCode <= 57 &&
                        o.view(o.timeline._viewByIndex(i.keyCode - 49))
                    : (o.view(o._focusedView.text().toLowerCase()),
                      i.preventDefault());
                })
                .on(h + f, g, function (n) {
                  n.preventDefault();
                  o.saveAsPDF();
                })
                .on(h + f, nt, function (n) {
                  n.preventDefault();
                  a.is(":visible")
                    ? (a.css({ display: "none", width: "0" }),
                      v.css({ display: "inline-block", width: "100%" }),
                      o.refresh(),
                      v.find(p).scrollTop(o.scrollTop))
                    : (v.css({ display: "none", width: 0 }),
                      a
                        .css({
                          display: "inline-block",
                          width: "100%",
                          "max-width": "none",
                        })
                        .find(p)
                        .scrollTop(o.scrollTop));
                  o._resize();
                });
              this.wrapper
                .on("focusout" + f, function (i) {
                  n(i.relatedTarget).closest(r + t.toolbar.toolbar).length ||
                    o.toolbar.find(r + t.focused).removeClass(t.focused);
                  n(i.relatedTarget).closest(r + t.toolbar.views).length ||
                    o.toolbar
                      .find(r + t.toolbar.views)
                      .removeClass(t.toolbar.expanded);
                })
                .find(r + t.toolbar.toolbar + " li")
                .hover(
                  function () {
                    n(this).addClass(k);
                  },
                  function () {
                    n(this).removeClass(k);
                  }
                );
            },
            _actions: function () {
              var n,
                r,
                u = this.options,
                f = u.editable,
                t = u.toolbar,
                i = "";
              if (!k(t)) {
                if (!f || f.create === !1) return i;
                t = ["append"];
              }
              for (n = 0, r = t.length; n < r; n++)
                i += this._createButton(t[n]);
              return i;
            },
            _footer: function () {
              var t,
                f,
                e,
                s,
                r,
                h = this.options.editable;
              h &&
                h.create !== !1 &&
                ((t = u.styles.toolbar),
                (f = this.options.messages.actions),
                (e = n(
                  i.template(kt)(
                    o(!0, { styles: t }, w.append, { text: f.append })
                  )
                )),
                (s = n("<div class='" + t.actions + "'>").append(e)),
                (r = n("<div class='" + t.footerWrapper + "'>").append(s)),
                this.wrapper.append(r),
                (this.footer = r));
            },
            _createButton: function (n) {
              var f = n.template || kt,
                e = this.options.messages.actions,
                t = typeof n === ft ? n : n.name || n.text,
                s = w[t]
                  ? w[t].className
                  : "k-gantt-" + (t || "").replace(/\s/g, ""),
                r = {
                  iconClass: "",
                  action: "",
                  text: t,
                  className: s,
                  styles: u.styles.toolbar,
                };
              if (!(t || (y(n) && n.template)))
                throw Error("Custom commands should have name specified");
              return (
                (r = o(!0, r, w[t], { text: e[t] })),
                y(n) &&
                  (n.className &&
                    fi(r.className, n.className.split(" ")) < 0 &&
                    (n.className += " " + r.className),
                  (r = o(!0, r, n))),
                i.template(f)(r)
              );
            },
            _adjustDimensions: function () {
              var n = this.element,
                t = u.styles,
                i = r + t.list,
                o = r + t.timeline,
                s = r + t.splitBar,
                c = pt(this.toolbar),
                l = this.footer ? pt(this.footer) : 0,
                a = n.height(),
                f = n.width(),
                e = p(n.find(s)),
                h = p(n.find(i));
              n.children([i, o, s].join(","))
                .height(a - (c + l))
                .end()
                .children(o)
                .width(f - (e + h));
              f < h + e && n.find(i).width(f - e);
            },
            _scrollTo: function (n) {
              var r,
                t,
                u = this.timeline.view(),
                e = this.list,
                o = i.attr("uid"),
                f = "string" == typeof n ? n : n.closest("tr" + c()).attr(o),
                s = function () {
                  0 !== t.length && r();
                };
              u.content.is(":visible")
                ? ((t = u.content.find(c(f))),
                  (r = function () {
                    u._scrollTo(t);
                  }))
                : ((t = e.content.find(c(f))),
                  (r = function () {
                    t.get(0).scrollIntoView();
                  }));
              s();
            },
            _dropDowns: function () {
              var n = this,
                t = r + u.styles.toolbar.actions,
                i = this.options.messages.actions,
                o = this.timeline,
                f = this.options.editable,
                e = function (t) {
                  var r,
                    f = t.type,
                    s = n.dataSource,
                    i = s._createNewModel(),
                    e = n.dataItem(n.select()),
                    l = s.taskParent(e),
                    h = o.view()._timeSlots()[0],
                    u = "add" === f ? e : l,
                    c = n.list.editable;
                  (c && c.trigger("validate")) ||
                    (i.set("title", "New task"),
                    u
                      ? (i.set("parentId", u.get("id")),
                        i.set("start", u.get("start")),
                        i.set("end", u.get("end")))
                      : (i.set("start", h.start), i.set("end", h.end)),
                    "add" !== f &&
                      ((r = e.get("orderId")),
                      (r = "insert-before" === f ? r : r + 1)),
                    n._createTask(i, r));
                };
              f &&
                f.create !== !1 &&
                ((this.footerDropDown = new dt(this.footer.children(t).eq(0), {
                  messages: { actions: i },
                  direction: "up",
                  animation: { open: { effects: "slideIn:up" } },
                  navigatable: n.options.navigatable,
                })),
                (this.headerDropDown = new dt(this.toolbar.children(t).eq(0), {
                  messages: { actions: i },
                  navigatable: n.options.navigatable,
                })),
                this.footerDropDown.bind("command", e),
                this.headerDropDown.bind("command", e));
            },
            _list: function () {
              for (
                var t,
                  n = this,
                  v = n.options.navigatable,
                  e = u.styles,
                  o = this.wrapper.find(r + e.list),
                  y = o.find("> div"),
                  h = this.wrapper.find(r + e.toolbar.actions + " > button"),
                  c = {
                    columns: this.options.columns || [],
                    dataSource: this.dataSource,
                    selectable: this.options.selectable,
                    editable: this.options.editable,
                    resizable: this.options.resizable,
                    columnResizeHandleWidth:
                      this.options.columnResizeHandleWidth,
                    listWidth: p(o),
                    resourcesField: this.resources.field,
                    rowHeight: this.options.rowHeight,
                  },
                  l = c.columns,
                  a = function () {
                    v &&
                      (n._current(n._cachedCurrent),
                      d(n.list.content.find("table"), !0));
                    delete n._cachedCurrent;
                  },
                  f = 0;
                f < l.length;
                f++
              )
                (t = l[f]),
                  t.field === this.resources.field &&
                    "function" != typeof t.editor &&
                    (t.editor = s(this._createResourceEditor, this));
              this.list = new i.ui.GanttList(y, c);
              this.list
                .bind(
                  "render",
                  function () {
                    n._navigatable();
                  },
                  !0
                )
                .bind("edit", function (t) {
                  n._cachedCurrent = t.cell;
                  n.trigger("edit", { task: t.model, container: t.cell }) &&
                    t.preventDefault();
                })
                .bind("cancel", function (t) {
                  n.trigger("cancel", { task: t.model, container: t.cell }) &&
                    t.preventDefault();
                  a();
                })
                .bind("update", function (t) {
                  n._updateTask(t.task, t.updateInfo);
                  a();
                })
                .bind("change", function () {
                  n.trigger("change");
                  var t = n.list.select();
                  t.length
                    ? (h.removeAttr("data-action", "add"),
                      n.timeline.select(
                        "[data-uid='" + t.attr("data-uid") + "']"
                      ))
                    : (h.attr("data-action", "add"),
                      n.timeline.clearSelection());
                })
                .bind("columnResize", function (t) {
                  n.trigger("columnResize", {
                    column: t.column,
                    oldWidth: t.oldWidth,
                    newWidth: t.newWidth,
                  });
                });
            },
            _timeline: function () {
              var n = this,
                f = u.styles,
                e = ni(
                  o(!0, { resourcesField: this.resources.field }, this.options)
                ),
                s = this.wrapper.find(r + f.timeline + " > div"),
                h = r + f.toolbar.currentView + " > " + r + f.toolbar.link;
              this.timeline = new i.ui.GanttTimeline(s, e);
              this.timeline
                .bind("navigate", function (t) {
                  var i = t.view.replace(/\./g, "\\.").toLowerCase(),
                    u = n.toolbar
                      .find(r + f.toolbar.views + " > li")
                      .removeClass(f.selected)
                      .end()
                      .find(r + f.toolbar.viewButton + "-" + i)
                      .addClass(f.selected)
                      .find(r + f.toolbar.link)
                      .text();
                  n.toolbar.find(h).text(u);
                  n.refresh();
                })
                .bind("moveStart", function (i) {
                  var r = n.list.editable;
                  return r && r.trigger("validate")
                    ? (i.preventDefault(), t)
                    : (n.trigger("moveStart", { task: i.task }) &&
                        i.preventDefault(),
                      t);
                })
                .bind("move", function (t) {
                  var i = t.task,
                    r = t.start,
                    u = new Date(r.getTime() + i.duration());
                  n.trigger("move", { task: i, start: r, end: u }) &&
                    t.preventDefault();
                })
                .bind("moveEnd", function (t) {
                  var i = t.task,
                    r = t.start,
                    u = new Date(r.getTime() + i.duration());
                  n.trigger("moveEnd", { task: i, start: r, end: u }) ||
                    n._updateTask(n.dataSource.getByUid(i.uid), {
                      start: r,
                      end: u,
                    });
                })
                .bind("resizeStart", function (i) {
                  var r = n.list.editable;
                  return r && r.trigger("validate")
                    ? (i.preventDefault(), t)
                    : (n.trigger("resizeStart", { task: i.task }) &&
                        i.preventDefault(),
                      t);
                })
                .bind("resize", function (t) {
                  n.trigger("resize", {
                    task: t.task,
                    start: t.start,
                    end: t.end,
                  }) && t.preventDefault();
                })
                .bind("resizeEnd", function (t) {
                  var r = t.task,
                    i = {};
                  t.resizeStart ? (i.start = t.start) : (i.end = t.end);
                  n.trigger("resizeEnd", {
                    task: r,
                    start: t.start,
                    end: t.end,
                  }) || n._updateTask(n.dataSource.getByUid(r.uid), i);
                })
                .bind("percentResizeStart", function (t) {
                  var i = n.list.editable;
                  i && i.trigger("validate") && t.preventDefault();
                })
                .bind("percentResizeEnd", function (t) {
                  n._updateTask(n.dataSource.getByUid(t.task.uid), {
                    percentComplete: t.percentComplete,
                  });
                })
                .bind("dependencyDragStart", function (t) {
                  var i = n.list.editable;
                  i && i.trigger("validate") && t.preventDefault();
                })
                .bind("dependencyDragEnd", function (t) {
                  var i = n.dependencies._createNewModel({
                    type: t.type,
                    predecessorId: t.predecessor.id,
                    successorId: t.successor.id,
                  });
                  n._createDependency(i);
                })
                .bind("select", function (t) {
                  var i = n.list.editable;
                  i && i.trigger("validate");
                  n.select("[data-uid='" + t.uid + "']");
                })
                .bind("editTask", function (t) {
                  var i = n.list.editable;
                  (i && i.trigger("validate")) || n.editTask(t.uid);
                })
                .bind("clear", function () {
                  n.clearSelection();
                })
                .bind("removeTask", function (t) {
                  var i = n.list.editable;
                  (i && i.trigger("validate")) ||
                    n.removeTask(n.dataSource.getByUid(t.uid));
                })
                .bind("removeDependency", function (t) {
                  var i = n.list.editable;
                  (i && i.trigger("validate")) ||
                    n.removeDependency(n.dependencies.getByUid(t.uid));
                });
            },
            _dataSource: function () {
              var t = this.options,
                n = t.dataSource;
              n = k(n) ? { data: n } : n;
              this.dataSource && this._refreshHandler
                ? this.dataSource
                    .unbind("change", this._refreshHandler)
                    .unbind("progress", this._progressHandler)
                    .unbind("error", this._errorHandler)
                : ((this._refreshHandler = s(this.refresh, this)),
                  (this._progressHandler = s(this._requestStart, this)),
                  (this._errorHandler = s(this._error, this)));
              this.dataSource = i.data.GanttDataSource.create(n)
                .bind("change", this._refreshHandler)
                .bind("progress", this._progressHandler)
                .bind("error", this._errorHandler);
            },
            _dependencies: function () {
              var n = this.options.dependencies || {},
                t = k(n) ? { data: n } : n;
              this.dependencies && this._dependencyRefreshHandler
                ? this.dependencies
                    .unbind("change", this._dependencyRefreshHandler)
                    .unbind("error", this._dependencyErrorHandler)
                : ((this._dependencyRefreshHandler = s(
                    this.refreshDependencies,
                    this
                  )),
                  (this._dependencyErrorHandler = s(this._error, this)));
              this.dependencies = i.data.GanttDependencyDataSource.create(t)
                .bind("change", this._dependencyRefreshHandler)
                .bind("error", this._dependencyErrorHandler);
            },
            _resources: function () {
              var n = this.options.resources,
                t = n.dataSource || {};
              this.resources = {
                field: "resources",
                dataTextField: "name",
                dataColorField: "color",
                dataFormatField: "format",
              };
              o(this.resources, n);
              this.resources.dataSource = i.data.DataSource.create(t);
            },
            _assignments: function () {
              var n = this.options.assignments,
                t = n.dataSource || {};
              this.assignments
                ? this.assignments.dataSource.unbind(
                    "change",
                    this._assignmentsRefreshHandler
                  )
                : (this._assignmentsRefreshHandler = s(this.refresh, this));
              this.assignments = {
                dataTaskIdField: "taskId",
                dataResourceIdField: "resourceId",
                dataValueField: "value",
              };
              o(this.assignments, n);
              this.assignments.dataSource = i.data.DataSource.create(t);
              this.assignments.dataSource.bind(
                "change",
                this._assignmentsRefreshHandler
              );
            },
            _createEditor: function () {
              var n = this,
                i = (this._editor = new ht(
                  this.wrapper,
                  o({}, this.options, {
                    target: this,
                    resources: {
                      field: this.resources.field,
                      editor: s(this._createResourceEditor, this),
                    },
                    createButton: s(this._createPopupButton, this),
                  })
                ));
              i.bind("cancel", function (i) {
                var r = n.dataSource.getByUid(i.model.uid);
                return n.trigger("cancel", { container: i.container, task: r })
                  ? (i.preventDefault(), t)
                  : (n.cancelTask(), t);
              })
                .bind("edit", function (t) {
                  var i = n.dataSource.getByUid(t.model.uid);
                  n.trigger("edit", { container: t.container, task: i }) &&
                    t.preventDefault();
                })
                .bind("save", function (t) {
                  var i = n.dataSource.getByUid(t.model.uid);
                  n.saveTask(i, t.updateInfo);
                })
                .bind("remove", function (t) {
                  n.removeTask(t.model.uid);
                })
                .bind("close", n._onDialogClose);
            },
            _onDialogClose: function () {},
            _createResourceEditor: function (n, t) {
              var f,
                l = this,
                e = t instanceof yt ? t : t.model,
                a = e.get("id"),
                r = this.options.messages,
                h = this.resources.field,
                c = { step: 0.01 },
                i = this.assignments.dataSource.options.schema.model;
              i &&
                i.fields.Units &&
                i.fields.Units.validation &&
                o(!0, c, i.fields.Units.validation);
              f = this._resourceEditor = new ct(n, {
                resourcesField: h,
                unitsValidation: c,
                data: this._wrapResourceData(a),
                model: e,
                messages: o({}, r.editor),
                buttons: [
                  { name: "update", text: r.save, className: u.styles.primary },
                  { name: "cancel", text: r.cancel },
                ],
                createButton: s(this._createPopupButton, this),
                save: function (n) {
                  l._updateAssignments(n.model.get("id"), n.model.get(h));
                },
              });
              f.open();
            },
            _createPopupButton: function (n) {
              var r = n.name || n.text,
                t = {
                  className:
                    u.styles.popup.button +
                    " k-gantt-" +
                    (r || "").replace(/\s/g, ""),
                  text: r,
                  attr: "",
                };
              if (!(r || (y(n) && n.template)))
                throw Error("Custom commands should have name specified");
              return (
                y(n) &&
                  (n.className && (n.className += " " + t.className),
                  (t = o(!0, t, n))),
                i.template(ci)(t)
              );
            },
            view: function (n) {
              return this.timeline.view(n);
            },
            range: function (n) {
              var r = this.dataSource,
                t = this.view(),
                i = this.timeline;
              return (
                n &&
                  ((t.options.range = { start: n.start, end: n.end }),
                  i._render(r.taskTree()),
                  i._renderDependencies(this.dependencies.view())),
                { start: t.start, end: t.end }
              );
            },
            date: function (n) {
              var t = this.view();
              return (
                n && ((t.options.date = n), t._scrollToDate(n)), t.options.date
              );
            },
            dataItem: function (n) {
              var t, i;
              return n
                ? ((t = this.list),
                  (i = t.content.find(n)),
                  t._modelFromElement(i))
                : null;
            },
            setDataSource: function (n) {
              this.options.dataSource = n;
              this._dataSource();
              this.list._setDataSource(this.dataSource);
              this.options.autoBind && n.fetch();
            },
            setDependenciesDataSource: function (n) {
              this.options.dependencies = n;
              this._dependencies();
              this.options.autoBind && n.fetch();
            },
            items: function () {
              return this.wrapper.children(".k-task");
            },
            _updateAssignments: function (n, t) {
              for (
                var r,
                  u,
                  s,
                  i,
                  h,
                  f,
                  c,
                  a = this.assignments.dataSource,
                  v = this.assignments.dataTaskIdField,
                  y = this.assignments.dataResourceIdField,
                  e = !1,
                  o = new l(a.view())
                    .filter({ field: v, operator: "eq", value: n })
                    .toArray();
                o.length;

              ) {
                for (r = o[0], i = 0, h = t.length; i < h; i++)
                  if (((u = t[i]), r.get(y) === u.get("id"))) {
                    s = t[i].get("value");
                    this._updateAssignment(r, s);
                    t.splice(i, 1);
                    e = !0;
                    break;
                  }
                e || this._removeAssignment(r);
                e = !1;
                o.shift();
              }
              for (f = 0, c = t.length; f < c; f++)
                (u = t[f]), this._createAssignment(u, n);
              a.sync();
            },
            cancelTask: function () {
              var n = this._editor,
                t = n.container;
              t && n.close();
            },
            editTask: function (n) {
              var t,
                i = "string" == typeof n ? this.dataSource.getByUid(n) : n;
              i &&
                ((t = this.dataSource._createNewModel(i.toJSON())),
                (t.uid = i.uid),
                this.cancelTask(),
                this._editTask(t));
            },
            _editTask: function (n) {
              this._editor.editTask(n);
            },
            saveTask: function (n, t) {
              var i = this._editor,
                u = i.container,
                r = i.editable;
              u && r && r.end() && this._updateTask(n, t);
            },
            _updateTask: function (n, t) {
              var i = this.resources.field;
              this.trigger("save", { task: n, values: t }) ||
                ((this._preventRefresh = !0),
                this.dataSource.update(n, t),
                t[i] && this._updateAssignments(n.get("id"), t[i]),
                this._syncDataSource());
            },
            _updateAssignment: function (n, t) {
              var i = this.assignments.dataValueField;
              n.set(i, t);
            },
            removeTask: function (n) {
              var i = this,
                t = "string" == typeof n ? this.dataSource.getByUid(n) : n;
              t &&
                this._taskConfirm(function (n) {
                  n || i._removeTask(t);
                }, t);
            },
            _createTask: function (n, i) {
              if (!this.trigger("add", { task: n, dependency: null })) {
                var r = this.dataSource;
                this._preventRefresh = !0;
                i === t ? r.add(n) : r.insert(i, n);
                this._scrollToUid = n.uid;
                this._syncDataSource();
              }
            },
            _createDependency: function (n) {
              this.trigger("add", { task: null, dependency: n }) ||
                ((this._preventDependencyRefresh = !0),
                this.dependencies.add(n),
                (this._preventDependencyRefresh = !1),
                this.dependencies.sync());
            },
            _createAssignment: function (n, t) {
              var i = this.assignments,
                u = i.dataSource,
                f = i.dataTaskIdField,
                e = i.dataResourceIdField,
                o = i.dataValueField,
                r = u._createNewModel();
              r[f] = t;
              r[e] = n.get("id");
              r[o] = n.get("value");
              u.add(r);
            },
            removeDependency: function (n) {
              var i = this,
                t = "string" == typeof n ? this.dependencies.getByUid(n) : n;
              t &&
                this._dependencyConfirm(function (n) {
                  n || i._removeDependency(t);
                }, t);
            },
            _removeTaskDependencies: function (n, t) {
              this._preventDependencyRefresh = !0;
              for (var i = 0, r = t.length; i < r; i++)
                this.dependencies.remove(t[i]);
              this._preventDependencyRefresh = !1;
              this.dependencies.sync();
            },
            _removeTaskAssignments: function (n) {
              var t,
                u,
                r = this.assignments.dataSource,
                i = r.view(),
                f = {
                  field: this.assignments.dataTaskIdField,
                  operator: "eq",
                  value: n.get("id"),
                };
              for (
                i = new l(i).filter(f).toArray(),
                  this._preventRefresh = !0,
                  t = 0,
                  u = i.length;
                t < u;
                t++
              )
                r.remove(i[t]);
              this._preventRefresh = !1;
              r.sync();
            },
            _removeTask: function (n) {
              var t = this.dependencies.dependencies(n.id);
              this.trigger("remove", { task: n, dependencies: t }) ||
                (this._removeTaskDependencies(n, t),
                this._removeTaskAssignments(n),
                (this._preventRefresh = !0),
                this.dataSource.remove(n) && this._syncDataSource(),
                (this._preventRefresh = !1));
            },
            _removeDependency: function (n) {
              this.trigger("remove", { task: null, dependencies: [n] }) ||
                (this.dependencies.remove(n) && this.dependencies.sync());
            },
            _removeAssignment: function (n) {
              this.assignments.dataSource.remove(n);
            },
            _taskConfirm: function (n, t) {
              var i = this.options.messages;
              this._confirm(n, {
                model: t,
                text: i.deleteTaskConfirmation,
                title: i.deleteTaskWindowTitle,
              });
            },
            _dependencyConfirm: function (n, t) {
              var i = this.options.messages;
              this._confirm(n, {
                model: t,
                text: i.deleteDependencyConfirmation,
                title: i.deleteDependencyWindowTitle,
              });
            },
            _confirm: function (n, t) {
              var i,
                r,
                f = this.options.editable;
              f === !0 || f.confirmation !== !1
                ? ((i = this.options.messages),
                  (r = [
                    {
                      name: "delete",
                      text: i.destroy,
                      className: u.styles.primary,
                      click: function () {
                        n();
                      },
                    },
                    {
                      name: "cancel",
                      text: i.cancel,
                      click: function () {
                        n(!0);
                      },
                    },
                  ]),
                  this.showDialog(o(!0, {}, t, { buttons: r })))
                : n();
            },
            showDialog: function (n) {
              this._editor.showDialog(n);
            },
            refresh: function () {
              var f, t, n, e, u, r;
              this._preventRefresh ||
                this.list.editable ||
                (this._progress(!1),
                (f = this.dataSource),
                (t = f.taskTree()),
                (n = this._scrollToUid),
                (r = -1),
                this.current &&
                  ((u = this.current.closest("tr").attr(i.attr("uid"))),
                  (r = this.current.index())),
                this.trigger("dataBinding") ||
                  (0 !== this.resources.dataSource.data().length &&
                    this._assignResources(t),
                  this._editor && this._editor.close(),
                  this.clearSelection(),
                  this.list._render(t),
                  this.timeline._render(t),
                  this.timeline._renderDependencies(this.dependencies.view()),
                  n && (this._scrollTo(n), this.select(c(n))),
                  (n || u) &&
                    r >= 0 &&
                    ((e = this.list.content.find(
                      "tr" + c(n || u) + " > td:eq(" + r + ")"
                    )),
                    this._current(e)),
                  (this._scrollToUid = null),
                  this.trigger("dataBound")));
            },
            refreshDependencies: function () {
              this._preventDependencyRefresh ||
                this.trigger("dataBinding") ||
                (this.timeline._renderDependencies(this.dependencies.view()),
                this.trigger("dataBound"));
            },
            _assignResources: function (n) {
              for (
                var t = this.resources,
                  r = this.assignments,
                  o = function () {
                    var n = r.dataSource.view(),
                      t = { field: r.dataTaskIdField };
                    return new l(n).group(t).toArray();
                  },
                  f = o(),
                  s = function (n, r) {
                    var u,
                      e,
                      o = n.get("id");
                    for (
                      i.setter(t.field)(n, new ui([])), u = 0, e = f.length;
                      u < e;
                      u++
                    )
                      f[u].value === o && r(n, f[u].items);
                  },
                  h = function (n, u) {
                    for (var e, o, s, c, l, a, f = 0, h = u.length; f < h; f++)
                      (e = u[f]),
                        (o = t.dataSource.get(e.get(r.dataResourceIdField))),
                        (s = e.get(r.dataValueField)),
                        (c = e.get(r.dataResourceIdField)),
                        (l = o.get(t.dataFormatField) || rt),
                        (a = i.toString(s, l)),
                        n[t.field].push(
                          new yt({
                            id: c,
                            name: o.get(t.dataTextField),
                            color: o.get(t.dataColorField),
                            value: s,
                            formatedValue: a,
                          })
                        );
                  },
                  u = 0,
                  e = n.length;
                u < e;
                u++
              )
                s(n[u], h);
            },
            _wrapResourceData: function (n) {
              for (
                var t,
                  i = this,
                  f = [],
                  e = this.resources.dataSource.view(),
                  o = this.assignments.dataSource.view(),
                  s = new l(o)
                    .filter({
                      field: i.assignments.dataTaskIdField,
                      operator: "eq",
                      value: n,
                    })
                    .toArray(),
                  h = function (n) {
                    var t = null;
                    return (
                      new l(s)
                        .filter({
                          field: i.assignments.dataResourceIdField,
                          operator: "eq",
                          value: n,
                        })
                        .select(function (n) {
                          t += n.get(i.assignments.dataValueField);
                        }),
                      t
                    );
                  },
                  r = 0,
                  u = e.length;
                r < u;
                r++
              )
                (t = e[r]),
                  f.push({
                    id: t.get("id"),
                    name: t.get(i.resources.dataTextField),
                    format: t.get(i.resources.dataFormatField) || rt,
                    value: h(t.id),
                  });
              return f;
            },
            _syncDataSource: function () {
              this._preventRefresh = !1;
              this._requestStart();
              this.dataSource.sync();
            },
            _requestStart: function () {
              this._progress(!0);
            },
            _error: function () {
              this._progress(!1);
            },
            _progress: function (n) {
              i.ui.progress(this.element, n);
            },
            _resizable: function () {
              var o,
                s,
                c,
                a = this,
                f = this.wrapper,
                t = u.styles,
                l = r + t.gridContent,
                h = f.find(r + t.list),
                e = f.find(r + t.timeline);
              this._resizeDraggable = f
                .find(r + t.splitBar)
                .height(h.height())
                .hover(
                  function () {
                    n(this).addClass(t.splitBarHover);
                  },
                  function () {
                    n(this).removeClass(t.splitBarHover);
                  }
                )
                .end()
                .kendoResizable({
                  orientation: "horizontal",
                  handle: r + t.splitBar,
                  start: function () {
                    o = h.width();
                    s = e.width();
                    c = e.find(l).scrollLeft();
                  },
                  resize: function (n) {
                    var t = n.x.initialDelta;
                    i.support.isRtl(f) && (t *= -1);
                    o + t < 0 ||
                      s - t < 0 ||
                      (h.width(o + t),
                      e.width(s - t),
                      e.find(l).scrollLeft(c + t),
                      a.timeline.view()._renderCurrentTime());
                  },
                })
                .data("kendoResizable");
            },
            _scrollable: function () {
              var c = this,
                o = u.styles,
                s = r + o.gridContent,
                h = r + o.gridHeaderWrap,
                l = this.timeline.element.find(h),
                t = this.timeline.element.find(s),
                a = this.list.element.find(h),
                e = this.list.element.find(s);
              ri && e.css("overflow-y", "auto");
              t.on("scroll", function () {
                c.scrollTop = this.scrollTop;
                l.scrollLeft(this.scrollLeft);
                e.scrollTop(this.scrollTop);
              });
              e.on("scroll", function () {
                a.scrollLeft(this.scrollLeft);
              }).on("DOMMouseScroll" + f + " mousewheel" + f, function (r) {
                var e = t.scrollTop(),
                  u = i.wheelDeltaY(r);
                u &&
                  (r.preventDefault(),
                  n(r.currentTarget).one("wheel" + f, !1),
                  t.scrollTop(e + -u));
              });
            },
            _navigatable: function () {
              var w,
                o = this,
                y = this.options.navigatable,
                ft = this.options.editable,
                p = this.list.header.find("table"),
                h = this.list.content.find("table"),
                s = u.styles,
                l = i.support.isRtl(this.wrapper),
                a = this.timeline.element.find(r + s.gridContent),
                et = p.add(h),
                b = c(),
                v = { collapse: !1, expand: !0 },
                k = function (n) {
                  var t = o.timeline.view()._timeSlots()[0].offsetWidth;
                  a.scrollLeft(a.scrollLeft() + (n ? -t : t));
                },
                g = function (n) {
                  var t = o.timeline.view()._rowHeight;
                  a.scrollTop(a.scrollTop() + (n ? -t : t));
                },
                nt = function (n) {
                  var i = o.current.parent("tr" + c()),
                    r = o.current.index(),
                    t = i[n]();
                  0 !== o.select().length && o.clearSelection();
                  0 !== t.length
                    ? (o._current(t.children("td:eq(" + r + ")")),
                      o._scrollTo(o.current))
                    : o.current.is("td") && "prev" == n
                    ? d(p)
                    : o.current.is("th") && "next" == n && d(h);
                },
                tt = function (n) {
                  var t = o.current[n]();
                  0 !== t.length && (o._current(t), (w = o.current.index()));
                },
                it = function (n) {
                  var t = o.dataItem(o.current);
                  t.summary && t.expanded !== n && t.set("expanded", n);
                },
                rt = function () {
                  var n,
                    t,
                    r = o.options.editable;
                  r &&
                    r.destroy !== !1 &&
                    !o.list.editable &&
                    ((n = o.select()),
                    (t = i.attr("uid")),
                    n.length && o.removeTask(n.attr(t)));
                };
              return (
                n(this.wrapper)
                  .on(
                    "mousedown" + f,
                    "tr" + b + ", div" + b + ":not(" + r + s.line + ")",
                    function (t) {
                      var r,
                        u = n(t.currentTarget),
                        f = n(t.target).is(
                          ":button,a,:input,a>.k-icon,textarea,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap"
                        );
                      t.ctrlKey ||
                        (y &&
                          ((r = u.is("tr")
                            ? n(t.target).closest("td")
                            : o.list.content.find(
                                "tr" + c(u.attr(i.attr("uid"))) + " > td:first"
                              )),
                          o._current(r)),
                        (!y && !ft) ||
                          f ||
                          (o._focusTimeout = setTimeout(function () {
                            d(o.list.content.find("table"), !0);
                          }, 2)));
                    }
                  )
                  .on(
                    "keydown" + f,
                    function (i) {
                      var h,
                        c = i.keyCode,
                        u = this,
                        f = n(u._getToolbarItems()),
                        o = f.index(u.toolbar.find(r + s.focused)[0]);
                      if (
                        (o === -1 &&
                          n(i.target).closest(r + s.toolbar.views).length &&
                          (o = f.index(
                            u.toolbar.find(
                              ".k-gantt-views > .k-state-selected:visible > a, .k-current-view:visible > a"
                            )[0]
                          )),
                        (h = i.shiftKey ? f[o - 1] : f[o + 1]),
                        c === e.F10)
                      )
                        u.toolbar
                          .find(".k-button:visible:first")
                          .addClass(s.focused)
                          .focus(),
                          i.preventDefault();
                      else if (
                        c == e.TAB &&
                        n(i.target).closest(r + s.toolbar.toolbar).length
                      ) {
                        if (
                          (u.toolbar
                            .find(r + s.focused)
                            .removeClass(s.focused)
                            .blur(),
                          h)
                        )
                          return (
                            n(h).addClass(s.focused).focus(),
                            i.preventDefault(),
                            t
                          );
                        this.list.element.is(":visible")
                          ? this.list.element
                              .find("table[role=treegrid]")
                              .focus()
                          : this.element.find(r + s.tasks)[0].focus();
                        i.preventDefault();
                      }
                    }.bind(this)
                  ),
                y !== !0
                  ? (h.on("keydown" + f, function (n) {
                      n.keyCode == e.DELETE && rt();
                    }),
                    t)
                  : (et
                      .on("focus" + f, function () {
                        var i = this === h.get(0) ? "td" : "th",
                          t = o.select(),
                          u =
                            o.current ||
                            n(t.length ? t : this).find(
                              i + ":eq(" + (w || 0) + ")"
                            );
                        o._current(u);
                        n(o.toolbar.find(r + s.focused)).removeClass(s.focused);
                        n(o.toolbar.find(r + s.toolbar.currentView))
                          .parent()
                          .removeClass(s.toolbar.expanded);
                      })
                      .on("blur" + f, function () {
                        o._current();
                        this == p && n(this).attr(ut, -1);
                      })
                      .on("keydown" + f, function (t) {
                        var i,
                          r = t.keyCode;
                        if (o.current)
                          switch (((i = o.current.is("td")), r)) {
                            case e.RIGHT:
                              t.preventDefault();
                              t.altKey
                                ? k()
                                : t.ctrlKey
                                ? it(l ? v.collapse : v.expand)
                                : tt(l ? "prev" : "next");
                              break;
                            case e.LEFT:
                              t.preventDefault();
                              t.altKey
                                ? k(!0)
                                : t.ctrlKey
                                ? it(l ? v.expand : v.collapse)
                                : tt(l ? "next" : "prev");
                              break;
                            case e.UP:
                              t.preventDefault();
                              t.altKey ? g(!0) : nt("prev");
                              break;
                            case e.DOWN:
                              t.preventDefault();
                              t.altKey ? g() : nt("next");
                              break;
                            case e.SPACEBAR:
                              t.preventDefault();
                              i && o.select(o.current.closest("tr"));
                              break;
                            case e.ENTER:
                              t.preventDefault();
                              i
                                ? o.options.editable &&
                                  o.options.editable.update !== !1 &&
                                  ((o._cachedCurrent = o.current),
                                  o.list._startEditHandler(o.current),
                                  n(this).one("keyup", function (n) {
                                    n.stopPropagation();
                                  }))
                                : o.current.children("a.k-link").click();
                              break;
                            case e.ESC:
                              break;
                            case e.DELETE:
                              i && rt();
                              break;
                            default:
                              r >= 49 &&
                                r <= 57 &&
                                "input" !== t.target.tagName.toLowerCase() &&
                                o.view(o.timeline._viewByIndex(r - 49));
                          }
                      }),
                    t)
              );
            },
            _getToolbarItems: function () {
              return this.toolbar
                .find(".k-gantt-toggle:visible")
                .toArray()
                .concat(
                  this.toolbar
                    .find(".k-gantt-actions > .k-button:visible")
                    .toArray(),
                  this.toolbar
                    .find(
                      ".k-gantt-views > .k-state-selected:visible > a, .k-current-view:visible > a"
                    )
                    .toArray()
                );
            },
            _current: function (t) {
              var r,
                f = u.styles;
              this.current &&
                this.current.length &&
                this.current.removeClass(f.focused).removeAttr("id");
              t && t.length
                ? ((this.current = t.addClass(f.focused).attr("id", bt)),
                  (r = n(i._activeElement())),
                  r.is("table") &&
                    this.wrapper.find(r).length > 0 &&
                    r.removeAttr(nt).attr(nt, bt))
                : (this.current = null);
            },
            _dataBind: function () {
              var i,
                t = this;
              t.options.autoBind &&
                ((this._preventRefresh = !0),
                (this._preventDependencyRefresh = !0),
                (i = n.map(
                  [
                    this.dataSource,
                    this.dependencies,
                    this.resources.dataSource,
                    this.assignments.dataSource,
                  ],
                  function (n) {
                    return n.fetch();
                  }
                )),
                n.when.apply(null, i).done(function () {
                  t._preventRefresh = !1;
                  t._preventDependencyRefresh = !1;
                  t.refresh();
                }));
            },
            _resize: function () {
              this._adjustDimensions();
              this.timeline.view()._adjustHeight();
              this.timeline.view()._renderCurrentTime();
              this.list._adjustHeight();
            },
          });
          i.PDFMixin &&
            (i.PDFMixin.extend(u.fn),
            (u.fn._drawPDF = function () {
              var i = u.styles,
                n = "." + i.list,
                r = this.wrapper.find(n).width(),
                t = this.wrapper.clone();
              return (
                t.find(n).css("width", r),
                this._drawPDFShadow(
                  { content: t },
                  { avoidLinks: this.options.pdf.avoidLinks }
                )
              );
            }));
          i.ui.plugin(u);
          o(!0, u, {
            styles: {
              wrapper: "k-widget k-gantt",
              rowHeight: "k-gantt-rowheight",
              listWrapper: "k-gantt-layout k-gantt-treelist",
              list: "k-gantt-treelist",
              timelineWrapper: "k-gantt-layout k-gantt-timeline",
              timeline: "k-gantt-timeline",
              splitBarWrapper:
                "k-splitbar k-state-default k-splitbar-horizontal k-splitbar-draggable-horizontal k-gantt-layout",
              splitBar: "k-splitbar",
              splitBarHover: "k-splitbar-horizontal-hover",
              popupWrapper: "k-list-container",
              popupList: "k-list k-reset",
              resizeHandle: "k-resize-handle",
              icon: "k-icon",
              item: "k-item",
              line: "k-line",
              buttonDelete: "k-gantt-delete",
              buttonCancel: "k-gantt-cancel",
              buttonSave: "k-gantt-update",
              buttonToggle: "k-gantt-toggle",
              primary: "k-primary",
              hovered: "k-state-hover",
              selected: "k-state-selected",
              focused: "k-state-focused",
              gridHeader: "k-grid-header",
              gridHeaderWrap: "k-grid-header-wrap",
              gridContent: "k-grid-content",
              tasks: "k-gantt-tasks",
              popup: {
                form: "k-popup-edit-form",
                editForm: "k-gantt-edit-form",
                formContainer: "k-edit-form-container",
                resourcesFormContainer: "k-resources-form-container",
                message: "k-popup-message",
                buttonsContainer: "k-edit-buttons k-state-default",
                button: "k-button",
                editField: "k-edit-field",
                editLabel: "k-edit-label",
                resourcesField: "k-gantt-resources",
              },
              toolbar: {
                headerWrapper: "k-floatwrap k-header k-gantt-toolbar",
                footerWrapper: "k-floatwrap k-header k-gantt-toolbar",
                toolbar: "k-gantt-toolbar",
                expanded: "k-state-expanded",
                views: "k-gantt-views",
                viewsWrapper: "k-reset k-header k-gantt-views",
                actions: "k-gantt-actions",
                button: "k-button k-button-icontext",
                buttonToggle: "k-button k-button-icon k-gantt-toggle",
                iconPlus: "k-icon k-i-plus",
                iconPdf: "k-icon k-i-file-pdf",
                iconToggle: "k-icon k-i-layout-1-by-4",
                viewButtonDefault: "k-state-default",
                viewButton: "k-view",
                currentView: "k-current-view",
                link: "k-link",
                pdfButton: "k-gantt-pdf",
                appendButton: "k-gantt-create",
              },
            },
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.timeline.min",
      ["kendo.fx.min", "kendo.data.min", "kendo.draganddrop.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function w(n) {
            return "k-" + n;
          }
          function v(n) {
            var t,
              i,
              r = n.css("transform");
            return "none" != r
              ? ((i = r.match(/-?[\d\.]+/g)), (t = i[4]), (t / n.width()) * 100)
              : 0;
          }
          function u(n, t) {
            return n.offset().left - t.offset().left + n.width() / 2;
          }
          function c(n, t, i) {
            n.css(t, i);
          }
          var i = window.kendo,
            b = i.ui,
            y = b.Widget,
            a = i.data.DataSource,
            s = i.effects.Transition,
            l = n.proxy,
            k = -1,
            d = 0,
            g = 1,
            f = "vertical",
            p = "transitionEnd",
            nt = 3,
            tt = "timeline-event",
            h = "k-timeline-flag-wrap",
            e = "k-timeline-track-item",
            r = "k-timeline-scrollable-wrap",
            o = ".kendoTimeline",
            it =
              '# var titleField = data.titleField, subtitleField = data.subtitleField, descriptionField = data.descriptionField, imagesField = data.imagesField, actionsField = data.actionsField, data = data.data; #<div class="k-card-header"># if(data[titleField]) { #<h5 class="k-card-title">#= data[titleField] #</h5># }if(data[subtitleField]) { #<h6 class="k-card-subtitle">#= data[subtitleField] #</h6># } #</div><div class="k-card-body"><div class="k-card-description"># if(data[descriptionField]) { #<p>#= data[descriptionField] #</p># }if(data[imagesField] && data[imagesField].length > 0) { #<img src="#= data[imagesField][0].src #" class="k-card-image" /># } #</div></div># if(data[actionsField] && data[actionsField].length > 0) { #<div class="k-card-actions"># for (var i = 0; i < data[actionsField].length; i++) { #<a class="k-button k-flat k-primary" href="#= data[actionsField][i].url ? data[actionsField][i].url : "\\#" #">#= data[actionsField][i].text #</a># } #</div># } #',
            rt =
              '# var titleField = data.titleField, subtitleField = data.subtitleField, descriptionField = data.descriptionField, imagesField = data.imagesField, actionsField = data.actionsField, data = data.data; #<div class="k-card-header"><h5 class="k-card-title"># if(data[titleField]) { #<span class="k-event-title">#= data[titleField] #</span># } #<span class="k-event-collapse k-button k-button-icon k-flat"><span class="k-icon k-i-arrow-chevron-right"></span></span></h5># if(data[subtitleField]) { #<h6 class="k-card-subtitle">#= data[subtitleField] #</h6># } #</div><div class="k-card-body"><div class="k-card-description"># if(data[descriptionField]) { #<p>#= data[descriptionField] #</p># } ## if(data[imagesField] && data[imagesField].length > 0) { #<img src="#= data[imagesField][0].src #" class="k-card-image" /># } #</div></div># if(data[actionsField] && data[actionsField].length > 0) { #<div class="k-card-actions"># for (var i = 0; i < data[actionsField].length; i++) { #<a class="k-button k-flat k-primary" href="#= data[actionsField][i].url ? data[actionsField][i].url : "\\#" #">#= data[actionsField][i].text #</a># } #</div># } #',
            ut =
              '<div class="k-timeline-track"><ul class="k-timeline-scrollable-wrap"># var itemTemplate = data.itemTemplate, dateField = data.dateField, dateFormat = data.dateFormat, showDateLabels = data.showDateLabels, data = data.data, year = 0; ## for (var i = 0; i < data.length; i++) {if(!(data[i][dateField] instanceof Date)) {continue;}var currentYear = data[i][dateField].getFullYear();if(year != currentYear) {year = currentYear; #<li class="k-timeline-track-item k-timeline-flag-wrap"><span class="k-timeline-flag">#= year #</span></li># } #<li class="k-timeline-track-item"><div class="k-timeline-date-wrap"># if(showDateLabels) { #<span class="k-timeline-date">#= kendo.toString(data[i][dateField], dateFormat) #</span># } #</div><a class="k-timeline-circle"></a></li># } #</ul></div>',
            ft =
              '# var itemTemplate = data.itemTemplate, dateField = data.dateField, titleField = data.titleField, descriptionField = data.descriptionField, subtitleField = data.subtitleField, imagesField = data.imagesField, actionsField = data.actionsField, alterMode = data.alterMode, collapsibleEvents = data.collapsibleEvents, dateFormat = data.dateFormat, showDateLabels = data.showDateLabels, data = data.data, counter = 0, year = 0, reverse = false; #<ul># for (var i = 0; i < data.length; i++) {if(!(data[i][dateField] instanceof Date)) {continue;}var currentYear = data[i][dateField].getFullYear();if(currentYear != year) {year = currentYear; #<li class="k-timeline-flag-wrap"><span class="k-timeline-flag">#= year #</span></li># } reverse = counter % 2 === 0 && alterMode; #<li class="#= reverse ? \'k-timeline-event k-reverse\' : \'k-timeline-event\' #" data-uid="#: data[i].uid #"># if(showDateLabels) { #<div class="k-timeline-date-wrap"><span class="k-timeline-date">#= kendo.toString(data[i][dateField], dateFormat) #</span></div># } #<a class="k-timeline-circle"></a><div class="#= collapsibleEvents ? \'k-timeline-card k-collapsed\' : \'k-timeline-card\' #"><div class="k-card"><span class="#= reverse ? \'k-timeline-card-callout k-card-callout k-callout-e\' : \'k-timeline-card-callout k-card-callout k-callout-w\' #"></span>#= itemTemplate({titleField: titleField, subtitleField: subtitleField, descriptionField: descriptionField, imagesField: imagesField, actionsField: actionsField, data: data[i]}) #</div></div></li># counter ++;} #</ul>',
            et =
              '<a class="k-button k-timeline-arrow k-timeline-arrow-left k-state-disabled" title="previous"><span class="k-icon k-i-arrow-60-left"></span></a><a class="k-button k-timeline-arrow k-timeline-arrow-right" title="next"><span class="k-icon k-i-arrow-60-right"></span></a>',
            ot = i.Class.extend({
              init: function (t) {
                this.cardContainer = n("<div class='k-card' />");
                var i = n("<div class='k-timeline-card'></div>").append(
                  this.cardContainer
                );
                this.element = n("<li class='" + w(tt) + "'></li>").append(i);
                t.append(this.element);
              },
              content: function (t, i) {
                var r = n(
                  "<span class='k-timeline-card-callout k-card-callout k-callout-n'></span>"
                );
                this.cardContainer.html(t);
                this.cardContainer.append(r);
                this.element.attr("data-uid", i);
              },
              position: function (n) {
                this.element.css(
                  "transform",
                  "translate3d(" + this.element.width() * n + "px, 0, 0)"
                );
              },
              setPageCallout: function (n, t) {
                var i = this.element,
                  r = i.find(".k-timeline-card-callout");
                r.css(n, t);
              },
              destroy: function () {
                var n = this;
                n.cardContainer = null;
                n.element.remove();
                n.element = null;
              },
            }),
            st = i.Observable.extend({
              init: function (t, r) {
                var u,
                  e,
                  o,
                  f = this;
                i.Observable.fn.init.call(this);
                this.element = t;
                u = new i.ui.Movable(f.element);
                e = new s({
                  axis: "x",
                  movable: u,
                  onEnd: function () {
                    f.trigger(p);
                  },
                });
                o = [];
                n.extend(f, {
                  duration: (r && r.duration) || 1,
                  movable: u,
                  transition: e,
                  pages: o,
                  eventTemplate: r.eventTemplate,
                  eventHeight: r.eventHeight,
                  dataFieldMappings: r.dataFieldMappings,
                });
                this.bind([p], r);
              },
              initPages: function () {
                for (
                  var t, i = this.pages, r = this.element, n = 0;
                  n < nt;
                  n++
                )
                  (t = new ot(r)), i.push(t);
              },
              repositionPages: function () {
                var n = this.pages;
                n[0].position(k);
                n[1].position(d);
                n[2].position(g);
              },
              setPageContent: function (n, t) {
                var u =
                    typeof this.eventTemplate === Function
                      ? this.eventTemplate
                      : i.template(this.eventTemplate),
                  r = this.dataFieldMappings,
                  f = u({
                    data: t,
                    titleField: r.title,
                    subtitleField: r.subtitle,
                    descriptionField: r.description,
                    imagesField: r.images,
                    actionsField: r.actions,
                  });
                n.content(f, t.uid);
              },
              updatePage: function (n, t, i) {
                var r = this.pages,
                  u = null === n ? r[1] : n ? r[r.length - 1] : r[0];
                this.setPageContent(u, t);
                u.setPageCallout("left", (i / u.element.width()) * 100 + "%");
              },
              moveTo: function (n) {
                this.movable.moveAxis("x", -n);
              },
              transitionTo: function (n, t) {
                this.transition.moveTo({
                  location: n,
                  duration: this.duration,
                  ease: t,
                });
              },
              destroy: function () {
                for (var n = this, t = 0; t < n.pages.length; t++)
                  n.pages[t].destroy();
                n.unbind();
                n.movable =
                  n.transition =
                  n.dataFieldMappings =
                  n.eventTemplate =
                  n.duration =
                  n.pages =
                    null;
                n.element.remove();
              },
            }),
            ht = i.ui.Widget.extend({
              init: function (t, i) {
                var r = this,
                  u = i.orientation || r.options.orientation;
                y.fn.init.call(this, t, i);
                this.element.addClass(
                  u === f
                    ? "k-timeline k-widget k-timeline-vertical"
                    : "k-timeline k-widget k-timeline-horizontal"
                );
                u != f ? r._horizontal() : r._vertical();
                this.element.on("click", ".k-card-actions", function () {
                  var t = n(event.target),
                    i = n(event.target)
                      .closest(".k-timeline-event")
                      .data("uid"),
                    u = r.dataSource.getByUid(i);
                  r.trigger("actionClick", {
                    sender: r,
                    element: t,
                    dataItem: u,
                  });
                });
                r.currentEventIndex = 0;
                r._forward = null;
                r._eventPage = 1;
                r._currentIndex = 0;
                r._firstIndexInView = 0;
                r._initDataFieldMappings();
                r.setDataSource(i.dataSource);
              },
              _horizontal: function () {
                var u = this,
                  f = this.element,
                  e = this.options,
                  t = n("<div />"),
                  i = n("<div />"),
                  r = n("<ul />");
                u._trackWrap = t;
                u._eventsWrap = i;
                u._eventsList = r;
                t.addClass("k-timeline-track-wrap");
                i.addClass("k-timeline-events-list");
                r.addClass("k-timeline-scrollable-wrap");
                e.eventHeight && r.height(e.eventHeight);
                t.append(et);
                i.append(r);
                t.appendTo(f);
                i.appendTo(f);
                n(window).on("resize" + o, l(this, "_resizeHandler"));
                t.on(
                  "click",
                  ".k-timeline-track-item:not(.k-timeline-flag-wrap)",
                  l(this, "_setCurrentEvent")
                );
                t.on(
                  "click",
                  ".k-timeline-arrow:not(.k-state-disabled)",
                  l(this, "_navigateToView")
                );
              },
              _vertical: function () {
                var t = this,
                  r = this.options,
                  u = this.element;
                r.alternatingMode && u.addClass("k-timeline-alternating");
                r.collapsibleEvents &&
                  (u.addClass("k-timeline-collapsible"),
                  this.element.on("click", ".k-card-header", function () {
                    var r = n(this).closest(".k-timeline-card"),
                      u = r.find(".k-card-body"),
                      f = t.dataSource.getByUid(r.closest("li").data("uid"));
                    r.hasClass("k-collapsed")
                      ? t.trigger("expand", { sender: t, dataItem: f }) ||
                        (i.fx(u).expand("vertical").stop().play(),
                        r.toggleClass("k-collapsed"))
                      : t.trigger("collapse", { sender: t, dataItem: f }) ||
                        (i.fx(u).expand("vertical").stop().reverse(),
                        r.toggleClass("k-collapsed"));
                  }));
              },
              _renderContentVertical: function (n) {
                var r,
                  u,
                  f,
                  e = this,
                  t = e.options;
                u =
                  typeof t.eventTemplate === Function
                    ? t.eventTemplate
                    : t.eventTemplate
                    ? i.template(t.eventTemplate)
                    : i.template(rt, { useWithBlock: !1 });
                f = i.template(ft, { useWithBlock: !1 });
                r = f({
                  data: n,
                  dateField: t.dataDateField,
                  titleField: t.dataTitleField,
                  subtitleField: t.dataSubtitleField,
                  descriptionField: t.dataDescriptionField,
                  imagesField: t.dataImagesField,
                  actionsField: t.dataActionsField,
                  itemTemplate: u,
                  alterMode: t.alternatingMode,
                  collapsibleEvents: t.collapsibleEvents,
                  dateFormat: t.dateFormat,
                  showDateLabels: t.showDateLabels,
                });
                this.element.html(r);
                t.eventWidth && e.element.find(".k-card").width(t.eventWidth);
              },
              _renderContentHorizontal: function (t) {
                var f,
                  e,
                  o,
                  r = this,
                  u = r.options,
                  s = r._dataFieldMappings;
                e =
                  typeof u.eventTemplate === Function
                    ? u.eventTemplate
                    : u.eventTemplate
                    ? i.template(u.eventTemplate)
                    : i.template(it, { useWithBlock: !1 });
                o = i.template(ut, { useWithBlock: !1 });
                f = o({
                  data: t,
                  itemTemplate: e,
                  dateFormat: u.dateFormat,
                  dateField: u.dataDateField,
                  showDateLabels: u.showDateLabels,
                });
                u.initialEventIndex
                  ? r._trackWrap.append(
                      n(f)
                        .find(".k-timeline-scrollable-wrap")
                        .css("transform", "translateX(-100%)")
                        .parent()
                    )
                  : (r._trackWrap.find(".k-timeline-track").length > 0 &&
                      r._trackWrap.find(".k-timeline-track").empty(),
                    r._trackWrap.append(f));
                r.pane && r.pane.destroy();
                r.pane = new st(r._eventsList, {
                  transitionEnd: l(this, "_transitionEnd"),
                  eventTemplate: e,
                  dataFieldMappings: s,
                  eventHeight: u.eventHeight,
                });
              },
              _initDataFieldMappings: function () {
                var t = this,
                  n = t.options;
                t._dataFieldMappings = {
                  title: n.dataTitleField,
                  subtitle: n.dataSubtitleField,
                  date: n.dataDateField,
                  description: n.dataDescriptionField,
                  images: n.dataImagesField,
                  actions: n.dataActionsField,
                };
              },
              _transitionEnd: function () {
                this._forward
                  ? this.pane.pages.push(this.pane.pages.shift())
                  : this.pane.pages.unshift(this.pane.pages.pop());
                this._forward = null;
                this.pane.repositionPages();
                this.pane.movable.moveAxis("x", 0);
                this._animationInProgress = !1;
              },
              _setCurrentEvent: function (t) {
                var i = this,
                  r = n(t.currentTarget),
                  u =
                    i.dataSource.view()[
                      r.index("li[class='k-timeline-track-item']")
                    ],
                  f = i._forward
                    ? i.pane.pages[2].element
                    : i.pane.pages[0].element;
                i.trigger("change", { eventContainer: f, dataItem: u }) ||
                  i.open(r);
              },
              open: function (t) {
                var e,
                  i = this,
                  f = n(t),
                  o = f.find(".k-timeline-circle"),
                  r = f.index("li[class='k-timeline-track-item']"),
                  h = i.dataSource.view()[r];
                i.currentEventIndex !== r &&
                  ((i._currentIndex = f.index()),
                  (e = i._forward = i.currentEventIndex < r),
                  (i.currentEventIndex = r),
                  i.pane.updatePage(e, h, u(o, i._trackWrap)),
                  i._forward
                    ? (clearTimeout(i.navigateTimeOut),
                      (i.navigateTimeOut = setTimeout(function () {
                        i.pane.transition.moveTo({
                          location: -i.pane.pages[2].element.width(),
                          duration: 800,
                          ease: s.easeOutExpo,
                        });
                      }, 200)))
                    : (clearTimeout(i.navigateTimeOut),
                      (i.navigateTimeOut = setTimeout(function () {
                        i.pane.transition.moveTo({
                          location: i.pane.pages[0].element.width(),
                          duration: 800,
                          ease: s.easeOutExpo,
                        });
                      }, 200))),
                  i._repositionEvents());
              },
              _navigateToView: function (t) {
                var i = this,
                  r = n(t.currentTarget).hasClass("k-timeline-arrow-right")
                    ? 1
                    : -1;
                i.trigger("navigate", {
                  sender: i,
                  action: r > 0 ? "next" : "previous",
                }) ||
                  i._animationInProgress ||
                  ((i._animationInProgress = !0),
                  r > 0 ? i.next() : i.previous(),
                  i._updateArrows());
              },
              _updateArrows: function () {
                var t = this,
                  n = t.element.find(".k-timeline-arrow");
                t._validateNavigation(!1)
                  ? n
                      .filter(".k-timeline-arrow-left")
                      .addClass("k-state-disabled")
                  : n
                      .filter(".k-timeline-arrow-left")
                      .removeClass("k-state-disabled");
                t._validateNavigation(!0)
                  ? n
                      .filter(".k-timeline-arrow-right")
                      .addClass("k-state-disabled")
                  : n
                      .filter(".k-timeline-arrow-right")
                      .removeClass("k-state-disabled");
              },
              _validateNavigation: function (n) {
                var t = this,
                  i = t._end || 0;
                return n
                  ? t._firstIndexInView + t.numOfEvents >= t.maxEvents
                  : Math.abs(i) <= 1;
              },
              next: function () {
                var n = this,
                  t = n.options;
                n._validateNavigation(!0) ||
                  t.orientation == f ||
                  ((n._forward = !0), n._navigate());
                n._updateArrows();
              },
              _navigate: function () {
                var f,
                  i,
                  w,
                  k,
                  b,
                  y,
                  p,
                  t = this,
                  a = t._forward,
                  l = v(this._trackWrap.find("." + r)),
                  d = a ? -n("." + r).width() : n("." + r).width(),
                  g = t._currentIndex,
                  c = t._firstIndexInView;
                l = a ? l - 100 : l + 100;
                l >= 0 && (l = 0);
                t._end = l;
                k = t._tackItemWidth;
                b = Math.floor(g / t.numOfEvents);
                a
                  ? 1 === t.numOfEvents
                    ? ((f = 0 === c ? 1 : c),
                      (i = this._trackWrap
                        .find("." + e)
                        .eq(f)
                        .nextAll(":not(." + h + ")")
                        .first()),
                      (t._firstIndexInView = i.index()))
                    : ((f = c + t.numOfEvents - 1),
                      (i = this._trackWrap
                        .find("." + e)
                        .eq(f)
                        .nextAll(":not(." + h + ")")
                        .first()),
                      (t._firstIndexInView = c + t.numOfEvents))
                  : 1 === t.numOfEvents
                  ? ((f = c),
                    (i = this._trackWrap
                      .find("." + e)
                      .eq(f)
                      .prevAll(":not(." + h + ")")
                      .first()),
                    (t._firstIndexInView = i.index()))
                  : ((f = c),
                    (i = this._trackWrap
                      .find("." + e)
                      .eq(f)
                      .prevAll(":not(." + h + ")")
                      .first()),
                    (i =
                      i.length > 0
                        ? i
                        : this._trackWrap
                            .find("." + e + ":not(." + h + ")")
                            .first()),
                    (t._firstIndexInView =
                      c - t.numOfEvents < 0 ? 0 : c - t.numOfEvents));
                w =
                  t.dataSource.view()[
                    i.index("li[class='k-timeline-track-item']")
                  ];
                this._trackWrap
                  .find("." + r)
                  .css("transform", "translateX(" + l + "%)");
                t._currentIndex != i.index()
                  ? ((t.currentEventIndex = i.index(
                      "li[class='k-timeline-track-item']"
                    )),
                    (t._currentIndex = i.index()),
                    t.pane.updatePage(
                      t._forward,
                      w,
                      0 !== b || a
                        ? u(i.find(".k-timeline-circle"), t._trackWrap) + d
                        : i.find(".k-timeline-circle").offset().left + 15
                    ),
                    clearTimeout(t.navigateTimeOut),
                    (t.navigateTimeOut = setTimeout(function () {
                      t.pane.transition.moveTo(
                        a && t.pane && t.pane.pages.length > 0
                          ? {
                              location: -t.pane.pages[2].element.width(),
                              duration: 800,
                              ease: s.easeOutExpo,
                            }
                          : {
                              location: t.pane.pages[0].element.width(),
                              duration: 800,
                              ease: s.easeOutExpo,
                            }
                      );
                    }, 200)))
                  : ((y = this._trackWrap.find("." + r)),
                    (p = function () {
                      var n, r;
                      1 != t.numOfEvents &&
                        ((n = t.pane.pages[1]),
                        (r = u(i.find(".k-timeline-circle"), t._trackWrap)),
                        n.setPageCallout(
                          "left",
                          (r / n.element.width()) * 100 + "%"
                        ));
                      y.off("transitionend" + o, p);
                    }),
                    y.on("transitionend" + o, p));
              },
              previous: function () {
                var n = this,
                  t = n.options;
                n._validateNavigation(!1) ||
                  t.orientation == f ||
                  ((n._forward = !1), n._navigate());
                n._updateArrows();
              },
              expand: function (t) {
                var r = n(t).find(".k-timeline-card"),
                  u = n(t).find(".k-card-body");
                r.hasClass("k-collapsed") &&
                  (i.fx(u).expand("vertical").stop().play(),
                  r.removeClass("k-collapsed"));
              },
              collapse: function (t) {
                var r = n(t).find(".k-timeline-card"),
                  u = n(t).find(".k-card-body");
                r.hasClass("k-collapsed") ||
                  (i.fx(u).expand("vertical").stop().reverse(),
                  r.addClass("k-collapsed"));
              },
              items: function () {
                return this.element.find("li[data-uid]");
              },
              _resizeHandler: function () {
                var n = this;
                clearTimeout(n.resizeTimeOut);
                n.resizeTimeOut = setTimeout(function () {
                  n._redrawEvents();
                  n.pane.repositionPages();
                });
              },
              redraw: function () {
                var n = this.options;
                n.orientation != f &&
                  (this._redrawEvents(), this.pane.repositionPages());
              },
              _redrawEvents: function () {
                var t,
                  n = this,
                  i = Math.floor(
                    n.element.find(".k-timeline-scrollable-wrap").width() / 150
                  );
                n.element.width() <= 480
                  ? (n.element.addClass("k-timeline-mobile"),
                    (t = 100),
                    (n.numOfEvents = 1),
                    (n._tackItemWidth = t),
                    n.element
                      .find("li.k-timeline-track-item")
                      .css("flex", "1 0 " + t + "%"),
                    n._repositionEvents())
                  : (n.element.removeClass("k-timeline-mobile"),
                    i != n.numOfEvents &&
                      ((n.numOfEvents = i),
                      (t = 100 / i),
                      c(
                        n.element.find("li.k-timeline-track-item"),
                        "flex",
                        "1 0 " + t + "%"
                      ),
                      (n._tackItemWidth = t),
                      n._repositionEvents()));
                n._updateArrows();
              },
              _repositionEvents: function () {
                var w,
                  f,
                  i,
                  b,
                  y,
                  p,
                  n = this,
                  l = n._tackItemWidth,
                  a =
                    null === n._forward
                      ? n.pane.pages[1]
                      : n._forward
                      ? n.pane.pages[2]
                      : n.pane.pages[0],
                  s = this._trackWrap.find("." + r),
                  h = v(s);
                if (
                  ((f =
                    1 === n.numOfEvents
                      ? n.currentEventIndex * l
                      : n._currentIndex * l),
                  a)
                ) {
                  if (1 === n.numOfEvents)
                    return (
                      a.setPageCallout("left", "50%"),
                      (i = f),
                      c(s, "transform", "translateX(-" + i + "%)"),
                      (n._firstIndexInView = n._currentIndex),
                      n._updateArrows(),
                      t
                    );
                  f >= Math.abs(h) + 100
                    ? ((i = Math.abs(h) + (f - (Math.abs(h) + 100) + l)),
                      (n._end = -i),
                      c(s, "transform", "translateX(-" + i + "%)"),
                      (n._firstIndexInView =
                        n._currentIndex - n.numOfEvents + 1))
                    : f <= Math.abs(h)
                    ? ((i = f),
                      (n._end = -i),
                      c(s, "transform", "translateX(-" + i + "%)"),
                      (n._firstIndexInView = n._currentIndex))
                    : ((b = s
                        .find("li.k-timeline-track-item")
                        .eq(n._currentIndex)
                        .find(".k-timeline-circle")),
                      (w = u(b, n._trackWrap)),
                      a.setPageCallout(
                        "left",
                        (w / a.element.width()) * 100 + "%"
                      ),
                      (n._firstIndexInView = Math.round(Math.abs(h) / l)));
                  y = this._trackWrap.find("." + r);
                  p = function () {
                    var t, i, r;
                    1 != n.numOfEvents &&
                      ((t = n.pane.pages[1]),
                      (i = n._trackWrap.find("." + e).eq(n._currentIndex)),
                      (r = u(i.find(".k-timeline-circle"), n._trackWrap)),
                      t.setPageCallout(
                        "left",
                        (r / t.element.width()) * 100 + "%"
                      ));
                    y.off("transitionend" + o, p);
                  };
                  y.on("transitionend" + o, p);
                }
                n._updateArrows();
              },
              _initHorizontal: function () {
                var n = this,
                  t = n._trackWrap.find(".k-timeline-circle").first(),
                  i = n.dataSource.view()[0];
                n.maxEvents = n._trackWrap.find(
                  ".k-timeline-track-item"
                ).length;
                n._currentIndex = 1;
                n.pane.initPages();
                n.pane.repositionPages();
                n.pane.updatePage(n._forward, i, u(t, n._trackWrap));
                n._updateArrows();
              },
              setDataSource: function (n) {
                var i = this,
                  r = i.options;
                n instanceof a
                  ? ((this.dataSource = n = new a(n.options)),
                    this.dataSource._sort === t &&
                      (this.dataSource._sort = [
                        { field: r.dataDateField, dir: "asc" },
                      ]))
                  : ((this.dataSource = a.create(n)),
                    this.dataSource._sort === t &&
                      (this.dataSource._sort = [
                        { field: r.dataDateField, dir: "asc" },
                      ]));
                this.dataSource.fetch(function () {
                  var n = i.dataSource.view();
                  "horizontal" === i.options.orientation
                    ? (i._renderContentHorizontal(n),
                      i._redrawEvents(),
                      i._initHorizontal())
                    : i._renderContentVertical(n);
                  i.trigger("dataBound", { sender: i });
                });
              },
              destroy: function () {
                var t = this.options;
                y.fn.destroy.call(this);
                this.resizeTimeOut && clearTimeout(this.resizeTimeOut);
                this.navigateTimeOut && clearTimeout(this.navigateTimeOut);
                n(window).off("resize" + o, this._resizeHandler);
                this.element.off();
                t.orientation != f &&
                  (this.pane.destroy(),
                  this._trackWrap.find("." + r).off(),
                  this._trackWrap.off(),
                  (this.currentEventIndex =
                    this.maxEvents =
                    this.numOfEvents =
                    this._currentIndex =
                    this._eventPage =
                    this._eventsList =
                    this._eventsWrap =
                    this.element =
                    this._trackWrap =
                    this.pane =
                      null));
                i.destroy(this.element);
                this._dataFieldMappings = this.element = null;
              },
              options: {
                name: "Timeline",
                orientation: "vertical",
                dateFormat: "MMM d, yyyy",
                showDateLabels: !0,
                collapsibleEvents: !1,
                alternatingMode: !1,
                dataTitleField: "title",
                dataDateField: "date",
                dataSubtitleField: "subtitle",
                dataDescriptionField: "description",
                dataImagesField: "images",
                dataActionsField: "actions",
              },
              events: [
                "collapse",
                "dataBound",
                "expand",
                "actionClick",
                "change",
                "navigate",
              ],
            });
          i.ui.plugin(ht);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.treelist.min",
      [
        "kendo.dom.min",
        "kendo.data.min",
        "kendo.columnsorter.min",
        "kendo.editable.min",
        "kendo.window.min",
        "kendo.filtermenu.min",
        "kendo.selectable.min",
        "kendo.resizable.min",
        "kendo.treeview.draganddrop.min",
        "kendo.pager.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function it(n) {
            return function (t) {
              return t[n];
            };
          }
          function ii(n) {
            return function (t) {
              return !n(t);
            };
          }
          function li() {
            return "none" !== this.style.display;
          }
          function ai(i) {
            var r = kendo.attr("index");
            return i.sort(function (i, u) {
              var f, e;
              return (
                (i = n(i)),
                (u = n(u)),
                (f = i.attr(r)),
                (e = u.attr(r)),
                f === t && (f = n(i).index()),
                e === t && (e = n(u).index()),
                (f = parseInt(f, 10)),
                (e = parseInt(e, 10)),
                f > e ? 1 : f < e ? -1 : 0
              );
            });
          }
          function y(t) {
            var r = t.find(">tr:not(.k-filter-row)"),
              u = function () {
                var t = n(this);
                return (
                  !t.hasClass("k-group-cell") && !t.hasClass("k-hierarchy-cell")
                );
              },
              i = n();
            return (
              r.length > 1 &&
                (i = r
                  .find("th")
                  .filter(u)
                  .filter(function () {
                    return this.rowSpan > 1;
                  })),
              (i = i.add(r.last().find("th").filter(u))),
              ai(i)
            );
          }
          function hr(n) {
            for (var r = [], u = n.className, t = 0, i = n.level; t < i; t++)
              r.push(a("span", { className: u }));
            return r;
          }
          function cr(n) {
            for (var t, u = 0, i = 0, r = n.length; i < r; i++)
              (t = n[i].style.width),
                t && t.indexOf("%") == -1 && (u += parseInt(t, 10));
            return u;
          }
          function sf(n, t) {
            var i, r, u, f;
            n = n[0];
            t = t[0];
            n.rows.length &&
              t.rows.length &&
              n.rows.length !== t.rows.length &&
              ((i = n.offsetHeight),
              (r = t.offsetHeight),
              i > r
                ? ((u = t.rows[t.rows.length - 1]), (f = i - r))
                : ((u = n.rows[n.rows.length - 1]), (f = r - i)),
              (u.style.height = u.offsetHeight + f + "px"));
          }
          function lr(t) {
            return n(t).is(
              ":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap,.k-tool-icon"
            );
          }
          function vi(n) {
            return n.parentColumn ? !!vi(n.parentColumn) : !!n.locked;
          }
          function hf(n, t, i, r) {
            var u,
              f,
              e = !!i.locked;
            do (u = n[t]), (t += r ? 1 : -1), (f = !!u.locked);
            while (
              u &&
              t > -1 &&
              t < n.length &&
              u != i &&
              !u.columns &&
              f === e
            );
            return u;
          }
          function ar(n, t, i, r, u) {
            var o, e, f, h, s;
            return t.columns
              ? ((t = t.columns), t[r ? 0 : t.length - 1])
              : ((o = br(t, n)),
                (e = o ? o.columns : n),
                (f = nt(t, e)),
                0 === f && r && 1 !== e.length
                  ? f++
                  : f != e.length - 1 || r || 0 === f
                  ? (f > 0 || (0 === f && !r && 0 !== f)) && (f += r ? -1 : 1)
                  : f--,
                (h = nt(i, e)),
                (t = hf(e, f, i, h > f)),
                (s = nt(t, u)),
                (!t.columns || (s && s !== e.length - 1)) &&
                t &&
                t != i &&
                t.columns
                  ? ar(n, t, i, r, u)
                  : null);
          }
          function o(n) {
            for (var i = [], t = 0; t < n.length; t++)
              n[t].columns ? (i = i.concat(o(n[t].columns))) : i.push(n[t]);
            return i;
          }
          function vr(n) {
            return e(n, function (n) {
              return !n.hidden;
            });
          }
          function cf(n) {
            return ri([n]).length > 0;
          }
          function ri(n) {
            return e(n, function (n) {
              var t = !n.hidden;
              return t && n.columns && (t = ri(n.columns).length > 0), t;
            });
          }
          function yr(n, t) {
            return oi(n, function (n) {
              var i;
              return (
                (cf(n) && !t) || (i = !0),
                n.columns && (n.columns = yr(n.columns, i)),
                f({ hidden: i }, n)
              );
            });
          }
          function yi(n) {
            var t = bi(l(n));
            return t.concat(bi(g(n)));
          }
          function pi(n, t, i, r) {
            var f = n[i],
              e = n[r],
              u = br(f, t);
            return (t = u ? u.columns : t), nt(e, t);
          }
          function pr(t) {
            var h,
              e,
              r,
              u,
              o,
              i,
              f,
              v = t.closest("table"),
              s = n().add(t),
              c = t.closest("tr"),
              l = v.find("tr"),
              a = l.index(c);
            if (a > 0) {
              for (
                h = l.eq(a - 1),
                  e = h.find("th").filter(function () {
                    return !n(this).attr("rowspan");
                  }),
                  r = 0,
                  u = c.find("th").index(t),
                  o = t.prevAll().filter(function () {
                    return this.colSpan > 1;
                  }),
                  i = 0;
                i < o.length;
                i++
              )
                r += o[i].colSpan || 1;
              for (u += Math.max(r - 1, 0), r = 0, i = 0; i < e.length; i++)
                if (
                  ((f = e.eq(i)),
                  (r += f.attr("data-colspan")
                    ? f[0].getAttribute("data-colspan")
                    : 1),
                  u >= i && u < r)
                ) {
                  s = pr(f).add(s);
                  break;
                }
            }
            return s;
          }
          function wr(t) {
            var r,
              u,
              i,
              f,
              c,
              e,
              o,
              v = t.closest("thead"),
              s = n().add(t),
              l = t.closest("tr"),
              a = v.find("tr"),
              y = a.index(l) + t[0].rowSpan,
              h = kendo.attr("colspan");
            if (y <= a.length - 1) {
              for (
                r = l.next(),
                  u = t.prevAll(),
                  u = u.filter(function () {
                    return !this.rowSpan || 1 === this.rowSpan;
                  }),
                  f = 0,
                  i = 0;
                i < u.length;
                i++
              )
                f += parseInt(u.eq(i).attr(h), 10) || 1;
              for (
                c = r.find("th"), e = parseInt(t.attr(h), 10) || 1, i = 0;
                i < e;

              )
                (r = c.eq(i + f)),
                  (s = s.add(wr(r))),
                  (o = parseInt(r.attr(h), 10)),
                  o > 1 && (e -= o - 1),
                  i++;
            }
            return s;
          }
          function br(n, t) {
            var i = [];
            return wi(n, t, i), i[i.length - 1];
          }
          function wi(n, t, i) {
            var r, u;
            for (i = i || [], r = 0; r < t.length; r++) {
              if (n === t[r]) return !0;
              if (t[r].columns) {
                if (((u = i.length), i.push(t[r]), wi(n, t[r].columns, i)))
                  return !0;
                i.splice(u, i.length - u);
              }
            }
            return !1;
          }
          function bi(n) {
            for (var i = [], r = [], t = 0; t < n.length; t++)
              i.push(n[t]), n[t].columns && (r = r.concat(n[t].columns));
            return r.length && (i = i.concat(bi(r))), i;
          }
          function kr(n, t, i, r) {
            var f, u;
            for (
              i = i || 0, r = r || {}, r[i] = r[i] || 0, u = 0;
              u < t.length;
              u++
            ) {
              if (t[u] == n) {
                f = { cell: r[i], row: i };
                break;
              }
              if (t[u].columns && (f = kr(n, t[u].columns, i + 1, r))) break;
              r[i]++;
            }
            return f;
          }
          function dr(t, i, r) {
            var u, s, h, e, c, l, f, a;
            for (
              r = r || 0,
                h = i,
                i = o(i),
                e = {},
                c = t.find(">tr:not(.k-filter-row)"),
                l = function () {
                  var t = n(this);
                  return (
                    !t.hasClass("k-group-cell") &&
                    !t.hasClass("k-hierarchy-cell")
                  );
                },
                f = 0,
                a = i.length;
              f < a;
              f++
            )
              (u = kr(i[f], h)),
                e[u.row] ||
                  (e[u.row] = c.eq(u.row).find(".k-header").filter(l)),
                (s = e[u.row].eq(u.cell)),
                s.attr(kendo.attr("index"), r + f);
            return i.length;
          }
          function ki(n) {
            for (var i, r = 0, t = 0; t < n.length; t++)
              n[t].columns && ((i = ki(n[t].columns)), i > r && (r = i));
            return 1 + r;
          }
          function l(n) {
            return e(n, it("locked"));
          }
          function g(n) {
            return e(n, ii(it("locked")));
          }
          function gr(n, t) {
            var i = n.find("tr"),
              r = i.length;
            i.each(function (n) {
              for (var u = this.cells, i = 0; i < u.length; i++)
                u[i].colSpan <= 1 &&
                  u[i].attributes.rowspan &&
                  ((t.children[n].children[i].attr.rowSpan = r - n),
                  (u[i].rowSpan = r - n));
            });
          }
          function nu(t, i) {
            var r,
              f = t.find("tr"),
              u = [];
            for (
              f
                .filter(function (t) {
                  var i = !n(this).children().length;
                  return i && u.push(t), i;
                })
                .remove(),
                r = u.length - 1;
              r >= 0;
              r--
            )
              i.children.splice(u[r], 1);
            gr(t, i);
          }
          function w(t, i) {
            if (i === !0) {
              t = n(t);
              var r, u;
              r = t.parent().scrollTop();
              u = t.parent().scrollLeft();
              kendo.focusElement(t);
              t.parent().scrollTop(r).scrollLeft(u);
            } else
              n(t)
                .one("focusin", function (n) {
                  n.preventDefault();
                })
                .focus();
          }
          function lf(n, t) {
            var i,
              r = n.offsetHeight,
              u = t.offsetHeight;
            r > u ? (i = r + "px") : r < u && (i = u + "px");
            i && (n.style.height = t.style.height = i);
          }
          function ui(n, t) {
            return (
              !(
                !(n && t && n.field) ||
                n.selectable ||
                n.command ||
                (n.editable && !n.editable(t))
              ) &&
              n.field &&
              t.editable &&
              t.editable(n.field)
            );
          }
          function af(n, t) {
            var i = (n || {}).field || "";
            return t.dirty && t.dirtyFields && t.dirtyFields[i] && ui(n, t);
          }
          function c(n) {
            return t === n;
          }
          function vf(n) {
            return "number" == typeof n && !isNaN(n);
          }
          var b,
            lt,
            fi,
            at,
            tu,
            iu,
            ft,
            ei = kendo.data,
            p = kendo.dom,
            a = p.element,
            di = p.text,
            et = p.html,
            ot = kendo._outerWidth,
            s = kendo.keys,
            bt = kendo._outerHeight,
            k = kendo.ui,
            gi = k.DataBoundWidget,
            h = ei.DataSource,
            ru = ei.ObservableArray,
            rt = ei.Query,
            st = ei.Model,
            vt = kendo.support.browser,
            uu = kendo.template,
            kt = kendo._activeElement,
            nr = n.isArray,
            f = n.extend,
            r = n.proxy,
            oi = n.map,
            e = n.grep,
            nt = n.inArray,
            dt = n.isPlainObject,
            fu = Array.prototype.push,
            eu = "string",
            ht = "change",
            ou = "itemChange",
            tr = "error",
            ir = "progress",
            v = ".",
            u = ".kendoTreeList",
            gt = "click",
            yf = "mousedown",
            rr = "beforeEdit",
            ni = "edit",
            su = "page",
            pf = "pageChange",
            yt = "save",
            hu = "saveChanges",
            ur = "expand",
            fr = "collapse",
            cu = "cellClose",
            lu = "remove",
            tt = "td:not(.k-group-cell):not(.k-hierarchy-cell):visible",
            au = "dataBinding",
            vu = "dataBound",
            pt = "cancel",
            er = "tabIndex",
            yu = "filterMenuInit",
            pu = "filterMenuOpen",
            wu = "columnHide",
            bu = "columnShow",
            wf = "th.k-header",
            ku = "columnReorder",
            or = "columnResize",
            du = "columnMenuInit",
            gu = "columnLock",
            nf = "columnUnlock",
            ut = "parentId",
            tf = "dragstart",
            rf = "drag",
            uf = "drop",
            ff = "dragend",
            si = "tr:visible",
            d = "td:visible",
            hi = "th:visible",
            ef = "k-grid-norecords",
            ti = "tr:not(.k-footer-template):visible",
            ci = si + " > td:first:visible",
            bf = ti + ":last",
            wt = !1,
            kf = "height",
            df = "incell",
            gf = "inline",
            ne = "popup",
            te = "table",
            i = {
              wrapper: "k-treelist k-grid k-widget k-display-block",
              header: "k-header",
              button: "k-button",
              alt: "k-alt",
              editCell: "k-edit-cell",
              editRow: "k-grid-edit-row",
              dirtyCell: "k-dirty-cell",
              group: "k-treelist-group",
              gridToolbar: "k-grid-toolbar",
              gridHeader: "k-grid-header",
              gridHeaderWrap: "k-grid-header-wrap",
              gridContent: "k-grid-content",
              gridContentWrap: "k-grid-content",
              gridFilter: "k-grid-filter",
              footerTemplate: "k-footer-template",
              focused: "k-state-focused",
              loading: "k-i-loading",
              refresh: "k-i-reload",
              retry: "k-request-retry",
              selected: "k-state-selected",
              status: "k-status",
              link: "k-link",
              withIcon: "k-with-icon",
              filterable: "k-filterable",
              icon: "k-icon",
              iconFilter: "k-i-filter",
              iconCollapse: "k-i-collapse",
              iconExpand: "k-i-expand",
              iconHidden: "k-i-none",
              iconPlaceHolder: "k-icon k-i-none",
              input: "k-input",
              dropPositions:
                "k-i-insert-up k-i-insert-down k-i-plus k-i-insert-middle",
              dropTop: "k-i-insert-up",
              dropBottom: "k-i-insert-down",
              dropAdd: "k-i-plus",
              dropMiddle: "k-i-insert-middle",
              dropDenied: "k-i-cancel",
              dragStatus: "k-drag-status",
              dragClue: "k-drag-clue",
              dragClueText: "k-clue-text",
            },
            sr = {
              create: {
                imageClass: "k-i-plus",
                className: "k-grid-add",
                methodName: "addRow",
              },
              createchild: {
                imageClass: "k-i-plus",
                className: "k-grid-add",
                methodName: "addRow",
              },
              destroy: {
                imageClass: "k-i-close",
                className: "k-grid-delete",
                methodName: "removeRow",
              },
              edit: {
                imageClass: "k-i-edit",
                className: "k-grid-edit",
                methodName: "editRow",
              },
              update: {
                imageClass: "k-i-check",
                className: "k-primary k-grid-update",
                methodName: "saveRow",
              },
              canceledit: {
                imageClass: "k-i-cancel",
                className: "k-grid-cancel",
                methodName: "_cancelEdit",
              },
              cancel: {
                imageClass: "k-icon k-i-cancel",
                text: "Cancel changes",
                className: "k-grid-cancel-changes",
                methodName: "cancelChanges",
              },
              save: {
                imageClass: "k-icon k-i-check",
                text: "Save changes",
                className: "k-grid-save-changes",
                methodName: "saveChanges",
              },
              excel: {
                imageClass: "k-i-file-excel",
                className: "k-grid-excel",
                methodName: "saveAsExcel",
              },
              pdf: {
                imageClass: "k-i-file-pdf",
                className: "k-grid-pdf",
                methodName: "saveAsPDF",
              },
            },
            of = kendo.Class.extend({
              init: function (n, t) {
                var i = this;
                i.data = n || [];
                i.options = f(i.options, t);
              },
              options: {
                defaultParentId: null,
                idField: "id",
                parentIdField: ut,
              },
              childrenMap: function () {
                var i,
                  f,
                  r,
                  u,
                  t = this,
                  n = {},
                  e = t.data.length,
                  o = t.options.idField,
                  s = t.options.parentIdField;
                if (t._childrenMap) return t._childrenMap;
                for (u = 0; u < e; u++)
                  (i = this.data[u]),
                    (f = i[o]),
                    (r = i[s]),
                    (n[f] = n[f] || []),
                    (n[r] = n[r] || []),
                    n[r].push(i);
                return (t._childrenMap = n), n;
              },
              idsMap: function () {
                var i,
                  t,
                  n = this,
                  r = {},
                  u = n.data,
                  f = u.length,
                  e = n.options.idField;
                if (n._idMap) return n._idMap;
                for (t = 0; t < f; t++) (i = u[t]), (r[i[e]] = i);
                return (n.idsMap = r), r;
              },
              dataMaps: function () {
                var i,
                  r,
                  u,
                  f,
                  n = this,
                  t = {},
                  e = n.data,
                  s = e.length,
                  o = {},
                  h = n.options.idField,
                  c = n.options.parentIdField;
                if (n._dataMaps) return n._dataMaps;
                for (f = 0; f < s; f++)
                  (i = e[f]),
                    (r = i[h]),
                    (u = i[c]),
                    (o[r] = i),
                    (t[r] = t[r] || []),
                    (t[u] = t[u] || []),
                    t[u].push(i);
                return (n._dataMaps = { children: t, ids: o });
              },
              rootNodes: function () {
                for (
                  var t,
                    i = this,
                    r = i.data,
                    f = i.options.defaultParentId,
                    e = r.length,
                    u = [],
                    o = i.options.parentIdField,
                    n = 0;
                  n < e;
                  n++
                )
                  (t = r[n]), t[o] === f && u.push(t);
                return u;
              },
              removeCollapsedSubtreesFromRootNodes: function (n) {
                var t, u, i, f, r;
                for (
                  n = n || {},
                    t = this,
                    u = t.rootNodes(),
                    i = [],
                    t._childrenMap = n.childrenMap =
                      n.childrenMap || t.childrenMap(),
                    n.maxDepth = n.maxDepth || 1 / 0,
                    r = 0;
                  r < u.length;
                  r++
                )
                  (f = t.removeCollapsedSubtrees(u[r], n)), (i = i.concat(f));
                return i;
              },
              removeCollapsedSubtrees: function (n, t) {
                var f, i, r, e, o, s, h, u, l;
                if (
                  ((t = t || {}),
                  (f = this),
                  (i = []),
                  (o = t.childrenMap || {}),
                  (s = t.maxDepth || 1 / 0),
                  (h = f.options.idField),
                  (u = o[n[h]] || []),
                  (l = c(n.expanded) ? t.expanded : n.expanded),
                  i.push(n),
                  u && l)
                )
                  for (r = 0; r < u.length && !(i.length >= s); r++)
                    (e = f.removeCollapsedSubtrees(u[r], t)), (i = i.concat(e));
                return i;
              },
            }),
            ct = function (n) {
              this.data = n || [];
            };
          ct.prototype = new rt();
          ct.prototype.constructor = ct;
          ct.process = function (n, i, r) {
            var u, e, f, l, o, s, h, a, v, y, c, p;
            return (
              (i = i || {}),
              (u = new ct(n)),
              (e = i.group),
              (f = rt
                .normalizeGroup(e || [])
                .concat(rt.normalizeSort(i.sort || []))),
              (l = i.filterCallback),
              (o = i.filter),
              (s = i.skip),
              (h = i.take),
              f && r && (u = u.sort(f, t, t, r)),
              o &&
                ((u = u.filter(o)), l && (u = l(u)), (a = u.toArray().length)),
              f && !r && ((u = u.sort(f)), e && (n = u.toArray())),
              i.processFromRootNodes &&
                ((c = new of(u.toArray(), i)),
                o && (y = c.childrenMap()),
                (p = c.removeCollapsedSubtreesFromRootNodes({
                  childrenMap: o || (f && f.length) ? t : i.childrenMap,
                  expanded: i.expanded,
                  maxDepth: s + h || 1 / 0,
                })),
                (v = c.childrenMap()),
                (u = new ct(p))),
              s !== t && h !== t && (u = u.range(s, h)),
              e && (u = u.group(e, n)),
              {
                total: a,
                data: u.toArray(),
                childrenMap: v,
                filteredChildrenMap: y,
              }
            );
          };
          b = st.define({
            id: "id",
            parentId: ut,
            fields: {
              id: { type: "number" },
              parentId: { type: "number", nullable: !0 },
            },
            init: function (n) {
              st.fn.init.call(this, n);
              this._loaded = !1;
              this.parentIdField || (this.parentIdField = ut);
              this.parentId = this.get(this.parentIdField);
            },
            accept: function (n) {
              st.fn.accept.call(this, n);
              this.parentId = this.get(this.parentIdField);
            },
            set: function (n, t, i) {
              n == ut &&
                this.parentIdField != ut &&
                (this[this.parentIdField] = t);
              st.fn.set.call(this, n, t, i);
              n == this.parentIdField &&
                (this.parentId = this.get(this.parentIdField));
            },
            loaded: function (n) {
              return n === t ? this._loaded : ((this._loaded = n), t);
            },
            shouldSerialize: function (n) {
              return (
                st.fn.shouldSerialize.call(this, n) &&
                "_loaded" !== n &&
                "_error" != n &&
                "_edit" != n &&
                !("parentId" !== this.parentIdField && "parentId" === n)
              );
            },
          });
          b.parentIdField = ut;
          b.define = function (n, i) {
            var r, u;
            return (
              i === t && ((i = n), (n = b)),
              (r = i.parentId || ut),
              (i.parentIdField = r),
              (u = st.define(n, i)),
              r && (u.parentIdField = r),
              u
            );
          };
          lt = h.extend({
            init: function (n) {
              n = n || {};
              var t = this;
              t._dataMaps = t._getDataMaps();
              n.schema = f(!0, {}, { modelBase: b, model: b }, n.schema);
              h.fn.init.call(this, n);
            },
            _addRange: function () {},
            _createNewModel: function (n) {
              var u = this,
                t = {},
                i = n instanceof st,
                r = this._modelParentIdField();
              return (
                i && (t = n),
                (t = h.fn._createNewModel.call(this, t)),
                i ||
                  (n.parentId
                    ? (n[t.parentIdField] = n.parentId)
                    : u._isPageable() && n[r] && (n[t.parentIdField] = n[r]),
                  t.accept(n)),
                t
              );
            },
            _shouldWrap: function () {
              return !0;
            },
            _push: function (n, t) {
              var i = h.fn._readData.call(this, n);
              i || (i = n);
              this[t](i);
            },
            _getData: function () {
              return this._data || [];
            },
            _readData: function (n) {
              var i = this,
                t = i._isPageable() ? i._getData().toJSON() : i.data();
              return (
                (n = h.fn._readData.call(this, n)),
                this._replaceData((t.toJSON ? t.toJSON() : t).concat(n), t),
                n instanceof ru ? n : t
              );
            },
            _replaceData: function (n, t) {
              for (var r = n.length, i = 0; i < r; i++) t[i] = n[i];
              t.length = r;
            },
            _readAggregates: function (n) {
              var t = f(this._aggregateResult, this.reader.aggregates(n));
              return (
                "" in t && ((t[this._defaultParentId()] = t[""]), delete t[""]),
                t
              );
            },
            read: function (n) {
              var i = this;
              return (
                i._isPageable() &&
                  ((i._dataMaps = {}),
                  i._modelOptions().expanded ||
                    ((i._skip = 0), (i._page = 1), (i._collapsedTotal = t))),
                h.fn.read.call(i, n)
              );
            },
            remove: function (n) {
              this._removeChildData(n);
              this._removeFromDataMaps(n);
              h.fn.remove.call(this, n);
            },
            _removeChildData: function (n, t) {
              var i = this,
                r = i._isPageable(),
                u = r ? this._getData() : this.data(),
                f = r
                  ? i._getChildrenMap() || i.childrenMap(u)
                  : i._childrenMap(u),
                e = this._subtree(f, n.id),
                o = !c(t) && t,
                s = this._removeItems(e, o);
              i._removeFromDataMaps(s);
            },
            pushDestroy: function (n) {
              var t,
                i = this;
              for (nr(n) || (n = [n]), t = 0; t < n.length; t++)
                i._removeChildData(n[t], !0), i._removeFromDataMaps(n[t]);
              h.fn.pushDestroy.call(i, n);
            },
            insert: function (n, t) {
              var i = this,
                r = i._createNewModel(t);
              return i._insertInDataMaps(r), h.fn.insert.call(i, n, r);
            },
            _filterCallback: function (n) {
              for (
                var t,
                  r,
                  f = this,
                  i = {},
                  e = [],
                  h = n.toArray(),
                  u = f._modelIdField(),
                  c = f._modelParentIdField(),
                  l = f._isPageable(),
                  o = [],
                  s = 0;
                s < h.length;
                s++
              )
                if (((t = h[s]), l)) {
                  for (
                    o = [],
                      i[t[u]] || ((i[t[u]] = !0), o.push(t)),
                      r = f._parentNode(t);
                    r && !i[r[u]];

                  )
                    (i[r[u]] = !0), o.unshift(r), (r = f._parentNode(r));
                  o.length && (e = e.concat(o));
                } else
                  for (
                    ;
                    t && (i[t[u]] || ((i[t[u]] = !0), e.push(t)), !i[t[c]]);

                  )
                    (i[t[c]] = !0), (t = this.parentNode(t)), t && e.push(t);
              return new rt(e);
            },
            _subtree: function (n, t) {
              for (
                var u = this,
                  i = n[t] || [],
                  o = u._defaultParentId(),
                  e = u._modelIdField(),
                  r = 0,
                  f = i.length;
                r < f;
                r++
              )
                i[r][e] !== o && (i = i.concat(u._subtree(n, i[r][e])));
              return i;
            },
            _childrenMap: function (n) {
              var i,
                r,
                f,
                u,
                t = {};
              for (n = this._observeView(n), i = 0; i < n.length; i++)
                (r = n[i]),
                  (f = r.id),
                  (u = r.parentId),
                  (t[f] = t[f] || []),
                  (t[u] = t[u] || []),
                  t[u].push(r);
              return t;
            },
            childrenMap: function (n) {
              var t = this._createTreeView(n);
              return t.childrenMap();
            },
            _getChildrenMap: function () {
              var n = this,
                t = n._getDataMaps();
              return t.children;
            },
            _initIdsMap: function (n) {
              var i = this,
                t = i._getDataMaps();
              return c(t.ids) && (t.ids = i._idsMap(n)), t.ids;
            },
            _idsMap: function (n) {
              var t = this._createTreeView(n);
              return t.idsMap();
            },
            _getIdsMap: function () {
              var n = this,
                t = n._getDataMaps();
              return t.ids || {};
            },
            _getFilteredChildrenMap: function () {
              var n = this,
                t = n._getDataMaps();
              return t.filteredChildren;
            },
            _setFilteredChildrenMap: function (n) {
              var t = this,
                i = t._getDataMaps();
              i.filteredChildren = n;
            },
            _initDataMaps: function (n) {
              var t = this,
                i = t._createTreeView(n);
              return (t._dataMaps = i.dataMaps());
            },
            _initChildrenMapForParent: function (n) {
              var t,
                i = this,
                r = i._getData(),
                u = i._getChildrenMap(),
                e = i._modelIdField(),
                o = i._modelParentIdField(),
                f = (n || {})[e];
              if (u && n)
                for (u[f] = [], t = 0; t < r.length; t++)
                  r[t][o] === f && u[f].push(r[t]);
            },
            _getDataMaps: function () {
              var n = this;
              return (n._dataMaps = n._dataMaps || {});
            },
            _createTreeView: function (n, t) {
              return new of(n, f(t, this._defaultTreeModelOptions()));
            },
            _defaultTreeModelOptions: function () {
              var n = this,
                t = n._modelOptions();
              return {
                defaultParentId: n._defaultParentId(),
                idField: n._modelIdField(),
                parentIdField: n._modelParentIdField(),
                expanded: t.expanded,
              };
            },
            _defaultDataItemType: function () {
              return this.reader.model || kendo.data.ObservableObject;
            },
            _calculateAggregates: function (n, t) {
              var i, u, o, p, f, s, h, l, w, e, a, v, b, y;
              if (
                ((t = t || {}),
                (i = this),
                (u = {}),
                (s = t.filter),
                (h = t.skip),
                (l = t.take),
                (w = c(h) || c(l) ? 1 / 0 : h + l),
                (e = i._isPageable()),
                (a = t.filteredChildrenMap),
                (v = t.childrenMap),
                e)
              ) {
                if (c(t.aggregate)) return u;
                b = a ? a : v ? v : i.childrenMap(i._getData());
              }
              for (
                !e &&
                  s &&
                  (n = rt.process(n, {
                    filter: s,
                    filterCallback: r(this._filterCallback, this),
                  }).data),
                  y = e ? b : i._childrenMap(n),
                  u[this._defaultParentId()] = new rt(
                    this._subtree(y, this._defaultParentId())
                  ).aggregate(t.aggregate),
                  f = 0;
                f < n.length && !(f >= w);
                f++
              )
                (o = n[f]),
                  (p = this._subtree(y, o.id)),
                  (u[o.id] = new rt(p).aggregate(t.aggregate));
              return u;
            },
            _queryProcess: function (n, t) {
              var s,
                h,
                f,
                u,
                i,
                e,
                c = this,
                o = {};
              if (
                ((t = t || {}),
                (t.filterCallback = r(this._filterCallback, this)),
                c._isPageable())
              )
                return c._processPageableQuery(n, t);
              for (
                s = this._defaultParentId(),
                  o = rt.process(n, t),
                  h = this._childrenMap(o.data),
                  n = h[s] || [],
                  u = 0;
                u < n.length;
                u++
              )
                (i = n[u]),
                  i.id !== s &&
                    ((e = h[i.id]),
                    (f = !(!e || !e.length)),
                    i.loaded() || i.loaded(f || !i.hasChildren),
                    (i.loaded() || i.hasChildren !== !0) && (i.hasChildren = f),
                    f && (n = n.slice(0, u + 1).concat(e, n.slice(u + 1))));
              return (o.data = n), o;
            },
            _processPageableQuery: function (n, t) {
              var r,
                f,
                i = this,
                u = i._getDataMaps();
              return (
                (i._getData() === n && u.children && u.ids) ||
                  (u = i._initDataMaps(i._getData())),
                (t.childrenMap = u.children || {}),
                (t.idsMap = u.ids || {}),
                (r = i._processTreeQuery(n, t)),
                i._replaceWithObservedData(r.data, n),
                i._processDataItemsState(r.data, r.childrenMap),
                i._replaceItemsInDataMaps(r.data),
                (r.dataToAggregate = i._dataToAggregate(r.data, t)),
                t.filter &&
                  ((f = r.filteredChildrenMap),
                  i._replaceInMapWithObservedData(f, n),
                  i._setFilteredChildrenMap(f),
                  (t.filteredChildrenMap = f)),
                r
              );
            },
            _dataToAggregate: function (n) {
              var t = this,
                i = n[0] || {},
                r = t._parentNodes(i);
              return r.concat(n);
            },
            _replaceItemsInDataMaps: function (n) {
              for (
                var r,
                  u,
                  e,
                  i = this,
                  s = nr(n) ? n : [n],
                  o = i._defaultDataItemType(),
                  h = i._defaultParentId(),
                  l = i._modelIdField(),
                  a = i._modelParentIdField(),
                  c = i._getDataMaps(),
                  f = 0;
                f < s.length;
                f++
              )
                (r = s[f]),
                  r instanceof o &&
                    (i._insertInIdsMap(r),
                    (u = i._parentNodes(r)),
                    (e = u && u.length ? u[u.length - 1] : t),
                    r[a] === h
                      ? i._replaceInMap(c.children, h, r, o)
                      : e && i._replaceInMap(c.children, e[l], r, o));
            },
            _replaceInMap: function (n, t, i, r) {
              var u,
                f,
                e = this._modelIdField();
              n[t] = n[t] || [];
              r = r || this._defaultDataItemType();
              u = n[t].filter(function (n) {
                return i[e] === n[e];
              })[0];
              f = u ? n[t].indexOf(u) : -1;
              f === -1 || u instanceof r || (n[t][f] = i);
            },
            _replaceWithObservedData: function (n, t) {
              for (
                var f,
                  r,
                  e,
                  o,
                  s,
                  u = this,
                  h = u._getDataMaps().ids || {},
                  l = u._modelIdField(),
                  c = u._defaultDataItemType(),
                  i = 0;
                i < n.length;
                i++
              )
                (f = n[i]),
                  (r = f[l]),
                  f instanceof c ||
                    (h[r] instanceof c
                      ? (n[i] = h[r])
                      : ((e = u._getById(r)),
                        (o = t.indexOf(e)),
                        e && o !== -1 && ((s = t.at(o)), (n[i] = s))));
            },
            _replaceInMapWithObservedData: function (n, t) {
              var i,
                r = this;
              for (i in n) r._replaceWithObservedData(n[i], t);
            },
            _insertInDataMaps: function (n) {
              var t = this;
              t._isPageable() &&
                (t._insertInIdsMap(n), t._insertInChildrenMap(n));
            },
            _insertInIdsMap: function (n) {
              var t = this,
                r = t._getIdsMap(),
                i = t._modelIdField();
              c(n[i]) || (r[n[i]] = n);
            },
            _insertInChildrenMap: function (n, t) {
              var r = this,
                i = r._getChildrenMap() || {},
                e = r._modelIdField(),
                o = r._modelParentIdField(),
                f = n[e],
                u = n[o];
              t = t || 0;
              i[f] = i[f] || [];
              i[u] = i[u] || [];
              i[u].splice(t, 0, n);
            },
            _removeFromDataMaps: function (n) {
              var t,
                i = this;
              if (((n = nr(n) ? n : [n]), i._isPageable()))
                for (t = 0; t < n.length; t++)
                  i._removeFromIdsMap(n[t]), i._removeFromChildrenMap(n[t]);
            },
            _removeFromIdsMap: function (n) {
              var i = this,
                u = i._getIdsMap(),
                r = i._modelIdField();
              c(n[r]) || (u[n[r]] = t);
            },
            _removeFromChildrenMap: function (n) {
              var t,
                i = this,
                r = i._getChildrenMap() || {},
                f = i._modelParentIdField(),
                u = n[f];
              r[u] = r[u] || [];
              t = i._indexInChildrenMap(n);
              t !== -1 && r[u].splice(t, 1);
            },
            _indexInChildrenMap: function (n) {
              var t = this;
              return t._itemIndexInMap(n, t._getChildrenMap());
            },
            _itemIndexInMap: function (n, t) {
              var u,
                f,
                e = this,
                i = t || {},
                o = e._modelParentIdField(),
                r = n[o];
              return (
                (i[r] = i[r] || []),
                (u = i[r].filter(function (t) {
                  return n.uid === t.uid;
                })[0]),
                (f = u ? i[r].indexOf(u) : -1)
              );
            },
            _getById: function (n) {
              for (
                var r = this, u = r._modelIdField(), i = r._getData(), t = 0;
                t < i.length;
                t++
              )
                if (i[t][u] === n) return i[t];
            },
            _isLastItemInView: function (n) {
              var t = this.view();
              return t.length && t[t.length - 1] === n;
            },
            _defaultPageableQueryOptions: function () {
              var n = this,
                t = n._getDataMaps();
              return {
                skip: n.skip(),
                take: n.take(),
                page: n.page(),
                pageSize: n.pageSize(),
                sort: n.sort(),
                filter: n.filter(),
                group: n.group(),
                aggregate: n.aggregate(),
                filterCallback: r(n._filterCallback, n),
                childrenMap: t.children,
                idsMap: t.ids,
              };
            },
            _isPageable: function () {
              var n = this.pageSize();
              return !c(n) && n > 0 && !this.options.serverPaging;
            },
            _updateTotalForAction: function (n, t) {
              var i = this;
              h.fn._updateTotalForAction.call(i, n, t);
              i._isPageable() && i._updateCollapsedTotalForAction(n, t);
            },
            _updateCollapsedTotalForAction: function (n, i) {
              var r = this,
                u = parseInt(r._collapsedTotal, 10);
              return vf(r._collapsedTotal)
                ? ("add" === n
                    ? (u += i.length)
                    : "remove" === n
                    ? (u -= i.length)
                    : "itemchange" === n ||
                      "sync" === n ||
                      r.options.serverPaging
                    ? "sync" === n && (u = r._calculateCollapsedTotal())
                    : (u = r._calculateCollapsedTotal()),
                  (r._collapsedTotal = u),
                  t)
                : (r._calculateCollapsedTotal(), t);
            },
            _setFilterTotal: function (n, t) {
              var i = this;
              h.fn._setFilterTotal.call(i, n, t);
              i._setFilterCollapsedTotal(n);
            },
            _setFilterCollapsedTotal: function (n) {
              var i = this;
              i.options.serverFiltering ||
                (n !== t
                  ? (i._collapsedTotal = n)
                  : (i._getFilteredChildrenMap() &&
                      i._calculateCollapsedTotal(),
                    i._setFilteredChildrenMap(t)));
            },
            collapsedTotal: function () {
              var n = this;
              return c(n._collapsedTotal)
                ? n._calculateCollapsedTotal()
                : n._collapsedTotal;
            },
            _calculateCollapsedTotal: function () {
              var n = this,
                t = n._dataWithoutCollapsedSubtrees();
              return (
                t.length && (n._collapsedTotal = t.length), n._collapsedTotal
              );
            },
            _dataWithoutCollapsedSubtrees: function () {
              return this._removeCollapsedSubtrees(this._getData());
            },
            _removeCollapsedSubtrees: function (n) {
              var t = this,
                i = t._createTreeView(n);
              return i.removeCollapsedSubtreesFromRootNodes({
                expanded: t._modelOptions().expanded,
                childrenMap: t._getChildrenMap(),
              });
            },
            _processTreeQuery: function (n, t) {
              return ct.process(
                n,
                f(t, this._defaultTreeModelOptions(), {
                  processFromRootNodes: !0,
                })
              );
            },
            _processDataItemsState: function (n, t) {
              for (var r = n.length, i = 0; i < r; i++)
                this._processDataItemState(n[i], t);
            },
            _processDataItemState: function (n, t) {
              var i,
                r,
                u = this._defaultParentId();
              n.id !== u &&
                ((i = t[n.id] || []),
                (r = !(!i || !i.length)),
                n.loaded &&
                  (n.loaded() || n.loaded(r || !n.hasChildren),
                  (n.loaded() || n.hasChildren !== !0) && (n.hasChildren = r)));
            },
            _queueRequest: function (n, t) {
              t.call(this);
            },
            _modelLoaded: function (n) {
              var t = this.get(n);
              t.loaded(!0);
              t.hasChildren = this.childNodes(t).length > 0;
            },
            _modelError: function (n, t) {
              this.get(n)._error = t;
            },
            success: function (n, i) {
              (i && t !== i.id) || (this._data = this._observe([]));
              h.fn.success.call(this, n, i);
              this._total = this._data.length;
            },
            load: function (t) {
              var i = "_query",
                u =
                  this.options.serverSorting ||
                  this.options.serverPaging ||
                  this.options.serverFiltering ||
                  this.options.serverGrouping ||
                  this.options.serverAggregates,
                f = n.Deferred().resolve().promise();
              if (t.loaded()) {
                if (u) return f;
              } else t.hasChildren && ((i = "read"), this._removeChildData(t));
              return this[i]({ id: t.id })
                .done(r(this._modelLoaded, this, t.id))
                .fail(r(this._modelError, this, t.id));
            },
            contains: function (n, t) {
              for (
                var i = this,
                  r = i._modelIdField(),
                  u = i._modelParentIdField(),
                  f = n[r],
                  e = i._isPageable();
                t;

              ) {
                if (t[u] === f) return !0;
                t = e ? i._parentNode(t) : i.parentNode(t);
              }
              return !1;
            },
            _byParentId: function (n, t) {
              var r,
                i,
                u = [],
                f = this.view();
              if (n === t) return [];
              for (i = 0; i < f.length; i++)
                (r = f.at(i)), r.parentId == n && u.push(r);
              return u;
            },
            _defaultParentId: function () {
              return this.reader.model.fn.defaults[
                this.reader.model.parentIdField
              ];
            },
            _modelOptions: function () {
              return (this.options.schema || {}).model || {};
            },
            _modelIdField: function () {
              var n = this._modelOptions();
              return n.id || "id";
            },
            _modelParentIdField: function () {
              var n = this._modelOptions();
              return n.parentId || ut;
            },
            childNodes: function (n) {
              return this._byParentId(n.id, this._defaultParentId());
            },
            rootNodes: function () {
              return this._byParentId(this._defaultParentId());
            },
            _rootNode: function (n) {
              return this._parentNodes(n)[0];
            },
            _pageableRootNodes: function (n) {
              var t, o, s, i, e, r, u, f;
              for (
                n = n || {},
                  t = this,
                  o = t._defaultParentId(),
                  s = t._modelParentIdField(),
                  i = [],
                  e = t._nodesWithoutParentInView(n),
                  f = 0;
                f < e.length;
                f++
              )
                (r = e[f]),
                  r[s] === o
                    ? i.push(r)
                    : ((u = t._rootNode(r)),
                      u && i.indexOf(u) === -1 && i.push(u));
              return i;
            },
            parentNode: function (n) {
              return this.get(n.parentId);
            },
            _parentNode: function (n) {
              var t = this,
                r = t._modelParentIdField(),
                u = t._initIdsMap(t._getData()),
                i = n[r];
              return u[i] || t._getById(i);
            },
            _parentNodes: function (n) {
              for (var i = this, t = i._parentNode(n), r = []; t; )
                r.unshift(t), (t = i._parentNode(t));
              return r;
            },
            _parentNodesNotInView: function () {
              for (
                var o,
                  i,
                  r,
                  h,
                  u,
                  n = this,
                  s = n.view(),
                  e = [],
                  c = n._defaultParentId(),
                  l = n._modelIdField(),
                  a = n._modelParentIdField(),
                  t = [],
                  f = 0;
                f < s.length;
                f++
              )
                (r = s[f]),
                  (h = r[l]),
                  (u = r[a]),
                  (o = n._parentInView(u)),
                  o ||
                    u === c ||
                    ((t = n._parentNodes(r)),
                    (i = t && t.length ? t[t.length - 1] : n._getById(u)),
                    i && e.indexOf(i) === -1 && e.push(i));
              return e;
            },
            _nodesWithoutParentInView: function (n) {
              var t, u, e, o, s, i, h, c, f, r;
              for (
                n = n || {},
                  t = this,
                  u = t.view(),
                  e = n.childrenMap || t.childrenMap(t._getData()),
                  o = t._modelIdField(),
                  s = t._modelParentIdField(),
                  c = [],
                  f = [],
                  r = 0;
                r < u.length;
                r++
              )
                (i = u[r]),
                  (c = e[i[o]]),
                  (h = t._parentInView(i[s])),
                  h || f.push(i);
              return f;
            },
            _parentInView: function (n) {
              for (var i = this.view(), t = 0; t < i.length; t++)
                if (i[t].id === n) return i[t];
            },
            level: function (n) {
              var t = -1;
              n instanceof b || (n = this.get(n));
              do (n = this.parentNode(n)), t++;
              while (n);
              return t;
            },
            _pageableModelLevel: function (n) {
              var t,
                i = this;
              return n && i._isPageable()
                ? ((t = i._parentNodes(n)), t.length)
                : 0;
            },
            filter: function (n) {
              var i = h.fn.filter;
              return n === t ? i.call(this, n) : (i.call(this, n), t);
            },
            _pageableQueryOptions: function (n) {
              var t = this._getDataMaps();
              return (n.childrenMap = t.children), (n.idsMap = t.ids), n;
            },
            _flatData: function (n, t) {
              return (
                (t = !!this._isPageable() || t), h.fn._flatData.call(this, n, t)
              );
            },
            data: function (n) {
              var t = this,
                i = h.fn.data.call(t, n);
              return (
                t._isPageable() &&
                  (t._initDataMaps(t._getData()), t._calculateCollapsedTotal()),
                i
              );
            },
            cancelChanges: function (n) {
              var t = this;
              h.fn.cancelChanges.call(t, n);
              t._restorePageSizeAfterAddChild();
            },
            _modelCanceled: function (n) {
              var t = this;
              t._isPageable() && t._removeFromDataMaps(n);
            },
            _changesCanceled: function () {
              var n = this;
              n._isPageable() && n._initDataMaps(n._getData());
            },
            _setAddChildPageSize: function () {
              var n = this,
                t = {};
              n._isPageable() &&
                ((n._addChildPageSize = n.pageSize() + 1),
                (t = n._defaultPageableQueryOptions()),
                (t.take = n._addChildPageSize),
                (t.pageSize = n._addChildPageSize),
                n._query(t));
            },
            _restorePageSizeAfterAddChild: function () {
              var n = this,
                i = {};
              n._isPageable() &&
                (c(n._addChildPageSize) ||
                  ((i = n._defaultPageableQueryOptions()),
                  (i.take = n._addChildPageSize - 1),
                  (i.pageSize = n._addChildPageSize - 1),
                  n._query(i)));
              n._addChildPageSize = t;
            },
            sync: function () {
              var n = this;
              return h.fn.sync.call(n).then(function () {
                n._restorePageSizeAfterAddChild();
              });
            },
            _syncEnd: function () {
              var n = this;
              n._isPageable() && n._initDataMaps(n._getData());
            },
          });
          lt.create = function (t) {
            return (
              n.isArray(t)
                ? (t = { data: t })
                : t instanceof ru && (t = { data: t.toJSON() }),
              t instanceof lt ? t : new lt(t)
            );
          };
          fi = k.Pager.extend({
            options: { name: "TreeListPager" },
            totalPages: function () {
              var n = this,
                t = n.dataSource;
              return t && t._filter
                ? k.Pager.fn.totalPages.call(n)
                : Math.ceil((n._collapsedTotal() || 0) / (n.pageSize() || 1));
            },
            _createDataSource: function (n) {
              this.dataSource = kendo.data.TreeListDataSource.create(
                n.dataSource
              );
            },
            _collapsedTotal: function () {
              var n = this.dataSource;
              return n ? n.collapsedTotal() || 0 : 0;
            },
          });
          at = kendo.Observable.extend({
            init: function (n, t) {
              kendo.Observable.fn.init.call(this);
              t = this.options = f(!0, {}, this.options, t);
              this.element = n;
              this.bind(this.events, t);
              this.model = this.options.model;
              this.fields = this._fields(this.options.columns);
              this._initContainer();
              this.createEditable();
            },
            events: [],
            _initContainer: function () {
              this.wrapper = this.element;
            },
            createEditable: function () {
              var n = this.options;
              this.editable = new k.Editable(this.wrapper, {
                fields: this.fields,
                target: n.target,
                clearContainer: n.clearContainer,
                model: this.model,
                change: n.change,
              });
            },
            _isEditable: function (n) {
              return ui(n, this.model);
            },
            _fields: function (n) {
              for (var t, u = [], i = 0, r = n.length; i < r; i++)
                (t = n[i]),
                  this._isEditable(t) &&
                    u.push({
                      field: t.field,
                      format: t.format,
                      editor: t.editor,
                    });
              return u;
            },
            end: function () {
              return this.editable.end();
            },
            close: function () {
              this.destroy();
            },
            destroy: function () {
              this.editable.destroy();
              this.editable.element
                .find("[" + kendo.attr("container-for") + "]")
                .empty()
                .end()
                .removeAttr(kendo.attr("role"));
              this.model =
                this.wrapper =
                this.element =
                this.columns =
                this.editable =
                  null;
            },
          });
          tu = at.extend({
            init: function (n, t) {
              at.fn.init.call(this, n, t);
              this._attachHandlers();
              kendo.cycleForm(this.wrapper);
              this.open();
            },
            events: [pt, yt],
            options: {
              window: {
                modal: !0,
                resizable: !1,
                draggable: !0,
                title: "Edit",
                visible: !1,
              },
            },
            _initContainer: function () {
              var i = this.options,
                t = [];
              this.wrapper = n('<div class="k-popup-edit-form"/>')
                .attr(kendo.attr("uid"), this.model.uid)
                .append('<div class="k-edit-form-container"/>');
              i.template
                ? (this._appendTemplate(t), (this.fields = []))
                : this._appendFields(t);
              this._appendButtons(t);
              new p.Tree(this.wrapper.children()[0]).render(t);
              this.wrapper.appendTo(i.appendTo);
              this.window = new k.Window(this.wrapper, i.window);
            },
            _appendTemplate: function (n) {
              var t = this.options.template;
              typeof t === eu && (t = kendo.unescape(t));
              t = kendo.template(t)(this.model);
              n.push(et(t));
            },
            _appendFields: function (n) {
              for (
                var t, u = this.options.columns, i = 0, r = u.length;
                i < r;
                i++
              )
                (t = u[i]),
                  t.command ||
                    (n.push(
                      et(
                        '<div class="k-edit-label"><label for="' +
                          t.field +
                          '">' +
                          (t.title || t.field || "") +
                          "</label></div>"
                      )
                    ),
                    n.push(
                      this._isEditable(t)
                        ? et(
                            "<div " +
                              kendo.attr("container-for") +
                              '="' +
                              t.field +
                              '" class="k-edit-field"></div>'
                          )
                        : a("div", { class: "k-edit-field" }, [
                            this.options.fieldRenderer(t, this.model),
                          ])
                    ));
            },
            _appendButtons: function (n) {
              n.push(
                a(
                  "div",
                  { class: "k-edit-buttons k-state-default" },
                  this.options.commandRenderer()
                )
              );
            },
            _attachHandlers: function () {
              var n = (this._cancelProxy = r(this._cancel, this));
              this.wrapper.on(gt + u, ".k-grid-cancel", this._cancelProxy);
              this._saveProxy = r(this._save, this);
              this.wrapper.on(gt + u, ".k-grid-update", this._saveProxy);
              this.window.bind("close", function (t) {
                t.userTriggered && n(t);
              });
            },
            _detachHandlers: function () {
              this._cancelProxy = null;
              this._saveProxy = null;
              this.wrapper.off(u);
            },
            _cancel: function (n) {
              this.trigger(pt, n);
            },
            _save: function () {
              this.trigger(yt);
            },
            open: function () {
              this.window.center().open();
            },
            close: function () {
              this.window.bind("deactivate", r(this.destroy, this)).close();
            },
            destroy: function () {
              this.window.destroy();
              this.window = null;
              this._detachHandlers();
              at.fn.destroy.call(this);
            },
          });
          iu = at.extend({
            destroy: function () {
              var n = this;
              n.editable.destroy();
              n.editable.element.off().empty().removeAttr(kendo.attr("role"));
              n.model = n.wrapper = n.element = n.columns = n.editable = null;
            },
          });
          ft = gi.extend({
            init: function (t, i) {
              if (
                (gi.fn.init.call(this, t, i),
                (wt = kendo.support.isRtl(t)),
                this._dataSource(this.options.dataSource),
                this._aria(),
                this._columns(),
                this._layout(),
                this._navigatable(),
                this._selectable(),
                this._sortable(),
                this._resizable(),
                this._filterable(),
                this._attachEvents(),
                this._toolbar(),
                this._scrollable(),
                this._reorderable(),
                this._columnMenu(),
                this._minScreenSupport(),
                this._draggable(),
                this._pageable(),
                this.options.autoBind && this.dataSource.fetch(),
                this._hasLockedColumns)
              ) {
                var r = this;
                this.wrapper.addClass("k-grid-lockedcolumns");
                this._resizeHandler = function () {
                  r.resize();
                };
                n(window).on("resize" + u, this._resizeHandler);
              }
              kendo.notify(this);
            },
            _draggable: function () {
              var u = this,
                f = this.options.editable,
                t = u.dataSource,
                o = t._modelIdField(),
                i = t._modelParentIdField(),
                e = u._isPageable();
              f &&
                f.move &&
                (this._dragging = new kendo.ui.HierarchicalDragAndDrop(
                  this.wrapper,
                  {
                    $angular: this.$angular,
                    autoScroll: !0,
                    filter: "tbody>tr",
                    itemSelector: "tr",
                    allowedContainers: this.wrapper,
                    hintText: function (t) {
                      var i = function () {
                        return n(this).text();
                      };
                      return t
                        .children("td")
                        .map(i)
                        .toArray()
                        .join("<span class='k-header k-drag-separator' />");
                    },
                    contains: r(function (n, t) {
                      var i = this.dataItem(t),
                        r = this.dataItem(n);
                      return r == i || this.dataSource.contains(r, i);
                    }, this),
                    itemFromTarget: function (n) {
                      var t = n.closest("tr");
                      return { item: t, content: t };
                    },
                    dragstart: r(function (n) {
                      this.wrapper.addClass("k-treelist-dragging");
                      var t = this.dataItem(n);
                      return this.trigger(tf, { source: t });
                    }, this),
                    drag: r(function (n) {
                      n.source = this.dataItem(n.source);
                      this.trigger(rf, n);
                    }, this),
                    drop: r(function (n) {
                      return (
                        (n.source = this.dataItem(n.source)),
                        (n.destination = this.dataItem(n.destination)),
                        this.wrapper.removeClass("k-treelist-dragging"),
                        this.trigger(uf, n)
                      );
                    }, this),
                    dragend: r(function (n) {
                      var f,
                        u = this.dataItem(n.destination),
                        r = this.dataItem(n.source),
                        s = r[i],
                        h = t._indexInChildrenMap(r);
                      e &&
                        (t._removeFromChildrenMap(r),
                        (r[i] = u ? u[o] : null),
                        t._initChildrenMapForParent(u),
                        (r[i] = s));
                      f = r.set("parentId", u ? u.id : null);
                      e &&
                        f &&
                        (t._removeFromChildrenMap(r),
                        (r[i] = s),
                        t._removeFromChildrenMap(r),
                        t._insertInChildrenMap(r, h));
                      n.source = r;
                      n.destination = u;
                      this.trigger(ff, n);
                    }, this),
                    reorderable: !1,
                    dropHintContainer: function (n) {
                      return n.children("td:eq(1)");
                    },
                    dropPositionFrom: function (n) {
                      return n.prevAll(".k-i-none").length > 0
                        ? "after"
                        : "before";
                    },
                  }
                ));
            },
            itemFor: function (n) {
              return (
                "number" == typeof n && (n = this.dataSource.get(n)),
                this.tbody.find("[" + kendo.attr("uid") + "=" + n.uid + "]")
              );
            },
            _itemFor: function (n) {
              var t = this,
                i = t.lockedContent ? t.lockedTable : t.table;
              return (
                "number" == typeof n && (n = this.dataSource.get(n)),
                i.find("[" + kendo.attr("uid") + "=" + n.uid + "]")
              );
            },
            _scrollable: function () {
              var f, i, t;
              this.options.scrollable &&
                ((f = this.thead.closest(".k-grid-header-wrap")),
                (i = n(this.lockedContent).bind(
                  "DOMMouseScroll" + u + " mousewheel" + u,
                  r(this._wheelScroll, this)
                )),
                this.content.bind("scroll" + u, function () {
                  f.scrollLeft(this.scrollLeft);
                  i.scrollTop(this.scrollTop);
                }),
                (t = kendo.touchScroller(this.content)),
                t &&
                  t.movable &&
                  ((this._touchScroller = t),
                  t.movable.bind("change", function (n) {
                    f.scrollLeft(-n.sender.x);
                    i && i.scrollTop(-n.sender.y);
                  })));
            },
            _wheelScroll: function (t) {
              var r, i;
              t.ctrlKey ||
                ((r = kendo.wheelDeltaY(t)),
                (i = n(t.currentTarget)),
                r &&
                  (i[0].scrollHeight > i[0].clientHeight &&
                    ((i[0].scrollTop < i[0].scrollHeight - i[0].clientHeight &&
                      r < 0) ||
                      (i[0].scrollTop > 0 && r > 0)) &&
                    t.preventDefault(),
                  i.one("wheel" + u, !1),
                  this.content.scrollTop(this.content.scrollTop() + -r)));
            },
            _progress: function () {
              var n = this.options.messages;
              this.tbody.find("tr").length ||
                this._showStatus(
                  kendo.template(
                    "<span class='#= className #' /> #: messages.loading #"
                  )({ className: i.icon + " " + i.loading, messages: n })
                );
            },
            _error: function (n) {
              this.dataSource.rootNodes().length || this._render({ error: n });
            },
            refresh: function (t) {
              var i, r, u;
              t = t || {};
              ("itemchange" == t.action && this.editor) ||
                this.trigger(au) ||
                ((i = n(this.current())),
                (r = !1),
                this._cancelEditor(),
                this._render(),
                this._adjustHeight(),
                this.options.navigatable &&
                  ((this._isActiveInTable() || this.editor) &&
                    ((r = i.is("th")), (u = Math.max(this.cellIndex(i), 0))),
                  this._restoreCurrent(u, r)),
                this.trigger(vu));
            },
            _angularFooters: function (n) {
              for (
                var i,
                  r,
                  f = this.dataSource.aggregates(),
                  u = this._footerItems(),
                  t = 0;
                t < u.length;
                t++
              )
                (i = u.eq(t)),
                  (r = f[i.attr("data-parentId")]),
                  this._angularFooter(n, i.find("td").get(), r);
            },
            _angularFooter: function (n, t, i) {
              var r = this.columns;
              this.angular(n, function () {
                return {
                  elements: t,
                  data: oi(r, function (n) {
                    return { column: n, aggregate: i && i[n.field] };
                  }),
                };
              });
            },
            items: function () {
              return this._hasLockedColumns
                ? this._items(this.tbody).add(this._items(this.lockedTable))
                : this._items(this.tbody);
            },
            _items: function (t) {
              return t.find("tr[data-uid]").filter(function () {
                return !n(this).hasClass(i.footerTemplate);
              });
            },
            _footerItems: function () {
              var t = this.tbody;
              return (
                this._hasLockedColumns && (t = t.add(this.lockedTable)),
                t.find("tr").filter(function () {
                  return n(this).hasClass(i.footerTemplate);
                })
              );
            },
            dataItems: function () {
              var t,
                i,
                n,
                r = kendo.ui.DataBoundWidget.fn.dataItems.call(this);
              if (this._hasLockedColumns) {
                for (t = r.length, i = Array(2 * t), n = t; --n >= 0; )
                  i[n] = i[n + t] = r[n];
                r = i;
              }
              return r;
            },
            _showNoRecordsTemplate: function () {
              var t,
                i =
                  this.options.scrollable && !this.wrapper[0].style.height
                    ? ' style="margin:0 auto;position:static;"'
                    : "";
              this._contentTree.render([]);
              this._hasLockedColumns && this._lockedContentTree.render([]);
              t = kendo.format(
                '<div class="k-grid-norecords-template"{1}>{0}</div>',
                this.options.messages.noRows,
                i
              );
              n(
                kendo.template(
                  kendo.format('<div class="{0}">{1}</div>', ef, t)
                )({})
              ).insertAfter(this.table);
            },
            _showStatus: function (t) {
              var i = this.element.find(".k-status"),
                r = n(this.content).add(this.lockedContent);
              i.length ||
                (i = n("<div class='k-status' />").appendTo(this.element));
              this._contentTree.render([]);
              this._hasLockedColumns && this._lockedContentTree.render([]);
              r.hide();
              i.html(t);
            },
            _hideStatus: function () {
              this.element.find(".k-status").remove();
              this._hideNoRecordsTempalte();
              n(this.content).add(this.lockedContent).show();
            },
            _hideNoRecordsTempalte: function () {
              this.element.find("." + ef).remove();
            },
            _adjustHeight: function () {
              var r,
                f,
                t = this,
                n = this.element,
                e = n.find(v + i.gridContentWrap),
                o = n.find(v + i.gridHeader),
                s = n.find(v + i.gridToolbar),
                h = n.find(v + i.status),
                c =
                  t._isPageable() && t.pager && t.pager.element.is(":visible")
                    ? bt(t.pager.element)
                    : 0,
                u = kendo.support.scrollbar();
              n.css(kf, this.options.height);
              f = function (n) {
                var t, i;
                return (
                  !!n[0].style.height ||
                  ((t = n.height()),
                  n.height("auto"),
                  (i = n.height()),
                  n.height(""),
                  t != i)
                );
              };
              f(n) &&
                ((r = n.height() - bt(o) - bt(s) - bt(h) - c),
                e.height(r),
                this._hasLockedColumns &&
                  ((u =
                    this.table[0].offsetWidth >
                    this.table.parent()[0].clientWidth
                      ? u
                      : 0),
                  this.lockedContent.height(r - u)));
            },
            _resize: function (n, t) {
              this._applyLockedContainersWidth();
              this._adjustHeight();
              this.pager && this.pager.element && this.pager.resize(t);
            },
            _minScreenSupport: function () {
              var t = this.hideMinScreenCols();
              t &&
                ((this.minScreenResizeHandler = r(
                  this.hideMinScreenCols,
                  this
                )),
                n(window).on("resize", this.minScreenResizeHandler));
            },
            _iterateMinScreenCols: function (n, i) {
              for (var r, f, e = !1, u = 0; u < n.length; u++)
                (r = n[u]),
                  (f = r.minScreenWidth),
                  f !== t &&
                    null !== f &&
                    ((e = !0), f > i ? this.hideColumn(r) : this.showColumn(r)),
                  !r.hidden &&
                    r.columns &&
                    (e = this._iterateMinScreenCols(r.columns, i) || e);
              return e;
            },
            hideMinScreenCols: function () {
              var n = this.columns,
                t = window.innerWidth > 0 ? window.innerWidth : screen.width;
              return this._iterateMinScreenCols(n, t);
            },
            destroy: function () {
              gi.fn.destroy.call(this);
              var t = this.dataSource;
              t.unbind(ht, this._refreshHandler);
              t.unbind(tr, this._errorHandler);
              t.unbind(ir, this._progressHandler);
              this._navigatableTables = null;
              this._current = null;
              this._resizeHandler &&
                n(window).off("resize" + u, this._resizeHandler);
              this._dragging &&
                (this._dragging.destroy(), (this._dragging = null));
              this.resizable &&
                (this.resizable.destroy(), (this.resizable = null));
              this.reorderable &&
                (this.reorderable.destroy(), (this.reorderable = null));
              this._draggableInstance &&
                this._draggableInstance.element &&
                (this._draggableInstance.destroy(),
                (this._draggableInstance = null));
              this.minScreenResizeHandler &&
                n(window).off("resize", this.minScreenResizeHandler);
              this._destroyEditor();
              this.element.off(u);
              this.wrapper.off(u);
              this._touchScroller && this._touchScroller.destroy();
              this._destroyPager();
              t && (t._dataMaps = null);
              this._autoExpandable = null;
              this._refreshHandler =
                this._errorHandler =
                this._progressHandler =
                this._dataSourceFetchProxy =
                  null;
              this.thead =
                this.content =
                this.tbody =
                this.table =
                this.element =
                this.lockedHeader =
                this.lockedContent =
                  null;
              this._statusTree =
                this._headerTree =
                this._contentTree =
                this._lockedHeaderColsTree =
                this._lockedContentColsTree =
                this._lockedHeaderTree =
                this._lockedContentTree =
                  null;
            },
            options: {
              name: "TreeList",
              columns: [],
              autoBind: !0,
              scrollable: !0,
              selectable: !1,
              sortable: !1,
              toolbar: null,
              height: null,
              columnMenu: !1,
              messages: {
                noRows: "No records to display",
                loading: "Loading...",
                requestFailed: "Request failed.",
                retry: "Retry",
                commands: {
                  edit: "Edit",
                  update: "Update",
                  canceledit: "Cancel",
                  create: "Add new record",
                  createchild: "Add child record",
                  destroy: "Delete",
                  excel: "Export to Excel",
                  pdf: "Export to PDF",
                },
              },
              excel: { hierarchy: !0 },
              resizable: !1,
              filterable: !1,
              editable: !1,
              reorderable: !1,
              pageable: !1,
            },
            events: [
              ht,
              rr,
              ni,
              su,
              yt,
              hu,
              lu,
              ur,
              fr,
              au,
              vu,
              pt,
              tf,
              rf,
              uf,
              ff,
              yu,
              ou,
              cu,
              pu,
              wu,
              bu,
              ku,
              or,
              du,
              "columnMenuOpen",
              gu,
              nf,
            ],
            _toggle: function (i, u) {
              function o() {
                f._toggleData();
                f._isPageable() ? f.refresh() : f._render();
                f._syncLockedContentHeight();
              }
              var f = this,
                e = n.Deferred().resolve().promise(),
                s = i.loaded();
              return (
                f._isIncellEditable() &&
                  f.editor &&
                  (n(kt()).change(), f.closeCell()),
                i._error && ((i.expanded = !1), (i._error = t)),
                !s && i.expanded
                  ? e
                  : (t === u && (u = !i.expanded),
                    (i.expanded = u),
                    s ||
                      (e = this.dataSource.load(i).always(
                        r(function () {
                          o();
                        }, this)
                      )),
                    o(),
                    e)
              );
            },
            _toggleData: function () {
              var n = this;
              n._isPageable() && n._togglePageableData();
            },
            _togglePageableData: function () {
              var t,
                u,
                i = this,
                n = i.dataSource,
                f = n._getData(),
                r = n._defaultPageableQueryOptions();
              i._renderProgress(!0);
              u = n._getChildrenMap() || n.childrenMap(n._getData());
              n._processDataItemsState(f, u);
              t = n._processPageableQuery(f, r);
              r.childrenMap = t.childrenMap;
              r.filteredChildrenMap = t.filteredChildrenMap;
              n._aggregateResult = n._calculateAggregates(t.dataToAggregate, r);
              n.view(t.data);
              n._calculateCollapsedTotal();
              i._refreshPager();
              i._renderProgress(!1);
            },
            _refreshPager: function () {
              var n = this.pager;
              n && n.refresh();
            },
            expand: function (n) {
              return this._toggle(this.dataItem(n), !0);
            },
            collapse: function (n) {
              return this._toggle(this.dataItem(n), !1);
            },
            _toggleChildren: function (t) {
              var r,
                u = n(t.currentTarget),
                i = this.dataItem(u);
              i &&
                ((r = i.expanded ? fr : ur),
                this.trigger(r, { model: i }) || this._toggle(i),
                t.preventDefault());
            },
            _navigatable: function () {
              var i,
                f,
                t = this;
              t.options.navigatable &&
                ((i = t.table.add(t.lockedTable)),
                (f = t.thead.parent().add(n(">table", t.lockedHeader))),
                t.options.scrollable && ((i = i.add(f)), f.attr(er, -1)),
                (this._navigatableTables = i),
                i
                  .on(
                    kendo.support.touch ? "touchstart" + u : "mousedown" + u,
                    si + ">:visible",
                    r(t._tableClick, t)
                  )
                  .on("focus" + u, r(t._tableFocus, t))
                  .on("focusout" + u, r(t._tableBlur, t))
                  .on("keydown" + u, r(t._tableKeyDown, t)));
            },
            cellIndex: function (t) {
              var i = 0;
              return (
                this.lockedTable &&
                  !n.contains(this.lockedTable[0], t[0]) &&
                  (i = o(l(this.columns)).length),
                n(t).parent().children().index(t) + i
              );
            },
            _isActiveInTable: function () {
              var t = kendo._activeElement();
              return (
                !!t &&
                (this.table[0] === t ||
                  n.contains(this.table[0], t) ||
                  (this.lockedTable &&
                    (this.lockedTable[0] === t ||
                      n.contains(this.lockedTable[0], t))))
              );
            },
            _restoreCurrent: function (i, r) {
              var f, u, e;
              i === t ||
                i < 0 ||
                (this._current && this._current.removeClass("k-state-focused"),
                r
                  ? this.current(this.thead.find("th").eq(i))
                  : ((f = 0),
                    (i = 0),
                    (u = n()),
                    this.lockedTable &&
                      (u = this.lockedTable.find(">tbody>tr:visible").eq(f)),
                    (u = u.add(this.tbody.children().eq(f))),
                    (e = u.find(">td:visible").eq(i)),
                    this.current(e)),
                this._current && w(this._current.closest("table")[0], !0));
            },
            current: function (t) {
              var i = this._current;
              return (
                (t = n(t)),
                !t.length ||
                  (i && i[0] === t[0]) ||
                  (this._updateCurrentAttr(i, t), this._scrollCurrent()),
                t &&
                  t.length &&
                  (this._lastCellIndex = t.parent().children(tt).index(t)),
                this._current
              );
            },
            _setCurrent: function (t) {
              var i = this;
              return (
                (t = n(t)),
                t[0] &&
                  ((i._current = t),
                  i._updateCurrentAttr(i._current, t),
                  i._scrollCurrent()),
                i._current
              );
            },
            _scrollCurrent: function () {
              var i,
                r,
                f,
                e,
                t,
                u = this._current,
                o = this.options.scrollable;
              u &&
                o &&
                ((i = u.parent()),
                (r = i.closest("table").parent()),
                (f = r.is(".k-grid-content-locked,.k-grid-header-locked")),
                (e = r.is(".k-grid-content-locked,.k-grid-content")),
                (t = n(this.content)[0]),
                e && this._scrollTo(this._relatedRow(i)[0], t),
                this.lockedContent &&
                  (this.lockedContent[0].scrollTop = t.scrollTop),
                f || this._scrollTo(u[0], t));
            },
            _findCurrentCell: function () {
              var t = this,
                r = t.current(),
                u = n(t.table)
                  .add(t.header)
                  .add(t.lockedTable)
                  .add(t.lockedHeader);
              return r && u.find(r).length > 0 ? r : u.find(v + i.focused);
            },
            _scrollTo: function (t, i) {
              var o,
                l = t.tagName.toLowerCase(),
                r = "td" === l || "th" === l,
                f = t[r ? "offsetLeft" : "offsetTop"],
                a = t[r ? "offsetWidth" : "offsetHeight"],
                u = i[r ? "scrollLeft" : "scrollTop"],
                s = i[r ? "clientWidth" : "clientHeight"],
                v = f + a,
                e = 0,
                h = 0,
                c = 0;
              wt &&
                r &&
                ((o = n(t).closest("table")[0]),
                vt.msie
                  ? (h = o.offsetLeft)
                  : vt.mozilla &&
                    (c = o.offsetLeft - kendo.support.scrollbar()));
              u = Math.abs(u + h - c);
              e = u > f ? f : v > u + s ? (a <= s ? v - s : f) : u;
              e = Math.abs(e + h) + c;
              i[r ? "scrollLeft" : "scrollTop"] = e;
            },
            _aria: function () {
              var n = this.element.attr("id") || "aria";
              n && (this._elementId = n + "_active_element");
            },
            _currentDataIndex: function (n, i) {
              var r,
                u = i.attr("data-index");
              return u
                ? ((r = l(this.columns).length),
                  r && !n.closest("div").hasClass("k-grid-content-locked")[0]
                    ? u - r
                    : u)
                : t;
            },
            _prevVerticalCell: function (t, i) {
              var u,
                r = i.parent(),
                o = t.children(si),
                e = o.index(r),
                f = this._currentDataIndex(t, i);
              if (f || i.hasClass("k-header"))
                return (u = pr(i)), u.eq(u.length - 2);
              if (
                ((f = Math.max(
                  r.children(tt).index(i),
                  this._lastCellIndex || 0
                )),
                r.hasClass("k-filter-row"))
              )
                return y(t).filter(li).eq(f);
              if (e == -1) {
                if (((r = t.find("tr.k-filter-row:visible")), !r[0]))
                  return y(t).filter(li).eq(f);
              } else r = 0 === e ? n() : o.eq(e - 1);
              return (u = r.children(tt)), u.eq(u.length > f ? f : 0);
            },
            _nextVerticalCell: function (n, i) {
              var e,
                o,
                s,
                h,
                f,
                l,
                u = i.parent(),
                a = n.children(si),
                c = a.index(u),
                r = this._currentDataIndex(n, i);
              if (c != -1 && r === t && i.hasClass("k-header"))
                return wr(i).eq(1);
              if (
                ((r = r ? parseInt(r, 10) : u.children(tt).index(i)),
                (r = Math.max(r, this._lastCellIndex || 0)),
                (u = a.eq(c == -1 ? 0 : c + i[0].rowSpan)),
                (o = r),
                this._currentDataIndex(n, i) !== t)
              )
                for (
                  s = u.children(":not(.k-group-cell):not(.k-hierarchy-cell)"),
                    h = s.filter(":hidden"),
                    f = 0,
                    l = h.length;
                  f < l;
                  f++
                )
                  s.index(h[f]) < r && o--;
              return (r = o), (e = u.children(tt)), e.eq(e.length > r ? r : 0);
            },
            _verticalContainer: function (n, t) {
              var r = n.parent(),
                u = this._navigatableTables.length,
                f = Math.floor(u / 2),
                i = nt(r[0], this._navigatableTables);
              return (
                t && (f *= -1),
                (i += f),
                (i >= 0 || i < u) && (r = this._navigatableTables.eq(i)),
                r.find(t ? "thead" : "tbody")
              );
            },
            _updateCurrentAttr: function (t, r) {
              var u = n(t).data("headerId");
              n(t)
                .removeClass(i.focused)
                .closest("table")
                .removeAttr("aria-activedescendant");
              u
                ? ((u = u.replace(this._elementId, "")), n(t).attr("id", u))
                : n(t).removeAttr("id");
              r.data("headerId", r.attr("id"))
                .attr("id", this._elementId)
                .addClass(i.focused)
                .closest("table")
                .attr("aria-activedescendant", this._elementId);
              this._current = r;
            },
            _tableKeyDown: function (t) {
              var r = !1,
                i = this.current(),
                f = n(t.target),
                u =
                  !t.isDefaultPrevented() &&
                  !f.is(":button,a,:input,a>.k-icon");
              i = i ? i : n(this.lockedTable).add(this.table).find(ci);
              u && t.keyCode == s.UP && (r = this._moveUp(i, t.shiftKey));
              u && t.keyCode == s.DOWN && (r = this._moveDown(i, t.shiftKey));
              u &&
                t.keyCode == (wt ? s.LEFT : s.RIGHT) &&
                (r = t.altKey ? this._handleExpand(i) : this._moveRight(i));
              u &&
                t.keyCode == (wt ? s.RIGHT : s.LEFT) &&
                (r = t.altKey ? this._handleCollapse(i) : this._moveLeft(i));
              u && t.keyCode == s.PAGEDOWN && (r = this._handlePageDown());
              u && t.keyCode == s.PAGEUP && (r = this._handlePageUp());
              (t.keyCode != s.ENTER && t.keyCode != s.F2) ||
                (r = this._handleEnterKey(i, t.currentTarget, f));
              t.keyCode == s.ESC &&
                (r = this._handleEscKey(i, t.currentTarget));
              u && t.keyCode == s.HOME && (r = this._handleHome(i, t.ctrlKey));
              u && t.keyCode == s.END && (r = this._handleEnd(i, t.ctrlKey));
              t.keyCode == s.TAB &&
                (r = this._handleTabKey(i, t.currentTarget, t.shiftKey));
              r && (t.preventDefault(), t.stopPropagation());
            },
            _handleExpand: function (n) {
              var i = this,
                r = n.parent(),
                t = i.dataItem(r);
              return (
                !n.hasClass("k-header") &&
                !(
                  !t ||
                  !t.hasChildren ||
                  t.expanded ||
                  i.trigger(ur, { model: t })
                ) &&
                (this.expand(r), !0)
              );
            },
            _handleCollapse: function (n) {
              var i = this,
                r = n.parent(),
                t = i.dataItem(r);
              return (
                !n.hasClass("k-header") &&
                !(
                  !(t && t.hasChildren && t.expanded) ||
                  i.trigger(fr, { model: t })
                ) &&
                (i.collapse(r), !0)
              );
            },
            _handleHome: function (n, t) {
              var i,
                r = n.parent(),
                u = r.parent(),
                e =
                  this.lockedTable &&
                  this.lockedTable.children("tbody")[0] === u[0],
                f = u[0] === this.tbody[0];
              if (
                (t
                  ? (i = this.lockedTable
                      ? this.lockedTable.find(ci)
                      : this.table.find(ci))
                  : (f || e) &&
                    (f && this.lockedTable && (r = this._relatedRow(r)),
                    (i = r.children(d + ":first"))),
                i && i.length)
              )
                return this.current(i), !0;
            },
            _handleEnd: function (n, t) {
              var i,
                r = n.parent(),
                u = r.parent(),
                e =
                  this.lockedTable &&
                  this.lockedTable.children("tbody")[0] === u[0],
                f = u[0] === this.tbody[0];
              if (
                (t
                  ? (i = this.table.find(bf + ">" + d + ":last"))
                  : (f || e) &&
                    (!f && this.lockedTable && (r = this._relatedRow(r)),
                    (i = r.children(d + ":last"))),
                i && i.length)
              )
                return this.current(i), !0;
            },
            _handlePageDown: function () {
              var n = this;
              return (
                !!n._isPageable() &&
                (n.dataSource._restorePageSizeAfterAddChild(),
                n.dataSource.page(n.dataSource.page() + 1),
                !0)
              );
            },
            _handlePageUp: function () {
              var n = this;
              return (
                !!n._isPageable() &&
                (n.dataSource._restorePageSizeAfterAddChild(),
                n.dataSource.page(n.dataSource.page() - 1),
                !0)
              );
            },
            _handleEscKey: function (t, i) {
              var r,
                u,
                o,
                s,
                h,
                f = kendo._activeElement(),
                e = this;
              return t && t.parent().hasClass("k-grid-edit-row")
                ? (e._isIncellEditable()
                    ? ((u = t.parent()),
                      (s = t.index()),
                      (o = u.index()),
                      (h = u.closest("tbody")),
                      e.closeCell(!0),
                      e._setCurrent(h.children().eq(o).children().eq(s)))
                    : ((r = n(t).parent().index()),
                      f && f.blur(),
                      this.cancelRow(),
                      r >= 0 &&
                        this.current(this.items().eq(r).children(d).first())),
                  vt.msie && vt.version < 9 && document.body.focus(),
                  w(i, !0),
                  !0)
                : !!t.has(f).length && (w(i, !0), !0);
            },
            _handleEnterKey: function (t, i, r) {
              var f,
                e = this.options.editable,
                u = r.closest("[role=gridcell]");
              return (
                r.is("table") || n.contains(t[0], r[0]) || (t = u),
                t.is("th")
                  ? (t.find(".k-link").click(), !0)
                  : ((f = t.find(":kendoFocusable:first")),
                    f[0] && t.hasClass("k-state-focused")
                      ? (f.focus(), !0)
                      : !(!e || r.is(":button,.k-button,textarea")) &&
                        (u[0] || (u = t), this._handleEditing(u, !1, i), !0))
              );
            },
            _handleTabKey: function (t, r, u) {
              var f,
                e = this,
                o = e.options.editable && e._isIncellEditable();
              return (
                !(!o || t.is("th")) &&
                ((f = n(kt()).closest(v + i.editCell)),
                f[0] && f[0] !== t[0] && (t = f),
                (f = e._tabNext(t, r, u)),
                f.length
                  ? (e._handleEditing(t, f, f.closest(te)), !0)
                  : ((e._preventPageSizeRestore = !1), !1))
              );
            },
            _tabNext: function (n, t, i) {
              var u = this,
                f = !0,
                r = i ? n.prevAll(tt + ":first") : n.nextAll(":visible:first");
              return (
                r.length ||
                  ((r = n.parent()),
                  u.lockedTable &&
                    ((f =
                      (i && t == u.lockedTable[0]) || (!i && t == u.table[0])),
                    (r = u._relatedRow(r))),
                  f &&
                    (r = r[i ? "prevAll" : "nextAll"](
                      "tr:not(.k-grouping-row):not(.k-detail-row):visible:first"
                    )),
                  (r = r.children(tt + (i ? ":last" : ":first"))),
                  u.dataSource._restorePageSizeAfterAddChild()),
                r
              );
            },
            _handleEditing: function (r, u, f) {
              var o,
                c,
                l,
                a,
                y,
                e = this,
                s = n(kendo._activeElement()),
                p = vt.msie,
                b = e.options.editable && e.options.editable.update !== !1,
                h = e._isIncellEditable(),
                k = n(u).parents("tr").index(),
                g = n(u).index(),
                nt = n(r).parents("tr").index(),
                tt = r.index();
              if (
                ((f = n(f)),
                (l = h
                  ? r.hasClass(i.editCell)
                  : r.parent().hasClass("k-grid-edit-row")),
                e.editor)
              ) {
                if (
                  ((o = e.editor.wrapper),
                  o &&
                    n.contains(o[0], s[0]) &&
                    (vt.opera
                      ? s.blur().change().triggerHandler("blur")
                      : (s.blur(), p && s.blur())),
                  !e.editor)
                )
                  return w(f), t;
                if (!e.editor.end())
                  return (
                    e.current(h ? o : o.children().filter(d).first()),
                    (c = o.find(":kendoFocusable:first")[0]),
                    c && c.focus(),
                    t
                  );
                h
                  ? ((e._preventPageSizeRestore = !0),
                    e.closeCell(),
                    (e._preventPageSizeRestore = !1),
                    0 ===
                      n(e.table)
                        .add(e.lockedTable)
                        .find(v + i.editCell).length &&
                      e.current(
                        f.find("tbody").children().eq(nt).children().eq(tt)
                      ))
                  : (e.saveRow(), (l = !0));
              }
              u =
                n(u).length && 0 === f.find(u).length
                  ? f.find("tbody").children().eq(k).children().eq(g)
                  : u;
              u && e.current(u);
              w(f, !0);
              b &&
                ((!l && !u) || u
                  ? ((y = e.current().index()),
                    h
                      ? (e.editCell(e.current()),
                        (a = n(e.table)
                          .add(e.lockedTable)
                          .find(v + i.editCell)[0]),
                        a
                          ? (e._current = n(a))
                          : e.current(e._findCurrentCell()))
                      : (e.editRow(e.current().parent()),
                        e.current(e.editor.wrapper.children().eq(y)),
                        e.current().removeClass("k-state-focused")))
                  : e.dataSource._restorePageSizeAfterAddChild());
            },
            _moveRight: function (n) {
              var t = n.nextAll(d).first(),
                i = n.parent();
              return (
                n.hasClass("k-header") &&
                  ((t = n.nextAll(hi).first()),
                  !t[0] &&
                    this.lockedTable &&
                    n.closest("table")[0] ===
                      this.lockedHeader.find("table")[0] &&
                    (t = this.thead.find(hi + ":first"))),
                !t[0] &&
                  this.lockedTable &&
                  n.closest("table")[0] === this.lockedTable[0] &&
                  (t = this._relatedRow(i).children(d).first()),
                t[0] && t[0] !== n[0] && w(t.closest("table"), !0),
                this.current(t),
                !0
              );
            },
            _moveLeft: function (n) {
              var t = n.prevAll(d).first(),
                i = n.parent();
              return (
                n.hasClass("k-header") &&
                  ((t = n.prevAll(hi).first()),
                  !t[0] &&
                    this.lockedTable &&
                    n.closest("table")[0] === this.thead.parent()[0] &&
                    (t = this.lockedHeader.find(
                      ">table>thead>tr>" + hi + ":last"
                    ))),
                !t[0] &&
                  this.lockedTable &&
                  n.closest("table")[0] === this.table[0] &&
                  (t = this._relatedRow(i).children(d).last()),
                t[0] && t[0] !== n[0] && w(t.closest("table"), !0),
                this.current(t),
                !0
              );
            },
            _moveUp: function (n, t) {
              var i,
                u,
                r = n.parent().parent();
              return (
                t
                  ? ((i = n.parent()),
                    (i = i.prevAll(ti + ":first")),
                    (i = n.parent().is(ti)
                      ? i.children().eq(n.index())
                      : i.children(tt + ":last")))
                  : ((i = this._prevVerticalCell(r, n)),
                    i[0] ||
                      ((this._lastCellIndex = 0),
                      (r = this._verticalContainer(r, !0)),
                      (i = this._prevVerticalCell(r, n)),
                      i[0] && w(r.parent(), !0))),
                (u = this._lastCellIndex || 0),
                this.current(i),
                (this._lastCellIndex = u),
                !0
              );
            },
            _moveDown: function (n, t) {
              var i,
                u,
                r = n.parent().parent();
              return (
                t
                  ? ((i = n.parent()),
                    (i = i.nextAll(ti + ":first")),
                    (i = n.parent().is(ti)
                      ? i.children().eq(n.index())
                      : i.children(tt + ":first")))
                  : ((i = this._nextVerticalCell(r, n)),
                    i[0] ||
                      ((this._lastCellIndex = 0),
                      (r = this._verticalContainer(r)),
                      (i = this._nextVerticalCell(r, n)),
                      i[0] && w(r.parent(), !0))),
                (u = this._lastCellIndex || 0),
                this.current(i),
                (this._lastCellIndex = u),
                !0
              );
            },
            _tableClick: function (t) {
              var r = n(t.currentTarget),
                u = r.is("th"),
                f = this.table.add(this.lockedTable),
                e = this.thead.parent().add(n(">table", this.lockedHeader)),
                o = lr(t.target),
                i = r.closest("table")[0];
              kendo.support.touch ||
                (i !== f[0] && i !== f[1] && i !== e[0] && i !== e[1]) ||
                (this.options.navigatable && this.current(r),
                (!u && o) ||
                  setTimeout(function () {
                    (lr(kendo._activeElement()) &&
                      n.contains(i, kendo._activeElement())) ||
                      w(i, !0);
                  }),
                u && t.preventDefault());
            },
            _setTabIndex: function (n) {
              this._navigatableTables.attr(er, -1);
              n.attr(er, 0);
            },
            _tableFocus: function (t) {
              var r = this.current(),
                u = n(t.currentTarget);
              r && r.is(":visible")
                ? r.addClass(i.focused)
                : this.current(u.find(ci));
              this._setTabIndex(u);
            },
            _tableBlur: function () {
              var n = this.current();
              n && n.removeClass(i.focused);
            },
            _attachEvents: function () {
              var n =
                  v + i.iconCollapse + ", ." + i.iconExpand + ", ." + i.refresh,
                t = v + i.retry;
              this.element
                .on(yf + u, n, r(this._toggleChildren, this))
                .on(gt + u, t, this._dataSourceFetchProxy)
                .on(
                  gt + u,
                  ".k-button[data-command]",
                  r(this._commandClick, this)
                );
              this._attachCellEditingEventHandlers();
            },
            _attachCellEditingEventHandlers: function () {
              var r = this,
                f = r.options.editable,
                e = r.selectable && r.selectable.options.multiple,
                o = function (t) {
                  var i = kt(),
                    f = r.editor || {},
                    u = f.element;
                  !u ||
                    n.contains(u[0], i) ||
                    u[0] === i ||
                    n(i).closest(".k-animation-container").length ||
                    (f.end() &&
                      (t.relatedTarget ||
                        !r._isPageable() ||
                        c(r.dataSource._addChildPageSize) ||
                        (r._preventPageSizeRestore = !1),
                      r.closeCell()));
                  r._preventPageSizeRestore = !1;
                };
              r._isIncellEditable() &&
                f.update !== !1 &&
                r.wrapper
                  .on(gt + u, "tr:not(.k-grouping-row) > td", function (u) {
                    var f = n(this),
                      o =
                        r.lockedTable &&
                        f.closest("table")[0] === r.lockedTable[0];
                    return f.hasClass(i.editCell) ||
                      f.has("a.k-grid-delete").length ||
                      f.has("button.k-grid-delete").length ||
                      (f.closest("tbody")[0] !== r.tbody[0] && !o) ||
                      n(u.target).is(":input") ||
                      n(u.target).hasClass(i.iconExpand) ||
                      n(u.target).hasClass(i.iconCollapse)
                      ? (r.editor ||
                          r.dataSource._restorePageSizeAfterAddChild(),
                        (r._preventPageSizeRestore = !1),
                        t)
                      : (r.editor
                          ? r.editor.end() &&
                            (e && n(kt()).blur(), r.closeCell(), r.editCell(f))
                          : r.editCell(f),
                        t);
                  })
                  .on(
                    "mousedown" + u,
                    "tr:not(.k-grouping-row) > td",
                    function (t) {
                      r._preventPageSizeRestore =
                        !(
                          !r.editor ||
                          !r._isPageable() ||
                          c(r.dataSource._addChildPageSize)
                        ) && n(t.target).parents(v + i.editRow).length > 0;
                    }
                  )
                  .on("focusin" + u, function () {
                    n.contains(this, kt()) ||
                      (clearTimeout(r._closeCellTimeout),
                      (r._closeCellTimeout = null));
                  })
                  .on("focusout" + u, function (n) {
                    r._closeCellTimeout = setTimeout(function () {
                      o(n);
                    }, 1);
                  });
            },
            _commandByName: function (t) {
              var i,
                u,
                f,
                r,
                o = this.columns,
                e = n.isArray(this.options.toolbar) ? this.options.toolbar : [];
              if (((t = t.toLowerCase()), sr[t])) return sr[t];
              for (i = 0; i < o.length; i++)
                if ((f = o[i].command))
                  for (u = 0; u < f.length; u++)
                    if (((r = f[u].name), r && r.toLowerCase() == t))
                      return f[u];
              for (i = 0; i < e.length; i++)
                if (((r = e[i].name), r && r.toLowerCase() == t)) return e[i];
            },
            _commandClick: function (i) {
              var f = n(i.currentTarget),
                e = f.attr("data-command"),
                r = this._commandByName(e),
                u = f.parentsUntil(this.wrapper, "tr");
              u = u.length ? u : t;
              r &&
                (r.methodName
                  ? this[r.methodName](u)
                  : r.click && r.click.call(this, i),
                i.preventDefault());
            },
            _ensureExpandableColumn: function () {
              var n, t;
              this._autoExpandable && delete this._autoExpandable.expandable;
              n = e(this.columns, ii(it("hidden")));
              n = e(n, ii(it("command")));
              t = e(n, it("expandable"));
              this.columns.length &&
                !t.length &&
                ((this._autoExpandable = n[0]), (n[0].expandable = !0));
            },
            _columns: function () {
              var n,
                t = this.options.columns || [];
              this.columns = oi(t, function (n) {
                return (
                  (n = "string" == typeof n ? { field: n } : n),
                  f({ encoded: !0 }, n)
                );
              });
              n = l(t);
              n.length > 0 &&
                ((this._hasLockedColumns = !0),
                (this.columns = n.concat(g(this.columns))));
              this.columns = yr(this.columns);
              this._ensureExpandableColumn();
              this._columnTemplates();
              this._columnAttributes();
            },
            _columnTemplates: function () {
              for (var n, r = o(this.columns), t = 0, i = r.length; t < i; t++)
                (n = r[t]),
                  n.template && (n.template = kendo.template(n.template)),
                  n.headerTemplate &&
                    (n.headerTemplate = kendo.template(n.headerTemplate)),
                  n.footerTemplate &&
                    (n.footerTemplate = kendo.template(n.footerTemplate));
            },
            _columnAttributes: function () {
              function r(t) {
                var r, i, u, f;
                if (t && t.style)
                  for (
                    r = t.style.split(";"), t.style = {}, i = 0;
                    i < r.length;
                    i++
                  )
                    (u = r[i].split(":")),
                      (f = n.trim(u[0])),
                      f && (t.style[n.camelCase(f)] = n.trim(u[1]));
              }
              for (var i = this.columns, t = 0, u = i.length; t < u; t++)
                r(i[t].attributes), r(i[t].headerAttributes);
            },
            _layout: function () {
              var u,
                f,
                r,
                e = this.columns,
                n = this.element,
                t = "";
              this.wrapper = n.addClass(i.wrapper);
              t = "<div class='#= gridHeader #'>";
              this._hasLockedColumns &&
                (t +=
                  "<div class='k-grid-header-locked'><table role='grid'><colgroup></colgroup><thead role='rowgroup' /></table></div>");
              t +=
                "<div class='#= gridHeaderWrap #'><table role='grid'><colgroup></colgroup><thead role='rowgroup' /></table></div></div>";
              this._hasLockedColumns &&
                (t +=
                  "<div class='k-grid-content-locked'><table role='treegrid' tabindex='0'><colgroup></colgroup><tbody /></table></div>");
              t +=
                "<div class='#= gridContentWrap # k-auto-scrollable'><table role='treegrid' tabindex='0'><colgroup></colgroup><tbody /></table></div>";
              this.options.scrollable ||
                (t =
                  "<table role='treegrid' tabindex='0'><colgroup></colgroup><thead class='#= gridHeader #' role='rowgroup' /><tbody /></table>");
              this.options.toolbar &&
                (t = "<div class='#= header # #= gridToolbar #' />" + t);
              n.append(kendo.template(t)(i) + "<div class='k-status' />");
              this.toolbar = n.find(v + i.gridToolbar);
              u = n
                .find(v + i.gridHeader)
                .find("thead")
                .addBack()
                .filter("thead");
              this.thead = u.last();
              this.options.scrollable &&
                ((f = kendo.support.isRtl(n)),
                n
                  .find("div." + i.gridHeader)
                  .css(
                    f ? "padding-left" : "padding-right",
                    kendo.support.scrollbar()
                  ));
              r = n.find(v + i.gridContentWrap);
              r.length ? (this.content = r) : (r = n);
              this.table = r.find(">table");
              this.tbody = this.table.find(">tbody");
              this._hasLockedColumns &&
                ((this.lockedHeader = u
                  .first()
                  .closest(".k-grid-header-locked")),
                (this.lockedContent = n.find(".k-grid-content-locked")),
                (this.lockedTable = this.lockedContent.children()));
              this._initVirtualTrees();
              this._renderCols();
              this._renderHeader();
              this.angular("compile", function () {
                return {
                  elements: u.find("th.k-header").get(),
                  data: oi(e, function (n) {
                    return { column: n };
                  }),
                };
              });
            },
            _initVirtualTrees: function () {
              this._headerColsTree = new p.Tree(this.thead.prev()[0]);
              this._contentColsTree = new p.Tree(this.tbody.prev()[0]);
              this._headerTree = new p.Tree(this.thead[0]);
              this._contentTree = new p.Tree(this.tbody[0]);
              this._statusTree = new p.Tree(
                this.element.children(".k-status")[0]
              );
              this.lockedHeader &&
                ((this._lockedHeaderColsTree = new p.Tree(
                  this.lockedHeader.find("colgroup")[0]
                )),
                (this._lockedContentColsTree = new p.Tree(
                  this.lockedTable.find(">colgroup")[0]
                )),
                (this._lockedHeaderTree = new p.Tree(
                  this.lockedHeader.find("thead")[0]
                )),
                (this._lockedContentTree = new p.Tree(
                  this.lockedTable.find(">tbody")[0]
                )));
            },
            _toolbar: function () {
              var r,
                t = this.options.toolbar,
                i = this.toolbar;
              t &&
                (n.isArray(t)
                  ? ((r = this._buildCommands(t)), new p.Tree(i[0]).render(r))
                  : i.append(kendo.template(t)({})),
                this.angular("compile", function () {
                  return { elements: i.get() };
                }));
            },
            _lockedColumns: function () {
              return e(this.columns, it("locked"));
            },
            _nonLockedColumns: function () {
              return e(this.columns, ii(it("locked")));
            },
            _templateColumns: function () {
              return e(this.columns, it("template"));
            },
            _flushCache: function () {
              this.options.$angular &&
                this._templateColumns().length &&
                (this._contentTree.render([]),
                this._hasLockedColumns && this._lockedContentTree.render([]));
            },
            _render: function (t) {
              var p,
                h,
                c,
                u,
                a,
                e,
                w,
                f,
                b,
                v,
                s,
                y,
                r = this;
              t = t || {};
              t = r._renderOptions(t);
              p = this.options.messages;
              h = r._isPageable();
              c = r.dataSource;
              u = {
                children: t.filteredChildrenMap || t.childrenMap,
                ids: t.idsMap,
              };
              a = h
                ? u && u.children && u.ids
                  ? u
                  : c._initDataMaps(c._getData())
                : {};
              e = a.children;
              w = a.ids;
              t.childrenMap = e;
              t.idsMap = w;
              f = r._dataToRender(t);
              b = r._renderedModelLevel(f[0], t);
              v = kendo.attr("uid");
              s = this.select()
                .removeClass("k-state-selected")
                .map(function (t, i) {
                  return n(i).attr(v);
                });
              this._absoluteIndex = 0;
              this._angularItems("cleanup");
              this._angularFooters("cleanup");
              this._flushCache();
              r._clearRenderMap();
              t.error
                ? this._showStatus(
                    kendo.template(
                      "#: messages.requestFailed # <button class='#= buttonClass #'>#: messages.retry #</button>"
                    )({
                      buttonClass: [i.button, i.retry].join(" "),
                      messages: p,
                    })
                  )
                : f.length
                ? (h && (y = r._viewChildrenMap(t)),
                  this._hideStatus(),
                  this._contentTree.render(
                    this._trs({
                      columns: o(g(this.columns)),
                      editedColumn: t.editedColumn,
                      editedColumnIndex: t.editedColumnIndex,
                      aggregates: t.aggregates,
                      selected: s,
                      data: f,
                      childrenMap: e,
                      viewChildrenMap: y,
                      visible: !0,
                      level: 0,
                    })
                  ),
                  this._hasLockedColumns &&
                    ((this._absoluteIndex = 0),
                    this._lockedContentTree.render(
                      this._trs({
                        columns: o(l(this.columns)),
                        editedColumn: t.editedColumn,
                        editedColumnIndex: t.editedColumnIndex,
                        aggregates: t.aggregates,
                        selected: s,
                        data: f,
                        childrenMap: e,
                        viewChildrenMap: y,
                        visible: !0,
                        level: b,
                      })
                    )))
                : (this._hideStatus(), this._showNoRecordsTemplate());
              this._touchScroller && this._touchScroller.contentResized();
              this._muteAngularRebind(function () {
                this._angularItems("compile");
                this._angularFooters("compile");
              });
              this.items()
                .filter(function () {
                  return n.inArray(n(this).attr(v), s) >= 0;
                })
                .addClass("k-state-selected");
              this._syncLockedContentHeight();
              r._togglePagerVisibility();
              r._setExpanderElement();
            },
            _setExpanderElement: function () {
              var i,
                t = this,
                r = "k-grid-content-expander",
                u = '<div class="' + r + '"></div>';
              t.options.scrollable &&
                t.wrapper.is(":visible") &&
                ((i = t.table.parent().children("." + r)),
                t.dataSource && t.dataSource.view().length
                  ? i[0] && i.remove()
                  : (i[0] || (i = n(u).appendTo(t.table.parent())),
                    t.thead && i.width(t.thead.width())));
            },
            _renderProgress: function (n) {
              kendo.ui.progress(this.wrapper, n);
            },
            _renderOptions: function (n) {
              var t, i, r;
              return (
                (n = n || {}),
                (t = this),
                (i = t.dataSource._getDataMaps()),
                (r = t.dataSource.filter()),
                t._isPageable() &&
                  ((n.childrenMap = i.children),
                  (n.idsMap = i.ids),
                  r && (n.filteredChildrenMap = i.filteredChildren)),
                n
              );
            },
            _renderedModelLevel: function (n, t) {
              return this._isPageable()
                ? this.dataSource._pageableModelLevel(n, t)
                : 0;
            },
            _viewChildrenMap: function (n) {
              var i, r, t, o, v, s, h, y, p, u, c, l, f, a, e;
              for (
                n = n || {},
                  i = this,
                  r = i.dataSource,
                  t = r.childrenMap(r.view()),
                  o = r._modelIdField(),
                  v = r._parentNodesNotInView(),
                  i._clearRenderMap(),
                  a = 0;
                a < v.length;
                a++
              )
                for (
                  s = v[a],
                    h = s[o],
                    i._markNodeAsNonRenderable(h),
                    t[h] = t[h] || [],
                    y = r._parentNodes(s),
                    f = y.slice(),
                    f.push(s),
                    e = 0;
                  e < f.length - 1;
                  e++
                )
                  (p = f[e]),
                    (u = p[o]),
                    i._markNodeAsNonRenderable(u),
                    (t[u] = t[u] || []),
                    (c = f[e + 1]),
                    (l = c[o]),
                    i._markNodeAsNonRenderable(l),
                    (t[l] = t[l] || []),
                    t[u].indexOf(c) === -1 && t[u].unshift(c);
              return t;
            },
            _clearRenderMap: function () {
              this._skipRenderingMap = {};
            },
            _dataToRender: function (n) {
              var t = this;
              return t._isPageable()
                ? t.dataSource._pageableRootNodes(n)
                : t.dataSource.rootNodes();
            },
            _markNodeAsNonRenderable: function (n) {
              this._skipRenderingMap[n] = !0;
            },
            _adjustRowsHeight: function (n, t) {
              var r, f, i, u, e, l, o, s, h, c;
              if (this._hasLockedColumns) {
                for (
                  r = n[0].rows,
                    f = r.length,
                    u = t[0].rows,
                    e = n.add(t),
                    l = e.length,
                    o = [],
                    i = 0;
                  i < f && u[i];
                  i++
                )
                  r[i].style.height &&
                    (r[i].style.height = u[i].style.height = "");
                for (i = 0; i < f && u[i]; i++)
                  (s = r[i].offsetHeight),
                    (h = u[i].offsetHeight),
                    (c = 0),
                    s > h ? (c = s) : s < h && (c = h),
                    o.push(c);
                for (i = 0; i < l; i++) e[i].style.display = "none";
                for (i = 0; i < f; i++)
                  o[i] &&
                    (r[i].style.height = u[i].style.height = o[i] + 1 + "px");
                for (i = 0; i < l; i++) e[i].style.display = "";
              }
            },
            _ths: function (n, t) {
              for (
                var r, o, s, c, u, h, v = [], e = 0, l = n.length;
                e < l;
                e++
              )
                (r = n[e]),
                  (s = []),
                  (c = [i.header]),
                  (o = r.headerTemplate
                    ? r.headerTemplate({})
                    : r.title || r.field || ""),
                  (h = r.headerTemplate ? et(o) : di(o)),
                  s.push(
                    r.sortable
                      ? a("a", { href: "#", className: i.link }, [h])
                      : h
                  ),
                  (u = {
                    "data-field": r.field,
                    "data-title": r.title,
                    style: r.hidden === !0 ? { display: "none" } : {},
                    className: c.join(" "),
                    role: "columnheader",
                  }),
                  r.columns || (u.rowSpan = t ? t : 1),
                  r.headerAttributes &&
                    (1 === r.headerAttributes.colSpan &&
                      delete r.headerAttributes.colSpan,
                    r.headerAttributes["class"] &&
                      ((u.className += " " + r.headerAttributes["class"]),
                      delete r.headerAttributes["class"])),
                  r["data-index"] > -1 && (u["data-index"] = r["data-index"]),
                  (u = f(!0, {}, u, r.headerAttributes)),
                  v.push(a("th", u, s));
              return v;
            },
            _cols: function (n) {
              for (var t, r, u = [], i = 0; i < n.length; i++)
                n[i].hidden !== !0 &&
                  ((t = n[i].width),
                  (r = {}),
                  t &&
                    0 !== parseInt(t, 10) &&
                    (r.style = { width: "string" == typeof t ? t : t + "px" }),
                  u.push(a("col", r)));
              return u;
            },
            _clearColsCache: function () {
              this._headerColsTree.render([]);
              this.options.scrollable && this._contentColsTree.render([]);
              this._hasLockedColumns &&
                (this._lockedHeaderColsTree.render([]),
                this._lockedContentColsTree.render([]));
            },
            _renderCols: function () {
              var n = g(this.columns);
              this._headerColsTree.render(this._cols(o(n)));
              this.options.scrollable &&
                this._contentColsTree.render(this._cols(o(n)));
              this._hasLockedColumns &&
                ((n = l(this.columns)),
                this._lockedHeaderColsTree.render(this._cols(o(n))),
                this._lockedContentColsTree.render(this._cols(o(n))));
            },
            _retrieveFirstColumn: function (t, i) {
              var r,
                u = n();
              if (i.length && t[0]) {
                for (r = t[0]; r.columns && r.columns.length; )
                  (r = r.columns[0]), (i = i.filter(":not(:first())"));
                u = u.add(i);
              }
              return u;
            },
            _updateFirstColumnClass: function () {
              var r,
                t = this,
                i = t.columns || [],
                u = t.thead.find(">tr:not(:first)");
              i = g(i);
              r = t._retrieveFirstColumn(i, u);
              t.lockedHeader &&
                ((u = t.lockedHeader.find(
                  "thead>tr:not(.k-filter-row):not(:first)"
                )),
                (i = l(t.columns)),
                (r = r.add(t._retrieveFirstColumn(i, u))));
              r.each(function () {
                var t = n(this).find("th");
                t.removeClass("k-first");
                t.eq(0).addClass("k-first");
              });
            },
            _updateRowSpans: function (n) {
              for (var i, t = n.length - 1; t >= 0; t--)
                (i = vr(n[t].cells).length > 0),
                  i && (n[t].rowSpan = n.length - t);
            },
            _setColumnDataIndexes: function (n) {
              for (var t = 0; t < n.length; t++) n[t]["data-index"] = t;
            },
            _updateColumnCellIndex: function () {
              var n,
                t = 0;
              this.lockedHeader &&
                ((n = this.lockedHeader.find("thead")),
                (t = dr(n, l(this.columns))));
              dr(this.thead, g(this.columns), t);
            },
            _setParentsVisibility: function (n, t) {
              var i,
                u,
                f = this.columns,
                r = [],
                e = t
                  ? function (n) {
                      return ri(n.columns).length && n.hidden;
                    }
                  : function (n) {
                      return !ri(n.columns).length && !n.hidden;
                    };
              if (wi(n, f, r) && r.length)
                for (i = r.length - 1; i >= 0; i--)
                  (u = r[i]), e(u) && (u.hidden = !t);
            },
            _prepareColumns: function (t, i, r, u, f) {
              for (
                var s,
                  h = u || t[t.length - 1],
                  c = t[h.index + 1],
                  l = 0,
                  e = 0;
                e < i.length;
                e++
              )
                (s = n.extend({}, i[e], {
                  headerAttributes: i[e].headerAttributes || {},
                })),
                  h.cells.push(s),
                  i[e].columns &&
                    i[e].columns.length &&
                    (c ||
                      ((c = { rowSpan: 0, cells: [], index: t.length }),
                      t.push(c)),
                    i[e].columns.length &&
                      ((s.headerAttributes.colSpan =
                        vr(i[e].columns).length || 1),
                      (s.headerAttributes["data-colspan"] = o(
                        i[e].columns
                      ).length)),
                    this._prepareColumns(t, i[e].columns, s, c, i[e]),
                    s.hidden || (l += s.headerAttributes.colSpan - 1),
                    (h.rowSpan = t.length - h.index)),
                  (i[e].rowIndex = h.index),
                  f && (i[e].parentColumn = f),
                  (i[e].cellIndex = h.cells.length - 1);
              r && (r.headerAttributes.colSpan += l);
            },
            _renderHeaderTree: function (n, t, i) {
              var u,
                r = [],
                f = [];
              if (i) {
                for (
                  r = [{ rowSpan: 1, cells: [], index: 0 }],
                    this._prepareColumns(r, t),
                    this._updateRowSpans(r),
                    u = 0;
                  u < r.length;
                  u++
                )
                  f.push(
                    a(
                      "tr",
                      { role: "row" },
                      this._ths(r[u].cells, r[u].rowSpan)
                    )
                  );
                n.render(f);
              } else n.render([a("tr", { role: "row" }, this._ths(t))]);
            },
            _renderHeader: function () {
              var n = g(this.columns),
                i =
                  e(this.columns, function (n) {
                    return n.columns !== t;
                  }).length > 0;
              this._setColumnDataIndexes(o(this.columns));
              this._renderHeaderTree(this._headerTree, n, i);
              this._hasLockedColumns &&
                ((n = l(this.columns)),
                this._renderHeaderTree(this._lockedHeaderTree, n, i),
                this._applyLockedContainersWidth(),
                this._syncLockedHeaderHeight());
              this._updateFirstColumnClass();
            },
            _applyLockedContainersWidth: function () {
              var n, t, f, i, r, u;
              this._hasLockedColumns &&
                ((n = cr(this.lockedHeader.find(">table>colgroup>col"))),
                (t = this.thead.parent()),
                (f = cr(t.find(">colgroup>col"))),
                (i = this.wrapper[0].clientWidth),
                (r = kendo.support.scrollbar()),
                n >= i && (n = i - 3 * r),
                this.lockedHeader.add(this.lockedContent).width(n),
                t.add(this.table).width(f),
                (u = i - n - 2),
                this.content.width(u),
                t.parent().width(u - r));
            },
            _trs: function (t) {
              for (
                var u,
                  f,
                  e,
                  a,
                  o,
                  c,
                  k,
                  y = this,
                  l = [],
                  p = t.level,
                  d = t.data,
                  s = this.dataSource,
                  g = s.aggregates() || {},
                  it = s._modelIdField(),
                  nt = s._modelParentIdField(),
                  w = t.columns,
                  h = y._isPageable(),
                  tt = t.childrenMap || s.childrenMap(s._getData()),
                  v = 0,
                  b = d.length;
                v < b;
                v++
              )
                if (
                  ((e = []),
                  (u = d[v]),
                  (c = u[it]),
                  (o = h ? tt[c] : u.loaded() ? s.childNodes(u) : []),
                  (a = o && o.length),
                  (f = { role: "row" }),
                  (f[kendo.attr("uid")] = u.uid),
                  a && (f["aria-expanded"] = !!u.expanded),
                  t.visible
                    ? (!h || (h && !y._skipRenderingMap[c])) &&
                      (this._absoluteIndex % 2 != 0 && e.push(i.alt),
                      this._absoluteIndex++)
                    : (f.style = { display: "none" }),
                  n.inArray(u.uid, t.selected) >= 0 && e.push(i.selected),
                  a && e.push(i.group),
                  u._edit && e.push("k-grid-edit-row"),
                  (f.className = e.join(" ")),
                  y._skipRenderingMap[c] ||
                    ((k = this._tds(
                      {
                        model: u,
                        attr: f,
                        level: h ? y._renderedModelLevel(u, t) : p,
                        editedColumn: t.editedColumn,
                        editedColumnIndex: t.editedColumnIndex,
                      },
                      w,
                      r(this._td, this)
                    )),
                    l.push(k)),
                  a)
                ) {
                  if (
                    (h && (o = (t.viewChildrenMap || {})[c] || []),
                    0 === o.length)
                  )
                    continue;
                  l = l.concat(
                    this._trs({
                      columns: w,
                      editedColumn: t.editedColumn,
                      editedColumnIndex: t.editedColumnIndex,
                      aggregates: g,
                      selected: t.selected,
                      visible: h ? t.visible : t.visible && !!u.expanded,
                      data: o,
                      childrenMap: t.childrenMap || tt,
                      viewChildrenMap: t.viewChildrenMap,
                      level: p + 1,
                    })
                  );
                }
              return (
                this._hasFooterTemplate() &&
                  u &&
                  ((f = {
                    className: i.footerTemplate,
                    "data-parentId": u[nt],
                  }),
                  t.visible || (f.style = { display: "none" }),
                  l.push(
                    this._tds(
                      {
                        model: g[u[nt]],
                        attr: f,
                        level: p,
                        editedColumn: t.editedColumn,
                        editedColumnIndex: t.editedColumnIndex,
                      },
                      w,
                      this._footerId
                    )
                  )),
                l
              );
            },
            _footerId: function (t) {
              var u = [],
                r = t.column,
                o = t.column.footerTemplate || n.noop,
                s = t.model[r.field] || {},
                e = {
                  role: "gridcell",
                  style: r.hidden === !0 ? { display: "none" } : {},
                };
              return (
                r.expandable &&
                  (u = u.concat(
                    hr({ level: t.level + 1, className: i.iconPlaceHolder })
                  )),
                r.attributes &&
                  f(!0, e, r.attributes, {
                    style: r.hidden === !0 ? { display: "none" } : {},
                  }),
                u.push(et(o(s) || "")),
                a("td", e, u)
              );
            },
            _hasFooterTemplate: function () {
              return !!e(this.columns, function (n) {
                return n.footerTemplate;
              }).length;
            },
            _tds: function (n, t, i) {
              for (
                var u,
                  f,
                  e = [],
                  s = (n.editedColumn || {}).field,
                  o = this._isIncellEditable(),
                  h = t.length,
                  r = 0;
                r < h;
                r++
              )
                (u = t[r]),
                  (f = i({
                    model: n.model,
                    column: u,
                    editColumn:
                      !o || (o && u.field === s && n.editedColumnIndex === r),
                    level: n.level,
                  })),
                  e.push(f);
              return a("tr", n.attr, e);
            },
            _td: function (n) {
              var o,
                s = [],
                u = n.model,
                r = n.column,
                t = {
                  role: "gridcell",
                  style: r.hidden === !0 ? { display: "none" } : {},
                },
                h = this._isIncellEditable(),
                c = !1;
              return (
                r.attributes && f(!0, t, r.attributes),
                u._edit && r.field && n.editColumn && (h || (!h && ui(r, u)))
                  ? ((t[kendo.attr("container-for")] = r.field),
                    h &&
                      (t.className && t.className.indexOf(i.editCell) !== -1
                        ? (t.className += " " + i.editCell)
                        : t.className || (t.className = i.editCell)))
                  : (r.expandable &&
                      ((s = hr({
                        level: n.level,
                        className: i.iconPlaceHolder,
                      })),
                      (o = [i.icon]),
                      o.push(
                        u.hasChildren
                          ? u.expanded
                            ? i.iconCollapse
                            : i.iconExpand
                          : i.iconHidden
                      ),
                      u._error
                        ? o.push(i.refresh)
                        : !u.loaded() && u.expanded && o.push(i.loading),
                      s.push(a("span", { className: o.join(" ") })),
                      (t.style["white-space"] = "nowrap")),
                    af(r, u) &&
                      (t.className
                        ? (t.className += i.dirtyCell)
                        : t.className || (t.className = i.dirtyCell)),
                    r.command
                      ? (t.className &&
                        t.className.indexOf("k-command-cell") !== -1
                          ? (t.className += " k-command-cell")
                          : t.className || (t.className = "k-command-cell"),
                        (c =
                          e(r.command, function (n) {
                            return n === ni || n.name === ni;
                          }).length > 0),
                        (s = this._buildCommands(
                          u._edit && !this._isIncellEditable() && c
                            ? ["update", "canceledit"]
                            : r.command
                        )))
                      : s.push(this._cellContent(r, u)),
                    t["class"] &&
                      (t.className = t["class"] + " " + t.className)),
                a("td", t, s)
              );
            },
            _cellContent: function (n, t) {
              var i,
                r = this,
                u = r._isIncellEditable(),
                f = u ? r._evalDirtyIndicatorTemplate(n, t) : "";
              return (
                n.template
                  ? (i = r._evalColumnTemplate(n, t))
                  : n.field
                  ? ((i = t.get(n.field)),
                    null === i || c(i)
                      ? (i = f)
                      : (n.format && (i = kendo.format(n.format, i)),
                        (i = f + i)))
                  : (null === i || c(i)) && (i = ""),
                n.template || !n.encoded ? et(i) : u ? et(i) : di(i)
              );
            },
            _evalColumnTemplate: function (n, t) {
              return this._isIncellEditable()
                ? this._evalCustomColumnTemplate(n, t)
                : n.template(t);
            },
            _evalCustomColumnTemplate: function (n, t) {
              var i = this,
                u = i._customTemplateSettings(),
                f = "#=this.columnTemplate(" + u.paramName + ")#",
                e = i._dirtyIndicatorTemplate(n.field) + f,
                o = r(uu(e, u), { columnTemplate: n.template });
              return o(t);
            },
            _evalDirtyIndicatorTemplate: function (n, t) {
              var i = this._dirtyIndicatorTemplate(n.field);
              return uu(i)(t);
            },
            _dirtyIndicatorTemplate: function (n) {
              var i,
                r = this,
                u = r._customTemplateSettings(),
                t = u.paramName;
              return n && t
                ? ((i =
                    "[" === n.charAt(0)
                      ? kendo.expr(n, t + ".dirtyFields")
                      : t + ".dirtyFields['" + n + "']"),
                  "#= " +
                    t +
                    " && " +
                    t +
                    ".dirty && " +
                    t +
                    ".dirtyFields && " +
                    i +
                    " ? '<span class=\"k-dirty\"></span>' : '' #")
                : "";
            },
            _customTemplateSettings: function () {
              return f({}, kendo.Template, this.options.templateSettings);
            },
            _buildCommands: function (n) {
              for (var i = [], t = 0; t < n.length; t++)
                i.push(this._button(n[t]));
              return i;
            },
            _button: function (n) {
              var t = (n.name || n).toLowerCase(),
                r = this.options.messages.commands[t],
                i = [];
              return (
                (n = f({}, sr[t], { text: r }, n)),
                n.imageClass &&
                  i.push(
                    a("span", { className: ["k-icon", n.imageClass].join(" ") })
                  ),
                a(
                  "button",
                  {
                    type: "button",
                    "data-command": t,
                    className: ["k-button k-button-icontext", n.className].join(
                      " "
                    ),
                  },
                  i.concat([di(n.text || n.name)])
                )
              );
            },
            _positionResizeHandle: function (i) {
              var s,
                f,
                h,
                r = n(i.currentTarget),
                o = this.resizeHandle,
                v = r.position(),
                p = ot(r),
                w = r.closest("div"),
                l = t !== i.buttons ? i.buttons : i.which || i.button,
                a = this.options.columnResizeHandleWidth || 3,
                c = p;
              if (t === l || 0 === l) {
                if (
                  (o ||
                    (o = this.resizeHandle =
                      n(
                        '<div class="k-resize-handle"><div class="k-resize-handle-inner" /></div>'
                      )),
                  (s = y(r.closest("thead")).filter(":visible")),
                  wt)
                )
                  c = r.position().left;
                else
                  for (f = 0; f < s.length && s[f] != r[0]; f++)
                    c += s[f].offsetWidth;
                w.append(o);
                o.show()
                  .css({
                    top: v.top,
                    left: c - (3 * a) / 2,
                    height: bt(r),
                    width: 3 * a,
                  })
                  .data("th", r);
                h = this;
                o.off("dblclick" + u).on("dblclick" + u, function () {
                  var t = r.index();
                  n.contains(h.thead[0], r[0]) &&
                    (t += e(h.columns, function (n) {
                      return n.locked && !n.hidden;
                    }).length);
                  h.autoFitColumn(t);
                });
              }
            },
            autoFitColumn: function (t) {
              var r,
                k,
                o,
                s,
                a,
                h,
                d,
                v,
                c,
                u,
                tt,
                p,
                g,
                w,
                l,
                b,
                it,
                i = this,
                rt = i.options,
                f = i.columns,
                ut = kendo.support.browser,
                ft = i.lockedHeader
                  ? y(i.lockedHeader.find(">table>thead")).filter(li).length
                  : 0;
              if (
                ((t =
                  "number" == typeof t
                    ? f[t]
                    : dt(t)
                    ? e(f, function (n) {
                        return n === t;
                      })[0]
                    : e(f, function (n) {
                        return n.field === t;
                      })[0]),
                t && !t.hidden)
              ) {
                for (
                  r = nt(t, f),
                    s = t.locked,
                    o = s ? i.lockedHeader.children("table") : i.thead.parent(),
                    k = o.find("[data-index='" + r + "']"),
                    h = s ? i.lockedTable : i.table,
                    d = i.footer || n(),
                    i.footer &&
                      i.lockedContent &&
                      (d = i.footer.children(
                        s ? ".k-grid-footer-locked" : ".k-grid-footer-wrap"
                      )),
                    v = d.find("table").first(),
                    i.lockedHeader && ft >= r && !s && (r -= ft),
                    c = 0;
                  c < f.length && f[c] !== t;
                  c++
                )
                  f[c].hidden && r--;
                if (
                  ((a = rt.scrollable
                    ? o
                        .find(
                          "col:not(.k-group-col):not(.k-hierarchy-col):eq(" +
                            r +
                            ")"
                        )
                        .add(
                          h
                            .children("colgroup")
                            .find(
                              "col:not(.k-group-col):not(.k-hierarchy-col):eq(" +
                                r +
                                ")"
                            )
                        )
                        .add(
                          v
                            .find("colgroup")
                            .find(
                              "col:not(.k-group-col):not(.k-hierarchy-col):eq(" +
                                r +
                                ")"
                            )
                        )
                    : h
                        .children("colgroup")
                        .find(
                          "col:not(.k-group-col):not(.k-hierarchy-col):eq(" +
                            r +
                            ")"
                        )),
                  (u = o.add(h).add(v)),
                  (tt = ot(k)),
                  a.width(""),
                  u.css("table-layout", "fixed"),
                  a.width("auto"),
                  u.addClass("k-autofitting"),
                  u.css("table-layout", ""),
                  (p = Math.ceil(
                    Math.max(
                      ot(k),
                      ot(h.find("tr").eq(0).children("td:visible").eq(r)),
                      ot(v.find("tr").eq(0).children("td:visible").eq(r))
                    )
                  )),
                  a.width(p),
                  (t.width = p),
                  rt.scrollable)
                ) {
                  for (
                    g = o.find("col"), l = 0, b = 0, it = g.length;
                    b < it;
                    b += 1
                  ) {
                    if (((w = g[b].style.width), !w || w.indexOf("%") != -1)) {
                      l = 0;
                      break;
                    }
                    l += parseInt(w, 10);
                  }
                  l &&
                    u.each(function () {
                      this.style.width = l + "px";
                    });
                }
                ut.msie &&
                  8 == ut.version &&
                  (u.css("display", "inline-table"),
                  setTimeout(function () {
                    u.css("display", "table");
                  }, 1));
                u.removeClass("k-autofitting");
                i.trigger(or, { column: t, oldWidth: tt, newWidth: p });
                i._applyLockedContainersWidth();
                i._syncLockedContentHeight();
                i._syncLockedHeaderHeight();
              }
            },
            _adjustLockedHorizontalScrollBar: function () {
              var n = this.table,
                t = n.parent(),
                i =
                  n[0].offsetWidth > t[0].clientWidth
                    ? kendo.support.scrollbar()
                    : 0;
              this.lockedContent.height(t.height() - i);
            },
            _syncLockedContentHeight: function () {
              this.lockedTable &&
                (this._touchScroller || this._adjustLockedHorizontalScrollBar(),
                this._adjustRowsHeight(this.table, this.lockedTable));
            },
            _syncLockedHeaderHeight: function () {
              var n, t;
              this.lockedHeader &&
                ((n = this.lockedHeader.children("table")),
                (t = this.thead.parent()),
                this._adjustRowsHeight(n, t),
                sf(n, t));
            },
            _resizable: function () {
              if (this.options.resizable) {
                this.resizable && this.resizable.destroy();
                var t = this;
                n(this.lockedHeader)
                  .find("thead")
                  .add(this.thead)
                  .on(
                    "mousemove" + u,
                    "th",
                    n.proxy(this._positionResizeHandle, this)
                  );
                this.resizable = new kendo.ui.Resizable(this.wrapper, {
                  handle: ".k-resize-handle",
                  start: function (i) {
                    var u,
                      f,
                      r = n(i.currentTarget).data("th"),
                      o = n.inArray(
                        r[0],
                        y(r.closest("thead")).filter(":visible")
                      ),
                      e = "col:eq(" + o + ")";
                    t.wrapper.addClass("k-grid-column-resizing");
                    t.lockedHeader && n.contains(t.lockedHeader[0], r[0])
                      ? ((u = t.lockedHeader), (f = t.lockedTable))
                      : ((u = t.thead.parent()), (f = t.table));
                    this.col = f.children("colgroup").find(e).add(u.find(e));
                    this.th = r;
                    this.startLocation = i.x.location;
                    this.columnWidth = ot(r);
                    this.table = this.col.closest("table");
                    this.totalWidth = this.table.width();
                  },
                  resize: function (n) {
                    var i = wt ? -1 : 1,
                      r = 11,
                      t = n.x.location * i - this.startLocation * i;
                    this.columnWidth + t < r && (t = r - this.columnWidth);
                    this.table.width(this.totalWidth + t);
                    this.col.width(this.columnWidth + t);
                  },
                  resizeend: function () {
                    var r, n, i;
                    t.wrapper.removeClass("k-grid-column-resizing");
                    r = this.th.attr("data-field");
                    n = e(o(t.columns), function (n) {
                      return n.field == r;
                    });
                    i = Math.floor(ot(this.th));
                    n[0].width = i;
                    t._resize();
                    t._syncLockedContentHeight();
                    t._syncLockedHeaderHeight();
                    t.trigger(or, {
                      column: n,
                      oldWidth: this.columnWidth,
                      newWidth: i,
                    });
                    this.table = this.col = this.th = null;
                  },
                });
              }
            },
            _sortable: function () {
              var c,
                i,
                u,
                s,
                h,
                r,
                l,
                a = this.options.sortable,
                v =
                  e(this.columns, function (n) {
                    return n.columns !== t;
                  }).length > 0;
              if (a)
                for (
                  s = v
                    ? this.lockedHeader
                      ? ai(
                          y(this.lockedHeader.find(">table>thead")).add(
                            y(this.thead)
                          )
                        )
                      : y(this.thead)
                    : n(this.lockedHeader).add(this.thead).find("th"),
                    c = o(this.columns),
                    r = 0,
                    l = s.length;
                  r < l;
                  r++
                )
                  (i = c[r]),
                    i.sortable !== !1 &&
                      !i.command &&
                      i.field &&
                      ((h = s.eq(r)),
                      (u = h.data("kendoColumnSorter")),
                      u && u.destroy(),
                      h.kendoColumnSorter(
                        f({}, a, i.sortable, { dataSource: this.dataSource })
                      ));
            },
            _filterable: function () {
              var s,
                i,
                l,
                a,
                u,
                h,
                c,
                v,
                p,
                w = this.options.filterable,
                b =
                  e(this.columns, function (n) {
                    return n.columns !== t;
                  }).length > 0;
              if (w && !this.options.columnMenu)
                for (
                  v = r(function (n) {
                    this.trigger(yu, {
                      field: n.field,
                      container: n.container,
                    });
                  }, this),
                    p = r(function (n) {
                      this.trigger(pu, {
                        field: n.field,
                        container: n.container,
                      });
                    }, this),
                    s = b
                      ? this.lockedHeader
                        ? y(this.lockedHeader.find(">table>thead")).add(
                            y(this.thead)
                          )
                        : y(this.thead)
                      : n(this.lockedHeader).add(this.thead).find("th"),
                    a = o(this.columns),
                    i = 0,
                    l = s.length;
                  i < l;
                  i++
                )
                  (u = a[i]),
                    (h = s.eq(i)),
                    (c = h.data("kendoFilterMenu")),
                    c && c.destroy(),
                    u.command ||
                      u.filterable === !1 ||
                      h.kendoFilterMenu(
                        f(!0, {}, w, u.filterable, {
                          dataSource: this.dataSource,
                          init: v,
                          open: p,
                        })
                      );
            },
            _change: function () {
              this.trigger(ht);
            },
            _isLocked: function () {
              return null !== this.lockedHeader;
            },
            _selectable: function () {
              var c,
                a,
                l,
                o,
                f = this,
                e = this.options.selectable,
                h = this.table,
                v = f._isLocked();
              e &&
                ((e = kendo.ui.Selectable.parseOptions(e)),
                this._hasLockedColumns &&
                  ((h = h.add(this.lockedTable)), (a = e.multiple && e.cell)),
                (c = ">tbody>tr:not(.k-footer-template)"),
                e.cell && (c += ">td"),
                (this.selectable = new kendo.ui.Selectable(h, {
                  filter: c,
                  aria: !0,
                  multiple: e.multiple,
                  change: r(this._change, this),
                  useAllItems: a,
                  continuousItems: r(this._continuousItems, this, c, e.cell),
                  relatedTarget:
                    !e.cell && this._hasLockedColumns
                      ? r(this._selectableTarget, this)
                      : t,
                })),
                f.options.navigatable &&
                  ((l = e.multiple),
                  (o = e.cell),
                  h.on("keydown" + u, function (r) {
                    var u = f.current(),
                      e = r.target;
                    if (
                      r.keyCode === s.SPACEBAR &&
                      !r.shiftKey &&
                      n.inArray(e, h) > -1 &&
                      !u.is(".k-header")
                    ) {
                      if (
                        (r.preventDefault(),
                        r.stopPropagation(),
                        (u = o ? u : u.parent()),
                        v && !o && (u = u.add(f._relatedRow(u))),
                        l)
                      )
                        if (r.ctrlKey) {
                          if (u.hasClass(i.selected))
                            return u.removeClass(i.selected), f.trigger(ht), t;
                        } else f.selectable.clear();
                      else f.selectable.clear();
                      o || (f.selectable._lastActive = u);
                      f.selectable.value(u);
                    } else !o && ((r.shiftKey && r.keyCode == s.LEFT) || (r.shiftKey && r.keyCode == s.RIGHT) || (r.shiftKey && r.keyCode == s.UP) || (r.shiftKey && r.keyCode == s.DOWN) || (r.keyCode === s.SPACEBAR && r.shiftKey)) && (r.preventDefault(), r.stopPropagation(), (u = u.parent()), v && (u = u.add(f._relatedRow(u))), l ? (f.selectable._lastActive || (f.selectable._lastActive = u), f.selectable.selectRange(f.selectable._firstSelectee(), u)) : (f.selectable.clear(), f.selectable.value(u)));
                  })));
            },
            _continuousItems: function (t, i) {
              var e, o, u, s, f, r;
              if (this.lockedContent) {
                for (
                  e = n(t, this.lockedTable),
                    o = n(t, this.table),
                    u = i ? l(this.columns).length : 1,
                    s = i ? this.columns.length - u : 1,
                    f = [],
                    r = 0;
                  r < e.length;
                  r += u
                )
                  fu.apply(f, e.slice(r, r + u)), fu.apply(f, o.splice(0, s));
                return f;
              }
            },
            _selectableTarget: function (t) {
              for (var r, u = n(), i = 0, f = t.length; i < f; i++)
                (r = this._relatedRow(t[i])), nt(r[0], t) < 0 && (u = u.add(r));
              return u;
            },
            _relatedRow: function (t) {
              var i,
                r,
                u = this.lockedTable;
              return (
                (t = n(t)),
                u
                  ? ((i = t.closest(this.table.add(this.lockedTable))),
                    (r = i.find(">tbody>tr").index(t)),
                    (i = i[0] === this.table[0] ? u : this.table),
                    i.find(">tbody>tr").eq(r))
                  : t
              );
            },
            select: function (i) {
              var u = this.selectable;
              return u
                ? (t !== i &&
                    (u.options.multiple || (u.clear(), (i = i.first())),
                    this._hasLockedColumns &&
                      (i = i.add(n.map(i, r(this._relatedRow, this))))),
                  u.value(i))
                : n();
            },
            clearSelection: function () {
              var n = this.select();
              n.length && (this.selectable.clear(), this.trigger(ht));
            },
            _dataSource: function (n) {
              var e = this,
                i = this.dataSource,
                u = e.options.pageable;
              i &&
                (i.unbind(ht, this._refreshHandler),
                i.unbind(tr, this._errorHandler),
                i.unbind(ir, this._progressHandler));
              this._refreshHandler = r(this.refresh, this);
              this._errorHandler = r(this._error, this);
              this._progressHandler = r(this._progress, this);
              dt(n) &&
                (f(n, { table: e.table, fields: e.columns }),
                dt(u) && u.pageSize !== t && (n.pageSize = u.pageSize));
              i = this.dataSource = lt.create(n);
              u && (i._collapsedTotal = t);
              i.bind(ht, this._refreshHandler);
              i.bind(tr, this._errorHandler);
              i.bind(ir, this._progressHandler);
              this._dataSourceFetchProxy = r(function () {
                this.dataSource.fetch();
              }, this);
            },
            setDataSource: function (n) {
              this._dataSource(n);
              this._sortable();
              this._filterable();
              this._columnMenu();
              this._pageable();
              this._contentTree.render([]);
              this.options.autoBind && this.dataSource.fetch();
            },
            dataItem: function (t) {
              var r, i, u;
              return t instanceof b
                ? t
                : ((r = n(t).closest("tr")),
                  (i = r.attr(kendo.attr("uid"))),
                  (u = c(i) ? null : this.dataSource.getByUid(i)));
            },
            editRow: function (n) {
              var i,
                r = this;
              if (
                !this._isIncellEditable() &&
                this.options.editable &&
                (typeof n === eu && (n = this.tbody.find(n)),
                (i =
                  r._isPageable() && r._isPopupEditable() && n instanceof b
                    ? n
                    : this.dataItem(n)))
              ) {
                if (
                  (r.editor
                    ? ((i._edit = !0), this._render(), this._cancelEditor())
                    : (r._preventPageSizeRestore = !1),
                  "popup" != this._editMode() && (i._edit = !0),
                  this.trigger(rr, { model: i }))
                )
                  return r.dataSource._restorePageSizeAfterAddChild(), t;
                this._render();
                this._createEditor(i);
                this.trigger(ni, { container: this.editor.wrapper, model: i });
              }
            },
            _cancelEdit: function (t) {
              if (this.editor) {
                var i;
                t = f(t, {
                  container: this.editor.wrapper,
                  model: this.editor.model,
                });
                this.trigger(pt, t) ||
                  (this.options.navigatable &&
                    (i = this.items().index(n(this.current()).parent())),
                  this.cancelRow(),
                  this.options.navigatable &&
                    (this.current(
                      this.items().eq(i).children().filter(d).first()
                    ),
                    w(this.table, !0)));
              }
            },
            cancelRow: function () {
              this._isIncellEditable() ||
                (this._cancelEditor(), this._render());
            },
            saveRow: function () {
              var t,
                n = this.editor;
              this._isIncellEditable() ||
                (n &&
                  ((t = { model: n.model, container: n.wrapper }),
                  n.end() && !this.trigger(yt, t) && this.dataSource.sync()));
            },
            addRow: function (n) {
              var i = this,
                e = i.dataSource,
                o = i._isPageable(),
                s = i._isIncellEditable(),
                h = i._isInlineEditable(),
                f = this.editor,
                r = 0,
                u = {};
              if ((!f || f.end()) && this.options.editable)
                return n
                  ? (n instanceof b || (n = this.dataItem(n)),
                    (u[n.parentIdField] = n.id),
                    (r = this.dataSource.indexOf(n) + 1),
                    this.expand(n).then(function () {
                      var t = o && e._isLastItemInView(n) && (s || h);
                      i._insertAt(u, r, t);
                    }),
                    t)
                  : (this._insertAt(u, r), t);
            },
            _insertAt: function (n, t, i) {
              var u,
                f,
                r = this,
                e = r.dataSource;
              n = r.dataSource.insert(t, n);
              i && e._setAddChildPageSize();
              u = this._itemFor(n);
              r._isIncellEditable()
                ? ((f = u.children("td").eq(r._firstEditableColumnIndex(u))),
                  r.editCell(f))
                : u && u[0]
                ? r.editRow(u)
                : r._isPageable() && r._isPopupEditable() && r.editRow(n);
            },
            _firstEditableColumnIndex: function (n) {
              for (
                var t,
                  u = this,
                  r = u.dataItem(n),
                  f = o(u.columns),
                  e = f.length,
                  i = 0;
                i < e;
                i++
              )
                if (
                  ((t = f[i]),
                  r &&
                    (!r.editable || r.editable(t.field)) &&
                    !t.command &&
                    t.field &&
                    t.hidden !== !0)
                )
                  return i;
              return -1;
            },
            removeRow: function (t) {
              var i = this.dataItem(t),
                r = { model: i, row: t };
              this.options.editable &&
                i &&
                !this.trigger(lu, r) &&
                (document.activeElement === n(t).find(".k-grid-delete")[0] &&
                  n(t).find(".k-grid-delete").blur(),
                this.dataSource.remove(i),
                this._isIncellEditable() || this.dataSource.sync());
            },
            _cancelEditor: function () {
              var t,
                n = this,
                i = n.editor;
              i &&
                ((t = i.model),
                n._destroyEditor(),
                n._isIncellEditable()
                  ? n._shouldRestorePageSize() &&
                    n.dataSource._restorePageSizeAfterAddChild()
                  : n.dataSource.cancelChanges(t),
                (t._edit = !1));
              n._preventPageSizeRestore = !1;
            },
            _shouldRestorePageSize: function () {
              var n = this;
              return (
                n._isPageable() &&
                n._isIncellEditable() &&
                !n._preventPageSizeRestore
              );
            },
            _destroyEditor: function () {
              this.editor && (this.editor.close(), (this.editor = null));
            },
            _createEditor: function (n) {
              for (
                var s,
                  u,
                  i = this.itemFor(n),
                  h = o(this.columns),
                  e = [],
                  t = 0;
                t < h.length;
                t++
              )
                e.push(f({}, h[t])), delete e[t].parentColumn;
              i = i.add(this._relatedRow(i));
              s = this._editMode();
              u = {
                columns: e,
                model: n,
                target: this,
                clearContainer: !1,
                template: this.options.editable.template,
              };
              "inline" == s
                ? (this.editor = new at(i, u))
                : (f(u, {
                    window: this.options.editable.window,
                    commandRenderer: r(function () {
                      return this._buildCommands(["update", "canceledit"]);
                    }, this),
                    fieldRenderer: r(this._cellContent, this),
                    save: r(this.saveRow, this),
                    cancel: r(this._cancelEdit, this),
                    appendTo: this.wrapper,
                  }),
                  (this.editor = new tu(i, u)));
            },
            _createIncellEditor: function (n, t) {
              var i = this,
                u = f({}, t.columns[0]);
              return (
                delete u.parentColumn,
                new iu(
                  n,
                  f(
                    {},
                    {
                      fieldRenderer: r(i._cellContent, i),
                      appendTo: i.wrapper,
                      clearContainer: !1,
                      target: i,
                      columns: [u],
                      model: t.model,
                      change: t.change,
                    }
                  )
                )
              );
            },
            editCell: function (t) {
              var u,
                r,
                i = this;
              t = n(t);
              u = o(i.columns)[i.cellIndex(t)];
              r = i.dataItem(t);
              i._isIncellEditable() && r && ui(u, r) && i._editCell(t, u, r);
            },
            _editCell: function (n, r, u) {
              var e,
                f = this;
              return f.trigger(rr, { model: u })
                ? (f.dataSource._restorePageSizeAfterAddChild(), t)
                : (f.closeCell(),
                  (u._edit = !0),
                  f._cancelEditor(),
                  f._render({ editedColumn: r, editedColumnIndex: n.index() }),
                  (e = f.table
                    .add(f.lockedTable)
                    .find(v + i.editCell)
                    .first()),
                  (f.editor = f._createIncellEditor(e, {
                    columns: [r],
                    model: u,
                    change: function (t) {
                      f.trigger(yt, {
                        values: t.values,
                        container: n,
                        model: u,
                      }) && t.preventDefault();
                    },
                  })),
                  (f._current = e),
                  f.trigger(ni, { container: n, model: u }),
                  t);
            },
            closeCell: function (n) {
              var u,
                f,
                t = this,
                r = (t.editor || {}).element;
              r &&
                r[0] &&
                t._isIncellEditable() &&
                ((f = t.dataItem(r)),
                (n && t.trigger(pt, { container: r, model: f })) ||
                  (t.trigger(cu, { type: n ? pt : yt, model: f, container: r }),
                  t._cancelEditor(),
                  r.removeClass(i.editCell),
                  (u = r.parent().removeClass(i.editRow)),
                  t.lockedContent && t._relatedRow(u).removeClass(i.editRow),
                  t._render(),
                  t.trigger(ou, { item: u, data: f, ns: k }),
                  t.lockedContent &&
                    lf(
                      u.css("height", "")[0],
                      t._relatedRow(u).css("height", "")[0]
                    )));
            },
            cancelChanges: function () {
              this.dataSource.cancelChanges();
            },
            saveChanges: function () {
              var n = this,
                t = (n.editor || {}).editable,
                i = t && t.end();
              (!i && t) || n.trigger(hu) || n.dataSource.sync();
            },
            _editMode: function () {
              var t = "inline",
                n = this.options.editable;
              return (
                n !== !0 && (t = "string" == typeof n ? n : n.mode || t),
                t.toLowerCase()
              );
            },
            _isIncellEditable: function () {
              return this._editMode() === df;
            },
            _isInlineEditable: function () {
              return this._editMode() === gf;
            },
            _isPopupEditable: function () {
              return this._editMode() === ne;
            },
            hideColumn: function (n) {
              this._toggleColumnVisibility(n, !0);
            },
            showColumn: function (n) {
              this._toggleColumnVisibility(n, !1);
            },
            _toggleColumnVisibility: function (n, t) {
              n = this._findColumn(n);
              n &&
                n.hidden !== t &&
                ((n.hidden = t),
                this._setParentsVisibility(n, !t),
                this._ensureExpandableColumn(),
                this._clearColsCache(),
                this._renderCols(),
                this._renderHeader(),
                this._render(),
                this._adjustTablesWidth(),
                this.trigger(t ? wu : bu, { column: n }),
                t ||
                  n.width ||
                  this.table.add(this.thead.closest("table")).width(""),
                this._updateFirstColumnClass());
            },
            _findColumn: function (n) {
              return (n =
                "number" == typeof n
                  ? this.columns[n]
                  : dt(n)
                  ? e(o(this.columns), function (t) {
                      return t === n;
                    })[0]
                  : e(o(this.columns), function (t) {
                      return t.field === n;
                    })[0]);
            },
            _adjustTablesWidth: function () {
              for (
                var t,
                  u = this.thead.prev().children(),
                  i = 0,
                  n = 0,
                  r = u.length;
                n < r;
                n++
              ) {
                if (((t = u[n].style.width), !t || t.indexOf("%") != -1)) {
                  i = 0;
                  break;
                }
                i += parseInt(t, 10);
              }
              i && this.table.add(this.thead.closest("table")).width(i);
            },
            _reorderable: function () {
              var i, u, t;
              this.options.reorderable &&
                ((i = this.options.scrollable === !0),
                (u =
                  (i
                    ? ".k-grid-header:first "
                    : "table:first>.k-grid-header ") + wf),
                (t = this),
                (this._draggableInstance = new k.Draggable(this.wrapper, {
                  group: kendo.guid(),
                  filter: u,
                  hint: function (t) {
                    return n(
                      '<div class="k-header k-reorder-clue k-drag-clue" />'
                    )
                      .html(
                        t.attr(kendo.attr("title")) ||
                          t.attr(kendo.attr("field")) ||
                          t.text()
                      )
                      .prepend(
                        '<span class="k-icon k-drag-status k-i-cancel" />'
                      );
                  },
                })),
                (this.reorderable = new k.Reorderable(this.wrapper, {
                  draggable: this._draggableInstance,
                  dragOverContainers: r(this._allowDragOverContainers, this),
                  inSameContainer: function (i) {
                    return (
                      n(i.source).parent()[0] === n(i.target).parent()[0] &&
                      pi(
                        yi(t.columns),
                        t.columns,
                        i.sourceIndex,
                        i.targetIndex
                      ) > -1
                    );
                  },
                  change: function (n) {
                    var i = yi(t.columns),
                      r = i[n.oldIndex],
                      u = pi(i, t.columns, n.oldIndex, n.newIndex);
                    t.trigger(ku, {
                      newIndex: u,
                      oldIndex: nt(r, i),
                      column: r,
                    });
                    t.reorderColumn(u, r, "before" === n.position);
                  },
                })));
            },
            _allowDragOverContainers: function (n, t) {
              var i = yi(this.columns);
              return i[n].lockable !== !1 && pi(i, this.columns, n, t) > -1;
            },
            _reorderTrees: function (i, r, u, f, e, o, s, h) {
              for (
                var d,
                  y,
                  g,
                  a,
                  v,
                  b,
                  p,
                  w = n(),
                  nt = e.find("tr:eq(" + f[0].rowIndex + ")"),
                  k = o.children[f[0].rowIndex],
                  tt = nt.children(),
                  l = s ? i[0] : i[i.length - 1],
                  c = 0;
                c < f.length;
                c++
              )
                (y = f[c].cellIndex),
                  (w = w.add(tt.eq(y))),
                  (d = u.children[l.rowIndex].children),
                  u === o && s && (y += c),
                  d.splice(
                    s ? l.cellIndex + c : l.cellIndex + 1 + c,
                    0,
                    k.children[y]
                  );
              if (
                (u === o && s
                  ? k.children.splice(f[0].cellIndex + f.length, f.length)
                  : k.children.splice(f[0].cellIndex, f.length),
                (g = r.find("tr:eq(" + l.rowIndex + ")")),
                (p = g.find(">th.k-header:eq(" + l.cellIndex + ")")),
                p.length &&
                  w[0] !== p[0] &&
                  w[s ? "insertBefore" : "insertAfter"](p),
                h >= f[0].rowIndex + 1 && 1 != h)
              ) {
                for (a = [], c = 0; c < f.length; c++)
                  f[c].columns && (a = a.concat(f[c].columns));
                if (!a.length) return;
                for (v = [], c = 0; c < i.length; c++)
                  i[c].columns && (v = v.concat(i[c].columns));
                if (
                  !v.length &&
                  (r !== e ||
                    l.cellIndex - f[0].cellIndex > 1 ||
                    f[0].cellIndex - l.cellIndex > 1) &&
                  ((b = ar(this.columns, l, f[0], s, this.columns)),
                  (v = [b]),
                  !b && a.length && r.find("tr").length > f[0].rowIndex + 1)
                )
                  return this._insertTree(a, e, o, r, u), t;
                if (!v.length) return;
                this._reorderTrees(v, r, u, a, e, o, s, h);
              }
            },
            _insertTree: function (t, i, r, u, f) {
              for (
                var o = [],
                  s = n(),
                  h = i.find("tr:eq(" + t[0].rowIndex + ")"),
                  c = r.children[t[0].rowIndex],
                  e = 0;
                e < t.length;
                e++
              )
                t[e].columns && (o = o.concat(t[e].columns)),
                  f.children[t[0].rowIndex].children.splice(
                    e,
                    0,
                    c.children[t[e].rowIndex]
                  ),
                  (s = s.add(
                    h.find(">th.k-header:eq(" + t[e].cellIndex + ")")
                  ));
              r.children[t[0].rowIndex].children.splice(
                t[0].cellIndex,
                t.length
              );
              u.find("tr:eq(" + t[0].rowIndex + ")").append(s);
              o.length && this._insertTree(o, i, r, u, f);
            },
            _reorderHeader: function (n, t, i) {
              var o,
                h,
                u = t.columns ? ki([t]) : 1,
                y = n.columns ? ki([n]) : 1,
                l = vi(t),
                v = vi(n),
                r = v ? this.lockedHeader : this.thead,
                f = l ? this.lockedHeader : this.thead,
                e = v ? this._lockedHeaderTree : this._headerTree,
                s = l ? this._lockedHeaderTree : this._headerTree,
                c = r.find("tr");
              if (u === y || u < c.length)
                this._reorderTrees([n], r, e, [t], f, s, i, u),
                  gr(r, e),
                  nu(f, s);
              else {
                if (r !== f)
                  for (
                    o = u - c.length,
                      c.each(function (n) {
                        for (var i = this.cells, t = 0; t < i.length; t++)
                          i[t].colSpan <= 1 &&
                            i[t].attributes.rowspan &&
                            ((e.children[n].children[t].attr.rowSpan += o),
                            (i[t].rowSpan += o));
                      }),
                      h = 0;
                    h < o;
                    h++
                  )
                    e.children.push(a("tr", { role: "row" })),
                      r.is("thead")
                        ? r.append("<tr role='row'></tr>")
                        : r.find("thead").append("<tr role='row'></tr>");
                this._reorderTrees([n], r, e, [t], f, s, i, u);
                nu(f, s);
              }
            },
            reorderColumn: function (i, r, u) {
              var a,
                v,
                h,
                y = r.parentColumn,
                f = y ? y.columns : this.columns,
                s = nt(r, f),
                p = f[i],
                c = !!p.locked,
                w =
                  e(this.columns, function (n) {
                    return n.columns !== t;
                  }).length > 0,
                b = g(f).length;
              s !== i &&
                ((c && !r.locked && 1 == b) ||
                  (!c && r.locked && f.length - b == 1) ||
                  (u === t && (u = i < s),
                  w && this._reorderHeader(p, r, u),
                  (a = !!r.locked),
                  (a = a != c),
                  (r.locked = c),
                  f.splice(u ? i : i + 1, 0, r),
                  f.splice(s < i ? s : s + 1, 1),
                  this._setColumnDataIndexes(o(this.columns)),
                  this._clearColsCache(),
                  this._renderCols(),
                  w
                    ? this.lockedHeader
                      ? ((f = g(this.columns)),
                        this._prepareColumns(
                          [{ rowSpan: 1, cells: [], index: 0 }],
                          f
                        ),
                        (f = l(this.columns)),
                        this._prepareColumns(
                          [{ rowSpan: 1, cells: [], index: 0 }],
                          f
                        ))
                      : this._prepareColumns(
                          [{ rowSpan: 1, cells: [], index: 0 }],
                          this.columns
                        )
                    : ((v = n(this.lockedHeader).add(this.thead).find("th")),
                      v.eq(s)[u ? "insertBefore" : "insertAfter"](v.eq(i)),
                      (h = this._headerTree.children[0].children),
                      this._hasLockedColumns &&
                        (h =
                          this._lockedHeaderTree.children[0].children.concat(
                            h
                          )),
                      h.splice(u ? i : i + 1, 0, h[s]),
                      h.splice(s < i ? s : s + 1, 1),
                      this._hasLockedColumns &&
                        ((this._lockedHeaderTree.children[0].children =
                          h.splice(0, l(f).length)),
                        (this._headerTree.children[0].children = h))),
                  this._updateColumnCellIndex(),
                  this._applyLockedContainersWidth(),
                  this._syncLockedHeaderHeight(),
                  this._updateFirstColumnClass(),
                  this.refresh(),
                  a &&
                    (c
                      ? this.trigger(gu, { column: r })
                      : this.trigger(nf, { column: r }))));
            },
            lockColumn: function (n) {
              var i,
                t = this.columns;
              n =
                "number" == typeof n
                  ? t[n]
                  : e(t, function (t) {
                      return t.field === n;
                    })[0];
              n &&
                !n.hidden &&
                ((i = l(t).length - 1), this.reorderColumn(i, n, !1));
            },
            unlockColumn: function (n) {
              var i,
                t = this.columns;
              n =
                "number" == typeof n
                  ? t[n]
                  : e(t, function (t) {
                      return t.field === n;
                    })[0];
              n &&
                !n.hidden &&
                ((i = l(t).length), this.reorderColumn(i, n, !0));
            },
            _columnMenu: function () {
              var i,
                v,
                p,
                w,
                b,
                h,
                c = n(this.lockedHeader).add(this.thead).find("th"),
                a = this.columns,
                u = this.options,
                s = u.columnMenu,
                d = r(this._columnMenuInit, this),
                g = r(this._columnMenuOpen, this),
                nt = l(a).length,
                k =
                  e(this.columns, function (n) {
                    return n.columns !== t;
                  }).length > 0;
              if (
                (k
                  ? ((a = o(a)),
                    (c = this.lockedHeader
                      ? ai(
                          y(this.lockedHeader.find(">table>thead")).add(
                            y(this.thead)
                          )
                        )
                      : y(this.thead)))
                  : (c = n(this.lockedHeader).add(this.thead).find("th")),
                s)
              )
                for (
                  "boolean" == typeof s && (s = {}), h = 0;
                  h < c.length;
                  h++
                )
                  (i = a[h]),
                    i.field &&
                      ((v = c.eq(h).data("kendoColumnMenu")),
                      v && v.destroy(),
                      (w = !1),
                      i.sortable !== !1 &&
                        s.sortable !== !1 &&
                        u.sortable !== !1 &&
                        (w = f({}, u.sortable, {
                          compare: (i.sortable || {}).compare,
                        })),
                      (b = !1),
                      u.filterable &&
                        i.filterable !== !1 &&
                        s.filterable !== !1 &&
                        (b = f(
                          { pane: this.pane },
                          i.filterable,
                          u.filterable
                        )),
                      (p = {
                        dataSource: this.dataSource,
                        values: i.values,
                        columns: s.columns,
                        sortable: w,
                        filterable: b,
                        messages: s.messages,
                        owner: this,
                        closeCallback: n.noop,
                        init: d,
                        open: g,
                        pane: this.pane,
                        lockedColumns: !k && i.lockable !== !1 && nt > 0,
                      }),
                      u.$angular && (p.$angular = u.$angular),
                      c.eq(h).kendoColumnMenu(p));
            },
            _columnMenuInit: function (n) {
              this.trigger(du, { field: n.field, container: n.container });
            },
            _pageable: function () {
              var i,
                t = this,
                r = t.options.pageable;
              r &&
                ((i = t.wrapper.children("div.k-grid-pager")),
                i.length ||
                  (i = n('<div class="k-pager-wrap k-grid-pager"/>').appendTo(
                    t.wrapper
                  )),
                t._destroyPager(),
                "object" == typeof r && r instanceof kendo.ui.TreeListPager
                  ? (t.pager = r)
                  : t.dataSource &&
                    !t.dataSource.options.serverPaging &&
                    t._createPager(i),
                t.pager &&
                  t.pager.bind(pf, function (n) {
                    t.trigger(su, { page: n.index }) && n.preventDefault();
                  }));
            },
            _createPager: function (n, t) {
              var i = this;
              i.pager = new fi(
                n,
                f({}, i.options.pageable, { dataSource: i.dataSource }, t)
              );
            },
            _destroyPager: function () {
              this.pager && this.pager.destroy();
            },
            _isPageable: function () {
              var n = this;
              return (
                n.options.pageable &&
                (!n.dataSource || (n.dataSource && n.dataSource._isPageable()))
              );
            },
            _togglePagerVisibility: function () {
              var n = this,
                t = n.options.pageable;
              t &&
                (dt(t) || t instanceof fi) &&
                t.alwaysVisible === !1 &&
                n.wrapper
                  .find(".k-grid-pager")
                  .toggle(
                    (n.dataSource.collapsedTotal() || 0) >=
                      n.dataSource.pageSize()
                  );
            },
          });
          kendo.ExcelMixin && kendo.ExcelMixin.extend(ft.prototype);
          kendo.PDFMixin &&
            (kendo.PDFMixin.extend(ft.prototype),
            (ft.prototype._drawPDF = function (i) {
              function c() {
                e && h !== t
                  ? (r.unbind("change", s),
                    r.one("change", function () {
                      f.resolve(o);
                    }),
                    r.page(h))
                  : f.resolve(o);
              }
              function s() {
                u._drawPDFShadow(
                  { width: u.wrapper.width() },
                  { avoidLinks: u.options.pdf.avoidLinks }
                )
                  .done(function (n) {
                    var t = r.page(),
                      u = e ? r.totalPages() : 1,
                      f = {
                        page: n,
                        pageNumber: t,
                        progress: t / u,
                        totalPages: u,
                      };
                    i.notify(f);
                    o.append(f.page);
                    t < u ? r.page(t + 1) : c();
                  })
                  .fail(function (n) {
                    f.reject(n);
                  });
              }
              var f,
                r,
                e,
                o,
                h,
                u = this;
              return u.options.pdf.paperSize &&
                "auto" != u.options.pdf.paperSize
                ? u._drawPDF_autoPageBreak(i)
                : ((f = new n.Deferred()),
                  (r = u.dataSource),
                  (e = u.options.pdf.allPages),
                  this._initPDFProgress(i),
                  (o = new kendo.drawing.Group()),
                  (h = r.page()),
                  e ? (r.bind("change", s), r.page(1)) : s(),
                  f.promise());
            }),
            (ft.prototype._initPDFProgress = function (t) {
              var r,
                i = n(
                  "<div class='k-loading-pdf-mask'><div class='k-loading-color'/></div>"
                );
              i.prepend(
                this.wrapper
                  .clone()
                  .css({ position: "absolute", top: 0, left: 0 })
              );
              this.wrapper.append(i);
              r = n("<div class='k-loading-pdf-progress'>")
                .appendTo(i)
                .kendoProgressBar({
                  type: "chunk",
                  chunkCount: 10,
                  min: 0,
                  max: 1,
                  value: 0,
                })
                .data("kendoProgressBar");
              t.progress(function (n) {
                r.value(n.progress);
              }).always(function () {
                kendo.destroy(i);
                i.remove();
              });
            }),
            (ft.prototype._drawPDF_autoPageBreak = function (i) {
              function v() {
                h && o !== t
                  ? (r.one("change", l), r.page(o))
                  : (u.refresh(), l());
              }
              function l() {
                c.appendTo(document.body);
                var t = n.extend({}, u.options.pdf, {
                  _destructive: !0,
                  progress: function (n) {
                    i.notify({
                      page: n.page,
                      pageNumber: n.pageNum,
                      progress: 0.5 + n.pageNum / n.totalPages / 2,
                      totalPages: n.totalPages,
                    });
                  },
                });
                kendo.drawing
                  .drawDOM(f, t)
                  .always(function () {
                    c.remove();
                  })
                  .then(function (n) {
                    s.resolve(n);
                  })
                  .fail(function (n) {
                    s.reject(n);
                  });
              }
              function e() {
                var n = r.page(),
                  t = h ? r.totalPages() : 1;
                a.append(y.find("tr"));
                n < t ? r.page(n + 1) : (r.unbind("change", e), v());
              }
              var a,
                o,
                u = this,
                s = new n.Deferred(),
                r = u.dataSource,
                h = u.options.pdf.allPages,
                y = u.wrapper.find('table[role="treeList"] > tbody'),
                c = n("<div>").css({
                  position: "absolute",
                  left: -1e4,
                  top: -1e4,
                }),
                f = u.wrapper
                  .clone()
                  .css({ height: "auto", width: "auto" })
                  .appendTo(c);
              return (
                f
                  .find(".k-grid-content")
                  .css({ height: "auto", width: "auto", overflow: "visible" }),
                f
                  .find('table[role="treeList"], .k-grid-footer table')
                  .css({ height: "auto", width: "100%", overflow: "visible" }),
                f
                  .find(".k-grid-pager, .k-grid-toolbar, .k-grouping-header")
                  .remove(),
                f
                  .find(".k-grid-header, .k-grid-footer")
                  .css({ paddingRight: 0 }),
                this._initPDFProgress(i),
                (a = f.find('table[role="treeList"] > tbody').empty()),
                (o = r.page()),
                h ? (r.bind("change", e), r.page(1)) : e(),
                s.promise()
              );
            }));
          f(!0, kendo.data, { TreeListDataSource: lt, TreeListModel: b });
          k.plugin(ft);
          k.plugin(fi);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("util/main.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function () {
          function r(n) {
            return n * n;
          }
          function u(n) {
            return "string" != typeof n && (n += "px"), n;
          }
          function f(t) {
            var r,
              i,
              u = [];
            if (t)
              for (r = n.toHyphens(t).split("-"), i = 0; i < r.length; i++)
                u.push("k-pos-" + r[i]);
            return u.join(" ");
          }
          function e(n) {
            for (
              var r = {
                  1: "i",
                  10: "x",
                  100: "c",
                  2: "ii",
                  20: "xx",
                  200: "cc",
                  3: "iii",
                  30: "xxx",
                  300: "ccc",
                  4: "iv",
                  40: "xl",
                  400: "cd",
                  5: "v",
                  50: "l",
                  500: "d",
                  6: "vi",
                  60: "lx",
                  600: "dc",
                  7: "vii",
                  70: "lxx",
                  700: "dcc",
                  8: "viii",
                  80: "lxxx",
                  800: "dccc",
                  9: "ix",
                  90: "xc",
                  900: "cm",
                  1e3: "m",
                },
                t = [
                  1e3, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70,
                  60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,
                ],
                i = "";
              n > 0;

            )
              n < t[0] ? t.shift() : ((i += r[t[0]]), (n -= t[0]));
            return i;
          }
          function o(n) {
            var f, i, r, u, t;
            for (
              n = n.toLowerCase(),
                f = { i: 1, v: 5, x: 10, l: 50, c: 100, d: 500, m: 1e3 },
                i = 0,
                r = 0,
                u = 0;
              u < n.length;
              ++u
            ) {
              if (((t = f[n.charAt(u)]), !t)) return null;
              i += t;
              t > r && (i -= 2 * r);
              r = t;
            }
            return i;
          }
          function s(n) {
            var t = Object.create(null);
            return function () {
              for (var i = "", r = arguments.length; --r >= 0; )
                i += ":" + arguments[r];
              return i in t ? t[i] : (t[i] = n.apply(this, arguments));
            };
          }
          function h(n) {
            return i.test(n);
          }
          function c(n, t) {
            function r(n) {
              this.value = n;
            }
            try {
              return n.call(t, function (n) {
                throw new r(n);
              });
            } catch (i) {
              if (i instanceof r) return i.value;
              throw i;
            }
          }
          var i,
            n = window.kendo,
            l = n.deepExtend,
            t = Date.now;
          t ||
            (t = function () {
              return new Date().getTime();
            });
          l(n, {
            util: {
              now: t,
              renderPos: f,
              renderSize: u,
              sqr: r,
              romanToArabic: o,
              arabicToRoman: e,
              memoize: s,
              isUnicodeLetter: h,
              withExit: c,
            },
          });
          i = RegExp(
            "[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"
          );
        })(),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("util/parse-xml.min", ["kendo.core.min", "util/main.min"], n);
  })(
    function () {
      "use strict";
      function n(n) {
        for (var i = [], t = 0; t < n.length; ++t) i.push(n.charCodeAt(t));
        return i;
      }
      function i(n, t) {
        t > 65535
          ? ((t -= 65536),
            n.push(((t >>> 10) & 1023) | 55296, 56320 | (1023 & t)))
          : n.push(t);
      }
      function o(n, o) {
        function ht(t) {
          var r = n[rt++];
          (240 & r) ^ 240
            ? (224 & r) ^ 224
              ? (192 & r) ^ 192
                ? t.push(r)
                : i(t, ((31 & r) << 6) | (63 & n[rt++]))
              : i(t, ((15 & r) << 12) | ((63 & n[rt++]) << 6) | (63 & n[rt++]))
            : i(
                t,
                ((3 & r) << 18) |
                  ((63 & n[rt++]) << 12) |
                  ((63 & n[rt++]) << 6) |
                  (63 & n[rt++])
              );
        }
        function ft(n) {
          throw Error(n + ", at " + rt);
        }
        function vt(t) {
          for (var i = []; rt < n.length && t(n[rt]); ) i.push(n[rt++]);
          return i;
        }
        function at(n) {
          return t.apply(0, vt(n));
        }
        function lt() {
          vt(gt);
        }
        function ut(t) {
          for (var r = rt, i = 0; i < t.length; ++i)
            if (n[rt++] != t[i]) return (rt = r), !1;
          return t;
        }
        function st(n) {
          ut(n) || ft("Expecting " + n.join(", "));
        }
        function gt(n) {
          return 9 == n || 10 == n || 13 == n || 32 == n;
        }
        function yt(n) {
          return n >= 48 && n <= 57;
        }
        function ni(n) {
          return (n >= 48 && n <= 57) || ((n |= 32) >= 97 && n <= 102);
        }
        function pt(n) {
          return 58 == n || 95 == n || ((n |= 32) >= 97 && n <= 122);
        }
        function ti(n) {
          return 45 == n || yt(n) || pt(n);
        }
        function ii() {
          for (var i = []; rt < n.length; ) {
            if (ut(l)) return et("comment", t.apply(0, i));
            ht(i);
          }
        }
        function wt() {
          var n, t;
          ut(w)
            ? fi()
            : ut(a)
            ? ii()
            : ((n = ct()),
              (t = kt(n)),
              ot.push(t),
              ut(v)
                ? et("enter", n, t, !0)
                : (st(u),
                  et("enter", n, t),
                  ri(n),
                  n != ct() && ft("Bad closing tag"),
                  et("leave", n, t),
                  lt(),
                  st(u)),
              ot.pop());
        }
        function ri(i) {
          for (var u = []; rt < n.length; ) {
            if (ut(y)) return u.length && et("text", t.apply(0, u));
            if (ut(h)) for (; rt < n.length && !ut(c); ) ht(u);
            else
              ut(r)
                ? (u.length && et("text", t.apply(0, u)), wt(), (u = []))
                : ut(f)
                ? bt(u)
                : ht(u);
          }
          ft("Unclosed tag " + i);
        }
        function ct() {
          return pt(n[rt]) || ft("Expecting XML name"), at(ti);
        }
        function ui() {
          var i,
            r = ut(d) || ut(g);
          for (r || ft("Expecting string"), i = []; rt < n.length; ) {
            if (ut(r)) return t.apply(0, i);
            ut(f) ? bt(i) : ht(i);
          }
          ft("Unfinished string");
        }
        function bt(n) {
          var t, r;
          ut(nt)
            ? ((t =
                ut(tt) || ut(it) ? parseInt(at(ni), 16) : parseInt(at(yt), 10)),
              isNaN(t) && ft("Bad numeric entity"))
            : ((r = ct()),
              (t = s[r]),
              void 0 === t && ft("Unknown entity " + r));
          i(n, t);
          st(b);
        }
        function fi() {
          et("decl", ct(), kt());
          st(p);
        }
        function kt(t) {
          for (
            var i, r = { $tag: t };
            rt < n.length && (lt(), (i = n[rt]), 63 != i && 62 != i && 47 != i);

          )
            r[ct()] = (st(k), ui());
          return r;
        }
        function et(n, t, i, r) {
          var u = o && o[n];
          u && u.call(ei, t, i, r);
        }
        var rt = 0,
          ot = [],
          ei = {
            is: function (n) {
              for (var i = ot.length, t = n.length; --i >= 0 && --t >= 0; )
                if (ot[i].$tag != n[t] && "*" != n[t]) return !1;
              return t < 0 ? ot[ot.length - 1] : null;
            },
            exit: function () {
              throw e;
            },
            stack: ot,
          },
          dt = [];
        for (ht(dt), 65279 != dt[0] && (rt = 0); rt < n.length; )
          lt(), st(r), wt(), lt();
      }
      var t = String.fromCharCode,
        s = { amp: 38, lt: 60, gt: 62, quot: 34, apos: 39, nbsp: 160 },
        h = n("<![CDATA["),
        c = n("]]>"),
        l = n("-->"),
        a = n("!--"),
        v = n("/>"),
        y = n("</"),
        p = n("?>"),
        w = n("?"),
        r = n("<"),
        u = n(">"),
        b = n(";"),
        k = n("="),
        f = n("&"),
        d = n('"'),
        g = n("'"),
        nt = n("#"),
        tt = n("x"),
        it = n("X"),
        e = {};
      kendo.util.parseXML = function () {
        try {
          return o.apply(this, arguments);
        } catch (n) {
          if (n !== e) throw n;
        }
      };
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/commands.min",
      [
        "kendo.core.min",
        "kendo.binder.min",
        "kendo.window.min",
        "kendo.list.min",
        "kendo.tabstrip.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        function l(n) {
          var t = document.createElement("textarea");
          u(t)
            .addClass("k-spreadsheet-clipboard")
            .val(n)
            .appendTo(document.body)
            .focus()
            .select();
          document.execCommand("copy");
          u(t).remove();
        }
        var u, i, t, f, o, e, r, a, s, h, c;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((u = n.jQuery),
          (i = {
            AUTO_FILL: "autoFill",
            CLEAR: "clear",
            CUT: "cut",
            EDIT: "edit",
            PASTE: "paste",
            VALIDATION: "validation",
          }),
          (t = n.spreadsheet.Command =
            n.Class.extend({
              init: function (n) {
                this.options = n;
                this._workbook = n.workbook;
                this._property = n && n.property;
                this._state = {};
              },
              range: function (n) {
                return void 0 !== n && this._setRange(n), this._range;
              },
              _setRange: function (n) {
                this._range = n;
              },
              redo: function () {
                this.range().select();
                this.exec();
              },
              undo: function () {
                this.setState(this._state);
              },
              getState: function () {
                this._state = this.range().getState(this._property);
              },
              setState: function (n) {
                this.range().setState(n);
              },
              rejectState: function (n) {
                return (
                  this.undo(),
                  {
                    title: n.title,
                    body: n.message,
                    reason: "error",
                    type: "validationError",
                  }
                );
              },
              _forEachCell: function (n) {
                var t = this.range(),
                  i = t._ref;
                i.forEach(
                  function (i) {
                    t.sheet().forEach(i.toRangeRef(), n.bind(this));
                  }.bind(this)
                );
              },
              usesImage: function () {
                return !1;
              },
            })),
          (n.spreadsheet.DrawingUpdateCommand = t.extend({
            init: function (n) {
              this._sheet = n.sheet;
              this._drawing = n.drawing;
              this._orig = this._drawing.clone();
              this._previous = n.previous;
            },
            exec: function () {},
            undo: function () {
              this._drawing.reset(this._previous);
              this._sheet._activeDrawing = this._drawing;
              this._sheet.triggerChange({ layout: !0 });
            },
            redo: function () {
              this._drawing.reset(this._orig);
              this._sheet._activeDrawing = this._drawing;
              this._sheet.triggerChange({ layout: !0 });
            },
            usesImage: function (n) {
              return (
                this._drawing.image === n ||
                this._orig.image === n ||
                this._previous.image === n
              );
            },
          })),
          (f = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this._drawing = n.drawing;
            },
            usesImage: function (n) {
              return this._drawing.image === n;
            },
          })),
          (n.spreadsheet.InsertImageCommand = f.extend({
            init: function (n) {
              f.fn.init.call(this, n);
              this._blob = n.blob;
              this._width = n.width;
              this._height = n.height;
            },
            exec: function () {
              var i = this.range(),
                u = i.sheet(),
                n = this._width,
                t = this._height,
                r = n / t;
              n > t
                ? ((n = Math.min(n, 300)), (t = n / r))
                : ((t = Math.min(t, 300)), (n = t * r));
              this._drawing = u.addDrawing(
                {
                  topLeftCell: i.topLeft(),
                  offsetX: 5,
                  offsetY: 5,
                  width: n,
                  height: t,
                  opacity: 1,
                  image: this._workbook.addImage(this._blob),
                },
                !0
              );
              this._blob = null;
            },
            undo: function () {
              var n = this.range().sheet();
              n._activeDrawing = null;
              n.removeDrawing(this._drawing);
            },
            redo: function () {
              var n = this.range().sheet();
              n._activeDrawing = this._drawing;
              n.addDrawing(this._drawing);
            },
          })),
          (n.spreadsheet.DeleteDrawingCommand = f.extend({
            exec: function () {
              var n = this.range().sheet();
              n._activeDrawing = null;
              n.removeDrawing(this._drawing);
            },
            undo: function () {
              var n = this.range().sheet();
              n._activeDrawing = this._drawing;
              n.addDrawing(this._drawing);
            },
            redo: function () {
              this.exec();
            },
          })),
          (o = f.extend({
            exec: function () {
              var n = this.range().sheet();
              this._origIndex = n._drawings.indexOf(this._drawing);
              n._drawings.splice(this._origIndex, 1);
              this._newIndex = this._reorder();
              n._drawings.splice(this._newIndex, 0, this._drawing);
              n.triggerChange({ drawings: !0 });
            },
            undo: function () {
              var n = this.range().sheet();
              n._drawings.splice(this._newIndex, 1);
              n._drawings.splice(this._origIndex, 0, this._drawing);
              n.triggerChange({ drawings: !0 });
            },
          })),
          (n.spreadsheet.BringToFrontCommand = o.extend({
            _reorder: function () {
              return this.range().sheet()._drawings.length;
            },
          })),
          (n.spreadsheet.SendToBackCommand = o.extend({
            _reorder: function () {
              return 0;
            },
          })),
          (e = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this._target = n.target;
              this._value = n.value;
            },
            exec: function () {
              this.getState();
              this.setState(this._value);
            },
          })),
          (n.spreadsheet.ColumnWidthCommand = e.extend({
            getState: function () {
              this._state = this.range().sheet().columnWidth(this._target);
            },
            setState: function (n) {
              this.range().sheet().columnWidth(this._target, n);
            },
          })),
          (n.spreadsheet.RowHeightCommand = e.extend({
            getState: function () {
              this._state = this.range().sheet().rowHeight(this._target);
            },
            setState: function (n) {
              this.range().sheet().rowHeight(this._target, n);
            },
          })),
          (n.spreadsheet.HyperlinkCommand = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this._link = n.link;
            },
            exec: function () {
              var n = this.range();
              this._prevLink = n.link();
              this._prevUnderline = n.underline();
              n.link(this._link);
              n.underline(!0);
              null == n.value() &&
                ((this._hasSetValue = !0), n.value(this._link));
            },
            undo: function () {
              var n = this.range();
              n.link(this._prevLink);
              n.underline(this._prevUnderline);
              this._hasSetValue && n.value(null);
            },
          })),
          (n.spreadsheet.GridLinesChangeCommand = e.extend({
            getState: function () {
              this._state = this._range.sheet().showGridLines();
            },
            setState: function (n) {
              this._range.sheet().showGridLines(n);
            },
          })),
          (r = n.spreadsheet.PropertyChangeCommand =
            t.extend({
              _setRange: function (n) {
                t.prototype._setRange.call(this, n.skipHiddenCells());
              },
              init: function (n) {
                t.fn.init.call(this, n);
                this._value = n.value;
              },
              exec: function () {
                var n = this.range();
                n.enable() &&
                  (this.getState(),
                  "format" === this.options.property &&
                    this._workbook.trigger("changeFormat", { range: n }),
                  n[this._property](this._value));
              },
            })),
          (n.spreadsheet.ClearContentCommand = t.extend({
            exec: function () {
              var n,
                r,
                u,
                f,
                e,
                t = [];
              return this.range().enable()
                ? this.range().canEditArrayFormula()
                  ? (this.getState(),
                    (n = this.range().skipHiddenCells()),
                    n._ref.refs && n._ref.refs.length > 1
                      ? n._ref.refs.forEach(function (i) {
                          e = n.sheet().range(i);
                          t = t.concat(e.values());
                        })
                      : (t = n.values()),
                    (u = []),
                    t.forEach(function (n) {
                      r = [];
                      n.forEach(function () {
                        r.push(null);
                      });
                      u.push(r);
                    }),
                    n
                      .sheet()
                      .trigger("changing", {
                        data: u,
                        range: n,
                        changeType: i.CLEAR,
                      })
                      ? void 0
                      : (n.clearContent(),
                        (f = n._getValidationState()),
                        f ? this.rejectState(f) : void 0))
                  : { reason: "error", type: "intersectsArray" }
                : { reason: "error", type: "cannotModifyDisabled" };
            },
            undo: function () {
              var n,
                t = this.range().skipHiddenCells(),
                u = t.sheet(),
                f = this._state.data,
                r = [];
              f.forEach(function (t) {
                n = [];
                t.forEach(function (t) {
                  n.push(t.value);
                });
                r.push(n);
              });
              u.trigger("changing", {
                data: r,
                range: t,
                changeType: i.CLEAR,
              }) || this.setState(this._state);
            },
          })),
          (n.spreadsheet.EditCommand = r.extend({
            init: function (n) {
              n.property = n.property || "input";
              r.fn.init.call(this, n);
            },
            _setRange: function (n) {
              r.prototype._setRange.apply(this, arguments);
              this._editRange = this.options.arrayFormula
                ? n
                : n.sheet().activeCellSelection();
            },
            getState: function () {
              this._state = this.range().getState();
            },
            exec: function () {
              return this.range()
                .sheet()
                .withCultureDecimals(this._exec.bind(this));
            },
            undo: function () {
              var n = this._editRange,
                t = this._state;
              n
                .sheet()
                .trigger("changing", {
                  data: t.data[0][0].value,
                  range: n,
                  changeType: i.EDIT,
                }) || this.setState(this._state);
            },
            _exec: function () {
              var r,
                f,
                e = this.options.arrayFormula,
                t = this._editRange;
              if (!t.enable())
                return { reason: "error", type: "rangeDisabled" };
              if (!t.canEditArrayFormula())
                return { reason: "error", type: "intersectsArray" };
              if (
                ((r = this._value),
                this.getState(),
                !this.range()
                  .sheet()
                  .trigger("changing", {
                    data: r,
                    range: this._editRange,
                    changeType: i.EDIT,
                  }))
              ) {
                if ("value" == this._property) return void t.value(r);
                try {
                  if (
                    (t.link(null),
                    "" === r
                      ? t.value(null)
                      : (t.input(r, { arrayFormula: e }),
                        /\n/.test(t.value()) && t.wrap(!0)),
                    t._adjustRowHeight(),
                    (f = t._getValidationState()))
                  )
                    return this.rejectState(f);
                } catch (u) {
                  if (u instanceof n.spreadsheet.calc.ParseError)
                    return {
                      title: "Error in formula",
                      body: u + "",
                      reason: "error",
                    };
                  throw u;
                }
              }
            },
          })),
          (n.spreadsheet.InsertCommentCommand = r.extend({
            init: function (n) {
              n.property = "comment";
              r.fn.init.call(this, n);
            },
          })),
          (n.spreadsheet.TextWrapCommand = r.extend({
            init: function (n) {
              n.property = "wrap";
              r.fn.init.call(this, n);
              this._value = n.value;
            },
            getState: function () {
              var n = {};
              this.range().forEachRow(function (t) {
                var i = t.topLeft().row;
                n[i] = t.sheet().rowHeight(i);
              });
              this._state = this.range().getState(this._property);
              this._rowHeight = n;
            },
            undo: function () {
              var n,
                i = this.range().sheet(),
                t = this._rowHeight;
              this.range().setState(this._state);
              for (n in t) i.rowHeight(n, t[n]);
            },
          })),
          (n.spreadsheet.AdjustDecimalsCommand = t.extend({
            init: function (n) {
              this._delta = n.value;
              n.property = "format";
              t.fn.init.call(this, n);
            },
            exec: function () {
              var t = this.range().sheet(),
                i = this._delta,
                r = n.spreadsheet.formatting;
              this.getState();
              t.batch(
                function () {
                  this.range().forEachCell(function (n, u, f) {
                    var o,
                      e = f.format;
                    e ||
                      ((o = f.value),
                      "number" == typeof o &&
                        /\./.test(o) &&
                        (e =
                          "0." + (o + "").split(".")[1].replace(/\d/g, "0")));
                    (e || i > 0) &&
                      ((e = r.adjustDecimals(e || "0", i)),
                      t.range(n, u).format(e));
                  });
                }.bind(this)
              );
            },
          })),
          (n.spreadsheet.BorderChangeCommand = t.extend({
            init: function (n) {
              n.property = "border";
              t.fn.init.call(this, n);
              this._type = n.border;
              this._style = n.style;
            },
            _batch: function (n) {
              return this.range().sheet().batch(n, {});
            },
            exec: function () {
              var n = this;
              n.getState();
              n._batch(function () {
                n[n._type](n._style);
              });
            },
            noBorders: function () {
              this.range().insideBorders(null);
              this.outsideBorders(null);
            },
            allBorders: function (n) {
              this.range().insideBorders(n);
              this.outsideBorders(n);
            },
            leftBorder: function (n) {
              this.range().leftColumn().borderLeft(n);
            },
            rightBorder: function (n) {
              this.range().rightColumn().borderRight(n);
            },
            topBorder: function (n) {
              this.range().topRow().borderTop(n);
            },
            bottomBorder: function (n) {
              this.range().bottomRow().borderBottom(n);
            },
            outsideBorders: function (n) {
              var t = this.range();
              t.leftColumn().borderLeft(n);
              t.topRow().borderTop(n);
              t.rightColumn().borderRight(n);
              t.bottomRow().borderBottom(n);
            },
            insideBorders: function (n) {
              this.range().insideBorders(n);
              this.outsideBorders(null);
            },
            insideHorizontalBorders: function (n) {
              this.range().insideHorizontalBorders(n);
            },
            insideVerticalBorders: function (n) {
              this.range().insideVerticalBorders(n);
            },
          })),
          (n.spreadsheet.MergeCellCommand = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this._type = n.value;
            },
            exec: function () {
              this.getState();
              this[this._type]();
            },
            activate: function (n) {
              this.range().sheet().activeCell(n);
            },
            getState: function () {
              this._state = this.range().getState();
            },
            undo: function () {
              "unmerge" !== this._type &&
                (this.range().unmerge(), this.activate(this.range().topLeft()));
              this.range().setState(this._state);
            },
            cells: function () {
              var n = this.range(),
                t = n._ref;
              n.merge();
              this.activate(t);
            },
            horizontally: function () {
              var n = this.range().topRow()._ref;
              this.range().forEachRow(function (n) {
                n.merge();
              });
              this.activate(n);
            },
            vertically: function () {
              var n = this.range().leftColumn()._ref;
              this.range().forEachColumn(function (n) {
                n.merge();
              });
              this.activate(n);
            },
            unmerge: function () {
              var n = this.range(),
                t = n._ref.topLeft;
              n.unmerge();
              this.activate(t);
            },
          })),
          (n.spreadsheet.FreezePanesCommand = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this._type = n.value;
            },
            exec: function () {
              this.getState();
              this._topLeft = this.range().topLeft();
              this[this._type]();
            },
            getState: function () {
              this._state = this.range().sheet().getState();
            },
            undo: function () {
              this.range().sheet().setState(this._state);
            },
            panes: function () {
              var n = this._topLeft,
                t = this.range().sheet();
              t.frozenColumns(n.col).frozenRows(n.row);
            },
            rows: function () {
              var n = this._topLeft,
                t = this.range().sheet();
              t.frozenRows(n.row);
            },
            columns: function () {
              var n = this._topLeft,
                t = this.range().sheet();
              t.frozenColumns(n.col);
            },
            unfreeze: function () {
              var n = this.range().sheet();
              n.frozenRows(0).frozenColumns(0);
            },
          })),
          (n.spreadsheet.PasteCommand = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this._clipboard = n.workbook.clipboard();
              this._clipboard.parse();
              this._event = n.event;
              this._clipboardContent = this._clipboard._content;
              this._clipboardPasteRef = this._clipboard.pasteRef();
              this._sheet = this._workbook.activeSheet();
              this._range = this._sheet.range(this._clipboard.pasteRef());
              this._state = this._range.getState();
            },
            exec: function () {
              return this.range()
                .sheet()
                .withCultureDecimals(this._exec.bind(this));
            },
            undo: function () {
              var n = this._sheet,
                t = n.range(this._clipboardPasteRef);
              n.trigger("changing", {
                data: this._state.data,
                range: t,
                changeType: i.PASTE,
              }) || this.setState(this._state);
            },
            _exec: function () {
              var t,
                n = this._clipboard.canPaste();
              return n.canPaste
                ? ((t = this._sheet.range(this._clipboardPasteRef)),
                  this._workbook.trigger("paste", {
                    range: t,
                    clipboardContent: this._clipboardContent,
                  }) ||
                  this._sheet.trigger("changing", {
                    data: this._clipboardContent.data,
                    range: t,
                    changeType: i.PASTE,
                  })
                    ? void this._event.preventDefault()
                    : (this._sheet
                        .range(this._clipboardPasteRef)
                        .setState(this._clipboardContent, this._clipboard),
                      void t._adjustRowHeight()))
                : n.menuInvoked
                ? { reason: "error", type: "useKeyboard" }
                : n.pasteOnMerged
                ? { reason: "error", type: "modifyMerged" }
                : n.overflow
                ? { reason: "error", type: "overflow" }
                : n.pasteOnDisabled
                ? (this._event.preventDefault(),
                  { reason: "error", type: "cannotModifyDisabled" })
                : { reason: "error" };
            },
          })),
          (n.spreadsheet.AdjustRowHeightCommand = t.extend({
            exec: function () {
              var n = this.options,
                t = this._workbook.activeSheet(),
                i = n.range || t.range(n.rowIndex);
              i._adjustRowHeight();
            },
          })),
          (n.spreadsheet.ToolbarPasteCommand = t.extend({
            exec: function () {
              return n.support.clipboard.paste
                ? (this._workbook._view.clipboard.focus().select(),
                  void document.execCommand("paste"))
                : { reason: "error", type: "useKeyboard" };
            },
          })),
          (n.spreadsheet.CutCommand = t.extend({
            _eventType: "cut",
            init: function (n) {
              t.fn.init.call(this, n);
              this._clipboard = n.workbook.clipboard();
              this._event = n.event;
            },
            exec: function () {
              var u,
                t,
                n,
                r = this._clipboard.canCopy(),
                f = [];
              if (r.canCopy) {
                if (
                  ((n = this._workbook.activeSheet().selection()),
                  "cut" == this._eventType)
                ) {
                  if (!n.enable())
                    return (
                      this._event.preventDefault(),
                      { reason: "error", type: "cannotModifyDisabled" }
                    );
                  this.getState();
                }
                if (this._workbook.trigger(this._eventType, { range: n }))
                  this._event.preventDefault();
                else if ("cut" == this._eventType) {
                  if (
                    ((u = n.values()),
                    u.forEach(function (n) {
                      t = [];
                      n.forEach(function () {
                        t.push({});
                      });
                      f.push(t);
                    }),
                    n
                      .sheet()
                      .trigger("changing", {
                        data: f,
                        range: n,
                        changeType: i.CUT,
                      }))
                  )
                    return;
                  this._clipboard.cut();
                } else this._clipboard.copy();
              } else {
                if (r.menuInvoked)
                  return { reason: "error", type: "useKeyboard" };
                if (r.multiSelection)
                  return { reason: "error", type: "unsupportedSelection" };
              }
            },
            undo: function () {
              var n = this.range();
              n
                .sheet()
                .trigger("changing", {
                  data: this._state.data,
                  range: n,
                  changeType: i.CUT,
                }) || this.setState(this._state);
            },
          })),
          (n.spreadsheet.CopyCommand = n.spreadsheet.CutCommand.extend({
            _eventType: "copy",
            undo: u.noop,
          })),
          (n.spreadsheet.ToolbarCopyCommand = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this._clipboard = n.workbook.clipboard();
            },
            undo: u.noop,
            exec: function () {
              if (!n.support.clipboard.copy)
                return { reason: "error", type: "useKeyboard" };
              var t = this._workbook._view.clipboard;
              l(t.html());
              t.trigger("copy");
            },
          })),
          (n.spreadsheet.AutoFillCommand = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
            },
            origin: function (n) {
              this._origin = n;
            },
            exec: function () {
              var t,
                r = this.range();
              if (!r.enable())
                return { reason: "error", type: "rangeDisabled" };
              if (r.intersectingArrayFormula())
                return { reason: "error", type: "intersectsArray" };
              this.getState();
              try {
                if (
                  ((t = r._previewFillFrom(this._origin)),
                  r
                    .sheet()
                    .trigger("changing", {
                      data: t.props,
                      range: t.dest,
                      changeType: i.AUTO_FILL,
                    }))
                )
                  return;
                t.dest._properties(t.props, !0);
              } catch (u) {
                if (u instanceof n.spreadsheet.Range.FillError)
                  return { reason: "error", type: u.code };
                throw u;
              }
            },
            undo: function () {
              var n = this.range(),
                t = this._state;
              n
                .sheet()
                .trigger("changing", {
                  data: t.data,
                  range: n,
                  changeType: i.AUTO_FILL,
                }) || this.setState(this._state);
            },
          })),
          (n.spreadsheet.ToolbarCutCommand = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this._clipboard = n.workbook.clipboard();
            },
            exec: function () {
              if (!n.support.clipboard.copy)
                return { reason: "error", type: "useKeyboard" };
              var t = this._workbook._view.clipboard;
              l(t.html());
              t.trigger("cut");
            },
          })),
          (n.spreadsheet.FilterCommand = t.extend({
            undo: function () {
              this.range().filter(this._state);
            },
            exec: function () {
              var n = this.range();
              this._state = n.hasFilter();
              n.filter(!this._state);
            },
          })),
          (n.spreadsheet.SortCommand = t.extend({
            undo: function () {
              var n = this.range().sheet();
              n.setState(this._state);
            },
            exec: function () {
              var t,
                n = this.range(),
                i = n.sheet(),
                r = i.activeCell(),
                u = this.options.sheet
                  ? r.topLeft.col
                  : this.options.column || 0,
                f = "asc" === this.options.value;
              return (
                (this._state = i.getState()),
                this.options.sheet && (n = this.expandRange()),
                (t = n.cantSort())
                  ? { reason: "error", type: t.code }
                  : void n.sort({ column: u, ascending: f })
              );
            },
            expandRange: function () {
              var t = this.range().sheet();
              return new n.spreadsheet.Range(t._sheetRef, t);
            },
          })),
          (a = n.spreadsheet.ApplyFilterCommand =
            t.extend({
              column: function () {
                return this.options.column || 0;
              },
              undo: function () {
                var n = this.range().sheet();
                n.clearFilter(this.column());
                this._state.length && this.range().filter(this._state);
              },
              getState: function () {
                var t = this.range().sheet(),
                  n = t.filter();
                n &&
                  (this._state = n.columns.filter(
                    function (n) {
                      return n.index == this.column();
                    }.bind(this)
                  ));
              },
              exec: function () {
                var r,
                  t,
                  f = this.range(),
                  u = this.column(),
                  i = f.sheet().filter(),
                  e = !1;
                this.options.valueFilter
                  ? (t = {
                      column: u,
                      filter: new n.spreadsheet.ValueFilter(
                        this.options.valueFilter
                      ),
                    })
                  : this.options.customFilter &&
                    (t = {
                      column: u,
                      filter: new n.spreadsheet.CustomFilter(
                        this.options.customFilter
                      ),
                    });
                this.getState();
                i && i.ref.eq(f._ref) && i.columns.length
                  ? (i.columns.forEach(function (n) {
                      n.index === u && (e = !0);
                    }),
                    (r = i.columns.map(function (n) {
                      return n.index === u
                        ? t
                        : { column: n.index, filter: n.filter };
                    })),
                    e || r.push(t))
                  : (r = t);
                f.filter(r);
              },
            })),
          (n.spreadsheet.ClearFilterCommand = a.extend({
            exec: function () {
              var n = this.range(),
                t = this.column();
              this.getState();
              n.clearFilter(t);
            },
          })),
          (n.spreadsheet.HideLineCommand = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this.axis = n.axis;
            },
            undo: function () {
              var n = this.range().sheet();
              n.setAxisState(this._state);
            },
            exec: function () {
              var n = this.range().sheet();
              this._state = n.getAxisState();
              "row" == this.axis
                ? n.axisManager().hideSelectedRows()
                : n.axisManager().hideSelectedColumns();
            },
          })),
          (n.spreadsheet.UnHideLineCommand =
            n.spreadsheet.HideLineCommand.extend({
              exec: function () {
                var n = this.range().sheet();
                this._state = n.getAxisState();
                "row" == this.axis
                  ? n.axisManager().unhideSelectedRows()
                  : n.axisManager().unhideSelectedColumns();
              },
            })),
          (s = t.extend({
            exec: function () {
              this._expandedRange = this._expand(this.range());
              this._state = this._expandedRange.getState();
              this._indexes = this._exec(this._expandedRange.sheet());
            },
            undo: function () {
              var n = this,
                t = n._expandedRange,
                i = t.sheet();
              i.batch(
                function () {
                  n._indexes.forEach(function (t) {
                    n._undoOne(i, t);
                    i._restoreModifiedFormulas(t.formulas);
                  });
                  t.setState(n._state);
                },
                { layout: !0, recalc: !0, ref: t._ref }
              );
            },
          })),
          (n.spreadsheet.DeleteRowCommand = s.extend({
            _expand: function (n) {
              return n.resize({ left: -(1 / 0), right: +(1 / 0) });
            },
            _exec: function (n) {
              return n.axisManager().deleteSelectedRows();
            },
            _undoOne: function (n, t) {
              n.insertRow(t.index);
              n.rowHeight(t.index, t.height);
            },
          })),
          (n.spreadsheet.DeleteColumnCommand = s.extend({
            _expand: function (n) {
              return n.resize({ top: -(1 / 0), bottom: +(1 / 0) });
            },
            _exec: function (n) {
              return n.axisManager().deleteSelectedColumns();
            },
            _undoOne: function (n, t) {
              n.insertColumn(t.index);
              n.columnWidth(t.index, t.width);
            },
          })),
          (h = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this._value = n.value;
            },
            undo: function () {
              var n = this,
                t = n.range().sheet();
              t.batch(
                function () {
                  for (var i = n._pos.count; --i >= 0; )
                    n._undoOne(t, n._pos.base);
                },
                { layout: !0, recalc: !0 }
              );
            },
          })),
          (n.spreadsheet.AddColumnCommand = h.extend({
            exec: function () {
              var n = this.range().sheet(),
                t = n.axisManager().preventAddColumn();
              return t
                ? t
                : void (this._pos =
                    "left" === this._value
                      ? n.axisManager().addColumnLeft()
                      : n.axisManager().addColumnRight());
            },
            _undoOne: function (n, t) {
              n.deleteColumn(t);
            },
          })),
          (n.spreadsheet.AddRowCommand = h.extend({
            exec: function () {
              var n = this.range().sheet(),
                t = n.axisManager().preventAddRow();
              return t
                ? t
                : void (this._pos =
                    "above" === this._value
                      ? n.axisManager().addRowAbove()
                      : n.axisManager().addRowBelow());
            },
            _undoOne: function (n, t) {
              n.deleteRow(t);
            },
          })),
          (n.spreadsheet.EditValidationCommand = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this._value = n.value;
            },
            exec: function () {
              var n = this,
                t = n.range().sheet();
              this.getState();
              t.trigger("changing", {
                data: n._value,
                range: n.range(),
                changeType: i.VALIDATION,
              }) ||
                t.withCultureDecimals(function () {
                  n.range().validation(n._value);
                });
            },
            undo: function () {
              var n = this.range(),
                t = this._state;
              n
                .sheet()
                .trigger("changing", {
                  data: t.data[0][0].validation,
                  range: n,
                  changeType: i.VALIDATION,
                }) || this.setState(this._state);
            },
          })),
          (n.spreadsheet.OpenCommand = t.extend({
            cannotUndo: !0,
            exec: function () {
              var n,
                t = this.options.file;
              return null === t.name.match(/.xlsx$/i)
                ? { reason: "error", type: "openUnsupported" }
                : ((n = this.options.workbook),
                  void n.fromFile(this.options.file).then(function () {
                    var t = n.excelImportErrors;
                    t &&
                      t.length &&
                      n._view.openDialog("importError", { errors: t });
                  }));
            },
          })),
          (n.spreadsheet.SaveAsCommand = t.extend({
            cannotUndo: !0,
            exec: function () {
              var n = this.options.name + this.options.extension;
              ".xlsx" === this.options.extension
                ? this.options.workbook.saveAsExcel({ fileName: n })
                : ".pdf" === this.options.extension &&
                  this.options.workbook.saveAsPDF(
                    u.extend(this.options.pdf, {
                      workbook: this.options.workbook,
                      fileName: n,
                    })
                  );
            },
          })),
          (c = t.extend({
            init: function (n) {
              t.fn.init.call(this, n);
              this._name = n.name;
              this._value = n.value;
            },
            getState: function () {
              this._state = this._workbook.nameDefinition(this._name);
            },
            setState: function () {
              this._workbook.nameDefinition(this._name, this._state);
              this._workbook.trigger("change", { recalc: !0 });
            },
          })),
          (n.spreadsheet.DefineNameCommand = c.extend({
            exec: function () {
              this.getState();
              try {
                this._workbook.defineName(this._name, this._value);
                this._workbook.trigger("change", { recalc: !0 });
              } catch (n) {
                return { title: "Error", body: n + "", reason: "error" };
              }
            },
          })),
          (n.spreadsheet.DeleteNameCommand = c.extend({
            exec: function () {
              this.getState();
              this._workbook.undefineName(this._name);
              this._workbook.trigger("change", { recalc: !0 });
            },
          })));
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/formulabar.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        var i, r, t;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((i = n.jQuery),
          (r = { wrapper: "k-spreadsheet-formula-bar" }),
          (t = n.ui.Widget.extend({
            init: function (r, u) {
              n.ui.Widget.call(this, r, u);
              r = this.element.addClass(t.classNames.wrapper);
              this.formulaInput = new n.spreadsheet.FormulaInput(
                i("<div/>").appendTo(r)
              );
            },
            destroy: function () {
              this.formulaInput && this.formulaInput.destroy();
              this.formulaInput = null;
            },
          })),
          (n.spreadsheet.FormulaBar = t),
          i.extend(!0, t, { classNames: r }));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/formulainput.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n, t) {
        function s(n) {
          return "(" == n || "[" == n || "{" == n;
        }
        function v(n) {
          return ")" == n || "]" == n || "}" == n;
        }
        function y(n, t) {
          return "(" == t
            ? ")" == n
            : "[" == t
            ? "]" == n
            : "{" == t && "}" == n;
        }
        function r(n, t) {
          return n.begin <= t.begin && n.end >= t.end;
        }
        function p(t) {
          return n.spreadsheet.calc.runtime.FUNCS[t.toLowerCase()];
        }
        function w(n, t) {
          return (
            !(!n || !t) &&
            ("ref" == n.type && "ref" == t.type
              ? n.ref.eq(t.ref)
              : n.value === t.value)
          );
        }
        var u, e, o, i, h, c, l, a, f;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((u = n.jQuery),
          (e = n.ui.Widget),
          (o = ".kendoFormulaInput"),
          (i = n.keys),
          (h = {
            wrapper: "k-spreadsheet-formula-input",
            listWrapper: "k-spreadsheet-formula-list",
          }),
          (c = [
            "font-family",
            "font-size",
            "font-stretch",
            "font-style",
            "font-weight",
            "letter-spacing",
            "text-transform",
            "line-height",
          ]),
          (l = {
            27: "esc",
            37: "left",
            39: "right",
            35: "end",
            36: "home",
            32: "spacebar",
          }),
          (a = /(^_|[^a-z0-9]$)/i),
          (f = e.extend({
            init: function (n, t) {
              e.call(this, n, t);
              n = this.element;
              n.addClass(f.classNames.wrapper)
                .attr("contenteditable", !0)
                .attr("spellcheck", !1)
                .css("white-space", "pre");
              this.options.autoScale && n.on("input", this.scale.bind(this));
              this._highlightedRefs = [];
              this._staticTokens = [];
              this._formulaSource();
              this._formulaList();
              this._popup();
              this._tooltip();
              n.on("keydown", this._keydown.bind(this))
                .on("keyup", this._keyup.bind(this))
                .on("blur", this._blur.bind(this))
                .on("input click", this._input.bind(this))
                .on("focus", this._focus.bind(this))
                .on("paste", this._paste.bind(this));
            },
            options: {
              name: "FormulaInput",
              autoScale: !1,
              filterOperator: "startswith",
              scalePadding: 30,
              minLength: 1,
            },
            events: ["keyup", "focus"],
            enable: function (n) {
              return void 0 === n
                ? "true" === this.element.attr("contenteditable")
                : (n
                    ? this.element.attr("contenteditable", n)
                    : this.element.removeAttr("contenteditable"),
                  void this.element.toggleClass("k-state-disabled", !n));
            },
            getPos: function () {
              function u(n, t) {
                try {
                  !(function i(r) {
                    if (r === n) throw t;
                    if (1 == r.nodeType)
                      for (var u = r.firstChild; u; u = u.nextSibling) i(u);
                    else 3 == r.nodeType && (t += r.nodeValue.length);
                  })(e);
                } catch (r) {
                  return r;
                }
              }
              var f,
                e = this.element[0],
                r = t.getSelection(),
                n = u(r.focusNode, r.focusOffset),
                i = u(r.anchorNode, r.anchorOffset);
              if (null != n && null != i)
                return (
                  n > i && ((f = n), (n = i), (i = f)),
                  { begin: n, end: i, collapsed: n == i }
                );
            },
            setPos: function (n, i) {
              function s(n, t) {
                return (
                  n.startOffset != t.startOffset ||
                  n.endOffset != t.endOffset ||
                  n.startContainer != t.endContainer ||
                  n.endContainer != t.endContainer
                );
              }
              function f(n, t) {
                try {
                  !(function i(n) {
                    var u, r;
                    if (3 == n.nodeType) {
                      if (((u = n.nodeValue.length), u >= t)) throw n;
                      t -= u;
                    } else if (1 == n.nodeType)
                      for (r = n.firstChild; r; r = r.nextSibling) i(r);
                  })(n);
                } catch (r) {
                  return { node: r, pos: t };
                }
              }
              var r,
                u,
                e,
                o = this.element[0];
              n = f(o, n);
              i = null != i ? f(o, i) : n;
              n &&
                i &&
                ((r = document.createRange()),
                r.setStart(n.node, n.pos),
                r.setEnd(i.node, i.pos),
                (u = t.getSelection()),
                (e = u.getRangeAt(0)),
                s(r, e) && (u.removeAllRanges(), u.addRange(r)));
            },
            end: function () {
              this.setPos(this.length());
            },
            home: function () {
              this.setPos(0);
            },
            select: function () {
              this.setPos(0, this.length());
            },
            length: function () {
              return this.value().length;
            },
            _formulaSource: function () {
              var t,
                i,
                r = [];
              for (i in n.spreadsheet.calc.runtime.FUNCS)
                a.test(i) ||
                  ((t = i.toUpperCase()), r.push({ value: t, text: t }));
              this.formulaSource = new n.data.DataSource({ data: r });
            },
            _formulaList: function () {
              this.list = new n.ui.StaticList(
                u("<ul />")
                  .addClass(f.classNames.listWrapper)
                  .insertAfter(this.element),
                {
                  autoBind: !1,
                  selectable: !0,
                  change: this._formulaListChange.bind(this),
                  dataSource: this.formulaSource,
                  dataValueField: "value",
                  template: "#:data.value#",
                }
              );
              this.list.element.on("mousedown", function (n) {
                n.preventDefault();
              });
            },
            _formulaListChange: function () {
              var t,
                i,
                r,
                n = this._tokenContext();
              n &&
                !this._mute &&
                ((t = n.token),
                (i = this.list.value()[0]),
                (r = { replace: !0, token: t, end: t.end }),
                (n.nextToken && "(" == n.nextToken.value) || (i += "("),
                this._replaceAt(r, i),
                this.popup.close());
            },
            _popup: function () {
              this.popup = new n.ui.Popup(this.list.element, {
                anchor: this.element,
              });
            },
            _blur: function () {
              this.popup.close();
              clearTimeout(this._focusId);
              this.trigger("blur");
            },
            _isFormula: function () {
              return /^=/.test(this.value());
            },
            _keydown: function (n) {
              var t = n.keyCode;
              l[t]
                ? (this.popup.close(), (this._navigated = !0))
                : this._move(t) && ((this._navigated = !0), n.preventDefault());
              this._keyDownTimeout = setTimeout(
                this._syntaxHighlight.bind(this)
              );
            },
            _keyup: function () {
              var n,
                t = this.popup;
              this._isFormula() &&
                !this._navigated &&
                ((n = ((this._tokenContext() || {}).token || {}).value),
                this.filter(n),
                n && this.formulaSource.view().length
                  ? (t[t.visible() ? "position" : "open"](),
                    this.list.focusFirst())
                  : t.close());
              this._navigated = !1;
              this._syntaxHighlight();
              this.trigger("keyup");
            },
            _input: function () {
              this._syntaxHighlight();
            },
            _focus: function () {
              setTimeout(this._sync.bind(this));
              this._focusTimeout = setTimeout(this._syntaxHighlight.bind(this));
              this.trigger("focus");
            },
            _paste: function (i) {
              var u, f, r;
              i.preventDefault();
              u = this.getPos();
              f = n.support.browser.msie
                ? t.clipboardData.getData("Text")
                : i.originalEvent.clipboardData.getData("text/plain");
              r = this.value();
              r = r.substr(0, u.begin) + f + r.substr(u.end);
              this.value(r);
              this.setPos(u.begin + f.length);
              this.scale();
            },
            _move: function (n) {
              var t = this.list,
                r = this.popup;
              if (r.visible()) {
                if (n === i.DOWN)
                  return t.focusNext(), t.focus() || t.focusFirst(), !0;
                if (n === i.UP)
                  return t.focusPrev(), t.focus() || t.focusLast(), !0;
                if (n === i.ENTER || n === i.TAB)
                  return t.select(t.focus()), r.close(), !0;
                if (n === i.PAGEUP) return t.focusFirst(), !0;
                if (n === i.PAGEDOWN) return t.focusLast(), !0;
              }
              return n === i.ENTER || n === i.TAB;
            },
            _tokenContext: function () {
              var i,
                u,
                t,
                f = this.getPos(),
                e = this.value();
              if (!e || !f || !f.collapsed) return null;
              for (
                i = n.spreadsheet.calc.tokenize(e, this.row(), this.col()),
                  t = 0;
                t < i.length;
                ++t
              )
                if (((u = i[t]), r(u, f) && /^(?:str|sym|func)$/.test(u.type)))
                  return { token: u, nextToken: i[t + 1] };
              return null;
            },
            _sync: function () {
              this._editorToSync &&
                this.isActive() &&
                this._editorToSync.value(this.value());
            },
            _textContainer: function () {
              var t = n.getComputedStyles(this.element[0], c);
              t.position = "absolute";
              t.visibility = "hidden";
              t.whiteSpace = "pre";
              t.top = -3333;
              t.left = -3333;
              this._span = u("<span style='white-space: pre'/>")
                .css(t)
                .insertAfter(this.element);
            },
            _tooltip: function () {
              this._cellTooltip = u(
                '<div class="k-widget k-tooltip" style="position:absolute; display:none">A1</div>'
              ).insertAfter(this.element);
            },
            tooltip: function (n) {
              this._cellTooltip.text(n);
            },
            toggleTooltip: function (n) {
              this._cellTooltip.toggle(n);
            },
            isActive: function () {
              return this.element[0] === n._activeElement();
            },
            filter: function (n) {
              !n ||
                n.length < this.options.minLength ||
                ((this._mute = !0),
                this.list.select(-1),
                (this._mute = !1),
                this.formulaSource.filter({
                  field: this.list.options.dataValueField,
                  operator: this.options.filterOperator,
                  value: n,
                }));
            },
            hide: function () {
              this.enable(!1);
              this.element.hide();
              this._cellTooltip.hide();
            },
            show: function () {
              this.enable(!0);
              this.element.show();
            },
            row: function () {
              if (this.activeCell) return this.activeCell.row;
            },
            col: function () {
              if (this.activeCell) return this.activeCell.col;
            },
            position: function (n) {
              n &&
                (this.show(),
                this.element.css({
                  top: n.top + 1 + "px",
                  left: n.left + 1 + "px",
                }),
                this._cellTooltip.css({
                  top: n.top - this._cellTooltip.height() - 10 + "px",
                  left: n.left,
                }));
            },
            resize: function (n) {
              n &&
                this.element.css({ width: n.width - 1, height: n.height - 1 });
            },
            canInsertRef: function (n) {
              var t,
                i = this._canInsertRef(n),
                r = i && i.token;
              if (r)
                for (t = 0; t < this._staticTokens.length; t++)
                  if (w(r, this._staticTokens[t])) return null;
              return i;
            },
            _canInsertRef: function (t) {
              function c(n) {
                return n.begin > i.begin;
              }
              function l(n) {
                if (n) {
                  if (/^(?:num|str|bool|sym|ref)$/.test(n.type))
                    return { replace: !0, token: n, end: n.end };
                  if (/^(?:op|punc|startexp)$/.test(n.type))
                    return n.end == i.end ? o(n, f[u + 1]) : o(f[u - 1], n);
                }
              }
              function o(n, t) {
                if (null == n) return null;
                if (null == t)
                  return /^(?:op|startexp)$/.test(n.type) || s(n.value)
                    ? { token: n, end: i.end }
                    : null;
                if (h) {
                  if ("op" == n.type && /^(?:punc|op)$/.test(t.type))
                    return { token: n, end: i.end };
                } else {
                  if ("startexp" == n.type) return { token: n, end: i.end };
                  if (/^(?:op|punc)$/.test(n.type) && /^[,;({]$/.test(n.value))
                    return { token: n, end: i.end };
                  if (/^(?:ref|sym)/.test(n.type))
                    return { token: n, replace: !0, end: n.end };
                  if (/^(?:ref|sym)/.test(t.type))
                    return { token: t, replace: !0, end: t.end };
                }
                return !1;
              }
              var h, i, f, e, u;
              if (this.popup.visible()) return null;
              if (((h = t), (i = this.getPos()), i && this._isFormula())) {
                if (0 === i.begin) return null;
                for (
                  f = n.spreadsheet.calc.tokenize(
                    this.value(),
                    this.row(),
                    this.col()
                  ),
                    u = 0;
                  u < f.length;
                  ++u
                ) {
                  if (((e = f[u]), r(e, i))) return l(e);
                  if (c(e)) return o(f[u - 1], e);
                }
                return o(e, null);
              }
              return null;
            },
            refAtPoint: function (n) {
              var t,
                i = this._canInsertRef();
              i &&
                ((t = n.selection()._ref.simplify().clone().relative(0, 0, 3)),
                n !== this.activeSheet && (t = t.setSheet(n.name(), !0)),
                this._replaceAt(i, t.print(0, 0)));
            },
            _replaceAt: function (n, t) {
              var r,
                i = this.value(),
                u = n.token,
                f = i.substr(n.end);
              i = i.substr(0, n.replace ? u.begin : n.end) + t;
              r = i.length;
              i += f;
              this._value(i);
              this.setPos(r);
              this.scale();
              this._syntaxHighlight();
            },
            syncWith: function (t) {
              var u,
                i = this,
                r = "input" + o,
                f = i._sync.bind(i);
              n.support.browser.msie &&
                ((r = "keydown" + o),
                (u = function () {
                  setTimeout(f);
                }));
              i._editorToSync = t;
              i.element.off(r).on(r, u || f);
            },
            scale: function () {
              var t,
                i,
                n = this.element;
              this._span || this._textContainer();
              this._span.html(n.html());
              t = this._span.width() + this.options.scalePadding;
              i = this._span.height();
              t > n.width() && n.width(t);
              i > n.height() && n.height(i);
              this._sync();
            },
            _value: function (n) {
              this.element.text(n);
            },
            value: function (n) {
              if (void 0 === n) {
                var t = this.element[0].innerText;
                return t.replace(/\n$/, "");
              }
              this._value(n);
              this._syntaxHighlight();
            },
            highlightedRefs: function () {
              return this._highlightedRefs.slice();
            },
            _syntaxHighlight: function () {
              var f,
                t = this.getPos(),
                i = this.value(),
                e = n.spreadsheet.Pane.classNames.series,
                o = [],
                c = 0,
                h = [],
                u = [];
              if (!t || t.collapsed) {
                if (!/^=/.test(i))
                  return (
                    (this._staticTokens.length ||
                      this._highlightedRefs.length) &&
                      ((this._staticTokens = []),
                      (this._highlightedRefs = []),
                      this.element.text(i)),
                    void (this.popup && this.popup.close())
                  );
                u = n.spreadsheet.calc.tokenize(i, this.row(), this.col());
                u.forEach(function (n) {
                  if (
                    ((n.active = !1),
                    (n.cls = ["k-syntax-" + n.type]),
                    "ref" == n.type &&
                      ((n.colorClass = e[c++ % e.length]),
                      n.cls.push(n.colorClass),
                      o.push(n)),
                    t && "punc" == n.type)
                  )
                    if (s(n.value)) h.unshift(n);
                    else if (v(n.value)) {
                      var i = h.shift();
                      i
                        ? y(n.value, i.value)
                          ? (r(n, t) || r(i, t)) &&
                            (n.cls.push("k-syntax-paren-match"),
                            i.cls.push("k-syntax-paren-match"))
                          : (n.cls.push("k-syntax-error"),
                            i.cls.push("k-syntax-error"))
                        : n.cls.push("k-syntax-error");
                    }
                  t &&
                    r(n, t) &&
                    (n.cls.push("k-syntax-at-point"), (n.active = !0), (f = n));
                  "func" != n.type ||
                    p(n.value) ||
                    (t && r(n, t)) ||
                    n.cls.push("k-syntax-error");
                });
                u.reverse().forEach(function (t) {
                  var r = t.begin,
                    u = t.end,
                    f = n.htmlEncode(i.substring(r, u));
                  i =
                    i.substr(0, r) +
                    "<span class='" +
                    t.cls.join(" ") +
                    "'>" +
                    f +
                    "</span>" +
                    i.substr(u);
                });
                this.element.html(i);
                t && this.setPos(t.begin, t.end);
                f &&
                  /^(?:startexp|op|punc)$/.test(f.type) &&
                  this._setStaticTokens(u);
                this._highlightedRefs = o;
              }
            },
            _setStaticTokens: function (n) {
              var t, i;
              for (this._staticTokens = [], t = 0; t < n.length; t++)
                (i = n[t]),
                  /^(?:num|str|bool|sym|ref)$/.test(i.type) &&
                    this._staticTokens.push(i);
            },
            destroy: function () {
              this._editorToSync = null;
              this.element.off(o);
              clearTimeout(this._focusTimeout);
              clearTimeout(this._keyDownTimeout);
              this._cellTooltip = null;
              this._span = null;
              this.popup.destroy();
              this.popup = null;
              e.fn.destroy.call(this);
            },
            insertNewline: function () {
              var n = this.value(),
                t = this.getPos(),
                i = t.end == n.length;
              n = n.substr(0, t.begin) + (i ? "\n\n" : "\n" + n.substr(t.end));
              this.value(n);
              this.setPos(t.begin + 1);
            },
          })),
          (n.spreadsheet.FormulaInput = f),
          u.extend(!0, f, { classNames: h }));
      })(kendo, window);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/eventlistener.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        var t, i, r, u, f, e;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((t = n.jQuery),
          (i = {
            8: "backspace",
            9: "tab",
            13: "enter",
            27: "esc",
            37: "left",
            38: "up",
            39: "right",
            40: "down",
            35: "end",
            36: "home",
            32: "spacebar",
            33: "pageup",
            34: "pagedown",
            46: "delete",
            113: ":edit",
          }),
          (r = navigator.platform.toUpperCase().indexOf("MAC") >= 0),
          (u = function (n) {
            return (
              (n > 47 && n < 58) ||
              (n > 64 && n < 91) ||
              (n > 95 && n < 112) ||
              (n > 185 && n < 193) ||
              (n > 218 && n < 223) ||
              229 === n
            );
          }),
          (f = function (n) {
            var r = n.keyCode,
              t = i[r];
            return (
              !t && u(r) && (t = ":alphanum"),
              !t && n.key && 1 == n.key.length && (t = ":alphanum"),
              t
            );
          }),
          (e = n.Class.extend({
            init: function (n, i, r) {
              if (
                ((this._handlers = {}),
                (this.target = n),
                (this._observer = i || window),
                (this.keyDownProxy = this.keyDown.bind(this)),
                (this.mouseProxy = this.mouse.bind(this)),
                (this.touchProxy = this.touch.bind(this)),
                (this.threshold = 5),
                (this._pressLocation = null),
                n.on("keydown", this.keyDownProxy),
                n.on(
                  "contextmenu mousedown cut copy paste scroll wheel click dblclick focus",
                  this.mouseProxy
                ),
                n.on("touchmove touchend", this.touchProxy),
                t(document.documentElement).on(
                  "mousemove mouseup",
                  this.mouseProxy
                ),
                t(document.documentElement).on(
                  "touchmove touchend",
                  this.touchProxy
                ),
                r)
              )
                for (var u in r) this.on(u, r[u]);
            },
            keyDown: function (n) {
              this.handleEvent(n, f(n.originalEvent));
            },
            touch: function (n) {
              this.handleEvent(n, n.type);
            },
            mouse: function (n) {
              var i, t, r, u, f;
              n.which ? (i = 3 == n.which) : n.button && (i = 2 == n.button);
              t = n.type;
              "mousedown" === t &&
                (i
                  ? (t = "rightmousedown")
                  : (this._pressLocation = { x: n.pageX, y: n.pageY }));
              "mouseup" === t && (i || (this._pressLocation = null));
              "mousemove" === t &&
                this._pressLocation &&
                ((r = this._pressLocation.x - n.pageX),
                (u = this._pressLocation.y - n.pageY),
                (f = Math.sqrt(r * r + u * u)),
                f > this.threshold && (t = "mousedrag"));
              this.handleEvent(n, t);
            },
            handleEvent: function (n, t) {
              var u,
                f,
                i = "";
              n.mod = r ? n.metaKey : n.ctrlKey && !n.altKey;
              n.altKey && (i += "alt+");
              n.shiftKey && (i += "shift+");
              n.ctrlKey && (i += "ctrl+");
              i += t;
              u = this._handlers["*+" + t];
              u && u.call(this._observer, n, i);
              f = this._handlers[i];
              f && f.call(this._observer, n, i);
            },
            on: function (n, t) {
              var i = this._handlers;
              "string" == typeof t && (t = this._observer[t]);
              "string" == typeof n && (n = n.split(","));
              n.forEach(function (n) {
                i[n] = t;
              });
            },
            destroy: function () {
              this.target.off("keydown", this.keyDownProxy);
              this.target.off("keydown", this.mouseProxy);
              t(document.documentElement).off(
                "mousemove mouseup",
                this.mouseProxy
              );
            },
          })),
          (n.spreadsheet.EventListener = e));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/rangelist.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        function u(n) {
          if (n.left.level === n.level) {
            var t = n;
            n = n.left;
            t.left = n.right;
            n.right = t;
          }
          return n;
        }
        function o(n) {
          if (n.right.right.level === n.level) {
            var t = n;
            n = n.right;
            t.right = n.left;
            n.left = t;
            n.level += 1;
          }
          return n;
        }
        function s(n, i) {
          return n === t
            ? new a(1, i, t, t)
            : (n.value.start > i.start
                ? (n.left = s(n.left, i))
                : (n.right = s(n.right, i)),
              o(u(n)));
        }
        function f(n, i) {
          var e, r;
          if (n === t) return n;
          if (((e = n.value.start - i.start), 0 === e))
            if (n.left !== t && n.right !== t) {
              for (r = n.left; r.right !== t; ) r = r.right;
              n.value = r.value;
              n.left = f(n.left, n.value);
            } else n = n.left === t ? n.right : n.left;
          else e > 0 ? (n.left = f(n.left, i)) : (n.right = f(n.right, i));
          return (
            (n.left.level < n.level - 1 || n.right.level < n.level - 1) &&
              ((n.level -= 1),
              n.right.level > n.level && (n.right.level = n.level),
              (n = u(n)),
              (n.right = u(n.right)),
              (n.right.right = u(n.right.right)),
              (n = o(n)),
              (n.right = o(n.right))),
            n
          );
        }
        function h(n, i) {
          n !== t && (h(n.left, i), i.push(n.value), h(n.right, i));
        }
        function c(n, i, r) {
          if (n !== t) {
            var u = n.value;
            i.start < u.start && c(n.left, i, r);
            u.intersects(i) && r.push(u);
            i.end > u.end && c(n.right, i, r);
          }
        }
        function l(n, i, r) {
          i !== t && (l(n, i.left, r), n.insert(r(i.value)), l(n, i.right, r));
        }
        var a, t, i, r, e, v, y;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((a = n.Class.extend({
            init: function (n, t, i, r) {
              this.level = n;
              this.value = t;
              this.left = i;
              this.right = r;
            },
          })),
          (t = new (function () {
            this.left = this;
            this.right = this;
            this.level = 0;
          })()),
          (i = n.Class.extend({
            init: function (n, t, i) {
              this.start = n;
              this.end = t;
              this.value = i;
            },
            intersects: function (n) {
              return n.start <= this.end && n.end >= this.start;
            },
            clone: function () {
              return new i(this.start, this.end, this.value);
            },
          })),
          (r = n.Class.extend({
            init: function () {
              this.root = t;
            },
            insert: function (n) {
              this.root = s(this.root, n);
            },
            remove: function (n) {
              this.root = f(this.root, n);
            },
            findrange: function (n) {
              for (var i = this.root; i != t; )
                if (n < i.value.start) i = i.left;
                else {
                  if (!(n > i.value.end)) return i.value;
                  i = i.right;
                }
              return null;
            },
            values: function () {
              var n = [];
              return h(this.root, n), n;
            },
            intersecting: function (n, t) {
              var r = [];
              return c(this.root, new i(n, t), r), r;
            },
            map: function (n) {
              var t = new r();
              return l(t, this.root, n), t;
            },
            clone: function () {
              return this.map(function (n) {
                return n.clone();
              });
            },
            first: function () {
              for (var n = this.root; n.left != t; ) n = n.left;
              return n;
            },
            last: function () {
              for (var n = this.root; n.right != t; ) n = n.right;
              return n;
            },
          })),
          (e = n.Class.extend({
            init: function (n, t, u) {
              void 0 === t
                ? (this.tree = n)
                : ((this.tree = new r()), this.tree.insert(new i(n, t, u)));
            },
            values: function () {
              return this.tree.values();
            },
            map: function (n) {
              return new e(this.tree.map(n));
            },
            intersecting: function (n, t) {
              return this.tree.intersecting(n, t);
            },
            first: function () {
              return this.tree.first().value;
            },
            last: function () {
              return this.tree.last().value;
            },
            insert: function (n, t, r) {
              return this.tree.insert(new i(n, t, r));
            },
            value: function (n, t, i) {
              var r, e, o, s, l, u, f, h, c;
              if (void 0 === i)
                return (
                  void 0 === t && (t = n), this.intersecting(n, t)[0].value
                );
              if (((r = this.tree.intersecting(n - 1, t + 1)), r.length))
                for (
                  e = r[0],
                    o = r[r.length - 1],
                    e.end < n && (e.value === i ? (n = e.start) : r.shift()),
                    o.start > t && (o.value === i ? (t = o.end) : r.pop()),
                    s = 0,
                    l = r.length;
                  s < l;
                  s++
                )
                  (u = r[s]),
                    (f = u.value),
                    (h = u.start),
                    (c = u.end),
                    this.tree.remove(u),
                    h < n && (f !== i ? this.insert(h, n - 1, f) : (n = h)),
                    c > t && (f !== i ? this.insert(t + 1, c, f) : (t = c));
              this.insert(n, t, i);
            },
            expandedValues: function (n, t) {
              for (
                var u = this.intersecting(n, t), f = [], r = 0, i = n;
                i <= t;
                i++
              )
                u[r].end < i && r++,
                  f.push({ index: i - n, value: u[r].value });
              return f;
            },
            sortedIndices: function (n, t, i, r) {
              var u = this.expandedValues(n, t),
                f = function (n, t) {
                  return n.value === t.value
                    ? n.index - t.index
                    : i(n.value, t.value);
                };
              return (
                r &&
                  (f = function (n, t) {
                    var u = r[n.index],
                      f = r[t.index];
                    return u.value === f.value
                      ? i(n.value, t.value)
                      : n.index - t.index;
                  }),
                u.sort(f),
                u
              );
            },
            sort: function (n, t, i) {
              var u, r, f;
              if (1 !== this.intersecting(n, t).length)
                for (
                  u = this.expandedValues(n, t), r = 0, f = i.length;
                  r < f;
                  r++
                )
                  this.value(r + n, r + n, u[i[r].index].value);
            },
            copy: function (n, t, i) {
              for (
                var o,
                  u,
                  f,
                  e = this.intersecting(n, t),
                  s = i,
                  r = 0,
                  h = e.length;
                r < h;
                r++
              )
                (u = e[r].start),
                  u < n && (u = n),
                  (f = e[r].end),
                  f > t && (f = t),
                  (o = s + (f - u)),
                  this.value(s, o, e[r].value),
                  (s = ++o);
            },
            iterator: function (n, t) {
              return new v(n, t, this.intersecting(n, t));
            },
            getState: function () {
              return this.tree.clone();
            },
            setState: function (n) {
              this.tree = n.clone();
            },
            toJSON: function () {
              return this.values();
            },
            fromJSON: function (n) {
              n.forEach(function (n) {
                this.value(n.start, n.end, n.value);
              }, this);
            },
          })),
          (v = n.Class.extend({
            init: function (n, t, i) {
              this.start = n;
              this.end = t;
              this.index = 0;
              this.ranges = i;
            },
            unique: function () {
              return this.ranges.map(function (n) {
                return n.value;
              });
            },
            at: function (n) {
              for (
                ;
                this.ranges[this.index] && this.ranges[this.index].end < n;

              )
                this.index++;
              return this.ranges[this.index] && this.ranges[this.index].value;
            },
            forEach: function (n) {
              for (var t = this.start; t <= this.end; t++) n(this.at(t), t);
              this.index = 0;
            },
          })),
          (y = e.extend({
            init: function (n, t, u) {
              this.tree = new r();
              this.range = new i(n, t, u);
            },
            intersecting: function (n, t) {
              var r,
                u,
                o,
                e = this.tree.intersecting(n, t),
                f = [];
              if (!e.length) return [this.range];
              for (u = 0, o = e.length; u < o; u++)
                (r = e[u]),
                  r.start > n &&
                    f.push(new i(n, r.start - 1, this.range.value)),
                  f.push(r),
                  (n = r.end + 1);
              return (
                r.end < t && f.push(new i(r.end + 1, t, this.range.value)), f
              );
            },
            insert: function (n, t, r) {
              r !== this.range.value && this.tree.insert(new i(n, t, r));
            },
            lastRangeStart: function () {
              var n = this.tree.root;
              if (n === t) return this.range.start;
              for (; n.right !== t; ) n = n.right;
              return n.value.end + 1;
            },
          })),
          (n.spreadsheet.RangeTree = r),
          (n.spreadsheet.RangeList = e),
          (n.spreadsheet.SparseRangeList = y),
          (n.spreadsheet.ValueRange = i));
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/propertybag.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        function f(n) {
          return n.replace(/M/g, "m").replace(/'/g, '"').replace(/tt/, "am/pm");
        }
        function e(n) {
          return (n = n.clone()), (n.value = n.value.deepClone()), n;
        }
        function i() {
          var n = this.map(e);
          return (n.clone = i), n;
        }
        var t, r, u;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((t = n.Class.extend({
            init: function (n) {
              this.list = n;
            },
            get: function (n) {
              return this.parse(this.list.value(n, n));
            },
            set: function (n, t, i) {
              void 0 === i && ((i = t), (t = n));
              this.list.value(n, t, i);
            },
            parse: function (n) {
              return n;
            },
            copy: function (n, t, i) {
              this.list.copy(n, t, i);
            },
            iterator: function (n, t) {
              return this.list.iterator(n, t);
            },
          })),
          (r = t.extend({
            set: function (n, t, i) {
              this.list.value(n, t, JSON.stringify(i));
            },
            parse: function (n) {
              return JSON.parse(n);
            },
          })),
          (u = t.extend({
            init: function (n, i) {
              t.prototype.init.call(this, n);
              this.formats = i;
            },
            set: function (t, i, r) {
              r instanceof Date
                ? ((r = n.spreadsheet.dateToNumber(r)),
                  this.formats.value(t, i) ||
                    this.formats.value(
                      t,
                      i,
                      f(n.culture().calendar.patterns.d)
                    ))
                : "number" == typeof r &&
                  (r = n.spreadsheet.calc.runtime.limitPrecision(r));
              this.list.value(t, i, r);
            },
          })),
          (n.spreadsheet.PropertyBag = n.Class.extend({
            specs: [
              {
                property: t,
                name: "format",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: u,
                name: "value",
                value: null,
                sortable: !0,
                serializable: !0,
                depends: "format",
              },
              {
                property: t,
                name: "formula",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "background",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: r,
                name: "vBorders",
                value: null,
                sortable: !1,
                serializable: !1,
              },
              {
                property: r,
                name: "hBorders",
                value: null,
                sortable: !1,
                serializable: !1,
              },
              {
                property: t,
                name: "color",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "fontFamily",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "underline",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "fontSize",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "italic",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "bold",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "textAlign",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "indent",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "verticalAlign",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "wrap",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "validation",
                value: null,
                sortable: !1,
                serializable: !0,
              },
              {
                property: t,
                name: "enable",
                value: null,
                sortable: !1,
                serializable: !0,
              },
              {
                property: t,
                name: "link",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "editor",
                value: null,
                sortable: !0,
                serializable: !0,
              },
              {
                property: t,
                name: "comment",
                value: null,
                sortable: !0,
                serializable: !0,
              },
            ],
            init: function (t, r, u) {
              u = u || {};
              var f = t * r - 1;
              this.rowCount = t;
              this.columnCount = r;
              this.cellCount = f;
              this.properties = {};
              this.lists = {};
              this.specs.forEach(function (t) {
                var e,
                  i = t.name,
                  r = u[i];
                void 0 === r && (r = t.value);
                this.lists[i] = new n.spreadsheet.SparseRangeList(0, f, r);
                e = this.properties[i] = new t.property(
                  this.lists[i],
                  this.lists[t.depends]
                );
                e.spec = t;
              }, this);
              this.lists.formula.tree.clone = i;
              this.lists.validation.tree.clone = i;
            },
            getState: function () {
              var n = {};
              return (
                this.specs.forEach(function (t) {
                  n[t.name] = this.lists[t.name].getState();
                }, this),
                n
              );
            },
            setState: function (n) {
              this.specs.forEach(function (t) {
                this.lists[t.name].setState(n[t.name]);
              }, this);
            },
            get: function (n, t) {
              if (void 0 === t) return this.lists[n];
              switch (n) {
                case "borderRight":
                  t += this.rowCount;
                case "borderLeft":
                  n = "vBorders";
                  break;
                case "borderBottom":
                  t++;
                case "borderTop":
                  n = "hBorders";
              }
              return t > this.cellCount ? null : this.properties[n].get(t);
            },
            set: function (n, t, i, r) {
              switch (n) {
                case "borderRight":
                  t += this.rowCount;
                  i += this.rowCount;
                case "borderLeft":
                  n = "vBorders";
                  break;
                case "borderBottom":
                  t++;
                  i++;
                case "borderTop":
                  n = "hBorders";
              }
              t <= i && i <= this.cellCount && this.properties[n].set(t, i, r);
            },
            fromJSON: function (n, t) {
              for (var i, r = 0; r < this.specs.length; r++)
                (i = this.specs[r]),
                  i.serializable &&
                    void 0 !== t[i.name] &&
                    this.set(i.name, n, n, t[i.name], !1);
              [
                "borderLeft",
                "borderRight",
                "borderTop",
                "borderBottom",
              ].forEach(function (i) {
                void 0 !== t[i] && this.set(i, n, n, t[i]);
              }, this);
            },
            copy: function (n, t, i) {
              this.specs.forEach(function (r) {
                this.properties[r.name].copy(n, t, i);
              }, this);
            },
            iterator: function (n, t, i) {
              var u = this.properties[n],
                r = u.iterator(t, i),
                f = r.at,
                e = this.cellCount;
              return (
                (r.at = function (n) {
                  return n > e ? null : u.parse(f.call(r, n));
                }),
                (r.name = n),
                (r.value = u.spec.value),
                r
              );
            },
            sortable: function () {
              return this.specs
                .filter(function (n) {
                  return n.sortable;
                })
                .map(function (n) {
                  return this.lists[n.name];
                }, this);
            },
            iterators: function (n, t) {
              return this.specs.reduce(
                function (i, r) {
                  return (
                    r.serializable && i.push(this.iterator(r.name, n, t)), i
                  );
                }.bind(this),
                []
              );
            },
            forEach: function (n, t, i) {
              function u(n, t, i) {
                var r = t.at(i);
                r !== t.value && (f[n] = r);
              }
              for (
                var f,
                  e,
                  o,
                  s,
                  h = this.iterators(n, t),
                  c = this.iterator("hBorders", n, t + 1),
                  l = this.iterator("vBorders", n, t),
                  a = this.iterator(
                    "vBorders",
                    n + this.rowCount,
                    t + this.rowCount
                  ),
                  r = n;
                r <= t;
                r++
              ) {
                for (f = {}, e = 0; e < h.length; e++)
                  (o = h[e]), (s = o.at(r)), s !== o.value && (f[o.name] = s);
                u("borderLeft", l, r);
                u("borderRight", a, r + this.rowCount);
                u("borderTop", c, r);
                (r + 1) % this.rowCount && u("borderBottom", c, r + 1);
                i(f);
              }
            },
            forEachProperty: function (n) {
              for (var t in this.properties) n(this.properties[t]);
            },
          })),
          (n.spreadsheet.ALL_PROPERTIES =
            n.spreadsheet.PropertyBag.prototype.specs.reduce(
              function (n, t) {
                return t.serializable && n.push(t.name), n;
              },
              ["borderTop", "borderRight", "borderBottom", "borderLeft"]
            )));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/references.min", ["kendo.core.min"], n);
  })(
    function () {
      "use strict";
      function h(n) {
        var t = Math.floor(n / 26) - 1;
        return (t >= 0 ? h(t) : "") + String.fromCharCode(65 + (n % 26));
      }
      function e(n) {
        return /^[a-z_][a-z0-9_]*$/i.test(n)
          ? n
          : "'" + n.replace(/\x27/g, "\\'") + "'";
      }
      function o(n, t, i, r) {
        var u = "";
        return (
          ++t,
          isFinite(t) ? null == r || 2 & r || (t = "$" + t) : (t = ""),
          isFinite(i)
            ? ((u = h(i)), null == r || 1 & r || (u = "$" + u))
            : (i = ""),
          n ? e(n) + "!" + u + t : u + t
        );
      }
      var u, c, f, i, s, n, t, r;
      (kendo.support.browser.msie && kendo.support.browser.version < 9) ||
        ((u = kendo.spreadsheet),
        (c = kendo.Class),
        (f = c.extend({
          type: "ref",
          sheet: "",
          clone: function () {
            return this;
          },
          hasSheet: function () {
            return this._hasSheet;
          },
          simplify: function () {
            return this;
          },
          setSheet: function (n, t) {
            return (this.sheet = n), null != t && (this._hasSheet = t), this;
          },
          absolute: function () {
            return this;
          },
          relative: function () {
            return this;
          },
          adjust: function () {
            return this;
          },
          toString: function () {
            return this.relative(0, 0, 3, 3).print(0, 0);
          },
          forEach: function (n, t) {
            n.call(t, this);
          },
          map: function (n, t) {
            return n.call(t, this);
          },
          intersects: function (n) {
            return this.intersect(n) !== i;
          },
          isCell: function () {
            return !1;
          },
          toRow: function () {
            return this;
          },
          toColumn: function () {
            return this;
          },
          first: function () {
            return this;
          },
          lastRange: function () {
            return this;
          },
          size: function () {
            return 1;
          },
          rangeAt: function () {
            return this;
          },
          nextRangeIndex: function () {
            return 0;
          },
          previousRangeIndex: function () {
            return 0;
          },
          eq: function (u) {
            var s,
              h,
              o,
              c,
              e = this,
              f = u;
            if (e === i || f === i) return e === f;
            if (
              ((f instanceof n || (f instanceof t && !(e instanceof n))) &&
                ((e = u), (f = this)),
              e instanceof n)
            )
              return (
                (f = f.simplify()),
                f instanceof n &&
                  e.row == f.row &&
                  e.col == f.col &&
                  e.sheet == f.sheet
              );
            if (e instanceof t) {
              if (f instanceof t)
                return (
                  f.topLeft.eq(e.topLeft) && f.bottomRight.eq(e.bottomRight)
                );
              if (f instanceof r) return f.single() && e.eq(f.refs[0]);
            } else if (e instanceof r && f instanceof r) {
              if (((s = e.refs), (h = f.refs), s.length != h.length)) return !1;
              for (o = 0, c = s.length; o < c; o++)
                if (!s[o].eq(h[o])) return !1;
              return !0;
            }
            return e === f;
          },
          concat: function (n) {
            return new r([this, n]);
          },
          replaceAt: function (n, t) {
            return t;
          },
          forEachColumnIndex: function (n) {
            this.forEachAxisIndex("col", n);
          },
          forEachRowIndex: function (n) {
            this.forEachAxisIndex("row", n);
          },
          forEachAxisIndex: function (n, t) {
            var i = [],
              r = "row" === n ? "forEachRow" : "forEachColumn";
            this[r](function (t) {
              var r = t.first()[n];
              i.indexOf(r) === -1 && i.push(r);
            });
            i.sort(function (n, t) {
              return n > t ? 1 : n < t ? -1 : 0;
            }).forEach(t);
          },
          valid: function () {
            return !1;
          },
          renameSheet: function (n, t) {
            if (this.sheet && this.sheet.toLowerCase() == n.toLowerCase())
              return (this.sheet = t), !0;
          },
        })),
        (f.display = o),
        (i = new (f.extend({
          init: function () {},
          print: function () {
            return "#NULL!";
          },
          eq: function (n) {
            return n === this;
          },
          forEach: function () {},
        }))()),
        (s = f.extend({
          ref: "name",
          init: function (n) {
            this.name = n;
          },
          clone: function () {
            return new s(this.name).setSheet(this.sheet, this.hasSheet());
          },
          print: function () {
            var n = e(this.name);
            return this.hasSheet() && (n = e(this.sheet) + "!" + n), n;
          },
        })),
        (n = f.extend({
          ref: "cell",
          init: function (n, t, i) {
            this.row = n;
            this.col = t;
            this.rel = i || 0;
          },
          clone: function () {
            return new n(this.row, this.col, this.rel).setSheet(
              this.sheet,
              this.hasSheet()
            );
          },
          intersect: function (t) {
            return t instanceof n ? (this.eq(t) ? this : i) : t.intersect(this);
          },
          print: function (n, t, i) {
            var f,
              h,
              r = this.col,
              u = this.row,
              s = this.rel;
            return null == n && s
              ? ((h = this.hasSheet() ? e(this.sheet) + "!" : ""),
                (r = isFinite(r)
                  ? 1 & s
                    ? "C[" + r + "]"
                    : "C" + (r + 1)
                  : ""),
                (u = isFinite(u)
                  ? 2 & s
                    ? "R[" + u + "]"
                    : "R" + (u + 1)
                  : ""),
                h + u + r)
              : ((f = this.absolute(n, t)),
                i
                  ? ((u = f.row % 1048576),
                    (r = f.col % 16384),
                    u < 0 && (u += 1048576),
                    r < 0 && (r += 16384),
                    o(this._hasSheet && this.sheet, u, r, s))
                  : f.valid()
                  ? o(this._hasSheet && this.sheet, f.row, f.col, s)
                  : "#REF!");
          },
          absolute: function (n, t) {
            var i = this.clone();
            return i.rel & !1
              ? i
              : (1 & i.rel && (i.col = (i.col + t) % 16384),
                2 & i.rel && (i.row = (i.row + n) % 1048576),
                (i.rel = 0),
                i);
          },
          toRangeRef: function () {
            return new t(this, this);
          },
          relative: function (t, i, r) {
            var u, f;
            return (
              null == r && (r = this.rel),
              (u = 2 & r ? this.row - t : this.row),
              (f = 1 & r ? this.col - i : this.col),
              new n(u, f, r).setSheet(this.sheet, this.hasSheet())
            );
          },
          height: function () {
            return 1;
          },
          width: function () {
            return 1;
          },
          toString: function () {
            return o(null, this.row, this.col, 3);
          },
          isCell: function () {
            return !0;
          },
          leftColumn: function () {
            return this;
          },
          rightColumn: function () {
            return this;
          },
          topRow: function () {
            return this;
          },
          bottomRow: function () {
            return this;
          },
          forEachRow: function (n) {
            n(this.toRangeRef());
          },
          forEachColumn: function (n) {
            n(this.toRangeRef());
          },
          adjust: function (n, t, r, u, f, e, o) {
            var s = this.absolute(n, t);
            if (f) {
              if (s.row >= e) {
                if (o < 0 && s.row < e - o) return i;
                s.row += o;
              }
            } else if (s.col >= e) {
              if (o < 0 && s.col < e - o) return i;
              s.col += o;
            }
            return (
              null != r && null != u && (s = s.relative(r, u, this.rel)), s
            );
          },
          valid: function () {
            if (this.rel) throw Error("valid() called on relative reference");
            var n = this.col,
              t = this.row;
            return !((isFinite(n) && n < 0) || (isFinite(t) && t < 0));
          },
        })),
        (t = f.extend({
          ref: "range",
          init: function (t, i) {
            t._hasSheet &&
              i._hasSheet &&
              t.sheet.toLowerCase() != i.sheet.toLowerCase() &&
              (this.endSheet = i.sheet);
            this.topLeft = new n(t.row, t.col, t.rel);
            this.bottomRight = new n(i.row, i.col, i.rel);
            this.normalize();
          },
          clone: function () {
            return new t(
              this.topLeft.clone(),
              this.bottomRight.clone()
            ).setSheet(this.sheet, this.hasSheet());
          },
          _containsRange: function (n) {
            return (
              this._containsCell(n.topLeft) && this._containsCell(n.bottomRight)
            );
          },
          _containsCell: function (n) {
            return (
              n.sheet == this.sheet &&
              n.row >= this.topLeft.row &&
              n.col >= this.topLeft.col &&
              n.row <= this.bottomRight.row &&
              n.col <= this.bottomRight.col
            );
          },
          contains: function (i) {
            if (i instanceof Array) {
              var r = this;
              return i.some(function (n) {
                return r.contains(n);
              });
            }
            return i instanceof n
              ? this._containsCell(i)
              : i instanceof t && this._containsRange(i);
          },
          _intersectRange: function (r) {
            var u, f, e, o, s, h, c, l;
            return this.sheet != r.sheet
              ? i
              : ((u = this.topLeft.col),
                (f = this.topLeft.row),
                (e = this.bottomRight.col),
                (o = this.bottomRight.row),
                (s = r.topLeft.col),
                (h = r.topLeft.row),
                (c = r.bottomRight.col),
                (l = r.bottomRight.row),
                u <= c && s <= e && f <= l && h <= o
                  ? new t(
                      new n(Math.max(f, h), Math.max(u, s)),
                      new n(Math.min(o, l), Math.min(e, c))
                    ).setSheet(this.sheet, this.hasSheet())
                  : i);
          },
          intersect: function (u) {
            return u instanceof n
              ? this._containsCell(u)
                ? u
                : i
              : u instanceof t
              ? this._intersectRange(u).simplify()
              : u instanceof r
              ? u.intersect(this)
              : i;
          },
          simplify: function () {
            return this.isCell()
              ? new n(
                  this.topLeft.row,
                  this.topLeft.col,
                  this.topLeft.rel
                ).setSheet(this.sheet, this.hasSheet())
              : this;
          },
          normalize: function () {
            var t,
              i = this.topLeft,
              r = this.bottomRight,
              u = i.row,
              f = i.col,
              e = r.row,
              o = r.col,
              s = 2 & i.rel,
              h = 1 & i.rel,
              c = 2 & r.rel,
              l = 1 & r.rel,
              a = !1;
            return (
              s === c &&
                h === l &&
                (u > e &&
                  ((a = !0),
                  (t = u),
                  (u = e),
                  (e = t),
                  (t = s),
                  (s = c),
                  (c = t)),
                f > o &&
                  ((a = !0),
                  (t = f),
                  (f = o),
                  (o = t),
                  (t = h),
                  (h = l),
                  (l = t)),
                a &&
                  ((this.topLeft = new n(u, f, h | s)),
                  (this.bottomRight = new n(e, o, l | c)))),
              this
            );
          },
          print: function (n, t, i) {
            if (i || this.absolute(n, t).valid()) {
              var r =
                this.topLeft.print(n, t, i) +
                ":" +
                this.bottomRight.print(n, t, i);
              return (
                this.hasSheet() &&
                  (r =
                    e(this.sheet) +
                    (this.endSheet ? ":" + e(this.endSheet) : "") +
                    "!" +
                    r),
                r
              );
            }
            return "#REF!";
          },
          absolute: function (n, i) {
            return new t(
              this.topLeft.absolute(n, i),
              this.bottomRight.absolute(n, i)
            ).setSheet(this.sheet, this.hasSheet());
          },
          relative: function (n, i, r, u) {
            return (
              null == u && (u = r),
              new t(
                this.topLeft.relative(n, i, r),
                this.bottomRight.relative(n, i, u)
              ).setSheet(this.sheet, this.hasSheet())
            );
          },
          height: function () {
            if (this.topLeft.rel != this.bottomRight.rel)
              throw Error("Mixed relative/absolute references");
            return this.bottomRight.row - this.topLeft.row + 1;
          },
          width: function () {
            if (this.topLeft.rel != this.bottomRight.rel)
              throw Error("Mixed relative/absolute references");
            return this.bottomRight.col - this.topLeft.col + 1;
          },
          collapse: function () {
            return this.topLeft.toRangeRef();
          },
          leftColumn: function () {
            return new t(
              this.topLeft,
              new n(this.bottomRight.row, this.topLeft.col)
            );
          },
          rightColumn: function () {
            return new t(
              new n(this.topLeft.row, this.bottomRight.col),
              this.bottomRight
            );
          },
          topRow: function () {
            return new t(
              this.topLeft,
              new n(this.topLeft.row, this.bottomRight.col)
            );
          },
          bottomRow: function () {
            return new t(
              new n(this.bottomRight.row, this.topLeft.col),
              this.bottomRight
            );
          },
          toRangeRef: function () {
            return this;
          },
          toRow: function (i) {
            return (
              (i += Math.max(0, this.topLeft.row)),
              new t(
                new n(i, this.topLeft.col),
                new n(i, this.bottomRight.col)
              ).setSheet(this.sheet, this.hasSheet())
            );
          },
          toColumn: function (i) {
            return (
              (i += Math.max(0, this.topLeft.col)),
              new t(
                new n(this.topLeft.row, i),
                new n(this.bottomRight.row, i)
              ).setSheet(this.sheet, this.hasSheet())
            );
          },
          toCell: function (t, i) {
            return (
              (t += Math.max(0, this.topLeft.row)),
              (i += Math.max(0, this.topLeft.col)),
              new n(t, i, 0).setSheet(this.sheet, this.hasSheet())
            );
          },
          forEachRow: function (i) {
            for (
              var u = this.topLeft.row,
                f = this.bottomRight.row,
                e = this.topLeft.col,
                o = this.bottomRight.col,
                r = u;
              r <= f;
              r++
            )
              i(new t(new n(r, e), new n(r, o)));
          },
          forEachColumn: function (i) {
            for (
              var u = this.topLeft.row,
                f = this.bottomRight.row,
                e = this.topLeft.col,
                o = this.bottomRight.col,
                r = e;
              r <= o;
              r++
            )
              i(new t(new n(u, r), new n(f, r)));
          },
          intersecting: function (n) {
            return n.filter(function (n) {
              return n.toRangeRef().intersects(this);
            }, this);
          },
          union: function (i, r) {
            var f,
              c = this.intersecting(i),
              e = this.topLeft.row,
              o = this.topLeft.col,
              s = this.bottomRight.row,
              h = this.bottomRight.col,
              u = !1;
            return (
              c.forEach(function (n) {
                n = n.toRangeRef();
                n.topLeft.row < e && ((u = !0), (e = n.topLeft.row));
                n.topLeft.col < o && ((u = !0), (o = n.topLeft.col));
                n.bottomRight.row > s && ((u = !0), (s = n.bottomRight.row));
                n.bottomRight.col > h && ((u = !0), (h = n.bottomRight.col));
                r && r(n);
              }),
              (f = new t(new n(e, o), new n(s, h))),
              u ? f.union(i, r) : f
            );
          },
          resize: function (r) {
            function u(n) {
              return n || 0;
            }
            var f = Math.max.bind(Math, 0),
              e = this.topLeft.row + u(r.top),
              o = this.topLeft.col + u(r.left),
              s = this.bottomRight.row + u(r.bottom),
              h = this.bottomRight.col + u(r.right);
            return (o < 0 && h < 0) || (e < 0 && s < 0)
              ? i
              : e <= s && o <= h
              ? new t(new n(f(e), f(o)), new n(f(s), f(h)))
              : i;
          },
          move: function (i, r) {
            return new t(
              new n(this.topLeft.row + i, this.topLeft.col + r),
              new n(this.bottomRight.row + i, this.bottomRight.col + r)
            );
          },
          first: function () {
            return this.topLeft.clone().setSheet(this.sheet, this.hasSheet());
          },
          isCell: function () {
            return !this.endSheet && this.topLeft.eq(this.bottomRight);
          },
          toString: function () {
            return this.topLeft + ":" + this.bottomRight;
          },
          adjust: function (n, r, u, f, e, o, s) {
            var h = this.topLeft.adjust(n, r, u, f, e, o, s),
              c = this.bottomRight.adjust(n, r, u, f, e, o, s);
            return h === i && c === i
              ? i
              : (h === i
                  ? ((h = this.topLeft.absolute(n, r)),
                    e ? (h.row = o) : (h.col = o),
                    null != u &&
                      null != f &&
                      (h = h.relative(u, f, this.topLeft.rel)))
                  : c === i &&
                    ((c = this.bottomRight.absolute(n, r)),
                    e ? (c.row = o - 1) : (c.col = o - 1),
                    null != u &&
                      null != f &&
                      (c = c.relative(u, f, this.bottomRight.rel))),
                new t(h, c).setSheet(this.sheet, this.hasSheet()).simplify());
          },
          valid: function () {
            return this.topLeft.valid() && this.bottomRight.valid();
          },
        })),
        (r = f.extend({
          init: function (n) {
            this.refs = n;
            this.length = n.length;
          },
          clone: function () {
            return new r(this.refs.slice());
          },
          intersect: function (n) {
            for (var u, f = [], t = 0; t < this.length; ++t)
              (u = n.intersect(this.refs[t])), u !== i && f.push(u);
            return f.length > 0 ? new r(f).simplify() : i;
          },
          simplify: function () {
            var n = new r(
              this.refs.reduce(function (n, t) {
                return (t = t.simplify()), t !== i && n.push(t), n;
              }, [])
            );
            return n.empty() ? i : n.single() ? n.refs[0] : n;
          },
          absolute: function (n, t) {
            return new r(
              this.refs.map(function (i) {
                return i.absolute(n, t);
              })
            );
          },
          forEach: function (n, t) {
            this.refs.forEach(function (i) {
              i instanceof r ? i.forEach(n, t) : n.call(t, i);
            }, t);
          },
          toRangeRef: function () {
            return this.refs[0].toRangeRef();
          },
          contains: function (n) {
            return this.refs.some(function (t) {
              return t.contains(n);
            });
          },
          map: function (n, t) {
            var i = [];
            return (
              this.forEach(function (r) {
                i.push(n.call(t, r));
              }),
              new r(i)
            );
          },
          first: function () {
            return this.refs[0].first();
          },
          lastRange: function () {
            return this.refs[this.length - 1];
          },
          size: function () {
            return this.length;
          },
          single: function () {
            return 1 == this.length;
          },
          empty: function () {
            return 0 === this.length;
          },
          isCell: function () {
            return this.single() && this.refs[0].isCell();
          },
          rangeAt: function (n) {
            return this.refs[n];
          },
          nextRangeIndex: function (n) {
            return n === this.length - 1 ? 0 : n + 1;
          },
          previousRangeIndex: function (n) {
            return 0 === n ? this.length - 1 : n - 1;
          },
          concat: function (n) {
            return new r(this.refs.concat([n]));
          },
          print: function (n, t, i) {
            return this.refs
              .map(function (r) {
                return r.print(n, t, i);
              })
              .join(",");
          },
          replaceAt: function (n, t) {
            var i = this.refs.slice();
            return i.splice(n, 1, t), new r(i);
          },
          leftColumn: function () {
            return this.map(function (n) {
              return n.leftColumn();
            });
          },
          rightColumn: function () {
            return this.map(function (n) {
              return n.rightColumn();
            });
          },
          topRow: function () {
            return this.map(function (n) {
              return n.topRow();
            });
          },
          bottomRow: function () {
            return this.map(function (n) {
              return n.bottomRow();
            });
          },
          forEachRow: function (n) {
            this.forEach(function (t) {
              t.forEachRow(n);
            });
          },
          forEachColumn: function (n) {
            this.forEach(function (t) {
              t.forEachColumn(n);
            });
          },
          adjust: function (n, t, i, r, u, f, e) {
            return this.map(function (o) {
              return o.adjust(n, t, i, r, u, f, e);
            }).simplify();
          },
          toString: function () {
            return this.refs
              .map(function (n) {
                return "" + n;
              })
              .join(", ");
          },
          valid: function () {
            for (var n = this.refs.length; --n >= 0; )
              if (this.refs[n].valid()) return !1;
            return !0;
          },
          renameSheet: function (n, t) {
            this.refs.forEach(function (i) {
              i.renameSheet(n, t);
            });
          },
        })),
        (u.NULLREF = i),
        (u.SHEETREF = new t(new n(0, 0), new n(1 / 0, 1 / 0))),
        (u.FIRSTREF = new n(0, 0)),
        (u.Ref = f),
        (u.NameRef = s),
        (u.CellRef = n),
        (u.RangeRef = t),
        (u.UnionRef = r),
        (u.SHEETREF.print = function () {
          return "#SHEET";
        }));
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/autofillcalculator.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        var i, t, r;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((i = n.spreadsheet.RangeRef),
          (t = n.spreadsheet.CellRef),
          (r = n.Class.extend({
            init: function (n) {
              this._grid = n;
            },
            rectIsVertical: function (n, t, i, r) {
              var u = this._grid.rectangle(n.toRangeRef()),
                f = this._grid.rectangle(t.toRangeRef());
              return Math.abs(f[r] - u[r]) > Math.abs(u[i] - f[i]);
            },
            autoFillDest: function (n, r) {
              var h,
                o,
                e,
                s,
                c,
                l,
                a,
                u = n.topLeft,
                f = n.bottomRight,
                y = r.row >= u.row,
                v = r.col >= u.col;
              return (
                (h = y ? (v ? 4 : 3) : v ? 2 : 1),
                4 === h
                  ? ((o = u),
                    (e = f),
                    (c = r.row > e.row || r.col > e.col),
                    c &&
                      (r = new t(
                        Math.max(r.row, e.row),
                        Math.max(r.col, e.col)
                      )),
                    (s = this.rectIsVertical(e, r, "right", "bottom")
                      ? new t(r.row, e.col)
                      : new t(e.row, r.col)))
                  : 3 === h
                  ? ((l = new t(u.col, f.row)),
                    r.row > f.row && this.rectIsVertical(l, r, "left", "bottom")
                      ? ((o = u), (s = new t(r.row, f.col)))
                      : ((o = f), (s = new t(u.row, r.col))))
                  : 2 === h
                  ? ((a = new t(u.row, f.col)),
                    r.col > f.col && !this.rectIsVertical(a, r, "right", "top")
                      ? ((o = u), (s = new t(f.row, r.col)))
                      : ((o = f), (s = new t(r.row, u.col))))
                  : ((o = f),
                    (s = this.rectIsVertical(u, r, "left", "top")
                      ? new t(r.row, u.col)
                      : new t(u.row, r.col))),
                this._grid.normalize(new i(o, s))
              );
            },
          })),
          (n.spreadsheet.AutoFillCalculator = r));
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/navigator.min",
      ["kendo.core.min", "spreadsheet/autofillcalculator.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var i, t, r, u;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((i = n.spreadsheet.RangeRef),
          (t = n.spreadsheet.CellRef),
          (r = n.Class.extend({
            init: function (n, t, i, r) {
              this.rangeGetter = i;
              this.prevLeft = function (i) {
                var u = r(this.range(i)),
                  f = this.range(t.prevVisible(u.topLeft[n]));
                return r(f).topLeft[n];
              };
              this.nextRight = function (i) {
                var u = r(this.range(i)),
                  f = this.range(t.nextVisible(u.bottomRight[n]));
                return r(f).bottomRight[n];
              };
              this.nextLeft = function (i) {
                var u = r(this.range(i));
                return t.nextVisible(u.bottomRight[n]);
              };
              this.prevRight = function (i) {
                var u = r(this.range(i));
                return t.prevVisible(u.topLeft[n]);
              };
            },
            boundary: function (n, t) {
              this.top = n;
              this.bottom = t;
            },
            range: function (n) {
              return this.rangeGetter(n, this.top, this.bottom);
            },
          })),
          (u = n.Class.extend({
            init: function (t) {
              this._sheet = t;
              this.columns = this._sheet._grid._columns;
              this.autoFillCalculator = new n.spreadsheet.AutoFillCalculator(
                t._grid
              );
              this.colEdge = new r(
                "col",
                this._sheet._grid._columns,
                this.columnRange.bind(this),
                this.union.bind(this)
              );
              this.rowEdge = new r(
                "row",
                this._sheet._grid._rows,
                this.rowRange.bind(this),
                this.union.bind(this)
              );
            },
            height: function (n) {
              this._viewPortHeight = n;
            },
            union: function (n) {
              return this._sheet.unionWithMerged(n);
            },
            columnRange: function (n, t, i) {
              return this._sheet._ref(t, n, i - t, 1);
            },
            rowRange: function (n, t, i) {
              return this._sheet._ref(n, t, 1, i - t);
            },
            selectionIncludesMergedCells: function () {
              return this._sheet.select().contains(this._sheet._mergedCells);
            },
            setSelectionValue: function (n) {
              var t = this._sheet.selection();
              setTimeout(function () {
                t.value(n());
              });
            },
            selectAll: function () {
              this._sheet.select(this._sheet._sheetRef);
            },
            select: function (n, t, i) {
              n = this.refForMode(n, t);
              i && (n = this._sheet.select().concat(n));
              this._sheet.select(n);
            },
            refForMode: function (n, t) {
              var i = this._sheet._grid;
              switch (t) {
                case "range":
                  n = i.normalize(n);
                  break;
                case "row":
                  n = i.rowRef(n.row);
                  break;
                case "column":
                  n = i.colRef(n.col);
                  break;
                case "sheet":
                  n = this._sheet._sheetRef;
              }
              return n;
            },
            startSelection: function (n, t, r, u, f) {
              if ("autofill" == t) this._sheet.startAutoFill();
              else if (u && "range" == t) {
                var e = new i(this._sheet.activeCell().first(), n);
                this._sheet.select(e, !1, !1);
                this._sheet.startSelection(f);
              } else this._sheet.startSelection(f), this.select(n, t, r);
            },
            completeSelection: function () {
              this._sheet.completeSelection();
            },
            selectForContextMenu: function (n, t) {
              var i = this._sheet;
              i._activeDrawing = null;
              i.select().contains(this.refForMode(n, t)) || this.select(n, t);
            },
            selectDrawingForContextMenu: function (n) {
              var t = this._sheet;
              t._activeDrawing = n;
              t.triggerChange({ selection: !0 });
            },
            modifySelection: function (n) {
              var u,
                l,
                a = this.determineDirection(n),
                o = this._sheet,
                s = this._viewPortHeight,
                f = o._grid._rows,
                h = o._grid._columns,
                v = o.currentOriginalSelectionRange(),
                c = o.select().toRangeRef(),
                e = o.activeCell(),
                t = v.topLeft.clone(),
                r = v.bottomRight.clone();
              switch (
                (this.colEdge.boundary(c.topLeft.row, c.bottomRight.row),
                this.rowEdge.boundary(c.topLeft.col, c.bottomRight.col),
                a)
              ) {
                case "expand-left":
                  t.col = this.colEdge.prevLeft(t.col);
                  u = t;
                  break;
                case "shrink-right":
                  t.col = this.colEdge.nextLeft(t.col);
                  u = t;
                  break;
                case "expand-right":
                  r.col = this.colEdge.nextRight(r.col);
                  u = r;
                  break;
                case "shrink-left":
                  r.col = this.colEdge.prevRight(r.col);
                  u = r;
                  break;
                case "expand-up":
                  t.row = this.rowEdge.prevLeft(t.row);
                  u = t;
                  break;
                case "shrink-down":
                  t.row = this.rowEdge.nextLeft(t.row);
                  u = t;
                  break;
                case "expand-down":
                  r.row = this.rowEdge.nextRight(r.row);
                  u = r;
                  break;
                case "shrink-up":
                  r.row = this.rowEdge.prevRight(r.row);
                  u = r;
                  break;
                case "expand-page-up":
                  t.row = f.prevPage(t.row, s);
                  break;
                case "shrink-page-up":
                  r.row = f.prevPage(r.row, s);
                  break;
                case "expand-page-down":
                  r.row = f.nextPage(r.row, s);
                  break;
                case "shrink-page-down":
                  t.row = f.nextPage(t.row, s);
                  break;
                case "first-col":
                  t.col = h.firstVisible();
                  r.col = e.bottomRight.col;
                  u = t;
                  break;
                case "last-col":
                  r.col = h.lastVisible();
                  t.col = e.topLeft.col;
                  u = r;
                  break;
                case "first-row":
                  t.row = f.firstVisible();
                  r.row = e.bottomRight.row;
                  u = t;
                  break;
                case "last-row":
                  r.row = f.lastVisible();
                  t.row = e.topLeft.row;
                  u = r;
                  break;
                case "last":
                  r.row = f.lastVisible();
                  r.col = h.lastVisible();
                  t = e.topLeft;
                  u = r;
                  break;
                case "first":
                  t.row = f.firstVisible();
                  t.col = h.firstVisible();
                  r = e.bottomRight;
                  u = t;
              }
              return (
                (l = new i(t, r)),
                this.union(l).intersects(e)
                  ? (u && o.focus(u), void this.updateCurrentSelectionRange(l))
                  : void this.modifySelection(a.replace("shrink", "expand"))
              );
            },
            moveActiveCell: function (n) {
              var e = this._sheet,
                s = e.activeCell(),
                h = s.topLeft,
                o = s.bottomRight,
                c = e.originalActiveCell(),
                r = e._grid._rows,
                f = e._grid._columns,
                i = c.row,
                u = c.col;
              switch (n) {
                case "left":
                  u = f.prevVisible(h.col);
                  break;
                case "up":
                  i = r.prevVisible(h.row);
                  break;
                case "right":
                  u = f.nextVisible(o.col);
                  break;
                case "down":
                  i = r.nextVisible(o.row);
                  break;
                case "first-col":
                  u = f.firstVisible();
                  break;
                case "last-col":
                  u = f.lastVisible();
                  break;
                case "first-row":
                  i = r.firstVisible();
                  break;
                case "last-row":
                  i = r.lastVisible();
                  break;
                case "last":
                  i = r.lastVisible();
                  u = f.lastVisible();
                  break;
                case "first":
                  i = r.firstVisible();
                  u = f.firstVisible();
                  break;
                case "next-page":
                  i = r.nextPage(o.row, this._viewPortHeight);
                  break;
                case "prev-page":
                  i = r.prevPage(o.row, this._viewPortHeight);
              }
              e.select(new t(i, u));
            },
            navigateInSelection: function (n) {
              function s(n) {
                f = n.topLeft;
                e = n.bottomRight;
              }
              var f,
                e,
                u,
                y,
                h,
                o = this._sheet,
                b = o.activeCell(),
                p = b.topLeft,
                w = o.originalActiveCell(),
                a = o._grid._rows,
                v = o._grid._columns,
                i = w.row,
                r = w.col,
                c = p.col,
                l = p.row;
              for (s(o.currentNavigationRange()), y = !1; !y; ) {
                switch (((h = new t(i, r)), n)) {
                  case "next":
                    e.eq(h)
                      ? (s(o.nextNavigationRange()), (i = f.row), (r = f.col))
                      : ((r = v.nextVisible(c)),
                        (r == c || r > e.col) &&
                          ((r = f.col),
                          (u = a.nextVisible(i)),
                          (i = u == i || u > e.row ? f.row : u)));
                    break;
                  case "previous":
                    f.eq(h)
                      ? (s(o.previousNavigationRange()),
                        (i = e.row),
                        (r = e.col))
                      : ((r = v.prevVisible(c)),
                        (r == c || r < f.col) &&
                          ((r = e.col),
                          (u = a.prevVisible(i)),
                          (i = u == i || u < f.row ? e.row : u)));
                    break;
                  case "lower":
                    e.eq(h)
                      ? (s(o.nextNavigationRange()), (i = f.row), (r = f.col))
                      : ((i = a.nextVisible(l)),
                        (i == l || i > e.row) &&
                          ((i = f.row),
                          (u = v.nextVisible(r)),
                          (r = u == r || u > e.col ? f.col : u)));
                    break;
                  case "upper":
                    f.eq(h)
                      ? (s(o.previousNavigationRange()),
                        (i = e.row),
                        (r = e.col))
                      : ((i = a.prevVisible(l)),
                        (i == l || i < f.row) &&
                          ((i = e.row),
                          (u = v.prevVisible(r)),
                          (r = u == r || u < f.col ? e.col : u)));
                    break;
                  default:
                    throw Error("Unknown entry navigation: " + n);
                }
                y = !this.shouldSkip(i, r);
                c = r;
                l = i;
              }
              o.singleCellSelection()
                ? o.select(new t(i, r))
                : o.activeCell(new t(i, r));
            },
            extendSelection: function (n, t) {
              var u,
                f = this._sheet,
                r = f._grid;
              return "autofill" === t
                ? void this.resizeAutoFill(n)
                : ("range" === t
                    ? (n = r.normalize(n))
                    : "row" === t
                    ? (n = r.rowRef(n.row).bottomRight)
                    : "column" === t && (n = r.colRef(n.col).bottomRight),
                  (u = f.originalActiveCell().toRangeRef()),
                  void this.updateCurrentSelectionRange(new i(u.topLeft, n)));
            },
            shouldSkip: function (n, i) {
              var r, u;
              return (
                !(
                  !this._sheet.isHiddenRow(n) && !this._sheet.isHiddenColumn(i)
                ) ||
                ((r = new t(n, i)),
                (u = !1),
                this._sheet.forEachMergedCell(function (n) {
                  n.intersects(r) && !n.collapse().eq(r) && (u = !0);
                }),
                u)
              );
            },
            resizeAutoFill: function (n) {
              var u,
                f,
                i,
                t = this._sheet,
                e = t.select(),
                s = t._autoFillOrigin,
                r = this.autoFillCalculator.autoFillDest(e, n),
                o = this.punch(e, r);
              o ||
                ((i = t.range(r)._previewFillFrom(t.range(s))),
                i && ((f = i.direction), (u = i.hint)));
              t.updateAutoFill(r, o, u, f);
            },
            determineDirection: function (n) {
              var t = this._sheet.currentSelectionRange(),
                i = this._sheet.activeCell(),
                f = i.topLeft.col == t.topLeft.col,
                e = i.bottomRight.col == t.bottomRight.col,
                r = i.topLeft.row == t.topLeft.row,
                u = i.bottomRight.row == t.bottomRight.row;
              switch (n) {
                case "left":
                  n = e ? "expand-left" : "shrink-left";
                  break;
                case "right":
                  n = f ? "expand-right" : "shrink-right";
                  break;
                case "up":
                  n = u ? "expand-up" : "shrink-up";
                  break;
                case "down":
                  n = r ? "expand-down" : "shrink-down";
                  break;
                case "prev-page":
                  n = u ? "expand-page-up" : "shrink-page-up";
                  break;
                case "next-page":
                  n = r ? "expand-page-down" : "shrink-page-down";
              }
              return n;
            },
            updateCurrentSelectionRange: function (n) {
              var t = this._sheet;
              t.select(
                t.originalSelect().replaceAt(t.selectionRangeIndex(), n),
                !1
              );
            },
            punch: function (n, r) {
              var u, f, e;
              return (
                r.topLeft.eq(n.topLeft) &&
                  (r.bottomRight.row < n.bottomRight.row
                    ? ((f = this.rowEdge.nextRight(r.bottomRight.row)),
                      (u = new i(new t(f, n.topLeft.col), n.bottomRight)))
                    : r.bottomRight.col < n.bottomRight.col &&
                      ((e = this.colEdge.nextRight(r.bottomRight.col)),
                      (u = new i(new t(n.topLeft.row, e), n.bottomRight)))),
                u
              );
            },
          })),
          (n.spreadsheet.SheetNavigator = u));
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/axismanager.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        if (!(n.support.browser.msie && n.support.browser.version < 9)) {
          var t = n.Class.extend({
            init: function (n) {
              this._sheet = n;
            },
            forEachSelectedColumn: function (n) {
              var t = this._sheet;
              t.batch(
                function () {
                  t.select().forEachColumnIndex(function (i, r) {
                    n(t, i, r);
                  });
                },
                { layout: !0, recalc: !0 }
              );
            },
            forEachSelectedRow: function (n) {
              var t = this._sheet;
              t.batch(
                function () {
                  t.select().forEachRowIndex(function (i, r) {
                    n(t, i, r);
                  });
                },
                { layout: !0, recalc: !0 }
              );
            },
            includesHiddenColumns: function (n) {
              return this._sheet._grid._columns.includesHidden(
                n.topLeft.col,
                n.bottomRight.col
              );
            },
            includesHiddenRows: function (n) {
              return this._sheet._grid._rows.includesHidden(
                n.topLeft.row,
                n.bottomRight.row
              );
            },
            selectionIncludesHiddenColumns: function () {
              return this.includesHiddenColumns(this._sheet.select());
            },
            selectionIncludesHiddenRows: function () {
              return this.includesHiddenRows(this._sheet.select());
            },
            deleteSelectedColumns: function () {
              var n = [],
                t = 0;
              return (
                this.forEachSelectedColumn(function (i, r) {
                  if (((r -= t), !i.isHiddenColumn(r))) {
                    t++;
                    var u = [];
                    n.unshift({
                      index: r,
                      formulas: u,
                      width: i.columnWidth(r),
                    });
                    i._saveModifiedFormulas(u, function () {
                      i.deleteColumn(r);
                    });
                  }
                }),
                n
              );
            },
            deleteSelectedRows: function () {
              var n = [],
                t = 0;
              return (
                this.forEachSelectedRow(function (i, r) {
                  if (((r -= t), !i.isHiddenRow(r))) {
                    t++;
                    var u = [];
                    n.unshift({
                      index: r,
                      formulas: u,
                      height: i.rowHeight(r),
                    });
                    i._saveModifiedFormulas(u, function () {
                      i.deleteRow(r);
                    });
                  }
                }),
                n
              );
            },
            hideSelectedColumns: function () {
              var t, r, u, f, i, e, o;
              for (
                this.forEachSelectedColumn(function (n, t) {
                  n.hideColumn(t);
                }),
                  t = this._sheet,
                  r = t.select().toRangeRef(),
                  u = r.topLeft.col,
                  f = r.bottomRight.col,
                  i = null;
                ;

              ) {
                if (((e = f < t._columns._count), (o = u >= 0), !o && !e))
                  break;
                if (e && !t.isHiddenColumn(f)) {
                  i = f;
                  break;
                }
                if (o && !t.isHiddenColumn(u)) {
                  i = u;
                  break;
                }
                u--;
                f++;
              }
              null !== i &&
                ((r = new n.spreadsheet.RangeRef(
                  new n.spreadsheet.CellRef(0, i),
                  new n.spreadsheet.CellRef(t._rows._count - 1, i)
                )),
                t.range(r).select());
            },
            hideSelectedRows: function () {
              var t, r, u, f, i, e, o;
              for (
                this.forEachSelectedRow(function (n, t) {
                  n.hideRow(t);
                }),
                  t = this._sheet,
                  r = t.select().toRangeRef(),
                  u = r.topLeft.row,
                  f = r.bottomRight.row,
                  i = null;
                ;

              ) {
                if (((e = f < t._rows._count), (o = u >= 0), !o && !e)) break;
                if (e && !t.isHiddenRow(f)) {
                  i = f;
                  break;
                }
                if (o && !t.isHiddenRow(u)) {
                  i = u;
                  break;
                }
                u--;
                f++;
              }
              null !== i &&
                ((r = new n.spreadsheet.RangeRef(
                  new n.spreadsheet.CellRef(i, 0),
                  new n.spreadsheet.CellRef(i, t._columns._count - 1)
                )),
                t.range(r).select());
            },
            unhideSelectedColumns: function () {
              this.forEachSelectedColumn(function (n, t) {
                n.unhideColumn(t);
              });
            },
            unhideSelectedRows: function () {
              this.forEachSelectedRow(function (n, t) {
                n.unhideRow(t);
              });
            },
            preventAddRow: function () {
              var n = this._sheet.select().toRangeRef(),
                t = n.height();
              return this._sheet.preventInsertRow(0, t);
            },
            preventAddColumn: function () {
              var n = this._sheet.select().toRangeRef(),
                t = n.width();
              return this._sheet.preventInsertColumn(0, t);
            },
            addColumnLeft: function () {
              var n,
                t = this._sheet,
                i = 0;
              return (
                t.batch(
                  function () {
                    t.select().forEachColumnIndex(function (r) {
                      n || (n = r);
                      t.insertColumn(n);
                      ++i;
                    });
                  },
                  { recalc: !0, layout: !0 }
                ),
                { base: n, count: i }
              );
            },
            addColumnRight: function () {
              var n,
                t = this._sheet,
                i = 0;
              return (
                t.batch(
                  function () {
                    t.select().forEachColumnIndex(function (t) {
                      n = t + 1;
                      ++i;
                    });
                    for (var r = 0; r < i; ++r) t.insertColumn(n);
                  },
                  { recalc: !0, layout: !0 }
                ),
                { base: n, count: i }
              );
            },
            addRowAbove: function () {
              var n,
                t = this._sheet,
                i = 0;
              return (
                t.batch(
                  function () {
                    t.select().forEachRowIndex(function (r) {
                      n || (n = r);
                      t.insertRow(n);
                      ++i;
                    });
                  },
                  { recalc: !0, layout: !0 }
                ),
                { base: n, count: i }
              );
            },
            addRowBelow: function () {
              var n,
                t = this._sheet,
                i = 0;
              return (
                t.batch(
                  function () {
                    t.select().forEachRowIndex(function (t) {
                      n = t + 1;
                      ++i;
                    });
                    for (var r = 0; r < i; ++r) t.insertRow(n);
                  },
                  { recalc: !0, layout: !0 }
                ),
                { base: n, count: i }
              );
            },
          });
          n.spreadsheet.AxisManager = t;
        }
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/clipboard.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        function r() {
          var n = new i(0, 0, 0);
          return {
            ref: n,
            mergedCells: [],
            data: [],
            foreign: !0,
            origRef: n.toRangeRef(),
          };
        }
        function t(n, t, i, r) {
          var u,
            f = n.data || (n.data = []);
          f[t] || (f[t] = []);
          f[t][i] = r;
          u = n.origRef.bottomRight;
          u.row = Math.max(u.row, t);
          u.col = Math.max(u.col, i);
        }
        function f(n) {
          return n.replace(/^-(?:ms|moz|webkit)-/, "");
        }
        function s(n) {
          var t = {};
          return (
            ["borderBottom", "borderRight", "borderLeft", "borderTop"].forEach(
              function (i) {
                t[i] =
                  "none" == n[i + "Style"]
                    ? null
                    : { size: 1, color: n[i + "Color"] };
              }
            ),
            t
          );
        }
        function h(n, t, i, r, u) {
          var e = window.getComputedStyle(i),
            c = i.innerText.replace(/\t$/, ""),
            h = s(e),
            o = {
              value: "" === c ? null : c,
              borderTop: h.borderTop || r.get(n, t) || null,
              borderBottom: h.borderBottom || r.get(n + 1, t) || null,
              borderLeft: h.borderLeft || u.get(n, t) || null,
              borderRight: h.borderRight || u.get(n, t + 1) || null,
              fontSize: parseInt(e["font-size"], 10),
            };
          return (
            r.set(n, t, o.borderTop),
            r.set(n + 1, t, o.borderBottom),
            u.set(n, t, o.borderLeft),
            u.set(n, t + 1, o.borderRight),
            "rgb(0, 0, 0)" !== e["background-color"] &&
              "rgba(0, 0, 0, 0)" !== e["background-color"] &&
              (o.background = e["background-color"]),
            "rgb(0, 0, 0)" !== e.color &&
              "rgba(0, 0, 0, 0)" !== e.color &&
              (o.color = e.color),
            "underline" == e["text-decoration"] && (o.underline = !0),
            "italic" == e["font-style"] && (o.italic = !0),
            "bold" == e["font-weight"] && (o.bold = !0),
            "right" !== f(e["text-align"]) &&
              (o.textAlign = f(e["text-align"])),
            "middle" !== e["vertical-align"] &&
              (o.verticalAlign = e["vertical-align"]),
            "normal" !== e["word-wrap"] && (o.wrap = !0),
            o
          );
        }
        function c(u) {
          for (
            var d,
              g,
              l,
              k,
              a,
              s,
              v,
              y,
              nt,
              tt,
              o,
              c,
              p = r(),
              w = [],
              e = 0,
              f = 0,
              b = 0;
            b < u.rows.length;
            ++b
          )
            w.push([]);
          for (
            d = new n.spreadsheet.calc.runtime.Matrix(),
              g = new n.spreadsheet.calc.runtime.Matrix(),
              l = 0;
            l < u.rows.length;
            ++l, ++e
          )
            for (k = u.rows[l], f = 0, a = 0; a < k.cells.length; ++a) {
              for (s = k.cells[a], v = s.rowSpan, y = s.colSpan; w[e][f]; ) f++;
              for (
                nt = s.getAttribute("style"),
                  tt = /mso-ignore:colspan/.test(nt),
                  t(p, e, f, h(e, f, s, d, g)),
                  (v > 1 || (y > 1 && !tt)) &&
                    p.mergedCells.push(
                      "" +
                        new n.spreadsheet.RangeRef(
                          new i(e, f),
                          new i(e + v - 1, f + y - 1)
                        )
                    ),
                  o = e + v;
                --o >= e;

              )
                for (c = f + y; --c >= f; )
                  o < w.length &&
                    ((w[o][c] = !0), (o == e && c == f) || t(p, o, c, {}));
            }
          return p;
        }
        function e(n) {
          var f,
            i,
            e,
            u,
            o = r();
          if (n.indexOf("\t") === -1 && n.indexOf("\n") == -1)
            t(o, 0, 0, { value: n });
          else
            for (f = n.split("\n"), i = 0; i < f.length; i++)
              for (e = f[i].split("\t"), u = 0; u < e.length; u++)
                t(o, i, u, { value: e[u] });
          return o;
        }
        var u, i, o;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((u = n.jQuery),
          (i = n.spreadsheet.CellRef),
          (o = n.Class.extend({
            init: function (t) {
              this._content = {};
              this._externalContent = {};
              this._internalContent = {};
              this.workbook = t;
              this.origin = n.spreadsheet.NULLREF;
              this.iframe = document.createElement("iframe");
              this.iframe.className = "k-spreadsheet-clipboard-paste";
              this.menuInvoked = !1;
              this._uid = n.guid();
              document.body.appendChild(this.iframe);
            },
            destroy: function () {
              document.body.removeChild(this.iframe);
            },
            canCopy: function () {
              var t = { canCopy: !0 },
                i = this.workbook.activeSheet().select();
              return (
                i === n.spreadsheet.NULLREF && (t.canCopy = !1),
                i instanceof n.spreadsheet.UnionRef &&
                  ((t.canCopy = !1), (t.multiSelection = !0)),
                this.menuInvoked && ((t.canCopy = !1), (t.menuInvoked = !0)),
                t
              );
            },
            canPaste: function () {
              var i = this.workbook.activeSheet(),
                t = this.pasteRef(),
                r = i.range(t),
                n = { canPaste: !0, pasteOnMerged: !1, pasteOnDisabled: !1 };
              return (
                r.enable() || ((n.canPaste = !1), (n.pasteOnDisabled = !0)),
                t.eq(i.unionWithMerged(t)) ||
                  ((n.canPaste = !1), (n.pasteOnMerged = !0)),
                this.menuInvoked && ((n.canPaste = !1), (n.menuInvoked = !0)),
                (t.bottomRight.row >= i._rows._count ||
                  t.bottomRight.col >= i._columns._count) &&
                  ((n.canPaste = !1), (n.overflow = !0)),
                n
              );
            },
            intersectsMerged: function () {
              var n,
                t = this.workbook.activeSheet();
              return (
                this.parse(),
                (this.origin = this._content.origRef),
                (n = this.pasteRef()),
                !n.eq(t.unionWithMerged(n))
              );
            },
            copy: function () {
              var n = this.workbook.activeSheet();
              this.origin = n.select();
              this._internalContent = n.selection().getState();
              delete this._externalContent.html;
              delete this._externalContent.plain;
            },
            cut: function () {
              var n = this.workbook.activeSheet();
              this.copy();
              n.range(n.select()).clear();
            },
            pasteRef: function () {
              var t,
                i,
                r,
                u,
                f = this.workbook.activeSheet();
              return this.origin === n.spreadsheet.NULLREF
                ? f.select()
                : ((t = f.activeCell().first()),
                  (i = this.origin.first()),
                  (r = i.row - t.row),
                  (u = i.col - t.col),
                  this.origin.relative(r, u, 3));
            },
            paste: function () {
              var n = this.workbook.activeSheet(),
                t = this.pasteRef();
              n.range(t).setState(this._content, this);
              n.triggerChange({ recalc: !0, ref: t });
            },
            external: function (n) {
              return n && (n.html || n.plain)
                ? void (this._externalContent = n)
                : this._externalContent;
            },
            isExternal: function () {
              return !this._isInternal();
            },
            parse: function () {
              var n,
                t,
                u,
                i = r();
              this._isInternal()
                ? (i = this._internalContent)
                : ((n = this._externalContent),
                  n.html
                    ? ((t = this.iframe.contentWindow.document),
                      t.open(),
                      t.write(n.html),
                      t.close(),
                      (u = t.querySelector("table")),
                      (i = u ? c(u) : e(n.plain)))
                    : (i = e(n.plain)),
                  (this.origin = i.origRef));
              this._content = i;
            },
            _isInternal: function () {
              var n, t;
              return (
                void 0 === this._externalContent.html ||
                ((n = !!u("<div/>")
                  .html(this._externalContent.html)
                  .find("table.kendo-clipboard-" + this._uid).length),
                (t = !!u("<div/>")
                  .html(this._externalContent.plain)
                  .find("table.kendo-clipboard-" + this._uid).length),
                n || t)
              );
            },
          })),
          (n.spreadsheet.Clipboard = o));
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/range.min",
      ["kendo.core.min", "util/text-metrics.min", "util/main.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        function e(n, t, i) {
          for (; n <= t && i(n); ) n++;
          if (n > t) return [];
          for (var r = n + 1; r <= t; ++r)
            if (i(r)) return [{ begin: n, end: r - 1 }].concat(e(r + 1, t, i));
          return [{ begin: n, end: t }];
        }
        function h(n) {
          return n.replace(/M/g, "m").replace(/'/g, '"').replace(/tt/, "am/pm");
        }
        function c(t) {
          return (
            !/^=/.test(t) &&
            /number|percent/.test(n.spreadsheet.calc.parse(null, 0, 0, t).type)
          );
        }
        function l(t, i, r, u, f) {
          var e = {
            baselineMarkerSize: 0,
            width: f === !0 ? i + "px" : "auto",
            "font-size": (u || 12) + "px",
            "font-family": r || "Arial",
            "white-space": f === !0 ? "pre-wrap" : "pre",
            "overflow-wrap": f === !0 ? "break-word" : "normal",
            "word-wrap": f === !0 ? "break-word" : "normal",
          };
          return n.util.measureText(t, e, { box: s, normalizeText: !1 }).height;
        }
        var u, i, r, f, o, t, s;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((u = n.jQuery),
          (i = n.spreadsheet.UnionRef),
          (r = n.spreadsheet.CellRef),
          (f = n.spreadsheet.RangeRef),
          (o = [
            "color",
            "fontFamily",
            "underline",
            "italic",
            "bold",
            "textAlign",
            "indent",
            "verticalAlign",
            "background",
            "format",
            "link",
            "editor",
            "borderTop",
            "borderRight",
            "borderBottom",
            "borderLeft",
            "comment",
          ]),
          (t = n.Class.extend({
            init: function (n, t) {
              this._sheet = t;
              this._ref = n;
            },
            clone: function () {
              return new t(this._ref.clone(), this._sheet);
            },
            skipHiddenCells: function () {
              var t = [],
                u = this,
                n = u._sheet,
                o = n.isHiddenRow.bind(n),
                s = n.isHiddenColumn.bind(n);
              return (
                u._ref.forEach(function (n) {
                  var a, v, c, l, i, h;
                  for (
                    n = u._normalize(n.toRangeRef()),
                      a = n.topLeft,
                      v = n.bottomRight,
                      c = e(a.row, v.row, o),
                      l = e(a.col, v.col, s),
                      i = 0;
                    i < c.length;
                    ++i
                  )
                    for (h = 0; h < l.length; ++h)
                      t.push(
                        new f(
                          new r(c[i].begin, l[h].begin),
                          new r(c[i].end, l[h].end)
                        )
                      );
                }),
                n.range(t.length > 1 ? new i(t) : t[0])
              );
            },
            _normalize: function (n) {
              return this._sheet._grid.normalize(n);
            },
            _set: function (n, t, i) {
              var r = this,
                u = r._sheet;
              return (
                r._ref.forEach(function (i) {
                  u._set(i.toRangeRef(), n, t);
                }),
                i ||
                  u.triggerChange({
                    recalc: "formula" == n || "value" == n || "validation" == n,
                    value: t,
                    range: r,
                    ref: r._ref,
                  }),
                r
              );
            },
            _get: function (n) {
              return this._sheet._get(this._ref.toRangeRef(), n);
            },
            _property: function (n, t) {
              return void 0 === t ? this._get(n) : this._set(n, t);
            },
            value: function (n) {
              return (
                void 0 !== n && this._set("formula", null, !0),
                this._property("value", n)
              );
            },
            resize: function (n) {
              var i = this._resizedRef(n);
              return new t(i, this._sheet);
            },
            _resizedRef: function (n) {
              return this._ref.map(function (t) {
                return t.toRangeRef().resize(n);
              });
            },
            input: function (t, i) {
              var f, r, l, e, o, s, a;
              return (
                (i = u.extend({ arrayFormula: !1 }, i)),
                (f = this._get("format")),
                void 0 !== t
                  ? ((l = this._ref.toRangeRef().topLeft),
                    (r = n.spreadsheet.calc.parse(
                      this._sheet.name(),
                      l.row,
                      l.col,
                      t,
                      f
                    )),
                    this._sheet.batch(
                      function () {
                        var u,
                          e = null;
                        "exp" == r.type
                          ? (e = n.spreadsheet.calc.compile(r))
                          : "@" != f
                          ? ((u =
                              f && n.spreadsheet.formatting.type(r.value, f)),
                            "date" == r.type && "date" != u
                              ? this.format(
                                  r.format || h(n.culture().calendar.patterns.d)
                                )
                              : "percent" == r.type && "percent" != u
                              ? this.format(
                                  100 * r.value == ((100 * r.value) | 0)
                                    ? "0%"
                                    : "0.00%"
                                )
                              : r.format &&
                                (!f ||
                                  r.currency ||
                                  ("number" == u &&
                                    "number" == r.type &&
                                    r.format.length > f.length)) &&
                                this.format(r.format))
                          : "string" != r.type && (r.value = t);
                        this.formula(e, i.arrayFormula);
                        e || this.value(r.value);
                      }.bind(this),
                      {
                        recalc: !0,
                        value: t,
                        ref: this._ref,
                        editorChange: this._sheet.isInEditMode(),
                      }
                    ),
                    this)
                  : ((t = this._get("value")),
                    (e = this._get("formula")),
                    (o = f && !e && n.spreadsheet.formatting.type(t, f)),
                    e
                      ? (t = "=" + e)
                      : f &&
                        "date" == o &&
                        ((s = n.spreadsheet.formatting.text(t, f)),
                        (r = n.spreadsheet.calc.parse(null, null, null, s, f)),
                        (a = n.spreadsheet.formatting.text(r.value, f)),
                        s == a)
                      ? (t = s)
                      : "date" === o
                      ? (t = n.toString(
                          n.spreadsheet.numberToDate(t),
                          n.culture().calendar.patterns.d
                        ))
                      : "percent" === o
                      ? (t =
                          n.spreadsheet.calc.runtime.limitPrecision(100 * t) +
                          "%")
                      : "string" == typeof t &&
                        (/^[=']/.test(t) || /^(?:true|false)$/i.test(t) || c(t))
                      ? (t = "'" + t)
                      : this._sheet._useCultureDecimals() &&
                        "number" == typeof t &&
                        t != Math.floor(t) &&
                        (t = (t + "").replace(
                          ".",
                          n.culture().numberFormat["."]
                        )),
                    t)
              );
            },
            enable: function (t) {
              return void 0 === t
                ? !n.util.withExit(function (n) {
                    this._sheet.forEach(this._ref, function (t, i, r) {
                      r.enable === !1 && n(!0);
                    });
                  }, this)
                : this._property("enable", t);
            },
            formula: function (n, t) {
              var r,
                u,
                i = this;
              return void 0 === n
                ? ((r = i._get("formula")), r ? "" + r : null)
                : (t
                    ? ((u = this._ref.toRangeRef()),
                      (n = i._sheet
                        .range(u.topLeft)
                        ._set("formula", n)
                        ._get("formula")),
                      n && n.setArrayFormulaRange(u))
                    : i._set("formula", n),
                  i);
            },
            intersectingArrayFormula: function () {
              var t = this._ref.clone().simplify().setSheet(this._sheet.name());
              return n.util.withExit(function (i) {
                this._sheet._forFormulas(function (r) {
                  var u = r.arrayFormulaRange;
                  u &&
                    (u = t.intersect(u)) !== n.spreadsheet.NULLREF &&
                    i({ formula: r, intersection: u });
                });
              }, this);
            },
            canEditArrayFormula: function () {
              var n = this.intersectingArrayFormula();
              return !n || n.formula.arrayFormulaRange.eq(n.intersection);
            },
            validation: function (n) {
              if (void 0 === n) {
                var t = this._get("validation");
                return t ? t.toJSON() : null;
              }
              return this._property("validation", n);
            },
            _getValidationState: function () {
              for (
                var i,
                  n,
                  r = this._ref.toRangeRef(),
                  u = r.topLeft.row,
                  f = r.topLeft.col,
                  e = r.bottomRight.row,
                  o = r.bottomRight.col,
                  t = f;
                t <= o;
                t++
              )
                for (i = u; i <= e; i++)
                  if (
                    ((n = this._sheet._validation(i, t)),
                    n && "reject" === n.type && n.value === !1)
                  )
                    return n;
              return !1;
            },
            merge: function () {
              return (this._ref = this._sheet._merge(this._ref)), this;
            },
            unmerge: function () {
              var n = this._sheet._mergedCells;
              return (
                this._ref.forEach(function (t) {
                  t.toRangeRef()
                    .intersecting(n)
                    .forEach(function (t) {
                      n.splice(n.indexOf(t), 1);
                    });
                }),
                this._sheet.triggerChange({}),
                this
              );
            },
            select: function () {
              return this._sheet.select(this._ref), this;
            },
            values: function (t) {
              var f, e, o, h, c, r, u, s, l, a;
              if (this._ref instanceof i)
                throw Error("Unsupported for multiple ranges.");
              if (this._ref === n.spreadsheet.NULLREF) {
                if (void 0 !== t) throw Error("Unsupported for NULLREF.");
                return [];
              }
              if (
                ((f = this._ref.toRangeRef()),
                (e = f.topLeft.row),
                (o = f.topLeft.col),
                (h = f.bottomRight.row),
                (c = f.bottomRight.col),
                void 0 === t)
              ) {
                for (t = Array(f.height()), s = 0; s < t.length; s++)
                  t[s] = Array(f.width());
                for (r = o; r <= c; r++)
                  for (u = e; u <= h; u++)
                    t[u - e][r - o] = this._sheet._value(u, r);
                return t;
              }
              for (this._sheet._set(f, "formula", null), r = o; r <= c; r++)
                for (u = e; u <= h; u++)
                  (l = t[u - e]),
                    l &&
                      ((a = l[r - o]),
                      void 0 !== a && this._sheet._value(u, r, a));
              return this._sheet.triggerChange({ recalc: !0, ref: f }), this;
            },
            _properties: function (t, r) {
              var u, s, h, a, v, o, e, f, c, y, l;
              if (this._ref instanceof i)
                throw Error("Unsupported for multiple ranges.");
              if (this._ref === n.spreadsheet.NULLREF) {
                if (void 0 !== t) throw Error("Unsupported for NULLREF.");
                return [];
              }
              if (
                ((u = this._ref.toRangeRef()),
                (s = u.topLeft.row),
                (h = u.topLeft.col),
                (a = u.bottomRight.row),
                (v = u.bottomRight.col),
                (f = this._sheet),
                void 0 === t)
              )
                return (
                  (t = Array(u.height())),
                  f.forEach(u, function (n, i, r) {
                    n -= s;
                    i -= h;
                    var u = t[n] || (t[n] = []);
                    u[i] = r;
                  }),
                  t
                );
              for (
                u = u.clone(),
                  y = function (n) {
                    var t = c[n];
                    u.topLeft.row = u.bottomRight.row = e;
                    u.topLeft.col = u.bottomRight.col = o;
                    "value" == n && f._set(u, "formula", null);
                    f._set(u, n, t);
                  },
                  o = h;
                o <= v;
                o++
              )
                if (r || !f.isHiddenColumn(o))
                  for (e = s; e <= a; e++)
                    (!r && f.isHiddenRow(e)) ||
                      (r && f.isFilteredRow(e)) ||
                      ((l = t[e - s]),
                      l && ((c = l[o - h]), c && Object.keys(c).forEach(y)));
              return f.triggerChange({ recalc: !0, ref: this._ref }), this;
            },
            clear: function (n) {
              var t, r, i;
              return (
                (n = n || {}),
                (t = n.clearAll || !Object.keys(n).length),
                (r = this._sheet),
                (i = { recalc: t || n.contentsOnly, ref: this._ref }),
                r.batch(
                  function () {
                    i.recalc && this.formula(null);
                    t && this.validation(null);
                    (t || n.formatOnly) &&
                      (o.forEach(
                        function (t) {
                          (n.keepBorders && /^border/i.test(t)) ||
                            this[t](null);
                        }.bind(this)
                      ),
                      this.fontSize(null),
                      this.wrap(null),
                      this.unmerge());
                  }.bind(this),
                  i
                ),
                this
              );
            },
            clearContent: function () {
              return this.clear({ contentsOnly: !0 });
            },
            clearFormat: function () {
              return this.clear({ formatOnly: !0 });
            },
            isSortable: function () {
              return !this.cantSort();
            },
            cantSort: function () {
              var t, o, s, u, e, f;
              if (this._ref instanceof i)
                return {
                  code: "cantSortMultipleSelection",
                  message: "Unsupported for multiple ranges.",
                };
              if (this._ref === n.spreadsheet.NULLREF)
                return {
                  code: "cantSortNullRef",
                  message: "Unsupported for NULLREF.",
                };
              t = this._sheet._getMergedCells(this._ref.toRangeRef());
              o = t.primary;
              s = t.secondary;
              u = null;
              e = null;
              f = {};
              try {
                this._sheet.forEach(this, function (n, i) {
                  var c = new r(n, i).print(),
                    h = o[c];
                  if (h) {
                    if (null === u) (u = h.width()), (e = h.height());
                    else if (u != h.width() || e != h.height()) throw f;
                  } else if (!s[c] && t.hasMerged) throw f;
                });
              } catch (h) {
                if (h !== f) throw h;
                return {
                  code: "cantSortMixedCells",
                  message:
                    "Unsupported for range containing cells of different shapes.",
                };
              }
              return !1;
            },
            sort: function (n) {
              var t = this.cantSort();
              if (t) throw Error(t.message);
              return (
                void 0 === n && (n = { column: 0 }),
                (n = n instanceof Array ? n : [n]),
                this._sheet._sortBy(
                  this._ref.toRangeRef(),
                  n.map(function (n, t) {
                    return (
                      "number" == typeof n && (n = { column: n }),
                      {
                        index: void 0 === n.column ? t : n.column,
                        ascending: void 0 === n.ascending || n.ascending,
                      }
                    );
                  })
                ),
                this
              );
            },
            isFilterable: function () {
              return !(this._ref instanceof i);
            },
            filter: function (n) {
              if (this._ref instanceof i)
                throw Error("Unsupported for multiple ranges.");
              return (
                n === !1
                  ? this.clearFilters()
                  : ((n = n === !0 ? [] : n instanceof Array ? n : [n]),
                    this._sheet._filterBy(
                      this._ref.toRangeRef(),
                      n.map(function (n, t) {
                        return {
                          index: void 0 === n.column ? t : n.column,
                          filter: n.filter,
                        };
                      })
                    )),
                this
              );
            },
            clearFilter: function (n) {
              this._sheet.clearFilter(n);
            },
            clearFilters: function () {
              var n,
                t = this._sheet.filter(),
                i = [];
              if (t) {
                for (n = 0; n < t.columns.length; n++)
                  i.push(t.columns[n].index);
                this._sheet.batch(
                  function () {
                    this.clearFilter(i);
                    this._filter = null;
                  },
                  { layout: !0, filter: !0 }
                );
              }
            },
            hasFilter: function () {
              var n = this._sheet.filter();
              return !!n;
            },
            leftColumn: function () {
              return new t(this._ref.leftColumn(), this._sheet);
            },
            rightColumn: function () {
              return new t(this._ref.rightColumn(), this._sheet);
            },
            topRow: function () {
              return new t(this._ref.topRow(), this._sheet);
            },
            bottomRow: function () {
              return new t(this._ref.bottomRow(), this._sheet);
            },
            column: function (n) {
              return new t(this._ref.toColumn(n), this._sheet);
            },
            row: function (n) {
              return new t(this._ref.toRow(n), this._sheet);
            },
            forEachRow: function (n) {
              this._ref.forEachRow(
                function (i) {
                  n(new t(i, this._sheet));
                }.bind(this)
              );
            },
            forEachColumn: function (n) {
              this._ref.forEachColumn(
                function (i) {
                  n(new t(i, this._sheet));
                }.bind(this)
              );
            },
            sheet: function () {
              return this._sheet;
            },
            topLeft: function () {
              return this._ref.toRangeRef().topLeft;
            },
            intersectingMerged: function () {
              var t = this._sheet,
                n = [];
              return (
                t._mergedCells.forEach(
                  function (t) {
                    t.intersects(this._ref) && n.push("" + t);
                  }.bind(this)
                ),
                n
              );
            },
            getState: function (t) {
              var r,
                i,
                u = this._ref.first(),
                f = {
                  ref: u,
                  data: [],
                  origRef: this._ref,
                  rows: this._sheet._rows.getState(),
                };
              return (
                t
                  ? (r =
                      "input" === t
                        ? ["value", "formula"]
                        : "border" === t
                        ? [
                            "borderLeft",
                            "borderTop",
                            "borderRight",
                            "borderBottom",
                          ]
                        : [t])
                  : ((r = n.spreadsheet.ALL_PROPERTIES),
                    (f.mergedCells = this.intersectingMerged())),
                (i = f.data),
                this.forEachCell(function (t, f, e) {
                  var s = {},
                    o = t - u.row,
                    h = f - u.col;
                  i[o] || (i[o] = []);
                  i[o][h] = s;
                  r.forEach(function (t) {
                    var i = void 0 === e[t] ? null : e[t];
                    (i instanceof n.spreadsheet.calc.runtime.Formula ||
                      i instanceof n.spreadsheet.validation.Validation) &&
                      (i = i.deepClone());
                    s[t] = i;
                  });
                }),
                f
              );
            },
            setState: function (n, t) {
              var i = this._sheet,
                r = this._ref.first(),
                f = n.ref.row - r.row,
                e = n.ref.col - r.col,
                u = t && !t.isExternal(),
                o = t && !u;
              i.batch(
                function () {
                  var s, h;
                  n.mergedCells && this.unmerge();
                  t || this._sheet._rows.setState(n.rows);
                  s = r.row;
                  h = this.hasFilter();
                  n.data.forEach(function (f, e) {
                    if (!(h && u && i.isHiddenRow(n.ref.row + e))) {
                      var c = r.col;
                      f.forEach(function (f, l) {
                        var a, v;
                        if (!(h && u && i.isHiddenColumn(n.ref.col + l))) {
                          if (
                            ((a = t
                              ? i.range(s, c)
                              : i.range(r.row + e, r.col + l)),
                            a.enable())
                          ) {
                            for (v in f)
                              "value" != v &&
                                ((t && "enable" == v) || a._set(v, f[v]));
                            if (!f.formula)
                              if (o)
                                try {
                                  null == f.value
                                    ? a._set("value", null)
                                    : a.input(f.value);
                                } catch (y) {
                                  a._set("value", f.value);
                                }
                              else a._set("value", f.value);
                          }
                          c++;
                        }
                      });
                      s++;
                    }
                  });
                  n.mergedCells &&
                    n.mergedCells.forEach(function (n) {
                      n = i._ref(n).relative(f, e, 3);
                      i.range(n).merge();
                    }, this);
                }.bind(this),
                { recalc: !0, ref: this._ref }
              );
            },
            _adjustRowHeight: function () {
              var i = this,
                t = i._sheet,
                u = t._getMergedCells(i._ref.toRangeRef()),
                f = u.primary,
                e = u.secondary;
              t.batch(
                function () {
                  i.forEachRow(function (i) {
                    var o = i._ref.topLeft.row,
                      u = t.rowHeight(o);
                    i.forEachCell(function (i, o, s) {
                      var c,
                        l,
                        h,
                        a,
                        v = new r(i, o).print();
                      e[v] ||
                        ((c = f[v]),
                        (l = c
                          ? t._columns.sum(c.topLeft.col, c.bottomRight.col)
                          : t.columnWidth(o)),
                        (h = s.value),
                        s.format &&
                          null != h &&
                          (h = n.spreadsheet.formatting.format(h, s.format)),
                        (a = n.spreadsheet.util.getTextHeight(
                          h,
                          l,
                          s.fontFamily,
                          s.fontSize,
                          s.wrap
                        )),
                        (u = Math.max(u, a)));
                    });
                    t.rowHeight(o, u);
                  });
                },
                { layout: !0 }
              );
            },
            forEachCell: function (n) {
              this._ref.forEach(
                function (t) {
                  this._sheet.forEach(t.toRangeRef(), n.bind(this));
                }.bind(this)
              );
            },
            hasValue: function () {
              var t = this._sheet._defaultCellStyle;
              return n.util.withExit(function (n) {
                this.forEachCell(function (i, r, u) {
                  var e, f;
                  for (e in u)
                    (f = u[e]),
                      void 0 !== f && null !== f && f !== t[e] && n(!0);
                });
              }, this);
            },
            wrap: function (n) {
              return void 0 === n
                ? !!this._property("wrap")
                : (this._property("wrap", n),
                  null !== n && this._adjustRowHeight(),
                  this);
            },
            fontSize: function (n) {
              return void 0 === n
                ? this._property("fontSize")
                : (this._property("fontSize", n),
                  null !== n && this._adjustRowHeight(),
                  this);
            },
            draw: function (n, t) {
              this._sheet.draw(this, n, t);
            },
            insideBorders: function (n) {
              return this.insideVerticalBorders(n).insideHorizontalBorders(n);
            },
            insideVerticalBorders: function (n) {
              return (
                this._ref.forEach(function (t) {
                  t instanceof f &&
                    t.width() > 1 &&
                    ((t = t.clone()),
                    t.topLeft.col++,
                    this._sheet.range(t)._set("vBorders", n));
                }, this),
                this
              );
            },
            insideHorizontalBorders: function (n) {
              return (
                this._ref.forEach(function (t) {
                  t instanceof f &&
                    t.height() > 1 &&
                    ((t = t.clone()),
                    t.topLeft.row++,
                    this._sheet.range(t)._set("hBorders", n));
                }, this),
                this
              );
            },
          })),
          u.each(o, function (n, i) {
            t.prototype[i] = function (n) {
              return this._property(i, n);
            };
          }),
          (s = u(
            '<div style="position: absolute !important; top: -4000px !important; height: auto !important;padding: 1px 3px !important; box-sizing: border-box; margin: 0 !important; border: 1px solid black !important;line-height: normal !important; visibility: hidden !important;white-space: pre-wrap;" />'
          )[0]),
          (n.spreadsheet.util = { getTextHeight: l }),
          (n.spreadsheet.Range = t));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/runtime.min", ["spreadsheet/references.min"], n);
  })(
    function () {
      "use strict";
      function t(n) {
        return n instanceof t ? n : void (this.code = n);
      }
      function bt(n, t, i) {
        for (var r, u = i(n), f = n; ++n < t; )
          (r = i(n)), r > u && ((u = r), (f = n));
        return f;
      }
      function a(n, t) {
        if (n.constructor !== t.constructor) return !1;
        if (n instanceof c)
          return (
            n.sheet == t.sheet &&
            n.row == t.row &&
            n.col == t.col &&
            n.rel == t.rel
          );
        if (n instanceof o)
          return (
            a(n.topLeft, t.topLeft) &&
            a(n.bottomRight, t.bottomRight) &&
            n.endSheet == t.endSheet
          );
        if (n instanceof nt) {
          var i = n.refs.length;
          if (i != t.refs.length) return !1;
          for (; --i >= 0; ) if (!a(n.refs[i], t.refs[i])) return !1;
        }
        return !0;
      }
      function it(n, i) {
        function a(n) {
          var t, i, c, e, h;
          return (
            (r = n[0]),
            (t = "{ "),
            Array.isArray(r)
              ? ((s += "while (i < args.length) { "),
                (f += "while (i < args.length) { "),
                (t += "xargs.push(tmp = []); stack.push(xargs); xargs = tmp; "),
                (t += "while (i < args.length) { "),
                (t += n.map(a).join("")),
                (t += "} "),
                (t += "xargs = stack.pop(); "),
                (f += "} "),
                (s += "} "))
              : "+" == r
              ? ((s += "while (i < args.length) { "),
                (f += "while (i < args.length) { "),
                (t += "if (i >= args.length) return new CalcError('N/A'); "),
                (t += "xargs.push(tmp = []); stack.push(xargs); xargs = tmp; "),
                (t += "do { "),
                (t += n.slice(1).map(a).join("")),
                (t += "} while (i < args.length); "),
                (t += "xargs = stack.pop(); "),
                (f += "} "),
                (s += "} "))
              : "?" == r
              ? (t += "if (!(" + o(n[1]) + ")) return new CalcError(err); ")
              : ((i = n[1]),
                Array.isArray(i) && /^#?collect/.test(i[0])
                  ? ((c = /!$/.test(i[0])),
                    (e = i[2]),
                    u(),
                    (t += "try {var $" + r + " = this.cellValues(args.slice(i"),
                    e && (t += ", i + " + e),
                    (t +=
                      ")" +
                      (c ? ",true" : "") +
                      ").reduce(function(ret, $" +
                      r +
                      "){ "),
                    "#" != i[0].charAt(0) &&
                      (t +=
                        "if ($" +
                        r +
                        " instanceof CalcError) throw $" +
                        r +
                        "; "),
                    (t += "if (" + o(i[1]) + ") ret.push($" + r + "); "),
                    (t += "return ret; "),
                    (t += "}.bind(this), []); "),
                    (t += e ? "i += " + e + "; " : "i = args.length; "),
                    (t +=
                      "xargs.push($" +
                      r +
                      ")} catch(ex) { if (ex instanceof CalcError) return ex; throw ex; } "),
                    (f += "toResolve.push(args.slice(i)); "))
                  : "rest" == i
                  ? (t += "xargs.push(args.slice(i)); i = args.length; ")
                  : ((y = /^\*/.test(r)) && ((p = !0), (r = r.substr(1))),
                    (t += "var $" + r + " = args[i++]; "),
                    (h = !1),
                    /!$/.test(i)
                      ? ((i = i.substr(0, i.length - 1)), (h = !0))
                      : (t +=
                          "if ($" +
                          r +
                          " instanceof CalcError) return $" +
                          r +
                          "; "),
                    (t += w(i, h) + "xargs.push($" + r + "); "))),
            t + "} "
          );
        }
        function u() {
          return c
            ? "$" + r
            : ((v = !0),
              (c = !0),
              (f += "toResolve.push(args[i++]); "),
              "($" + r + " = this.force($" + r + "))");
        }
        function e(n) {
          return (
            "(" +
            (n
              ? "(typeof " +
                u() +
                " == 'number' ? ($" +
                r +
                " = round($" +
                r +
                "), true) : false) || "
              : "(typeof " + u() + " == 'number') || ") +
            "(typeof $" +
            r +
            " == 'boolean' ? ($" +
            r +
            " = +$" +
            r +
            ", true) : false) || (typeof $" +
            r +
            " == 'string' && !/^(?:=|true|false)/i.test($" +
            r +
            ") ? (tmp = kendo.spreadsheet.calc.parse(0, 0, 0, $" +
            r +
            "), /^date|number|percent$/.test(tmp.type) ? ($" +
            r +
            " = +tmp.value, true) : false) : false))"
          );
        }
        function w(n, t) {
          c = !1;
          var i = "if (!(" + o(n) + ")) { ";
          return (
            c &&
              !t &&
              (i +=
                " if ($" + r + " instanceof CalcError) return $" + r + "; "),
            (i += "return new CalcError(err); } "),
            c || (f += "i++; "),
            (s += y
              ? "var $" +
                r +
                " = this._arrayArg(args[i]); if ($" +
                r +
                ") { xargs.push($" +
                r +
                "); width = Math.max(width, $" +
                r +
                ".width); height = Math.max(height, $" +
                r +
                ".height); arrays.push(true) } else { xargs.push(args[i]); arrays.push(false); } i++; "
              : "xargs.push(args[i++]); arrays.push(false); "),
            i
          );
        }
        function o(n) {
          if (Array.isArray(n)) {
            if ("or" == n[0])
              return "(" + n.slice(1).map(o).join(") || (") + ")";
            if ("and" == n[0])
              return "(" + n.slice(1).map(o).join(") && (") + ")";
            if ("values" == n[0])
              return (
                "(" +
                n
                  .slice(1)
                  .map(function (n) {
                    return u() + " === " + n;
                  })
                  .join(") || (") +
                ")"
              );
            if ("null" == n[0])
              return (
                "(" +
                o("null") +
                " ? (($" +
                r +
                " = " +
                n[1] +
                "), true) : false)"
              );
            if ("between" == n[0] || "[between]" == n[0])
              return (
                "(" +
                u() +
                " >= " +
                n[1] +
                " && $" +
                r +
                " <= " +
                n[2] +
                " ? true : ((err = 'NUM'), false))"
              );
            if ("(between)" == n[0])
              return (
                "(" +
                u() +
                " > " +
                n[1] +
                " && $" +
                r +
                " < " +
                n[2] +
                " ? true : ((err = 'NUM'), false))"
              );
            if ("(between]" == n[0])
              return (
                "(" +
                u() +
                " > " +
                n[1] +
                " && $" +
                r +
                " <= " +
                n[2] +
                " ? true : ((err = 'NUM'), false))"
              );
            if ("[between)" == n[0])
              return (
                "(" +
                u() +
                " >= " +
                n[1] +
                " && $" +
                r +
                " < " +
                n[2] +
                " ? true : ((err = 'NUM'), false))"
              );
            if ("assert" == n[0]) {
              var t = n[2] || "N/A";
              return (
                "((" +
                n[1] +
                ") ? true : (err = " +
                JSON.stringify(t) +
                ", false))"
              );
            }
            if ("not" == n[0]) return "!(" + o(n[1]) + ")";
            throw Error("Unknown array type condition: " + n[0]);
          }
          if ("number" == n || "datetime" == n) return e(!0);
          if ("number!" == n)
            return (
              "(typeof " +
              u() +
              " == 'number' ? ($" +
              r +
              " = round($" +
              r +
              "), true) : false)"
            );
          if ("integer" == n || "date" == n)
            return "(" + e() + " && (($" + r + " |= 0), true))";
          if ("divisor" == n)
            return (
              "(" +
              e(!0) +
              " && ($" +
              r +
              " == 0 ? ((err = 'DIV/0'), false) : true))"
            );
          if ("number+" == n)
            return (
              "(" +
              e(!0) +
              " && ($" +
              r +
              " >= 0 ? true : ((err = 'NUM'), false)))"
            );
          if ("integer+" == n)
            return (
              "(" +
              e() +
              " && (($" +
              r +
              " |= 0) >= 0 ? true : ((err = 'NUM'), false)))"
            );
          if ("number++" == n)
            return (
              "(" +
              e(!0) +
              " && ($" +
              r +
              " > 0 ? true : ((err = 'NUM'), false)))"
            );
          if ("integer++" == n)
            return (
              "(" +
              e() +
              " && (($" +
              r +
              " |= 0) > 0 ? true : ((err = 'NUM'), false)))"
            );
          if ("string" == n)
            return (
              "((typeof " +
              u() +
              " == 'string' || typeof $" +
              r +
              " == 'boolean' || typeof $" +
              r +
              " == 'number') ? ($" +
              r +
              " += '', true) : ($" +
              r +
              " === undefined ? (($" +
              r +
              " = ''), true) : false))"
            );
          if ("boolean" == n) return "(typeof " + u() + " == 'boolean')";
          if ("logical" == n)
            return (
              "(typeof " +
              u() +
              " == 'boolean' || (typeof $" +
              r +
              " == 'number' ? ($" +
              r +
              " = !!$" +
              r +
              ", true) : false))"
            );
          if ("matrix" == n)
            return (
              u(),
              "((m = this.asMatrix($" + r + ")) ? ($" + r + " = m) : false)"
            );
          if ("#matrix" == n)
            return (
              "((m = this.asMatrix($" + r + ")) ? ($" + r + " = m) : false)"
            );
          if ("ref" == n)
            return "($" + r + " instanceof kendo.spreadsheet.Ref)";
          if ("area" == n)
            return (
              "($" +
              r +
              " instanceof kendo.spreadsheet.CellRef || $" +
              r +
              " instanceof kendo.spreadsheet.RangeRef)"
            );
          if ("cell" == n)
            return "($" + r + " instanceof kendo.spreadsheet.CellRef)";
          if ("null" == n) return "(" + u() + " == null)";
          if ("anyvalue" == n)
            return "(" + u() + " != null && i <= args.length)";
          if ("forced" == n) return "(" + u() + ", i <= args.length)";
          if ("anything" == n) return "(i <= args.length)";
          if ("blank" == n) return "(" + u() + " == null || $" + r + " === '')";
          throw Error("Can't check for type: " + n);
        }
        var r,
          c,
          h,
          s =
            "function arrayArgs(args) { var xargs = [], width = 0, height = 0, arrays = [], i = 0; ",
          f = "function resolve(args, callback) { var toResolve = [], i = 0; ",
          l =
            "'use strict'; function check(args) { var stack = [], tmp, xargs = [], i = 0, m, err = 'VALUE'; ",
          v = !1,
          y = !1,
          p = !1;
        return (
          (l += i.map(a).join("")),
          (l += "if (i < args.length) return new CalcError('N/A'); "),
          (l += "return xargs; } "),
          (s +=
            "return { args: xargs, width: width, height: height, arrays: arrays }; } "),
          v
            ? ((f += "this.resolveCells(toResolve, callback); } "),
              (h = Function(
                "CalcError",
                "round",
                l +
                  f +
                  s +
                  " return { resolve: resolve, check: check, arrayArgs: arrayArgs };"
              )))
            : (h = Function(
                "CalcError",
                "round",
                l + " return { check: check };"
              )),
          (h = h(t, d)),
          p || delete h.arrayArgs,
          h
        );
      }
      function d(n) {
        return n === parseInt(n, 10) ? n : +n.toPrecision(14);
      }
      function kt(n) {
        return "number" == typeof n ? d(n) : n;
      }
      function rt(n, i, r) {
        if (r instanceof t) return r;
        try {
          return i.apply(n, r);
        } catch (u) {
          if (u instanceof t) return u;
          throw u;
        }
      }
      function dt(n, t, i, u) {
        return function (f, e) {
          function o() {
            var t, l, h, c, o, s;
            if (
              u &&
              ((t = u.call(this, e)), (e = t.args), t.width > 0 && t.height > 0)
            ) {
              for (l = new r(this), h = 0; h < t.height; ++h)
                for (c = 0; c < t.width; ++c) {
                  for (o = [], s = 0; s < e.length; ++s)
                    o[s] = t.arrays[s] ? e[s].getNA(h, c) : e[s];
                  o = i.call(this, o);
                  l.set(h, c, rt(this, n, o));
                }
              return f(l);
            }
            o = i.call(this, e);
            f(rt(this, n, o));
          }
          t ? t.call(this, e, o) : o.call(this);
        };
      }
      function gt(n, i, u, f) {
        return function (e, o) {
          function s() {
            var i, v, h, y, l, a, s, c;
            if (
              f &&
              ((i = f.call(this, o)), (o = i.args), i.width > 0 && i.height > 0)
            )
              for (
                v = new r(this),
                  h = i.width * i.height,
                  y = function (n, t) {
                    return function (i) {
                      if ((v.set(n, t, i), --h, 0 === h)) return e(v);
                    };
                  },
                  l = 0;
                l < i.height && h > 0;
                ++l
              )
                for (a = 0; a < i.width && h > 0; ++a) {
                  for (s = [], c = 0; c < o.length; ++c)
                    s[c] = i.arrays[c] ? o[c].getNA(l, a) : o[c];
                  if (((s = u.call(this, s)), s instanceof t)) {
                    if ((v.set(l, a, s), --h, 0 === h)) return e(v);
                  } else s.unshift(y(l, a)), n.apply(this, s);
                }
            else
              (i = u.call(this, o)),
                i instanceof t ? e(i) : (i.unshift(e), n.apply(this, i));
          }
          i ? i.call(this, o, s) : s.call(this);
        };
      }
      function n(n, t) {
        return (
          (n = n.toLowerCase()),
          (f[n] = t),
          {
            args: function (i, r) {
              var e,
                u = it(n, i);
              return (
                r &&
                  (u.arrayArgs && console.log("" + u.arrayArgs),
                  u.resolve && console.log("" + u.resolve),
                  u.check && console.log("" + u.check)),
                (e = f[n] = dt(t, u.resolve, u.check, u.arrayArgs)),
                (e.kendoSpreadsheetArgs = i),
                this
              );
            },
            argsAsync: function (i, r) {
              var e,
                u = it(n, i);
              return (
                r &&
                  (u.arrayArgs && console.log("" + u.arrayArgs),
                  u.resolve && console.log("" + u.resolve),
                  u.check && console.log("" + u.check)),
                (e = f[n] = gt(t, u.resolve, u.check, u.arrayArgs)),
                (e.kendoSpreadsheetArgs = i),
                this
              );
            },
          }
        );
      }
      function ut(n, t, i) {
        return (
          t++,
          (((1461 * (n + 4800 + (((t - 14) / 12) | 0))) / 4) | 0) +
            (((367 * (t - 2 - 12 * (((t - 14) / 12) | 0))) / 12) | 0) -
            (((3 * (((n + 4900 + (((t - 14) / 12) | 0)) / 100) | 0)) / 4) | 0) +
            i -
            32075
        );
      }
      function ni(n) {
        var t, u, i, f, r, e, o;
        return (
          (t = n + 68569),
          (u = ((4 * t) / 146097) | 0),
          (t -= ((146097 * u + 3) / 4) | 0),
          (f = ((4e3 * (t + 1)) / 1461001) | 0),
          (t = t - (((1461 * f) / 4) | 0) + 31),
          (i = ((80 * t) / 2447) | 0),
          (e = t - (((2447 * i) / 80) | 0)),
          (t = (i / 11) | 0),
          (r = i + 2 - 12 * t),
          (o = 100 * (u - 49) + f + t),
          r--,
          { year: o, month: r, date: e, day: (n + 1) % 7, ord: pt[y(o)][r] + e }
        );
      }
      function y(n) {
        return n % 4 ? 0 : n % 100 ? 1 : n % 400 ? 0 : 1;
      }
      function ti(n) {
        return y(n) ? 366 : 365;
      }
      function ft(n, t) {
        return y(n) && 1 == t ? 29 : yt[t];
      }
      function ii(n, t, i) {
        return t >= 1 && t <= 12 && i >= 1 && i <= ft(n, t - 1);
      }
      function et(n) {
        return ni((0 | n) + tt);
      }
      function ot(n, t, i) {
        return ut(n, t, i) - tt;
      }
      function st(n) {
        var t,
          i,
          r,
          u,
          f = n - (0 | n);
        return (
          f < 0 && f++,
          (t = Math.round(wt * f)),
          (i = Math.floor(t / k)),
          (t -= i * k),
          (r = Math.floor(t / b)),
          (t -= r * b),
          (u = Math.floor(t / 1e3)),
          (t -= 1e3 * u),
          { hours: i, minutes: r, seconds: u, milliseconds: t }
        );
      }
      function ht(n) {
        var i = et(n),
          t = st(n);
        return new Date(
          i.year,
          i.month,
          i.date,
          t.hours,
          t.minutes,
          t.seconds,
          t.milliseconds
        );
      }
      function ct(n, t, i, r) {
        return (n + (t + (i + r / 1e3) / 60) / 60) / 24;
      }
      function lt(n) {
        var t = ct(
          n.getHours(),
          n.getMinutes(),
          n.getSeconds(),
          n.getMilliseconds()
        );
        return (
          (n = ot(n.getFullYear(), n.getMonth(), n.getDate())),
          n < 0 ? n - 1 + t : n + t
        );
      }
      function ri(n, t) {
        return (
          t && (t = kendo.spreadsheet.formatting.makeDateFormat(t)),
          kendo.parseExactDate(n, t) ||
            kendo.parseExactDate(n) ||
            kendo.parseExactDate(n, [
              "MMMM dd yyyy",
              "MMMM dd yy",
              "MMM dd yyyy",
              "MMM dd yy",
              "dd MMMM yyyy",
              "dd MMMM yy",
              "dd MMM yyyy",
              "dd MMM yy",
              "MMMM dd, yyyy",
              "MMMM dd, yy",
              "MMM dd, yyyy",
              "MMM dd, yy",
              "MMMM dd",
              "MMM dd",
              "MMMM yyyy",
              "MMM yyyy",
              "dd MMMM",
              "dd MMM",
            ])
        );
      }
      function p(n) {
        return function (i, r) {
          return (
            "string" == typeof i &&
              "string" != typeof r &&
              (r = null == r ? "" : r + ""),
            "string" != typeof i &&
              "string" == typeof r &&
              (i = null == i ? "" : i + ""),
            "number" == typeof i && null == r && (r = 0),
            "number" == typeof r && null == i && (i = 0),
            "string" == typeof i &&
              "string" == typeof r &&
              ((i = i.toLowerCase()), (r = r.toLowerCase())),
            typeof r == typeof i ? n(i, r) : new t("VALUE")
          );
        };
      }
      var g,
        u,
        i,
        w,
        e,
        c,
        o,
        nt,
        at,
        vt,
        r,
        l,
        f,
        tt,
        yt,
        pt,
        b,
        k,
        wt,
        s,
        v,
        h;
      (kendo.support.browser.msie && kendo.support.browser.version < 9) ||
        ((g = {}),
        (u = kendo.spreadsheet),
        (u.calc = g),
        (i = g.runtime = {}),
        (w = kendo.Class),
        (e = u.Ref),
        (c = u.CellRef),
        (o = u.RangeRef),
        (nt = u.UnionRef),
        (at = u.NULLREF),
        (t.prototype.toString = function () {
          return "#" + this.code + ("NAME" == this.code ? "?" : "!");
        }),
        (vt = w.extend({
          init: function (n, t, i, r) {
            this.callback = n;
            this.formula = t;
            this.ss = i;
            this.parent = r;
          },
          resolve: function (n) {
            var t = this;
            n instanceof e
              ? t.resolveCells([n], function () {
                  t._resolve(n);
                })
              : t._resolve(n);
          },
          error: function (n) {
            return new t(n);
          },
          _resolve: function (n) {
            n =
              void 0 === n ? null : Array.isArray(n) ? this.asMatrix(n) : kt(n);
            var t = this.formula;
            t.arrayFormulaRange
              ? (n = this.asMatrix(n) || this.asMatrix([[n]]))
              : n instanceof o && (n = this._arrayArg(n));
            t.value = n;
            this.ss.onFormula(t) && this.callback && this.callback.call(t, n);
          },
          resolveCells: function (n, t) {
            function o(n) {
              n.exec(
                i.ss,
                function () {
                  --f || t.call(i);
                },
                i
              );
            }
            function s(n) {
              for (var i, t = 0; t < n.length; ++t)
                (i = n[t]), i.formula && r.push(i.formula);
              return !0;
            }
            var f,
              u,
              i = this,
              r = [];
            if (
              ((function h(n) {
                for (var t, r = 0; r < n.length; ++r)
                  (t = n[r]),
                    t instanceof e && s(i.getRefCells(t)),
                    Array.isArray(t) && h(t);
              })(n),
              !r.length)
            )
              return t.call(i);
            for (f = r.length, u = 0; u < r.length; ++u) o(r[u]);
          },
          cellValues: function (n, t) {
            for (var i, u = [], f = 0; f < n.length; ++f)
              (i = n[f]),
                i instanceof e
                  ? ((i = this.getRefData(i, t)), (u = u.concat(i)))
                  : Array.isArray(i)
                  ? (u = u.concat(this.cellValues(i, t)))
                  : i instanceof r
                  ? (u = u.concat(this.cellValues(i.data, t)))
                  : u.push(i);
            return u;
          },
          fetchName: function (n, i) {
            var o,
              f = this.formula,
              r = this.ss.nameValue(n, f.sheet, f.row, f.col);
            r instanceof l
              ? ((r = r.clone(f.sheet, f.row, f.col, !0)),
                (o = new u.ValidationFormulaContext(this.ss.workbook)),
                r.exec(o, i, this))
              : (r instanceof e &&
                  ((r = r.absolute(f.row, f.col)),
                  r.sheet || (r.sheet = f.sheet)),
                i(null == r ? new t("NAME") : r));
          },
          force: function (n) {
            return n instanceof e ? this.getRefData(n) : n;
          },
          func: function (n, i, r) {
            n = n.toLowerCase();
            var u = f[n];
            return u ? u.call(this, i, r) : void i(new t("NAME"));
          },
          bool: function (n) {
            return (
              n instanceof e && (n = this.getRefData(n)),
              "string" == typeof n
                ? "true" == n.toLowerCase()
                : "number" == typeof n
                ? 0 !== n
                : "boolean" == typeof n
                ? n
                : null != n
            );
          },
          _arrayArg: function (n) {
            var i = this.formula;
            return !i.arrayFormulaRange && n instanceof o
              ? 1 == n.height() &&
                i.col >= n.topLeft.col &&
                i.col <= n.bottomRight.col
                ? this.getRefData(new c(n.topLeft.row, i.col).setSheet(n.sheet))
                : 1 == n.width() &&
                  i.row >= n.topLeft.row &&
                  i.row <= n.bottomRight.row
                ? this.getRefData(new c(i.row, n.topLeft.col).setSheet(n.sheet))
                : new t("VALUE")
              : this.asMatrix(n);
          },
          asMatrix: function (n) {
            var i, h, u, f, c, t, s;
            return n instanceof r
              ? n
              : ((i = this),
                n instanceof o
                  ? ((h = n.topLeft),
                    (u = h.row),
                    (f = h.col),
                    (c = i.getRefCells(n)),
                    (t = new r(i)),
                    isFinite(n.width()) && (t.width = n.width()),
                    isFinite(n.height()) && (t.height = n.height()),
                    isFinite(u) || (u = 0),
                    isFinite(f) || (f = 0),
                    c.forEach(function (n) {
                      t.set(n.row - u, n.col - f, n.value);
                    }),
                    t)
                  : Array.isArray(n) && n.length > 0
                  ? ((t = new r(i)),
                    (s = 0),
                    n.forEach(function (n) {
                      var u = 0,
                        f = 1;
                      n.forEach(function (n) {
                        var h = n instanceof o;
                        n instanceof e && !h && (n = i.getRefData(n));
                        (h || Array.isArray(n)) && (n = i.asMatrix(n));
                        n instanceof r
                          ? (n.each(function (n, i, r) {
                              t.set(s + i, u + r, n);
                            }),
                            (f = Math.max(f, n.height)),
                            (u += n.width))
                          : t.set(s, u++, n);
                      });
                      s += f;
                    }),
                    t)
                  : void 0);
          },
          getRefCells: function (n, t, i) {
            var r = this.formula;
            return this.ss.getRefCells(n, t, r.sheet, r.row, r.col, i);
          },
          getRefData: function (n, t) {
            var i = this.formula;
            return this.ss.getData(n, i.sheet, i.row, i.col, t);
          },
          workbook: function () {
            return this.ss.workbook;
          },
        })),
        (r = w.extend({
          init: function (n) {
            this.context = n;
            this.height = 0;
            this.width = 0;
            this.data = [];
          },
          clone: function () {
            var n = new r(this.context);
            return (
              (n.height = this.height),
              (n.width = this.width),
              (n.data = this.data.map(function (n) {
                return n.slice();
              })),
              n
            );
          },
          get: function (n, t) {
            var r = this.data[n],
              i = r ? r[t] : null;
            return i instanceof e ? this.context.getRefData(i) : i;
          },
          getNA: function (n, i) {
            return n < this.height && i < this.width
              ? this.get(n, i)
              : new t("N/A");
          },
          set: function (n, t, i) {
            var r = this.data[n];
            null == r && (r = this.data[n] = []);
            r[t] = i;
            n >= this.height && (this.height = n + 1);
            t >= this.width && (this.width = t + 1);
          },
          each: function (n, t) {
            for (var u, i, r = 0; r < this.height; ++r)
              for (u = 0; u < this.width; ++u)
                if (
                  ((i = this.get(r, u)),
                  (t || null != i) &&
                    ((i = n.call(this.context, i, r, u)), void 0 !== i))
                )
                  return i;
          },
          map: function (n, t) {
            var i = new r(this.context);
            return (
              this.each(function (t, r, u) {
                i.set(r, u, n.call(this, t, r, u));
              }, t),
              i
            );
          },
          eachRow: function (n) {
            for (var i, t = 0; t < this.height; ++t)
              if (((i = n.call(this.context, t)), void 0 !== i)) return i;
          },
          eachCol: function (n) {
            for (var i, t = 0; t < this.width; ++t)
              if (((i = n.call(this.context, t)), void 0 !== i)) return i;
          },
          mapRow: function (n) {
            var t = new r(this.context);
            return (
              this.eachRow(function (i) {
                t.set(i, 0, n.call(this.context, i));
              }),
              t
            );
          },
          mapCol: function (n) {
            var t = new r(this.context);
            return (
              this.eachCol(function (i) {
                t.set(0, i, n.call(this.context, i));
              }),
              t
            );
          },
          toString: function () {
            return JSON.stringify(this.data);
          },
          transpose: function () {
            var n = new r(this.context);
            return (
              this.each(function (t, i, r) {
                n.set(r, i, t);
              }),
              n
            );
          },
          unit: function (n) {
            var r, t, u, i;
            for (
              this.width = this.height = n, r = this.data = Array(n), t = n;
              --t >= 0;

            )
              for (u = r[t] = Array(n), i = n; --i >= 0; )
                u[i] = t == i ? 1 : 0;
            return this;
          },
          multiply: function (n) {
            for (
              var u, o, f, s, h, e = this, c = new r(e.context), i = 0;
              i < e.height;
              ++i
            )
              for (u = 0; u < n.width; ++u) {
                for (o = 0, f = 0; f < e.width; ++f) {
                  if (
                    ((s = e.get(i, f)),
                    (h = n.get(f, u)),
                    "number" != typeof s || "number" != typeof h)
                  )
                    throw new t("VALUE");
                  o += s * h;
                }
                c.set(i, u, o);
              }
            return c;
          },
          adds: function (n, t) {
            for (
              var u,
                e,
                o,
                f = this,
                s = new r(f.context),
                h = t ? -1 : 1,
                i = 0;
              i < f.height;
              ++i
            )
              for (u = 0; u < f.width; ++u)
                (e = f.get(i, u)), (o = n.get(i, u)), s.set(i, u, e + h * o);
            return s;
          },
          determinant: function () {
            for (
              var r, f, t, o, i = this.clone().data, u = i.length, e = 1, n = 0;
              n < u;
              n++
            ) {
              for (r = n; r < u && !i[r][n]; r++);
              if (r == u) return 0;
              if (r != n)
                for (e = -e, t = n; t < u; t++)
                  (o = i[n][t]), (i[n][t] = i[r][t]), (i[r][t] = o);
              for (f = n + 1; f < u; f++)
                for (t = n + 1; t < u; t++)
                  i[f][t] -= (i[n][t] * i[f][n]) / i[n][n];
              e *= i[n][n];
            }
            return e;
          },
          inverse: function () {
            for (
              var o,
                e,
                t,
                u,
                s,
                f = this.width,
                h = this.augment(new r(this.context).unit(f)),
                i = h.data,
                n = 0;
              n < f;
              ++n
            ) {
              if (
                ((e = bt(n, f, function (t) {
                  return i[t][n];
                })),
                !i[e][n])
              )
                return null;
              for (
                n != e && ((o = i[n]), (i[n] = i[e]), (i[e] = o)), t = n + 1;
                t < f;
                ++t
              ) {
                for (u = n + 1; u < 2 * f; ++u)
                  i[t][u] -= (i[n][u] * i[t][n]) / i[n][n];
                i[t][n] = 0;
              }
            }
            for (t = 0; t < f; ++t)
              for (s = i[t][t], u = 0; u < 2 * f; ++u) i[t][u] /= s;
            for (n = f; --n >= 0; )
              for (t = n; --t >= 0; )
                if (i[t][n])
                  for (u = 2 * f; --u >= f; ) i[t][u] -= i[n][u] * i[t][n];
            return h.slice(0, f, f, f);
          },
          augment: function (n) {
            var t = this.clone(),
              i = t.width;
            return (
              n.each(function (n, r, u) {
                t.set(r, u + i, n);
              }),
              t
            );
          },
          slice: function (n, t, i, u) {
            for (var e, o = new r(this.context), f = 0; f < i; ++f)
              for (e = 0; e < u; ++e) o.set(f, e, this.get(n + f, t + e));
            return o;
          },
        })),
        (l = w.extend({
          init: function (n, t, i, r, u, f, e) {
            this.refs = n;
            this.handler = t;
            this.print = i;
            this.absrefs = null;
            this.sheet = r;
            this.row = u;
            this.col = f;
            this.onReady = [];
            this.pending = !1;
            this.arrayFormulaRange = e;
          },
          setArrayFormulaRange: function (n) {
            this.arrayFormulaRange = n.clone().setSheet(this.sheet);
          },
          clone: function (n, t, i, r) {
            var e = n.toLowerCase(),
              f = this.refs,
              u = this.arrayFormulaRange;
            return (
              (r || e != this.sheet.toLowerCase()) &&
                ((f = f.map(function (t) {
                  return (
                    t.hasSheet() ||
                      (t.sheet && t.sheet.toLowerCase() == e) ||
                      (t = t.clone().setSheet(n)),
                    t
                  );
                })),
                u && (u = u.clone().setSheet(n))),
              new l(f, this.handler, this.print, n, t, i, u)
            );
          },
          deepClone: function () {
            var n = this.refs.map(function (n) {
              return n.clone();
            });
            return new l(
              n,
              this.handler,
              this.print,
              this.sheet,
              this.row,
              this.col,
              this.arrayFormulaRange
            );
          },
          resolve: function (n) {
            this.pending = !1;
            this.onReady.forEach(function (t) {
              t(n);
            });
          },
          exec: function (n, i, r) {
            var u, f, e;
            if ("value" in this) i && i(this.value);
            else {
              for (
                i && this.onReady.push(i),
                  u = new vt(this.resolve, this, n, r),
                  f = 0;
                r;

              ) {
                if (r.formula === this)
                  return (this.pending = !1), void u.resolve(new t("CIRCULAR"));
                r = r.parent;
                ++f;
              }
              if (this.pending) return;
              this.pending = !0;
              e = function () {
                this.absrefs ||
                  (this.absrefs = this.refs.map(function (n) {
                    return n.absolute(this.row, this.col);
                  }, this));
                this.handler.call(u);
              }.bind(this);
              f < 20 ? e() : setTimeout(e, 0);
            }
          },
          reset: function () {
            this.onReady = [];
            this.pending = !1;
            delete this.value;
          },
          renameSheet: function (n, t) {
            n = n.toLowerCase();
            this.absrefs = null;
            this.sheet.toLowerCase() == n && (this.sheet = t);
            this.refs.forEach(function (i) {
              i.renameSheet(n, t);
            });
          },
          adjust: function (n, t, i, r) {
            function c(u) {
              return u === at
                ? u
                : u.sheet.toLowerCase() != n
                ? (o &&
                    ("row" == t && f >= i && (u = u.relative(r, 0)),
                    "col" == t && e >= i && (u = u.relative(0, r))),
                  u)
                : u.adjust(f, e, y, p, "row" == t, i, r);
            }
            var f, e, v, o, y, p, h, u, s;
            if (
              ((n = n.toLowerCase()),
              (f = this.row),
              (e = this.col),
              (v = this.sheet.toLowerCase()),
              (o = !1),
              v == n &&
                ("row" == t && f >= i && ((this.row += r), (o = !0)),
                "col" == t && e >= i && ((this.col += r), (o = !0))),
              (y = this.row),
              (p = this.col),
              (this.absrefs = null),
              (h = this.refs),
              (u = o),
              (this.refs = h.map(function (n) {
                var t = c(n);
                return u || a(t, n) || (u = !0), t;
              })),
              (s = this.arrayFormulaRange),
              s &&
                ((this.arrayFormulaRange = c(s)),
                u || a(s, this.arrayFormulaRange) || (u = !0)),
              u)
            )
              return new l(h, this.handler, this.print, this.sheet, f, e, s);
          },
          toString: function () {
            return this.print(this.row, this.col);
          },
        })),
        (f = Object.create(null)),
        (f["if"] = function (n, i) {
          var u = this,
            r = i[0],
            f = i[1],
            e = i[2];
          this.resolveCells([r], function () {
            var i = u.asMatrix(r);
            i
              ? f(function (r) {
                  e(function (f) {
                    var e = u.asMatrix(r),
                      o = u.asMatrix(f);
                    n(
                      i.map(function (n, i, s) {
                        return n instanceof t
                          ? n
                          : u.bool(n)
                          ? e
                            ? e.get(i, s)
                            : r
                          : o
                          ? o.get(i, s)
                          : f;
                      })
                    );
                  });
                })
              : ((r = this.force(r)),
                r instanceof t ? n(r) : u.bool(r) ? f(n) : e(n));
          });
        }),
        (f["φ"] = function (n) {
          n((1 + Math.sqrt(5)) / 2);
        }),
        (tt = ut(1900, 0, -1)),
        (yt = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]),
        (pt = [
          [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
          [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335],
        ]),
        (b = 6e4),
        (k = 60 * b),
        (wt = 24 * k),
        (i.CalcError = t),
        (i.Formula = l),
        (i.Matrix = r),
        (i.packDate = ot),
        (i.unpackDate = et),
        (i.packTime = ct),
        (i.unpackTime = st),
        (i.serialToDate = ht),
        (i.dateToSerial = lt),
        (i.daysInMonth = ft),
        (i.validDate = ii),
        (i.isLeapYear = y),
        (i.daysInYear = ti),
        (i.parseDate = ri),
        (i.limitPrecision = d),
        (u.dateToNumber = lt),
        (u.numberToDate = ht),
        (u.defineFunction = n),
        (u.CalcError = t),
        (i.defineFunction = n),
        (i.defineAlias = function (n, t) {
          var i = f[t];
          if (!i) throw Error("Function " + t + " is not yet defined");
          i.kendoSpreadsheetAliases || (i.kendoSpreadsheetAliases = [t]);
          i.kendoSpreadsheetAliases.push(n);
          f[n] = i;
        }),
        (i.FUNCS = f),
        (s = ["or", "number", ["null", 0]]),
        (v = [
          ["*a", s],
          ["*b", s],
        ]),
        (h = [
          ["*a", ["or", "anyvalue", ["null", 0]]],
          ["*b", ["or", "anyvalue", ["null", 0]]],
        ]),
        n("binary+", function (n, t) {
          return n + t;
        }).args(v),
        n("binary-", function (n, t) {
          return n - t;
        }).args(v),
        n("binary*", function (n, t) {
          return n * t;
        }).args(v),
        n("binary/", function (n, t) {
          return n / t;
        }).args([
          ["*a", s],
          ["*b", "divisor"],
        ]),
        n("binary^", function (n, t) {
          return Math.pow(n, t);
        }).args(v),
        n("binary&", function (n, t) {
          return null == n && (n = ""), null == t && (t = ""), "" + n + t;
        }).args([
          ["*a", ["or", "number", "string", "boolean", "null"]],
          ["*b", ["or", "number", "string", "boolean", "null"]],
        ]),
        n("binary=", function (n, t) {
          return (
            (n = "string" == typeof n ? n.toLowerCase() : n),
            (t = "string" == typeof t ? t.toLowerCase() : t),
            n === t
          );
        }).args(h),
        n("binary<>", function (n, t) {
          return n !== t;
        }).args(h),
        n(
          "binary<",
          p(function (n, t) {
            return n < t;
          })
        ).args(h),
        n(
          "binary<=",
          p(function (n, t) {
            return n <= t;
          })
        ).args(h),
        n(
          "binary>",
          p(function (n, t) {
            return n > t;
          })
        ).args(h),
        n(
          "binary>=",
          p(function (n, t) {
            return n >= t;
          })
        ).args(h),
        n("unary+", function (n) {
          return n;
        }).args([["*a", s]]),
        n("unary-", function (n) {
          return -n;
        }).args([["*a", s]]),
        n("unary%", function (n) {
          return n / 100;
        }).args([["*a", s]]),
        n("binary:", function (n, t) {
          return new o(n, t).setSheet(
            n.sheet || this.formula.sheet,
            n.hasSheet()
          );
        }).args([
          ["a", "cell"],
          ["b", "cell"],
        ]),
        n("binary,", function (n, t) {
          return new nt([n, t]);
        }).args([
          ["a", "ref"],
          ["b", "ref"],
        ]),
        n("binary ", function (n, t) {
          return n.intersect(t);
        }).args([
          ["a", "ref"],
          ["b", "ref"],
        ]),
        n("not", function (n) {
          return !this.bool(n);
        }).args([["*a", ["or", "anyvalue", ["null", 0]]]]),
        n("isblank", function (n) {
          return n instanceof c && ((n = this.getRefData(n)), null == n);
        }).args([["*value", "anything!"]]),
        n("iserror", function (n) {
          return n instanceof t;
        }).args([["*value", "forced!"]]),
        n("iserr", function (n) {
          return n instanceof t && "N/A" != n.code;
        }).args([["*value", "forced!"]]),
        n("isna", function (n) {
          return n instanceof t && "N/A" == n.code;
        }).args([["*value", "forced!"]]),
        n("islogical", function (n) {
          return "boolean" == typeof n;
        }).args([["*value", "forced!"]]),
        n("isnontext", function (n) {
          return "string" != typeof n;
        }).args([["*value", "forced!"]]),
        n("istext", function (n) {
          return "string" == typeof n;
        }).args([["*value", "forced!"]]),
        n("isnumber", function (n) {
          return "number" == typeof n;
        }).args([["*value", "forced!"]]),
        n("isref", function (n) {
          return n instanceof c || n instanceof o;
        }).args([["*value", "anything!"]]),
        (f[",getname"] = function (n, t) {
          this.fetchName(t[0], n);
        }));
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/validation.min", ["spreadsheet/runtime.min"], n);
  })(
    function () {
      "use strict";
      function s(i, r, f, s) {
        var c, h, l, a;
        if (
          ("string" == typeof s && (s = JSON.parse(s)),
          s.from &&
            ("list" !== s.dataType ||
              s.fromIsListValue ||
              ((s.from = kendo.format(e, s.from)), (s.fromIsListValue = !0)),
            "date" === s.dataType &&
              ((l = t.runtime.parseDate(s.from)),
              l &&
                ((s.from = kendo.format(u, s.from)), (s.fromIsDateValue = !0))),
            (s.from = t.compile(t.parseFormula(i, r, f, s.from)))),
          s.to &&
            ("date" === s.dataType &&
              ((a = t.runtime.parseDate(s.to)),
              a && ((s.to = kendo.format(u, s.to)), (s.toIsDateValue = !0))),
            (s.to = t.compile(t.parseFormula(i, r, f, s.to)))),
          (h =
            "custom" == s.dataType
              ? n.validationComparers.custom
              : "list" == s.dataType
              ? n.validationComparers.list
              : n.validationComparers[s.comparerType]),
          !h)
        )
          throw kendo.format(
            "'{0}' comparer is not implemented.",
            s.comparerType
          );
        return (
          (c = function (n) {
            var i,
              t =
                this.to && (this.to_value || 0 === this.to_value)
                  ? this.to_value
                  : void 0;
            return (
              null === n || "" === n
                ? (this.value = !!this.allowNulls)
                : "custom" == this.dataType
                ? (this.value = h(n, this.from_value, t))
                : "list" == this.dataType
                ? ((i = this._getListData()), (this.value = h(n, i, t)))
                : (this.value = h(n, this.from_value, t)),
              this.value
            );
          }),
          new kendo.spreadsheet.validation.Validation(
            o.extend(s, { handler: c, sheet: i, row: r, col: f })
          )
        );
      }
      var r,
        n,
        t,
        f,
        e,
        u,
        i,
        o = kendo.jQuery;
      (kendo.support.browser.msie && kendo.support.browser.version < 9) ||
        ((r = kendo.spreadsheet),
        (n = {}),
        (r.validation = n),
        (t = r.calc),
        (f = kendo.Class),
        (e = "_matrix({0})"),
        (u = 'DATEVALUE("{0}")'),
        t.runtime
          .defineFunction("_matrix", function (n) {
            return (
              "string" == typeof n && (n = this.asMatrix([n.split(/\s*,\s*/)])),
              n
            );
          })
          .args([["m", ["or", "matrix", "string"]]]),
        (i = f.extend({
          init: function (n) {
            this.handler = n.handler;
            this.from = n.from;
            this.to = n.to;
            this.dataType = n.dataType;
            this.comparerType = n.comparerType;
            this.type = n.type ? n.type : "warning";
            this.allowNulls = !!n.allowNulls;
            this.fromIsDateValue = !!n.fromIsDateValue;
            this.toIsDateValue = !!n.toIsDateValue;
            this.showButton = n.showButton;
            this.fromIsListValue = !!n.fromIsListValue;
            this.sheet = n.sheet;
            this.row = n.row;
            this.col = n.col;
            n.tooltipMessageTemplate &&
              (this.tooltipMessageTemplate = n.tooltipMessageTemplate);
            n.tooltipTitleTemplate &&
              (this.tooltipTitleTemplate = n.tooltipTitleTemplate);
            n.messageTemplate && (this.messageTemplate = n.messageTemplate);
            n.titleTemplate && (this.titleTemplate = n.titleTemplate);
          },
          _formatMessages: function (n) {
            var t = this.from ? this.from_value : "",
              i = this.to ? this.to_value : "",
              r = this.from ? "" + this.from : "",
              u = this.to ? "" + this.to : "",
              f = this.dataType,
              e = this.type,
              o = this.comparerType;
            return kendo.format(n, t, i, r, u, f, e, o);
          },
          _setMessages: function () {
            this.title = "";
            this.message = "";
            this.tooltipTitleTemplate &&
              (this.tooltipTitle = this._formatMessages(
                this.tooltipTitleTemplate
              ));
            this.tooltipMessageTemplate &&
              (this.tooltipMessage = this._formatMessages(
                this.tooltipMessageTemplate
              ));
            this.titleTemplate &&
              (this.title = this._formatMessages(this.titleTemplate));
            this.messageTemplate &&
              (this.message = this._formatMessages(this.messageTemplate));
          },
          _getListData: function () {
            var i, n, t, r, u;
            if (!this.from_value || !this.from_value.data) return [];
            for (i = this.from_value.data, r = [], n = 0; n < i.length; n++)
              if ((u = i[n])) for (t = 0; t < u.length; t++) r.push(u[t]);
            return r;
          },
          clone: function (n, t, r) {
            var u = this._getOptions();
            return (
              u.from && (u.from = u.from.clone(n, t, r)),
              u.to && (u.to = u.to.clone(n, t, r)),
              new i(
                o.extend(
                  u,
                  { handler: this.handler },
                  { sheet: n, row: t, col: r }
                )
              )
            );
          },
          deepClone: function () {
            var n = new i(this);
            return (
              (n.from = n.from.deepClone()),
              n.to && (n.to = n.to.deepClone()),
              n
            );
          },
          exec: function (n, t, i, r) {
            function f(t) {
              return (
                t instanceof kendo.spreadsheet.Ref &&
                  ((t = n.getData(t)), Array.isArray(t) && (t = t[0])),
                t
              );
            }
            var u = this,
              e = function (n) {
                u.from_value = f(n);
                u.value = u.handler.call(u, t, i);
                u._setMessages();
                r && r(u.value);
              };
            u.to
              ? u.to.exec(n, function (t) {
                  u.to_value = f(t);
                  u.from.exec(n, e);
                })
              : u.from.exec(n, e);
          },
          reset: function () {
            this.from && this.from.reset();
            this.to && this.to.reset();
            delete this.value;
          },
          adjust: function (n, t, r, u) {
            var e,
              o,
              s,
              f,
              h = this.row,
              c = this.col;
            if (
              (this.from && (e = this.from.adjust(n, t, r, u)),
              this.to && (o = this.to.adjust(n, t, r, u)),
              this.sheet.toLowerCase() == n.toLowerCase())
            )
              switch (t) {
                case "row":
                  h >= r && ((s = !0), (this.row += u));
                  break;
                case "col":
                  c >= r && ((s = !0), (this.col += u));
              }
            if (s || e || o)
              return (
                (f = new i(this)),
                (f.from = e),
                (f.to = o),
                (f.row = h),
                (f.col = c),
                f
              );
          },
          toJSON: function () {
            var n = this._getOptions();
            return (
              n.from &&
                ((n.from = "" + n.from),
                "list" === n.dataType &&
                  ((n.from = n.from.replace(/^_matrix\((.*)\)$/i, "$1")),
                  delete n.fromIsListValue),
                "date" === n.dataType &&
                  this.fromIsDateValue &&
                  ((n.from = n.from.replace(/^DATEVALUE\("(.*)"\)$/i, "$1")),
                  delete n.fromIsDateValue)),
              n.to &&
                ((n.to = "" + n.to),
                "date" === n.dataType &&
                  this.toIsDateValue &&
                  ((n.to = n.to.replace(/^DATEVALUE\("(.*)"\)$/i, "$1")),
                  delete n.toIsDateValue)),
              n
            );
          },
          _getOptions: function () {
            return {
              from: this.from,
              to: this.to,
              dataType: this.dataType,
              type: this.type,
              comparerType: this.comparerType,
              row: this.row,
              col: this.col,
              sheet: this.sheet,
              allowNulls: this.allowNulls,
              fromIsListValue: this.fromIsListValue,
              fromIsDateValue: this.fromIsDateValue,
              toIsDateValue: this.toIsDateValue,
              tooltipMessageTemplate: this.tooltipMessageTemplate,
              tooltipTitleTemplate: this.tooltipTitleTemplate,
              messageTemplate: this.messageTemplate,
              titleTemplate: this.titleTemplate,
              showButton: this.showButton,
            };
          },
        })),
        (n.compile = s),
        (n.validationComparers = {
          greaterThan: function (n, t) {
            return n > t;
          },
          lessThan: function (n, t) {
            return n < t;
          },
          between: function (n, t, i) {
            return n >= t && n <= i;
          },
          equalTo: function (n, t) {
            return n == t;
          },
          notEqualTo: function (n, t) {
            return n != t;
          },
          greaterThanOrEqualTo: function (n, t) {
            return n >= t;
          },
          lessThanOrEqualTo: function (n, t) {
            return n <= t;
          },
          notBetween: function (n, t, i) {
            return n < t || n > i;
          },
          custom: function (n, t) {
            return t;
          },
          list: function (n, t) {
            return t.indexOf(n) > -1;
          },
        }),
        (n.Validation = i));
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/sheet.min",
      [
        "kendo.core.min",
        "kendo.color.min",
        "spreadsheet/runtime.min",
        "spreadsheet/validation.min",
        "spreadsheet/references.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        var i, o, t, r, f, e, s, u;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((i = n.spreadsheet.RangeRef),
          (o = n.spreadsheet.UnionRef),
          (t = n.spreadsheet.CellRef),
          (r = n.spreadsheet.Range),
          (e = n.Class.extend({
            init: function (t) {
              this._sheet = t;
              this.selection = n.spreadsheet.FIRSTREF.toRangeRef();
              this.originalSelection = n.spreadsheet.FIRSTREF.toRangeRef();
              this._activeCell = n.spreadsheet.FIRSTREF.toRangeRef();
              this.originalActiveCell = n.spreadsheet.FIRSTREF;
            },
            currentSelectionRange: function () {
              return this.selection
                .rangeAt(this.selectionRangeIndex)
                .toRangeRef();
            },
            currentOriginalNavigationRange: function () {
              return this.originalSelection
                .rangeAt(this.selectionRangeIndex)
                .toRangeRef();
            },
            currentNavigationRange: function () {
              return this.singleCellSelection()
                ? this._sheet._sheetRef
                : this.selection.rangeAt(this.selectionRangeIndex).toRangeRef();
            },
            nextNavigationRange: function () {
              return (
                this.singleCellSelection() ||
                  (this.selectionRangeIndex = this.selection.nextRangeIndex(
                    this.selectionRangeIndex
                  )),
                this.currentNavigationRange()
              );
            },
            previousNavigationRange: function () {
              return (
                this.singleCellSelection() ||
                  (this.selectionRangeIndex = this.selection.previousRangeIndex(
                    this.selectionRangeIndex
                  )),
                this.currentNavigationRange()
              );
            },
            activeCell: function (n) {
              return (
                n &&
                  ((this.originalActiveCell = n.first()),
                  (this._activeCell = this._sheet.unionWithMerged(
                    n.toRangeRef()
                  )),
                  this._sheet.focus(n),
                  this._sheet.triggerChange({ activeCell: !0, selection: !0 })),
                this._activeCell
              );
            },
            select: function (u, f, e, o) {
              var h, s, c, l, a, y, v;
              if (u) {
                if (u.eq(this.originalSelection)) return;
                if (
                  (this._sheet.triggerSelect(new r(u, this._sheet)),
                  (this.originalSelection = u),
                  (this.selection = f),
                  e !== !1)
                ) {
                  if (u.isCell())
                    this._sheet.forEachMergedCell(u, function (n) {
                      u = n.topLeft;
                    }),
                      this.activeCell(u);
                  else {
                    if (
                      ((u = this.selection.lastRange()),
                      o && o._sheet === this._sheet && o.panes[0])
                    ) {
                      for (
                        h = o.panes, s = 0;
                        s < h.length &&
                        ((c = h[s]),
                        (l = c._currentView.rows.values),
                        (a = c._currentView.columns.values),
                        (y = new i(
                          new t(l.start, a.start),
                          new t(l.end, a.end)
                        )),
                        (v = u.intersect(y)),
                        v === n.spreadsheet.NULLREF);
                        s++
                      );
                      u = v;
                    }
                    this.activeCell(u.first());
                  }
                  this.selectionRangeIndex = this.selection.size() - 1;
                } else this._sheet.triggerChange({ selection: !0 });
              }
              return this.selection;
            },
            singleCellSelection: function () {
              return this._activeCell.eq(this.selection);
            },
          })),
          (s = n.Observable.extend({
            init: function () {
              n.Observable.prototype.init.call(this);
              this._reinit.apply(this, arguments);
            },
            events: [
              "changing",
              "commandRequest",
              "afterInsertRow",
              "afterDeleteRow",
              "insertRow",
              "insertColumn",
              "deleteRow",
              "deleteColumn",
              "hideRow",
              "hideColumn",
              "unhideRow",
              "unhideColumn",
              "select",
              "dataBinding",
              "dataBound",
            ],
            _reinit: function (t, i, r, u, f, o, s) {
              s = s || {};
              this._defaultCellStyle = {
                background: s.background,
                color: s.color,
                fontFamily: s.fontFamily,
                fontSize: s.fontSize,
                italic: s.italic,
                bold: s.bold,
                underline: s.underline,
                wrap: s.wrap,
                verticalAlign: s.verticalAlign,
                textAlign: s.textAlign,
              };
              this._rows = new n.spreadsheet.Axis(t, r);
              this._columns = new n.spreadsheet.Axis(i, u);
              this._filteredRows = new n.spreadsheet.RangeList(0, t - 1, !1);
              this._mergedCells = [];
              this._frozenRows = 0;
              this._frozenColumns = 0;
              this._suspendChanges = !1;
              this._filter = null;
              this._showGridLines = !0;
              this._gridLinesColor = null;
              this._grid = new n.spreadsheet.Grid(
                this._rows,
                this._columns,
                t,
                i,
                f,
                o
              );
              this._sheetRef = this._grid.normalize(n.spreadsheet.SHEETREF);
              this._properties = new n.spreadsheet.PropertyBag(
                t,
                i,
                this._defaultCellStyle
              );
              this._sorter = new n.spreadsheet.Sorter(
                this._grid,
                this._properties.sortable()
              );
              this._viewSelection = new e(this);
              this._editSelection = new e(this);
              this._formulaSelections = [];
              this._drawings = [];
            },
            _selectionState: function () {
              return this._inEdit ? this._editSelection : this._viewSelection;
            },
            navigator: function () {
              return (
                this._navigator ||
                  (this._navigator = new n.spreadsheet.SheetNavigator(this)),
                this._navigator
              );
            },
            axisManager: function () {
              return (
                this._axisManager ||
                  (this._axisManager = new n.spreadsheet.AxisManager(this)),
                this._axisManager
              );
            },
            _name: function (n) {
              return n ? ((this._sheetName = n), this) : this._sheetName;
            },
            name: function () {
              return this._name();
            },
            _property: function (n, t, i) {
              return void 0 === t ? n() : (n(t), this.triggerChange(i));
            },
            _field: function (n, t, i) {
              return void 0 === t
                ? this[n]
                : ((this[n] = t), this.triggerChange(i));
            },
            suspendChanges: function (n) {
              return void 0 === n
                ? this._suspendChanges
                : ((this._suspendChanges = n), this);
            },
            triggerChange: function (n) {
              return this._suspendChanges || this.trigger("change", n), this;
            },
            triggerSelect: function (n) {
              this.trigger("select", { range: n });
            },
            setDataSource: function (t, i) {
              this.dataSourceBinder && this.dataSourceBinder.destroy();
              this.dataSourceBinder = new n.spreadsheet.SheetDataSourceBinder({
                dataSource: t,
                sheet: this,
                columns: i,
              });
              this.dataSource = this.dataSourceBinder.dataSource;
            },
            hideColumn: function (n) {
              if (!this.trigger("hideColumn", { index: n }))
                return this._property(
                  this._columns.hide.bind(this._columns),
                  n,
                  { layout: !0 }
                );
            },
            unhideColumn: function (n) {
              if (!this.trigger("unhideColumn", { index: n }))
                return this._property(
                  this._columns.unhide.bind(this._columns),
                  n,
                  { layout: !0 }
                );
            },
            isHiddenColumn: function (n) {
              return this._grid._columns.hidden(n);
            },
            _copyRange: function (n, t) {
              var i = this._grid,
                r = i.rowCount,
                u = i.normalize(n.topLeft),
                f = i.normalize(n.bottomRight),
                e = u.col * r + u.row,
                o = f.col * r + f.row,
                s = t.col * r + t.row;
              this._properties.copy(e, o, s);
            },
            _saveModifiedFormulas: function (n, t) {
              var i,
                r = f;
              return (f = n), (i = t()), (f = r), i;
            },
            _restoreModifiedFormulas: function (t) {
              var i = this._workbook;
              t.forEach(function (t) {
                var r,
                  u = i.sheetByName(t.sheet);
                t instanceof n.spreadsheet.calc.runtime.Formula &&
                  ((r = u._grid.cellRefIndex(t)),
                  u._properties.set("formula", r, r, t));
                t instanceof n.spreadsheet.validation.Validation &&
                  ((r = u._grid.cellRefIndex(t)),
                  u._properties.set("validation", r, r, t));
              });
            },
            _adjustReferences: function (t, r, u, e) {
              var s, o, h;
              this._mergedCells = e.reduce(function (n, f) {
                return (
                  (f = f.adjust(null, null, null, null, "row" == t, r, u)),
                  f instanceof i && n.push(f),
                  n
                );
              }, []);
              this._workbook &&
                ((s = this._name()),
                this._workbook._sheets.forEach(function (n) {
                  n._forFormulas(function (n) {
                    var i = n.adjust(s, t, r, u);
                    i && f && f.push(i);
                  });
                  n._forValidations(function (n) {
                    var i = n.adjust(s, t, r, u);
                    i && f && f.push(i);
                  });
                }),
                this._workbook.adjustNames(s, "row" == t, r, u));
              o = this.select();
              o = o.adjust(null, null, null, null, "row" == t, r, u);
              o !== n.spreadsheet.NULLREF && this.select(o);
              h = "col" == t ? this._columns : this._rows;
              h.adjust(r, u);
              "row" == t &&
                (u < 0
                  ? this._filteredRows.copy(r - u, this._rows._count - 1, r)
                  : (this._filteredRows.copy(r, this._rows._count, r + u),
                    this._filteredRows.value(r, r + u - 1, !1)));
              this._drawings.forEach(function (n) {
                n.topLeftCell &&
                  (n.topLeftCell = n.topLeftCell.adjust(
                    null,
                    null,
                    null,
                    null,
                    "row" == t,
                    r,
                    u
                  ));
              });
            },
            _forFormulas: function (n) {
              var i = this._properties,
                t = i.get("formula").values(),
                r = t.length;
              t.forEach(function (t, i) {
                n.call(this, t.value, i, r);
              }, this);
            },
            _forValidations: function (n) {
              var t = this._properties;
              t.get("validation")
                .values()
                .forEach(function (t) {
                  n.call(this, t.value);
                }, this);
            },
            preventInsertRow: function (n, t) {
              var i, r;
              return this.selectedHeaders().allRows
                ? { reason: "error", type: "insertRowWhenColumnIsSelected" }
                : ((t = t || 1),
                  (i = this._grid),
                  (r = this.range(i.rowCount - t, 0, t, i.columnCount)),
                  !!r.hasValue() && {
                    reason: "error",
                    type: "shiftingNonblankCells",
                  });
            },
            preventInsertColumn: function (n, t) {
              var i, r;
              return this.selectedHeaders().allCols
                ? { reason: "error", type: "insertColumnWhenRowIsSelected" }
                : ((t = t || 1),
                  (i = this._grid),
                  (r = this.range(0, i.columnCount - t, i.rowCount, t)),
                  !!r.hasValue() && {
                    reason: "error",
                    type: "shiftingNonblankCells",
                  });
            },
            insertRow: function (n, u) {
              var f = this.preventInsertRow(n);
              if (f)
                throw Error(
                  "Shifting nonblank cells off the worksheet is not supported!"
                );
              if (!this.trigger("insertRow", { index: n }))
                return (
                  this.batch(
                    function () {
                      var s,
                        u,
                        e,
                        f,
                        h,
                        c,
                        o = this._grid,
                        a = o.columnCount,
                        v = o.rowCount,
                        l = this.frozenRows();
                      for (
                        n < l && this.frozenRows(l + 1),
                          s = this._mergedCells.slice(),
                          u = 0;
                        u < a;
                        u++
                      )
                        (e = new i(new t(n, u), new t(n, u))),
                          (f = o.normalize(e.topLeft)),
                          (h = o.normalize(e.bottomRight)),
                          (c = new i(new t(f.row, f.col), new t(v - 2, h.col))),
                          this._copyRange(c, new t(f.row + 1, f.col)),
                          new r(e, this).clear({
                            clearAll: !0,
                            keepBorders: !0,
                          });
                      this._adjustReferences("row", n, 1, s);
                    },
                    {
                      recalc: !0,
                      layout: !0,
                      insertRow: { index: n },
                      ref: new i(new t(n, 0), new t(1 / 0, 1 / 0)),
                    }
                  ),
                  u || this.trigger("afterInsertRow", { index: n }),
                  this
                );
            },
            isEnabledRow: function (n) {
              var u = new i(new t(n, 0), new t(n, this._grid.columnCount));
              return new r(u, this).enable();
            },
            deleteRow: function (n, u) {
              return this.isEnabledRow(n)
                ? this.trigger("deleteRow", { index: n })
                  ? void 0
                  : (this.batch(
                      function () {
                        var c,
                          u,
                          f,
                          e,
                          l,
                          s,
                          h,
                          o = this._grid,
                          v = o.columnCount,
                          a = this.frozenRows();
                        for (
                          n < a && this.frozenRows(a - 1),
                            c = this._mergedCells.slice(),
                            u = 0;
                          u < v;
                          u++
                        )
                          (f = new i(new t(n, u), new t(n, u))),
                            new r(f, this).clear({
                              clearAll: !0,
                              keepBorders: !0,
                            }),
                            (e = o.normalize(f.topLeft)),
                            (l = o.normalize(f.bottomRight)),
                            (s = new i(
                              new t(e.row + 1, e.col),
                              new t(1 / 0, l.col)
                            )),
                            this._copyRange(s, e),
                            (h = o.normalize(s.bottomRight)),
                            new r(new i(h, h), this).clear();
                        this._adjustReferences("row", n, -1, c);
                      },
                      {
                        recalc: !0,
                        layout: !0,
                        deleteRow: { index: n },
                        ref: new i(new t(n, 0), new t(1 / 0, 1 / 0)),
                      }
                    ),
                    u || this.trigger("afterDeleteRow", { index: n }),
                    this)
                : this;
            },
            insertColumn: function (n) {
              if (!this.trigger("insertColumn", { index: n }))
                return (
                  this.batch(
                    function () {
                      var h,
                        u,
                        f,
                        e,
                        o,
                        c,
                        s = this._grid,
                        a = s.columnCount,
                        l = this.frozenColumns();
                      for (
                        n < l && this.frozenColumns(l + 1),
                          h = this._mergedCells.slice(),
                          u = a;
                        u >= n &&
                        ((f = new i(new t(0, u), new t(1 / 0, u))),
                        new r(f, this).clear({ clearAll: !0, keepBorders: !0 }),
                        u != n);
                        u--
                      )
                        (e = s.normalize(f.topLeft)),
                          (o = s.normalize(f.bottomRight)),
                          (c = new i(
                            new t(e.row, e.col - 1),
                            new t(o.row, o.col - 1)
                          )),
                          this._copyRange(c, e);
                      this._adjustReferences("col", n, 1, h);
                    },
                    {
                      recalc: !0,
                      layout: !0,
                      insertColumn: { index: n },
                      ref: new i(new t(0, n), new t(1 / 0, 1 / 0)),
                    }
                  ),
                  this
                );
            },
            isEnabledColumn: function (n) {
              var u = new i(new t(0, n), new t(1 / 0, n));
              return new r(u, this).enable();
            },
            deleteColumn: function (n) {
              return this.isEnabledColumn(n)
                ? this.trigger("deleteColumn", { index: n })
                  ? void 0
                  : (this.batch(
                      function () {
                        var h,
                          u,
                          f,
                          e,
                          o,
                          c,
                          s = this._grid,
                          l = s.columnCount,
                          a = this.frozenColumns();
                        for (
                          n < a && this.frozenColumns(a - 1),
                            h = this._mergedCells.slice(),
                            u = n;
                          u < l &&
                          ((f = new i(new t(0, u), new t(1 / 0, u))),
                          new r(f, this).clear({
                            clearAll: !0,
                            keepBorders: !0,
                          }),
                          u != l - 1);
                          u++
                        )
                          (e = s.normalize(f.topLeft)),
                            (o = s.normalize(f.bottomRight)),
                            (c = new i(
                              new t(e.row, e.col + 1),
                              new t(o.row, o.col + 1)
                            )),
                            this._copyRange(c, e);
                        this._adjustReferences("col", n, -1, h);
                      },
                      {
                        recalc: !0,
                        layout: !0,
                        deleteColumn: { index: n },
                        ref: new i(new t(0, n), new t(1 / 0, 1 / 0)),
                      }
                    ),
                    this)
                : this;
            },
            _filterRow: function (n) {
              this._rows.hide(n);
              this._filteredRows.value(n, n, !0);
              this.triggerChange({ layout: !0 });
            },
            hideRow: function (n) {
              if (!this.trigger("hideRow", { index: n }))
                return this._property(this._rows.hide.bind(this._rows), n, {
                  layout: !0,
                });
            },
            unhideRow: function (n) {
              if (!this.trigger("unhideRow", { index: n }))
                return this._property(this._rows.unhide.bind(this._rows), n, {
                  layout: !0,
                });
            },
            isHiddenRow: function (n) {
              return this._grid._rows.hidden(n);
            },
            isFilteredRow: function (n) {
              return this._filteredRows.value(n);
            },
            columnWidth: function (n, t) {
              return this._property(
                this._columns.value.bind(this._columns, n, n),
                t,
                { layout: !0 }
              );
            },
            rowHeight: function (n, t) {
              return this._property(
                this._rows.value.bind(this._rows, n, n),
                t,
                { layout: !0 }
              );
            },
            frozenRows: function (n) {
              return this._field("_frozenRows", n, { layout: !0 });
            },
            frozenColumns: function (n) {
              return this._field("_frozenColumns", n, { layout: !0 });
            },
            showGridLines: function (n) {
              return this._field("_showGridLines", n, { layout: !0 });
            },
            gridLinesColor: function (n) {
              return this._field("_gridLinesColor", n, { layout: !0 });
            },
            _ref: function (r, u, f, e) {
              var o = null;
              return r instanceof n.spreadsheet.Ref
                ? r
                : r instanceof n.spreadsheet.Range
                ? r._ref.toRangeRef()
                : ("string" == typeof r
                    ? (o = n.spreadsheet.calc.parseReference(r))
                    : (f || (f = 1),
                      e || (e = 1),
                      (o = new i(new t(r, u), new t(r + f - 1, u + e - 1)))),
                  o);
            },
            range: function (n, t, i, u) {
              return new r(this._ref(n, t, i, u), this);
            },
            _getMergedCells: function (n) {
              var u = this._grid,
                i = {},
                r = {},
                t = !1;
              return (
                this.forEachMergedCell(n, function (f) {
                  var e = f.topLeft;
                  u.forEach(f, function (u) {
                    e.eq(u)
                      ? ((i[u.print()] = f), (t = !0))
                      : n.contains(u) && ((r[u.print()] = e), (t = !0));
                  });
                }),
                { primary: i, secondary: r, hasMerged: t }
              );
            },
            forEachMergedCell: function (n, t) {
              var i = !1;
              void 0 === t && ((t = n), (i = !0));
              this._mergedCells.forEach(function (r) {
                (i || r.intersects(n)) && t(r);
              });
            },
            forEachFilterHeader: function (n, t) {
              var i,
                r = !1;
              void 0 === t && ((t = n), (r = !0));
              this._filter &&
                ((i = []),
                this._filter.ref.forEachColumn(function (t) {
                  (r || t.intersects(n)) && i.push(t.topLeft);
                }),
                this._mergedCells.forEach(function (n) {
                  i = i.map(function (t) {
                    return n.intersects(t) ? n : t;
                  });
                }),
                i
                  .reduce(function (n, t) {
                    return n.indexOf(t) < 0 && n.push(t), n;
                  }, [])
                  .forEach(t));
            },
            forEach: function (n, t) {
              function u(n) {
                function c(n) {
                  t(o++, u, n);
                }
                var f, e, u, o, s, h;
                for (
                  n instanceof i || (n = n.toRangeRef()),
                    f = r._grid.normalize(n.topLeft),
                    e = r._grid.normalize(n.bottomRight),
                    u = f.col;
                  u <= e.col;
                  u++
                )
                  (o = f.row),
                    (s = r._grid.index(o, u)),
                    (h = r._grid.index(e.row, u)),
                    r._properties.forEach(s, h, c);
              }
              var r = this;
              n instanceof i || (n = r._ref(n));
              n instanceof o ? n.forEach(u) : u(n);
            },
            startResizing: function (n) {
              this._initialPosition = n;
              this._resizeInProgress = !0;
            },
            startAutoFill: function () {
              this._autoFillInProgress = !0;
              var n = this.select();
              this._autoFillOrigin = n;
              this._autoFillDest = n;
              this.triggerChange({ selection: !0 });
            },
            updateAutoFill: function (n, t, i, r) {
              this._autoFillDest = n;
              this._autoFillPunch = t;
              this._autoFillHint = i;
              this._autoFillDirection = r;
              this.triggerChange({ selection: !0 });
            },
            autoFillRef: function () {
              return this._autoFillDest;
            },
            autoFillPunch: function () {
              return this._autoFillPunch;
            },
            autoFillInProgress: function () {
              return this._autoFillInProgress;
            },
            resizingInProgress: function () {
              return this._resizeInProgress;
            },
            draggingInProgress: function () {
              return this._draggingInProgress;
            },
            completeResizing: function () {
              var t, n;
              this._resizeInProgress &&
                ((this._resizeInProgress = !1),
                (t = this.resizeHintPosition()),
                this._initialPosition && t
                  ? ((n = this.resizeHandlePosition()),
                    n.col !== -(1 / 0)
                      ? this.trigger("commandRequest", {
                          command: "ColumnWidthCommand",
                          options: {
                            target: n.col,
                            value:
                              this.columnWidth(n.col) -
                              (this._initialPosition.x - t.x),
                          },
                        })
                      : this.trigger("commandRequest", {
                          command: "RowHeightCommand",
                          options: {
                            target: n.row,
                            value:
                              this.rowHeight(n.row) -
                              (this._initialPosition.y - t.y),
                          },
                        }))
                  : this.trigger("change", { resize: !0 }));
            },
            _renderComment: function (n) {
              var t = n ? this.range(n).comment() : null;
              t
                ? (this._commentRef && n.eq(this._commentRef)) ||
                  ((this._commentRef = n),
                  this.trigger("change", { comment: !0 }))
                : this._commentRef &&
                  ((this._commentRef = null),
                  this.trigger("change", { comment: !0 }));
            },
            resizeHandlePosition: function () {
              return this._resizeHandlePosition;
            },
            resizeHintPosition: function (n) {
              return (
                void 0 !== n &&
                  ((this._resizeHintPosition = n),
                  this.trigger("change", { resize: !0 })),
                this._resizeHintPosition
              );
            },
            removeResizeHandle: function () {
              this._resizeHandlePosition &&
                ((this._resizeHintPosition = void 0),
                (this._resizeHandlePosition = void 0),
                (this._initialPosition = void 0),
                this.trigger("change", { resize: !0 }));
            },
            positionResizeHandle: function (n) {
              this._resizeHandlePosition = n;
              this.trigger("change", { resize: !0 });
            },
            startDragging: function (n) {
              this._draggingInProgress = n;
            },
            completeDragging: function () {
              var n,
                i,
                e,
                o,
                u,
                f,
                r = this._draggingInProgress;
              if (r) {
                if (
                  ((this._draggingInProgress = null),
                  (n = r.drawing),
                  n.eq(r.copy))
                )
                  return;
                n.topLeftCell &&
                  ((i = this.drawingBoundingBox(n)),
                  (e = this._rows.indexVisible(i.top)),
                  (o = this._columns.indexVisible(i.left)),
                  (u = new t(e, o)),
                  (f = this.refBoundingBox(u)),
                  (n.offsetX = i.left - f.left),
                  (n.offsetY = i.top - f.top),
                  (n.topLeftCell = u),
                  this.triggerChange({ dragging: !0 }));
                this.trigger("commandRequest", {
                  command: "DrawingUpdateCommand",
                  options: { sheet: this, drawing: n, previous: r.copy },
                });
              }
            },
            startSelection: function (n) {
              n && n._sheet === this && (this._currentView = n);
              this._selectionInProgress = !0;
            },
            completeSelection: function () {
              var n, t;
              this._selectionInProgress &&
                ((this._selectionInProgress = !1),
                (this._resizeHintPosition = void 0),
                this.trigger("change", { selection: !0 }));
              this._autoFillInProgress &&
                ((this._autoFillInProgress = !1),
                (n = this._autoFillDest),
                (t = this._autoFillOrigin),
                this._autoFillPunch
                  ? this.trigger("commandRequest", {
                      command: "ClearContentCommand",
                      options: {
                        operatingRange: this.range(this._autoFillPunch),
                      },
                    })
                  : n.eq(t)
                  ? this.triggerChange({ selection: !0 })
                  : this.trigger("commandRequest", {
                      command: "AutoFillCommand",
                      options: {
                        operatingRange: this.range(n),
                        origin: this.range(t),
                      },
                    }),
                (this._autoFillDest = null),
                (this._autoFillPunch = null),
                (this._autoFillOrigin = null),
                this.select(n));
            },
            selectionInProgress: function () {
              return this._selectionInProgress;
            },
            select: function (n, t) {
              var i,
                r = this._selectionState();
              return (
                n &&
                  ((n = this._ref(n)),
                  (n = this._grid.normalize(n)),
                  (i = this._grid.isAxis(n) ? n : this.unionWithMerged(n))),
                r.select(n, i, t, this._currentView)
              );
            },
            originalSelect: function () {
              return this._selectionState().originalSelection;
            },
            currentSelectionRange: function () {
              return this._selectionState().currentSelectionRange();
            },
            currentOriginalSelectionRange: function () {
              return this._selectionState().currentOriginalNavigationRange();
            },
            currentNavigationRange: function () {
              return this._selectionState().currentNavigationRange();
            },
            nextNavigationRange: function () {
              return this._selectionState().nextNavigationRange();
            },
            previousNavigationRange: function () {
              return this._selectionState().previousNavigationRange();
            },
            selectionRangeIndex: function () {
              return this._selectionState().selectionRangeIndex;
            },
            activeCell: function (n) {
              return this._selectionState().activeCell(n);
            },
            originalActiveCell: function () {
              return this._selectionState().originalActiveCell;
            },
            singleCellSelection: function () {
              return this._selectionState().singleCellSelection();
            },
            unionWithMerged: function (n) {
              var t = this._mergedCells;
              return n.map(function (n) {
                return n.toRangeRef().union(t);
              });
            },
            trim: function (n) {
              var t = [],
                i = this._grid;
              return (
                this._properties.forEachProperty(function (r) {
                  t.push(i.trim(n, r.list));
                }),
                this.unionWithMerged(n.topLeft.toRangeRef().union(t))
              );
            },
            focus: function (n) {
              if (!n) {
                var t = this._focus;
                return (this._focus = null), t;
              }
              this._focus = n.toRangeRef();
            },
            activeCellSelection: function () {
              return new r(this._grid.normalize(this.activeCell()), this);
            },
            selection: function () {
              return new r(
                this._grid.normalize(this._selectionState().selection),
                this
              );
            },
            selectedHeaders: function () {
              var u = this.select(),
                n = {},
                t = {},
                i = !1,
                r = !1,
                f = this._grid.rowCount - 1,
                e = this._grid.columnCount - 1;
              return (
                u.forEach(function (u) {
                  var o,
                    s,
                    h,
                    c,
                    l,
                    a = "partial",
                    v = "partial";
                  if (
                    ((u = u.toRangeRef()),
                    (s = u.bottomRight),
                    (h = u.topLeft),
                    (c = h.col <= 0 && s.col >= e),
                    (l = h.row <= 0 && s.row >= f),
                    l && ((r = !0), (v = "full")),
                    c && ((i = !0), (a = "full")),
                    !l)
                  )
                    for (o = h.row; o <= s.row; o++)
                      "full" !== n[o] && (n[o] = a);
                  if (!c)
                    for (o = h.col; o <= s.col; o++)
                      "full" !== t[o] && (t[o] = v);
                }),
                { rows: n, cols: t, allRows: r, allCols: i, all: r && i }
              );
            },
            isInEditMode: function (n) {
              return void 0 === n
                ? this._inEdit
                : ((this._inEdit = n),
                  void (
                    n &&
                    ((this._editSelection.selection =
                      this._viewSelection.selection.clone()),
                    (this._editSelection.originalSelection =
                      this._viewSelection.originalSelection.clone()),
                    (this._editSelection._activeCell =
                      this._viewSelection._activeCell.clone()),
                    (this._editSelection.originalActiveCell =
                      this._viewSelection.originalActiveCell.clone()))
                  ));
            },
            _setFormulaSelections: function (n) {
              this._formulaSelections = (n || []).slice();
              this.triggerChange({ selection: !0 });
            },
            _viewActiveCell: function () {
              return this._viewSelection._activeCell.toRangeRef();
            },
            toJSON: function () {
              function o(n) {
                Object.keys(u).forEach(function (t) {
                  n[t] === u[t] && delete n[t];
                });
              }
              var t,
                r = {},
                i = this._rows.toJSON("height", r),
                s = this._columns.toJSON("width", {}),
                f = this._viewSelection,
                e = [],
                u = this._defaultCellStyle || {};
              return (
                this.forEach(n.spreadsheet.SHEETREF, function (t, u, f) {
                  if ((o(f), 0 !== Object.keys(f).length)) {
                    f.link &&
                      e.push({
                        ref: n.spreadsheet.Ref.display(null, t, u),
                        target: f.link,
                      });
                    var s = r[t];
                    void 0 === s &&
                      ((s = i.length), i.push({ index: t }), (r[t] = s));
                    t = i[s];
                    f.index = u;
                    void 0 === t.cells && (t.cells = []);
                    f.formula &&
                      (f.formula = f.formula.arrayFormulaRange
                        ? {
                            src: "" + f.formula,
                            ref: "" + f.formula.arrayFormulaRange,
                          }
                        : "" + f.formula);
                    f.validation && (f.validation = f.validation.toJSON());
                    f.color && (f.color = n.parseColor(f.color).toCss());
                    f.background &&
                      (f.background = n.parseColor(f.background).toCss());
                    f.borderTop &&
                      f.borderTop.color &&
                      (f.borderTop.color = n
                        .parseColor(f.borderTop.color)
                        .toCss());
                    f.borderBottom &&
                      f.borderBottom.color &&
                      (f.borderBottom.color = n
                        .parseColor(f.borderBottom.color)
                        .toCss());
                    f.borderRight &&
                      f.borderRight.color &&
                      (f.borderRight.color = n
                        .parseColor(f.borderRight.color)
                        .toCss());
                    f.borderLeft &&
                      f.borderLeft.color &&
                      (f.borderLeft.color = n
                        .parseColor(f.borderLeft.color)
                        .toCss());
                    t.cells.push(f);
                  }
                }),
                (t = {
                  name: this._name(),
                  rows: i,
                  columns: s,
                  selection: "" + f.selection,
                  activeCell: "" + f.activeCell(),
                  frozenRows: this.frozenRows(),
                  frozenColumns: this.frozenColumns(),
                  showGridLines: this.showGridLines(),
                  gridLinesColor: this.gridLinesColor(),
                  mergedCells: this._mergedCells.map(function (n) {
                    return "" + n;
                  }),
                  hyperlinks: e,
                  defaultCellStyle: u,
                  drawings: this._drawings.map(function (n) {
                    return n.toJSON();
                  }),
                }),
                this._sort &&
                  (t.sort = {
                    ref: "" + this._sort.ref,
                    columns: this._sort.columns.map(function (n) {
                      return { index: n.index, ascending: n.ascending };
                    }),
                  }),
                this._filter &&
                  (t.filter = {
                    ref: "" + this._filter.ref,
                    columns: this._filter.columns.map(function (n) {
                      var t = n.filter.toJSON();
                      return (t.index = n.index), t;
                    }),
                  }),
                t
              );
            },
            fromJSON: function (t) {
              this.batch(function () {
                var e, o, r, s, i, f, h, v, c, l, a, y;
                if (
                  (void 0 !== t.name && this._name(t.name),
                  void 0 !== t.frozenColumns &&
                    this.frozenColumns(t.frozenColumns),
                  void 0 !== t.frozenRows && this.frozenRows(t.frozenRows),
                  void 0 !== t.columns &&
                    this._columns.fromJSON("width", t.columns),
                  void 0 !== t.rows)
                )
                  for (
                    this._rows.fromJSON("height", t.rows), e = 0;
                    e < t.rows.length;
                    e++
                  )
                    if (
                      ((o = t.rows[e]),
                      (r = o.index),
                      void 0 === r && (r = e),
                      o.cells)
                    )
                      for (s = 0; s < o.cells.length; s++)
                        (i = o.cells[s]),
                          (f = i.index),
                          void 0 === f && (f = s),
                          i.formula &&
                            ((h = "string" != typeof i.formula),
                            (v = h ? i.formula.src : i.formula),
                            (c = this._compileFormula(r, f, v)),
                            h &&
                              c.setArrayFormulaRange(
                                n.spreadsheet.calc.parseReference(i.formula.ref)
                              ),
                            (i.formula = c)),
                          i.validation &&
                            (i.validation = this._compileValidation(
                              r,
                              f,
                              i.validation
                            )),
                          this._properties.fromJSON(this._grid.index(r, f), i);
                t.drawings && (this._drawings = t.drawings.map(u.fromJSON));
                t.selection &&
                  (this._viewSelection.selection =
                    this._viewSelection.originalSelection =
                      this._ref(t.selection));
                t.activeCell &&
                  ((l = this._ref(t.activeCell)),
                  (this._viewSelection._activeCell = l.toRangeRef()),
                  (this._viewSelection.originalActiveCell = l.first()));
                t.mergedCells &&
                  t.mergedCells.forEach(function (n) {
                    this.range(n).merge();
                  }, this);
                t.sort &&
                  (this._sort = {
                    ref: this._ref(t.sort.ref),
                    columns: t.sort.columns.slice(0),
                  });
                t.filter &&
                  ((a = t.filter.ref),
                  (y = void 0 === t.filter.columns ? [] : t.filter.columns),
                  a
                    ? ((this._filter = {
                        ref: this._ref(a),
                        columns: y.map(function (t) {
                          return {
                            index: t.index,
                            filter: n.spreadsheet.Filter.create(t),
                          };
                        }),
                      }),
                      this._refreshFilter())
                    : n.logToConsole(
                        "Dropping filter for sheet '" +
                          t.name +
                          "' due to missing ref"
                      ));
                void 0 !== t.showGridLines &&
                  (this._showGridLines = t.showGridLines);
                this._gridLinesColor = t.gridLinesColor;
              });
              this._rows._refresh();
              this._columns._refresh();
            },
            formula: function (n) {
              return this._properties.get(
                "formula",
                this._grid.cellRefIndex(n)
              );
            },
            validation: function (n) {
              return this._properties.get(
                "validation",
                this._grid.cellRefIndex(n)
              );
            },
            resetFormulas: function () {
              this._forFormulas(function (n) {
                n.reset();
              });
            },
            resetValidations: function () {
              this._forValidations(function (n) {
                n.reset();
              });
            },
            recalc: function (n, t) {
              function e() {
                r--;
                u != i || r || t();
              }
              var f = this._properties.get("formula").values(),
                i = f.length,
                r = 0,
                u = 0;
              if (!i && t) return t();
              for (; u < i; ) r++, f[u++].value.exec(n, t ? e : null);
            },
            revalidate: function (n) {
              var r = this;
              this._forValidations(function (u) {
                var f = new t(u.row, u.col),
                  e = new i(f, f);
                u.exec(n, r._get(e, "value"), r._get(e, "format"));
              });
            },
            _value: function (n, t, i) {
              var r = this._grid.index(n, t);
              return void 0 === i
                ? this._properties.get("value", r)
                : void this._properties.set("value", r, r, i);
            },
            _validation: function (n, t) {
              var i = this._grid.index(n, t);
              return this._properties.get("validation", i);
            },
            _compileValidation: function (t, i, r) {
              return r instanceof n.spreadsheet.validation.Validation
                ? r.clone(this._name(), t, i)
                : (null != r.from && (r.from = (r.from + "").replace(/^=/, "")),
                  null != r.to && (r.to = (r.to + "").replace(/^=/, "")),
                  n.spreadsheet.validation.compile(this._name(), t, i, r));
            },
            _compileFormula: function (t, i, r) {
              return (
                (r = r.replace(/^=/, "")),
                (r = n.spreadsheet.calc.parseFormula(this._name(), t, i, r)),
                n.spreadsheet.calc.compile(r)
              );
            },
            _copyValuesInRange: function (n, t, i, r) {
              for (var o, s, f, e, u = n.col; u <= t.col; u++)
                for (
                  o = this._grid.index(n.row, u),
                    s = this._grid.index(t.row, u),
                    f = o,
                    e = n.row;
                  f <= s;
                  ++f, ++e
                )
                  (i = i.clone(this._name(), e, u)),
                    this._properties.set(r, f, f, i);
              return i;
            },
            _set: function (t, i, r) {
              var f,
                o,
                s,
                u = this._grid.normalize(t.topLeft),
                e = this._grid.normalize(t.bottomRight);
              if (
                ("number" == typeof r &&
                  (r = n.spreadsheet.calc.runtime.limitPrecision(r)),
                r && "formula" == i)
              )
                "string" == typeof r &&
                  (r = this._compileFormula(u.row, u.col, r)),
                  (r = this._copyValuesInRange(u, e, r, "formula"));
              else if (r && "validation" == i)
                (r = this._compileValidation(u.row, u.col, r)),
                  (r = this._copyValuesInRange(u, e, r, "validation"));
              else
                for (f = u.col; f <= e.col; f++)
                  (o = this._grid.index(u.row, f)),
                    (s = this._grid.index(e.row, f)),
                    this._properties.set(i, o, s, r),
                    "formula" == i && this._properties.set("value", o, s, null);
            },
            _get: function (n, t) {
              var i = this._grid.normalize(n.topLeft),
                r = this._grid.index(i.row, i.col);
              return this._properties.get(t, r);
            },
            batch: function (n, t) {
              var i = this.suspendChanges();
              return (
                this.suspendChanges(!0),
                n.call(this),
                this.suspendChanges(i).triggerChange(t || { recalc: !0 })
              );
            },
            _sortBy: function (n, t) {
              var i = null;
              t.forEach(function (t) {
                i = this._sorter.sortBy(
                  n,
                  t.index,
                  this._properties.get("value"),
                  t.ascending,
                  i
                );
              }, this);
              this._sort = { ref: n, columns: t };
              this._refreshFilter();
              this.forEach(
                n,
                function (n, t, i) {
                  var r,
                    f,
                    u = i.formula;
                  u &&
                    ((r = n - u.row),
                    0 !== r &&
                      ((f = r > 0 ? u.row : u.row + r),
                      u.adjust(this.name(), "row", f, r)));
                }.bind(this)
              );
              this.triggerChange({ recalc: !0 });
            },
            _refreshFilter: function () {
              this._filter &&
                this._filterBy(this._filter.ref, this._filter.columns);
            },
            _filterBy: function (t, i) {
              this.batch(
                function () {
                  for (var r = t.topLeft.row; r <= t.bottomRight.row; r++)
                    this.isFilteredRow(r) &&
                      (this._filteredRows.value(r, r, !1),
                      this._rows.unhide(r));
                  i.forEach(function (i) {
                    var r,
                      f,
                      e,
                      o = t.resize({ top: 1 }).toColumn(i.index),
                      u = [];
                    if (o !== n.spreadsheet.NULLREF)
                      for (
                        this.forEach(o, function (n, t, i) {
                          i.row = n;
                          u.push(i);
                        }),
                          i.filter.prepare(u),
                          r = 0;
                        r < u.length;
                        r++
                      )
                        (f = u[r]),
                          (e = i.filter.value(f)),
                          i.filter.matches(e) === !1 && this._filterRow(f.row);
                  }, this);
                  this._filter = { ref: t, columns: i };
                },
                { recalc: !0, layout: !0, filter: !0 }
              );
            },
            filterColumn: function (n) {
              var t = this.filter().ref;
              return n.toRangeRef().topLeft.col - t.topLeft.col;
            },
            filter: function () {
              return this._filter;
            },
            clearFilter: function (n) {
              this._clearFilter(n instanceof Array ? n : [n]);
            },
            _clearFilter: function (n) {
              this._filter &&
                this.batch(
                  function () {
                    this._filter.columns = this._filter.columns.filter(
                      function (t) {
                        return n.indexOf(t.index) < 0;
                      }
                    );
                    this._refreshFilter();
                  },
                  { recalc: !0, layout: !0, filter: !0 }
                );
            },
            getAxisState: function () {
              return {
                rows: this._rows.getState(),
                columns: this._columns.getState(),
              };
            },
            setAxisState: function (n) {
              this._rows.setState(n.rows);
              this._columns.setState(n.columns);
              this.triggerChange({ layout: !0 });
            },
            getState: function () {
              return {
                rows: this._rows.getState(),
                columns: this._columns.getState(),
                mergedCells: this._mergedCells.map(function (n) {
                  return n.clone();
                }),
                properties: this._properties.getState(),
              };
            },
            setState: function (t) {
              this._rows.setState(t.rows);
              this._columns.setState(t.columns);
              this._mergedCells = t.mergedCells;
              this._properties.setState(t.properties);
              this.triggerChange(n.spreadsheet.ALL_REASONS);
            },
            _merge: function (t) {
              var f,
                u = this._mergedCells,
                i = this;
              return (
                this.batch(
                  function () {
                    f = t.map(function (t) {
                      var e, f, s, h, c, l, o;
                      return t instanceof n.spreadsheet.CellRef
                        ? t
                        : ((e = t.toRangeRef().union(u, function (n) {
                            u.splice(u.indexOf(n), 1);
                          })),
                          (f = new r(e, i)),
                          (s = f._get("formula")),
                          (h = f.value()),
                          (c = f.format()),
                          (l = f.background()),
                          f.value(null),
                          f.format(null),
                          f.background(null),
                          (o = new r(e.collapse(), i)),
                          s ? o._set("formula", s) : o.value(h),
                          o.format(c),
                          o.background(l),
                          u.push(e),
                          e);
                    });
                    var e = i._viewSelection;
                    e.selection = i.unionWithMerged(e.originalSelection);
                    e._activeCell = i.unionWithMerged(e.originalActiveCell);
                  },
                  { activeCell: !0, selection: !0 }
                ),
                f
              );
            },
            _useCultureDecimals: function () {
              return (
                this._workbook && this._workbook.options.useCultureDecimals
              );
            },
            withCultureDecimals: function (t) {
              var i = ".";
              return (
                this._useCultureDecimals() &&
                  (i = n.culture().numberFormat["."]),
                n.spreadsheet.calc.withDecimalSeparator(i, t)
              );
            },
            drawingBoundingBox: function (t) {
              var i = t.offsetX,
                r = t.offsetY;
              return (
                t.topLeftCell &&
                  ((i += this._columns.sum(0, t.topLeftCell.col - 1)),
                  (r += this._rows.sum(0, t.topLeftCell.row - 1))),
                new n.spreadsheet.Rectangle(i, r, t.width, t.height)
              );
            },
            refBoundingBox: function (n) {
              return this._grid.rectangle(n.toRangeRef());
            },
            addDrawing: function (n, t) {
              return (
                n instanceof u || (n = new u(n)),
                this._drawings.push(n),
                t && (this._activeDrawing = n),
                this.triggerChange({ layout: !0 }),
                n
              );
            },
            removeDrawing: function (n) {
              var t = this._drawings.indexOf(n);
              t >= 0 &&
                (this._drawings.splice(t, 1),
                this.triggerChange({ layout: !0 }));
            },
            usesImage: function (n) {
              for (var t = this._drawings.length; --t >= 0; )
                if (this._drawings[t].image === n) return !0;
              return !1;
            },
          })),
          (u = n.Class.extend({
            init: function (n) {
              this.reset(n);
            },
            toJSON: function () {
              return {
                topLeftCell: "" + this.topLeftCell,
                offsetX: this.offsetX,
                offsetY: this.offsetY,
                width: this.width,
                height: this.height,
                image: this.image,
                opacity: this.opacity,
              };
            },
            clone: function () {
              return new u(this);
            },
            reset: function (t) {
              var i = t.topLeftCell;
              "string" == typeof i &&
                (i = n.spreadsheet.calc.parseReference(i));
              this.topLeftCell = i;
              this.offsetX = t.offsetX || 0;
              this.offsetY = t.offsetY || 0;
              this.width = t.width;
              this.height = t.height;
              this.image = t.image;
              this.opacity = null != t.opacity ? t.opacity : 1;
            },
            eq: function (n) {
              return (
                ((!this.topLeftCell && !n.topLeftCell) ||
                  (this.topLeftCell &&
                    n.topLeftCell &&
                    this.topLeftCell.eq(n.topLeftCell))) &&
                this.offsetX === n.offsetX &&
                this.offsetY === n.offsetY &&
                this.width === n.width &&
                this.height === n.height &&
                this.image === n.image &&
                this.opacity === n.opacity
              );
            },
          })),
          (u.fromJSON = function (n) {
            return new u(n);
          }),
          (n.spreadsheet.Sheet = s),
          (n.spreadsheet.Drawing = u));
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/sheetsbar.min", ["kendo.core.min", "kendo.sortable.min"], n);
  })(
    function () {
      !(function (n) {
        var u, f, t, i, e, r;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((u = n.jQuery),
          (f = n._outerWidth),
          (t = "."),
          (i = " "),
          (e = {
            sheetsBarWrapper: "k-widget k-header",
            sheetsBarSheetsWrapper: "k-tabstrip k-floatwrap k-tabstrip-bottom",
            sheetsBarActive: "k-spreadsheet-sheets-bar-active",
            sheetsBarInactive: "k-spreadsheet-sheets-bar-inactive",
            sheetsBarAdd: "k-spreadsheet-sheets-bar-add",
            sheetsBarRemove: "k-spreadsheet-sheets-remove",
            sheetsBarItems: "k-spreadsheet-sheets-items",
            sheetsBarEditor: "k-spreadsheet-sheets-editor",
            sheetsBarScrollable: "k-tabstrip-scrollable",
            sheetsBarNext: "k-tabstrip-next",
            sheetsBarPrev: "k-tabstrip-prev",
            sheetsBarKItem: "k-item k-state-default",
            sheetsBarKActive: "k-state-active k-state-tab-on-top",
            sheetsBarKTextbox: "k-textbox",
            sheetsBarKLink: "k-link",
            sheetsBarKIcon: "k-icon",
            sheetsBarKFontIcon: "k-icon",
            sheetsBarKButton: "k-button k-button-icon",
            sheetsBarKButtonBare: "k-bare",
            sheetsBarKArrowW: "k-i-arrow-60-left",
            sheetsBarKArrowE: "k-i-arrow-60-right",
            sheetsBarKReset: "k-reset k-tabstrip-items",
            sheetsBarKIconX: "k-i-close",
            sheetsBarKSprite: "k-sprite",
            sheetsBarKIconPlus: "k-i-plus",
            sheetsBarHintWrapper:
              "k-widget k-tabstrip k-tabstrip-bottom k-spreadsheet-sheets-items-hint",
            sheetsBarKResetItems: "k-reset k-tabstrip-items",
          }),
          (r = n.ui.Widget.extend({
            init: function (i, u) {
              var f = r.classNames;
              n.ui.Widget.call(this, i, u);
              i = this.element;
              i.addClass(f.sheetsBarWrapper);
              this._openDialog = u.openDialog;
              this._tree = new n.dom.Tree(i[0]);
              this._tree.render([
                this._addButton(),
                this._createSheetsWrapper([]),
              ]);
              this._toggleScrollEvents(!0);
              this._createSortable();
              this._sortable.bind(
                "start",
                this._onSheetReorderStart.bind(this)
              );
              this._sortable.bind("end", this._onSheetReorderEnd.bind(this));
              i.on(
                "click",
                t + f.sheetsBarRemove,
                this._onSheetRemove.bind(this)
              );
              i.on("click", "li", this._onSheetSelect.bind(this));
              i.on(
                "dblclick",
                "li" + t + f.sheetsBarActive,
                this._createEditor.bind(this)
              );
              i.on("click", t + f.sheetsBarAdd, this._onAddSelect.bind(this));
            },
            options: { name: "SheetsBar", scrollable: { distance: 200 } },
            events: ["select", "reorder", "rename"],
            _createEditor: function () {
              this._editor ||
                (this._renderSheets(this._sheets, this._selectedIndex, !0),
                (this._editor = this.element
                  .find(
                    n.format("input{0}{1}", t, r.classNames.sheetsBarEditor)
                  )
                  .focus()
                  .on("keydown", this._onEditorKeydown.bind(this))
                  .on("blur", this._onEditorBlur.bind(this))));
            },
            _destroyEditor: function (n) {
              var t = n ? null : this._editor.val();
              this._editor.off();
              this._editor = null;
              this._renderSheets(this._sheets, this._selectedIndex, !1);
              this._onSheetRename(t);
            },
            renderSheets: function (n, t) {
              !n || t < 0 || this._renderSheets(n, t, !1);
            },
            _renderSheets: function (u, e, o) {
              var y,
                p,
                l,
                w,
                b,
                v,
                k,
                h,
                d,
                c,
                g,
                s = this,
                a = r.classNames;
              s._isRtl = n.support.isRtl(s.element);
              s._sheets = u;
              s._selectedIndex = e;
              s._renderHtml(o, !0);
              s._scrollableAllowed() &&
                ((l = s._sheetsWrapper()),
                (w = l.children(t + a.sheetsBarPrev)),
                (b = l.children(t + a.sheetsBarNext)),
                (v = 2),
                (k = s.element.find(t + a.sheetsBarAdd)),
                (h = f(k) + k.position().left + v),
                (d = f(w) + v),
                (c = s._sheetsGroup()),
                w.css({ left: h }),
                l.addClass(
                  a.sheetsBarScrollable + i + a.sheetsBarSheetsWrapper
                ),
                c.css({ marginLeft: h }),
                (y = l[0].offsetWidth),
                (p = c[0].scrollWidth),
                p + h > y
                  ? ((g = Math.ceil(n.parseFloat(b.css("right")))),
                    s._scrollableModeActive ||
                      ((s._nowScrollingSheets = !1),
                      (s._scrollableModeActive = !0)),
                    c.css({ marginLeft: d + h, marginRight: f(b) + g + v }))
                  : s._scrollableModeActive && p <= y
                  ? ((s._scrollableModeActive = !1),
                    c.css({ marginLeft: h, marginRight: "" }))
                  : c.css({ marginLeft: h }),
                s._toggleScrollButtons());
            },
            _toggleScrollButtons: function (n) {
              var u = this,
                i = u._sheetsGroup(),
                e = u._sheetsWrapper(),
                f = i.scrollLeft(),
                o = e.find(t + r.classNames.sheetsBarPrev),
                s = e.find(t + r.classNames.sheetsBarNext);
              n === !1
                ? (o.toggle(!1), s.toggle(!1))
                : (o.toggle(
                    u._isRtl
                      ? f < i[0].scrollWidth - i[0].offsetWidth - 1
                      : 0 !== f
                  ),
                  s.toggle(
                    u._isRtl
                      ? 0 !== f
                      : f < i[0].scrollWidth - i[0].offsetWidth - 1
                  ));
            },
            _toggleScrollEvents: function (n) {
              var i = this,
                e = r.classNames,
                o = i.options,
                s = i._sheetsWrapper(),
                u = s.children(t + e.sheetsBarPrev),
                f = s.children(t + e.sheetsBarNext);
              n
                ? (u.on("mousedown", function () {
                    i._nowScrollingSheets = !0;
                    i._scrollSheetsByDelta(
                      o.scrollable.distance * (i._isRtl ? 1 : -1)
                    );
                  }),
                  f.on("mousedown", function () {
                    i._nowScrollingSheets = !0;
                    i._scrollSheetsByDelta(
                      o.scrollable.distance * (i._isRtl ? -1 : 1)
                    );
                  }),
                  u.add(f).on("mouseup", function () {
                    i._nowScrollingSheets = !1;
                  }))
                : (u.off(), f.off());
            },
            _renderHtml: function (t, u) {
              for (
                var h,
                  c,
                  l,
                  o,
                  v,
                  y = [],
                  p = n.dom,
                  s = p.element,
                  a = this._sheets,
                  w = this._selectedIndex,
                  f = r.classNames,
                  e = 0;
                e < a.length;
                e++
              )
                (h = a[e]),
                  (c = e === w),
                  (l = { className: f.sheetsBarKItem + i }),
                  (o = []),
                  (l.className += c
                    ? f.sheetsBarKActive + i + f.sheetsBarActive
                    : f.sheetsBarInactive),
                  c && t
                    ? o.push(
                        s(
                          "input",
                          {
                            type: "text",
                            value: h.name(),
                            className:
                              f.sheetsBarKTextbox + i + f.sheetsBarEditor,
                            maxlength: 50,
                          },
                          []
                        )
                      )
                    : (o.push(
                        s(
                          "span",
                          { className: f.sheetsBarKLink, title: h.name() },
                          [p.text(h.name())]
                        )
                      ),
                      a.length > 1 &&
                        ((v = s(
                          "span",
                          {
                            className:
                              f.sheetsBarKIcon +
                              i +
                              f.sheetsBarKFontIcon +
                              i +
                              f.sheetsBarKIconX,
                          },
                          []
                        )),
                        o.push(
                          s(
                            "span",
                            {
                              className:
                                f.sheetsBarKLink + i + f.sheetsBarRemove,
                            },
                            [v]
                          )
                        ))),
                  y.push(s("li", l, o));
              this._tree.render([
                this._addButton(),
                this._createSheetsWrapper(y, u),
              ]);
            },
            _createSheetsWrapper: function (t, u) {
              var o,
                e = n.dom.element,
                f = r.classNames,
                s = [e("ul", { className: f.sheetsBarKReset }, t)];
              return (
                (u = !0),
                u &&
                  ((o = f.sheetsBarKButton + i + f.sheetsBarKButtonBare + i),
                  s.push(
                    e("span", { className: o + f.sheetsBarPrev }, [
                      e(
                        "span",
                        {
                          className: f.sheetsBarKIcon + i + f.sheetsBarKArrowW,
                        },
                        []
                      ),
                    ])
                  ),
                  s.push(
                    e("span", { className: o + f.sheetsBarNext }, [
                      e(
                        "span",
                        {
                          className: f.sheetsBarKIcon + i + f.sheetsBarKArrowE,
                        },
                        []
                      ),
                    ])
                  )),
                e("div", { className: f.sheetsBarItems }, s)
              );
            },
            _createSortable: function () {
              var i = r.classNames;
              this._sortable = new n.ui.Sortable(this.element, {
                filter: n.format(
                  "ul li.{0},ul li.{1}",
                  i.sheetsBarActive,
                  i.sheetsBarInactive
                ),
                container: t + i.sheetsBarItems,
                axis: "x",
                animation: !1,
                ignore: "input",
                end: function () {
                  this.draggable.hint && this.draggable.hint.remove();
                },
                hint: function (n) {
                  var t = u(n).clone();
                  return t
                    .wrap(
                      "<div class='" +
                        i.sheetsBarHintWrapper +
                        "'><ul class='" +
                        i.sheetsBarKResetItems +
                        "'></ul></div>"
                    )
                    .closest("div");
                },
              });
            },
            _onEditorKeydown: function (n) {
              this._editor &&
                (13 === n.which && this._destroyEditor(),
                27 === n.which && this._destroyEditor(!0));
            },
            _onEditorBlur: function () {
              this._editor && this._destroyEditor();
            },
            _onSheetReorderEnd: function (n) {
              n.preventDefault();
              this.trigger("reorder", {
                oldIndex: n.oldIndex,
                newIndex: n.newIndex,
              });
            },
            _onSheetReorderStart: function (n) {
              this._editor && n.preventDefault();
            },
            _onSheetRemove: function (n) {
              var t,
                i = u(n.target).closest("li").text();
              this._editor && this._destroyEditor();
              t = function (n) {
                var t = n.sender;
                t.isConfirmed() &&
                  this.trigger("remove", { name: i, confirmation: !0 });
              }.bind(this);
              this._openDialog("confirmation", { close: t });
            },
            _onSheetSelect: function (n) {
              var i = u(n.target).text();
              return u(n.target).is(t + r.classNames.sheetsBarEditor) || !i
                ? void n.preventDefault()
                : (this._editor && this._destroyEditor(),
                  this._scrollSheetsToItem(u(n.target).closest("li")),
                  void this.trigger("select", { name: i, isAddButton: !1 }));
            },
            _onSheetRename: function (n) {
              this._sheets[this._selectedIndex].name() !== n &&
                null !== n &&
                this.trigger("rename", {
                  name: n,
                  sheetIndex: this._selectedIndex,
                });
            },
            _onAddSelect: function () {
              this.trigger("select", { isAddButton: !0 });
            },
            _addButton: function () {
              var u = n.dom.element,
                t = r.classNames;
              return u(
                "a",
                { className: t.sheetsBarAdd + i + t.sheetsBarKButton },
                [
                  u(
                    "span",
                    {
                      className:
                        t.sheetsBarKIcon +
                        i +
                        t.sheetsBarKFontIcon +
                        i +
                        t.sheetsBarKIconPlus,
                    },
                    []
                  ),
                ]
              );
            },
            destroy: function () {
              this._sortable.destroy();
            },
            _scrollableAllowed: function () {
              var n = this.options;
              return n.scrollable && !isNaN(n.scrollable.distance);
            },
            _scrollSheetsToItem: function (n) {
              var i,
                r,
                u,
                t,
                e,
                o,
                s,
                h = this;
              h._scrollableModeActive &&
                ((i = h._sheetsGroup()),
                (r = i.scrollLeft()),
                (u = f(n)),
                (t = h._isRtl
                  ? n.position().left
                  : n.position().left - i.children().first().position().left),
                (e = i[0].offsetWidth),
                (o = Math.ceil(parseFloat(i.css("padding-left")))),
                h._isRtl
                  ? t < 0
                    ? (s = r + t - (e - r) - o)
                    : t + u > e && (s = r + t - u + 2 * o)
                  : r + e < t + u
                  ? (s = t + u - e + 2 * o)
                  : r > t && (s = t - o),
                i
                  .finish()
                  .animate({ scrollLeft: s }, "fast", "linear", function () {
                    h._toggleScrollButtons();
                  }));
            },
            _sheetsGroup: function () {
              return this._sheetsWrapper().children("ul");
            },
            _sheetsWrapper: function () {
              return this.element.find(t + r.classNames.sheetsBarItems);
            },
            _scrollSheetsByDelta: function (n) {
              var t = this,
                i = t._sheetsGroup(),
                r = i.scrollLeft();
              i.finish().animate(
                { scrollLeft: r + n },
                "fast",
                "linear",
                function () {
                  t._nowScrollingSheets
                    ? t._scrollSheetsByDelta(n)
                    : t._toggleScrollButtons();
                }
              );
            },
          })),
          (n.spreadsheet.SheetsBar = r),
          u.extend(!0, r, { classNames: e }));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/calc.min", ["spreadsheet/runtime.min"], n);
  })(
    function () {
      "use strict";
      function rt(t) {
        n.DEC = t;
        n.ARG = "," == t ? ";" : ",";
        n.COL = "," == t ? "\\" : ",";
        i = "," == t ? g : p;
      }
      function o(n) {
        n = n.toUpperCase();
        for (var t = 0, i = 0; i < n.length; ++i)
          t = 26 * t + n.charCodeAt(i) - 64;
        return t - 1;
      }
      function e(n) {
        return parseInt(n, 10) - 1;
      }
      function ct(t, i) {
        var h, a, v, c, l, r;
        if ("#sheet" == t.toLowerCase()) return u.SHEETREF;
        n: {
          if (!(h = /^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(t))) {
            for (c = y(t, {}), l = []; ; ) {
              if (((r = c.next()), r instanceof f)) r.rel = 0;
              else {
                if (!(r instanceof s)) break n;
                r.topLeft.rel = 0;
                r.bottomRight.rel = 0;
              }
              if ((l.push(r), c.eof())) break;
              if (!c.is("op", n.ARG)) break n;
              c.next();
            }
            return 1 == l.length ? l[0] : new u.UnionRef(l);
          }
          if (((a = e(h[4])), (v = o(h[2])), a < 1048576 && v < 16384))
            return new f(e(h[4]), o(h[2]));
        }
        if (!i) throw Error("Cannot parse reference: " + t);
      }
      function v(t, r, u, f) {
        function w(n) {
          return (n.index = p.length), p.push(n), n;
        }
        function o(n, t, i) {
          if (e(n, t)) return f.next();
          var r = f.peek();
          r
            ? f.croak(
                "Expected " +
                  n +
                  " «" +
                  t +
                  "» but found " +
                  r.type +
                  " «" +
                  r.value +
                  "»"
              )
            : i || f.croak("Expected " + n + " «" + t + "»");
        }
        function s(n) {
          return v(tt(a()), 0, n);
        }
        function k(n) {
          return "TRUE" == n.upper || "FALSE" == n.upper
            ? "TRUE" == n.upper
              ? c
              : l
            : w(new h(n.value));
        }
        function d() {
          var t,
            i = f.next();
          for (i = i.value, o("punc", "("), t = []; ; ) {
            if (e("punc", ")")) break;
            if (e("op", n.ARG)) t.push({ type: "null" }), f.next();
            else {
              if ((t.push(s(!1)), f.eof() || e("punc", ")"))) break;
              o("op", n.ARG);
            }
          }
          return o("punc", ")", !0), { type: "func", func: i, args: t };
        }
        function g(n) {
          return n.hasSheet() || n.setSheet(t), w(n);
        }
        function a() {
          var n;
          return (
            e("ref")
              ? (n = g(f.next()))
              : e("func")
              ? (n = d())
              : e("punc", "(")
              ? (f.next(), (n = s(!0)), o("punc", ")", !0))
              : e("punc", "{")
              ? (f.next(), (n = nt()), o("punc", "}", !0))
              : e("num") || e("str") || e("error")
              ? (n = f.next())
              : e("sym")
              ? (n = k(f.next()))
              : e("op", "+") || e("op", "-")
              ? (n = { type: "prefix", op: f.next().value, exp: a() })
              : f.croak(
                  f.peek()
                    ? e("punc", "[")
                      ? "External reference not supported"
                      : "Parse error"
                    : "Incomplete expression"
                ),
            b(n)
          );
        }
        function nt() {
          for (var t = [], i = [t], r = !0; !f.eof() && !e("punc", "}"); )
            r
              ? (r = !1)
              : e(null, ";")
              ? (i.push((t = [])), f.next())
              : o(null, n.COL),
              t.push(s(!1));
          return { type: "matrix", value: i };
        }
        function tt(n) {
          return e("punc", "(") || e("ref") || e("num") || e("func")
            ? { type: "binary", op: " ", left: n, right: s(!1) }
            : n;
        }
        function b(n) {
          return e("op", "%")
            ? (f.next(), b({ type: "postfix", op: "%", exp: n }))
            : n;
        }
        function v(t, r, u) {
          var s,
            h,
            o = e("op");
          return o && (u || o.value != n.ARG) && ((s = i[o.value]), s > r)
            ? (f.next(),
              (h = v(a(), s, u)),
              v(
                {
                  type: "binary",
                  op: ";" == o.value ? "," : o.value,
                  left: t,
                  right: h,
                },
                r,
                u
              ))
            : t;
        }
        var e,
          p = [];
        return (
          (f = y(f, { row: r, col: u })),
          (e = f.is),
          { type: "exp", ast: s(!0), refs: p, sheet: t, row: r, col: u }
        );
      }
      function lt(n, t) {
        var i,
          r = v(null, 0, 0, n);
        if (!(r.ast instanceof h)) throw new a("Invalid name: " + n);
        return (
          (r = r.ast),
          t instanceof d ||
            ((i = v(r.sheet, 0, 0, t)),
            (t =
              i.ast instanceof d
                ? i.ast
                : /^(?:str|num|bool|error)$/.test(i.ast.type)
                ? i.ast.value
                : ut(i))),
          { name: r, value: t }
        );
      }
      function at(n) {
        function t(n, u, f) {
          function e(t) {
            var e = n.op,
              o =
                i[e] < f ||
                (!f && "," == e) ||
                ("prefix" == u.type && f == i[e] && "-" == u.op) ||
                ("binary" == u.type && f == i[e] && n === u.right);
            return r(t(), o);
          }
          switch (n.type) {
            case "num":
              return (
                "(kendo.spreadsheet.calc._separators.DEC == '.' ? " +
                JSON.stringify(JSON.stringify(n.value)) +
                " : " +
                JSON.stringify(JSON.stringify(n.value)) +
                ".replace('.' , kendo.spreadsheet.calc._separators.DEC))"
              );
            case "bool":
              return JSON.stringify(n.value);
            case "error":
              return JSON.stringify("#" + n.value);
            case "str":
              return JSON.stringify(JSON.stringify(n.value));
            case "ref":
              return "this.refs[" + n.index + "].print(row, col, mod)";
            case "prefix":
              return e(function () {
                return JSON.stringify(n.op) + " + " + t(n.exp, n, i[n.op]);
              });
            case "postfix":
              return e(function () {
                return t(n.exp, n, i[n.op]) + " + " + JSON.stringify(n.op);
              });
            case "binary":
              return e(function () {
                var u = r(
                    t(n.left, n, i[n.op]),
                    n.left instanceof h && ":" == n.op
                  ),
                  f = r(
                    t(n.right, n, i[n.op]),
                    n.right instanceof h && ":" == n.op
                  );
                return /^[,;]/.test(n.op)
                  ? u + " + kendo.spreadsheet.calc._separators.ARG + " + f
                  : u + " + " + JSON.stringify(n.op) + " + " + f;
              });
            case "func":
              return (
                JSON.stringify(n.func + "(") +
                " + " +
                (n.args.length > 0
                  ? n.args
                      .map(function (i) {
                        return t(i, n, 0);
                      })
                      .join(
                        " + kendo.spreadsheet.calc._separators.ARG + ' ' + "
                      )
                  : "''") +
                " + ')'"
              );
            case "matrix":
              return (
                "'{ ' + " +
                n.value
                  .map(function (i) {
                    return i
                      .map(function (i) {
                        return t(i, n, 0);
                      })
                      .join(
                        " + kendo.spreadsheet.calc._separators.COL + ' ' + "
                      );
                  })
                  .join(" + '; ' + ") +
                "+ ' }'"
              );
            case "null":
              return "''";
          }
          throw Error("Cannot make printer for node " + n.type);
        }
        function r(n, t) {
          return t ? "'(' + " + n + " + ')'" : n;
        }
        return nt("function(row, col, mod){return(" + t(n.ast, n, 0) + ")}");
      }
      function vt(n, t) {
        function i(n, t) {
          switch (n.type) {
            case "ref":
              return o(n, t);
            case "num":
            case "str":
            case "null":
            case "error":
            case "bool":
              return r(n, t);
            case "prefix":
            case "postfix":
              return h(n, t);
            case "binary":
              return a(n, t);
            case "func":
              return w(n, t);
            case "lambda":
              return b(n, t);
            case "matrix":
              return e(n.value, t, !0);
          }
          throw Error("Cannot CPS " + n.type);
        }
        function o(n, t) {
          return "name" == n.ref ? s(n, t) : r(n, t);
        }
        function r(n, t) {
          return t(n);
        }
        function s(n, t) {
          return { type: "func", func: ",getname", args: [f(t), n] };
        }
        function h(n, t) {
          return i({ type: "func", func: "unary" + n.op, args: [n.exp] }, t);
        }
        function a(n, t) {
          return i(
            { type: "func", func: "binary" + n.op, args: [n.left, n.right] },
            t
          );
        }
        function v(n, t, r, e) {
          return i(n, function (n) {
            var h = f(e),
              o = u("T"),
              s = u("E");
            return {
              type: "func",
              func: "if",
              args: [
                h,
                n,
                {
                  type: "lambda",
                  vars: [o],
                  body: i(t || c, function (n) {
                    return {
                      type: "call",
                      func: { type: "var", name: o },
                      args: [n],
                    };
                  }),
                },
                {
                  type: "lambda",
                  vars: [s],
                  body: i(r || l, function (n) {
                    return {
                      type: "call",
                      func: { type: "var", name: s },
                      args: [n],
                    };
                  }),
                },
              ],
            };
          });
        }
        function y(n, t) {
          return 0 === n.length
            ? r(c, t)
            : i(
                {
                  type: "func",
                  func: "IF",
                  args: [
                    n[0],
                    { type: "func", func: "AND", args: n.slice(1) },
                    l,
                  ],
                },
                t
              );
        }
        function p(n, t) {
          return 0 === n.length
            ? r(l, t)
            : i(
                {
                  type: "func",
                  func: "IF",
                  args: [
                    n[0],
                    c,
                    { type: "func", func: "OR", args: n.slice(1) },
                  ],
                },
                t
              );
        }
        function w(n, t) {
          switch (n.func.toLowerCase()) {
            case "if":
              return v(n.args[0], n.args[1], n.args[2], t);
            case "and":
              return y(n.args, t);
            case "or":
              return p(n.args, t);
            case "true":
              return t(c);
            case "false":
              return t(l);
          }
          return (function r(t, u) {
            return u == n.args.length
              ? { type: "func", func: n.func, args: t }
              : i(n.args[u], function (n) {
                  return r(t.concat([n]), u + 1);
                });
          })([f(t)], 0);
        }
        function b(n, t) {
          var r = u("K"),
            f = i(n.body, function (n) {
              return {
                type: "call",
                func: { type: "var", value: r },
                args: [n],
              };
            });
          return t({ type: "lambda", vars: [r].concat(n.vars), body: f });
        }
        function e(n, t, r) {
          var u = [];
          return (function f(o) {
            return o == n.length
              ? t({ type: "matrix", value: u })
              : (r ? e : i)(n[o], function (n) {
                  return (u[o] = n), f(o + 1);
                });
          })(0);
        }
        function f(n) {
          var t = u("R");
          return {
            type: "lambda",
            vars: [t],
            body: n({ type: "var", name: t }),
          };
        }
        function u(n) {
          return n || (n = ""), (n = "_" + n), n + ++k;
        }
        var k = 0;
        return i(n, t);
      }
      function ut(n) {
        function t(n) {
          var i = n.type;
          if ("num" == i) return n.value + "";
          if ("str" == i) return JSON.stringify(n.value);
          if ("error" == i)
            return "context.error(" + JSON.stringify(n.value) + ")";
          if ("return" == i) return "context.resolve(" + t(n.value) + ")";
          if ("func" == i)
            return (
              "context.func(" +
              JSON.stringify(n.func) +
              ", " +
              t(n.args[0]) +
              ", " +
              f(n.args.slice(1)) +
              ")"
            );
          if ("call" == i)
            return t(n.func) + "(" + n.args.map(t).join(", ") + ")";
          if ("ref" == i) return "refs[" + n.index + "]";
          if ("bool" == i) return "" + n.value;
          if ("if" == i)
            return (
              "(context.bool(" +
              t(n.co) +
              ") ? " +
              t(n.th) +
              " : " +
              t(n.el) +
              ")"
            );
          if ("lambda" == i)
            return (
              "(function(" +
              n.vars.join(", ") +
              "){ return(" +
              t(n.body) +
              ") })"
            );
          if ("var" == i) return n.name;
          if ("matrix" == i) return f(n.value);
          if ("null" == i) return "null";
          throw Error("Cannot compile expression " + i);
        }
        function f(n) {
          return "[ " + n.map(t).join(", ") + " ]";
        }
        var u,
          e = at(n),
          o = e.call(n),
          i = tt[o];
        return i
          ? i.clone(n.sheet, n.row, n.col)
          : ((u = t(
              vt(n.ast, function (n) {
                return { type: "return", value: n };
              })
            )),
            (u = [
              "function(){",
              "var context = this, refs = context.formula.absrefs",
              u,
              "}",
            ].join(";\n")),
            (i = new r.Formula(n.refs, nt(u), e, n.sheet, n.row, n.col)),
            (tt[o] = i.clone(n.sheet, n.row, n.col)),
            i);
      }
      function ft(n) {
        return n;
      }
      function y(n, t) {
        function p(n, t) {
          var i = v();
          return null == i ||
            (null != n && i.type !== n) ||
            (null != t && i.value !== t)
            ? null
            : i;
        }
        function v() {
          return null == c && (c = y()), c;
        }
        function w() {
          if (null != c) {
            var n = c;
            return (c = null), n;
          }
          return y();
        }
        function y() {
          var t,
            i = n.peek();
          return (
            i &&
              (("sym" != i.type && "rc" != i.type && "num" != i.type) ||
                (t =
                  r(8, b) ||
                  r(6, d) ||
                  r(6, g) ||
                  r(4, nt) ||
                  r(4, tt) ||
                  r(2, it) ||
                  r(2, rt)),
              t || (t = n.next())),
            t
          );
        }
        function i(i, r) {
          var u, s, h, c, l;
          if ("rc" == i.type)
            return (
              !i.rel ||
                t.forEditor ||
                (null != t.row && null != t.col) ||
                n.croak("Cannot read relative cell in RC notation"),
              new f(i.row, i.col, i.rel)
            );
          if ("num" == i.type)
            return i.value <= 1048577
              ? a(new f(e(i.value), r ? -(1 / 0) : +(1 / 0), 2))
              : null;
          if (((u = i.value), (s = /^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(u))))
            return (
              (h = e(s[4])),
              (c = o(s[2])),
              h <= 1048576 && c <= 16383
                ? a(new f(e(s[4]), o(s[2]), (s[1] ? 0 : 1) | (s[3] ? 0 : 2)))
                : null
            );
          if (
            ((l = "$" == u.charAt(0)), l && (u = u.substr(1)), /^\d+$/.test(u))
          ) {
            if (((h = e(u)), h <= 1048576))
              return a(new f(e(u), r ? -(1 / 0) : +(1 / 0), l ? 0 : 2));
          } else if (((c = o(u)), c <= 16383))
            return a(new f(r ? -(1 / 0) : +(1 / 0), o(u), l ? 0 : 1));
        }
        function b(n, t, r, f, e, o, h, c) {
          if (
            "sym" == n.type &&
            "op" == t.type &&
            ":" == t.value &&
            "sym" == r.type &&
            "punc" == f.type &&
            "!" == f.value &&
            ("sym" == e.type ||
              "rc" == e.type ||
              ("num" == e.type && (e.value == e.value) | 0)) &&
            "op" == o.type &&
            ":" == o.value &&
            ("sym" == h.type ||
              "rc" == h.type ||
              ("num" == h.type && (h.value == h.value) | 0)) &&
            h.type == e.type &&
            ("punc" != c.type || "(" != c.value || h.space)
          ) {
            var a = i(e, !0),
              v = i(h, !1);
            if (a && v)
              return (
                u(7),
                l(
                  new s(
                    a.setSheet(n.value, !0),
                    v.setSheet(r.value, !0)
                  ).setSheet(n.value, !0),
                  n,
                  h
                )
              );
          }
        }
        function d(n, t, r, f, e, o) {
          var h, c;
          if (
            "sym" == n.type &&
            "op" == t.type &&
            ":" == t.value &&
            "sym" == r.type &&
            "punc" == f.type &&
            "!" == f.value &&
            ("sym" == e.type ||
              "rc" == e.type ||
              ("num" == e.type && (e.value == e.value) | 0)) &&
            ("punc" != o.type || "(" != o.value || e.space) &&
            (h = i(e))
          )
            return (
              u(5),
              (c = h.clone()),
              l(
                new s(
                  h.setSheet(n.value, !0),
                  c.setSheet(r.value, !0)
                ).setSheet(n.value, !0),
                n,
                e
              )
            );
        }
        function g(n, t, r, f, e, o) {
          if (
            "sym" == n.type &&
            "punc" == t.type &&
            "!" == t.value &&
            ("sym" == r.type ||
              "rc" == r.type ||
              ("num" == r.type && (r.value == r.value) | 0)) &&
            "op" == f.type &&
            ":" == f.value &&
            ("sym" == e.type ||
              "rc" == e.type ||
              ("num" == e.type && (e.value == e.value) | 0)) &&
            ("punc" != o.type || "(" != o.value || e.space)
          ) {
            var h = i(r, !0),
              c = i(e, !1);
            if (h && c) return u(5), l(new s(h, c).setSheet(n.value, !0), n, e);
          }
        }
        function nt(n, t, r, f) {
          if (
            "sym" == n.type &&
            "punc" == t.type &&
            "!" == t.value &&
            ("sym" == r.type ||
              "rc" == r.type ||
              ("num" == r.type && (r.value == r.value) | 0)) &&
            ("punc" != f.type || "(" != f.value || r.space)
          ) {
            u(3);
            var e = i(r);
            return (
              (e && isFinite(e.row)) || (e = new h(r.value)),
              l(e.setSheet(n.value, !0), n, r)
            );
          }
        }
        function tt(n, t, r, f) {
          if (
            ("sym" == n.type ||
              "rc" == n.type ||
              ("num" == n.type && (n.value == n.value) | 0)) &&
            "op" == t.type &&
            ":" == t.value &&
            ("sym" == r.type ||
              "rc" == r.type ||
              ("num" == r.type && (r.value == r.value) | 0)) &&
            ("punc" != f.type || "(" != f.value || r.space)
          ) {
            var e = i(n, !0),
              o = i(r, !1);
            if (e && o) return u(3), l(new s(e, o), n, r);
          }
        }
        function it(n, t) {
          if (
            ("sym" == n.type || "rc" == n.type) &&
            ("punc" != t.type || "(" != t.value || n.space)
          ) {
            var r = i(n);
            if (r && isFinite(r.row) && isFinite(r.col))
              return u(1), l(r, n, n);
          }
        }
        function rt(n, t) {
          if ("sym" == n.type && "punc" == t.type && "(" == t.value && !n.space)
            return (n.type = "func"), u(1), n;
        }
        var r, u, c, a, l;
        return (
          (n = yt(k(n), t)),
          (r = n.ahead),
          (u = n.skip),
          (c = null),
          (a =
            null != t.row && null != t.col
              ? function (n) {
                  return (
                    1 & n.rel && (n.col -= t.col),
                    2 & n.rel && (n.row -= t.row),
                    n
                  );
                }
              : ft),
          (l = t.forEditor
            ? function (n, t, i) {
                return (n.begin = t.begin), (n.end = i.end), n;
              }
            : ft),
          { peek: v, next: w, croak: n.croak, eof: n.eof, is: p }
        );
      }
      function et(n) {
        return " \t\r\n ​".indexOf(n) >= 0;
      }
      function yt(t, r) {
        function e(n) {
          return /[0-9]/i.test(n);
        }
        function h(n) {
          return /[a-z$_]/i.test(n) || st.isUnicodeLetter(n);
        }
        function v(n) {
          return h(n) || e(n) || "." == n;
        }
        function y(n) {
          return n in i;
        }
        function p(n) {
          return "\\!;(){}[]".indexOf(n) >= 0;
        }
        function w() {
          var t = !1,
            i = f(function (i) {
              return i == n.DEC ? !t && ((t = !0), !0) : e(i);
            });
          return i == n.DEC
            ? { type: "punc", value: n.DEC }
            : { type: "num", value: parseFloat(i.replace(n.DEC, ".")) };
        }
        function c(n, i) {
          return {
            type: "sym",
            value: n,
            upper: n.toUpperCase(),
            space: et(t.peek()),
            quote: i,
          };
        }
        function l(n, t, i) {
          if (!n && !t && !i) return null;
          if ((!n && !i) || (n && i)) {
            var r = t ? parseInt(t, 10) : 0;
            return n ? r : r - 1;
          }
        }
        function b() {
          var i,
            r,
            n = t.lookingAt(/^R(\[)?(-?[0-9]+)?(\])?C(\[)?(-?[0-9]+)?(\])?/i);
          return n &&
            ((i = l(n[1], n[2], n[3])),
            (r = l(n[4], n[5], n[6])),
            null != i && null != r)
            ? (t.skip(n),
              {
                type: "rc",
                row: i,
                col: r,
                rel:
                  (n[4] || !(n[4] || n[5] || n[6]) ? 1 : 0) |
                  (n[1] || !(n[1] || n[2] || n[3]) ? 2 : 0),
              })
            : c(f(v));
        }
        function k() {
          return t.next(), { type: "str", value: t.readEscaped('"') };
        }
        function d() {
          return t.next(), c(t.readEscaped("'"), !0);
        }
        function g() {
          return {
            type: "op",
            value: f(function (n, t) {
              return t + n in i;
            }),
          };
        }
        function nt() {
          return { type: "punc", value: t.next() };
        }
        function tt() {
          if (t.eof()) return null;
          var u,
            i = t.peek();
          return '"' == i
            ? k()
            : "'" == i
            ? d()
            : e(i) || i == n.DEC
            ? w()
            : h(i)
            ? b()
            : y(i)
            ? g()
            : p(i)
            ? nt()
            : (u = t.lookingAt(/^#([a-z\/]+)[?!]?/i))
            ? (t.skip(u), { type: "error", value: u[1] })
            : (r.forEditor ||
                t.croak("Can't handle character with code: " + i.charCodeAt(0)),
              { type: "error", value: t.next() });
        }
        function o() {
          for (var i, n; s.length <= u; )
            f(et),
              (i = t.pos()),
              (n = tt()),
              r.forEditor && n && ((n.begin = i), (n.end = t.pos())),
              s.push(n);
          return s[u];
        }
        function a() {
          var n = o();
          return n && u++, n;
        }
        function it(n, t) {
          for (var r = u, i = []; n-- > 0; ) i.push(a() || ht);
          return (u = r), t.apply(i, i);
        }
        function rt(n) {
          u += n;
        }
        function ut() {
          return null == o();
        }
        var s = [],
          u = 0,
          f = t.readWhile;
        return {
          next: a,
          peek: o,
          eof: ut,
          croak: t.croak,
          ahead: it,
          skip: rt,
        };
      }
      function k(n) {
        function s() {
          return t;
        }
        function i() {
          var i = n.charAt(t++);
          return "\n" == i ? (y++, (o = 0)) : o++, i;
        }
        function u() {
          return n.charAt(t);
        }
        function f() {
          return "" === u();
        }
        function e(i) {
          throw new a(i + " (input: " + n + ")", t);
        }
        function h(i) {
          if ("string" == typeof i)
            n.substr(t, i.length) != i && e("Expected " + i), r(i.length);
          else if (i instanceof RegExp) {
            var u = i.exec(n.substr(t));
            if (u) return r(u[0].length), u;
          } else r(i[0].length);
        }
        function r(n) {
          for (; n-- > 0; ) i();
        }
        function c(n) {
          for (var t, r = !1, u = ""; !f(); )
            if (((t = i()), r)) (u += t), (r = !1);
            else if ("\\" == t) r = !0;
            else {
              if (t == n) break;
              u += t;
            }
          return u;
        }
        function l(n) {
          for (var t = ""; !f() && n(u(), t); ) t += i();
          return t;
        }
        function v(i) {
          return i.exec(n.substr(t));
        }
        var t = 0,
          y = 1,
          o = 0;
        return {
          next: i,
          peek: u,
          eof: f,
          croak: e,
          readWhile: l,
          readEscaped: c,
          lookingAt: v,
          skip: h,
          forward: r,
          pos: s,
        };
      }
      function pt(n, t, i) {
        function f() {
          var r = n.next();
          return (
            "sym" == r.type
              ? "TRUE" == r.upper
                ? ((r.type = "bool"), (r.value = !0))
                : "FALSE" == r.upper && ((r.type = "bool"), (r.value = !1))
              : "ref" == r.type &&
                (r = {
                  type: "ref",
                  ref: null != t && null != i ? r.absolute(t, i) : r,
                  begin: r.begin,
                  end: r.end,
                }),
            r
          );
        }
        var r,
          u = [];
        for (n = y(n, { forEditor: !0, row: t, col: i }); !n.eof(); )
          u.push(f());
        return (
          (r = u[0]),
          "op" == r.type && "=" == r.value && (r.type = "startexp"),
          u
        );
      }
      function wt(n, t, i) {
        var u, r;
        for (
          t = t || 0, i = i || 0, n = y(n, { row: t, col: i }), u = [];
          !n.eof();

        ) {
          if (((r = n.next()), "ref" != r.type))
            throw new a("Expecting a reference but got: " + JSON.stringify(r));
          u.push(r.absolute(t, i));
        }
        return u;
      }
      function bt(n, t) {
        var r = n + t,
          i = it[r];
        return (
          i ||
            ((i = "^(\\d+(COM\\d{3})*(DOT\\d+)?)"),
            (i = i.replace(/DOT/g, "\\" + t).replace(/COM/g, "\\" + n)),
            (i = RegExp(i)),
            (it[r] = i)),
          i
        );
      }
      function ot(n, t) {
        for (var i = ""; t-- > 0; ) i += n;
        return i;
      }
      var st, u, d, s, f, h, t, r, p, g, i, n, a, c, l, nt, tt, ht, w, b, it;
      (kendo.support.browser.msie && kendo.support.browser.version < 9) ||
        ((st = kendo.util),
        (u = kendo.spreadsheet),
        (d = u.Ref),
        (s = u.RangeRef),
        (f = u.CellRef),
        (h = u.NameRef),
        (t = u.calc),
        (r = t.runtime),
        (p = Object.create(null)),
        (g = Object.create(null)),
        (function (n) {
          n.forEach(function (t, i) {
            t.forEach(function (t) {
              p[t] = n.length - i;
              g["," == t ? ";" : t] = n.length - i;
            });
          });
        })([
          [":"],
          [" "],
          [","],
          ["%"],
          ["^"],
          ["*", "/"],
          ["+", "-"],
          ["&"],
          ["=", "<", ">", "<=", ">=", "<>"],
        ]),
        (i = p),
        (n = { DEC: ".", ARG: ",", COL: "," }),
        (t.withDecimalSeparator = function (t, i) {
          if (n.DEC == t) return i();
          var r = n.DEC;
          rt(t);
          try {
            return i();
          } finally {
            rt(r);
          }
        }),
        (t._separators = n),
        (a = kendo.Class.extend({
          init: function (n, t) {
            this.message = n;
            this.pos = t;
          },
          toString: function () {
            return this.message;
          },
        })),
        (c = { type: "bool", value: !0 }),
        (l = { type: "bool", value: !1 }),
        (nt = (function (n) {
          return function (t) {
            var i = n[t];
            return (
              i || (i = n[t] = Function("'use strict';return(" + t + ")")()), i
            );
          };
        })(Object.create(null))),
        (tt = Object.create(null)),
        (ht = { type: "eof" }),
        (w = []),
        (b = t.registerFormatParser =
          function (n) {
            w.push(n);
          }),
        (t.parse = function (n, t, i, u, f) {
          var s, e, o, h, c;
          if (u instanceof Date)
            return { type: "date", value: r.dateToSerial(u) };
          if ("number" == typeof u) return { type: "number", value: u };
          if ("boolean" == typeof u) return { type: "boolean", value: u };
          if (((u += ""), /^'/.test(u)))
            return { type: "string", value: u.substr(1) };
          if (
            /^-?[0-9]+%$/.test(u) &&
            ((s = u.substr(0, u.length - 1)),
            (e = parseFloat(s)),
            !isNaN(e) && e == s)
          )
            return { type: "percent", value: e / 100 };
          if (/^=/.test(u))
            return (
              (u = u.substr(1)),
              /\S/.test(u) ? v(n, t, i, u) : { type: "string", value: "=" + u }
            );
          for (o = 0; o < w.length; ++o) if ((h = w[o](u))) return h;
          return "true" == u.toLowerCase()
            ? { type: "boolean", value: !0 }
            : "false" == u.toLowerCase()
            ? { type: "boolean", value: !1 }
            : (c = r.parseDate(u, f))
            ? { type: "date", value: r.dateToSerial(c) }
            : ((e = parseFloat(u)),
              !isNaN(e) && u.length > 0 && e == u
                ? ((f = null),
                  e != Math.floor(e) &&
                    (f = "0." + (e + "").split(".")[1].replace(/\d/g, "0")),
                  { type: "number", value: e, format: f })
                : { type: "string", value: u });
        }),
        (t.parseNameDefinition = lt),
        (t.parseFormula = v),
        (t.parseReference = ct),
        (t.compile = ut),
        (t.parseSqref = wt),
        (t.InputStream = k),
        (t.ParseError = a),
        (t.tokenize = pt),
        b(function (n) {
          var t,
            e,
            a,
            c,
            u,
            v,
            y,
            o,
            i,
            s,
            l,
            f = 0,
            h = "";
          if ((t = /^(\d+)([-\/.])(\d+)\2(\d{2}(?:\d{2})?)(\s*)/.exec(n))) {
            if (
              ((e = parseInt(t[1], 10)),
              (a = t[2]),
              (c = parseInt(t[3], 10)),
              (u = parseInt(t[4], 10)),
              u < 30 ? (u += 2e3) : u < 100 && (u += 1900),
              (v = !0),
              e > 12 && ((y = e), (e = c), (c = y), (v = !1)),
              !r.validDate(u, e, c))
            )
              return null;
            f = r.packDate(u, e - 1, c);
            f < 0 && f--;
            h = v ? ["mm", "dd", "yyyy"].join(a) : ["dd", "mm", "yyyy"].join(a);
            h += t[5];
            n = n.substr(t[0].length);
          }
          return (t = /^(\d+):(\d+)$/.exec(n))
            ? ((o = parseInt(t[1], 10)),
              (i = parseInt(t[2], 10)),
              {
                type: "date",
                format: h + "hh:mm",
                value: f + r.packTime(o, i, 0, 0),
              })
            : (t = /^(\d+):(\d+)(\.\d+)$/.exec(n))
            ? ((i = parseInt(t[1], 10)),
              (s = parseInt(t[2], 10)),
              (l = 1e3 * parseFloat(t[3])),
              {
                type: "date",
                format: h + "mm:ss.00",
                value: f + r.packTime(0, i, s, l),
              })
            : (t = /^(\d+):(\d+):(\d+)$/.exec(n))
            ? ((o = parseInt(t[1], 10)),
              (i = parseInt(t[2], 10)),
              (s = parseInt(t[3], 10)),
              {
                type: "date",
                format: h + "hh:mm:ss",
                value: f + r.packTime(o, i, s, 0),
              })
            : (t = /^(\d+):(\d+):(\d+)(\.\d+)$/.exec(n))
            ? ((o = parseInt(t[1], 10)),
              (i = parseInt(t[2], 10)),
              (s = parseInt(t[3], 10)),
              (l = 1e3 * parseFloat(t[4])),
              {
                type: "date",
                format: h + "hh:mm:ss.00",
                value: f + r.packTime(o, i, s, l),
              })
            : void 0;
        }),
        b(function (n) {
          var r,
            u,
            f,
            o = kendo.culture(),
            h = o.numberFormat[","],
            c = o.numberFormat["."],
            v = o.numberFormat.currency.symbol,
            y = bt(h, c),
            l = RegExp("^\\s*\\" + v + "\\s*"),
            e = 1,
            t = "",
            s = "",
            i = !1,
            a = !1;
          if (
            ((n = k(n.replace(/^\s+|\s+$/g, ""))),
            n.skip(/^-\s*/) && (e = -1),
            (r = n.skip(l)) && ((i = !0), (t += '"' + r[0] + '"')),
            n.skip(/^-\s*/))
          ) {
            if (e < 0) return null;
            e = -1;
          }
          if (!(u = n.skip(y))) return null;
          if (((t += "0"), (r = n.skip(l)))) {
            if (i) return null;
            i = !0;
            s = '"' + r[0] + '"';
          }
          return (
            !i && (r = n.skip(/^\s*%\s*/)) && ((a = !0), (s = r[0])),
            n.eof()
              ? ((u[2] || i) && ((t = t.replace("0", "#")), (t += ",0")),
                u[3] && (t += "." + ot("0", u[3].length - 1)),
                (f = u[0]
                  .replace(RegExp("\\" + h, "g"), "")
                  .replace(RegExp("\\" + c, "g"), ".")),
                (f = parseFloat(f)),
                a && (f /= 100),
                (t += s),
                i && (t += ";-" + t),
                { type: "number", currency: i, format: t, value: e * f })
              : null
          );
        }),
        b(function (n) {
          var t;
          if ((t = /^([0-9]*)\.([0-9]+)(\s*%)$/.exec(n)))
            return {
              type: "number",
              value: parseFloat(n) / 100,
              format: "0." + ot("0", t[2].length) + t[3],
            };
        }),
        (it = {}));
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/excel-reader.min",
      [
        "kendo.core.min",
        "kendo.color.min",
        "util/parse-xml.min",
        "spreadsheet/calc.min",
      ],
      n
    );
  })(
    function () {
      "use strict";
      function ki(n, t, i) {
        var r = new FileReader();
        r.onload = function (n) {
          var r = new JSZip(n.target.result);
          tt(r, t, i);
        };
        r.readAsArrayBuffer(n);
      }
      function f(n) {
        return (
          /^\//.test(n)
            ? (n = n.substr(1))
            : /^xl\//.test(n) || (n = "xl/" + n),
          n
        );
      }
      function tt(n, u, f) {
        var y, h, p, w, o, c, l;
        s = u.excelImportErrors = [];
        y = et(n);
        h = v(n, "_rels/workbook.xml");
        p = st(n, h.byType.theme[0]);
        w = ot(n, p);
        o = [];
        c = 0;
        r(n, "xl/workbook.xml", {
          enter: function (t, r) {
            var s, e, l, f;
            this.is(wt)
              ? ((s = r["r:id"]),
                (e = h.byId[s]),
                (l = r.name),
                (f = tr(n, e)),
                (u.options.columnWidth =
                  f.columnWidth || u.options.columnWidth),
                (u.options.rowHeight = f.rowHeight || u.options.rowHeight),
                o.push({
                  workbook: u,
                  zip: n,
                  strings: y,
                  styles: w,
                  file: e,
                  options: {
                    name: l,
                    rows: Math.max(u.options.rows || 0, f.rows),
                    columns: Math.max(u.options.columns || 0, f.cols),
                    columnWidth: f.columnWidth,
                    rowHeight: f.rowHeight,
                  },
                }))
              : this.is(ni) && r.activeTab && (c = i(r.activeTab));
          },
          text: function (n) {
            var e,
              f,
              i,
              r = this.is(at);
            !r ||
              t(r["function"]) ||
              t(r.vbProcedure) ||
              ((e = r.localSheetId),
              (f = null),
              null != e && (f = o[e].options.name),
              (i = r.name),
              "_xlnm._FilterDatabase" != i &&
                (f && (i = "'" + f.replace(/\'/g, "\\'") + "'!" + i),
                a(
                  f,
                  null,
                  function () {
                    u.defineName(i, n, t(r.hidden));
                  },
                  "reading user-defined name: " + i
                )));
          },
        });
        l = new e.Deferred();
        l.progress(function (n) {
          f && f.notify(n);
        }).then(function () {
          var n = u.sheets();
          nr(n);
          u.activeSheet(n[c]);
          f && f.resolve();
        });
        di(o, u, l);
      }
      function di(n, t, i) {
        for (var u = new e.Deferred().resolve(), r = 0; r < n.length; r++)
          !(function (r, f) {
            u = u.then(function () {
              var u,
                o,
                e = t.insertSheet(r.options);
              return (
                e.suspendChanges(!0),
                (u = gi(e, r)),
                (o = { sheet: e, progress: f / (n.length - 1) }),
                u.then(function () {
                  i.notify(o);
                }),
                u
              );
            });
          })(n[r], r);
        u.then(function () {
          i.resolve();
        });
      }
      function gi(n, t) {
        var i = new e.Deferred();
        return (
          setTimeout(function () {
            ut(t.zip, t.file, n, t.strings, t.styles);
            i.resolve();
          }, 0),
          i
        );
      }
      function nr(n) {
        for (var t = 0; t < n.length; t++)
          n[t].suspendChanges(!1).triggerChange({ recalc: !0 });
      }
      function tr(n, t) {
        var i = { rows: 0, cols: 0 };
        return (
          r(n, f(t), {
            enter: function (n, t) {
              if ("dimension" == n) {
                var r = o(t.ref);
                r.bottomRight &&
                  ((i.cols = r.bottomRight.col + 1),
                  (i.rows = r.bottomRight.row + 1));
              } else
                "sheetFormatPr" === n
                  ? (t.defaultColWidth &&
                      (i.columnWidth = it(parseFloat(t.defaultColWidth))),
                    t.defaultRowHeight &&
                      (i.rowHeight = rt(parseFloat(t.defaultRowHeight))))
                  : this.is(w) && this.exit();
            },
          }),
          i
        );
      }
      function it(n) {
        var t = 7,
          i = (256 * n + Math.floor(128 / t)) / 256;
        return i * t;
      }
      function rt(n) {
        return n * (4 / 3);
      }
      function ut(n, u, e, c, b) {
        function dt() {
          e.range(ut).filter(st);
          ut = null;
        }
        var k,
          nt,
          d,
          g,
          tt,
          ht,
          ni,
          ci,
          ut,
          et,
          li,
          at,
          ai,
          wt,
          vi,
          yi,
          kt = {},
          wi = e._columns._count,
          pi = null,
          bi = u.replace(/worksheets\//, "worksheets/_rels/"),
          ot = v(n, bi),
          st = [];
        s = e._workbook.excelImportErrors;
        u = f(u);
        r(n, u, {
          enter: function (n, r, u) {
            var f, ct, s, c, a, v, y, ht, gt, ni, bt;
            if (this.is(h))
              u &&
                "shared" == r.t &&
                null != r.si &&
                (g = e.range(kt[r.si])._get("formula"));
            else if (this.is(p))
              (d = null),
                (g = null),
                (k = r.r),
                (tt = null),
                null == k && ((k = o(pi)), k.col++, (k = "" + k)),
                (pi = k),
                (nt = r.t),
                (ct = r.s),
                null != ct && ft(e, k, b, ct);
            else if (this.is(vt)) e.range(r.ref).merge();
            else if (this.is(lt)) {
              if (
                ((s = i(r.min) - 1),
                (c = Math.min(wi, i(r.max)) - 1),
                r.width &&
                  ((a = it(parseFloat(r.width))),
                  0 !== a && e._columns.values.value(s, c, a)),
                "1" === r.hidden || 0 === a)
              )
                for (v = s; v <= c; v++) e.hideColumn(v);
              null != r.style &&
                ft(
                  e,
                  new kendo.spreadsheet.RangeRef(
                    new kendo.spreadsheet.CellRef(-(1 / 0), s),
                    new kendo.spreadsheet.CellRef(+(1 / 0), c)
                  ),
                  b,
                  r.style
                );
            } else
              this.is(w)
                ? ((y = i(r.r) - 1),
                  r.ht &&
                    ((ht = rt(parseFloat(r.ht))),
                    0 !== ht && e._rows.values.value(y, y, ht)),
                  ("1" !== r.hidden && 0 !== ht) || e.hideRow(y))
                : this.is(pt)
                ? r.activeCell && ((gt = o(r.activeCell)), e.select(gt, !0))
                : this.is(yt)
                ? "frozen" == r.state &&
                  (r.xSplit && e.frozenColumns(i(r.xSplit)),
                  r.ySplit && e.frozenRows(i(r.ySplit)))
                : this.is(ti)
                ? e.showGridLines(t(r.showGridLines, !0))
                : this.is(ii)
                ? ((ni = r["r:id"]),
                  (bt = ot.byId[ni]),
                  bt && e.range(r.ref).link(bt))
                : this.is(["autoFilter"])
                ? ((ut = r.ref), u && dt())
                : ut &&
                  (this.is(["filterColumn"])
                    ? (et = parseInt(r.colId, 10))
                    : this.is(["customFilters"])
                    ? ((li = t(r.and) ? "and" : "or"), (at = []))
                    : this.is(["customFilter"])
                    ? ((f = er(r.operator, r.val)),
                      f && at.push({ operator: f.operator, value: f.value }))
                    : this.is(["dynamicFilter"])
                    ? st.push({
                        column: et,
                        filter: new kendo.spreadsheet.DynamicFilter({
                          type: or(r.type),
                        }),
                      })
                    : this.is(["top10"])
                    ? st.push({
                        column: et,
                        filter: new kendo.spreadsheet.TopFilter({
                          value: l(r.val),
                          type: (function (n, t) {
                            return n && t
                              ? "topPercent"
                              : t
                              ? "topNumber"
                              : n
                              ? "bottomPercent"
                              : "bottomNumber";
                          })(t(r.percent), t(r.top)),
                        }),
                      })
                    : this.is(["filters"])
                    ? ((ai = t(r.blank)), (wt = []))
                    : this.is(["filter"]) && wt.push(l(r.val)));
          },
          leave: function (n, r) {
            var f, u;
            this.is(h)
              ? g ||
                "shared" != r.t ||
                null == r.si ||
                (g = e.range(kt[r.si])._get("formula"))
              : this.is(p)
              ? null != g
                ? ((f = a(
                    e,
                    tt || k,
                    function () {
                      e.range(tt || k).formula(g, ht);
                    },
                    "parsing formula"
                  )),
                  f &&
                    e
                      .range(tt || k)
                      .value(g)
                      .background("#ffaaaa"))
                : null != d &&
                  ((u = e.range(k)),
                  u._get("formula") ||
                    (nt && "n" != nt
                      ? "s" == nt
                        ? (d = c[i(d)])
                        : "b" == nt
                        ? (d = "1" === d)
                        : "d" == nt && (d = kendo.parseDate(d))
                      : (d = parseFloat(d)),
                    null != d && u.value(d)))
              : this.is(ri) || this.is(ei)
              ? !(function () {
                  var u = kendo.spreadsheet.calc.parseSqref(r.sqref),
                    n = r.type.toLowerCase(),
                    i = r.operator;
                  /^(?:whole|decimal)$/.test(n)
                    ? (n = "number")
                    : "list" == n && (i = "list");
                  !i && /^(?:number|date)$/.test(n) && (i = "between");
                  u.forEach(function (u) {
                    a(
                      e,
                      u,
                      function () {
                        e.range(u).validation({
                          type: t(r.showErrorMessage, !0)
                            ? "reject"
                            : "warning",
                          from: ni,
                          to: ci,
                          dataType: n,
                          comparerType: ct[i] || i,
                          allowNulls: t(r.allowBlank),
                          showButton:
                            t(r.showDropDown) || "date" == n || "list" == n,
                          messageTemplate: r.error,
                          titleTemplate: r.errorTitle,
                        });
                      },
                      "parsing validation"
                    );
                  });
                })()
              : "cols" == n
              ? e._columns._refresh()
              : "sheetData" == n
              ? e._rows._refresh()
              : "autoFilter" == n
              ? dt()
              : ut &&
                ("customFilters" == n
                  ? st.push({
                      column: et,
                      filter: new kendo.spreadsheet.CustomFilter({
                        logic: li,
                        criteria: at,
                      }),
                    })
                  : "filters" == n &&
                    st.push({
                      column: et,
                      filter: new kendo.spreadsheet.ValueFilter({
                        values: wt,
                        blanks: ai,
                      }),
                    }));
          },
          text: function (n) {
            var t;
            this.is(gt) || this.is(bt)
              ? (d = n)
              : (t = this.is(h))
              ? ((g = n),
                (ht = "array" == t.t),
                ht ? (tt = t.ref) : "shared" == t.t && (kt[t.si] = k))
              : this.is(ui) || this.is(si)
              ? (ni = n)
              : this.is(fi) || this.is(hi)
              ? (ci = n)
              : this.is(oi) && (this.stack[this.stack.length - 2].sqref = n);
          },
        });
        ot.byType.comments &&
          ((vi = y(u, ot.byType.comments[0])), fr(n, vi, e));
        ot.byType.drawing && ((yi = y(u, ot.byType.drawing[0])), ur(n, yi, e));
      }
      function ir(n) {
        var t = /\.([^.]+)$/.exec(n);
        if (t && t[1])
          return {
            jpg: "image/jpeg",
            jpeg: "image/jpeg",
            png: "image/png",
            gif: "image/gif",
          }[t[1].toLowerCase()];
      }
      function rr(n) {
        var t = /[^\/]+$/.exec(n);
        return t && t[0];
      }
      function ur(n, t, i) {
        var f,
          e,
          s,
          h,
          c = ["xdr:twoCellAnchor"],
          w = ["xdr:ext"],
          l = ["xdr:oneCellAnchor"],
          a = ["xdr:from"],
          p = ["xdr:to"],
          b = ["xdr:row"],
          k = ["xdr:col"],
          d = ["xdr:rowOff"],
          g = ["xdr:colOff"],
          nt = ["xdr:blipFill", "a:blip"],
          tt = t.replace(/drawings\//, "drawings/_rels/"),
          o = v(n, tt);
        o.byType.image &&
          Object.keys(o.byId).forEach(function (r) {
            var u,
              f,
              h,
              e = y(t, o.byId[r]),
              s = ir(e);
            s &&
              ((u = n.files[e].asArrayBuffer()),
              (f = rr(e)),
              (h =
                !f || kendo.support.browser.msie || kendo.support.browser.edge
                  ? new window.Blob([u], { type: s })
                  : new window.File([u], f, { type: s })),
              (o.byId[r] = i._workbook.addImage(h)));
          });
        r(n, t, {
          enter: function (n, t) {
            if (this.is(c) || this.is(l)) f = {};
            else if (this.is(a) || this.is(p)) e = {};
            else if (this.is(nt)) {
              var i = t["r:embed"];
              f.image = o.byId[i];
            } else
              this.is(w) &&
                ((s = u(parseFloat(t.cx))), (h = u(parseFloat(t.cy))));
          },
          leave: function () {
            var n, t, r, o;
            this.is(a)
              ? ((f.topLeftCell = new kendo.spreadsheet.CellRef(e.row, e.col)),
                (f.offsetX = u(e.colOffset)),
                (f.offsetY = u(e.rowOffset)))
              : this.is(p)
              ? ((f.brCell = new kendo.spreadsheet.CellRef(e.row, e.col)),
                (f.brX = u(e.colOffset)),
                (f.brY = u(e.rowOffset)))
              : this.is(c)
              ? ((n = i._columns.sum(0, f.topLeftCell.col - 1) + f.offsetX),
                (t = i._rows.sum(0, f.topLeftCell.row - 1) + f.offsetY),
                (r = i._columns.sum(0, f.brCell.col - 1) + f.brX),
                (o = i._rows.sum(0, f.brCell.row - 1) + f.brY),
                i.addDrawing({
                  topLeftCell: f.topLeftCell,
                  offsetX: f.offsetX,
                  offsetY: f.offsetY,
                  width: null != s ? s : r - n,
                  height: null != h ? h : o - t,
                  image: f.image,
                  opacity: 1,
                }))
              : this.is(l) &&
                i.addDrawing({
                  topLeftCell: f.topLeftCell,
                  offsetX: f.offsetX,
                  offsetY: f.offsetY,
                  width: s,
                  height: h,
                  image: f.image,
                  opacity: 1,
                });
          },
          text: function (n) {
            this.is(b)
              ? (e.row = parseFloat(n))
              : this.is(k)
              ? (e.col = parseFloat(n))
              : this.is(d)
              ? (e.rowOffset = parseFloat(n))
              : this.is(g) && (e.colOffset = parseFloat(n));
          },
        });
      }
      function fr(n, t, i) {
        var f,
          u,
          e = [];
        r(n, t, {
          enter: function (n, t) {
            this.is(b)
              ? (u = { author: e[t.authorId], ref: t.ref, text: "" })
              : this.is(c) && (f = "");
          },
          leave: function () {
            this.is(b)
              ? i.range(u.ref).comment(u.text)
              : this.is(c) && e.push(f);
          },
          text: function (n) {
            this.is(ci) ? (u.text += n) : this.is(c) && (f += n);
          },
        });
      }
      function er(n, t) {
        var i = {
          equal: "eq",
          notEqual: "ne",
          greaterThan: "gt",
          greaterThanOrEqual: "gte",
          lessThan: "lt",
          lessThanOrEqual: "lte",
        }[n];
        return (
          (t = l(t)),
          i && "number" == typeof t
            ? { operator: i, value: t }
            : ("notEqual" != n && n) || "string" != typeof t
            ? void 0
            : { operator: n ? "doesnotmatch" : "matches", value: t }
        );
      }
      function or(n) {
        return (
          {
            Q1: "quarter1",
            Q2: "quarter2",
            Q3: "quarter3",
            Q4: "quarter4",
            M1: "january",
            M2: "february",
            M3: "march",
            M4: "april",
            M5: "may",
            M6: "june",
            M7: "july",
            M8: "august",
            M9: "september",
            M10: "october",
            M11: "november",
            M12: "december",
          }[n.toUpperCase()] || n
        );
      }
      function l(n) {
        var t = parseFloat(n);
        return isNaN(t) || t != n ? n : t;
      }
      function a(n, t, i, r) {
        try {
          return i(), !1;
        } catch (f) {
          var u = { context: r, error: f + "" };
          return (
            n && (u.sheet = n.name()), t && (u.location = t + ""), s.push(u), !0
          );
        }
      }
      function ft(n, t, i, r) {
        function h(n) {
          var t = "string" == typeof n ? n : n.formatCode;
          null == t ||
            /^general$/i.test(t) ||
            ((t = t.replace(/^\[\$-[0-9]+\]/, "")), f.format(t));
        }
        function c(n) {
          "solid" == n.type && f.background(n.color);
        }
        function l(n) {
          f.fontFamily(n.name);
          n.size && f._property("fontSize", (4 * n.size) / 3);
          n.bold && f.bold(!0);
          n.italic && f.italic(!0);
          n.underline && f.underline(!0);
          n.color && f.color(n.color);
        }
        function a(n) {
          function t(t, i) {
            var u,
              r,
              e = n[t];
            e &&
              ((u = li[e.style]),
              0 !== u &&
                ((r = e.color),
                null == r && (r = "#000"),
                f._property(i, { size: u, color: r })));
          }
          t("left", "borderLeft");
          t("top", "borderTop");
          t("right", "borderRight");
          t("bottom", "borderBottom");
        }
        function e(n, t) {
          var i = s[n];
          if (null != i && !i) return !1;
          if (((u = s[t]), o && null == u)) {
            if (((i = o[n]), null != i && !i)) return !1;
            u = o[t];
          }
          return null != u;
        }
        var o,
          u,
          f = n.range(t),
          s = i.inlineStyles[r];
        s.xfId && (o = i.namedStyles[s.xfId]);
        e("applyBorder", "borderId") && a(i.borders[u]);
        e("applyFont", "fontId") && l(i.fonts[u]);
        e("applyAlignment", "textAlign") && f.textAlign(u);
        e("applyAlignment", "verticalAlign") && f.verticalAlign(u);
        e("applyAlignment", "indent") && f.indent(u);
        e("applyAlignment", "wrapText") && f._property("wrap", u);
        e("applyFill", "fillId") && c(i.fills[u]);
        e("applyNumberFormat", "numFmtId") && h(i.numFmts[u] || ai[u]);
      }
      function r(n, t, i) {
        var r = n.files[t];
        r && ht(r.asUint8Array(), i);
      }
      function et(n) {
        var i = [],
          t = null;
        return (
          r(n, "xl/sharedStrings.xml", {
            leave: function () {
              this.is(dt) && (i.push(t), (t = null));
            },
            text: function (n) {
              this.is(kt) && (null == t && (t = ""), (t += n));
            },
          }),
          i
        );
      }
      function v(n, t) {
        var i = { byId: {}, byType: { theme: [] } };
        return (
          r(n, f(t) + ".rels", {
            enter: function (n, t) {
              var r, u;
              "Relationship" == n &&
                ((i.byId[t.Id] = t.Target),
                (r = t.Type.match(/\w+$/)[0]),
                (u = i.byType[r] || []),
                u.push(t.Target),
                (i.byType[r] = u));
            },
          }),
          i
        );
      }
      function ot(u, f) {
        function a(n) {
          function r(i) {
            null != n[i] && (u[i] = t(n[i]));
          }
          var u = {
            borderId: i(n.borderId),
            fillId: i(n.fillId),
            fontId: i(n.fontId),
            numFmtId: i(n.numFmtId),
            pivotButton: t(n.pivotButton),
            quotePrefix: t(n.quotePrefix),
            xfId: i(n.xfId),
          };
          return (
            r("applyAlignment"),
            r("applyBorder"),
            r("applyFill"),
            r("applyFont"),
            r("applyNumberFormat"),
            r("applyProtection"),
            u
          );
        }
        function l(t) {
          var e, r, u;
          return t.rgb
            ? n(t.rgb)
            : t.indexed
            ? nt[i(t.indexed)]
            : t.theme
            ? (e = f.colorScheme[i(t.theme)])
              ? ((r = kendo.parseColor(e)),
                t.tint &&
                  ((r = r.toHSL()),
                  (u = parseFloat(t.tint)),
                  (r.l =
                    u < 0
                      ? r.l * (1 + u)
                      : r.l * (1 - u) + (100 - 100 * (1 - u)))),
                r.toCssRgba())
              : nt[0]
            : void 0;
        }
        var h = {
            fonts: [],
            numFmts: {},
            fills: [],
            borders: [],
            namedStyles: [],
            inlineStyles: [],
          },
          o = null,
          s = null,
          c = null,
          e = null;
        return (
          r(u, "xl/styles.xml", {
            enter: function (n, r, u) {
              if (this.is(pi)) h.numFmts[r.numFmtId] = r;
              else if (this.is(g)) h.fonts.push((o = {}));
              else if (o)
                "sz" == n
                  ? (o.size = parseFloat(r.val))
                  : "name" == n
                  ? (o.name = r.val)
                  : "b" == n
                  ? (o.bold = t(r.val, !0))
                  : "i" == n
                  ? (o.italic = t(r.val, !0))
                  : "u" == n
                  ? (o.underline = null == r.val || "single" == r.val)
                  : "color" == n && (o.color = l(r));
              else if (this.is(d)) h.fills.push((s = {}));
              else if (s)
                "patternFill" == n
                  ? (s.type = r.patternType)
                  : "fgColor" == n && "solid" === s.type
                  ? (s.color = l(r))
                  : "bgColor" == n && "solid" !== s.type && (s.color = l(r));
              else if (this.is(k)) h.borders.push((c = {}));
              else if (c) {
                if (
                  (/^(?:left|top|right|bottom)$/.test(n) &&
                    (c[n] = { style: r.style || "none" }),
                  "color" == n)
                ) {
                  var f = this.stack[this.stack.length - 2].$tag;
                  c[f].color = l(r);
                }
              } else
                this.is(yi)
                  ? ((e = a(r)), h.namedStyles.push(e), u && (e = null))
                  : this.is(vi)
                  ? ((e = a(r)), h.inlineStyles.push(e), u && (e = null))
                  : e &&
                    "alignment" == n &&
                    (/^(?:left|center|right|justify)$/.test(r.horizontal) &&
                      (e.textAlign = r.horizontal),
                    /^(?:top|center|bottom)$/.test(r.vertical) &&
                      (e.verticalAlign = r.vertical),
                    null != r.wrapText && (e.wrapText = t(r.wrapText)),
                    null != r.indent && (e.indent = i(r.indent)));
            },
            leave: function (n) {
              this.is(g)
                ? (o = null)
                : this.is(d)
                ? (s = null)
                : this.is(k)
                ? (c = null)
                : "xf" == n && (e = null);
            },
          }),
          h
        );
      }
      function st(t, i) {
        function e(n, t, i) {
          var r = n[t];
          n[t] = n[i];
          n[i] = r;
        }
        var u = [],
          s = { colorScheme: u },
          o = f(i);
        return (
          t.files[o] &&
            (r(t, o, {
              enter: function (t, i) {
                this.is(bi)
                  ? u.push(n("window" == i.val ? "FFFFFFFF" : "FF000000"))
                  : this.is(wi) && u.push(n("FF" + i.val));
              },
            }),
            u.length > 3 && (e(u, 0, 1), e(u, 2, 3))),
          s
        );
      }
      function i(n) {
        return null == n ? null : parseInt(n, 10);
      }
      function t(n, t) {
        return null == n ? t : "true" == n || n === !0 || 1 == n;
      }
      function n(n) {
        var t = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(
          n
        );
        return (
          "rgba(" +
          parseInt(t[2], 16) +
          ", " +
          parseInt(t[3], 16) +
          ", " +
          parseInt(t[4], 16) +
          ", " +
          parseInt(t[1], 16) / 255 +
          ")"
        );
      }
      function y(n, t) {
        for (n = n.split(/\/+/), t = t.split(/\/+/), n.pop(); t.length; ) {
          var i = t.shift();
          if ("" === i) n = [];
          else {
            if ("." === i) continue;
            ".." === i ? n.pop() : n.push(i);
          }
        }
        return n.join("/");
      }
      function u(n) {
        return n / 9525;
      }
      var e,
        ht,
        o,
        ct,
        s,
        p,
        lt,
        at,
        h,
        vt,
        yt,
        w,
        pt,
        wt,
        bt,
        kt,
        dt,
        gt,
        ni,
        ti,
        ii,
        ri,
        ui,
        fi,
        ei,
        oi,
        si,
        hi,
        b,
        c,
        ci,
        li,
        ai,
        k,
        d,
        g,
        vi,
        yi,
        pi,
        nt,
        wi,
        bi;
      (kendo.support.browser.msie && kendo.support.browser.version < 9) ||
        ((e = kendo.jQuery),
        (ht = kendo.util.parseXML),
        (o = kendo.spreadsheet.calc.parseReference),
        (ct = {
          greaterThanOrEqual: "greaterThanOrEqualTo",
          lessThanOrEqual: "lessThanOrEqualTo",
        }),
        (s = null),
        (p = ["sheetData", "row", "c"]),
        (lt = ["cols", "col"]),
        (at = ["definedNames", "definedName"]),
        (h = ["sheetData", "row", "c", "f"]),
        (vt = ["mergeCells", "mergeCell"]),
        (yt = ["sheetViews", "sheetView", "pane"]),
        (w = ["sheetData", "row"]),
        (pt = ["sheetViews", "sheetView", "selection"]),
        (wt = ["sheets", "sheet"]),
        (bt = ["sheetData", "row", "c", "is"]),
        (kt = ["t"]),
        (dt = ["si"]),
        (gt = ["sheetData", "row", "c", "v"]),
        (ni = ["bookViews", "workbookView"]),
        (ti = ["sheetViews", "sheetView"]),
        (ii = ["hyperlinks", "hyperlink"]),
        (ri = ["dataValidations", "dataValidation"]),
        (ui = ["dataValidations", "dataValidation", "formula1"]),
        (fi = ["dataValidations", "dataValidation", "formula2"]),
        (ei = ["x14:dataValidations", "x14:dataValidation"]),
        (oi = ["x14:dataValidations", "x14:dataValidation", "xm:sqref"]),
        (si = [
          "x14:dataValidations",
          "x14:dataValidation",
          "x14:formula1",
          "xm:f",
        ]),
        (hi = [
          "x14:dataValidations",
          "x14:dataValidation",
          "x14:formula2",
          "xm:f",
        ]),
        (b = ["commentList", "comment"]),
        (c = ["authors", "author"]),
        (ci = ["t"]),
        (li = {
          none: 0,
          thin: 1,
          medium: 2,
          dashed: 1,
          dotted: 1,
          thick: 3,
          double: 3,
          hair: 1,
          mediumDashed: 2,
          dashDot: 1,
          mediumDashDot: 2,
          dashDotDot: 1,
          mediumDashDotDot: 2,
          slantDashDot: 1,
        }),
        (ai = {
          0: "General",
          1: "0",
          2: "0.00",
          3: "#,##0",
          4: "#,##0.00",
          9: "0%",
          10: "0.00%",
          11: "0.00E+00",
          12: "# ?/?",
          13: "# ??/??",
          14: "mm-dd-yy",
          15: "d-mmm-yy",
          16: "d-mmm",
          17: "mmm-yy",
          18: "h:mm AM/PM",
          19: "h:mm:ss AM/PM",
          20: "h:mm",
          21: "h:mm:ss",
          22: "m/d/yy h:mm",
          37: "#,##0 ;(#,##0)",
          38: "#,##0 ;[Red](#,##0)",
          39: "#,##0.00;(#,##0.00)",
          40: "#,##0.00;[Red](#,##0.00)",
          45: "mm:ss",
          46: "[h]:mm:ss",
          47: "mmss.0",
          48: "##0.0E+0",
          49: "@",
        }),
        (k = ["borders", "border"]),
        (d = ["fills", "fill"]),
        (g = ["fonts", "font"]),
        (vi = ["cellXfs", "xf"]),
        (yi = ["cellStyleXfs", "xf"]),
        (pi = ["numFmts", "numFmt"]),
        (nt = [
          n("FF000000"),
          n("FFFFFFFF"),
          n("FFFF0000"),
          n("FF00FF00"),
          n("FF0000FF"),
          n("FFFFFF00"),
          n("FFFF00FF"),
          n("FF00FFFF"),
          n("FF000000"),
          n("FFFFFFFF"),
          n("FFFF0000"),
          n("FF00FF00"),
          n("FF0000FF"),
          n("FFFFFF00"),
          n("FFFF00FF"),
          n("FF00FFFF"),
          n("FF800000"),
          n("FF008000"),
          n("FF000080"),
          n("FF808000"),
          n("FF800080"),
          n("FF008080"),
          n("FFC0C0C0"),
          n("FF808080"),
          n("FF9999FF"),
          n("FF993366"),
          n("FFFFFFCC"),
          n("FFCCFFFF"),
          n("FF660066"),
          n("FFFF8080"),
          n("FF0066CC"),
          n("FFCCCCFF"),
          n("FF000080"),
          n("FFFF00FF"),
          n("FFFFFF00"),
          n("FF00FFFF"),
          n("FF800080"),
          n("FF800000"),
          n("FF008080"),
          n("FF0000FF"),
          n("FF00CCFF"),
          n("FFCCFFFF"),
          n("FFCCFFCC"),
          n("FFFFFF99"),
          n("FF99CCFF"),
          n("FFFF99CC"),
          n("FFCC99FF"),
          n("FFFFCC99"),
          n("FF3366FF"),
          n("FF33CCCC"),
          n("FF99CC00"),
          n("FFFFCC00"),
          n("FFFF9900"),
          n("FFFF6600"),
          n("FF666699"),
          n("FF969696"),
          n("FF003366"),
          n("FF339966"),
          n("FF003300"),
          n("FF333300"),
          n("FF993300"),
          n("FF993366"),
          n("FF333399"),
          n("FF333333"),
          n("FF000000"),
          n("FFFFFFFF"),
        ]),
        (wi = ["a:clrScheme", "*", "a:srgbClr"]),
        (bi = ["a:clrScheme", "*", "a:sysClr"]),
        (kendo.spreadsheet.readExcel = ki),
        (kendo.spreadsheet._readSheet = ut),
        (kendo.spreadsheet._readStrings = et),
        (kendo.spreadsheet._readStyles = ot),
        (kendo.spreadsheet._readTheme = st),
        (kendo.spreadsheet._readWorkbook = tt));
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/workbook.min",
      [
        "kendo.core.min",
        "spreadsheet/runtime.min",
        "spreadsheet/references.min",
        "spreadsheet/excel-reader.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        function e(n, t) {
          var i = new XMLHttpRequest();
          i.onload = function () {
            t(i.response, i.getResponseHeader("Content-Type"));
          };
          i.onerror = function () {
            t(null);
          };
          i.open("GET", n);
          i.responseType = "arraybuffer";
          i.send();
        }
        function o(n, t) {
          function i(n, t, i) {
            return void 0 !== n ? n : void 0 !== t ? t : i;
          }
          var r,
            u,
            e,
            f,
            c,
            o,
            s = i(n.rowCount, t.rows, 200),
            h = i(n.columnCount, t.columns, 50),
            l = i(n.rowHeight, t.rowHeight, 20),
            a = i(n.columnWidth, t.columnWidth, 64),
            v = i(n.headerHeight, t.headerHeight, 20),
            y = i(n.headerWidth, t.headerWidth, 32);
          if (void 0 !== n.rows)
            for (r = 0; r < n.rows.length; ++r)
              if (
                ((u = n.rows[r]),
                (e = i(u.index, r)),
                e >= s && (s = e + 1),
                u.cells)
              )
                for (f = 0; f < u.cells.length; ++f)
                  (c = u.cells[f]), (o = i(c.index, f)), o >= h && (h = o + 1);
          return {
            rowCount: s,
            columnCount: h,
            rowHeight: l,
            columnWidth: a,
            headerHeight: v,
            headerWidth: y,
          };
        }
        var t, u, i, f, r;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((t = n.jQuery),
          (u = n.spreadsheet.calc.runtime.Formula),
          (i = n.spreadsheet.Ref),
          (f = n.spreadsheet.CalcError),
          (n.spreadsheet.messages.workbook = { defaultSheetName: "Sheet" }),
          (r = n.Observable.extend({
            options: {},
            init: function (t, i) {
              n.Observable.fn.init.call(this);
              this.options = t;
              this._view = i;
              this._sheets = [];
              this._images = {};
              this._imgID = 0;
              this._sheetsSearchCache = {};
              this._sheet = this.insertSheet({
                rows: this.options.rows,
                columns: this.options.columns,
                rowHeight: this.options.rowHeight,
                columnWidth: this.options.columnWidth,
                headerHeight: this.options.headerHeight,
                headerWidth: this.options.headerWidth,
                dataSource: this.options.dataSource,
              });
              this.undoRedoStack = new n.util.UndoRedoStack();
              this.undoRedoStack.bind(
                ["undo", "redo"],
                this._onUndoRedo.bind(this)
              );
              this._context = new n.spreadsheet.FormulaContext(this);
              this._validationContext =
                new n.spreadsheet.ValidationFormulaContext(this);
              this._names = Object.create(null);
              this.fromJSON(this.options);
            },
            clipboard: function () {
              return (
                this._clipboard ||
                  (this._clipboard = new n.spreadsheet.Clipboard(this)),
                this._clipboard
              );
            },
            destroy: function () {
              this.unbind();
              this._clipboard && this._clipboard.destroy();
            },
            events: [
              "cut",
              "copy",
              "paste",
              "changing",
              "change",
              "excelImport",
              "excelExport",
              "insertSheet",
              "removeSheet",
              "selectSheet",
              "renameSheet",
              "insertRow",
              "insertColumn",
              "deleteRow",
              "deleteColumn",
              "hideRow",
              "hideColumn",
              "unhideRow",
              "unhideColumn",
              "select",
              "changeFormat",
              "dataBinding",
              "dataBound",
            ],
            _sheetChanging: function (n) {
              this.trigger("changing", n) && n.preventDefault();
            },
            _sheetChange: function (n) {
              this.trigger("change", n);
            },
            _sheetInsertRow: function (n) {
              this.trigger("insertRow", { sheet: n.sender, index: n.index }) &&
                n.preventDefault();
            },
            _sheetInsertColumn: function (n) {
              this.trigger("insertColumn", {
                sheet: n.sender,
                index: n.index,
              }) && n.preventDefault();
            },
            _sheetDeleteRow: function (n) {
              this.trigger("deleteRow", { sheet: n.sender, index: n.index }) &&
                n.preventDefault();
            },
            _sheetDeleteColumn: function (n) {
              this.trigger("deleteColumn", {
                sheet: n.sender,
                index: n.index,
              }) && n.preventDefault();
            },
            _sheetHideRow: function (n) {
              this.trigger("hideRow", { sheet: n.sender, index: n.index }) &&
                n.preventDefault();
            },
            _sheetHideColumn: function (n) {
              this.trigger("hideColumn", { sheet: n.sender, index: n.index }) &&
                n.preventDefault();
            },
            _sheetUnhideRow: function (n) {
              this.trigger("unhideRow", { sheet: n.sender, index: n.index }) &&
                n.preventDefault();
            },
            _sheetUnhideColumn: function (n) {
              this.trigger("unhideColumn", {
                sheet: n.sender,
                index: n.index,
              }) && n.preventDefault();
            },
            _sheetSelect: function (n) {
              this.trigger("select", n);
            },
            _sheetDataBinding: function (n) {
              this.trigger("dataBinding", { sheet: n.sender }) &&
                n.preventDefault();
            },
            _sheetDataBound: function (n) {
              this.trigger("dataBound", { sheet: n.sender });
            },
            _sheetCommandRequest: function (n) {
              this.trigger("commandRequest", n);
            },
            _inputForRef: function (t) {
              var i = this;
              return i._sheet.withCultureDecimals(function () {
                return new n.spreadsheet.Range(t, i._sheet).input();
              });
            },
            _onUndoRedo: function (n) {
              n.command.range().select();
            },
            execute: function (i) {
              var f,
                r = t.extend({ workbook: this }, i.options),
                u = new n.spreadsheet[i.command](r),
                e = this.activeSheet();
              return (
                r.origin && u.origin(r.origin),
                u.range(r.operatingRange ? r.operatingRange : e.selection()),
                (f = u.exec()),
                (f && "error" === f.reason) ||
                  u.cannotUndo ||
                  this.undoRedoStack.push(u),
                this.cleanupImages(),
                f
              );
            },
            resetFormulas: function () {
              this._sheets.forEach(function (n) {
                n.resetFormulas();
              });
            },
            resetValidations: function () {
              this._sheets.forEach(function (n) {
                n.resetValidations();
              });
            },
            refresh: function (n) {
              n.recalc &&
                (this.resetFormulas(),
                this.resetValidations(),
                this._sheet.recalc(this._context),
                this._sheet.revalidate(this._validationContext));
            },
            activeSheet: function (t) {
              return void 0 === t
                ? this._sheet
                : void (
                    this.sheetByName(t.name()) &&
                    ((this._sheet = t),
                    t.triggerChange(n.spreadsheet.ALL_REASONS))
                  );
            },
            moveSheetToIndex: function (n, t) {
              var i = this.sheetIndex(n),
                r = this._sheets;
              i !== -1 &&
                ((this._sheetsSearchCache = {}),
                r.splice(t, 0, r.splice(i, 1)[0]),
                this.trigger("change", { sheetSelection: !0 }));
            },
            insertSheet: function (t) {
              var r, f, e, o, u, i;
              if (
                ((t = t || {}),
                (r = this),
                (f = "number" == typeof t.index ? t.index : r._sheets.length),
                (o = r._sheets),
                (u = function (t) {
                  t = t ? t : 1;
                  var i = n.spreadsheet.messages.workbook.defaultSheetName + t;
                  return r.sheetByName(i) ? u(t + 1) : i;
                }),
                !t.name || !r.sheetByName(t.name))
              )
                return (
                  (this._sheetsSearchCache = {}),
                  (e = t.name || u()),
                  (i = new n.spreadsheet.Sheet(
                    t.rows || this.options.rows,
                    t.columns || this.options.columns,
                    t.rowHeight || this.options.rowHeight,
                    t.columnWidth || this.options.columnWidth,
                    t.headerHeight || this.options.headerHeight,
                    t.headerWidth || this.options.headerWidth,
                    t.defaultCellStyle || this.options.defaultCellStyle
                  )),
                  (i._workbook = this),
                  i._name(e),
                  this._bindSheetEvents(i),
                  o.splice(f, 0, i),
                  t.data && i.fromJSON(t.data),
                  t.dataSource && i.setDataSource(t.dataSource),
                  this.trigger("change", { sheetSelection: !0 }),
                  i
                );
            },
            _bindSheetEvents: function (n) {
              n.bind("changing", this._sheetChanging.bind(this));
              n.bind("change", this._sheetChange.bind(this));
              n.bind("insertRow", this._sheetInsertRow.bind(this));
              n.bind("insertColumn", this._sheetInsertColumn.bind(this));
              n.bind("deleteRow", this._sheetDeleteRow.bind(this));
              n.bind("deleteColumn", this._sheetDeleteColumn.bind(this));
              n.bind("hideRow", this._sheetHideRow.bind(this));
              n.bind("hideColumn", this._sheetHideColumn.bind(this));
              n.bind("unhideRow", this._sheetUnhideRow.bind(this));
              n.bind("unhideColumn", this._sheetUnhideColumn.bind(this));
              n.bind("select", this._sheetSelect.bind(this));
              n.bind("commandRequest", this._sheetCommandRequest.bind(this));
              n.bind("dataBinding", this._sheetDataBinding.bind(this));
              n.bind("dataBound", this._sheetDataBound.bind(this));
            },
            sheets: function () {
              return this._sheets.slice();
            },
            sheetByName: function (n) {
              return this._sheets[this.sheetIndex(n)];
            },
            sheetByIndex: function (n) {
              return this._sheets[n];
            },
            sheetIndex: function (n) {
              var i,
                r = this._sheets,
                u = ("string" == typeof n ? n : n.name()).toLowerCase(),
                t = this._sheetsSearchCache[u];
              if (t >= 0) return t;
              for (t = 0; t < r.length; t++)
                if (
                  ((i = r[t].name().toLowerCase()),
                  (this._sheetsSearchCache[i] = t),
                  i === u)
                )
                  return t;
              return -1;
            },
            renameSheet: function (n, t) {
              var r = n.name().toLowerCase();
              if (
                t &&
                r !== t.toLowerCase() &&
                !this.sheetByName(t) &&
                ((n = this.sheetByName(r)),
                n &&
                  ((this._sheetsSearchCache = {}),
                  !this.trigger("renameSheet", { sheet: n, newSheetName: t })))
              )
                return (
                  this._sheets.forEach(function (n) {
                    n._forFormulas(function (n) {
                      n.renameSheet(r, t);
                    });
                  }),
                  this.forEachName(
                    function (n, f) {
                      n.nameref.renameSheet(r, t) &&
                        (this.undefineName(f),
                        (n.name = n.nameref.print()),
                        this.nameDefinition(n.name, n));
                      (n.value instanceof i || n.value instanceof u) &&
                        n.value.renameSheet(r, t);
                    }.bind(this)
                  ),
                  n._name(t),
                  this.trigger("change", { sheetSelection: !0 }),
                  n
                );
            },
            removeSheet: function (n) {
              var u,
                i = this,
                r = i._sheets,
                f = n.name(),
                t = i.sheetIndex(n);
              1 !== r.length &&
                (this.trigger("removeSheet", { sheet: n }) ||
                  ((this._sheetsSearchCache = {}),
                  t > -1 &&
                    (n.unbind(),
                    r.splice(t, 1),
                    i.activeSheet().name() === f
                      ? ((u = r[t === r.length ? t - 1 : t]), i.activeSheet(u))
                      : this.trigger("change", {
                          recalc: !0,
                          sheetSelection: !0,
                        }))));
            },
            _clearSheets: function () {
              for (var n = 0; n < this._sheets.length; n++)
                (this._sheets[n]._activeDrawing = []),
                  (this._sheets[n]._drawings = []),
                  this._sheets[n].unbind();
              this._sheets = [];
              this._sheetsSearchCache = {};
              this._names = {};
              this._images = {};
              this._imgID = 0;
            },
            fromJSON: function (n) {
              var r, i, t, u;
              if (n.sheets)
                for (
                  this._clearSheets(),
                    n.images &&
                      ((this._imgID = 0),
                      (this._images = {}),
                      Object.keys(n.images).forEach(function (t) {
                        if (!isNaN(t)) {
                          var i = parseFloat(t);
                          isFinite(i) &&
                            (this._imgID = Math.max(this._imgID, i));
                        }
                        this._images[t] = { url: n.images[t] };
                      }, this)),
                    r = 0;
                  r < n.sheets.length;
                  r++
                )
                  (i = n.sheets[r]),
                    (t = o(i, this.options)),
                    (u = this.insertSheet({
                      rows: t.rowCount,
                      columns: t.columnCount,
                      rowHeight: t.rowHeight,
                      columnWidth: t.columnWidth,
                      headerHeight: t.headerHeight,
                      headerWidth: t.headerWidth,
                      data: i,
                    })),
                    i.dataSource && u.setDataSource(i.dataSource);
              this.activeSheet(
                n.activeSheet
                  ? this.sheetByName(n.activeSheet)
                  : this._sheets[0]
              );
              n.names &&
                n.names.forEach(function (n) {
                  this.defineName(n.name, n.value, n.hidden);
                }, this);
            },
            toJSON: function () {
              this.resetFormulas();
              this.resetValidations();
              var n = Object.keys(this._names).map(function (n) {
                var r = this._names[n],
                  t = r.value;
                return (
                  t instanceof i || t instanceof u
                    ? (t = t.print(0, 0, !0))
                    : t instanceof f
                    ? (t += "")
                    : (t = JSON.stringify(t)),
                  {
                    value: t,
                    hidden: r.hidden,
                    name: r.name,
                    sheet: r.nameref.sheet,
                    localName: r.nameref.name,
                  }
                );
              }, this);
              return {
                activeSheet: this.activeSheet().name(),
                sheets: this._sheets.map(function (n) {
                  return (
                    n.recalc(this._context),
                    n.revalidate(this._validationContext),
                    n.toJSON()
                  );
                }, this),
                names: n,
                columnWidth: this.options.columnWidth,
                rowHeight: this.options.rowHeight,
              };
            },
            saveJSON: function () {
              function r() {
                --e <= 0 && u.resolve(i);
              }
              var n = this,
                u = new t.Deferred(),
                i = n.toJSON(),
                f = Object.keys(n._images).filter(function (t) {
                  return 1 === n.usesImage(t);
                }),
                e = f.length;
              return (
                (i.images = {}),
                e
                  ? f.forEach(function (t) {
                      var u,
                        f = n._images[t];
                      f.blob
                        ? ((u = new FileReader()),
                          (u.onload = function () {
                            i.images[t] = u.result;
                            r();
                          }),
                          u.readAsDataURL(f.blob))
                        : ((i.images[t] = f.url), r());
                    })
                  : r(),
                u.promise()
              );
            },
            fromFile: function (i) {
              var r = new t.Deferred(),
                u = r.promise(),
                f = { file: i, promise: u };
              return (
                i && !this.trigger("excelImport", f)
                  ? (this._clearSheets(), n.spreadsheet.readExcel(i, this, r))
                  : r.reject(),
                u
              );
            },
            saveAsExcel: function (i) {
              function s() {
                if (--f <= 0) {
                  u.images = o;
                  var t = new n.ooxml.Workbook(u);
                  n.saveAs({
                    dataURI: i.forceProxy ? t.toDataURL() : t.toBlob(),
                    fileName: u.fileName || i.fileName,
                    proxyURL: i.proxyURL,
                    forceProxy: i.forceProxy,
                  });
                }
              }
              var u,
                h,
                f,
                o,
                r = this;
              i = t.extend({}, r.options.excel, i);
              u = r.toJSON();
              r.trigger("excelExport", { workbook: u }) ||
                ((h = Object.keys(r._images).filter(function (n) {
                  return 1 === r.usesImage(n);
                })),
                (f = h.length),
                (o = f ? {} : null),
                f
                  ? h.forEach(function (n) {
                      var i,
                        t = r._images[n];
                      t.blob
                        ? ((i = new FileReader()),
                          (i.onload = function () {
                            o[n] = {
                              type: t.blob.type,
                              name: t.blob.name,
                              data: i.result,
                            };
                            s();
                          }),
                          i.readAsArrayBuffer(t.blob))
                        : e(t.url, function (t, i) {
                            o[n] = { type: i, data: t };
                            s();
                          });
                    })
                  : s());
            },
            draw: function (t, i) {
              "function" != typeof t || i || ((i = t), (t = {}));
              var r = [],
                u = this._sheets;
              !(function f(e) {
                if (e < u.length)
                  u[e].draw(n.spreadsheet.SHEETREF, t, function (n) {
                    r.push(n);
                    f(e + 1);
                  });
                else {
                  var o = r[0];
                  for (e = 1; e < r.length; ++e)
                    o.children = o.children.concat(r[e].children);
                  i(o);
                }
              })(0);
            },
            nameForRef: function (n, t) {
              var u, e, f, r;
              void 0 === t && (t = n.sheet);
              t = t.toLowerCase();
              u = n + "";
              for (e in this._names)
                if (
                  ((f = this._names[e]),
                  (r = f.value),
                  r instanceof i &&
                    (!r.sheet || (r.sheet && t == r.sheet.toLowerCase())) &&
                    r + "" == u)
                )
                  return f;
              return { name: u };
            },
            defineName: function (t, i, r) {
              var u = n.spreadsheet.calc.parseNameDefinition(t, i);
              t = u.name.print();
              this._names[t.toLowerCase()] = {
                value: u.value,
                hidden: r,
                name: t,
                nameref: u.name,
              };
            },
            undefineName: function (n) {
              delete this._names[n.toLowerCase()];
            },
            nameValue: function (n) {
              return (
                (n = n.toLowerCase()),
                n in this._names ? this._names[n].value : null
              );
            },
            nameDefinition: function (n, t) {
              return (
                (n = n.toLowerCase()),
                arguments.length > 1 &&
                  (void 0 === t ? delete this._names[n] : (this._names[n] = t)),
                this._names[n]
              );
            },
            forEachName: function (n) {
              Object.keys(this._names).forEach(function (t) {
                n(this._names[t], t);
              }, this);
            },
            adjustNames: function (n, t, r, f) {
              n = n.toLowerCase();
              Object.keys(this._names).forEach(function (e) {
                var s = this._names[e],
                  o = s.value;
                o instanceof i && o.sheet.toLowerCase() == n
                  ? (s.value = o.adjust(null, null, null, null, t, r, f))
                  : o instanceof u && o.adjust(n, t ? "row" : "col", r, f);
              }, this);
            },
            addImage: function (n) {
              var t = ++this._imgID + "";
              return (
                (this._images[t] =
                  "string" == typeof n ? { url: n } : { blob: n }),
                t
              );
            },
            imageUrl: function (n) {
              var t = this._images[n],
                i = t.url;
              return i || (i = t.url = window.URL.createObjectURL(t.blob)), i;
            },
            cleanupImages: function () {
              Object.keys(this._images).forEach(function (n) {
                if (!this.usesImage(n)) {
                  var t = this._images[n].url;
                  t && window.URL.revokeObjectURL(t);
                  delete this._images[n];
                }
              }, this);
            },
            usesImage: function (n) {
              for (var i, r = this._sheets, t = r.length; --t >= 0; )
                if (r[t].usesImage(n)) return 1;
              for (i = this.undoRedoStack.stack, t = i.length; --t >= 0; )
                if (i[t].usesImage(n)) return 2;
              return !1;
            },
          })),
          (n.spreadsheet.Workbook = r),
          n.PDFMixin &&
            (n.PDFMixin.extend(r.prototype),
            (r.prototype.saveAsPDF = function (i) {
              var r = new t.Deferred(),
                u = r.promise(),
                f = { promise: u };
              if (!this.trigger("pdfExport", f))
                return (
                  this._drawPDF(i, r)
                    .then(function (t) {
                      return i.forceProxy
                        ? n.pdf.exportPDF(t)
                        : n.pdf.exportPDFToBlob(t);
                    })
                    .done(function (t) {
                      n.saveAs({
                        dataURI: t,
                        fileName: i.fileName,
                        proxyURL: i.proxyURL,
                        forceProxy: i.forceProxy,
                        proxyTarget: i.proxyTarget,
                      });
                      r.resolve();
                    })
                    .fail(function (n) {
                      r.reject(n);
                    }),
                  u
                );
            }),
            (r.prototype._drawPDF = function (n) {
              var r = new t.Deferred(),
                i = function (n) {
                  r.resolve(n);
                };
              switch (n.area) {
                case "workbook":
                  n.workbook.draw(n, i);
                  break;
                case "sheet":
                  n.workbook.activeSheet().draw(n, i);
                  break;
                case "selection":
                  n.workbook.activeSheet().selection().draw(n, i);
              }
              return r.promise();
            })));
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/formulacontext.min", ["kendo.core.min"], n);
  })(
    function () {
      var n, t, f, e, r, i, u, o;
      (kendo.support.browser.msie && kendo.support.browser.version < 9) ||
        ((n = kendo.spreadsheet),
        (t = n.CellRef),
        (f = n.RangeRef),
        (e = n.UnionRef),
        (r = n.NameRef),
        (i = n.Ref),
        (u = kendo.Class.extend({
          init: function (n) {
            this.workbook = n;
          },
          getRefCells: function (n, u, o, s, h, c) {
            var l, y, p, a, tt, v, rt, d, g, ut, ft, et, w, b, it, nt, k;
            if (n instanceof t)
              return (
                (l = this.workbook.sheetByName(n.sheet)),
                l && n.valid()
                  ? ((y = l.formula(n)),
                    (p = l.range(n.row, n.col).value()),
                    c || null != y || null != p
                      ? [
                          {
                            formula: y,
                            value: p,
                            row: n.row,
                            col: n.col,
                            sheet: n.sheet,
                            hidden:
                              !!u &&
                              (0 === l.columnWidth(n.col) ||
                                0 === l.rowHeight(n.row)),
                          },
                        ]
                      : [])
                  : [
                      {
                        value: new kendo.spreadsheet.calc.runtime.CalcError(
                          "REF"
                        ),
                      },
                    ]
              );
            if (n instanceof f) {
              if (
                ((a = this.workbook.sheetIndex(n.sheet)),
                (tt = []),
                (v = a),
                n.endSheet &&
                  ((v = this.workbook.sheetIndex(n.endSheet)),
                  a > v && ((rt = a), (a = v), (v = rt))),
                a < 0 || v < 0 || !n.valid())
              )
                return [
                  {
                    value: new kendo.spreadsheet.calc.runtime.CalcError("REF"),
                  },
                ];
              for (; a <= v; )
                for (
                  l = this.workbook.sheetByIndex(a++),
                    d = l._grid.normalize(n.topLeft),
                    g = l._grid.normalize(n.bottomRight),
                    ut = l._grid.cellRefIndex(d),
                    ft = l._grid.cellRefIndex(g),
                    et = l._properties.iterator("value", ut, ft),
                    w = d.col;
                  w <= g.col;
                  ++w
                )
                  for (b = d.row; b <= g.row; ++b)
                    (it = l._grid.index(b, w)),
                      (y = l._properties.get("formula", it)),
                      (p = et.at(it)),
                      (c || null != y || null != p) &&
                        tt.push({
                          formula: y,
                          value: p,
                          row: b,
                          col: w,
                          sheet: l.name(),
                          hidden:
                            !!u &&
                            (0 === l.columnWidth(w) || 0 === l.rowHeight(b)),
                        });
              return tt;
            }
            if (n instanceof e) {
              for (nt = [], a = 0; a < n.refs.length; ++a)
                nt = nt.concat(this.getRefCells(n.refs[a], u, o, s, h));
              return nt;
            }
            return n instanceof r
              ? ((k = this.nameValue(n, o, s, h)),
                k instanceof i
                  ? this.getRefCells(k, u, o, s, h)
                  : [
                      {
                        value:
                          null == k
                            ? new kendo.spreadsheet.calc.runtime.CalcError(
                                "NAME"
                              )
                            : k,
                      },
                    ])
              : [];
          },
          nameValue: function (n, t, r, u) {
            var f;
            return (
              n.hasSheet()
                ? (f = this.workbook.nameValue(n.print()))
                : ((n = n.clone().setSheet(t, !0)),
                  (f = this.workbook.nameValue(n.print())),
                  null == f && (f = this.workbook.nameValue(n.name))),
              f instanceof i && (f = f.absolute(r, u)),
              f
            );
          },
          getData: function (n, i, u, f, e) {
            var o,
              s = n instanceof t;
            return (
              n instanceof r &&
                (s = this.workbook.nameValue(n.name) instanceof t),
              (o = this.getRefCells(n, !1, i, u, f, e).map(function (n) {
                var t = n.value;
                return (
                  t instanceof kendo.spreadsheet.calc.runtime.Formula &&
                    (t = t.value),
                  t
                );
              })),
              s ? o[0] : o
            );
          },
          onFormula: function (n) {
            var u,
              f,
              s,
              h,
              c,
              r = this.workbook.sheetByName(n.sheet),
              e = n.row,
              o = n.col,
              t = n.value,
              l = r.formula({ row: e, col: o });
            return (
              l === n &&
              ((u = n.arrayFormulaRange),
              u
                ? ((h = t.width),
                  (c = t.height),
                  r.forEach(u, function (n, i) {
                    var u, e, o;
                    void 0 === f && ((f = n), (s = i));
                    u = n - f;
                    e = i - s;
                    o =
                      u < c && e < h
                        ? t.get(u, e)
                        : new kendo.spreadsheet.calc.runtime.CalcError("N/A");
                    r._value(n, i, o);
                  }))
                : (t instanceof i &&
                    ((t = this.getData(t, n.sheet, e, o)),
                    Array.isArray(t) && (t = t[0]),
                    void 0 === t && (t = null)),
                  t instanceof kendo.spreadsheet.calc.runtime.Matrix &&
                    (t = t.get(0, 0)),
                  r._value(e, o, t)),
              clearTimeout(r._formulaContextRefresh),
              (r._formulaContextRefresh = setTimeout(function () {
                r.batch(function () {}, { layout: !0 });
              }, 50)),
              !0)
            );
          },
        })),
        (o = u.extend({
          onFormula: function () {
            return !0;
          },
        })),
        (n.FormulaContext = u),
        (n.ValidationFormulaContext = o));
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/controller.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        "use strict";
        function a(n) {
          return n
            .map(function (n) {
              return '[data-action="' + n + '"]';
            })
            .join(",");
        }
        var t, v, i, f, y, r, h, p, e, c, w, b, o, s, l, u, k;
        if (!(n.support.browser.msie && n.support.browser.version < 9)) {
          t = n.jQuery;
          v = /:alphanum$/;
          i = {
            up: "up",
            down: "down",
            left: "left",
            right: "right",
            home: "first-col",
            "ctrl+left": "first-col",
            end: "last-col",
            "ctrl+right": "last-col",
            "ctrl+up": "first-row",
            "ctrl+down": "last-row",
            "ctrl+home": "first",
            "ctrl+end": "last",
            pageup: "prev-page",
            pagedown: "next-page",
          };
          f = {
            tab: "next",
            "shift+tab": "previous",
            enter: "lower",
            "shift+enter": "upper",
            delete: "clearContents",
            backspace: "clearContents",
            "shift+:alphanum": "edit",
            "alt+:alphanum": "edit",
            ":alphanum": "edit",
            "ctrl+:alphanum": "ctrl",
            "alt+ctrl+:alphanum": "edit",
            ":edit": "edit",
          };
          y = {
            wheel: "onWheel",
            "*+mousedown": "onMouseDown",
            contextmenu: "onContextMenu",
            "*+mousedrag": "onMouseDrag",
            "*+mouseup": "onMouseUp",
            "*+dblclick": "onDblClick",
            mousemove: "onMouseMove",
            touchmove: "onTouchMove",
            touchend: "onTouchEnd",
          };
          r = {
            pageup: "onPageUp",
            pagedown: "onPageDown",
            mouseup: "onMouseUp",
            "*+cut": "onCut",
            "*+paste": "onPaste",
            "*+copy": "onCopy",
          };
          h = {
            esc: "onEditorEsc",
            enter: "onEditorBlur",
            "alt+enter": "insertNewline",
            "shift+enter": "onEditorBlur",
            tab: "onEditorBlur",
            "shift+tab": "onEditorBlur",
            "shift+ctrl+enter": "onEditorArrayFormula",
          };
          p = t.extend({ focus: "onEditorBarFocus" }, h);
          e = t.extend({ focus: "onEditorCellFocus" }, h);
          c = {
            cell: "range",
            rowheader: "row",
            columnheader: "column",
            topcorner: "sheet",
            autofill: "autofill",
          };
          w = a([
            "cut",
            "copy",
            "paste",
            "insert-left",
            "insert-right",
            "insert-above",
            "insert-below",
          ]);
          b = a(["unhide-row", "unhide-column"]);
          o = [];
          s = [];
          l = [];
          for (u in i) o.push(u), s.push("shift+" + u);
          for (u in f) l.push(u);
          r[o] = "onAction";
          r[s] = "onShiftAction";
          r[l] = "onEntryAction";
          e[o] = "onEditorAction";
          e[s] = "onEditorShiftAction";
          k = n.Class.extend({
            init: function (i, r) {
              this.view = i;
              this.workbook(r);
              this.container = t(i.container);
              this.clipboardElement = t(i.clipboard);
              this.cellContextMenu = i.cellContextMenu;
              this.rowHeaderContextMenu = i.rowHeaderContextMenu;
              this.colHeaderContextMenu = i.colHeaderContextMenu;
              this.drawingContextMenu = i.drawingContextMenu;
              this.scroller = i.scroller;
              this.tabstrip = i.tabstrip;
              this.sheetsbar = i.sheetsbar;
              i.nameEditor.bind("enter", this.onNameEditorEnter.bind(this));
              i.nameEditor.bind("cancel", this.onNameEditorCancel.bind(this));
              i.nameEditor.bind("select", this.onNameEditorSelect.bind(this));
              i.nameEditor.bind("delete", this.onNameEditorDelete.bind(this));
              this.editor = i.editor;
              this.editor.bind("change", this.onEditorChange.bind(this));
              this.editor.bind("activate", this.onEditorActivate.bind(this));
              this.editor.bind(
                "deactivate",
                this.onEditorDeactivate.bind(this)
              );
              this.editor.bind("update", this.onEditorUpdate.bind(this));
              t(i.scroller).on("scroll", this.onScroll.bind(this));
              this.listener = new n.spreadsheet.EventListener(
                this.container,
                this,
                y
              );
              this._enableEditorEvents();
              this.sheetsbar &&
                (this.sheetsbar.bind(
                  "select",
                  this.onSheetBarSelect.bind(this)
                ),
                this.sheetsbar.bind(
                  "reorder",
                  this.onSheetBarReorder.bind(this)
                ),
                this.sheetsbar.bind("rename", this.onSheetBarRename.bind(this)),
                this.sheetsbar.bind(
                  "remove",
                  this.onSheetBarRemove.bind(this)
                ));
              this.cellContextMenu.bind(
                "select",
                this.onContextMenuSelect.bind(this)
              );
              this.rowHeaderContextMenu.bind(
                "select",
                this.onContextMenuSelect.bind(this)
              );
              this.colHeaderContextMenu.bind(
                "select",
                this.onContextMenuSelect.bind(this)
              );
              this.drawingContextMenu.bind(
                "select",
                this.onContextMenuSelect.bind(this)
              );
              this.cellContextMenu.element
                .add(this.rowHeaderContextMenu.element)
                .add(this.colHeaderContextMenu.element)
                .add(this.drawingContextMenu.element)
                .on("contextmenu", !1);
              this.tabstrip &&
                (this.tabstrip.bind("action", this.onCommandRequest.bind(this)),
                this.tabstrip.bind("dialog", this.onDialogRequest.bind(this)));
            },
            _enableEditorEvents: function (t) {
              void 0 === t || t
                ? ((this.keyListener = new n.spreadsheet.EventListener(
                    this.clipboardElement,
                    this,
                    r
                  )),
                  (this.barKeyListener = new n.spreadsheet.EventListener(
                    this.editor.barElement(),
                    this,
                    p
                  )),
                  (this.inputKeyListener = new n.spreadsheet.EventListener(
                    this.editor.cellElement(),
                    this,
                    e
                  )))
                : (this.keyListener.destroy(),
                  this.barKeyListener.destroy(),
                  this.inputKeyListener.destroy());
            },
            _execute: function (n) {
              var t = this._workbook.execute(n);
              return (
                "EditCommand" !== n.command ||
                  t ||
                  this._workbook.trigger("change", { editorClose: !0 }),
                t &&
                  ((this._preventNavigation = !0),
                  "error" === t.reason
                    ? (this.editor.deactivate(!0),
                      this.view.showError(
                        t,
                        function () {
                          this.activateEditor(!1);
                          this.editor.value(this._lastEditorValue);
                          this.editor._value = this._workbook._inputForRef(
                            this._workbook.activeSheet()._viewActiveCell()
                          );
                          this.editor.select();
                        }.bind(this)
                      ))
                    : this.view.openDialog(t.reason)),
                t
              );
            },
            _activeTooltip: function () {
              return "" + this._workbook.activeSheet().activeCell().simplify();
            },
            onContextMenuSelect: function (n) {
              var i,
                r = t(n.item).data("action");
              switch (r) {
                case "cut":
                  i = {
                    command: "ToolbarCutCommand",
                    options: { workbook: this._workbook },
                  };
                  break;
                case "copy":
                  i = {
                    command: "ToolbarCopyCommand",
                    options: { workbook: this._workbook },
                  };
                  break;
                case "paste":
                  i = {
                    command: "ToolbarPasteCommand",
                    options: { workbook: this._workbook },
                  };
                  break;
                case "delete-drawing":
                  i = {
                    command: "DeleteDrawingCommand",
                    options: { drawing: this.navigator._sheet._activeDrawing },
                  };
                  break;
                case "bring-to-front":
                  i = {
                    command: "BringToFrontCommand",
                    options: { drawing: this.navigator._sheet._activeDrawing },
                  };
                  break;
                case "send-to-back":
                  i = {
                    command: "SendToBackCommand",
                    options: { drawing: this.navigator._sheet._activeDrawing },
                  };
                  break;
                case "unmerge":
                  i = {
                    command: "MergeCellCommand",
                    options: { value: "unmerge" },
                  };
                  break;
                case "merge":
                  this.view.openDialog("merge");
                  break;
                case "hide-row":
                  i = { command: "HideLineCommand", options: { axis: "row" } };
                  break;
                case "hide-column":
                  i = {
                    command: "HideLineCommand",
                    options: { axis: "column" },
                  };
                  break;
                case "unhide-row":
                  i = {
                    command: "UnHideLineCommand",
                    options: { axis: "row" },
                  };
                  break;
                case "unhide-column":
                  i = {
                    command: "UnHideLineCommand",
                    options: { axis: "column" },
                  };
                  break;
                case "delete-row":
                  i = { command: "DeleteRowCommand" };
                  break;
                case "delete-column":
                  i = { command: "DeleteColumnCommand" };
              }
              i && this._execute(i);
            },
            onSheetBarRemove: function (n) {
              var t = this._workbook.sheetByName(n.name);
              t && this._workbook.removeSheet(t);
            },
            destroy: function () {
              this.listener.destroy();
              this._enableEditorEvents(!1);
              this.keyListener.destroy();
              this.inputKeyListener.destroy();
            },
            onSheetBarSelect: function (n) {
              var t,
                i = this._workbook;
              if (n.isAddButton) {
                if (this._workbook.trigger("insertSheet")) return;
                t = i.insertSheet();
              } else t = i.sheetByName(n.name);
              if (i.activeSheet().name() !== t.name()) {
                if (this._workbook.trigger("selectSheet", { sheet: t })) return;
                this.editor.canInsertRef(!1) || this.editor.deactivate();
                i.activeSheet(t);
              }
            },
            onSheetBarReorder: function (n) {
              var t = this._workbook.sheetByIndex(n.oldIndex);
              this._workbook.moveSheetToIndex(t, n.newIndex);
              this._workbook.activeSheet(t);
            },
            onSheetBarRename: function (n) {
              var t = this._workbook.sheetByIndex(n.sheetIndex);
              return this._workbook.sheetByName(n.name)
                ? void this.view.showError({
                    reason: "error",
                    type: "duplicateSheetName",
                  })
                : (this._workbook.renameSheet(t, n.name),
                  void this.clipboardElement.focus());
            },
            sheet: function (n) {
              this.navigator = n.navigator();
              this.axisManager = n.axisManager();
            },
            workbook: function (n) {
              this._workbook = n;
              this.clipboard = n.clipboard();
              n.bind("commandRequest", this.onCommandRequest.bind(this));
            },
            refresh: function () {
              var t,
                i,
                r = this.editor,
                u = this._workbook,
                n = u.activeSheet();
              this._viewPortHeight = this.view.scroller.clientHeight;
              this.navigator.height(this._viewPortHeight);
              r.isActive() ||
                this.isEditorDisabled ||
                (r.enable(n.selection().enable() !== !1),
                this.resetEditorValue());
              t = n.selection()._ref.simplify();
              i = this._workbook.nameForRef(t, n.name());
              this.view.nameEditor.value(i.name);
            },
            onScroll: function () {
              this.view.render({ scroll: !0 });
            },
            onWheel: function (n) {
              var t = n.originalEvent.deltaX,
                i = n.originalEvent.deltaY;
              1 === n.originalEvent.deltaMode && ((t *= 10), (i *= 10));
              this.scrollWith(t, i);
              n.preventDefault();
            },
            onTouchMove: function () {
              this.view.forceScrollerStackingOrder(2);
            },
            onTouchEnd: function () {
              this.view.forceScrollerStackingOrder(1);
            },
            onAction: function (n, t) {
              var r = this._workbook.activeSheet();
              r._activeDrawing = null;
              this.navigator.moveActiveCell(i[t]);
              n.preventDefault();
            },
            onPageUp: function () {
              this.scrollDown(-this._viewPortHeight);
            },
            onPageDown: function () {
              this.scrollDown(this._viewPortHeight);
            },
            onEntryAction: function (n, t) {
              var u,
                o,
                e,
                r,
                i = this._workbook.activeSheet();
              if (n.mod) {
                switch (((u = !0), (o = String.fromCharCode(n.keyCode)))) {
                  case "A":
                    i._activeDrawing = null;
                    this.navigator.selectAll();
                    break;
                  case "Y":
                    this._workbook.undoRedoStack.redo();
                    break;
                  case "Z":
                    this._workbook.undoRedoStack.undo();
                    break;
                  default:
                    u = !1;
                }
                u && n.preventDefault();
              } else if (
                ((e = i.selection().enable() === !1),
                (r = ":edit" !== t),
                "delete" == t || "backspace" == t)
              )
                i._activeDrawing
                  ? this._execute({
                      command: "DeleteDrawingCommand",
                      options: { drawing: i._activeDrawing },
                    })
                  : e || this._execute({ command: "ClearContentCommand" }),
                  n.preventDefault();
              else if (v.test(t) || !r) {
                if (((i._activeDrawing = null), e))
                  return void n.preventDefault();
                r && this.editor.value("");
                this.activateEditor(r);
              } else
                this.navigator.navigateInSelection(f[t]), n.preventDefault();
            },
            onShiftAction: function (n, t) {
              this.navigator.modifySelection(
                i[t.replace("shift+", "")],
                this.appendSelection
              );
              n.preventDefault();
            },
            onMouseMove: function (n) {
              var t,
                i = this._workbook.activeSheet();
              i.resizingInProgress() ||
                i.selectionInProgress() ||
                ((t = this.objectAt(n)),
                "columnresizehandle" === t.type || "rowresizehandle" === t.type
                  ? i.positionResizeHandle(t.ref)
                  : i.removeResizeHandle(),
                i._renderComment("cell" == t.type ? t.ref : null));
            },
            onMouseDown: function (t) {
              var r,
                u,
                i = this.objectAt(t);
              if (
                (i.pane && (this.originFrame = i.pane),
                this._startResizingDrawing(t, i))
              )
                return void t.stopPropagation();
              if (
                ((r = this._workbook.activeSheet()),
                (u = this.container.closest('[data-role="window"]')),
                u.length &&
                  ((u = n.widgetInstance(u)),
                  u && u.options.modal && t.stopPropagation()),
                (r._activeDrawing = null),
                "drawing" === i.type)
              )
                return (
                  (r._activeDrawing = i.drawing),
                  (i.copy = i.drawing.clone()),
                  (i.startBox = r.drawingBoundingBox(i.copy)),
                  r.startDragging(i),
                  r.triggerChange({ dragging: !0 }),
                  void t.preventDefault()
                );
              if ("editor" === i.type)
                return (
                  this.onEditorEsc(),
                  this.openCustomEditor(),
                  void t.preventDefault()
                );
              if (this.editor.canInsertRef(!1) && i.ref)
                return (
                  this._workbook
                    .activeSheet()
                    ._setFormulaSelections(this.editor.highlightedRefs()),
                  this.navigator.startSelection(
                    i.ref,
                    this._selectionMode,
                    this.appendSelection,
                    t.shiftKey,
                    this.view
                  ),
                  void t.preventDefault()
                );
              if (
                ((this._preventNavigation = !1),
                this.editor.deactivate(),
                !this._preventNavigation)
              ) {
                if (
                  "columnresizehandle" === i.type ||
                  "rowresizehandle" === i.type
                )
                  return (
                    r.startResizing({ x: i.x, y: i.y }), void t.preventDefault()
                  );
                if ("filtericon" === i.type)
                  return this.openFilterMenu(t), void t.preventDefault();
                this._selectionMode = c[i.type];
                this.appendSelection = t.mod;
                this.navigator.startSelection(
                  i.ref,
                  this._selectionMode,
                  this.appendSelection,
                  t.shiftKey,
                  this.view
                );
              }
            },
            _startResizingDrawing: function (n) {
              var u,
                f,
                i,
                r,
                e = t(n.target).closest(".k-spreadsheet-drawing-handle");
              if (e.length)
                return (
                  (u = this.translateCoords(n)),
                  (f = e.data("direction")),
                  (i = this._workbook.activeSheet()),
                  (r = i._activeDrawing),
                  i.startDragging({
                    pane: this.originFrame,
                    drawing: r,
                    copy: r.clone(),
                    startBox: i.drawingBoundingBox(r),
                    resize: f,
                    startX: u.x,
                    startY: u.y,
                  }),
                  !0
                );
            },
            onContextMenu: function (t) {
              var r,
                i,
                u,
                f,
                e,
                o = this._workbook.activeSheet();
              t.preventDefault();
              o.resizingInProgress() ||
                o.draggingInProgress() ||
                (this.cellContextMenu.close(),
                this.colHeaderContextMenu.close(),
                this.rowHeaderContextMenu.close(),
                this.drawingContextMenu.close(),
                (i = this.objectAt(t)),
                "columnresizehandle" !== i.type &&
                  "rowresizehandle" !== i.type &&
                  (i.ref
                    ? this.navigator.selectForContextMenu(i.ref, c[i.type])
                    : "drawing" == i.type &&
                      this.navigator.selectDrawingForContextMenu(i.drawing),
                  (u =
                    this.navigator._sheet.select() instanceof
                    n.spreadsheet.UnionRef),
                  (f = !1),
                  (e = !1),
                  "columnheader" == i.type
                    ? ((r = this.colHeaderContextMenu),
                      (f =
                        !u &&
                        this.axisManager.selectionIncludesHiddenColumns()))
                    : "rowheader" == i.type
                    ? ((r = this.rowHeaderContextMenu),
                      (f =
                        !u && this.axisManager.selectionIncludesHiddenRows()))
                    : "drawing" == i.type
                    ? (r = this.drawingContextMenu)
                    : ((r = this.cellContextMenu),
                      (e = this.navigator.selectionIncludesMergedCells())),
                  r.element.find(w).toggle(!u),
                  r.element.find(b).toggle(f),
                  r.element.find("[data-action=unmerge]").toggle(e),
                  setTimeout(function () {
                    r.open(t.pageX, t.pageY);
                  })));
            },
            prevent: function (n) {
              n.preventDefault();
            },
            constrainResize: function (n, t) {
              var r = this._workbook.activeSheet(),
                i = r.resizeHandlePosition();
              return (
                !i ||
                "outside" === n ||
                "topcorner" === n ||
                t.col < i.col ||
                t.row < i.row
              );
            },
            _dragDrawing: function (n) {
              var f,
                i,
                r,
                u,
                e = this._workbook.activeSheet(),
                t = e.draggingInProgress();
              return (
                !!t &&
                ((f = this.translateCoords(n)),
                (i = t.drawing),
                (r = f.x - t.startX),
                (u = f.y - t.startY),
                "SE" == t.resize
                  ? t.aspect
                    ? Math.abs(r) > Math.abs(u)
                      ? ((i.width = Math.max(t.copy.width + r, 20)),
                        (i.height = i.width / t.aspect))
                      : ((i.height = Math.max(t.copy.height + u, 20)),
                        (i.width = i.height * t.aspect))
                    : ((i.width = Math.max(t.copy.width + r, 20)),
                      (i.height = Math.max(t.copy.height + u, 20)))
                  : "E" == t.resize
                  ? (i.width = Math.max(t.copy.width + r, 20))
                  : "S" == t.resize
                  ? (i.height = Math.max(t.copy.height + u, 20))
                  : "N" == t.resize
                  ? t.copy.height - u > 20 &&
                    ((i.height = t.copy.height - u),
                    (i.offsetY = t.copy.offsetY + u))
                  : "W" == t.resize
                  ? t.copy.width - r > 20 &&
                    ((i.width = t.copy.width - r),
                    (i.offsetX = t.copy.offsetX + r))
                  : "NE" == t.resize
                  ? ((i.width = Math.max(t.copy.width + r, 20)),
                    t.copy.height - u > 20 &&
                      ((i.height = t.copy.height - u),
                      (i.offsetY = t.copy.offsetY + u)))
                  : "SW" == t.resize
                  ? ((i.height = Math.max(t.copy.height + u, 20)),
                    t.copy.width - r > 20 &&
                      ((i.width = t.copy.width - r),
                      (i.offsetX = t.copy.offsetX + r)))
                  : "NW" == t.resize
                  ? (t.copy.height - u > 20 &&
                      ((i.height = t.copy.height - u),
                      (i.offsetY = t.copy.offsetY + u)),
                    t.copy.width - r > 20 &&
                      ((i.width = t.copy.width - r),
                      (i.offsetX = t.copy.offsetX + r)))
                  : ((i.offsetX = t.copy.offsetX + r),
                    (i.offsetY = t.copy.offsetY + u)),
                e.triggerChange({ dragging: !0 }),
                !0)
              );
            },
            onMouseDrag: function (n) {
              var i, u, t, r;
              if (
                "sheet" !== this._selectionMode &&
                ((i = { clientX: n.clientX, clientY: n.clientY }),
                (u = this._workbook.activeSheet()),
                !this._dragDrawing(n))
              ) {
                if (((t = this.objectAt(i)), u.resizingInProgress()))
                  return void (
                    this.constrainResize(t.type, t.ref) ||
                    u.resizeHintPosition({ x: t.x, y: t.y })
                  );
                if ("outside" === t.type) return void this.startAutoScroll(t);
                this.originFrame === t.pane
                  ? this.selectToLocation(i)
                  : ((r = this.originFrame._grid),
                    t.x > r.right && this.scrollLeft(),
                    t.y > r.bottom && this.scrollTop(),
                    t.y < r.top || t.x < r.left
                      ? this.startAutoScroll(t, i)
                      : this.selectToLocation(i));
                n.preventDefault();
              }
            },
            onMouseUp: function (n) {
              var t,
                i,
                u,
                r = this._workbook.activeSheet();
              if (
                (r.completeResizing(),
                r.completeDragging(),
                this.navigator.completeSelection(),
                this.stopAutoScroll(),
                (t = this.editor.activeEditor()))
              ) {
                for (i = n.target; i; ) {
                  if (i === t.element[0]) return;
                  i = i.parentNode;
                }
                u = this.objectAt(n);
                u &&
                  u.ref &&
                  t.canInsertRef(!1) &&
                  (t.refAtPoint(r),
                  r._setFormulaSelections(t.highlightedRefs()));
              }
            },
            onDblClick: function (n) {
              var t,
                i = this.objectAt(n),
                r = this._workbook.activeSheet().selection().enable() === !1;
              "cell" !== i.type ||
                r ||
                ((t = this._workbook.activeSheet().selection()),
                this.activateEditor(!t.value() && !t.formula()),
                this.onEditorUpdate());
            },
            onCut: function (n) {
              if (n) {
                var t = this.clipboardElement
                  .find("table.kendo-clipboard-" + this.clipboard._uid)
                  .detach();
                this.clipboardElement.append(t.clone(!1));
                setTimeout(
                  function () {
                    this.clipboardElement.empty().append(t);
                  }.bind(this)
                );
              }
              this._execute({
                command: "CutCommand",
                options: {
                  workbook: this.view._workbook,
                  event: n.originalEvent || n,
                },
              });
            },
            clipBoardValue: function () {
              return this.clipboardElement.html();
            },
            _pasteImage: function (n) {
              var r = this,
                i = n.getAsFile(),
                t = new window.Image();
              t.src = window.URL.createObjectURL(i);
              t.onload = function () {
                r._execute({
                  command: "InsertImageCommand",
                  options: { blob: i, width: t.width, height: t.height },
                });
              };
              setTimeout(function () {
                window.URL.revokeObjectURL(t.src);
              }, 10);
            },
            onPaste: function (t) {
              var i,
                u,
                f,
                e,
                o,
                c,
                r = this,
                s = "",
                h = "";
              if (((r.clipboard.menuInvoked = void 0 === t), t)) {
                if (((i = t.originalEvent.clipboardData), !i || !i.getData))
                  return (
                    (c = r.clipboardElement
                      .find("table.kendo-clipboard-" + r.clipboard._uid)
                      .detach()),
                    r.clipboardElement.empty(),
                    void setTimeout(function () {
                      var n = r.clipboardElement.html(),
                        i = window.clipboardData.getData("Text").trim();
                      (n || i) &&
                        (r.clipboard.external({ html: n, plain: i }),
                        r.clipboardElement.empty().append(c),
                        r._execute({
                          command: "PasteCommand",
                          options: {
                            workbook: r.view._workbook,
                            event: t.originalEvent || t,
                          },
                        }),
                        (r.clipboard.menuInvoked = !0));
                    })
                  );
                if (
                  (t.preventDefault(),
                  (u = !1),
                  (f = !1),
                  window.DOMStringList &&
                  i.types instanceof window.DOMStringList
                    ? ((u = i.types.contains("text/html")),
                      (f = i.types.contains("text/plain")))
                    : Array.isArray(i.types)
                    ? ((u = i.types.indexOf("text/html") >= 0),
                      (f = i.types.indexOf("text/plain") >= 0))
                    : ((u = /text\/html/.test(i.types)),
                      (f = /text\/plain/.test(i.types))),
                  u && (s = i.getData("text/html")),
                  f && (h = i.getData("text/plain").trim()),
                  !u && !f && i.items && i.items.length)
                )
                  for (e = 0; e < i.items.length; ++e)
                    if (
                      ((o = i.items[e]),
                      "file" == o.kind &&
                        /^image\/(?:png|jpe?g|gif)$/i.test(o.type))
                    )
                      return r._pasteImage(o);
              } else {
                if (n.support.browser.msie)
                  return (
                    r.clipboardElement.focus().select(),
                    void document.execCommand("paste")
                  );
                r.clipboard.menuInvoked = !0;
              }
              (s || h) &&
                (r.clipboard.external({ html: s, plain: h }),
                r._execute({
                  command: "PasteCommand",
                  options: {
                    workbook: r.view._workbook,
                    event: t.originalEvent || t,
                  },
                }));
            },
            onCopy: function (n) {
              this.clipboard.menuInvoked = void 0 === n;
              this._execute({
                command: "CopyCommand",
                options: {
                  workbook: this.view._workbook,
                  event: n.originalEvent || n,
                },
              });
            },
            scrollTop: function () {
              this.scroller.scrollTop = 0;
            },
            scrollLeft: function () {
              this.scroller.scrollLeft = 0;
            },
            scrollDown: function (n) {
              this.scroller.scrollTop += n;
            },
            scrollRight: function (n) {
              this.scroller.scrollLeft += n;
            },
            scrollWith: function (n, t) {
              this.scroller.scrollTop += t;
              this.scroller.scrollLeft += n;
            },
            translateCoords: function (n) {
              var t = this.container[0].getBoundingClientRect();
              return { x: n.clientX - t.left, y: n.clientY - t.top };
            },
            objectAt: function (n, t) {
              if (n)
                return (
                  (n = this.translateCoords(n)), this.view.objectAt(n.x, n.y, t)
                );
            },
            selectToLocation: function (n) {
              var t = this.objectAt(n, !0);
              t.pane &&
                t.ref &&
                (this.extendSelection(t),
                (this.lastKnownCellLocation = n),
                (this.originFrame = t.pane));
              this.stopAutoScroll();
            },
            extendSelection: function (n) {
              this.navigator.extendSelection(
                n.ref,
                this._selectionMode,
                this.appendSelection
              );
            },
            autoScroll: function () {
              var r = this._autoScrollTarget.x,
                u = this._autoScrollTarget.y,
                n = this.originFrame._grid,
                t = this.view.scroller,
                i = 8,
                f = t.scrollLeft,
                e = t.scrollTop;
              r < n.left && this.scrollRight(-i);
              r > n.right && this.scrollRight(i);
              u < n.top && this.scrollDown(-i);
              u > n.bottom && this.scrollDown(i);
              e === t.scrollTop && f === t.scrollLeft
                ? this.selectToLocation(this.finalLocation)
                : this.extendSelection(
                    this.objectAt(this.lastKnownCellLocation)
                  );
            },
            startAutoScroll: function (n, t) {
              this._scrollInterval ||
                (this._scrollInterval = setInterval(
                  this.autoScroll.bind(this),
                  50
                ));
              this.finalLocation = t || this.lastKnownCellLocation;
              this._autoScrollTarget = n;
            },
            stopAutoScroll: function () {
              clearInterval(this._scrollInterval);
              this._scrollInterval = null;
            },
            openCustomEditor: function () {
              this.view.openCustomEditor();
            },
            openFilterMenu: function (n) {
              var i = this.objectAt(n),
                r = this._workbook.activeSheet(),
                u = r.filterColumn(i.ref),
                t = this.view.createFilterMenu(u);
              t.bind("action", this.onCommandRequest.bind(this));
              t.bind("action", t.close.bind(t));
              t.openFor(n.target);
            },
            _saveEditorValue: function (n) {
              var t = this.editor._range.sheet(),
                i = this.editor.value();
              this._workbook.activeSheet() !== t &&
                (this._workbook.activeSheet()._setFormulaSelections(),
                this._workbook.activeSheet(t));
              t.isInEditMode(!1);
              this._lastEditorValue = i;
              this._execute({
                command: "EditCommand",
                options: { value: i, arrayFormula: n },
              });
            },
            onEditorChange: function () {
              this._saveEditorValue(!1);
            },
            onEditorArrayFormula: function () {
              this._saveEditorValue(!0);
              this.editor.deactivate(!0);
            },
            onEditorActivate: function () {
              var t = this._workbook,
                n = t.activeSheet();
              n._setFormulaSelections(this.editor.highlightedRefs());
              n.isInEditMode(!0);
            },
            onEditorDeactivate: function () {
              var n = this._workbook.activeSheet();
              n.isInEditMode(!1);
              n._setFormulaSelections([]);
            },
            onEditorUpdate: function () {
              this._workbook
                .activeSheet()
                ._setFormulaSelections(this.editor.highlightedRefs());
            },
            onEditorBarFocus: function () {
              var n = this._workbook.activeSheet().selection().enable() === !1;
              n ||
                this.editor.activate({
                  range: this._workbook.activeSheet().selection(),
                  rect: this.view.activeCellRectangle(),
                  tooltip: this._activeTooltip(),
                });
            },
            onEditorCellFocus: function () {
              this.editor.scale();
            },
            onEditorEsc: function () {
              this.resetEditorValue();
              this.editor.deactivate();
              this.clipboardElement.focus();
            },
            insertNewline: function (n) {
              n.preventDefault();
              this.editor.insertNewline();
            },
            onEditorBlur: function (n, t) {
              this.editor.isFiltered() ||
                ((this._preventNavigation = !1),
                this.editor.deactivate(),
                this._preventNavigation ||
                  (this.clipboardElement.focus(),
                  this.navigator.navigateInSelection(f[t])));
            },
            onEditorAction: function (n, t) {
              var r = this.editor,
                u = this._workbook.activeSheet();
              this._casualEditing && /^(?:up|right|down|left)$/.test(t)
                ? (this.deactivateEditor(),
                  this.navigator.moveActiveCell(i[t]),
                  n.preventDefault())
                : r.canInsertRef(!0) &&
                  (this.navigator.moveActiveCell(i[t]),
                  r.activeEditor().refAtPoint(u),
                  u._setFormulaSelections(r.highlightedRefs()),
                  n.preventDefault());
            },
            onEditorShiftAction: function (n, t) {
              var r = this.editor,
                u = this._workbook.activeSheet();
              r.canInsertRef(!0) &&
                (this.navigator.modifySelection(
                  i[t.replace("shift+", "")],
                  this.appendSelection
                ),
                r.activeEditor().refAtPoint(u),
                u._setFormulaSelections(r.highlightedRefs()),
                n.preventDefault());
            },
            resetEditorValue: function () {
              var t = this._workbook.activeSheet(),
                i = t.activeCell(),
                r = this._workbook._inputForRef(i),
                n = t.range(i).intersectingArrayFormula();
              n && (r = "=" + n.formula);
              this.editor.value(r, !!n);
            },
            activateEditor: function (n) {
              this._casualEditing = n;
              this.editor
                .activate({
                  range: this._workbook.activeSheet().selection(),
                  rect: this.view.activeCellRectangle(),
                  tooltip: this._activeTooltip(),
                })
                .focus();
            },
            deactivateEditor: function () {
              this.view.editor.deactivate();
            },
            onCommandRequest: function (n) {
              n.command
                ? this._execute(n)
                : this._workbook.undoRedoStack[n.action]();
            },
            onDialogRequest: function (n) {
              var i = {
                pdfExport: this._workbook.options.pdf,
                excelExport: this._workbook.options.excel,
              };
              n.options ? t.extend(!0, n.options, i) : (n.options = i);
              this.view.openDialog(n.name, n.options);
            },
            onNameEditorEnter: function () {
              var r,
                u = this._workbook,
                i = u.activeSheet(),
                f = this.view.nameEditor.value(),
                t = n.spreadsheet.calc.parseReference(f, !0) || u.nameValue(f);
              return t instanceof n.spreadsheet.Ref
                ? (t.sheet &&
                    t.sheet.toLowerCase() != i.name().toLowerCase() &&
                    ((r = u.sheetByName(t.sheet)),
                    r && (u.activeSheet(r), (i = r))),
                  void i.range(t).select())
                : ((t = i
                    .selection()
                    ._ref.clone()
                    .simplify()
                    .setSheet(i.name(), !0)),
                  this._execute({
                    command: "DefineNameCommand",
                    options: { name: f, value: t },
                  }),
                  void this.clipboardElement.focus());
            },
            onNameEditorCancel: function () {
              this.clipboardElement.focus();
            },
            onNameEditorSelect: function (t) {
              var r,
                e = t.name,
                u = this._workbook,
                f = u.activeSheet(),
                i = u.nameValue(e);
              return i instanceof n.spreadsheet.Ref
                ? (i.sheet &&
                    i.sheet.toLowerCase() != f.name().toLowerCase() &&
                    ((r = u.sheetByName(i.sheet)),
                    r && (u.activeSheet(r), (f = r))),
                  void f.range(i).select())
                : void this.clipboardElement.focus();
            },
            onNameEditorDelete: function (n) {
              this._execute({
                command: "DeleteNameCommand",
                options: { name: n.name },
              });
              this.clipboardElement.focus();
            },
          });
          n.spreadsheet.Controller = k;
        }
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/view.min",
      [
        "kendo.core.min",
        "kendo.menu.min",
        "spreadsheet/sheetsbar.min",
        "util/main.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        function g(n) {
          var t,
            i = window.getSelection();
          i.removeAllRanges();
          t = document.createRange();
          t.selectNodeContents(n);
          i.addRange(t);
        }
        function nt(n, t) {
          var i = n.trs[t].children;
          return i[i.length - 2];
        }
        function tt(n, t) {
          var i = n.trs[t - 1],
            r = n.trs[t].children.length - 1;
          if (i && r >= 0) return i.children[r];
        }
        function h(n) {
          return (n.size || 1) + "px solid " + (n.color || "#000");
        }
        function it(n) {
          return /:\/\//.test(n) || (n = "http://" + n), n;
        }
        function l(t, i, r, u) {
          function d(t) {
            var r,
              u = i.link;
            return (
              u || ("object" == typeof i.value && (u = i.value.link)),
              u
                ? ((r = { textDecoration: "none" }),
                  i.color && (r.color = i.color),
                  i.underline && (r.textDecoration = "underline"),
                  n.dom.element(
                    "a",
                    { href: it(u), style: r, target: "_blank" },
                    t ? [t] : []
                  ))
                : t
            );
          }
          var f,
            l,
            o,
            e,
            v,
            a,
            c,
            w,
            b,
            y,
            p,
            k,
            g =
              null != i.value ||
              (null != i.validation && !i.validation.value) ||
              i.background ||
              i.merged ||
              i.comment;
          if (r || g) {
            if (
              ((f = {}),
              (l = i.background),
              l &&
                ((o = l),
                u &&
                  ((o = n.parseColor(o).toHSV()),
                  (o.v *= 0.9),
                  (o = o.toCssRgba())),
                (o = h({ color: o })),
                (f.outline = o)),
              l && (f.backgroundColor = l),
              i.color && (f.color = i.color),
              i.fontFamily && (f.fontFamily = i.fontFamily),
              i.underline && (f.textDecoration = "underline"),
              i.italic && (f.fontStyle = "italic"),
              i.textAlign && (f.textAlign = i.textAlign),
              i.bold && (f.fontWeight = "bold"),
              i.fontSize && (f.fontSize = i.fontSize + "px"),
              i.wrap === !0
                ? ((f.whiteSpace = "pre-wrap"),
                  (f.overflowWrap = "break-word"),
                  (f.wordWrap = "break-word"))
                : ((f.whiteSpace = "pre"),
                  (f.overflowWrap = "normal"),
                  (f.wordWrap = "normal")),
              (f.left = i.left + 1 + "px"),
              (f.top = i.top + 1 + "px"),
              (f.width = i.width - 1 + "px"),
              (f.height = i.height - 1 + "px"),
              (e = i.value),
              (v = typeof e),
              (a = i.format),
              a ||
                "number" != v ||
                e == Math.floor(e) ||
                (a = "0.##############"),
              a && null != e
                ? ((e = n.spreadsheet.formatting.format(e, a)),
                  e.__dataType && (v = e.__dataType))
                : null !== e && void 0 !== e && (e = n.dom.text(e)),
              !f.textAlign)
            )
              switch (v) {
                case "number":
                case "date":
                case "percent":
                case "currency":
                  f.textAlign = "right";
                  break;
                case "boolean":
                  f.textAlign = "center";
              }
            return (
              n.spreadsheet.draw.applyIndent(i, f),
              (c = [s.cell]),
              r && c.push(r),
              i.enable === !1 && c.push("k-state-disabled"),
              i.merged && c.push("k-spreadsheet-merged-cell"),
              i.comment && c.push("k-spreadsheet-has-comment"),
              (w = i.verticalAlign || "bottom"),
              (e =
                w && e
                  ? n.dom.element(
                      "div",
                      { className: "k-vertical-align-" + w },
                      [d(e)]
                    )
                  : d(e)),
              (b = e ? [e] : []),
              (y = { style: f }),
              (p = i.validation),
              p &&
                !p.value &&
                (b.push(n.dom.element("span", { className: "k-dirty" })),
                c.push("k-dirty-cell"),
                (y.title = p.message)),
              (y.className = c.join(" ")),
              (k = n.dom.element("div", y, b)),
              t.push(k),
              k
            );
          }
        }
        function rt(t, i, r) {
          var f,
            c,
            s,
            l,
            a,
            e,
            o,
            u = {};
          if (
            (r.background && (u.backgroundColor = r.background),
            r.color && (u.color = r.color),
            r.fontFamily && (u.fontFamily = r.fontFamily),
            r.underline && (u.textDecoration = "underline"),
            r.italic && (u.fontStyle = "italic"),
            r.textAlign && (u.textAlign = r.textAlign),
            r.verticalAlign &&
              (u.verticalAlign =
                "center" === r.verticalAlign ? "middle" : r.verticalAlign),
            r.bold && (u.fontWeight = "bold"),
            r.fontSize && (u.fontSize = r.fontSize + "px"),
            r.wrap === !0 && (u.whiteSpace = "pre-wrap"),
            r.borderRight
              ? (u.borderRight = h(r.borderRight))
              : r.background && (u.borderRightColor = r.background),
            r.borderBottom
              ? (u.borderBottom = h(r.borderBottom))
              : r.background && (u.borderBottomColor = r.background),
            (f = r.value),
            (c = typeof f),
            (s = r.format),
            s ||
              "number" != c ||
              f == Math.floor(f) ||
              (s = "0.##############"),
            s &&
              null != f &&
              ((f = n.spreadsheet.formatting.format(f, s)),
              f.__dataType && (c = f.__dataType)),
            !u.textAlign)
          )
            switch (c) {
              case "number":
              case "date":
              case "percent":
              case "currency":
                u.textAlign = "right";
                break;
              case "boolean":
                u.textAlign = "center";
            }
          return (
            (l = null),
            r.enable === !1 && (l = "k-state-disabled"),
            (a = t.addCell(i, f, u, l, r.validation)),
            r.borderLeft
              ? ((o = nt(t, i)),
                (e = h(r.borderLeft)),
                o && e && (o.attr.style.borderRight = e))
              : r.background && (u.borderLeftColor = r.background),
            r.borderTop
              ? ((o = tt(t, i)),
                (e = h(r.borderTop)),
                o && e && (o.attr.style.borderBottom = e))
              : r.background && (u.borderTopColor = r.background),
            a
          );
        }
        function a(n, t, i) {
          return n >= t && n <= i;
        }
        function ut(t) {
          ["N", "NE", "E", "SE", "S", "SW", "W", "NW"].forEach(function (i) {
            t.push(
              n.dom.element("div", {
                className: "k-spreadsheet-drawing-handle " + i,
                "data-direction": i,
              })
            );
          });
        }
        var t, e, r, u, c, v, o, y, p, w, b, k, d, f, s, i;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((t = n.jQuery),
          (e = n.spreadsheet.CellRef),
          (r = "."),
          (u = 7),
          (c = 20),
          (v = "Error"),
          (o = {
            view: "k-spreadsheet-view",
            fixedContainer: "k-spreadsheet-fixed-container",
            editContainer: "k-spreadsheet-edit-container",
            scroller: "k-spreadsheet-scroller",
            viewSize: "k-spreadsheet-view-size",
            clipboard: "k-spreadsheet-clipboard",
            cellEditor: "k-spreadsheet-cell-editor",
            barEditor: "k-spreadsheet-editor",
            topCorner: "k-spreadsheet-top-corner",
            filterHeadersWrapper: "k-filter-wrapper",
            filterRange: "k-filter-range",
            filterButton: "k-spreadsheet-filter",
            filterButtonActive: "k-state-active",
            horizontalResize: "k-horizontal-resize",
            verticalResize: "k-vertical-resize",
            icon: "k-icon",
            iconFilterDefault: "k-i-arrow-60-down",
            sheetsBar: "k-spreadsheet-sheets-bar",
            sheetsBarActive: "k-spreadsheet-sheets-bar-active",
            sheetsBarInactive: "k-spreadsheet-sheets-bar-inactive",
            cellContextMenu: "k-spreadsheet-cell-context-menu",
            rowHeaderContextMenu: "k-spreadsheet-row-header-context-menu",
            colHeaderContextMenu: "k-spreadsheet-col-header-context-menu",
            drawingContextMenu: "k-spreadsheet-drawing-context-menu",
          }),
          (n.spreadsheet.messages.view = {
            nameBox: "Name Box",
            errors: {
              openUnsupported:
                "Unsupported format. Please select an .xlsx file.",
              shiftingNonblankCells:
                "Cannot insert cells due to data loss possibility. Select another insert location or delete the data from the end of your worksheet.",
              insertColumnWhenRowIsSelected:
                "Cannot insert column when all columns are selected.",
              insertRowWhenColumnIsSelected:
                "Cannot insert row when all rows are selected.",
              filterRangeContainingMerges:
                "Cannot create a filter within a range containing merges",
              sortRangeContainingMerges:
                "Cannot sort a range containing merges",
              cantSortMultipleSelection: "Cannot sort multiple selection",
              cantSortNullRef: "Cannot sort empty selection",
              cantSortMixedCells:
                "Cannot sort range containing cells of mixed shapes",
              validationError:
                "The value that you entered violates the validation rules set on the cell.",
              cannotModifyDisabled: "Cannot modify disabled cells.",
            },
            tabs: { home: "Home", insert: "Insert", data: "Data" },
          }),
          (n.spreadsheet.messages.menus = {
            cut: "Cut",
            copy: "Copy",
            paste: "Paste",
            merge: "Merge",
            unmerge: "Unmerge",
            delete: "Delete",
            hide: "Hide",
            unhide: "Unhide",
            bringToFront: "Bring to front",
            sendToBack: "Send to back",
          }),
          (y = n.Class.extend({
            init: function () {
              this.cols = [];
              this.trs = [];
              this._height = 0;
              this._width = 0;
            },
            addColumn: function (t) {
              this._width += t;
              var i = n.dom.element("col", { style: { width: t + "px" } });
              i.visible = t > 0;
              this.cols.push(i);
            },
            addRow: function (t) {
              var i,
                r = null;
              r = { style: { height: t + "px" } };
              this._height += t;
              i = n.dom.element("tr", r);
              i.visible = t > 0;
              this.trs.push(i);
            },
            addCell: function (t, i, r, u, f) {
              var o, e, s;
              return (
                (null !== i && void 0 !== i) || (i = ""),
                i instanceof n.dom.Node || (i = n.dom.text(i)),
                (o = [i]),
                (e = { style: r }),
                f &&
                  !f.value &&
                  (o.push(n.dom.element("span", { className: "k-dirty" })),
                  (u = (u || "") + (u ? " " : "") + "k-dirty-cell"),
                  (e.title = f.message)),
                u && (e.className = u),
                (s = n.dom.element("td", e, o)),
                this.trs[t].children.push(s),
                s
              );
            },
            toDomTree: function (t, i, r) {
              this.trs = this.trs.filter(function (n) {
                return n.visible;
              });
              var u = 0;
              return (
                (this.cols = this.cols.filter(function (n, t) {
                  return (
                    n.visible ||
                      (this.trs.forEach(function (n) {
                        n.children.splice(t - u, 1);
                      }),
                      u++),
                    n.visible
                  );
                }, this)),
                n.dom.element(
                  "table",
                  {
                    style: {
                      left: t + "px",
                      top: i + "px",
                      height: this._height + "px",
                      width: this._width + "px",
                    },
                    className: r,
                  },
                  [
                    n.dom.element("colgroup", null, this.cols),
                    n.dom.element("tbody", null, this.trs),
                  ]
                )
              );
            },
          })),
          (p =
            '<ul class="#=classNames.cellContextMenu#"><li data-action=cut>#: messages.cut #</li><li data-action=copy>#: messages.copy #</li><li data-action=paste>#: messages.paste #</li><li class="k-separator"></li><li data-action=merge>#: messages.merge #</li><li data-action=unmerge>#: messages.unmerge #</li></ul>'),
          (w =
            '<ul class="#=classNames.rowHeaderContextMenu#"><li data-action=cut>#: messages.cut #</li><li data-action=copy>#: messages.copy #</li><li data-action=paste>#: messages.paste #</li><li class="k-separator"></li><li data-action="delete-row">#: messages.delete #</li><li data-action="hide-row">#: messages.hide #</li><li data-action="unhide-row">#: messages.unhide #</li></ul>'),
          (b =
            '<ul class="#=classNames.colHeaderContextMenu#"><li data-action=cut>#: messages.cut #</li><li data-action=copy>#: messages.copy #</li><li data-action=paste>#: messages.paste #</li><li class="k-separator"></li><li data-action="delete-column">#: messages.delete #</li><li data-action="hide-column">#: messages.hide #</li><li data-action="unhide-column">#: messages.unhide #</li></ul>'),
          (k =
            '<ul class="#=classNames.drawingContextMenu#"><li data-action="bring-to-front">#: messages.bringToFront #</li><li data-action="send-to-back">#: messages.sendToBack #</li><li class="k-separator"></li><li data-action="delete-drawing">#: messages.delete #</li></ul>'),
          (n.spreadsheet.ContextMenu = n.ui.ContextMenu),
          (d = n.template(
            '<div class="#=classNames.view#"><div class="#=classNames.fixedContainer#"></div><div class="#=classNames.scroller#"><div class="#=classNames.viewSize#"></div></div><div tabindex="0" class="#=classNames.clipboard#" contenteditable=true></div><div class="#=classNames.cellEditor#"></div></div><div class="#=classNames.sheetsBar#"></div>' +
              p +
              w +
              b +
              k
          )),
          (f = n.Class.extend({
            init: function (i, u) {
              var o,
                e = f.classNames;
              this.element = i;
              this.options = t.extend(
                !0,
                { messages: n.spreadsheet.messages.view },
                this.options,
                u
              );
              this._chrome();
              this._dialogs = [];
              i.append(
                d({ classNames: e, messages: n.spreadsheet.messages.menus })
              );
              this._formulaInput();
              this.wrapper = i.find(r + e.view);
              this.container = i.find(r + e.fixedContainer)[0];
              this.scroller = i.find(r + e.scroller)[0];
              this.clipboard = i.find(r + e.clipboard);
              this.viewSize = t(this.scroller.firstChild);
              this.tree = new n.dom.Tree(this.container);
              this.clipboardContents = new n.dom.Tree(this.clipboard[0]);
              this.editor = new n.spreadsheet.SheetEditor(this);
              this._sheetsbar();
              o = { target: i, animation: !1, showOn: "never" };
              this.cellContextMenu = new n.spreadsheet.ContextMenu(
                i.find(r + e.cellContextMenu),
                o
              );
              this.colHeaderContextMenu = new n.spreadsheet.ContextMenu(
                i.find(r + e.colHeaderContextMenu),
                o
              );
              this.rowHeaderContextMenu = new n.spreadsheet.ContextMenu(
                i.find(r + e.rowHeaderContextMenu),
                o
              );
              this.drawingContextMenu = new n.spreadsheet.ContextMenu(
                i.find(r + e.drawingContextMenu),
                o
              );
            },
            enableClipboard: function (n) {
              this.isClipboardDeactivated = !n;
              n
                ? this.clipboard.attr("contenteditable", n)
                : this.clipboard.removeAttr("contenteditable");
            },
            _resize: function () {
              var r = t(this.formulaBar.element).parents(
                  ".k-spreadsheet-action-bar"
                ),
                i = n._outerHeight,
                u = this.tabstrip ? i(this.tabstrip.element) : 0,
                f = r ? i(r) : 0,
                e = this.sheetsbar ? i(this.sheetsbar.element) : 0;
              this.wrapper.height(this.element.height() - (u + f + e));
              this.tabstrip && this.tabstrip.quickAccessAdjust();
            },
            _chrome: function () {
              var i,
                r = t("<div class='k-spreadsheet-action-bar' />").prependTo(
                  this.element
                ),
                u = t("<div class='k-spreadsheet-name-editor' />").appendTo(r);
              this.nameEditor = new n.spreadsheet.NameEditor(u, this.options);
              i = t("<div />").appendTo(r);
              this.formulaBar = new n.spreadsheet.FormulaBar(i);
              this.options.toolbar && this._tabstrip();
            },
            _formulaInput: function () {
              var t = this.element.find(r + f.classNames.cellEditor);
              this.formulaInput = new n.spreadsheet.FormulaInput(t, {
                autoScale: !0,
              });
            },
            _sheetsbar: function () {
              if (this.options.sheetsbar) {
                var i = t.extend(
                  !0,
                  { openDialog: this.openDialog.bind(this) },
                  this.options.sheetsbar
                );
                this.sheetsbar = new n.spreadsheet.SheetsBar(
                  this.element.find(r + f.classNames.sheetsBar),
                  i
                );
              }
            },
            _tabstrip: function () {
              var i,
                f = this.options.messages.tabs,
                r = t.extend(
                  !0,
                  { home: !0, insert: !0, data: !0 },
                  this.options.toolbar
                ),
                u = [];
              this.tabstrip &&
                (this.tabstrip.destroy(),
                this.element.children(".k-tabstrip").remove());
              for (i in r)
                (r[i] === !0 || r[i] instanceof Array) &&
                  u.push({ id: i, text: f[i], content: "" });
              this.tabstrip = new n.spreadsheet.TabStrip(
                t("<div />").prependTo(this.element),
                {
                  animation: !1,
                  dataTextField: "text",
                  dataContentField: "content",
                  dataSource: u,
                  toolbarOptions: r,
                  view: this,
                }
              );
              this.tabstrip.select(0);
            },
            _executeCommand: function (n) {
              this._sheet.trigger("commandRequest", n);
            },
            workbook: function (n) {
              this._workbook = n;
              n._view = this;
              this.nameEditor._workbook = n;
            },
            sheet: function (n) {
              this._sheet = n;
            },
            activeCellRectangle: function () {
              return this.cellRectangle(this._sheet._viewActiveCell());
            },
            _rectangle: function (n, t) {
              return n._grid.boundingRectangle(t.toRangeRef());
            },
            isColumnResizer: function (n, t, i) {
              return (
                (n -= this._sheet._grid._headerWidth),
                t._grid.columns.frozen || (n += this.scroller.scrollLeft),
                (i = this._sheet._grid._columns.locate(0, i, function (t) {
                  return Math.abs(n - t) <= u / 2;
                })),
                null === i || this._sheet.isHiddenColumn(i) ? null : i
              );
            },
            isRowResizer: function (n, t, i) {
              return (
                (n -= this._sheet._grid._headerHeight),
                t._grid.rows.frozen || (n += this.scroller.scrollTop),
                (i = this._sheet._grid._rows.locate(0, i, function (t) {
                  return Math.abs(n - t) <= u / 2;
                })),
                null === i || this._sheet.isHiddenRow(i) ? null : i
              );
            },
            isFilterIcon: function (t, i, r, u) {
              var f = this,
                e = r._grid,
                o = e.rows.frozen ? 0 : f.scroller.scrollTop,
                s = e.columns.frozen ? 0 : f.scroller.scrollLeft;
              return (
                (t -= f._sheet._grid._headerWidth - s),
                (i -= f._sheet._grid._headerHeight - o),
                n.util.withExit(function (n) {
                  f._sheet.forEachFilterHeader(u, function (u) {
                    var e = f._rectangle(r, u);
                    r.filterIconRect(e).intersects(t, i) && n(!0);
                  });
                })
              );
            },
            isAutoFill: function (n, t, i) {
              var r,
                u = this._sheet.select();
              return (
                !(u.size > 1) &&
                ((n -= this._sheet._grid._headerWidth),
                (t -= this._sheet._grid._headerHeight),
                i._grid.columns.frozen || (n += this.scroller.scrollLeft),
                i._grid.rows.frozen || (t += this.scroller.scrollTop),
                (r = this._rectangle(i, u)),
                Math.abs(r.right - n) < 8 && Math.abs(r.bottom - t) < 8)
              );
            },
            isEditButton: function (n, t, i) {
              var r,
                u = this._sheet.activeCellCustomEditor();
              if (
                u &&
                ((r = this.activeCellRectangle()), t >= r.top && t <= r.bottom)
              )
                return i._editorInLastColumn
                  ? n < r.left && n >= r.left - c
                  : n > r.right && n <= r.right + c;
            },
            drawingAt: function (n, t, i) {
              var o, u, f, e, r;
              for (
                n -= this._sheet._grid._headerWidth,
                  t -= this._sheet._grid._headerHeight,
                  i._grid.columns.frozen || (n += this.scroller.scrollLeft),
                  i._grid.rows.frozen || (t += this.scroller.scrollTop),
                  o = this._sheet,
                  u = this._sheet._drawings,
                  f = u.length;
                --f >= 0;

              )
                if (
                  ((e = u[f]),
                  (r = o.drawingBoundingBox(e)),
                  r.intersects(n, t))
                )
                  return { drawing: e, drx: r.left - n, dry: r.top - t };
            },
            objectAt: function (n, t, i) {
              var f,
                r,
                c,
                s,
                h,
                u,
                o,
                a,
                l = this._sheet._grid;
              if (
                n < 0 ||
                t < 0 ||
                n > this.scroller.clientWidth ||
                t > this.scroller.clientHeight
              )
                f = { type: "outside" };
              else if (n < l._headerWidth && t < l._headerHeight)
                f = { type: "topcorner" };
              else if ((r = this.paneAt(n, t))) {
                if (!i && (c = this.drawingAt(n, t, r)))
                  return {
                    type: "drawing",
                    drawing: c.drawing,
                    drx: c.drx,
                    dry: c.dry,
                    pane: r,
                    startX: n,
                    startY: t,
                  };
                s = r._grid.rows.indexVisible(t, this.scroller.scrollTop);
                h = r._grid.columns.indexVisible(n, this.scroller.scrollLeft);
                u = "cell";
                o = new e(s, h);
                a = this._sheet.selectionInProgress();
                this.isAutoFill(n, t, r)
                  ? (u = "autofill")
                  : this.isFilterIcon(n, t, r, o)
                  ? (u = "filtericon")
                  : !a && n < l._headerWidth
                  ? ((u = "rowheader"),
                    null !== (s = this.isRowResizer(t, r, s)) &&
                      ((o = new e(s, -(1 / 0))), (u = "rowresizehandle")))
                  : !a && t < l._headerHeight
                  ? ((u = "columnheader"),
                    null !== (h = this.isColumnResizer(n, r, h)) &&
                      ((o = new e(-(1 / 0), h)), (u = "columnresizehandle")))
                  : this.isEditButton(n, t, r) && (u = "editor");
                "cell" == u &&
                  this._sheet.forEachMergedCell(o, function (n) {
                    o = n.topLeft;
                  });
                f = { type: u, ref: o };
              } else f = { type: "outside" };
              return (f.pane = r), (f.x = n), (f.y = t), f;
            },
            paneAt: function (n, t) {
              return this.panes.filter(function (i) {
                var r = i._grid;
                return a(t, r.top, r.bottom) && a(n, r.left, r.right);
              })[0];
            },
            containingPane: function (n) {
              return this.panes.filter(function (t) {
                return !!t._grid.contains(n);
              })[0];
            },
            cellRectangle: function (n) {
              var t = this.containingPane(n)._grid,
                i = this._sheet._grid.rectangle(n);
              return i.offset(
                t.headerWidth -
                  (t.columns.frozen ? 0 : this.scroller.scrollLeft),
                t.headerHeight - (t.rows.frozen ? 0 : this.scroller.scrollTop)
              );
            },
            refresh: function (n) {
              var t,
                i,
                r = this._sheet;
              this.tabstrip &&
                this.tabstrip.refreshTools(r.range(r.activeCell()));
              n.sheetSelection &&
                this.sheetsbar &&
                this.sheetsbar.renderSheets(
                  this._workbook.sheets(),
                  this._workbook.sheetIndex(this._sheet)
                );
              this._resize();
              this.viewSize[0].style.height = r._grid.totalHeight() + "px";
              this.viewSize[0].style.width = r._grid.totalWidth() + "px";
              n.layout &&
                ((t = r.frozenColumns()),
                (i = r.frozenRows()),
                (this.panes = [this._pane(i, t)]),
                t > 0 && this.panes.push(this._pane(i, 0, null, t)),
                i > 0 && this.panes.push(this._pane(0, t, i, null)),
                i > 0 && t > 0 && this.panes.push(this._pane(0, 0, i, t)));
              n.filter && this._destroyFilterMenu();
              n.activeCell && (this._focus = r.activeCell().toRangeRef());
            },
            createFilterMenu: function (i) {
              var r, f, e, o, s, u;
              return this._filterMenu && this._filterMenu.options.column == i
                ? this._filterMenu
                : (this._destroyFilterMenu(),
                  (r = this._sheet),
                  (f = r.filter().ref),
                  (e = new n.spreadsheet.Range(f, r)),
                  (o = t("<div />").appendTo(this.element)),
                  (s = { column: i, range: e }),
                  (u = new n.spreadsheet.FilterMenu(o, s)),
                  (this._filterMenu = u),
                  u);
            },
            selectClipboardContents: function () {
              this.isClipboardDeactivated ||
                (this.clipboard.focus(), g(this.clipboard[0]));
            },
            scrollIntoView: function (n) {
              var r = !1,
                u = this.containingPane(n)._grid,
                t = u.scrollBoundaries(n),
                i = this.scroller,
                f = u.rows.frozen ? 0 : i.scrollTop,
                e = u.columns.frozen ? 0 : i.scrollLeft;
              return (
                t.top < f && ((r = !0), (i.scrollTop = t.scrollTop)),
                t.bottom > f && ((r = !0), (i.scrollTop = t.scrollBottom)),
                t.left < e && ((r = !0), (i.scrollLeft = t.scrollLeft)),
                t.right > e && ((r = !0), (i.scrollLeft = t.scrollRight)),
                r
              );
            },
            _destroyDialog: function () {
              this._dialogs.pop();
            },
            openCustomEditor: function () {
              var n = this,
                t = n._sheet.activeCell().first(),
                r = n._sheet.activeCellCustomEditor(),
                i = n._sheet.range(t);
              r.edit({
                range: i,
                rect: n.activeCellRectangle(),
                view: this,
                validation: this._sheet.validation(t),
                callback: function (t, r) {
                  n._executeCommand({
                    command: "EditCommand",
                    options: {
                      operatingRange: i,
                      property: r ? "input" : "value",
                      value: t,
                    },
                  });
                },
              });
            },
            openDialog: function (t, i) {
              var r = this._sheet;
              return r.withCultureDecimals(
                function () {
                  var f,
                    e,
                    u = n.spreadsheet.dialogs.create(t, i);
                  if (u)
                    return (
                      u.bind("action", this._executeCommand.bind(this)),
                      u.bind("deactivate", this._destroyDialog.bind(this)),
                      this._dialogs.push(u),
                      (f = r.activeCell()),
                      (e = new n.spreadsheet.Range(f, r)),
                      u.open(e),
                      u
                    );
                }.bind(this)
              );
            },
            showError: function (i, r) {
              var f,
                e,
                u,
                o = this._dialogs,
                s = this.options.messages.errors,
                h = !1;
              o.length > 0 &&
                o.forEach(function (n) {
                  n.options && n.options.title === v && (h = !0);
                });
              h ||
                ((f = function (t) {
                  var i = t.sender.dialog().element;
                  i.find(".k-button:first").focus();
                  i.find(".k-button, input").on("keydown", function (i) {
                    i.keyCode == n.keys.ESC && t.sender.close();
                  });
                }),
                (e = function (n) {
                  var t = n.sender;
                  this.selectClipboardContents();
                  t._retry && r && r();
                }.bind(this)),
                n.spreadsheet.dialogs.registered(i.type)
                  ? ((u = { close: e }),
                    "validationError" === i.type &&
                      (u = t.extend(u, {
                        title: i.title || "Error",
                        text: i.body ? i.body : s[i.type],
                        activate: f,
                      })),
                    this.openDialog(i.type, u))
                  : this.openDialog("message", {
                      title: i.title || "Error",
                      text: i.body ? i.body : s[i.type],
                      activate: f,
                      close: e,
                    }));
            },
            destroy: function () {
              this._dialogs.forEach(function (n) {
                n.destroy();
              });
              this.cellContextMenu.destroy();
              this.rowHeaderContextMenu.destroy();
              this.colHeaderContextMenu.destroy();
              this.drawingContextMenu.destroy();
              this.cellContextMenu =
                this.rowHeaderContextMenu =
                this.colHeaderContextMenu =
                this.drawingContextMenu =
                  null;
              this.tabstrip &&
                (this.tabstrip.destroy(), (this.tabstrip = null));
              this._destroyFilterMenu();
            },
            _destroyFilterMenu: function () {
              this._filterMenu &&
                (this._filterMenu.destroy(),
                (this._filterMenu = void 0),
                (this._filterMenuColumn = void 0));
            },
            render: function (i) {
              var r, e, s, h, l, u, a, c;
              this.element.is(":visible") &&
                ((r = this._sheet),
                (e = r.focus()),
                (e && this.scrollIntoView(e)) ||
                  ((s = r.resizingInProgress()
                    ? r.resizeHandlePosition().col === -(1 / 0)
                      ? "column"
                      : "row"
                    : "none"),
                  this.wrapper
                    .toggleClass(o.editContainer, this.editor.isActive())
                    .toggleClass(o.horizontalResize, "row" == s)
                    .toggleClass(o.verticalResize, "column" == s),
                  (h = r._grid),
                  (l = this.scroller),
                  (u = this.panes.map(function (n) {
                    return n.render(l);
                  })),
                  (a = n.dom.element("div", {
                    style: {
                      width: h._headerWidth + "px",
                      height: h._headerHeight + "px",
                    },
                    className: f.classNames.topCorner,
                  })),
                  u.push(a),
                  r.resizeHandlePosition() &&
                    r.resizeHintPosition() &&
                    u.push(this.renderResizeHint()),
                  this.tree.render(u),
                  (c = n.support.scrollbar()),
                  t(this.container).css({
                    width: this.wrapper[0].clientWidth - c,
                    height: this.wrapper[0].clientHeight - c,
                  }),
                  this.editor.isActive()
                    ? this.editor.toggleTooltip(this.activeCellRectangle())
                    : i.resize ||
                      i.scroll ||
                      i.comment ||
                      r.selectionInProgress() ||
                      r.resizingInProgress() ||
                      r.draggingInProgress() ||
                      r.isInEditMode() ||
                      this.renderClipboardContents()));
            },
            renderResizeHint: function () {
              var f,
                t,
                r = this._sheet,
                o = r.resizeHandlePosition(),
                e = o.col !== -(1 / 0);
              return (
                (f = e
                  ? {
                      height: this.scroller.clientHeight + "px",
                      width: u + "px",
                      left: r.resizeHintPosition().x + "px",
                      top: "0px",
                    }
                  : {
                      height: u + "px",
                      width: this.scroller.clientWidth + "px",
                      top: r.resizeHintPosition().y + "px",
                      left: "0px",
                    }),
                (t = i.classNames),
                n.dom.element(
                  "div",
                  {
                    className:
                      t.resizeHint + (e ? "" : " " + t.resizeHintVertical),
                    style: f,
                  },
                  [
                    n.dom.element("div", { className: t.resizeHintHandle }),
                    n.dom.element("div", { className: t.resizeHintMarker }),
                  ]
                )
              );
            },
            renderClipboardContents: function () {
              var t,
                r,
                u,
                f,
                o,
                i = this._sheet,
                s = i._grid,
                n = s.normalize(i.select().toRangeRef()),
                h = this._workbook.clipboard().canCopy();
              return h.canCopy === !1 && h.multiSelection
                ? (this.clipboardContents.render([]),
                  void this.selectClipboardContents())
                : ((n = i.trim(n)),
                  (t = new y()),
                  (r = s.rangeDimensions(n)),
                  r.rows.forEach(function (n) {
                    t.addRow(n);
                  }),
                  r.columns.forEach(function (n) {
                    t.addColumn(n);
                  }),
                  (u = i._getMergedCells(n)),
                  (f = u.primary),
                  (o = u.secondary),
                  i.forEach(n, function (i, r, u) {
                    var h,
                      s,
                      c = new e(i, r).print();
                    o[c] ||
                      ((h = rt(t, i - n.topLeft.row, u)),
                      (s = f[c]),
                      s &&
                        ((h.attr.colspan = s.width()),
                        (h.attr.rowspan = s.height())));
                  }),
                  this.clipboardContents.render([
                    t.toDomTree(
                      0,
                      0,
                      "kendo-clipboard-" + this._workbook.clipboard()._uid
                    ),
                  ]),
                  void this.selectClipboardContents());
            },
            _pane: function (n, t, r, u) {
              var f = new i(
                this._sheet,
                this._sheet._grid.pane({
                  row: n,
                  column: t,
                  rowCount: r,
                  columnCount: u,
                })
              );
              return (
                f.refresh(
                  this.scroller.clientWidth,
                  this.scroller.clientHeight
                ),
                f
              );
            },
            forceScrollerStackingOrder: function (n) {
              t(this.scroller).css("z-index", n);
            },
          })),
          (s = {
            cell: "k-spreadsheet-cell",
            vaxis: "k-spreadsheet-vaxis",
            haxis: "k-spreadsheet-haxis",
            vborder: "k-spreadsheet-vborder",
            hborder: "k-spreadsheet-hborder",
            rowHeader: "k-spreadsheet-row-header",
            columnHeader: "k-spreadsheet-column-header",
            pane: "k-spreadsheet-pane",
            data: "k-spreadsheet-data",
            mergedCell: "k-spreadsheet-merged-cell",
            mergedCellsWrapper: "k-merged-cells-wrapper",
            activeCell: "k-spreadsheet-active-cell",
            selection: "k-spreadsheet-selection",
            selectionWrapper: "k-selection-wrapper",
            autoFillWrapper: "k-auto-fill-wrapper",
            single: "k-single",
            top: "k-top",
            right: "k-right",
            bottom: "k-bottom",
            left: "k-left",
            resizeHandle: "k-resize-handle",
            columnResizeHandle: "k-column-resize-handle",
            rowResizeHandle: "k-row-resize-handle",
            resizeHint: "k-resize-hint",
            resizeHintHandle: "k-resize-hint-handle",
            resizeHintMarker: "k-resize-hint-marker",
            resizeHintVertical: "k-resize-hint-vertical",
            selectionHighlight: "k-spreadsheet-selection-highlight",
            series: [
              "k-series-a",
              "k-series-b",
              "k-series-c",
              "k-series-d",
              "k-series-e",
              "k-series-f",
            ],
          }),
          (i = n.Class.extend({
            init: function (n, t) {
              this._sheet = n;
              this._grid = t;
            },
            refresh: function (n, t) {
              this._grid.refresh(n, t);
            },
            isVisible: function (n, t, i) {
              return this._grid.view(n, t).ref.intersects(i);
            },
            render: function (t) {
              var o,
                u,
                r,
                e,
                f,
                h,
                c,
                l,
                s,
                a = t.scrollLeft,
                v = t.scrollTop;
              return (
                v < 0 && (v = 0),
                a < 0 && (a = 0),
                (o = i.classNames),
                (u = this._sheet),
                (r = this._grid),
                (e = r.view(a, v)),
                (this._currentView = e),
                (this._currentRect = this._rectangle(e.ref)),
                (this._selectedHeaders = u.selectedHeaders()),
                (f = []),
                f.push(this.renderData()),
                u._activeDrawing || f.push(this.renderSelection(t)),
                f.push(this.renderAutoFill()),
                f.push(this.renderEditorSelection()),
                f.push(this.renderFilterHeaders()),
                r.hasRowHeader &&
                  ((h = n.dom.element("div", {
                    className: o.rowHeader,
                    style: {
                      width: r.headerWidth + "px",
                      top: e.rowOffset + "px",
                    },
                  })),
                  f.push(h),
                  u.forEach(
                    e.ref.leftColumn(),
                    function (t) {
                      if (!u.isHiddenRow(t)) {
                        var i = t + 1,
                          f = u.rowHeight(t);
                        h.children.push(
                          n.dom.element(
                            "div",
                            {
                              className: this.headerClassName(t, "row"),
                              style: {
                                width: r.headerWidth + "px",
                                height: f + "px",
                              },
                            },
                            [
                              n.dom.element(
                                "div",
                                { className: "k-vertical-align-center" },
                                [n.dom.text(i + "")]
                              ),
                            ]
                          )
                        );
                      }
                    }.bind(this)
                  )),
                r.hasColumnHeader &&
                  ((c = n.dom.element("div", {
                    className: o.columnHeader,
                    style: {
                      top: "0px",
                      left: e.columnOffset + "px",
                      width: this._currentRect.width + "px",
                      height: r.headerHeight + "px",
                    },
                  })),
                  f.push(c),
                  (l = 0),
                  u.forEach(
                    e.ref.topRow(),
                    function (t, i) {
                      if (!u.isHiddenColumn(i)) {
                        var e = n.spreadsheet.Ref.display(null, 1 / 0, i),
                          f = u.columnWidth(i);
                        c.children.push(
                          n.dom.element(
                            "div",
                            {
                              className: this.headerClassName(i, "col"),
                              style: {
                                position: "absolute",
                                left: l + "px",
                                width: f + "px",
                                height: r.headerHeight + "px",
                              },
                            },
                            [
                              n.dom.element(
                                "div",
                                { className: "k-vertical-align-center" },
                                [n.dom.text(e + "")]
                              ),
                            ]
                          )
                        );
                        l += f;
                      }
                    }.bind(this)
                  )),
                u.resizeHandlePosition() &&
                  (r.hasColumnHeader || r.hasRowHeader) &&
                  (u.resizeHintPosition() || this.renderResizeHandle(f)),
                (s = [o.pane]),
                r.hasColumnHeader && s.push(o.top),
                r.hasRowHeader && s.push(o.left),
                n.dom.element(
                  "div",
                  { style: r.style, className: s.join(" ") },
                  f
                )
              );
            },
            headerClassName: function (n, t) {
              var u,
                f,
                i,
                r = this._selectedHeaders;
              return (
                "row" === t
                  ? ((u = r.rows[n]), (f = r.allRows))
                  : ((u = r.cols[n]), (f = r.allCols)),
                (i = u || (r.all ? "full" : f ? "partial" : "none")),
                i && (i = "k-selection-" + i),
                i
              );
            },
            renderData: function () {
              var u,
                e,
                h,
                c,
                t = this._sheet,
                f = this._currentView,
                r = n.dom.element("div", {
                  className: i.classNames.data,
                  style: {
                    position: "relative",
                    left: f.columnOffset + "px",
                    top: f.rowOffset + "px",
                  },
                }),
                a = this._currentRect,
                o = n.spreadsheet.draw.doLayout(t, f.ref, { forScreen: !0 }),
                v = t._showGridLines;
              return (
                v &&
                  ((u = null),
                  o.xCoords.forEach(function (i) {
                    i !== u &&
                      ((u = i),
                      r.children.push(
                        n.dom.element("div", {
                          className: s.vaxis,
                          style: {
                            left: i + "px",
                            height: a.height + "px",
                            borderColor: t.gridLinesColor(),
                          },
                        })
                      ));
                  }),
                  (u = null),
                  o.yCoords.forEach(function (i) {
                    i !== u &&
                      ((u = i),
                      r.children.push(
                        n.dom.element("div", {
                          className: s.haxis,
                          style: {
                            top: i + "px",
                            width: a.width + "px",
                            borderColor: t.gridLinesColor(),
                          },
                        })
                      ));
                  })),
                (e = n.spreadsheet.draw.Borders()),
                (h = t.activeCell().toRangeRef()),
                (c = h.topLeft),
                o.cells.forEach(function (u) {
                  var s,
                    p,
                    w,
                    o = null,
                    a = u.row + f.ref.topLeft.row,
                    y = u.col + f.ref.topLeft.col;
                  t._activeDrawing
                    ? ((s = t._activeDrawing.topLeftCell),
                      s &&
                        s.row == a &&
                        s.col == y &&
                        (o = "k-spreadsheet-drawing-anchor-cell"))
                    : a == c.row &&
                      y == c.col &&
                      ((o = [i.classNames.activeCell].concat(
                        this._activeFormulaColor(),
                        this._directionClasses(h)
                      )),
                      t.singleCellSelection() && o.push(i.classNames.single),
                      (o = o.join(" ")));
                  e.add(u);
                  l(r.children, u, o, v);
                  u.comment &&
                    t._commentRef &&
                    a == t._commentRef.row &&
                    y == t._commentRef.col &&
                    ((p = 4),
                    (w = n.dom.element(
                      "div",
                      {
                        className: "k-tooltip k-spreadsheet-cell-comment",
                        style: { left: u.right + p + "px", top: u.top + "px" },
                      },
                      [n.dom.text(u.comment)]
                    )),
                    r.children.push(w));
                }, this),
                e.vert.forEach(function (t) {
                  t.forEach(function (t) {
                    if (!t.rendered) {
                      t.rendered = !0;
                      var i = {
                        left: t.x + "px",
                        top: t.top + "px",
                        height: t.bottom - t.top + 1 + "px",
                        borderWidth: t.size + "px",
                        borderColor: t.color,
                      };
                      1 != t.size &&
                        (i.transform =
                          "translateX(-" + (t.size - 1) / 2 + "px)");
                      r.children.push(
                        n.dom.element("div", { className: s.vborder, style: i })
                      );
                    }
                  });
                }),
                e.horiz.forEach(function (t) {
                  t.forEach(function (t) {
                    if (!t.rendered) {
                      t.rendered = !0;
                      var i = {
                        top: t.y + "px",
                        left: t.left + "px",
                        width: t.right - t.left + "px",
                        borderWidth: t.size + "px",
                        borderColor: t.color,
                      };
                      1 != t.size &&
                        (i.transform =
                          "translateY(-" + (t.size - 1) / 2 + "px)");
                      r.children.push(
                        n.dom.element("div", { className: s.hborder, style: i })
                      );
                    }
                  });
                }),
                this.renderDrawings(o, r.children),
                r
              );
            },
            renderDrawings: function (t, i) {
              var r = this._sheet,
                u = r._workbook;
              t.drawings.forEach(function (t) {
                var f = t.drawing,
                  o = t.box,
                  e = o.toDiv("k-spreadsheet-drawing");
                f.image &&
                  e.children.push(
                    n.dom.element("div", {
                      className: "k-spreadsheet-drawing-image",
                      style: {
                        backgroundImage: "url('" + u.imageUrl(f.image) + "')",
                        opacity: f.opacity,
                      },
                    })
                  );
                f === r._activeDrawing &&
                  ((e.attr.className += " k-spreadsheet-active-drawing"),
                  ut(e.children));
                i.push(e);
              });
            },
            renderResizeHandle: function (t) {
              var r,
                h = this._sheet,
                e = h.resizeHandlePosition(),
                s = this._rectangle(e),
                f = [i.classNames.resizeHandle];
              if (e.col !== -(1 / 0)) {
                if (this._grid.rows._start > 0) return;
                r = {
                  height: this._grid.headerHeight + "px",
                  width: u + "px",
                  left: s.right - u / 2 + "px",
                  top: "0px",
                };
                f.push(o.horizontalResize);
              } else {
                if (this._grid.columns._start > 0) return;
                r = {
                  height: u + "px",
                  width: this._grid.headerWidth + "px",
                  top: s.bottom - u / 2 + "px",
                  left: "0px",
                };
                f.push(o.verticalResize);
              }
              t.push(
                n.dom.element("div", { className: f.join(" "), style: r })
              );
            },
            filterIconRect: function (t) {
              var i = 16,
                r = 3;
              return new n.spreadsheet.Rectangle(
                t.right - i - r,
                t.top + r,
                i,
                i
              );
            },
            renderFilterHeaders: function () {
              function e(i) {
                return n.dom.element("span", { className: t.icon + " " + i });
              }
              function o(t, r, u) {
                var o,
                  s = { left: r.left + "px", top: r.top + "px" },
                  h =
                    i &&
                    i.columns.some(function (n) {
                      return n.index === u;
                    }),
                  f = t.filterButton;
                return (
                  h && (f += " " + t.filterButtonActive),
                  (o = n.dom.element("span", { className: f, style: s }, [
                    e(t.iconFilterDefault),
                  ]))
                );
              }
              var u = this._sheet,
                r = [],
                t = f.classNames,
                i = u.filter();
              return (
                i && this._addDiv(r, i.ref, t.filterRange),
                u.forEachFilterHeader(
                  this._currentView.ref,
                  function (n) {
                    var i = this._rectangle(n),
                      u = this.filterIconRect(i),
                      f = this._sheet.filterColumn(n),
                      e = o(t, u, f);
                    r.push(e);
                  }.bind(this)
                ),
                n.dom.element("div", { className: t.filterHeadersWrapper }, r)
              );
            },
            renderEditorSelection: function () {
              var t = i.classNames,
                u = this._sheet,
                r = [];
              return (
                u._formulaSelections.forEach(
                  function (i) {
                    var u = i.ref;
                    u !== n.spreadsheet.NULLREF &&
                      this._addDiv(
                        r,
                        u,
                        t.selectionHighlight + " " + i.colorClass
                      );
                  }.bind(this)
                ),
                n.dom.element("div", { className: t.selectionWrapper }, r)
              );
            },
            renderSelection: function (t) {
              var f = i.classNames,
                u = [],
                r = [f.selection],
                e = this._sheet,
                s = e.activeCell().toRangeRef(),
                o = e.select();
              return (
                (r = r.concat(this._activeFormulaColor())),
                1 === o.size() && r.push("k-single-selection"),
                this._sheet.autoFillPunch() && r.push("k-dim-auto-fill-handle"),
                o.forEach(
                  function (t) {
                    t !== n.spreadsheet.NULLREF &&
                      this._addDiv(u, t, r.join(" "));
                  }.bind(this)
                ),
                this._renderCustomEditorButton(u, s, t),
                n.dom.element("div", { className: f.selectionWrapper }, u)
              );
            },
            renderAutoFill: function () {
              var t,
                o,
                s,
                r,
                u,
                h,
                c,
                f = [];
              if (this._sheet.autoFillInProgress())
                if (
                  ((t = this._sheet.autoFillRef()),
                  (o = this._sheet.autoFillPunch()),
                  (s = this._sheet._autoFillDirection),
                  this._addDiv(f, t, "k-auto-fill"),
                  o)
                )
                  this._addDiv(f, o, "k-auto-fill-punch");
                else if (void 0 !== s) {
                  switch (s) {
                    case 0:
                      r = t.bottomRight;
                      u = "k-auto-fill-br-hint";
                      break;
                    case 1:
                      r = t.bottomRight;
                      u = "k-auto-fill-br-hint";
                      break;
                    case 2:
                      r = new e(t.topLeft.row, t.bottomRight.col);
                      u = "k-auto-fill-tr-hint";
                      break;
                    case 3:
                      r = new e(t.bottomRight.row, t.topLeft.col);
                      u = "k-auto-fill-bl-hint";
                  }
                  h = this._addDiv(f, r, u);
                  h &&
                    ((c = n.dom.element("span", { className: "k-tooltip" }, [
                      n.dom.text(this._sheet._autoFillHint),
                    ])),
                    h.children.push(c));
                }
              return n.dom.element(
                "div",
                { className: i.classNames.autoFillWrapper },
                f
              );
            },
            _addDiv: function (n, t, i) {
              var r,
                u = this._currentView;
              return (
                u.ref.intersects(t) &&
                  ((r = this._rectangle(t).resize(1, 1).toDiv(i)), n.push(r)),
                r
              );
            },
            _renderCustomEditorButton: function (t, i, r) {
              var f,
                u = this,
                o = u._sheet,
                s = u._currentView,
                h = u._grid.columns._axis._count,
                e = o.activeCellCustomEditor();
              e &&
                s.ref.intersects(i) &&
                ((f = u._rectangle(i)),
                o.forEach(i.collapse(), function (i, o, s) {
                  var l, c, a;
                  s.left = f.left;
                  s.top = f.top;
                  s.width = f.width;
                  s.height = f.height;
                  l = "k-button k-spreadsheet-editor-button";
                  c = o == h - 1 || u._buttonOutOfVisiblePane(i, o, r);
                  c && (l += " k-spreadsheet-last-column");
                  u._editorInLastColumn = c;
                  a = n.dom.element("div", {
                    className: l,
                    style: {
                      left: s.left + (c ? 0 : s.width) + "px",
                      top: s.top + "px",
                      height: s.height + "px",
                    },
                  });
                  e.icon &&
                    a.children.push(
                      n.dom.element("span", { className: "k-icon " + e.icon })
                    );
                  t.push(a);
                }));
            },
            _activeFormulaColor: function () {
              var n,
                t = [];
              return (
                this._sheet.isInEditMode() &&
                  ((n = this._sheet._formulaSelections.filter(function (n) {
                    return n.active && "ref" == n.type;
                  })[0]),
                  n && t.push(n.colorClass)),
                t
              );
            },
            _directionClasses: function (n) {
              var t = [],
                r = i.classNames,
                u = this._currentView.ref;
              return (
                n.move(0, -1).intersects(u) || t.push(r.left),
                n.move(-1, 0).intersects(u) || t.push(r.top),
                n.move(0, 1).intersects(u) || t.push(r.right),
                n.move(1, 0).intersects(u) || t.push(r.bottom),
                t
              );
            },
            _rectangle: function (n) {
              return this._grid
                .boundingRectangle(n.toRangeRef())
                .offset(
                  -this._currentView.mergedCellLeft,
                  -this._currentView.mergedCellTop
                );
            },
            _buttonOutOfVisiblePane: function (n, t, i) {
              var r = this,
                u = r._grid,
                f = r._sheet,
                e = f.range(n, t)._ref,
                o = u.scrollBoundaries(e),
                s = u.columns.frozen ? 0 : i.scrollLeft;
              if (o.right + c > s || t + 1 === f.frozenColumns()) return !0;
            },
          })),
          (n.spreadsheet.View = f),
          (n.spreadsheet.Pane = i),
          (n.spreadsheet.drawCell = l),
          t.extend(!0, f, { classNames: o }),
          t.extend(!0, i, { classNames: s }));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/customeditors.min",
      [
        "kendo.core.min",
        "kendo.popup.min",
        "kendo.calendar.min",
        "kendo.listview.min",
        "spreadsheet/sheet.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        "use strict";
        var t, i, r;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((t = n.jQuery),
          (i = {}),
          (r = n.spreadsheet.registerEditor =
            function (n, t) {
              i[n] = t;
            }),
          (n.spreadsheet.Sheet.prototype.activeCellCustomEditor = function () {
            var r,
              n,
              t,
              u = this.activeCell().first();
            if (this.range(u).enable())
              return (
                (r = this.validation(u)),
                (n = this._properties.get(
                  "editor",
                  this._grid.cellRefIndex(u)
                )),
                null != n
                  ? (t = i[n])
                  : r &&
                    r.showButton &&
                    ((n = "_validation_" + r.dataType), (t = i[n])),
                "function" == typeof t && (t = i[n] = t()),
                t
              );
          }),
          r("_validation_date", function () {
            function f() {
              i ||
                ((i = t("<div>").kendoCalendar()),
                (u = t("<div>").kendoPopup()),
                i.appendTo(u),
                (i = i.getKendoCalendar()),
                (u = u.getKendoPopup()),
                i.bind("change", function () {
                  u.close();
                  var t = i.value();
                  r.range.format() || r.range.format("yyyy-mm-dd");
                  r.callback(n.spreadsheet.dateToNumber(t));
                }));
              u.setOptions({
                anchor: r.view.element.find(".k-spreadsheet-editor-button"),
              });
            }
            function e() {
              var o, t, s, e;
              f();
              o = r.range.value();
              i.value(null != o ? n.spreadsheet.numberToDate(o) : null);
              t = r.validation;
              t
                ? ((s = n.ui.Calendar.fn.options.min),
                  (e = n.ui.Calendar.fn.options.max),
                  /^(?:greaterThan|between)/.test(t.comparerType) &&
                    (s = n.spreadsheet.numberToDate(t.from.value)),
                  "between" == t.comparerType &&
                    (e = n.spreadsheet.numberToDate(t.to.value)),
                  "lessThan" == t.comparerType &&
                    (e = n.spreadsheet.numberToDate(t.from.value)),
                  i.setOptions({
                    disableDates: function (i) {
                      var r = t.from ? 0 | t.from.value : 0,
                        u = t.to ? 0 | t.to.value : 0;
                      return (
                        (i = 0 | n.spreadsheet.dateToNumber(i)),
                        !n.spreadsheet.validation.validationComparers[
                          t.comparerType
                        ](i, r, u)
                      );
                    },
                    min: s,
                    max: e,
                  }))
                : i.setOptions({ disableDates: null, min: null, max: null });
              u.open();
            }
            var r, i, u;
            return {
              edit: function (n) {
                r = n;
                e();
              },
              icon: "k-i-calendar",
            };
          }),
          r("_validation_list", function () {
            function f() {
              i ||
                ((i = t("<ul class='k-list k-reset'/>").kendoStaticList({
                  template: "#:value#",
                  selectable: !0,
                  autoBind: !1,
                })),
                (r = t("<div>").kendoPopup()),
                i.appendTo(r),
                (r = r.getKendoPopup()),
                (i = i.getKendoStaticList()),
                i.bind("change", function () {
                  r.close();
                  var n = i.value()[0];
                  n && u.callback(n.value);
                }));
              r.setOptions({
                anchor: u.view.element.find(".k-spreadsheet-editor-button"),
              });
            }
            function e() {
              var t, e, o, s;
              f();
              t = u.validation.from.value;
              e = [];
              o = function (n) {
                e.push({ value: n });
              };
              t instanceof n.spreadsheet.calc.runtime.Matrix
                ? t.each(o)
                : (t + "").split(/\s*,\s*/).forEach(o);
              s = new n.data.DataSource({ data: e });
              i.setDataSource(s);
              s.read();
              r.open();
            }
            var u, i, r;
            return {
              edit: function (n) {
                u = n;
                e();
              },
              icon: "k-i-arrow-60-down",
            };
          }));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/grid.min",
      ["kendo.core.min", "spreadsheet/references.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var t, i, f, r, e, u;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((t = n.spreadsheet.CellRef),
          (i = n.spreadsheet.RangeRef),
          (f = n.spreadsheet.UnionRef),
          (r = n.Class.extend({
            init: function (n, t, i, r) {
              this.left = n;
              this.top = t;
              this.width = i;
              this.height = r;
              this.right = this.left + this.width;
              this.bottom = this.top + this.height;
            },
            offset: function (n, t) {
              return new r(
                this.left + n,
                this.top + t,
                this.width,
                this.height
              );
            },
            resize: function (n, t) {
              return new r(
                this.left,
                this.top,
                this.width + n,
                this.height + t
              );
            },
            intersects: function (n, t) {
              return n instanceof r
                ? this.intersectsRect(n)
                : this.left < n &&
                    n < this.left + this.width &&
                    this.top < t &&
                    t < this.top + this.height;
            },
            intersectsRect: function (n) {
              var t = this;
              return (
                t.left <= n.right &&
                n.left <= t.right &&
                t.top <= n.bottom &&
                n.top <= t.bottom
              );
            },
            toDiv: function (t) {
              return n.dom.element("div", {
                className: t,
                style: {
                  width: this.width + "px",
                  height: this.height + "px",
                  top: this.top + "px",
                  left: this.left + "px",
                },
              });
            },
          })),
          (e = n.Class.extend({
            init: function (n, t, i, r, u, f) {
              this.rowCount = i;
              this.columnCount = r;
              this._columns = t;
              this._rows = n;
              this._headerHeight = u;
              this._headerWidth = f;
            },
            isAxis: function (n) {
              var t, i;
              return (
                (n = n.toRangeRef()),
                (t = n.topLeft),
                (i = n.bottomRight),
                (0 === t.row && i.row === this.rowCount - 1) ||
                  (0 === t.col && i.col === this.columnCount - 1)
              );
            },
            width: function (n, t) {
              return this._columns.sum(n, t);
            },
            height: function (n, t) {
              return this._rows.sum(n, t);
            },
            totalHeight: function () {
              return this._rows.total + this._headerHeight;
            },
            totalWidth: function () {
              return this._columns.total + this._headerWidth;
            },
            index: function (n, t) {
              return t * this.rowCount + n;
            },
            cellRef: function (n) {
              return new t(n % this.rowCount, (n / this.rowCount) >> 0);
            },
            rowRef: function (n) {
              return new i(new t(n, 0), new t(n, this.columnCount - 1));
            },
            colRef: function (n) {
              return new i(new t(0, n), new t(this.rowCount - 1, n));
            },
            cellRefIndex: function (n) {
              return this.index(n.row, n.col);
            },
            normalize: function (n) {
              return n instanceof i
                ? new i(
                    this.normalize(n.topLeft),
                    this.normalize(n.bottomRight)
                  ).setSheet(n.sheet, n.hasSheet())
                : n instanceof f
                ? n.map(function (n) {
                    return this.normalize(n);
                  }, this)
                : (n instanceof t &&
                    ((n = n.clone()),
                    (n.col = Math.max(
                      0,
                      Math.min(this.columnCount - 1, n.col)
                    )),
                    (n.row = Math.max(0, Math.min(this.rowCount - 1, n.row)))),
                  n);
            },
            rectangle: function (n) {
              var t = this.normalize(n.topLeft),
                i = this.normalize(n.bottomRight);
              return new r(
                this.width(0, t.col - 1),
                this.height(0, t.row - 1),
                this.width(t.col, i.col),
                this.height(t.row, i.row)
              );
            },
            pane: function (t) {
              return new u(
                new n.spreadsheet.PaneAxis(
                  this._rows,
                  t.row,
                  t.rowCount,
                  this._headerHeight
                ),
                new n.spreadsheet.PaneAxis(
                  this._columns,
                  t.column,
                  t.columnCount,
                  this._headerWidth
                ),
                this
              );
            },
            rangeDimensions: function (n) {
              return {
                rows: this._rows.values.iterator(
                  n.topLeft.row,
                  n.bottomRight.row
                ),
                columns: this._columns.values.iterator(
                  n.topLeft.col,
                  n.bottomRight.col
                ),
              };
            },
            forEach: function (n, i) {
              for (
                var u,
                  f = this.normalize(n.topLeft),
                  e = this.normalize(n.bottomRight),
                  r = f.col;
                r <= e.col;
                r++
              )
                for (u = f.row; u <= e.row; u++) i(new t(u, r));
            },
            trim: function (n, r) {
              for (
                var s,
                  h,
                  f,
                  c,
                  e = this.normalize(n.topLeft),
                  l = this.normalize(n.bottomRight),
                  o = e.row,
                  a = e.col,
                  u = e.col;
                u <= l.col;
                u++
              )
                (s = this.index(e.row, u)),
                  (h = this.index(l.row, u)),
                  (f = r.tree.intersecting(s, h)),
                  f.length &&
                    ((c = this.cellRef(f[f.length - 1].end)),
                    (o = Math.max(o, c.row)),
                    (a = u));
              return new i(n.topLeft, new t(Math.min(o, n.bottomRight.row), a));
            },
          })),
          (u = n.Class.extend({
            init: function (n, t, i) {
              this.rows = n;
              this.columns = t;
              this._grid = i;
              this.headerHeight = n.headerSize;
              this.headerWidth = t.headerSize;
              this.hasRowHeader = t.hasHeader;
              this.hasColumnHeader = n.hasHeader;
            },
            refresh: function (n, t) {
              var i, r;
              this.columns.viewSize(n);
              this.rows.viewSize(t);
              i = this.columns.paneSegment();
              r = this.rows.paneSegment();
              this.left = i.offset;
              this.top = r.offset;
              this.right = i.offset + i.length;
              this.bottom = r.offset + r.length;
              this.style = {
                top: r.offset + "px",
                left: i.offset + "px",
                height: r.length + "px",
                width: i.length + "px",
              };
            },
            view: function (n, r) {
              var u = this.rows.visible(r),
                f = this.columns.visible(n);
              return {
                rows: u,
                columns: f,
                rowOffset: u.offset,
                columnOffset: f.offset,
                mergedCellLeft: f.start,
                mergedCellTop: u.start,
                ref: new i(
                  new t(u.values.start, f.values.start),
                  new t(u.values.end, f.values.end)
                ),
              };
            },
            contains: function (n) {
              return (
                this.rows.contains(n.topLeft.row, n.bottomRight.row) &&
                this.columns.contains(n.topLeft.col, n.bottomRight.col)
              );
            },
            index: function (n, t) {
              return this._grid.index(n, t);
            },
            boundingRectangle: function (n) {
              return this._grid.rectangle(n);
            },
            cellRefIndex: function (n) {
              return this._grid.cellRefIndex(n);
            },
            scrollBoundaries: function (n) {
              var i = this.boundingRectangle(n),
                t = {
                  top: Math.max(
                    0,
                    i.top -
                      this.top +
                      (this.hasColumnHeader ? 0 : this.headerHeight)
                  ),
                  left: Math.max(
                    0,
                    i.left -
                      this.left +
                      (this.hasRowHeader ? 0 : this.headerWidth)
                  ),
                  right: i.right - this.columns._viewSize + this.headerWidth,
                  bottom: i.bottom - this.rows._viewSize + this.headerHeight,
                },
                r = this.columns.defaultValue / 2,
                u = this.rows.defaultValue / 2;
              return (
                (t.scrollTop = t.top - u),
                (t.scrollBottom = t.bottom + u),
                (t.scrollLeft = t.left - r),
                (t.scrollRight = t.right + r),
                t
              );
            },
          })),
          (n.spreadsheet.Grid = e),
          (n.spreadsheet.PaneGrid = u),
          (n.spreadsheet.Rectangle = r));
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/axis.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        var t, i;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((t = n.Class.extend({
            init: function (t, i) {
              this._value = i;
              this._count = t;
              this.values = new n.spreadsheet.RangeList(0, t - 1, i);
              this._hidden = new n.spreadsheet.RangeList(0, t - 1, 0);
              this.scrollBarSize = n.support.scrollbar();
              this._refresh();
            },
            adjust: function (n, t) {
              t < 0
                ? (this.values.copy(n - t, this._count - 1, n),
                  this._hidden.copy(n - t, this._count - 1, n))
                : (this.values.copy(n, this._count, n + t),
                  this._hidden.copy(n, this._count, n + t),
                  this.values.value(n, n + t - 1, this._value),
                  this._hidden.value(n, n + t - 1, 0));
              this._refresh();
            },
            toJSON: function (n, t) {
              for (
                var e,
                  r,
                  u,
                  f,
                  o = [],
                  s = this.values.iterator(0, this._count - 1),
                  i = 0;
                i < this._count;
                i++
              )
                (e = s.at(i)),
                  (r = this._hidden.value(i, i)),
                  (e !== this._value || r) &&
                    ((u = t[i]),
                    void 0 === u &&
                      ((u = o.length),
                      (f = { index: i }),
                      (f[n] = e),
                      r && (f.hidden = r),
                      o.push(f),
                      (t[i] = u)));
              return o;
            },
            fromJSON: function (n, t) {
              for (var u, i, f, r = 0; r < t.length; r++)
                (u = t[r]),
                  (i = u.index),
                  void 0 === i && (i = r),
                  (f = u[n]),
                  0 === f
                    ? (this._hidden.value(i, i, u.hidden || this._value),
                      this.value(i, i, 0))
                    : this.value(i, i, f);
            },
            hide: function (n) {
              if (!this.hidden(n)) {
                var t = this.value(n, n);
                this._hidden.value(n, n, t);
                this.value(n, n, 0);
              }
            },
            hidden: function (n) {
              return 0 !== this._hidden.value(n, n);
            },
            includesHidden: function (n, t) {
              return this._hidden.intersecting(n, t).length > 1;
            },
            nextVisible: function (n) {
              for (var i = this._count - 1, t = n; ++t <= i; )
                if (!this.hidden(t)) return t;
              return n;
            },
            nextPage: function (n, t) {
              return this.index(this.sum(0, n - 1) + t);
            },
            prevPage: function (n, t) {
              return this.index(this.sum(0, n) - t);
            },
            firstVisible: function () {
              var n = this._hidden.first();
              return 0 === n.value ? 0 : n.end + 1;
            },
            lastVisible: function () {
              var n = this._hidden.last();
              return 0 === n.value ? this._count - 1 : n.start - 1;
            },
            prevVisible: function (n) {
              for (var t = n; --t >= 0; ) if (!this.hidden(t)) return t;
              return n;
            },
            unhide: function (n) {
              if (this.hidden(n)) {
                var t = this._hidden.value(n, n);
                this._hidden.value(n, n, 0);
                this.value(n, n, t);
              }
            },
            value: function (n, t, i) {
              return void 0 === i
                ? this.values.iterator(n, t).at(0)
                : (this.values.value(n, t, i), void this._refresh());
            },
            sum: function (n, t) {
              for (
                var u = this.values.iterator(n, t), r = 0, i = n;
                i <= t;
                i++
              )
                r += u.at(i);
              return r;
            },
            locate: function (n, t, i) {
              for (
                var f, e = this.values.iterator(n, t), u = 0, r = n;
                r <= t;
                r++
              )
                if (((u += e.at(r)), (f = i(u)))) return r;
              return null;
            },
            visible: function (n, t) {
              var e,
                o,
                s,
                u,
                h,
                f,
                r = null,
                i = null,
                c = !1;
              return (
                t >= this.total + this.scrollBarSize && (c = !0),
                (e = this._pixelValues.intersecting(n, t)),
                (r = e[0]),
                (i = e[e.length - 1]),
                r
                  ? ((o = n - r.start),
                    (s = ((o / r.value.value) >> 0) + r.value.start),
                    (u = o - (s - r.value.start) * r.value.value),
                    (h = t - i.start),
                    (f = ((h / i.value.value) >> 0) + i.value.start),
                    f > i.value.end && (f = i.value.end),
                    c &&
                      (u +=
                        i.value.value -
                        (h - (f - i.value.start) * i.value.value)),
                    (u = Math.min(-u, 0)),
                    { values: this.values.iterator(s, f), offset: u })
                  : { values: this.values.iterator(0, 0), offset: 0 }
              );
            },
            index: function (n) {
              for (
                var t = 0,
                  i = this.values.iterator(0, this._count - 1),
                  r = i.at(0);
                r < n && t < this._count - 1;

              )
                r += i.at(++t);
              return t;
            },
            indexVisible: function (n) {
              var t = this.index(n);
              return this.hidden(t) && (t = this.prevVisible(t)), t;
            },
            _refresh: function () {
              var t = 0;
              this._pixelValues = this.values.map(function (i) {
                var r,
                  u = t;
                return (
                  (t += (i.end - i.start + 1) * i.value),
                  (r = t - 1),
                  new n.spreadsheet.ValueRange(u, r, i)
                );
              });
              this.total = t;
            },
            getState: function () {
              return {
                values: this.values.getState(),
                hidden: this._hidden.getState(),
              };
            },
            setState: function (n) {
              this.values.setState(n.values);
              this._hidden.setState(n.hidden);
              this._refresh();
            },
          })),
          (i = n.Class.extend({
            init: function (n, t, i, r) {
              this._axis = n;
              this._start = t;
              this._count = i;
              this.hasHeader = 0 === t;
              this.headerSize = r;
              this.defaultValue = n._value;
              this.frozen = i > 0;
            },
            viewSize: function (n) {
              this._viewSize = n;
            },
            sum: function (n, t) {
              return this._axis.sum(n, t - 1);
            },
            start: function () {
              return this.sum(0, this._start);
            },
            size: function () {
              return this.sum(this._start, this._start + this._count);
            },
            index: function (n, t) {
              return this._axis.index(
                n + (this.frozen ? 0 : t) - this.headerSize
              );
            },
            indexVisible: function (n, t) {
              return this._axis.indexVisible(
                n + (this.frozen ? 0 : t) - this.headerSize
              );
            },
            paneSegment: function () {
              var n,
                t = this.start();
              return (
                this.hasHeader || (t += this.headerSize),
                this.frozen
                  ? ((n = this.size()),
                    this.hasHeader
                      ? (n += this.headerSize)
                      : (n -= this.headerSize))
                  : (n = this._viewSize - t),
                { offset: t, length: n }
              );
            },
            visible: function (n) {
              var r,
                t,
                i = this.start();
              return (
                this.frozen
                  ? ((r = this.size()),
                    this.hasHeader || (r -= this.headerSize))
                  : ((r = this._viewSize - i - this.headerSize), (i += n)),
                (t = this._axis.visible(i, i + r - 1)),
                this.frozen && (t.offset = 0),
                (t.start = i),
                this.hasHeader &&
                  ((t.offset += this.headerSize), (t.start -= this.headerSize)),
                t
              );
            },
            contains: function (n, t) {
              return this.frozen
                ? !(n > this._start + this._count) && !(t < this._start)
                : t >= this._start;
            },
          })),
          (n.spreadsheet.Axis = t),
          (n.spreadsheet.PaneAxis = i));
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/filter.min", ["kendo.core.min", "kendo.data.min"], n);
  })(
    function () {
      !(function (n) {
        function t(n) {
          var t = n.getMonth() + 1;
          return t >= 1 && t <= 3
            ? 1
            : t >= 4 && t <= 6
            ? 2
            : t >= 7 && t <= 9
            ? 3
            : 4;
        }
        function r(t, i) {
          if (t instanceof Date) {
            var r = n.date.today();
            return (
              r.setFullYear(r.getFullYear() + i),
              r.getFullYear() === t.getFullYear()
            );
          }
          return !1;
        }
        function u(t, i) {
          if (t instanceof Date) {
            var r = n.date.firstDayOfMonth(n.date.today());
            return (
              r.setMonth(r.getMonth() + i, 1),
              r.getTime() === n.date.firstDayOfMonth(t).getTime()
            );
          }
          return !1;
        }
        function f(t, i) {
          var r, u;
          return (
            i instanceof Date &&
            ((r = n.date.dayOfWeek(n.date.getDate(t), 1)),
            (u = n.date.dayOfWeek(n.date.getDate(i), 1)),
            r.getTime() === u.getTime())
          );
        }
        if (!(n.support.browser.msie && n.support.browser.version < 9)) {
          var i = (n.spreadsheet.Filter = n.Class.extend({
            prepare: function () {},
            value: function (n) {
              return n.value;
            },
            matches: function () {
              throw Error("The 'matches' method is not implemented.");
            },
            toJSON: function () {
              throw Error("The 'toJSON' method is not implemented.");
            },
          }));
          i.create = function (t) {
            var i,
              r = t.filter;
            if (!r) throw Error("Filter type not specified.");
            if (
              ((i =
                n.spreadsheet[
                  r.charAt(0).toUpperCase() + r.substring(1) + "Filter"
                ]),
              !i)
            )
              throw Error("Filter type not recognized.");
            return new i(t);
          };
          n.spreadsheet.ValueFilter = i.extend({
            _values: [],
            _dates: [],
            _blanks: !1,
            init: function (n) {
              void 0 !== n.values && (this._values = n.values);
              void 0 !== n.blanks && (this._blanks = n.blanks);
              void 0 !== n.dates && (this._dates = n.dates);
            },
            value: function (t) {
              var r,
                i = t.value;
              return (
                this._dates.length > 0 &&
                  t.format &&
                  "number" == typeof i &&
                  ((r = n.spreadsheet.formatting.type(i, t.format)),
                  "date" === r && (i = n.spreadsheet.numberToDate(i))),
                i
              );
            },
            matches: function (n) {
              return null === n || void 0 === n
                ? this._blanks
                : n instanceof Date
                ? this._dates.some(function (t) {
                    return !(
                      t.year !== n.getFullYear() ||
                      (void 0 !== t.month && t.month !== n.getMonth()) ||
                      (void 0 !== t.day && t.day !== n.getDate()) ||
                      (void 0 !== t.hours && t.hours !== n.getHours()) ||
                      (void 0 !== t.minutes && t.minutes !== n.getMinutes()) ||
                      (void 0 !== t.seconds && t.seconds !== n.getSeconds())
                    );
                  })
                : this._values.indexOf(n) >= 0;
            },
            toJSON: function () {
              return {
                filter: "value",
                blanks: this._blanks,
                values: this._values.slice(0),
              };
            },
          });
          n.spreadsheet.CustomFilter = i.extend({
            _logic: "and",
            init: function (t) {
              if (
                (void 0 !== t.logic && (this._logic = t.logic),
                void 0 === t.criteria)
              )
                throw Error("Must specify criteria.");
              this._criteria = t.criteria;
              var i = n.data.Query.filterExpr({
                logic: this._logic,
                filters: this._criteria,
              }).expression;
              this._matches = Function("d", "return " + i);
            },
            matches: function (n) {
              return null !== n && this._matches(n);
            },
            value: function (t) {
              var i = t.value,
                u = this._criteria[0].value,
                f = u instanceof Date ? "date" : typeof u,
                r = typeof i;
              return (
                t.format && (r = n.spreadsheet.formatting.type(i, t.format)),
                r != f
                  ? "string" == f &&
                    (t.format &&
                      (i = n.spreadsheet.formatting.text(i, t.format)),
                    (i += ""))
                  : "date" == r && (i = n.spreadsheet.numberToDate(i)),
                i
              );
            },
            toJSON: function () {
              return {
                filter: "custom",
                logic: this._logic,
                criteria: this._criteria,
              };
            },
          });
          n.spreadsheet.TopFilter = i.extend({
            init: function (n) {
              this._type = n.type;
              this._value = n.value;
              this._values = [];
            },
            prepare: function (n) {
              var t,
                i = n
                  .map(this.value)
                  .sort()
                  .filter(function (n, t, i) {
                    return 0 === t || n !== i[t - 1];
                  });
              i.sort(
                "topNumber" === this._type || "topPercent" == this._type
                  ? function (n, t) {
                      return t - n;
                    }
                  : function (n, t) {
                      return n - t;
                    }
              );
              t = this._value;
              ("topPercent" !== this._type && "bottomPercent" !== this._type) ||
                (t = ((i.length * t) / 100) >> 0);
              this._values = i.slice(0, t);
            },
            matches: function (n) {
              return this._values.indexOf(n) >= 0;
            },
            toJSON: function () {
              return { filter: "top", type: this._type, value: this._value };
            },
          });
          n.spreadsheet.DynamicFilter = i.extend({
            init: function (n) {
              if (
                ((this._type = n.type),
                (this._predicate = this[n.type]),
                "function" != typeof this._predicate)
              )
                throw Error(
                  "DynamicFilter type '" + n.type + "' not recognized."
                );
            },
            value: function (t) {
              var r,
                i = t.value;
              return (
                t.format &&
                  ((r = n.spreadsheet.formatting.type(i, t.format)),
                  "date" === r && (i = n.spreadsheet.numberToDate(i))),
                i
              );
            },
            prepare: function (n) {
              for (var i, u = 0, r = 0, t = 0; t < n.length; t++)
                (i = this.value(n[t])), "number" == typeof i && ((u += i), r++);
              this._average = r > 0 ? u / r : 0;
            },
            matches: function (n) {
              return this._predicate(n);
            },
            aboveAverage: function (t) {
              return (
                t instanceof Date && (t = n.spreadsheet.dateToNumber(t)),
                "number" == typeof t && t > this._average
              );
            },
            belowAverage: function (t) {
              return (
                t instanceof Date && (t = n.spreadsheet.dateToNumber(t)),
                "number" == typeof t && t < this._average
              );
            },
            tomorrow: function (t) {
              if (t instanceof Date) {
                var i = n.date.addDays(n.date.today(), 1);
                return n.date.getDate(t).getTime() === i.getTime();
              }
              return !1;
            },
            today: function (t) {
              return t instanceof Date && n.date.isToday(t);
            },
            yesterday: function (t) {
              if (t instanceof Date) {
                var i = n.date.addDays(n.date.today(), -1);
                return n.date.getDate(t).getTime() === i.getTime();
              }
              return !1;
            },
            nextWeek: function (t) {
              return f(n.date.addDays(n.date.today(), 7), t);
            },
            thisWeek: function (t) {
              return f(n.date.today(), t);
            },
            lastWeek: function (t) {
              return f(n.date.addDays(n.date.today(), -7), t);
            },
            nextMonth: function (n) {
              return u(n, 1);
            },
            thisMonth: function (n) {
              return u(n, 0);
            },
            lastMonth: function (n) {
              return u(n, -1);
            },
            nextQuarter: function (i) {
              var r, u;
              return (
                i instanceof Date &&
                ((r = n.date.today()),
                (u = t(i) - t(r)),
                (1 === u && r.getFullYear() === i.getFullYear()) ||
                  (u == -3 && r.getFullYear() + 1 === i.getFullYear()))
              );
            },
            thisQuarter: function (i) {
              var r, u;
              return (
                i instanceof Date &&
                ((r = n.date.today()),
                (u = t(i) - t(r)),
                0 === u && r.getFullYear() === i.getFullYear())
              );
            },
            lastQuarter: function (i) {
              var r, u;
              return (
                i instanceof Date &&
                ((r = n.date.today()),
                (u = t(r) - t(i)),
                (1 === u && r.getFullYear() === i.getFullYear()) ||
                  (u == -3 && r.getFullYear() - 1 === i.getFullYear()))
              );
            },
            nextYear: function (n) {
              return r(n, 1);
            },
            thisYear: function (n) {
              return r(n, 0);
            },
            lastYear: function (n) {
              return r(n, -1);
            },
            yearToDate: function (t) {
              if (t instanceof Date) {
                var i = n.date.today();
                return t.getFullYear() === i.getFullYear() && t <= i;
              }
              return !1;
            },
            toJSON: function () {
              return { filter: "dynamic", type: this._type };
            },
          });
          [1, 2, 3, 4].forEach(function (i) {
            n.spreadsheet.DynamicFilter.prototype["quarter" + i] = function (
              n
            ) {
              return n instanceof Date && t(n) === i;
            };
          });
          n.cultures["en-US"].calendar.months.names.forEach(function (t, i) {
            n.spreadsheet.DynamicFilter.prototype[t.toLowerCase()] = function (
              n
            ) {
              return n instanceof Date && n.getMonth() === i;
            };
          });
        }
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/sorter.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        if (!(n.support.browser.msie && n.support.browser.version < 9)) {
          var t = n.Class.extend({
            init: function (n, t) {
              this._grid = n;
              this._lists = t;
            },
            indices: function (n, i, r, u) {
              var f = t.ascendingComparer;
              return (
                r === !1 && (f = t.descendingComparer),
                i.sortedIndices(
                  this._grid.cellRefIndex(n.topLeft),
                  this._grid.cellRefIndex(n.bottomRight),
                  f,
                  u
                )
              );
            },
            sortBy: function (n, t, i, r, u) {
              for (
                var o,
                  s,
                  e,
                  h = this.indices(n.toColumn(t), i, r, u),
                  f = n.topLeft.col;
                f <= n.bottomRight.col;
                f++
              )
                for (
                  o = this._grid.index(n.topLeft.row, f),
                    s = this._grid.index(n.bottomRight.row, f),
                    e = 0;
                  e < this._lists.length;
                  e++
                )
                  o < this._lists[e].lastRangeStart() &&
                    this._lists[e].sort(o, s, h);
              return h;
            },
          });
          t.ascendingComparer = function (t, i) {
            var r, u;
            if (null === t && null === i) return 0;
            if (null === t) return 1;
            if (null === i) return -1;
            if (((r = typeof t), (u = typeof i), "number" === r))
              return "number" === u ? t - i : -1;
            if ("string" === r)
              switch (u) {
                case "number":
                  return 1;
                case "string":
                  return t.localeCompare(i);
                default:
                  return -1;
              }
            if ("boolean" === r)
              switch (u) {
                case "number":
                  return 1;
                case "string":
                  return 1;
                case "boolean":
                  return t - i;
                default:
                  return -1;
              }
            if (t instanceof n.spreadsheet.calc.runtime.CalcError)
              return i instanceof n.spreadsheet.calc.runtime.CalcError ? 0 : 1;
            throw Error("Cannot compare " + t + " and " + i);
          };
          t.descendingComparer = function (n, i) {
            return null === n && null === i
              ? 0
              : null === n
              ? 1
              : null === i
              ? -1
              : t.ascendingComparer(i, n);
          };
          n.spreadsheet.Sorter = t;
        }
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/numformat.min",
      ["spreadsheet/calc.min", "kendo.dom.min", "util/main.min"],
      n
    );
  })(
    function () {
      "use strict";
      function u(n) {
        function o() {
          var t = n.skip(h);
          if (t) return t[1].toLowerCase();
        }
        function s() {
          var t,
            i = n.skip(c);
          if (i && ((t = parseFloat(i[2])), !isNaN(t)))
            return { op: i[1], value: t, custom: !0 };
        }
        function l() {
          for (var t, r = [], i = null; !n.eof() && (t = a()); )
            "date" == t.type
              ? i &&
                /^(el)?time$/.test(i.type) &&
                "h" == i.part &&
                "m" == t.part &&
                t.format < 3 &&
                (t.type = "time")
              : /^(el)?time$/.test(t.type) &&
                "s" == t.part &&
                i &&
                "date" == i.type &&
                "m" == i.part &&
                i.format < 3 &&
                (i.type = "time"),
              /^(?:str|space|fill)$/.test(t.type) || (i = t),
              r.push(t);
          return r;
        }
        function r(t) {
          if ("date" != t.type || ("m" == t.part && t.format < 3)) {
            var i = n.skip(/^\.(0+)/);
            i &&
              ((t.fraction = i[1].length),
              "date" == t.type && (t.type = "time"));
          }
          return t;
        }
        function a() {
          var u, t;
          if ((t = n.skip(/^([#0?]+)(?:,([#0?]+))+/)))
            return { type: "digit", sep: !0, format: t[1] + t[2], decimal: i };
          if ((t = n.skip(/^[#0?]+/)))
            return { type: "digit", sep: !1, format: t[0], decimal: i };
          if ((t = n.skip(/^(e)([+-])/i)))
            return { type: "exp", ch: t[1], sign: t[2] };
          if ((t = n.skip(/^(d{1,4}|m{1,5}|yyyy|yy)/i)))
            return (
              (t = t[1].toLowerCase()),
              r({ type: "date", part: t.charAt(0), format: t.length })
            );
          if ((t = n.skip(/^(hh?|ss?)/i)))
            return (
              (t = t[1].toLowerCase()),
              r({ type: "time", part: t.charAt(0), format: t.length })
            );
          if ((t = n.skip(/^\[(hh?|mm?|ss?)\]/i)))
            return (
              (t = t[1].toLowerCase()),
              r({ type: "eltime", part: t.charAt(0), format: t.length })
            );
          if ((t = n.skip(/^(a[.]?m[.]?\/p[.]?m[.]?|a\/p)/i)))
            return (t = t[1].split("/")), { type: "ampm", am: t[0], pm: t[1] };
          switch ((u = n.next())) {
            case ";":
              return null;
            case "\\":
              return { type: "str", value: n.next() };
            case '"':
              return { type: "str", value: n.readEscaped(u) };
            case "@":
              return { type: "text" };
            case "_":
              return { type: "space", value: n.next() };
            case "*":
              return { type: "fill", value: n.next() };
            case ".":
              return n.lookingAt(/^\s*[#0?]/)
                ? ((i = !0), { type: "dec" })
                : { type: "str", value: "." };
            case "%":
              return { type: "percent" };
            case ",":
              return { type: "comma" };
          }
          return { type: "str", value: u };
        }
        function v() {
          i = !1;
          var n = o(),
            t = s();
          return !n && t && (n = o()), { color: n, cond: t, body: l() };
        }
        var t, u, i, e;
        for (n = f.InputStream(n), t = [], u = !1; !n.eof(); )
          (e = v()), t.push(e), e.cond && (u = !0);
        return (
          u ||
            (1 == t.length
              ? (t[0].cond = "num")
              : 2 == t.length
              ? ((t[0].cond = { op: ">=", value: 0 }),
                (t[1].cond = { op: "<", value: 0 }))
              : t.length >= 3 &&
                ((t[0].cond = { op: ">", value: 0 }),
                (t[1].cond = { op: "<", value: 0 }),
                (t[2].cond = { op: "=", value: 0 }),
                t.length > 3 && ((t[3].cond = "text"), (t = t.slice(0, 4))))),
          t
        );
      }
      function v(t) {
        function r(n) {
          var t = "";
          return (
            n.color && (t += "[" + n.color + "]"),
            n.cond &&
              "text" != n.cond &&
              "num" != n.cond &&
              (t += "[" + n.cond.op + n.cond.value + "]"),
            t + n.body.map(u).join("")
          );
        }
        function i(t, i) {
          return i.fraction && (t += "." + n("", i.fraction, "0")), t;
        }
        function u(t) {
          return "digit" == t.type
            ? t.sep
              ? t.format.charAt(0) + "," + t.format.substr(1)
              : t.format
            : "exp" == t.type
            ? t.ch + t.sign
            : "date" == t.type || "time" == t.type
            ? i(n("", t.format, t.part), t)
            : "eltime" == t.type
            ? i("[" + n("", t.format, t.part) + "]", t)
            : "ampm" == t.type
            ? t.am + "/" + t.pm
            : "str" == t.type
            ? JSON.stringify(t.value)
            : "text" == t.type
            ? "@"
            : "space" == t.type
            ? "_" + t.value
            : "fill" == t.type
            ? "*" + t.value
            : "dec" == t.type
            ? "."
            : "percent" == t.type
            ? "%"
            : "comma" == t.type
            ? ","
            : void 0;
        }
        return t.map(r).join(";");
      }
      function y(t, i) {
        t.forEach(function (t) {
          var e,
            o,
            u,
            r,
            s,
            f = i;
          if ("text" != t.cond) {
            for (e = t.body, o = !1, u = e.length; 0 !== f && --u >= 0; )
              if (((r = e[u]), "digit" == r.type)) {
                if (
                  r.decimal &&
                  ((o = !0),
                  f > 0
                    ? (r.format += n("", f, "0"))
                    : f < 0 &&
                      ((s = r.format.length),
                      (r.format = r.format.substr(0, s + f)),
                      (f += s - r.format.length)),
                  0 === r.format.length)
                )
                  for (e.splice(u, 1); --u >= 0; ) {
                    if (((r = e[u]), "digit" == r.type && r.decimal)) {
                      ++u;
                      break;
                    }
                    if ("dec" == r.type) {
                      e.splice(u, 1);
                      break;
                    }
                  }
                if (f > 0) break;
              }
            !o &&
              f > 0 &&
              e.splice(
                u + 1,
                0,
                { type: "dec" },
                { type: "digit", sep: !1, decimal: !0, format: n("", f, "0") }
              );
          }
        });
      }
      function p(n) {
        var t = 0;
        return {
          next: function () {
            return n[t++];
          },
          eof: function () {
            return t >= n.length;
          },
          ahead: function (i, r) {
            if (t + i <= n.length) {
              var u = r.apply(null, n.slice(t, t + i));
              return u && (t += i), u;
            }
          },
          restart: function () {
            t = 0;
          },
        };
      }
      function o(n) {
        function b(n, t) {
          (("digit" == n.type && "comma" == t.type) ||
            ("comma" == n.type && n.hidden && "comma" == t.type)) &&
            ((t.hidden = !0), l++);
        }
        var v,
          t,
          f = p(n.body),
          h = !1,
          e = !1,
          y = !1,
          c = 0,
          l = 0,
          i = "var intPart, decPart, isNegative, date, time; ",
          w = !1,
          a = 0,
          o = [],
          s = [],
          r = n.cond,
          u = "";
        for (
          "text" == r
            ? (u =
                "if (typeof value == 'string' || value instanceof kendo.spreadsheet.CalcError) { ")
            : "num" == r
            ? (u = "if (typeof value == 'number') { ")
            : r &&
              ((v = "=" == r.op ? "==" : r.op),
              (u =
                "if (typeof value == 'number' && value " +
                v +
                " " +
                r.value +
                ") { "),
              r.custom || (i += "value = Math.abs(value); ")),
            n.color &&
              (i += "result.color = " + JSON.stringify(n.color) + "; ");
          !f.eof();

        )
          f.ahead(2, b),
            (t = f.next()),
            "percent" == t.type
              ? c++
              : "digit" == t.type
              ? t.decimal
                ? ((a += t.format.length), s.push(t.format))
                : (o.push(t.format), t.sep && (w = !0))
              : "time" == t.type
              ? (e = !0)
              : "date" == t.type
              ? (h = !0)
              : "ampm" == t.type && (y = e = !0);
        for (
          c > 0 && (i += "value *= " + Math.pow(100, c) + "; "),
            l > 0 && (i += "value /= " + Math.pow(1e3, l) + "; "),
            o.length &&
              ((i +=
                "intPart = runtime.formatInt(culture, value, " +
                JSON.stringify(o) +
                ", " +
                a +
                ", " +
                w +
                "); "),
              (i += "isNegative = parseInt(intPart[0]) < 0;")),
            s.length &&
              (i +=
                "decPart = runtime.formatDec(value, " +
                JSON.stringify(s) +
                ", " +
                a +
                "); "),
            (o.length || s.length) && (i += "type = 'number'; "),
            h && (i += "date = runtime.unpackDate(value); "),
            e && (i += "time = runtime.unpackTime(value); "),
            (h || e) && (i += "type = 'date'; "),
            (c > 0 || l > 0 || o.length || s.length || h || e) &&
              (u || (u = "if (typeof value == 'number') { ")),
            f.restart(),
            i += "var matchedCurrency = false;";
          !f.eof();

        )
          (t = f.next()),
            "dec" == t.type
              ? (i += "output += culture.numberFormat['.']; ")
              : "comma" != t.type || t.hidden
              ? "percent" == t.type
                ? ((i += "type = 'percent'; "),
                  (i += "output += culture.numberFormat.percent.symbol; "))
                : "str" == t.type
                ? (/[\$\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BD\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6]/.test(
                    t.value
                  ) &&
                    ((i += "type = 'currency'; "),
                    (i +=
                      "if (isNegative) { output += '-'; matchedCurrency = true; }")),
                  (i += "output += " + JSON.stringify(t.value) + "; "))
                : "text" == t.type
                ? ((i += "type = 'text'; "), (i += "output += value; "))
                : "space" == t.type
                ? ((i += "if (output) result.body.push(output); "),
                  (i += "output = ''; "),
                  (i +=
                    "result.body.push({ type: 'space', value: " +
                    JSON.stringify(t.value) +
                    " }); "))
                : "fill" == t.type
                ? (i +=
                    "output += runtime.fill(" + JSON.stringify(t.value) + "); ")
                : "digit" == t.type
                ? ((i +=
                    "if (isNegative && intPart[0] && matchedCurrency) {intPart[0] = intPart[0].replace('-', '');}"),
                  (i +=
                    "output += " +
                    (t.decimal ? "decPart" : "intPart") +
                    ".shift(); "))
                : "date" == t.type
                ? (i +=
                    "output += runtime.date(culture, date, " +
                    JSON.stringify(t.part) +
                    ", " +
                    t.format +
                    "); ")
                : "time" == t.type
                ? (i +=
                    "output += runtime.time(time, " +
                    JSON.stringify(t.part) +
                    ", " +
                    t.format +
                    ", " +
                    y +
                    ", " +
                    t.fraction +
                    "); ")
                : "eltime" == t.type
                ? (i +=
                    "output += runtime.eltime(value, " +
                    JSON.stringify(t.part) +
                    ", " +
                    t.format +
                    ", " +
                    t.fraction +
                    "); ")
                : "ampm" == t.type &&
                  (i +=
                    "output += time.hours < 12 ? " +
                    JSON.stringify(t.am) +
                    " : " +
                    JSON.stringify(t.pm) +
                    "; ")
              : (i += "output += ','; ");
        return (
          (i += "if (output) result.body.push(output); "),
          (i += "result.type = type; "),
          (i += "return result; "),
          u && (i = u + i + "}"),
          i
        );
      }
      function n(n, t, i) {
        for (n += ""; n.length < t; ) n = i + n;
        return n;
      }
      function w(n, t, i) {
        for (n += ""; n.length < t; ) n += i;
        return n;
      }
      function b(t) {
        var i,
          r,
          o,
          u,
          f = (t + "").toLowerCase(),
          e = f.indexOf(".");
        return (
          e < 0
            ? ((e = f.indexOf("e")),
              e < 0
                ? ((i = f), (r = ""))
                : ((i = f.substr(0, e)), (r = f.substr(e))))
            : ((i = f.substr(0, e)), (r = f.substr(e + 1))),
          (o = /(\d*)e([-+]?\d+)/.exec(r)) &&
            ((u = parseInt(o[2], 10)),
            u >= 0
              ? ((r = w(o[1], u, "0")),
                (i += r.substr(0, u)),
                (r = r.substr(u)))
              : ((i = n(i, -u, "0")),
                (r = i.substr(u) + o[1]),
                (i = i.substr(0, i.length + u)))),
          { intpart: i || "0", decpart: r }
        );
      }
      function s(n) {
        for (var i, u = n.body, r = "", t = 0; t < u.length; ++t)
          (i = u[t]),
            "string" == typeof i ? (r += i) : "space" == i.type && (r += " ");
        return r;
      }
      var e, f, r, h, c, l, t, a, i;
      (kendo.support.browser.msie && kendo.support.browser.version < 9) ||
        ((e = kendo.util),
        (f = kendo.spreadsheet.calc),
        (r = kendo.dom),
        (h = /^\[(black|green|white|blue|magenta|yellow|cyan|red)\]/i),
        (c = /^\[(<=|>=|<>|<|>|=)(-?[0-9.]+)\]/),
        (l = o({ cond: "text", body: [{ type: "text" }] })),
        (t = e.memoize(function (n) {
          var r = u(n),
            t = r.map(o);
          return (
            t.push(l),
            (t = t.join("\n")),
            (t =
              "'use strict'; return function(value, culture){ if (!culture) culture = kendo.culture(); var output = '', type = null, result = { body: [] }; " +
              t +
              "; return result; };"),
            Function("runtime", t)(i)
          );
        })),
        (a = e.memoize(function (t) {
          function h(t, i) {
            return i.fraction && (t += n("", Math.max(i.fraction, 3), "f")), t;
          }
          function c(t) {
            if ("digit" == t.type)
              return t.sep
                ? t.format.charAt(0) + "," + t.format.substr(1)
                : t.format;
            if ("exp" == t.type) return t.ch + t.sign;
            if ("date" == t.type || "time" == t.type) {
              var i = t.part;
              return (
                "date" == t.type && /^m/.test(i)
                  ? (i = "M")
                  : "time" == t.type &&
                    /^h/.test(i) &&
                    (s || (i = i.toUpperCase())),
                h(n("", t.format, i), t)
              );
            }
            return "ampm" == t.type
              ? "tt"
              : "str" == t.type
              ? t.value
              : "space" == t.type
              ? " "
              : "dec" == t.type
              ? "."
              : "percent" == t.type
              ? "%"
              : "comma" == t.type
              ? ","
              : "";
          }
          for (var i, r, o = u(t), e = !1, s = !1, f = 0; f < o.length; ++f) {
            for (i = o[f], r = 0; r < i.body.length; ++r)
              /^(?:date|time|ampm)$/.test(i.body[r].type) &&
                ((e = !0), "ampm" == i.body[r].type && (s = !0));
            if (e) break;
          }
          return e ? i.body.map(c).join("") : null;
        })),
        (i = {
          unpackDate: f.runtime.unpackDate,
          unpackTime: f.runtime.unpackTime,
          date: function (t, i, r, u) {
            switch (r) {
              case "d":
                switch (u) {
                  case 1:
                    return i.date;
                  case 2:
                    return n(i.date, 2, "0");
                  case 3:
                    return t.calendars.standard.days.namesAbbr[i.day];
                  case 4:
                    return t.calendars.standard.days.names[i.day];
                }
                break;
              case "m":
                switch (u) {
                  case 1:
                    return i.month + 1;
                  case 2:
                    return n(i.month + 1, 2, "0");
                  case 3:
                    return t.calendars.standard.months.namesAbbr[i.month];
                  case 4:
                    return t.calendars.standard.months.names[i.month];
                  case 5:
                    return t.calendars.standard.months.names[i.month].charAt(0);
                }
                break;
              case "y":
                switch (u) {
                  case 2:
                    return i.year % 100;
                  case 4:
                    return i.year;
                }
            }
            return "##";
          },
          time: function (t, r, u, f, e) {
            var o, s;
            switch (r) {
              case "h":
                o = n(f ? t.hours % 12 || 12 : t.hours, u, "0");
                e &&
                  (s =
                    (t.minutes + (t.seconds + t.milliseconds / 1e3) / 60) / 60);
                break;
              case "m":
                o = n(t.minutes, u, "0");
                e && (s = (t.seconds + t.milliseconds / 1e3) / 60);
                break;
              case "s":
                o = n(t.seconds, u, "0");
                e && (s = t.milliseconds / 1e3);
            }
            return s && (o += i.toFixed(s, e).replace(/^0+/, "")), o;
          },
          eltime: function (t, r, u, f) {
            var e, o;
            switch (r) {
              case "h":
                e = 24 * t;
                break;
              case "m":
                e = 1440 * t;
                break;
              case "s":
                e = 86400 * t;
            }
            return (
              f && (o = e - (0 | e)),
              (e = n(0 | e, u, "0")),
              o && (e += i.toFixed(o, f).replace(/^0+/, "")),
              e
            );
          },
          fill: function (n) {
            return n;
          },
          formatInt: function (n, t, r, u, f) {
            function o(t, i) {
              f &&
                l &&
                l % 3 == 0 &&
                /^[0-9]$/.test(t) &&
                (s = n.numberFormat[","] + s);
              i && "-" === t && ((v = !0), (t = "0"));
              s = t + s;
              l++;
            }
            var w, v, e, h, l, s, a, y, p, c;
            for (
              t = i.toFixed(t, u).replace(/\..*$/, ""),
                w = r[r.length - 1],
                u > 0 &&
                  "0" != w[r.length - 1] &&
                  ("0" === t ? (t = "") : "-0" === t && (t = "-")),
                v = !1,
                e = t.length - 1,
                h = [],
                l = 0,
                a = r.length;
              --a >= 0;

            ) {
              for (y = r[a], s = "", p = y.length; --p >= 0; )
                (c = y.charAt(p)),
                  e < 0
                    ? "0" == c
                      ? o("0")
                      : "?" == c && o(" ")
                    : ("0" == t && "?" == c
                        ? o(" ")
                        : "0" == c
                        ? o(t.charAt(e), !0)
                        : o(t.charAt(e)),
                      e--);
              if (0 === a) for (; e >= 0; ) o(t.charAt(e--));
              h.unshift(s);
            }
            return v && (h[0] = "-" + h[0]), h;
          },
          formatDec: function (n, t, r) {
            var o, s, h, f, c, u, e, l;
            for (
              n = i.toFixed(n, r),
                o = n.indexOf("."),
                n = o >= 0 ? n.substr(o + 1).replace(/0+$/, "") : "",
                s = 0,
                h = [],
                f = 0;
              f < t.length;
              ++f
            ) {
              for (c = t[f], u = "", e = 0; e < c.length; ++e)
                (l = c.charAt(e)),
                  s < n.length
                    ? (u += n.charAt(s++))
                    : "0" == l
                    ? (u += "0")
                    : "?" == l && (u += " ");
              h.push(u);
            }
            return h;
          },
          toFixed: function (n, t) {
            return (function i(n, r) {
              var f, e, u, o;
              if (!isFinite(n)) return "#NUM!";
              if (n < 0) return "-" + i(-n);
              if (0 === t) return Math.round(n) + "";
              if (n === Math.round(n) && !/e/i.test(n + ""))
                return n.toFixed(t);
              if (
                ((f = b(n)), (e = f.intpart), (u = f.decpart), u.length <= t)
              ) {
                for (; u.length < t; ) u += "0";
                return e + "." + u;
              }
              return r
                ? e + "." + u.substr(0, t)
                : ((o = Math.pow(10, t)), i(Math.round(n * o) / o, !0));
            })(+n.toFixed(14));
          },
        }),
        (kendo.spreadsheet.formatting = {
          compile: t,
          parse: u,
          format: function (n, i, u) {
            var h,
              o,
              f,
              s = t(i)(n, u),
              e = r.element("span");
            for (
              e.__dataType = s.type,
                h = s.body,
                s.color && (e.attr.style = { color: s.color }),
                o = 0;
              o < h.length;
              ++o
            )
              (f = h[o]),
                "string" == typeof f
                  ? e.children.push(r.text(f))
                  : "space" == f.type &&
                    e.children.push(
                      r.element("span", { style: { visibility: "hidden" } }, [
                        r.text(f.value),
                      ])
                    );
            return e;
          },
          text: function (n, i, r) {
            var u = t(i)(n, r);
            return s(u);
          },
          textAndColor: function (n, i, r) {
            var u = t(i)(n, r);
            return { text: s(u), color: u.color, type: u.type };
          },
          type: function (n, i) {
            return t(i)(n).type;
          },
          adjustDecimals: function (n, t) {
            var i = u(n);
            return y(i, t), v(i);
          },
          makeDateFormat: a,
        }));
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/runtime.functions.min",
      ["spreadsheet/runtime.min", "util/main.min"],
      n
    );
  })(
    function () {
      "use strict";
      function tt(n) {
        return (Math.exp(n) + Math.exp(-n)) / 2;
      }
      function it(n) {
        return (Math.exp(n) - Math.exp(-n)) / 2;
      }
      function vt(n) {
        return it(n) / tt(n);
      }
      function yt(n, t) {
        for (; t; ) {
          var i = n % t;
          n = t;
          t = i;
        }
        return n;
      }
      function ui(n, t) {
        return Math.abs(n * t) / yt(n, t);
      }
      function rt(n, t) {
        for (var r, u, f, e = [], i = 0, o = n[0]; i < n.length; )
          e.push({ matrix: n[i++], pred: h(n[i++]) });
        for (r = 0; r < o.height; ++r)
          n: for (u = 0; u < o.width; ++u) {
            for (i = 0; i < e.length; ++i)
              if (
                ((f = e[i].matrix.get(r, u)),
                !e[i].pred(null == f || "" === f ? 0 : f))
              )
                continue n;
            t(r, u);
          }
      }
      function p(n) {
        return (
          n.reduce(function (n, t) {
            return n + t;
          }, 0) / n.length
        );
      }
      function w(n, t, i) {
        return (
          null == i && (i = p(n)),
          n.reduce(function (n, t) {
            return n + Math.pow(t - i, 2);
          }, 0) / t
        );
      }
      function pt(n, t) {
        return Math.sqrt(w(n, t));
      }
      function b(n, i, r) {
        var e = 0,
          o = 0,
          u = null,
          f = null,
          s = !1;
        return (
          n.forEach(function (n) {
            n < i
              ? (e++, (u = null == u ? n : Math.max(u, n)))
              : n > i
              ? (o++, (f = null == f ? n : Math.min(f, n)))
              : (s = !0);
          }),
          e || o
            ? s
              ? r
                ? (e + 1) / (n.length + 1)
                : e / (e + o)
              : ((f - i) * b(n, u, r) + (i - u) * b(n, f, r)) / (f - u)
            : new t("N/A")
        );
      }
      function wt(n, t, i) {
        for (var u = 0, f = p(n), e = p(t), o = n.length, r = 0; r < o; ++r)
          u += (n[r] - f) * (t[r] - e);
        return u / i;
      }
      function bt(n, t) {
        var r, i, u;
        return (
          n.sort(f),
          (r = n.length),
          (i = 0 | t),
          (u = t - i),
          0 === i
            ? n[0]
            : i >= r
            ? n[r - 1]
            : (--i, n[i] + u * (n[i + 1] - n[i]))
        );
      }
      function kt(n, t) {
        var i = t * (n.length - 1) + 1;
        return bt(n, i);
      }
      function dt(n, t) {
        var i = t * (n.length + 1);
        return bt(n, i);
      }
      function ut(n, i, r) {
        var u = [],
          o = 1,
          f = 2,
          s = 4;
        return (
          (function e(i) {
            if (i instanceof y)
              n.getRefCells(i, !0).forEach(function (n) {
                var e,
                  i = n.value;
                (r & o && n.hidden) ||
                  ((!n.formula ||
                    ((e = n.formula.print(n.row, n.col)),
                    !/^\s*(?:aggregate|subtotal)\s*\(/i.test(e) || r & s)) &&
                    ((r & f && i instanceof t) ||
                      (("number" == typeof i || i instanceof t) && u.push(i))));
              });
            else if (Array.isArray(i))
              for (var h = 0; h < i.length; ++h) e(i[h]);
            else
              i instanceof c
                ? i.each(e)
                : "number" == typeof i
                ? u.push(i)
                : i instanceof t && !(r & f) && u.push(i);
          })(i),
          u
        );
      }
      function gt(n, t, i, r) {
        var f, u;
        if (r) {
          for (f = 0, u = 0; u <= n; ++u)
            f += s(t, u) * Math.pow(i, u) * Math.pow(1 - i, t - u);
          return f;
        }
        return s(t, n) * Math.pow(i, n) * Math.pow(1 - i, t - n);
      }
      function ni(n) {
        var t = r(a(n, 0, 1));
        return 4 == t.day || (3 == t.day && i.isLeapYear(n)) ? 53 : 52;
      }
      function k(n, t, i) {
        var u = r(n),
          f = r(t);
        return (
          i
            ? (31 == u.date && (u.date = 30), 31 == f.date && (f.date = 30))
            : (1 == u.month &&
                1 == f.month &&
                u.date == l(u.year, 1) &&
                f.date == l(f.year, 1) &&
                (f.date = 30),
              u.date == l(u.year, u.month)
                ? ((u.date = 30), 31 == f.date && (f.date = 30))
                : 30 == u.date && 31 == f.date && (f.date = 30)),
          360 * (f.year - u.year) + 30 * (f.month - u.month) + (f.date - u.date)
        );
      }
      function ti(n, t) {
        this.link = n;
        this.text = t;
      }
      function d(n) {
        return (
          "number" == typeof n || "boolean" == typeof n || null == n || "" === n
        );
      }
      function f(n, t) {
        return n === t ? 0 : n < t ? -1 : 1;
      }
      function ft(n, t) {
        return n === t ? 0 : n < t ? 1 : -1;
      }
      var v,
        e,
        et,
        i,
        n,
        u,
        t,
        g,
        o,
        ot,
        c,
        y,
        l,
        a,
        r,
        ii,
        st,
        ht,
        ct,
        lt,
        nt,
        s,
        at,
        ri,
        h;
      (kendo.support.browser.msie && kendo.support.browser.version < 9) ||
        ((v = kendo.util),
        (e = kendo.spreadsheet),
        (et = e.calc),
        (i = et.runtime),
        (n = i.defineFunction),
        (u = i.defineAlias),
        (t = i.CalcError),
        (g = e.RangeRef),
        (o = e.CellRef),
        (ot = e.UnionRef),
        (c = i.Matrix),
        (y = e.Ref),
        (l = i.daysInMonth),
        (a = i.packDate),
        (r = i.unpackDate),
        (ii = i.daysInYear),
        [
          "abs",
          "cos",
          "sin",
          "acos",
          "asin",
          "tan",
          "atan",
          "exp",
          "sqrt",
        ].forEach(function (t) {
          n(t, Math[t]).args([["*n", "number"]]);
        }),
        n("ln", Math.log).args([["*n", "number"]]),
        n("log", function (n, t) {
          return Math.log(n) / Math.log(t);
        }).args([
          ["*num", "number++"],
          ["*base", ["or", "number++", ["null", 10]]],
          ["?", ["assert", "$base != 1", "DIV/0"]],
        ]),
        n("log10", function (n) {
          return Math.log(n) / Math.log(10);
        }).args([["*num", "number++"]]),
        n("pi", function () {
          return Math.PI;
        }).args([]),
        n("sqrtpi", function (n) {
          return Math.sqrt(n * Math.PI);
        }).args([["*num", "number+"]]),
        n("degrees", function (n) {
          return ((180 * n) / Math.PI) % 360;
        }).args([["*radians", "number"]]),
        n("radians", function (n) {
          return (Math.PI * n) / 180;
        }).args([["*degrees", "number"]]),
        n("cosh", tt).args([["*num", "number"]]),
        n("acosh", function (n) {
          return Math.log(n + Math.sqrt(n - 1) * Math.sqrt(n + 1));
        }).args([
          ["*num", "number"],
          ["?", ["assert", "$num >= 1"]],
        ]),
        n("sinh", it).args([["*num", "number"]]),
        n("asinh", function (n) {
          return Math.log(n + Math.sqrt(n * n + 1));
        }).args([["*num", "number"]]),
        n("sec", function (n) {
          return 1 / Math.cos(n);
        }).args([["*num", "number"]]),
        n("sech", function (n) {
          return 1 / tt(n);
        }).args([["*num", "number"]]),
        n("csc", function (n) {
          return 1 / Math.sin(n);
        }).args([["*num", "number"]]),
        n("csch", function (n) {
          return 1 / it(n);
        }).args([["*num", "number"]]),
        n("atan2", function (n, t) {
          return Math.atan(t / n);
        }).args([
          ["*x", "divisor"],
          ["*y", "number"],
        ]),
        n("tanh", vt).args([["*num", "number"]]),
        n("atanh", function (n) {
          return Math.log(Math.sqrt(1 - n * n) / (1 - n));
        }).args([["*num", ["and", "number", ["(between)", -1, 1]]]]),
        n("cot", function (n) {
          return 1 / Math.tan(n);
        }).args([["*num", "divisor"]]),
        n("coth", function (n) {
          return 1 / vt(n);
        }).args([["*num", "divisor"]]),
        n("acot", function (n) {
          return Math.PI / 2 - Math.atan(n);
        }).args([["*num", "number"]]),
        n("acoth", function (n) {
          return Math.log((n + 1) / (n - 1)) / 2;
        }).args([
          ["*num", "number"],
          ["?", ["or", ["assert", "$num < -1"], ["assert", "$num > 1"]]],
        ]),
        n("power", function (n, t) {
          return Math.pow(n, t);
        }).args([
          ["*a", "number"],
          ["*b", "number"],
        ]),
        n("mod", function (n, t) {
          return n % t;
        }).args([
          ["*a", "number"],
          ["*b", "divisor"],
        ]),
        n("quotient", function (n, t) {
          return Math.floor(n / t);
        }).args([
          ["*a", "number"],
          ["*b", "divisor"],
        ]),
        n("ceiling", function (n, t) {
          return t ? t * Math.ceil(n / t) : 0;
        }).args([
          ["*number", "number"],
          ["*significance", "number"],
          ["?", ["assert", "$significance >= 0 || $number < 0"]],
        ]),
        n("ceiling.precise", function (n, t) {
          return (t = Math.abs(t)), t ? t * Math.ceil(n / t) : 0;
        }).args([
          ["*number", "number"],
          ["*significance", ["or", "number", ["null", 1]]],
        ]),
        u("iso.ceiling", "ceiling.precise"),
        n("ceiling.math", function (n, t, i) {
          return t && n
            ? (n < 0 && ((!i && t < 0) || (i && t > 0)) && (t = -t),
              t ? t * Math.ceil(n / t) : 0)
            : 0;
        }).args([
          ["*number", "number"],
          ["*significance", ["or", "number", ["null", "$number < 0 ? -1 : 1"]]],
          ["*mode", ["or", "logical", ["null", 0]]],
        ]),
        n("floor", function (n, t) {
          return t ? t * Math.floor(n / t) : 0;
        }).args([
          ["*number", "number"],
          ["*significance", "number"],
          ["?", ["assert", "$significance >= 0 || $number < 0"]],
        ]),
        n("floor.precise", function (n, t) {
          return (t = Math.abs(t)), t ? t * Math.floor(n / t) : 0;
        }).args([
          ["*number", "number"],
          ["*significance", ["or", "number", ["null", 1]]],
        ]),
        n("floor.math", function (n, t, i) {
          return t && n
            ? (n < 0 && ((!i && t < 0) || (i && t > 0)) && (t = -t),
              t ? t * Math.floor(n / t) : 0)
            : 0;
        }).args([
          ["*number", "number"],
          ["*significance", ["or", "number", ["null", "$number < 0 ? -1 : 1"]]],
          ["*mode", ["or", "logical", ["null", 0]]],
        ]),
        n("int", Math.floor).args([["*number", "number"]]),
        n("mround", function (n, t) {
          return t ? t * Math.round(n / t) : 0;
        }).args([
          ["*number", "number"],
          ["*multiple", "number"],
        ]),
        n("round", function (n, t) {
          var i = n < 0 ? -1 : 1;
          return (
            i < 0 && (n = -n),
            (t = Math.pow(10, t)),
            (n *= t),
            (n = Math.round(n)),
            (i * n) / t
          );
        }).args([
          ["*number", "number"],
          ["*digits", "number"],
        ]),
        n("roundup", function (n, t) {
          return (
            (t = Math.pow(10, t)),
            (n *= t),
            (n = n < 0 ? Math.floor(n) : Math.ceil(n)),
            n / t
          );
        }).args([
          ["*number", "number"],
          ["*digits", "number"],
        ]),
        n("rounddown", function (n, t) {
          return (
            (t = Math.pow(10, t)),
            (n *= t),
            (n = n < 0 ? Math.ceil(n) : Math.floor(n)),
            n / t
          );
        }).args([
          ["*number", "number"],
          ["*digits", "number"],
        ]),
        n("even", function (n) {
          var t = n < 0 ? Math.floor(n) : Math.ceil(n);
          return t % 2 ? t + (t < 0 ? -1 : 1) : t;
        }).args([["*number", "number"]]),
        n("odd", function (n) {
          var t = n < 0 ? Math.floor(n) : Math.ceil(n);
          return t % 2 ? t : t + (t < 0 ? -1 : 1);
        }).args([["*number", "number"]]),
        n("sign", function (n) {
          return n < 0 ? -1 : n > 0 ? 1 : 0;
        }).args([["*number", "number"]]),
        n("gcd", function (n) {
          for (var i = n[0], t = 1; t < n.length; ++t) i = yt(i, n[t]);
          return i;
        }).args([["numbers", ["collect", "number"]]]),
        n("lcm", function (n) {
          for (var i = n[0], t = 1; t < n.length; ++t) i = ui(i, n[t]);
          return i;
        }).args([["numbers", ["collect", "number"]]]),
        n("sum", function (n) {
          return n.reduce(function (n, t) {
            return n + t;
          }, 0);
        }).args([["numbers", ["collect", "number"]]]),
        n("product", function (n) {
          return n.reduce(function (n, t) {
            return n * t;
          }, 1);
        }).args([["numbers", ["collect", "number"]]]),
        n("sumproduct", function (n, t) {
          var i = 0;
          return (
            n.each(function (n, r, u) {
              var f, e;
              if ("number" == typeof n) {
                for (f = 0; f < t.length; ++f) {
                  if (((e = t[f].get(r, u)), "number" != typeof e)) return;
                  n *= e;
                }
                i += n;
              }
            }),
            i
          );
        }).args([
          ["a1", "matrix"],
          [
            "+",
            [
              "a2",
              [
                "and",
                "matrix",
                ["assert", "$a2.width == $a1.width"],
                ["assert", "$a2.height == $a1.height"],
              ],
            ],
          ],
        ]),
        n("sumsq", function (n) {
          return n.reduce(function (n, t) {
            return n + t * t;
          }, 0);
        }).args([["numbers", ["collect", "number"]]]),
        n("sumx2my2", function (n, t) {
          var i = 0;
          return (
            n.each(function (n, r, u) {
              var f = t.get(r, u);
              "number" == typeof n &&
                "number" == typeof f &&
                (i += n * n - f * f);
            }),
            i
          );
        }).args([
          ["a", "matrix"],
          [
            "b",
            [
              "and",
              "matrix",
              ["assert", "$b.width == $a.width"],
              ["assert", "$b.height == $a.height"],
            ],
          ],
        ]),
        n("sumx2py2", function (n, t) {
          var i = 0;
          return (
            n.each(function (n, r, u) {
              var f = t.get(r, u);
              "number" == typeof n &&
                "number" == typeof f &&
                (i += n * n + f * f);
            }),
            i
          );
        }).args([
          ["a", "matrix"],
          [
            "b",
            [
              "and",
              "matrix",
              ["assert", "$b.width == $a.width"],
              ["assert", "$b.height == $a.height"],
            ],
          ],
        ]),
        n("sumxmy2", function (n, t) {
          var i = 0;
          return (
            n.each(function (n, r, u) {
              var f = t.get(r, u);
              "number" == typeof n &&
                "number" == typeof f &&
                (i += (n - f) * (n - f));
            }),
            i
          );
        }).args([
          ["a", "matrix"],
          [
            "b",
            [
              "and",
              "matrix",
              ["assert", "$b.width == $a.width"],
              ["assert", "$b.height == $a.height"],
            ],
          ],
        ]),
        n("seriessum", function (n, i, r, u) {
          var f = 0;
          return (
            u.each(function (u) {
              if ("number" != typeof u) throw new t("VALUE");
              f += u * Math.pow(n, i);
              i += r;
            }),
            f
          );
        }).args([
          ["x", "number"],
          ["y", "number"],
          ["m", "number"],
          ["a", "matrix"],
        ]),
        n("min", function (n) {
          return n.length ? Math.min.apply(Math, n) : 0;
        }).args([["numbers", ["collect", "number"]]]),
        n("max", function (n) {
          return n.length ? Math.max.apply(Math, n) : 0;
        }).args([["numbers", ["collect", "number"]]]),
        n("counta", function (n) {
          return n.length;
        }).args([["values", ["#collect", "anyvalue"]]]),
        n("count", function (n) {
          return n.length;
        }).args([["numbers", ["#collect", "number"]]]),
        n("countunique", function (n) {
          var t = 0,
            i = [];
          return (
            n.forEach(function (n) {
              i.indexOf(n) < 0 && (t++, i.push(n));
            }),
            t
          );
        }).args([["values", ["#collect", "anyvalue"]]]),
        n("countblank", function (n) {
          function t(n) {
            (null != n && "" !== n) || i++;
          }
          function r(n) {
            for (var r, i = 0; i < n.length; ++i)
              (r = n[i]), r instanceof c ? r.each(t, !0) : t(r);
          }
          var i = 0;
          return r(n), i;
        }).args([["+", ["args", ["or", "matrix", "anyvalue"]]]]),
        n("iseven", function (n) {
          return n % 2 == 0;
        }).args([["*number", "number"]]),
        n("isodd", function (n) {
          return n % 2 != 0;
        }).args([["*number", "number"]]),
        n("n", function (n) {
          return "boolean" == typeof n
            ? n
              ? 1
              : 0
            : "number" == typeof n
            ? n
            : 0;
        }).args([["*value", "anyvalue"]]),
        n("na", function () {
          return new t("N/A");
        }).args([]),
        (st = [
          ["m1", "matrix"],
          ["c1", "anyvalue"],
          [
            ["m2", "matrix"],
            ["c2", "anyvalue"],
          ],
        ]),
        n("countifs", function (n, t, i) {
          var r = 0;
          return (
            i.unshift(n, t),
            rt(i, function () {
              r++;
            }),
            r
          );
        }).args(st),
        (ht = [["range", "matrix"]].concat(st)),
        n("sumifs", function (n, t, i, r) {
          r.unshift(n, d, t, i);
          var u = 0;
          return (
            rt(r, function (t, i) {
              var r = n.get(t, i);
              r && (u += r);
            }),
            u
          );
        }).args(ht),
        n("averageifs", function (n, i, r, u) {
          u.unshift(n, d, i, r);
          var e = 0,
            f = 0;
          return (
            rt(u, function (t, i) {
              var r = n.get(t, i);
              (null != r && "" !== r) || (r = 0);
              e += r;
              f++;
            }),
            f ? e / f : new t("DIV/0")
          );
        }).args(ht),
        n("countif", function (n, t) {
          t = h(t);
          var i = 0;
          return (
            n.each(function (n) {
              t(n) && i++;
            }),
            i
          );
        }).args([
          ["range", "matrix"],
          ["*criteria", "anyvalue"],
        ]),
        (ct = [
          ["range", "matrix"],
          ["*criteria", "anyvalue"],
          [
            "sumRange",
            [
              "or",
              [
                "and",
                "matrix",
                ["assert", "$sumRange.width == $range.width"],
                ["assert", "$sumRange.height == $range.height"],
              ],
              ["null", "$range"],
            ],
          ],
        ]),
        n("sumif", function (n, t, i) {
          var r = 0;
          return (
            (t = h(t)),
            n.each(function (n, u, f) {
              if (t(n)) {
                var e = i.get(u, f);
                d(e) && (r += e || 0);
              }
            }),
            r
          );
        }).args(ct),
        n("averageif", function (n, i, r) {
          var f = 0,
            u = 0;
          return (
            (i = h(i)),
            n.each(function (n, t, e) {
              if (i(n)) {
                var o = r.get(t, e);
                d(o) && ((f += o || 0), u++);
              }
            }),
            u ? f / u : new t("DIV/0")
          );
        }).args(ct),
        (function (n) {
          n("large", function (n, t) {
            return n.sort(ft)[t];
          });
          n("small", function (n, t) {
            return n.sort(f)[t];
          });
        })(function (i, r) {
          n(i, function (n, i) {
            var u = [],
              f = n.each(function (n) {
                return n instanceof t
                  ? n
                  : void ("number" == typeof n && u.push(n));
              });
            return f ? f : i > u.length ? new t("NUM") : r(u, i - 1);
          }).args([
            ["array", "matrix"],
            ["*nth", "number++"],
          ]);
        }),
        n("stdev.s", function (n) {
          return pt(n, n.length - 1);
        }).args([
          ["numbers", ["collect", "number"]],
          ["?", ["assert", "$numbers.length >= 2", "NUM"]],
        ]),
        n("stdev.p", function (n) {
          return pt(n, n.length);
        }).args([
          ["numbers", ["collect", "number"]],
          ["?", ["assert", "$numbers.length >= 2", "NUM"]],
        ]),
        n("var.s", function (n) {
          return w(n, n.length - 1);
        }).args([
          ["numbers", ["collect", "number"]],
          ["?", ["assert", "$numbers.length >= 2", "NUM"]],
        ]),
        n("var.p", function (n) {
          return w(n, n.length);
        }).args([
          ["numbers", ["collect", "number"]],
          ["?", ["assert", "$numbers.length >= 2", "NUM"]],
        ]),
        n("median", function (n) {
          var t = n.length;
          return n.sort(f), t % 2 ? n[t >> 1] : (n[(t >>= 1)] + n[t - 1]) / 2;
        }).args([
          ["numbers", ["collect", "number"]],
          ["?", ["assert", "$numbers.length > 0", "N/A"]],
        ]),
        n("mode.sngl", function (n) {
          var o, i, s, r, u, e;
          for (
            n.sort(f), o = null, i = 0, s = 1, r = null, u = 0;
            u < n.length;
            ++u
          )
            (e = n[u]),
              e != o ? ((i = 1), (o = e)) : i++,
              i > s && ((s = i), (r = e));
          return null == r ? new t("N/A") : r;
        }).args([["numbers", ["collect", "number"]]]),
        n("mode.mult", function (n) {
          var t,
            u = Object.create(null),
            i = 2,
            r = [];
          return (
            n.forEach(function (n) {
              var t = u[n] || 0;
              u[n] = ++t;
              t == i ? r.push(n) : t > i && ((i = t), (r = [n]));
            }),
            (t = new c(this)),
            r.forEach(function (n, i) {
              t.set(i, 0, n);
            }),
            t
          );
        }).args([["numbers", ["collect", "number"]]]),
        n("geomean", function (n) {
          var i = n.length,
            r = n.reduce(function (n, i) {
              if (i < 0) throw new t("NUM");
              return n * i;
            }, 1);
          return Math.pow(r, 1 / i);
        }).args([
          ["numbers", ["collect", "number"]],
          ["?", ["assert", "$numbers.length > 0", "NUM"]],
        ]),
        n("harmean", function (n) {
          var i = n.length,
            r = n.reduce(function (n, i) {
              if (!i) throw new t("DIV/0");
              return n + 1 / i;
            }, 0);
          return i / r;
        }).args([
          ["numbers", ["collect", "number"]],
          ["?", ["assert", "$numbers.length > 0", "NUM"]],
        ]),
        n("trimmean", function (n, t) {
          var i,
            u,
            r,
            e = n.length;
          for (
            n.sort(f),
              i = Math.floor(e * t),
              i % 2 && --i,
              i /= 2,
              u = 0,
              r = i;
            r < e - i;
            ++r
          )
            u += n[r];
          return u / (e - 2 * i);
        }).args([
          ["numbers", ["collect", "number", 1]],
          ["percent", ["and", "number", ["[between)", 0, 1]]],
          ["?", ["assert", "$numbers.length > 0", "NUM"]],
        ]),
        n("frequency", function (n, t) {
          function e(t) {
            for (var r = 0; i < n.length && n[i] > u && n[i] <= t; ) ++r, ++i;
            return r;
          }
          var u, i, r;
          return (
            n.sort(f),
            t.sort(f),
            (u = -(1 / 0)),
            (i = 0),
            (r = new c(this)),
            t.forEach(function (n, t) {
              var i = e(n);
              u = n;
              r.set(t, 0, i);
            }),
            r.set(r.height, 0, n.length - i),
            r
          );
        }).args([
          ["data", ["collect", "number", 1]],
          ["bins", ["collect", "number", 1]],
        ]),
        n("rank.eq", function (n, i, r) {
          i.sort(r ? f : ft);
          var u = i.indexOf(n);
          return u < 0 ? new t("N/A") : u + 1;
        }).args([
          ["value", "number"],
          ["numbers", ["collect", "number"]],
          ["order", ["or", "logical", ["null", !1]]],
        ]),
        u("rank", "rank.eq"),
        n("rank.avg", function (n, i, r) {
          var u, e;
          if ((i.sort(r ? f : ft), (u = i.indexOf(n)), u < 0))
            return new t("N/A");
          for (e = u; i[e] == n; ++e);
          return (u + e + 1) / 2;
        }).args([
          ["value", "number"],
          ["numbers", ["collect", "number"]],
          ["order", ["or", "logical", ["null", !1]]],
        ]),
        n("kurt", function (n) {
          var t = n.length,
            i = p(n),
            r = w(n, t - 1, i),
            u = Math.sqrt(r),
            f = n.reduce(function (n, t) {
              return n + Math.pow((t - i) / u, 4);
            }, 0);
          return (
            ((t * (t + 1)) / ((t - 1) * (t - 2) * (t - 3))) * f -
            (3 * Math.pow(t - 1, 2)) / ((t - 2) * (t - 3))
          );
        }).args([
          ["numbers", ["collect", "number"]],
          ["?", ["assert", "$numbers.length >= 4", "NUM"]],
        ]),
        (lt = [
          ["array", ["collect", "number", 1]],
          ["x", "number"],
          ["significance", ["or", ["null", 3], "integer++"]],
          ["?", ["assert", "$array.length > 0", "NUM"]],
        ]),
        n("percentrank.inc", function (n, t, i) {
          var r = b(n, t, 0);
          return (r = r.toFixed(i + 1)), parseFloat(r.substr(0, r.length - 1));
        }).args(lt),
        n("percentrank.exc", function (n, t, i) {
          var r = b(n, t, 1);
          return (r = r.toFixed(i + 1)), parseFloat(r.substr(0, r.length - 1));
        }).args(lt),
        u("percentrank", "percentrank.inc"),
        n("covariance.p", function (n, t) {
          return wt(n, t, n.length);
        }).args([
          ["array1", ["collect", "number", 1]],
          ["array2", ["collect", "number", 1]],
          ["?", ["assert", "$array1.length == $array2.length", "N/A"]],
          ["?", ["assert", "$array1.length > 0", "DIV/0"]],
        ]),
        n("covariance.s", function (n, t) {
          return wt(n, t, n.length - 1);
        }).args([
          ["array1", ["collect", "number", 1]],
          ["array2", ["collect", "number", 1]],
          ["?", ["assert", "$array1.length == $array2.length", "N/A"]],
          ["?", ["assert", "$array1.length > 1", "DIV/0"]],
        ]),
        u("covar", "covariance.p"),
        (nt = v.memoize(function (n) {
          for (var t = 2, i = 1; t <= n; ++t) i *= t;
          return i;
        })),
        n("fact", nt).args([["*n", "integer+"]]),
        n("factdouble", function (n) {
          for (var t = 2 + (1 & n), i = 1; t <= n; t += 2) i *= t;
          return i;
        }).args([["*n", "integer+"]]),
        n("multinomial", function (n) {
          var i = 1,
            r = 0;
          return (
            n.forEach(function (n) {
              if (n < 0) throw new t("NUM");
              r += n;
              i *= nt(n);
            }),
            nt(r) / i
          );
        }).args([["numbers", ["collect", "number"]]]),
        (s = v.memoize(function (n, t) {
          for (var r = t + 1, i = 1, u = 1, f = 1; i <= n - t; ++r, ++i)
            (u *= r), (f *= i);
          return u / f;
        })),
        n("combin", s).args([
          ["*n", "integer++"],
          ["*k", ["and", "integer", ["[between]", 0, "$n"]]],
        ]),
        n("combina", function (n, t) {
          return s(n + t - 1, n - 1);
        }).args([
          ["*n", "integer++"],
          ["*k", ["and", "integer", ["[between]", 1, "$n"]]],
        ]),
        n("average", function (n) {
          var t = n.reduce(function (n, t) {
            return n + t;
          }, 0);
          return t / n.length;
        }).args([
          ["numbers", ["collect", "number!"]],
          ["?", ["assert", "$numbers.length > 0", "DIV/0"]],
        ]),
        n("averagea", function (n) {
          var r = 0,
            i = 0;
          return (
            n.forEach(function (n) {
              "string" != typeof n && (r += n);
              ++i;
            }),
            i ? r / i : new t("DIV/0")
          );
        }).args([["values", ["collect", "anyvalue"]]]),
        n("percentile.inc", kt).args([
          ["numbers", ["collect", "number", 1]],
          ["p", ["and", "number", ["[between]", 0, 1]]],
        ]),
        n("percentile.exc", dt).args([
          ["numbers", ["collect", "number", 1]],
          ["p", ["and", "number", ["(between)", 0, 1]]],
        ]),
        n("quartile.inc", function (n, t) {
          return kt(n, t / 4);
        }).args([
          ["numbers", ["collect", "number", 1]],
          ["quarter", ["values", 0, 1, 2, 3, 4]],
        ]),
        n("quartile.exc", function (n, t) {
          return dt(n, t / 4);
        }).args([
          ["numbers", ["collect", "number", 1]],
          ["quarter", ["values", 0, 1, 2, 3, 4]],
        ]),
        u("quartile", "quartile.inc"),
        u("percentile", "percentile.inc"),
        (at = [
          "AVERAGE",
          "COUNT",
          "COUNTA",
          "MAX",
          "MIN",
          "PRODUCT",
          "STDEV.S",
          "STDEV.P",
          "SUM",
          "VAR.S",
          "VAR.P",
          "MEDIAN",
          "MODE.SNGL",
          "LARGE",
          "SMALL",
          "PERCENTILE.INC",
          "QUARTILE.INC",
          "PERCENTILE.EXC",
          "QUARTILE.EXC",
        ]),
        n("aggregate", function (n, i, r, u) {
          var f = this;
          f.resolveCells(u, function () {
            var s, e;
            if (i > 12) {
              if (
                ((s = ut(f, u[0], r)),
                (e = u[1]),
                e instanceof o && (e = f.getRefData(e)),
                "number" != typeof e)
              )
                return n(new t("VALUE"));
            } else s = ut(f, u, r);
            f.func(at[i - 1], n, s);
          });
        }).argsAsync([
          [
            "funcId",
            [
              "values",
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
            ],
          ],
          ["options", ["or", ["null", 0], ["values", 0, 1, 2, 3, 4, 5, 6, 7]]],
          ["args", "rest"],
        ]),
        n("subtotal", function (n, t) {
          var i,
            r,
            u = this,
            f = t > 100;
          for (f && (t -= 100), i = [], r = 2; r < arguments.length; ++r)
            i.push(arguments[r]);
          u.resolveCells(i, function () {
            var r = ut(u, i, f ? 1 : 0);
            u.func(at[t - 1], n, r);
          });
        }).argsAsync([
          [
            "funcId",
            [
              "values",
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              101,
              102,
              103,
              104,
              105,
              106,
              107,
              108,
              109,
              110,
              111,
            ],
          ],
          ["+", ["ref", ["or", "ref", "#matrix"]]],
        ]),
        n("avedev", function (n) {
          var t =
            n.reduce(function (n, t) {
              return n + t;
            }, 0) / n.length;
          return (
            n.reduce(function (n, i) {
              return n + Math.abs(i - t);
            }, 0) / n.length
          );
        }).args([
          ["numbers", ["collect", "number"]],
          ["?", ["assert", "$numbers.length >= 2", "NUM"]],
        ]),
        n("binom.dist", gt).args([
          ["successes", "integer+"],
          ["trials", ["and", "integer", ["assert", "$trials >= $successes"]]],
          ["probability", ["and", "number", ["[between]", 0, 1]]],
          ["cumulative", "logical"],
        ]),
        u("binomdist", "binom.dist"),
        n("binom.inv", function (n, i, r) {
          for (var u = 0; u <= n; ++u) if (gt(u, n, i, !0) >= r) return u;
          return new t("N/A");
        }).args([
          ["trials", "integer+"],
          ["probability", ["and", "number", ["[between]", 0, 1]]],
          ["alpha", ["and", "number", ["[between]", 0, 1]]],
        ]),
        u("critbinom", "binom.inv"),
        n("binom.dist.range", function (n, t, i, r) {
          for (var f = 0, u = i; u <= r; ++u)
            f += s(n, u) * Math.pow(t, u) * Math.pow(1 - t, n - u);
          return f;
        }).args([
          ["trials", "integer+"],
          ["probability", ["and", "number", ["[between]", 0, 1]]],
          ["successes_min", ["and", "integer", ["[between]", 0, "$trials"]]],
          [
            "successes_max",
            [
              "or",
              ["and", "integer", ["[between]", "$successes_min", "$trials"]],
              ["null", "$successes_min"],
            ],
          ],
        ]),
        n("negbinom.dist", function (n, t, i, r) {
          if (r) {
            for (var u = 0; n >= 0; )
              (u += s(n + t - 1, n) * Math.pow(i, t) * Math.pow(1 - i, n)), n--;
            return u;
          }
          return s(n + t - 1, n) * Math.pow(i, t) * Math.pow(1 - i, n);
        }).args([
          ["number_f", "integer+"],
          ["number_s", "integer+"],
          ["probability_s", ["and", "number", ["[between]", 0, 1]]],
          ["cumulative", "logical"],
        ]),
        u("negbinomdist", "negbinom.dist"),
        n("address", function (n, t, i, r, u) {
          var f = new o(n - 1, t - 1, i - 1);
          return u && f.setSheet(u, !0), r ? f.print(0, 0) : f.print();
        }).args([
          ["row", "integer++"],
          ["col", "integer++"],
          ["abs", ["or", ["null", 1], ["values", 1, 2, 3, 4]]],
          ["a1", ["or", ["null", !0], "logical"]],
          ["sheet", ["or", "null", "string"]],
        ]),
        n("areas", function (n) {
          var t = 0;
          return (
            (function i(n) {
              n instanceof o || n instanceof g
                ? t++
                : n instanceof ot && n.refs.forEach(i);
            })(n),
            t
          );
        }).args([["ref", "ref"]]),
        n("choose", function (n, i) {
          return n > i.length ? new t("N/A") : i[n - 1];
        }).args([
          ["*index", "integer"],
          ["+", ["value", "anything"]],
        ]),
        n("column", function (n) {
          return n
            ? n instanceof o
              ? n.col + 1
              : this.asMatrix(n).mapCol(function (t) {
                  return t + n.topLeft.col + 1;
                })
            : this.formula.col + 1;
        }).args([["ref", ["or", "area", "null"]]]),
        n("columns", function (n) {
          return n instanceof y ? n.width() : n.width;
        }).args([["ref", ["or", "area", "#matrix"]]]),
        n("formulatext", function (n) {
          var i = this.getRefCells(n)[0];
          return i.formula ? i.formula.print(i.row, i.col) : new t("N/A");
        }).args([["ref", "ref"]]),
        n("hlookup", function (n, i, r, u) {
          var f = null;
          return (
            i.eachCol(function (t) {
              var r = i.get(0, t);
              if (u) {
                if (r > n) return !0;
                f = t;
              } else if (r === n) return (f = t), !0;
            }),
            null == f ? new t("N/A") : i.get(r - 1, f)
          );
        }).args([
          ["value", "anyvalue"],
          ["range", "matrix"],
          ["row", "integer++"],
          ["approx", ["or", "logical", ["null", !0]]],
        ]),
        n("index", function (n, i, r, u, f) {
          var s,
            h,
            l,
            e = this;
          if ((i instanceof ot && (i = i.refs[f - 1]), (!r && !u) || !i))
            return n(new t("N/A"));
          if ((i instanceof o && (i = i.toRangeRef()), i instanceof g)) {
            if (r && u)
              return u > i.width() || r > i.height()
                ? n(new t("REF"))
                : ((s = i.toCell(r - 1, u - 1)),
                  void e.resolveCells([s], function () {
                    n(e.getRefData(s));
                  }));
            if (!r)
              return (
                (h = i.toColumn(u - 1)),
                void e.resolveCells([h], function () {
                  n(e.asMatrix(h));
                })
              );
            if (!u)
              return (
                (l = i.toRow(r - 1)),
                void e.resolveCells([l], function () {
                  n(e.asMatrix(l));
                })
              );
          } else if (i instanceof c) {
            if (i.width > 1 && i.height > 1) {
              if (r && u) return n(i.get(r - 1, u - 1));
              if (!r)
                return n(
                  i.mapRow(function (n) {
                    return i.get(n, u - 1);
                  })
                );
              if (!u)
                return n(
                  i.mapCol(function (n) {
                    return i.get(r - 1, n);
                  })
                );
            }
            if (1 == i.width) return n(i.get(r - 1, 0));
            if (1 == i.height) return n(i.get(0, u - 1));
          } else n(new t("REF"));
        }).argsAsync([
          ["range", ["or", "ref", "matrix"]],
          ["row", ["or", "integer+", "null"]],
          ["col", ["or", "integer+", "null"]],
          ["areanum", ["or", "integer++", ["null", 1]]],
        ]),
        n("indirect", function (n) {
          var i, r;
          try {
            if (
              ((i = this.formula),
              (r = et.parseFormula(i.sheet, i.row, i.col, n)),
              !(r.ast instanceof y))
            )
              throw 1;
            return r.ast.absolute(i.row, i.col);
          } catch (u) {
            return new t("REF");
          }
        }).args([["thing", "string"]]),
        n("match", function (n, i, r) {
          var u,
            f = 1;
          return (
            0 === r
              ? (u = h(n))
              : r === -1
              ? (u = h("<=" + n))
              : 1 === r && (u = h(">=" + n)),
            i.each(function (t) {
              return null != t && u(t)
                ? (0 !== r && n != t && --f, !0)
                : void f++;
            }, !0) && f > 0
              ? f
              : new t("N/A")
          );
        }).args([
          ["value", "anyvalue"],
          ["range", "matrix"],
          ["type", ["or", ["values", -1, 0, 1], ["null", 1]]],
        ]),
        n("offset", function (n, i, r, u, f) {
          var e = (n instanceof o ? n : n.topLeft).clone();
          return (
            (e.row += i),
            (e.col += r),
            e.row < 0 || e.col < 0
              ? new t("VALUE")
              : u > 1 || f > 1
              ? new g(e, new o(e.row + u - 1, e.col + f - 1)).setSheet(
                  n.sheet,
                  n.hasSheet()
                )
              : e
          );
        }).args([
          ["ref", "area"],
          ["*rows", "integer"],
          ["*cols", "integer"],
          ["*height", ["or", "integer++", ["null", "$ref.height()"]]],
          ["*width", ["or", "integer++", ["null", "$ref.width()"]]],
        ]),
        n("row", function (n) {
          return n
            ? n instanceof o
              ? n.row + 1
              : this.asMatrix(n).mapRow(function (t) {
                  return t + n.topLeft.row + 1;
                })
            : this.formula.row + 1;
        }).args([["ref", ["or", "area", "null"]]]),
        n("rows", function (n) {
          return n instanceof y ? n.height() : n.height;
        }).args([["ref", ["or", "area", "#matrix"]]]),
        n("vlookup", function (n, i, r, u) {
          var f = null;
          return (
            "number" != typeof n && (u = !1),
            "string" == typeof n && (n = n.toLowerCase()),
            i.eachRow(function (t) {
              var r = i.get(t, 0);
              if (u) {
                if (r > n) return !0;
                f = t;
              } else if (("string" == typeof r && (r = r.toLowerCase()), r === n)) return (f = t), !0;
            }),
            null == f ? new t("N/A") : i.get(f, r - 1)
          );
        }).args([
          ["value", "anyvalue"],
          ["range", "matrix"],
          ["col", "integer++"],
          ["approx", ["or", "logical", ["null", !0]]],
        ]),
        n("date", function (n, t, i) {
          return a(n, t - 1, i);
        }).args([
          ["*year", "integer"],
          ["*month", "integer"],
          ["*date", "integer"],
        ]),
        n("day", function (n) {
          return r(n).date;
        }).args([["*date", "date"]]),
        n("month", function (n) {
          return r(n).month + 1;
        }).args([["*date", "date"]]),
        n("year", function (n) {
          return r(n).year;
        }).args([["*date", "date"]]),
        n("weekday", function (n) {
          return r(n).day + 1;
        }).args([["*date", "date"]]),
        n("weeknum", function (n, t) {
          var i,
            u = a(r(n).year, 0, 1),
            f = r(u);
          return (
            21 == t
              ? ((i = 3 - ((f.day + 6) % 7)),
                i < 0 && (i += 7),
                (u += i),
                (f.date += i),
                (f.day = 4),
                (t = 1))
              : (t = 1 == t ? 0 : 2 == t ? 1 : (t - 10) % 7),
            (i = f.day - t),
            i < 0 && (i += 7),
            (u -= i),
            Math.ceil((n + 1 - u) / 7)
          );
        }).args([
          ["*date", "date"],
          [
            "*type",
            [
              "or",
              ["null", 1],
              ["values", 1, 2, 11, 12, 13, 14, 15, 16, 17, 21],
            ],
          ],
        ]),
        n("isoweeknum", function (n) {
          var t = r(n),
            u = t.day || 7,
            i = Math.floor((t.ord - u + 10) / 7);
          return i < 1 ? ni(t.year - 1) : 53 == i && i > ni(t.year) ? 1 : i;
        }).args([["*date", "date"]]),
        n("now", function () {
          return i.dateToSerial(new Date());
        }).args([]),
        n("today", function () {
          return 0 | i.dateToSerial(new Date());
        }).args([]),
        n("time", function (n, t, r) {
          return i.packTime(n, t, r, 0);
        }).args([
          ["*hours", "integer"],
          ["*minutes", "integer"],
          ["*seconds", "integer"],
        ]),
        n("hour", function (n) {
          return i.unpackTime(n).hours;
        }).args([["*time", "datetime"]]),
        n("minute", function (n) {
          return i.unpackTime(n).minutes;
        }).args([["*time", "datetime"]]),
        n("second", function (n) {
          return i.unpackTime(n).seconds;
        }).args([["*time", "datetime"]]),
        n("edate", function (n, t) {
          var u = r(n),
            i = u.month + t,
            f = u.year + Math.floor(i / 12);
          return (
            (i %= 12),
            i < 0 && (i += 12),
            (u = Math.min(u.date, l(f, i))),
            a(f, i, u)
          );
        }).args([
          ["*start_date", "date"],
          ["*months", "integer"],
        ]),
        n("eomonth", function (n, t) {
          var u = r(n),
            i = u.month + t,
            f = u.year + Math.floor(i / 12);
          return (i %= 12), i < 0 && (i += 12), (u = l(f, i)), a(f, i, u);
        }).args([
          ["*start_date", "date"],
          ["*months", "integer"],
        ]),
        n("workday", function (n, t, i) {
          var u,
            f = t > 0 ? 1 : -1;
          for (t = Math.abs(t), u = r(n).day; t > 0; )
            (n += f),
              (u = (u + f) % 7),
              u > 0 && u < 6 && i.indexOf(n) < 0 && --t;
          return n;
        }).args([
          ["start_date", "date"],
          ["days", "integer"],
          ["holidays", ["collect", "date"]],
        ]),
        n("networkdays", function (n, t, i) {
          var e, f, u;
          for (
            n > t && ((e = n), (n = t), (t = e)), f = 0, u = r(n).day;
            n <= t;

          )
            u > 0 && u < 6 && i.indexOf(n) < 0 && f++, n++, (u = (u + 1) % 7);
          return f;
        }).args([
          ["start_date", "date"],
          ["end_date", "date"],
          ["holidays", ["collect", "date"]],
        ]),
        n("days", function (n, t) {
          return t - n;
        }).args([
          ["*start_date", "date"],
          ["*end_date", "date"],
        ]),
        (i._days_360 = k),
        n("days360", k).args([
          ["*start_date", "date"],
          ["*end_date", "date"],
          ["*method", ["or", "logical", ["null", !1]]],
        ]),
        n("yearfrac", function (n, t, i) {
          switch (i) {
            case 0:
              return k(n, t, !1) / 360;
            case 1:
              return (t - n) / ii(r(n).year);
            case 2:
              return (t - n) / 360;
            case 3:
              return (t - n) / 365;
            case 4:
              return k(n, t, !0) / 360;
          }
        }).args([
          ["*start_date", "date"],
          ["*end_date", "date"],
          ["*method", ["or", ["null", 0], ["values", 0, 1, 2, 3, 4]]],
        ]),
        n("datevalue", function (n) {
          var r = i.parseDate(n);
          return r ? i.dateToSerial(r) : new t("VALUE");
        }).args([["*text", "string"]]),
        n("timevalue", function (n) {
          var u,
            e,
            o,
            f,
            r = n
              .toLowerCase()
              .match(/(\d+):(\d+)(:(\d+)(\.(\d+))?)?\s*(am?|pm?)?/);
          return r
            ? ((u = parseFloat(r[1])),
              (e = parseFloat(r[2])),
              (o = r[3] ? parseFloat(r[4]) : 0),
              (f = r[7]),
              f && (u > 12 || u < 1)
                ? new t("VALUE")
                : (/^p/.test(f) && (u += 12), i.packTime(u, e, o, 0)))
            : new t("VALUE");
        }).args([["*text", "string"]]),
        n("mdeterm", function (n) {
          var i = n.each(function (n) {
            if ("number" != typeof n) return new t("VALUE");
          }, !0);
          return i || n.determinant();
        }).args([
          ["m", ["and", "matrix", ["assert", "$m.width == $m.height"]]],
        ]),
        n("transpose", function (n) {
          return n.transpose();
        }).args([["range", "matrix"]]),
        n("mmult", function (n, t) {
          return n.multiply(t);
        }).args([
          ["a", "matrix"],
          ["b", ["and", "matrix", ["assert", "$b.height == $a.width"]]],
        ]),
        n("munit", function (n) {
          return new c(this).unit(n);
        }).args([["n", "integer+"]]),
        n("minverse", function (n) {
          var i = n.each(function (n) {
            if ("number" != typeof n) return new t("VALUE");
          }, !0);
          return i || n.inverse() || new t("VALUE");
        }).args([
          ["m", ["and", "matrix", ["assert", "$m.width == $m.height"]]],
        ]),
        n("rand", function () {
          return Math.random();
        }).args([]),
        n("randbetween", function (n, t) {
          return n + Math.floor((t - n + 1) * Math.random());
        }).args([
          ["min", "integer"],
          ["max", ["and", "integer", ["assert", "$max >= $min"]]],
        ]),
        n("true", function () {
          return !0;
        }).args([]),
        n("false", function () {
          return !0;
        }).args([]),
        n("roman", function (n) {
          return v.arabicToRoman(n).toUpperCase();
        }).args([["*number", "integer"]]),
        n("arabic", function (n) {
          var i = v.romanToArabic(n);
          return null == i ? new t("VALUE") : i;
        }).args([["*roman", "string"]]),
        n("base", function (n, t, i) {
          for (var r = n.toString(t).toUpperCase(); r.length < i; ) r = "0" + r;
          return r;
        }).args([
          ["*number", "integer"],
          ["*radix", ["and", "integer", ["[between]", 2, 36]]],
          ["*minLen", ["or", "integer+", ["null", 0]]],
        ]),
        n("decimal", function (n, i) {
          var u, f, r;
          for (n = n.toUpperCase(), u = 0, f = 0; f < n.length; ++f) {
            if (((r = n.charCodeAt(f)), r >= 48 && r <= 57)) r -= 48;
            else {
              if (!(r >= 65 && r < 55 + i)) return new t("VALUE");
              r -= 55;
            }
            u = u * i + r;
          }
          return u;
        }).args([
          ["*text", "string"],
          ["*radix", ["and", "integer", ["[between]", 2, 36]]],
        ]),
        n("char", function (n) {
          return String.fromCharCode(n);
        }).args([["*code", "integer+"]]),
        (ri =
          /[\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g),
        n("clean", function (n) {
          return n.replace(ri, "");
        }).args([["*text", "string"]]),
        n("code", function (n) {
          return n.charAt(0);
        }).args([["*text", "string"]]),
        u("unichar", "char"),
        u("unicode", "code"),
        n("concatenate", function (n) {
          for (var i = "", t = 0; t < n.length; ++t) i += n[t];
          return i;
        }).args([["+", ["*text", "string"]]]),
        n("dollar", function (n, t) {
          for (
            var u = "$#,##0DECIMALS;($#,##0DECIMALS)", i = "", r = 1;
            t-- > 0;

          )
            i += "0";
          for (; ++t < 0; ) r *= 10;
          return (
            "" !== i ? (i = "." + i) : 1 !== r && (n = Math.round(n / r) * r),
            (u = u.replace(/DECIMALS/g, i)),
            e.formatting.text(n, u)
          );
        }).args([
          ["*number", "number"],
          ["*decimals", ["or", "integer", ["null", 2]]],
        ]),
        n("exact", function (n, t) {
          return n === t;
        }).args([
          ["*text1", "string"],
          ["*text2", "string"],
        ]),
        n("find", function (n, i, r) {
          var u = i.indexOf(n, r - 1);
          return u < 0 ? new t("VALUE") : u + 1;
        }).args([
          ["*substring", "string"],
          ["*string", "string"],
          ["*start", ["or", "integer++", ["null", 1]]],
        ]),
        n("fixed", function (n, t, i) {
          var r,
            u = Math.pow(10, t);
          if (((n = Math.round(n * u) / u), (r = i ? "0" : "#,##0"), t > 0))
            for (r += "."; t-- > 0; ) r += "0";
          return e.formatting.text(n, r);
        }).args([
          ["*number", "number"],
          ["*decimals", ["or", "integer", ["null", 2]]],
          ["*noCommas", ["or", "boolean", ["null", !1]]],
        ]),
        n("left", function (n, t) {
          return n.substr(0, t);
        }).args([
          ["*text", "string"],
          ["*length", ["or", "integer+", ["null", 1]]],
        ]),
        n("right", function (n, t) {
          return n.substr(-t);
        }).args([
          ["*text", "string"],
          ["*length", ["or", "integer+", ["null", 1]]],
        ]),
        n("len", function (n) {
          return n.length;
        }).args([["*text", "string"]]),
        n("lower", function (n) {
          return n.toLowerCase();
        }).args([["*text", "string"]]),
        n("upper", function (n) {
          return n.toUpperCase();
        }).args([["*text", "string"]]),
        n("ltrim", function (n) {
          return n.replace(/^\s+/, "");
        }).args([["*text", "string"]]),
        n("rtrim", function (n) {
          return n.replace(/\s+$/, "");
        }).args([["*text", "string"]]),
        n("trim", function (n) {
          return n.replace(/^\s+|\s+$/, "");
        }).args([["*text", "string"]]),
        n("mid", function (n, t, i) {
          return n.substr(t - 1, i);
        }).args([
          ["*text", "string"],
          ["*start", "integer++"],
          ["*length", "integer+"],
        ]),
        n("proper", function (n) {
          return n.toLowerCase().replace(/\b./g, function (n) {
            return n.toUpperCase();
          });
        }).args([["*text", "string"]]),
        n("replace", function (n, t, i, r) {
          return n.substr(0, --t) + r + n.substr(t + i);
        }).args([
          ["*text", "string"],
          ["*start", "integer++"],
          ["*length", "integer+"],
          ["*newText", "string"],
        ]),
        n("rept", function (n, t) {
          for (var i = ""; t-- > 0; ) i += n;
          return i;
        }).args([
          ["*text", "string"],
          ["*number", "integer+"],
        ]),
        n("search", function (n, i, r) {
          var u = i.toLowerCase().indexOf(n.toLowerCase(), r - 1);
          return u < 0 ? new t("VALUE") : u + 1;
        }).args([
          ["*substring", "string"],
          ["*string", "string"],
          ["*start", ["or", "integer++", ["null", 1]]],
        ]),
        n("substitute", function (n, t, i, r) {
          function f() {
            n = n.substring(0, u) + i + n.substring(u + t.length);
          }
          if (t === i) return n;
          for (var u = -1; (u = n.indexOf(t, u + 1)) >= 0; )
            if (null == r) f();
            else if (0 == --r) {
              f();
              break;
            }
          return n;
        }).args([
          ["*text", "string"],
          ["*oldText", "string"],
          ["*newText", "string"],
          ["*nth", ["or", "integer++", "null"]],
        ]),
        n("t", function (n) {
          return "string" == typeof n ? n : "";
        }).args([["*value", "anyvalue"]]),
        n("text", function (n, t) {
          return e.formatting.text(n, t);
        }).args([
          ["*value", "anyvalue"],
          ["*format", "string"],
        ]),
        n("value", function (n) {
          return "number" == typeof n
            ? n
            : "boolean" == typeof n
            ? +n
            : ((n = (n + "").replace(/[$€,]/g, "")),
              (n = parseFloat(n)),
              isNaN(n) ? new t("VALUE") : n);
        }).args([["*value", "anyvalue"]]),
        (ti.prototype.toString = function () {
          return this.text;
        }),
        n("hyperlink", function (n, t) {
          return new ti(n, t);
        }).args([
          ["*link", "string"],
          ["*text", ["or", "string", ["null", "$link"]]],
        ]),
        n("iferror", function (n, i) {
          return n instanceof t ? i : n;
        }).args([
          ["*value", "forced!"],
          ["*value_if_error", "anyvalue!"],
        ]),
        (h = (function () {
          function t(n, t) {
            if ("string" == typeof t) {
              var i = parseFloat(t);
              isNaN(i) || i != t || (t = i);
            }
            return function (i) {
              var r = t;
              return (
                "string" == typeof i &&
                  "string" == typeof r &&
                  ((i = i.toLowerCase()), (r = r.toLowerCase())),
                n(i, r)
              );
            };
          }
          function n(n) {
            var t, i;
            return (
              "string" == typeof n && (n = n.toLowerCase()),
              /^[0-9.]+%$/.test(n)
                ? ((i = n.substr(0, n.length - 1)),
                  (t = parseFloat(i)),
                  isNaN(t) || t != i || (n = t / 100))
                : /^[0-9.]+$/.test(n) &&
                  ((t = parseFloat(n)), isNaN(t) || t != n || (n = t)),
              n
            );
          }
          function u(t, i) {
            return n(t) < n(i);
          }
          function f(t, i) {
            return n(t) <= n(i);
          }
          function e(t, i) {
            return n(t) > n(i);
          }
          function o(t, i) {
            return n(t) >= n(i);
          }
          function s(n, t) {
            return !i(n, t);
          }
          function i(t, i) {
            return i instanceof RegExp
              ? i.test(t)
              : (("string" != typeof t && "string" != typeof i) ||
                  ((t += ""), (i += "")),
                n(t) == n(i));
          }
          var r = Object.create(null);
          return function (n) {
            var h, c;
            return "function" == typeof n
              ? n
              : (h = /^=(.*)$/.exec(n))
              ? t(i, h[1])
              : (h = /^<>(.*)$/.exec(n))
              ? t(s, h[1])
              : (h = /^<=(.*)$/.exec(n))
              ? t(f, h[1])
              : (h = /^<(.*)$/.exec(n))
              ? t(u, h[1])
              : (h = /^>=(.*)$/.exec(n))
              ? t(o, h[1])
              : (h = /^>(.*)$/.exec(n))
              ? t(e, h[1])
              : /[?*]/.exec(n)
              ? ((c = r[n]),
                c ||
                  ((c = n.replace(
                    /(~\?|~\*|[\]({\+\.\|\^\$\\})\[]|[?*])/g,
                    function (n) {
                      switch (n) {
                        case "~?":
                          return "\\?";
                        case "~*":
                          return "\\*";
                        case "?":
                          return ".";
                        case "*":
                          return ".*";
                        default:
                          return "\\" + n;
                      }
                    }
                  )),
                  (c = r[n] = RegExp("^" + c + "$", "i"))),
                t(i, c))
              : t(i, n);
          };
        })()));
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/runtime.functions.2.min", ["spreadsheet/runtime.min"], n);
  })(
    function () {
      "use strict";
      function c(n) {
        var r, u, f, t;
        if (i(n) >= 3.3) return 1 - lt(n);
        for (
          r = n > 0 ? 1 : -1, r == -1 && (n = -n), u = 0, f = 1, t = 1;
          t < 100;
          t++
        )
          (u += f), (f *= (2 * n * n) / (2 * t + 1));
        return ((2 * r) / Math.sqrt(Math.PI)) * n * Math.exp(-n * n) * u;
      }
      function lt(n) {
        var u, t, r;
        if (i(n) < 3.3) return 1 - c(n);
        for (
          u = 1, n < 0 && ((u = -1), (n = -n)), t = n, r = 8;
          r >= 1;
          r -= 0.5
        )
          t = n + r / t;
        return (
          (t = 1 / (n + t)),
          1 == u
            ? (Math.exp(-n * n) / Math.sqrt(Math.PI)) * t
            : 2 - (Math.exp(-n * n) / Math.sqrt(Math.PI)) * t
        );
      }
      function s(n) {
        var t,
          r = [
            1.0000000001900149, 76.180091729471457, -86.505320329416776,
            24.014098240830911, -1.231739572450155, 0.001208650973866179,
            -5395239384953e-18,
          ],
          u = n,
          i = n + 5.5,
          f = r[0];
        for (i -= (n + 0.5) * Math.log(i), t = 1; t <= 6; t++)
          (u += 1), (f += r[t] / u);
        return -i + Math.log((Math.sqrt(2 * Math.PI) * f) / n);
      }
      function g(n) {
        if (n > 0) return Math.exp(s(n));
        var i = Math.PI,
          t = -n;
        return -i / (t * g(t) * Math.sin(i * t));
      }
      function nt(n, t) {
        return s(n) + s(t) - s(n + t);
      }
      function at(n, t) {
        return Math.exp(nt(n, t));
      }
      function li(n, t) {
        return t < n + 1 ? ai(n, t) : 1 - vi(n, t);
      }
      function ai(n, t) {
        for (
          var r = 1 / n, f = r, e = n, o = s(n), u = 1;
          u <= a && (e++, (f *= t / e), (r += f), !(i(f) < i(r) * w));
          u++
        );
        return r * Math.exp(-t + n * Math.log(t) - o);
      }
      function vi(n, t) {
        for (
          var o, h = r, e = h, u = 0, c = 1, l = t + 1 - n, v = s(n), f = 1;
          f <= a &&
          ((u = l + c * u),
          i(u) < r && (u = r),
          (e = l + c / e),
          i(e) < r && (e = r),
          (u = 1 / u),
          (o = e * u),
          (h *= o),
          !(i(o - 1) < w));
          f++
        )
          (l += 2), (c = -f * (f - n));
        return h * Math.exp(-t - v + n * Math.log(t));
      }
      function tt(n, t, i, r) {
        return r
          ? li(t, n / i)
          : (Math.pow(n / i, t - 1) * Math.exp(-n / i)) / (i * g(t));
      }
      function vt(n, t, r) {
        var e, f, u, o, s, h;
        if (0 === n) return 0;
        if (1 == n) return 1 / 0;
        for (
          e = 0, f = 10, u = 0, o = t * r, o > 1 && (f *= o), s = 0;
          s < a &&
          ((u = 0.5 * (e + f)), (h = tt(u, t, r, !0)), !(i(n - h) < 1e-16));
          s++
        )
          h > n ? (f = u) : (e = u);
        return u;
      }
      function b(n, t) {
        return t
          ? 0.5 + 0.5 * c(n / Math.sqrt(2))
          : Math.exp((-n * n) / 2) / Math.sqrt(2 * Math.PI);
      }
      function it(n) {
        var t,
          r,
          f = [
            -39.696830286653757, 220.9460984245205, -275.92851044696869,
            138.357751867269, -30.66479806614716, 2.5066282774592392,
          ],
          e = [
            -54.476098798224058, 161.58583685804089, -155.69897985988661,
            66.80131188771972, -13.280681552885721,
          ],
          i = [
            -0.0077848940024302926, -0.32239645804113648, -2.4007582771618381,
            -2.5497325393437338, 4.3746641414649678, 2.9381639826987831,
          ],
          u = [
            0.0077846957090414622, 0.32246712907003983, 2.445134137142996,
            3.7544086619074162,
          ],
          o = 0.02425,
          s = 1 - o;
        return n < o
          ? ((t = Math.sqrt(-2 * Math.log(n))),
            (((((i[0] * t + i[1]) * t + i[2]) * t + i[3]) * t + i[4]) * t +
              i[5]) /
              ((((u[0] * t + u[1]) * t + u[2]) * t + u[3]) * t + 1))
          : s < n
          ? ((t = Math.sqrt(-2 * Math.log(1 - n))),
            -(
              ((((i[0] * t + i[1]) * t + i[2]) * t + i[3]) * t + i[4]) * t +
              i[5]
            ) /
              ((((u[0] * t + u[1]) * t + u[2]) * t + u[3]) * t + 1))
          : ((t = n - 0.5),
            (r = t * t),
            ((((((f[0] * r + f[1]) * r + f[2]) * r + f[3]) * r + f[4]) * r +
              f[5]) *
              t) /
              (((((e[0] * r + e[1]) * r + e[2]) * r + e[3]) * r + e[4]) * r +
                1));
      }
      function yi(n, t, i, r) {
        return r
          ? b((n - t) / i, !0)
          : Math.exp((-(n - t) * (n - t)) / (2 * i * i)) /
              (i * Math.sqrt(2 * Math.PI));
      }
      function yt(n, t, i) {
        return t + i * it(n);
      }
      function pi(n, t, i) {
        return Math.exp(
          (t - 1) * Math.log(n) + (i - 1) * Math.log(1 - n) - nt(t, i)
        );
      }
      function v(n, t, i) {
        var r = Math.exp(t * Math.log(n) + i * Math.log(1 - n) - nt(t, i));
        return n < (t + 1) / (t + i + 2)
          ? (r * pt(t, i, n)) / t
          : 1 - (r * pt(i, t, 1 - n)) / i;
      }
      function pt(n, t, u) {
        var o,
          h,
          s,
          l,
          c,
          v = n + t,
          y = n + 1,
          p = n - 1,
          e = 1,
          f = 1 - (v * u) / y;
        for (
          i(f) < r && (f = r), f = 1 / f, c = f, o = 1;
          o <= a &&
          ((h = 2 * o),
          (s = (o * (t - o) * u) / ((p + h) * (n + h))),
          (f = 1 + s * f),
          i(f) < r && (f = r),
          (e = 1 + s / e),
          i(e) < r && (e = r),
          (f = 1 / f),
          (c *= f * e),
          (s = (-(n + o) * (v + o) * u) / ((n + h) * (y + h))),
          (f = 1 + s * f),
          i(f) < r && (f = r),
          (e = 1 + s / e),
          i(e) < r && (e = r),
          (f = 1 / f),
          (l = f * e),
          (c *= l),
          !(i(l - 1) < w));
          o++
        );
        return c;
      }
      function wt(n, t, r) {
        for (
          var e, o = 0, s = 1, u = 0, f = 0;
          f < a && ((u = 0.5 * (o + s)), (e = v(u, t, r)), !(i(n - e) < w));
          f++
        )
          e > n ? (s = u) : (o = u);
        return u;
      }
      function wi(n, t, i, r, u) {
        return v((n - r) / (u - r), t, i);
      }
      function bi(n, t, i, r, u, f) {
        return r
          ? v((n - u) / (f - u), t, i)
          : pi((n - u) / (f - u), t, i) / (f - u);
      }
      function rt(n, t, i, r, u) {
        return r + (u - r) * wt(n, t, i);
      }
      function ut(n, t, i) {
        return tt(n, t / 2, 2, i);
      }
      function bt(n, t) {
        return 1 - ut(n, t, !0);
      }
      function kt(n, t) {
        return vt(n, t / 2, 2);
      }
      function ki(n, t) {
        return kt(1 - n, t);
      }
      function di(n, t) {
        for (
          var r, f, u, e, o = n.length, s = n[0].length, h = 0, i = 0;
          i < o;
          i++
        )
          for (r = 0; r < s; r++)
            (f = t[i][r]), (u = n[i][r] - f), (u *= u), (h += u / f);
        return (e = (o - 1) * (s - 1)), bt(h, e);
      }
      function gi(n, t, i) {
        return i ? 1 - Math.exp(-t * n) : t * Math.exp(-t * n);
      }
      function nr(n, t, i) {
        var u, r;
        if (i) return 1 - ut(2 * t, 2 * (n + 1), !0);
        for (u = 0, r = 2; r <= n; r++) u += Math.log(r);
        return Math.exp(n * Math.log(t) - t - u);
      }
      function ft(n, t, i, r) {
        if (r) return v((t * n) / (i + t * n), t / 2, i / 2);
        var u = t / i;
        return (
          (t /= 2),
          (i /= 2),
          ((u / at(t, i)) * Math.pow(u * n, t - 1)) / Math.pow(1 + u * n, t + i)
        );
      }
      function tr(n, t, i) {
        return 1 - ft(n, t, i, !0);
      }
      function ir(n, t, i) {
        return (i / t) * (1 / rt(n, i / 2, t / 2, 0, 1) - 1);
      }
      function rr(n, t, i) {
        return (i / t) * (1 / rt(1 - n, i / 2, t / 2, 0, 1) - 1);
      }
      function u(n) {
        for (var i = 0, r = n.length, t = 0; t < r; t++) i += n[t];
        return i / r;
      }
      function k(n, t) {
        for (var r, u = 0, f = n.length, i = 0; i < f; i++)
          (r = n[i] - t), (u += r * r);
        return u / (f - 1);
      }
      function ur(n, t) {
        var f = n.length - 1,
          e = t.length - 1,
          i = k(n, u(n)),
          r = k(t, u(t));
        if (!i || !r) throw new l("DIV/0");
        return 2 * ft(i / r, f, e, !0);
      }
      function fr(n) {
        return 0.5 * Math.log((1 + n) / (1 - n));
      }
      function er(n) {
        var t = Math.exp(2 * n);
        return (t - 1) / (t + 1);
      }
      function dt(n, t, i) {
        return i
          ? 1 - 0.5 * v(t / (n * n + t), t / 2, 0.5)
          : (1 / (Math.sqrt(t) * at(0.5, t / 2))) *
              Math.pow(1 + (n * n) / t, -(t + 1) / 2);
      }
      function y(n, t) {
        return 1 - dt(n, t, !0);
      }
      function d(n, t) {
        return n < 0 && (n = -n), 2 * y(n, t);
      }
      function et(n, t) {
        var i = wt(2 * Math.min(n, 1 - n), t / 2, 0.5);
        return (i = Math.sqrt((t * (1 - i)) / i)), n > 0.5 ? i : -i;
      }
      function or(n, t) {
        return et(1 - n / 2, t);
      }
      function sr(n, t, r, f) {
        var o,
          s,
          l,
          b,
          c,
          a,
          g,
          v,
          p,
          nt,
          tt,
          it,
          rt,
          w,
          ut,
          ft,
          e = n.length,
          h = t.length;
        if (1 == f) {
          for (l = 0, b = 0, c = 0; c < e; c++)
            (a = n[c] - t[c]), (l += a), (b += a * a);
          return (
            (g = l / e),
            (o = g / Math.sqrt((b - l * g) / (e * (e - 1)))),
            1 == r ? y(o, e - 1) : d(o, e - 1)
          );
        }
        return (
          (v = u(n)),
          (p = u(t)),
          (nt = k(n, v)),
          (tt = k(t, p)),
          3 == f
            ? ((it = nt / e),
              (rt = tt / h),
              (w = it + rt),
              (ut = it / w),
              (ft = rt / w),
              (s = 1 / ((ut * ut) / (e - 1) + (ft * ft) / (h - 1))),
              (o = i(v - p) / Math.sqrt(w)),
              1 == r ? y(o, s) : d(o, s))
            : ((s = e + h - 2),
              (o =
                i(v - p) *
                Math.sqrt(
                  (s * e * h) / ((e + h) * ((e - 1) * nt + (h - 1) * tt))
                )),
              1 == r ? y(o, s) : d(o, s))
        );
      }
      function hr(n, t, i) {
        return (-et(n / 2, i - 1) * t) / Math.sqrt(i);
      }
      function cr(n, t, i) {
        return (-it(n / 2) * t) / Math.sqrt(i);
      }
      function lr(n) {
        return b(n, !0) - 0.5;
      }
      function ar(n) {
        return b(n);
      }
      function vr(n, t, i, r) {
        if (r) return 0.5 + 0.5 * c((Math.log(n) - t) / (i * Math.sqrt(2)));
        var u = Math.log(n) - t;
        return (
          Math.exp((-u * u) / (2 * i * i)) / (n * i * Math.sqrt(2 * Math.PI))
        );
      }
      function yr(n, t, i) {
        return Math.exp(yt(n, t, i));
      }
      function pr(n, t, i, r) {
        for (var f, e, o = n.length, s = 0, u = 0; u < o; u++) {
          if (t[u] <= 0 || t[u] > 1) throw new l("NUM");
          s += t[u];
        }
        if (1 != s) throw new l("NUM");
        for (f = 0, u = 0; u < o; u++)
          (e = n[u]), e >= i && e <= r && (f += t[u]);
        return f;
      }
      function wr(n, t) {
        for (
          var r, s = u(t), h = u(n), e = 0, o = 0, i = 0, f = n.length;
          i < f;
          i++
        )
          (r = t[i] - s), (e += r * (n[i] - h)), (o += r * r);
        return e / o;
      }
      function br(n, t) {
        for (
          var r, e = u(t), o = u(n), s = 0, h = 0, i = 0, f = n.length;
          i < f;
          i++
        )
          (r = t[i] - e), (s += r * (n[i] - o)), (h += r * r);
        return o - (s * e) / h;
      }
      function gt(n, t) {
        var h, c, e, o, s, i, l, r, f;
        for (
          yf(n, t),
            h = u(n),
            c = u(t),
            e = 0,
            o = 0,
            s = 0,
            i = 0,
            l = n.length;
          i < l;
          i++
        )
          (r = n[i] - h),
            (f = t[i] - c),
            (e += r * f),
            (o += r * r),
            (s += f * f);
        return e / Math.sqrt(o * s);
      }
      function kr(n, t) {
        var i = gt(n, t);
        return i * i;
      }
      function dr(n, t) {
        for (
          var r,
            f,
            o = t.length,
            c = u(t),
            l = u(n),
            s = 0,
            e = 0,
            h = 0,
            i = 0;
          i < o;
          i++
        )
          (r = t[i] - c),
            (f = n[i] - l),
            (s += f * f),
            (e += r * f),
            (h += r * r);
        return Math.sqrt((s - (e * e) / h) / (o - 2));
      }
      function gr(n, t, i) {
        for (
          var f, h, e, c, a = u(i), v = u(t), y = 0, o = 0, r = 0, s = i.length;
          r < s;
          r++
        )
          (f = i[r] - a), (h = t[r] - v), (y += f * h), (o += f * f);
        if (0 === o) throw new l("N/A");
        return (e = y / o), (c = v - e * a), c + e * n;
      }
      function ni(n) {
        for (var i = n.height, r = 0, t = 0; t < i; t++) r += n.data[t][0];
        return r / i;
      }
      function ti(n, t) {
        for (var r, f = n.height, u = 0, i = 0; i < f; i++)
          (r = n.data[i][0] - t), (u += r * r);
        return u;
      }
      function ii(n, t, i, r) {
        var h,
          c,
          o,
          l,
          v,
          d,
          s,
          g,
          f,
          y,
          a,
          e,
          nt,
          p,
          tt,
          w,
          b,
          k,
          u = 0;
        for (
          t ||
            (t = n.map(function () {
              return ++u;
            })),
            i &&
              ((t = t.clone()),
              t.eachRow(function (n) {
                t.data[n].unshift(1);
              }),
              ++t.width),
            h = t.transpose(),
            c = h.multiply(t).inverse().multiply(h).multiply(n),
            o = [],
            u = c.height - 1;
          u >= 0;
          u--
        )
          o.push(c.data[u][0]);
        if ((i || o.push(0), !r)) return this.asMatrix([o]);
        for (
          l = t.multiply(c),
            v = n.adds(l, !0),
            d = i ? ni(l) : 0,
            s = ti(l, d),
            g = i ? ni(v) : 0,
            f = ti(v, g),
            y = [],
            y.push(s, f),
            a = s / (s + f),
            e = n.height - t.width,
            nt = Math.sqrt(f / e),
            p = [],
            p.push(a, nt),
            tt = i ? s / (t.width - 1) / (f / e) : a / t.width / ((1 - a) / e),
            w = [],
            w.push(tt, e),
            b = h.multiply(t).inverse(),
            k = [],
            u = b.height - 1;
          u >= 0;
          u--
        )
          k.push(Math.sqrt((b.data[u][u] * f) / e));
        return this.asMatrix([o, k, p, w, y]);
      }
      function nu(n, t, i, r) {
        return ii.call(this, n.map(Math.log), t, i, r).map(Math.exp);
      }
      function ri(n, t, i, r) {
        var u,
          f,
          e = 0;
        return (
          t ||
            (t = n.map(function () {
              return ++e;
            })),
          r &&
            ((t = t.clone()),
            t.eachRow(function (n) {
              t.data[n].unshift(1);
            }),
            ++t.width),
          (u = t.transpose()),
          (f = u.multiply(t).inverse().multiply(u).multiply(n)),
          i
            ? r &&
              ((i = i.clone()),
              i.eachRow(function (n) {
                i.data[n].unshift(1);
              }),
              ++i.width)
            : (i = t),
          i.multiply(f)
        );
      }
      function tu(n, t, i, r) {
        return ri.call(this, n.map(Math.log), t, i, r).map(Math.exp);
      }
      function ot(n, t, i, r) {
        for (
          var f, s, h, e, c = i || 20, a = r || 1e-7, o = t, u = 1;
          u <= c;
          u++
        )
          if (
            ((f = n(o)),
            (s = f[0]),
            (h = f[1]),
            (e = s / h),
            (o -= e),
            Math.abs(e) < a)
          )
            return o;
        return new l("NUM");
      }
      function ui(n, t, i, r, u) {
        var f = Math.pow(1 + n, t),
          e = n ? (f - 1) / n : t;
        return -(r * f + i * e * (1 + n * u));
      }
      function iu(n, t, i, r, u) {
        if (!n) return -r - i * t;
        var f = Math.pow(1 + n, t);
        return -(r + ((i * (f - 1)) / n) * (1 + n * u)) / f;
      }
      function st(n, t, i, r, u) {
        if (!n) return -(r + i) / t;
        var f = Math.pow(1 + n, t);
        return (-n * (r + i * f)) / ((1 + n * u) * (f - 1));
      }
      function ru(n, t, i, r, u) {
        if (!n) return -(r + i) / t;
        var f = t * (1 + n * u);
        return Math.log((f - r * n) / (f + i * n)) / Math.log(1 + n);
      }
      function uu(n, t, i, r, u, f) {
        function e(f) {
          var e = Math.pow(1 + f, n - 1),
            o = e * (1 + f);
          return [
            i * o + t * (1 / f + u) * (o - 1) + r,
            n * i * e + t * (-(o - 1) / (f * f) + (1 / f + u) * n * e),
          ];
        }
        return ot(e, f);
      }
      function ht(n, t, i, r, u, f) {
        var o, e;
        return 1 == f && 1 == t
          ? 0
          : ((o = st(n, i, r, u, f)),
            (e = ui(n, t - 1, o, r, f) * n),
            f ? e / (1 + n) : e);
      }
      function fu(n, t, i, r, u, f) {
        var e = st(n, i, r, u, f);
        return e - ht(n, t, i, r, u, f);
      }
      function eu(n, t, i, r, u, f) {
        var e, o, s, h, c, l;
        return (
          1 == f && (r--, u--),
          (e = Math.pow(1 + n, t)),
          (o = Math.pow(1 + n, r - 1)),
          (s = Math.pow(1 + n, u)),
          (h = (n * i * e) / (e - 1)),
          (c = o * i - ((o - 1) / n) * h),
          (l = s * i - ((s - 1) / n) * h),
          l - c
        );
      }
      function ou(n, t, i, r, u, f) {
        for (var o = 0, e = r; e <= u; e++) o += ht(n, e, t, i, 0, f);
        return o;
      }
      function su(n, t) {
        for (var u = 0, i = 0, r = t.length; i < r; i++)
          u += t[i] * Math.pow(1 + n, -i - 1);
        return u;
      }
      function hu(n, t) {
        function i(t) {
          for (var u = 0, f = 0, i = 0, r = n.length; i < r; i++)
            (u += n[i] * Math.pow(1 + t, -i - 1)),
              (f += -i * n[i] * Math.pow(1 + t, -i - 2));
          return [u, f];
        }
        return ot(i, t);
      }
      function cu(n, t) {
        return Math.pow(1 + n / t, t) - 1;
      }
      function lu(n, t) {
        return t * (Math.pow(n + 1, 1 / t) - 1);
      }
      function au(n, t, i) {
        for (var f = 0, r = 0, u = t.length; r < u; r++)
          f += t[r] * Math.pow(1 + n, (i[0] - i[r]) / 365);
        return f;
      }
      function vu(n, t, i) {
        function r(i) {
          for (var u, e = n[0], o = 0, r = 1, f = n.length; r < f; r++)
            (u = (t[0] - t[r]) / 365),
              (e += n[r] * Math.pow(1 + i, u)),
              (o += u * n[r] * Math.pow(1 + i, u - 1));
          return [e, o];
        }
        return ot(r, i);
      }
      function yu(n, t, i, r) {
        var u = -r * n;
        return u * (1 - t / i);
      }
      function pu(n, t, i, r, u) {
        var f,
          o,
          e = 1 - Math.pow(t / n, 1 / i);
        if (
          ((e = Math.floor(1e3 * e + 0.5) / 1e3),
          (f = (n * e * u) / 12),
          1 == r)
        )
          return f;
        for (o = 1; o < i; o++) {
          if (o == r - 1) return (n - f) * e;
          f += (n - f) * e;
        }
        return ((n - f) * e * (12 - u)) / 12;
      }
      function wu(n, t, i, r, u) {
        var f = u / i,
          e = -n * (Math.pow(1 - f, r - 1) - 1),
          o = (n - e) * f;
        return Math.min(o, Math.max(0, n - e - t));
      }
      function bu(n, t, i) {
        return (n - t) / i;
      }
      function ku(n, t, i, r) {
        return ((n - t) * (i - r + 1) * 2) / (i * (i + 1));
      }
      function du(n, t, i, r, u, f, e) {
        function y(n, i) {
          var r, u, f;
          return (
            (u = 1 == c ? (1 == i ? n : 0) : n * Math.pow(1 - c, i - 1)),
            (f = n * Math.pow(1 - c, i)),
            (r = f < t ? u - t : u - f),
            r < 0 ? 0 : r
          );
        }
        function p(n, i, r) {
          for (
            var f, e, h = n - t, s = Math.ceil(r), o = 0, c = 0, l = !1, u = 1;
            u <= s;
            u++
          )
            l
              ? (f = o)
              : ((e = y(n, u)),
                (o = h / (i - u + 1)),
                o > e ? ((f = o), (l = !0)) : ((f = e), (h -= e))),
              u == s && (f *= r + 1 - s),
              (c += f);
          return c;
        }
        var o,
          s,
          h,
          w,
          c = f >= i ? 1 : f / i,
          l = Math.floor(r),
          a = Math.ceil(u),
          v = 0;
        if (e)
          for (o = l + 1; o <= a; o++)
            (s = y(n, o)),
              o == l + 1
                ? (s *= Math.min(u, l + 1) - r)
                : o == a && (s *= u + 1 - a),
              (v += s);
        else
          (h = i),
            r != Math.floor(r) &&
              f > 1 &&
              r >= i / 2 &&
              ((w = r - i / 2), (r = i / 2), (u -= w), (h += 1)),
            (n -= p(n, h, r)),
            (v = p(n, i - r, u - r));
        return v;
      }
      function ct(n, t) {
        var r = f(n),
          i = r.month + t,
          u = r.year + Math.floor(i / 12);
        return (
          (i %= 12),
          i < 0 && (i += 12),
          (r = Math.min(r.date, hi(u, i))),
          si(u, i, r)
        );
      }
      function t(n, t, i) {
        return 1 == i || 2 == i || 3 == i ? t - n : ci(n, t, i);
      }
      function e(n, t, i) {
        var u,
          o,
          e,
          s = f(n),
          h = f(t),
          r = h.year - s.year;
        r > 0 && (r = (r - 1) * i);
        e = 12 / i;
        do r++, (u = ct(t, -r * e));
        while (n < u);
        return r--, (o = ct(t, -r * e)), [u, o];
      }
      function gu(n, t, i) {
        var r,
          e,
          o,
          s = f(t),
          h = f(n),
          u = s.year - h.year;
        for (u > 0 && (u = (u - 1) * i), r = n, o = 12 / i; t > r; )
          (e = r), u++, (r = ct(n, u * o));
        return [e, r];
      }
      function nf(n, i, r, u) {
        var f = e(n, i, r)[0];
        return t(f, n, u);
      }
      function tf(n, i, r, u) {
        if (1 == u) {
          var f = e(n, i, r);
          return t(f[0], f[1], 1);
        }
        return 3 == u ? 365 / r : 360 / r;
      }
      function rf(n, i, r, u) {
        var f = e(n, i, r)[1];
        return t(n, f, u);
      }
      function uf(n, t, i) {
        return e(n, t, i)[0];
      }
      function ff(n, t, i) {
        return e(n, t, i)[1];
      }
      function ef(n, t, i) {
        var r = f(n),
          u = f(t),
          e = 12 * (u.year - r.year) + u.month - r.month;
        return 1 + (((e * i) / 12) | 0);
      }
      function fi(n, t) {
        return 3 == t ? 365 : 1 == t ? (p(n) ? 366 : 365) : 360;
      }
      function of(n, i, r, u, e) {
        var o = fi(f(i).year, e);
        return (r * u * t(n, i, e)) / o;
      }
      function sf(n, i, r, u, f, o, s, h) {
        function w(n, t) {
          return (((t - n) * o) / d) | 0;
        }
        var c,
          l,
          a,
          k,
          p,
          v,
          b = 0,
          y = (f * u) / o,
          d = s % 2 == 0 ? 360 : 365;
        return r <= i
          ? ((c = e(r, i, o)),
            (l = c[0]),
            (a = c[1]),
            l <= n
              ? (y * t(n, r, s)) / t(l, a, s)
              : ((c = e(n, l, o)),
                (k = c[0]),
                (p = c[1]),
                (v = w(p, r)),
                y *
                  (v +
                    t(n, p, s) / t(k, p, s) +
                    (r < a ? t(l, r, s) / t(l, a, s) : 0))))
          : ((c = gu(i, r, o)),
            (l = c[0]),
            (a = c[1]),
            (v = w(i, r)),
            (b = a == r ? y * v : y * (v + t(l, r, s) / t(l, a, s))),
            h
              ? ((c = e(n, i, o)),
                (l = c[0]),
                (a = c[1]),
                (v = w(n, i)),
                (b += y * (v + t(n, a, s) / t(l, a, s))))
              : b);
      }
      function hf(n, i, r, u, e) {
        var o = e % 2 == 0 ? 360 : p(f(n).year) ? 366 : 365;
        return (((u - r) / u) * o) / t(n, i, e);
      }
      function cf(n, i, r, u, e) {
        var o = e % 2 == 0 ? 360 : p(f(n).year) ? 366 : 365;
        return (((u - r) / r) * o) / t(n, i, e);
      }
      function lf(n, i, r, u, e) {
        var o = e % 2 == 0 ? 360 : p(f(n).year) ? 366 : 365;
        return r / (1 - (u * t(n, i, e)) / o);
      }
      function af(n, i, r, u, f, o, s) {
        var c = 1 + ((((i - n) * o) / (s % 2 == 0 ? 360 : 365)) | 0),
          y = e(n, i, o),
          p = y[0],
          w = y[1],
          b = t(p, n, s),
          k = t(n, w, s),
          a = t(p, w, s),
          l = (100 * r) / o,
          h = u / o,
          v = k / a;
        return 1 == c
          ? (f + l) / (1 + v * h) - (b / a) * l
          : f / Math.pow(1 + h, c - 1 + v) +
              (l * Math.pow(1 + h, 1 - c - v) * (Math.pow(1 + h, c) - 1)) / h -
              (b / a) * l;
      }
      function vf(n, i, r, u, e) {
        var o = t(n, i, e),
          s = fi(f(i).year, e);
        return u - (r * u * o) / s;
      }
      function yf(n, t) {
        for (var i = n.length; --i >= 0; )
          ("number" == typeof n[i] && "number" == typeof t[i]) ||
            (n.splice(i, 1), t.splice(i, 1));
      }
      var ei, oi, o, n, l, si, f, p, hi, ci, h, a, w, r, i;
      (kendo.support.browser.msie && kendo.support.browser.version < 9) ||
        ((ei = kendo.spreadsheet),
        (oi = ei.calc),
        (o = oi.runtime),
        (n = o.defineFunction),
        (l = o.CalcError),
        (si = o.packDate),
        (f = o.unpackDate),
        (p = o.isLeapYear),
        (hi = o.daysInMonth),
        (ci = o._days_360),
        n("ERF", function (n, t) {
          return null == t ? c(n) : c(t) - c(n);
        }).args([
          ["lower_limit", "number"],
          ["upper_limit", ["or", "number", "null"]],
        ]),
        n("ERFC", lt).args([["x", "number"]]),
        n("GAMMALN", s).args([["x", "number++"]]),
        n("GAMMA", g).args([["x", "number"]]),
        n("GAMMA.DIST", tt).args([
          ["x", "number+"],
          ["alpha", "number++"],
          ["beta", "number++"],
          ["cumulative", "logical"],
        ]),
        n("GAMMA.INV", vt).args([
          ["p", ["and", "number", ["[between]", 0, 1]]],
          ["alpha", "number++"],
          ["beta", "number++"],
        ]),
        n("NORM.S.DIST", b).args([
          ["z", "number"],
          ["cumulative", "logical"],
        ]),
        n("NORM.S.INV", it).args([
          ["p", ["and", "number", ["[between]", 0, 1]]],
        ]),
        n("NORM.DIST", yi).args([
          ["x", "number"],
          ["mean", "number"],
          ["stddev", "number++"],
          ["cumulative", "logical"],
        ]),
        n("NORM.INV", yt).args([
          ["p", ["and", "number", ["[between]", 0, 1]]],
          ["mean", "number"],
          ["stddev", "number++"],
        ]),
        n("BETADIST", wi).args([
          ["x", "number"],
          ["alpha", "number++"],
          ["beta", "number++"],
          ["A", ["or", "number", ["null", 0]]],
          ["B", ["or", "number", ["null", 1]]],
          ["?", ["assert", "$x >= $A", "NUM"]],
          ["?", ["assert", "$x <= $B", "NUM"]],
          ["?", ["assert", "$A < $B", "NUM"]],
        ]),
        n("BETA.DIST", bi).args([
          ["x", "number"],
          ["alpha", "number++"],
          ["beta", "number++"],
          ["cumulative", "logical"],
          ["A", ["or", "number", ["null", 0]]],
          ["B", ["or", "number", ["null", 1]]],
          ["?", ["assert", "$x >= $A", "NUM"]],
          ["?", ["assert", "$x <= $B", "NUM"]],
          ["?", ["assert", "$A < $B", "NUM"]],
        ]),
        n("BETA.INV", rt).args([
          ["p", ["and", "number", ["[between]", 0, 1]]],
          ["alpha", "number++"],
          ["beta", "number++"],
          ["A", ["or", "number", ["null", 0]]],
          ["B", ["or", "number", ["null", 1]]],
        ]),
        n("CHISQ.DIST", ut).args([
          ["x", "number+"],
          ["deg_freedom", "integer++"],
          ["cumulative", "logical"],
        ]),
        n("CHISQ.DIST.RT", bt).args([
          ["x", "number+"],
          ["deg_freedom", "integer++"],
        ]),
        n("CHISQ.INV", kt).args([
          ["p", ["and", "number", ["[between]", 0, 1]]],
          ["deg_freedom", "integer++"],
        ]),
        n("CHISQ.INV.RT", ki).args([
          ["p", ["and", "number", ["[between]", 0, 1]]],
          ["deg_freedom", "integer++"],
        ]),
        n("CHISQ.TEST", function (n, t) {
          return di(n.data, t.data);
        }).args([
          ["actual_range", "matrix"],
          ["expected_range", "matrix"],
          ["?", ["assert", "$actual_range.width == $expected_range.width"]],
          ["?", ["assert", "$actual_range.height == $expected_range.height"]],
        ]),
        n("EXPON.DIST", gi).args([
          ["x", "number+"],
          ["lambda", "number++"],
          ["cumulative", "logical"],
        ]),
        n("POISSON.DIST", nr).args([
          ["x", "integer+"],
          ["mean", "number+"],
          ["cumulative", "logical"],
        ]),
        n("F.DIST", ft).args([
          ["x", "number+"],
          ["deg_freedom1", "integer++"],
          ["deg_freedom2", "integer++"],
          ["cumulative", "logical"],
        ]),
        n("F.DIST.RT", tr).args([
          ["x", "number+"],
          ["deg_freedom1", "integer++"],
          ["deg_freedom2", "integer++"],
        ]),
        n("F.INV", rr).args([
          ["p", ["and", "number", ["[between]", 0, 1]]],
          ["deg_freedom1", "integer++"],
          ["deg_freedom2", "integer++"],
        ]),
        n("F.INV.RT", ir).args([
          ["p", ["and", "number", ["[between]", 0, 1]]],
          ["deg_freedom1", "integer++"],
          ["deg_freedom2", "integer++"],
        ]),
        n("F.TEST", ur).args([
          ["array1", ["collect", "number", 1]],
          ["array2", ["collect", "number", 1]],
          ["?", ["assert", "$array1.length >= 2", "DIV/0"]],
          ["?", ["assert", "$array2.length >= 2", "DIV/0"]],
        ]),
        n("FISHER", fr).args([["x", ["and", "number", ["(between)", -1, 1]]]]),
        n("FISHERINV", er).args([["y", "number"]]),
        n("T.DIST", dt).args([
          ["x", "number"],
          ["deg_freedom", "integer++"],
          ["cumulative", "logical"],
        ]),
        n("T.DIST.RT", y).args([
          ["x", "number"],
          ["deg_freedom", "integer++"],
        ]),
        n("T.DIST.2T", d).args([
          ["x", "number+"],
          ["deg_freedom", "integer++"],
        ]),
        n("T.INV", et).args([
          ["p", ["and", "number", ["(between]", 0, 1]]],
          ["deg_freedom", "integer++"],
        ]),
        n("T.INV.2T", or).args([
          ["p", ["and", "number", ["(between]", 0, 1]]],
          ["deg_freedom", "integer++"],
        ]),
        n("T.TEST", sr).args([
          ["array1", ["collect", "number", 1]],
          ["array2", ["collect", "number", 1]],
          ["tails", ["and", "integer", ["values", 1, 2]]],
          ["type", ["and", "integer", ["values", 1, 2, 3]]],
          [
            "?",
            ["assert", "$type != 1 || $array1.length == $array2.length", "N/A"],
          ],
          ["?", ["assert", "$array1.length >= 2", "DIV/0"]],
          ["?", ["assert", "$array2.length >= 2", "DIV/0"]],
        ]),
        n("CONFIDENCE.T", hr).args([
          ["alpha", ["and", "number", ["(between)", 0, 1]]],
          ["standard_dev", "number++"],
          ["size", ["and", "integer++", ["assert", "$size != 1", "DIV/0"]]],
        ]),
        n("CONFIDENCE.NORM", cr).args([
          ["alpha", ["and", "number", ["(between)", 0, 1]]],
          ["standard_dev", "number++"],
          ["size", ["and", "integer++"]],
        ]),
        n("GAUSS", lr).args([["z", "number"]]),
        n("PHI", ar).args([["x", "number"]]),
        n("LOGNORM.DIST", vr).args([
          ["x", "number++"],
          ["mean", "number"],
          ["standard_dev", "number++"],
          ["cumulative", "logical"],
        ]),
        n("LOGNORM.INV", yr).args([
          ["probability", ["and", "number", ["(between)", 0, 1]]],
          ["mean", "number"],
          ["standard_dev", "number++"],
        ]),
        n("PROB", pr).args([
          ["x_range", ["collect", "number", 1]],
          ["prob_range", ["collect", "number", 1]],
          ["lower_limit", "number"],
          ["upper_limit", ["or", "number", ["null", "$lower_limit"]]],
          ["?", ["assert", "$prob_range.length == $x_range.length", "N/A"]],
        ]),
        n("SLOPE", wr).args([
          ["known_y", ["collect", "number", 1]],
          ["known_x", ["collect", "number", 1]],
          ["?", ["assert", "$known_x.length == $known_y.length", "N/A"]],
          [
            "?",
            ["assert", "$known_x.length > 0 && $known_y.length > 0", "N/A"],
          ],
        ]),
        n("INTERCEPT", br).args([
          ["known_y", ["collect", "number", 1]],
          ["known_x", ["collect", "number", 1]],
          ["?", ["assert", "$known_x.length == $known_y.length", "N/A"]],
          [
            "?",
            ["assert", "$known_x.length > 0 && $known_y.length > 0", "N/A"],
          ],
        ]),
        n("PEARSON", gt).args([
          ["array1", ["collect!", "anything", 1]],
          ["array2", ["collect!", "anything", 1]],
          ["?", ["assert", "$array2.length == $array1.length", "N/A"]],
          ["?", ["assert", "$array2.length > 0 && $array1.length > 0", "N/A"]],
        ]),
        n("RSQ", kr).args([
          ["known_y", ["collect", "number", 1]],
          ["known_x", ["collect", "number", 1]],
          ["?", ["assert", "$known_x.length == $known_y.length", "N/A"]],
          [
            "?",
            ["assert", "$known_x.length > 0 && $known_y.length > 0", "N/A"],
          ],
          [
            "?",
            ["assert", "$known_x.length != 1 && $known_y.length != 1", "N/A"],
          ],
        ]),
        n("STEYX", dr).args([
          ["known_y", ["collect", "number", 1]],
          ["known_x", ["collect", "number", 1]],
          ["?", ["assert", "$known_x.length == $known_y.length", "N/A"]],
          [
            "?",
            ["assert", "$known_x.length >= 3 && $known_y.length >= 3", "DIV/0"],
          ],
        ]),
        n("FORECAST", gr).args([
          ["x", "number"],
          ["known_y", ["collect", "number", 1]],
          ["known_x", ["collect", "number", 1]],
          ["?", ["assert", "$known_x.length == $known_y.length", "N/A"]],
          [
            "?",
            ["assert", "$known_x.length > 0 && $known_y.length > 0", "N/A"],
          ],
        ]),
        n("LINEST", ii).args([
          ["known_y", "matrix"],
          ["known_x", ["or", "matrix", "null"]],
          ["const", ["or", "logical", ["null", !0]]],
          ["stats", ["or", "logical", ["null", !1]]],
        ]),
        n("LOGEST", nu).args([
          ["known_y", "matrix"],
          ["known_x", ["or", "matrix", "null"]],
          ["const", ["or", "logical", ["null", !0]]],
          ["stats", ["or", "logical", ["null", !1]]],
        ]),
        n("TREND", ri).args([
          ["known_y", "matrix"],
          ["known_x", ["or", "matrix", "null"]],
          ["new_x", ["or", "matrix", "null"]],
          ["const", ["or", "logical", ["null", !0]]],
        ]),
        n("GROWTH", tu).args([
          ["known_y", "matrix"],
          ["known_x", ["or", "matrix", "null"]],
          ["new_x", ["or", "matrix", "null"]],
          ["const", ["or", "logical", ["null", !0]]],
        ]),
        n("FV", ui).args([
          ["rate", "number"],
          ["nper", "number"],
          ["pmt", ["or", "number", ["null", 0]]],
          ["pv", ["or", "number", ["null", 0]]],
          ["type", ["or", ["values", 0, 1], ["null", 0]]],
          ["?", ["assert", "$pmt || $pv"]],
        ]),
        n("PV", iu).args([
          ["rate", "number"],
          ["nper", "number"],
          ["pmt", ["or", "number", ["null", 0]]],
          ["fv", ["or", "number", ["null", 0]]],
          ["type", ["or", ["values", 0, 1], ["null", 0]]],
        ]),
        n("PMT", st).args([
          ["rate", "number"],
          ["nper", "number"],
          ["pmt", "number"],
          ["fv", ["or", "number", ["null", 0]]],
          ["type", ["or", ["values", 0, 1], ["null", 0]]],
        ]),
        n("NPER", ru).args([
          ["rate", "number"],
          ["pmt", "number"],
          ["pv", "number"],
          ["fv", ["or", "number", ["null", 0]]],
          ["type", ["or", ["values", 0, 1], ["null", 0]]],
        ]),
        n("RATE", uu).args([
          ["nper", "number"],
          ["pmt", ["or", "number", ["null", 0]]],
          ["pv", "number"],
          ["fv", ["or", "number", ["null", 0]]],
          ["type", ["or", ["values", 0, 1], ["null", 0]]],
          ["guess", ["or", "number++", ["null", 0.01]]],
          ["?", ["assert", "$pmt || $fv"]],
        ]),
        n("IPMT", ht).args([
          ["rate", "number"],
          ["per", "number++"],
          ["nper", "number++"],
          ["pv", "number"],
          ["fv", ["or", "number", ["null", 0]]],
          ["type", ["or", ["values", 0, 1], ["null", 0]]],
          ["?", ["assert", "$per >= 1 && $per <= $nper"]],
        ]),
        n("PPMT", fu).args([
          ["rate", "number"],
          ["per", "number++"],
          ["nper", "number++"],
          ["pv", "number"],
          ["fv", ["or", "number", ["null", 0]]],
          ["type", ["or", ["values", 0, 1], ["null", 0]]],
          ["?", ["assert", "$per >= 1 && $per <= $nper"]],
        ]),
        n("CUMPRINC", eu).args([
          ["rate", "number++"],
          ["nper", "number++"],
          ["pv", "number++"],
          ["start_period", "number++"],
          ["end_period", "number++"],
          ["type", ["or", ["values", 0, 1], ["null", 0]]],
          ["?", ["assert", "$end_period >= $start_period", "NUM"]],
        ]),
        n("CUMIPMT", ou).args([
          ["rate", "number++"],
          ["nper", "number++"],
          ["pv", "number++"],
          ["start_period", "number++"],
          ["end_period", "number++"],
          ["type", ["or", ["values", 0, 1], ["null", 0]]],
          ["?", ["assert", "$end_period >= $start_period", "NUM"]],
        ]),
        n("NPV", su).args([
          ["rate", "number"],
          ["values", ["collect", "number"]],
          ["?", ["assert", "$values.length > 0", "N/A"]],
        ]),
        n("IRR", hu).args([
          ["values", ["collect", "number", 1]],
          ["guess", ["or", "number", ["null", 0.1]]],
        ]),
        n("EFFECT", cu).args([
          ["nominal_rate", "number++"],
          ["npery", "integer++"],
        ]),
        n("NOMINAL", lu).args([
          ["effect_rate", "number++"],
          ["npery", "integer++"],
        ]),
        n("XNPV", au).args([
          ["rate", "number"],
          ["values", ["collect", "number", 1]],
          ["dates", ["collect", "date", 1]],
          ["?", ["assert", "$values.length == $dates.length", "NUM"]],
        ]),
        n("XIRR", vu).args([
          ["values", ["collect", "number", 1]],
          ["dates", ["collect", "date", 1]],
          ["guess", ["or", "number", ["null", 0.1]]],
          ["?", ["assert", "$values.length == $dates.length", "NUM"]],
        ]),
        n("ISPMT", yu).args([
          ["rate", "number"],
          ["per", "number++"],
          ["nper", "number++"],
          ["pv", "number"],
          ["?", ["assert", "$per >= 1 && $per <= $nper"]],
        ]),
        n("DB", pu).args([
          ["cost", "number"],
          ["salvage", "number"],
          ["life", "number++"],
          ["period", "number++"],
          ["month", ["or", "number", ["null", 12]]],
        ]),
        n("DDB", wu).args([
          ["cost", "number"],
          ["salvage", "number"],
          ["life", "number++"],
          ["period", "number++"],
          ["factor", ["or", "number", ["null", 2]]],
        ]),
        n("SLN", bu).args([
          ["cost", "number"],
          ["salvage", "number"],
          ["life", "number++"],
        ]),
        n("SYD", ku).args([
          ["cost", "number"],
          ["salvage", "number"],
          ["life", "number++"],
          ["per", "number++"],
        ]),
        n("VDB", du).args([
          ["cost", "number+"],
          ["salvage", "number+"],
          ["life", "number++"],
          ["start_period", "number+"],
          ["end_period", "number+"],
          ["factor", ["or", "number+", ["null", 2]]],
          ["no_switch", ["or", "logical", ["null", !1]]],
          ["?", ["assert", "$end_period >= $start_period", "NUM"]],
        ]),
        (h = [
          ["settlement", "date"],
          ["maturity", "date"],
          ["frequency", ["and", "integer", ["values", 1, 2, 4]]],
          [
            "basis",
            ["or", ["null", 0], ["and", "integer", ["values", 0, 1, 2, 3, 4]]],
          ],
          ["?", ["assert", "$settlement < $maturity", "NUM"]],
        ]),
        n("COUPDAYBS", nf).args(h),
        n("COUPDAYS", tf).args(h),
        n("COUPDAYSNC", rf).args(h),
        n("COUPPCD", uf).args(h),
        n("COUPNCD", ff).args(h),
        n("COUPNUM", ef).args(h),
        n("ACCRINTM", of).args([
          ["issue", "date"],
          ["settlement", "date"],
          ["rate", "number++"],
          ["par", ["or", ["null", 1e3], "number++"]],
          [
            "basis",
            ["or", ["null", 0], ["and", "integer", ["values", 0, 1, 2, 3, 4]]],
          ],
          ["?", ["assert", "$issue < $settlement", "NUM"]],
        ]),
        n("ACCRINT", sf).args([
          ["issue", "date"],
          ["first_interest", "date"],
          ["settlement", "date"],
          ["rate", "number++"],
          ["par", ["or", ["null", 1e3], "number++"]],
          ["frequency", ["and", "integer", ["values", 1, 2, 4]]],
          [
            "basis",
            ["or", ["null", 0], ["and", "integer", ["values", 0, 1, 2, 3, 4]]],
          ],
          ["calc_method", ["or", "logical", ["null", !0]]],
          ["?", ["assert", "$issue < $settlement", "NUM"]],
        ]),
        n("DISC", hf).args([
          ["settlement", "date"],
          ["maturity", "date"],
          ["pr", "number++"],
          ["redemption", "number++"],
          [
            "basis",
            ["or", ["null", 0], ["and", "integer", ["values", 0, 1, 2, 3, 4]]],
          ],
          ["?", ["assert", "$settlement < $maturity", "NUM"]],
        ]),
        n("INTRATE", cf).args([
          ["settlement", "date"],
          ["maturity", "date"],
          ["investment", "number++"],
          ["redemption", "number++"],
          [
            "basis",
            ["or", ["null", 0], ["and", "integer", ["values", 0, 1, 2, 3, 4]]],
          ],
          ["?", ["assert", "$settlement < $maturity", "NUM"]],
        ]),
        n("RECEIVED", lf).args([
          ["settlement", "date"],
          ["maturity", "date"],
          ["investment", "number++"],
          ["discount", "number++"],
          [
            "basis",
            ["or", ["null", 0], ["and", "integer", ["values", 0, 1, 2, 3, 4]]],
          ],
          ["?", ["assert", "$settlement < $maturity", "NUM"]],
        ]),
        n("PRICE", af).args([
          ["settlement", "date"],
          ["maturity", "date"],
          ["rate", "number++"],
          ["yld", "number++"],
          ["redemption", "number++"],
          ["frequency", ["and", "integer", ["values", 1, 2, 4]]],
          [
            "basis",
            ["or", ["null", 0], ["and", "integer", ["values", 0, 1, 2, 3, 4]]],
          ],
          ["?", ["assert", "$settlement < $maturity", "NUM"]],
        ]),
        n("PRICEDISC", vf).args([
          ["settlement", "date"],
          ["maturity", "date"],
          ["discount", "number++"],
          ["redemption", "number++"],
          [
            "basis",
            ["or", ["null", 0], ["and", "integer", ["values", 0, 1, 2, 3, 4]]],
          ],
          ["?", ["assert", "$settlement < $maturity", "NUM"]],
        ]),
        (a = 300),
        (w = 22204e-20),
        (r = 1e-30),
        (i = Math.abs));
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/borderpalette.min",
      ["kendo.core.min", "kendo.colorpicker.min", "kendo.popup.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        function r(n) {
          return function (t) {
            return t.preventDefault(), n.apply(this, arguments);
          };
        }
        var t, f, e, i, u, o;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((t = n.jQuery),
          (f = [
            "allBorders",
            "insideBorders",
            "insideHorizontalBorders",
            "insideVerticalBorders",
            "outsideBorders",
            "leftBorder",
            "topBorder",
            "rightBorder",
            "bottomBorder",
            "noBorders",
          ]),
          (e = n.spreadsheet.messages.borderPalette =
            {
              allBorders: "All borders",
              insideBorders: "Inside borders",
              insideHorizontalBorders: "Inside horizontal borders",
              insideVerticalBorders: "Inside vertical borders",
              outsideBorders: "Outside borders",
              leftBorder: "Left border",
              topBorder: "Top border",
              rightBorder: "Right border",
              bottomBorder: "Bottom border",
              noBorders: "No border",
            }),
          (i = n.spreadsheet.messages.colorPicker =
            {
              reset: "Reset color",
              customColor: "Custom color...",
              apply: "Apply",
              cancel: "Cancel",
            }),
          (u = n.ui.Widget.extend({
            init: function (t, i) {
              n.ui.Widget.call(this, t, i);
              this.element = t;
              this.color = i.color;
              this._resetButton();
              this._colorPalette();
              this._customColorPalette();
              this._customColorButton();
              this.resetButton.on("click", r(this.resetColor.bind(this)));
              this.customColorButton.on(
                "click",
                r(this.customColor.bind(this))
              );
            },
            options: { name: "ColorChooser" },
            events: ["change"],
            destroy: function () {
              n.unbind(this.dialog.element.find(".k-action-buttons"));
              this.dialog.destroy();
              this.colorPalette.destroy();
              this.resetButton.off("click");
              this.customColorButton.off("click");
            },
            value: function (n) {
              return void 0 === n
                ? this.color
                : ((this.color = n),
                  this.customColorButton
                    .find(".k-icon")
                    .css("background-color", this.color),
                  this.colorPalette.value(null),
                  this.flatColorPicker.value(this.color),
                  void 0);
            },
            _change: function (n) {
              this.color = n;
              this.trigger("change", { value: n });
            },
            _colorPalette: function () {
              var n = t("<div />", { class: "k-spreadsheet-color-palette" }),
                i = (this.colorPalette = t("<div />")
                  .kendoColorPalette({
                    palette: [
                      "#ffffff",
                      "#000000",
                      "#d6ecff",
                      "#4e5b6f",
                      "#7fd13b",
                      "#ea157a",
                      "#feb80a",
                      "#00addc",
                      "#738ac8",
                      "#1ab39f",
                      "#f2f2f2",
                      "#7f7f7f",
                      "#a7d6ff",
                      "#d9dde4",
                      "#e5f5d7",
                      "#fad0e4",
                      "#fef0cd",
                      "#c5f2ff",
                      "#e2e7f4",
                      "#c9f7f1",
                      "#d8d8d8",
                      "#595959",
                      "#60b5ff",
                      "#b3bcca",
                      "#cbecb0",
                      "#f6a1c9",
                      "#fee29c",
                      "#8be6ff",
                      "#c7d0e9",
                      "#94efe3",
                      "#bfbfbf",
                      "#3f3f3f",
                      "#007dea",
                      "#8d9baf",
                      "#b2e389",
                      "#f272af",
                      "#fed46b",
                      "#51d9ff",
                      "#aab8de",
                      "#5fe7d5",
                      "#a5a5a5",
                      "#262626",
                      "#003e75",
                      "#3a4453",
                      "#5ea226",
                      "#af0f5b",
                      "#c58c00",
                      "#0081a5",
                      "#425ea9",
                      "#138677",
                      "#7f7f7f",
                      "#0c0c0c",
                      "#00192e",
                      "#272d37",
                      "#3f6c19",
                      "#750a3d",
                      "#835d00",
                      "#00566e",
                      "#2c3f71",
                      "#0c594f",
                    ],
                    value: this.color,
                    change: function (n) {
                      this.customColorButton
                        .find(".k-icon")
                        .css("background-color", "transparent");
                      this.flatColorPicker.value(null);
                      this._change(n.value);
                    }.bind(this),
                  })
                  .data("kendoColorPalette"));
              n.append(i.wrapper).appendTo(this.element);
            },
            _customColorPalette: function () {
              var u,
                f,
                e = t("<div />", {
                  class: "k-spreadsheet-window",
                  html:
                    "<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>" +
                    i.apply +
                    "</button><button class='k-button' data-bind='click: close'>" +
                    i.cancel +
                    "</button></div>",
                }),
                r = (this.dialog = e
                  .appendTo(document.body)
                  .kendoWindow({
                    animation: !1,
                    scrollable: !1,
                    resizable: !1,
                    maximizable: !1,
                    modal: !0,
                    visible: !1,
                    width: "auto",
                    open: function () {
                      this.center();
                    },
                  })
                  .data("kendoWindow"));
              r.one("activate", function () {
                this.element
                  .find("[data-role=flatcolorpicker]")
                  .data("kendoFlatColorPicker")
                  ._hueSlider.resize();
              });
              u = this.flatColorPicker = r.element
                .children()
                .first()
                .kendoFlatColorPicker()
                .data("kendoFlatColorPicker");
              f = n.observable({
                apply: function () {
                  this.customColorButton
                    .find(".k-icon")
                    .css("background-color", u.value());
                  this.colorPalette.value(null);
                  this._change(u.value());
                  r.close();
                }.bind(this),
                close: function () {
                  u.value(null);
                  r.close();
                },
              });
              n.bind(r.element.find(".k-action-buttons"), f);
            },
            _resetButton: function () {
              this.resetButton = t(
                "<a class='k-button k-reset-color' href='#'><span class='k-icon k-i-reset-color'></span>" +
                  i.reset +
                  "</a>"
              ).appendTo(this.element);
            },
            _customColorButton: function () {
              this.customColorButton = t(
                "<a class='k-button k-custom-color' href='#'><span class='k-icon'></span>" +
                  i.customColor +
                  "</a>"
              ).appendTo(this.element);
            },
            resetColor: function () {
              this.colorPalette.value(null);
              this.flatColorPicker.value(null);
              this._change(null);
            },
            customColor: function () {
              this.dialog.open();
            },
          })),
          (o = n.ui.Widget.extend({
            init: function (t, i) {
              n.ui.Widget.call(this, t, i);
              this.element = t;
              this.color = "#000";
              this.element.addClass("k-spreadsheet-border-palette");
              this._borderTypePalette();
              this._borderColorPalette();
              this.element.on(
                "click",
                ".k-spreadsheet-border-type-palette .k-button",
                r(this._click.bind(this))
              );
            },
            options: { name: "BorderPalette" },
            events: ["change"],
            destroy: function () {
              this.colorChooser.destroy();
              this.element.off("click");
            },
            _borderTypePalette: function () {
              var i = e,
                r = f
                  .map(function (t) {
                    return (
                      '<a title="' +
                      i[t] +
                      '" aria-label="' +
                      i[t] +
                      '" href="#" data-border-type="' +
                      t +
                      '" class="k-button k-button-icon"><span class="k-icon k-i-' +
                      n.toHyphens(t) +
                      '"></span></a>'
                    );
                  })
                  .join(""),
                u = t("<div />", {
                  class: "k-spreadsheet-border-type-palette",
                  html: r,
                });
              u.appendTo(this.element);
            },
            _borderColorPalette: function () {
              var n = t("<div />", {
                class: "k-spreadsheet-border-color-palette",
              });
              n.appendTo(this.element);
              this.colorChooser = new u(n, {
                color: this.color,
                change: this._colorChange.bind(this),
              });
            },
            _click: function (n) {
              this.type = t(n.currentTarget).data("borderType");
              this.trigger("change", { type: this.type, color: this.color });
            },
            _colorChange: function (n) {
              this.color = n.value;
              this.type &&
                this.trigger("change", { type: this.type, color: this.color });
            },
          })),
          (n.spreadsheet.ColorChooser = u),
          (n.spreadsheet.BorderPalette = o));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/toolbar.min",
      [
        "kendo.toolbar.min",
        "kendo.colorpicker.min",
        "kendo.combobox.min",
        "kendo.dropdownlist.min",
        "kendo.popup.min",
        "spreadsheet/borderpalette.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        var i,
          h,
          t,
          y,
          c,
          l,
          e,
          r,
          u,
          p,
          w,
          a,
          o,
          b,
          k,
          v,
          s,
          d,
          g,
          f,
          nt,
          tt,
          it,
          rt,
          ut,
          ft,
          et,
          ot,
          st,
          ht,
          ct,
          lt,
          at,
          vt,
          yt;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((i = n.jQuery),
          (h = n.ui.ToolBar),
          (t = n.spreadsheet.messages.toolbar =
            {
              addColumnLeft: "Add column left",
              addColumnRight: "Add column right",
              addRowAbove: "Add row above",
              addRowBelow: "Add row below",
              alignment: "Alignment",
              alignmentButtons: {
                justtifyLeft: "Align left",
                justifyCenter: "Center",
                justifyRight: "Align right",
                justifyFull: "Justify",
                alignTop: "Align top",
                alignMiddle: "Align middle",
                alignBottom: "Align bottom",
              },
              backgroundColor: "Background",
              bold: "Bold",
              borders: "Borders",
              copy: "Copy",
              cut: "Cut",
              deleteColumn: "Delete column",
              deleteRow: "Delete row",
              filter: "Filter",
              fontFamily: "Font",
              fontSize: "Font size",
              format: "Custom format...",
              formatTypes: {
                automatic: "Automatic",
                text: "Text",
                number: "Number",
                percent: "Percent",
                financial: "Financial",
                currency: "Currency",
                date: "Date",
                time: "Time",
                dateTime: "Date time",
                duration: "Duration",
                moreFormats: "More formats...",
              },
              formatDecreaseDecimal: "Decrease decimal",
              formatIncreaseDecimal: "Increase decimal",
              freeze: "Freeze panes",
              freezeButtons: {
                freezePanes: "Freeze panes",
                freezeRows: "Freeze rows",
                freezeColumns: "Freeze columns",
                unfreeze: "Unfreeze panes",
              },
              insertComment: "Insert comment",
              insertImage: "Insert image",
              italic: "Italic",
              merge: "Merge cells",
              mergeButtons: {
                mergeCells: "Merge all",
                mergeHorizontally: "Merge horizontally",
                mergeVertically: "Merge vertically",
                unmerge: "Unmerge",
              },
              open: "Open...",
              paste: "Paste",
              quickAccess: { redo: "Redo", undo: "Undo" },
              exportAs: "Export...",
              toggleGridlines: "Toggle gridlines",
              sort: "Sort",
              sortButtons: {
                sortRangeAsc: "Sort range A to Z",
                sortRangeDesc: "Sort range Z to A",
              },
              textColor: "Text Color",
              textWrap: "Wrap text",
              underline: "Underline",
              validation: "Data validation...",
              hyperlink: "Link",
            }),
          (y = {
            home: [
              "open",
              "exportAs",
              ["cut", "copy", "paste"],
              ["bold", "italic", "underline"],
              "hyperlink",
              "insertComment",
              "insertImage",
              "backgroundColor",
              "textColor",
              "borders",
              "fontSize",
              "fontFamily",
              "alignment",
              "textWrap",
              ["formatDecreaseDecimal", "formatIncreaseDecimal"],
              "format",
              "merge",
              "freeze",
              "filter",
              "toggleGridlines",
            ],
            insert: [
              ["addColumnLeft", "addColumnRight", "addRowBelow", "addRowAbove"],
              ["deleteColumn", "deleteRow"],
            ],
            data: ["sort", "filter", "validation"],
          }),
          (c = {
            open: { type: "open", overflow: "never", iconClass: "file-excel" },
            exportAs: {
              type: "exportAsDialog",
              dialogName: "exportAs",
              overflow: "never",
              text: "",
              iconClass: "file-excel",
            },
            bold: {
              type: "button",
              command: "PropertyChangeCommand",
              property: "bold",
              value: !0,
              iconClass: "bold",
              togglable: !0,
            },
            italic: {
              type: "button",
              command: "PropertyChangeCommand",
              property: "italic",
              value: !0,
              iconClass: "italic",
              togglable: !0,
            },
            underline: {
              type: "button",
              command: "PropertyChangeCommand",
              property: "underline",
              value: !0,
              iconClass: "underline",
              togglable: !0,
            },
            formatDecreaseDecimal: {
              type: "button",
              command: "AdjustDecimalsCommand",
              value: -1,
              iconClass: "decimal-decrease",
            },
            formatIncreaseDecimal: {
              type: "button",
              command: "AdjustDecimalsCommand",
              value: 1,
              iconClass: "decimal-increase",
            },
            textWrap: {
              type: "button",
              command: "TextWrapCommand",
              property: "wrap",
              value: !0,
              iconClass: "text-wrap",
              togglable: !0,
            },
            cut: {
              type: "button",
              command: "ToolbarCutCommand",
              iconClass: "cut",
            },
            copy: {
              type: "button",
              command: "ToolbarCopyCommand",
              iconClass: "copy",
            },
            paste: {
              type: "button",
              command: "ToolbarPasteCommand",
              iconClass: "paste",
            },
            separator: { type: "separator" },
            alignment: { type: "alignment", iconClass: "align-left" },
            backgroundColor: {
              type: "colorPicker",
              property: "background",
              iconClass: "paint",
            },
            textColor: {
              type: "colorPicker",
              property: "color",
              iconClass: "foreground-color",
            },
            fontFamily: {
              type: "fontFamily",
              property: "fontFamily",
              iconClass: "font-family",
            },
            fontSize: {
              type: "fontSize",
              property: "fontSize",
              iconClass: "font-size",
            },
            format: {
              type: "format",
              property: "format",
              iconClass: "custom-format",
            },
            filter: {
              type: "filter",
              property: "hasFilter",
              iconClass: "filter",
            },
            merge: { type: "merge", iconClass: "cells-merge" },
            freeze: { type: "freeze", iconClass: "pane-freeze" },
            borders: { type: "borders", iconClass: "borders-all" },
            formatCells: {
              type: "dialog",
              dialogName: "formatCells",
              overflow: "never",
            },
            hyperlink: {
              type: "dialog",
              dialogName: "hyperlink",
              iconClass: "link-horizontal",
              overflow: "never",
              text: "",
            },
            toggleGridlines: {
              type: "button",
              command: "GridLinesChangeCommand",
              property: "gridLines",
              value: !0,
              iconClass: "border-no",
              togglable: !0,
            },
            insertComment: {
              type: "dialog",
              dialogName: "insertComment",
              property: "comment",
              togglable: !0,
              overflow: "never",
              iconClass: "comment",
              text: "",
            },
            insertImage: {
              type: "dialog",
              dialogName: "insertImage",
              overflow: "never",
              iconClass: "image",
              text: "",
            },
            addColumnLeft: {
              type: "button",
              command: "AddColumnCommand",
              value: "left",
              iconClass: "table-column-insert-left",
            },
            addColumnRight: {
              type: "button",
              command: "AddColumnCommand",
              value: "right",
              iconClass: "table-column-insert-right",
            },
            addRowBelow: {
              type: "button",
              command: "AddRowCommand",
              value: "below",
              iconClass: "table-row-insert-below",
            },
            addRowAbove: {
              type: "button",
              command: "AddRowCommand",
              value: "above",
              iconClass: "table-row-insert-above",
            },
            deleteColumn: {
              type: "button",
              command: "DeleteColumnCommand",
              iconClass: "table-column-delete",
            },
            deleteRow: {
              type: "button",
              command: "DeleteRowCommand",
              iconClass: "table-row-delete",
            },
            sort: { type: "sort", iconClass: "sort-desc" },
            validation: {
              type: "dialog",
              dialogName: "validation",
              iconClass: "exception",
              overflow: "never",
            },
          }),
          (l = h.extend({
            init: function (n, t) {
              var r, u;
              t.items = this._expandTools(
                t.tools || l.prototype.options.tools[t.toolbarName]
              );
              h.fn.init.call(this, n, t);
              r = this._click.bind(this);
              this.element.addClass("k-spreadsheet-toolbar");
              this._addSeparators(this.element);
              u = this;
              this.element.on("keydown", function (n) {
                var t;
                9 === n.keyCode &&
                  ((t = u._nextTool(n.shiftKey ? -1 : 1)),
                  t &&
                    (document.activeElement.blur(),
                    i(t).is(".k-upload-button") &&
                      i(t).addClass("k-state-focused"),
                    i(t).find("input").length
                      ? i(t).find("input").focus()
                      : t.focus(),
                    n.preventDefault()));
              });
              this.element.on("focusout", function () {
                i(this)
                  .find(".k-toolbar-first-visible")
                  .removeClass("k-state-focused");
              });
              this.bind({ click: r, toggle: r });
            },
            _nextTool: function (n) {
              var u = this,
                t = u.element.find(".k-widget, .k-button, .k-button-group > a"),
                r = t.index(
                  i(document.activeElement).closest(
                    ".k-widget, .k-button, .k-button-group > a"
                  )
                );
              if (r > 0) return t[r + n];
            },
            _addSeparators: function (n) {
              var t = n.children(".k-widget, a.k-button, .k-button-group");
              t.before("<span class='k-separator' />");
            },
            _expandTools: function (n) {
              function r(n) {
                var u = i.isPlainObject(n) ? n : c[n] || {},
                  f = "k-icon k-i-" + u.iconClass,
                  o = u.type,
                  s = {
                    button: { showText: "overflow" },
                    colorPicker: { toolIcon: f, spriteCssClass: f },
                    borders: { spriteCssClass: f },
                    alignment: { spriteCssClass: f },
                    merge: { spriteCssClass: f },
                    freeze: { spriteCssClass: f },
                  },
                  e = i.extend(
                    {
                      name: u.name || n,
                      text: t[u.name || n],
                      icon: u.iconClass,
                      attributes: {
                        title: t[u.name || n],
                        "aria-label": t[u.name || n],
                      },
                    },
                    s[o],
                    u
                  );
                return (
                  "splitButton" == o && (e.menuButtons = e.menuButtons.map(r)),
                  (e.attributes["data-tool"] = n),
                  u.property && (e.attributes["data-property"] = u.property),
                  e
                );
              }
              return n.reduce(function (n, t) {
                return (
                  n.push(
                    i.isArray(t)
                      ? { type: "buttonGroup", buttons: t.map(r) }
                      : r.call(this, t)
                  ),
                  n
                );
              }, []);
            },
            _click: function (n) {
              var t,
                u = n.target.attr("data-tool"),
                i = c[u] || {},
                r = i.command;
              r &&
                ((t = {
                  command: r,
                  options: {
                    property: i.property || null,
                    value: i.value || null,
                  },
                }),
                "boolean" == typeof t.options.value &&
                  (t.options.value = !!n.checked || null),
                this.action(t));
            },
            events: [
              "click",
              "toggle",
              "open",
              "close",
              "overflowOpen",
              "overflowClose",
              "action",
              "dialog",
            ],
            options: { name: "SpreadsheetToolBar", resizable: !0, tools: y },
            action: function (n) {
              this.trigger("action", n);
            },
            dialog: function (n) {
              this.trigger("dialog", n);
            },
            refresh: function (t) {
              function s(n, t) {
                var i,
                  r = n.toolbar,
                  u = n.overflow,
                  f = (r && r.options.togglable) || (u && u.options.togglable);
                f &&
                  ((i = !1),
                  "boolean" == typeof t
                    ? (i = t)
                    : "string" == typeof t &&
                      (i = r.options.hasOwnProperty("value")
                        ? r.options.value === t
                        : null != t),
                  r.toggle(i),
                  u && u.toggle(i));
              }
              function h(n, t) {
                var i = n.toolbar,
                  r = n.overflow;
                i && i.update && i.update(t);
                r && r.update && r.update(t);
              }
              for (
                var r, u, f, e = t, o = this._tools(), i = 0;
                i < o.length;
                i++
              )
                (r = o[i].property),
                  (u = o[i].tool),
                  (f = n.isFunction(e[r]) ? e[r]() : e),
                  "gridLines" == r && (f = e.sheet().showGridLines()),
                  "button" === u.type ? s(u, f) : h(u, f);
              this.resize();
            },
            _tools: function () {
              return this.element
                .find("[data-property]")
                .toArray()
                .map(
                  function (n) {
                    return (
                      (n = i(n)),
                      {
                        property: n.attr("data-property"),
                        tool: this._getItem(n),
                      }
                    );
                  }.bind(this)
                );
            },
            destroy: function () {
              this.element.find("[data-command],.k-button").each(function () {
                var t = i(this),
                  n = t.data("instance");
                n && n.destroy && n.destroy();
              });
              h.fn.destroy.call(this);
            },
          })),
          (n.spreadsheet.ToolBar = l),
          (e = n.toolbar.Item.extend({
            init: function (n, t) {
              var r = i("<select />")
                .attr("title", n.attributes.title)
                .attr("aria-label", n.attributes.title)
                .kendoDropDownList({ height: "auto" })
                .data("kendoDropDownList");
              this.dropDownList = r;
              this.element = r.wrapper;
              this.options = n;
              this.toolbar = t;
              this.attributes();
              this.addUidAttr();
              this.addOverflowAttr();
              r.bind("open", this._open.bind(this));
              r.bind("change", this._change.bind(this));
              this.element
                .width(n.width)
                .attr({
                  "data-command": "PropertyChangeCommand",
                  "data-property": n.property,
                });
            },
            _open: function () {
              var t,
                i = this.dropDownList,
                r = i.list;
              r.css({ whiteSpace: "nowrap", width: "auto" });
              t = r.width();
              t > 0 ? (t += 20) : (t = i._listWidth);
              r.css("width", t + n.support.scrollbar());
              i._listWidth = t;
            },
            _change: function (n) {
              var t = this,
                i = n.sender,
                r = i.value(),
                u = i.dataItem(),
                f = u ? u.popup : void 0;
              f
                ? setTimeout(function () {
                    t.toolbar.dialog({ name: f });
                  })
                : t.toolbar.action({
                    command: "PropertyChangeCommand",
                    options: {
                      property: this.options.property,
                      value: "null" == r ? null : r,
                    },
                  });
            },
            value: function (n) {
              return void 0 === n
                ? this.dropDownList.value()
                : void this.dropDownList.value(n);
            },
          })),
          (r = n.toolbar.Item.extend({
            init: function (n, t) {
              this.element = i(
                "<a href='#' class='k-button k-button-icon'><span class='" +
                  n.spriteCssClass +
                  "'></span><span class='k-icon k-i-arrow-60-down'></span></a>"
              );
              this.element
                .on("click touchend", this.open.bind(this))
                .attr("data-command", n.command);
              this.options = n;
              this.toolbar = t;
              this.attributes();
              this.addUidAttr();
              this.addOverflowAttr();
              this._popup();
            },
            destroy: function () {
              this.popup.destroy();
            },
            open: function (n) {
              n.preventDefault();
              this.popup.toggle();
            },
            _popup: function () {
              var n = this.element;
              this.popup = i("<div class='k-spreadsheet-popup' />")
                .appendTo(n)
                .kendoPopup({ anchor: n })
                .data("kendoPopup");
            },
          })),
          n.toolbar.registerComponent(
            "dialog",
            n.toolbar.ToolBarButton.extend({
              init: function (t, i) {
                n.toolbar.ToolBarButton.fn.init.call(this, t, i);
                this._dialogName = t.dialogName;
                this.element
                  .bind("click touchend", this.open.bind(this))
                  .data("instance", this);
              },
              open: function () {
                this.toolbar.dialog({ name: this._dialogName });
              },
            })
          ),
          n.toolbar.registerComponent(
            "exportAsDialog",
            n.toolbar.Item.extend({
              init: function (n, t) {
                this._dialogName = n.dialogName;
                this.toolbar = t;
                this._title = n.attributes.title;
                this.element = i(
                  "<button type='button' class='k-button k-button-icon'><span class='k-icon k-i-download' /></button>"
                )
                  .attr("title", this._title)
                  .attr("aria-label", this._title)
                  .data("instance", this);
                this.element
                  .bind("click", this.open.bind(this))
                  .data("instance", this);
              },
              open: function () {
                this.toolbar.dialog({ name: this._dialogName });
              },
            })
          ),
          (u = n.toolbar.OverflowButton.extend({
            init: function (t, i) {
              n.toolbar.OverflowButton.fn.init.call(this, t, i);
              this.element.on("click touchend", this._click.bind(this));
              this.message = this.options.text;
              var r = this.element.data("button");
              this.element.data(this.options.type, r);
            },
            _click: i.noop,
          })),
          (p = r.extend({
            init: function (t, i) {
              r.fn.init.call(this, t, i);
              this.popup.element.addClass("k-spreadsheet-colorpicker");
              this.colorChooser = new n.spreadsheet.ColorChooser(
                this.popup.element,
                { change: this._colorChange.bind(this) }
              );
              this.element.attr({ "data-property": t.property });
              this.element.data({
                type: "colorPicker",
                colorPicker: this,
                instance: this,
              });
            },
            destroy: function () {
              this.colorChooser.destroy();
              r.fn.destroy.call(this);
            },
            update: function (n) {
              this.value(n);
            },
            value: function (n) {
              this.colorChooser.value(n);
            },
            _colorChange: function (n) {
              this.toolbar.action({
                command: "PropertyChangeCommand",
                options: {
                  property: this.options.property,
                  value: n.sender.value(),
                },
              });
              this.popup.close();
            },
          })),
          (w = u.extend({
            init: function (n, t) {
              n.iconName = "text";
              u.fn.init.call(this, n, t);
            },
            _click: function () {
              this.toolbar.dialog({
                name: "colorPicker",
                options: {
                  title: this.options.property,
                  property: this.options.property,
                },
              });
            },
          })),
          n.toolbar.registerComponent("colorPicker", p, w),
          (a = [
            8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72,
          ]),
          (o = 12),
          (b = n.toolbar.Item.extend({
            init: function (n, t) {
              var r = i("<input />")
                .attr("aria-label", n.attributes.title)
                .kendoComboBox({
                  change: this._valueChange.bind(this),
                  clearButton: !1,
                  dataSource: n.fontSizes || a,
                  value: o,
                })
                .data("kendoComboBox");
              this.comboBox = r;
              this.element = r.wrapper;
              this.options = n;
              this.toolbar = t;
              this.attributes();
              this.addUidAttr();
              this.addOverflowAttr();
              this.element
                .width(n.width)
                .attr({
                  "data-command": "PropertyChangeCommand",
                  "data-property": n.property,
                });
              this.element.data({ type: "fontSize", fontSize: this });
            },
            _valueChange: function (t) {
              this.toolbar.action({
                command: "PropertyChangeCommand",
                options: {
                  property: this.options.property,
                  value: n.parseInt(t.sender.value()),
                },
              });
            },
            update: function (t) {
              this.value(n.parseInt(t) || o);
            },
            value: function (n) {
              return void 0 === n
                ? this.comboBox.value()
                : void this.comboBox.value(n);
            },
          })),
          (k = u.extend({
            _click: function () {
              this.toolbar.dialog({
                name: "fontSize",
                options: { sizes: a, defaultSize: o },
              });
            },
            update: function (n) {
              this._value = n || o;
              this.element
                .find(".k-text")
                .text(this.message + " (" + this._value + ") ...");
            },
          })),
          n.toolbar.registerComponent("fontSize", b, k),
          (v = [
            "Arial",
            "Courier New",
            "Georgia",
            "Times New Roman",
            "Trebuchet MS",
            "Verdana",
          ]),
          (s = "Arial"),
          (d = e.extend({
            init: function (n, t) {
              e.fn.init.call(this, n, t);
              var i = this.dropDownList;
              i.setDataSource(n.fontFamilies || v);
              i.value(s);
              this.element.data({ type: "fontFamily", fontFamily: this });
            },
            update: function (n) {
              this.value(n || s);
            },
          })),
          (g = u.extend({
            _click: function () {
              this.toolbar.dialog({
                name: "fontFamily",
                options: { fonts: v, defaultFont: s },
              });
            },
            update: function (n) {
              this._value = n || s;
              this.element
                .find(".k-text")
                .text(this.message + " (" + this._value + ") ...");
            },
          })),
          n.toolbar.registerComponent("fontFamily", d, g),
          (f = n.spreadsheet.formats =
            {
              automatic: null,
              text: "@",
              number: "#,0.00",
              percent: "0.00%",
              financial:
                '_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',
              currency: "$#,##0.00;[Red]$#,##0.00",
              date: "m/d/yyyy",
              time: "h:mm:ss AM/PM",
              dateTime: "m/d/yyyy h:mm",
              duration: "[h]:mm:ss",
            }),
          (nt = e.extend({
            _revertTitle: function (n) {
              n.sender.value("");
              n.sender.wrapper.width("auto");
            },
            init: function (n, i) {
              var r, u;
              e.fn.init.call(this, n, i);
              r = this.dropDownList;
              u =
                "<span class='k-icon k-i-" +
                n.iconClass +
                "' style='line-height: 1em; width: 1.35em;'></span>";
              r.bind("change", this._revertTitle.bind(this));
              r.bind("dataBound", this._revertTitle.bind(this));
              r.setOptions({
                dataValueField: "format",
                dataTextField: "name",
                dataValuePrimitive: !0,
                valueTemplate: u,
                template:
                  "# if (data.sample) { #<span class='k-spreadsheet-sample'>#: data.sample #</span># } ##: data.name #",
              });
              r.text(u);
              r.setDataSource([
                { format: f.automatic, name: t.formatTypes.automatic },
                { format: f.text, name: t.formatTypes.text },
                {
                  format: f.number,
                  name: t.formatTypes.number,
                  sample: "1,499.99",
                },
                {
                  format: f.percent,
                  name: t.formatTypes.percent,
                  sample: "14.50%",
                },
                {
                  format: f.financial,
                  name: t.formatTypes.financial,
                  sample: "(1,000.12)",
                },
                {
                  format: f.currency,
                  name: t.formatTypes.currency,
                  sample: "$1,499.99",
                },
                {
                  format: f.date,
                  name: t.formatTypes.date,
                  sample: "4/21/2012",
                },
                {
                  format: f.time,
                  name: t.formatTypes.time,
                  sample: "5:49:00 PM",
                },
                {
                  format: f.dateTime,
                  name: t.formatTypes.dateTime,
                  sample: "4/21/2012 5:49:00",
                },
                {
                  format: f.duration,
                  name: t.formatTypes.duration,
                  sample: "168:05:00",
                },
                { popup: "formatCells", name: t.formatTypes.moreFormats },
              ]);
              this.element.data({ type: "format", format: this });
            },
          })),
          (tt = u.extend({
            _click: function () {
              this.toolbar.dialog({ name: "formatCells" });
            },
          })),
          n.toolbar.registerComponent("format", nt, tt),
          (it = r.extend({
            init: function (n, t) {
              r.fn.init.call(this, n, t);
              this._borderPalette();
              this.element.data({ type: "borders", instance: this });
            },
            destroy: function () {
              this.borderPalette.destroy();
              r.fn.destroy.call(this);
            },
            _borderPalette: function () {
              var t = i("<div />").appendTo(this.popup.element);
              this.borderPalette = new n.spreadsheet.BorderPalette(t, {
                change: this._action.bind(this),
              });
            },
            _action: function (n) {
              this.toolbar.action({
                command: "BorderChangeCommand",
                options: { border: n.type, style: { size: 1, color: n.color } },
              });
            },
          })),
          (rt = u.extend({
            _click: function () {
              this.toolbar.dialog({ name: "borders" });
            },
          })),
          n.toolbar.registerComponent("borders", it, rt),
          (ut = r.extend({
            init: function (n, t) {
              r.fn.init.call(this, n, t);
              this.element.attr({ "data-property": "alignment" });
              this._defineButtons();
              this._commandPalette();
              this.popup.element.on(
                "click",
                ".k-button",
                function (n) {
                  this._action(i(n.currentTarget));
                }.bind(this)
              );
              this.element.data({
                type: "alignment",
                alignment: this,
                instance: this,
              });
            },
            _defineButtons: function () {
              this.buttons = [
                {
                  property: "textAlign",
                  value: "left",
                  iconClass: "align-left",
                  text: t.alignmentButtons.justtifyLeft,
                },
                {
                  property: "textAlign",
                  value: "center",
                  iconClass: "align-center",
                  text: t.alignmentButtons.justifyCenter,
                },
                {
                  property: "textAlign",
                  value: "right",
                  iconClass: "align-right",
                  text: t.alignmentButtons.justifyRight,
                },
                {
                  property: "textAlign",
                  value: "justify",
                  iconClass: "align-justify",
                  text: t.alignmentButtons.justifyFull,
                },
                {
                  property: "verticalAlign",
                  value: "top",
                  iconClass: "align-top",
                  text: t.alignmentButtons.alignTop,
                },
                {
                  property: "verticalAlign",
                  value: "center",
                  iconClass: "align-middle",
                  text: t.alignmentButtons.alignMiddle,
                },
                {
                  property: "verticalAlign",
                  value: "bottom",
                  iconClass: "align-bottom",
                  text: t.alignmentButtons.alignBottom,
                },
              ];
            },
            destroy: function () {
              this.popup.element.off();
              r.fn.destroy.call(this);
            },
            update: function (n) {
              var i = n.textAlign(),
                r = n.verticalAlign(),
                t = this.popup.element;
              t.find(".k-button").removeClass("k-state-active");
              i &&
                t
                  .find("[data-property=textAlign][data-value=" + i + "]")
                  .addClass("k-state-active");
              r &&
                t
                  .find("[data-property=verticalAlign][data-value=" + r + "]")
                  .addClass("k-state-active");
            },
            _commandPalette: function () {
              var n = this.buttons,
                t = i("<div />").appendTo(this.popup.element);
              n.forEach(function (r, u) {
                var f =
                  "<a title='" +
                  r.text +
                  "' data-property='" +
                  r.property +
                  "' data-value='" +
                  r.value +
                  "' class='k-button k-button-icon'><span class='k-icon k-i-" +
                  r.iconClass +
                  "'></span></a>";
                0 !== u &&
                  n[u - 1].property !== r.property &&
                  t.append(i("<span class='k-separator' />"));
                t.append(f);
              });
            },
            _action: function (n) {
              var t = n.attr("data-property"),
                i = n.attr("data-value");
              this.toolbar.action({
                command: "PropertyChangeCommand",
                options: { property: t, value: i },
              });
            },
          })),
          (ft = u.extend({
            _click: function () {
              this.toolbar.dialog({ name: "alignment" });
            },
          })),
          n.toolbar.registerComponent("alignment", ut, ft),
          (et = r.extend({
            init: function (n, t) {
              r.fn.init.call(this, n, t);
              this._defineButtons();
              this._commandPalette();
              this.popup.element.on(
                "click",
                ".k-button",
                function (n) {
                  this._action(i(n.currentTarget));
                }.bind(this)
              );
              this.element.data({ type: "merge", merge: this, instance: this });
            },
            _defineButtons: function () {
              this.buttons = [
                {
                  value: "cells",
                  iconClass: "cells-merge",
                  text: t.mergeButtons.mergeCells,
                },
                {
                  value: "horizontally",
                  iconClass: "cells-merge-horizontally",
                  text: t.mergeButtons.mergeHorizontally,
                },
                {
                  value: "vertically",
                  iconClass: "cells-merge-vertically",
                  text: t.mergeButtons.mergeVertically,
                },
                {
                  value: "unmerge",
                  iconClass: "table-unmerge",
                  text: t.mergeButtons.unmerge,
                },
              ];
            },
            destroy: function () {
              this.popup.element.off();
              r.fn.destroy.call(this);
            },
            _commandPalette: function () {
              var n = i("<div />").appendTo(this.popup.element);
              this.buttons.forEach(function (t) {
                var i =
                  "<a title='" +
                  t.text +
                  "' data-value='" +
                  t.value +
                  "' class='k-button k-button-icontext'><span class='k-icon k-i-" +
                  t.iconClass +
                  "'></span>" +
                  t.text +
                  "</a>";
                n.append(i);
              });
            },
            _action: function (n) {
              var t = n.attr("data-value");
              this.toolbar.action({
                command: "MergeCellCommand",
                options: { value: t },
              });
            },
          })),
          (ot = u.extend({
            _click: function () {
              this.toolbar.dialog({ name: "merge" });
            },
          })),
          n.toolbar.registerComponent("merge", et, ot),
          (st = r.extend({
            init: function (n, t) {
              r.fn.init.call(this, n, t);
              this._defineButtons();
              this._commandPalette();
              this.popup.element.on(
                "click",
                ".k-button",
                function (n) {
                  this._action(i(n.currentTarget));
                }.bind(this)
              );
              this.element.data({
                type: "freeze",
                freeze: this,
                instance: this,
              });
            },
            _defineButtons: function () {
              this.buttons = [
                {
                  value: "panes",
                  iconClass: "pane-freeze",
                  text: t.freezeButtons.freezePanes,
                },
                {
                  value: "rows",
                  iconClass: "row-freeze",
                  text: t.freezeButtons.freezeRows,
                },
                {
                  value: "columns",
                  iconClass: "column-freeze",
                  text: t.freezeButtons.freezeColumns,
                },
                {
                  value: "unfreeze",
                  iconClass: "table-unmerge",
                  text: t.freezeButtons.unfreeze,
                },
              ];
            },
            destroy: function () {
              this.popup.element.off();
              r.fn.destroy.call(this);
            },
            _commandPalette: function () {
              var n = i("<div />").appendTo(this.popup.element);
              this.buttons.forEach(function (t) {
                var i =
                  "<a title='" +
                  t.text +
                  "' data-value='" +
                  t.value +
                  "' class='k-button k-button-icontext'><span class='k-icon k-i-" +
                  t.iconClass +
                  "'></span>" +
                  t.text +
                  "</a>";
                n.append(i);
              });
            },
            _action: function (n) {
              var t = n.attr("data-value");
              this.toolbar.action({
                command: "FreezePanesCommand",
                options: { value: t },
              });
            },
          })),
          (ht = u.extend({
            _click: function () {
              this.toolbar.dialog({ name: "freeze" });
            },
          })),
          n.toolbar.registerComponent("freeze", st, ht),
          (ct = e.extend({
            _revertTitle: function (n) {
              n.sender.value("");
              n.sender.wrapper.width("auto");
            },
            init: function (n, i) {
              e.fn.init.call(this, n, i);
              var r = this.dropDownList;
              r.bind("change", this._revertTitle.bind(this));
              r.bind("dataBound", this._revertTitle.bind(this));
              r.setOptions({
                valueTemplate:
                  "<span class='k-icon k-i-" +
                  n.iconClass +
                  "' style='line-height: 1em; width: 1.35em;'></span>",
                template:
                  "<span class='k-icon k-i-#= iconClass #' style='line-height: 1em; width: 1.35em;'></span>#=text#",
                dataTextField: "text",
                dataValueField: "value",
              });
              r.setDataSource([
                {
                  value: "asc",
                  sheet: !1,
                  text: t.sortButtons.sortRangeAsc,
                  iconClass: "sort-asc",
                },
                {
                  value: "desc",
                  sheet: !1,
                  text: t.sortButtons.sortRangeDesc,
                  iconClass: "sort-desc",
                },
              ]);
              r.select(0);
              this.element.data({ type: "sort", sort: this });
            },
            _change: function (n) {
              var i = n.sender,
                t = i.dataItem();
              t &&
                this.toolbar.action({
                  command: "SortCommand",
                  options: { value: t.value, sheet: t.sheet },
                });
            },
            value: i.noop,
          })),
          (lt = u.extend({
            _click: function () {
              this.toolbar.dialog({ name: "sort" });
            },
          })),
          n.toolbar.registerComponent("sort", ct, lt),
          (at = n.toolbar.ToolBarButton.extend({
            init: function (t, i) {
              t.showText = "overflow";
              n.toolbar.ToolBarButton.fn.init.call(this, t, i);
              this.element.on("click", this._click.bind(this));
              this.element.data({ type: "filter", filter: this });
            },
            _click: function () {
              this.toolbar.action({ command: "FilterCommand" });
            },
            update: function (n) {
              this.toggle(n);
            },
          })),
          (vt = u.extend({
            init: function (n, t) {
              u.fn.init.call(this, n, t);
              this.element.data({ type: "filter", filter: this });
            },
            _click: function () {
              this.toolbar.action({ command: "FilterCommand" });
            },
            update: function (n) {
              this.toggle(n);
            },
          })),
          n.toolbar.registerComponent("filter", at, vt),
          (yt = n.toolbar.Item.extend({
            init: function (n, t) {
              this.toolbar = t;
              this.element = i(
                "<div class='k-button k-upload-button k-button-icon'><span class='k-icon k-i-folder-open' /></div>"
              ).data("instance", this);
              this._title = n.attributes.title;
              this._reset();
            },
            _reset: function () {
              this.element.find("input").remove();
              i("<input type='file' autocomplete='off' accept='.xlsx'/>")
                .attr("title", this._title)
                .attr("aria-label", this._title)
                .one("change", this._change.bind(this))
                .appendTo(this.element);
            },
            _change: function (n) {
              this.toolbar.action({
                command: "OpenCommand",
                options: { file: n.target.files[0] },
              });
              this._reset();
            },
          })),
          n.toolbar.registerComponent("open", yt),
          (n.spreadsheet.TabStrip = n.ui.TabStrip.extend({
            init: function (t, r) {
              n.ui.TabStrip.fn.init.call(this, t, r);
              t.addClass("k-spreadsheet-tabstrip");
              this._quickAccessButtons();
              this.toolbars = {};
              var u = r.dataSource;
              this.contentElements.each(
                function (n, t) {
                  this._toolbar(i(t), u[n].id, r.toolbarOptions[u[n].id]);
                }.bind(this)
              );
              this.one("activate", function () {
                this.toolbars[this.options.dataSource[0].id].resize();
              });
            },
            events: n.ui.TabStrip.fn.events.concat(["action", "dialog"]),
            destroy: function () {
              this.quickAccessToolBar.off("click");
              n.ui.TabStrip.fn.destroy.call(this);
              for (var t in this.toolbars) this.toolbars[t].destroy();
            },
            action: function (n) {
              this.trigger("action", n);
            },
            dialog: function (n) {
              this.trigger("dialog", n);
            },
            refreshTools: function (n) {
              var t,
                i = this.toolbars;
              for (t in i) i.hasOwnProperty(t) && i[t].refresh(n);
            },
            _quickAccessButtons: function () {
              var r = [
                  {
                    title: t.quickAccess.undo,
                    iconClass: "undo",
                    action: "undo",
                  },
                  {
                    title: t.quickAccess.redo,
                    iconClass: "redo",
                    action: "redo",
                  },
                ],
                u = n.template(
                  "<a href='\\#' title='#= title #' data-action='#= action #' class='k-button k-button-icon' aria-label='#= title #'><span class='k-icon k-i-#=iconClass#'></span></a>"
                );
              this.quickAccessToolBar = i("<div />", {
                class: "k-spreadsheet-quick-access-toolbar",
                html: n.render(u, r),
              }).insertBefore(this.wrapper);
              this.quickAccessToolBar.on(
                "click",
                ".k-button",
                function (n) {
                  n.preventDefault();
                  var t = i(n.currentTarget).attr("data-action");
                  this.action({ action: t });
                }.bind(this)
              );
              this.quickAccessAdjust();
            },
            quickAccessAdjust: function () {
              this.tabGroup.css(
                "padding-left",
                n._outerWidth(this.quickAccessToolBar)
              );
            },
            _toolbar: function (t, i, r) {
              var u, f;
              this.toolbars[i] &&
                (this.toolbars[i].destroy(), t.children(".k-toolbar").remove());
              r &&
                ((u = t.html("<div />").children("div")),
                (f = {
                  tools: "boolean" == typeof r ? void 0 : r,
                  toolbarName: i,
                  action: this.action.bind(this),
                  dialog: this.dialog.bind(this),
                }),
                (this.toolbars[i] = new n.spreadsheet.ToolBar(u, f)));
            },
          })));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/dialogs.min",
      ["kendo.core.min", "kendo.binder.min", "kendo.validator.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        function a(t, i) {
          return n.spreadsheet.formatting.text(t, i);
        }
        function w(n, t) {
          for (var u = [], f = [], r = 0; r < t.length; r++)
            i.inArray(t[r][n], f) == -1 && (u.push(t[r]), f.push(t[r][n]));
          return u;
        }
        function vt(n) {
          return { value: n, text: r("exportAsDialog.pdf.paper." + n) };
        }
        function f(t, i) {
          n.spreadsheet.dialogs.register(
            t,
            h.extend({ options: { messageId: i } })
          );
        }
        function v(n, t) {
          this.path = n.split(".");
          this.def = t;
        }
        function r(n, t) {
          return new v(n, t);
        }
        function y(n) {
          return n instanceof v
            ? n.trans()
            : Array.isArray(n)
            ? n.map(y)
            : null != n && "object" == typeof n
            ? Object.keys(n).reduce(function (t, i) {
                return (t[i] = y(n[i])), t;
              }, {})
            : n;
        }
        var i,
          e,
          u,
          l,
          t,
          o,
          s,
          h,
          b,
          k,
          d,
          g,
          nt,
          c,
          tt,
          it,
          rt,
          ut,
          ft,
          et,
          p,
          ot,
          st,
          ht,
          ct,
          lt,
          at;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((i = n.jQuery),
          (e = n.data.ObservableObject),
          (u = n.spreadsheet.messages.dialogs =
            {
              apply: "Apply",
              save: "Save",
              cancel: "Cancel",
              remove: "Remove",
              retry: "Retry",
              revert: "Revert",
              okText: "OK",
              formatCellsDialog: {
                title: "Format",
                categories: {
                  number: "Number",
                  currency: "Currency",
                  date: "Date",
                },
              },
              fontFamilyDialog: { title: "Font" },
              fontSizeDialog: { title: "Font size" },
              bordersDialog: { title: "Borders" },
              alignmentDialog: {
                title: "Alignment",
                buttons: {
                  justtifyLeft: "Align left",
                  justifyCenter: "Center",
                  justifyRight: "Align right",
                  justifyFull: "Justify",
                  alignTop: "Align top",
                  alignMiddle: "Align middle",
                  alignBottom: "Align bottom",
                },
              },
              mergeDialog: {
                title: "Merge cells",
                buttons: {
                  mergeCells: "Merge all",
                  mergeHorizontally: "Merge horizontally",
                  mergeVertically: "Merge vertically",
                  unmerge: "Unmerge",
                },
              },
              freezeDialog: {
                title: "Freeze panes",
                buttons: {
                  freezePanes: "Freeze panes",
                  freezeRows: "Freeze rows",
                  freezeColumns: "Freeze columns",
                  unfreeze: "Unfreeze panes",
                },
              },
              confirmationDialog: {
                text: "Are you sure you want to remove this sheet?",
                title: "Sheet remove",
              },
              validationDialog: {
                title: "Data Validation",
                hintMessage: "Please enter a valid {0} value {1}.",
                hintTitle: "Validation {0}",
                criteria: {
                  any: "Any value",
                  number: "Number",
                  text: "Text",
                  date: "Date",
                  custom: "Custom Formula",
                  list: "List",
                },
                comparers: {
                  greaterThan: "greater than",
                  lessThan: "less than",
                  between: "between",
                  notBetween: "not between",
                  equalTo: "equal to",
                  notEqualTo: "not equal to",
                  greaterThanOrEqualTo: "greater than or equal to",
                  lessThanOrEqualTo: "less than or equal to",
                },
                comparerMessages: {
                  greaterThan: "greater than {0}",
                  lessThan: "less than {0}",
                  between: "between {0} and {1}",
                  notBetween: "not between {0} and {1}",
                  equalTo: "equal to {0}",
                  notEqualTo: "not equal to {0}",
                  greaterThanOrEqualTo: "greater than or equal to {0}",
                  lessThanOrEqualTo: "less than or equal to {0}",
                  custom: "that satisfies the formula: {0}",
                },
                labels: {
                  criteria: "Criteria",
                  comparer: "Comparer",
                  min: "Min",
                  max: "Max",
                  value: "Value",
                  start: "Start",
                  end: "End",
                  onInvalidData: "On invalid data",
                  rejectInput: "Reject input",
                  showWarning: "Show warning",
                  showHint: "Show hint",
                  hintTitle: "Hint title",
                  hintMessage: "Hint message",
                  ignoreBlank: "Ignore blank",
                  showListButton: "Display button to show list",
                  showCalendarButton: "Display button to show calendar",
                },
                placeholders: {
                  typeTitle: "Type title",
                  typeMessage: "Type message",
                },
              },
              exportAsDialog: {
                title: "Export...",
                defaultFileName: "Workbook",
                xlsx: { description: "Excel Workbook (.xlsx)" },
                pdf: {
                  description: "Portable Document Format (.pdf)",
                  area: {
                    workbook: "Entire Workbook",
                    sheet: "Active Sheet",
                    selection: "Selection",
                  },
                  paper: {
                    a2: "A2 (420 mm × 594 mm)",
                    a3: "A3 (297 mm x 420 mm)",
                    a4: "A4 (210 mm x 297 mm)",
                    a5: "A5 (148 mm x 210 mm)",
                    b3: "B3 (353 mm × 500 mm)",
                    b4: "B4 (250 mm x 353 mm)",
                    b5: "B5 (176 mm x 250 mm)",
                    folio: 'Folio (8.5" x 13")',
                    legal: 'Legal (8.5" x 14")',
                    letter: 'Letter (8.5" x 11")',
                    tabloid: 'Tabloid (11" x 17")',
                    executive: 'Executive (7.25" x 10.5")',
                  },
                  margin: { normal: "Normal", narrow: "Narrow", wide: "Wide" },
                },
                labels: {
                  scale: "Scale",
                  fit: "Fit to page",
                  fileName: "File name",
                  saveAsType: "Save as type",
                  exportArea: "Export",
                  paperSize: "Paper size",
                  margins: "Margins",
                  orientation: "Orientation",
                  print: "Print",
                  guidelines: "Guidelines",
                  center: "Center",
                  horizontally: "Horizontally",
                  vertically: "Vertically",
                },
              },
              modifyMergedDialog: {
                errorMessage: "Cannot change part of a merged cell.",
              },
              rangeDisabledDialog: {
                errorMessage: "Destination range contains disabled cells.",
              },
              intersectsArrayDialog: {
                errorMessage: "You cannot alter part of an array",
              },
              incompatibleRangesDialog: { errorMessage: "Incompatible ranges" },
              noFillDirectionDialog: {
                errorMessage: "Cannot determine fill direction",
              },
              duplicateSheetNameDialog: {
                errorMessage: "Duplicate sheet name",
              },
              overflowDialog: {
                errorMessage:
                  "Cannot paste, because the copy area and the paste area are not the same size and shape.",
              },
              useKeyboardDialog: {
                title: "Copying and pasting",
                errorMessage:
                  "These actions cannot be invoked through the menu. Please use the keyboard shortcuts instead:",
                labels: {
                  forCopy: "for copy",
                  forCut: "for cut",
                  forPaste: "for paste",
                },
              },
              unsupportedSelectionDialog: {
                errorMessage:
                  "That action cannot be performed on multiple selection.",
              },
              linkDialog: {
                title: "Hyperlink",
                labels: {
                  text: "Text",
                  url: "Address",
                  removeLink: "Remove link",
                },
              },
              insertCommentDialog: {
                title: "Insert comment",
                labels: { comment: "Comment", removeComment: "Remove comment" },
              },
              insertImageDialog: {
                title: "Insert image",
                info: "Drag an image here, or click to select",
                typeError: "Please select a JPEG, PNG or GIF image",
              },
            }),
          (l = {}),
          (n.spreadsheet.dialogs = {
            register: function (n, t) {
              l[n] = t;
            },
            registered: function (n) {
              return !!l[n];
            },
            create: function (n, t) {
              var i = l[n];
              if (i) return new i(t);
            },
          }),
          (t = n.spreadsheet.SpreadsheetDialog =
            n.Observable.extend({
              init: function (t) {
                n.Observable.fn.init.call(this, t);
                this.options = y(i.extend(!0, {}, this.options, t));
                this.bind(this.events, t);
              },
              events: ["close", "activate"],
              options: { autoFocus: !0 },
              dialog: function () {
                if (!this._dialog) {
                  var t = {
                    autoFocus: !1,
                    scrollable: !1,
                    resizable: !1,
                    modal: !0,
                    visible: !1,
                    width: this.options.width || 320,
                    title: this.options.title,
                    open: function () {
                      this.center();
                    },
                    close: this._onDialogClose.bind(this),
                    activate: this._onDialogActivate.bind(this),
                    deactivate: this._onDialogDeactivate.bind(this),
                  };
                  this._dialog = i(
                    "<div class='k-spreadsheet-window k-action-window k-popup-edit-form' />"
                  )
                    .addClass(this.options.className || "")
                    .append(
                      n.template(this.options.template)({
                        messages: n.spreadsheet.messages.dialogs || u,
                        errors: this.options.errors,
                      })
                    )
                    .kendoWindow(t)
                    .data("kendoWindow");
                }
                return this._dialog;
              },
              _onDialogClose: function () {
                this.trigger("close", { action: this._action });
              },
              _onDialogActivate: function () {
                this.trigger("activate");
              },
              _onDialogDeactivate: function () {
                this.trigger("deactivate");
                this.destroy();
              },
              destroy: function () {
                this._dialog && (this._dialog.destroy(), (this._dialog = null));
              },
              open: function () {
                this.dialog().open();
                this.dialog().element.find(".k-primary").focus();
              },
              apply: function () {
                this.close();
              },
              close: function () {
                this._action = "close";
                this.dialog().close();
              },
            })),
          (o = n.spreadsheet.FormatCellsViewModel =
            e.extend({
              init: function (n) {
                e.fn.init.call(this, n);
                this.useCategory(this.category);
              },
              useCategory: function (n) {
                var t = (n && n.type) || "number",
                  i = "currency" == t;
                this.category = n;
                this.set("showCurrencyFilter", i && this.currencies.length > 1);
                i
                  ? this.currency(this.currencies[0])
                  : this.set("formats", this.allFormats[t + "Formats"]);
                this.useFirstFormat();
              },
              useFirstFormat: function () {
                this.formats.length &&
                  this.set("format", this.formats[0].value);
              },
              currency: function (n) {
                var t, i;
                return (
                  void 0 !== n &&
                    ((this._currency = n),
                    (t = n.value),
                    (i = [
                      { currency: t, decimals: !0 },
                      { currency: t, decimals: !0, iso: !0 },
                      { currency: t, decimals: !1 },
                    ]),
                    (i = i.map(function (n) {
                      return (
                        (n = o.convert.currency(n)),
                        { value: n, name: a(1e3, n) }
                      );
                    })),
                    this.set("formats", i),
                    this.useFirstFormat()),
                  this._currency || this.currencies[0]
                );
              },
              categoryFilter: function (n) {
                return void 0 !== n && this.useCategory(n), this.category;
              },
              preview: function () {
                var n = this.get("format"),
                  t = this.value || 0;
                return n && n.length ? a(t, n) : t;
              },
            })),
          (o.convert = {
            currency: function (n) {
              function r(n, t) {
                return Array(t + 1).join(n);
              }
              var i = n.currency,
                t = i.pattern[1];
              return (
                n.decimals &&
                  (t = t.replace(/n/g, "n" + i["."] + r("0", i.decimals))),
                (t = n.iso
                  ? '"' + i.abbr + '" ' + t.replace(/\s*\$\s*/g, "")
                  : t.replace(/\$/g, JSON.stringify(i.symbol))),
                (t = t.replace(/n/g, "?"))
              );
            },
            date: function (n) {
              return /T|Z/.test(n)
                ? ""
                : n.toLowerCase().replace(/tt/g, "AM/PM").replace(/'/g, '"');
            },
          }),
          (s = t.extend({
            init: function (r) {
              var f = n.spreadsheet.messages.dialogs.formatCellsDialog || u,
                e = {
                  title: f.title,
                  categories: [
                    { type: "number", name: f.categories.number },
                    { type: "currency", name: f.categories.currency },
                    { type: "date", name: f.categories.date },
                  ],
                };
              t.fn.init.call(this, i.extend(e, r));
              this._generateFormats();
            },
            options: {
              className: "k-spreadsheet-format-cells",
              template:
                "<div class='k-edit-form-container'><div class='k-root-tabs' data-role='tabstrip' data-text-field='name' data-bind='source: categories, value: categoryFilter' data-animation='false' /><div class='k-spreadsheet-preview' data-bind='text: preview' /><script type='text/x-kendo-template' id='format-item-template'>\\#: data.name \\#</script><select data-role='dropdownlist' class='k-format-filter' data-text-field='description' data-value-field='value.name' data-bind='visible: showCurrencyFilter, value: currency, source: currencies' /><ul data-role='staticlist' tabindex='0' class='k-list k-reset' data-template='format-item-template' data-value-primitive='true' data-value-field='value' data-bind='source: formats, value: format' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div></div>",
            },
            _generateFormats: function () {
              var r,
                t = this.options;
              t.currencies || (t.currencies = s.currenciesFrom(n.cultures));
              t.numberFormats ||
                (t.numberFormats = [
                  { value: "#.00%", name: "100.00%" },
                  { value: "#%", name: "100%" },
                  { value: "#.00", name: "1024.00" },
                  { value: "#,###.00", name: "1,024.00" },
                ]);
              t.dateFormats ||
                ((r = n.cultures.current.calendars.standard.patterns),
                (t.dateFormats = w(
                  "value",
                  i.map(r, function (n) {
                    if ((n = o.convert.date(n)))
                      return { value: n, name: a(34567.7678, n) };
                  })
                )));
            },
            open: function (i) {
              var u,
                e,
                r = this.options,
                s = i.value(),
                f = r.categories.slice(0);
              this.viewModel = new o({
                currencies: r.currencies.slice(0),
                allFormats: {
                  numberFormats: r.numberFormats.slice(0),
                  dateFormats: r.dateFormats.slice(0),
                },
                categories: f,
                format: i.format(),
                category: s instanceof Date ? f[2] : f[0],
                apply: this.apply.bind(this),
                close: this.close.bind(this),
                value: s,
              });
              t.fn.open.call(this);
              u = this.dialog().element;
              n.bind(u, this.viewModel);
              e = u.find("select.k-format-filter").data("kendoDropDownList");
              r.currencies.length > 10 && e.setOptions({ filter: "contains" });
              u.find(n.roleSelector("staticlist"))
                .parent()
                .addClass("k-list-wrapper");
            },
            apply: function () {
              var n = this.viewModel.format;
              t.fn.apply.call(this);
              this.trigger("action", {
                command: "PropertyChangeCommand",
                options: { property: "format", value: n },
              });
            },
          })),
          (s.currenciesFrom = function (t) {
            return w(
              "description",
              i.map(t, function (t, i) {
                var r, u;
                if (/-/.test(i))
                  return (
                    (r = t.numberFormat.currency),
                    (u = n.format("{0} ({1}, {2})", r.name, r.abbr, r.symbol)),
                    { description: u, value: r }
                  );
              })
            );
          }),
          n.spreadsheet.dialogs.register("formatCells", s),
          (n.spreadsheet.dialogs.FormatCellsDialog = s),
          (h = t.extend({
            options: {
              className: "k-spreadsheet-message",
              title: "",
              messageId: "",
              text: "",
              template:
                "<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: close'>#= messages.okText #</button></div>",
            },
            open: function () {
              var i, r;
              t.fn.open.call(this);
              i = this.options;
              r = i.text;
              i.messageId &&
                (r = n.getter(i.messageId, !0)(n.spreadsheet.messages.dialogs));
              n.bind(this.dialog().element, {
                text: r,
                close: this.close.bind(this),
              });
            },
          })),
          n.spreadsheet.dialogs.register("message", h),
          (b = t.extend({
            init: function (r) {
              var f = n.spreadsheet.messages.dialogs.confirmationDialog || u,
                e = { title: f.title, text: f.text };
              t.fn.init.call(this, i.extend(e, r));
            },
            options: {
              className: "k-spreadsheet-message",
              messageId: "",
              template:
                "<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: confirm'>#= messages.okText #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>",
            },
            open: function () {
              var i, r;
              t.fn.open.call(this);
              i = this.options;
              r = i.text;
              i.messageId &&
                (r = n.getter(i.messageId, !0)(n.spreadsheet.messages.dialogs));
              n.bind(this.dialog().element, {
                text: r,
                confirm: this.confirm.bind(this),
                cancel: this.close.bind(this),
              });
            },
            isConfirmed: function () {
              return this._confirmed;
            },
            confirm: function () {
              this._confirmed = !0;
              this.close();
            },
          })),
          n.spreadsheet.dialogs.register("confirmation", b),
          (k = t.extend({
            options: {
              className: "k-spreadsheet-message",
              title: "",
              messageId: "",
              text: "",
              template:
                "<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: retry'>#= messages.retry #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>",
            },
            open: function () {
              var i, r;
              t.fn.open.call(this);
              i = this.options;
              r = i.text;
              i.messageId &&
                (r = n.getter(i.messageId, !0)(n.spreadsheet.messages.dialogs));
              n.bind(this.dialog().element, {
                text: r,
                retry: this.retry.bind(this),
                cancel: this.close.bind(this),
              });
            },
            retry: function () {
              this._retry = !0;
              this.close();
            },
          })),
          n.spreadsheet.dialogs.register("validationError", k),
          (d = t.extend({
            init: function (r) {
              var f = n.spreadsheet.messages.dialogs.fontFamilyDialog || u;
              t.fn.init.call(this, i.extend({ title: f.title }, r));
              this._list();
            },
            options: { template: "<ul class='k-list k-reset'></ul>" },
            _list: function () {
              var t = this.dialog().element.find("ul"),
                i = this.options.fonts,
                r = this.options.defaultFont;
              this.list = new n.ui.StaticList(t, {
                dataSource: new n.data.DataSource({ data: i }),
                template: "#: data #",
                value: r,
                change: this.apply.bind(this),
              });
              this.list.dataSource.fetch();
            },
            apply: function (n) {
              t.fn.apply.call(this);
              this.trigger("action", {
                command: "PropertyChangeCommand",
                options: { property: "fontFamily", value: n.sender.value()[0] },
              });
            },
          })),
          n.spreadsheet.dialogs.register("fontFamily", d),
          (g = t.extend({
            init: function (r) {
              var f = n.spreadsheet.messages.dialogs.fontSizeDialog || u;
              t.fn.init.call(this, i.extend({ title: f.title }, r));
              this._list();
            },
            options: { template: "<ul class='k-list k-reset'></ul>" },
            _list: function () {
              var t = this.dialog().element.find("ul"),
                i = this.options.sizes,
                r = this.options.defaultSize;
              this.list = new n.ui.StaticList(t, {
                dataSource: new n.data.DataSource({ data: i }),
                template: "#: data #",
                value: r,
                change: this.apply.bind(this),
              });
              this.list.dataSource.fetch();
            },
            apply: function (i) {
              t.fn.apply.call(this);
              this.trigger("action", {
                command: "PropertyChangeCommand",
                options: {
                  property: "fontSize",
                  value: n.parseInt(i.sender.value()[0]),
                },
              });
            },
          })),
          n.spreadsheet.dialogs.register("fontSize", g),
          (nt = t.extend({
            init: function (r) {
              var f = n.spreadsheet.messages.dialogs.bordersDialog || u;
              t.fn.init.call(this, i.extend({ title: f.title }, r));
              this.element = this.dialog().element;
              this._borderPalette();
              this.viewModel = n.observable({
                apply: this.apply.bind(this),
                close: this.close.bind(this),
              });
              n.bind(this.element.find(".k-action-buttons"), this.viewModel);
            },
            options: {
              width: 177,
              template:
                "<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>",
            },
            apply: function () {
              t.fn.apply.call(this);
              var n = this.value();
              this.trigger("action", {
                command: "BorderChangeCommand",
                options: { border: n.type, style: { size: 1, color: n.color } },
              });
            },
            _borderPalette: function () {
              var t = this.dialog().element.find("div:first");
              this.borderPalette = new n.spreadsheet.BorderPalette(t, {
                change: this.value.bind(this),
              });
            },
            value: function (n) {
              return void 0 === n ? this._state : void (this._state = n);
            },
          })),
          n.spreadsheet.dialogs.register("borders", nt),
          (c = t.extend({
            init: function (i) {
              t.fn.init.call(this, i);
              this.element = this.dialog().element;
              this.property = i.property;
              this.options.title = i.title;
              this.viewModel = n.observable({
                apply: this.apply.bind(this),
                close: this.close.bind(this),
              });
              n.bind(this.element.find(".k-action-buttons"), this.viewModel);
            },
            options: {
              template:
                "<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>",
            },
            apply: function () {
              t.fn.apply.call(this);
              this.trigger("action", {
                command: "PropertyChangeCommand",
                options: { property: this.property, value: this.value() },
              });
            },
            value: function (n) {
              return void 0 === n ? this._value : void (this._value = n.value);
            },
          })),
          (tt = c.extend({
            init: function (n) {
              n.width = 177;
              c.fn.init.call(this, n);
              this._colorPalette();
            },
            _colorPalette: function () {
              var n = this.dialog().element.find("div:first");
              this.colorPalette = n
                .kendoColorPalette({
                  palette: [
                    "#ffffff",
                    "#000000",
                    "#d6ecff",
                    "#4e5b6f",
                    "#7fd13b",
                    "#ea157a",
                    "#feb80a",
                    "#00addc",
                    "#738ac8",
                    "#1ab39f",
                    "#f2f2f2",
                    "#7f7f7f",
                    "#a7d6ff",
                    "#d9dde4",
                    "#e5f5d7",
                    "#fad0e4",
                    "#fef0cd",
                    "#c5f2ff",
                    "#e2e7f4",
                    "#c9f7f1",
                    "#d8d8d8",
                    "#595959",
                    "#60b5ff",
                    "#b3bcca",
                    "#cbecb0",
                    "#f6a1c9",
                    "#fee29c",
                    "#8be6ff",
                    "#c7d0e9",
                    "#94efe3",
                    "#bfbfbf",
                    "#3f3f3f",
                    "#007dea",
                    "#8d9baf",
                    "#b2e389",
                    "#f272af",
                    "#fed46b",
                    "#51d9ff",
                    "#aab8de",
                    "#5fe7d5",
                    "#a5a5a5",
                    "#262626",
                    "#003e75",
                    "#3a4453",
                    "#5ea226",
                    "#af0f5b",
                    "#c58c00",
                    "#0081a5",
                    "#425ea9",
                    "#138677",
                    "#7f7f7f",
                    "#0c0c0c",
                    "#00192e",
                    "#272d37",
                    "#3f6c19",
                    "#750a3d",
                    "#835d00",
                    "#00566e",
                    "#2c3f71",
                    "#0c594f",
                  ],
                  change: this.value.bind(this),
                })
                .data("kendoColorPalette");
            },
          })),
          n.spreadsheet.dialogs.register("colorPicker", tt),
          (it = c.extend({
            init: function (n) {
              n.width = 268;
              c.fn.init.call(this, n);
              this.dialog().setOptions({ animation: !1 });
              this.dialog().one("activate", this._colorPicker.bind(this));
            },
            _colorPicker: function () {
              var n = this.dialog().element.find("div:first");
              this.colorPicker = n
                .kendoFlatColorPicker({ change: this.value.bind(this) })
                .data("kendoFlatColorPicker");
            },
          })),
          n.spreadsheet.dialogs.register("customColor", it),
          (rt = t.extend({
            init: function (r) {
              var f = n.spreadsheet.messages.dialogs.alignmentDialog || u,
                e = {
                  title: f.title,
                  buttons: [
                    {
                      property: "textAlign",
                      value: "left",
                      iconClass: "align-left",
                      text: f.buttons.justtifyLeft,
                    },
                    {
                      property: "textAlign",
                      value: "center",
                      iconClass: "align-center",
                      text: f.buttons.justifyCenter,
                    },
                    {
                      property: "textAlign",
                      value: "right",
                      iconClass: "align-right",
                      text: f.buttons.justifyRight,
                    },
                    {
                      property: "textAlign",
                      value: "justify",
                      iconClass: "align-justify",
                      text: f.buttons.justifyFull,
                    },
                    {
                      property: "verticalAlign",
                      value: "top",
                      iconClass: "align-top",
                      text: f.buttons.alignTop,
                    },
                    {
                      property: "verticalAlign",
                      value: "center",
                      iconClass: "align-middle",
                      text: f.buttons.alignMiddle,
                    },
                    {
                      property: "verticalAlign",
                      value: "bottom",
                      iconClass: "align-bottom",
                      text: f.buttons.alignBottom,
                    },
                  ],
                };
              t.fn.init.call(this, i.extend(e, r));
              this._list();
            },
            options: { template: "<ul class='k-list k-reset'></ul>" },
            _list: function () {
              var t = this.dialog().element.find("ul");
              this.list = new n.ui.StaticList(t, {
                dataSource: new n.data.DataSource({
                  data: this.options.buttons,
                }),
                template:
                  "<a title='#=text#' data-property='#=property#' data-value='#=value#'><span class='k-icon k-i-#=iconClass#'></span>#=text#</a>",
                change: this.apply.bind(this),
              });
              this.list.dataSource.fetch();
            },
            apply: function (n) {
              var i = n.sender.value()[0];
              t.fn.apply.call(this);
              this.trigger("action", {
                command: "PropertyChangeCommand",
                options: { property: i.property, value: i.value },
              });
            },
          })),
          n.spreadsheet.dialogs.register("alignment", rt),
          (ut = t.extend({
            init: function (r) {
              var f = n.spreadsheet.messages.dialogs.mergeDialog || u,
                e = {
                  title: f.title,
                  buttons: [
                    {
                      value: "cells",
                      iconClass: "cells-merge",
                      text: f.buttons.mergeCells,
                    },
                    {
                      value: "horizontally",
                      iconClass: "cells-merge-horizontally",
                      text: f.buttons.mergeHorizontally,
                    },
                    {
                      value: "vertically",
                      iconClass: "cells-merge-vertically",
                      text: f.buttons.mergeVertically,
                    },
                    {
                      value: "unmerge",
                      iconClass: "table-unmerge",
                      text: f.buttons.unmerge,
                    },
                  ],
                };
              t.fn.init.call(this, i.extend(e, r));
              this._list();
            },
            options: { template: "<ul class='k-list k-reset'></ul>" },
            _list: function () {
              var t = this.dialog().element.find("ul");
              this.list = new n.ui.StaticList(t, {
                dataSource: new n.data.DataSource({
                  data: this.options.buttons,
                }),
                template:
                  "<a title='#=text#' data-value='#=value#'><span class='k-icon k-icon k-i-#=iconClass#'></span>#=text#</a>",
                change: this.apply.bind(this),
              });
              this.list.dataSource.fetch();
            },
            apply: function (n) {
              var i = n.sender.value()[0];
              t.fn.apply.call(this);
              this.trigger("action", {
                command: "MergeCellCommand",
                options: { value: i.value },
              });
            },
          })),
          n.spreadsheet.dialogs.register("merge", ut),
          (ft = t.extend({
            init: function (r) {
              var f = n.spreadsheet.messages.dialogs.freezeDialog || u,
                e = {
                  title: f.title,
                  buttons: [
                    {
                      value: "panes",
                      iconClass: "pane-freeze",
                      text: f.buttons.freezePanes,
                    },
                    {
                      value: "rows",
                      iconClass: "row-freeze",
                      text: f.buttons.freezeRows,
                    },
                    {
                      value: "columns",
                      iconClass: "column-freeze",
                      text: f.buttons.freezeColumns,
                    },
                    {
                      value: "unfreeze",
                      iconClass: "table-unmerge",
                      text: f.buttons.unfreeze,
                    },
                  ],
                };
              t.fn.init.call(this, i.extend(e, r));
              this._list();
            },
            options: { template: "<ul class='k-list k-reset'></ul>" },
            _list: function () {
              var t = this.dialog().element.find("ul");
              this.list = new n.ui.StaticList(t, {
                dataSource: new n.data.DataSource({
                  data: this.options.buttons,
                }),
                template:
                  "<a title='#=text#' data-value='#=value#'><span class='k-icon k-icon k-i-#=iconClass#'></span>#=text#</a>",
                change: this.apply.bind(this),
              });
              this.list.dataSource.fetch();
            },
            apply: function (n) {
              var i = n.sender.value()[0];
              t.fn.apply.call(this);
              this.trigger("action", {
                command: "FreezePanesCommand",
                options: { value: i.value },
              });
            },
          })),
          n.spreadsheet.dialogs.register("freeze", ft),
          (et = n.spreadsheet.ValidationCellsViewModel =
            e.extend({
              init: function (n) {
                e.fn.init.call(this, n);
                this.bind(
                  "change",
                  function (n) {
                    "criterion" === n.field &&
                      (this.reset(),
                      ("custom" !== this.criterion &&
                        "list" !== this.criterion) ||
                        this.setHintMessageTemplate());
                    "comparer" === n.field && this.setHintMessageTemplate();
                    ("hintMessage" != n.field && "hintTitle" != n.field) ||
                      this._mute ||
                      (this.shouldBuild = !1);
                    ("from" != n.field &&
                      "to" != n.field &&
                      "hintMessageTemplate" != n.field &&
                      "type" != n.field) ||
                      !this.shouldBuild ||
                      this.buildMessages();
                  }.bind(this)
                );
                this.reset();
              },
              buildMessages: function () {
                this._mute = !0;
                this.set(
                  "hintTitle",
                  this.hintTitleTemplate
                    ? n.format(this.hintTitleTemplate, this.type)
                    : ""
                );
                this.set(
                  "hintMessage",
                  this.hintMessageTemplate
                    ? n.format(this.hintMessageTemplate, this.from, this.to)
                    : ""
                );
                this._mute = !1;
              },
              reset: function () {
                this.setComparers();
                this.set("comparer", this.comparers[0].type);
                this.set("from", null);
                this.set("to", null);
                this.set("useCustomMessages", !1);
                this.shouldBuild = !0;
                this.hintTitleTemplate = this.defaultHintTitle;
                this.buildMessages();
              },
              setComparers: function () {
                var i,
                  n,
                  t = this.defaultComparers,
                  r = [];
                if ("text" === this.criterion)
                  for (i = ["equalTo", "notEqualTo"], n = 0; n < t.length; n++)
                    i[0] == t[n].type && (r.push(t[n]), i.shift());
                else r = t.slice();
                this.set("comparers", r);
              },
              setHintMessageTemplate: function () {
                "custom" !== this.criterion && "list" !== this.criterion
                  ? this.set(
                      "hintMessageTemplate",
                      n.format(
                        this.defaultHintMessage,
                        this.criterion,
                        this.comparerMessages[this.comparer]
                      )
                    )
                  : (this.set("hintMessageTemplate", ""),
                    this.set("hintMessage", ""));
              },
              isAny: function () {
                return "any" === this.get("criterion");
              },
              isNumber: function () {
                return "number" === this.get("criterion");
              },
              showToForNumber: function () {
                return this.showTo() && this.isNumber();
              },
              showToForDate: function () {
                return this.showTo() && this.isDate();
              },
              isText: function () {
                return "text" === this.get("criterion");
              },
              isDate: function () {
                return "date" === this.get("criterion");
              },
              isList: function () {
                return "list" === this.get("criterion");
              },
              isCustom: function () {
                return "custom" === this.get("criterion");
              },
              showRemove: function () {
                return this.get("hasValidation");
              },
              showTo: function () {
                return (
                  "between" == this.get("comparer") ||
                  "notBetween" == this.get("comparer")
                );
              },
              update: function (n) {
                this.set("hasValidation", !!n);
                n && this.fromValidationObject(n);
              },
              fromValidationObject: function (n) {
                this.set("criterion", n.dataType);
                this.set("comparer", n.comparerType);
                this.set("from", n.from);
                this.set("to", n.to);
                this.set("type", n.type);
                this.set("ignoreBlank", n.allowNulls);
                this.set("showButton", n.showButton);
                n.messageTemplate || n.titleTemplate
                  ? ((this.hintMessageTemplate = n.messageTemplate),
                    (this.hintMessage = n.messageTemplate),
                    (this.hintTitleTemplate = n.titleTemplate),
                    (this.hintTitle = n.titleTemplate),
                    (this.useCustomMessages = !0),
                    this.buildMessages())
                  : (this.useCustomMessages = !1);
              },
              toValidationObject: function () {
                if ("any" === this.criterion) return null;
                var n = {
                  type: this.type,
                  dataType: this.criterion,
                  comparerType: this.comparer,
                  from: this.from,
                  to: this.to,
                  allowNulls: this.ignoreBlank,
                  showButton: this.showButton,
                };
                return (
                  this.useCustomMessages &&
                    ((n.messageTemplate = this.shouldBuild
                      ? this.hintMessageTemplate
                      : this.hintMessage),
                    (n.titleTemplate = this.hintTitle)),
                  n
                );
              },
            })),
          (p = t.extend({
            init: function (r) {
              var f = n.spreadsheet.messages.dialogs.validationDialog || u,
                e = {
                  title: f.title,
                  hintMessage: f.hintMessage,
                  hintTitle: f.hintTitle,
                  criteria: [
                    { type: "any", name: f.criteria.any },
                    { type: "number", name: f.criteria.number },
                    { type: "text", name: f.criteria.text },
                    { type: "date", name: f.criteria.date },
                    { type: "custom", name: f.criteria.custom },
                    { type: "list", name: f.criteria.list },
                  ],
                  comparers: [
                    { type: "greaterThan", name: f.comparers.greaterThan },
                    { type: "lessThan", name: f.comparers.lessThan },
                    { type: "between", name: f.comparers.between },
                    { type: "notBetween", name: f.comparers.notBetween },
                    { type: "equalTo", name: f.comparers.equalTo },
                    { type: "notEqualTo", name: f.comparers.notEqualTo },
                    {
                      type: "greaterThanOrEqualTo",
                      name: f.comparers.greaterThanOrEqualTo,
                    },
                    {
                      type: "lessThanOrEqualTo",
                      name: f.comparers.lessThanOrEqualTo,
                    },
                  ],
                  comparerMessages: f.comparerMessages,
                };
              t.fn.init.call(this, i.extend(e, r));
            },
            options: {
              width: 450,
              criterion: "any",
              type: "reject",
              ignoreBlank: !0,
              showButton: !0,
              useCustomMessages: !1,
              errorTemplate:
                '<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-i-warning"> </span>#= message #<div class="k-callout k-callout-n"></div></div>',
              template:
                '<div class="k-edit-form-container"><div class="k-edit-label"><label>#: messages.validationDialog.labels.criteria #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.criteria #"data-text-field="name" data-value-field="type" data-bind="value: criterion, source: criteria" /></div><div data-bind="visible: isNumber"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.comparer #"data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.min #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.min #" title="#: messages.validationDialog.labels.min #" placeholder="e.g. 10" class="k-textbox" data-bind="value: from, enabled: isNumber" required="required" /></div><div data-bind="visible: showTo"><div class="k-edit-label"><label>#: messages.validationDialog.labels.max #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.max #" title="#: messages.validationDialog.labels.max #" placeholder="e.g. 100" class="k-textbox" data-bind="value: to, enabled: showToForNumber" required="required" /></div></div></div><div data-bind="visible: isText"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.comparer #"data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" title="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isText" required="required" /></div></div><div data-bind="visible: isDate"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.comparer #"data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.start #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.start #" title="#: messages.validationDialog.labels.start #" class="k-textbox" data-bind="value: from, enabled: isDate" required="required" /></div><div data-bind="visible: showTo"><div class="k-edit-label"><label>#: messages.validationDialog.labels.end #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.end #" title="#: messages.validationDialog.labels.end #" class="k-textbox" data-bind="value: to, enabled: showToForDate" required="required" /></div></div></div><div data-bind="visible: isCustom"><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" title="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isCustom" required="required" /></div></div><div data-bind="visible: isList"><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" title="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isList" required="required" /></div></div><div data-bind="visible: isList"><div class="k-edit-field"><input type="checkbox" name="showButton" id="listShowButton" class="k-checkbox" data-bind="checked: showButton"/><label for="listShowButton" class="k-checkbox-label"> #: messages.validationDialog.labels.showListButton #</label></div></div><div data-bind="visible: isDate"><div class="k-edit-field"><input type="checkbox" name="showButton" id="dateShowButton" class="k-checkbox" data-bind="checked: showButton"/><label for="dateShowButton" class="k-checkbox-label"> #: messages.validationDialog.labels.showCalendarButton #</label></div></div><div data-bind="invisible: isAny"><div class="k-edit-field"><input type="checkbox" title="#: messages.validationDialog.labels.ignoreBlank #" name="ignoreBlank" id="ignoreBlank" class="k-checkbox" data-bind="checked: ignoreBlank"/><label for="ignoreBlank" class="k-checkbox-label"> #: messages.validationDialog.labels.ignoreBlank #</label></div></div><div data-bind="invisible: isAny"><div class="k-hr"></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.onInvalidData #:</label></div><div class="k-edit-field"><input type="radio" title="#: messages.validationDialog.labels.rejectInput #" id="validationTypeReject" name="validationType" value="reject" data-bind="checked: type" class="k-radio" /><label for="validationTypeReject" class="k-radio-label">#: messages.validationDialog.labels.rejectInput #</label> <input type="radio" title="#: messages.validationDialog.labels.showWarning #" id="validationTypeWarning"  name="validationType" value="warning" data-bind="checked: type" class="k-radio" /><label for="validationTypeWarning" class="k-radio-label">#: messages.validationDialog.labels.showWarning #</label></div></div><div data-bind="invisible: isAny" class="hint-wrapper"><div class="k-edit-field"><input type="checkbox" title="#: messages.validationDialog.labels.showHint #" name="useCustomMessages" id="useCustomMessages" class="k-checkbox" data-bind="checked: useCustomMessages" /><label class="k-checkbox-label" for="useCustomMessages"> #: messages.validationDialog.labels.showHint #</label></div><div data-bind="visible: useCustomMessages"><div class="k-edit-label"><label>#: messages.validationDialog.labels.hintTitle #:</label></div><div class="k-edit-field"><input class="k-textbox" title="#: messages.validationDialog.labels.hintTitle #" placeholder="#: messages.validationDialog.placeholders.typeTitle #" data-bind="value: hintTitle" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.hintMessage #:</label></div><div class="k-edit-field"><input class="k-textbox" title="#: messages.validationDialog.labels.hintMessage #" placeholder="#: messages.validationDialog.placeholders.typeMessage #" data-bind="value: hintMessage" /></div></div></div><div class="k-action-buttons"><button class="k-button" data-bind="visible: showRemove, click: remove">#: messages.remove #</button><button class="k-button k-primary" data-bind="click: apply">#: messages.apply #</button><button class="k-button" data-bind="click: close">#: messages.cancel #</button></div></div>',
            },
            open: function (i) {
              var u,
                r = this.options;
              this.viewModel = new et({
                type: r.type,
                defaultHintMessage: r.hintMessage,
                defaultHintTitle: r.hintTitle,
                defaultComparers: r.comparers.slice(0),
                comparerMessages: r.comparerMessages,
                criteria: r.criteria.slice(0),
                criterion: r.criterion,
                ignoreBlank: r.ignoreBlank,
                showButton: r.showButton,
                apply: this.apply.bind(this),
                close: this.close.bind(this),
                remove: this.remove.bind(this),
              });
              this.viewModel.update(i.validation());
              t.fn.open.call(this);
              u = this.dialog().element;
              this.validatable && this.validatable.destroy();
              n.bind(u, this.viewModel);
              this.validatable = new n.ui.Validator(
                u.find(".k-edit-form-container"),
                {
                  validateOnBlur: !1,
                  errorTemplate: this.options.errorTemplate || void 0,
                }
              );
            },
            apply: function () {
              this.validatable.validate() &&
                (t.fn.apply.call(this),
                this.trigger("action", {
                  command: "EditValidationCommand",
                  options: { value: this.viewModel.toValidationObject() },
                }));
            },
            remove: function () {
              this.viewModel.set("criterion", "any");
              this.apply();
            },
          })),
          n.spreadsheet.dialogs.register("validation", p),
          (n.spreadsheet.dialogs.ValidationDialog = p),
          (ot = t.extend({
            init: function (i) {
              t.fn.init.call(this, i);
              i = this.options;
              this.viewModel = n.observable({
                title: i.title,
                name: i.name,
                extension: i.extension,
                fileFormats: i.fileFormats,
                excel: i.excelExport,
                pdf: {
                  proxyURL: i.pdfExport.proxyURL,
                  forceProxy: i.pdfExport.forceProxy,
                  title: i.pdfExport.title,
                  author: i.pdfExport.author,
                  subject: i.pdfExport.subject,
                  keywords: i.pdfExport.keywords,
                  creator: i.pdfExport.creator,
                  date: i.pdfExport.date,
                  fitWidth: i.pdf.fitWidth,
                  area: i.pdf.area,
                  areas: i.pdf.areas,
                  paperSize: i.pdf.paperSize,
                  paperSizes: i.pdf.paperSizes,
                  margin: i.pdf.margin,
                  margins: i.pdf.margins,
                  landscape: i.pdf.landscape,
                  guidelines: i.pdf.guidelines,
                  hCenter: i.pdf.hCenter,
                  vCenter: i.pdf.vCenter,
                },
                apply: this.apply.bind(this),
                close: this.close.bind(this),
              });
              var r = this.dialog();
              this.viewModel.bind("change", function (n) {
                "extension" === n.field &&
                  (this.set("showPdfOptions", ".pdf" === this.extension),
                  r.center());
              });
              n.bind(r.element, this.viewModel);
            },
            options: {
              title: r("exportAsDialog.title", "Export..."),
              name: r("exportAsDialog.defaultFileName", "Workbook"),
              extension: ".xlsx",
              fileFormats: [
                {
                  description: r(
                    "exportAsDialog.xlsx.description",
                    "Excel Workbook (.xlsx)"
                  ),
                  extension: ".xlsx",
                },
                {
                  description: r(
                    "exportAsDialog.pdf.description",
                    "Portable Document Format (.pdf)"
                  ),
                  extension: ".pdf",
                },
              ],
              pdf: {
                fitWidth: !0,
                area: "workbook",
                areas: [
                  {
                    area: "workbook",
                    text: r(
                      "exportAsDialog.pdf.area.workbook",
                      "Entire Workbook"
                    ),
                  },
                  {
                    area: "sheet",
                    text: r("exportAsDialog.pdf.area.sheet", "Active Sheet"),
                  },
                  {
                    area: "selection",
                    text: r("exportAsDialog.pdf.area.selection", "Selection"),
                  },
                ],
                paperSize: "a4",
                paperSizes: [
                  "a2",
                  "a3",
                  "a4",
                  "a5",
                  "b3",
                  "b4",
                  "b5",
                  "folio",
                  "legal",
                  "letter",
                  "tabloid",
                  "executive",
                ].map(vt),
                margin: {
                  bottom: "0.75in",
                  left: "0.7in",
                  right: "0.7in",
                  top: "0.75in",
                },
                margins: [
                  {
                    value: {
                      bottom: "0.75in",
                      left: "0.7in",
                      right: "0.7in",
                      top: "0.75in",
                    },
                    text: r("exportAsDialog.pdf.margin.normal", "Normal"),
                  },
                  {
                    value: {
                      bottom: "0.75in",
                      left: "0.25in",
                      right: "0.25in",
                      top: "0.75in",
                    },
                    text: r("exportAsDialog.pdf.margin.narrow", "Narrow"),
                  },
                  {
                    value: {
                      bottom: "1in",
                      left: "1in",
                      right: "1in",
                      top: "1in",
                    },
                    text: r("exportAsDialog.pdf.margin.wide", "Wide"),
                  },
                ],
                landscape: !0,
                guidelines: !0,
                hCenter: !0,
                vCenter: !0,
              },
              width: 520,
              template:
                "<div class='k-edit-label'><label>#: messages.exportAsDialog.labels.fileName #:</label></div><div class='k-edit-field'><input class='k-textbox' data-bind='value: name' /></div><div ><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.saveAsType #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='description' data-value-field='extension' data-bind='value: extension, source: fileFormats' /></div></div><div class='k-export-config' data-bind='visible: showPdfOptions'><hr class='k-hr' /><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.exportArea #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='text' data-value-field='area' data-bind='value: pdf.area, source: pdf.areas' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.paperSize#:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='text' data-value-field='value' data-bind='value: pdf.paperSize, source: pdf.paperSizes' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.margins #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-value-primitive='true'data-text-field='text' data-value-field='value' data-bind='value: pdf.margin, source: pdf.margins' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.orientation #:</label></div><div class='k-edit-field'><div class='k-button-group'><input type='radio' id='k-orientation-portrait' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='false' /><label class='k-button k-button-icon k-group-start k-orientation-button' for='k-orientation-portrait'><span class='k-icon k-i-page-portrait'></span></label><input type='radio' id='k-orientation-landscape' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='true' /><label class='k-button k-button-icon k-group-end k-orientation-button' for='k-orientation-landscape'><span class='k-icon k-i-page-landscape'></span></label></div></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.print #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='guidelines' type='checkbox' data-bind='checked: pdf.guidelines'/><label class='k-checkbox-label' for='guidelines'>#: messages.exportAsDialog.labels.guidelines#</label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.scale #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='fitWidth' type='checkbox' data-bind='checked: pdf.fitWidth'/><label class='k-checkbox-label' for='fitWidth'>#: messages.exportAsDialog.labels.fit #</label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.center #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='hCenter' type='checkbox' data-bind='checked: pdf.hCenter'/><label class='k-checkbox-label' for='hCenter'>#: messages.exportAsDialog.labels.horizontally #</label><input class='k-checkbox' id='vCenter' type='checkbox' data-bind='checked: pdf.vCenter'/><label class='k-checkbox-label' for='vCenter'>#: messages.exportAsDialog.labels.vertically #</label></div><div class='k-page-orientation'><span class='k-icon k-i-page-portrait' data-bind='invisible: pdf.landscape'></span><span class='k-icon k-i-page-landscape' data-bind='visible: pdf.landscape'></span></div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.save #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>",
            },
            apply: function () {
              t.fn.apply.call(this);
              this.trigger("action", {
                command: "SaveAsCommand",
                options: this.viewModel,
              });
            },
          })),
          n.spreadsheet.dialogs.register("exportAs", ot),
          f("modifyMerged", "modifyMergedDialog.errorMessage"),
          f("rangeDisabled", "rangeDisabledDialog.errorMessage"),
          f("intersectsArray", "intersectsArrayDialog.errorMessage"),
          f("overflow", "overflowDialog.errorMessage"),
          f("unsupportedSelection", "unsupportedSelectionDialog.errorMessage"),
          f("incompatibleRanges", "incompatibleRangesDialog.errorMessage"),
          f("noFillDirection", "noFillDirectionDialog.errorMessage"),
          f("duplicateSheetName", "duplicateSheetNameDialog.errorMessage"),
          (st = h.extend({
            options: {
              width: 640,
              title: "Errors in import",
              template:
                "<div class='k-spreadsheet-message-content k-spreadsheet-import-errors'><div class='k--header-message'>We encountered #= errors.length # errors while reading this file.  Please be aware that some formulas might be missing, or contain invalid results.</div><div class='k--errors'><table><thead><tr><th>Context</th><th>Error message</th></tr></thead># for (var i = 0; i < errors.length; ++i) { ## var err = errors[i]; #<tr><td>#: err.context #</td><td>#: err.error #</td></tr># } #</table></div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: close'>#: messages.okText #</button></div>",
            },
          })),
          n.spreadsheet.dialogs.register("importError", st),
          (ht = h.extend({
            options: {
              title: r("useKeyboardDialog.title", "Copying and pasting"),
              template:
                "#: messages.useKeyboardDialog.errorMessage #<div>Ctrl+C #: messages.useKeyboardDialog.labels.forCopy #</div><div>Ctrl+X #: messages.useKeyboardDialog.labels.forCut #</div><div>Ctrl+V #: messages.useKeyboardDialog.labels.forPaste #</div><div class=\"k-action-buttons\"><button class='k-button k-primary' data-bind='click: close'>#= messages.okText #</button></div>",
            },
          })),
          n.spreadsheet.dialogs.register("useKeyboard", ht),
          (ct = t.extend({
            options: {
              title: r("linkDialog.title", "Hyperlink"),
              template:
                "<div class='k-edit-label'><label>#: messages.linkDialog.labels.url #:</label></div><div class='k-edit-field'><input class='k-textbox' data-bind='value: url' title='#: messages.linkDialog.labels.url #' /></div><div class='k-action-buttons'><button class='k-button k-left' data-bind='click: remove'>#= messages.linkDialog.labels.removeLink #</button><button class='k-button k-primary' data-bind='click: apply'>#= messages.okText #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>",
              autoFocus: !1,
            },
            open: function (r) {
              var e,
                u,
                f = this;
              t.fn.open.apply(f, arguments);
              e = f.dialog().element;
              u = n.observable({
                url: r.link(),
                apply: function () {
                  /\S/.test(u.url) || (u.url = null);
                  f.trigger("action", {
                    command: "HyperlinkCommand",
                    options: { link: u.url },
                  });
                  f.close();
                },
                remove: function () {
                  u.url = null;
                  u.apply();
                },
                cancel: f.close.bind(f),
              });
              n.bind(e, u);
              e.find("input")
                .focus()
                .on("keydown", function (n) {
                  13 == n.keyCode
                    ? ((u.url = i(this).val()),
                      n.stopPropagation(),
                      n.preventDefault(),
                      u.apply())
                    : 27 == n.keyCode &&
                      (n.stopPropagation(), n.preventDefault(), u.cancel());
                });
            },
          })),
          n.spreadsheet.dialogs.register("hyperlink", ct),
          (lt = t.extend({
            options: {
              className: "k-spreadsheet-insert-comment",
              template:
                "<div class='k-edit-label'><label>#: messages.insertCommentDialog.labels.comment #:</label></div><div class='k-edit-field'><textarea rows='5' class='k-textbox' data-bind='value: comment'></textarea></div><div class='k-action-buttons'>  <button class='k-button k-left' data-bind='click: remove'>#: messages.insertCommentDialog.labels.removeComment #</button>  <button class='k-button k-primary' data-bind='click: apply'>#: messages.okText #</button>  <button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>",
              title: r("insertCommentDialog.title", "Insert comment"),
              autoFocus: !1,
              width: 450,
            },
            open: function (i) {
              var f,
                r,
                u = this;
              t.fn.open.apply(u, arguments);
              f = u.dialog().element;
              r = n.observable({
                comment: i.comment(),
                apply: function () {
                  /\S/.test(r.comment) || (r.comment = null);
                  u.trigger("action", {
                    command: "InsertCommentCommand",
                    options: { value: r.comment },
                  });
                  u.close();
                },
                remove: function () {
                  r.comment = null;
                  r.apply();
                },
                cancel: u.close.bind(u),
              });
              n.bind(f, r);
              f.find("textarea").focus();
            },
          })),
          n.spreadsheet.dialogs.register("insertComment", lt),
          (at = t.extend({
            options: {
              template:
                "<div class='k-spreadsheet-insert-image-dialog'>  <label data-bind='style: { background-image: imageUrl },                    css: { k-spreadsheet-has-image: hasImage, k-state-hovered: isHovered },                    events: { dragenter: dragEnter, dragover: stopEvent, dragleave: dragLeave, drop: drop }'>    <div data-bind='text: info'></div>    <input type='file' data-bind='events: { change: change }'           accept='image/png, image/jpeg, image/gif' />  </label></div><div class='k-action-buttons'>  <button class='k-button k-primary' data-bind='enabled: okEnabled, click: apply'>#: messages.okText #</button>  <button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>",
              title: r("insertImageDialog.title", "Insert image"),
              width: "auto",
            },
            open: function () {
              var u,
                i,
                r = this;
              t.fn.open.apply(r, arguments);
              u = r.dialog().element;
              i = n.observable({
                okEnabled: !1,
                info: n.spreadsheet.messages.dialogs.insertImageDialog.info,
                imageUrl: "",
                hasImage: !1,
                isHovered: !1,
                _url: null,
                _image: null,
                apply: function () {
                  window.URL.revokeObjectURL(i._url);
                  r.trigger("action", {
                    command: "InsertImageCommand",
                    options: {
                      blob: i._image,
                      width: i._width,
                      height: i._height,
                    },
                  });
                  r.close();
                },
                cancel: r.close.bind(r),
                stopEvent: function (n) {
                  n.stopPropagation();
                  n.preventDefault();
                },
                drop: function (n) {
                  i.stopEvent(n);
                  i.selectFile(n.originalEvent.dataTransfer.files);
                  i.set("isHovered", !1);
                },
                dragEnter: function (n) {
                  i.stopEvent(n);
                  i.set("isHovered", !0);
                },
                dragLeave: function (n) {
                  i.stopEvent(n);
                  i.set("isHovered", !1);
                },
                change: function (n) {
                  i.selectFile(n.target.files);
                },
                selectFile: function (t) {
                  for (var f, u, r = 0; r < t.length; ++r)
                    if (/^image\//i.test(t[r].type)) {
                      f = t[r];
                      break;
                    }
                  i._url && window.URL.revokeObjectURL(i._url);
                  f
                    ? ((i._image = f),
                      (i._url = window.URL.createObjectURL(f)),
                      (u = new Image()),
                      (u.src = i._url),
                      (u.onload = function () {
                        i._width = u.width;
                        i._height = u.height;
                        i.set(
                          "info",
                          n.spreadsheet.messages.dialogs.insertImageDialog.info
                        );
                        i.set("okEnabled", !0);
                        i.set("imageUrl", "url('" + i._url + "')");
                        i.set("hasImage", !0);
                      }))
                    : ((i._image = null),
                      i.set(
                        "info",
                        n.spreadsheet.messages.dialogs.insertImageDialog
                          .typeError
                      ),
                      i.set("okEnabled", !1),
                      i.set("imageUrl", ""),
                      i.set("hasImage", !1));
                },
              });
              n.bind(u, i);
            },
          })),
          n.spreadsheet.dialogs.register("insertImage", at),
          (v.prototype.trans = function () {
            for (
              var i = n.spreadsheet.messages.dialogs, t = 0;
              t < this.path.length;
              ++t
            )
              if (((i = i[this.path[t]]), !i)) return this.def;
            return i;
          }));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/sheetbinder.min",
      ["kendo.core.min", "kendo.data.min", "spreadsheet/sheet.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var t, i;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((t = function (n) {
            return n;
          }),
          (i = n.Class.extend({
            init: function (t) {
              this.options = n.jQuery.extend({}, this.options, t);
              this.columns = this._normalizeColumns(this.options.columns);
              this._sheet();
              this._dataSource();
              this._header();
              this._boundRowsCount = 0;
              this.dataSource.fetch();
            },
            _sheet: function () {
              this.sheet = this.options.sheet;
              this._sheetChangeHandler = this._sheetChange.bind(this);
              this._sheetDeleteRowHandler = this._sheetDeleteRow.bind(this);
              this._sheetInsertRowHandler = this._sheetInsertRow.bind(this);
              this.sheet
                .bind("change", this._sheetChangeHandler)
                .bind("afterDeleteRow", this._sheetDeleteRowHandler)
                .bind("afterInsertRow", this._sheetInsertRowHandler);
            },
            _sheetInsertRow: function (n) {
              void 0 !== n.index &&
                this.dataSource.insert(Math.max(n.index - 1, 0), {});
            },
            _sheetDeleteRow: function (n) {
              var t, i;
              void 0 !== n.index &&
                ((t = this.dataSource),
                (i = t.view()[n.index - 1]),
                i && t.remove(i));
            },
            _header: function () {
              this.sheet.batch(
                function () {
                  this.columns.forEach(
                    function (n, t) {
                      this.sheet.range(0, t).value(n.title);
                    }.bind(this)
                  );
                }.bind(this)
              );
            },
            _sheetChange: function (i) {
              var r, f, u, e, s, o, h;
              i.insertRow ||
                i.deleteRow ||
                (i.recalc &&
                  i.ref &&
                  ((r = this.dataSource),
                  (f = r.view()),
                  (u = this.columns),
                  r.reader.model && (e = r.reader.model.fields),
                  !u.length && f.length && (u = Object.keys(f[0].toJSON())),
                  (s = u.map(function (i) {
                    var r = i.field;
                    return r && e && e[r] && "date" == e[r].type
                      ? n.spreadsheet.numberToDate
                      : t;
                  })),
                  (this._skipRebind = !0),
                  (o = this.sheet._grid.normalize(i.ref)),
                  (h = this.sheet.range(o).values()),
                  o.forEach(function (n) {
                    var e, o, i, c, t;
                    for (
                      n = n.toRangeRef(), o = 0, i = n.topLeft.row;
                      i <= n.bottomRight.row;
                      i++
                    ) {
                      for (
                        e = f[i - 1],
                          e || ((e = r.insert(i - 1, {})), (f = r.view())),
                          c = 0,
                          t = n.topLeft.col;
                        t <= n.bottomRight.col && t < u.length;
                        t++
                      )
                        e.set(u[t].field, s[t](h[o][c++]));
                      o++;
                    }
                  }),
                  (this._boundRowsCount = r.view().length),
                  (this._skipRebind = !1)));
            },
            _normalizeColumns: function (n) {
              return n.map(function (n) {
                var t = n.field || n;
                return { field: t, title: n.title || t };
              });
            },
            _dataSource: function () {
              var i = this.options,
                t = i.dataSource;
              t = Array.isArray(t) ? { data: t } : t;
              this.dataSource && this._changeHandler
                ? this.dataSource.unbind("change", this._changeHandler)
                : (this._changeHandler = this._change.bind(this));
              this.dataSource = n.data.DataSource.create(t).bind(
                "change",
                this._changeHandler
              );
            },
            _change: function () {
              var t, i, r;
              this._skipRebind ||
                this.sheet.trigger("dataBinding") ||
                ((t = this.dataSource.view()),
                (i = this.columns),
                !i.length &&
                  t.length &&
                  ((this.columns = i =
                    this._normalizeColumns(Object.keys(t[0].toJSON()))),
                  this._header()),
                (r = i.map(function (t) {
                  return n.getter(t.field);
                })),
                this.sheet.batch(
                  function () {
                    for (
                      var i,
                        u,
                        f = Math.max(t.length, this._boundRowsCount),
                        n = 0;
                      n < f;
                      n++
                    )
                      for (i = 0; i < r.length; i++)
                        (u = t[n] ? r[i](t[n]) : null),
                          this.sheet.range(n + 1, i).value(u);
                  }.bind(this)
                ),
                (this._boundRowsCount = t.length),
                this.sheet.trigger("dataBound"));
            },
            destroy: function () {
              this.dataSource.unbind("change", this._changeHandler);
              this.sheet
                .unbind("change", this._sheetChangeHandler)
                .unbind("deleteRow", this._sheetDeleteRowHandler)
                .unbind("insertRow", this._sheetInsertRowHandler);
            },
            options: { columns: [] },
          })),
          (n.spreadsheet.SheetDataSourceBinder = i));
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/filtermenu.min",
      [
        "kendo.core.min",
        "kendo.popup.min",
        "kendo.treeview.min",
        "kendo.numerictextbox.min",
        "kendo.datepicker.min",
        "kendo.datetimepicker.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        function l(n) {
          for (var i = {}, r = [], t = 0; t < n.length; t++)
            i[n[t].value]
              ? !i[n[t].value].checked &&
                n[t].checked &&
                (i[n[t].value].checked = !0)
              : ((i[n[t].value] = n[t]), r.push(n[t]));
          return r;
        }
        function e(t, i) {
          for (
            var r,
              l,
              o,
              a,
              s,
              h = !1,
              c = t instanceof n.data.HierarchicalDataSource && t.data(),
              v = this,
              f = this.values,
              u = 0;
            u < c.length;
            u++
          )
            (r = c[u]),
              (l = ("" + r.text).toLowerCase()),
              (o = i === !0 || "" === i || l.indexOf(i) >= 0),
              (a = e.bind(v)),
              (s = a(r.children, i)),
              (h = h || s || o),
              (r.hidden = !o && !s),
              i.length || (f && !f.length)
                ? (r.checked = !r.hidden)
                : f && f.indexOf(r.text) != -1 && (r.checked = !0);
          return (
            c && t.filter({ field: "hidden", operator: "neq", value: !0 }), h
          );
        }
        function o(t) {
          for (
            var r,
              u = t instanceof n.data.HierarchicalDataSource && t.data(),
              i = 0;
            i < u.length;
            i++
          )
            (r = u[i]), (r.checked = !1), r.hasChildren && o(r.children);
        }
        function a(t) {
          var i,
            r,
            f = n.spreadsheet.messages.filterMenu.operators,
            u = [];
          for (i in t)
            if (t.hasOwnProperty(i))
              for (r in t[i])
                t[i].hasOwnProperty(r) &&
                  u.push({
                    text: f[i][r],
                    value: r,
                    unique: i + "_" + r,
                    type: i,
                  });
          return u;
        }
        var i, u, r, s, h, c, f, t;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((i = n.jQuery),
          (u = n.ui.Widget),
          (r = {
            details: "k-details",
            button: "k-button",
            detailsSummary: "k-details-summary",
            detailsContent: "k-details-content",
            icon: "k-icon",
            iconCollapse: "k-i-arrow-45-down-right",
            iconExpand: "k-i-arrow-60-right",
            iconSearch: "k-i-zoom",
            textbox: "k-textbox",
            wrapper: "k-spreadsheet-filter-menu",
            filterByCondition: "k-spreadsheet-condition-filter",
            filterByValue: "k-spreadsheet-value-filter",
            valuesTreeViewWrapper: "k-spreadsheet-value-treeview-wrapper",
            actionButtons: "k-action-buttons",
          }),
          (n.spreadsheet.messages.filterMenu = {
            all: "All",
            sortAscending: "Sort range A to Z",
            sortDescending: "Sort range Z to A",
            filterByValue: "Filter by value",
            filterByCondition: "Filter by condition",
            apply: "Apply",
            search: "Search",
            addToCurrent: "Add to current selection",
            clear: "Clear",
            blanks: "(Blanks)",
            operatorNone: "None",
            and: "AND",
            or: "OR",
            operators: {
              string: {
                contains: "Text contains",
                doesnotcontain: "Text does not contain",
                startswith: "Text starts with",
                endswith: "Text ends with",
                matches: "Text matches",
                doesnotmatch: "Text does not match",
              },
              date: {
                eq: "Date is",
                neq: "Date is not",
                lt: "Date is before",
                gt: "Date is after",
              },
              number: {
                eq: "Is equal to",
                neq: "Is not equal to",
                gte: "Is greater than or equal to",
                gt: "Is greater than",
                lte: "Is less than or equal to",
                lt: "Is less than",
              },
            },
          }),
          (s = u.extend({
            init: function (r, f) {
              u.fn.init.call(this, r, f);
              this.element.addClass(t.classNames.details);
              this._summary = this.element
                .find("." + t.classNames.detailsSummary)
                .on("click", this._toggle.bind(this));
              var e = f.expanded
                ? t.classNames.iconCollapse
                : t.classNames.iconExpand;
              this._icon = i("<span />", {
                class: t.classNames.icon + " " + e,
              }).prependTo(this._summary);
              this._container = n.wrap(this._summary.next(), !0);
              f.expanded || this._container.hide();
            },
            options: { name: "Details" },
            events: ["toggle"],
            visible: function () {
              return this.options.expanded;
            },
            toggle: function (i) {
              var r = n.fx(this._container).expand("vertical");
              r.stop()[i ? "reverse" : "play"]();
              this._icon
                .toggleClass(t.classNames.iconExpand, i)
                .toggleClass(t.classNames.iconCollapse, !i);
              this.options.expanded = !i;
            },
            _toggle: function () {
              var n = this.visible();
              this.toggle(n);
              this.trigger("toggle", { show: n });
            },
          })),
          (n.data.binders.spreadsheetFilterValue = n.data.Binder.extend({
            init: function (t, r, u) {
              n.data.Binder.fn.init.call(this, t, r, u);
              this._change = i.proxy(this.change, this);
              i(this.element).on("change", this._change);
            },
            refresh: function () {
              var n = this,
                t = n.bindings.spreadsheetFilterValue.get();
              i(n.element).val(t instanceof Date ? "" : t);
            },
            change: function () {
              var n = this.element.value;
              this.bindings.spreadsheetFilterValue.set(n);
            },
          })),
          (n.data.binders.widget.spreadsheetFilterValue = n.data.Binder.extend({
            init: function (t, r, u) {
              n.data.Binder.fn.init.call(this, t.element[0], r, u);
              this.widget = t;
              this._change = i.proxy(this.change, this);
              this.widget.first("change", this._change);
            },
            refresh: function () {
              var r = this.bindings.spreadsheetFilterValue,
                n = r.get(),
                t = i(this.widget.element).data("filterType");
              this.widget.value(
                ("date" === t && n instanceof Date) ||
                  ("number" === t && !isNaN(n))
                  ? n
                  : null
              );
            },
            change: function () {
              var n = this.widget.value(),
                t = this.bindings.spreadsheetFilterValue;
              t.set(n);
            },
          })),
          (h = {
            filterByValue:
              "<div class='" +
              r.detailsSummary +
              "'>#= messages.filterByValue #</div><div class='" +
              r.detailsContent +
              "'><div class='k-textbox k-space-right'><input placeholder='#= messages.search #' data-#=ns#bind='events: { input: filterValues }' /><span class='k-icon k-i-zoom' /></div><div data-#=ns#bind='visible: hasActiveSearch'><input class='k-checkbox' type='checkbox' data-#=ns#bind='checked: appendToSearch' id='_#=guid#' /><label class='k-checkbox-label' for='_#=guid#'>#= messages.addToCurrent #</label></div><div class='" +
              r.valuesTreeViewWrapper +
              "'><div data-#=ns#role='treeview' data-#=ns#checkboxes='{ checkChildren: true }' data-#=ns#bind='source: valuesDataSource, events: { check: valuesChange, select: valueSelect }' /></div></div>",
            filterByCondition:
              "<div class='" +
              r.detailsSummary +
              "'>#= messages.filterByCondition #</div><div class='" +
              r.detailsContent +
              '\'><div><select data-#=ns#role="dropdownlist"data-#=ns#bind="value: operator, source: operators, events: { change: operatorChange } "data-value-primitive="false"data-option-label="#=messages.operatorNone#"data-height="auto"data-text-field="text"data-value-field="unique"></select></div><div data-#=ns#bind="visible: isString"><input data-filter-type="string" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" class="k-textbox" /></div><div data-#=ns#bind="visible: isNumber"><input data-filter-type="number" data-#=ns#role="numerictextbox" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" /></div><div data-#=ns#bind="visible: isDate"><input data-filter-type="date" data-#=ns#role="datepicker" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" /></div></div>',
            menuItem:
              "<li data-command='#=command#' data-dir='#=dir#'><span class='k-icon k-i-#=iconClass#'></span>#=text#</li>",
            actionButtons:
              "<button data-#=ns#bind='click: apply' class='k-button k-primary'>#=messages.apply#</button><button data-#=ns#bind='click: clear' class='k-button'>#=messages.clear#</button>",
          }),
          (c = n.spreadsheet.FilterMenuViewModel =
            n.data.ObservableObject.extend({
              valuesChange: function (t) {
                var u = t ? t.sender.dataSource : this.valuesDataSource,
                  f = function (n) {
                    return n.checked;
                  },
                  e = function (t) {
                    return "date" === t.dataType
                      ? n.spreadsheet.dateToNumber(t.value)
                      : t.value;
                  },
                  o = function (n, t, i) {
                    return i.lastIndexOf(n) === t;
                  },
                  s = u.data(),
                  i = s[0].children.data().toJSON(),
                  r = i.filter(function (n) {
                    return "blank" === n.dataType;
                  });
                r = !!r.length && r[0].checked;
                i = i.filter(f).map(e);
                this.appendToSearch &&
                  this.valueFilter &&
                  this.valueFilter.values.length &&
                  (i = i
                    .concat(this.valueFilter.values.toJSON())
                    .sort()
                    .filter(o));
                this.set("valueFilter", { values: i, blanks: r });
              },
              valueSelect: function (n) {
                n.preventDefault();
                var t = n.sender.dataItem(n.node);
                t.set("checked", !t.checked);
              },
              hasActiveSearch: !1,
              appendToSearch: !1,
              filterValues: function (n) {
                var t,
                  r =
                    "string" == typeof n ? n : i(n.target).val().toLowerCase(),
                  u = this.valuesDataSource;
                this.set("hasActiveSearch", !!r);
                t = e.bind(this.valueFilter);
                o(u);
                t(u, r);
              },
              reset: function () {
                this.set("customFilter", {
                  logic: "and",
                  criteria: [{ operator: null, value: null }],
                });
                this.set("valueFilter", { values: [] });
              },
              operatorChange: function (n) {
                var t = n.sender.dataItem();
                this.set("operatorType", t.type);
                this.get("customFilter") || this.reset();
                this.set("customFilter.criteria[0].operator", t.value);
              },
              isNone: function () {
                return void 0 === this.get("operatorType");
              },
              isString: function () {
                return "string" === this.get("operatorType");
              },
              isNumber: function () {
                return "number" === this.get("operatorType");
              },
              isDate: function () {
                return "date" === this.get("operatorType");
              },
            })),
          (f = n.spreadsheet.FilterMenuController =
            {
              valuesTree: function (t, i) {
                return [
                  {
                    text: n.spreadsheet.messages.filterMenu.all,
                    expanded: !0,
                    checked: !1,
                    items: this.values(t.resize({ top: 1 }), i),
                  },
                ];
              },
              values: function (t, i) {
                var r = [],
                  u = n.spreadsheet.messages.filterMenu,
                  f = t.column(i),
                  e = t.sheet();
                return (
                  f.forEachCell(function (t, i, f) {
                    var o,
                      s,
                      h,
                      c = !0;
                    e.isHiddenRow(t) && (c = !1);
                    o = f.value;
                    s = f.dataType;
                    h = f.text;
                    s =
                      void 0 === o
                        ? "blank"
                        : f.format
                        ? n.spreadsheet.formatting.type(o, f.format)
                        : typeof o;
                    h =
                      null !== o && f.format
                        ? n.spreadsheet.formatting.text(o, f.format)
                        : "blank" == s
                        ? u.blanks
                        : o;
                    ("percent" !== s && "currency" !== s) || (s = "number");
                    "date" === s && (o = n.spreadsheet.numberToDate(o));
                    r.push({ dataType: s, value: o, text: h, checked: c });
                  }),
                  (r = l(r)),
                  r.sort(function (n, t) {
                    return n.dataType === t.dataType
                      ? 0
                      : "blank" === n.dataType || "blank" === t.dataType
                      ? "blank" === n.dataType
                        ? -1
                        : 1
                      : "number" === n.dataType || "number" === t.dataType
                      ? "number" === n.dataType
                        ? -1
                        : 1
                      : "date" === n.dataType || "date" === t.dataType
                      ? "date" === n.dataType
                        ? -1
                        : 1
                      : 0;
                  }),
                  r
                );
              },
              filterType: function (n, t) {
                var i,
                  u,
                  f,
                  e = n.sheet(),
                  r = this.filterForColumn(t, e);
                return (
                  (r = r && r.filter.toJSON()),
                  r &&
                    "custom" == r.filter &&
                    ((u = r.criteria[0].value),
                    u instanceof Date
                      ? (i = "date")
                      : "string" == typeof u
                      ? (i = "string")
                      : "number" == typeof u && (i = "number")),
                  i ||
                    ((f = this.values(n.row(1), t)[0]),
                    (i = f && f.dataType),
                    "blank" == i && (i = null)),
                  i
                );
              },
              filterForColumn: function (n, t) {
                var i,
                  r = t.filter();
                return (
                  r &&
                    (i = r.columns.filter(function (t) {
                      return t.index === n;
                    })[0]),
                  i
                );
              },
              filter: function (n, t) {
                var i,
                  f,
                  u,
                  r,
                  e = this.filterForColumn(n, t);
                if (e)
                  return (
                    (i = e.filter.toJSON()),
                    (f = i.filter),
                    delete i.filter,
                    (u = { type: f, options: i }),
                    (r = i.criteria),
                    r && r.length && (u.operator = r[0].operator),
                    u
                  );
              },
            }),
          (t = u.extend({
            init: function (n, i) {
              u.call(this, n, i);
              this.element.addClass(t.classNames.wrapper);
              this.viewModel = new c({
                active: "value",
                operator: null,
                operators: a(this.options.operators),
                clear: this.clear.bind(this),
                apply: this.apply.bind(this),
              });
              this._filterInit();
              this._popup();
              this._sort();
              this._filterByCondition();
              this._filterByValue();
              this._actionButtons();
            },
            options: {
              name: "FilterMenu",
              column: 0,
              range: null,
              operators: {
                string: {
                  contains: "Text contains",
                  doesnotcontain: "Text does not contain",
                  startswith: "Text starts with",
                  endswith: "Text ends with",
                  matches: "Text matches",
                  doesnotmatch: "Text does not match",
                },
                date: {
                  eq: "Date is",
                  neq: "Date is not",
                  lt: "Date is before",
                  gt: "Date is after",
                },
                number: {
                  eq: "Is equal to",
                  neq: "Is not equal to",
                  gte: "Is greater than or equal to",
                  gt: "Is greater than",
                  lte: "Is less than or equal to",
                  lt: "Is less than",
                },
              },
            },
            events: ["action"],
            destroy: function () {
              u.fn.destroy.call(this);
              this.menu.destroy();
              this.valuesTreeView.destroy();
              this.popup.destroy();
            },
            openFor: function (n) {
              this.popup.setOptions({ anchor: n });
              this.popup.open();
            },
            close: function () {
              this.popup.close();
            },
            clear: function () {
              this.action({
                command: "ClearFilterCommand",
                options: { column: this.options.column },
              });
              this.viewModel.reset();
              this.close();
            },
            apply: function () {
              var n, t, i;
              this._active();
              n = {
                operatingRange: this.options.range,
                column: this.options.column,
              };
              "value" === this.viewModel.active
                ? (this.viewModel.valuesChange({ sender: this.valuesTreeView }),
                  (t = this.viewModel.valueFilter.toJSON()),
                  (t.blanks || (t.values && t.values.length)) &&
                    (n.valueFilter = t))
                : "custom" === this.viewModel.active &&
                  ((i = this.viewModel.customFilter.toJSON()),
                  i.criteria.length &&
                    null !== i.criteria[0].value &&
                    (n.customFilter = i));
              (n.valueFilter || n.customFilter) &&
                this.action({ command: "ApplyFilterCommand", options: n });
            },
            action: function (n) {
              this.trigger("action", i.extend({}, n));
            },
            _filterInit: function () {
              var t,
                i = this.options.column,
                r = this.options.range,
                u = r.sheet(),
                n = f.filter(i, u);
              n
                ? ((t = f.filterType(r, i)),
                  this.viewModel.set("active", n.type),
                  this.viewModel.set(n.type + "Filter", n.options),
                  "custom" == n.type &&
                    (this.viewModel.set("operator", t + "_" + n.operator),
                    this.viewModel.set("operatorType", t)))
                : this.viewModel.reset();
            },
            _popup: function () {
              this.popup = this.element
                .kendoPopup({ copyAnchorStyles: !1 })
                .data("kendoPopup");
            },
            _sort: function () {
              var u = n.template(t.templates.menuItem),
                r = n.spreadsheet.messages.filterMenu,
                f = [
                  {
                    command: "sort",
                    dir: "asc",
                    text: r.sortAscending,
                    iconClass: "sort-asc",
                  },
                  {
                    command: "sort",
                    dir: "desc",
                    text: r.sortDescending,
                    iconClass: "sort-desc",
                  },
                ],
                e = i("<ul />", { html: n.render(u, f) }).appendTo(
                  this.element
                );
              this.menu = e
                .kendoMenu({
                  orientation: "vertical",
                  select: function (n) {
                    var t = i(n.item).data("dir"),
                      r = this.options.range.resize({ top: 1 }),
                      u = {
                        value: t,
                        sheet: !1,
                        operatingRange: r,
                        column: this.options.column,
                      };
                    this.action({ command: "SortCommand", options: u });
                  }.bind(this),
                })
                .data("kendoMenu");
            },
            _appendTemplate: function (t, r, u, f) {
              var o = n.template(t),
                e = i("<div class='" + r + "'/>").html(
                  o({
                    messages: n.spreadsheet.messages.filterMenu,
                    guid: n.guid(),
                    ns: n.ns,
                  })
                );
              return (
                this.element.append(e),
                u &&
                  (u = new s(e, {
                    expanded: f,
                    toggle: this._detailToggle.bind(this),
                  })),
                n.bind(e, this.viewModel),
                e
              );
            },
            _detailToggle: function (n) {
              this.element
                .find("[data-role=details]")
                .not(n.sender.element)
                .data("kendoDetails")
                .toggle(!n.show);
            },
            _filterByCondition: function () {
              var n = "custom" === this.viewModel.active;
              this._appendTemplate(
                t.templates.filterByCondition,
                t.classNames.filterByCondition,
                !0,
                n
              );
            },
            _filterByValue: function () {
              var i,
                r = "value" === this.viewModel.active,
                u = this._appendTemplate(
                  t.templates.filterByValue,
                  t.classNames.filterByValue,
                  !0,
                  r
                );
              this.valuesTreeView = u
                .find("[data-role=treeview]")
                .data("kendoTreeView");
              i = f.valuesTree(this.options.range, this.options.column);
              this.viewModel.set(
                "valuesDataSource",
                new n.data.HierarchicalDataSource({ data: i })
              );
            },
            _actionButtons: function () {
              this._appendTemplate(
                t.templates.actionButtons,
                t.classNames.actionButtons,
                !1
              );
            },
            _active: function () {
              var n = this.element
                .find("[data-role=details]")
                .filter(function (n, t) {
                  return i(t).data("kendoDetails").visible();
                });
              n.hasClass(t.classNames.filterByValue)
                ? this.viewModel.set("active", "value")
                : n.hasClass(t.classNames.filterByCondition) &&
                  this.viewModel.set("active", "custom");
            },
          })),
          (n.spreadsheet.FilterMenu = t),
          i.extend(!0, t, { classNames: r, templates: h }));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/editor.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        function t(n, t) {
          return n && (n.top !== t.top || n.left !== t.left);
        }
        if (!(n.support.browser.msie && n.support.browser.version < 9)) {
          var i = n.Observable.extend({
            init: function (t) {
              n.Observable.fn.init.call(this);
              this.view = t;
              this.formulaBar = t.formulaBar;
              this._active = !1;
              this.barInput = t.formulaBar.formulaInput;
              this.cellInput = t.formulaInput;
              this.barInput.syncWith(this.cellInput);
              this.cellInput.syncWith(this.barInput);
              this.barInput.bind("keyup", this._triggerUpdate.bind(this));
              this.cellInput.bind("keyup", this._triggerUpdate.bind(this));
              this.barInput.bind("blur", this._blur.bind(this));
              this.cellInput.bind("blur", this._blur.bind(this));
            },
            events: ["activate", "deactivate", "change", "update"],
            _blur: function () {
              this.deactivate();
            },
            _triggerUpdate: function () {
              this.trigger("update", { value: this.value() });
            },
            activeEditor: function () {
              var t = null,
                i = n._activeElement();
              return (
                this.barElement()[0] === i
                  ? (t = this.barInput)
                  : this.cellElement()[0] === i && (t = this.cellInput),
                t
              );
            },
            activate: function (n) {
              return (
                (this._active = !0),
                (this._rect = n.rect),
                (this._range = n.range),
                this.cellInput.position(n.rect),
                this.cellInput.resize(n.rect),
                this.cellInput.tooltip(n.tooltip),
                (this.cellInput.activeCell = this.barInput.activeCell =
                  this._range.topLeft()),
                (this.cellInput.activeSheet = this.barInput.activeSheet =
                  this._range._sheet),
                this.trigger("activate"),
                this
              );
            },
            deactivate: function (n) {
              var t = this.cellInput;
              this._active &&
                ((this._active = !1),
                n ||
                  t.value() == this._value ||
                  this.trigger("change", {
                    value: t.value(),
                    range: this._range,
                  }),
                (this._rect = null),
                t.hide(),
                this.trigger("deactivate"));
            },
            enable: function (n) {
              this.barInput.enable(n);
              this.cellInput.enable(n);
            },
            barElement: function () {
              return this.barInput.element;
            },
            cellElement: function () {
              return this.cellInput.element;
            },
            focus: function (n) {
              n = n || "cell";
              "cell" === n
                ? (this.cellInput.element.focus(), this.cellInput.end())
                : this.barInput.element.focus();
            },
            isActive: function () {
              return this._active;
            },
            isFiltered: function () {
              return (
                this.barInput.popup.visible() || this.cellInput.popup.visible()
              );
            },
            canInsertRef: function (n) {
              var t = this.activeEditor();
              return t && t.canInsertRef(n);
            },
            highlightedRefs: function () {
              var n = this.activeEditor(),
                t = [];
              return n && (t = n.highlightedRefs()), t;
            },
            scale: function () {
              this.cellInput.scale();
            },
            toggleTooltip: function (n) {
              this.cellInput.toggleTooltip(t(this._rect, n));
            },
            value: function (n, t) {
              return void 0 === n
                ? this.barInput.value()
                : (null === n && (n = ""),
                  (this._value = n),
                  this.barInput.value(n),
                  this.cellInput.value(n),
                  void this.barInput.element.toggleClass(
                    "k-spreadsheet-array-formula",
                    !!t
                  ));
            },
            insertNewline: function () {
              this.activeEditor().insertNewline();
              this.scale();
            },
            select: function () {
              this.activeEditor().select();
            },
          });
          n.spreadsheet.SheetEditor = i;
        }
      })(kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/autofill.min",
      ["spreadsheet/runtime.min", "spreadsheet/range.min"],
      n
    );
  })(
    function () {
      "use strict";
      function f(n) {
        for (
          var i,
            e,
            r,
            o,
            u = n.length,
            s = (u + 1) / 2,
            h =
              n.reduce(function (n, t) {
                return n + t;
              }, 0) / u,
            c = 0,
            f = 0,
            t = 0;
          t < u;
          t++
        )
          (i = t + 1 - s), (e = n[t] - h), (c += i * e), (f += i * i);
        return f
          ? ((r = c / f),
            (o = h - r * s),
            function (n) {
              return o + r * (n + 1);
            })
          : function (t) {
              return n[t % n.length];
            };
      }
      function h(n) {
        function e(n) {
          for (var i = n[1] - n[0], t = 2; t < n.length; ++t)
            if (n[t] - n[t - 1] != i) return null;
          return i;
        }
        function i(n) {
          return n.map(function (n) {
            return n.number;
          });
        }
        var r = [],
          t = n.map(function (n) {
            return n.formula || n.value;
          });
        return (
          l(t, function (n, u, o, s) {
            var c, h, a, v, l;
            for (
              "number" == o
                ? ((h = i(s)), (c = f(h)))
                : "string" == o || "formula" == o || "boolean" == o
                ? (c = function (n, i) {
                    return t[i];
                  })
                : Array.isArray(o)
                ? 1 == s.length
                  ? (c = function (n) {
                      return o[(s[0].number + n) % o.length];
                    })
                  : ((a = e(i(s))),
                    (c =
                      null == a
                        ? function (n) {
                            return s[n % s.length].value;
                          }
                        : function (n) {
                            var t = s[0].number + a * n;
                            return o[t % o.length];
                          }))
                : "null" != o
                ? ((h = i(s)),
                  1 == h.length && h.push(h[0] + 1),
                  (h = f(h)),
                  (c = function (n, i) {
                    return t[i].replace(/^(.*\D)\d+/, "$1" + h(n, i));
                  }))
                : (c = function () {
                    return null;
                  }),
                v = { f: c, begin: n, end: u, len: u - n },
                l = n;
              l < u;
              ++l
            )
              r[l] = v;
          }),
          function (i, f) {
            var o = r[f],
              h = (i / t.length) | 0,
              l = i % t.length,
              a = h * o.len + l - o.begin,
              s = o.f(a, f),
              e = c(n[f]);
            return (
              delete e.enable,
              s instanceof u ? (e.formula = s) : (e.value = s),
              e
            );
          }
        );
      }
      function c(n) {
        var t = {};
        return (
          Object.keys(n || {}).forEach(function (i) {
            t[i] = n[i];
          }),
          t
        );
      }
      function l(n, t) {
        for (var f, r = null, u = 0, e = [], i = 0; i < n.length; ++i)
          (f = a(n[i])),
            e.push(f),
            null != r &&
              f.type !== r.type &&
              (t(u, i, r.type, e.slice(u, i)), (u = i)),
            (r = f);
        t(u, i, r.type, e.slice(u, i));
      }
      function a(n) {
        var i, t;
        if ("number" == typeof n) return { type: "number", number: n };
        if ("string" == typeof n)
          return (i = y(n))
            ? i
            : ((t = /^(.*\D)(\d+)/.exec(n)),
              t
                ? ((n = n.replace(/^(.*\D)\d+/, "$1-######")),
                  { type: n, match: t, number: parseFloat(t[2]) })
                : { type: "string" });
        if ("boolean" == typeof n) return { type: "boolean" };
        if (null == n) return { type: "null" };
        if (n instanceof u) return { type: "formula" };
        throw (window.console.error(n), Error("Cannot fill data"));
      }
      function v() {
        var n = kendo.culture();
        return [
          n.calendars.standard.days.namesAbbr,
          n.calendars.standard.days.names,
          n.calendars.standard.months.namesAbbr,
          n.calendars.standard.months.names,
        ];
      }
      function y(n) {
        for (
          var i, r, u, e = n.toLowerCase(), f = v(), t = 0;
          t < f.length;
          ++t
        )
          for (i = f[t], r = i.length; --r >= 0; )
            if (((u = i[r].toLowerCase()), u == e))
              return { type: i, number: r, value: n };
      }
      function e(n) {
        for (var i, u = n.length, f = n[0].length, r = [], t = 0; t < f; ++t)
          for (r[t] = [], i = 0; i < u; ++i) r[t][i] = n[i][t];
        return r;
      }
      var r, i, o, u, t, s, n;
      (kendo.support.browser.msie && kendo.support.browser.version < 9) ||
        ((r = kendo.spreadsheet),
        (i = r.Range),
        (o = r.calc.runtime),
        (u = o.Formula),
        (t = "incompatibleRanges"),
        (s = "noFillDirection"),
        (n = i.FillError =
          function (n) {
            this.code = n;
          }),
        (i.prototype._previewFillFrom = function (i, r) {
          var f,
            u,
            a,
            w,
            c,
            v,
            y,
            k,
            p,
            l,
            nt,
            tt,
            o,
            it,
            rt,
            d,
            g = this,
            b = g._sheet;
          if (
            ("string" == typeof i && (i = b.range(i)),
            (f = i._ref.toRangeRef().clone().setSheet(b.name())),
            (u = g._ref.toRangeRef().clone().setSheet(b.name())),
            f.intersects(u))
          ) {
            if (f.eq(u)) return null;
            if (((u = u.clone()), f.topLeft.eq(u.topLeft)))
              if (f.width() == u.width())
                (u.topLeft.row += f.height()), (r = 0);
              else {
                if (f.height() != u.height()) throw new n(t);
                u.topLeft.col += f.width();
                r = 1;
              }
            else {
              if (!f.bottomRight.eq(u.bottomRight)) throw new n(t);
              if (f.width() == u.width())
                (u.bottomRight.row -= f.height()), (r = 2);
              else {
                if (f.height() != u.height()) throw new n(t);
                u.bottomRight.col -= f.width();
                r = 3;
              }
            }
            return b.range(u)._previewFillFrom(i, r);
          }
          if (null == r)
            if (f.topLeft.col == u.topLeft.col)
              r = f.topLeft.row < u.topLeft.row ? 0 : 2;
            else {
              if (f.topLeft.row != u.topLeft.row) throw new n(s);
              r = f.topLeft.col < u.topLeft.col ? 1 : 3;
            }
          if (
            ((a = 1 & r),
            (w = 2 & r),
            (a && f.height() != u.height()) || (!a && f.width() != u.width()))
          )
            throw new n(t);
          for (
            c = i._properties(),
              a ? (v = u.width()) : ((c = e(c)), (v = u.height())),
              y = Array(c.length),
              k = null,
              p = 0;
            p < c.length;
            ++p
          )
            for (l = c[p], nt = h(l), tt = y[p] = Array(v), o = 0; o < v; ++o)
              (it = w ? -o - 1 : l.length + o),
                (rt = w ? l.length - (o % l.length) - 1 : o % l.length),
                (d = tt[w ? v - o - 1 : o] = nt(it, rt)),
                null != d.value && (k = d.value);
          return a || (y = e(y)), { props: y, direction: r, dest: g, hint: k };
        }),
        (i.prototype.fillFrom = function (n, t) {
          var i = this._previewFillFrom(n, t);
          return i.dest._properties(i.props, !0), i.dest;
        }));
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("spreadsheet/nameeditor.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        var t, i, r;
        (n.support.browser.msie && n.support.browser.version < 9) ||
          ((t = n.jQuery),
          (i = {
            input: "k-spreadsheet-name-editor",
            list: "k-spreadsheet-name-list",
          }),
          (r = n.ui.Widget.extend({
            init: function (r, u) {
              var f, e, o;
              n.ui.Widget.call(this, r, u);
              r.addClass(i.input);
              f = u.messages.nameBox || "Name Box";
              e = new n.data.DataSource({
                transport: {
                  read: function (t) {
                    var i = [];
                    this._workbook.forEachName(function (t) {
                      !t.hidden &&
                        t.value instanceof n.spreadsheet.Ref &&
                        i.push({ name: t.name });
                    });
                    t.success(i);
                  }.bind(this),
                  cache: !1,
                },
              });
              o = t("<input />").attr("title", f).attr("aria-label", f);
              this.combo = o
                .appendTo(r)
                .kendoComboBox({
                  clearButton: !1,
                  dataTextField: "name",
                  dataValueField: "name",
                  template:
                    "#:data.name#<a class='k-button-delete' href='\\#'><span class='k-icon k-i-close'></span></a>",
                  dataSource: e,
                  autoBind: !1,
                  ignoreCase: !0,
                  change: this._on_listChange.bind(this),
                  noDataTemplate: "<div></div>",
                  open: function () {
                    e.read();
                  },
                })
                .getKendoComboBox();
              this.combo.input
                .on("keydown", this._on_keyDown.bind(this))
                .on("focus", this._on_focus.bind(this));
              this.combo.popup.element
                .addClass("k-spreadsheet-names-popup")
                .on("mousemove", function (n) {
                  n.stopPropagation();
                })
                .on(
                  "click",
                  ".k-button-delete",
                  function (n) {
                    n.preventDefault();
                    n.stopPropagation();
                    var i = t(n.target).closest(".k-item");
                    i = this.combo.dataItem(i);
                    this._deleteItem(i.name);
                  }.bind(this)
                );
            },
            value: function (n) {
              return void 0 === n
                ? this.combo.value()
                : void this.combo.value(n);
            },
            _deleteItem: function (n) {
              this.trigger("delete", { name: n });
            },
            _on_keyDown: function (n) {
              switch (n.keyCode) {
                case 27:
                  this.combo.value(this._prevValue);
                  this.trigger("cancel");
                  break;
                case 13:
                  this.trigger("enter");
              }
            },
            _on_focus: function () {
              this._prevValue = this.combo.value();
            },
            _on_listChange: function () {
              var n = this.combo.value();
              n && this.trigger("select", { name: n });
            },
          })),
          (n.spreadsheet.NameEditor = r));
      })(window.kendo);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "spreadsheet/print.min",
      [
        "kendo.pdf.min",
        "spreadsheet/sheet.min",
        "spreadsheet/range.min",
        "spreadsheet/references.min",
        "spreadsheet/numformat.min",
        "util/text-metrics.min",
      ],
      n
    );
  })(
    function () {
      "use strict";
      function s(n, t, i, r, u) {
        var f = 0,
          o = [],
          s = t,
          e = 0;
        return (
          t && i && (i *= t),
          n.forEach(function (n, h) {
            null != r && h < r && (e += n);
            t &&
              f + n > s &&
              (s - f < i &&
                ((f = t * Math.ceil(f / t) + e), e > 0 && u.push(f - e)),
              (s += t * Math.ceil(n / t)));
            o.push(f);
            f += n;
          }),
          o.push(f),
          o
        );
      }
      function h(n, t, i) {
        var b,
          tt,
          r,
          c,
          u,
          a,
          f,
          o,
          v,
          it,
          y,
          ft,
          et,
          h,
          w,
          rt,
          ut,
          ot,
          st = n._grid;
        return (
          (t = st.normalize(t)),
          (b = st.rectangle(t)),
          (tt = []),
          n._drawings.forEach(function (t) {
            var i = n.drawingBoundingBox(t);
            i.intersects(b) &&
              tt.push({ drawing: t, box: i.offset(-b.left, -b.top) });
          }),
          (r = []),
          (c = []),
          (u = []),
          (a = n._getMergedCells(t)),
          (f = -1),
          (o = -1),
          n.forEach(t, function (e, s, h) {
            var y,
              v,
              l,
              w = e - t.topLeft.row,
              b = s - t.topLeft.col,
              k = n.rowHeight(e),
              g = n.columnWidth(s);
            i.forScreen ||
              (h.drawings = tt.filter(function (t) {
                var i = t.drawing.topLeftCell;
                if (i && i.row == e && i.col == s)
                  return (
                    (f = Math.max(f, n._rows.index(t.box.bottom))),
                    (o = Math.max(o, n._columns.index(t.box.right))),
                    !0
                  );
              }));
            b || c.push(k);
            w || u.push(g);
            !n.isHiddenColumn(s) &&
              !n.isHiddenRow(e) &&
              k &&
              g &&
              ((y = i.forScreen || d(h)),
              (i.emptyCells || y) &&
                ((v = new p(e, s).print()),
                a.secondary[v] ||
                  (y
                    ? ((f = Math.max(f, w)), (o = Math.max(o, b)))
                    : (h.empty = !0),
                  (h.row = w),
                  (h.col = b),
                  (l = a.primary[v]),
                  l
                    ? (delete a.primary[v],
                      (h.merged = !0),
                      (h.rowspan = l.height()),
                      (h.colspan = l.width()),
                      i.forScreen &&
                        ((h.width = n._columns.sum(
                          l.topLeft.col,
                          l.bottomRight.col
                        )),
                        (h.height = n._rows.sum(
                          l.topLeft.row,
                          l.bottomRight.row
                        ))))
                    : ((h.rowspan = 1), (h.colspan = 1)),
                  r.push(h))));
          }),
          (c = c.slice(0, f + 1)),
          (u = u.slice(0, o + 1)),
          (v = i.pageWidth),
          (it = i.pageHeight),
          (y = i.scale || 1),
          i.fitWidth && ((ft = u.reduce(k, 0)), ft > v && (y = v / ft)),
          (v = Math.ceil(v / y)),
          (it = Math.ceil(it / y)),
          (et = []),
          (h = s(c, it || 0, i.maxEmpty, i.headerRows, et)),
          (w = s(u, v || 0, i.maxEmpty)),
          (rt = 0),
          (ut = 0),
          (ot = []),
          (r = r.filter(function (n) {
            return (
              (!n.empty || !(n.row > f || n.col > o)) &&
              (i.headerRows && n.row < i.headerRows && ot.push(n),
              (n.left = w[n.col]),
              (n.top = h[n.row]),
              n.merged
                ? i.forScreen
                  ? ((n.right = n.left + n.width),
                    (n.bottom = n.top + n.height))
                  : ((n.right = l(w, n.col + n.colspan)),
                    (n.bottom = l(h, n.row + n.rowspan)),
                    (n.width = n.right - n.left),
                    (n.height = n.bottom - n.top))
                : ((n.width = u[n.col]),
                  (n.height = c[n.row]),
                  (n.bottom = n.top + n.height),
                  (n.right = n.left + n.width)),
              i.forScreen ||
                n.drawings.forEach(function (t) {
                  var i = t.box;
                  i.left = n.left + t.drawing.offsetX;
                  i.top = n.top + t.drawing.offsetY;
                  i.right = i.left + i.width;
                  i.bottom = i.top + i.height;
                }),
              (rt = Math.max(rt, n.right)),
              (ut = Math.max(ut, n.bottom)),
              !0)
            );
          })),
          Object.keys(a.primary).forEach(function (i) {
            var u = a.primary[i];
            n.forEach(u.topLeft.toRangeRef(), function (i, f, e) {
              var o = i - t.topLeft.row,
                s = f - t.topLeft.col;
              e.merged = !0;
              e.colspan = u.width();
              e.rowspan = u.height();
              e.top = o < 0 ? -n._rows.sum(i, i - o - 1) : h[o];
              e.left = s < 0 ? -n._columns.sum(f, f - s - 1) : w[s];
              e.height = n._rows.sum(u.topLeft.row, u.bottomRight.row);
              e.width = n._columns.sum(u.topLeft.col, u.bottomRight.col);
              e.height > 0 &&
                e.width > 0 &&
                ((e.right = e.left + e.width),
                (e.bottom = e.top + e.height),
                (e.row = o),
                (e.col = s),
                r.push(e));
            });
          }),
          i.headerRows &&
            (et.forEach(function (n) {
              ot.forEach(function (t) {
                t = e(t);
                t.top += n;
                t.bottom = t.top + t.height;
                r.push(t);
              });
              h.push(n);
            }),
            h.sort(nt)),
          {
            width: rt,
            height: ut,
            cells: r.sort(g),
            scale: y,
            xCoords: w,
            yCoords: h,
            drawings: tt,
          }
        );
      }
      function e(n, t) {
        return (
          t || (t = {}),
          Object.assign
            ? Object.assign(t, n)
            : Object.keys(n).reduce(function (t, i) {
                return (t[i] = n[i]), t;
              }, t)
        );
      }
      function c(n, t) {
        return n.size === t.size && n.color === t.color;
      }
      function k(n, t) {
        return n + t;
      }
      function l(n, t) {
        return t < n.length ? n[t] : n[n.length - 1];
      }
      function d(n) {
        return (
          null != n.value ||
          n.merged ||
          null != n.background ||
          null != n.borderRight ||
          null != n.borderBottom ||
          (null != n.validation && !n.validation.value) ||
          (n.drawings && n.drawings.length)
        );
      }
      function g(n, t) {
        return n.top < t.top
          ? -1
          : n.top == t.top
          ? n.left < t.left
            ? -1
            : n.left == t.left
            ? 0
            : 1
          : 1;
      }
      function nt(n, t) {
        return n < t ? -1 : n > t ? 1 : 0;
      }
      function tt(n, i, f, e) {
        function l(o, s) {
          function ut(n) {
            return (
              !(n.right <= w || n.left >= nt || n.bottom <= b || n.top >= tt) &&
              ((a = Math.max(n.bottom, a)), (v = Math.max(n.right, v)), !0)
            );
          }
          var rt,
            l,
            k,
            p,
            d,
            g,
            w = s * h,
            nt = w + h,
            b = o * c,
            tt = b + c,
            a = 0,
            v = 0,
            ft = i.cells.filter(ut),
            et = i.drawings.filter(function (n) {
              return ut(n.box);
            });
          a = Math.min(a, tt);
          v = Math.min(v, nt);
          (ft.length || et.length) &&
            ((rt = new t.Group()),
            f.append(rt),
            (l = new t.Group()),
            rt.append(l),
            l.clip(t.Path.fromRect(new r.Rect([w - 1, b - 1], [v + 1, a + 1]))),
            (k = r.Matrix.scale(i.scale, i.scale).multiplyCopy(
              r.Matrix.translate(-w, -b)
            )),
            (e.hCenter || e.vCenter) &&
              (k = k.multiplyCopy(
                r.Matrix.translate(
                  e.hCenter ? (nt - v) / 2 : 0,
                  e.vCenter ? (tt - a) / 2 : 0
                )
              )),
            l.transform(k),
            e.guidelines &&
              ((p = null),
              i.xCoords.forEach(function (n) {
                n = Math.min(n, v);
                n !== p &&
                  n >= w &&
                  n <= nt &&
                  ((p = n),
                  l.append(
                    new t.Path()
                      .moveTo(n, b)
                      .lineTo(n, a)
                      .close()
                      .stroke(e.guideColor, u)
                  ));
              }),
              (p = null),
              i.yCoords.forEach(function (n) {
                n = Math.min(n, a);
                n !== p &&
                  n >= b &&
                  n <= tt &&
                  ((p = n),
                  l.append(
                    new t.Path()
                      .moveTo(w, n)
                      .lineTo(v, n)
                      .close()
                      .stroke(e.guideColor, u)
                  ));
              })),
            (d = y()),
            ft.forEach(function (t) {
              it(t, l, e);
              d.add(t, n);
            }),
            (g = new t.Group()),
            d.vert.forEach(function (n) {
              n.forEach(function (n) {
                n.rendered ||
                  ((n.rendered = !0),
                  g.append(
                    new t.Path()
                      .moveTo(n.x, n.top)
                      .lineTo(n.x, n.bottom)
                      .close()
                      .stroke(n.color, n.size)
                  ));
              });
            }),
            d.horiz.forEach(function (n) {
              n.forEach(function (n) {
                n.rendered ||
                  ((n.rendered = !0),
                  g.append(
                    new t.Path()
                      .moveTo(n.left, n.y)
                      .lineTo(n.right, n.y)
                      .close()
                      .stroke(n.color, n.size)
                  ));
              });
            }),
            l.append(g),
            et.forEach(function (i) {
              var u,
                f,
                e = i.drawing,
                o = e.image;
              null != o &&
                ((u = i.box),
                (f = n._workbook.imageUrl(o)),
                l.append(
                  new t.Image(
                    f,
                    new r.Rect([u.left, u.top], [u.width, u.height])
                  ).opacity(e.opacity)
                ));
            }));
        }
        for (
          var s,
            a = Math.ceil(i.width / e.pageWidth),
            v = Math.ceil(i.height / e.pageHeight),
            h = Math.ceil(e.pageWidth / i.scale),
            c = Math.ceil(e.pageHeight / i.scale),
            o = 0;
          o < v;
          ++o
        )
          for (s = 0; s < a; ++s) l(o, s);
      }
      function it(n, i, f) {
        var c,
          o,
          e,
          l,
          a,
          s,
          h,
          v = new t.Group();
        if (
          (i.append(v),
          (c = new r.Rect([n.left, n.top], [n.width, n.height])),
          (n.background || n.merged) &&
            ((o = c),
            f.guidelines &&
              ((o = c.clone()),
              (o.origin.x += u / 2 + 0.1),
              (o.origin.y += u / 2 + 0.1),
              (o.size.width -= u + 0.2),
              (o.size.height -= u + 0.2)),
            v.append(new t.Rect(o).fill(n.background || "#fff").stroke(null))),
          (e = n.value),
          null != e)
        ) {
          if (
            ((l = "number" == typeof e ? "number" : null),
            (a = new t.Group()),
            a.clip(t.Path.fromRect(c)),
            v.append(a),
            (h = n.format),
            h ||
              "number" != l ||
              e == Math.floor(e) ||
              (h = "0.##############"),
            h
              ? ((s = w.textAndColor(e, h)),
                (e = s.text),
                s.type && (l = s.type))
              : (e += ""),
            !n.textAlign)
          )
            switch (l) {
              case "number":
              case "date":
              case "percent":
              case "currency":
                n.textAlign = "right";
                break;
              case "boolean":
                n.textAlign = "center";
            }
          rt(e, (s && s.color) || n.color || "#000", n, a);
        }
      }
      function a(n, t) {
        if (n.indent) {
          var i = 1.4 * n.indent;
          switch (t.textAlign) {
            case null:
            case "left":
              t.paddingLeft = i + "ch";
              break;
            case "right":
              t.paddingRight = i + "ch";
              break;
            case "center":
              t.paddingLeft = i / 2 + "ch";
              t.paddingRight = i / 2 + "ch";
          }
        }
      }
      function rt(t, i, u, f) {
        var e, o;
        switch (
          (n ||
            ((n = document.createElement("div")),
            (n.style.position = "fixed"),
            (n.style.left = "0px"),
            (n.style.top = "0px"),
            (n.style.visibility = "hidden"),
            (n.style.overflow = "hidden"),
            (n.style.boxSizing = "border-box"),
            (n.style.lineHeight = "normal"),
            document.body.appendChild(n)),
          n.firstChild && n.removeChild(n.firstChild),
          (n.style.padding = "2px 4px"),
          (n.style.color = i),
          (n.style.font = ut(u)),
          (n.style.width = u.width + "px"),
          (n.style.textAlign = u.textAlign || "left"),
          (n.style.textDecoration = u.underline ? "underline" : "none"),
          a(u, n.style),
          u.wrap
            ? ((n.style.whiteSpace = "pre-wrap"),
              (n.style.overflowWrap = n.style.wordWrap = "break-word"))
            : ((n.style.whiteSpace = "pre"),
              (n.style.overflowWrap = n.style.wordWrap = "normal")),
          n.appendChild(document.createTextNode(t)),
          (e = 0),
          u.verticalAlign)
        ) {
          case "center":
            e = (u.height - n.offsetHeight) >> 1;
            break;
          case void 0:
          case null:
          case "bottom":
            e = u.height - n.offsetHeight;
        }
        e < 0 && (e = 0);
        o = kendo.drawing.drawDOM.drawText(n);
        o.transform(r.Matrix.translate(u.left, u.top + e));
        f.append(o);
      }
      function ut(n) {
        var t = [];
        return (
          n.italic && t.push("italic"),
          n.bold && t.push("bold"),
          t.push((n.fontSize || 12) + "px"),
          t.push(n.fontFamily || "Arial"),
          t.join(" ")
        );
      }
      function v(n, r, u, f) {
        var o, e, s, c, l;
        null == u && null == f && ((f = r), (u = {}), (r = i.SHEETREF));
        null == f &&
          ((f = u),
          r instanceof i.Range || r instanceof i.Ref || "string" == typeof r
            ? (u = {})
            : ((u = r), (r = i.SHEETREF)));
        u = kendo.jQuery.extend(
          {
            paperSize: "A4",
            landscape: !0,
            margin: "1cm",
            guidelines: !0,
            guideColor: "#aaa",
            emptyCells: !0,
            fitWidth: !1,
            center: !1,
            headerRows: null,
            maxEmpty: 0.2,
            scale: 1,
          },
          u
        );
        o = new t.Group();
        e = kendo.pdf.getPaperOptions(u);
        o.options.set("pdf", {
          author: u.author,
          creator: u.creator,
          date: u.date,
          keywords: u.keywords,
          margin: e.margin,
          multiPage: !0,
          paperSize: e.paperSize,
          subject: u.subject,
          title: u.title,
        });
        s = e.paperSize[0];
        c = e.paperSize[1];
        e.margin &&
          ((s -= e.margin.left + e.margin.right + 1),
          (c -= e.margin.top + e.margin.bottom + 1));
        u.pageWidth = s;
        u.pageHeight = c;
        l = h(n, n._ref(r), u);
        tt(n, l, o, u);
        f(o);
      }
      function f() {}
      function y() {
        function u(n, t) {
          var u, f;
          t &&
            ((u = t._properties),
            (f = t._grid),
            (n.borderLeft = u.get("vBorders", f.index(n.row, n.col))),
            (n.borderRight = u.get(
              "vBorders",
              f.index(n.row, n.col + n.colspan)
            )),
            (n.borderTop = u.get("hBorders", f.index(n.row, n.col))),
            (n.borderBottom = u.get(
              "hBorders",
              f.index(n.row + n.rowspan, n.col)
            )));
          n.borderLeft &&
            i(n.row, n.col, n.borderLeft, n.left, n.top, n.bottom);
          n.borderRight &&
            i(
              n.row,
              n.col + n.colspan,
              n.borderRight,
              n.right,
              n.top,
              n.bottom
            );
          n.borderTop && r(n.row, n.col, n.borderTop, n.top, n.left, n.right);
          n.borderBottom &&
            r(
              n.row + n.rowspan,
              n.col,
              n.borderBottom,
              n.bottom,
              n.left,
              n.right
            );
        }
        function i(n, i, r, u, e, o) {
          var h = t[i] || (t[i] = new f()),
            s = n > 0 && h[n - 1];
          s && c(s, r)
            ? ((h[n] = s), (s.bottom = o))
            : (h[n] = {
                size: r.size,
                color: r.color,
                x: u,
                top: e,
                bottom: o,
              });
        }
        function r(t, i, r, u, e, o) {
          var h = n[t] || (n[t] = new f()),
            s = i > 0 && h[i - 1];
          s && c(s, r)
            ? ((h[i] = s), (s.right = o))
            : (h[i] = {
                size: r.size,
                color: r.color,
                y: u,
                left: e,
                right: o,
              });
        }
        var n = new f(),
          t = new f();
        return { add: u, horiz: n, vert: t };
      }
      function ft(n) {
        function r(n) {
          var t, i;
          if (null != n) {
            for (t = 12, i = n.length; --i >= 0; ) t += f(n.charAt(i));
            return t;
          }
          return 0;
        }
        function u(n) {
          return t
            ? e(n, {
                borderLeft: t,
                borderTop: t,
                borderRight: t,
                borderBottom: t,
              })
            : n;
        }
        var f,
          t,
          i = new $.Deferred(),
          o = i.promise();
        return (
          (n = e(n, {
            dataSource: null,
            guidelines: !0,
            guideColor: "#000",
            columns: null,
            headerBackground: "#999",
            headerColor: "#000",
            oddBackground: null,
            evenBackground: null,
            fontFamily: "Arial",
            fontSize: 12,
            paperSize: "A4",
            margin: "1cm",
            landscape: !0,
            fitWidth: !1,
            scale: 1,
            rowHeight: 20,
            maxEmpty: 1,
            useGridFormat: !0,
          })),
          kendo.drawing.pdf.defineFont(
            kendo.drawing.drawDOM.getFontFaces(document)
          ),
          (f = b(n.fontFamily, n.fontSize)),
          (t = n.guidelines ? { size: 1, color: n.guideColor } : null),
          n.dataSource.fetch(function () {
            var t,
              o,
              f,
              e,
              s,
              h = n.dataSource.data();
            return h.length
              ? ((t = n.columns.map(function (n) {
                  return "string" == typeof n ? { title: n, field: n } : n;
                })),
                (o = t.map(function (n) {
                  return n.title || n.field;
                })),
                (f = o.map(r)),
                (e = h.map(function (i, e) {
                  return {
                    cells: t.map(function (t, o) {
                      var s = i[t.field];
                      return (
                        n.useGridFormat &&
                          (null != s &&
                            (t.format
                              ? (s = kendo.format(t.format, s))
                              : (s += "")),
                          (f[o] = Math.max(r(s), f[o]))),
                        u({
                          value: s,
                          format: n.useGridFormat ? null : t.format,
                          background:
                            e % 2 ? n.evenBackground : n.oddBackground,
                        })
                      );
                    }),
                  };
                })),
                e.unshift({
                  cells: o.map(function (t) {
                    return u({
                      value: t,
                      background: n.headerBackground,
                      color: n.headerColor,
                    });
                  }),
                }),
                (s = new kendo.spreadsheet.Sheet(
                  e.length + 1,
                  t.length + 1,
                  n.rowHeight,
                  50,
                  20,
                  20,
                  {
                    fontFamily: n.fontFamily,
                    fontSize: n.fontSize,
                    verticalAlign: "center",
                  }
                )),
                s.fromJSON({
                  name: "Sheet1",
                  rows: e,
                  columns: f.map(function (n, t) {
                    return { index: t, width: n };
                  }),
                }),
                void s.draw(
                  {
                    paperSize: n.paperSize,
                    landscape: n.landscape,
                    margin: n.margin,
                    guidelines: !1,
                    scale: n.scale,
                    fitWidth: n.fitWidth,
                    maxEmpty: n.maxEmpty,
                    headerRows: 1,
                  },
                  i.resolve.bind(i)
                ))
              : i.reject("Empty dataset");
          }),
          o
        );
      }
      var i, p, t, w, r, u, n, o, b;
      (kendo.support.browser.msie && kendo.support.browser.version < 9) ||
        ((i = kendo.spreadsheet),
        (p = i.CellRef),
        (t = kendo.drawing),
        (w = i.formatting),
        (r = kendo.geometry),
        (u = 0.8),
        (i.Sheet.prototype.draw = function (n, t, i) {
          var r = this;
          r._workbook
            ? r.recalc(r._workbook._context, function () {
                v(r, n, t, i);
              })
            : v(r, n, t, i);
        }),
        (f.prototype = {
          forEach: function (n) {
            Object.keys(this).forEach(function (t) {
              n(this[t], t, this);
            }, this);
          },
        }),
        (o = {}),
        (b = function (n, t) {
          var i,
            r,
            u,
            f,
            s = t + ":" + n,
            e = o[s];
          if (!e) {
            for (
              r = document.createElement("div"),
                r.style.position = "fixed",
                r.style.left = "-10000px",
                r.style.top = "-10000px",
                r.style.fontFamily = n,
                r.style.fontSize = t + "px",
                r.style.whiteSpace = "pre",
                u = 32;
              u < 128;
              ++u
            )
              (i = document.createElement("span")),
                i.appendChild(document.createTextNode(String.fromCharCode(u))),
                r.appendChild(i);
            for (
              document.body.appendChild(r), f = {}, u = 32, i = r.firstChild;
              u < 128 && i;
              ++u, i = i.nextSibling
            )
              f[u] = i.offsetWidth;
            for (; (i = r.firstChild); ) r.removeChild(i);
            e = o[s] = function (n) {
              var t = n.charCodeAt(0),
                u = f[t];
              return (
                null == u &&
                  ((i = document.createElement("span")),
                  i.appendChild(
                    document.createTextNode(String.fromCharCode(t))
                  ),
                  r.appendChild(i),
                  (u = f[t] = i.offsetWidth),
                  r.removeChild(i)),
                u
              );
            };
          }
          return e;
        }),
        (i.draw = { Borders: y, doLayout: h, applyIndent: a }),
        (i.drawTabularData = ft));
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.spreadsheet.min",
      [
        "util/undoredostack.min",
        "util/text-metrics.min",
        "util/parse-xml.min",
        "kendo.excel.min",
        "kendo.progressbar.min",
        "kendo.pdf.min",
        "spreadsheet/commands.min",
        "spreadsheet/formulabar.min",
        "spreadsheet/formulainput.min",
        "spreadsheet/eventlistener.min",
        "spreadsheet/rangelist.min",
        "spreadsheet/propertybag.min",
        "spreadsheet/references.min",
        "spreadsheet/navigator.min",
        "spreadsheet/axismanager.min",
        "spreadsheet/clipboard.min",
        "spreadsheet/range.min",
        "spreadsheet/sheet.min",
        "spreadsheet/sheetsbar.min",
        "spreadsheet/excel-reader.min",
        "spreadsheet/workbook.min",
        "spreadsheet/formulacontext.min",
        "spreadsheet/controller.min",
        "spreadsheet/view.min",
        "spreadsheet/customeditors.min",
        "spreadsheet/grid.min",
        "spreadsheet/axis.min",
        "spreadsheet/filter.min",
        "spreadsheet/sorter.min",
        "spreadsheet/runtime.min",
        "spreadsheet/calc.min",
        "spreadsheet/numformat.min",
        "spreadsheet/runtime.functions.min",
        "spreadsheet/runtime.functions.2.min",
        "spreadsheet/toolbar.min",
        "spreadsheet/dialogs.min",
        "spreadsheet/sheetbinder.min",
        "spreadsheet/filtermenu.min",
        "spreadsheet/editor.min",
        "spreadsheet/autofill.min",
        "spreadsheet/nameeditor.min",
        "spreadsheet/print.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          var i, r, s, e, h, c, u, o, l, f;
          (n.support.browser.msie && n.support.browser.version < 9) ||
            ((i = n.jQuery),
            (r = i.extend(
              {
                F10: 121,
                F11: 122,
                B: 66,
                I: 73,
                U: 85,
                N: 78,
                H: 72,
                A: 65,
                PAGEDOWN: 34,
                PAGEUP: 33,
                DELETE: 46,
                R: 82,
              },
              n.keys
            )),
            (s = n.ui.Widget),
            (e = n.spreadsheet.Workbook),
            (h = n.spreadsheet.Controller),
            (c = n.spreadsheet.View),
            (u = ".kendoSpreadsheet"),
            (o = {
              recalc: !0,
              selection: !0,
              activeCell: !0,
              layout: !0,
              sheetSelection: !0,
              resize: !0,
              editorChange: !1,
              editorClose: !1,
            }),
            (l = { wrapper: "k-widget k-spreadsheet" }),
            (f = n.ui.Widget.extend({
              init: function (n, t) {
                s.fn.init.call(this, n, t);
                this.element.addClass(f.classNames.wrapper);
                this._view = new c(this.element, {
                  messages: this.options.messages.view,
                  toolbar: this.options.toolbar,
                  sheetsbar: this.options.sheetsbar,
                });
                this._workbook = new e(this.options, this._view);
                this._controller = new h(this._view, this._workbook);
                this._autoRefresh = !0;
                this._bindWorkbookEvents();
                this._view.workbook(this._workbook);
                this._view.enableClipboard(!1);
                this.refresh();
                this._view.enableClipboard(!0);
                this._resizeHandler = function () {
                  this.resize();
                }.bind(this);
                i(window).on("resize" + u, this._resizeHandler);
                this.element.on("keydown" + u, this._keyDown.bind(this));
              },
              _keyDown: function (n) {
                var f,
                  u = n.keyCode,
                  e = i(".k-spreadsheet-quick-access-toolbar [title=Redo]");
                if (u === r.F11 && n.shiftKey)
                  return (
                    this._view.sheetsbar._onAddSelect(), n.preventDefault(), t
                  );
                if (n.altKey && u === r.PAGEDOWN)
                  this._view.sheetsbar.trigger("select", {
                    name: this._view.sheetsbar._sheets[
                      this._view.sheetsbar._selectedIndex + 1
                    ].name(),
                    isAddButton: !1,
                  });
                else if (n.altKey && u === r.PAGEUP)
                  this._view.sheetsbar.trigger("select", {
                    name: this._view.sheetsbar._sheets[
                      this._view.sheetsbar._selectedIndex - 1
                    ].name(),
                    isAddButton: !1,
                  });
                else {
                  if (n.altKey && u === r.DELETE)
                    return (
                      (f = function (n) {
                        var t = n.sender;
                        t.isConfirmed() &&
                          this._view.sheetsbar.trigger("remove", {
                            name: this.activeSheet()._name(),
                            confirmation: !0,
                          });
                      }.bind(this)),
                      this._view.sheetsbar._openDialog("confirmation", {
                        close: f,
                      }),
                      n.preventDefault(),
                      t
                    );
                  if (n.altKey && u === r.R)
                    return (
                      this._view.sheetsbar._createEditor(),
                      n.preventDefault(),
                      t
                    );
                  if (
                    (u === r.F10 && this._view.tabstrip) ||
                    (u === r.TAB &&
                      !n.shiftKey &&
                      i(document.activeElement).is(e))
                  )
                    return (
                      this._view.tabstrip.toolbars[
                        this._view.tabstrip.element
                          .find("li.k-state-active")
                          .text()
                          .toLowerCase()
                      ].element
                        .find(":not(.k-overflow-anchor):kendoFocusable:first")
                        .focus(),
                      this._view.tabstrip.toolbars[
                        this._view.tabstrip.element
                          .find("li.k-state-active")
                          .text()
                          .toLowerCase()
                      ].element
                        .find(".k-toolbar-first-visible")
                        .addClass("k-state-focused"),
                      n.preventDefault(),
                      t
                    );
                  if (n.ctrlKey && u === r.B) i("[data-tool=bold]")[0].click();
                  else if (n.ctrlKey && u === r.I)
                    i("[data-tool=italic]")[0].click();
                  else if (n.ctrlKey && u === r.U)
                    i("[data-tool=underline]")[0].click();
                  else {
                    if (n.altKey && u === r.H)
                      return (
                        this._view.tabstrip.select(0), n.preventDefault(), t
                      );
                    if (n.altKey && u === r.N)
                      return (
                        this._view.tabstrip.select(1), n.preventDefault(), t
                      );
                    if (n.altKey && u === r.A)
                      return (
                        this._view.tabstrip.select(2), n.preventDefault(), t
                      );
                  }
                }
              },
              _resize: function () {
                this.refresh({ layout: !0 });
              },
              _workbookChanging: function (n) {
                this.trigger("changing", n) && n.preventDefault();
              },
              _workbookChange: function (t) {
                if ((this._autoRefresh && this.refresh(t), t.recalc && t.ref)) {
                  var i =
                    t.range ||
                    new n.spreadsheet.Range(t.ref, this.activeSheet());
                  this.trigger("change", { range: i });
                }
              },
              _workbookCut: function (n) {
                this.trigger("cut", n);
              },
              _workbookCopy: function (n) {
                this.trigger("copy", n);
              },
              _workbookPaste: function (n) {
                this.trigger("paste", n);
              },
              activeSheet: function (n) {
                return this._workbook.activeSheet(n);
              },
              moveSheetToIndex: function (n, t) {
                return this._workbook.moveSheetToIndex(n, t);
              },
              insertSheet: function (n) {
                return this._workbook.insertSheet(n);
              },
              sheets: function () {
                return this._workbook.sheets();
              },
              removeSheet: function (n) {
                return this._workbook.removeSheet(n);
              },
              sheetByName: function (n) {
                return this._workbook.sheetByName(n);
              },
              sheetIndex: function (n) {
                return this._workbook.sheetIndex(n);
              },
              sheetByIndex: function (n) {
                return this._workbook.sheetByIndex(n);
              },
              renameSheet: function (n, t) {
                return this._workbook.renameSheet(n, t);
              },
              refresh: function (n) {
                return (
                  n || (n = o),
                  n.editorClose ||
                    (this._view.sheet(this._workbook.activeSheet()),
                    this._controller.sheet(this._workbook.activeSheet()),
                    this._workbook.refresh(n)),
                  n.editorChange ||
                    (this._view.refresh(n),
                    this._controller.refresh(),
                    this._view.render(n),
                    this.trigger("render")),
                  this
                );
              },
              openDialog: function (n, t) {
                return this._view.openDialog(n, t);
              },
              autoRefresh: function (n) {
                return n !== t
                  ? ((this._autoRefresh = n), n === !0 && this.refresh(), this)
                  : this._autoRefresh;
              },
              toJSON: function () {
                return this._workbook.toJSON();
              },
              fromJSON: function (n) {
                n.sheets
                  ? (this._workbook.destroy(),
                    (this._workbook = new e(i.extend({}, this.options, n))),
                    this._bindWorkbookEvents(),
                    this._view.workbook(this._workbook),
                    this._controller.workbook(this._workbook),
                    this.activeSheet(this.activeSheet()))
                  : this.refresh();
              },
              saveJSON: function () {
                return this._workbook.saveJSON();
              },
              fromFile: function (n, t) {
                return this._workbook.fromFile(n, t);
              },
              saveAsPDF: function (n) {
                this._workbook.saveAsPDF(
                  i.extend({}, this.options.pdf, n, {
                    workbook: this._workbook,
                  })
                );
              },
              saveAsExcel: function (n) {
                this._workbook.saveAsExcel(n);
              },
              draw: function (n, t) {
                this._workbook.draw(n, t);
              },
              _workbookExcelExport: function (n) {
                this.trigger("excelExport", n) && n.preventDefault();
              },
              _workbookExcelImport: function (n) {
                this.trigger("excelImport", n)
                  ? n.preventDefault()
                  : this._initProgress(n.promise);
              },
              _initProgress: function (t) {
                var r = i(
                    "<div class='k-loading-mask' style='width: 100%; height: 100%; top: 0;'><div class='k-loading-color'/></div>"
                  ).appendTo(this.element),
                  u = i("<div class='k-loading-progress'>")
                    .appendTo(r)
                    .kendoProgressBar({
                      type: "chunk",
                      chunkCount: 10,
                      min: 0,
                      max: 1,
                      value: 0,
                    })
                    .data("kendoProgressBar");
                t.progress(function (n) {
                  u.value(n.progress);
                }).always(function () {
                  n.destroy(r);
                  r.remove();
                });
              },
              _workbookPdfExport: function (n) {
                this.trigger("pdfExport", n) && n.preventDefault();
              },
              _workbookInsertSheet: function (n) {
                this.trigger("insertSheet", n) && n.preventDefault();
              },
              _workbookRemoveSheet: function (n) {
                this.trigger("removeSheet", n) && n.preventDefault();
              },
              _workbookSelectSheet: function (n) {
                this.trigger("selectSheet", n) && n.preventDefault();
              },
              _workbookRenameSheet: function (n) {
                this.trigger("renameSheet", n) && n.preventDefault();
              },
              _workbookInsertRow: function (n) {
                this.trigger("insertRow", n) && n.preventDefault();
              },
              _workbookInsertColumn: function (n) {
                this.trigger("insertColumn", n) && n.preventDefault();
              },
              _workbookDeleteRow: function (n) {
                this.trigger("deleteRow", n) && n.preventDefault();
              },
              _workbookDeleteColumn: function (n) {
                this.trigger("deleteColumn", n) && n.preventDefault();
              },
              _workbookHideRow: function (n) {
                this.trigger("hideRow", n) && n.preventDefault();
              },
              _workbookHideColumn: function (n) {
                this.trigger("hideColumn", n) && n.preventDefault();
              },
              _workbookUnhideRow: function (n) {
                this.trigger("unhideRow", n) && n.preventDefault();
              },
              _workbookUnhideColumn: function (n) {
                this.trigger("unhideColumn", n) && n.preventDefault();
              },
              _workbookSelect: function (n) {
                this.trigger("select", n);
              },
              _workbookChangeFormat: function (n) {
                this.trigger("changeFormat", n);
              },
              _workbookDataBinding: function (n) {
                this.trigger("dataBinding", n) && n.preventDefault();
              },
              _workbookDataBound: function (n) {
                this.trigger("dataBound", n);
              },
              _bindWorkbookEvents: function () {
                this._workbook.bind("cut", this._workbookCut.bind(this));
                this._workbook.bind("copy", this._workbookCopy.bind(this));
                this._workbook.bind("paste", this._workbookPaste.bind(this));
                this._workbook.bind(
                  "changing",
                  this._workbookChanging.bind(this)
                );
                this._workbook.bind("change", this._workbookChange.bind(this));
                this._workbook.bind(
                  "excelExport",
                  this._workbookExcelExport.bind(this)
                );
                this._workbook.bind(
                  "excelImport",
                  this._workbookExcelImport.bind(this)
                );
                this._workbook.bind(
                  "pdfExport",
                  this._workbookPdfExport.bind(this)
                );
                this._workbook.bind(
                  "insertSheet",
                  this._workbookInsertSheet.bind(this)
                );
                this._workbook.bind(
                  "removeSheet",
                  this._workbookRemoveSheet.bind(this)
                );
                this._workbook.bind(
                  "selectSheet",
                  this._workbookSelectSheet.bind(this)
                );
                this._workbook.bind(
                  "renameSheet",
                  this._workbookRenameSheet.bind(this)
                );
                this._workbook.bind(
                  "insertRow",
                  this._workbookInsertRow.bind(this)
                );
                this._workbook.bind(
                  "insertColumn",
                  this._workbookInsertColumn.bind(this)
                );
                this._workbook.bind(
                  "deleteRow",
                  this._workbookDeleteRow.bind(this)
                );
                this._workbook.bind(
                  "deleteColumn",
                  this._workbookDeleteColumn.bind(this)
                );
                this._workbook.bind(
                  "hideRow",
                  this._workbookHideRow.bind(this)
                );
                this._workbook.bind(
                  "hideColumn",
                  this._workbookHideColumn.bind(this)
                );
                this._workbook.bind(
                  "unhideRow",
                  this._workbookUnhideRow.bind(this)
                );
                this._workbook.bind(
                  "unhideColumn",
                  this._workbookUnhideColumn.bind(this)
                );
                this._workbook.bind("select", this._workbookSelect.bind(this));
                this._workbook.bind(
                  "changeFormat",
                  this._workbookChangeFormat.bind(this)
                );
                this._workbook.bind(
                  "dataBinding",
                  this._workbookDataBinding.bind(this)
                );
                this._workbook.bind(
                  "dataBound",
                  this._workbookDataBound.bind(this)
                );
              },
              destroy: function () {
                n.ui.Widget.fn.destroy.call(this);
                this._workbook.destroy();
                this._controller.destroy();
                this._view.destroy();
                this._resizeHandler &&
                  i(window).off("resize" + u, this._resizeHandler);
              },
              options: {
                name: "Spreadsheet",
                toolbar: !0,
                sheetsbar: !0,
                rows: 200,
                columns: 50,
                rowHeight: 20,
                columnWidth: 64,
                headerHeight: 20,
                headerWidth: 32,
                excel: { proxyURL: "", fileName: "Workbook.xlsx" },
                messages: {},
                pdf: {
                  area: "workbook",
                  fileName: "Workbook.pdf",
                  proxyURL: "",
                  paperSize: "a4",
                  landscape: !0,
                  margin: null,
                  title: null,
                  author: null,
                  subject: null,
                  keywords: null,
                  creator: "Kendo UI PDF Generator v." + n.version,
                  date: null,
                },
                defaultCellStyle: { fontFamily: "Arial", fontSize: "12" },
                useCultureDecimals: !1,
              },
              defineName: function (n, t, i) {
                return this._workbook.defineName(n, t, i);
              },
              undefineName: function (n) {
                return this._workbook.undefineName(n);
              },
              nameValue: function (n) {
                return this._workbook.nameValue(n);
              },
              forEachName: function (n) {
                return this._workbook.forEachName(n);
              },
              cellContextMenu: function () {
                return this._view.cellContextMenu;
              },
              rowHeaderContextMenu: function () {
                return this._view.rowHeaderContextMenu;
              },
              colHeaderContextMenu: function () {
                return this._view.colHeaderContextMenu;
              },
              addImage: function (n) {
                return this._workbook.addImage(n);
              },
              cleanupImages: function () {
                return this._workbook.cleanupImages();
              },
              events: [
                "cut",
                "copy",
                "paste",
                "pdfExport",
                "excelExport",
                "excelImport",
                "changing",
                "change",
                "render",
                "removeSheet",
                "selectSheet",
                "renameSheet",
                "insertRow",
                "insertColumn",
                "deleteRow",
                "insertSheet",
                "deleteColumn",
                "hideRow",
                "hideColumn",
                "unhideRow",
                "unhideColumn",
                "select",
                "changeFormat",
                "dataBinding",
                "dataBound",
              ],
            })),
            (n.spreadsheet.ALL_REASONS = o),
            n.ui.plugin(f),
            i.extend(!0, f, { classNames: l }));
        })(window.kendo),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.pivot.configurator.min", ["kendo.dom.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function c(n) {
            for (var i, t = 0, r = n.length; t < r; t++)
              if (2 == n[t].type) {
                i = !0;
                break;
              }
            i &&
              n.splice(t + 1, 0, {
                caption: "KPIs",
                defaultHierarchy: "[KPIs]",
                name: "KPIs",
                uniqueName: "[KPIs]",
              });
          }
          function e(n) {
            return { name: n.uniqueName, type: n.type };
          }
          function l(n) {
            for (var t = 0, i = n.length; t < i; t++)
              (n[t].uniqueName = n[t].name), (n[t].type = "kpi");
            return n;
          }
          function o(t) {
            var i = n(t).closest(".k-pivot-setting");
            return i.length ? i.data("kendoPivotSettingTarget") : null;
          }
          function i(n, t, i) {
            return {
              hierarchyUniqueName: n,
              uniqueName: t,
              caption: t,
              measure: t,
              name: t,
              type: i,
              kpi: !0,
            };
          }
          function s(n) {
            var t = n.name;
            return [
              i(t, n.value, "value"),
              i(t, n.goal, "goal"),
              i(t, n.status, "status"),
              i(t, n.trend, "trend"),
            ];
          }
          var t = window.kendo,
            h = t.ui,
            r = h.Widget,
            u = ".kendoPivotConfigurator",
            a = "mouseenter" + u + " mouseleave" + u,
            f = t.template(
              '<p class="k-reset"><span class="k-icon #=icon#"></span>${name}</p><div class="k-list-container k-reset"/>'
            ),
            v = r.extend({
              init: function (n, i) {
                r.fn.init.call(this, n, i);
                this.element.addClass(
                  "k-widget k-fieldselector k-alt k-edit-form-container"
                );
                this._dataSource();
                this._layout();
                this.refresh();
                t.notify(this);
              },
              events: [],
              options: {
                name: "PivotConfigurator",
                filterable: !1,
                sortable: !1,
                messages: {
                  measures: "Drop Data Fields Here",
                  columns: "Drop Column Fields Here",
                  rows: "Drop Rows Fields Here",
                  measuresLabel: "Measures",
                  columnsLabel: "Columns",
                  rowsLabel: "Rows",
                  fieldsLabel: "Fields",
                },
              },
              _dataSource: function () {
                var i = this;
                i.dataSource && i._refreshHandler
                  ? i.dataSource
                      .unbind("change", i._refreshHandler)
                      .unbind("error", i._errorHandler)
                      .unbind("progress", i._progressHandler)
                  : ((i._errorHandler = n.proxy(i._error, i)),
                    (i._refreshHandler = n.proxy(i.refresh, i)),
                    (i._progressHandler = n.proxy(i._requestStart, i)));
                i.dataSource = t.data.PivotDataSource.create(
                  i.options.dataSource
                );
                i.dataSource
                  .bind("change", i._refreshHandler)
                  .bind("error", i._errorHandler)
                  .bind("progress", i._progressHandler);
              },
              setDataSource: function (n) {
                this.options.dataSource = n;
                this._dataSource();
                this.measures && this.measures.setDataSource(n);
                this.rows && this.rows.setDataSource(n);
                this.columns && this.columns.setDataSource(n);
                this.refresh();
              },
              _treeViewDataSource: function () {
                var i = this;
                return t.data.HierarchicalDataSource.create({
                  schema: {
                    model: {
                      id: "uniqueName",
                      hasChildren: function (n) {
                        return !(
                          "hierarchyUniqueName" in n || "aggregator" in n
                        );
                      },
                    },
                  },
                  transport: {
                    read: function (t) {
                      var r, u, f;
                      n.isEmptyObject(t.data)
                        ? ((r = i.dataSource.schemaDimensions()),
                          r
                            .done(function (n) {
                              i.dataSource.cubeBuilder || c(n);
                              t.success(n);
                            })
                            .fail(t.error))
                        : ((u = i.treeView.dataSource.get(t.data.uniqueName)),
                          "[KPIs]" === u.uniqueName
                            ? ((f = !0),
                              (r = i.dataSource.schemaKPIs()),
                              r
                                .done(function (n) {
                                  t.success(l(n));
                                })
                                .fail(t.error))
                            : "kpi" == u.type && ((f = !0), t.success(s(u))),
                          f ||
                            ((r =
                              2 == u.type
                                ? i.dataSource.schemaMeasures()
                                : u.dimensionUniqueName
                                ? i.dataSource.schemaLevels(t.data.uniqueName)
                                : i.dataSource.schemaHierarchies(
                                    t.data.uniqueName
                                  )),
                            r.done(t.success).fail(t.error)));
                    },
                  },
                });
              },
              _progress: function (n) {
                t.ui.progress(this.element, n);
              },
              _error: function () {
                this._progress(!1);
              },
              _requestStart: function () {
                this._progress(!0);
              },
              _layout: function () {
                this.form = n(
                  '<div class="k-columns k-state-default k-floatwrap"/>'
                ).appendTo(this.element);
                this._fields();
                this._targets();
              },
              _fields: function () {
                var t = n(
                  '<div class="k-state-default"><p class="k-reset"><span class="k-icon k-i-group"></span>' +
                    this.options.messages.fieldsLabel +
                    "</p></div>"
                ).appendTo(this.form);
                this.treeView = n("<div/>")
                  .appendTo(t)
                  .kendoTreeView({
                    template:
                      '# if (item.type == 2 || item.uniqueName == "[KPIs]") { #<span class="k-icon k-i-#= (item.type == 2 ? "sum" : "kpi") #"></span># } else if (item.type && item.type !== "kpi") { #<span class="k-icon k-i-arrows-dimensions"></span># } ##: item.caption || item.name #',
                    dataTextField: "caption",
                    dragAndDrop: !0,
                    autoBind: !1,
                    dataSource: this._treeViewDataSource(),
                    dragstart: function (n) {
                      var t = this.dataItem(n.sourceNode);
                      ((t.hasChildren || t.aggregator || t.measure) &&
                        2 != t.type &&
                        "[KPIs]" !== t.uniqueName) ||
                        n.preventDefault();
                    },
                    drag: function (n) {
                      var t = "k-i-cancel",
                        i = o(n.dropTarget);
                      i &&
                        i.validate(this.dataItem(n.sourceNode)) &&
                        (t = "k-i-plus");
                      n.setStatusClass(t);
                    },
                    drop: function (n) {
                      var r, t, u, h, f, i;
                      if (
                        (n.preventDefault(),
                        (r = o(n.dropTarget)),
                        (t = this.dataItem(n.sourceNode)),
                        r && r.validate(t))
                      ) {
                        if (
                          ((i = t.defaultHierarchy || t.uniqueName),
                          "kpi" === t.type)
                        )
                          for (
                            f = s(t), h = f.length, i = [], u = 0;
                            u < h;
                            u++
                          )
                            i.push(e(f[u]));
                        else t.kpi && (i = [e(t)]);
                        r.add(i);
                      }
                    },
                  })
                  .data("kendoTreeView");
              },
              _createTarget: function (i, r) {
                var f =
                    '<li class="k-item k-header" data-' +
                    t.ns +
                    'name="${data.name}">${data.name}',
                  e = r.sortable,
                  u = "";
                return (
                  e &&
                    ((u += "#if (data.sortIcon) {#"),
                    (u += '<span class="k-icon ${data.sortIcon}-sm"></span>'),
                    (u += "#}#")),
                  (r.filterable || e) &&
                    (u +=
                      '<span class="k-icon k-i-more-vertical k-setting-fieldmenu"></span>'),
                  (u +=
                    '<span class="k-icon k-i-close k-setting-delete"></span>'),
                  (f += '<span class="k-field-actions">' + u + "</span></li>"),
                  new t.ui.PivotSettingTarget(
                    i,
                    n.extend(
                      {
                        dataSource: this.dataSource,
                        hint: function (t) {
                          var i = n(
                            '<div class="k-fieldselector"><ul class="k-list k-reset"></ul></div>'
                          );
                          return i.find(".k-list").append(t.clone()), i;
                        },
                        template: f,
                        emptyTemplate:
                          '<li class="k-item k-empty">${data}</li>',
                      },
                      r
                    )
                  )
                );
              },
              _targets: function () {
                var i = n('<div class="k-state-default"/>').appendTo(this.form),
                  o = n(
                    f({
                      name: this.options.messages.columnsLabel,
                      icon: "k-i-columns",
                    })
                  ).appendTo(i),
                  r = n(
                    '<ul class="k-pivot-configurator-settings k-list k-reset" />'
                  ).appendTo(o.last()),
                  s = n(
                    f({
                      name: this.options.messages.rowsLabel,
                      icon: "k-i-rows",
                    })
                  ).appendTo(i),
                  u = n(
                    '<ul class="k-pivot-configurator-settings k-list k-reset" />'
                  ).appendTo(s.last()),
                  h = n(
                    f({
                      name: this.options.messages.measuresLabel,
                      icon: "k-i-sum",
                    })
                  ).appendTo(i),
                  e = n(
                    '<ul class="k-pivot-configurator-settings k-list k-reset" />'
                  ).appendTo(h.last()),
                  t = this.options;
                this.columns = this._createTarget(r, {
                  filterable: t.filterable,
                  sortable: t.sortable,
                  connectWith: u,
                  messages: {
                    empty: t.messages.columns,
                    fieldMenu: t.messages.fieldMenu,
                  },
                });
                this.rows = this._createTarget(u, {
                  filterable: t.filterable,
                  sortable: t.sortable,
                  setting: "rows",
                  connectWith: r,
                  messages: {
                    empty: this.options.messages.rows,
                    fieldMenu: this.options.messages.fieldMenu,
                  },
                });
                this.measures = this._createTarget(e, {
                  setting: "measures",
                  messages: { empty: t.messages.measures },
                });
                r.add(u)
                  .add(e)
                  .on(a, ".k-item:not(.k-empty)", this._toggleHover);
              },
              _toggleHover: function (t) {
                n(t.currentTarget).toggleClass(
                  "k-state-hover",
                  "mouseenter" === t.type
                );
              },
              _resize: function () {
                var u,
                  r,
                  i = this.element,
                  n = this.options.height,
                  f = t._outerHeight;
                n &&
                  (i.height(n),
                  i.is(":visible") &&
                    ((r = i
                      .children(".k-columns")
                      .children("div.k-state-default")),
                    (n = i.innerHeight()),
                    (u = (f(i) - n) / 2),
                    (n = n - (f(r, !0) - r.height()) - u),
                    r.height(n)));
              },
              refresh: function () {
                var n = this.dataSource;
                (n.cubeBuilder ||
                  this._cube !== n.cube() ||
                  this._catalog !== n.catalog()) &&
                  this.treeView.dataSource.fetch();
                this._catalog = this.dataSource.catalog();
                this._cube = this.dataSource.cube();
                this._resize();
                this._progress(!1);
              },
              destroy: function () {
                r.fn.destroy.call(this);
                this.dataSource.unbind("change", this._refreshHandler);
                this.form.find(".k-list").off(u);
                this.rows.destroy();
                this.columns.destroy();
                this.measures.destroy();
                this.treeView.destroy();
                this.element = null;
                this._refreshHandler = null;
              },
            });
          h.plugin(v);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("util/ripple.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function () {
        var i, r, n, u, f, e, t, o;
        window.kendo.util = window.kendo.util || {};
        window.kendo.util.ripple = window.kendo.util.ripple || {};
        i = function (n, t) {
          var r, i;
          if (n.closest) return n.closest(t);
          for (
            r = Element.prototype.matches
              ? function (n, t) {
                  return n.matches(t);
                }
              : function (n, t) {
                  return n.msMatchesSelector(t);
                },
              i = n;
            i;

          ) {
            if (r(i, t)) return i;
            i = i.parentElement;
          }
        };
        r = function (n) {
          var t,
            i = n.createElement("div");
          return (
            (i.className = "k-ripple"),
            (t = n.createElement("div")),
            (t.className = "k-ripple-blob"),
            i.appendChild(t),
            [i, t]
          );
        };
        n = function (n, t, i) {
          var r = function () {
              i();
              n.removeEventListener(t, r, !1);
            },
            u = function () {
              return n.addEventListener(t, r, !1);
            };
          return u(), { remove: u };
        };
        u = function (t, u) {
          return function (o) {
            var h,
              g,
              w,
              v,
              c,
              b,
              nt,
              s,
              l,
              a,
              tt,
              it,
              k,
              d,
              y,
              rt,
              p = o.target,
              ut = p.document || p.ownerDocument;
            if (
              ((h = u.container ? u.container(p) : i(p, t)),
              h &&
                ((g =
                  /focus/i.test(o.type) &&
                  h.classList.contains("k-ripple-target")),
                !g))
            ) {
              if (
                (h.classList.add("k-ripple-target"),
                (w = r(ut)),
                (v = w[0]),
                (c = w[1]),
                (b = {
                  animated: !1,
                  released: !1,
                  blob: c,
                  container: h,
                  ripple: v,
                }),
                (nt = {
                  focusin: "focusout",
                  keydown: "keyup",
                  mousedown: "mouseup",
                  pointerdown: "pointerup",
                  touchdown: "touchup",
                }[o.type]),
                n(o.currentTarget, nt, function () {
                  return e(b);
                }),
                h.appendChild(v),
                window.getComputedStyle(v).getPropertyValue("opacity"),
                (s = h.getBoundingClientRect()),
                (l = 0),
                (a = 0),
                /mouse|pointer|touch/.test(o.type)
                  ? ((l = o.clientX - s.left), (a = o.clientY - s.top))
                  : ((l = s.width / 2), (a = s.height / 2)),
                (tt = l < s.width / 2 ? s.width : 0),
                (it = a < s.height / 2 ? s.height : 0),
                (k = l - tt),
                (d = a - it),
                (y = 2 * Math.sqrt(k * k + d * d)),
                (rt = 500),
                (c.style.width = c.style.height = y + "px"),
                c.offsetWidth < 0)
              )
                throw Error("Inconceivable!");
              c.style.cssText =
                "\n    width: " +
                y +
                "px;\n    height: " +
                y +
                "px;\n    transform: translate(-50%, -50%) scale(1);\n    left: " +
                l +
                "px;\n    top: " +
                a +
                "px;\n  ";
              setTimeout(function () {
                return f(b);
              }, rt);
            }
          };
        };
        f = function (n) {
          n.animated = !0;
          t(n);
        };
        e = function (n) {
          n.released = !0;
          t(n);
        };
        t = function (t) {
          if (t.released && t.animated) {
            var i = t.blob,
              r = t.ripple,
              u = t.container;
            u &&
              n(u, "blur", function () {
                return u.classList.remove("k-ripple-target");
              });
            i &&
              (n(i, "transitionend", function () {
                r && r.parentNode && r.parentNode.removeChild(r);
              }),
              (i.style.transition = "opacity 200ms linear"),
              (i.style.opacity = "0"));
          }
        };
        o = function (n, t) {
          var i = function (n) {
              return [].concat.apply([], n);
            },
            r = i(
              t.map(function (t) {
                var r = { events: ["mousedown", "touchdown"], global: !1 },
                  s = t.selector,
                  f = t.options,
                  i = void 0 === f ? r : f,
                  e = u(s, i),
                  o = i.events || r.events,
                  h = i.global ? document.body : n;
                return (
                  o.forEach(function (n) {
                    return h.addEventListener(n, e, !1);
                  }),
                  { events: o, options: i, activator: e }
                );
              })
            );
          return function () {
            if (n) {
              var t = function (t) {
                var i = t.events,
                  r = t.options,
                  u = t.activator,
                  f = r.global ? document.body : n;
                i.forEach(function (n) {
                  return f.removeEventListener(n, u, !1);
                });
              };
              r.forEach(t);
              n = null;
            }
          };
        };
        kendo.deepExtend(kendo.util.ripple, { register: o });
      })();
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.ripple.min", ["util/ripple.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var i = window.kendo,
            r = i.ui,
            t = r.Widget,
            u = n.extend,
            f = i.util.ripple,
            e = t.extend({
              init: function (n, i) {
                var r = this;
                t.fn.init.call(r, n);
                n = r.wrapper = r.element;
                r.options = u({}, r.options, i);
                r.registerListeners();
              },
              options: {
                name: "RippleContainer",
                elements: [
                  { selector: ".k-button:not(li)" },
                  { selector: ".k-list > .k-item", options: { global: !0 } },
                  { selector: ".k-checkbox-label, .k-radio-label" },
                  {
                    selector: ".k-checkbox, .k-radio",
                    options: {
                      events: ["focusin"],
                      container: function (n) {
                        if (/\b(k-checkbox|k-radio)\b/.test(n.className))
                          return n.nextElementSibling;
                      },
                    },
                  },
                ],
              },
              removeListeners: function () {},
              registerListeners: function () {
                var t,
                  n = this,
                  i = n.element[0],
                  r = n.options.elements;
                n.removeListeners();
                t = f.register(i, r);
                n.removeListeners = t;
              },
              destroy: function () {
                var n = this;
                t.fn.destroy.call(n);
                n.removeListeners();
              },
            });
          r.plugin(e);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("pdfviewer/pdfjs.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var t = n.extend,
            i = function () {
              if (!window.pdfjsLib) {
                var n = window.console;
                return n && n.error && n.error("PDF.JS required."), !1;
              }
              return (kendo.pdfviewer.pdfjs.lib = window.pdfjsLib), !0;
            };
          t(kendo, {
            pdfviewer: { pdfjs: { lib: window.pdfjsLib, isLoaded: i } },
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("pdfviewer/processors/pdfjs-processor.min", ["pdfviewer/pdfjs.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var i,
            t = window.kendo,
            u = t.Class,
            f = n.extend,
            r = window.atob,
            e = u.extend({
              init: function (n, r) {
                var u = this;
                t.pdfviewer.pdfjs.isLoaded() && (i = t.pdfviewer.pdfjs.lib);
                u.file = n.file;
                u.viewer = r;
              },
              fetchDocument: function () {
                var t = this,
                  u = n.Deferred(),
                  f = t.viewer.options.messages.errorMessages;
                return t.file
                  ? (t._isBase64Data() && r && (t.file.data = r(t.file.data)),
                    i
                      .getDocument(this.file)
                      .promise.then(function (i) {
                        var r,
                          e = [];
                        for (
                          t.pdf = i,
                            t.pagePromises = [],
                            t._downloadData = n.Deferred(),
                            i.getData().then(function (n) {
                              var i = new Blob([n], {
                                type: "application/pdf",
                              });
                              t._downloadData.resolve({ file: i });
                            }),
                            r = 1;
                          r <= i.numPages;
                          r++
                        )
                          t.pagePromises.push(i.getPage(r));
                        Promise.all(t.pagePromises)
                          .then(function (n) {
                            e = n.map(function (n) {
                              var t = n.getViewport({ scale: 4 / 3 });
                              return { width: t.width, height: t.height };
                            });
                            u.resolve({ total: i.numPages, pages: e });
                          })
                          ["catch"](function (n) {
                            t.viewer._triggerError({
                              error: n.message,
                              message: f.parseError,
                            });
                          });
                      })
                      ["catch"](function (n) {
                        var i = n.name.includes("Missing"),
                          r = i ? f.notFound : f.parseError;
                        t.viewer._triggerError({
                          error: n.message,
                          message: r,
                        });
                        i && t.viewer._renderBlankPage();
                      }),
                    u)
                  : u.resolve();
              },
              fetchPageData: function (n) {
                return this.pagePromises[n - 1];
              },
              downloadFile: function (n) {
                var i = this;
                t.ui.progress(i.viewer.pageContainer, !0);
                i._downloadData.done(function (r) {
                  t.ui.progress(i.viewer.pageContainer, !1);
                  var u = new FileReader();
                  u.readAsDataURL(r.file);
                  u.onload = function () {
                    t.saveAs({
                      dataURI: u.result,
                      fileName: n + ".pdf",
                      proxyURL: function () {
                        return u.result;
                      },
                    });
                  };
                });
              },
              _updateDocument: function (n) {
                this.pdf.loadingTask.destroy();
                this.file = n;
              },
              _isBase64Data: function () {
                var i,
                  n = this.file.data,
                  t = n && n.length;
                return (
                  !(!t || t % 4 != 0 || /[^A-Z0-9+\/=]/i.test(n)) &&
                  ((i = n.indexOf("=")),
                  i === -1 || i === t - 1 || (i === t - 2 && "=" === n[t - 1]))
                );
              },
              renderTextLayer: function (n) {
                i.renderTextLayer(n);
              },
            });
          f(t.pdfviewer.pdfjs, { processor: e });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("pdfviewer/processors/dpl-processor.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var t = window.kendo,
            i = n.extend,
            r = t.Class,
            u = r.extend({
              init: function (n, t) {
                var i = this;
                i.options = n;
                i.read = n.read;
                i.upload = n.upload;
                i.download = n.download;
                i.viewer = t;
              },
              fetchDocument: function () {
                var i = this,
                  r = n.Deferred(),
                  u = i.viewer.options.messages.errorMessages;
                return i.read
                  ? (n.ajax({
                      type: i.read.type,
                      url: i.read.url,
                      dataType: i.read.dataType,
                      success: function (n) {
                        "string" != typeof n && (n = t.stringify(n));
                        r.resolve(JSON.parse(n));
                      },
                      error: function (n) {
                        i.viewer._triggerError({
                          error: n.responseText,
                          message: u.parseError,
                        });
                      },
                    }),
                    r)
                  : r.resolve();
              },
              fetchPageData: function (t) {
                var i = this,
                  r = n.Deferred(),
                  u = i.viewer.document.pages[t - 1],
                  f = {};
                return (
                  (f[i.read.pageField] = t),
                  u.geometries.length
                    ? r.resolve(u)
                    : n.ajax({
                        type: i.read.type,
                        url: i.read.url,
                        data: f,
                        success: function (n) {
                          r.resolve(JSON.parse(n));
                        },
                        error: function (n) {
                          i.viewer._triggerError({
                            error: n.responseText,
                            message:
                              i.viewer.options.messages.errorMessages
                                .parseError,
                          });
                        },
                      }),
                  r
                );
              },
              downloadFile: function (n) {
                window.location = this.download.url + "?file=" + n;
              },
              fromJSON: function (n) {
                var t = this.viewer;
                t._clearPages();
                t.document = n;
                t.document.total = t.document.pages.length;
                t._renderPages();
                t.resize(!0);
                t.activatePage(1);
              },
            });
          i(t.pdfviewer, { dpl: { processor: u } });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("pdfviewer/pager.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var r = ".kendoPDFViewer",
            f = kendo.ui.Widget,
            s = "change",
            e = "keydown",
            c = kendo.support.click,
            l = 480,
            u = kendo.attr,
            o = n.proxy,
            a = n.extend,
            h = ".",
            i = {
              wrapperClass: "k-pager-wrap",
              iconFirst: "k-i-arrow-end-left",
              iconLast: "k-i-arrow-end-right",
              iconPrev: "k-i-arrow-60-left",
              iconNext: "k-i-arrow-60-right",
              first: "k-pager-first",
              last: "k-pager-last",
              nav: "k-pager-nav",
              disabled: "k-state-disabled",
            },
            v = f.extend({
              init: function (n, t) {
                var r = this;
                f.fn.init.call(r, n, t);
                r.linkTemplate = kendo.template(r.options.linkTemplate);
                r.element.addClass(i.wrapperClass);
                r._renderLinks();
                r._toggleDisabledClass();
                r._attachEvents();
              },
              options: {
                linkTemplate:
                  '<a href="\\#" aria-label="#=text#" title="#=text#" class="k-button k-button-icon k-flat k-pager-nav #= wrapClass #" data-page="#=pageIdx#"><span class="k-icon #= iconClass #"></span></a>',
                previousNext: !0,
                input: !0,
                page: 1,
                total: 1,
                messages: {},
              },
              events: [s],
              _pagerLink: function (n, t, i, r) {
                return this.linkTemplate({
                  iconClass: n,
                  text: t,
                  wrapClass: r || "",
                  pageIdx: i,
                });
              },
              _renderLinks: function () {
                var t = this,
                  r = t.options;
                r.previousNext &&
                  ((t.firstLink = n(
                    t._pagerLink(i.iconFirst, r.messages.first, 1, i.first)
                  )),
                  (t.prevLink = n(
                    t._pagerLink(i.iconPrev, r.messages.previous, r.page - 1)
                  )),
                  (t.nextLink = n(
                    t._pagerLink(i.iconNext, r.messages.next, r.page + 1)
                  )),
                  (t.lastLink = n(
                    t._pagerLink(i.iconLast, r.messages.last, r.total, i.last)
                  )));
                t.element.append(t.firstLink);
                t.element.append(t.prevLink);
                r.input && t._renderInput();
                t.element.append(t.nextLink);
                t.element.append(t.lastLink);
              },
              _toggleDisabledClass: function () {
                var n = this,
                  t = n.options,
                  r = !t.total;
                n.nextLink &&
                  n.prevLink &&
                  (n.prevLink.toggleClass(i.disabled, r || 1 === t.page),
                  n.nextLink.toggleClass(i.disabled, r || t.page === t.total),
                  n.lastLink.toggleClass(i.disabled, r || t.page === t.total),
                  n.firstLink.toggleClass(i.disabled, r || 1 === t.page));
                n.input && n.input.toggleClass(i.disabled, t.total <= 1);
              },
              _attachEvents: function () {
                var n = this;
                n.element.on(c + r, h + i.nav, o(n._click, n));
                n.element.on(e + r, h + i.nav, function (t) {
                  t.keyCode === kendo.keys.ENTER &&
                    (n._click(t), t.preventDefault());
                });
                n.input && n.input.on(e + r, o(n._keydown, n));
              },
              _click: function (t) {
                var i = n(t.currentTarget),
                  r = parseInt(i.attr(u("page")), 10);
                t.isDefaultPrevented() || this._change(r);
              },
              _keydown: function (i) {
                var r = i.keyCode,
                  u = kendo.keys,
                  o = n(i.target),
                  f = parseInt(o.val(), 10),
                  e = r === u.UP || r === u.DOWN,
                  s =
                    r === u.RIGHT ||
                    r === u.LEFT ||
                    r === u.BACKSPACE ||
                    r === u.DELETE,
                  h = e && r === u.UP ? 1 : -1;
                if ((e && (f += h), r === u.ENTER || e)) {
                  if (isNaN(f) || f < 1 || f > this.options.total)
                    return (f = this.options.page), o.val(f), t;
                  this._change(f);
                  i.preventDefault();
                } else i.key.match(/^\d+$/) || s || i.preventDefault();
              },
              _change: function (n) {
                var t = this;
                n >= 1 &&
                  n <= t.options.total &&
                  ((t.options.page = n),
                  t.input && t.input.val(n),
                  t.prevLink.attr(u("page"), n - 1),
                  t.nextLink.attr(u("page"), n + 1),
                  t._toggleDisabledClass());
                t.trigger(s, { page: n });
              },
              setOptions: function (t) {
                var i = this,
                  s = i.options.total;
                t = n.extend(i.options, t);
                f.fn.setOptions.call(i, t);
                t.input &&
                  (s != t.total
                    ? (i._renderInput(), i.input.on(e + r, o(i._keydown, i)))
                    : i.input.val(t.total > 0 ? t.page : 1));
                t.total > 1 &&
                  (i.prevLink.attr(u("page"), t.page - 1),
                  i.nextLink.attr(u("page"), t.page + 1),
                  i.lastLink.attr(u("page"), t.total));
                i._toggleDisabledClass();
              },
              _renderInput: function () {
                var i,
                  u,
                  t = this,
                  n = t.options,
                  e = t.element.parent().width() <= l,
                  f = t.element.find(".k-pager-input");
                t.input && t.input.off(r);
                i = n.total > 0 ? kendo.format(n.messages.of, n.total) : "";
                e || (i += n.total > 1 ? n.messages.pages : n.messages.page);
                u =
                  '<input class="k-textbox" aria-label="' +
                  n.page +
                  i +
                  '">' +
                  i;
                f.length
                  ? f.html(u)
                  : t.element.append(
                      '<span class="k-pager-input k-label">' + u + "</span>"
                    );
                t.input = t.element.find("input").val(n.total > 0 ? n.page : 1);
              },
              destroy: function () {
                this.element.off(r);
                this.input && this.input.off(r);
                f.fn.destroy.call(this);
              },
            });
          a(kendo.pdfviewer, { Pager: v });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "pdfviewer/toolbar.min",
      ["kendo.toolbar.min", "kendo.combobox.min", "pdfviewer/pager.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function h(n, t, i) {
            var r = i ? f.zoomOverflowButtons : f.zoomButtons;
            n.append(
              k({
                text: t.zoomOut,
                command: w,
                iconClass: f.zoomOutIcon,
                showText: i,
                className: r,
              })
            );
            n.append(
              k({
                text: t.zoomIn,
                command: p,
                iconClass: f.zoomInIcon,
                showText: i,
                className: r,
              })
            );
          }
          var e,
            c,
            l,
            i = window.kendo,
            r = n.extend,
            a = n.proxy,
            v = "action",
            d = "k-flat",
            y = "keydown",
            g = i.support.click,
            nt = "change",
            p = "zoomin",
            w = "zoomout",
            b = i.toolbar.Item,
            o = i.ui.ToolBar,
            u = {
              auto: "auto",
              actual: "actual",
              fitToWidth: "fitToWidth",
              fitToPage: "fitToPage",
            },
            f = {
              zoomOutIcon: "k-i-zoom-out",
              zoomInIcon: "k-i-zoom-in",
              zoomButtons: "k-button-icon k-flat",
              zoomOverflowButtons: "k-button-icontext k-overflow-button",
              overflowHidden: "k-overflow-hidden",
            },
            k = i.template(
              '<a href="\\#" aria-label="#=text#" title="#=text#" data-command="#=command#" class="k-button #=className#"><span class="k-icon #= iconClass #"></span> ${showText ? text : ""}</a>'
            ),
            tt = i.template(
              '<select>#for(var zoomIndex in zoomLevels){## var zoomLevel = zoomLevels[zoomIndex]; #<option value="#= zoomLevel.percent || (zoomLevel + "%") #">${zoomLevel.text ? zoomLevel.text : zoomLevel + "%"}</option>#}#</select>'
            ),
            s = {
              pager: {
                type: "pager",
                overflow: "never",
                command: "PageChangeCommand",
              },
              spacer: { type: "spacer" },
              zoom: {
                type: "zoom",
                command: "ZoomCommand",
                zoomInOut: !0,
                combobox: { zoomLevels: [50, 100, 150, 200, 300, 400] },
              },
              toggleSelection: {
                type: "buttonGroup",
                attributes: { class: "k-toggle-selection-group" },
                buttons: [
                  {
                    togglable: !0,
                    text: "Enable Selection",
                    command: "EnableSelectionCommand",
                    icon: "cursor",
                    showText: "overflow",
                    name: "toggleSelection",
                    group: "toggle-pan",
                  },
                  {
                    togglable: !0,
                    text: "Enable Panning",
                    command: "EnablePanCommand",
                    icon: "hand",
                    showText: "overflow",
                    name: "togglePan",
                    group: "toggle-pan",
                    selected: !0,
                  },
                ],
              },
              spacer2: { type: "spacer" },
              search: {
                type: "button",
                text: "Search",
                command: "OpenSearchCommand",
                icon: "search",
                name: "search",
                showText: "overflow",
              },
              open: {
                type: "button",
                text: "Open",
                showText: "overflow",
                name: "open",
                icon: "folder-open",
                command: "OpenCommand",
              },
              download: {
                type: "button",
                text: "Download",
                showText: "overflow",
                name: "download",
                icon: "download",
                command: "DownloadCommand",
              },
              print: {
                type: "button",
                text: "Print",
                showText: "overflow",
                name: "print",
                icon: "print",
                command: "PrintCommand",
              },
            },
            it = r({}, s, {
              exportAs: {
                type: "button",
                text: "Export",
                showText: "overflow",
                name: "exportAs",
                icon: "image-export",
                command: "ExportCommand",
              },
            }),
            rt = b.extend({
              init: function (t, u) {
                var f = n("<div />");
                this.options = r(!0, t, u.options.pager);
                this.toolbar = u;
                this.toolbar.pager = new i.pdfviewer.Pager(
                  f,
                  r({}, t, { change: a(this._change, this) })
                );
                this.element = f;
                this.element.on(y, a(this._keydown, this));
                this.attributes();
                this.addUidAttr();
                this.addOverflowAttr();
              },
              _change: function (n) {
                (this.options.change && this.options.change(n.page)) ||
                  this.toolbar.action({
                    command: "PageChangeCommand",
                    options: { value: n.page },
                  });
              },
              _keydown: function (t) {
                var e = this,
                  o = n(t.target),
                  s = t.keyCode,
                  r = e.element.find(":kendoFocusable"),
                  u = r.index(o),
                  f = t.shiftKey ? -1 : 1;
                s === i.keys.TAB &&
                  r[u + f] &&
                  (r[u + f].focus(), t.preventDefault(), t.stopPropagation());
              },
            });
          i.toolbar.registerComponent("pager", rt);
          e = b.extend({
            init: function (n, t) {
              this._init(n, t);
              this.toolbar.zoom = this;
              t.options.scale &&
                (this._initValue = 100 * t.options.scale + "%");
              this._appendElements();
              this._click = i.throttle(this._click.bind(this), 200);
              this._keydown = i.throttle(this._keydown.bind(this), 200);
              this.element.on(g, ".k-button", this._click);
              this.element.on(y, ".k-button", this._keydown);
              this.attributes();
              this.addUidAttr();
              this.addOverflowAttr();
            },
            _init: function (t, i) {
              var u = n("<div />");
              this.options = r(!0, t, { messages: i.options.messages.zoom });
              this.toolbar = i;
              this.element = u;
            },
            _appendElements: function () {
              var n = this.options;
              n.zoomInOut && h(this.element, n.messages, !1);
              n.combobox && this._buildComboBox();
            },
            _buildComboBox: function () {
              var f,
                t = this,
                e = t.options.messages,
                s = t.options.combobox,
                o = [
                  { percent: u.auto, text: e.autoWidth },
                  { percent: u.actual, text: e.actualWidth },
                  { percent: u.fitToWidth, text: e.fitToWidth },
                  { percent: u.fitToPage, text: e.fitToPage },
                ];
              o = o.concat(s.zoomLevels);
              f = n(tt({ zoomLevels: o }));
              i.support.mobileOS
                ? t.element.append(f)
                : ((f = f
                    .kendoComboBox(
                      r(
                        { autoWidth: !0, clearButton: !1, value: t._initValue },
                        s
                      )
                    )
                    .getKendoComboBox()),
                  t.element.append(f.wrapper),
                  (t.combobox = f),
                  (t._currentValue = f.value()));
              f.bind(nt, i.throttle(t.change.bind(t), 300));
            },
            change: function (n) {
              var r,
                i = n.sender ? n.sender.value() : n.target.value;
              if (("" + i).match(/^[0-9]+%?$/))
                r = parseInt(i.replace("%", ""), 10) / 100;
              else if (!u[i])
                return (
                  this.combobox && this.combobox.value(this._currentValue),
                  n.preventDefault(),
                  t
                );
              this._currentValue = i;
              this.toolbar.action({
                command: "ZoomCommand",
                options: { scale: r || i },
              });
            },
            _buttonCommand: function (t) {
              var r = n(t).closest(".k-button"),
                i = r.data("command");
              this.toolbar.action({
                command: "ZoomCommand",
                options: {
                  zoomIn: i === p,
                  zoomOut: i === w,
                  updateComboBox: !0,
                },
              });
            },
            _click: function (n) {
              this._buttonCommand(n.target);
            },
            _keydown: function (n) {
              var t = n.keyCode,
                r = i.keys;
              t === r.ENTER &&
                (this._buttonCommand(n.target), n.preventDefault());
            },
            enable: function (n) {
              var t = this.element;
              t.find(".k-button, select").toggleClass("k-state-disabled", !n);
              this.combobox && this.combobox.enable(n);
            },
            destroy: function () {
              this.combobox && this.combobox.destroy();
            },
          });
          c = e.extend({
            _init: function (t, i) {
              var u = n("<li></li>");
              this.options = r(!0, t, { messages: i.options.messages.zoom });
              this.toolbar = i;
              this.element = u;
            },
            _appendElements: function () {
              var n = this.options;
              n.zoomInOut && h(this.element, n.messages, !0);
            },
            overflowHidden: function () {
              this.element.addClass(f.overflowHidden);
            },
          });
          i.toolbar.registerComponent("zoom", e, c);
          l = o.extend({
            init: function (n, t) {
              var i = this,
                r = t.items && t.items.length ? t.items : Object.keys(s);
              i.options = t;
              t.items = i._updateItems(r);
              o.fn.init.call(i, n, t);
              i.bind({ click: i._click, toggle: i._click });
              t.viewer.bind({ update: i._update.bind(i) });
            },
            events: [v],
            _updateItems: function (t) {
              var u = this,
                r = this.options.messages;
              return t.map(function (t) {
                var f,
                  o,
                  e,
                  s =
                    n.isPlainObject(t) && 1 === Object.keys(t).length && t.name;
                return (
                  (t = s ? t.name : t),
                  (f = n.isPlainObject(t) ? t : it[t]),
                  (e = f.name),
                  "buttonGroup" === f.type
                    ? (f.buttons = u._updateItems(f.buttons))
                    : (o =
                        "pager" !== f.type
                          ? {
                              name: e,
                              attributes: {
                                "aria-label": r[e],
                                title: r[e],
                                "data-command": f.command,
                                class: d,
                              },
                              overflow: f.overflow,
                            }
                          : { overflow: "never" }),
                  i.deepExtend(f, o),
                  f
                );
              });
            },
            _click: function (t) {
              var i = n(t.target).data("command");
              i && this.action({ command: i, options: t.options });
            },
            _update: function (n) {
              var t = { page: n.page || 1, total: n.total || 1 };
              this.zoom &&
                (this.zoom.enable(!n.isBlank),
                "zoom" === n.action && this._updateZoomComboBox(n.zoom));
              ("pagechange" === n.action || n.isBlank) &&
                this.pager &&
                this.pager.setOptions(t);
              this.enable(
                this.wrapper.find(".k-toggle-selection-group"),
                !n.isBlank
              );
              this.enable(
                this.wrapper.find("[data-command='OpenSearchCommand']"),
                !n.isBlank
              );
              this.enable(
                this.wrapper.find("[data-command='DownloadCommand']"),
                !n.isBlank
              );
              this.enable(
                this.wrapper.find("[data-command='PrintCommand']"),
                !n.isBlank
              );
            },
            _updateZoomComboBox: function (n) {
              var t = n === u.auto || n === u.actual;
              t || (n = Math.round(100 * n) + "%");
              this.zoom &&
                this.zoom.combobox &&
                ((this.zoom._currentValue = n), this.zoom.combobox.value(n));
            },
            action: function (n) {
              this.trigger(v, n);
            },
            destroy: function () {
              this.pager && this.pager.destroy();
              this.zoom && this.zoom.destroy();
              o.fn.destroy.call(this);
            },
          });
          r(i.pdfviewer, { Toolbar: l, DefaultTools: s });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("pdfviewer/page.min", ["kendo.drawing.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var u = n.extend,
            o = n.noop,
            r = kendo.drawing,
            s = r.Group,
            h = r.Surface,
            e = "render",
            c = kendo.Class,
            i = {
              Path: "path",
              MultiPath: "multipath",
              Rect: "rect",
              Image: "image",
              Text: "text",
            },
            f = c.extend({
              init: function (t, i) {
                this.viewer = i;
                this.processor = t.processor;
                this.options = t;
                this.pageNumber = t.number;
                this.element = n("<div class='k-page' />");
                this.element.attr(kendo.attr("number"), this.pageNumber);
                this._updatePageSize(t);
                this.width = t.width;
                this.height = t.height;
              },
              resize: function (n) {
                var t = this.element;
                this._updatePageSize({
                  width: Math.min(t.width() * n, this.width),
                  height: Math.min(t.height() * n, this.height),
                });
              },
              _updatePageSize: function (n) {
                this.element.width(n.width).height(n.height);
              },
              destroy: function () {
                kendo.destroy(this.element);
              },
              render: o,
            }),
            l = f.extend({
              draw: function () {
                var n = this,
                  t = n.options.geometries;
                n.group = new s();
                n.surface.draw(n.group);
                n._drawGeometries(t);
                n.viewer.trigger(e, { page: this });
                kendo.ui.progress(n.element, !1);
              },
              load: function () {
                var n = this;
                !n.loaded &&
                  n.processor &&
                  (n.processor.fetchPageData(n.pageNumber).then(function (t) {
                    n.options = t;
                    n._initSurface();
                    n.draw();
                  }),
                  (n.loaded = !0));
              },
              _initSurface: function () {
                var n = {
                    width: this.element.width(),
                    height: this.element.height(),
                  },
                  t = u(
                    { width: this.width, height: this.height },
                    this.viewer.options.view
                  );
                this.surface = new h(this.element, t);
                this._updatePageSize(n);
              },
              _drawGeometries: function (n) {
                var t,
                  f,
                  r,
                  u = this;
                if (n)
                  for (f = 0; f <= n.length; f++)
                    if ((r = n[f])) {
                      switch (r.type) {
                        case i.Path:
                        case i.MultiPath:
                          t = u._drawPath(r);
                          break;
                        case i.Rect:
                          t = u._drawRect(r);
                          break;
                        case i.Image:
                          t = u._drawImage(r);
                          break;
                        case i.Text:
                          t = u._drawText(r);
                          break;
                        default:
                          t = null;
                      }
                      t && u.group.append(t);
                    }
              },
              _drawRect: function (n) {
                var t = new kendo.geometry.Rect(n.point, n.size);
                return new r.Rect(t, {
                  transform: this._getMatrix(n.transform),
                  fill: n.fillOptions,
                  stroke: n.strokeOptions,
                });
              },
              _drawImage: function (n) {
                var t = new kendo.geometry.Rect(n.point, n.size);
                return new r.Image(n.src, t, {
                  transform: this._getMatrix(n.transform),
                });
              },
              _drawText: function (n) {
                var t = {
                  transform: this._getMatrix(n.transform),
                  stroke: n.strokeOptions,
                  fill: n.fillOptions,
                  font: n.font,
                };
                return new kendo.drawing.Text(n.content, n.point, t);
              },
              _drawPath: function (n) {
                for (
                  var i,
                    f,
                    e,
                    o,
                    s = {
                      transform: this._getMatrix(n.transform),
                      stroke: n.strokeOptions,
                      fill: n.fillOptions,
                    },
                    t = new r.MultiPath(s),
                    u = 0;
                  u < n.paths.length;
                  u++
                ) {
                  if (((i = n.paths[u]), !i.segments)) return;
                  for (
                    t.moveTo.apply(t, i.point), f = 0;
                    f < i.segments.length;
                    f++
                  )
                    (e = i.segments[f]),
                      (o = 1 === e.points.length ? t.lineTo : t.curveTo),
                      o.apply(t, e.points);
                  i.closed && t.close();
                }
                return t;
              },
              _getMatrix: function (n) {
                var t = Object.create(kendo.geometry.Matrix.prototype);
                return kendo.geometry.Matrix.apply(t, n), t;
              },
            }),
            a = f.extend({
              init: function (t, i) {
                var u,
                  r = this;
                u = n("<canvas style='width: 100%; height: 100%;' />");
                r.canvas = u.get(0);
                f.fn.init.call(r, t, i);
                r.canvas.width = r.width;
                r.canvas.height = r.height;
                r.element.append(u);
              },
              load: function (n, i) {
                var r = this;
                if (r._scale !== n || i) {
                  if (r._scale && r._scale !== n && !i)
                    return (r._scale = n), r.render(n), t;
                  r.processor &&
                    r.processor.fetchPageData(r.pageNumber).then(function (t) {
                      return (
                        (r._page = t),
                        r.render(n).then(function () {
                          r.viewer.trigger(e, { page: r });
                        })
                      );
                    });
                  r._scale = n;
                  r.loaded = !0;
                }
              },
              render: function (n) {
                var i = this,
                  r = this.canvas.getContext("2d"),
                  t = this._page.getViewport({ scale: n });
                return (
                  (this._scale = n),
                  (this.canvas.width = t.width),
                  (this.canvas.height = t.height),
                  this._renderTask &&
                    (this._renderTask.cancel(), (this._renderTask = null)),
                  this._updatePageSize({ width: t.width, height: t.height }),
                  (this._renderTask = this._page.render({
                    canvasContext: r,
                    viewport: t,
                  })),
                  this._renderTextLayer(t),
                  this._renderTask.promise
                    .then(function () {
                      i._renderTask = null;
                    })
                    ["catch"](function () {})
                );
              },
              _renderTextLayer: function (t) {
                var i = this,
                  r = i._page;
                i.textLayer && i.textLayer.remove();
                i.textLayer = n("<div class='k-text-layer'></div>").get(0);
                i.element.append(i.textLayer);
                r.getTextContent({ normalizeWhitespace: !0 }).then(function (
                  r
                ) {
                  n(i.textLayer)
                    .css({ height: t.height, width: t.width })
                    .html("");
                  var u = {
                    textContent: r,
                    container: i.textLayer,
                    viewport: t,
                    textDivs: [],
                    enhanceTextSelection: !0,
                  };
                  i.processor.renderTextLayer(u);
                });
              },
            });
          u(kendo.pdfviewer.dpl, { geometryTypes: i, Page: l });
          u(kendo.pdfviewer.pdfjs, { Page: a });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("pdfviewer/search.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var i = kendo.Class,
            t = n.extend,
            r = n.isArray,
            u = i.extend({
              init: function (n) {
                var i = this;
                i.options = t({}, i.options, n);
                i.processDom();
              },
              options: {
                highlightClass: "k-search-highlight",
                charClass: "k-text-char",
              },
              processDom: function () {
                var t,
                  n = this;
                for (
                  n.targets = r(n.options.target)
                    ? n.options.target
                    : [n.options.target],
                    n.textNodes = [],
                    n.charIndex = 0,
                    n.text = "",
                    n.targets.forEach(function (t) {
                      n.traverseToTextNode(t);
                    }),
                    t = 0;
                  t < n.textNodes.length;
                  t++
                )
                  n.processTextNode(n.textNodes[t]);
              },
              traverseToTextNode: function (n) {
                var t,
                  i = this;
                if (3 === n.nodeType) i.textNodes.push(n);
                else
                  for (t = 0; t < n.childNodes.length; t++)
                    i.traverseToTextNode(n.childNodes[t]);
              },
              processTextNode: function (t) {
                var i,
                  r = this,
                  u = t.textContent;
                r.text = r.text + u;
                u.length > 0 &&
                  ((i = n(t).wrap("<span>").parent()),
                  i.empty(),
                  r.splitChars(i.get(0), u),
                  i.children().unwrap());
              },
              splitChars: function (n, t) {
                for (var r = this, u = "", i = 0; i < t.length; i++)
                  (u =
                    u +
                    "<span class='" +
                    r.options.charClass +
                    "' " +
                    kendo.attr("char-index") +
                    "=" +
                    r.charIndex +
                    ">" +
                    t[i] +
                    "</span>"),
                    r.charIndex++;
                n.innerHTML = u;
              },
              search: function (n, t) {
                var r,
                  i = this,
                  u = RegExp(n, t ? "g" : "gi");
                if (
                  ((i.matches = []),
                  i.resetMark(),
                  i.resetHighlight(),
                  i.resetMatchIndex(),
                  "" !== n)
                ) {
                  for (r = u.exec(i.text); r; )
                    i.matches.push({
                      startOffset: r.index,
                      endOffset: r.index + r[0].length,
                    }),
                      (r = u.exec(i.text));
                  i.highlightAll();
                  i.mark();
                }
              },
              highlightAll: function () {
                var n = this;
                n.matches.forEach(function (t, i) {
                  var r = t.startOffset,
                    u = t.endOffset;
                  n.highlight(r, u, i + 1);
                });
              },
              highlight: function (t, i, r) {
                for (var f = this, u = t; u < i; u++)
                  n(f.targets)
                    .find(
                      "." +
                        f.options.charClass +
                        "[" +
                        kendo.attr("char-index") +
                        "=" +
                        u +
                        "]"
                    )
                    .addClass(f.options.highlightClass)
                    .attr(kendo.attr("match-index"), r);
              },
              resetHighlight: function () {
                var t = this;
                n(t.targets)
                  .find("." + t.options.highlightClass)
                  .removeClass(t.options.highlightClass);
              },
              resetMatchIndex: function () {
                var t = this;
                n(t.targets)
                  .find(
                    "." +
                      t.options.charClass +
                      "[" +
                      kendo.attr("match-index") +
                      "]"
                  )
                  .removeAttr(kendo.attr("match-index"));
              },
              mark: function () {
                var t = this;
                t.currentIndex || 0 === t.currentIndex
                  ? t.currentIndex > t.matches.length
                    ? (t.currentIndex = t.matches.length)
                    : t.resetMark()
                  : (t.currentIndex = 0);
                n(t.targets)
                  .find(
                    "." +
                      t.options.charClass +
                      "[" +
                      kendo.attr("match-index") +
                      "=" +
                      t.currentIndex +
                      "]"
                  )
                  .wrapInner("<mark>");
              },
              resetMark: function () {
                var t = this;
                n(t.targets).find("mark").contents().unwrap();
              },
              nextMatch: function () {
                var n = this;
                n.currentIndex++;
                n.currentIndex > n.matches.length && (n.currentIndex = 1);
                n.mark();
              },
              previousMatch: function () {
                var n = this;
                n.currentIndex--;
                n.currentIndex < 1 && (n.currentIndex = n.matches.length);
                n.mark();
              },
              getMarkedIndex: function () {
                return this.matches.length ? this.currentIndex : 0;
              },
              getFirstMarked: function () {
                return n(this.targets).find("mark").eq(0);
              },
              destroy: function () {
                var t = this;
                t.resetMark();
                n(t.targets)
                  .children("span:not(." + t.options.charClass + ")")
                  .each(function (t, i) {
                    n(i).text(n(i).text());
                  });
              },
            });
          t(kendo.pdfviewer, { SearchDOM: u });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "pdfviewer/dialogs.min",
      [
        "kendo.dialog.min",
        "kendo.window.min",
        "kendo.binder.min",
        "kendo.numerictextbox.min",
        "kendo.dropdownlist.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n) {
          var t = window.kendo,
            i = n.extend,
            r = t.Class,
            u = { svg: ".svg", png: ".png" },
            f = t.keys,
            e = r.extend({
              init: function (t) {
                this.options = i(t, {
                  actions: [{ text: t.messages.dialogs.okText }],
                });
                this._dialog = n("<div />")
                  .kendoDialog(this.options)
                  .getKendoDialog();
              },
              open: function () {
                this._dialog.center().open();
              },
            }),
            o = r.extend({
              init: function (n) {
                return (
                  (this.options = i(n, this.options, {
                    fileFormats: [
                      {
                        description: n.messages.dialogs.exportAsDialog.png,
                        extension: u.png,
                      },
                      {
                        description: n.messages.dialogs.exportAsDialog.svg,
                        extension: u.svg,
                      },
                    ],
                    title: n.messages.dialogs.exportAsDialog.title,
                    open: function () {
                      this.center();
                    },
                  })),
                  this._initializeDialog(),
                  this
                );
              },
              options: {
                extension: u.png,
                autoFocus: !0,
                resizable: !1,
                modal: { preventScroll: !0 },
                width: "90%",
                maxWidth: 520,
                template:
                  "<div class='k-edit-label'><label>#: messages.exportAsDialog.labels.fileName #:</label></div><div class='k-edit-field'><input class='k-textbox' data-bind='value: name' /></div><div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.saveAsType #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='description' data-value-field='extension' data-bind='value: extension, source: fileFormats' /></div></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.page #:</label></div><div class='k-edit-field'><input data-role='numerictextbox' data-format='n0' data-min='1' data-max='#: total #' data-bind='value: page' /></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.save #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>",
              },
              _updateModel: function (n) {
                n.pagesCount && this.viewModel.set("pagesCount", n.pagesCount);
                n.page && this.viewModel.set("page", n.page);
              },
              _initializeDialog: function () {
                var r = this,
                  i = r.options,
                  f = i.messages.dialogs,
                  u = n(
                    "<div class='k-pdf-viewer-window k-action-window k-popup-edit-form' />"
                  )
                    .append(
                      t.template(i.template)({
                        total: i.pagesCount,
                        messages: f,
                      })
                    )
                    .kendoWindow(i)
                    .getKendoWindow();
                return (
                  (r.viewModel = t.observable({
                    title: f.exportAsDialog.title,
                    name: f.exportAsDialog.defaultFileName,
                    extension: i.extension,
                    fileFormats: i.fileFormats,
                    pagesCount: i.pagesCount,
                    page: 1,
                    apply: r.apply.bind(this),
                    close: function () {
                      u.close();
                    },
                  })),
                  (r._dialog = u),
                  t.bind(u.element, r.viewModel),
                  u
                );
              },
              open: function () {
                this._dialog.center().open();
              },
              apply: function () {
                this._dialog.close();
                this.options.apply({
                  fileName: this.viewModel.name + this.viewModel.extension,
                  extension: this.viewModel.extension,
                  page: this.viewModel.page,
                });
              },
            }),
            s = r.extend({
              init: function (n) {
                var t = this;
                t.options = i({}, n, t.options);
              },
              options: {
                resizable: !1,
                template:
                  "<div class='k-search-container'><button class='k-button k-button-icon k-flat k-search-dialog-draghandle'><span class='k-icon k-i-handler-drag'></span></button><span class='k-textbox'><input class='k-search-dialog-input' data-bind='value: boundValue, events: { keyup: onKeyup, input: onInput }' aria-label='#: messages.inputLabel #' title='#: messages.inputLabel #' /><button class='k-button k-button-icon k-flat k-match-case-button' data-bind='css: {k-state-selected: matchCase}, click: matchCaseClick' aria-label='#: messages.matchCase #' title='#: messages.matchCase #'><span class='k-icon k-i-convert-lowercase'></span></button></span><span class='k-search-matches'><span data-bind='text: matchIndex'></span> #: messages.of # <span data-bind='text: matches'></span></span><button class='k-button k-button-icon k-flat' data-bind='click: prev' aria-label='#: messages.previous #' title='#: messages.previous #'><span class='k-icon k-i-arrow-up'></span></button><button class='k-button k-button-icon k-flat' data-bind='click: next' aria-label='#: messages.next #' title='#: messages.next #'><span class='k-icon k-i-arrow-down'></span></button><button class='k-button k-button-icon k-flat' data-bind='click: close' aria-label='#: messages.close #' title='#: messages.close #'><span class='k-icon k-i-close'></<span></button></div>",
              },
              open: function () {
                var n = this;
                n.dialog || n._initializeDialog();
                n.dialog.open();
              },
              _initializeDialog: function () {
                var r = this,
                  e = t.template(r.options.template),
                  o = n(
                    "<div class='k-pdf-viewer-search-dialog'></div>"
                  ).append(e({ messages: r.options.messages })),
                  u = {
                    top: r.options.position.top + 16,
                    left: r.options.position.left + 16,
                  };
                r.dialog = new t.ui.Window(
                  o,
                  i({}, r.options, {
                    autoFocus: !1,
                    title: !1,
                    position: { top: u.top, left: u.left },
                    minHeight: 30,
                    draggable: { dragHandle: ".k-search-dialog-draghandle" },
                    activate: function (n) {
                      n.sender.element.find(".k-search-dialog-input").focus();
                    },
                  })
                );
                r.searchModel = t.observable({
                  boundValue: "",
                  searchText: "",
                  matchCase: !1,
                  matchIndex: 0,
                  matches: 0,
                  matchCaseClick: function () {
                    this.set("matchCase", !this.matchCase);
                  },
                  next: r.options.next,
                  prev: r.options.prev,
                  close: function () {
                    this.set("boundValue", "");
                    r.dialog.close();
                  },
                  onKeyup: function (n) {
                    var t = n.keyCode,
                      i = n.shiftKey ? this.prev : this.next;
                    t === f.ENTER && (i(), n.preventDefault());
                  },
                  onInput: function (n) {
                    this.set("searchText", n.target.value);
                  },
                });
                t.bind(r.dialog.element, r.searchModel);
              },
            });
          i(t.pdfviewer, {
            dialogs: { ErrorDialog: e, ExportAsDialog: o, SearchDialog: s },
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("pdfviewer/commands.min", ["kendo.upload.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var u = window.kendo,
            r = n.proxy,
            f = n.extend,
            o = n.parseJSON,
            e = u.ui.progress,
            s = u.Class,
            h = "open",
            c = "zoomStart",
            l = "zoomEnd",
            i = s.extend({
              init: function (n) {
                this.options = n;
                this.viewer = n.viewer;
                this.errorMessages = this.viewer.options.messages.errorMessages;
              },
            }),
            a = i.extend({
              init: function (n) {
                i.fn.init.call(this, n);
                this.upload = this.viewer.processor.upload;
              },
              exec: function () {
                (this.viewer._upload || this._initUpload()).element.click();
              },
              _initUpload: function () {
                var t,
                  i = {
                    select: r(this._onSelect, this),
                    success: r(this._onSuccess, this),
                    error: r(this._onError, this),
                    complete: r(this._onComplete, this),
                    showFileList: !1,
                    multiple: !1,
                    validation: { allowedExtensions: [".pdf"] },
                  };
                return (
                  this.upload &&
                    f(i, {
                      async: {
                        saveUrl: this.upload.url,
                        autoUpload: !0,
                        saveField: this.upload.saveField,
                      },
                    }),
                  (t = n('<input name="files" accept=".pdf" type="file" />')
                    .kendoUpload(i)
                    .getKendoUpload()),
                  (this.viewer._upload = t),
                  t
                );
              },
              _onComplete: function () {
                e(this.viewer.pageContainer, !1);
              },
              _onSuccess: function (t) {
                var i = o(t.response);
                n.isPlainObject(i)
                  ? this.viewer.processor.fromJSON(i)
                  : this.viewer._triggerError({
                      error: i,
                      message: this.errorMessages.parseError,
                    });
              },
              _onError: function (n) {
                this.viewer._triggerError({
                  error: n.XMLHttpRequest.responseText,
                  message: this.errorMessages.notSupported,
                });
              },
              _onSelect: function (n) {
                var u,
                  i = this,
                  r = n.files[0];
                if (
                  (e(i.viewer.pageContainer, !0),
                  !i.viewer.trigger(h, { file: r }) && !i.upload)
                ) {
                  if (".pdf" !== r.extension.toLowerCase())
                    return (
                      i.viewer._triggerError({
                        error: r,
                        message: i.errorMessages.notSupported,
                      }),
                      t
                    );
                  u = new FileReader();
                  u.onload = function (n) {
                    var t = n.target.result;
                    i.viewer.fromFile(t);
                  };
                  u.onerror = function () {
                    i.viewer._triggerError({
                      error: r,
                      message: i.errorMessages.parseError,
                    });
                  };
                  u.readAsArrayBuffer(r.rawFile);
                }
              },
            }),
            v = i.extend({
              exec: function () {
                var n = this.options.value;
                this.viewer.activatePage(n);
              },
            }),
            y = i.extend({
              exec: function () {
                if (!this.viewer.document)
                  return (
                    this.viewer._triggerError({
                      message: this.errorMessages.notFound,
                    }),
                    t
                  );
                var n =
                  (this.viewer.document.info &&
                    this.viewer.document.info.title) ||
                  this.viewer.options.messages.defaultFileName;
                this.viewer.processor.downloadFile(n);
              },
            }),
            p = i.extend({
              init: function (t) {
                t = n.extend(t, this.options);
                i.fn.init.call(this, t);
              },
              exec: function () {
                var n = this.viewer._saveDialog || this._initDialog();
                n._updateModel({
                  pagesCount:
                    (this.viewer.document && this.viewer.document.total) || 1,
                  page: this.viewer.options.page,
                });
                n.open();
              },
              apply: function (n) {
                var t = n.extension;
                ".png" === t
                  ? this.viewer.exportImage(n)
                  : ".svg" === t && this.viewer.exportSVG(n);
              },
              _initDialog: function () {
                return (this.viewer._saveDialog =
                  new u.pdfviewer.dialogs.ExportAsDialog({
                    apply: this.apply.bind(this),
                    pagesCount:
                      (this.viewer.document && this.viewer.document.total) || 1,
                    messages: this.viewer.options.messages,
                  }));
              },
            }),
            w = i.extend({
              exec: function () {
                var n = this,
                  t = n.viewer;
                t._toggleSelection(!0);
              },
            }),
            b = i.extend({
              exec: function () {
                var n = this,
                  t = n.viewer;
                t._toggleSelection(!1);
              },
            }),
            k = i.extend({
              init: function (n) {
                var t = this;
                t.viewer = n.viewer;
                t.viewer.searchDialog ||
                  (t.viewer.searchDialog = new u.pdfviewer.dialogs.SearchDialog(
                    {
                      position: {
                        top: t.viewer.pageContainer.offset().top,
                        left: t.viewer.pageContainer.offset().left,
                      },
                      messages: t.viewer.options.messages.dialogs.search,
                      open: r(t._open, t),
                      next: r(t._next, t),
                      prev: r(t._prev, t),
                      close: r(t._close, t),
                    }
                  ));
                i.fn.init.call(t, n);
              },
              exec: function () {
                var n = this;
                n.viewer.searchDialog.open();
              },
              _open: function () {
                var n = this;
                n.changeHandler = r(n._change, n);
                n.zoomStartHandler = r(n._closeDialog, n);
                n.openFileHandler = r(n._closeDialog, n);
                n.viewer._searchDOM ||
                  (n.viewer._initSearchDOM(),
                  n.viewer.searchDialog.searchModel.bind(
                    "change",
                    n.changeHandler
                  ),
                  n.viewer.bind("zoomStart", n.zoomStartHandler),
                  n.viewer.bind("open", n.openFileHandler));
              },
              _close: function () {
                var n = this,
                  t = n.viewer._searchDOM;
                n.viewer.searchDialog.searchModel.unbind(
                  "change",
                  n.changeHandler
                );
                n.viewer.unbind("zoomStart", n.zoomStartHandler);
                n.viewer.unbind("open", n.openFileHandler);
                t.destroy();
                delete n.viewer._searchDOM;
                n._updateSearchModel();
              },
              _change: function (n) {
                var t = this,
                  i = t.viewer._searchDOM,
                  u = n.field,
                  r = t.viewer.searchDialog.searchModel,
                  f = r[u];
                if (i)
                  switch (u) {
                    case "searchText":
                      i.search(f, r.matchCase);
                      t._updateSearchModel();
                      break;
                    case "matchCase":
                      i.search(r.searchText, f);
                      t._updateSearchModel();
                  }
              },
              _next: function () {
                var t = this,
                  n = t.viewer._searchDOM;
                n.matches &&
                  n.matches.length &&
                  (n.nextMatch(), t._updateSearchModel());
              },
              _prev: function () {
                var t = this,
                  n = t.viewer._searchDOM;
                n.matches &&
                  n.matches.length &&
                  (n.previousMatch(), t._updateSearchModel());
              },
              _updateSearchModel: function () {
                var t = this,
                  i = t.viewer._searchDOM,
                  n = t.viewer.searchDialog.searchModel;
                i
                  ? (n.set("matches", i.matches.length),
                    n.set("matchIndex", i.getMarkedIndex()),
                    t._scrollToMark())
                  : (n.set("searchText", ""),
                    n.set("matches", 0),
                    n.set("matchIndex", 0),
                    n.set("matchCase", !1));
              },
              _scrollToMark: function () {
                var t,
                  i = this,
                  u = i.viewer._searchDOM,
                  r = u.getFirstMarked(),
                  n = i.viewer._scroller;
                r.length &&
                  ((t = r.offset().top - n.scrollElement.offset().top - 100),
                  n.scrollTo(n.scrollLeft, t * -1));
              },
              _closeDialog: function () {
                var n = this;
                n.viewer.searchDialog.dialog.close();
              },
            }),
            d = i.extend({
              exec: function () {
                var r,
                  i = this,
                  o = i.options,
                  n = i.viewer,
                  t = o.scale,
                  f = 0,
                  s = i.viewer._pageNum,
                  h = n.pageContainer[0].clientHeight,
                  u = 1,
                  e = [];
                "dpl" !== n.processingLib &&
                  ((t = i._calculateZoom()),
                  (r = function () {
                    var t = i.viewer._scroller,
                      r = n._scrollingStarted;
                    t.scrollTop > t.scrollHeight() && t._resize();
                    r || (n.activatePage(s), (n._scrollingStarted = !1));
                  }),
                  t &&
                    ((n.zoomScale = t),
                    (n._scrollingStarted = !1),
                    n.pages.forEach(function (i) {
                      var r;
                      n._visiblePages.indexOf(i) !== -1 && i.loaded
                        ? (e.push(i.render(t)),
                          (r = i._page.getViewport({ scale: t }).height))
                        : (i.resize(t), (r = i.element.height()));
                      f += r;
                      f <= h && u++;
                    }),
                    n._visiblePagesCount != u &&
                      ((n._visiblePagesCount = u), n._loadVisiblePages()),
                    Promise.all(e)
                      .then(function () {
                        r();
                        i._triggerZoomEnd(t);
                      })
                      ["catch"](function () {
                        r();
                        i._triggerZoomEnd(t);
                      })));
              },
              _calculateZoom: function () {
                var f,
                  r = this.options,
                  n = this.viewer,
                  u = n.options,
                  e = n.pageContainer,
                  o = n._visiblePages && n._visiblePages[0].canvas,
                  t = r.scale,
                  i = t;
                if (
                  ((n._allowResize = !1),
                  (n._autoFit = !1),
                  r.zoomIn
                    ? (i = t = n.zoomScale + u.zoomRate)
                    : r.zoomOut
                    ? (i = t = n.zoomScale - u.zoomRate)
                    : "auto" === t
                    ? ((n._allowResize = !0), (i = n._autoZoomScale))
                    : "actual" === t
                    ? (i = 1)
                    : "fitToWidth" === t
                    ? ((n._allowResize = !0),
                      (n._autoFit = "fitToWidth"),
                      (i = e.width() / (o.width / n.zoomScale)))
                    : "fitToPage" === t &&
                      ((n._allowResize = !0),
                      (n._autoFit = "fitToPage"),
                      (i = e.height() / (o.height / n.zoomScale))),
                  (f = t < u.zoomMin || t > u.zoomMax),
                  !f && !n.trigger(c, { scale: t }))
                )
                  return (
                    r.updateComboBox && n.toolbar._updateZoomComboBox(t), i
                  );
              },
              _triggerZoomEnd: function (n) {
                var t = this,
                  i = t.viewer;
                i.trigger(l, { scale: n });
              },
            }),
            g = i.extend({
              init: function (n) {
                i.fn.init.call(this, n);
              },
              exec: function () {
                var n = this;
                return n.viewer.document
                  ? (n._renderPrintContainer(), n._loadAllPages(), t)
                  : (n.viewer._triggerError({
                      message: this.errorMessages.notFound,
                    }),
                    t);
              },
              _renderPrintContainer: function () {
                this.printContainer = n("<div></div>");
              },
              _loadAllPages: function () {
                for (
                  var u,
                    i,
                    n = this,
                    r = n.viewer.pages,
                    o = n.viewer.zoom(),
                    f = 20,
                    e = !0,
                    t = 0;
                  t < r.length;
                  t++
                )
                  r[t].loaded || ((e = !1), r[t].load(4 / 3, !0), (f += 20));
                i = function () {
                  clearTimeout(u);
                  u = setTimeout(function () {
                    n.viewer.unbind("render", i);
                    n._renderPrintPages();
                    setTimeout(function () {
                      n._printDocument();
                      n.viewer.zoom(o);
                    }, 0);
                  }, f);
                };
                e ? i() : n.viewer.bind("render", i);
              },
              _renderPrintPages: function () {
                for (var t = this.viewer.pages, n = 0; n < t.length; n++)
                  this._renderPrintImage(t[n]);
              },
              _renderPrintImage: function (t) {
                var r = t.canvas,
                  i = n("<div></div>"),
                  u =
                    "<img src='" +
                    r.toDataURL() +
                    "' width='" +
                    t.width +
                    "px' height='" +
                    t.height +
                    "px' />";
                i.append(u);
                this.printContainer.append(i);
              },
              _printDocument: function () {
                var t = this,
                  i = t.viewer.pages,
                  r = i[0].width,
                  u = i[0].height,
                  n = window.open(
                    "",
                    "",
                    "innerWidth=" +
                      r +
                      ",innerHeight=" +
                      u +
                      "location=no,titlebar=no,toolbar=no"
                  );
                n.document.write(t.printContainer.html());
                n.document.close();
                n.focus();
                n.print();
                n.close();
              },
            });
          f(u.pdfviewer, {
            OpenCommand: a,
            PageChangeCommand: v,
            DownloadCommand: y,
            EnableSelectionCommand: w,
            EnablePanCommand: b,
            ExportCommand: p,
            PrintCommand: g,
            OpenSearchCommand: k,
            ZoomCommand: d,
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.pdfviewer.min",
      [
        "kendo.mobile.scroller.min",
        "pdfviewer/processors/pdfjs-processor.min",
        "pdfviewer/processors/dpl-processor.min",
        "pdfviewer/toolbar.min",
        "pdfviewer/page.min",
        "pdfviewer/search.min",
        "pdfviewer/dialogs.min",
        "pdfviewer/commands.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          var a,
            f = ".kendoPDFViewer",
            i = window.kendo,
            w = i.ui,
            v = n.proxy,
            o = n.extend,
            y = i.drawing,
            e = n.extend(
              { PLUS: 187, MINUS: 189, ZERO: 48, NUMPAD_ZERO: 96 },
              i.keys
            ),
            s = w.Widget,
            r = i.ui.progress,
            d = "scroll",
            b = "error",
            g = "focus" + f,
            nt = "keydown" + f,
            tt = "DOMMouseScroll" + f + " mousewheel" + f,
            h = "update",
            c = 1.25,
            k = "pagechange",
            p = "ZoomCommand",
            it = "#ffffff",
            rt = "tabindex",
            l = { pdfjs: "pdfjs", dpl: "dpl" },
            u = {
              viewer: "k-pdf-viewer k-widget",
              scroller: "k-canvas k-list-scroller",
              enableTextSelection: "k-enable-text-select",
              enablePanning: "k-enable-panning",
              highlightClass: "k-search-highlight",
              charClass: "k-text-char",
            },
            ut = s.extend({
              init: function (n, t) {
                var r = this;
                s.fn.init.call(r, n, i.deepExtend({}, this.options, t));
                r._wrapper();
                r.options.toolbar && r._renderToolbar();
                r._initProcessor(t || {});
                r._renderPageContainer();
                r._loadDocument();
                r._tabindex();
                i.notify(r, i.ui);
              },
              events: ["render", "open", b, "zoomStart", "zoomEnd"],
              options: {
                name: "PDFViewer",
                view: { type: "canvas" },
                pdfjsProcessing: { file: null },
                dplProcessing: {
                  read: {
                    url: null,
                    type: "GET",
                    dataType: "json",
                    pageField: "pageNumber",
                  },
                  upload: { url: null, saveField: "file" },
                  download: { url: null },
                  loadOnDemand: !1,
                },
                toolbar: { items: [] },
                width: 1e3,
                height: 1200,
                page: 1,
                defaultPageSize: { width: 794, height: 1123 },
                scale: null,
                zoomMin: 0.5,
                zoomMax: 4,
                zoomRate: 0.25,
                messages: {
                  defaultFileName: "Document",
                  toolbar: {
                    zoom: {
                      zoomOut: "Zoom Out",
                      zoomIn: "Zoom In",
                      actualWidth: "Actual Width",
                      autoWidth: "Automatic Width",
                      fitToWidth: "Fit to Width",
                      fitToPage: "Fit to Page",
                    },
                    open: "Open",
                    exportAs: "Export",
                    download: "Download",
                    pager: {
                      first: "Go to the first page",
                      previous: "Go to the previous page",
                      next: "Go to the next page",
                      last: "Go to the last page",
                      of: " of {0} ",
                      page: "page",
                      pages: "pages",
                    },
                    print: "Print",
                    toggleSelection: "Enable Selection",
                    togglePan: "Enable Panning",
                    search: "Search",
                  },
                  errorMessages: {
                    notSupported: "Only pdf files allowed.",
                    parseError: "PDF file fails to process.",
                    notFound: "File is not found.",
                  },
                  dialogs: {
                    exportAsDialog: {
                      title: "Export...",
                      defaultFileName: "Document",
                      pdf: "Portable Document Format (.pdf)",
                      png: "Portable Network Graphics (.png)",
                      svg: "Scalable Vector Graphics (.svg)",
                      labels: {
                        fileName: "File name",
                        saveAsType: "Save as",
                        page: "Page",
                      },
                    },
                    okText: "OK",
                    save: "Save",
                    cancel: "Cancel",
                    search: {
                      inputLabel: "Search Text",
                      matchCase: "Match Case",
                      next: "Next Match",
                      previous: "Previous Match",
                      close: "Close",
                      of: "of",
                    },
                  },
                },
              },
              _wrapper: function () {
                var n = this,
                  t = n.options;
                n.wrapper = n.element;
                n.wrapper
                  .width(t.width)
                  .height(t.height)
                  .addClass(u.viewer)
                  .on(g, v(n._focus, n))
                  .on(nt, v(n._keydown, n));
                n._allowResize = null === n.options.scale;
                n._autoZoomScale = c;
                n.zoomScale = n.options.scale || n._autoZoomScale;
                n._resizeHandler = i.onResize(function () {
                  n.resize();
                });
                n._pageNum = n.options.page;
              },
              _focus: function (n) {
                this.toolbar
                  ? this.toolbar.wrapper.focus()
                  : this.pageContainer.focus();
                n.preventDefault();
              },
              _keydown: function (n) {
                var r = [e.PLUS, e.NUMPAD_PLUS],
                  u = [e.MINUS, e.NUMPAD_MINUS],
                  f = [e.ZERO, e.NUMPAD_ZERO],
                  t = !1,
                  i = { command: p, options: { updateComboBox: !0 } };
                n.ctrlKey &&
                  !this._blankPage &&
                  this.processingLib !== l.dpl &&
                  (r.includes(n.keyCode)
                    ? ((i.options.zoomIn = !0), (t = !0))
                    : u.includes(n.keyCode)
                    ? ((i.options.zoomOut = !0), (t = !0))
                    : f.includes(n.keyCode) &&
                      ((i.options.scale = c), (t = !0)),
                  t && (this.execute(i), n.preventDefault()));
              },
              _initProcessor: function (n) {
                var r,
                  t = this;
                r = n.dplProcessing
                  ? t.options.dplProcessing
                  : t.options.pdfjsProcessing;
                t.processingLib = n.dplProcessing ? l.dpl : l.pdfjs;
                t.processor = new i.pdfviewer[t.processingLib].processor(r, t);
                a = i.pdfviewer[t.processingLib].Page;
              },
              _renderToolbar: function () {
                var t = this,
                  r = t.options,
                  f = {
                    pager: { messages: r.messages.toolbar.pager },
                    scale: r.scale,
                    resizable: !0,
                    items: r.toolbar.items,
                    width: r.width,
                    action: t.execute.bind(t),
                    messages: r.messages.toolbar,
                    viewer: this,
                  },
                  u = n("<div />");
                u.appendTo(t.element);
                t.toolbar = new i.pdfviewer.Toolbar(u, f);
              },
              _initErrorDialog: function (n) {
                var r,
                  t = this;
                return (
                  t._errorDialog ||
                    ((n = o(n, { messages: t.options.messages })),
                    (r = new i.pdfviewer.dialogs.ErrorDialog(n)),
                    (t._errorDialog = r._dialog)),
                  t._errorDialog
                );
              },
              _renderPageContainer: function () {
                var t = this;
                t.pageContainer ||
                  ((t.pageContainer = n("<div />")),
                  t.pageContainer.addClass(u.scroller),
                  t.pageContainer.attr(rt, 0),
                  t.wrapper.append(t.pageContainer));
              },
              _triggerError: function (n) {
                var t = this._initErrorDialog();
                o(n, { dialog: t });
                this.pageContainer && r(this.pageContainer, !1);
                this.trigger(b, n) || t.open().content(n.message);
              },
              _renderPages: function () {
                var r,
                  i,
                  e,
                  u,
                  n = this,
                  f = n.document;
                if (((n.pages = []), !f || !f.total))
                  return n._renderBlankPage(), t;
                for (r = f.pages, i = 1; i <= f.total; i++)
                  (u = { processor: n.processor, number: i }),
                    r && r.length && (u = o(u, r[i - 1])),
                    (e = new a(u, n)),
                    n.pages.push(e),
                    n.pageContainer.append(e.element);
                n._attachContainerEvents();
                n._getVisiblePagesCount();
              },
              _renderBlankPage: function () {
                this._blankPage = new a(this.options.defaultPageSize, this);
                this.pageContainer.append(this._blankPage.element);
                this.trigger(h, { isBlank: !0 });
              },
              _resize: function () {
                var r,
                  i,
                  n = this;
                if (n._allowResize) {
                  if (!n.pages || !n.pages.length)
                    return (
                      n._blankPage &&
                        ((i = r / n._blankPage.element.width()),
                        n._blankPage.resize(i)),
                      t
                    );
                  n.toolbar && n.toolbar.resize(!0);
                  n._resizeHandler && clearTimeout(n._resizeHandler);
                  n._resizeHandler = setTimeout(n._resizePages.bind(n), 100);
                }
              },
              _resizePages: function () {
                var n = this,
                  r = n.pageContainer[0].clientWidth,
                  i = 0;
                return (
                  n.pages.forEach(function (n) {
                    var t = r / n.element.width();
                    t > i && (i = t);
                  }),
                  n._autoFit
                    ? (n.zoom(n._autoFit, !0), t)
                    : ((i = Math.min(Math.max(i, n.options.zoomMin), c)),
                      i != n.zoomScale &&
                        (n.zoom(i, !0),
                        (n.zoomScale = i),
                        (n._allowResize = !0)),
                      t)
                );
              },
              _attachContainerEvents: function () {
                var n = this;
                n._wheel = i.throttle(n._wheel.bind(n), 300);
                n.processingLib !== l.dpl &&
                  n.pageContainer.on(tt, function (t) {
                    t.ctrlKey &&
                      (document.activeElement !== n.pageContainer[0] &&
                        n.pageContainer.focus(),
                      n._wheel(t),
                      t.preventDefault());
                  });
                n._scroller = new i.mobile.ui.Scroller(n.pageContainer, {
                  zoom: !1,
                  elastic: !0,
                });
                n._scroller.scrollElement.addClass(u.enablePanning);
                n._scroller.bind(d, v(n._scroll, this));
              },
              _scroll: function (n) {
                var v,
                  c,
                  l,
                  y,
                  u,
                  p,
                  w,
                  i = this,
                  g = i.pageContainer[0].scrollHeight,
                  b = i.pageContainer.height(),
                  f = n.scrollTop,
                  d = i.pageContainer.offset().top,
                  e = i.pages.length,
                  a = i._pageNum,
                  o = a - 1,
                  r = a,
                  s = f - i._prevScrollTop > 0 ? 1 : -1;
                if (i._preventScroll || !e) return (i._preventScroll = !1), t;
                if (
                  ((i._scrollingStarted = !0),
                  (c = i.pages[o]),
                  (l = c.element.offset().top - d),
                  (y = c.element.height()),
                  s == -1 &&
                    i.pages[o + s] &&
                    ((u = i.pages[o - i._visiblePagesCount] || i.pages[o + s]),
                    (p = u.element.offset().top - d),
                    (w = u.element.height())),
                  Math.abs(f - (i._prevScrollTop || 0)) > b * i.zoomScale
                    ? (r = Math.floor(f * (1 / (g / e))) + 1)
                    : l < 0 && Math.abs(l) >= y / 2 && 1 === s
                    ? r++
                    : u && Math.abs(p) <= w / 2 && r--,
                  a !== r && r >= 1 && r <= e)
                ) {
                  if (((v = i.pages[r - 1].element), v.offset().top > b))
                    return;
                  i._pageNum = r;
                  i._loadVisiblePages();
                  i.trigger(h, { action: k, page: r, total: e });
                }
                i._prevScrollTop = f;
              },
              _wheel: function (n) {
                var t = n.originalEvent,
                  r = t.wheelDelta ? -t.wheelDelta : t.detail,
                  i = r < 0;
                this.execute({
                  command: p,
                  options: { zoomIn: i, zoomOut: !i, updateComboBox: !0 },
                });
                n.preventDefault();
              },
              zoom: function (n, t) {
                var i = this;
                return n
                  ? i.execute({
                      command: p,
                      options: { scale: n, updateComboBox: !t },
                    })
                  : i.zoomScale;
              },
              execute: function (n) {
                var t = o({ viewer: this }, n.options),
                  r = new i.pdfviewer[n.command](t);
                return r.exec();
              },
              _loadDocument: function () {
                var n = this,
                  t = n.options.page;
                r(n.pageContainer, !0);
                n.processor.fetchDocument().done(function (i) {
                  n._clearPages();
                  n.document = i;
                  n._renderPages();
                  n.resize(!0);
                  i &&
                    ((t = t >= 1 && t <= i.total ? t : 1), n.activatePage(t));
                  r(n.pageContainer, !1);
                });
              },
              loadPage: function (n) {
                var t = this.pages && this.pages[n - 1];
                if (t) return t.load(this.zoomScale);
              },
              activatePage: function (n) {
                var i,
                  r,
                  u,
                  f,
                  t = this.pages && this.pages[n - 1],
                  e = this._scroller;
                t &&
                  ((i = e.scrollTop),
                  (r = e.element.offset().top),
                  (u = t.element.offset().top),
                  (f = this._autoFit
                    ? 0
                    : parseInt(t.element.css("marginTop"), 10)),
                  (this._pageNum = n),
                  this._loadVisiblePages(),
                  (this._preventScroll = !0),
                  this._scroller.scrollTo(0, -i - u + r + f),
                  this.trigger(h, {
                    action: k,
                    page: n,
                    total: this.pages.length,
                  }));
              },
              _getVisiblePagesCount: function () {
                for (
                  var n = this,
                    i = 0,
                    r = 0,
                    u = n.pageContainer[0].clientHeight,
                    t = 0;
                  i <= u && t < n.pages.length;

                )
                  (i += n.pages[t].element.height()), r++, t++;
                n._visiblePagesCount = r;
              },
              _loadVisiblePages: function () {
                var n,
                  r = this.pages && this.pages.length,
                  t = Math.max(this._pageNum - this._visiblePagesCount, 1),
                  i = Math.min(this._pageNum + this._visiblePagesCount, r);
                for (
                  this._visiblePages = this.pages.slice(t - 1, i), n = t;
                  n <= i;
                  n++
                )
                  this.loadPage(n);
              },
              _loadAllPages: function () {
                for (
                  var i = this.pages && this.pages.length, t = [], n = 0;
                  n <= i;
                  n++
                )
                  t.push(this.loadPage(n));
                return t;
              },
              fromFile: function (n) {
                this.zoomScale = this.options.scale || c;
                this.trigger(h, {
                  action: "zoom",
                  zoom: this.options.scale || "auto",
                });
                this.processor._updateDocument(n);
                this._loadDocument();
              },
              exportImage: function (n) {
                var f,
                  t = this,
                  o = n.page,
                  u = t.pages[o - 1] || t._blankPage,
                  e = new y.Group();
                u.load();
                f = i.drawing.Path.fromRect(
                  new i.geometry.Rect([0, 0], [u.width, u.height]),
                  { fill: { color: it }, stroke: null }
                );
                r(t.pageContainer, !0);
                e.append(f, u.group);
                y.exportImage(e).done(function (u) {
                  r(t.pageContainer, !1);
                  i.saveAs({
                    dataURI: u,
                    fileName: n.fileName,
                    proxyURL: n.proxyURL || "",
                    forceProxy: n.forceProxy,
                    proxyTarget: n.proxyTarget,
                  });
                });
              },
              exportSVG: function (n) {
                var t = this,
                  f = n.page,
                  u = t.pages[f - 1] || t._blankPage;
                r(t.pageContainer, !0);
                u.load();
                y.exportSVG(u.group).done(function (u) {
                  r(t.pageContainer, !1);
                  i.saveAs({
                    dataURI: u,
                    fileName: n.fileName,
                    proxyURL: n.proxyURL || "",
                    forceProxy: n.forceProxy,
                    proxyTarget: n.proxyTarget,
                  });
                });
              },
              setOptions: function (t) {
                var i = this;
                (t.pdfjsProcessing || t.dplProcessing) && i._initProcessor();
                t = n.extend(i.options, t);
                s.fn.setOptions.call(i, t);
                t.page && ((i._pageNum = t.page), i.activatePage(t.page));
                t.width && i.element.width(t.width);
                t.height && i.element.height(t.height);
              },
              destroy: function () {
                this._resizeHandler && i.unbindResize(this._resizeHandler);
                this._errorDialog && this._errorDialog.destroy();
                this._saveDialog && this._saveDialog.destroy();
                this._upload && this._upload.destroy();
                this.toolbar &&
                  (this.toolbar.unbind(),
                  this.toolbar.destroy(),
                  (this.toolbar = null));
                this.pages &&
                  this.pages.length &&
                  (this.pages.forEach(function (n) {
                    n.destroy();
                  }),
                  (this.pages = []));
                this._scroller &&
                  (this._scroller.unbind(), this._scroller.destroy());
                this.pageContainer.off(f);
                s.fn.destroy.call(this);
              },
              _clearPages: function () {
                this.pages = [];
                this.document = null;
                this._pageNum = 1;
                this.pageContainer.off(f);
                this.pageContainer.empty();
                this._scroller &&
                  (this._scroller.reset(),
                  this._scroller.unbind(),
                  this._scroller.destroy());
              },
              _toggleSelection: function (n) {
                var i = this;
                n === t && (n = !0);
                i._scroller.userEvents._shouldNotMove = n;
                i._scroller.scrollElement.toggleClass(u.enableTextSelection, n);
                i._scroller.scrollElement.toggleClass(u.enablePanning, !n);
              },
              _initSearchDOM: function () {
                var n = this;
                return new Promise(function (t) {
                  Promise.all(n._loadAllPages()).then(function () {
                    n._searchDOM = new i.pdfviewer.SearchDOM({
                      target: n._getTextLayers(),
                      highlightClass: u.highlightClass,
                      charClass: u.charClass,
                    });
                    t();
                  });
                });
              },
              _getTextLayers: function () {
                return this.pages.map(function (n) {
                  return n.textLayer;
                });
              },
            });
          w.plugin(ut);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.rating.min", ["kendo.core.min", "kendo.dom.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var r = window.kendo,
            ut = r.ui,
            e = ".kendoRating",
            d = ut.Widget,
            pt = n.extend,
            l = n.proxy,
            a = r.keys,
            o = r.parseFloat,
            ft = "change",
            et = "select",
            p = "selected",
            ot = "hovered",
            w = "disabled",
            b = "readonly",
            wt = "keydown" + e,
            bt = "click" + e,
            kt = "mouseenter" + e,
            dt = "mouseleave" + e,
            gt = "mousemove" + e,
            ni = "mousedown" + e,
            ti = "focus" + e,
            ii = "blur" + e,
            st = "aria-label",
            g = "aria-labelledby",
            ri = "aria-valuemin",
            ui = "aria-valuemax",
            nt = "aria-valuenow",
            ht = "aria-disabled",
            ct = "aria-readonly",
            tt = "k-rating-precision-part",
            lt = "k-rating-precision-complement",
            k = 0.5,
            fi = "_label",
            f = "k-rating-item",
            c = "k-state-focused",
            it = "tabindex",
            i = ".",
            ei = "role",
            at = "min",
            vt = "max",
            rt = { single: "single", continuous: "continuous" },
            v = { item: "item", half: "half" },
            y = {
              item: "itemTemplate",
              hovered: "hoveredTemplate",
              selected: "selectedTemplate",
            },
            s = {
              selected: "k-state-selected",
              hovered: "k-state-hover",
              hoveredPrecise: "k-state-hover-precise",
            },
            h = {
              partValue: "part-value",
              dataValue: "data-value",
              value: "value",
              title: "title",
            },
            u = {
              widget: "k-rating k-widget",
              container: "k-rating-container",
              item: "k-rating-item",
              icon: "k-icon k-i-star-outline",
              iconSelected: "k-icon k-i-star",
              label: "k-rating-label",
              disabled: "k-state-disabled",
              readonly: "k-state-readonly",
              active: "k-state-active",
              hidden: "k-hidden",
            },
            oi = r.template('<span class="#=styles.widget#"></span>'),
            si = r.template('<span class="#=styles.container#"></span>'),
            hi = r.template('<span class="#=styles.label#"></span>'),
            ci = r.template("<span>#=value# / #=maxValue#</span>"),
            li = r.template(
              '<span class="#=styles.item#" data-value="#=value#"></span>'
            ),
            yt = r.template('<span class="#=icon#"></span>'),
            ai = d.extend({
              init: function (n, t) {
                var i = this;
                d.fn.init.call(i, n, t);
                i.options = pt({}, i.options, t);
                i._element();
                i._wrapper();
                i._aria();
                i._initSettings();
                i._renderItems();
                i._renderTooltip();
                i._renderLabel();
                i._selectInitial();
                i._attachEvents();
                r.notify(this);
              },
              events: [et, ft],
              options: {
                name: "Rating",
                messages: {},
                min: 1,
                max: 5,
                selection: rt.continuous,
                precision: v.item,
                tooltip: !0,
                label: !0,
                readonly: !1,
                enabled: !0,
                selectValueOnFocus: null,
                itemTemplate: null,
                selectedTemplate: null,
                hoveredTemplate: null,
              },
              _element: function () {
                var n = this;
                n.element.attr("type", "number");
                n.element.addClass(u.hidden);
              },
              _wrapper: function () {
                var t = this;
                t.wrapper = n(oi({ styles: u }));
                t.wrapper = t.element.wrap(t.wrapper).parent();
                t.wrapper
                  .addClass(t.element[0].className.replace(u.hidden, ""))
                  .append(n(si({ styles: u })));
                t.wrapper[0].style.cssText = t.element[0].style.cssText;
                t.container = t.wrapper.find(i + u.container);
              },
              _aria: function () {
                var i,
                  t = this,
                  u = t.wrapper,
                  f = t.element,
                  s = f.attr("id"),
                  e = n('label[for="' + s + '"]'),
                  h = f.attr(st),
                  c = f.attr(g);
                t.wrapper
                  .attr(it, 0)
                  .attr(ei, "slider")
                  .attr(ri, o(t.element.attr(at)) || t.options.min)
                  .attr(ui, o(t.element.attr(vt)) || t.options.max)
                  .attr(nt, t.options.value);
                h
                  ? u.attr(st, h)
                  : c
                  ? u.attr(g, c)
                  : e.length &&
                    ((i = e.attr("id")),
                    i || ((i = (s || r.guid()) + fi), e.attr("id", i)),
                    u.attr(g, i));
              },
              _initSettings: function () {
                var n = this,
                  i = n.options.precision != v.item,
                  t = n.options;
                t.value = o(t.value);
                null === t.value && (t.value = o(n.element.val()));
                t.min = o(n.element.attr(at)) || n.options.min;
                t.max = o(n.element.attr(vt)) || n.options.max;
                n._valueMin = i ? n.options.min - k : n.options.min;
                t.enabled = t.enabled && !n.element.attr(w);
                t.readonly = t.readonly || !!n.element.attr(b);
                n._setState();
              },
              _renderItems: function () {
                for (
                  var f,
                    i = this,
                    e = i.container,
                    o = i.options.min,
                    s = i.options.max,
                    h = i.options.itemTemplate
                      ? r.template(i.options.itemTemplate)
                      : yt,
                    t = o;
                  t <= s;
                  t += 1
                )
                  (f = n(li({ styles: u, value: t }))),
                    f.append(h({ icon: u.icon, index: t })),
                    e.append(f);
              },
              _renderTooltip: function () {
                var r,
                  e = this,
                  u = e.container.find(i + f),
                  o = e.options.tooltip === !0;
                if (!o) return u.removeAttr(h.title), t;
                for (r = 0; r < u.length; r += 1)
                  n(u[r]).attr(h.title, n(u[r]).data(h.value));
              },
              _renderLabel: function () {
                var f = this,
                  e = f.wrapper.find(i + u.label),
                  o = f.options.label === !0 || f.options.label.template !== t,
                  s =
                    f.options.label && f.options.label.template
                      ? r.template(f.options.label.template)
                      : ci;
                return o && null !== f.value()
                  ? (e.length ||
                      ((f.label = e = n(hi({ styles: u }))),
                      f.wrapper.append(e)),
                    e.html(
                      s({
                        styles: u,
                        value: f.value(),
                        maxValue: f.options.max,
                      })
                    ),
                    t)
                  : (e.remove(), (f.label = null), t);
              },
              _selectInitial: function () {
                var n = this;
                isNaN(n.options.value) || n.value(n.options.value);
              },
              _attachEvents: function () {
                var n = this,
                  t = n.options.precision == v.half;
                n.wrapper
                  .on(ti, l(n._focus, n))
                  .on(ii, l(n._blur, n))
                  .on(wt, l(n._keydown, n));
                n.container
                  .on(bt, i + f, l(n._click, n))
                  .on(kt, i + f, l(n._mouseenter, n))
                  .on(dt, i + f, l(n._mouseleave, n))
                  .on(ni, l(n._mousedown, n));
                t && n.container.on(gt, i + f, l(n._mousemove, n));
              },
              _focus: function () {
                var u,
                  e,
                  r,
                  n = this,
                  f = n.container,
                  h = n.wrapper,
                  l = n.container.find(i + c),
                  o = n.options.selectValueOnFocus,
                  a = f.children().first();
                return !n.options.enabled ||
                  n.options.readonly ||
                  n.preventFocus
                  ? (n.options.readonly && n.wrapper.addClass(c), t)
                  : (h.addClass(c),
                    l.removeClass(c),
                    null === n.value() && null !== o && n.value(o),
                    (u = f.find(i + s.selected).last()),
                    (e = f.find(i + s.hovered).last()),
                    (r = u.length ? u : e),
                    (r = r.length ? r : a),
                    r.addClass(c),
                    t);
              },
              _blur: function () {
                var n = this;
                n.preventFocus = !1;
                n.wrapper.removeClass(c);
                n.container.find(i + c).removeClass(c);
                n.element.blur();
              },
              _mousedown: function () {
                var n = this;
                n.preventFocus = !0;
              },
              _keydown: function (t) {
                var w,
                  b,
                  e,
                  h,
                  u = this,
                  d = u.container,
                  p = u.parsedValue,
                  tt = u.options.precision != v.item,
                  g = tt ? k : 1,
                  o = d.find(i + f),
                  it = d.find(i + c),
                  nt = o.index(it),
                  l = r.support.isRtl(u.wrapper),
                  y = isNaN(p),
                  s = t.keyCode;
                u.options.enabled &&
                  !u.options.readonly &&
                  ((w = (s === a.RIGHT && l) || (s === a.LEFT && !l)),
                  (b = (s === a.LEFT && l) || (s === a.RIGHT && !l)),
                  w || s === a.DOWN
                    ? ((e = y ? o.eq(0) : n(o[nt - 1])),
                      (h = y ? u._valueMin : p - g),
                      u._select(e, h),
                      t.preventDefault())
                    : b || s === a.UP
                    ? ((e = y ? o.eq(0) : n(o[nt + 1])),
                      (h = y ? u._valueMin : p + g),
                      u._select(e, h),
                      t.preventDefault())
                    : s === a.HOME
                    ? ((e = o.eq(0)),
                      u._select(e, u._valueMin),
                      t.preventDefault())
                    : s === a.END &&
                      ((e = o.eq(o.length - 1)),
                      u._select(e),
                      t.preventDefault()));
              },
              _getTemplateType: function (n) {
                var t = this;
                return t.options[n] ? r.template(t.options[n]) : yt;
              },
              _renderTemplate: function (t, i) {
                var r,
                  e = this,
                  o = e._getTemplateType(i),
                  f = u.icon;
                for (
                  (i != y.selected && i != y.hovered) || (f = u.iconSelected),
                    r = 0;
                  r < t.length;
                  r += 1
                )
                  n(t[r]).html(o({ icon: f, index: n(t[r]).index() }));
              },
              _updateItemTemplates: function (n, t) {
                var r = this,
                  u = rt.single == r.options.selection,
                  c = r.options.precision == v.half,
                  e = r.container.find(i + s.selected),
                  f = u ? t : t.prevAll().addBack(),
                  o = u ? e : t.nextAll(),
                  l = y[n],
                  h = s[n];
                o.removeClass(h);
                f.addClass(h);
                r._renderTemplate(f, l);
                (!u || (u && n == p && f.get(0) != e.get(0))) &&
                  r._renderTemplate(o, y.item);
                c && r._renderTemplate(t, y.item);
              },
              _change: function (n, t) {
                var i = this,
                  r = i.value();
                i.value(t);
                i.trigger(ft, { target: n, oldValue: r, newValue: i.value() });
              },
              _click: function (t) {
                var u = this,
                  r = n(t.target).closest(i + f),
                  e = r.attr(h.dataValue);
                u.options.enabled &&
                  !u.options.readonly &&
                  (r.data(h.partValue) && (e = r.data(h.partValue)),
                  u._select(r, e));
              },
              _select: function (n, t) {
                var i = this,
                  r = isNaN(t) ? n.attr(h.dataValue) : t;
                r == i.value() ||
                  r < i._valueMin ||
                  r > i.options.max ||
                  (i.trigger(et, { target: n }), i._change(n, r), i._focus());
              },
              _mouseenter: function (t) {
                var r = this,
                  u = n(t.target),
                  e = u.closest(i + f);
                r.options.enabled &&
                  !r.options.readonly &&
                  ((r.enableMove = !0),
                  u.is(i + f) && r._updateItemTemplates(ot, e));
              },
              _mouseleave: function (t) {
                var e,
                  c,
                  o,
                  u,
                  l,
                  r = this,
                  a = r.options.selection,
                  w = r.options.precision == v.half,
                  b = a == rt.single,
                  k = n(t.target).closest(i + f),
                  h = r.container.find(i + f);
                if (
                  ((r.enableMove = !1),
                  (o = function (n) {
                    e =
                      r.parsedValue % 1 != 0 &&
                      n.is(
                        r.container.find(
                          "[data-value=" + Math.ceil(r.value()) + "]"
                        )
                      );
                    c =
                      (!n.hasClass(s.selected) && !n.hasClass(s.hovered)) || e
                        ? y.item
                        : y.selected;
                    r._renderTemplate(n, c);
                    w &&
                      e &&
                      n.hasClass(s.selected) &&
                      r._togglePrecisionElements(n, p);
                  }),
                  h.removeClass(s.hovered),
                  b)
                )
                  o(k);
                else for (u = 0; u < h.length; u += 1) (l = n(h[u])), o(l);
              },
              _mousemove: function (t) {
                var e,
                  o,
                  s,
                  u = this,
                  r = n(t.target).closest(i + f);
                u.enableMove &&
                  (r.length &&
                    ((e = t.clientX),
                    (o = r.offset().left),
                    (s = Math.abs(e - o)),
                    u._togglePrecisionElements(r, ot),
                    u._updatePrecisionElements(r, s)),
                  t.preventDefault());
              },
              _togglePrecisionElements: function (t, r) {
                var e,
                  o = this,
                  f = t.find(i + tt),
                  s = o._getTemplateType(y[r]);
                f.length
                  ? f.html(s({ icon: u.iconSelected }))
                  : ((e = o.parsedValue % 1 != 0),
                    (f = n("<span></span>").addClass(tt)),
                    f.append(s({ icon: u.iconSelected })),
                    f.width(e ? t.width() / 2 : t.width()),
                    t.append(f),
                    t.append(
                      n("<span></span>").css({
                        width: t.width(),
                        height: t.height(),
                        display: "block",
                      })
                    ),
                    o._createUpdatePrecisionComplement(t, e));
              },
              _createUpdatePrecisionComplement: function (t, u) {
                var o = this,
                  f = t.find(i + lt),
                  s = t.children().first(),
                  e = r.support.isRtl(o.wrapper),
                  h = e ? "right" : "left";
                f.length ||
                  (f = s.wrap(n("<span></span>").addClass(lt)).parent());
                f.width(u ? t.width() / 2 : 0);
                f.css(h, u || e ? "50%" : 0);
              },
              _updatePrecisionElements: function (n, t) {
                var l = this,
                  e = n.find(i + tt),
                  u = r.parseFloat(n.data(h.value)),
                  a = r.support.isRtl(this.wrapper),
                  s = n.width(),
                  v = s / 2,
                  c = o(n.outerWidth() / 2),
                  f = a ? t > c : t < c;
                n.length &&
                  e.length &&
                  (e.width(f ? v : s),
                  this.options.tooltip && n.attr(h.title, f ? u - k : u),
                  n.data(h.partValue, f ? u - k : u),
                  l._createUpdatePrecisionComplement(n, f));
              },
              _updateElement: function (n) {
                var t = this,
                  i = null === n ? "" : n;
                t.element.val(i);
                null === t.value
                  ? t.wrapper.removeAttr(nt)
                  : t.wrapper.attr(nt, n);
              },
              _updateItemsRendering: function (n) {
                var t = this,
                  u = t.options.precision == v.half,
                  e = null === n ? "item" : p,
                  r =
                    null === n
                      ? t.container.find(i + s.selected).last()
                      : t.container.find(
                          i + f + "[data-value='" + Math.ceil(n) + "']"
                        );
                null === n && t.container.find(i + f).removeClass(s.selected);
                t._updateItemTemplates(e, r);
                u && null !== n && t._togglePrecisionElements(r, p);
                t._renderLabel();
              },
              _setState: function () {
                var t = this,
                  i = t.element,
                  n = t.wrapper,
                  f = t.options.readonly,
                  r = t.options.enabled;
                f && r
                  ? (i.attr(b, b), n.attr(ct, !0))
                  : (i.removeAttr(b), n.removeAttr(ct));
                r
                  ? (i.removeAttr(w), n.removeAttr(ht), n.attr(it, 0))
                  : (i.attr(w, w), n.attr(ht, !0), n.removeAttr(it));
                n.toggleClass(u.disabled, !r);
                n.toggleClass(u.readonly, f && r);
              },
              value: function (n) {
                var i = this,
                  r = i.options.precision == v.half;
                return null === n
                  ? (i._updateElement(n), i._updateItemsRendering(n), t)
                  : ((n = o(n)),
                    null === n
                      ? (n = o(i.element.val()))
                      : ((n = Math.max(
                          i._valueMin,
                          Math.min(n, i.options.max)
                        )),
                        (i.parsedValue = r
                          ? o((Math.ceil(2 * n) / 2).toFixed(1))
                          : Math.round(n)),
                        i._updateElement(n),
                        i._updateItemsRendering(n),
                        t));
              },
              reset: function () {
                var n = this;
                n.value(null);
              },
              enable: function (n) {
                var i = this;
                t === n && (n = !0);
                i.options.enabled = n;
                i.options.readonly = !1;
                i._setState();
              },
              readonly: function (n) {
                var i = this;
                t === n && (n = !0);
                i.options.readonly = n;
                i.options.enabled = !0;
                i._setState();
              },
              setOptions: function (i) {
                var r = this;
                r.options = n.extend(r.options, i);
                i.enabled !== t && r.enable(i.enabled);
                i.readonly !== t && r.readonly(i.readonly);
                i.label !== t && r._renderLabel();
                i.tooltip !== t && r._renderTooltip();
                i.value !== t && r.value(i.value);
                (i.min ||
                  i.max !== t ||
                  i.itemTemplate !== t ||
                  i.selectedTemplate !== t ||
                  i.hoveredTemplate !== t) &&
                  (r.container.empty(),
                  r._renderItems(),
                  r._renderLabel(),
                  r._renderTooltip(),
                  r._selectInitial());
              },
              destroy: function () {
                var n = this;
                n.wrapper.off(e);
                n.container.off(e);
                d.fn.destroy.call(n);
              },
            });
          ut.plugin(ai);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.angular.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t, i) {
          "use strict";
          function ct(n) {
            var t = s;
            try {
              return (
                (s = function (n) {
                  return n();
                }),
                n()
              );
            } finally {
              s = t;
            }
          }
          function u(t, r, u, f, e, o) {
            function p() {
              var y, i, p, o, s, h, a;
              return (
                u.kRebind && (y = n(n(r)[0].cloneNode(!0))),
                (k = w(t, r, u, f, c).options),
                r.is("select") &&
                  !(function (t) {
                    var i, r;
                    if (t.length > 0)
                      for (
                        i = n(t[0]),
                          !/\S/.test(i.text()) &&
                            /^\?/.test(i.val()) &&
                            i.remove(),
                          r = 0;
                        r < t.length;
                        r++
                      )
                        n(t[r]).off("$destroy");
                  })(r[0].options),
                (i = c.call(r, (l = k)).data(f)),
                vt(i, t, u, f, e),
                t.$emit("kendoWidgetCreated", i),
                (p = wt(t, i)),
                u.kRebind && kt(i, t, r, y, u.kRebind, p, u),
                u.kNgDisabled &&
                  ((o = u.kNgDisabled),
                  (s = t.$eval(o)),
                  s && i.enable(!s),
                  lt(i, t, r, o)),
                u.kNgReadonly &&
                  ((h = u.kNgReadonly),
                  (a = t.$eval(h)),
                  a && i.readonly(a),
                  at(i, t, r, h)),
                u.kNgModel && v(i, t, u.kNgModel),
                b && pt(i, t, r, b, tt),
                i && bt(i, r),
                i
              );
            }
            var h, nt, b, tt, c, a, k, d, y, it, rt, ut, ft, g;
            if (!(r instanceof jQuery))
              throw Error(
                "The Kendo UI directives require jQuery to be available before AngularJS. Please include jquery before angular in the document."
              );
            if (
              ((h = u.kNgDelay),
              (nt = t.$eval(h)),
              (o = o || []),
              (b = o[0]),
              (tt = o[1]),
              (c = n(r)[f]),
              !c)
            )
              return window.console.error("Could not find: " + f), null;
            if (
              ((a = w(t, r, u, f, c)), (k = a.options), a.unresolved.length)
            ) {
              for (d = [], y = 0, it = a.unresolved.length; y < it; y++)
                (rt = a.unresolved[y]),
                  (ut = n
                    .Deferred(function (n) {
                      var r = t.$watch(rt.path, function (t) {
                        t !== i && (r(), n.resolve());
                      });
                    })
                    .promise()),
                  d.push(ut);
              return n.when.apply(null, d).then(p), i;
            }
            return h && !nt
              ? ((ft = t.$root || t),
                (g = function () {
                  var n = t.$watch(h, function (t) {
                    t !== i &&
                      (n(), r.removeAttr(u.$attr.kNgDelay), (h = null), s(p));
                  });
                }),
                /^\$(digest|apply)$/.test(ft.$$phase) ? g() : t.$apply(g),
                i)
              : p();
          }
          function w(r, u, f, e, o) {
            function h(n, u) {
              var f = t.copy(r.$eval(u));
              f === i ? a.push({ option: n, path: u }) : (s[n] = f);
            }
            var s,
              c,
              y,
              l,
              w = e.replace(/^kendo/, ""),
              a = [],
              v = f.kOptions || f.options,
              p = r.$eval(v);
            return (
              v && p === i && a.push({ option: "options", path: v }),
              (s = t.extend({}, f.defaultOptions, p)),
              (c = o.widget.prototype.options),
              (y = o.widget.prototype.events),
              n.each(f, function (n, t) {
                var u, f, i, r;
                "source" !== n &&
                  "kDataSource" !== n &&
                  "kScopeField" !== n &&
                  "scopeField" !== n &&
                  ((u = "data" + n.charAt(0).toUpperCase() + n.slice(1)),
                  0 === n.indexOf("on") &&
                    ((f = n.replace(/^on./, function (n) {
                      return n.charAt(2).toLowerCase();
                    })),
                    y.indexOf(f) > -1 && (s[f] = t)),
                  c.hasOwnProperty(u)
                    ? h(u, t)
                    : c.hasOwnProperty(n) && !tt[n]
                    ? h(n, t)
                    : nt[n] ||
                      ((i = n.match(/^k(On)?([A-Z].*)/)),
                      i &&
                        ((r = i[2].charAt(0).toLowerCase() + i[2].slice(1)),
                        i[1] && "kOnLabel" != n
                          ? (s[r] = t)
                          : ("kOnLabel" == n && (r = "onLabel"), h(r, t)))));
              }),
              (l = f.kDataSource || f.source),
              l && (s.dataSource = g(r, u, w, l)),
              (s.$angular = [r]),
              { options: s, unresolved: a }
            );
          }
          function lt(n, t, r, u) {
            return (kendo.ui.PanelBar && n instanceof kendo.ui.PanelBar) ||
              (kendo.ui.Menu && n instanceof kendo.ui.Menu)
              ? (h.warn(
                  "k-ng-disabled specified on a widget that does not have the enable() method: " +
                    n.options.name
                ),
                i)
              : (t.$watch(u, function (t, i) {
                  t != i && n.enable(!t);
                }),
                i);
          }
          function at(n, t, r, u) {
            return "function" != typeof n.readonly
              ? (h.warn(
                  "k-ng-readonly specified on a widget that does not have the readonly() method: " +
                    n.options.name
                ),
                i)
              : (t.$watch(u, function (t, i) {
                  t != i && n.readonly(t);
                }),
                i);
          }
          function vt(n, t, i, r, u) {
            if (i[u]) {
              var f = o(i[u]).assign;
              if (!f)
                throw Error(
                  u +
                    " attribute used but expression in it is not assignable: " +
                    i[r]
                );
              f(t, n);
            }
          }
          function yt(n) {
            return /checkbox|radio/i.test(n.attr("type"))
              ? n.prop("checked")
              : n.val();
          }
          function b(n) {
            return it.test(n[0].tagName);
          }
          function pt(n, t, r, u, f) {
            var l, s, h, c, o;
            n.value &&
              ((s = !1),
              (l = b(r)
                ? function () {
                    return yt(r);
                  }
                : function () {
                    return n.value();
                  }),
              (h = function () {
                var r = u.$viewValue;
                r === i && (r = u.$modelValue);
                r === i && (r = null);
                s = !0;
                setTimeout(function () {
                  if (((s = !1), n)) {
                    var i = t[n.element.attr("k-ng-model")];
                    i && (r = i);
                    n.options.autoBind !== !1 || n.listView.bound()
                      ? n.value(r)
                      : r && n.value(r);
                  }
                }, 0);
              }),
              (u.$render = h),
              setTimeout(function () {
                u.$render !== h && (u.$render = h)();
              }),
              b(r) &&
                r.on("change", function () {
                  s = !0;
                }),
              (c = function (n) {
                return function () {
                  var i;
                  (s && !r.is("select")) ||
                    (n && f && (i = f.$pristine),
                    u.$setViewValue(l()),
                    n && (u.$setPristine(), i && f.$setPristine()),
                    e(t));
                };
              }),
              n.first("change", c(!1)),
              n.first("spin", c(!1)),
              (kendo.ui.AutoComplete && n instanceof kendo.ui.AutoComplete) ||
                n.first("dataBound", c(!0)),
              (o = l()),
              isNaN(u.$viewValue) ||
                o == u.$viewValue ||
                (u.$isEmpty(u.$viewValue)
                  ? null != o &&
                    "" !== o &&
                    o != u.$viewValue &&
                    u.$setViewValue(o)
                  : n.value(u.$viewValue)),
              u.$setPristine());
          }
          function v(t, r, u) {
            var c, l, w, g, a, f, nt, y, b, s, p, k, d;
            return kendo.ui.DateRangePicker &&
              t instanceof kendo.ui.DateRangePicker
              ? ((c = u.split(",")),
                (l = c[0].trim()),
                v(t._startDateInput, r, l),
                c[1]
                  ? ((w = c[1].trim()),
                    v(t._endDateInput, r, w),
                    t.range({ start: r[l], end: r[w] }))
                  : t.range({ start: r[l], end: null }),
                i)
              : "function" != typeof t.value
              ? (h.warn(
                  "k-ng-model specified on a widget that does not have the value() method: " +
                    t.options.name
                ),
                i)
              : ((g = n(t.element).parents("ng-form, form").first()),
                (a = kendo.getter(g.attr("name"), !0)(r)),
                (f = o(u)),
                (nt = f.assign),
                (y = !1),
                (b =
                  (kendo.ui.MultiSelect && t instanceof kendo.ui.MultiSelect) ||
                  (kendo.ui.RangeSlider && t instanceof kendo.ui.RangeSlider)),
                (s = function (n) {
                  return n && b ? n.length : 0;
                }),
                (p = s(f(r))),
                t.$angular_setLogicValue(f(r)),
                (k = function (n, r) {
                  n === i && (n = null);
                  y ||
                    (n == r && s(n) == p) ||
                    ((p = s(n)), t.$angular_setLogicValue(n));
                }),
                b ? r.$watchCollection(u, k) : r.$watch(u, k),
                (d = function () {
                  y = !0;
                  a && a.$pristine && a.$setDirty();
                  e(r, function () {
                    nt(r, t.$angular_getLogicValue());
                    p = s(f(r));
                  });
                  y = !1;
                }),
                t.first("change", d),
                t.first("spin", d),
                i);
          }
          function wt(n, t) {
            var i = n.$on("$destroy", function () {
              i();
              t && (kendo.destroy(t.element), (t = null));
            });
            return i;
          }
          function bt(t, i) {
            function f() {
              u.disconnect();
            }
            function e() {
              u.observe(n(i)[0], { attributes: !0 });
            }
            var r, u;
            window.MutationObserver &&
              t.wrapper &&
              ((r = [].slice.call(n(i)[0].classList)),
              (u = new MutationObserver(function (i) {
                f();
                t &&
                  (i.forEach(function (i) {
                    var u,
                      f = n(t.wrapper)[0];
                    switch (i.attributeName) {
                      case "class":
                        u = [].slice.call(i.target.classList);
                        u.forEach(function (n) {
                          r.indexOf(n) < 0 &&
                            (f.classList.add(n),
                            kendo.ui.ComboBox &&
                              t instanceof kendo.ui.ComboBox &&
                              t.input[0].classList.add(n));
                        });
                        r.forEach(function (n) {
                          u.indexOf(n) < 0 &&
                            (f.classList.remove(n),
                            kendo.ui.ComboBox &&
                              t instanceof kendo.ui.ComboBox &&
                              t.input[0].classList.remove(n));
                        });
                        r = u;
                        break;
                      case "disabled":
                        "function" != typeof t.enable ||
                          t.element.attr("readonly") ||
                          t.enable(!n(i.target).attr("disabled"));
                        break;
                      case "readonly":
                        "function" != typeof t.readonly ||
                          t.element.attr("disabled") ||
                          t.readonly(!!n(i.target).attr("readonly"));
                    }
                  }),
                  e());
              })),
              e(),
              t.first("destroy", f));
          }
          function kt(t, i, r, u, f, o, s) {
            var h = i.$watch(
              f,
              function (f, e) {
                var a, c, l, v, y;
                t._muteRebind ||
                  f === e ||
                  (h(),
                  s._cleanUp && s._cleanUp(),
                  (a = p[t.options.name]),
                  a &&
                    a.forEach(function (t) {
                      var r = i.$eval(s["k" + t]);
                      r && u.append(n(r).attr(kendo.toHyphens("k" + t), ""));
                    }),
                  (c = n(t.wrapper)[0]),
                  (l = n(t.element)[0]),
                  (v = "Upload" === t.options.name),
                  v && (r = n(l)),
                  (y = r.injector().get("$compile")),
                  t._destroy(),
                  o && o(),
                  (t = null),
                  l &&
                    (c && c.parentNode.replaceChild(l, c), n(r).replaceWith(u)),
                  y(u)(i));
              },
              !0
            );
            e(i);
          }
          function k(n, t) {
            return function (i, r) {
              return n.call(t, i, r);
            };
          }
          function dt(n, t) {
            this[n] = kendo.stringify(t);
          }
          function gt(n, i) {
            function e(n, t) {
              f.directive(n, [
                "directiveFactory",
                function (i) {
                  return i.create(t, n);
                },
              ]);
            }
            var o,
              u,
              s,
              h,
              r = i ? "Mobile" : "";
            r += n.fn.options.name;
            o = r;
            u = "kendo" + r.charAt(0) + r.substr(1).toLowerCase();
            r = "kendo" + r;
            s = r.replace(/([A-Z])/g, "-$1");
            ut.indexOf(r.replace("kendo", "")) == -1 &&
              ((h = r === u ? [r] : [r, u]),
              t.forEach(h, function (n) {
                f.directive(n, function () {
                  return {
                    restrict: "E",
                    replace: !0,
                    template: function (n, t) {
                      var i = rt[o] || "div",
                        r = t.kScopeField || t.scopeField;
                      return (
                        "<" +
                        i +
                        " " +
                        s +
                        (r ? '="' + r + '"' : "") +
                        ">" +
                        n.html() +
                        "</" +
                        i +
                        ">"
                      );
                    },
                  };
                });
              }));
            y.indexOf(r.replace("kendo", "")) > -1 ||
              (e(r, r), u != r && e(u, r));
          }
          function ni(t) {
            return (
              (t = n(t)),
              kendo.widgetInstance(t, kendo.ui) ||
                kendo.widgetInstance(t, kendo.mobile.ui) ||
                kendo.widgetInstance(t, kendo.dataviz.ui)
            );
          }
          function e(n, t) {
            var i = n.$root || n,
              r = /^\$(digest|apply)$/.test(i.$$phase);
            t ? (r ? t() : i.$apply(t)) : r || i.$digest();
          }
          function ti(t, i) {
            t.$destroy();
            i &&
              n(i)
                .removeData("$scope")
                .removeData("$$kendoScope")
                .removeData("$isolateScope")
                .removeData("$isolateScopeNoTemplate")
                .removeClass("ng-scope");
          }
          function r(i, u, f) {
            var o, e, s;
            if (n.isArray(i))
              return t.forEach(i, function (n) {
                r(n, u, f);
              });
            if ("string" == typeof i) {
              for (o = i.split("."), e = kendo; e && o.length > 0; )
                e = e[o.shift()];
              if (!e) return a.push([i, u, f]), !1;
              i = e.prototype;
            }
            return (
              (s = i[u]),
              (i[u] = function () {
                var n = this,
                  t = arguments;
                return f.apply(
                  {
                    self: n,
                    next: function () {
                      return s.apply(n, arguments.length > 0 ? arguments : t);
                    },
                  },
                  t
                );
              }),
              !0
            );
          }
          var f,
            c,
            o,
            s,
            d,
            h,
            l,
            g,
            nt,
            tt,
            it,
            rt,
            ut,
            y,
            ft,
            et,
            ot,
            st,
            ht,
            a,
            p;
          t &&
            t.injector &&
            ((f = t.module("kendo.directives", [])),
            (c = t.injector(["ng"])),
            (o = c.get("$parse")),
            (s = c.get("$timeout")),
            (h = c.get("$log")),
            (g = (function () {
              var t = {
                  TreeList: "TreeListDataSource",
                  TreeView: "HierarchicalDataSource",
                  Scheduler: "SchedulerDataSource",
                  PivotGrid: "PivotDataSource",
                  PivotConfigurator: "PivotDataSource",
                  PanelBar: "HierarchicalDataSource",
                  Menu: "$PLAIN",
                  ContextMenu: "$PLAIN",
                },
                n = function (n, t) {
                  return "$PLAIN" == t ? n : kendo.data[t].create(n);
                };
              return function (i, r, u, f) {
                var o = t[u] || "DataSource",
                  e = i.$eval(f),
                  s = n(e, o);
                return (
                  i.$watch(f, function (t) {
                    var u,
                      i = ni(r);
                    i &&
                      "function" == typeof i.setDataSource &&
                      t !== e &&
                      t !== i.dataSource &&
                      ((u = n(t, o)), i.setDataSource(u), (e = t));
                  }),
                  s
                );
              };
            })()),
            (nt = {
              kDataSource: !0,
              kOptions: !0,
              kRebind: !0,
              kNgModel: !0,
              kNgDelay: !0,
            }),
            (tt = { name: !0, title: !0, style: !0 }),
            (it = /^(input|select|textarea)$/i),
            f.factory("directiveFactory", [
              "$compile",
              function (t) {
                var i,
                  r,
                  f = !1;
                return (
                  (d = t),
                  (r = function (t, r) {
                    return {
                      restrict: "AC",
                      require: ["?ngModel", "^?form"],
                      scope: !1,
                      controller: [
                        "$scope",
                        "$attrs",
                        "$element",
                        function (n, t) {
                          this.template = k(dt, t);
                          t._cleanUp = k(function () {
                            this.template = null;
                            t._cleanUp = null;
                          }, this);
                        },
                      ],
                      link: function (e, o, s, h) {
                        var a,
                          c = n(o),
                          l = t.replace(/([A-Z])/g, "-$1");
                        c.attr(l, c.attr("data-" + l));
                        c[0].removeAttribute("data-" + l);
                        a = u(e, o, s, t, r, h);
                        a &&
                          (i && clearTimeout(i),
                          (i = setTimeout(function () {
                            e.$emit("kendoRendered");
                            f ||
                              ((f = !0),
                              n("form").each(function () {
                                var t = n(this).controller("form");
                                t && t.$setPristine();
                              }));
                          })));
                      },
                    };
                  }),
                  { create: r }
                );
              },
            ]),
            (rt = {
              Editor: "textarea",
              NumericTextBox: "input",
              DatePicker: "input",
              DateTimePicker: "input",
              TimePicker: "input",
              AutoComplete: "input",
              ColorPicker: "input",
              MaskedTextBox: "input",
              MultiSelect: "input",
              Upload: "input",
              Validator: "form",
              Button: "button",
              MobileButton: "a",
              MobileBackButton: "a",
              MobileDetailButton: "a",
              ListView: "ul",
              MobileListView: "ul",
              ScrollView: "div",
              PanelBar: "ul",
              TreeView: "ul",
              Menu: "ul",
              ContextMenu: "ul",
              ActionSheet: "ul",
              Switch: "input",
            }),
            (ut = [
              "MobileView",
              "MobileDrawer",
              "MobileLayout",
              "MobileSplitView",
              "MobilePane",
              "MobileModalView",
            ]),
            (y = [
              "MobileApplication",
              "MobileView",
              "MobileModalView",
              "MobileLayout",
              "MobileActionSheet",
              "MobileDrawer",
              "MobileSplitView",
              "MobilePane",
              "MobileScrollView",
              "MobilePopOver",
            ]),
            t.forEach(
              [
                "MobileNavBar",
                "MobileButton",
                "MobileBackButton",
                "MobileDetailButton",
                "MobileTabStrip",
                "MobileScrollView",
                "MobileScroller",
              ],
              function (n) {
                y.push(n);
                n = "kendo" + n;
                f.directive(n, function () {
                  return {
                    restrict: "A",
                    link: function (t, i, r) {
                      u(t, i, r, n, n);
                    },
                  };
                });
              }
            ),
            (ft = kendo.htmlEncode),
            (et = /{{/g),
            (ot = /}}/g),
            (st = "{&#8203;{"),
            (ht = "}&#8203;}"),
            (kendo.htmlEncode = function (n) {
              return ft(n).replace(et, st).replace(ot, ht);
            }),
            (a = []),
            kendo.onWidgetRegistered(function (t) {
              a = n.grep(a, function (n) {
                return !r.apply(null, n);
              });
              gt(t.widget, "Mobile" == t.prefix);
            }),
            r(["ui.Widget", "mobile.ui.Widget"], "angular", function (r, u) {
              var f,
                o = this.self;
              return "init" == r
                ? (!u && l && (u = l),
                  (l = null),
                  u &&
                    u.$angular &&
                    ((o.$angular_scope = u.$angular[0]),
                    o.$angular_init(o.element, u)),
                  i)
                : ((f = o.$angular_scope),
                  f &&
                    ct(function () {
                      var h,
                        l,
                        s = u(),
                        c = s.elements,
                        a = s.data;
                      if (c.length > 0)
                        switch (r) {
                          case "cleanup":
                            t.forEach(c, function (t) {
                              var i = n(t).data("$$kendoScope");
                              i && i !== f && i.$$kendoScope && ti(i, t);
                            });
                            break;
                          case "compile":
                            h = o.element.injector();
                            l = h ? h.get("$compile") : d;
                            t.forEach(c, function (t, r) {
                              var u, e;
                              s.scopeFrom
                                ? (u = s.scopeFrom)
                                : ((e = a && a[r]),
                                  e !== i
                                    ? ((u = n.extend(f.$new(), e)),
                                      (u.$$kendoScope = !0))
                                    : (u = f));
                              n(t).data("$$kendoScope", u);
                              l(t)(u);
                            });
                            e(f);
                        }
                    }),
                  i);
            }),
            r("ui.Widget", "$angular_getLogicValue", function () {
              return this.self.value();
            }),
            r("ui.Widget", "$angular_setLogicValue", function (n) {
              this.self.value(n);
            }),
            r("ui.Select", "$angular_getLogicValue", function () {
              var n = this.self.dataItem(),
                t = this.self.options.dataValueField;
              return n
                ? this.self.options.valuePrimitive
                  ? t
                    ? n[t]
                    : n
                  : n.toJSON()
                : null;
            }),
            r("ui.Select", "$angular_setLogicValue", function (n) {
              var t = this.self,
                r = t.options,
                f = r.dataValueField,
                u = r.text || "";
              n === i && (n = "");
              f &&
                !r.valuePrimitive &&
                n &&
                ((u = n[r.dataTextField] || ""), (n = n[f || r.dataTextField]));
              t.options.autoBind !== !1 || t.listView.bound()
                ? t.value(n)
                : !u && n && r.valuePrimitive
                ? t.value(n)
                : t._preselect(n, u);
            }),
            r("ui.MultiSelect", "$angular_getLogicValue", function () {
              var t = this.self.dataItems().slice(0),
                i = this.self.options.dataValueField;
              return (
                i &&
                  this.self.options.valuePrimitive &&
                  (t = n.map(t, function (n) {
                    return n[i];
                  })),
                t
              );
            }),
            r("ui.MultiSelect", "$angular_setLogicValue", function (t) {
              var i, r, u, f;
              null == t && (t = []);
              i = this.self;
              r = i.options;
              u = r.dataValueField;
              f = t;
              u &&
                !r.valuePrimitive &&
                (t = n.map(t, function (n) {
                  return n[u];
                }));
              r.autoBind !== !1 || r.valuePrimitive || i.listView.bound()
                ? i.value(t)
                : i._preselect(f, t);
            }),
            r("ui.Widget", "$angular_init", function (t, i) {
              var o,
                e,
                r,
                u,
                f = this.self;
              if (i && !n.isArray(i))
                for (o = f.$angular_scope, e = f.events.length; --e >= 0; )
                  (r = f.events[e]),
                    (u = i[r]),
                    u &&
                      "string" == typeof u &&
                      (i[r] = f.$angular_makeEventHandler(r, o, u));
            }),
            r("ui.Widget", "$angular_makeEventHandler", function (n, t, i) {
              return (
                (i = o(i)),
                function (n) {
                  e(t, function () {
                    i(t, { kendoEvent: n });
                  });
                }
              );
            }),
            r(
              ["ui.Grid", "ui.ListView", "ui.TreeView", "ui.PanelBar"],
              "$angular_makeEventHandler",
              function (n, i, r) {
                return "change" != n
                  ? this.next()
                  : ((r = o(r)),
                    function (n) {
                      var c,
                        l,
                        f,
                        s,
                        a,
                        v,
                        o,
                        w,
                        h,
                        y = n.sender,
                        p = y.options,
                        u = { kendoEvent: n };
                      for (
                        t.isString(p.selectable) &&
                          ((c = p.selectable.indexOf("cell") !== -1),
                          (l = p.selectable.indexOf("multiple") !== -1)),
                          y._checkBoxSelection && (l = !0),
                          f = u.selected = this.select(),
                          s = u.data = [],
                          a = u.columns = [],
                          o = 0;
                        o < f.length;
                        o++
                      )
                        (w = c ? f[o].parentNode : f[o]),
                          (h = y.dataItem(w)),
                          c
                            ? (t.element.inArray(h, s) < 0 && s.push(h),
                              (v = t.element(f[o]).index()),
                              t.element.inArray(v, a) < 0 && a.push(v))
                            : s.push(h);
                      l ||
                        ((u.dataItem = u.data = s[0]),
                        (u.angularDataItem = kendo.proxyModelSetters(
                          u.dataItem
                        )),
                        (u.selected = f[0]));
                      e(i, function () {
                        r(i, u);
                      });
                    });
              }
            ),
            r("ui.Grid", "$angular_init", function (r, u) {
              if ((this.next(), u.columns)) {
                var f = n.extend({}, kendo.Template, u.templateSettings);
                t.forEach(u.columns, function (n) {
                  !n.field ||
                    n.template ||
                    n.format ||
                    n.values ||
                    (n.encoded !== i && !n.encoded) ||
                    (n.template =
                      "<span ng-bind='" +
                      kendo.expr(n.field, "dataItem") +
                      "'>#: " +
                      kendo.expr(n.field, f.paramName) +
                      "#</span>");
                });
              }
            }),
            r("mobile.ui.ButtonGroup", "value", function (n) {
              var t = this.self;
              return (
                null != n &&
                  (t.select(t.element.children("li.km-button").eq(n)),
                  t.trigger("change"),
                  t.trigger("select", { index: t.selectedIndex })),
                t.selectedIndex
              );
            }),
            r("mobile.ui.ButtonGroup", "_select", function () {
              this.next();
              this.self.trigger("change");
            }),
            f
              .directive("kendoMobileApplication", function () {
                return {
                  terminal: !0,
                  link: function (n, t, i) {
                    u(
                      n,
                      t,
                      i,
                      "kendoMobileApplication",
                      "kendoMobileApplication"
                    );
                  },
                };
              })
              .directive("kendoMobileView", function () {
                return {
                  scope: !0,
                  link: {
                    pre: function (n, t, i) {
                      i.defaultOptions = n.viewOptions;
                      i._instance = u(
                        n,
                        t,
                        i,
                        "kendoMobileView",
                        "kendoMobileView"
                      );
                    },
                    post: function (n, t, i) {
                      i._instance._layout();
                      i._instance._scroller();
                    },
                  },
                };
              })
              .directive("kendoMobileDrawer", function () {
                return {
                  scope: !0,
                  link: {
                    pre: function (n, t, i) {
                      i.defaultOptions = n.viewOptions;
                      i._instance = u(
                        n,
                        t,
                        i,
                        "kendoMobileDrawer",
                        "kendoMobileDrawer"
                      );
                    },
                    post: function (n, t, i) {
                      i._instance._layout();
                      i._instance._scroller();
                    },
                  },
                };
              })
              .directive("kendoMobileModalView", function () {
                return {
                  scope: !0,
                  link: {
                    pre: function (n, t, i) {
                      i.defaultOptions = n.viewOptions;
                      i._instance = u(
                        n,
                        t,
                        i,
                        "kendoMobileModalView",
                        "kendoMobileModalView"
                      );
                    },
                    post: function (n, t, i) {
                      i._instance._layout();
                      i._instance._scroller();
                    },
                  },
                };
              })
              .directive("kendoMobileSplitView", function () {
                return {
                  terminal: !0,
                  link: {
                    pre: function (n, t, i) {
                      i.defaultOptions = n.viewOptions;
                      i._instance = u(
                        n,
                        t,
                        i,
                        "kendoMobileSplitView",
                        "kendoMobileSplitView"
                      );
                    },
                    post: function (n, t, i) {
                      i._instance._layout();
                    },
                  },
                };
              })
              .directive("kendoMobilePane", function () {
                return {
                  terminal: !0,
                  link: {
                    pre: function (n, t, i) {
                      i.defaultOptions = n.viewOptions;
                      u(n, t, i, "kendoMobilePane", "kendoMobilePane");
                    },
                  },
                };
              })
              .directive("kendoMobileLayout", function () {
                return {
                  link: {
                    pre: function (n, t, i) {
                      u(n, t, i, "kendoMobileLayout", "kendoMobileLayout");
                    },
                  },
                };
              })
              .directive("kendoMobileActionSheet", function () {
                return {
                  restrict: "A",
                  link: function (t, i, r) {
                    i.find("a[k-action]").each(function () {
                      n(this).attr(
                        "data-" + kendo.ns + "action",
                        n(this).attr("k-action")
                      );
                    });
                    u(
                      t,
                      i,
                      r,
                      "kendoMobileActionSheet",
                      "kendoMobileActionSheet"
                    );
                  },
                };
              })
              .directive("kendoMobilePopOver", function () {
                return {
                  terminal: !0,
                  link: {
                    pre: function (n, t, i) {
                      i.defaultOptions = n.viewOptions;
                      u(n, t, i, "kendoMobilePopOver", "kendoMobilePopOver");
                    },
                  },
                };
              })
              .directive("kendoViewTitle", function () {
                return {
                  restrict: "E",
                  replace: !0,
                  template: function (n) {
                    return (
                      "<span data-" +
                      kendo.ns +
                      "role='view-title'>" +
                      n.html() +
                      "</span>"
                    );
                  },
                };
              })
              .directive("kendoMobileHeader", function () {
                return {
                  restrict: "E",
                  link: function (n, t) {
                    t.addClass("km-header").attr("data-role", "header");
                  },
                };
              })
              .directive("kendoMobileFooter", function () {
                return {
                  restrict: "E",
                  link: function (n, t) {
                    t.addClass("km-footer").attr("data-role", "footer");
                  },
                };
              })
              .directive("kendoMobileScrollViewPage", function () {
                return {
                  restrict: "E",
                  replace: !0,
                  template: function (n) {
                    return (
                      "<div data-" +
                      kendo.ns +
                      "role='page'>" +
                      n.html() +
                      "</div>"
                    );
                  },
                };
              }),
            t.forEach(
              ["align", "icon", "rel", "transition", "actionsheetContext"],
              function (n) {
                var t = "k" + n.slice(0, 1).toUpperCase() + n.slice(1);
                f.directive(t, function () {
                  return {
                    restrict: "A",
                    priority: 2,
                    link: function (i, r, u) {
                      r.attr(kendo.attr(kendo.toHyphens(n)), i.$eval(u[t]));
                    },
                  };
                });
              }
            ),
            (p = {
              TreeMap: ["Template"],
              MobileListView: ["HeaderTemplate", "Template"],
              MobileScrollView: ["EmptyTemplate", "Template"],
              Grid: ["AltRowTemplate", "DetailTemplate", "RowTemplate"],
              ListView: ["EditTemplate", "Template", "AltTemplate"],
              Pager: ["SelectTemplate", "LinkTemplate"],
              PivotGrid: [
                "ColumnHeaderTemplate",
                "DataCellTemplate",
                "RowHeaderTemplate",
              ],
              Scheduler: [
                "AllDayEventTemplate",
                "DateHeaderTemplate",
                "EventTemplate",
                "MajorTimeHeaderTemplate",
                "MinorTimeHeaderTemplate",
              ],
              ScrollView: ["Template"],
              PanelBar: ["Template"],
              TreeView: ["Template"],
              Validator: ["ErrorTemplate"],
            }),
            (function () {
              var n = {};
              t.forEach(p, function (i, r) {
                t.forEach(i, function (t) {
                  n[t] || (n[t] = []);
                  n[t].push("?^^kendo" + r);
                });
              });
              t.forEach(n, function (n, t) {
                var i = "k" + t,
                  r = kendo.toHyphens(i);
                f.directive(i, function () {
                  return {
                    restrict: "A",
                    require: n,
                    terminal: !0,
                    compile: function (t, u) {
                      if ("" === u[i]) {
                        t.removeAttr(r);
                        var f = t[0].outerHTML;
                        return function (t, u, e, o) {
                          for (var s; !s && o.length; ) s = o.shift();
                          s
                            ? (s.template(i, f), u.remove())
                            : h.warn(
                                r +
                                  " without a matching parent widget found. It can be one of the following: " +
                                  n.join(", ")
                              );
                        };
                      }
                    },
                  };
                });
              });
            })());
        })(window.kendo.jQuery, window.angular),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.web.min",
      [
        "kendo.core.min",
        "kendo.router.min",
        "kendo.view.min",
        "kendo.fx.min",
        "kendo.dom.min",
        "kendo.data.odata.min",
        "kendo.data.xml.min",
        "kendo.data.min",
        "kendo.ooxml.min",
        "kendo.excel.min",
        "kendo.data.signalr.min",
        "kendo.binder.min",
        "kendo.drawing.min",
        "kendo.validator.min",
        "kendo.userevents.min",
        "kendo.draganddrop.min",
        "kendo.mobile.scroller.min",
        "kendo.groupable.min",
        "kendo.reorderable.min",
        "kendo.resizable.min",
        "kendo.sortable.min",
        "kendo.selectable.min",
        "kendo.chat.min",
        "kendo.button.min",
        "kendo.buttongroup.min",
        "kendo.switch.min",
        "kendo.pager.min",
        "kendo.popup.min",
        "kendo.notification.min",
        "kendo.tooltip.min",
        "kendo.list.min",
        "kendo.calendar.min",
        "kendo.datepicker.min",
        "kendo.dateinput.min",
        "kendo.drawer.min",
        "kendo.multiviewcalendar.min",
        "kendo.autocomplete.min",
        "kendo.dropdownlist.min",
        "kendo.dropdowntree.min",
        "kendo.combobox.min",
        "kendo.multiselect.min",
        "kendo.multicolumncombobox.min",
        "kendo.colorpicker.min",
        "kendo.columnmenu.min",
        "kendo.columnsorter.min",
        "kendo.grid.min",
        "kendo.listview.min",
        "kendo.listbox.min",
        "kendo.filebrowser.min",
        "kendo.imagebrowser.min",
        "kendo.editor.min",
        "kendo.numerictextbox.min",
        "kendo.maskedtextbox.min",
        "kendo.mediaplayer.min",
        "kendo.menu.min",
        "kendo.editable.min",
        "kendo.pivot.fieldmenu.min",
        "kendo.filter.min",
        "kendo.filtercell.min",
        "kendo.panelbar.min",
        "kendo.progressbar.min",
        "kendo.responsivepanel.min",
        "kendo.tabstrip.min",
        "kendo.timepicker.min",
        "kendo.toolbar.min",
        "kendo.datetimepicker.min",
        "kendo.daterangepicker.min",
        "kendo.treeview.draganddrop.min",
        "kendo.treeview.min",
        "kendo.scrollview.min",
        "kendo.slider.min",
        "kendo.splitter.min",
        "kendo.upload.min",
        "kendo.dialog.min",
        "kendo.window.min",
        "kendo.virtuallist.min",
        "kendo.scheduler.view.min",
        "kendo.scheduler.dayview.min",
        "kendo.scheduler.agendaview.min",
        "kendo.scheduler.monthview.min",
        "kendo.scheduler.recurrence.min",
        "kendo.scheduler.min",
        "kendo.gantt.list.min",
        "kendo.gantt.timeline.min",
        "kendo.gantt.min",
        "kendo.timeline.min",
        "kendo.treelist.min",
        "kendo.pivotgrid.min",
        "kendo.spreadsheet.min",
        "kendo.pivot.configurator.min",
        "kendo.ripple.min",
        "kendo.pdfviewer.min",
        "kendo.rating.min",
        "kendo.angular.min",
      ],
      n
    );
  })(
    function () {
      "bundle all";
      return window.kendo;
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/core/kendo-core.min",
      ["kendo.core.min", "kendo.drawing.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        function pi(n) {
          return Array.isArray(n);
        }
        function lh(n, t) {
          for (var r, u = pi(t) ? t : [t], i = 0; i < u.length; i++)
            (r = u[i]),
              n.className.indexOf(r) === -1 && (n.className += " " + r);
        }
        function ah(n, t) {
          n &&
            n.className &&
            (n.className = n.className.replace(t, "").replace(hs, " "));
        }
        function lr(n) {
          var t,
            i = 0.5;
          for (
            n.options.stroke &&
              kendo.drawing.util.defined(n.options.stroke.width) &&
              n.options.stroke.width % 2 == 0 &&
              (i = 0),
              t = 0;
            t < n.segments.length;
            t++
          )
            n.segments[t].anchor().round(0).translate(i, i);
          return n;
        }
        function wf(n, t) {
          return -n.x * t.y + n.y * t.x < 0;
        }
        function ut(n) {
          return "number" == typeof n && !isNaN(n);
        }
        function wi(n) {
          return typeof n === ae;
        }
        function vh(n) {
          return ut(n) || (wi(n) && isFinite(n));
        }
        function bf(n) {
          return "object" == typeof n;
        }
        function lo(n) {
          return ut(n) ? n + "px" : n;
        }
        function yh(n) {
          return cs.test(n);
        }
        function ph(n, t) {
          var u,
            f,
            r,
            i,
            e,
            o = wi(t) ? [t] : t;
          if (pi(o)) {
            for (
              u = {}, f = window.getComputedStyle(n), r = 0;
              r < o.length;
              r++
            )
              (i = o[r]), (u[i] = yh(i) ? parseFloat(f[i]) : f[i]);
            return u;
          }
          if (bf(t)) for (e in t) n.style[e] = lo(t[e]);
        }
        function yt(n, t) {
          void 0 === t && (t = 0);
          var i = { top: 0, right: 0, bottom: 0, left: 0 };
          return (
            "number" == typeof n
              ? (i[a] = i[et] = i[d] = i[g] = n)
              : ((i[a] = n[a] || t),
                (i[et] = n[et] || t),
                (i[d] = n[d] || t),
                (i[g] = n[g] || t)),
            i
          );
        }
        function kf(n) {
          void 0 === n && (n = {});
          var t;
          return (
            n.template
              ? (n.template = t = dr.compile(n.template))
              : re(n.content) && (t = n.content),
            t
          );
        }
        function ar(n, t) {
          for (var u = n.length, r = [], i = 0; i < u; i++)
            t(n[i]) && r.push(n[i]);
          return r;
        }
        function wh(n, t) {
          var r, i;
          if (n.className)
            for (r = t.split(" "), i = 0; i < r.length; i++)
              if (n.className.indexOf(r[i]) !== -1) return !0;
        }
        function lt(n, t) {
          if (t) return t.indexOf(n) !== -1;
        }
        function bh(n, t, i) {
          return kendo.drawing.util.round(n + (t - n) * i, it);
        }
        function df(n, t) {
          for (var r, f = n.length, u = [], i = 0; i < f; i++)
            (r = t(n[i])), kendo.drawing.util.defined(r) && u.push(r);
          return u;
        }
        function kh(n) {
          var t = 0;
          return (
            n.wheelDelta &&
              ((t = -n.wheelDelta / 120),
              (t = t > 0 ? Math.ceil(t) : Math.floor(t))),
            n.detail && (t = kendo.drawing.util.round(n.detail / 3)),
            t
          );
        }
        function w(n, t) {
          var i = n.prototype;
          i.options = i.options ? c({}, i.options, t) : t;
        }
        function ao(n) {
          for (var t, r = vi, u = nr, i = 0, f = n.length; i < f; i++)
            (t = n[i]),
              null !== t &&
                isFinite(t) &&
                ((r = Math.min(r, t)), (u = Math.max(u, t)));
          return { min: r === vi ? void 0 : r, max: u === nr ? void 0 : u };
        }
        function ru(n, i) {
          var f,
            r,
            o,
            u = t(i - n, e - 1);
          if (0 === u) {
            if (0 === i) return 0.1;
            u = Math.abs(i);
          }
          return (
            (f = Math.pow(10, Math.floor(Math.log(u) / Math.log(10)))),
            (r = t(u / f, e)),
            (o = 1),
            (o =
              r < 1.904762 ? 0.2 : r < 4.761904 ? 0.5 : r < 9.523809 ? 1 : 2),
            t(f * o, e)
          );
        }
        function uu(n, t, i, r, u) {
          var f = wt(u);
          return new tt(
            i + (n - i) * Math.cos(f) + (t - r) * Math.sin(f),
            r - (n - i) * Math.sin(f) + (t - r) * Math.cos(f)
          );
        }
        function dh(n, t) {
          return n - t;
        }
        function gh(n, t) {
          var r, f, e, c, o, s, h, l, i;
          return n.x1 === t.x1 &&
            n.y1 === t.y1 &&
            n.x2 === t.x2 &&
            n.y2 === t.y2
            ? t
            : ((r = Math.min(n.x1, t.x1)),
              (f = Math.max(n.x1, t.x1)),
              (e = Math.min(n.x2, t.x2)),
              (c = Math.max(n.x2, t.x2)),
              (o = Math.min(n.y1, t.y1)),
              (s = Math.max(n.y1, t.y1)),
              (h = Math.min(n.y2, t.y2)),
              (l = Math.max(n.y2, t.y2)),
              (i = []),
              (i[0] = new u(f, o, e, s)),
              (i[1] = new u(r, s, f, h)),
              (i[2] = new u(e, s, c, h)),
              (i[3] = new u(f, h, e, l)),
              (n.x1 === r && n.y1 === o) || (t.x1 === r && t.y1 === o)
                ? ((i[4] = new u(r, o, f, s)), (i[5] = new u(e, h, c, l)))
                : ((i[4] = new u(e, o, c, s)), (i[5] = new u(r, h, f, l))),
              ar(i, function (n) {
                return n.height() > 0 && n.width() > 0;
              })[0]);
        }
        function nc(t) {
          for (
            var r,
              u = t.stops,
              f = (t.innerRadius / t.radius) * 100,
              o = u.length,
              e = [],
              i = 0;
            i < o;
            i++
          )
            (r = n.extend({}, u[i])),
              (r.offset = (r.offset * (100 - f) + f) / 100),
              e.push(r);
          return e;
        }
        function gf(n) {
          var t = n.origin,
            i = n.bottomRight();
          return new u(t.x, t.y, i.x, i.y);
        }
        function vo(n, t) {
          var u = n.tickX,
            f = n.tickY,
            i = n.position,
            r = new b({ stroke: { width: t.width, color: t.color } });
          return (
            n.vertical
              ? r.moveTo(u, i).lineTo(u + t.size, i)
              : r.moveTo(i, f).lineTo(i, f + t.size),
            lr(r),
            r
          );
        }
        function yo(n, t) {
          var u = n.lineStart,
            f = n.lineEnd,
            i = n.position,
            r = new b({
              stroke: { width: t.width, color: t.color, dashType: t.dashType },
            });
          return (
            n.vertical
              ? r.moveTo(u, i).lineTo(f, i)
              : r.moveTo(i, u).lineTo(i, f),
            lr(r),
            r
          );
        }
        function fu(n, t) {
          var i = n.getTime() - t,
            r = n.getTimezoneOffset() - t.getTimezoneOffset();
          return i - r * yi;
        }
        function o(n, t) {
          return new Date(n.getTime() + t);
        }
        function h(n) {
          var t;
          return n instanceof Date ? (t = n) : n && (t = new Date(n)), t;
        }
        function po(n, t) {
          var r, i;
          if ((void 0 === t && (t = 0), (r = 0), (i = n.getDay()), !isNaN(i)))
            for (; i !== t; ) 0 === i ? (i = 6) : i--, r++;
          return o(n, -r * ii);
        }
        function eu(n, t) {
          return (
            0 === t && 23 === n.getHours() && (n.setHours(n.getHours() + 2), !0)
          );
        }
        function tc(n, t) {
          var r,
            i = new Date(n);
          return (
            i.setMinutes(0, 0, 0),
            (r = (n.getTimezoneOffset() - i.getTimezoneOffset()) * yi),
            o(i, r + t * tu)
          );
        }
        function y(n, t, i, r) {
          var f,
            e,
            u = n;
          return (
            n &&
              ((f = h(n)),
              (e = f.getHours()),
              i === ti
                ? ((u = new Date(f.getFullYear() + t, 0, 1)), eu(u, 0))
                : i === li
                ? ((u = new Date(f.getFullYear(), f.getMonth() + t, 1)),
                  eu(u, e))
                : i === sr
                ? ((u = y(po(f, r), 7 * t, bt)), eu(u, e))
                : i === bt
                ? ((u = new Date(
                    f.getFullYear(),
                    f.getMonth(),
                    f.getDate() + t
                  )),
                  eu(u, e))
                : i === or
                ? (u = tc(f, t))
                : i === of
                ? ((u = o(f, t * yi)), u.getSeconds() > 0 && u.setSeconds(0))
                : i === ef
                ? (u = o(f, t * sf))
                : i === nu && (u = o(f, t)),
              i !== nu && u.getMilliseconds() > 0 && u.setMilliseconds(0)),
            u
          );
        }
        function ou(n, t, i) {
          return y(h(n), 0, t, i);
        }
        function ne(n, t, i) {
          var r = h(n);
          return r && ou(r, t, i).getTime() === r.getTime() ? r : y(r, 1, t, i);
        }
        function vr(n, t) {
          return n && t ? n.getTime() - t.getTime() : -1;
        }
        function ot(n, t) {
          return n.getTime() - t;
        }
        function p(n) {
          var i, t;
          if (pi(n)) {
            for (i = [], t = 0; t < n.length; t++) i.push(p(n[t]));
            return i;
          }
          if (n) return h(n).getTime();
        }
        function yr(n, t) {
          return n && t ? p(n) === p(t) : n === t;
        }
        function wo(n, t, i) {
          return fu(n, t) / kt[i];
        }
        function hi(n, t, i, r) {
          var e,
            u = h(n),
            f = h(t);
          return (
            (e =
              i === li
                ? u.getMonth() -
                  f.getMonth() +
                  12 * (u.getFullYear() - f.getFullYear()) +
                  wo(u, new Date(u.getFullYear(), u.getMonth()), bt) /
                    new Date(u.getFullYear(), u.getMonth() + 1, 0).getDate()
                : i === ti
                ? u.getFullYear() -
                  f.getFullYear() +
                  hi(u, new Date(u.getFullYear(), 0), li, 1) / 12
                : i === bt || i === sr
                ? wo(u, f, i)
                : ot(u, t) / kt[i]),
            e / r
          );
        }
        function su(n, t, i) {
          return i === ti
            ? t.getFullYear() - n.getFullYear()
            : i === li
            ? 12 * su(n, t, ti) + t.getMonth() - n.getMonth()
            : i === bt
            ? Math.floor(ot(t, n) / ii)
            : Math.floor(ot(t, n) / kt[i]);
        }
        function ic(n, t) {
          for (var i, r, u = 0, f = t.length - 1; u <= f; )
            if (((i = Math.floor((u + f) / 2)), (r = t[i]), r < n)) u = i + 1;
            else {
              if (!(r > n)) {
                for (; yr(t[i - 1], n); ) i--;
                return i;
              }
              f = i - 1;
            }
          return t[i] <= n ? i : i - 1;
        }
        function dt(n, t) {
          return wi(t) ? n.parseDate(t) || h(t) : h(t);
        }
        function te(n, t) {
          var r, i;
          if (pi(t)) {
            for (r = [], i = 0; i < t.length; i++) r.push(dt(n, t[i]));
            return r;
          }
          return dt(n, t);
        }
        function rc(n, t) {
          var r, i;
          if (n instanceof Date) {
            for (r = t.length, i = 0; i < r; i++) if (yr(t[i], n)) return i;
            return -1;
          }
          return t.indexOf(n);
        }
        function hu(n) {
          var t = n._range;
          return (
            t ||
              ((t = n._range = ao(n)), (t.min = h(t.min)), (t.max = h(t.max))),
            t
          );
        }
        function bo(n, t, i) {
          for (
            var e,
              u,
              f,
              c = hu(n.categories),
              l = (n.max || c.max) - (n.min || c.min),
              y = n.autoBaseUnitSteps,
              o = n.maxDateGroups,
              a = n.baseUnit === iu,
              v = t ? ui.indexOf(t) : 0,
              r = a ? ui[v++] : n.baseUnit,
              s = l / kt[r],
              h = s;
            !u || s >= o;

          ) {
            e = e || y[r].slice(0);
            do f = e.shift();
            while (f && t === r && f < i);
            if (f) (u = f), (s = h / u);
            else {
              if (r === at(ui)) {
                u = Math.ceil(h / o);
                break;
              }
              if (!a) {
                s > o && (u = Math.ceil(h / o));
                break;
              }
              r = ui[v++] || at(ui);
              h = l / kt[r];
              e = null;
            }
          }
          n.baseUnitStep = u;
          n.baseUnit = r;
        }
        function uc(n) {
          for (
            var u,
              s,
              r,
              e,
              o = n.categories,
              h = f(o) ? o.length : 0,
              t = vi,
              i = 0;
            i < h;
            i++
          )
            (r = o[i]),
              r &&
                u &&
                ((e = fu(r, u)),
                e > 0 &&
                  ((t = Math.min(t, e)),
                  (s =
                    t >= lf
                      ? ti
                      : t >= cf - 3 * ii
                      ? li
                      : t >= hf
                      ? sr
                      : t >= ii
                      ? bt
                      : t >= tu
                      ? or
                      : t >= yi
                      ? of
                      : ef))),
              (u = r);
          n.baseUnit = s || bt;
        }
        function fc(n) {
          var t = (n.baseUnit || "").toLowerCase(),
            i = t !== iu && !lt(t, ui);
          return i && uc(n), (t !== iu && n.baseUnitStep !== eh) || bo(n), n;
        }
        function ec(n, t, i) {
          var u, r, f;
          if (!n && !t) return 0;
          if (n >= 0 && t >= 0) {
            if (
              ((r = n === t ? 0 : n),
              (f = (t - r) / t),
              i === !1 || (!i && f > uo))
            )
              return 0;
            u = Math.max(0, r - (t - r) / 2);
          } else u = n;
          return u;
        }
        function oc(n, t, i) {
          var u, r, f;
          if (!n && !t) return 1;
          if (n <= 0 && t <= 0) {
            if (
              ((r = n === t ? 0 : t),
              (f = Math.abs((r - n) / r)),
              i === !1 || (!i && f > uo))
            )
              return 0;
            u = Math.min(0, r - (n - r) / 2);
          } else u = t;
          return u;
        }
        function ko(n, i) {
          return t(Math.floor(n / i) * i, e);
        }
        function cu(n, i) {
          return t(Math.ceil(n / i) * i, e);
        }
        function lu(n) {
          return Math.max(Math.min(n, io), -io);
        }
        function sc(n, t, i) {
          var o = i.narrowRange,
            u = ec(n, t, o),
            f = oc(n, t, o),
            r = ru(u, f),
            e = { majorUnit: r };
          return (
            i.roundToMajorUnit !== !1 &&
              (u < 0 && go(u, r, 1 / 3) && (u -= r),
              f > 0 && go(f, r, 1 / 3) && (f += r)),
            (e.min = ko(u, r)),
            (e.max = cu(f, r)),
            e
          );
        }
        function hc(n, t) {
          return {
            min: f(t.min) ? Math.min(n.min, t.min) : n.min,
            max: f(t.max) ? Math.max(n.max, t.max) : n.max,
            majorUnit: n.majorUnit,
          };
        }
        function cc(n, t) {
          for (var r, i = 0; i < t.length; i++)
            (r = t[i]), null === n[r] && (n[r] = void 0);
        }
        function lc(n, t) {
          var u,
            e,
            o,
            i,
            r = t;
          return (
            t &&
              (cc(t, ["min", "max"]),
              (u = f(t.min)),
              (e = f(t.max)),
              (o = u || e),
              o && t.min === t.max && (t.min > 0 ? (t.min = 0) : (t.max = 1)),
              t.majorUnit
                ? ((n.min = ko(n.min, t.majorUnit)),
                  (n.max = cu(n.max, t.majorUnit)))
                : o && ((r = c(n, t)), (n.majorUnit = ru(r.min, r.max)))),
            (n.minorUnit = (r.majorUnit || n.majorUnit) / 5),
            (i = c(n, r)),
            i.min >= i.max &&
              (u && !e
                ? (i.max = i.min + i.majorUnit)
                : !u && e && (i.min = i.max - i.majorUnit)),
            i
          );
        }
        function go(n, i, r) {
          var u = t(Math.abs(n % i), e),
            f = i * (1 - r);
          return 0 === u || u > f;
        }
        function ac(n) {
          var t = or;
          return (
            n >= lf
              ? (t = ti)
              : n >= cf
              ? (t = li)
              : n >= hf
              ? (t = sr)
              : n >= ii && (t = bt),
            t
          );
        }
        function vc(n, t, i) {
          var f = i.min || n,
            u = i.max || t,
            r = i.baseUnit || (u && f ? ac(fu(u, f)) : or),
            c = kt[r],
            e = ou(p(f) - 1, r) || h(u),
            o = ne(p(u) + 1, r),
            w = i.majorUnit ? i.majorUnit : void 0,
            s = w || cu(ru(e.getTime(), o.getTime()), c) / c,
            l = su(e, o, r),
            b = cu(l, s),
            a = b - l,
            v = Math.floor(a / 2),
            k = a - v;
          return (
            i.baseUnit || delete i.baseUnit,
            (i.baseUnit = i.baseUnit || r),
            (i.min = i.min || y(e, -v, r)),
            (i.max = i.max || y(o, k, r)),
            (i.minorUnit = i.minorUnit || s / 5),
            (i.majorUnit = s),
            i
          );
        }
        function yc(n, t, i, r) {
          var u = i.min,
            e = i.max;
          return (
            f(i.axisCrossingValue) && i.axisCrossingValue <= 0 && ie(),
            f(r.max) ? r.max <= 0 && ie() : (e = t),
            f(r.min) ? r.min <= 0 && ie() : (u = n),
            { min: u, max: e }
          );
        }
        function pc(n, t, i) {
          var r = i.majorUnit,
            u = n;
          return (
            n <= 0
              ? (u = t <= 1 ? Math.pow(r, -2) : 1)
              : i.narrowRange || (u = Math.pow(r, Math.floor(st(n, r)))),
            u
          );
        }
        function wc(n, i) {
          var r = t(st(n, i), e) % 1;
          return n <= 0
            ? i
            : 0 !== r && (r < 0.3 || r > 0.9)
            ? Math.pow(i, st(n, i) + 0.2)
            : Math.pow(i, Math.ceil(st(n, i)));
        }
        function ie() {
          throw Error(
            "Non positive values cannot be used for a logarithmic axis"
          );
        }
        function st(n, t) {
          return Math.log(n) / Math.log(t);
        }
        function au(n, t) {
          return 180 - Math.abs(Math.abs(n - t) - 180);
        }
        function ns(n) {
          return n <= 0 ? -1 : 1;
        }
        var pt,
          ts,
          b,
          fi,
          k,
          gt,
          pr,
          bi,
          wr,
          ai,
          is,
          c,
          re,
          rs,
          ki,
          ue,
          ht,
          d,
          ft,
          di,
          it,
          fe,
          vu,
          ee,
          oe,
          e,
          se,
          us,
          yu,
          gi,
          fs,
          br,
          g,
          vi,
          nr,
          kr,
          he,
          ce,
          le,
          pu,
          tr,
          et,
          es,
          ae,
          a,
          ve,
          os,
          l,
          ir,
          i,
          r,
          ss,
          hs,
          cs,
          ls,
          ye,
          rr,
          as,
          wu,
          bu,
          pe,
          ku,
          we,
          dr,
          vs,
          ur,
          be,
          ys,
          nt,
          du,
          ps,
          f,
          gu,
          ws,
          bs,
          nf,
          ks,
          at,
          s,
          ke,
          wt,
          t,
          ds,
          ei,
          ci,
          tt,
          u,
          oi,
          de,
          gs,
          fr,
          v,
          ct,
          tf,
          nh,
          er,
          ge,
          no,
          rf,
          th,
          uf,
          ih,
          ni,
          gr,
          si,
          to,
          rh,
          ff,
          rt,
          nu,
          ef,
          of,
          or,
          bt,
          sr,
          li,
          ti,
          uh,
          sf,
          yi,
          tu,
          ii,
          hf,
          cf,
          lf,
          kt,
          fh,
          ri,
          io,
          ro,
          uo,
          eh,
          ui,
          iu,
          oh,
          af,
          vf,
          sh,
          vt,
          yf,
          fo,
          hr,
          eo,
          cr,
          pf,
          oo,
          so,
          ho,
          co,
          hh,
          ch;
        window.kendo.dataviz = window.kendo.dataviz || {};
        pt = kendo.drawing;
        ts = pt.util;
        b = pt.Path;
        fi = pt.Group;
        k = kendo.Class;
        gt = kendo.geometry;
        pr = gt.Rect;
        bi = gt.Circle;
        wr = gt.transform;
        ai = gt.Segment;
        is = kendo.dataviz;
        c = kendo.deepExtend;
        re = kendo.isFunction;
        rs = kendo.getter;
        ki = "arc";
        ue = "axisLabelClick";
        ht = "#000";
        d = "bottom";
        ft = "center";
        di = "circle";
        it = 3;
        fe = "cross";
        vu = "date";
        ee = "12px sans-serif";
        oe = 400;
        e = 10;
        se = 600;
        us = "end";
        yu = /\{\d+:?/;
        gi = "height";
        fs = 100;
        br = "inside";
        g = "left";
        vi = Number.MAX_VALUE;
        nr = -Number.MAX_VALUE;
        kr = "none";
        he = "noteClick";
        ce = "noteHover";
        le = "noteLeave";
        pu = "object";
        tr = "outside";
        et = "right";
        es = "start";
        ae = "string";
        a = "top";
        ve = "triangle";
        os = "value";
        l = "#fff";
        ir = "width";
        i = "x";
        r = "y";
        ss = {
          ARC: ki,
          AXIS_LABEL_CLICK: ue,
          BLACK: ht,
          BOTTOM: d,
          CENTER: ft,
          CIRCLE: di,
          COORD_PRECISION: it,
          CROSS: fe,
          DATE: vu,
          DEFAULT_FONT: ee,
          DEFAULT_HEIGHT: oe,
          DEFAULT_PRECISION: e,
          DEFAULT_WIDTH: se,
          END: us,
          FORMAT_REGEX: yu,
          HEIGHT: gi,
          HIGHLIGHT_ZINDEX: fs,
          INSIDE: br,
          LEFT: g,
          MAX_VALUE: vi,
          MIN_VALUE: nr,
          NONE: kr,
          NOTE_CLICK: he,
          NOTE_HOVER: ce,
          NOTE_LEAVE: le,
          OBJECT: pu,
          OUTSIDE: tr,
          RIGHT: et,
          START: es,
          STRING: ae,
          TOP: a,
          TRIANGLE: ve,
          VALUE: os,
          WHITE: l,
          WIDTH: ir,
          X: i,
          Y: r,
        };
        hs = /\s+/g;
        cs = /width|height|top|left|bottom|right/i;
        ls = {
          format: function (n, t) {
            return t;
          },
          toString: function (n) {
            return n;
          },
          parseDate: function (n) {
            return new Date(n);
          },
        };
        ye = ls;
        rr = k.extend({});
        rr.register = function (n) {
          ye = n;
        };
        Object.defineProperties &&
          Object.defineProperties(rr, {
            implementation: {
              get: function () {
                return ye;
              },
            },
          });
        as = /\{(\d+)(:[^\}]+)?\}/g;
        wu = k.extend({
          init: function (n) {
            this._intlService = n;
          },
          auto: function (n) {
            for (var t, i = [], r = arguments.length - 1; r-- > 0; )
              i[r] = arguments[r + 1];
            return (
              (t = this.intl),
              wi(n) && n.match(yu)
                ? t.format.apply(t, [n].concat(i))
                : t.toString(i[0], n)
            );
          },
          localeAuto: function (n, t, i) {
            var r = this.intl;
            return wi(n) && n.match(yu)
              ? n.replace(as, function (n, u, f) {
                  var e = t[parseInt(u, 10)];
                  return r.toString(e, f ? f.substring(1) : "", i);
                })
              : r.toString(t[0], n, i);
          },
        });
        Object.defineProperties &&
          Object.defineProperties(wu.fn, {
            intl: {
              get: function () {
                return this._intlService || rr.implementation;
              },
              set: function (n) {
                this._intlService = n;
              },
            },
          });
        bu = k.extend({
          init: function (n, t) {
            void 0 === t && (t = {});
            this._intlService = t.intlService;
            this.sender = t.sender || n;
            this.format = new wu(t.intlService);
            this.chart = n;
            this.rtl = !!t.rtl;
          },
          notify: function (n, t) {
            this.chart && this.chart.trigger(n, t);
          },
          isPannable: function (n) {
            var t = ((this.chart || {}).options || {}).pannable;
            return t && t.lock !== n;
          },
        });
        Object.defineProperties &&
          Object.defineProperties(bu.fn, {
            intl: {
              get: function () {
                return this._intlService || rr.implementation;
              },
              set: function (n) {
                this._intlService = n;
                this.format.intl = n;
              },
            },
          });
        ku = k.extend({});
        ku.register = function (n) {
          pe = n;
        };
        ku.create = function (n, t) {
          if (pe) return pe.create(n, t);
        };
        we = {
          compile: function (n) {
            return n;
          },
        };
        dr = k.extend({});
        dr.register = function (n) {
          we = n;
        };
        dr.compile = function (n) {
          return we.compile(n);
        };
        vs = {
          ChartService: bu,
          DomEventsBuilder: ku,
          FormatService: wu,
          IntlService: rr,
          TemplateService: dr,
        };
        ur = function () {
          this._map = {};
        };
        ur.prototype.get = function (n) {
          return this._map[this._key(n)];
        };
        ur.prototype.set = function (n, t) {
          this._map[this._key(n)] = t;
        };
        ur.prototype._key = function (n) {
          return n instanceof Date ? n.getTime() : n;
        };
        be = "trigger";
        ys = k.extend({
          init: function (n, t) {
            this.observer = n;
            this.handlerMap = c({}, this.handlerMap, t);
          },
          trigger: function (n, t) {
            var i,
              r = this,
              f = r.observer,
              u = r.handlerMap;
            return (
              u[n]
                ? (i = this.callObserver(u[n], t))
                : f[be] && (i = this.callObserver(be, n, t)),
              i
            );
          },
          callObserver: function (n) {
            for (var i = [], t = arguments.length - 1; t-- > 0; )
              i[t] = arguments[t + 1];
            return this.observer[n].apply(this.observer, i);
          },
          requiresHandlers: function (n) {
            var t,
              i = this;
            if (this.observer.requiresHandlers)
              return this.observer.requiresHandlers(n);
            for (t = 0; t < n.length; t++) if (i.handlerMap[n[t]]) return !0;
          },
        });
        nt = kendo.drawing.util;
        du = nt.append;
        ps = nt.bindEvents;
        f = nt.defined;
        gu = nt.deg;
        ws = nt.elementOffset;
        bs = nt.elementSize;
        nf = nt.eventElement;
        ks = nt.eventCoordinates;
        at = nt.last;
        s = nt.limitValue;
        ke = nt.objectKey;
        wt = nt.rad;
        t = nt.round;
        ds = nt.unbindEvents;
        ei = nt.valueOrDefault;
        ci = k.extend({});
        ci.fetchFonts = function (n, t, i) {
          void 0 === i && (i = { depth: 0 });
          !n ||
            i.depth > 5 ||
            !document.fonts ||
            Object.keys(n).forEach(function (r) {
              var u = n[r];
              "dataSource" !== r &&
                "$" !== r[0] &&
                u &&
                ("font" === r
                  ? t.push(u)
                  : "object" == typeof u &&
                    (i.depth++, ci.fetchFonts(u, t, i), i.depth--));
            });
        };
        ci.loadFonts = function (n, t) {
          var i = [];
          if (n.length > 0 && document.fonts) {
            try {
              i = n.map(function (n) {
                return document.fonts.load(n);
              });
            } catch (r) {
              kendo.logToConsole(r);
            }
            Promise.all(i).then(t, t);
          } else t();
        };
        ci.preloadFonts = function (n, t) {
          var i = [];
          ci.fetchFonts(n, i);
          ci.loadFonts(i, t);
        };
        tt = k.extend({
          init: function (n, t) {
            this.x = n || 0;
            this.y = t || 0;
          },
          clone: function () {
            return new tt(this.x, this.y);
          },
          equals: function (n) {
            return n && this.x === n.x && this.y === n.y;
          },
          rotate: function (n, i) {
            var f = wt(i),
              e = Math.cos(f),
              o = Math.sin(f),
              r = n.x,
              u = n.y,
              s = this,
              h = s.x,
              c = s.y;
            return (
              (this.x = t(r + (h - r) * e + (c - u) * o, it)),
              (this.y = t(u + (c - u) * e - (h - r) * o, it)),
              this
            );
          },
          multiply: function (n) {
            return (this.x *= n), (this.y *= n), this;
          },
          distanceTo: function (n) {
            var t = this.x - n.x,
              i = this.y - n.y;
            return Math.sqrt(t * t + i * i);
          },
        });
        tt.onCircle = function (n, t, i) {
          var r = wt(t);
          return new tt(n.x - i * Math.cos(r), n.y - i * Math.sin(r));
        };
        u = k.extend({
          init: function (n, t, i, r) {
            this.x1 = n || 0;
            this.y1 = t || 0;
            this.x2 = i || 0;
            this.y2 = r || 0;
          },
          equals: function (n) {
            return (
              this.x1 === n.x1 &&
              this.x2 === n.x2 &&
              this.y1 === n.y1 &&
              this.y2 === n.y2
            );
          },
          width: function () {
            return this.x2 - this.x1;
          },
          height: function () {
            return this.y2 - this.y1;
          },
          translate: function (n, t) {
            return (
              (this.x1 += n),
              (this.x2 += n),
              (this.y1 += t),
              (this.y2 += t),
              this
            );
          },
          move: function (n, t) {
            var i = this.height(),
              r = this.width();
            return (
              f(n) && ((this.x1 = n), (this.x2 = this.x1 + r)),
              f(t) && ((this.y1 = t), (this.y2 = this.y1 + i)),
              this
            );
          },
          wrap: function (n) {
            return (
              (this.x1 = Math.min(this.x1, n.x1)),
              (this.y1 = Math.min(this.y1, n.y1)),
              (this.x2 = Math.max(this.x2, n.x2)),
              (this.y2 = Math.max(this.y2, n.y2)),
              this
            );
          },
          wrapPoint: function (n) {
            var t = pi(n),
              i = t ? n[0] : n.x,
              r = t ? n[1] : n.y;
            return this.wrap(new u(i, r, i, r)), this;
          },
          snapTo: function (n, t) {
            return (
              (t !== i && t) || ((this.x1 = n.x1), (this.x2 = n.x2)),
              (t !== r && t) || ((this.y1 = n.y1), (this.y2 = n.y2)),
              this
            );
          },
          alignTo: function (n, t) {
            var f,
              e,
              o = this.height(),
              s = this.width(),
              u = t === a || t === d ? r : i,
              h = u === r ? o : s;
            return (
              t === ft
                ? ((f = n.center()),
                  (e = this.center()),
                  (this.x1 += f.x - e.x),
                  (this.y1 += f.y - e.y))
                : (this[u + 1] = t === a || t === g ? n[u + 1] - h : n[u + 2]),
              (this.x2 = this.x1 + s),
              (this.y2 = this.y1 + o),
              this
            );
          },
          shrink: function (n, t) {
            return (this.x2 -= n), (this.y2 -= t), this;
          },
          expand: function (n, t) {
            return this.shrink(-n, -t), this;
          },
          pad: function (n) {
            var t = yt(n);
            return (
              (this.x1 -= t.left),
              (this.x2 += t.right),
              (this.y1 -= t.top),
              (this.y2 += t.bottom),
              this
            );
          },
          unpad: function (n) {
            var t = yt(n);
            return (
              (t.left = -t.left),
              (t.top = -t.top),
              (t.right = -t.right),
              (t.bottom = -t.bottom),
              this.pad(t)
            );
          },
          clone: function () {
            return new u(this.x1, this.y1, this.x2, this.y2);
          },
          center: function () {
            return new tt(
              this.x1 + this.width() / 2,
              this.y1 + this.height() / 2
            );
          },
          containsPoint: function (n) {
            return (
              n.x >= this.x1 &&
              n.x <= this.x2 &&
              n.y >= this.y1 &&
              n.y <= this.y2
            );
          },
          points: function () {
            return [
              new tt(this.x1, this.y1),
              new tt(this.x2, this.y1),
              new tt(this.x2, this.y2),
              new tt(this.x1, this.y2),
            ];
          },
          getHash: function () {
            return [this.x1, this.y1, this.x2, this.y2].join(",");
          },
          overlaps: function (n) {
            return !(
              n.y2 < this.y1 ||
              this.y2 < n.y1 ||
              n.x2 < this.x1 ||
              this.x2 < n.x1
            );
          },
          rotate: function (n) {
            var t = this.width(),
              i = this.height(),
              h = this.center(),
              r = h.x,
              u = h.y,
              f = uu(0, 0, r, u, n),
              e = uu(t, 0, r, u, n),
              o = uu(t, i, r, u, n),
              s = uu(0, i, r, u, n);
            return (
              (t = Math.max(f.x, e.x, o.x, s.x) - Math.min(f.x, e.x, o.x, s.x)),
              (i = Math.max(f.y, e.y, o.y, s.y) - Math.min(f.y, e.y, o.y, s.y)),
              (this.x2 = this.x1 + t),
              (this.y2 = this.y1 + i),
              this
            );
          },
          toRect: function () {
            return new pr([this.x1, this.y1], [this.width(), this.height()]);
          },
          hasSize: function () {
            return 0 !== this.width() && 0 !== this.height();
          },
          align: function (n, t, r) {
            var u = t + 1,
              f = t + 2,
              o = t === i ? ir : gi,
              e = this[o]();
            lt(r, [g, a])
              ? ((this[u] = n[u]), (this[f] = this[u] + e))
              : lt(r, [et, d])
              ? ((this[f] = n[f]), (this[u] = this[f] - e))
              : r === ft &&
                ((this[u] = n[u] + (n[o]() - e) / 2), (this[f] = this[u] + e));
          },
        });
        oi = k.extend({
          init: function (n, t, i, r, u) {
            this.center = n;
            this.innerRadius = t;
            this.radius = i;
            this.startAngle = r;
            this.angle = u;
          },
          clone: function () {
            return new oi(
              this.center,
              this.innerRadius,
              this.radius,
              this.startAngle,
              this.angle
            );
          },
          middle: function () {
            return this.startAngle + this.angle / 2;
          },
          setRadius: function (n, t) {
            return t ? (this.innerRadius = n) : (this.radius = n), this;
          },
          point: function (n, i) {
            var r = wt(n),
              f = Math.cos(r),
              e = Math.sin(r),
              u = i ? this.innerRadius : this.radius,
              o = t(this.center.x - f * u, it),
              s = t(this.center.y - e * u, it);
            return new tt(o, s);
          },
          adjacentBox: function (n, t, i) {
            var h = this.clone().expand(n),
              r = h.middle(),
              c = h.point(r),
              l = t / 2,
              a = i / 2,
              f = Math.sin(wt(r)),
              e = Math.cos(wt(r)),
              o = c.x - l,
              s = c.y - a;
            return (
              Math.abs(f) < 0.9 && (o += (l * -e) / Math.abs(e)),
              Math.abs(e) < 0.9 && (s += (a * -f) / Math.abs(f)),
              new u(o, s, o + t, s + i)
            );
          },
          containsPoint: function (n) {
            var i = this.center,
              e = this.innerRadius,
              o = this.radius,
              a = this.startAngle,
              v = this.startAngle + this.angle,
              r = n.x - i.x,
              u = n.y - i.y,
              f = new tt(r, u),
              s = this.point(a),
              h = new tt(s.x - i.x, s.y - i.y),
              c = this.point(v),
              y = new tt(c.x - i.x, c.y - i.y),
              l = t(r * r + u * u, it);
            return (
              (h.equals(f) || wf(h, f)) && !wf(y, f) && l >= e * e && l <= o * o
            );
          },
          getBBox: function () {
            for (
              var o,
                a = this,
                r = new u(vi, vi, nr, nr),
                f = t(this.startAngle % 360),
                s = t((f + this.angle) % 360),
                l = this.innerRadius,
                n = [0, 90, 180, 270, f, s].sort(dh),
                h = n.indexOf(f),
                c = n.indexOf(s),
                e =
                  f === s
                    ? n
                    : h < c
                    ? n.slice(h, c + 1)
                    : [].concat(n.slice(0, c + 1), n.slice(h, n.length)),
                i = 0;
              i < e.length;
              i++
            )
              (o = a.point(e[i])), r.wrapPoint(o), r.wrapPoint(o, l);
            return l || r.wrapPoint(this.center), r;
          },
          expand: function (n) {
            return (this.radius += n), this;
          },
        });
        de = oi.extend({
          init: function (n, t, i, r) {
            oi.fn.init.call(this, n, 0, t, i, r);
          },
          expand: function (n) {
            return oi.fn.expand.call(this, n);
          },
          clone: function () {
            return new de(
              this.center,
              this.radius,
              this.startAngle,
              this.angle
            );
          },
          setRadius: function (n) {
            return (this.radius = n), this;
          },
        });
        gs = 0.001;
        fr = k.extend({
          createRing: function (n, t) {
            var e,
              s,
              i,
              r,
              u,
              h,
              o = n.startAngle + 180,
              f = n.angle + o;
            return (
              n.angle > 0 && o === f && (f += gs),
              (e = new gt.Point(n.center.x, n.center.y)),
              (s = Math.max(n.radius, 0)),
              (i = Math.max(n.innerRadius, 0)),
              (r = new gt.Arc(e, {
                startAngle: o,
                endAngle: f,
                radiusX: s,
                radiusY: s,
              })),
              (u = b.fromArc(r, t).close()),
              i
                ? ((r.radiusX = r.radiusY = i),
                  (h = r.pointAt(f)),
                  u.lineTo(h.x, h.y),
                  u.arc(f, o, i, i, !0))
                : u.lineTo(e.x, e.y),
              u
            );
          },
        });
        fr.current = new fr();
        v = k.extend({
          init: function (n) {
            this.children = [];
            this.options = c({}, this.options, this.initUserOptions(n));
          },
          initUserOptions: function (n) {
            return n;
          },
          reflow: function (n) {
            for (var t, r, u = this.children, i = 0; i < u.length; i++)
              (r = u[i]), r.reflow(n), (t = t ? t.wrap(r.box) : r.box.clone());
            this.box = t || n;
          },
          destroy: function () {
            var n,
              t = this.children;
            for (
              this.animation && this.animation.destroy(), n = 0;
              n < t.length;
              n++
            )
              t[n].destroy();
          },
          getRoot: function () {
            var n = this.parent;
            return n ? n.getRoot() : null;
          },
          getSender: function () {
            var n = this.getService();
            if (n) return n.sender;
          },
          getService: function () {
            for (var n = this; n; ) {
              if (n.chartService) return n.chartService;
              n = n.parent;
            }
          },
          translateChildren: function (n, t) {
            for (var r = this.children, u = r.length, i = 0; i < u; i++)
              r[i].box.translate(n, t);
          },
          append: function () {
            for (
              var t, r = arguments, i = this, n = 0;
              n < arguments.length;
              n++
            )
              (t = r[n]), i.children.push(t), (t.parent = i);
          },
          renderVisual: function () {
            this.options.visible !== !1 &&
              (this.createVisual(),
              this.addVisual(),
              this.renderChildren(),
              this.createAnimation(),
              this.renderComplete());
          },
          addVisual: function () {
            this.visual &&
              ((this.visual.chartElement = this),
              this.parent && this.parent.appendVisual(this.visual));
          },
          renderChildren: function () {
            for (var t = this.children, i = t.length, n = 0; n < i; n++)
              t[n].renderVisual();
          },
          createVisual: function () {
            this.visual = new fi({
              zIndex: this.options.zIndex,
              visible: ei(this.options.visible, !0),
            });
          },
          createAnimation: function () {
            this.visual &&
              this.options.animation &&
              (this.animation = pt.Animation.create(
                this.visual,
                this.options.animation
              ));
          },
          appendVisual: function (n) {
            n.chartElement || (n.chartElement = this);
            n.options.noclip
              ? this.clipRoot().visual.append(n)
              : f(n.options.zIndex)
              ? this.stackRoot().stackVisual(n)
              : this.isStackRoot
              ? this.stackVisual(n)
              : this.visual
              ? this.visual.append(n)
              : this.parent.appendVisual(n);
          },
          clipRoot: function () {
            return this.parent ? this.parent.clipRoot() : this;
          },
          stackRoot: function () {
            return this.parent ? this.parent.stackRoot() : this;
          },
          stackVisual: function (n) {
            for (
              var i,
                r,
                f = n.options.zIndex || 0,
                u = this.visual.children,
                e = u.length,
                t = 0;
              t < e && ((i = u[t]), (r = ei(i.options.zIndex, 0)), !(r > f));
              t++
            );
            this.visual.insert(t, n);
          },
          traverse: function (n) {
            for (var i, r = this.children, u = r.length, t = 0; t < u; t++)
              (i = r[t]), n(i), i.traverse && i.traverse(n);
          },
          closest: function (n) {
            for (var t = this, i = !1; t && !i; )
              (i = n(t)), i || (t = t.parent);
            if (i) return t;
          },
          renderComplete: function () {},
          hasHighlight: function () {
            var n = (this.options || {}).highlight;
            return !(!this.createHighlight || (n && n.visible === !1));
          },
          toggleHighlight: function (t) {
            var r,
              o = this,
              u = (this.options || {}).highlight || {},
              e = u.visual,
              i = this._highlight;
            if (!i) {
              if (
                ((r = {
                  fill: { color: l, opacity: 0.2 },
                  stroke: { color: l, width: 1, opacity: 0.2 },
                }),
                e)
              ) {
                if (
                  ((i = this._highlight =
                    e(
                      n.extend(this.highlightVisualArgs(), {
                        createVisual: function () {
                          return o.createHighlight(r);
                        },
                        sender: this.getSender(),
                        series: this.series,
                        dataItem: this.dataItem,
                        category: this.category,
                        value: this.value,
                        percentage: this.percentage,
                        runningTotal: this.runningTotal,
                        total: this.total,
                      })
                    )),
                  !i)
                )
                  return;
              } else i = this._highlight = this.createHighlight(r);
              f(i.options.zIndex) ||
                (i.options.zIndex = ei(u.zIndex, this.options.zIndex));
              this.appendVisual(i);
            }
            i.visible(t);
          },
          createGradientOverlay: function (t, i, r) {
            var u = new b(
              n.extend(
                {
                  stroke: { color: "none" },
                  fill: this.createGradient(r),
                  closed: t.options.closed,
                },
                i
              )
            );
            return u.segments.elements(t.segments.elements()), u;
          },
          createGradient: function (n) {
            if (this.parent) return this.parent.createGradient(n);
          },
        });
        v.prototype.options = {};
        ct = v.extend({
          init: function (n) {
            v.fn.init.call(this, n);
            this.options.margin = yt(this.options.margin);
            this.options.padding = yt(this.options.padding);
          },
          reflow: function (n) {
            var e,
              l,
              c,
              a,
              y = this,
              f = this.options,
              p = f.width,
              w = f.height,
              k = f.shrinkToFit,
              b = p && w,
              o = f.margin,
              s = f.padding,
              h = f.border.width,
              d = function () {
                y.align(n, i, f.align);
                y.align(n, r, f.vAlign);
                y.paddingBox = e.clone().unpad(o).unpad(h);
              },
              t = n.clone();
            for (
              b && ((t.x2 = t.x1 + p), (t.y2 = t.y1 + w)),
                k && t.unpad(o).unpad(h).unpad(s),
                v.fn.reflow.call(this, t),
                e = b ? (this.box = new u(0, 0, p, w)) : this.box,
                k && b
                  ? (d(),
                    (t = this.contentBox = this.paddingBox.clone().unpad(s)))
                  : ((t = this.contentBox = e.clone()),
                    e.pad(s).pad(h).pad(o),
                    d()),
                this.translateChildren(
                  e.x1 - t.x1 + o.left + h + s.left,
                  e.y1 - t.y1 + o.top + h + s.top
                ),
                l = this.children,
                c = 0;
              c < l.length;
              c++
            )
              (a = l[c]), a.reflow(a.box);
          },
          align: function (n, t, i) {
            this.box.align(n, t, i);
          },
          hasBox: function () {
            var n = this.options;
            return n.border.width || n.background;
          },
          createVisual: function () {
            v.fn.createVisual.call(this);
            var n = this.options;
            n.visible &&
              this.hasBox() &&
              this.visual.append(
                b.fromRect(this.paddingBox.toRect(), this.visualStyle())
              );
          },
          visualStyle: function () {
            var n = this.options,
              t = n.border || {};
            return {
              stroke: {
                width: t.width,
                color: t.color,
                opacity: ei(t.opacity, n.opacity),
                dashType: t.dashType,
              },
              fill: { color: n.background, opacity: n.opacity },
              cursor: n.cursor,
            };
          },
        });
        w(ct, {
          align: g,
          vAlign: a,
          margin: {},
          padding: {},
          border: { color: ht, width: 0 },
          background: "",
          shrinkToFit: !1,
          width: 0,
          height: 0,
          visible: !0,
        });
        tf = ct.extend({
          init: function (n, t) {
            ct.fn.init.call(this, n);
            this.pointData = t;
          },
          getElement: function () {
            var r,
              i,
              o = this,
              u = o.options,
              n = o.paddingBox,
              f = u.type,
              s = u.rotation,
              h = n.center(),
              e = n.width() / 2;
            return u.visible && this.hasBox()
              ? ((r = this.visualStyle()),
                f === di
                  ? (i = new pt.Circle(
                      new bi(
                        [t(n.x1 + e, it), t(n.y1 + n.height() / 2, it)],
                        e
                      ),
                      r
                    ))
                  : f === ve
                  ? (i = b
                      .fromPoints(
                        [
                          [n.x1 + e, n.y1],
                          [n.x1, n.y2],
                          [n.x2, n.y2],
                        ],
                        r
                      )
                      .close())
                  : f === fe
                  ? ((i = new pt.MultiPath(r)),
                    i.moveTo(n.x1, n.y1).lineTo(n.x2, n.y2),
                    i.moveTo(n.x1, n.y2).lineTo(n.x2, n.y1))
                  : (i = b.fromRect(n.toRect(), r)),
                s && i.transform(wr().rotate(-s, [h.x, h.y])),
                (i.options.zIndex = u.zIndex),
                i)
              : null;
          },
          createElement: function () {
            var i = this,
              t = this.options.visual,
              n = this.pointData || {};
            return t
              ? t({
                  value: n.value,
                  dataItem: n.dataItem,
                  sender: this.getSender(),
                  series: n.series,
                  category: n.category,
                  rect: this.paddingBox.toRect(),
                  options: this.visualOptions(),
                  createVisual: function () {
                    return i.getElement();
                  },
                })
              : this.getElement();
          },
          visualOptions: function () {
            var n = this.options;
            return {
              background: n.background,
              border: n.border,
              margin: n.margin,
              padding: n.padding,
              type: n.type,
              size: n.width,
              visible: n.visible,
            };
          },
          createVisual: function () {
            this.visual = this.createElement();
          },
        });
        w(tf, { type: di, align: ft, vAlign: ft });
        nh = "linear";
        er = "radial";
        ge = {
          glass: {
            type: nh,
            rotation: 0,
            stops: [
              { offset: 0, color: l, opacity: 0 },
              { offset: 0.25, color: l, opacity: 0.3 },
              { offset: 1, color: l, opacity: 0 },
            ],
          },
          sharpBevel: {
            type: er,
            stops: [
              { offset: 0, color: l, opacity: 0.55 },
              { offset: 0.65, color: l, opacity: 0 },
              { offset: 0.95, color: l, opacity: 0.25 },
            ],
          },
          roundedBevel: {
            type: er,
            stops: [
              { offset: 0.33, color: l, opacity: 0.06 },
              { offset: 0.83, color: l, opacity: 0.2 },
              { offset: 0.95, color: l, opacity: 0 },
            ],
          },
          roundedGlass: {
            type: er,
            supportVML: !1,
            stops: [
              { offset: 0, color: l, opacity: 0 },
              { offset: 0.5, color: l, opacity: 0.3 },
              { offset: 0.99, color: l, opacity: 0 },
            ],
          },
          sharpGlass: {
            type: er,
            supportVML: !1,
            stops: [
              { offset: 0, color: l, opacity: 0.2 },
              { offset: 0.15, color: l, opacity: 0.15 },
              { offset: 0.17, color: l, opacity: 0.35 },
              { offset: 0.85, color: l, opacity: 0.05 },
              { offset: 0.87, color: l, opacity: 0.15 },
              { offset: 0.99, color: l, opacity: 0 },
            ],
          },
          bubbleShadow: { type: er, center: [0.5, 0.5], radius: 0.5 },
        };
        no = v.extend({
          init: function (n) {
            v.fn.init.call(this, n);
            var t = this.options;
            t.width = parseInt(t.width, 10);
            t.height = parseInt(t.height, 10);
            this.gradients = {};
          },
          reflow: function () {
            var n,
              f = this,
              i = f.options,
              r = f.children,
              t = new u(0, 0, i.width, i.height);
            for (this.box = t.unpad(i.margin), n = 0; n < r.length; n++)
              r[n].reflow(t), (t = gh(t, r[n].box) || new u());
          },
          createVisual: function () {
            this.visual = new fi();
            this.createBackground();
          },
          createBackground: function () {
            var t = this.options,
              n = t.border || {},
              i = this.box.clone().pad(t.margin).unpad(n.width),
              r = b.fromRect(i.toRect(), {
                stroke: {
                  color: n.width ? n.color : "",
                  width: n.width,
                  dashType: n.dashType,
                },
                fill: { color: t.background, opacity: t.opacity },
                zIndex: -10,
              });
            this.visual.append(r);
          },
          getRoot: function () {
            return this;
          },
          createGradient: function (t) {
            var i,
              r,
              u = this.gradients,
              f = ke(t),
              e = ge[t.gradient];
            return (
              u[f]
                ? (i = u[f])
                : ((r = n.extend({}, e, t)),
                  "linear" === e.type
                    ? (i = new pt.LinearGradient(r))
                    : (t.innerRadius && (r.stops = nc(r)),
                      (i = new pt.RadialGradient(r)),
                      (i.supportVML = e.supportVML !== !1)),
                  (u[f] = i)),
              i
            );
          },
          cleanGradients: function () {
            var n,
              t = this.gradients;
            for (n in t) t[n]._observers = [];
          },
          size: function () {
            var n = this.options;
            return new u(0, 0, n.width, n.height);
          },
        });
        w(no, {
          width: se,
          height: oe,
          background: l,
          border: { color: ht, width: 0 },
          margin: yt(5),
          zIndex: -2,
        });
        rf = v.extend({
          init: function (n) {
            v.fn.init.call(this, n);
            this._initDirection();
          },
          _initDirection: function () {
            var n = this.options;
            n.vertical
              ? ((this.groupAxis = i),
                (this.elementAxis = r),
                (this.groupSizeField = ir),
                (this.elementSizeField = gi),
                (this.groupSpacing = n.spacing),
                (this.elementSpacing = n.vSpacing))
              : ((this.groupAxis = r),
                (this.elementAxis = i),
                (this.groupSizeField = gi),
                (this.elementSizeField = ir),
                (this.groupSpacing = n.vSpacing),
                (this.elementSpacing = n.spacing));
          },
          reflow: function (n) {
            this.box = n.clone();
            this.reflowChildren();
          },
          reflowChildren: function () {
            var a,
              o,
              s,
              v,
              h,
              d,
              c,
              y,
              i,
              p,
              t,
              l = this,
              r = this,
              n = r.box,
              f = r.elementAxis,
              e = r.groupAxis,
              g = r.elementSizeField,
              w = r.groupSizeField,
              b = this.groupOptions(),
              nt = b.groups,
              tt = b.groupsSize,
              rt = b.maxGroupElementsSize,
              it = nt.length,
              k = n[e + 1] + this.alignStart(tt, n[w]());
            if (it) {
              for (a = k, o = 0; o < it; o++) {
                for (
                  s = nt[o],
                    v = s.groupElements,
                    h = n[f + 1],
                    d = v.length,
                    c = 0;
                  c < d;
                  c++
                )
                  (y = v[c]),
                    (i = l.elementSize(y)),
                    (p = a + l.alignStart(i[w], s.groupSize)),
                    (t = new u()),
                    (t[e + 1] = p),
                    (t[e + 2] = p + i[w]),
                    (t[f + 1] = h),
                    (t[f + 2] = h + i[g]),
                    y.reflow(t),
                    (h += i[g] + l.elementSpacing);
                a += s.groupSize + l.groupSpacing;
              }
              n[e + 1] = k;
              n[e + 2] = k + tt;
              n[f + 2] = n[f + 1] + rt;
            }
          },
          alignStart: function (n, t) {
            var i = 0,
              r = this.options.align;
            return (
              r === et || r === d ? (i = t - n) : r === ft && (i = (t - n) / 2),
              i
            );
          },
          groupOptions: function () {
            for (
              var u,
                o,
                a = this,
                r = this,
                v = r.box,
                y = r.children,
                h = r.elementSizeField,
                w = r.groupSizeField,
                p = r.elementSpacing,
                b = r.groupSpacing,
                k = t(v[h]()),
                d = y.length,
                c = [],
                i = 0,
                n = 0,
                l = 0,
                f = 0,
                s = [],
                e = 0;
              e < d;
              e++
            )
              (u = y[e]),
                u.box || u.reflow(v),
                (o = a.elementSize(u)),
                a.options.wrap &&
                  t(n + p + o[h]) > k &&
                  (c.push({
                    groupElements: s,
                    groupSize: i,
                    groupElementsSize: n,
                  }),
                  (f = Math.max(f, n)),
                  (l += b + i),
                  (i = 0),
                  (n = 0),
                  (s = [])),
                (i = Math.max(i, o[w])),
                n > 0 && (n += p),
                (n += o[h]),
                s.push(u);
            return (
              c.push({ groupElements: s, groupSize: i, groupElementsSize: n }),
              (f = Math.max(f, n)),
              (l += i),
              { groups: c, groupsSize: l, maxGroupElementsSize: f }
            );
          },
          elementSize: function (n) {
            return { width: n.box.width(), height: n.box.height() };
          },
          createVisual: function () {},
        });
        w(rf, { vertical: !0, wrap: !0, vSpacing: 0, spacing: 0 });
        th = pt.Text;
        uf = v.extend({
          init: function (n, t) {
            v.fn.init.call(this, t);
            this.content = n;
            this.reflow(new u());
          },
          reflow: function (n) {
            var i = this.options,
              t = (i.size = ts.measureText(this.content, { font: i.font }));
            this.baseline = t.baseline;
            this.box = new u(n.x1, n.y1, n.x1 + t.width, n.y1 + t.height);
          },
          createVisual: function () {
            var n = this.options,
              t = n.font,
              i = n.color,
              r = n.opacity,
              u = n.cursor;
            this.visual = new th(this.content, this.box.toRect().topLeft(), {
              font: t,
              fill: { color: i, opacity: r },
              cursor: u,
            });
          },
        });
        w(uf, { font: ee, color: ht });
        ih = /\n/m;
        ni = ct.extend({
          init: function (n, t, i) {
            ct.fn.init.call(this, t);
            this.content = n;
            this.data = i;
            this._initContainer();
            this.options._autoReflow !== !1 && this.reflow(new u());
          },
          _initContainer: function () {
            var n,
              i,
              r = this.options,
              u = (this.content + "").split(ih),
              t = new rf({ vertical: !0, align: r.align, wrap: !1 }),
              f = c({}, r, { opacity: 1, animation: null });
            for (this.container = t, this.append(t), n = 0; n < u.length; n++)
              (i = new uf(u[n].trim(), f)), t.append(i);
          },
          reflow: function (n) {
            var t,
              f,
              i,
              r,
              u = this.options,
              e = u.visual;
            this.container.options.align = u.align;
            e && !this._boxReflow
              ? ((t = n),
                t.hasSize() ||
                  ((this._boxReflow = !0),
                  this.reflow(t),
                  (this._boxReflow = !1),
                  (t = this.box)),
                (f = this.visual = e(this.visualContext(t))),
                f &&
                  ((t = gf(f.clippedBBox() || new pr())),
                  (f.options.zIndex = u.zIndex)),
                (this.box = this.contentBox = this.paddingBox = t))
              : (ct.fn.reflow.call(this, n),
                u.rotation &&
                  ((i = yt(u.margin)),
                  (r = this.box.unpad(i)),
                  (this.targetBox = n),
                  (this.normalBox = r.clone()),
                  (r = this.rotate()),
                  r.translate(i.left - i.right, i.top - i.bottom),
                  (this.rotatedBox = r.clone()),
                  r.pad(i)));
          },
          createVisual: function () {
            var n,
              t = this.options;
            this.visual = new fi({
              transform: this.rotationTransform(),
              zIndex: t.zIndex,
              noclip: t.noclip,
            });
            this.hasBox() &&
              ((n = b.fromRect(this.paddingBox.toRect(), this.visualStyle())),
              this.visual.append(n));
          },
          renderVisual: function () {
            if (this.options.visible)
              if (this.options.visual) {
                var n = this.visual;
                n &&
                  !f(n.options.noclip) &&
                  (n.options.noclip = this.options.noclip);
                this.addVisual();
                this.createAnimation();
              } else ct.fn.renderVisual.call(this);
          },
          visualContext: function (t) {
            var i = this,
              r = {
                text: this.content,
                rect: t.toRect(),
                sender: this.getSender(),
                options: this.options,
                createVisual: function () {
                  return (
                    (i._boxReflow = !0),
                    i.reflow(t),
                    (i._boxReflow = !1),
                    i.getDefaultVisual()
                  );
                },
              };
            return this.data && n.extend(r, this.data), r;
          },
          getDefaultVisual: function () {
            this.createVisual();
            this.renderChildren();
            var n = this.visual;
            return delete this.visual, n;
          },
          rotate: function () {
            var n = this.options;
            return (
              this.box.rotate(n.rotation),
              this.align(this.targetBox, i, n.align),
              this.align(this.targetBox, r, n.vAlign),
              this.box
            );
          },
          rotationTransform: function () {
            var n,
              t,
              i,
              r,
              u = this.options.rotation;
            return u
              ? ((n = this.normalBox.center()),
                (t = n.x),
                (i = n.y),
                (r = this.rotatedBox.center()),
                wr()
                  .translate(r.x - t, r.y - i)
                  .rotate(u, [t, i]))
              : null;
          },
        });
        gr = v.extend({
          init: function (t) {
            v.fn.init.call(this, t);
            this.append(
              new ni(
                this.options.text,
                n.extend({}, this.options, { vAlign: this.options.position })
              )
            );
          },
          reflow: function (n) {
            v.fn.reflow.call(this, n);
            this.box.snapTo(n, i);
          },
        });
        gr.buildTitle = function (t, i, r) {
          var f,
            u = t;
          return (
            "string" == typeof t && (u = { text: t }),
            (u = n.extend({ visible: !0 }, r, u)),
            u && u.visible && u.text && ((f = new gr(u)), i.append(f)),
            f
          );
        };
        w(gr, {
          color: ht,
          position: a,
          align: ft,
          margin: yt(5),
          padding: yt(5),
        });
        si = ni.extend({
          init: function (n, t, i, r, f) {
            ni.fn.init.call(this, t, f);
            this.text = t;
            this.value = n;
            this.index = i;
            this.dataItem = r;
            this.reflow(new u());
          },
          visualContext: function (n) {
            var t = ni.fn.visualContext.call(this, n);
            return (
              (t.value = this.value),
              (t.dataItem = this.dataItem),
              (t.format = this.options.format),
              (t.culture = this.options.culture),
              t
            );
          },
          click: function (n, t) {
            n.trigger(ue, {
              element: nf(t),
              value: this.value,
              text: this.text,
              index: this.index,
              dataItem: this.dataItem,
              axis: this.parent.options,
            });
          },
          rotate: function () {
            var n, t;
            return (
              this.options.alignRotation !== ft
                ? ((n = this.normalBox.toRect()),
                  (t = this.rotationTransform()),
                  (this.box = gf(n.bbox(t.matrix()))))
                : ni.fn.rotate.call(this),
              this.box
            );
          },
          rotationTransform: function () {
            var s,
              h,
              c,
              u,
              o,
              n,
              w,
              l,
              v,
              b,
              k,
              ut,
              f,
              nt,
              tt,
              y,
              p,
              et,
              it = this.options,
              rt = it.rotation;
            return rt
              ? it.alignRotation === ft
                ? ni.fn.rotationTransform.call(this)
                : ((s = wr().rotate(rt).matrix()),
                  (h = this.normalBox.toRect()),
                  (c = this.targetBox.toRect()),
                  (u = it.rotationOrigin || a),
                  (o = u === a || u === d ? i : r),
                  (n = u === a || u === d ? r : i),
                  (w = u === a || u === g ? c.origin : c.bottomRight()),
                  (l = h.topLeft().transformCopy(s)),
                  (v = h.topRight().transformCopy(s)),
                  (b = h.bottomRight().transformCopy(s)),
                  (k = h.bottomLeft().transformCopy(s)),
                  (ut = pr.fromPoints(l, v, b, k)),
                  (f = {}),
                  (f[n] = c.origin[n] - ut.origin[n]),
                  (nt = Math.abs(l[n] + f[n] - w[n])),
                  (tt = Math.abs(v[n] + f[n] - w[n])),
                  t(nt, e) === t(tt, e)
                    ? ((y = l), (p = v))
                    : tt < nt
                    ? ((y = v), (p = b))
                    : ((y = l), (p = k)),
                  (et = y[o] + (p[o] - y[o]) / 2),
                  (f[o] = c.center()[o] - et),
                  wr().translate(f.x, f.y).rotate(rt))
              : null;
          },
        });
        w(si, { _autoReflow: !1 });
        to = 7;
        rh = "#fff";
        ff = ct.extend({
          init: function (n, t, i) {
            ct.fn.init.call(this, t);
            this.fields = n;
            this.chartService = i;
            this.render();
          },
          hide: function () {
            this.options.visible = !1;
          },
          show: function () {
            this.options.visible = !0;
          },
          render: function () {
            var n,
              t,
              o,
              s,
              r,
              e,
              a,
              v,
              h,
              i,
              y = this,
              l = this.options;
            l.visible &&
              ((n = l.label),
              (t = l.icon),
              (o = new u()),
              (s = function () {
                return y;
              }),
              (r = t.size),
              (e = this.fields.text),
              f(n) &&
                n.visible &&
                ((h = kf(n)),
                h
                  ? (e = h(this.fields))
                  : n.format &&
                    (e = this.chartService.format.auto(n.format, e)),
                n.color || (n.color = n.position === br ? rh : t.background),
                (this.label = new ni(e, c({}, n))),
                (this.label.aliasFor = s),
                n.position !== br ||
                  f(r) ||
                  (t.type === di
                    ? (r = Math.max(
                        this.label.box.width(),
                        this.label.box.height()
                      ))
                    : ((a = this.label.box.width()),
                      (v = this.label.box.height())),
                  o.wrap(this.label.box))),
              (t.width = a || r || to),
              (t.height = v || r || to),
              (i = new tf(c({}, t))),
              (i.aliasFor = s),
              (this.marker = i),
              this.append(i),
              this.label && this.append(this.label),
              i.reflow(new u()),
              (this.wrapperBox = o.wrap(i.box)));
          },
          reflow: function (n) {
            var i,
              o,
              t,
              h = this,
              r = h.options,
              s = h.label,
              c = h.marker,
              u = h.wrapperBox,
              f = n.center(),
              l = r.line.length,
              e = r.position;
            r.visible &&
              (lt(e, [g, et])
                ? e === g
                  ? ((t = u
                      .alignTo(n, e)
                      .translate(-l, n.center().y - u.center().y)),
                    r.line.visible &&
                      ((i = [n.x1, f.y]),
                      (this.linePoints = [i, [t.x2, f.y]]),
                      (o = t.clone().wrapPoint(i))))
                  : ((t = u
                      .alignTo(n, e)
                      .translate(l, n.center().y - u.center().y)),
                    r.line.visible &&
                      ((i = [n.x2, f.y]),
                      (this.linePoints = [i, [t.x1, f.y]]),
                      (o = t.clone().wrapPoint(i))))
                : e === d
                ? ((t = u
                    .alignTo(n, e)
                    .translate(n.center().x - u.center().x, l)),
                  r.line.visible &&
                    ((i = [f.x, n.y2]),
                    (this.linePoints = [i, [f.x, t.y1]]),
                    (o = t.clone().wrapPoint(i))))
                : ((t = u
                    .alignTo(n, e)
                    .translate(n.center().x - u.center().x, -l)),
                  r.line.visible &&
                    ((i = [f.x, n.y1]),
                    (this.linePoints = [i, [f.x, t.y2]]),
                    (o = t.clone().wrapPoint(i)))),
              c && c.reflow(t),
              s &&
                (s.reflow(t),
                c &&
                  (r.label.position === tr && s.box.alignTo(c.box, e),
                  s.reflow(s.box))),
              (this.contentBox = t),
              (this.targetBox = n),
              (this.box = o || t));
          },
          createVisual: function () {
            ct.fn.createVisual.call(this);
            this.visual.options.noclip = this.options.noclip;
            this.options.visible && this.createLine();
          },
          renderVisual: function () {
            var i = this,
              t = this.options,
              r = t.visual;
            t.visible && r
              ? ((this.visual = r(
                  n.extend(this.fields, {
                    sender: this.getSender(),
                    rect: this.targetBox.toRect(),
                    options: {
                      background: t.background,
                      border: t.background,
                      icon: t.icon,
                      label: t.label,
                      line: t.line,
                      position: t.position,
                      visible: t.visible,
                    },
                    createVisual: function () {
                      i.createVisual();
                      i.renderChildren();
                      var n = i.visual;
                      return delete i.visual, n;
                    },
                  })
                )),
                this.addVisual())
              : ct.fn.renderVisual.call(this);
          },
          createLine: function () {
            var n,
              t = this.options.line;
            this.linePoints &&
              ((n = b.fromPoints(this.linePoints, {
                stroke: {
                  color: t.color,
                  width: t.width,
                  dashType: t.dashType,
                },
              })),
              lr(n),
              this.visual.append(n));
          },
          click: function (n, t) {
            var i = this.eventArgs(t);
            n.trigger(he, i) || t.preventDefault();
          },
          over: function (n, t) {
            var i = this.eventArgs(t);
            n.trigger(ce, i) || t.preventDefault();
          },
          out: function (n, t) {
            var i = this.eventArgs(t);
            n.trigger(le, i);
          },
          eventArgs: function (t) {
            var i = this.options;
            return n.extend(this.fields, {
              element: nf(t),
              text: f(i.label) ? i.label.text : "",
              visual: this.visual,
            });
          },
        });
        w(ff, {
          icon: { visible: !0, type: di },
          label: { position: br, visible: !0, align: ft, vAlign: ft },
          line: { visible: !0 },
          visible: !0,
          position: a,
          zIndex: 2,
        });
        rt = v.extend({
          init: function (n, t) {
            void 0 === t && (t = new bu());
            v.fn.init.call(this, n);
            this.chartService = t;
            this.options.visible ||
              (this.options = c({}, this.options, {
                labels: { visible: !1 },
                line: { visible: !1 },
                margin: 0,
                majorTickSize: 0,
                minorTickSize: 0,
              }));
            this.options.minorTicks = c(
              {},
              {
                color: this.options.line.color,
                width: this.options.line.width,
                visible: this.options.minorTickType !== kr,
              },
              this.options.minorTicks,
              {
                size: this.options.minorTickSize,
                align: this.options.minorTickType,
              }
            );
            this.options.majorTicks = c(
              {},
              {
                color: this.options.line.color,
                width: this.options.line.width,
                visible: this.options.majorTickType !== kr,
              },
              this.options.majorTicks,
              {
                size: this.options.majorTickSize,
                align: this.options.majorTickType,
              }
            );
            this.initFields();
            this.options._deferLabels || this.createLabels();
            this.createTitle();
            this.createNotes();
          },
          initFields: function () {},
          labelsRange: function () {
            return { min: this.options.labels.skip, max: this.labelsCount() };
          },
          createLabels: function () {
            var f,
              t,
              i,
              r,
              e = this,
              u = this.options,
              o = u.vertical ? et : ft,
              n = c({}, u.labels, { align: o, zIndex: u.zIndex }),
              s = Math.max(1, n.step);
            if ((this.clearLabels(), n.visible))
              for (
                f = this.labelsRange(),
                  t = n.rotation,
                  bf(t) &&
                    ((n.alignRotation = t.align), (n.rotation = t.angle)),
                  "auto" === n.rotation &&
                    ((n.rotation = 0), (u.autoRotateLabels = !0)),
                  i = f.min;
                i < f.max;
                i += s
              )
                (r = e.createAxisLabel(i, n)),
                  r && (e.append(r), e.labels.push(r));
          },
          clearLabels: function () {
            this.children = ar(this.children, function (n) {
              return !(n instanceof si);
            });
            this.labels = [];
          },
          clearTitle: function () {
            var n = this;
            this.title &&
              ((this.children = ar(this.children, function (t) {
                return t !== n.title;
              })),
              (this.title = void 0));
          },
          clear: function () {
            this.clearLabels();
            this.clearTitle();
          },
          lineBox: function () {
            var i = this,
              t = i.options,
              n = i.box,
              s = t.vertical,
              r = t.labels.mirror,
              f = r ? n.x1 : n.x2,
              e = r ? n.y2 : n.y1,
              o = t.line.width || 0;
            return s
              ? new u(f, n.y1, f, n.y2 - o)
              : new u(n.x1, e, n.x2 - o, e);
          },
          createTitle: function () {
            var t,
              i = this.options,
              n = c(
                {
                  rotation: i.vertical ? -90 : 0,
                  text: "",
                  zIndex: 1,
                  visualSize: !0,
                },
                i.title
              );
            n.visible &&
              n.text &&
              ((t = new ni(n.text, n)), this.append(t), (this.title = t));
          },
          createNotes: function () {
            var r,
              i,
              n,
              u = this,
              t = this.options,
              e = t.notes,
              o = e.data || [];
            for (this.notes = [], r = 0; r < o.length; r++)
              (i = c({}, e, o[r])),
                (i.value = u.parseNoteValue(i.value)),
                (n = new ff(
                  { value: i.value, text: i.label.text, dataItem: i },
                  i,
                  u.chartService
                )),
                n.options.visible &&
                  (f(n.options.position)
                    ? t.vertical && !lt(n.options.position, [g, et])
                      ? (n.options.position = t.reverse ? g : et)
                      : t.vertical ||
                        lt(n.options.position, [a, d]) ||
                        (n.options.position = t.reverse ? d : a)
                    : (n.options.position = t.vertical
                        ? t.reverse
                          ? g
                          : et
                        : t.reverse
                        ? d
                        : a),
                  u.append(n),
                  u.notes.push(n));
          },
          parseNoteValue: function (n) {
            return n;
          },
          renderVisual: function () {
            v.fn.renderVisual.call(this);
            this.createPlotBands();
          },
          createVisual: function () {
            v.fn.createVisual.call(this);
            this.createBackground();
            this.createLine();
          },
          gridLinesVisual: function () {
            var n = this._gridLines;
            return (
              n ||
                ((n = this._gridLines = new fi({ zIndex: -2 })),
                this.appendVisual(this._gridLines)),
              n
            );
          },
          createTicks: function (n) {
            function u(t, u, o) {
              var s,
                h = t.length,
                c = Math.max(1, u.step);
              if (u.visible)
                for (s = u.skip; s < h; s += c)
                  (f(o) && s % o == 0) ||
                    ((r.tickX = e ? i.x2 : i.x2 - u.size),
                    (r.tickY = e ? i.y1 - u.size : i.y1),
                    (r.position = t[s]),
                    n.append(vo(r, u)));
            }
            var t = this.options,
              i = this.lineBox(),
              e = t.labels.mirror,
              o = t.majorTicks.visible ? t.majorUnit : 0,
              r = { vertical: t.vertical };
            u(this.getMajorTickPositions(), t.majorTicks);
            u(this.getMinorTickPositions(), t.minorTicks, o / t.minorUnit);
          },
          createLine: function () {
            var t,
              i,
              u = this.options,
              n = u.line,
              r = this.lineBox();
            n.width > 0 &&
              n.visible &&
              ((t = new b({
                stroke: {
                  width: n.width,
                  color: n.color,
                  dashType: n.dashType,
                },
              })),
              t.moveTo(r.x1, r.y1).lineTo(r.x2, r.y2),
              u._alignLines && lr(t),
              (i = this._lineGroup = new fi()),
              i.append(t),
              this.visual.append(i),
              this.createTicks(i));
          },
          getActualTickSize: function () {
            var n = this.options,
              t = 0;
            return (
              n.majorTicks.visible && n.minorTicks.visible
                ? (t = Math.max(n.majorTicks.size, n.minorTicks.size))
                : n.majorTicks.visible
                ? (t = n.majorTicks.size)
                : n.minorTicks.visible && (t = n.minorTicks.size),
              t
            );
          },
          createBackground: function () {
            var n = this,
              i = n.options,
              r = n.box,
              t = i.background;
            t &&
              ((this._backgroundPath = b.fromRect(r.toRect(), {
                fill: { color: t },
                stroke: null,
              })),
              this.visual.append(this._backgroundPath));
          },
          createPlotBands: function () {
            var u,
              f,
              r,
              n,
              t,
              i,
              s,
              h,
              e = this,
              c = this.options,
              o = c.plotBands || [],
              a = c.vertical,
              l = this.plotArea;
            if (0 !== o.length) {
              for (
                u = this._plotbandGroup = new fi({ zIndex: -1 }),
                  f = ar(this.pane.axes, function (n) {
                    return n.options.vertical !== e.options.vertical;
                  })[0],
                  r = 0;
                r < o.length;
                r++
              )
                (n = o[r]),
                  (t = void 0),
                  (i = void 0),
                  a
                    ? ((t = (f || l.axisX).lineBox()),
                      (i = e.getSlot(n.from, n.to, !0)))
                    : ((t = e.getSlot(n.from, n.to, !0)),
                      (i = (f || l.axisY).lineBox())),
                  0 !== t.width() &&
                    0 !== i.height() &&
                    ((s = new pr([t.x1, i.y1], [t.width(), i.height()])),
                    (h = b.fromRect(s, {
                      fill: { color: n.color, opacity: n.opacity },
                      stroke: null,
                    })),
                    u.append(h));
              this.appendVisual(u);
            }
          },
          createGridLines: function (n) {
            function f(n, i, r) {
              var u,
                f,
                e = n.length,
                c = Math.max(1, i.step);
              if (i.visible)
                for (u = i.skip; u < e; u += c)
                  (f = t(n[u])),
                    lt(f, s) ||
                      u % r == 0 ||
                      (a && y === f) ||
                      ((o.position = f), h.append(yo(o, i)), s.push(f));
            }
            var i = this.options,
              c = i.minorGridLines,
              e = i.majorGridLines,
              l = i.minorUnit,
              r = i.vertical,
              a = n.options.line.visible,
              v = e.visible ? i.majorUnit : 0,
              u = n.lineBox(),
              y = u[r ? "y1" : "x1"],
              o = {
                lineStart: u[r ? "x1" : "y1"],
                lineEnd: u[r ? "x2" : "y2"],
                vertical: r,
              },
              s = [],
              h = this.gridLinesVisual();
            return (
              f(this.getMajorTickPositions(), e),
              f(this.getMinorTickPositions(), c, v / l),
              h.children
            );
          },
          reflow: function (n) {
            for (
              var r,
                f = this,
                s = f.options,
                h = f.labels,
                c = f.title,
                l = s.vertical,
                a = h.length,
                e = l ? ir : gi,
                v = c ? c.box[e]() : 0,
                o = this.getActualTickSize() + s.margin + v,
                y = (this.getRoot() || {}).box || n,
                p = y[e](),
                i = 0,
                t = 0;
              t < a;
              t++
            )
              (r = h[t].box[e]()), r + o <= p && (i = Math.max(i, r));
            this.box = l
              ? new u(n.x1, n.y1, n.x1 + i + o, n.y2)
              : new u(n.x1, n.y1, n.x2, n.y1 + i + o);
            this.arrangeTitle();
            this.arrangeLabels();
            this.arrangeNotes();
          },
          getLabelsTickPositions: function () {
            return this.getMajorTickPositions();
          },
          labelTickIndex: function (n) {
            return n.index;
          },
          arrangeLabels: function () {
            for (
              var n,
                i,
                h,
                f,
                c,
                t,
                r,
                p,
                l,
                e,
                rt = this,
                w = this,
                y = w.options,
                b = w.labels,
                k = this.labelsBetweenTicks(),
                nt = y.vertical,
                tt = this.lineBox(),
                it = y.labels.mirror,
                o = this.getLabelsTickPositions(),
                v = this.getActualTickSize() + y.margin,
                s = 0;
              s < b.length;
              s++
            )
              (n = b[s]),
                (i = rt.labelTickIndex(n)),
                (h = nt ? n.box.height() : n.box.width()),
                (f = o[i] - h / 2),
                (c = void 0),
                (t = void 0),
                (r = void 0),
                nt
                  ? (k &&
                      ((t = o[i]),
                      (r = o[i + 1]),
                      (p = t + (r - t) / 2),
                      (f = p - h / 2)),
                    (l = tt.x2),
                    it
                      ? ((l += v), (n.options.rotationOrigin = g))
                      : ((l -= v + n.box.width()),
                        (n.options.rotationOrigin = et)),
                    (c = n.box.move(l, f)))
                  : (k ? ((t = o[i]), (r = o[i + 1])) : ((t = f), (r = f + h)),
                    (e = tt.y1),
                    it
                      ? ((e -= v + n.box.height()),
                        (n.options.rotationOrigin = d))
                      : ((e += v), (n.options.rotationOrigin = a)),
                    (c = new u(t, e, r, e + n.box.height()))),
                n.reflow(c);
          },
          autoRotateLabels: function () {
            var f, n, r, t, e, o, i;
            if (this.options.autoRotateLabels && !this.options.vertical) {
              for (
                f = this.getMajorTickPositions(), n = this.labels, t = 0;
                t < n.length;
                t++
              )
                if (
                  ((e = Math.abs(f[t + 1] - f[t])),
                  (o = n[t].box),
                  o.width() > e)
                ) {
                  if (o.height() > e) {
                    r = -90;
                    break;
                  }
                  r = -45;
                }
              if (r) {
                for (i = 0; i < n.length; i++)
                  (n[i].options.rotation = r), n[i].reflow(new u());
                return !0;
              }
            }
          },
          arrangeTitle: function () {
            var t = this,
              i = t.options,
              n = t.title,
              r = i.labels.mirror,
              u = i.vertical;
            n &&
              (u
                ? ((n.options.align = r ? et : g),
                  (n.options.vAlign = n.options.position))
                : ((n.options.align = n.options.position),
                  (n.options.vAlign = r ? a : d)),
              n.reflow(this.box));
          },
          arrangeNotes: function () {
            for (var n, i, u, r = this, t = 0; t < this.notes.length; t++)
              (n = r.notes[t]),
                (i = n.options.value),
                (u = void 0),
                f(i)
                  ? (r.shouldRenderNote(i) ? n.show() : n.hide(),
                    (u = r.noteSlot(i)))
                  : n.hide(),
                n.reflow(u || r.lineBox());
          },
          noteSlot: function (n) {
            return this.getSlot(n);
          },
          alignTo: function (n) {
            var u = n.lineBox(),
              f = this.options.vertical,
              t = f ? r : i;
            this.box.snapTo(u, t);
            f
              ? this.box.shrink(0, this.lineBox().height() - u.height())
              : this.box.shrink(this.lineBox().width() - u.width(), 0);
            this.box[t + 1] -= this.lineBox()[t + 1] - u[t + 1];
            this.box[t + 2] -= this.lineBox()[t + 2] - u[t + 2];
          },
          axisLabelText: function (n, t, i) {
            var u = kf(i),
              r = n;
            return (
              u
                ? (r = u({
                    value: n,
                    dataItem: t,
                    format: i.format,
                    culture: i.culture,
                  }))
                : i.format &&
                  (r = this.chartService.format.localeAuto(
                    i.format,
                    [n],
                    i.culture
                  )),
              r
            );
          },
          slot: function (n, t, i) {
            var r = this.getSlot(n, t, i);
            if (r) return r.toRect();
          },
          contentBox: function () {
            var u,
              f,
              e,
              n = this.box.clone(),
              t = this.labels;
            return (
              t.length &&
                ((u = this.options.vertical ? r : i),
                this.chartService.isPannable(u)
                  ? ((f = this.maxLabelOffset()),
                    (n[u + 1] -= f.start),
                    (n[u + 2] += f.end))
                  : (t[0].options.visible && n.wrap(t[0].box),
                    (e = t[t.length - 1]),
                    e.options.visible && n.wrap(e.box))),
              n
            );
          },
          maxLabelOffset: function () {
            for (
              var t,
                u,
                f,
                e,
                y = this,
                c = this.options,
                p = c.vertical,
                l = c.reverse,
                w = this.labelsBetweenTicks(),
                o = this.getLabelsTickPositions(),
                a = p ? r : i,
                v = this.labels,
                b = l ? 1 : 0,
                k = l ? 0 : 1,
                s = 0,
                h = 0,
                n = 0;
              n < v.length;
              n++
            )
              (t = v[n]),
                (u = y.labelTickIndex(t)),
                (f = void 0),
                (e = void 0),
                w ? ((f = o[u + b]), (e = o[u + k])) : (f = e = o[u]),
                (s = Math.max(s, f - t.box[a + 1])),
                (h = Math.max(h, t.box[a + 2] - e));
            return { start: s, end: h };
          },
          limitRange: function (n, t, i, r, u) {
            var e,
              o,
              h,
              c = this.options;
            return (n < i && u < 0 && (!f(c.min) || c.min <= i)) ||
              (r < t && u > 0 && (!f(c.max) || r <= c.max))
              ? null
              : (t < i && u > 0) || (r < n && u < 0)
              ? { min: n, max: t }
              : ((e = t - n),
                (o = n),
                (h = t),
                n < i && u < 0
                  ? ((o = s(n, i, r)), (h = s(n + e, i + e, r)))
                  : t > r &&
                    u > 0 &&
                    ((h = s(t, i, r)), (o = s(t - e, i, r - e))),
                { min: o, max: h });
          },
          valueRange: function () {
            return { min: this.seriesMin, max: this.seriesMax };
          },
          labelsBetweenTicks: function () {
            return !this.options.justified;
          },
          prepareUserOptions: function () {},
        });
        w(rt, {
          labels: { visible: !0, rotation: 0, mirror: !1, step: 1, skip: 0 },
          line: { width: 1, color: ht, visible: !0 },
          title: { visible: !0, position: ft },
          majorTicks: { align: tr, size: 4, skip: 0, step: 1 },
          minorTicks: { align: tr, size: 3, skip: 0, step: 1 },
          axisCrossingValue: 0,
          majorTickType: tr,
          minorTickType: kr,
          majorGridLines: { skip: 0, step: 1 },
          minorGridLines: {
            visible: !1,
            width: 1,
            color: ht,
            skip: 0,
            step: 1,
          },
          margin: 5,
          visible: !0,
          reverse: !1,
          justified: !0,
          notes: { label: { text: "" } },
          _alignLines: !0,
          _deferLabels: !1,
        });
        nu = "milliseconds";
        ef = "seconds";
        of = "minutes";
        or = "hours";
        bt = "days";
        sr = "weeks";
        li = "months";
        ti = "years";
        uh = 1;
        sf = 1e3;
        yi = 60 * sf;
        tu = 60 * yi;
        ii = 24 * tu;
        hf = 7 * ii;
        cf = 31 * ii;
        lf = 365 * ii;
        kt = {
          years: lf,
          months: cf,
          weeks: hf,
          days: ii,
          hours: tu,
          minutes: yi,
          seconds: sf,
          milliseconds: uh,
        };
        fh = 0.01;
        ri = rt.extend({
          initFields: function () {
            this._ticks = {};
          },
          categoriesHash: function () {
            return "";
          },
          clone: function () {
            var t = new ri(n.extend({}, this.options), this.chartService);
            return t.createLabels(), t;
          },
          initUserOptions: function (n) {
            var i,
              r,
              t = n.categories || [],
              u = f(n.min),
              e = f(n.max);
            return (
              (n.srcCategories = n.categories = t),
              (u || e) &&
                t.length &&
                ((i = u ? Math.floor(n.min) : 0),
                (r = e
                  ? n.justified
                    ? Math.floor(n.max) + 1
                    : Math.ceil(n.max)
                  : t.length),
                (n.categories = n.categories.slice(i, r))),
              n
            );
          },
          rangeIndices: function () {
            var t,
              n = this.options,
              i = n.categories.length || 1,
              r = ut(n.min) ? n.min % 1 : 0;
            return (
              (t =
                ut(n.max) && n.max % 1 != 0 && n.max < this.totalRange().max
                  ? i - (1 - (n.max % 1))
                  : i - (n.justified ? 1 : 0)),
              { min: r, max: t }
            );
          },
          totalRangeIndices: function (n) {
            var i,
              u,
              t = this.options,
              r = ut(t.min) ? t.min : 0;
            return (
              (i = ut(t.max)
                ? t.max
                : ut(t.min)
                ? r + t.categories.length
                : this.totalRange().max || 1),
              n &&
                ((u = this.totalRange()),
                (r = s(r, 0, u.max)),
                (i = s(i, 0, u.max))),
              { min: r, max: i }
            );
          },
          range: function () {
            var n = this.options,
              t = ut(n.min) ? n.min : 0,
              i = ut(n.max) ? n.max : this.totalRange().max;
            return { min: t, max: i };
          },
          roundedRange: function () {
            return this.range();
          },
          totalRange: function () {
            var n = this.options;
            return {
              min: 0,
              max:
                Math.max(this._seriesMax || 0, n.srcCategories.length) -
                (n.justified ? 1 : 0),
            };
          },
          scaleOptions: function () {
            var t = this.rangeIndices(),
              i = t.min,
              r = t.max,
              n = this.lineBox(),
              u = this.options.vertical ? n.height() : n.width(),
              f = u / (r - i || 1);
            return {
              scale: f * (this.options.reverse ? -1 : 1),
              box: n,
              min: i,
              max: r,
            };
          },
          arrangeLabels: function () {
            rt.fn.arrangeLabels.call(this);
            this.hideOutOfRangeLabels();
          },
          hideOutOfRangeLabels: function () {
            var n,
              f,
              e,
              t,
              u,
              s = this,
              h = s.box,
              o = s.labels;
            o.length &&
              ((n = this.options.vertical ? r : i),
              (f = h[n + 1]),
              (e = h[n + 2]),
              (t = o[0]),
              (u = at(o)),
              (t.box[n + 1] > e || t.box[n + 2] < f) &&
                (t.options.visible = !1),
              (u.box[n + 1] > e || u.box[n + 2] < f) &&
                (u.options.visible = !1));
          },
          getMajorTickPositions: function () {
            return this.getTicks().majorTicks;
          },
          getMinorTickPositions: function () {
            return this.getTicks().minorTicks;
          },
          getLabelsTickPositions: function () {
            return this.getTicks().labelTicks;
          },
          tickIndices: function (n) {
            for (
              var i = this.rangeIndices(),
                u = i.min,
                f = i.max,
                e = Math.ceil(f),
                t = Math.floor(u),
                r = [];
              t <= e;

            )
              r.push(t), (t += n);
            return r;
          },
          getTickPositions: function (n) {
            for (
              var e = this.options,
                h = e.vertical,
                c = e.reverse,
                f = this.scaleOptions(),
                l = f.scale,
                a = f.box,
                v = f.min,
                y = a[(h ? r : i) + (c ? 2 : 1)],
                o = this.tickIndices(n),
                s = [],
                u = 0;
              u < o.length;
              u++
            )
              s.push(y + t(l * (o[u] - v), it));
            return s;
          },
          getTicks: function () {
            var r,
              t = this.options,
              n = this._ticks,
              u = this.rangeIndices(),
              i = this.lineBox(),
              f = i.getHash() + u.min + "," + u.max + t.reverse + t.justified;
            return (
              n._hash !== f &&
                ((r = t.minorTicks.visible || t.minorGridLines.visible),
                (n._hash = f),
                (n.labelTicks = this.getTickPositions(1)),
                (n.majorTicks = this.filterOutOfRangePositions(
                  n.labelTicks,
                  i
                )),
                (n.minorTicks = r
                  ? this.filterOutOfRangePositions(
                      this.getTickPositions(0.5),
                      i
                    )
                  : [])),
              n
            );
          },
          filterOutOfRangePositions: function (n, t) {
            var e, o, s, u, f;
            if (!n.length) return n;
            for (
              e = this.options.vertical ? r : i,
                o = function (n) {
                  return t[e + 1] <= n && n <= t[e + 2];
                },
                s = n.length - 1,
                u = 0;
              !o(n[u]) && u <= s;

            )
              u++;
            for (f = s; !o(n[f]) && f >= 0; ) f--;
            return n.slice(u, f + 1);
          },
          getSlot: function (n, t, u) {
            var o,
              h,
              v = this.options,
              y = v.reverse,
              g = v.justified,
              nt = v.vertical,
              p = this.scaleOptions(),
              b = p.scale,
              c = p.box,
              k = p.min,
              e = nt ? r : i,
              d = c[e + (y ? 2 : 1)],
              w = c.clone(),
              tt = !f(t),
              a = ei(n, 0),
              l = ei(t, a);
            return (
              (l = Math.max(l - 1, a)),
              (l = Math.max(a, l)),
              (o = d + (a - k) * b),
              (h = d + (l + 1 - k) * b),
              tt && g && (h = o),
              u &&
                ((o = s(o, c[e + 1], c[e + 2])),
                (h = s(h, c[e + 1], c[e + 2]))),
              (w[e + 1] = y ? h : o),
              (w[e + 2] = y ? o : h),
              w
            );
          },
          limitSlot: function (n) {
            var e = this.options.vertical,
              t = e ? r : i,
              u = this.lineBox(),
              f = n.clone();
            return (
              (f[t + 1] = s(n[t + 1], u[t + 1], u[t + 2])),
              (f[t + 2] = s(n[t + 2], u[t + 1], u[t + 2])),
              f
            );
          },
          slot: function (n, t, i) {
            var f = Math.floor(this.options.min || 0),
              r = n,
              u = t;
            return (
              "string" == typeof r
                ? (r = this.categoryIndex(r))
                : ut(r) && (r -= f),
              "string" == typeof u
                ? (u = this.categoryIndex(u))
                : ut(u) && (u -= f),
              rt.fn.slot.call(this, r, u, i)
            );
          },
          pointCategoryIndex: function (n) {
            var t,
              s,
              f = this.options,
              l = f.reverse,
              a = f.justified,
              v = f.vertical,
              e = v ? r : i,
              u = this.scaleOptions(),
              y = u.scale,
              h = u.box,
              p = u.min,
              w = u.max,
              b = l ? w : p,
              c = h[e + 1],
              k = h[e + 2],
              o = n[e];
            return o < c || o > k
              ? null
              : ((t = b + (o - c) / y),
                (s = t % 1),
                a ? (t = Math.round(t)) : 0 === s && t > 0 && t--,
                Math.floor(t));
          },
          getCategory: function (n) {
            var t = this.pointCategoryIndex(n);
            return null === t ? null : this.options.categories[t];
          },
          categoryIndex: function (n) {
            return this.totalIndex(n) - Math.floor(this.options.min || 0);
          },
          categoryAt: function (n, t) {
            var i = this.options;
            return (t ? i.srcCategories : i.categories)[n];
          },
          categoriesCount: function () {
            return (this.options.categories || []).length;
          },
          translateRange: function (n) {
            var i = this.options,
              r = this.lineBox(),
              o = i.vertical ? r.height() : r.width(),
              u = i.categories.length,
              s = o / u,
              f = t(n / s, e);
            return { min: f, max: u + f };
          },
          zoomRange: function (n) {
            var t = this.totalRangeIndices(),
              i = this.totalRange(),
              r = i.min,
              u = i.max,
              f = s(t.min + n, r, u),
              e = s(t.max - n, r, u);
            if (e - f > 0) return { min: f, max: e };
          },
          scaleRange: function (n) {
            var t = this.options.categories.length,
              i = n * t;
            return { min: -i, max: t + i };
          },
          labelsCount: function () {
            var n = this.labelsRange();
            return n.max - n.min;
          },
          labelsRange: function () {
            var u,
              r = this.options,
              f = r.justified,
              t = r.labels,
              e = this.totalRangeIndices(!0),
              n = e.min,
              i = e.max,
              o = Math.floor(n);
            return (
              f
                ? ((n = Math.ceil(n)), (i = Math.floor(i)))
                : ((n = Math.floor(n)), (i = Math.ceil(i))),
              (u =
                n > t.skip
                  ? t.skip + t.step * Math.ceil((n - t.skip) / t.step)
                  : t.skip),
              {
                min: u - o,
                max: (r.categories.length ? i + (f ? 1 : 0) : 0) - o,
              }
            );
          },
          createAxisLabel: function (n, t) {
            var i = this.options,
              r = i.dataItems ? i.dataItems[n] : null,
              u = ei(i.categories[n], ""),
              f = this.axisLabelText(u, r, t);
            return new si(u, f, n, r, t);
          },
          shouldRenderNote: function (n) {
            var t = this.totalRangeIndices();
            return Math.floor(t.min) <= n && n <= Math.ceil(t.max);
          },
          noteSlot: function (n) {
            var t = this.options,
              i = n - Math.floor(t.min || 0);
            return this.getSlot(i);
          },
          arrangeNotes: function () {
            rt.fn.arrangeNotes.call(this);
            this.hideOutOfRangeNotes();
          },
          hideOutOfRangeNotes: function () {
            var n,
              e,
              o,
              u,
              t,
              s = this,
              f = s.notes,
              h = s.box;
            if (f && f.length)
              for (
                n = this.options.vertical ? r : i,
                  e = h[n + 1],
                  o = h[n + 2],
                  u = 0;
                u < f.length;
                u++
              )
                (t = f[u]),
                  t.box && (o < t.box[n + 1] || t.box[n + 2] < e) && t.hide();
          },
          pan: function (n) {
            var r = this.totalRangeIndices(!0),
              u = this.scaleOptions(),
              f = u.scale,
              i = t(n / f, e),
              o = this.totalRange(),
              s = r.min + i,
              h = r.max + i;
            return this.limitRange(s, h, 0, o.max, i);
          },
          pointsRange: function (n, t) {
            var f = this.options,
              y = f.reverse,
              p = f.vertical,
              u = p ? r : i,
              e = this.totalRangeIndices(!0),
              o = this.scaleOptions(),
              s = o.scale,
              w = o.box,
              h = w[u + (y ? 2 : 1)],
              b = n[u] - h,
              k = t[u] - h,
              c = e.min + b / s,
              l = e.min + k / s,
              a = Math.min(c, l),
              v = Math.max(c, l);
            if (v - a >= fh) return { min: a, max: v };
          },
          valueRange: function () {
            return this.range();
          },
          totalIndex: function (n) {
            var t = this.options;
            return this._categoriesMap
              ? this._categoriesMap.get(n)
              : rc(n, t.srcCategories);
          },
          currentRangeIndices: function () {
            var t,
              n = this.options,
              i = 0;
            return (
              ut(n.min) && (i = Math.floor(n.min)),
              (t = ut(n.max)
                ? n.justified
                  ? Math.floor(n.max)
                  : Math.ceil(n.max) - 1
                : this.totalCount() - 1),
              { min: i, max: t }
            );
          },
          mapCategories: function () {
            var i, t, n;
            if (!this._categoriesMap)
              for (
                i = this._categoriesMap = new ur(),
                  t = this.options.srcCategories,
                  n = 0;
                n < t.length;
                n++
              )
                i.set(t[n], n);
          },
          totalCount: function () {
            return Math.max(
              this.options.srcCategories.length,
              this._seriesMax || 0
            );
          },
        });
        w(ri, {
          type: "category",
          vertical: !1,
          majorGridLines: { visible: !1, width: 1, color: ht },
          labels: { zIndex: 1 },
          justified: !1,
          _deferLabels: !0,
        });
        io = 3e5;
        ro = {
          milliseconds: "HH:mm:ss.fff",
          seconds: "HH:mm:ss",
          minutes: "HH:mm",
          hours: "HH:mm",
          days: "M/d",
          weeks: "M/d",
          months: "MMM 'yy",
          years: "yyyy",
        };
        uo = 0.2;
        eh = "auto";
        ui = [nu, ef, of, or, bt, sr, li, ti];
        iu = "fit";
        oh = k.extend({
          init: function (n) {
            this.options = n;
          },
          displayIndices: function () {
            return { min: 0, max: 1 };
          },
          displayRange: function () {
            return {};
          },
          total: function () {
            return {};
          },
          valueRange: function () {
            return {};
          },
          valueIndex: function () {
            return -1;
          },
          values: function () {
            return [];
          },
          totalIndex: function () {
            return -1;
          },
          valuesCount: function () {
            return 0;
          },
          totalCount: function () {
            return 0;
          },
          dateAt: function () {
            return null;
          },
        });
        af = k.extend({
          init: function (n, t, i) {
            var f, u, e, o, s, r;
            this.options = i;
            i.baseUnitStep = i.baseUnitStep || 1;
            f = i.roundToBaseUnit;
            u = i.justified;
            this.start = y(n, 0, i.baseUnit, i.weekStartDay);
            e = this.roundToTotalStep(t);
            o = !u && yr(t, e) && !i.justifyEnd;
            this.end = this.roundToTotalStep(t, !u, o ? 1 : 0);
            s = i.min || n;
            this.valueStart = this.roundToTotalStep(s);
            this.displayStart = f ? this.valueStart : s;
            r = i.max;
            r
              ? ((this.valueEnd = this.roundToTotalStep(
                  r,
                  !1,
                  !u && yr(r, this.roundToTotalStep(r)) ? -1 : 0
                )),
                (this.displayEnd = f ? this.roundToTotalStep(r, !u) : i.max))
              : ((this.valueEnd = e),
                (this.displayEnd = f || o ? this.end : t));
            this.valueEnd < this.valueStart &&
              (this.valueEnd = this.valueStart);
            this.displayEnd <= this.displayStart &&
              (this.displayEnd = this.roundToTotalStep(
                this.displayStart,
                !1,
                1
              ));
          },
          displayRange: function () {
            return { min: this.displayStart, max: this.displayEnd };
          },
          displayIndices: function () {
            var n, t, i, r, u;
            return (
              this._indices ||
                ((n = this.options),
                (t = n.baseUnit),
                (i = n.baseUnitStep),
                (r = hi(this.displayStart, this.valueStart, t, i)),
                (u = hi(this.displayEnd, this.valueStart, t, i)),
                (this._indices = { min: r, max: u })),
              this._indices
            );
          },
          total: function () {
            return { min: this.start, max: this.end };
          },
          totalCount: function () {
            var n = this.totalIndex(this.end);
            return n + (this.options.justified ? 1 : 0);
          },
          valueRange: function () {
            return { min: this.valueStart, max: this.valueEnd };
          },
          valueIndex: function (n) {
            var t = this.options;
            return Math.floor(
              hi(n, this.valueStart, t.baseUnit, t.baseUnitStep)
            );
          },
          totalIndex: function (n) {
            var t = this.options;
            return Math.floor(hi(n, this.start, t.baseUnit, t.baseUnitStep));
          },
          dateIndex: function (n) {
            var t = this.options;
            return hi(n, this.valueStart, t.baseUnit, t.baseUnitStep);
          },
          valuesCount: function () {
            var n = this.valueIndex(this.valueEnd);
            return n + 1;
          },
          values: function () {
            var t,
              r,
              n,
              i = this._values;
            if (!i)
              for (
                t = this.options,
                  r = this.valueRange(),
                  this._values = i = [],
                  n = r.min;
                n <= r.max;

              )
                i.push(n),
                  (n = y(n, t.baseUnitStep, t.baseUnit, t.weekStartDay));
            return i;
          },
          dateAt: function (n, t) {
            var i = this.options;
            return y(
              t ? this.start : this.valueStart,
              i.baseUnitStep * n,
              i.baseUnit,
              i.weekStartDay
            );
          },
          roundToTotalStep: function (n, t, i) {
            var r = this.options,
              u = r.baseUnit,
              f = r.baseUnitStep,
              h = r.weekStartDay,
              e = this.start,
              o = hi(n, e, u, f),
              s = t ? Math.ceil(o) : Math.floor(o);
            return i && (s += i), y(e, s * f, u, h);
          },
        });
        vf = ri.extend({
          clone: function () {
            var t = new vf(n.extend({}, this.options), this.chartService);
            return t.createLabels(), t;
          },
          categoriesHash: function () {
            var n = this.dataRange.total().min;
            return this.options.baseUnit + this.options.baseUnitStep + n;
          },
          initUserOptions: function (n) {
            return n;
          },
          initFields: function () {
            var e, o, t, u, f, s, h, l, a;
            ri.fn.initFields.call(this);
            e = this.chartService;
            o = e.intl;
            t = this.options;
            u = t.categories || [];
            u._parsed || ((u = te(o, u)), (u._parsed = !0));
            t = c({ roundToBaseUnit: !0 }, t, {
              categories: u,
              min: dt(o, t.min),
              max: dt(o, t.max),
            });
            e.panning &&
              e.isPannable(t.vertical ? r : i) &&
              (t.roundToBaseUnit = !1);
            t.userSetBaseUnit = t.userSetBaseUnit || t.baseUnit;
            t.userSetBaseUnitStep = t.userSetBaseUnitStep || t.baseUnitStep;
            this.options = t;
            t.srcCategories = u;
            u.length > 0
              ? ((f = hu(u)),
                (s = t.maxDivisions),
                (this.dataRange = new af(f.min, f.max, fc(t))),
                s
                  ? ((h = this.dataRange.displayRange()),
                    (l = n.extend({}, t, {
                      justified: !0,
                      roundToBaseUnit: !1,
                      baseUnit: "fit",
                      min: h.min,
                      max: h.max,
                      maxDateGroups: s,
                    })),
                    (a = this.dataRange.options),
                    bo(l, a.baseUnit, a.baseUnitStep),
                    (this.divisionRange = new af(f.min, f.max, l)))
                  : (this.divisionRange = this.dataRange))
              : ((t.baseUnit = t.baseUnit || bt),
                (this.dataRange = this.divisionRange = new oh(t)));
          },
          tickIndices: function (n) {
            var t,
              r,
              f,
              i,
              u,
              o = this,
              h = o.dataRange,
              e = o.divisionRange,
              s = e.valuesCount();
            if (!this.options.maxDivisions || !s)
              return ri.fn.tickIndices.call(this, n);
            for (
              t = [],
                r = e.values(),
                f = 0,
                this.options.justified ||
                  ((r = r.concat(e.dateAt(s))), (f = 0.5)),
                i = 0;
              i < r.length;
              i++
            )
              t.push(h.dateIndex(r[i]) + f),
                1 !== n &&
                  i >= 1 &&
                  ((u = t.length - 1),
                  t.splice(i, 0, t[u - 1] + (t[u] - t[u - 1]) * n));
            return t;
          },
          shouldRenderNote: function (n) {
            var t = this.range(),
              i = this.options.categories || [];
            return vr(n, t.min) >= 0 && vr(n, t.max) <= 0 && i.length;
          },
          parseNoteValue: function (n) {
            return dt(this.chartService.intl, n);
          },
          noteSlot: function (n) {
            return this.getSlot(n);
          },
          translateRange: function (n) {
            var u,
              f,
              r = this.options,
              s = r.baseUnit,
              h = r.weekStartDay,
              a = r.vertical,
              c = this.lineBox(),
              v = a ? c.height() : c.width(),
              i = this.range(),
              p = v / (i.max - i.min),
              l = t(n / p, e);
            return (
              i.min &&
                i.max &&
                ((u = o(r.min || i.min, l)),
                (f = o(r.max || i.max, l)),
                (i = { min: y(u, 0, s, h), max: y(f, 0, s, h) })),
              i
            );
          },
          scaleRange: function (n) {
            var f,
              r,
              e = Math.abs(n),
              u = this.range(),
              t = u.min,
              i = u.max;
            if (t && i) {
              for (; e--; )
                (f = ot(t, i)),
                  (r = Math.round(0.1 * f)),
                  n < 0
                    ? ((t = o(t, r)), (i = o(i, -r)))
                    : ((t = o(t, -r)), (i = o(i, r)));
              u = { min: t, max: i };
            }
            return u;
          },
          labelsRange: function () {
            return {
              min: this.options.labels.skip,
              max: this.divisionRange.valuesCount(),
            };
          },
          pan: function (n) {
            var r, f, v, s, c, l, a, y, u, w, b, i;
            return this.isEmpty()
              ? null
              : ((r = this.options),
                (f = this.lineBox()),
                (v = r.vertical ? f.height() : f.width()),
                (s = this.dataRange.displayRange()),
                (c = s.min),
                (l = s.max),
                (a = this.dataRange.total()),
                (y = v / (l - c)),
                (u = t(n / y, e) * (r.reverse ? -1 : 1)),
                (w = o(c, u)),
                (b = o(l, u)),
                (i = this.limitRange(p(w), p(b), p(a.min), p(a.max), u)),
                i
                  ? ((i.min = h(i.min)),
                    (i.max = h(i.max)),
                    (i.baseUnit = r.baseUnit),
                    (i.baseUnitStep = r.baseUnitStep || 1),
                    (i.userSetBaseUnit = r.userSetBaseUnit),
                    (i.userSetBaseUnitStep = r.userSetBaseUnitStep),
                    i)
                  : void 0);
          },
          pointsRange: function (n, t) {
            var u, i, f, e, r, s, h;
            return this.isEmpty()
              ? null
              : ((u = ri.fn.pointsRange.call(this, n, t)),
                (i = this.dataRange.displayRange()),
                (f = this.dataRange.displayIndices()),
                (e = ot(i.max, i.min) / (f.max - f.min)),
                (r = this.options),
                (s = o(i.min, u.min * e)),
                (h = o(i.min, u.max * e)),
                {
                  min: s,
                  max: h,
                  baseUnit: r.userSetBaseUnit || r.baseUnit,
                  baseUnitStep: r.userSetBaseUnitStep || r.baseUnitStep,
                });
          },
          zoomRange: function (n) {
            var e,
              it,
              f,
              k,
              c,
              l,
              w,
              d,
              t,
              g,
              i,
              r,
              a,
              nt,
              rt,
              v,
              tt,
              b,
              h,
              u,
              p;
            if (this.isEmpty()) return null;
            if (
              ((e = this.options),
              (it = e.userSetBaseUnit === iu),
              (f = this.dataRange.total()),
              (k = this.dataRange.displayRange()),
              (c = k.min),
              (l = k.max),
              (w = this.dataRange.options),
              (d = w.weekStartDay),
              (t = w.baseUnit),
              (g = w.baseUnitStep),
              (i = y(c, n * g, t, d)),
              (r = y(l, -n * g, t, d)),
              it)
            )
              if (
                ((a = e.autoBaseUnitSteps),
                (nt = e.maxDateGroups),
                (rt = at(a[t]) * nt * kt[t]),
                (v = ot(l, c)),
                (tt = ot(r, i)),
                (b = ui.indexOf(t)),
                tt < kt[t] && t !== nu)
              )
                (t = ui[b - 1]),
                  (h = at(a[t])),
                  (u = (v - (nt - 1) * h * kt[t]) / 2),
                  (i = o(c, u)),
                  (r = o(l, -u));
              else if (tt > rt && t !== ti) {
                p = 0;
                do {
                  b++;
                  t = ui[b];
                  p = 0;
                  u = 2 * kt[t];
                  do (h = a[t][p]), p++;
                  while (p < a[t].length && u * h < v);
                } while (t !== ti && u * h < v);
                u = (u * h - v) / 2;
                u > 0 &&
                  ((i = o(c, -u)),
                  (r = o(l, u)),
                  (i = o(i, s(r, f.min, f.max) - r)),
                  (r = o(r, s(i, f.min, f.max) - i)));
              }
            return (
              i < f.min && (i = f.min),
              r > f.max && (r = f.max),
              i && r && ot(r, i) > 0
                ? {
                    min: i,
                    max: r,
                    baseUnit: e.userSetBaseUnit || e.baseUnit,
                    baseUnitStep: e.userSetBaseUnitStep || e.baseUnitStep,
                  }
                : void 0
            );
          },
          range: function () {
            return this.dataRange.displayRange();
          },
          createAxisLabel: function (n, t) {
            var r,
              i = this.options,
              u = i.dataItems && !i.maxDivisions ? i.dataItems[n] : null,
              f = this.divisionRange.dateAt(n),
              e = t.dateFormats[this.divisionRange.options.baseUnit];
            if (((t.format = t.format || e), (r = this.axisLabelText(f, u, t))))
              return new si(f, r, n, u, t);
          },
          categoryIndex: function (n) {
            return this.dataRange.valueIndex(n);
          },
          slot: function (n, t, i) {
            var f,
              e = this.dataRange,
              r = n,
              u = t;
            if (
              (r instanceof Date && (r = e.dateIndex(r)),
              u instanceof Date && (u = e.dateIndex(u)),
              (f = this.getSlot(r, u, i)))
            )
              return f.toRect();
          },
          getSlot: function (n, t, i) {
            var r = n,
              u = t;
            return (
              typeof r === pu && (r = this.categoryIndex(r)),
              typeof u === pu && (u = this.categoryIndex(u)),
              ri.fn.getSlot.call(this, r, u, i)
            );
          },
          valueRange: function () {
            var t = this.options,
              n = hu(t.srcCategories);
            return { min: h(n.min), max: h(n.max) };
          },
          categoryAt: function (n, t) {
            return this.dataRange.dateAt(n, t);
          },
          categoriesCount: function () {
            return this.dataRange.valuesCount();
          },
          rangeIndices: function () {
            return this.dataRange.displayIndices();
          },
          labelsBetweenTicks: function () {
            return !this.divisionRange.options.justified;
          },
          prepareUserOptions: function () {
            this.isEmpty() ||
              (this.options.categories = this.dataRange.values());
          },
          getCategory: function (n) {
            var t = this.pointCategoryIndex(n);
            return null === t ? null : this.dataRange.dateAt(t);
          },
          totalIndex: function (n) {
            return this.dataRange.totalIndex(n);
          },
          currentRangeIndices: function () {
            var n = this.dataRange.valueRange();
            return {
              min: this.dataRange.totalIndex(n.min),
              max: this.dataRange.totalIndex(n.max),
            };
          },
          totalRange: function () {
            return this.dataRange.total();
          },
          totalCount: function () {
            return this.dataRange.totalCount();
          },
          isEmpty: function () {
            return !this.options.srcCategories.length;
          },
          roundedRange: function () {
            var t, i, r;
            return this.options.roundToBaseUnit !== !1 || this.isEmpty()
              ? this.range()
              : ((t = this.options),
                (i = hu(t.srcCategories)),
                (r = new af(
                  i.min,
                  i.max,
                  n.extend({}, t, {
                    justified: !1,
                    roundToBaseUnit: !0,
                    justifyEnd: t.justified,
                  })
                )),
                r.displayRange());
          },
        });
        w(vf, {
          type: vu,
          labels: { dateFormats: ro },
          autoBaseUnitSteps: {
            milliseconds: [1, 10, 100],
            seconds: [1, 2, 5, 15, 30],
            minutes: [1, 2, 5, 15, 30],
            hours: [1, 2, 3],
            days: [1, 2, 3],
            weeks: [1, 2],
            months: [1, 2, 3, 6],
            years: [1, 2, 3, 5, 10, 25, 50],
          },
          maxDateGroups: 10,
        });
        sh = Math.pow(10, -e + 1);
        vt = rt.extend({
          init: function (t, i, r, u) {
            rt.fn.init.call(
              this,
              n.extend({}, r, { seriesMin: t, seriesMax: i }),
              u
            );
          },
          initUserOptions: function (n) {
            var t = sc(n.seriesMin, n.seriesMax, n);
            return (this.totalOptions = hc(t, n)), lc(t, n);
          },
          initFields: function () {
            this.totalMin = this.totalOptions.min;
            this.totalMax = this.totalOptions.max;
            this.totalMajorUnit = this.totalOptions.majorUnit;
            this.seriesMin = this.options.seriesMin;
            this.seriesMax = this.options.seriesMax;
          },
          clone: function () {
            return new vt(
              this.seriesMin,
              this.seriesMax,
              n.extend({}, this.options),
              this.chartService
            );
          },
          startValue: function () {
            return 0;
          },
          range: function () {
            var n = this.options;
            return { min: n.min, max: n.max };
          },
          getDivisions: function (n) {
            var i, r;
            return 0 === n
              ? 1
              : ((i = this.options),
                (r = i.max - i.min),
                Math.floor(t(r / n, it)) + 1);
          },
          getTickPositions: function (n, u) {
            var f,
              e = this.options,
              o = e.vertical,
              v = e.reverse,
              s = this.lineBox(),
              y = o ? s.height() : s.width(),
              p = e.max - e.min,
              w = y / p,
              b = n * w,
              k = this.getDivisions(n),
              h = (o ? -1 : 1) * (v ? -1 : 1),
              d = 1 === h ? 1 : 2,
              c = [],
              l = s[(o ? r : i) + d],
              a = 0;
            for (u && (a = u / n), f = 0; f < k; f++)
              f % a != 0 && c.push(t(l, it)), (l += b * h);
            return c;
          },
          getMajorTickPositions: function () {
            return this.getTickPositions(this.options.majorUnit);
          },
          getMinorTickPositions: function () {
            return this.getTickPositions(this.options.minorUnit);
          },
          getSlot: function (n, t, e) {
            var o, a, l, v, c, b, d, g, k, y, s, h, p, w;
            return (
              void 0 === e && (e = !1),
              (o = this.options),
              (a = o.vertical),
              (l = o.reverse),
              (v = a ? r : i),
              (c = this.lineBox()),
              (b = c[v + (l ? 2 : 1)]),
              (d = a ? c.height() : c.width()),
              (g = l ? -1 : 1),
              (k = g * (d / (o.max - o.min))),
              (y = new u(c.x1, c.y1, c.x1, c.y1)),
              (s = n),
              (h = t),
              f(s) || (s = h || 0),
              f(h) || (h = s || 0),
              e &&
                ((s = Math.max(Math.min(s, o.max), o.min)),
                (h = Math.max(Math.min(h, o.max), o.min))),
              a
                ? ((p = o.max - Math.max(s, h)), (w = o.max - Math.min(s, h)))
                : ((p = Math.min(s, h) - o.min), (w = Math.max(s, h) - o.min)),
              (y[v + 1] = lu(b + k * (l ? w : p))),
              (y[v + 2] = lu(b + k * (l ? p : w))),
              y
            );
          },
          getValue: function (n) {
            var h,
              u = this.options,
              f = u.vertical,
              c = u.reverse,
              l = +u.max,
              a = +u.min,
              v = f ? r : i,
              o = this.lineBox(),
              w = o[v + (c ? 2 : 1)],
              y = f ? o.height() : o.width(),
              b = c ? -1 : 1,
              s = b * (n[v] - w),
              k = (l - a) / y,
              p = s * k;
            return s < 0 || s > y ? null : ((h = f ? l - p : a + p), t(h, e));
          },
          translateRange: function (n) {
            var r = this.options,
              u = r.vertical,
              f = r.reverse,
              o = r.max,
              s = r.min,
              h = this.lineBox(),
              c = u ? h.height() : h.width(),
              l = o - s,
              a = c / l,
              i = t(n / a, e);
            return (
              (!u && !f) || (u && f) || (i = -i),
              { min: s + i, max: o + i, offset: i }
            );
          },
          scaleRange: function (n) {
            var t = this.options,
              i = -n * t.majorUnit;
            return { min: t.min - i, max: t.max + i };
          },
          labelsCount: function () {
            return this.getDivisions(this.options.majorUnit);
          },
          createAxisLabel: function (n, i) {
            var r = this.options,
              u = t(r.min + n * r.majorUnit, e),
              f = this.axisLabelText(u, null, i);
            return new si(u, f, n, null, i);
          },
          shouldRenderNote: function (n) {
            var t = this.range();
            return t.min <= n && n <= t.max;
          },
          pan: function (n) {
            var t = this.translateRange(n);
            return this.limitRange(
              t.min,
              t.max,
              this.totalMin,
              this.totalMax,
              t.offset
            );
          },
          pointsRange: function (n, t) {
            var i = this.getValue(n),
              r = this.getValue(t),
              u = Math.min(i, r),
              f = Math.max(i, r);
            if (this.isValidRange(u, f)) return { min: u, max: f };
          },
          zoomRange: function (n) {
            var t = this,
              i = t.totalMin,
              r = t.totalMax,
              u = this.scaleRange(n),
              f = s(u.min, i, r),
              e = s(u.max, i, r);
            if (this.isValidRange(f, e)) return { min: f, max: e };
          },
          isValidRange: function (n, t) {
            return t - n > sh;
          },
        });
        w(vt, {
          type: "numeric",
          min: 0,
          max: 1,
          vertical: !0,
          majorGridLines: { visible: !0, width: 1, color: ht },
          labels: { format: "#.####################" },
          zIndex: 1,
        });
        yf = rt.extend({
          init: function (n, t, i, r) {
            var e = h(n),
              o = h(t),
              f = r.intl,
              u = i || {};
            u = c(u || {}, {
              min: dt(f, u.min),
              max: dt(f, u.max),
              axisCrossingValue: te(
                f,
                u.axisCrossingValues || u.axisCrossingValue
              ),
            });
            u = vc(e, o, u);
            rt.fn.init.call(this, u, r);
            this.intlService = f;
            this.seriesMin = e;
            this.seriesMax = o;
            this.totalMin = p(ou(p(e) - 1, u.baseUnit));
            this.totalMax = p(ne(p(o) + 1, u.baseUnit));
          },
          clone: function () {
            return new yf(
              this.seriesMin,
              this.seriesMax,
              n.extend({}, this.options),
              this.chartService
            );
          },
          range: function () {
            var n = this.options;
            return { min: n.min, max: n.max };
          },
          getDivisions: function (n) {
            var t = this.options;
            return Math.floor(su(t.min, t.max, t.baseUnit) / n + 1);
          },
          getTickPositions: function (n) {
            for (
              var s,
                h,
                u = this.options,
                e = u.vertical,
                o = this.lineBox(),
                c = (e ? -1 : 1) * (u.reverse ? -1 : 1),
                v = 1 === c ? 1 : 2,
                l = o[(e ? r : i) + v],
                p = this.getDivisions(n),
                w = ot(u.max, u.min),
                b = e ? o.height() : o.width(),
                k = b / w,
                a = [l],
                f = 1;
              f < p;
              f++
            )
              (s = y(u.min, f * n, u.baseUnit)),
                (h = l + ot(s, u.min) * k * c),
                a.push(t(h, it));
            return a;
          },
          getMajorTickPositions: function () {
            return this.getTickPositions(this.options.majorUnit);
          },
          getMinorTickPositions: function () {
            return this.getTickPositions(this.options.minorUnit);
          },
          getSlot: function (n, t, i) {
            return vt.prototype.getSlot.call(
              this,
              dt(this.intlService, n),
              dt(this.intlService, t),
              i
            );
          },
          getValue: function (n) {
            var t = vt.prototype.getValue.call(this, n);
            return null !== t ? h(t) : null;
          },
          labelsCount: function () {
            return this.getDivisions(this.options.majorUnit);
          },
          createAxisLabel: function (n, t) {
            var u,
              f,
              i = this.options,
              e = n * i.majorUnit,
              r = i.min;
            return (
              e > 0 && (r = y(r, e, i.baseUnit)),
              (u = t.dateFormats[i.baseUnit]),
              (t.format = t.format || u),
              (f = this.axisLabelText(r, null, t)),
              new si(r, f, n, null, t)
            );
          },
          translateRange: function (n, i) {
            var r = this.options,
              h = r.baseUnit,
              c = r.weekStartDay,
              l = this.lineBox(),
              v = r.vertical ? l.height() : l.width(),
              a = this.range(),
              p = v / ot(a.max, a.min),
              u = t(n / p, e) * (r.reverse ? -1 : 1),
              f = o(r.min, u),
              s = o(r.max, u);
            return (
              i || ((f = y(f, 0, h, c)), (s = y(s, 0, h, c))),
              { min: f, max: s, offset: u }
            );
          },
          scaleRange: function (n) {
            for (
              var u, r, f = this.options, t = f.min, i = f.max, e = Math.abs(n);
              e--;

            )
              (u = ot(t, i)),
                (r = Math.round(0.1 * u)),
                n < 0
                  ? ((t = o(t, r)), (i = o(i, -r)))
                  : ((t = o(t, -r)), (i = o(i, r)));
            return { min: t, max: i };
          },
          shouldRenderNote: function (n) {
            var t = this.range();
            return vr(n, t.min) >= 0 && vr(n, t.max) <= 0;
          },
          pan: function (n) {
            var t = this.translateRange(n, !0),
              i = this.limitRange(
                p(t.min),
                p(t.max),
                this.totalMin,
                this.totalMax,
                t.offset
              );
            if (i) return { min: h(i.min), max: h(i.max) };
          },
          pointsRange: function (n, t) {
            var i = this.getValue(n),
              r = this.getValue(t),
              u = Math.min(i, r),
              f = Math.max(i, r);
            return { min: h(u), max: h(f) };
          },
          zoomRange: function (n) {
            var t = this.scaleRange(n),
              i = h(s(p(t.min), this.totalMin, this.totalMax)),
              r = h(s(p(t.max), this.totalMin, this.totalMax));
            return { min: i, max: r };
          },
        });
        w(yf, {
          type: vu,
          majorGridLines: { visible: !0, width: 1, color: ht },
          labels: { dateFormats: ro },
        });
        fo = 10;
        hr = rt.extend({
          init: function (n, i, r, u) {
            var o = c({ majorUnit: fo, min: n, max: i }, r),
              s = o.majorUnit,
              l = wc(i, s),
              a = pc(n, i, o),
              h = yc(a, l, o, r);
            o.max = h.max;
            o.min = h.min;
            o.minorUnit = r.minorUnit || t(s - 1, e);
            rt.fn.init.call(this, o, u);
            this.totalMin = f(r.min) ? Math.min(a, r.min) : a;
            this.totalMax = f(r.max) ? Math.max(l, r.max) : l;
            this.logMin = t(st(h.min, s), e);
            this.logMax = t(st(h.max, s), e);
            this.seriesMin = n;
            this.seriesMax = i;
            this.createLabels();
          },
          clone: function () {
            return new hr(
              this.seriesMin,
              this.seriesMax,
              n.extend({}, this.options),
              this.chartService
            );
          },
          startValue: function () {
            return this.options.min;
          },
          getSlot: function (n, t, e) {
            var l,
              a,
              y = this,
              h = y.options,
              p = y.logMin,
              w = y.logMax,
              v = h.reverse,
              b = h.vertical,
              g = h.majorUnit,
              k = b ? r : i,
              c = this.lineBox(),
              nt = c[k + (v ? 2 : 1)],
              it = b ? c.height() : c.width(),
              rt = v ? -1 : 1,
              tt = rt * (it / (w - p)),
              d = new u(c.x1, c.y1, c.x1, c.y1),
              o = n,
              s = t;
            return (
              f(o) || (o = s || 1),
              f(s) || (s = o || 1),
              o <= 0 || s <= 0
                ? null
                : (e &&
                    ((o = Math.max(Math.min(o, h.max), h.min)),
                    (s = Math.max(Math.min(s, h.max), h.min))),
                  (o = st(o, g)),
                  (s = st(s, g)),
                  b
                    ? ((l = w - Math.max(o, s)), (a = w - Math.min(o, s)))
                    : ((l = Math.min(o, s) - p), (a = Math.max(o, s) - p)),
                  (d[k + 1] = lu(nt + tt * (v ? a : l))),
                  (d[k + 2] = lu(nt + tt * (v ? l : a))),
                  d)
            );
          },
          getValue: function (n) {
            var c,
              u = this,
              f = u.options,
              l = u.logMin,
              p = u.logMax,
              w = f.reverse,
              o = f.vertical,
              b = f.majorUnit,
              s = this.lineBox(),
              a = o === w ? 1 : -1,
              k = 1 === a ? 1 : 2,
              v = o ? s.height() : s.width(),
              d = (p - l) / v,
              y = o ? r : i,
              g = s[y + k],
              h = a * (n[y] - g),
              nt = h * d;
            return h < 0 || h > v ? null : ((c = l + nt), t(Math.pow(b, c), e));
          },
          range: function () {
            var n = this.options;
            return { min: n.min, max: n.max };
          },
          scaleRange: function (n) {
            var t = this.options.majorUnit,
              i = -n;
            return {
              min: Math.pow(t, this.logMin - i),
              max: Math.pow(t, this.logMax + i),
            };
          },
          translateRange: function (n) {
            var r = this,
              u = r.options,
              o = r.logMin,
              s = r.logMax,
              h = u.reverse,
              f = u.vertical,
              c = u.majorUnit,
              l = this.lineBox(),
              a = f ? l.height() : l.width(),
              v = a / (s - o),
              i = t(n / v, e);
            return (
              (!f && !h) || (f && h) || (i = -i),
              { min: Math.pow(c, o + i), max: Math.pow(c, s + i), offset: i }
            );
          },
          labelsCount: function () {
            var n = Math.floor(this.logMax);
            return Math.floor(n - this.logMin) + 1;
          },
          getMajorTickPositions: function () {
            var n = [];
            return (
              this.traverseMajorTicksPositions(
                function (t) {
                  n.push(t);
                },
                { step: 1, skip: 0 }
              ),
              n
            );
          },
          createTicks: function (n) {
            function u(t, u) {
              r.tickX = o ? i.x2 : i.x2 - u.size;
              r.tickY = o ? i.y1 - u.size : i.y1;
              r.position = t;
              n.append(vo(r, u));
            }
            var t = this.options,
              f = t.majorTicks,
              e = t.minorTicks,
              s = t.vertical,
              o = t.labels.mirror,
              i = this.lineBox(),
              r = { vertical: s };
            return (
              f.visible && this.traverseMajorTicksPositions(u, f),
              e.visible && this.traverseMinorTicksPositions(u, e),
              []
            );
          },
          createGridLines: function (n) {
            function r(n, t) {
              lt(n, s) || ((o.position = n), h.append(yo(o, t)), s.push(n));
            }
            var t = this.options,
              u = t.minorGridLines,
              f = t.majorGridLines,
              i = t.vertical,
              e = n.lineBox(),
              o = {
                lineStart: e[i ? "x1" : "y1"],
                lineEnd: e[i ? "x2" : "y2"],
                vertical: i,
              },
              s = [],
              h = this.gridLinesVisual();
            return (
              f.visible && this.traverseMajorTicksPositions(r, f),
              u.visible && this.traverseMinorTicksPositions(r, u),
              h.children
            );
          },
          traverseMajorTicksPositions: function (n, i) {
            for (
              var u,
                f = this._lineOptions(),
                h = f.lineStart,
                c = f.step,
                o = this,
                s = o.logMin,
                l = o.logMax,
                r = Math.ceil(s) + i.skip;
              r <= l;
              r += i.step
            )
              (u = t(h + c * (r - s), e)), n(u, i);
          },
          traverseMinorTicksPositions: function (n, i) {
            for (
              var s,
                u,
                f,
                h,
                v = this,
                o = this.options,
                y = o.min,
                p = o.max,
                w = o.minorUnit,
                b = o.majorUnit,
                c = this._lineOptions(),
                k = c.lineStart,
                d = c.step,
                l = this,
                a = l.logMin,
                g = l.logMax,
                nt = Math.floor(a),
                r = nt;
              r < g;
              r++
            )
              for (
                s = v._minorIntervalOptions(r), u = i.skip;
                u < w && ((f = s.value + u * s.minorStep), !(f > p));
                u += i.step
              )
                f >= y && ((h = t(k + d * (st(f, b) - a), e)), n(h, i));
          },
          createAxisLabel: function (n, t) {
            var r = Math.ceil(this.logMin + n),
              i = Math.pow(this.options.majorUnit, r),
              u = this.axisLabelText(i, null, t);
            return new si(i, u, n, null, t);
          },
          shouldRenderNote: function (n) {
            var t = this.range();
            return t.min <= n && n <= t.max;
          },
          pan: function (n) {
            var t = this.translateRange(n);
            return this.limitRange(
              t.min,
              t.max,
              this.totalMin,
              this.totalMax,
              t.offset
            );
          },
          pointsRange: function (n, t) {
            var i = this.getValue(n),
              r = this.getValue(t),
              u = Math.min(i, r),
              f = Math.max(i, r);
            return { min: u, max: f };
          },
          zoomRange: function (n) {
            var u = this,
              i = u.options,
              f = u.totalMin,
              o = u.totalMax,
              l = this.scaleRange(n),
              h = s(l.min, f, o),
              c = s(l.max, f, o),
              r = i.majorUnit,
              a =
                c > h &&
                i.min &&
                i.max &&
                t(st(i.max, r) - st(i.min, r), e) < 1,
              v =
                !(i.min === f && i.max === o) && t(st(c, r) - st(h, r), e) >= 1;
            if (a || v) return { min: h, max: c };
          },
          _minorIntervalOptions: function (n) {
            var t = this.options,
              u = t.minorUnit,
              i = t.majorUnit,
              r = Math.pow(i, n),
              f = Math.pow(i, n + 1),
              e = f - r,
              o = e / u;
            return { value: r, minorStep: o };
          },
          _lineOptions: function () {
            var u = this.options,
              e = u.reverse,
              t = u.vertical,
              o = t ? r : i,
              n = this.lineBox(),
              f = t === e ? 1 : -1,
              s = 1 === f ? 1 : 2,
              h = t ? n.height() : n.width(),
              c = f * (h / (this.logMax - this.logMin)),
              l = n[o + s];
            return { step: c, lineStart: l, lineBox: n };
          },
        });
        w(hr, {
          type: "log",
          majorUnit: fo,
          minorUnit: 1,
          axisCrossingValue: 1,
          vertical: !0,
          majorGridLines: { visible: !0, width: 1, color: ht },
          zIndex: 1,
          _deferLabels: !0,
        });
        eo = {
          createGridLines: function (n) {
            var u,
              f,
              t = this.options,
              e = Math.abs(this.box.center().y - n.lineBox().y1),
              i = [],
              r = !1;
            return (
              t.majorGridLines.visible &&
                ((u = this.majorGridLineAngles(n)),
                (r = !0),
                (i = this.renderMajorGridLines(u, e, t.majorGridLines))),
              t.minorGridLines.visible &&
                ((f = this.minorGridLineAngles(n, r)),
                du(i, this.renderMinorGridLines(f, e, t.minorGridLines, n, r))),
              i
            );
          },
          renderMajorGridLines: function (n, t, i) {
            return this.renderGridLines(n, t, i);
          },
          renderMinorGridLines: function (n, t, i, r, u) {
            var f = this.radiusCallback && this.radiusCallback(t, r, u);
            return this.renderGridLines(n, t, i, f);
          },
          renderGridLines: function (n, t, i, r) {
            for (
              var f,
                h = {
                  stroke: {
                    width: i.width,
                    color: i.color,
                    dashType: i.dashType,
                  },
                },
                o = this.box.center(),
                e = new bi([o.x, o.y], t),
                s = this.gridLinesVisual(),
                u = 0;
              u < n.length;
              u++
            )
              (f = new b(h)),
                r && (e.radius = r(n[u])),
                f.moveTo(e.center).lineTo(e.pointAt(n[u] + 180)),
                s.append(f);
            return s.children;
          },
          gridLineAngles: function (n, t, i, r, u) {
            var e = this,
              o = this.intervals(t, i, r, u),
              f = n.options,
              s = f.visible && (f.line || {}).visible !== !1;
            return df(o, function (n) {
              var t = e.intervalAngle(n);
              if (!s || 90 !== t) return t;
            });
          },
        };
        cr = ri.extend({
          range: function () {
            return { min: 0, max: this.options.categories.length };
          },
          reflow: function (n) {
            this.box = n;
            this.reflowLabels();
          },
          lineBox: function () {
            return this.box;
          },
          reflowLabels: function () {
            for (
              var i,
                e = this,
                r = this,
                t = r.labels,
                f = r.options.labels,
                o = f.skip || 0,
                s = f.step || 1,
                h = new u(),
                n = 0;
              n < t.length;
              n++
            )
              t[n].reflow(h),
                (i = t[n].box),
                t[n].reflow(
                  e.getSlot(o + n * s).adjacentBox(0, i.width(), i.height())
                );
          },
          intervals: function (n, i, r, u) {
            var o, l, s, h, a, v, c, f, e;
            for (
              void 0 === u && (u = !1),
                o = this.options,
                l = o.categories.length,
                s = l / n || 1,
                h = 360 / s,
                a = i || 0,
                v = r || 1,
                c = [],
                f = 0,
                e = a;
              e < s;
              e += v
            )
              (f = o.reverse ? 360 - e * h : e * h),
                (f = t(f, it) % 360),
                (u && lt(f, u)) || c.push(f);
            return c;
          },
          majorIntervals: function () {
            return this.intervals(1);
          },
          minorIntervals: function () {
            return this.intervals(0.5);
          },
          intervalAngle: function (n) {
            return (360 + n + this.options.startAngle) % 360;
          },
          majorAngles: function () {
            var n = this;
            return df(this.majorIntervals(), function (t) {
              return n.intervalAngle(t);
            });
          },
          createLine: function () {
            return [];
          },
          majorGridLineAngles: function (n) {
            var t = this.options.majorGridLines;
            return this.gridLineAngles(n, 1, t.skip, t.step);
          },
          minorGridLineAngles: function (n, t) {
            var i = this.options,
              r = i.minorGridLines,
              u = i.majorGridLines,
              f = t ? this.intervals(1, u.skip, u.step) : null;
            return this.gridLineAngles(n, 0.5, r.skip, r.step, f);
          },
          radiusCallback: function (n, t, i) {
            var r, u, f, e;
            if (t.options.type !== ki)
              return (
                (r = wt(180 / this.options.categories.length)),
                (u = Math.cos(r) * n),
                (f = this.majorAngles()),
                (e = function (t) {
                  return !i && lt(t, f) ? n : u;
                })
              );
          },
          createPlotBands: function () {
            for (
              var n,
                i,
                r,
                u,
                f,
                e,
                o = this,
                s = this.options.plotBands || [],
                h = (this._plotbandGroup = new fi({ zIndex: -1 })),
                t = 0;
              t < s.length;
              t++
            )
              (n = s[t]),
                (i = o.plotBandSlot(n)),
                (r = o.getSlot(n.from)),
                (u = n.from - Math.floor(n.from)),
                (i.startAngle += u * r.angle),
                (f = Math.ceil(n.to) - n.to),
                (i.angle -= (f + u) * r.angle),
                (e = fr.current.createRing(i, {
                  fill: { color: n.color, opacity: n.opacity },
                  stroke: { opacity: n.opacity },
                })),
                h.append(e);
            this.appendVisual(h);
          },
          plotBandSlot: function (n) {
            return this.getSlot(n.from, n.to - 1);
          },
          getSlot: function (n, t) {
            var r,
              f,
              e,
              o,
              h = this.options,
              c = h.justified,
              l = this.box,
              a = this.majorAngles(),
              u = a.length,
              v = 360 / u,
              i = n;
            return (
              h.reverse && !c && (i = (i + 1) % u),
              (i = s(Math.floor(i), 0, u - 1)),
              (r = a[i]),
              c && ((r -= v / 2), r < 0 && (r += 360)),
              (f = s(Math.ceil(t || i), i, u - 1)),
              (e = f - i + 1),
              (o = v * e),
              new oi(l.center(), 0, l.height() / 2, r, o)
            );
          },
          slot: function (n, t) {
            var i = this.getSlot(n, t),
              r = i.startAngle + 180,
              u = r + i.angle;
            return new gt.Arc([i.center.x, i.center.y], {
              startAngle: r,
              endAngle: u,
              radiusX: i.radius,
              radiusY: i.radius,
            });
          },
          pointCategoryIndex: function (n) {
            for (
              var i,
                u = this,
                f = this.options.categories.length,
                r = null,
                t = 0;
              t < f;
              t++
            )
              if (((i = u.getSlot(t)), i.containsPoint(n))) {
                r = t;
                break;
              }
            return r;
          },
        });
        w(cr, {
          startAngle: 90,
          labels: { margin: yt(10) },
          majorGridLines: { visible: !0 },
          justified: !0,
        });
        c(cr.prototype, eo);
        pf = rt.extend({
          init: function (n, t) {
            rt.fn.init.call(this, n, t);
            var i = this.options;
            i.minorUnit = i.minorUnit || i.majorUnit / 2;
          },
          getDivisions: function (n) {
            return vt.prototype.getDivisions.call(this, n) - 1;
          },
          reflow: function (n) {
            this.box = n;
            this.reflowLabels();
          },
          reflowLabels: function () {
            for (
              var i,
                e = this,
                r = this,
                o = r.options,
                t = r.labels,
                f = r.options.labels,
                s = f.skip || 0,
                h = f.step || 1,
                c = new u(),
                l = this.intervals(o.majorUnit, s, h),
                n = 0;
              n < t.length;
              n++
            )
              t[n].reflow(c),
                (i = t[n].box),
                t[n].reflow(
                  e.getSlot(l[n]).adjacentBox(0, i.width(), i.height())
                );
          },
          lineBox: function () {
            return this.box;
          },
          intervals: function (n, t, i, r) {
            var o, s, f, h, c, u, e;
            for (
              void 0 === r && (r = !1),
                o = this.options.min,
                s = this.getDivisions(n),
                f = [],
                h = t || 0,
                c = i || 1,
                u = h;
              u < s;
              u += c
            )
              (e = (360 + o + u * n) % 360), (r && lt(e, r)) || f.push(e);
            return f;
          },
          majorIntervals: function () {
            return this.intervals(this.options.majorUnit);
          },
          minorIntervals: function () {
            return this.intervals(this.options.minorUnit);
          },
          intervalAngle: function (n) {
            return (540 - n - this.options.startAngle) % 360;
          },
          createLine: function () {
            return [];
          },
          majorGridLineAngles: function (n) {
            var t = this.options.majorGridLines;
            return this.gridLineAngles(
              n,
              this.options.majorUnit,
              t.skip,
              t.step
            );
          },
          minorGridLineAngles: function (n, t) {
            var i = this.options,
              r = i.minorGridLines,
              u = i.majorGridLines,
              f = t ? this.intervals(i.majorUnit, u.skip, u.step) : null;
            return this.gridLineAngles(n, i.minorUnit, r.skip, r.step, f);
          },
          plotBandSlot: function (n) {
            return this.getSlot(n.from, n.to);
          },
          getSlot: function (n, t) {
            var f,
              e = this,
              u = e.options,
              o = e.box,
              h = u.startAngle,
              i = s(n, u.min, u.max),
              r = s(t || i, i, u.max);
            return (
              u.reverse && ((i *= -1), (r *= -1)),
              (i = (540 - i - h) % 360),
              (r = (540 - r - h) % 360),
              r < i && ((f = i), (i = r), (r = f)),
              new oi(o.center(), 0, o.height() / 2, i, r - i)
            );
          },
          slot: function (n, t) {
            var f, e, i, o, s, r, u;
            return (
              void 0 === t && (t = n),
              (f = this.options),
              (e = 360 - f.startAngle),
              (i = this.getSlot(n, t)),
              (o = Math.min(n, t)),
              (s = Math.max(n, t)),
              f.reverse ? ((r = o), (u = s)) : ((r = 360 - s), (u = 360 - o)),
              (r = (r + e) % 360),
              (u = (u + e) % 360),
              new gt.Arc([i.center.x, i.center.y], {
                startAngle: r,
                endAngle: u,
                radiusX: i.radius,
                radiusY: i.radius,
              })
            );
          },
          getValue: function (n) {
            var t = this.options,
              i = this.box.center(),
              f = n.x - i.x,
              e = n.y - i.y,
              r = Math.round(gu(Math.atan2(e, f))),
              u = t.startAngle;
            return t.reverse || ((r *= -1), (u *= -1)), (r + u + 360) % 360;
          },
          valueRange: function () {
            return { min: 0, max: 2 * Math.PI };
          },
        });
        w(pf, {
          type: "polar",
          startAngle: 0,
          reverse: !1,
          majorUnit: 60,
          min: 0,
          max: 360,
          labels: { margin: yt(10) },
          majorGridLines: { color: ht, visible: !0, width: 1 },
          minorGridLines: { color: "#aaa" },
        });
        c(pf.prototype, eo, {
          createPlotBands: cr.prototype.createPlotBands,
          majorAngles: cr.prototype.majorAngles,
          range: vt.prototype.range,
          labelsCount: vt.prototype.labelsCount,
          createAxisLabel: vt.prototype.createAxisLabel,
        });
        oo = {
          options: { majorGridLines: { visible: !0 } },
          createPlotBands: function () {
            var u,
              c,
              t,
              f,
              i,
              n,
              e,
              o,
              s,
              h,
              l = this,
              a = this.options,
              v = a.majorGridLines.type,
              r = a.plotBands;
            for (
              void 0 === r && (r = []),
                u = this.plotArea.polarAxis,
                c = u.majorAngles(),
                t = u.box.center(),
                f = this._plotbandGroup = new fi({ zIndex: -1 }),
                i = 0;
              i < r.length;
              i++
            )
              (n = r[i]),
                (e = {
                  fill: { color: n.color, opacity: n.opacity },
                  stroke: { opacity: n.opacity },
                }),
                (o = l.getSlot(n.from, n.to, !0)),
                (s = new oi(t, t.y - o.y2, t.y - o.y1, 0, 360)),
                (h = void 0),
                (h =
                  v === ki
                    ? fr.current.createRing(s, e)
                    : b.fromPoints(l.plotBandPoints(s, c), e).close()),
                f.append(h);
            this.appendVisual(f);
          },
          plotBandPoints: function (n, t) {
            for (
              var r = [],
                u = [],
                f = [n.center.x, n.center.y],
                e = new bi(f, n.innerRadius),
                o = new bi(f, n.radius),
                i = 0;
              i < t.length;
              i++
            )
              r.push(e.pointAt(t[i] + 180)), u.push(o.pointAt(t[i] + 180));
            return r.reverse(), r.push(r[0]), u.push(u[0]), u.concat(r);
          },
          createGridLines: function (n) {
            var r,
              t = this.options,
              e = this.radarMajorGridLinePositions(),
              u = n.majorAngles(),
              f = n.box.center(),
              i = [];
            return (
              t.majorGridLines.visible &&
                (i = this.renderGridLines(f, e, u, t.majorGridLines)),
              t.minorGridLines.visible &&
                ((r = this.radarMinorGridLinePositions()),
                du(i, this.renderGridLines(f, r, u, t.minorGridLines))),
              i
            );
          },
          renderGridLines: function (n, t, i, r) {
            var u,
              f,
              e,
              h,
              c,
              o,
              s,
              a = {
                stroke: {
                  width: r.width,
                  color: r.color,
                  dashType: r.dashType,
                },
              },
              l = r.skip;
            for (
              void 0 === l && (l = 0),
                u = r.step,
                void 0 === u && (u = 0),
                f = this.gridLinesVisual(),
                e = l;
              e < t.length;
              e += u
            )
              if (((h = n.y - t[e]), h > 0))
                if (((c = new bi([n.x, n.y], h)), r.type === ki))
                  f.append(new pt.Circle(c, a));
                else {
                  for (o = new b(a), s = 0; s < i.length; s++)
                    o.lineTo(c.pointAt(i[s] + 180));
                  o.close();
                  f.append(o);
                }
            return f.children;
          },
          getValue: function (n) {
            var f,
              e,
              i,
              o,
              s,
              r,
              h,
              c = this.lineBox(),
              l = this.plotArea.polarAxis,
              t = l.majorAngles(),
              u = l.box.center(),
              a = n.distanceTo(u),
              v = a;
            return (
              this.options.majorGridLines.type !== ki &&
                t.length > 1 &&
                ((f = n.x - u.x),
                (e = n.y - u.y),
                (i = (gu(Math.atan2(e, f)) + 540) % 360),
                t.sort(function (n, t) {
                  return au(n, i) - au(t, i);
                }),
                (o = au(t[0], t[1]) / 2),
                (s = au(i, t[0])),
                (r = 90 - o),
                (h = 180 - s - r),
                (v = a * (Math.sin(wt(h)) / Math.sin(wt(r))))),
              this.axisType().prototype.getValue.call(
                this,
                new tt(c.x1, c.y2 - v)
              )
            );
          },
        };
        so = vt.extend({
          radarMajorGridLinePositions: function () {
            return this.getTickPositions(this.options.majorUnit);
          },
          radarMinorGridLinePositions: function () {
            var n = this.options,
              t = 0;
            return (
              n.majorGridLines.visible && (t = n.majorUnit),
              this.getTickPositions(n.minorUnit, t)
            );
          },
          axisType: function () {
            return vt;
          },
        });
        c(so.prototype, oo);
        ho = hr.extend({
          radarMajorGridLinePositions: function () {
            var n = [];
            return (
              this.traverseMajorTicksPositions(function (t) {
                n.push(t);
              }, this.options.majorGridLines),
              n
            );
          },
          radarMinorGridLinePositions: function () {
            var n = [];
            return (
              this.traverseMinorTicksPositions(function (t) {
                n.push(t);
              }, this.options.minorGridLines),
              n
            );
          },
          axisType: function () {
            return hr;
          },
        });
        c(ho.prototype, oo);
        co = 0.333;
        hh = 0.01;
        ch = k.extend({
          init: function (n) {
            this.closed = n;
          },
          process: function (n) {
            var f,
              u,
              s,
              l,
              a,
              b,
              v,
              k,
              c,
              h,
              y,
              d,
              p,
              g,
              nt = this,
              t = n.slice(0),
              e = [],
              w = this.closed,
              o = t.length;
            if (
              (o > 2 && (this.removeDuplicates(0, t), (o = t.length)),
              o < 2 || (2 === o && t[0].equals(t[1])))
            )
              return e;
            for (
              f = t[0], u = t[1], s = t[2], e.push(new ai(f));
              f.equals(t[o - 1]);

            )
              (w = !0), t.pop(), o--;
            if (2 === o)
              return (
                (l = this.tangent(f, u, i, r)),
                at(e).controlOut(this.firstControlPoint(l, f, u, i, r)),
                e.push(new ai(u, this.secondControlPoint(l, f, u, i, r))),
                e
              );
            for (
              w
                ? ((f = t[o - 1]),
                  (u = t[0]),
                  (s = t[1]),
                  (v = this.controlPoints(f, u, s)),
                  (a = v[1]),
                  (b = v[0]))
                : ((k = this.tangent(f, u, i, r)),
                  (a = this.firstControlPoint(k, f, u, i, r))),
                c = a,
                h = 0;
              h <= o - 3;
              h++
            )
              nt.removeDuplicates(h, t),
                (o = t.length),
                h + 3 <= o &&
                  ((f = t[h]),
                  (u = t[h + 1]),
                  (s = t[h + 2]),
                  (y = nt.controlPoints(f, u, s)),
                  at(e).controlOut(c),
                  (c = y[1]),
                  (d = y[0]),
                  e.push(new ai(u, d)));
            return (
              w
                ? ((f = t[o - 2]),
                  (u = t[o - 1]),
                  (s = t[0]),
                  (p = this.controlPoints(f, u, s)),
                  at(e).controlOut(c),
                  e.push(new ai(u, p[0])),
                  at(e).controlOut(p[1]),
                  e.push(new ai(s, b)))
                : ((g = this.tangent(u, s, i, r)),
                  at(e).controlOut(c),
                  e.push(new ai(s, this.secondControlPoint(g, u, s, i, r)))),
              e
            );
          },
          removeDuplicates: function (n, t) {
            for (
              ;
              t[n + 1] && (t[n].equals(t[n + 1]) || t[n + 1].equals(t[n + 2]));

            )
              t.splice(n + 1, 1);
          },
          invertAxis: function (n, t, i) {
            var f,
              u,
              r = !1;
            return (
              n.x === t.x
                ? (r = !0)
                : t.x === i.x
                ? ((t.y < i.y && n.y <= t.y) || (i.y < t.y && t.y <= n.y)) &&
                  (r = !0)
                : ((f = this.lineFunction(n, t)),
                  (u = this.calculateFunction(f, i.x)),
                  (n.y <= t.y && i.y <= u) ||
                    (t.y <= n.y && i.y >= u) ||
                    (r = !0)),
              r
            );
          },
          isLine: function (n, i, r) {
            var u = this.lineFunction(n, i),
              f = this.calculateFunction(u, r.x);
            return (n.x === i.x && i.x === r.x) || t(f, 1) === t(r.y, 1);
          },
          lineFunction: function (n, t) {
            var i = (t.y - n.y) / (t.x - n.x),
              r = n.y - i * n.x;
            return [r, i];
          },
          controlPoints: function (n, t, u) {
            var o,
              s,
              l,
              h,
              a,
              c,
              e = i,
              f = r,
              v = !1,
              y = !1;
            return (
              this.isLine(n, t, u)
                ? (o = this.tangent(n, t, i, r))
                : ((s = {
                    x: this.isMonotonicByField(n, t, u, i),
                    y: this.isMonotonicByField(n, t, u, r),
                  }),
                  s.x && s.y
                    ? ((o = this.tangent(n, u, i, r)), (v = !0))
                    : (this.invertAxis(n, t, u) && ((e = r), (f = i)),
                      s[e]
                        ? (o = 0)
                        : ((l =
                            (u[f] < n[f] && n[f] <= t[f]) ||
                            (n[f] < u[f] && t[f] <= n[f])
                              ? ns((u[f] - n[f]) * (t[e] - n[e]))
                              : -ns((u[e] - n[e]) * (t[f] - n[f]))),
                          (o = hh * l),
                          (y = !0)))),
              (h = this.secondControlPoint(o, n, t, e, f)),
              y && ((a = e), (e = f), (f = a)),
              (c = this.firstControlPoint(o, t, u, e, f)),
              v &&
                (this.restrictControlPoint(n, t, h, o),
                this.restrictControlPoint(t, u, c, o)),
              [h, c]
            );
          },
          restrictControlPoint: function (n, t, i, r) {
            n.y < t.y
              ? t.y < i.y
                ? ((i.x = n.x + (t.y - n.y) / r), (i.y = t.y))
                : i.y < n.y && ((i.x = t.x - (t.y - n.y) / r), (i.y = n.y))
              : i.y < t.y
              ? ((i.x = n.x - (n.y - t.y) / r), (i.y = t.y))
              : n.y < i.y && ((i.x = t.x + (n.y - t.y) / r), (i.y = n.y));
          },
          tangent: function (n, t, i, r) {
            var u = t[i] - n[i],
              f = t[r] - n[r];
            return 0 === u ? 0 : f / u;
          },
          isMonotonicByField: function (n, t, i, r) {
            return (i[r] > t[r] && t[r] > n[r]) || (i[r] < t[r] && t[r] < n[r]);
          },
          firstControlPoint: function (n, t, i, r, u) {
            var f = t[r],
              o = i[r],
              e = (o - f) * co;
            return this.point(f + e, t[u] + e * n, r, u);
          },
          secondControlPoint: function (n, t, i, r, u) {
            var o = t[r],
              f = i[r],
              e = (f - o) * co;
            return this.point(f - e, i[u] - e * n, r, u);
          },
          point: function (n, t, i, r) {
            var u = new gt.Point();
            return (u[i] = n), (u[r] = t), u;
          },
          calculateFunction: function (n, t) {
            for (var u = n.length, r = 0, i = 0; i < u; i++)
              r += Math.pow(t, i) * n[i];
            return r;
          },
        });
        is.Gradients = ge;
        kendo.deepExtend(kendo.dataviz, {
          constants: ss,
          services: vs,
          autoMajorUnit: ru,
          Point: tt,
          Box: u,
          Ring: oi,
          Sector: de,
          ShapeBuilder: fr,
          ShapeElement: tf,
          ChartElement: v,
          BoxElement: ct,
          RootElement: no,
          FloatElement: rf,
          Text: uf,
          TextBox: ni,
          Title: gr,
          AxisLabel: si,
          Axis: rt,
          Note: ff,
          CategoryAxis: ri,
          DateCategoryAxis: vf,
          DateValueAxis: yf,
          NumericAxis: vt,
          LogarithmicAxis: hr,
          PolarAxis: pf,
          RadarCategoryAxis: cr,
          RadarNumericAxis: so,
          RadarLogarithmicAxis: ho,
          CurveProcessor: ch,
          rectToBox: gf,
          addClass: lh,
          removeClass: ah,
          alignPathToPixel: lr,
          clockwise: wf,
          convertableToNumber: vh,
          deepExtend: c,
          elementStyles: ph,
          getSpacing: yt,
          getTemplate: kf,
          getter: rs,
          grep: ar,
          hasClasses: wh,
          HashMap: ur,
          inArray: lt,
          interpolateValue: bh,
          InstanceObserver: ys,
          isArray: pi,
          isFunction: re,
          isNumber: ut,
          isObject: bf,
          isString: wi,
          map: df,
          mousewheelDelta: kh,
          FontLoader: ci,
          setDefaultOptions: w,
          sparseArrayLimits: ao,
          styleValue: lo,
          append: du,
          bindEvents: ps,
          Class: k,
          defined: f,
          deg: gu,
          elementOffset: ws,
          elementSize: bs,
          eventElement: nf,
          eventCoordinates: ks,
          last: at,
          limitValue: s,
          logToConsole: kendo.logToConsole,
          objectKey: ke,
          rad: wt,
          round: t,
          unbindEvents: ds,
          valueOrDefault: ei,
          absoluteDateDiff: fu,
          addDuration: y,
          addTicks: o,
          ceilDate: ne,
          dateComparer: vr,
          dateDiff: ot,
          dateEquals: yr,
          dateIndex: hi,
          duration: su,
          floorDate: ou,
          lteDateIndex: ic,
          startOfWeek: po,
          toDate: h,
          parseDate: dt,
          parseDates: te,
          toTime: p,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/core/core.min", ["dataviz/core/kendo-core.min"], n);
  })(
    function () {
      !(function (n) {
        var t = kendo.dataviz,
          r = t.services,
          i = kendo.drawing;
        t.SASS_THEMES = ["sass", "default-v2", "bootstrap-v4", "material-v2"];
        t.ExportMixin = {
          extend: function (n, t) {
            if (!n.exportVisual)
              throw Error("Mixin target has no exportVisual method defined.");
            n.exportSVG = this.exportSVG;
            n.exportImage = this.exportImage;
            n.exportPDF = this.exportPDF;
            t || ((n.svg = this.svg), (n.imageDataURL = this.imageDataURL));
          },
          exportSVG: function (n) {
            return i.exportSVG(this.exportVisual(), n);
          },
          exportImage: function (n) {
            return i.exportImage(this.exportVisual(n), n);
          },
          exportPDF: function (n) {
            return i.exportPDF(this.exportVisual(), n);
          },
          svg: function () {
            if (i.svg.Surface) return i.svg.exportGroup(this.exportVisual());
            throw Error(
              "SVG Export failed. Unable to export instantiate kendo.drawing.svg.Surface"
            );
          },
          imageDataURL: function () {
            var r, t, u;
            if (!kendo.support.canvas) return null;
            if (i.canvas.Surface)
              return (
                (r = n("<div />")
                  .css({
                    display: "none",
                    width: this.element.width(),
                    height: this.element.height(),
                  })
                  .appendTo(document.body)),
                (t = new i.canvas.Surface(r[0])),
                t.draw(this.exportVisual()),
                (u = t._rootElement.toDataURL()),
                t.destroy(),
                r.remove(),
                u
              );
            throw Error(
              "Image Export failed. Unable to export instantiate kendo.drawing.canvas.Surface"
            );
          },
        };
        r.IntlService.register({
          format: function (n) {
            return kendo.format.apply(
              null,
              [n].concat(Array.prototype.slice.call(arguments, 1))
            );
          },
          toString: kendo.toString,
          parseDate: kendo.parseDate,
        });
        r.TemplateService.register({ compile: kendo.template });
        t.Point2D = t.Point;
        t.Box2D = t.Box;
        t.mwDelta = function (n) {
          return t.mousewheelDelta(n.originalEvent);
        };
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.core.min",
      ["dataviz/core/kendo-core.min", "dataviz/core/core.min"],
      n
    );
  })(
    function () {},
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/themes/chart-base-theme.min", ["kendo.dataviz.core.min"], n);
  })(
    function () {
      !(function () {
        var t,
          n,
          u,
          i,
          w,
          r,
          f,
          b,
          e,
          o,
          k,
          s,
          h,
          d,
          c,
          g,
          l,
          nt,
          tt,
          it,
          a,
          rt,
          v,
          y,
          ut,
          ft,
          et,
          p,
          ot,
          st,
          ht,
          ct,
          lt,
          at;
        window.kendo.dataviz = window.kendo.dataviz || {};
        t = 1.5;
        n = 0.4;
        u = "#000";
        i = "Arial, Helvetica, sans-serif";
        w = "11px " + i;
        r = "12px " + i;
        f = "16px " + i;
        b = "transparent";
        e = "#fff";
        o = function () {
          return {
            icon: { border: { width: 1 } },
            label: { font: r, padding: 3 },
            line: { length: 10, width: 2 },
            visible: !0,
          };
        };
        k = function () {
          return {
            labels: { font: r },
            notes: o(),
            title: { font: f, margin: 5 },
          };
        };
        s = function () {
          return {
            highlight: { markers: { border: {} } },
            line: { opacity: 1, width: 0 },
            markers: { size: 6, visible: !1 },
            opacity: 0.4,
          };
        };
        h = function () {
          return {
            highlight: { markers: { border: {} } },
            line: { opacity: 1, width: 0 },
            markers: { size: 6, visible: !1 },
            opacity: 0.4,
          };
        };
        d = function () {
          return { gap: t, spacing: n };
        };
        c = function () {
          return {
            outliersField: "",
            meanField: "",
            border: { _brightness: 0.8, width: 1 },
            downColor: e,
            gap: 1,
            highlight: {
              border: { opacity: 1, width: 2 },
              whiskers: { width: 3 },
              mean: { width: 2 },
              median: { width: 2 },
            },
            mean: { width: 2 },
            median: { width: 2 },
            spacing: 0.3,
            whiskers: { width: 2 },
          };
        };
        g = function () {
          return {
            border: { width: 0 },
            labels: { background: b },
            opacity: 0.6,
          };
        };
        l = function () {
          return { gap: t, spacing: n, target: { color: "#ff0000" } };
        };
        nt = function () {
          return {
            border: { _brightness: 0.8, width: 1 },
            downColor: e,
            gap: 1,
            highlight: { border: { opacity: 1, width: 2 }, line: { width: 2 } },
            line: { color: u, width: 1 },
            spacing: 0.3,
          };
        };
        tt = function () {
          return { gap: t, spacing: n };
        };
        it = function () {
          return { margin: 1 };
        };
        a = function () {
          return { width: 2 };
        };
        rt = function () {
          return {
            gap: 1,
            highlight: { line: { opacity: 1, width: 3 } },
            line: { width: 1 },
            spacing: 0.3,
          };
        };
        v = function () {
          return {
            line: { opacity: 1, width: 0 },
            markers: { size: 6, visible: !1 },
            opacity: 0.5,
          };
        };
        y = function () {
          return { markers: { visible: !1 }, width: 2 };
        };
        ut = function () {
          return { gap: t, spacing: n };
        };
        ft = function () {
          return { gap: t, spacing: n };
        };
        et = function () {
          return { width: 1 };
        };
        p = function () {
          return { gap: 0.5, line: { color: u, width: 1 }, spacing: n };
        };
        ot = function () {
          return {
            labels: {
              background: "",
              color: "",
              padding: { top: 5, bottom: 5, left: 7, right: 7 },
            },
          };
        };
        st = function () {
          return {
            labels: {
              background: "",
              color: "",
              padding: { top: 5, bottom: 5, left: 7, right: 7 },
            },
          };
        };
        ht = function (n) {
          return {
            visible: !0,
            labels: { font: w },
            overlay: n.gradients ? {} : { gradient: "none" },
            area: s(),
            rangeArea: h(),
            verticalRangeArea: h(),
            bar: d(),
            boxPlot: c(),
            bubble: g(),
            bullet: l(),
            candlestick: nt(),
            column: tt(),
            pie: ot(),
            donut: it(),
            funnel: st(),
            horizontalWaterfall: p(),
            line: a(),
            notes: o(),
            ohlc: rt(),
            radarArea: v(),
            radarLine: y(),
            polarArea: v(),
            polarLine: y(),
            rangeBar: ut(),
            rangeColumn: ft(),
            scatterLine: et(),
            verticalArea: s(),
            verticalBoxPlot: c(),
            verticalBullet: l(),
            verticalLine: a(),
            waterfall: p(),
          };
        };
        ct = function () {
          return { font: f };
        };
        lt = function () {
          return { labels: { font: r } };
        };
        at = function (n) {
          return (
            void 0 === n && (n = {}),
            {
              axisDefaults: k(),
              categoryAxis: { majorGridLines: { visible: !0 } },
              navigator: { pane: { height: 90, margin: { top: 10 } } },
              seriesDefaults: ht(n),
              title: ct(),
              legend: lt(),
            }
          );
        };
        kendo.deepExtend(kendo.dataviz, { chartBaseTheme: at });
      })();
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/themes/auto-theme.min", ["kendo.dataviz.core.min"], n);
  })(
    function () {
      !(function (n) {
        function i(i) {
          function r(n, t) {
            u(n, f(t, "backgroundColor"));
          }
          function f(n, t) {
            return o.find(".k-var--" + n).css(t);
          }
          function u(n, t) {
            for (var i = e, u = n.split("."), r = u.shift(); u.length > 0; )
              (i = i[r] = i[r] || {}), (r = u.shift());
            i[r] = t;
          }
          var e, o;
          return !i && t
            ? t
            : ((e = { chart: kendo.dataviz.chartBaseTheme() }),
              (o = n(
                '<div style="display: none">  <div class="k-var--accent"></div>  <div class="k-var--accent-contrast"></div>  <div class="k-var--base"></div>  <div class="k-var--background"></div>  <div class="k-var--normal-background"></div>  <div class="k-var--normal-text-color"></div>  <div class="k-var--hover-background"></div>  <div class="k-var--hover-text-color"></div>  <div class="k-var--selected-background"></div>  <div class="k-var--selected-text-color"></div>  <div class="k-var--chart-error-bars-background"></div>  <div class="k-var--chart-notes-background"></div>  <div class="k-var--chart-notes-border"></div>  <div class="k-var--chart-notes-lines"></div>  <div class="k-var--chart-crosshair-background"></div>  <div class="k-var--chart-inactive"></div>  <div class="k-var--chart-major-lines"></div>  <div class="k-var--chart-minor-lines"></div>  <div class="k-var--chart-area-opacity"></div>  <div class="k-widget">      <div class="k-var--chart-font"></div>      <div class="k-var--chart-title-font"></div>      <div class="k-var--chart-label-font"></div>  </div>  <div class="k-var--series">    <div class="k-var--series-a"></div>    <div class="k-var--series-b"></div>    <div class="k-var--series-c"></div>    <div class="k-var--series-d"></div>    <div class="k-var--series-e"></div>    <div class="k-var--series-f"></div>  </div>  <div class="k-var--gauge-pointer"></div>  <div class="k-var--gauge-track"></div></div>'
              ).appendTo(document.body)),
              (function () {
                r(
                  "chart.axisDefaults.crosshair.color",
                  "chart-crosshair-background"
                );
                r("chart.axisDefaults.labels.color", "normal-text-color");
                r("chart.axisDefaults.line.color", "chart-major-lines");
                r(
                  "chart.axisDefaults.majorGridLines.color",
                  "chart-major-lines"
                );
                r(
                  "chart.axisDefaults.minorGridLines.color",
                  "chart-minor-lines"
                );
                r(
                  "chart.axisDefaults.notes.icon.background",
                  "chart-notes-background"
                );
                r(
                  "chart.axisDefaults.notes.icon.border.color",
                  "chart-notes-border"
                );
                r("chart.axisDefaults.notes.line.color", "chart-notes-lines");
                r("chart.axisDefaults.title.color", "normal-text-color");
                r("chart.chartArea.background", "background");
                r("chart.legend.inactiveItems.labels.color", "chart-inactive");
                r("chart.legend.inactiveItems.markers.color", "chart-inactive");
                r("chart.legend.labels.color", "normal-text-color");
                r(
                  "chart.seriesDefaults.boxPlot.downColor",
                  "chart-major-lines"
                );
                r("chart.seriesDefaults.boxPlot.mean.color", "base");
                r("chart.seriesDefaults.boxPlot.median.color", "base");
                r("chart.seriesDefaults.boxPlot.whiskers.color", "accent");
                r("chart.seriesDefaults.bullet.target.color", "accent");
                r(
                  "chart.seriesDefaults.candlestick.downColor",
                  "normal-text-color"
                );
                r(
                  "chart.seriesDefaults.candlestick.line.color",
                  "normal-text-color"
                );
                r(
                  "chart.seriesDefaults.errorBars.color",
                  "chart-error-bars-background"
                );
                r(
                  "chart.seriesDefaults.horizontalWaterfall.line.color",
                  "chart-major-lines"
                );
                r(
                  "chart.seriesDefaults.icon.border.color",
                  "chart-major-lines"
                );
                r("chart.seriesDefaults.labels.background", "background");
                r("chart.seriesDefaults.labels.color", "normal-text-color");
                r(
                  "chart.seriesDefaults.notes.icon.background",
                  "chart-notes-background"
                );
                r(
                  "chart.seriesDefaults.notes.icon.border.color",
                  "chart-notes-border"
                );
                r("chart.seriesDefaults.notes.line.color", "chart-notes-lines");
                r(
                  "chart.seriesDefaults.verticalBoxPlot.downColor",
                  "chart-major-lines"
                );
                r("chart.seriesDefaults.verticalBoxPlot.mean.color", "base");
                r("chart.seriesDefaults.verticalBoxPlot.median.color", "base");
                r(
                  "chart.seriesDefaults.verticalBoxPlot.whiskers.color",
                  "accent"
                );
                r("chart.seriesDefaults.verticalBullet.target.color", "accent");
                r(
                  "chart.seriesDefaults.waterfall.line.color",
                  "chart-major-lines"
                );
                r("chart.title.color", "normal-text-color");
                u(
                  "chart.seriesDefaults.labels.opacity",
                  f("chart-area-opacity", "opacity")
                );
                r("diagram.shapeDefaults.fill.color", "accent");
                r("diagram.shapeDefaults.content.color", "accent-contrast");
                r(
                  "diagram.shapeDefaults.connectorDefaults.fill.color",
                  "normal-text-color"
                );
                r(
                  "diagram.shapeDefaults.connectorDefaults.stroke.color",
                  "accent-contrast"
                );
                r(
                  "diagram.shapeDefaults.connectorDefaults.hover.fill.color",
                  "accent-contrast"
                );
                r(
                  "diagram.shapeDefaults.connectorDefaults.hover.stroke.color",
                  "normal-text-color"
                );
                r(
                  "diagram.editable.resize.handles.stroke.color",
                  "normal-text-color"
                );
                r(
                  "diagram.editable.resize.handles.fill.color",
                  "normal-background"
                );
                r(
                  "diagram.editable.resize.handles.hover.stroke.color",
                  "normal-text-color"
                );
                r(
                  "diagram.editable.resize.handles.hover.fill.color",
                  "normal-text-color"
                );
                r("diagram.selectable.stroke.color", "normal-text-color");
                r(
                  "diagram.connectionDefaults.stroke.color",
                  "normal-text-color"
                );
                r(
                  "diagram.connectionDefaults.content.color",
                  "normal-text-color"
                );
                r(
                  "diagram.connectionDefaults.selection.handles.fill.color",
                  "accent-contrast"
                );
                r(
                  "diagram.connectionDefaults.selection.handles.stroke.color",
                  "normal-text-color"
                );
                r(
                  "diagram.connectionDefaults.selection.stroke.color",
                  "normal-text-color"
                );
                r("gauge.pointer.color", "gauge-pointer");
                r("gauge.scale.labels.color", "normal-text-color");
                r("gauge.scale.minorTicks.color", "normal-text-color");
                r("gauge.scale.majorTicks.color", "normal-text-color");
                r("gauge.scale.line.color", "normal-text-color");
                r("gauge.scale.rangePlaceholderColor", "gauge-track");
              })(),
              (function () {
                function t(n) {
                  return f(n, "fontSize") + " " + f(n, "fontFamily");
                }
                var n = t("chart-font"),
                  r = t("chart-title-font"),
                  i = t("chart-label-font");
                u("chart.axisDefaults.labels.font", i);
                u("chart.axisDefaults.notes.label.font", n);
                u("chart.axisDefaults.title.font", n);
                u("chart.legend.labels.font", n);
                u("chart.seriesDefaults.labels.font", i);
                u("chart.seriesDefaults.notes.label.font", n);
                u("chart.title.font", r);
              })(),
              (function () {
                function t(n) {
                  return n.toLowerCase().charCodeAt(0) - "a".charCodeAt(0);
                }
                function i(n) {
                  return t(n.match(/series-([a-z])$/)[1]);
                }
                var r = n(".k-var--series div").toArray(),
                  f = r.reduce(function (t, r) {
                    var u = i(r.className);
                    return (t[u] = n(r).css("backgroundColor")), t;
                  }, []);
                u("chart.seriesColors", f);
              })(),
              o.remove(),
              (t = e),
              e);
        }
        var t;
        kendo.dataviz.autoTheme = i;
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/themes/themes.min", ["dataviz/themes/chart-base-theme.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function u(t, i) {
            return n.map(t, function (n, t) {
              return [[n, i[t]]];
            });
          }
          var e = window.kendo,
            s = e.dataviz.ui,
            r = e.deepExtend,
            f = "#000",
            t = "#fff",
            h = e.dataviz.chartBaseTheme({ gradients: !0 }),
            c = {
              scale: { labels: { font: "12px Arial,Helvetica,sans-serif" } },
            },
            l = {
              shapeDefaults: { hover: { opacity: 0.2 }, stroke: { width: 0 } },
              editable: { resize: { handles: { width: 7, height: 7 } } },
              selectable: { stroke: { width: 1, dashType: "dot" } },
              connectionDefaults: {
                stroke: { width: 2 },
                selection: { handles: { width: 8, height: 8 } },
                editable: { tools: ["edit", "delete"] },
              },
            },
            o = s.themes,
            i = (s.registerTheme = function (n, t) {
              var i,
                u = {};
              u.chart = r({}, h, t.chart);
              u.gauge = r({}, c, t.gauge);
              u.diagram = r({}, l, t.diagram);
              u.treeMap = r({}, t.treeMap);
              i = u.chart.seriesDefaults;
              i.verticalLine = r({}, i.line);
              i.verticalArea = r({}, i.area);
              i.rangeArea = r({}, i.area);
              i.verticalRangeArea = r({}, i.rangeArea);
              i.verticalBoxPlot = r({}, i.boxPlot);
              i.polarArea = r({}, i.radarArea);
              i.polarLine = r({}, i.radarLine);
              o[n] = u;
            });
          i("black", {
            chart: {
              title: { color: t },
              legend: {
                labels: { color: t },
                inactiveItems: {
                  labels: { color: "#919191" },
                  markers: { color: "#919191" },
                },
              },
              seriesDefaults: {
                labels: { color: t },
                errorBars: { color: t },
                notes: {
                  icon: { background: "#3b3b3b", border: { color: "#8e8e8e" } },
                  label: { color: t },
                  line: { color: "#8e8e8e" },
                },
                pie: { overlay: { gradient: "sharpBevel" } },
                donut: { overlay: { gradient: "sharpGlass" } },
                line: { markers: { background: "#3d3d3d" } },
                scatter: { markers: { background: "#3d3d3d" } },
                scatterLine: { markers: { background: "#3d3d3d" } },
                waterfall: { line: { color: "#8e8e8e" } },
                horizontalWaterfall: { line: { color: "#8e8e8e" } },
                candlestick: {
                  downColor: "#555",
                  line: { color: t },
                  border: { _brightness: 1.5, opacity: 1 },
                  highlight: { border: { color: t, opacity: 0.2 } },
                },
                ohlc: { line: { color: t } },
              },
              chartArea: { background: "#3d3d3d" },
              seriesColors: [
                "#0081da",
                "#3aafff",
                "#99c900",
                "#ffeb3d",
                "#b20753",
                "#ff4195",
              ],
              axisDefaults: {
                line: { color: "#8e8e8e" },
                labels: { color: t },
                majorGridLines: { color: "#545454" },
                minorGridLines: { color: "#454545" },
                title: { color: t },
                crosshair: { color: "#8e8e8e" },
                notes: {
                  icon: { background: "#3b3b3b", border: { color: "#8e8e8e" } },
                  label: { color: t },
                  line: { color: "#8e8e8e" },
                },
              },
            },
            gauge: {
              pointer: { color: "#0070e4" },
              scale: {
                rangePlaceholderColor: "#1d1d1d",
                labels: { color: t },
                minorTicks: { color: t },
                majorTicks: { color: t },
                line: { color: t },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#0066cc" },
                connectorDefaults: {
                  fill: { color: t },
                  stroke: { color: "#384049" },
                  hover: {
                    fill: { color: "#3d3d3d" },
                    stroke: { color: "#efefef" },
                  },
                },
                content: { color: t },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: "#3d3d3d" },
                    stroke: { color: t },
                    hover: { fill: { color: t }, stroke: { color: t } },
                  },
                },
                rotate: { thumb: { stroke: { color: t }, fill: { color: t } } },
              },
              selectable: { stroke: { color: t } },
              connectionDefaults: {
                stroke: { color: t },
                content: { color: t },
                selection: {
                  handles: {
                    fill: { color: "#3d3d3d" },
                    stroke: { color: "#efefef" },
                  },
                },
              },
            },
            treeMap: {
              colors: [
                ["#0081da", "#314b5c"],
                ["#3aafff", "#3c5464"],
                ["#99c900", "#4f5931"],
                ["#ffeb3d", "#64603d"],
                ["#b20753", "#543241"],
                ["#ff4195", "#643e4f"],
              ],
            },
          });
          i("blueopal", {
            chart: {
              title: { color: "#293135" },
              legend: {
                labels: { color: "#293135" },
                inactiveItems: {
                  labels: { color: "#27A5BA" },
                  markers: { color: "#27A5BA" },
                },
              },
              seriesDefaults: {
                labels: { color: f, background: t, opacity: 0.5 },
                errorBars: { color: "#293135" },
                candlestick: {
                  downColor: "#c4d0d5",
                  line: { color: "#9aabb2" },
                },
                waterfall: { line: { color: "#9aabb2" } },
                horizontalWaterfall: { line: { color: "#9aabb2" } },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#9aabb2" },
                  },
                  label: { color: "#293135" },
                  line: { color: "#9aabb2" },
                },
              },
              seriesColors: [
                "#0069a5",
                "#0098ee",
                "#7bd2f6",
                "#ffb800",
                "#ff8517",
                "#e34a00",
              ],
              axisDefaults: {
                line: { color: "#9aabb2" },
                labels: { color: "#293135" },
                majorGridLines: { color: "#c4d0d5" },
                minorGridLines: { color: "#edf1f2" },
                title: { color: "#293135" },
                crosshair: { color: "#9aabb2" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#9aabb2" },
                  },
                  label: { color: "#293135" },
                  line: { color: "#9aabb2" },
                },
              },
            },
            gauge: {
              pointer: { color: "#005c83" },
              scale: {
                rangePlaceholderColor: "#daecf4",
                labels: { color: "#293135" },
                minorTicks: { color: "#293135" },
                majorTicks: { color: "#293135" },
                line: { color: "#293135" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#7ec6e3" },
                connectorDefaults: {
                  fill: { color: "#003f59" },
                  stroke: { color: t },
                  hover: { fill: { color: t }, stroke: { color: "#003f59" } },
                },
                content: { color: "#293135" },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: t },
                    stroke: { color: "#003f59" },
                    hover: {
                      fill: { color: "#003f59" },
                      stroke: { color: "#003f59" },
                    },
                  },
                },
                rotate: {
                  thumb: {
                    stroke: { color: "#003f59" },
                    fill: { color: "#003f59" },
                  },
                },
              },
              selectable: { stroke: { color: "#003f59" } },
              connectionDefaults: {
                stroke: { color: "#003f59" },
                content: { color: "#293135" },
                selection: {
                  handles: {
                    fill: { color: "#3d3d3d" },
                    stroke: { color: "#efefef" },
                  },
                },
              },
            },
            treeMap: {
              colors: [
                ["#0069a5", "#bad7e7"],
                ["#0098ee", "#b9e0f5"],
                ["#7bd2f6", "#ceeaf6"],
                ["#ffb800", "#e6e3c4"],
                ["#ff8517", "#e4d8c8"],
                ["#e34a00", "#ddccc2"],
              ],
            },
          });
          i("highcontrast", {
            chart: {
              title: { color: "#ffffff" },
              legend: {
                labels: { color: "#ffffff" },
                inactiveItems: {
                  labels: { color: "#66465B" },
                  markers: { color: "#66465B" },
                },
              },
              seriesDefaults: {
                labels: { color: "#ffffff" },
                errorBars: { color: "#ffffff" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#ffffff" },
                  },
                  label: { color: "#ffffff" },
                  line: { color: "#ffffff" },
                },
                pie: { overlay: { gradient: "sharpGlass" } },
                donut: { overlay: { gradient: "sharpGlass" } },
                line: { markers: { background: "#2c232b" } },
                scatter: { markers: { background: "#2c232b" } },
                scatterLine: { markers: { background: "#2c232b" } },
                area: { opacity: 0.5 },
                waterfall: { line: { color: "#ffffff" } },
                horizontalWaterfall: { line: { color: "#ffffff" } },
                candlestick: {
                  downColor: "#664e62",
                  line: { color: "#ffffff" },
                  border: { _brightness: 1.5, opacity: 1 },
                  highlight: { border: { color: "#ffffff", opacity: 1 } },
                },
                ohlc: { line: { color: "#ffffff" } },
              },
              chartArea: { background: "#2c232b" },
              seriesColors: [
                "#a7008f",
                "#ffb800",
                "#3aafff",
                "#99c900",
                "#b20753",
                "#ff4195",
              ],
              axisDefaults: {
                line: { color: "#ffffff" },
                labels: { color: "#ffffff" },
                majorGridLines: { color: "#664e62" },
                minorGridLines: { color: "#4f394b" },
                title: { color: "#ffffff" },
                crosshair: { color: "#ffffff" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#ffffff" },
                  },
                  label: { color: "#ffffff" },
                  line: { color: "#ffffff" },
                },
              },
            },
            gauge: {
              pointer: { color: "#a7008f" },
              scale: {
                rangePlaceholderColor: "#2c232b",
                labels: { color: "#ffffff" },
                minorTicks: { color: "#2c232b" },
                majorTicks: { color: "#664e62" },
                line: { color: "#ffffff" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#a7018f" },
                connectorDefaults: {
                  fill: { color: t },
                  stroke: { color: "#2c232b" },
                  hover: { fill: { color: "#2c232b" }, stroke: { color: t } },
                },
                content: { color: t },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: "#2c232b" },
                    stroke: { color: t },
                    hover: { fill: { color: t }, stroke: { color: t } },
                  },
                },
                rotate: { thumb: { stroke: { color: t }, fill: { color: t } } },
              },
              selectable: { stroke: { color: t } },
              connectionDefaults: {
                stroke: { color: t },
                content: { color: t },
                selection: {
                  handles: { fill: { color: "#2c232b" }, stroke: { color: t } },
                },
              },
            },
            treeMap: {
              colors: [
                ["#a7008f", "#451c3f"],
                ["#ffb800", "#564122"],
                ["#3aafff", "#2f3f55"],
                ["#99c900", "#424422"],
                ["#b20753", "#471d33"],
                ["#ff4195", "#562940"],
              ],
            },
          });
          i("default", {
            chart: {
              title: { color: "#8e8e8e" },
              legend: {
                labels: { color: "#232323" },
                inactiveItems: {
                  labels: { color: "#919191" },
                  markers: { color: "#919191" },
                },
              },
              seriesDefaults: {
                labels: { color: f, background: t, opacity: 0.5 },
                errorBars: { color: "#232323" },
                candlestick: {
                  downColor: "#dedede",
                  line: { color: "#8d8d8d" },
                },
                waterfall: { line: { color: "#8e8e8e" } },
                horizontalWaterfall: { line: { color: "#8e8e8e" } },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#8e8e8e" },
                  },
                  label: { color: "#232323" },
                  line: { color: "#8e8e8e" },
                },
              },
              seriesColors: [
                "#ff6800",
                "#a0a700",
                "#ff8d00",
                "#678900",
                "#ffb53c",
                "#396000",
              ],
              axisDefaults: {
                line: { color: "#8e8e8e" },
                labels: { color: "#232323" },
                minorGridLines: { color: "#f0f0f0" },
                majorGridLines: { color: "#dfdfdf" },
                title: { color: "#232323" },
                crosshair: { color: "#8e8e8e" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#8e8e8e" },
                  },
                  label: { color: "#232323" },
                  line: { color: "#8e8e8e" },
                },
              },
            },
            gauge: {
              pointer: { color: "#ea7001" },
              scale: {
                rangePlaceholderColor: "#dedede",
                labels: { color: "#2e2e2e" },
                minorTicks: { color: "#2e2e2e" },
                majorTicks: { color: "#2e2e2e" },
                line: { color: "#2e2e2e" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#e15613" },
                connectorDefaults: {
                  fill: { color: "#282828" },
                  stroke: { color: t },
                  hover: { fill: { color: t }, stroke: { color: "#282828" } },
                },
                content: { color: "#2e2e2e" },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: t },
                    stroke: { color: "#282828" },
                    hover: {
                      fill: { color: "#282828" },
                      stroke: { color: "#282828" },
                    },
                  },
                },
                rotate: {
                  thumb: {
                    stroke: { color: "#282828" },
                    fill: { color: "#282828" },
                  },
                },
              },
              selectable: { stroke: { color: "#a7018f" } },
              connectionDefaults: {
                stroke: { color: "#282828" },
                content: { color: "#2e2e2e" },
                selection: {
                  handles: { fill: { color: t }, stroke: { color: "#282828" } },
                },
              },
            },
            treeMap: {
              colors: [
                ["#ff6800", "#edcfba"],
                ["#a0a700", "#dadcba"],
                ["#ff8d00", "#edd7ba"],
                ["#678900", "#cfd6ba"],
                ["#ffb53c", "#eddfc6"],
                ["#396000", "#c6ceba"],
              ],
            },
          });
          i("silver", {
            chart: {
              title: { color: "#4e5968" },
              legend: {
                labels: { color: "#4e5968" },
                inactiveItems: {
                  labels: { color: "#B1BCC8" },
                  markers: { color: "#B1BCC8" },
                },
              },
              seriesDefaults: {
                labels: {
                  color: "#293135",
                  background: "#eaeaec",
                  opacity: 0.5,
                },
                errorBars: { color: "#4e5968" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#4e5968" },
                  },
                  label: { color: "#4e5968" },
                  line: { color: "#4e5968" },
                },
                line: { markers: { background: "#eaeaec" } },
                scatter: { markers: { background: "#eaeaec" } },
                scatterLine: { markers: { background: "#eaeaec" } },
                pie: { connectors: { color: "#A6B1C0" } },
                donut: { connectors: { color: "#A6B1C0" } },
                waterfall: { line: { color: "#a6b1c0" } },
                horizontalWaterfall: { line: { color: "#a6b1c0" } },
                candlestick: { downColor: "#a6afbe" },
              },
              chartArea: { background: "#eaeaec" },
              seriesColors: [
                "#007bc3",
                "#76b800",
                "#ffae00",
                "#ef4c00",
                "#a419b7",
                "#430B62",
              ],
              axisDefaults: {
                line: { color: "#a6b1c0" },
                labels: { color: "#4e5968" },
                majorGridLines: { color: "#dcdcdf" },
                minorGridLines: { color: "#eeeeef" },
                title: { color: "#4e5968" },
                crosshair: { color: "#a6b1c0" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#4e5968" },
                  },
                  label: { color: "#4e5968" },
                  line: { color: "#4e5968" },
                },
              },
            },
            gauge: {
              pointer: { color: "#0879c0" },
              scale: {
                rangePlaceholderColor: "#f3f3f4",
                labels: { color: "#515967" },
                minorTicks: { color: "#515967" },
                majorTicks: { color: "#515967" },
                line: { color: "#515967" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#1c82c2" },
                connectorDefaults: {
                  fill: { color: "#515967" },
                  stroke: { color: t },
                  hover: { fill: { color: t }, stroke: { color: "#282828" } },
                },
                content: { color: "#515967" },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: t },
                    stroke: { color: "#515967" },
                    hover: {
                      fill: { color: "#515967" },
                      stroke: { color: "#515967" },
                    },
                  },
                },
                rotate: {
                  thumb: {
                    stroke: { color: "#515967" },
                    fill: { color: "#515967" },
                  },
                },
              },
              selectable: { stroke: { color: "#515967" } },
              connectionDefaults: {
                stroke: { color: "#515967" },
                content: { color: "#515967" },
                selection: {
                  handles: { fill: { color: t }, stroke: { color: "#515967" } },
                },
              },
            },
            treeMap: {
              colors: [
                ["#007bc3", "#c2dbea"],
                ["#76b800", "#dae7c3"],
                ["#ffae00", "#f5e5c3"],
                ["#ef4c00", "#f2d2c3"],
                ["#a419b7", "#e3c7e8"],
                ["#430b62", "#d0c5d7"],
              ],
            },
          });
          i("metro", {
            chart: {
              title: { color: "#777777" },
              legend: {
                labels: { color: "#777777" },
                inactiveItems: {
                  labels: { color: "#CBCBCB" },
                  markers: { color: "#CBCBCB" },
                },
              },
              seriesDefaults: {
                labels: { color: f },
                errorBars: { color: "#777777" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#777777" },
                  },
                  label: { color: "#777777" },
                  line: { color: "#777777" },
                },
                candlestick: {
                  downColor: "#c7c7c7",
                  line: { color: "#787878" },
                },
                waterfall: { line: { color: "#c7c7c7" } },
                horizontalWaterfall: { line: { color: "#c7c7c7" } },
                overlay: { gradient: "none" },
                border: { _brightness: 1 },
              },
              seriesColors: [
                "#8ebc00",
                "#309b46",
                "#25a0da",
                "#ff6900",
                "#e61e26",
                "#d8e404",
                "#16aba9",
                "#7e51a1",
                "#313131",
                "#ed1691",
              ],
              axisDefaults: {
                line: { color: "#c7c7c7" },
                labels: { color: "#777777" },
                minorGridLines: { color: "#c7c7c7" },
                majorGridLines: { color: "#c7c7c7" },
                title: { color: "#777777" },
                crosshair: { color: "#c7c7c7" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#777777" },
                  },
                  label: { color: "#777777" },
                  line: { color: "#777777" },
                },
              },
            },
            gauge: {
              pointer: { color: "#8ebc00" },
              scale: {
                rangePlaceholderColor: "#e6e6e6",
                labels: { color: "#777" },
                minorTicks: { color: "#777" },
                majorTicks: { color: "#777" },
                line: { color: "#777" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#8ebc00" },
                connectorDefaults: {
                  fill: { color: f },
                  stroke: { color: t },
                  hover: { fill: { color: t }, stroke: { color: f } },
                },
                content: { color: "#777" },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: t },
                    stroke: { color: "#787878" },
                    hover: {
                      fill: { color: "#787878" },
                      stroke: { color: "#787878" },
                    },
                  },
                },
                rotate: {
                  thumb: {
                    stroke: { color: "#787878" },
                    fill: { color: "#787878" },
                  },
                },
              },
              selectable: { stroke: { color: "#515967" } },
              connectionDefaults: {
                stroke: { color: "#787878" },
                content: { color: "#777" },
                selection: {
                  handles: { fill: { color: t }, stroke: { color: "#787878" } },
                },
              },
            },
            treeMap: {
              colors: [
                ["#8ebc00", "#e8f2cc"],
                ["#309b46", "#d6ebda"],
                ["#25a0da", "#d3ecf8"],
                ["#ff6900", "#ffe1cc"],
                ["#e61e26", "#fad2d4"],
                ["#d8e404", "#f7facd"],
                ["#16aba9", "#d0eeee"],
                ["#7e51a1", "#e5dcec"],
                ["#313131", "#d6d6d6"],
                ["#ed1691", "#fbd0e9"],
              ],
            },
          });
          i("metroblack", {
            chart: {
              title: { color: "#ffffff" },
              legend: {
                labels: { color: "#ffffff" },
                inactiveItems: {
                  labels: { color: "#797979" },
                  markers: { color: "#797979" },
                },
              },
              seriesDefaults: {
                border: { _brightness: 1 },
                labels: { color: "#ffffff" },
                errorBars: { color: "#ffffff" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#cecece" },
                  },
                  label: { color: "#ffffff" },
                  line: { color: "#cecece" },
                },
                line: { markers: { background: "#0e0e0e" } },
                bubble: { opacity: 0.6 },
                scatter: { markers: { background: "#0e0e0e" } },
                scatterLine: { markers: { background: "#0e0e0e" } },
                candlestick: {
                  downColor: "#828282",
                  line: { color: "#ffffff" },
                },
                waterfall: { line: { color: "#cecece" } },
                horizontalWaterfall: { line: { color: "#cecece" } },
                overlay: { gradient: "none" },
              },
              chartArea: { background: "#0e0e0e" },
              seriesColors: [
                "#00aba9",
                "#309b46",
                "#8ebc00",
                "#ff6900",
                "#e61e26",
                "#d8e404",
                "#25a0da",
                "#7e51a1",
                "#313131",
                "#ed1691",
              ],
              axisDefaults: {
                line: { color: "#cecece" },
                labels: { color: "#ffffff" },
                minorGridLines: { color: "#2d2d2d" },
                majorGridLines: { color: "#333333" },
                title: { color: "#ffffff" },
                crosshair: { color: "#cecece" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#cecece" },
                  },
                  label: { color: "#ffffff" },
                  line: { color: "#cecece" },
                },
              },
            },
            gauge: {
              pointer: { color: "#00aba9" },
              scale: {
                rangePlaceholderColor: "#2d2d2d",
                labels: { color: "#ffffff" },
                minorTicks: { color: "#333333" },
                majorTicks: { color: "#cecece" },
                line: { color: "#cecece" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#00aba9" },
                connectorDefaults: {
                  fill: { color: t },
                  stroke: { color: "#0e0e0e" },
                  hover: { fill: { color: "#0e0e0e" }, stroke: { color: t } },
                },
                content: { color: t },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: "#0e0e0e" },
                    stroke: { color: "#787878" },
                    hover: {
                      fill: { color: "#787878" },
                      stroke: { color: "#787878" },
                    },
                  },
                },
                rotate: { thumb: { stroke: { color: t }, fill: { color: t } } },
              },
              selectable: { stroke: { color: "#787878" } },
              connectionDefaults: {
                stroke: { color: t },
                content: { color: t },
                selection: {
                  handles: { fill: { color: "#0e0e0e" }, stroke: { color: t } },
                },
              },
            },
            treeMap: {
              colors: [
                ["#00aba9", "#0b2d2d"],
                ["#309b46", "#152a19"],
                ["#8ebc00", "#28310b"],
                ["#ff6900", "#3e200b"],
                ["#e61e26", "#391113"],
                ["#d8e404", "#36390c"],
                ["#25a0da", "#132b37"],
                ["#7e51a1", "#241b2b"],
                ["#313131", "#151515"],
                ["#ed1691", "#3b1028"],
              ],
            },
          });
          i("moonlight", {
            chart: {
              title: { color: "#ffffff" },
              legend: {
                labels: { color: "#ffffff" },
                inactiveItems: {
                  labels: { color: "#A1A7AB" },
                  markers: { color: "#A1A7AB" },
                },
              },
              seriesDefaults: {
                labels: { color: "#ffffff" },
                errorBars: { color: "#ffffff" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#8c909e" },
                  },
                  label: { color: "#ffffff" },
                  line: { color: "#8c909e" },
                },
                pie: { overlay: { gradient: "sharpBevel" } },
                donut: { overlay: { gradient: "sharpGlass" } },
                line: { markers: { background: "#212a33" } },
                bubble: { opacity: 0.6 },
                scatter: { markers: { background: "#212a33" } },
                scatterLine: { markers: { background: "#212a33" } },
                area: { opacity: 0.3 },
                candlestick: {
                  downColor: "#757d87",
                  line: { color: "#ea9d06" },
                  border: { _brightness: 1.5, opacity: 1 },
                  highlight: { border: { color: t, opacity: 0.2 } },
                },
                waterfall: { line: { color: "#8c909e" } },
                horizontalWaterfall: { line: { color: "#8c909e" } },
                ohlc: { line: { color: "#ea9d06" } },
              },
              chartArea: { background: "#212a33" },
              seriesColors: [
                "#ffca08",
                "#ff710f",
                "#ed2e24",
                "#ff9f03",
                "#e13c02",
                "#a00201",
              ],
              axisDefaults: {
                line: { color: "#8c909e" },
                minorTicks: { color: "#8c909e" },
                majorTicks: { color: "#8c909e" },
                labels: { color: "#ffffff" },
                majorGridLines: { color: "#3e424d" },
                minorGridLines: { color: "#2f3640" },
                title: { color: "#ffffff" },
                crosshair: { color: "#8c909e" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#8c909e" },
                  },
                  label: { color: "#ffffff" },
                  line: { color: "#8c909e" },
                },
              },
            },
            gauge: {
              pointer: { color: "#f4af03" },
              scale: {
                rangePlaceholderColor: "#2f3640",
                labels: { color: t },
                minorTicks: { color: "#8c909e" },
                majorTicks: { color: "#8c909e" },
                line: { color: "#8c909e" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#f3ae03" },
                connectorDefaults: {
                  fill: { color: t },
                  stroke: { color: "#414550" },
                  hover: { fill: { color: "#414550" }, stroke: { color: t } },
                },
                content: { color: t },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: "#414550" },
                    stroke: { color: t },
                    hover: { fill: { color: t }, stroke: { color: t } },
                  },
                },
                rotate: { thumb: { stroke: { color: t }, fill: { color: t } } },
              },
              selectable: { stroke: { color: t } },
              connectionDefaults: {
                stroke: { color: t },
                content: { color: t },
                selection: {
                  handles: { fill: { color: "#414550" }, stroke: { color: t } },
                },
              },
            },
            treeMap: {
              colors: [
                ["#ffca08", "#4e4b2b"],
                ["#ff710f", "#4e392d"],
                ["#ed2e24", "#4b2c31"],
                ["#ff9f03", "#4e422a"],
                ["#e13c02", "#482e2a"],
                ["#a00201", "#3b232a"],
              ],
            },
          });
          i("uniform", {
            chart: {
              title: { color: "#686868" },
              legend: {
                labels: { color: "#686868" },
                inactiveItems: {
                  labels: { color: "#B6B6B6" },
                  markers: { color: "#B6B6B6" },
                },
              },
              seriesDefaults: {
                labels: { color: "#686868" },
                errorBars: { color: "#686868" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#9e9e9e" },
                  },
                  label: { color: "#686868" },
                  line: { color: "#9e9e9e" },
                },
                pie: { overlay: { gradient: "sharpBevel" } },
                donut: { overlay: { gradient: "sharpGlass" } },
                line: { markers: { background: "#ffffff" } },
                bubble: { opacity: 0.6 },
                scatter: { markers: { background: "#ffffff" } },
                scatterLine: { markers: { background: "#ffffff" } },
                area: { opacity: 0.3 },
                candlestick: {
                  downColor: "#cccccc",
                  line: { color: "#cccccc" },
                  border: { _brightness: 1.5, opacity: 1 },
                  highlight: { border: { color: "#cccccc", opacity: 0.2 } },
                },
                waterfall: { line: { color: "#9e9e9e" } },
                horizontalWaterfall: { line: { color: "#9e9e9e" } },
                ohlc: { line: { color: "#cccccc" } },
              },
              chartArea: { background: "#ffffff" },
              seriesColors: [
                "#527aa3",
                "#6f91b3",
                "#8ca7c2",
                "#a8bdd1",
                "#c5d3e0",
                "#e2e9f0",
              ],
              axisDefaults: {
                line: { color: "#9e9e9e" },
                minorTicks: { color: "#aaaaaa" },
                majorTicks: { color: "#888888" },
                labels: { color: "#686868" },
                majorGridLines: { color: "#dadada" },
                minorGridLines: { color: "#e7e7e7" },
                title: { color: "#686868" },
                crosshair: { color: "#9e9e9e" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#9e9e9e" },
                  },
                  label: { color: "#686868" },
                  line: { color: "#9e9e9e" },
                },
              },
            },
            gauge: {
              pointer: { color: "#527aa3" },
              scale: {
                rangePlaceholderColor: "#e7e7e7",
                labels: { color: "#686868" },
                minorTicks: { color: "#aaaaaa" },
                majorTicks: { color: "#888888" },
                line: { color: "#9e9e9e" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#d1d1d1" },
                connectorDefaults: {
                  fill: { color: "#686868" },
                  stroke: { color: t },
                  hover: { fill: { color: t }, stroke: { color: "#686868" } },
                },
                content: { color: "#686868" },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: t },
                    stroke: { color: "#686868" },
                    hover: {
                      fill: { color: "#686868" },
                      stroke: { color: "#686868" },
                    },
                  },
                },
                rotate: {
                  thumb: {
                    stroke: { color: "#686868" },
                    fill: { color: "#686868" },
                  },
                },
              },
              selectable: { stroke: { color: "#686868" } },
              connectionDefaults: {
                stroke: { color: "#686868" },
                content: { color: "#686868" },
                selection: {
                  handles: { fill: { color: t }, stroke: { color: "#686868" } },
                },
              },
            },
            treeMap: {
              colors: [
                ["#527aa3", "#d0d8e1"],
                ["#6f91b3", "#d6dde4"],
                ["#8ca7c2", "#dce1e7"],
                ["#a8bdd1", "#e2e6ea"],
                ["#c5d3e0", "#e7eaed"],
                ["#e2e9f0", "#edeff0"],
              ],
            },
          });
          i("bootstrap", {
            chart: {
              title: { color: "#333333" },
              legend: {
                labels: { color: "#333333" },
                inactiveItems: {
                  labels: { color: "#999999" },
                  markers: { color: "#9A9A9A" },
                },
              },
              seriesDefaults: {
                labels: { color: "#333333" },
                overlay: { gradient: "none" },
                errorBars: { color: "#343434" },
                notes: {
                  icon: { background: "#000000", border: { color: "#000000" } },
                  label: { color: "#333333" },
                  line: { color: "#000000" },
                },
                pie: { overlay: { gradient: "none" } },
                donut: { overlay: { gradient: "none" } },
                line: { markers: { background: "#ffffff" } },
                bubble: { opacity: 0.6 },
                scatter: { markers: { background: "#ffffff" } },
                scatterLine: { markers: { background: "#ffffff" } },
                area: { opacity: 0.8 },
                candlestick: {
                  downColor: "#d0d0d0",
                  line: { color: "#333333" },
                  border: { _brightness: 1.5, opacity: 1 },
                  highlight: { border: { color: "#b8b8b8", opacity: 0.2 } },
                },
                waterfall: { line: { color: "#cccccc" } },
                horizontalWaterfall: { line: { color: "#cccccc" } },
                ohlc: { line: { color: "#333333" } },
              },
              chartArea: { background: "#ffffff" },
              seriesColors: [
                "#428bca",
                "#5bc0de",
                "#5cb85c",
                "#f2b661",
                "#e67d4a",
                "#da3b36",
              ],
              axisDefaults: {
                line: { color: "#cccccc" },
                minorTicks: { color: "#ebebeb" },
                majorTicks: { color: "#cccccc" },
                labels: { color: "#333333" },
                majorGridLines: { color: "#cccccc" },
                minorGridLines: { color: "#ebebeb" },
                title: { color: "#333333" },
                crosshair: { color: "#000000" },
                notes: {
                  icon: { background: "#000000", border: { color: "#000000" } },
                  label: { color: "#ffffff" },
                  line: { color: "#000000" },
                },
              },
            },
            gauge: {
              pointer: { color: "#428bca" },
              scale: {
                rangePlaceholderColor: "#cccccc",
                labels: { color: "#333333" },
                minorTicks: { color: "#ebebeb" },
                majorTicks: { color: "#cccccc" },
                line: { color: "#cccccc" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#428bca" },
                connectorDefaults: {
                  fill: { color: "#333333" },
                  stroke: { color: t },
                  hover: { fill: { color: t }, stroke: { color: "#333333" } },
                },
                content: { color: "#333333" },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: t },
                    stroke: { color: "#333333" },
                    hover: {
                      fill: { color: "#333333" },
                      stroke: { color: "#333333" },
                    },
                  },
                },
                rotate: {
                  thumb: {
                    stroke: { color: "#333333" },
                    fill: { color: "#333333" },
                  },
                },
              },
              selectable: { stroke: { color: "#333333" } },
              connectionDefaults: {
                stroke: { color: "#c4c4c4" },
                content: { color: "#333333" },
                selection: {
                  handles: { fill: { color: t }, stroke: { color: "#333333" } },
                  stroke: { color: "#333333" },
                },
              },
            },
            treeMap: {
              colors: [
                ["#428bca", "#d1e0ec"],
                ["#5bc0de", "#d6eaf0"],
                ["#5cb85c", "#d6e9d6"],
                ["#5cb85c", "#f4e8d7"],
                ["#e67d4a", "#f2ddd3"],
                ["#da3b36", "#f0d0cf"],
              ],
            },
          });
          i("flat", {
            chart: {
              title: { color: "#4c5356" },
              legend: {
                labels: { color: "#4c5356" },
                inactiveItems: {
                  labels: { color: "#CBCBCB" },
                  markers: { color: "#CBCBCB" },
                },
              },
              seriesDefaults: {
                labels: { color: "#4c5356" },
                errorBars: { color: "#4c5356" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#cdcdcd" },
                  },
                  label: { color: "#4c5356" },
                  line: { color: "#cdcdcd" },
                },
                candlestick: {
                  downColor: "#c7c7c7",
                  line: { color: "#787878" },
                },
                area: { opacity: 0.9 },
                waterfall: { line: { color: "#cdcdcd" } },
                horizontalWaterfall: { line: { color: "#cdcdcd" } },
                overlay: { gradient: "none" },
                border: { _brightness: 1 },
              },
              seriesColors: [
                "#10c4b2",
                "#ff7663",
                "#ffb74f",
                "#a2df53",
                "#1c9ec4",
                "#ff63a5",
                "#1cc47b",
              ],
              axisDefaults: {
                line: { color: "#cdcdcd" },
                labels: { color: "#4c5356" },
                minorGridLines: { color: "#cdcdcd" },
                majorGridLines: { color: "#cdcdcd" },
                title: { color: "#4c5356" },
                crosshair: { color: "#cdcdcd" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#cdcdcd" },
                  },
                  label: { color: "#4c5356" },
                  line: { color: "#cdcdcd" },
                },
              },
            },
            gauge: {
              pointer: { color: "#10c4b2" },
              scale: {
                rangePlaceholderColor: "#cdcdcd",
                labels: { color: "#4c5356" },
                minorTicks: { color: "#4c5356" },
                majorTicks: { color: "#4c5356" },
                line: { color: "#4c5356" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#10c4b2" },
                connectorDefaults: {
                  fill: { color: "#363940" },
                  stroke: { color: t },
                  hover: { fill: { color: t }, stroke: { color: "#363940" } },
                },
                content: { color: "#4c5356" },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: t },
                    stroke: { color: "#363940" },
                    hover: {
                      fill: { color: "#363940" },
                      stroke: { color: "#363940" },
                    },
                  },
                },
                rotate: {
                  thumb: {
                    stroke: { color: "#363940" },
                    fill: { color: "#363940" },
                  },
                },
              },
              selectable: { stroke: { color: "#363940" } },
              connectionDefaults: {
                stroke: { color: "#cdcdcd" },
                content: { color: "#4c5356" },
                selection: {
                  handles: { fill: { color: t }, stroke: { color: "#363940" } },
                  stroke: { color: "#363940" },
                },
              },
            },
            treeMap: {
              colors: [
                ["#10c4b2", "#cff3f0"],
                ["#ff7663", "#ffe4e0"],
                ["#ffb74f", "#fff1dc"],
                ["#a2df53", "#ecf9dd"],
                ["#1c9ec4", "#d2ecf3"],
                ["#ff63a5", "#ffe0ed"],
                ["#1cc47b", "#d2f3e5"],
              ],
            },
          });
          i("material", {
            chart: {
              title: { color: "#444444" },
              legend: {
                labels: { color: "#444444" },
                inactiveItems: {
                  labels: { color: "#CBCBCB" },
                  markers: { color: "#CBCBCB" },
                },
              },
              seriesDefaults: {
                labels: { color: "#444444" },
                errorBars: { color: "#444444" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#e5e5e5" },
                  },
                  label: { color: "#444444" },
                  line: { color: "#e5e5e5" },
                },
                candlestick: {
                  downColor: "#c7c7c7",
                  line: { color: "#787878" },
                },
                area: { opacity: 0.9 },
                waterfall: { line: { color: "#e5e5e5" } },
                horizontalWaterfall: { line: { color: "#e5e5e5" } },
                overlay: { gradient: "none" },
                border: { _brightness: 1 },
              },
              seriesColors: [
                "#3f51b5",
                "#03a9f4",
                "#4caf50",
                "#f9ce1d",
                "#ff9800",
                "#ff5722",
              ],
              axisDefaults: {
                line: { color: "#e5e5e5" },
                labels: { color: "#444444" },
                minorGridLines: { color: "#e5e5e5" },
                majorGridLines: { color: "#e5e5e5" },
                title: { color: "#444444" },
                crosshair: { color: "#7f7f7f" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#e5e5e5" },
                  },
                  label: { color: "#444444" },
                  line: { color: "#e5e5e5" },
                },
              },
            },
            gauge: {
              pointer: { color: "#3f51b5" },
              scale: {
                rangePlaceholderColor: "#e5e5e5",
                labels: { color: "#444444" },
                minorTicks: { color: "#444444" },
                majorTicks: { color: "#444444" },
                line: { color: "#444444" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#3f51b5" },
                connectorDefaults: {
                  fill: { color: "#7f7f7f" },
                  stroke: { color: t },
                  hover: { fill: { color: t }, stroke: { color: "#7f7f7f" } },
                },
                content: { color: "#444444" },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: t },
                    stroke: { color: "#444444" },
                    hover: {
                      fill: { color: "#444444" },
                      stroke: { color: "#444444" },
                    },
                  },
                },
                rotate: {
                  thumb: {
                    stroke: { color: "#444444" },
                    fill: { color: "#444444" },
                  },
                },
              },
              selectable: { stroke: { color: "#444444" } },
              connectionDefaults: {
                stroke: { color: "#7f7f7f" },
                content: { color: "#444444" },
                selection: {
                  handles: { fill: { color: t }, stroke: { color: "#444444" } },
                  stroke: { color: "#444444" },
                },
              },
            },
            treeMap: {
              colors: [
                ["#3f51b5", "#cff3f0"],
                ["#03a9f4", "#e5f6fe"],
                ["#4caf50", "#edf7ed"],
                ["#f9ce1d", "#fefae8"],
                ["#ff9800", "#fff4e5"],
                ["#ff5722", "#ffeee8"],
              ],
            },
          });
          i("materialblack", {
            chart: {
              title: { color: "#fff" },
              legend: {
                labels: { color: "#fff" },
                inactiveItems: {
                  labels: { color: "#CBCBCB" },
                  markers: { color: "#CBCBCB" },
                },
              },
              seriesDefaults: {
                labels: { color: "#fff" },
                errorBars: { color: "#fff" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#e5e5e5" },
                  },
                  label: { color: "#fff" },
                  line: { color: "#e5e5e5" },
                },
                candlestick: {
                  downColor: "#c7c7c7",
                  line: { color: "#787878" },
                },
                area: { opacity: 0.9 },
                waterfall: { line: { color: "#4d4d4d" } },
                horizontalWaterfall: { line: { color: "#4d4d4d" } },
                overlay: { gradient: "none" },
                border: { _brightness: 1 },
              },
              chartArea: { background: "#1c1c1c" },
              seriesColors: [
                "#3f51b5",
                "#03a9f4",
                "#4caf50",
                "#f9ce1d",
                "#ff9800",
                "#ff5722",
              ],
              axisDefaults: {
                line: { color: "#4d4d4d" },
                labels: { color: "#fff" },
                minorGridLines: { color: "#4d4d4d" },
                majorGridLines: { color: "#4d4d4d" },
                title: { color: "#fff" },
                crosshair: { color: "#7f7f7f" },
                notes: {
                  icon: {
                    background: "transparent",
                    border: { color: "#4d4d4d" },
                  },
                  label: { color: "#fff" },
                  line: { color: "#4d4d4d" },
                },
              },
            },
            gauge: {
              pointer: { color: "#3f51b5" },
              scale: {
                rangePlaceholderColor: "#4d4d4d",
                labels: { color: "#fff" },
                minorTicks: { color: "#fff" },
                majorTicks: { color: "#fff" },
                line: { color: "#fff" },
              },
            },
            diagram: {
              shapeDefaults: {
                fill: { color: "#3f51b5" },
                connectorDefaults: {
                  fill: { color: "#7f7f7f" },
                  stroke: { color: t },
                  hover: { fill: { color: t }, stroke: { color: "#7f7f7f" } },
                },
                content: { color: "#fff" },
              },
              editable: {
                resize: {
                  handles: {
                    fill: { color: t },
                    stroke: { color: "#fff" },
                    hover: {
                      fill: { color: "#fff" },
                      stroke: { color: "#fff" },
                    },
                  },
                },
                rotate: {
                  thumb: { stroke: { color: "#fff" }, fill: { color: "#fff" } },
                },
              },
              selectable: { stroke: { color: "#fff" } },
              connectionDefaults: {
                stroke: { color: "#7f7f7f" },
                content: { color: "#fff" },
                selection: {
                  handles: { fill: { color: t }, stroke: { color: "#fff" } },
                  stroke: { color: "#fff" },
                },
              },
            },
            treeMap: {
              colors: [
                ["#3f51b5", "#cff3f0"],
                ["#03a9f4", "#e5f6fe"],
                ["#4caf50", "#edf7ed"],
                ["#f9ce1d", "#fefae8"],
                ["#ff9800", "#fff4e5"],
                ["#ff5722", "#ffeee8"],
              ],
            },
          }),
            (function () {
              function h() {
                return {
                  icon: { background: "#007cc0", border: { color: "#007cc0" } },
                  label: { color: "#ffffff" },
                  line: { color: f },
                };
              }
              var n = "#333333",
                o = "#7f7f7f",
                r = "#bdbdbd",
                f = "#c8c8c8",
                s = [
                  "#008fd3",
                  "#99d101",
                  "#f39b02",
                  "#f05662",
                  "#c03c53",
                  "#acacac",
                ],
                c = s[0],
                e = t;
              i("fiori", {
                chart: {
                  title: { color: n },
                  legend: {
                    labels: { color: n },
                    inactiveItems: {
                      labels: { color: o },
                      markers: { color: o },
                    },
                  },
                  seriesDefaults: {
                    labels: { color: n },
                    errorBars: { color: n },
                    notes: h(),
                    candlestick: { downColor: f, line: { color: r } },
                    area: { opacity: 0.8 },
                    waterfall: { line: { color: f } },
                    horizontalWaterfall: { line: { color: f } },
                    overlay: { gradient: "none" },
                    border: { _brightness: 1 },
                  },
                  seriesColors: s,
                  axisDefaults: {
                    line: { color: f },
                    labels: { color: n },
                    minorGridLines: { color: "#dddddd" },
                    majorGridLines: { color: f },
                    title: { color: n },
                    crosshair: { color: o },
                    notes: h(),
                  },
                },
                gauge: {
                  pointer: { color: c },
                  scale: {
                    rangePlaceholderColor: f,
                    labels: { color: n },
                    minorTicks: { color: n },
                    majorTicks: { color: n },
                    line: { color: n },
                  },
                },
                diagram: {
                  shapeDefaults: {
                    fill: { color: c },
                    connectorDefaults: {
                      fill: { color: n },
                      stroke: { color: e },
                      hover: { fill: { color: e }, stroke: { color: n } },
                    },
                    content: { color: n },
                  },
                  editable: {
                    resize: {
                      handles: {
                        fill: { color: e },
                        stroke: { color: r },
                        hover: { fill: { color: r }, stroke: { color: r } },
                      },
                    },
                    rotate: {
                      thumb: { stroke: { color: r }, fill: { color: r } },
                    },
                  },
                  selectable: { stroke: { color: r } },
                  connectionDefaults: {
                    stroke: { color: r },
                    content: { color: r },
                    selection: {
                      handles: { fill: { color: e }, stroke: { color: r } },
                      stroke: { color: r },
                    },
                  },
                },
                treeMap: {
                  colors: u(s, [
                    "#cbe8f5",
                    "#eaf5cb",
                    "#fceacc",
                    "#fbdcdf",
                    "#f2d7dc",
                    "#eeeeee",
                  ]),
                },
              });
            })(),
            (function () {
              function h() {
                return {
                  icon: { background: "#00b0ff", border: { color: "#00b0ff" } },
                  label: { color: "#ffffff" },
                  line: { color: f },
                };
              }
              var n = "#4e4e4e",
                o = "#7f7f7f",
                r = "#bdbdbd",
                f = "#c8c8c8",
                s = [
                  "#0072c6",
                  "#5db2ff",
                  "#008a17",
                  "#82ba00",
                  "#ff8f32",
                  "#ac193d",
                ],
                c = s[0],
                e = t;
              i("office365", {
                chart: {
                  title: { color: n },
                  legend: {
                    labels: { color: n },
                    inactiveItems: {
                      labels: { color: o },
                      markers: { color: o },
                    },
                  },
                  seriesDefaults: {
                    labels: { color: n },
                    errorBars: { color: n },
                    notes: h(),
                    candlestick: { downColor: f, line: { color: r } },
                    area: { opacity: 0.8 },
                    waterfall: { line: { color: f } },
                    horizontalWaterfall: { line: { color: f } },
                    overlay: { gradient: "none" },
                    border: { _brightness: 1 },
                  },
                  seriesColors: s,
                  axisDefaults: {
                    line: { color: f },
                    labels: { color: n },
                    minorGridLines: { color: "#e5e5e5" },
                    majorGridLines: { color: f },
                    title: { color: n },
                    crosshair: { color: o },
                    notes: h(),
                  },
                },
                gauge: {
                  pointer: { color: c },
                  scale: {
                    rangePlaceholderColor: f,
                    labels: { color: n },
                    minorTicks: { color: n },
                    majorTicks: { color: n },
                    line: { color: n },
                  },
                },
                diagram: {
                  shapeDefaults: {
                    fill: { color: c },
                    connectorDefaults: {
                      fill: { color: n },
                      stroke: { color: e },
                      hover: { fill: { color: e }, stroke: { color: n } },
                    },
                    content: { color: n },
                  },
                  editable: {
                    resize: {
                      handles: {
                        fill: { color: e },
                        stroke: { color: r },
                        hover: { fill: { color: r }, stroke: { color: r } },
                      },
                    },
                    rotate: {
                      thumb: { stroke: { color: r }, fill: { color: r } },
                    },
                  },
                  selectable: { stroke: { color: r } },
                  connectionDefaults: {
                    stroke: { color: r },
                    content: { color: r },
                    selection: {
                      handles: { fill: { color: e }, stroke: { color: r } },
                      stroke: { color: r },
                    },
                  },
                },
                treeMap: {
                  colors: u(s, [
                    "#cbe2f3",
                    "#deeffe",
                    "#cbe7d0",
                    "#e5f0cb",
                    "#fee8d5",
                    "#eed0d7",
                  ]),
                },
              });
            })(),
            (function () {
              function s() {
                return {
                  icon: { background: "#007cc0", border: { color: "#007cc0" } },
                  label: { color: "#ffffff" },
                  line: { color: f },
                };
              }
              var n = "#32364c",
                h = "#7f7f7f",
                r = "#bdbdbd",
                f = "#dfe0e1",
                o = [
                  "#ff4350",
                  "#ff9ea5",
                  "#00acc1",
                  "#80deea",
                  "#ffbf46",
                  "#ffd78c",
                ],
                c = o[0],
                e = t;
              i("nova", {
                chart: {
                  title: { color: n },
                  legend: {
                    labels: { color: n },
                    inactiveItems: {
                      labels: { color: h },
                      markers: { color: h },
                    },
                  },
                  seriesDefaults: {
                    labels: { color: n },
                    errorBars: { color: n },
                    notes: s(),
                    candlestick: { downColor: f, line: { color: r } },
                    area: { opacity: 0.8 },
                    waterfall: { line: { color: f } },
                    horizontalWaterfall: { line: { color: f } },
                    overlay: { gradient: "none" },
                    border: { _brightness: 1 },
                  },
                  seriesColors: o,
                  axisDefaults: {
                    line: { color: f },
                    labels: { color: n },
                    minorGridLines: { color: "#dfe0e1" },
                    majorGridLines: { color: f },
                    title: { color: n },
                    crosshair: { color: n },
                    notes: s(),
                  },
                },
                gauge: {
                  pointer: { color: c },
                  scale: {
                    rangePlaceholderColor: f,
                    labels: { color: n },
                    minorTicks: { color: n },
                    majorTicks: { color: n },
                    line: { color: n },
                  },
                },
                diagram: {
                  shapeDefaults: {
                    fill: { color: c },
                    connectorDefaults: {
                      fill: { color: n },
                      stroke: { color: e },
                      hover: { fill: { color: e }, stroke: { color: n } },
                    },
                    content: { color: n },
                  },
                  editable: {
                    resize: {
                      handles: {
                        fill: { color: e },
                        stroke: { color: r },
                        hover: { fill: { color: r }, stroke: { color: r } },
                      },
                    },
                    rotate: {
                      thumb: { stroke: { color: r }, fill: { color: r } },
                    },
                  },
                  selectable: { stroke: { color: r } },
                  connectionDefaults: {
                    stroke: { color: r },
                    content: { color: r },
                    selection: {
                      handles: { fill: { color: e }, stroke: { color: r } },
                      stroke: { color: r },
                    },
                  },
                },
                treeMap: {
                  colors: u(o, [
                    "#ffd9dc",
                    "#ffeced",
                    "#cceef3",
                    "#e6f8fb",
                    "#fff2da",
                    "#fff7e8",
                  ]),
                },
              });
            })(),
            (function () {
              i("default-v2", {
                chart: {},
                gauge: {},
                diagram: {},
                treeMap: {
                  colors: u(
                    [
                      "#ff6358",
                      "#ffd246",
                      "#78d237",
                      "#28b4c8",
                      "#2d73f5",
                      "#aa46be",
                    ],
                    [
                      "#ffd9dc",
                      "#ffeced",
                      "#cceef3",
                      "#e6f8fb",
                      "#fff2da",
                      "#fff7e8",
                    ]
                  ),
                },
              });
              o.sass = o["default-v2"];
            })(),
            (function () {
              var n = "#292b2c",
                t = [
                  "#0275d8",
                  "#5bc0de",
                  "#5cb85c",
                  "#f0ad4e",
                  "#e67d4a",
                  "#d9534f",
                ],
                r = t[0];
              i("bootstrap-v4", {
                chart: {},
                gauge: {
                  pointer: { color: r },
                  scale: {
                    rangePlaceholderColor: "rgba(0, 0, 0, .04)",
                    labels: { color: n },
                    minorTicks: { color: n },
                    majorTicks: { color: n },
                    line: { color: n },
                  },
                },
                diagram: {},
                treeMap: {
                  colors: u(t, [
                    "#ffd9dc",
                    "#ffeced",
                    "#cceef3",
                    "#e6f8fb",
                    "#fff2da",
                    "#fff7e8",
                  ]),
                },
              });
            })();
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.themes.min",
      [
        "kendo.dataviz.core.min",
        "dataviz/themes/chart-base-theme.min",
        "dataviz/themes/auto-theme.min",
        "dataviz/themes/themes.min",
      ],
      n
    );
  })(
    function () {},
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/chart/kendo-chart.min",
      [
        "kendo.core.min",
        "kendo.color.min",
        "kendo.drawing.min",
        "kendo.dataviz.core.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        function vc(n, t) {
          for (var i = 0; i < t.length; i++)
            if (t[i].options.name === n)
              return t[i].prepareUserOptions(), new fl(t[i]);
        }
        function ls(n) {
          for (var i, u = n.length, r = 0, t = 0; t < u; t++)
            (i = n[t]), c(i) && r++;
          return r;
        }
        function ke(n, t) {
          if (null === t) return t;
          var i = hf(n, !0);
          return i(t);
        }
        function er(n, t, i, r) {
          var o, s, f, u, e;
          if (
            (void 0 === i && (i = {}),
            void 0 === r && (r = !1),
            (o = i.defaults = i.defaults || {}),
            (s = i.depth = i.depth || 0),
            (f = !1),
            (i.excluded = i.excluded || []),
            s > cy)
          )
            return null;
          for (u in n)
            !k(u, i.excluded) &&
              n.hasOwnProperty(u) &&
              ((e = n[u]),
              tt(e)
                ? ((f = !0), r || (n[u] = g(e(t), o[u])))
                : di(e) &&
                  (r || (i.defaults = o[u]),
                  i.depth++,
                  (f = er(e, t, i, r) || f),
                  i.depth--));
          return f;
        }
        function as(n) {
          for (var r = n.length, i = 0, t = 0; t < r; t++)
            i = Math.max(i, n[t].data.length);
          return i;
        }
        function yc(n, t, i, r, u) {
          var e = n.box,
            f = new nt();
          return (f[t] = e[t + i]), (f[r] = e[r + u]), f;
        }
        function pc(n) {
          for (var t = 0; t < n.length; t++) if (u(n[t].zIndex)) return !0;
        }
        function vs(n) {
          var t = n.overlay;
          return t && t.gradient && "none" !== t.gradient;
        }
        function lv(n, t) {
          n.forEach(t);
        }
        function av(n, t) {
          for (var r = n.length, i = r - 1; i >= 0; i--) t(n[i], i - r - 1);
        }
        function wc(n) {
          return ls(n) === n.length;
        }
        function at(n) {
          return u(n) && null !== n;
        }
        function dp(n) {
          for (var r, t, u = n.series, i = 0; i < u.length; i++)
            (r = u[i]),
              (t = r.data),
              !t || io(t[0]) || di(t[0]) || (r.data = [t]);
        }
        function gp() {
          return "pane" + vy++;
        }
        function ys(n, t) {
          null !== t && n.push(t);
        }
        function vv(n, t, i) {
          var r,
            f = t.visible;
          return u(f) ? f : ((r = n.pointVisibility), r ? r[i] : void 0);
        }
        function bc(n) {
          for (
            var t, i, o = n.data, u = [], f = 0, e = 0, r = 0;
            r < o.length;
            r++
          )
            (t = p.current.bindPoint(n, r)),
              (i = t.valueFields.value),
              uo(i) && (i = parseFloat(i)),
              c(i)
                ? ((t.visible = vv(n, t.fields, r) !== !1),
                  (t.value = Math.abs(i)),
                  u.push(t),
                  t.visible && (f += t.value),
                  0 !== i && e++)
                : u.push(null);
          return { total: f, points: u, count: e };
        }
        function or(n, t) {
          return n && t ? n.toLowerCase() === t.toLowerCase() : n === t;
        }
        function b(n, t) {
          for (var r, u = [], f = [].concat(t), i = 0; i < n.length; i++)
            (r = n[i]), k(r.type, f) && u.push(r);
          return u;
        }
        function kc(n, t, i) {
          var u, r;
          return null === t
            ? t
            : ((u = "_date_" + n),
              (r = t[u]),
              r || ((r = hr(i, hf(n, !0)(t))), (t[u] = r)),
              r);
        }
        function dc(n, t) {
          var i = n.type,
            r = t instanceof Date;
          return (!i && r) || or(i, sf);
        }
        function de(n) {
          return 1 === n.length ? n[0] : n;
        }
        function nw(n) {
          return n.missingValues
            ? n.missingValues
            : yy.test(n.type) || n.stack
            ? fi
            : su;
        }
        function gc(n, t) {
          var r,
            f = p.current.bindPoint(n, null, t),
            u = f.valueFields;
          for (r in u) if (i.convertableToNumber(u[r])) return !0;
        }
        function yv(n) {
          var i,
            r,
            u = n.start,
            f = n.dir,
            e = n.min,
            o = n.max,
            s = n.getter,
            h = n.hasItem,
            c = n.series,
            t = u;
          do (t += f), h(t) && ((r = s(t)), (i = gc(c, r.item)));
          while (e <= t && t <= o && !i);
          if (i) return r;
        }
        function nl(n, t, i, r, u) {
          var v,
            o,
            s,
            f,
            h,
            e = t.min,
            c = t.max,
            l = e > 0 && e < i,
            a = c + 1 < i;
          (l || a) &&
            ((v = nw(n)),
            v !== su
              ? (l && (o = r(e - 1)), a && (s = r(c + 1)))
              : (l &&
                  ((f = r(e - 1)),
                  (h = gc(n, f.item)),
                  (o = h
                    ? f
                    : yv({
                        start: e,
                        dir: -1,
                        min: 0,
                        max: i - 1,
                        getter: r,
                        hasItem: u,
                        series: n,
                      }))),
                a &&
                  ((f = r(c + 1)),
                  (h = gc(n, f.item)),
                  (s = h
                    ? f
                    : yv({
                        start: c,
                        dir: 1,
                        min: 0,
                        max: i - 1,
                        getter: r,
                        hasItem: u,
                        series: n,
                      })))),
            o && (n._outOfRangeMinPoint = o),
            s && (n._outOfRangeMaxPoint = s));
        }
        function tl(n) {
          var t,
            i,
            r,
            u = n.length;
          if (u > 0)
            for (i = 0; i < u; i++)
              (r = n[i].contentBox()), t ? t.wrap(r) : (t = r.clone());
          return t || new o();
        }
        function il(n, t) {
          for (var r, i = 0; i < n.length; i++)
            if (((r = n[i]), r && r.pane === t)) return r;
        }
        function tw(n) {
          return (
            "" === n ||
            null === n ||
            "none" === n ||
            "transparent" === n ||
            !u(n)
          );
        }
        function iw(n, t, i) {
          var e,
            f = t,
            r = n;
          if (n.indexOf(".") > -1) {
            for (e = n.split("."); e.length > 1; )
              (r = e.shift()), u(f[r]) || (f[r] = {}), (f = f[r]);
            r = e.shift();
          }
          f[r] = i;
        }
        function pv(n, i, r) {
          var u = [].concat(i instanceof fu ? n.categoryAxis : n.valueAxis);
          t(u[i.axisIndex], r);
        }
        function rw(n, t, i) {
          return yf(n, function (n) {
            return (0 === i && !n.categoryAxis) || n.categoryAxis === t;
          });
        }
        function uw() {
          this._defaultPrevented = !0;
        }
        function wv(n, t) {
          var r = (t || "").toLowerCase(),
            i = n.event;
          return (
            ("none" === r && !(i.ctrlKey || i.shiftKey || i.altKey)) ||
            i[r + "Key"]
          );
        }
        function rl(n) {
          for (var t, r = {}, i = 0; i < n.length; i++)
            (t = n[i]),
              t.axis.options.name &&
                (r[t.axis.options.name] = {
                  min: t.range.min,
                  max: t.range.max,
                });
          return r;
        }
        function bi(n) {
          var t = document.createElement("div");
          return n && (t.className = n), t;
        }
        function bv(n) {
          for (var t = n; t && !fo(t, "k-handle"); ) t = t.parentNode;
          return t;
        }
        function kv(n, i, r, u) {
          var f = [].concat(r ? n.yAxis : n.xAxis)[i];
          t(f, u);
        }
        function fw(n) {
          var r,
            u,
            f = i.rad(n),
            t = d(Math.sin(f), no),
            e = d(Math.cos(f), no);
          return (
            (r = Math.abs(t) > ip ? h : e < 0 ? w : y),
            (u = Math.abs(t) < tp ? h : t < 0 ? st : ut),
            { horizontal: r, vertical: u }
          );
        }
        function dv(n, t, i, r) {
          var f,
            u,
            s = (r.x - i.x) * (n.y - i.y) - (r.y - i.y) * (n.x - i.x),
            o = (r.y - i.y) * (t.x - n.x) - (r.x - i.x) * (t.y - n.y);
          return (
            0 !== o &&
              ((u = s / o),
              (f = new e(n.x + u * (t.x - n.x), n.y + u * (t.y - n.y)))),
            f
          );
        }
        function ew(n, t) {
          return n.value.x - t.value.x;
        }
        function ow(n) {
          for (var i, r = ac, t = 0; t < r.length; t++)
            (i = r[t] + "Axes"),
              n[i] && ((n[r[t] + "Axis"] = n[i]), delete n[i]);
        }
        function gv(n, t) {
          if (n)
            for (var i = 0; i < n.length; i++)
              if (n[i].category === t) return [n[i]];
        }
        function sw(n, i) {
          function s(n) {
            var i = (n || {}).color || f.color,
              u = t(
                {},
                o,
                o[r],
                f,
                f[r],
                {
                  line: { color: i },
                  labels: { color: i },
                  title: { color: i },
                },
                n
              );
            return delete u[r], u;
          }
          for (
            var r, f, u, o = (i || {}).axisDefaults || {}, e = 0;
            e < ac.length;
            e++
          )
            (r = ac[e] + "Axis"),
              (f = n.axisDefaults || {}),
              (u = [].concat(n[r])),
              (u = u.map(s)),
              (n[r] = u.length > 1 ? u : u[0]);
        }
        function hw(n, i) {
          var r,
            f,
            e,
            u = n.series,
            c = u.length,
            l = n.seriesDefaults,
            o = t({}, n.seriesDefaults),
            s = i ? t({}, i.seriesDefaults) : {},
            h = t({}, s);
          for (ny(o), ny(h), r = 0; r < c; r++)
            (f = u[r].type || n.seriesDefaults.type),
              (e = t({ data: [] }, h, s[f], { tooltip: n.tooltip }, o, l[f])),
              (u[r]._defaults = e),
              (u[r] = t({}, e, u[r])),
              (u[r].data = u[r].data || []);
        }
        function ny(n) {
          delete n.bar;
          delete n.column;
          delete n.rangeColumn;
          delete n.line;
          delete n.verticalLine;
          delete n.pie;
          delete n.donut;
          delete n.area;
          delete n.verticalArea;
          delete n.scatter;
          delete n.scatterLine;
          delete n.bubble;
          delete n.candlestick;
          delete n.ohlc;
          delete n.boxPlot;
          delete n.bullet;
          delete n.verticalBullet;
          delete n.polarArea;
          delete n.polarLine;
          delete n.radarArea;
          delete n.radarLine;
          delete n.waterfall;
        }
        function ge(n) {
          for (var i, r, u = {}, t = 0; t < n.length; t++)
            (i = n[t]), (r = i.options.name), r && (u[r] = i.range());
          return u;
        }
        function cw(n, t) {
          void 0 === t && (t = i.dateComparer);
          for (var r = 1, u = n.length; r < u; r++)
            if (t(n[r], n[r - 1]) < 0) {
              n.sort(t);
              break;
            }
          return n;
        }
        function lw(n, t) {
          var r, e, f, u;
          for (
            void 0 === t && (t = i.dateComparer),
              r = cw(n, t),
              e = r.length,
              f = e > 0 ? [r[0]] : [],
              u = 1;
            u < e;
            u++
          )
            0 !== t(r[u], gi(f)) && f.push(r[u]);
          return f;
        }
        function aw(n) {
          for (var u, f, t, e = n.length, r = [], i = 0; i < e; i++)
            for (u = n[i], f = u.length, t = 0; t < f; t++)
              (r[t] = r[t] || []), r[t].push(u[t]);
          return r;
        }
        function ul(n, t) {
          var i, r, f, e;
          for (i in t)
            !k(i, kp) &&
              t.hasOwnProperty(i) &&
              ((r = t[i]),
              (f = n[i]),
              u(f) &&
                ((e = null === r),
                e || !u(r)
                  ? (delete n[i], e && delete t[i])
                  : f && di(r) && di(f) && ul(f, r)));
        }
        function ty(n) {
          for (var t = 0; t < n.length; t++) n[t].notifyRender();
        }
        var i,
          et,
          c,
          s,
          rt,
          ot,
          pt,
          h,
          ut,
          st,
          y,
          lt,
          sr,
          a,
          l,
          w,
          uu,
          sf,
          no,
          to,
          u,
          hf,
          io,
          r,
          e,
          o,
          ki,
          f,
          k,
          tt,
          g,
          di,
          t,
          gi,
          nr,
          gt,
          cf,
          lf,
          wt,
          ro,
          af,
          uo,
          hr,
          vf,
          fu,
          li,
          d,
          ai,
          yf,
          ft,
          fo,
          pf,
          ps,
          wf,
          iy,
          ui,
          v,
          cr,
          bf,
          lr,
          tr,
          vi,
          nt,
          eu,
          fl,
          eo,
          el,
          oo,
          p,
          ry,
          uy,
          fy,
          ey,
          ws,
          oy,
          vt,
          yi,
          sy,
          kf,
          ni,
          ou,
          bs,
          ks,
          ol,
          sl,
          hl,
          cl,
          df,
          fi,
          su,
          ds,
          gf,
          so,
          ar,
          hu,
          cu,
          ei,
          lu,
          vr,
          yr,
          pr,
          pi,
          ne,
          te,
          wr,
          au,
          vu,
          ir,
          ho,
          co,
          lo,
          ie,
          re,
          ue,
          yu,
          br,
          pu,
          ao,
          vo,
          kr,
          dr,
          fe,
          gr,
          nu,
          wu,
          ll,
          al,
          vl,
          yl,
          pl,
          gs,
          wl,
          bl,
          kl,
          nh,
          yo,
          ee,
          oe,
          po,
          bu,
          ku,
          du,
          wo,
          gu,
          bo,
          dl,
          th,
          ih,
          gl,
          se,
          ti,
          he,
          na,
          rr,
          ce,
          ko,
          hy,
          ta,
          go,
          ia,
          cy,
          it,
          ii,
          le,
          bt,
          wi,
          rh,
          ra,
          ns,
          uh,
          ts,
          is,
          nf,
          tu,
          ua,
          rs,
          fa,
          ae,
          us,
          ly,
          iu,
          tf,
          fh,
          oi,
          si,
          ve,
          ye,
          ay,
          ea,
          oa,
          kt,
          pe,
          eh,
          sa,
          rf,
          fs,
          ur,
          oh,
          sh,
          hh,
          we,
          vy,
          yy,
          ht,
          py,
          be,
          ha,
          hi,
          es,
          ch,
          ca,
          la,
          wy,
          by,
          uf,
          lh,
          ky,
          aa,
          ah,
          va,
          ya,
          vh,
          pa,
          yh,
          wa,
          ci,
          ba,
          ph,
          wh,
          ka,
          da,
          ga,
          nv,
          dy,
          os,
          bh,
          ri,
          gy,
          np,
          kh,
          tv,
          dh,
          iv,
          rv,
          uv,
          gh,
          ss,
          hs,
          ff,
          tp,
          ip,
          nc,
          rp,
          ef,
          tc,
          of,
          up,
          ic,
          fv,
          fp,
          rc,
          uc,
          cs,
          ep,
          op,
          sp,
          fc,
          ec,
          hp,
          cp,
          lp,
          ev,
          ov,
          ap,
          oc,
          sc,
          hc,
          cc,
          vp,
          dt,
          yt,
          yp,
          ct,
          lc,
          fr,
          pp,
          wp,
          ac,
          ru,
          sv,
          hv,
          bp,
          cv,
          kp;
        window.kendo.dataviz = window.kendo.dataviz || {};
        i = kendo.dataviz;
        et = i.Class;
        c = i.isNumber;
        s = i.constants;
        rt = s.MAX_VALUE;
        ot = s.MIN_VALUE;
        pt = s.VALUE;
        h = s.CENTER;
        ut = s.TOP;
        st = s.BOTTOM;
        y = s.LEFT;
        lt = s.WHITE;
        sr = s.CIRCLE;
        a = s.X;
        l = s.Y;
        w = s.RIGHT;
        uu = s.BLACK;
        sf = s.DATE;
        no = s.DEFAULT_PRECISION;
        to = s.ARC;
        u = i.defined;
        hf = i.getter;
        io = i.isArray;
        r = i.ChartElement;
        e = i.Point;
        o = i.Box;
        ki = i.alignPathToPixel;
        f = i.setDefaultOptions;
        k = i.inArray;
        tt = i.isFunction;
        g = i.valueOrDefault;
        di = i.isObject;
        t = i.deepExtend;
        gi = i.last;
        nr = i.eventElement;
        gt = i.getTemplate;
        cf = i.TextBox;
        lf = i.ShapeElement;
        wt = i.getSpacing;
        ro = i.CurveProcessor;
        af = i.append;
        uo = i.isString;
        hr = i.parseDate;
        vf = i.styleValue;
        fu = i.CategoryAxis;
        li = i.BoxElement;
        d = i.round;
        ai = i.limitValue;
        yf = i.grep;
        ft = i.elementStyles;
        fo = i.hasClasses;
        pf = i.bindEvents;
        ps = i.services;
        wf = i.unbindEvents;
        iy = kendo.support;
        ui = kendo.drawing;
        v = ui.Path;
        cr = ui.Animation;
        bf = ui.AnimationFactory;
        lr = ui.Group;
        tr = kendo.Color;
        vi = kendo.geometry;
        nt = vi.Point;
        eu = vi.transform;
        fl = et.extend({
          init: function (n) {
            this._axis = n;
            this.options = n.options;
          },
          value: function (n) {
            var t = this._axis;
            return t.getCategory ? t.getCategory(n) : t.getValue(n);
          },
          slot: function (n, t, i) {
            return void 0 === i && (i = !0), this._axis.slot(n, t, i);
          },
          range: function () {
            return this._axis.range();
          },
          valueRange: function () {
            return this._axis.valueRange();
          },
        });
        eo = kendo.Class.extend({
          init: function (n) {
            this.visual = n.visual;
            this.chartsVisual = n.chartContainer.visual;
            this._pane = n;
          },
          findAxisByName: function (n) {
            return vc(n, this._pane.axes);
          },
        });
        el = et.extend({
          init: function (n) {
            this._plotArea = n;
            this.visual = n.visual;
            this.backgroundVisual = n._bgVisual;
          },
        });
        oo = {
          min: function (n) {
            for (var r, u = n.length, i = rt, t = 0; t < u; t++)
              (r = n[t]), c(r) && (i = Math.min(i, r));
            return i === rt ? n[0] : i;
          },
          max: function (n) {
            for (var r, u = n.length, i = ot, t = 0; t < u; t++)
              (r = n[t]), c(r) && (i = Math.max(i, r));
            return i === ot ? n[0] : i;
          },
          sum: function (n) {
            for (var i, u = n.length, r = 0, t = 0; t < u; t++)
              (i = n[t]), c(i) && (r += i);
            return r;
          },
          sumOrNull: function (n) {
            var t = null;
            return ls(n) && (t = oo.sum(n)), t;
          },
          count: function (n) {
            for (var i, f = n.length, r = 0, t = 0; t < f; t++)
              (i = n[t]), null !== i && u(i) && r++;
            return r;
          },
          avg: function (n) {
            var t = ls(n),
              i = n[0];
            return t > 0 && (i = oo.sum(n) / t), i;
          },
          first: function (n) {
            for (var i, r = n.length, t = 0; t < r; t++)
              if (((i = n[t]), null !== i && u(i))) return i;
            return n[0];
          },
        };
        p = et.extend({
          init: function () {
            this._valueFields = {};
            this._otherFields = {};
            this._nullValue = {};
            this._undefinedValue = {};
          },
          register: function (n, t, i) {
            var f,
              u,
              r = this;
            for (
              void 0 === t && (t = [pt]), void 0 === i && (i = {}), f = 0;
              f < n.length;
              f++
            )
              (u = n[f]),
                (r._valueFields[u] = t),
                (r._otherFields[u] = i),
                (r._nullValue[u] = r._makeValue(t, null)),
                (r._undefinedValue[u] = r._makeValue(t, void 0));
          },
          canonicalFields: function (n) {
            return this.valueFields(n).concat(this.otherFields(n));
          },
          valueFields: function (n) {
            return this._valueFields[n.type] || [pt];
          },
          otherFields: function (n) {
            return this._otherFields[n.type] || [pt];
          },
          bindPoint: function (n, t, i) {
            var s,
              f,
              c,
              l,
              a,
              v = n.data,
              r = u(i) ? i : v[t],
              o = { valueFields: { value: r } },
              e = this.valueFields(n),
              h = this._otherFields[n.type];
            return (
              null === r
                ? (f = this._nullValue[n.type])
                : u(r)
                ? Array.isArray(r)
                  ? ((c = r.slice(e.length)),
                    (f = this._bindFromArray(r, e)),
                    (s = this._bindFromArray(c, h)))
                  : "object" == typeof r &&
                    ((l = this.sourceFields(n, e)),
                    (a = this.sourceFields(n, h)),
                    (f = this._bindFromObject(r, e, l)),
                    (s = this._bindFromObject(r, h, a)))
                : (f = this._undefinedValue[n.type]),
              u(f) &&
                (1 === e.length
                  ? (o.valueFields.value = f[e[0]])
                  : (o.valueFields = f)),
              (o.fields = s || {}),
              o
            );
          },
          _makeValue: function (n, t) {
            for (var r, u = {}, f = n.length, i = 0; i < f; i++)
              (r = n[i]), (u[r] = t);
            return u;
          },
          _bindFromArray: function (n, t) {
            var r,
              i,
              u = {};
            if (t)
              for (r = Math.min(t.length, n.length), i = 0; i < r; i++)
                u[t[i]] = n[i];
            return u;
          },
          _bindFromObject: function (n, t, i) {
            var u, e, r, o, f;
            if ((void 0 === i && (i = t), (u = {}), t))
              for (e = t.length, r = 0; r < e; r++)
                (o = t[r]), (f = i[r]), null !== f && (u[o] = ke(f, n));
            return u;
          },
          sourceFields: function (n, t) {
            var f,
              i,
              r,
              u,
              e = [];
            if (t)
              for (f = t.length, i = 0; i < f; i++)
                (r = t[i]),
                  (u = r === pt ? "field" : r + "Field"),
                  e.push(null !== n[u] ? n[u] || r : null);
            return e;
          },
        });
        p.current = new p();
        ry = "stderr";
        uy = "stddev";
        fy = /percent(?:\w*)\((\d+)\)/;
        ey = RegExp("^" + uy + "(?:\\((\\d+(?:\\.\\d+)?)\\))?$");
        ws = et.extend({
          init: function (n, t, i) {
            this.initGlobalRanges(n, t, i);
          },
          initGlobalRanges: function (n, t, i) {
            var r,
              f,
              e,
              h,
              o,
              u = t.data,
              s = ey.exec(n);
            s
              ? ((this.valueGetter = this.createValueGetter(t, i)),
                (r = this.getAverage(u)),
                (f = this.getStandardDeviation(u, r, !1)),
                (e = s[1] ? parseFloat(s[1]) : 1),
                (h = { low: r.value - f * e, high: r.value + f * e }),
                (this.globalRange = function () {
                  return h;
                }))
              : n.indexOf &&
                n.indexOf(ry) >= 0 &&
                ((this.valueGetter = this.createValueGetter(t, i)),
                (o = this.getStandardError(u, this.getAverage(u))),
                (this.globalRange = function (n) {
                  return { low: n - o, high: n + o };
                }));
          },
          createValueGetter: function (n, t) {
            var i,
              e,
              o,
              h = n.data,
              l = p.current,
              r = l.valueFields(n),
              f = u(h[0]) ? h[0] : {};
            return (
              io(f)
                ? ((e = t ? r.indexOf(t) : 0), (i = hf("[" + e + "]")))
                : c(f)
                ? (i = hf())
                : typeof f === s.OBJECT &&
                  ((o = l.sourceFields(n, r)), (i = hf(o[r.indexOf(t)]))),
              i
            );
          },
          getErrorRange: function (n, t) {
            var r, f, i, e;
            if (!u(t)) return null;
            if (this.globalRange) return this.globalRange(n);
            if (io(t)) (r = n - t[0]), (f = n + t[1]);
            else if (c((i = parseFloat(t)))) (r = n - i), (f = n + i);
            else {
              if (!(i = fy.exec(t)))
                throw Error("Invalid ErrorBar value: " + t);
              e = n * (parseFloat(i[1]) / 100);
              r = n - Math.abs(e);
              f = n + Math.abs(e);
            }
            return { low: r, high: f };
          },
          getStandardError: function (n, t) {
            return this.getStandardDeviation(n, t, !0) / Math.sqrt(t.count);
          },
          getStandardDeviation: function (n, t, i) {
            for (
              var u,
                e = this,
                o = n.length,
                s = i ? t.count - 1 : t.count,
                f = 0,
                r = 0;
              r < o;
              r++
            )
              (u = e.valueGetter(n[r])),
                c(u) && (f += Math.pow(u - t.value, 2));
            return Math.sqrt(f / s);
          },
          getAverage: function (n) {
            for (var i, f = this, e = n.length, u = 0, r = 0, t = 0; t < e; t++)
              (i = f.valueGetter(n[t])), c(i) && ((u += i), r++);
            return { value: u / r, count: r };
          },
        });
        oy = iy.browser || {};
        vt = 600;
        yi = "fadeIn";
        sy = "glass";
        kf = 0.8;
        ni = 5;
        ou = oy.msie ? 0.001 : 0;
        bs = "errorLow";
        ks = "errorHigh";
        ol = "xErrorLow";
        sl = "xErrorHigh";
        hl = "yErrorLow";
        cl = "yErrorHigh";
        df = 8;
        fi = "zero";
        su = "interpolate";
        ds = "gap";
        gf = "above";
        so = "below";
        ar = "smooth";
        hu = "step";
        cu = "area";
        ei = "bar";
        lu = "boxPlot";
        vr = "bubble";
        yr = "bullet";
        pr = "candlestick";
        pi = "column";
        ne = "donut";
        te = "funnel";
        wr = "horizontalWaterfall";
        au = "line";
        vu = "ohlc";
        ir = "pie";
        ho = "polarArea";
        co = "polarLine";
        lo = "polarScatter";
        ie = "radarArea";
        re = "radarColumn";
        ue = "radarLine";
        yu = "rangeArea";
        br = "rangeBar";
        pu = "rangeColumn";
        ao = "scatter";
        vo = "scatterLine";
        kr = "verticalArea";
        dr = "verticalBoxPlot";
        fe = "verticalBullet";
        gr = "verticalLine";
        nu = "verticalRangeArea";
        wu = "waterfall";
        ll = [ei, pi, vu, pr, lu, dr, yr, pu, br, wu, wr];
        al = "legendItemClick";
        vl = "legendItemHover";
        yl = "legendItemLeave";
        pl = "seriesClick";
        gs = "seriesHover";
        wl = "seriesOver";
        bl = "seriesLeave";
        kl = "plotAreaClick";
        nh = "plotAreaHover";
        yo = "plotAreaLeave";
        ee = "drag";
        oe = "dragEnd";
        po = "dragStart";
        bu = "zoomStart";
        ku = "zoom";
        du = "zoomEnd";
        wo = "selectStart";
        gu = "select";
        bo = "selectEnd";
        dl = "render";
        th = "showTooltip";
        ih = "hideTooltip";
        gl = "paneRender";
        se = "log";
        ti = "category";
        he = "insideEnd";
        na = "insideBase";
        rr = "outsideEnd";
        ce = "DOMMouseScroll mousewheel";
        ko = 150;
        hy = {
          INITIAL_ANIMATION_DURATION: vt,
          FADEIN: yi,
          LEGEND_ITEM_CLICK: al,
          LEGEND_ITEM_HOVER: vl,
          LEGEND_ITEM_LEAVE: yl,
          SERIES_CLICK: pl,
          SERIES_HOVER: gs,
          SERIES_OVER: wl,
          SERIES_LEAVE: bl,
          GLASS: sy,
          BORDER_BRIGHTNESS: kf,
          TOOLTIP_OFFSET: ni,
          START_SCALE: ou,
          ERROR_LOW_FIELD: bs,
          ERROR_HIGH_FIELD: ks,
          X_ERROR_LOW_FIELD: ol,
          X_ERROR_HIGH_FIELD: sl,
          Y_ERROR_LOW_FIELD: hl,
          Y_ERROR_HIGH_FIELD: cl,
          LINE_MARKER_SIZE: df,
          INTERPOLATE: su,
          ZERO: fi,
          SMOOTH: ar,
          STEP: hu,
          CATEGORY: ti,
          FUNNEL: te,
          BAR: ei,
          CANDLESTICK: pr,
          PIE: ir,
          COLUMN: pi,
          AREA: cu,
          VERTICAL_BULLET: fe,
          BOX_PLOT: lu,
          OHLC: vu,
          WATERFALL: wu,
          LINE: au,
          BULLET: yr,
          VERTICAL_LINE: gr,
          VERTICAL_AREA: kr,
          RANGE_AREA: yu,
          VERTICAL_RANGE_AREA: nu,
          RANGE_COLUMN: pu,
          VERTICAL_BOX_PLOT: dr,
          RANGE_BAR: br,
          HORIZONTAL_WATERFALL: wr,
          SCATTER: ao,
          SCATTER_LINE: vo,
          BUBBLE: vr,
          RADAR_AREA: ie,
          RADAR_LINE: ue,
          RADAR_COLUMN: re,
          POLAR_LINE: co,
          POLAR_AREA: ho,
          POLAR_SCATTER: lo,
          RENDER: dl,
          PLOT_AREA_CLICK: kl,
          PLOT_AREA_HOVER: nh,
          PLOT_AREA_LEAVE: yo,
          LOGARITHMIC: se,
          DRAG: ee,
          DRAG_START: po,
          DRAG_END: oe,
          ZOOM_START: bu,
          ZOOM: ku,
          ZOOM_END: du,
          SELECT_START: wo,
          SELECT: gu,
          SELECT_END: bo,
          PANE_RENDER: gl,
          GAP: ds,
          DONUT: ne,
          INSIDE_END: he,
          INSIDE_BASE: na,
          OUTSIDE_END: rr,
          MOUSEWHEEL: ce,
          MOUSEWHEEL_DELAY: ko,
          SHOW_TOOLTIP: th,
          HIDE_TOOLTIP: ih,
          EQUALLY_SPACED_SERIES: ll,
          ABOVE: gf,
          BELOW: so,
        };
        ta = 4;
        go = r.extend({
          init: function (n, t, i, u, f, e) {
            r.fn.init.call(this, e);
            this.low = n;
            this.high = t;
            this.isVertical = i;
            this.chart = u;
            this.series = f;
          },
          reflow: function (n) {
            var f,
              h = this.options.endCaps,
              s = this.isVertical,
              a = this.getAxis(),
              t = a.getSlot(this.low, this.high),
              i = n.center(),
              c = this.getCapsWidth(n, s),
              l = s ? i.x : i.y,
              r = l - c,
              u = l + c;
            s
              ? ((f = [new e(i.x, t.y1), new e(i.x, t.y2)]),
                h &&
                  f.push(
                    new e(r, t.y1),
                    new e(u, t.y1),
                    new e(r, t.y2),
                    new e(u, t.y2)
                  ),
                (this.box = new o(r, t.y1, u, t.y2)))
              : ((f = [new e(t.x1, i.y), new e(t.x2, i.y)]),
                h &&
                  f.push(
                    new e(t.x1, r),
                    new e(t.x1, u),
                    new e(t.x2, r),
                    new e(t.x2, u)
                  ),
                (this.box = new o(t.x1, r, t.x2, u)));
            this.linePoints = f;
          },
          getCapsWidth: function (n, t) {
            var i = t ? n.width() : n.height();
            return Math.min(Math.floor(i / 2), ta) || ta;
          },
          createVisual: function () {
            var t = this,
              n = this.options,
              i = n.visual;
            i
              ? (this.visual = i({
                  low: this.low,
                  high: this.high,
                  rect: this.box.toRect(),
                  sender: this.getSender(),
                  options: { endCaps: n.endCaps, color: n.color, line: n.line },
                  createVisual: function () {
                    t.createDefaultVisual();
                    var n = t.visual;
                    return delete t.visual, n;
                  },
                }))
              : this.createDefaultVisual();
          },
          createDefaultVisual: function () {
            var n,
              i,
              e = this,
              f = this,
              u = f.options,
              t = f.linePoints,
              o = {
                stroke: {
                  color: u.color,
                  width: u.line.width,
                  dashType: u.line.dashType,
                },
              };
            for (r.fn.createVisual.call(this), n = 0; n < t.length; n += 2)
              (i = new v(o)
                .moveTo(t[n].x, t[n].y)
                .lineTo(t[n + 1].x, t[n + 1].y)),
                ki(i),
                e.visual.append(i);
          },
        });
        f(go, {
          animation: { type: yi, delay: vt },
          endCaps: !0,
          line: { width: 2 },
          zIndex: 1,
        });
        ia = go.extend({
          getAxis: function () {
            return this.chart.seriesValueAxis(this.series);
          },
        });
        cy = 5;
        it = r.extend({
          init: function (n, t) {
            r.fn.init.call(this, t);
            this.plotArea = n;
            this.chartService = n.chartService;
            this.categoryAxis = n.seriesCategoryAxis(t.series[0]);
            this.valueAxisRanges = {};
            this.points = [];
            this.categoryPoints = [];
            this.seriesPoints = [];
            this.seriesOptions = [];
            this._evalSeries = [];
            this.render();
          },
          render: function () {
            this.traverseDataPoints(this.addValue.bind(this));
          },
          pointOptions: function (n, i) {
            var u,
              r = this.seriesOptions[i];
            return (
              r ||
                ((u = this.pointType().prototype.defaults),
                (this.seriesOptions[i] = r =
                  t({}, u, { vertical: !this.options.invertAxes }, n))),
              r
            );
          },
          plotValue: function (n) {
            var o, u, s, i, r, t, f, e;
            if (!n) return 0;
            if (this.options.isStacked100 && c(n.value)) {
              for (
                o = n.categoryIx,
                  u = this.categoryPoints[o],
                  s = [],
                  i = 0,
                  r = 0;
                r < u.length;
                r++
              )
                if ((t = u[r])) {
                  if (
                    ((f = n.series.stack),
                    (e = t.series.stack),
                    f && e && f.group !== e.group)
                  )
                    continue;
                  c(t.value) &&
                    ((i += Math.abs(t.value)), s.push(Math.abs(t.value)));
                }
              if (i > 0) return n.value / i;
            }
            return n.value;
          },
          plotRange: function (n, t) {
            var l,
              r,
              a,
              e,
              v,
              o,
              h,
              u,
              c,
              f,
              p,
              w,
              y,
              b = this;
            if (
              (void 0 === t && (t = 0),
              (l = this.categoryPoints[n.categoryIx]),
              this.options.isStacked)
            ) {
              for (
                r = this.plotValue(n), a = r >= 0, e = t, v = !1, o = 0;
                o < l.length && ((h = l[o]), n !== h);
                o++
              ) {
                if (((u = n.series.stack), (c = h.series.stack), u && c)) {
                  if (typeof u === s.STRING && u !== c) continue;
                  if (u.group && u.group !== c.group) continue;
                }
                f = b.plotValue(h);
                ((f >= 0 && a) || (f < 0 && !a)) &&
                  ((e += f),
                  (r += f),
                  (v = !0),
                  b.options.isStacked100 && (r = Math.min(r, 1)));
              }
              return v && (e -= t), [e, r];
            }
            return (
              (p = n.series),
              (w = this.seriesValueAxis(p)),
              (y = this.categoryAxisCrossingValue(w)),
              [y, i.convertableToNumber(n.value) ? n.value : y]
            );
          },
          stackLimits: function (n, t) {
            for (
              var o, e, i, r, c = this, s = rt, h = ot, f = 0;
              f < this.categoryPoints.length;
              f++
            )
              if ((o = c.categoryPoints[f]))
                for (e = 0; e < o.length; e++)
                  (i = o[e]),
                    i &&
                      ((i.series.stack !== t && i.series.axis !== n) ||
                        ((r = c.plotRange(i, 0)[1]),
                        u(r) &&
                          isFinite(r) &&
                          ((h = Math.max(h, r)), (s = Math.min(s, r)))));
            return { min: s, max: h };
          },
          updateStackRange: function () {
            var r,
              u,
              f,
              e,
              n,
              t,
              o = this,
              s = this.options,
              l = s.isStacked,
              h = s.series,
              c = {};
            if (l)
              for (r = 0; r < h.length; r++)
                (u = h[r]),
                  (f = u.axis),
                  (e = f + u.stack),
                  (n = c[e]),
                  n ||
                    ((n = o.stackLimits(f, u.stack)),
                    (t = o.errorTotals),
                    t &&
                      (t.negative.length &&
                        (n.min = Math.min(
                          n.min,
                          i.sparseArrayLimits(t.negative).min
                        )),
                      t.positive.length &&
                        (n.max = Math.max(
                          n.max,
                          i.sparseArrayLimits(t.positive).max
                        ))),
                    n.min !== rt || n.max !== ot ? (c[e] = n) : (n = null)),
                  n && (o.valueAxisRanges[f] = n);
          },
          addErrorBar: function (n, t, i) {
            var r,
              h = n.value,
              l = n.series,
              e = n.seriesIx,
              f = n.options.errorBars,
              o = t.fields[bs],
              s = t.fields[ks];
            c(o) && c(s)
              ? (r = { low: o, high: s })
              : f &&
                u(f.value) &&
                ((this.seriesErrorRanges = this.seriesErrorRanges || []),
                (this.seriesErrorRanges[e] =
                  this.seriesErrorRanges[e] || new ws(f.value, l, pt)),
                (r = this.seriesErrorRanges[e].getErrorRange(h, f.value)));
            r &&
              ((n.low = r.low), (n.high = r.high), this.addPointErrorBar(n, i));
          },
          addPointErrorBar: function (n, t) {
            var i,
              r,
              u,
              s = !this.options.invertAxes,
              h = n.options.errorBars,
              o = n.series,
              f = n.low,
              e = n.high;
            this.options.isStacked
              ? ((i = this.stackedErrorRange(n, t)), (f = i.low), (e = i.high))
              : ((r = { categoryIx: t, series: o }),
                this.updateRange({ value: f }, r),
                this.updateRange({ value: e }, r));
            u = new ia(f, e, s, this, o, h);
            n.errorBars = [u];
            n.append(u);
          },
          stackedErrorRange: function (n, t) {
            var u = this.plotRange(n, 0)[1] - n.value,
              i = n.low + u,
              r = n.high + u;
            return (
              (this.errorTotals = this.errorTotals || {
                positive: [],
                negative: [],
              }),
              i < 0 &&
                (this.errorTotals.negative[t] = Math.min(
                  this.errorTotals.negative[t] || 0,
                  i
                )),
              r > 0 &&
                (this.errorTotals.positive[t] = Math.max(
                  this.errorTotals.positive[t] || 0,
                  r
                )),
              { low: i, high: r }
            );
          },
          addValue: function (t, i) {
            var f,
              r,
              e = i.categoryIx,
              h = i.series,
              s = i.seriesIx,
              o = this.categoryPoints[e];
            o || (this.categoryPoints[e] = o = []);
            f = this.seriesPoints[s];
            f || (this.seriesPoints[s] = f = []);
            r = this.createPoint(t, i);
            r &&
              (n.extend(r, i),
              (r.owner = this),
              (r.noteText = t.fields.noteText),
              u(r.dataItem) || (r.dataItem = h.data[e]),
              this.addErrorBar(r, t, e));
            this.points.push(r);
            f.push(r);
            o.push(r);
            this.updateRange(t.valueFields, i);
          },
          evalPointOptions: function (n, i, r, f, e, o) {
            var s,
              c = {
                defaults: e._defaults,
                excluded: [
                  "data",
                  "aggregate",
                  "_events",
                  "tooltip",
                  "content",
                  "template",
                  "visual",
                  "toggle",
                  "_outOfRangeMinPoint",
                  "_outOfRangeMaxPoint",
                ],
              },
              h = this._evalSeries[o];
            return (
              u(h) || (this._evalSeries[o] = h = er(n, {}, c, !0)),
              (s = n),
              h &&
                ((s = t({}, s)),
                er(
                  s,
                  {
                    value: i,
                    category: r,
                    index: f,
                    series: e,
                    dataItem: e.data[f],
                  },
                  c
                )),
              s
            );
          },
          updateRange: function (n, t) {
            var u = t.series.axis,
              r = n.value,
              i = this.valueAxisRanges[u];
            isFinite(r) &&
              null !== r &&
              ((i = this.valueAxisRanges[u] = i || { min: rt, max: ot }),
              (i.min = Math.min(i.min, r)),
              (i.max = Math.max(i.max, r)));
          },
          seriesValueAxis: function (n) {
            var i = this.plotArea,
              t = n.axis,
              r = t ? i.namedValueAxes[t] : i.valueAxis;
            if (!r) throw Error("Unable to locate value axis with name " + t);
            return r;
          },
          reflow: function (n) {
            var t = this,
              i = (this.categorySlots = []),
              r = this.points,
              u = this.categoryAxis,
              f = 0;
            this.traverseDataPoints(function (n, e) {
              var h,
                c,
                v,
                l = e.categoryIx,
                y = e.series,
                s = t.seriesValueAxis(y),
                o = r[f++],
                a = i[l];
              a || (i[l] = a = t.categorySlot(u, l, s));
              o &&
                ((h = t.plotRange(o, s.startValue())),
                (c = t.valueSlot(s, h)),
                c
                  ? ((v = t.pointSlot(a, c)),
                    (o.aboveAxis = t.aboveAxis(o, s)),
                    (o.stackValue = h[1]),
                    t.options.isStacked100 && (o.percentage = t.plotValue(o)),
                    t.reflowPoint(o, v))
                  : (o.visible = !1));
            });
            this.reflowCategories(i);
            !this.options.clip &&
              this.options.limitPoints &&
              this.points.length &&
              this.limitPoints();
            this.box = n;
          },
          valueSlot: function (n, t) {
            return n.getSlot(t[0], t[1], !this.options.clip);
          },
          limitPoints: function () {
            for (
              var r = this,
                i = this.categoryPoints,
                t = i[0].concat(gi(i)),
                n = 0;
              n < t.length;
              n++
            )
              t[n] && r.limitPoint(t[n]);
          },
          limitPoint: function (n) {
            var t = this.categoryAxis.limitSlot(n.box);
            t.equals(n.box) || n.reflow(t);
          },
          aboveAxis: function (n, t) {
            var i = this.categoryAxisCrossingValue(t),
              r = n.value;
            return t.options.reverse ? r < i : r >= i;
          },
          categoryAxisCrossingValue: function (n) {
            var i = this.categoryAxis,
              t = n.options,
              r = [].concat(t.axisCrossingValues || t.axisCrossingValue);
            return r[i.axisIndex || 0] || 0;
          },
          reflowPoint: function (n, t) {
            n.reflow(t);
          },
          reflowCategories: function () {},
          pointSlot: function (n, t) {
            var f = this.options,
              i = f.invertAxes,
              r = i ? t : n,
              u = i ? n : t;
            return new o(r.x1, u.y1, r.x2, u.y2);
          },
          categorySlot: function (n, t) {
            return n.getSlot(t);
          },
          traverseDataPoints: function (n) {
            for (
              var t,
                i,
                o,
                h,
                c,
                u,
                e = this,
                f = this.options.series,
                l = as(f),
                s = f.length,
                r = 0;
              r < s;
              r++
            )
              e._outOfRangeCallback(f[r], "_outOfRangeMinPoint", r, n);
            for (t = 0; t < l; t++)
              for (i = 0; i < s; i++)
                (o = f[i]),
                  (h = e.categoryAxis.categoryAt(t)),
                  (c = e._bindPoint(o, i, t)),
                  n(c, { category: h, categoryIx: t, series: o, seriesIx: i });
            for (u = 0; u < s; u++)
              e._outOfRangeCallback(f[u], "_outOfRangeMaxPoint", u, n);
          },
          _outOfRangeCallback: function (n, t, i, r) {
            var f,
              e,
              u = n[t];
            u &&
              ((f = u.categoryIx),
              (e = this._bindPoint(n, i, f, u.item)),
              r(e, {
                category: u.category,
                categoryIx: f,
                series: n,
                seriesIx: i,
                dataItem: u.item,
              }));
          },
          _bindPoint: function (n, t, i, r) {
            var u, f;
            return (
              this._bindCache || (this._bindCache = []),
              (u = this._bindCache[t]),
              u || (u = this._bindCache[t] = []),
              (f = u[i]),
              f || (f = u[i] = p.current.bindPoint(n, i, r)),
              f
            );
          },
          formatPointValue: function (n, t) {
            return null === n.value
              ? ""
              : this.chartService.format.auto(t, n.value);
          },
          pointValue: function (n) {
            return n.valueFields.value;
          },
        });
        f(it, {
          series: [],
          invertAxes: !1,
          isStacked: !1,
          clip: !0,
          limitPoints: !0,
        });
        ii = {
          click: function (n, t) {
            return n.trigger(pl, this.eventArgs(t));
          },
          hover: function (n, t) {
            return n.trigger(gs, this.eventArgs(t));
          },
          over: function (n, t) {
            return n.trigger(wl, this.eventArgs(t));
          },
          out: function (n, t) {
            return n.trigger(bl, this.eventArgs(t));
          },
          eventArgs: function (n) {
            return {
              value: this.value,
              percentage: this.percentage,
              stackValue: this.stackValue,
              category: this.category,
              series: this.series,
              dataItem: this.dataItem,
              runningTotal: this.runningTotal,
              total: this.total,
              element: nr(n),
              originalEvent: n,
              point: this,
            };
          },
        };
        le = {
          createNote: function () {
            var t = this.options.notes,
              n = this.noteText || t.label.text;
            t.visible !== !1 &&
              u(n) &&
              null !== n &&
              ((this.note = new i.Note(
                {
                  value: this.value,
                  text: n,
                  dataItem: this.dataItem,
                  category: this.category,
                  series: this.series,
                },
                this.options.notes,
                this.owner.chartService
              )),
              this.append(this.note));
          },
        };
        bt = r.extend({
          init: function (n, t) {
            r.fn.init.call(this);
            this.value = n;
            this.options = t;
            this.aboveAxis = g(this.options.aboveAxis, !0);
            this.tooltipTracking = !0;
          },
          render: function () {
            var r,
              u,
              i,
              f = this.options,
              e = f.markers,
              n = f.labels;
            this._rendered ||
              ((this._rendered = !0),
              e.visible &&
                e.size &&
                ((this.marker = this.createMarker()), this.append(this.marker)),
              n.visible &&
                ((r = gt(n)),
                (u = this.pointData()),
                (i = this.value),
                r ? (i = r(u)) : n.format && (i = this.formatValue(n.format)),
                (this.label = new cf(
                  i,
                  t(
                    {
                      align: h,
                      vAlign: h,
                      margin: { left: 5, right: 5 },
                      zIndex: g(n.zIndex, this.series.zIndex),
                    },
                    n
                  ),
                  u
                )),
                this.append(this.label)),
              this.createNote(),
              this.errorBar && this.append(this.errorBar));
          },
          markerBorder: function () {
            var i = this.options.markers,
              r = i.background,
              n = t({ color: this.color }, i.border);
            return (
              u(n.color) || (n.color = new tr(r).brightness(kf).toHex()), n
            );
          },
          createVisual: function () {},
          createMarker: function () {
            var n = this.options.markers;
            return new lf(
              {
                type: n.type,
                width: n.size,
                height: n.size,
                rotation: n.rotation,
                background: n.background,
                border: this.markerBorder(),
                opacity: n.opacity,
                zIndex: g(n.zIndex, this.series.zIndex),
                animation: n.animation,
                visual: n.visual,
              },
              {
                dataItem: this.dataItem,
                value: this.value,
                series: this.series,
                category: this.category,
              }
            );
          },
          markerBox: function () {
            return (
              this.marker ||
                ((this.marker = this.createMarker()),
                this.marker.reflow(this._childBox)),
              this.marker.box
            );
          },
          reflow: function (n) {
            var t,
              r,
              u,
              i,
              h = this,
              e = this,
              f = e.options,
              s = e.aboveAxis,
              c = f.vertical;
            if (
              (this.render(),
              (this.box = n),
              (t = n.clone()),
              c
                ? s
                  ? (t.y1 -= t.height())
                  : (t.y2 += t.height())
                : s
                ? (t.x1 += t.width())
                : (t.x2 -= t.width()),
              (this._childBox = t),
              this.marker && this.marker.reflow(t),
              this.reflowLabel(t),
              this.errorBars)
            )
              for (r = 0; r < this.errorBars.length; r++)
                h.errorBars[r].reflow(t);
            this.note &&
              ((u = this.markerBox()),
              (f.markers.visible && f.markers.size) ||
                ((i = u.center()), (u = new o(i.x, i.y, i.x, i.y))),
              this.note.reflow(u));
          },
          reflowLabel: function (n) {
            var r = this,
              u = r.options,
              i = r.label,
              t = u.labels.position;
            i &&
              ((t = t === gf ? ut : t),
              (t = t === so ? st : t),
              i.reflow(n),
              i.box.alignTo(this.markerBox(), t),
              i.reflow(i.box));
          },
          createHighlight: function () {
            var n = this.options.highlight.markers,
              u = this.markerBorder().color,
              t = this.options.markers,
              i = t.size + (t.border.width || 0) + (n.border.width || 0),
              r = new lf({
                type: t.type,
                width: i,
                height: i,
                rotation: t.rotation,
                background: n.color || u,
                border: {
                  color: n.border.color,
                  width: n.border.width,
                  opacity: g(n.border.opacity, 1),
                },
                opacity: g(n.opacity, 1),
              });
            return r.reflow(this._childBox), r.getElement();
          },
          highlightVisual: function () {
            return (this.marker || {}).visual;
          },
          highlightVisualArgs: function () {
            var f,
              t,
              n,
              i,
              r,
              u = this.marker;
            return (
              u
                ? ((t = u.paddingBox.toRect()), (f = u.visual))
                : ((n = this.options.markers.size),
                  (i = n / 2),
                  (r = this.box.center()),
                  (t = new vi.Rect([r.x - i, r.y - i], [n, n]))),
              { options: this.options, rect: t, visual: f }
            );
          },
          tooltipAnchor: function () {
            var r,
              u,
              t,
              i,
              n = this.markerBox(),
              f = this.owner.pane.clipBox(),
              o = !f || f.overlaps(n);
            if (o)
              return (
                (r = n.x2 + ni),
                (u = y),
                this.aboveAxis
                  ? ((t = n.y1), (i = st))
                  : ((t = n.y2), (i = ut)),
                { point: new e(r, t), align: { horizontal: u, vertical: i } }
              );
          },
          formatValue: function (n) {
            return this.owner.formatPointValue(this, n);
          },
          overlapsBox: function (n) {
            var t = this.markerBox();
            return t.overlaps(n);
          },
          unclipElements: function () {
            this.label && (this.label.options.noclip = !0);
            this.note && (this.note.options.noclip = !0);
          },
          pointData: function () {
            return {
              dataItem: this.dataItem,
              category: this.category,
              value: this.value,
              percentage: this.percentage,
              stackValue: this.stackValue,
              series: this.series,
            };
          },
        });
        bt.prototype.defaults = {
          vertical: !0,
          markers: {
            visible: !0,
            background: lt,
            size: df,
            type: sr,
            border: { width: 2 },
            opacity: 1,
          },
          labels: {
            visible: !1,
            position: gf,
            margin: wt(3),
            padding: wt(4),
            animation: { type: yi, delay: vt },
          },
          notes: { label: {} },
          highlight: {
            markers: { border: { color: "#fff", width: 2 } },
            zIndex: s.HIGHLIGHT_ZINDEX,
          },
          errorBars: { line: { width: 1 } },
        };
        t(bt.prototype, ii);
        t(bt.prototype, le);
        wi = r.extend({
          init: function (n, t, i) {
            r.fn.init.call(this);
            this.linePoints = n;
            this.series = t;
            this.seriesIx = i;
          },
          points: function () {
            return this.toGeometryPoints(this.linePoints);
          },
          toGeometryPoints: function (n) {
            for (var r = [], t = 0, i = n.length; t < i; t++)
              n[t] &&
                n[t].visible !== !1 &&
                r.push(n[t]._childBox.toRect().center());
            return r;
          },
          createVisual: function () {
            var n = this,
              t = this.series.visual;
            t
              ? ((this.visual = t({
                  points: this.toGeometryPoints(this.linePoints),
                  series: this.series,
                  sender: this.getSender(),
                  createVisual: function () {
                    return n.segmentVisual(), n.visual;
                  },
                })),
                this.visual &&
                  !u(this.visual.options.zIndex) &&
                  (this.visual.options.zIndex = this.series.zIndex))
              : this.segmentVisual();
          },
          segmentVisual: function () {
            var t,
              r = this,
              f = r.options,
              n = r.series,
              i = n.color,
              u = n._defaults;
            tt(i) && u && (i = u.color);
            t = v.fromPoints(this.points(), {
              stroke: {
                color: i,
                width: n.width,
                opacity: n.opacity,
                dashType: n.dashType,
              },
              zIndex: n.zIndex,
            });
            f.closed && t.close();
            this.visual = t;
          },
          aliasFor: function (n, t) {
            return this.parent.getNearestPoint(t.x, t.y, this.seriesIx);
          },
        });
        f(wi, { closed: !1 });
        rh = {
          calculateStepPoints: function (n) {
            for (
              var r,
                o,
                p = this.parent.plotArea.seriesCategoryAxis(this.series),
                h = p.options,
                w = h.justified,
                c = h.vertical,
                v = h.reverse,
                t = c ? a : l,
                u = c ? l : a,
                s = v ? 2 : 1,
                y = s,
                i = yc(n[0], t, s, u, y),
                f = [i],
                e = 1;
              e < n.length;
              e++
            )
              (r = yc(n[e], t, s, u, y)),
                i[t] !== r[t] &&
                  ((o = new nt()), (o[t] = i[t]), (o[u] = r[u]), f.push(o, r)),
                (i = r);
            return (
              w
                ? i !== gi(f) && f.push(i)
                : f.push(yc(gi(n), t, s, u, v ? 1 : 2)),
              f
            );
          },
        };
        ra = wi.extend({
          points: function () {
            return this.calculateStepPoints(this.linePoints);
          },
        });
        t(ra.prototype, rh);
        ns = wi.extend({
          segmentVisual: function () {
            var r,
              u,
              t,
              n = this.series,
              f = n._defaults,
              i = n.color;
            tt(i) && f && (i = f.color);
            r = new ro(this.options.closed);
            u = r.process(this.points());
            t = new v({
              stroke: {
                color: i,
                width: n.width,
                opacity: n.opacity,
                dashType: n.dashType,
              },
              zIndex: n.zIndex,
            });
            t.segments.push.apply(t.segments, u);
            this.visual = t;
          },
        });
        uh = {
          renderSegments: function () {
            var i,
              n,
              u,
              e,
              s,
              t,
              f,
              o,
              r = this,
              h = this,
              l = h.options,
              c = h.seriesPoints,
              a = l.series,
              v = c.length;
            for (this._segments = [], n = 0; n < v; n++) {
              for (
                u = a[n], e = r.sortPoints(c[n]), s = e.length, t = [], f = 0;
                f < s;
                f++
              )
                (o = e[f]),
                  o
                    ? t.push(o)
                    : r.seriesMissingValues(u) !== su &&
                      (t.length > 1 &&
                        ((i = r.createSegment(t, u, n, i)), r._addSegment(i)),
                      (t = []));
              t.length > 1 &&
                ((i = r.createSegment(t, u, n, i)), r._addSegment(i));
            }
            this.children.unshift.apply(this.children, this._segments);
          },
          _addSegment: function (n) {
            this._segments.push(n);
            n.parent = this;
          },
          sortPoints: function (n) {
            return n;
          },
          seriesMissingValues: function (n) {
            var t = n.missingValues,
              i = !t && this.options.isStacked;
            return i ? fi : t || su;
          },
          getNearestPoint: function (n, t, i) {
            for (
              var s,
                r,
                h,
                o,
                a = new e(n, t),
                c = this.seriesPoints[i],
                l = rt,
                f = 0;
              f < c.length;
              f++
            )
              (r = c[f]),
                r &&
                  u(r.value) &&
                  null !== r.value &&
                  r.visible !== !1 &&
                  ((h = r.box),
                  (o = h.center().distanceTo(a)),
                  o < l && ((s = r), (l = o)));
            return s;
          },
        };
        ts = cr.extend({
          setup: function () {
            this._setEnd(this.options.box.x1);
          },
          step: function (n) {
            var t = this.options.box;
            this._setEnd(i.interpolateValue(t.x1, t.x2, n));
          },
          _setEnd: function (n) {
            var t = this.element,
              i = t.segments,
              r = i[1].anchor(),
              u = i[2].anchor();
            t.suspend();
            r.setX(n);
            t.resume();
            u.setX(n);
          },
        });
        f(ts, { duration: vt });
        bf.current.register("clip", ts);
        is = {
          createAnimation: function () {
            var t,
              n,
              i = this.getRoot();
            i &&
              (i.options || {}).transitions !== !1 &&
              ((t = i.size()),
              (n = v.fromRect(t.toRect())),
              this.visual.clip(n),
              (this.animation = new ts(n, { box: t })),
              pc(this.options.series) && this._setChildrenAnimation(n));
          },
          _setChildrenAnimation: function (n) {
            for (var t, r = this.animationPoints(), i = 0; i < r.length; i++)
              (t = r[i]),
                t && t.visual && u(t.visual.options.zIndex) && t.visual.clip(n);
          },
        };
        nf = it.extend({
          render: function () {
            it.fn.render.call(this);
            this.updateStackRange();
            this.renderSegments();
          },
          pointType: function () {
            return bt;
          },
          createPoint: function (n, t) {
            var i,
              o,
              e,
              h = t.categoryIx,
              c = t.category,
              r = t.series,
              s = t.seriesIx,
              l = this.seriesMissingValues(r),
              f = n.valueFields.value;
            if (!u(f) || null === f) {
              if (l !== fi) return null;
              f = 0;
            }
            return (
              (i = this.pointOptions(r, s)),
              (i = this.evalPointOptions(i, f, c, h, r, s)),
              (o = n.fields.color || r.color),
              tt(r.color) && (o = i.color),
              (e = new bt(f, i)),
              (e.color = o),
              this.append(e),
              e
            );
          },
          plotRange: function (n) {
            var f,
              r,
              i,
              u,
              e = this,
              t = this.plotValue(n);
            if (this.options.isStacked)
              for (
                f = n.categoryIx, r = this.categoryPoints[f], i = 0;
                i < r.length && ((u = r[i]), n !== u);
                i++
              )
                (t += e.plotValue(u)),
                  e.options.isStacked100 && (t = Math.min(t, 1));
            return [t, t];
          },
          createSegment: function (n, t, i) {
            var u,
              r = t.style;
            return new (u = r === hu ? ra : r === ar ? ns : wi)(n, t, i);
          },
          animationPoints: function () {
            for (var t = this.points, i = [], n = 0; n < t.length; n++)
              i.push((t[n] || {}).marker);
            return i.concat(this._segments);
          },
        });
        t(nf.prototype, uh, is);
        tu = wi.extend({
          init: function (n, t, i, r, u) {
            wi.fn.init.call(this, n, t, i);
            this.prevSegment = r;
            this.stackPoints = u;
          },
          createVisual: function () {
            var n = this.series,
              u = n._defaults,
              r = n.line || {},
              i = n.color;
            tt(i) && u && (i = u.color);
            this.visual = new lr({ zIndex: n.zIndex });
            this.createFill({
              fill: { color: i, opacity: n.opacity },
              stroke: null,
            });
            r.width > 0 &&
              r.visible !== !1 &&
              this.createStroke({
                stroke: t({ color: i, opacity: n.opacity, lineCap: "butt" }, r),
              });
          },
          strokeSegments: function () {
            var n = this._strokeSegments;
            return (
              n || (n = this._strokeSegments = this.createStrokeSegments()), n
            );
          },
          createStrokeSegments: function () {
            return this.segmentsFromPoints(this.points());
          },
          stackSegments: function () {
            return this.prevSegment
              ? this.prevSegment.createStackSegments(this.stackPoints)
              : this.createStackSegments(this.stackPoints);
          },
          createStackSegments: function (n) {
            return this.segmentsFromPoints(this.toGeometryPoints(n)).reverse();
          },
          segmentsFromPoints: function (n) {
            return n.map(function (n) {
              return new vi.Segment(n);
            });
          },
          createStroke: function (n) {
            var t = new v(n);
            t.segments.push.apply(t.segments, this.strokeSegments());
            this.visual.append(t);
          },
          hasStackSegment: function () {
            return (
              this.prevSegment || (this.stackPoints && this.stackPoints.length)
            );
          },
          createFill: function (n) {
            var i,
              t,
              r = this.strokeSegments(),
              u = r.slice(0),
              f = this.hasStackSegment();
            f && ((i = this.stackSegments()), af(u, i));
            t = new v(n);
            t.segments.push.apply(t.segments, u);
            !f && r.length > 1 && this.fillToAxes(t);
            this.visual.append(t);
          },
          fillToAxes: function (n) {
            var i = this.parent,
              r = i.options.invertAxes,
              u = i.seriesValueAxis(this.series),
              f = i.categoryAxisCrossingValue(u),
              e = u.getSlot(f, f, !0),
              o = this.strokeSegments(),
              s = o[0].anchor(),
              h = gi(o).anchor(),
              t = r ? e.x1 : e.y1;
            r
              ? n.lineTo(t, h.y).lineTo(t, s.y)
              : n.lineTo(h.x, t).lineTo(s.x, t);
          },
        });
        ua = tu.extend({
          createStrokeSegments: function () {
            return this.segmentsFromPoints(
              this.calculateStepPoints(this.linePoints)
            );
          },
          createStackSegments: function (n) {
            return this.segmentsFromPoints(
              this.calculateStepPoints(n)
            ).reverse();
          },
        });
        t(ua.prototype, rh);
        rs = tu.extend({
          createStrokeSegments: function () {
            var n = new ro(this.options.closed),
              t = this.points();
            return n.process(t);
          },
          createStackSegments: function () {
            for (
              var t, i = this.strokeSegments(), r = [], n = i.length - 1;
              n >= 0;
              n--
            )
              (t = i[n]),
                r.push(
                  new vi.Segment(t.anchor(), t.controlOut(), t.controlIn())
                );
            return r;
          },
        });
        fa = nf.extend({
          createSegment: function (n, t, i, r) {
            var e,
              u,
              o,
              s,
              h = this.options.isStacked,
              f = (t.line || {}).style;
            return (
              h &&
                i > 0 &&
                r &&
                ((o = this.seriesMissingValues(t)),
                "gap" !== o
                  ? ((u = r.linePoints), (e = r))
                  : (u = this._gapStackPoints(n, i, f))),
              new (s = f === hu ? ua : f === ar ? rs : tu)(n, t, i, e, u)
            );
          },
          reflow: function (n) {
            var i,
              t,
              r,
              u,
              f = this;
            if ((nf.fn.reflow.call(this, n), (i = this._stackPoints)))
              for (t = 0; t < i.length; t++)
                (r = i[t]),
                  (u = f.categoryAxis.getSlot(r.categoryIx)),
                  r.reflow(u);
          },
          _gapStackPoints: function (n, t, i) {
            var c,
              v,
              e,
              r,
              u,
              f,
              o,
              l,
              h = this,
              a = this.seriesPoints,
              s = n[0].categoryIx,
              y = n.length;
            for (
              s < 0 && ((s = 0), y--),
                c = s + y,
                v = this.seriesOptions[0]._outOfRangeMinPoint ? 1 : 0,
                e = [],
                this._stackPoints = this._stackPoints || [],
                r = s;
              r < c;
              r++
            ) {
              u = r + v;
              f = t;
              o = void 0;
              do f--, (o = a[f][u]);
              while (f > 0 && !o);
              o
                ? (i !== hu &&
                    r > s &&
                    !a[f][u - 1] &&
                    e.push(h._previousSegmentPoint(r, u, u - 1, f)),
                  e.push(o),
                  i !== hu &&
                    r + 1 < c &&
                    !a[f][u + 1] &&
                    e.push(h._previousSegmentPoint(r, u, u + 1, f)))
                : ((l = h._createGapStackPoint(r)),
                  h._stackPoints.push(l),
                  e.push(l));
            }
            return e;
          },
          _previousSegmentPoint: function (n, t, i, r) {
            for (var u, e = this.seriesPoints, f = r; f > 0 && !u; )
              f--, (u = e[f][i]);
            return (
              u
                ? (u = e[f][t])
                : ((u = this._createGapStackPoint(n)),
                  this._stackPoints.push(u)),
              u
            );
          },
          _createGapStackPoint: function (n) {
            var i = this.pointOptions({}, 0),
              t = new bt(0, i);
            return (t.categoryIx = n), (t.series = {}), t;
          },
          seriesMissingValues: function (n) {
            return n.missingValues || fi;
          },
        });
        ae = et.extend({
          init: function () {
            this.axisRanges = {};
          },
          update: function (n) {
            var i,
              r,
              t,
              u = this.axisRanges;
            for (i in n)
              (r = n[i]),
                (t = u[i]),
                (u[i] = t = t || { min: rt, max: ot }),
                (t.min = Math.min(t.min, r.min)),
                (t.max = Math.max(t.max, r.max));
          },
          reset: function (n) {
            this.axisRanges[n] = void 0;
          },
          query: function (n) {
            return this.axisRanges[n];
          },
        });
        us = r.extend({
          init: function (n, t, i) {
            r.fn.init.call(this, t);
            this.textBox = new cf(n, this.options, i);
            this.append(this.textBox);
          },
          createVisual: function () {
            this.textBox.options.noclip = this.options.noclip;
          },
          reflow: function (n) {
            var i = this.options,
              r = i.vertical,
              u = i.aboveAxis,
              f = this.children[0],
              t = f.options,
              e = f.box,
              c = f.options.padding,
              s = n;
            t.align = r ? h : y;
            t.vAlign = r ? ut : h;
            i.position === he
              ? r
                ? ((t.vAlign = ut),
                  !u && e.height() < n.height() && (t.vAlign = st))
                : (t.align = u ? w : y)
              : i.position === h
              ? ((t.vAlign = h), (t.align = h))
              : i.position === na
              ? r
                ? (t.vAlign = u ? st : ut)
                : (t.align = u ? y : w)
              : i.position === rr &&
                (r
                  ? (s = u
                      ? new o(n.x1, n.y1 - e.height(), n.x2, n.y1)
                      : new o(n.x1, n.y2, n.x2, n.y2 + e.height()))
                  : ((t.align = h),
                    (s = u
                      ? new o(n.x2, n.y1, n.x2 + e.width(), n.y2)
                      : new o(n.x1 - e.width(), n.y1, n.x1, n.y2))));
            i.rotation ||
              (r
                ? (c.left = c.right = (s.width() - f.contentBox.width()) / 2)
                : (c.top = c.bottom =
                    (s.height() - f.contentBox.height()) / 2));
            f.reflow(s);
          },
          alignToClipBox: function (n) {
            var r,
              e = this.options.vertical,
              f = e ? l : a,
              t = f + "1",
              i = f + "2",
              o = this.children[0],
              u = this.parent.box;
            (u[t] < n[t] || n[i] < u[i]) &&
              ((r = o.paddingBox.clone()),
              (r[t] = Math.max(u[t], n[t])),
              (r[i] = Math.min(u[i], n[i])),
              this.reflow(r));
          },
        });
        f(us, {
          position: rr,
          margin: wt(3),
          padding: wt(4),
          color: uu,
          background: "",
          border: { width: 1, color: "" },
          aboveAxis: !0,
          vertical: !1,
          animation: { type: yi, delay: vt },
          zIndex: 2,
        });
        ly = 6;
        iu = r.extend({
          init: function (n, t) {
            r.fn.init.call(this);
            this.options = t;
            this.color = t.color || lt;
            this.aboveAxis = g(this.options.aboveAxis, !0);
            this.value = n;
          },
          render: function () {
            this._rendered ||
              ((this._rendered = !0),
              this.createLabel(),
              this.createNote(),
              this.errorBar && this.append(this.errorBar));
          },
          createLabel: function () {
            var i,
              r,
              u,
              f = this.options,
              n = f.labels;
            n.visible &&
              ((i = this.pointData()),
              (r = gt(n)),
              (u = r ? r(i) : this.formatValue(n.format)),
              (this.label = new us(u, t({ vertical: f.vertical }, n), i)),
              this.append(this.label));
          },
          formatValue: function (n) {
            return this.owner.formatPointValue(this, n);
          },
          reflow: function (n) {
            var t,
              i,
              r = this;
            if (
              (this.render(),
              (t = this.label),
              (this.box = n),
              t && ((t.options.aboveAxis = this.aboveAxis), t.reflow(n)),
              this.note && this.note.reflow(n),
              this.errorBars)
            )
              for (i = 0; i < this.errorBars.length; i++)
                r.errorBars[i].reflow(n);
          },
          createVisual: function () {
            var n,
              e = this,
              i = this,
              t = i.box,
              u = i.options,
              f = u.visual;
            this.visible !== !1 &&
              (r.fn.createVisual.call(this),
              f
                ? ((n = this.rectVisual =
                    f({
                      category: this.category,
                      dataItem: this.dataItem,
                      value: this.value,
                      sender: this.getSender(),
                      series: this.series,
                      percentage: this.percentage,
                      stackValue: this.stackValue,
                      runningTotal: this.runningTotal,
                      total: this.total,
                      rect: t.toRect(),
                      createVisual: function () {
                        var n = new lr();
                        return e.createRect(n), n;
                      },
                      options: u,
                    })),
                  n && this.visual.append(n))
                : t.width() > 0 &&
                  t.height() > 0 &&
                  this.createRect(this.visual));
          },
          createRect: function (n) {
            var r,
              e,
              o,
              h,
              c,
              i = this.options,
              f = i.border,
              l = u(f.opacity) ? f.opacity : i.opacity,
              s = this.box.toRect();
            s.size.width = Math.round(s.size.width);
            r = this.rectVisual = v.fromRect(s, {
              fill: { color: this.color, opacity: i.opacity },
              stroke: {
                color: this.getBorderColor(),
                width: f.width,
                opacity: l,
                dashType: f.dashType,
              },
            });
            e = this.box.width();
            o = this.box.height();
            h = i.vertical ? e : o;
            h > ly &&
              (ki(r),
              (e < 1 || o < 1) && (r.options.stroke.lineJoin = "round"));
            n.append(r);
            vs(i) &&
              ((c = this.createGradientOverlay(
                r,
                { baseColor: this.color },
                t({ end: i.vertical ? void 0 : [0, 1] }, i.overlay)
              )),
              n.append(c));
          },
          createHighlight: function (n) {
            var t = v.fromRect(this.box.toRect(), n);
            return ki(t);
          },
          highlightVisual: function () {
            return this.rectVisual;
          },
          highlightVisualArgs: function () {
            return {
              options: this.options,
              rect: this.box.toRect(),
              visual: this.rectVisual,
            };
          },
          getBorderColor: function () {
            var i = this.color,
              t = this.options.border,
              r = t._brightness || kf,
              n = t.color;
            return u(n) || (n = new tr(i).brightness(r).toHex()), n;
          },
          tooltipAnchor: function () {
            var i,
              r,
              u,
              f,
              o = this,
              l = o.options,
              n = o.box,
              s = o.aboveAxis,
              t = this.owner.pane.clipBox() || n,
              h = y,
              c = ut;
            return (
              l.vertical
                ? ((i = Math.min(n.x2, t.x2) + ni),
                  s
                    ? (r = Math.max(n.y1, t.y1))
                    : ((r = Math.min(n.y2, t.y2)), (c = st)))
                : ((u = Math.max(n.x1, t.x1)),
                  (f = Math.min(n.x2, t.x2)),
                  l.isStacked
                    ? ((c = st),
                      s ? ((h = w), (i = f)) : (i = u),
                      (r = Math.max(n.y1, t.y1) - ni))
                    : (s ? (i = f + ni) : ((i = u - ni), (h = w)),
                      (r = Math.max(n.y1, t.y1)))),
              { point: new e(i, r), align: { horizontal: h, vertical: c } }
            );
          },
          overlapsBox: function (n) {
            return this.box.overlaps(n);
          },
          pointData: function () {
            return {
              dataItem: this.dataItem,
              category: this.category,
              value: this.value,
              percentage: this.percentage,
              stackValue: this.stackValue,
              runningTotal: this.runningTotal,
              total: this.total,
              series: this.series,
            };
          },
        });
        t(iu.prototype, ii);
        t(iu.prototype, le);
        iu.prototype.defaults = {
          border: { width: 1 },
          vertical: !0,
          overlay: { gradient: "glass" },
          labels: { visible: !1, format: "{0}" },
          opacity: 1,
          notes: { label: {} },
        };
        tf = r.extend({
          init: function (n) {
            r.fn.init.call(this, n);
            this.forEach = n.rtl ? av : lv;
          },
          reflow: function (n) {
            var r = this.options,
              e = r.vertical,
              o = r.gap,
              s = r.spacing,
              h = this.children,
              u = h.length,
              f = e ? l : a,
              c = u + o + s * (u - 1),
              t = (e ? n.height() : n.width()) / c,
              i = n[f + 1] + t * (o / 2);
            this.forEach(h, function (r, e) {
              var o = (r.box || n).clone();
              o[f + 1] = i;
              o[f + 2] = i + t;
              r.reflow(o);
              e < u - 1 && (i += t * s);
              i += t;
            });
          },
        });
        f(tf, { vertical: !1, gap: 0, spacing: 0 });
        fh = r.extend({
          reflow: function (n) {
            for (
              var r,
                i,
                e = this,
                s = this.options.vertical ? a : l,
                u = this.children,
                h = u.length,
                f = (this.box = new o()),
                t = 0;
              t < h;
              t++
            )
              (r = u[t]),
                r.visible !== !1 &&
                  ((i = r.box.clone()),
                  i.snapTo(n, s),
                  0 === t && (f = e.box = i.clone()),
                  r.reflow(i),
                  f.wrap(i));
          },
        });
        f(fh, { vertical: !0 });
        oi = it.extend({
          render: function () {
            it.fn.render.call(this);
            this.updateStackRange();
          },
          pointType: function () {
            return iu;
          },
          clusterType: function () {
            return tf;
          },
          stackType: function () {
            return fh;
          },
          stackLimits: function (n, t) {
            return it.fn.stackLimits.call(this, n, t);
          },
          createPoint: function (n, t) {
            var o,
              c,
              u,
              r,
              l,
              a,
              v = t.categoryIx,
              b = t.category,
              f = t.series,
              y = t.seriesIx,
              p = this,
              e = p.options,
              k = p.children,
              s = e.isStacked,
              h = this.pointValue(n),
              i = this.pointOptions(f, y),
              w = i.labels;
            return (
              s && w.position === rr && (w.position = he),
              (i.isStacked = s),
              (o = n.fields.color || f.color),
              h < 0 && i.negativeColor && (o = i.negativeColor),
              (i = this.evalPointOptions(i, h, b, v, f, y)),
              tt(f.color) && (o = i.color),
              (c = this.pointType()),
              (u = new c(h, i)),
              (u.color = o),
              (r = k[v]),
              r ||
                ((l = this.clusterType()),
                (r = new l({
                  vertical: e.invertAxes,
                  gap: e.gap,
                  spacing: e.spacing,
                  rtl: !e.invertAxes && (this.chartService || {}).rtl,
                })),
                this.append(r)),
              s ? ((a = this.getStackWrap(f, r)), a.append(u)) : r.append(u),
              u
            );
          },
          getStackWrap: function (n, t) {
            var i,
              r,
              o,
              u = n.stack,
              e = u ? u.group || u : u,
              f = t.children;
            if (typeof e === s.STRING) {
              for (r = 0; r < f.length; r++)
                if (f[r]._stackGroup === e) {
                  i = f[r];
                  break;
                }
            } else i = f[0];
            return (
              i ||
                ((o = this.stackType()),
                (i = new o({ vertical: !this.options.invertAxes })),
                (i._stackGroup = e),
                t.append(i)),
              i
            );
          },
          categorySlot: function (n, t, i) {
            var f,
              r,
              e = this.options,
              u = n.getSlot(t),
              o = i.startValue();
            return (
              e.isStacked &&
                ((f = i.getSlot(o, o, !0)),
                (r = e.invertAxes ? a : l),
                (u[r + 1] = u[r + 2] = f[r + 1])),
              u
            );
          },
          reflowCategories: function (n) {
            for (var i = this.children, r = i.length, t = 0; t < r; t++)
              i[t].reflow(n[t]);
          },
          createAnimation: function () {
            this._setAnimationOptions();
            it.fn.createAnimation.call(this);
            pc(this.options.series) && this._setChildrenAnimation();
          },
          _setChildrenAnimation: function () {
            for (var t, i, f = this, r = this.points, n = 0; n < r.length; n++)
              (t = r[n]),
                (i = t.visual),
                i &&
                  u(i.options.zIndex) &&
                  ((t.options.animation = f.options.animation),
                  t.createAnimation());
          },
          _setAnimationOptions: function () {
            var n,
              i,
              t = this.options,
              r = t.animation || {};
            t.isStacked
              ? ((i = this.seriesValueAxis(t.series[0])),
                (n = i.getSlot(i.startValue())))
              : (n = this.categoryAxis.getSlot(0));
            r.origin = new nt(n.x1, n.y1);
            r.vertical = !t.invertAxes;
          },
        });
        f(oi, { animation: { type: ei } });
        si = r.extend({
          init: function (n, t) {
            r.fn.init.call(this, t);
            this.value = n;
          },
          reflow: function (n) {
            var r,
              u,
              e = this,
              s = e.options,
              f = e.value,
              h = e.owner,
              o = h.seriesValueAxis(s),
              t = o.getSlot(f.open, f.close),
              i = o.getSlot(f.low, f.high);
            t.x1 = i.x1 = n.x1;
            t.x2 = i.x2 = n.x2;
            this.realBody = t;
            r = i.center().x;
            u = [];
            u.push([
              [r, i.y1],
              [r, t.y1],
            ]);
            u.push([
              [r, t.y2],
              [r, i.y2],
            ]);
            this.lines = u;
            this.box = i.clone().wrap(t);
            this._rendered || ((this._rendered = !0), this.createNote());
            this.reflowNote();
          },
          reflowNote: function () {
            this.note && this.note.reflow(this.box);
          },
          createVisual: function () {
            r.fn.createVisual.call(this);
            this._mainVisual = this.mainVisual(this.options);
            this.visual.append(this._mainVisual);
            this.createOverlay();
          },
          mainVisual: function (n) {
            var t = new lr();
            return this.createBody(t, n), this.createLines(t, n), t;
          },
          createBody: function (n, i) {
            var r = v.fromRect(this.realBody.toRect(), {
              fill: { color: this.color, opacity: i.opacity },
              stroke: null,
            });
            i.border.width > 0 &&
              r.options.set("stroke", {
                color: this.getBorderColor(),
                width: i.border.width,
                dashType: i.border.dashType,
                opacity: g(i.border.opacity, i.opacity),
              });
            ki(r);
            n.append(r);
            vs(i) &&
              n.append(
                this.createGradientOverlay(
                  r,
                  { baseColor: this.color },
                  t({ end: i.vertical ? void 0 : [0, 1] }, i.overlay)
                )
              );
          },
          createLines: function (n, t) {
            this.drawLines(n, t, this.lines, t.line);
          },
          drawLines: function (n, t, i, r) {
            var e, u, f;
            if (i)
              for (
                e = {
                  stroke: {
                    color: r.color || this.color,
                    opacity: g(r.opacity, t.opacity),
                    width: r.width,
                    dashType: r.dashType,
                    lineCap: "butt",
                  },
                },
                  u = 0;
                u < i.length;
                u++
              )
                (f = v.fromPoints(i[u], e)), ki(f), n.append(f);
          },
          getBorderColor: function () {
            var t = this.options.border,
              n = t.color;
            return (
              u(n) ||
                (n = new tr(this.color).brightness(t._brightness).toHex()),
              n
            );
          },
          createOverlay: function () {
            var n = v.fromRect(this.box.toRect(), {
              fill: { color: lt, opacity: 0 },
              stroke: null,
            });
            this.visual.append(n);
          },
          createHighlight: function () {
            var n,
              i = this.options.highlight,
              r = this.color;
            return (
              (this.color = i.color || this.color),
              (n = this.mainVisual(
                t(
                  {},
                  this.options,
                  { line: { color: this.getBorderColor() } },
                  i
                )
              )),
              (this.color = r),
              n
            );
          },
          highlightVisual: function () {
            return this._mainVisual;
          },
          highlightVisualArgs: function () {
            return {
              options: this.options,
              rect: this.box.toRect(),
              visual: this._mainVisual,
            };
          },
          tooltipAnchor: function () {
            var n = this.box,
              t = this.owner.pane.clipBox() || n;
            return {
              point: new e(n.x2 + ni, Math.max(n.y1, t.y1) + ni),
              align: { horizontal: y, vertical: ut },
            };
          },
          formatValue: function (n) {
            return this.owner.formatPointValue(this, n);
          },
          overlapsBox: function (n) {
            return this.box.overlaps(n);
          },
        });
        f(si, {
          vertical: !0,
          border: { _brightness: 0.8 },
          line: { width: 2 },
          overlay: { gradient: "glass" },
          tooltip: {
            format:
              "<table><tr><th colspan='2'>{4:d}</th></tr><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>",
          },
          highlight: {
            opacity: 1,
            border: { width: 1, opacity: 1 },
            line: { width: 1, opacity: 1 },
          },
          notes: { visible: !0, label: {} },
        });
        t(si.prototype, ii);
        t(si.prototype, le);
        ve = it.extend({
          reflowCategories: function (n) {
            for (var i = this.children, r = i.length, t = 0; t < r; t++)
              i[t].reflow(n[t]);
          },
          addValue: function (n, t) {
            var i,
              r,
              u = t.categoryIx,
              c = t.category,
              o = t.series,
              l = t.seriesIx,
              s = this,
              a = s.children,
              f = s.options,
              h = n.valueFields,
              v = this.splitValue(h),
              y = wc(v),
              p = o.data[u],
              e = this.categoryPoints[u];
            e || (this.categoryPoints[u] = e = []);
            y && (i = this.createPoint(n, t));
            r = a[u];
            r ||
              ((r = new tf({
                vertical: f.invertAxes,
                gap: f.gap,
                spacing: f.spacing,
                rtl: !f.invertAxes && (this.chartService || {}).rtl,
              })),
              this.append(r));
            i &&
              (this.updateRange(h, t),
              r.append(i),
              (i.categoryIx = u),
              (i.category = c),
              (i.series = o),
              (i.seriesIx = l),
              (i.owner = this),
              (i.dataItem = p),
              (i.noteText = n.fields.noteText));
            this.points.push(i);
            e.push(i);
          },
          pointType: function () {
            return si;
          },
          createPoint: function (n, i) {
            var e,
              s = i.categoryIx,
              h = i.category,
              r = i.series,
              c = i.seriesIx,
              l = this.pointType(),
              f = n.valueFields,
              u = t({}, r),
              o = n.fields.color || r.color;
            return (
              (u = this.evalPointOptions(u, f, h, s, r, c)),
              r.type === pr &&
                f.open > f.close &&
                (o = n.fields.downColor || r.downColor || r.color),
              tt(r.color) && (o = u.color),
              (u.vertical = !this.options.invertAxes),
              (e = new l(f, u)),
              (e.color = o),
              e
            );
          },
          splitValue: function (n) {
            return [n.low, n.open, n.close, n.high];
          },
          updateRange: function (n, t) {
            var r = t.series.axis,
              u = this.splitValue(n),
              i = this.valueAxisRanges[r];
            i = this.valueAxisRanges[r] = i || { min: rt, max: ot };
            i = this.valueAxisRanges[r] = {
              min: Math.min.apply(Math, u.concat([i.min])),
              max: Math.max.apply(Math, u.concat([i.max])),
            };
          },
          formatPointValue: function (n, t) {
            var i = n.value;
            return this.chartService.format.auto(
              t,
              i.open,
              i.high,
              i.low,
              i.close,
              n.category
            );
          },
          animationPoints: function () {
            return this.points;
          },
        });
        t(ve.prototype, is);
        ye = si.extend({
          init: function (n, t) {
            si.fn.init.call(this, n, t);
            this.createNote();
          },
          reflow: function (n) {
            var u,
              i,
              e,
              o,
              f = this,
              s = f.options,
              t = f.value,
              h = f.owner,
              r = h.seriesValueAxis(s);
            this.boxSlot = i = r.getSlot(t.q1, t.q3);
            this.realBody = i;
            this.reflowBoxSlot(n);
            this.whiskerSlot = u = r.getSlot(t.lower, t.upper);
            this.reflowWhiskerSlot(n);
            e = r.getSlot(t.median);
            t.mean &&
              ((o = r.getSlot(t.mean)),
              (this.meanPoints = this.calcMeanPoints(n, o)));
            this.whiskerPoints = this.calcWhiskerPoints(i, u);
            this.medianPoints = this.calcMedianPoints(n, e);
            this.box = u.clone().wrap(i);
            this.reflowNote();
          },
          reflowBoxSlot: function (n) {
            this.boxSlot.x1 = n.x1;
            this.boxSlot.x2 = n.x2;
          },
          reflowWhiskerSlot: function (n) {
            this.whiskerSlot.x1 = n.x1;
            this.whiskerSlot.x2 = n.x2;
          },
          calcMeanPoints: function (n, t) {
            return [
              [
                [n.x1, t.y1],
                [n.x2, t.y1],
              ],
            ];
          },
          calcWhiskerPoints: function (n, t) {
            var i = t.center().x;
            return [
              [
                [i - 5, t.y1],
                [i + 5, t.y1],
                [i, t.y1],
                [i, n.y1],
              ],
              [
                [i - 5, t.y2],
                [i + 5, t.y2],
                [i, t.y2],
                [i, n.y2],
              ],
            ];
          },
          calcMedianPoints: function (n, t) {
            return [
              [
                [n.x1, t.y1],
                [n.x2, t.y1],
              ],
            ];
          },
          renderOutliers: function (n) {
            for (
              var e,
                o,
                s,
                c = this,
                r = this.value,
                l = r.outliers || [],
                a = 3 * Math.abs(r.q3 - r.q1),
                h = [],
                i = n.markers || {},
                f = 0;
              f < l.length;
              f++
            )
              (e = l[f]),
                (i = e < r.q3 + a && e > r.q1 - a ? n.outliers : n.extremes),
                (o = t({}, i.border)),
                u(o.color) ||
                  (o.color = u(c.color)
                    ? c.color
                    : new tr(i.background).brightness(kf).toHex()),
                (s = new lf({
                  type: i.type,
                  width: i.size,
                  height: i.size,
                  rotation: i.rotation,
                  background: i.background,
                  border: o,
                  opacity: i.opacity,
                })),
                (s.value = e),
                h.push(s);
            return this.reflowOutliers(h), h;
          },
          reflowOutliers: function (n) {
            for (
              var u,
                i,
                r = this,
                e = this.owner.seriesValueAxis(this.options),
                f = this.box.center(),
                t = 0;
              t < n.length;
              t++
            )
              (u = n[t].value),
                (i = e.getSlot(u)),
                r.options.vertical ? i.move(f.x) : i.move(void 0, f.y),
                (r.box = r.box.wrap(i)),
                n[t].reflow(i);
          },
          mainVisual: function (n) {
            for (
              var i,
                r = si.fn.mainVisual.call(this, n),
                u = this.renderOutliers(n),
                t = 0;
              t < u.length;
              t++
            )
              (i = u[t].getElement()), i && r.append(i);
            return r;
          },
          createLines: function (n, t) {
            this.drawLines(n, t, this.whiskerPoints, t.whiskers);
            this.drawLines(n, t, this.medianPoints, t.median);
            this.drawLines(n, t, this.meanPoints, t.mean);
          },
          getBorderColor: function () {
            return (this.options.border || {}).color
              ? this.options.border.color
              : this.color
              ? this.color
              : si.fn.getBorderColor.call(this);
          },
        });
        f(ye, {
          border: { _brightness: 0.8 },
          line: { width: 2 },
          median: { color: "#f6f6f6" },
          mean: { width: 2, dashType: "dash", color: "#f6f6f6" },
          overlay: { gradient: "glass" },
          tooltip: {
            format:
              "<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>",
          },
          highlight: {
            opacity: 1,
            border: { width: 1, opacity: 1 },
            line: { width: 1, opacity: 1 },
          },
          notes: { visible: !0, label: {} },
          outliers: {
            visible: !0,
            size: df,
            type: s.CROSS,
            background: lt,
            border: { width: 2, opacity: 1 },
            opacity: 0,
          },
          extremes: {
            visible: !0,
            size: df,
            type: sr,
            background: lt,
            border: { width: 2, opacity: 1 },
            opacity: 0,
          },
        });
        t(ye.prototype, ii);
        ay = ye.extend({
          reflowBoxSlot: function (n) {
            this.boxSlot.y1 = n.y1;
            this.boxSlot.y2 = n.y2;
          },
          reflowWhiskerSlot: function (n) {
            this.whiskerSlot.y1 = n.y1;
            this.whiskerSlot.y2 = n.y2;
          },
          calcMeanPoints: function (n, t) {
            return [
              [
                [t.x1, n.y1],
                [t.x1, n.y2],
              ],
            ];
          },
          calcWhiskerPoints: function (n, t) {
            var i = t.center().y;
            return [
              [
                [t.x1, i - 5],
                [t.x1, i + 5],
                [t.x1, i],
                [n.x1, i],
              ],
              [
                [t.x2, i - 5],
                [t.x2, i + 5],
                [t.x2, i],
                [n.x2, i],
              ],
            ];
          },
          calcMedianPoints: function (n, t) {
            return [
              [
                [t.x1, n.y1],
                [t.x1, n.y2],
              ],
            ];
          },
        });
        ea = ve.extend({
          addValue: function (n, t) {
            var i,
              r,
              u = t.categoryIx,
              c = t.category,
              o = t.series,
              l = t.seriesIx,
              s = this,
              a = s.children,
              f = s.options,
              h = n.valueFields,
              v = this.splitValue(h),
              y = wc(v),
              p = o.data[u],
              e = this.categoryPoints[u];
            e || (this.categoryPoints[u] = e = []);
            y && (i = this.createPoint(n, t));
            r = a[u];
            r ||
              ((r = new tf({
                vertical: f.invertAxes,
                gap: f.gap,
                spacing: f.spacing,
                rtl: !f.invertAxes && (this.chartService || {}).rtl,
              })),
              this.append(r));
            i &&
              (this.updateRange(h, t),
              r.append(i),
              (i.categoryIx = u),
              (i.category = c),
              (i.series = o),
              (i.seriesIx = l),
              (i.owner = this),
              (i.dataItem = p));
            this.points.push(i);
            e.push(i);
          },
          pointType: function () {
            return this.options.invertAxes ? ay : ye;
          },
          splitValue: function (n) {
            return [n.lower, n.q1, n.median, n.q3, n.upper];
          },
          updateRange: function (n, t) {
            var f = t.series.axis,
              i = this.valueAxisRanges[f],
              r = this.splitValue(n).concat(this.filterOutliers(n.outliers));
            u(n.mean) && (r = r.concat(n.mean));
            i = this.valueAxisRanges[f] = i || { min: rt, max: ot };
            i = this.valueAxisRanges[f] = {
              min: Math.min.apply(Math, r.concat([i.min])),
              max: Math.max.apply(Math, r.concat([i.max])),
            };
          },
          formatPointValue: function (n, t) {
            var i = n.value;
            return this.chartService.format.auto(
              t,
              i.lower,
              i.q1,
              i.median,
              i.q3,
              i.upper,
              i.mean,
              n.category
            );
          },
          filterOutliers: function (n) {
            for (var i, f = (n || []).length, r = [], t = 0; t < f; t++)
              (i = n[t]), u(i) && null !== i && r.push(i);
            return r;
          },
        });
        oa = go.extend({
          getAxis: function () {
            var n = this.chart.seriesAxes(this.series);
            return this.isVertical ? n.y : n.x;
          },
        });
        kt = r.extend({
          init: function (n, t) {
            r.fn.init.call(this, t);
            this.plotArea = n;
            this.chartService = n.chartService;
            this._initFields();
            this.render();
          },
          _initFields: function () {
            this.xAxisRanges = {};
            this.yAxisRanges = {};
            this.points = [];
            this.seriesPoints = [];
            this.seriesOptions = [];
            this._evalSeries = [];
          },
          render: function () {
            this.traverseDataPoints(this.addValue.bind(this));
          },
          addErrorBar: function (n, t, i) {
            var r,
              s = n.value[t],
              e = t + "Value",
              a = t + "ErrorLow",
              v = t + "ErrorHigh",
              o = i.seriesIx,
              y = i.series,
              f = n.options.errorBars,
              h = i[a],
              l = i[v];
            c(s) &&
              (c(h) && c(l) && (r = { low: h, high: l }),
              f &&
                u(f[e]) &&
                ((this.seriesErrorRanges = this.seriesErrorRanges || {
                  x: [],
                  y: [],
                }),
                (this.seriesErrorRanges[t][o] =
                  this.seriesErrorRanges[t][o] || new ws(f[e], y, t)),
                (r = this.seriesErrorRanges[t][o].getErrorRange(s, f[e]))),
              r && this.addPointErrorBar(r, n, t));
          },
          addPointErrorBar: function (n, t, i) {
            var u,
              f = n.low,
              e = n.high,
              o = t.series,
              s = t.options.errorBars,
              h = i === l,
              r = {};
            t[i + "Low"] = f;
            t[i + "High"] = e;
            t.errorBars = t.errorBars || [];
            u = new oa(f, e, h, this, o, s);
            t.errorBars.push(u);
            t.append(u);
            r[i] = f;
            this.updateRange(r, o);
            r[i] = e;
            this.updateRange(r, o);
          },
          addValue: function (t, i) {
            var r,
              e = t.x,
              o = t.y,
              f = i.seriesIx,
              s = this.options.series[f],
              h = this.seriesMissingValues(s),
              c = this.seriesPoints[f],
              u = t;
            (at(e) && at(o)) || (u = this.createMissingValue(u, h));
            u &&
              ((r = this.createPoint(u, i)),
              r &&
                (n.extend(r, i),
                this.addErrorBar(r, a, i),
                this.addErrorBar(r, l, i)),
              this.updateRange(u, i.series));
            this.points.push(r);
            c.push(r);
          },
          seriesMissingValues: function (n) {
            return n.missingValues;
          },
          createMissingValue: function () {},
          updateRange: function (n, t) {
            var e = this.chartService.intl,
              o = t.xAxis,
              s = t.yAxis,
              i = n.x,
              r = n.y,
              u = this.xAxisRanges[o],
              f = this.yAxisRanges[s];
            at(i) &&
              ((u = this.xAxisRanges[o] = u || { min: rt, max: ot }),
              uo(i) && (i = hr(e, i)),
              (u.min = Math.min(u.min, i)),
              (u.max = Math.max(u.max, i)));
            at(r) &&
              ((f = this.yAxisRanges[s] = f || { min: rt, max: ot }),
              uo(r) && (r = hr(e, r)),
              (f.min = Math.min(f.min, r)),
              (f.max = Math.max(f.max, r)));
          },
          evalPointOptions: function (n, i, r) {
            var f,
              o = r.series,
              s = r.seriesIx,
              h = {
                defaults: o._defaults,
                excluded: [
                  "data",
                  "tooltip",
                  "content",
                  "template",
                  "visual",
                  "toggle",
                  "_outOfRangeMinPoint",
                  "_outOfRangeMaxPoint",
                ],
              },
              e = this._evalSeries[s];
            return (
              u(e) || (this._evalSeries[s] = e = er(n, {}, h, !0)),
              (f = n),
              e &&
                ((f = t({}, n)),
                er(f, { value: i, series: o, dataItem: r.dataItem }, h)),
              f
            );
          },
          pointType: function () {
            return bt;
          },
          pointOptions: function (n, i) {
            var u,
              r = this.seriesOptions[i];
            return (
              r ||
                ((u = this.pointType().prototype.defaults),
                (this.seriesOptions[i] = r =
                  t(
                    {},
                    u,
                    {
                      markers: { opacity: n.opacity },
                      tooltip: { format: this.options.tooltip.format },
                      labels: { format: this.options.labels.format },
                    },
                    n
                  ))),
              r
            );
          },
          createPoint: function (n, t) {
            var i,
              u = t.series,
              r = this.pointOptions(u, t.seriesIx),
              f = t.color || u.color;
            return (
              (r = this.evalPointOptions(r, n, t)),
              tt(u.color) && (f = r.color),
              (i = new bt(n, r)),
              (i.color = f),
              this.append(i),
              i
            );
          },
          seriesAxes: function (n) {
            var i = n.xAxis,
              r = n.yAxis,
              t = this.plotArea,
              u = i ? t.namedXAxes[i] : t.axisX,
              f = r ? t.namedYAxes[r] : t.axisY;
            if (!u) throw Error("Unable to locate X axis with name " + i);
            if (!f) throw Error("Unable to locate Y axis with name " + r);
            return { x: u, y: f };
          },
          reflow: function (n) {
            var t = this,
              r = this.points,
              i = !this.options.clip,
              u = 0;
            this.traverseDataPoints(function (n, f) {
              var o,
                e = r[u++],
                s = t.seriesAxes(f.series),
                h = s.x.getSlot(n.x, n.x, i),
                c = s.y.getSlot(n.y, n.y, i);
              e &&
                (h && c
                  ? ((o = t.pointSlot(h, c)), e.reflow(o))
                  : (e.visible = !1));
            });
            this.box = n;
          },
          pointSlot: function (n, t) {
            return new o(n.x1, t.y1, n.x2, t.y2);
          },
          traverseDataPoints: function (n) {
            for (
              var u,
                e,
                r,
                f,
                o,
                s,
                h = this,
                c = this,
                l = c.options.series,
                a = c.seriesPoints,
                i = 0;
              i < l.length;
              i++
            )
              for (
                u = l[i], e = a[i], e || (a[i] = []), r = 0;
                r < u.data.length;
                r++
              )
                (f = h._bindPoint(u, i, r)),
                  (o = f.valueFields),
                  (s = f.fields),
                  n(
                    o,
                    t(
                      {
                        pointIx: r,
                        series: u,
                        seriesIx: i,
                        dataItem: u.data[r],
                        owner: h,
                      },
                      s
                    )
                  );
          },
          formatPointValue: function (n, t) {
            var i = n.value;
            return this.chartService.format.auto(t, i.x, i.y);
          },
          animationPoints: function () {
            for (var t = this.points, i = [], n = 0; n < t.length; n++)
              i.push((t[n] || {}).marker);
            return i;
          },
        });
        f(kt, {
          series: [],
          tooltip: { format: "{0}, {1}" },
          labels: { format: "{0}, {1}" },
          clip: !0,
        });
        t(kt.prototype, is, { _bindPoint: it.prototype._bindPoint });
        pe = bt.extend({
          init: function (n, t) {
            bt.fn.init.call(this, n, t);
            this.category = n.category;
          },
          createHighlight: function () {
            var u = this.options.highlight,
              t = u.border,
              n = this.options.markers,
              i = this.box.center(),
              r = (n.size + n.border.width + t.width) / 2,
              f = new lr(),
              e = new ui.Circle(
                new vi.Circle(
                  [i.x, i.y + r / 5 + t.width / 2],
                  r + t.width / 2
                ),
                {
                  stroke: { color: "none" },
                  fill: this.createGradient({
                    gradient: "bubbleShadow",
                    color: n.background,
                    stops: [
                      { offset: 0, color: n.background, opacity: 0.3 },
                      { offset: 1, color: n.background, opacity: 0 },
                    ],
                  }),
                }
              ),
              o = new ui.Circle(new vi.Circle([i.x, i.y], r), {
                stroke: {
                  color: t.color || new tr(n.background).brightness(kf).toHex(),
                  width: t.width,
                  opacity: t.opacity,
                },
                fill: { color: n.background, opacity: u.opacity },
              });
            return f.append(e, o), f;
          },
        });
        pe.prototype.defaults = t({}, pe.prototype.defaults, {
          labels: { position: h },
          highlight: {
            opacity: 1,
            border: { color: "#fff", width: 2, opacity: 1 },
          },
        });
        pe.prototype.defaults.highlight.zIndex = void 0;
        eh = kt.extend({
          _initFields: function () {
            this._maxSize = ot;
            kt.fn._initFields.call(this);
          },
          addValue: function (n, t) {
            null !== n.size &&
            (n.size > 0 || (n.size < 0 && t.series.negativeValues.visible))
              ? ((this._maxSize = Math.max(this._maxSize, Math.abs(n.size))),
                kt.fn.addValue.call(this, n, t))
              : (this.points.push(null),
                this.seriesPoints[t.seriesIx].push(null));
          },
          reflow: function (n) {
            this.updateBubblesSize(n);
            kt.fn.reflow.call(this, n);
          },
          pointType: function () {
            return pe;
          },
          createPoint: function (n, i) {
            var u,
              e,
              r = i.series,
              s = r.data.length,
              o = i.pointIx * (vt / s),
              h = { delay: o, duration: vt - o, type: vr },
              f = i.color || r.color;
            return (
              n.size < 0 &&
                r.negativeValues.visible &&
                (f = g(r.negativeValues.color, f)),
              (u = t(
                { labels: { animation: { delay: o, duration: vt - o } } },
                this.pointOptions(r, i.seriesIx),
                {
                  markers: {
                    type: sr,
                    border: r.border,
                    opacity: r.opacity,
                    animation: h,
                  },
                }
              )),
              (u = this.evalPointOptions(u, n, i)),
              tt(r.color) && (f = u.color),
              (u.markers.background = f),
              (e = new pe(n, u)),
              (e.color = f),
              this.append(e),
              e
            );
          },
          updateBubblesSize: function (n) {
            for (
              var o,
                s,
                a,
                v,
                h,
                u,
                c,
                y,
                p,
                w,
                f,
                r,
                b,
                l,
                k,
                e,
                d = this,
                it = this,
                nt = it.options.series,
                tt = Math.min(n.width(), n.height()),
                i = 0;
              i < nt.length;
              i++
            )
              for (
                o = nt[i],
                  s = d.seriesPoints[i],
                  a = o.minSize || Math.max(0.02 * tt, 10),
                  v = o.maxSize || 0.2 * tt,
                  h = a / 2,
                  u = v / 2,
                  c = Math.PI * h * h,
                  y = Math.PI * u * u,
                  p = y - c,
                  w = p / d._maxSize,
                  f = 0;
                f < s.length;
                f++
              )
                (r = s[f]),
                  r &&
                    ((b = Math.abs(r.value.size) * w),
                    (l = Math.sqrt((c + b) / Math.PI)),
                    (k = g(r.options.zIndex, 0)),
                    (e = k + (1 - l / u)),
                    t(r.options, {
                      zIndex: e,
                      markers: { size: 2 * l, zIndex: e },
                      labels: { zIndex: e + 1 },
                    }));
          },
          formatPointValue: function (n, t) {
            var i = n.value;
            return this.chartService.format.auto(
              t,
              i.x,
              i.y,
              i.size,
              n.category
            );
          },
          createAnimation: function () {},
          createVisual: function () {},
        });
        f(eh, { tooltip: { format: "{3}" }, labels: { format: "{3}" } });
        sa = lf.extend({});
        t(sa.prototype, ii);
        rf = r.extend({
          init: function (n, t) {
            r.fn.init.call(this, t);
            this.aboveAxis = this.options.aboveAxis;
            this.color = t.color || lt;
            this.value = n;
          },
          render: function () {
            var n = this.options;
            this._rendered ||
              ((this._rendered = !0),
              u(this.value.target) &&
                ((this.target = new sa({
                  type: n.target.shape,
                  background: n.target.color || this.color,
                  opacity: n.opacity,
                  zIndex: n.zIndex,
                  border: n.target.border,
                  vAlign: ut,
                  align: w,
                })),
                (this.target.value = this.value),
                (this.target.dataItem = this.dataItem),
                (this.target.series = this.series),
                this.append(this.target)),
              this.createNote());
          },
          reflow: function (n) {
            var u, t, i, f, r, s, h, c, l, a, e;
            this.render();
            u = this;
            t = u.options;
            i = u.target;
            f = u.owner;
            r = t.invertAxes;
            s = f.seriesValueAxis(this.options);
            h = f.categorySlot(f.categoryAxis, t.categoryIx, s);
            c = s.getSlot(this.value.target);
            l = r ? c : h;
            a = r ? h : c;
            i &&
              ((e = new o(l.x1, a.y1, l.x2, a.y2)),
              (i.options.height = r ? e.height() : t.target.line.width),
              (i.options.width = r ? t.target.line.width : e.width()),
              i.reflow(e));
            this.note && this.note.reflow(n);
            this.box = n;
          },
          createVisual: function () {
            var n, t;
            r.fn.createVisual.call(this);
            n = this.options;
            t = v.fromRect(this.box.toRect(), {
              fill: { color: this.color, opacity: n.opacity },
              stroke: null,
            });
            n.border.width > 0 &&
              t.options.set("stroke", {
                color: n.border.color || this.color,
                width: n.border.width,
                dashType: n.border.dashType,
                opacity: g(n.border.opacity, n.opacity),
              });
            this.bodyVisual = t;
            ki(t);
            this.visual.append(t);
          },
          createAnimation: function () {
            this.bodyVisual &&
              (this.animation = cr.create(
                this.bodyVisual,
                this.options.animation
              ));
          },
          createHighlight: function (n) {
            return v.fromRect(this.box.toRect(), n);
          },
          highlightVisual: function () {
            return this.bodyVisual;
          },
          highlightVisualArgs: function () {
            return {
              rect: this.box.toRect(),
              visual: this.bodyVisual,
              options: this.options,
            };
          },
          formatValue: function (n) {
            return this.owner.formatPointValue(this, n);
          },
        });
        rf.prototype.tooltipAnchor = iu.prototype.tooltipAnchor;
        f(rf, {
          border: { width: 1 },
          vertical: !1,
          opacity: 1,
          target: {
            shape: "",
            border: { width: 0, color: "green" },
            line: { width: 2 },
          },
          tooltip: { format: "Current: {0}<br />Target: {1}" },
        });
        t(rf.prototype, ii);
        t(rf.prototype, le);
        fs = it.extend({
          init: function (n, t) {
            dp(t);
            it.fn.init.call(this, n, t);
          },
          reflowCategories: function (n) {
            for (var i = this.children, r = i.length, t = 0; t < r; t++)
              i[t].reflow(n[t]);
          },
          plotRange: function (n) {
            var i = n.series,
              r = this.seriesValueAxis(i),
              t = this.categoryAxisCrossingValue(r);
            return [t, n.value.current || t];
          },
          createPoint: function (n, i) {
            var e,
              u,
              s = i.categoryIx,
              a = i.category,
              f = i.series,
              v = i.seriesIx,
              h = this,
              r = h.options,
              y = h.children,
              c = n.valueFields,
              o = t(
                {
                  vertical: !r.invertAxes,
                  overlay: f.overlay,
                  categoryIx: s,
                  invertAxes: r.invertAxes,
                },
                f
              ),
              l = n.fields.color || f.color;
            return (
              (o = this.evalPointOptions(o, c, a, s, f, v)),
              tt(f.color) && (l = o.color),
              (e = new rf(c, o)),
              (e.color = l),
              (u = y[s]),
              u ||
                ((u = new tf({
                  vertical: r.invertAxes,
                  gap: r.gap,
                  spacing: r.spacing,
                  rtl: !r.invertAxes && (this.chartService || {}).rtl,
                })),
                this.append(u)),
              u.append(e),
              e
            );
          },
          updateRange: function (n, t) {
            var r = n.current,
              f = n.target,
              e = t.series.axis,
              i = this.valueAxisRanges[e];
            u(r) &&
              !isNaN(r) &&
              u(f && !isNaN(f)) &&
              ((i = this.valueAxisRanges[e] = i || { min: rt, max: ot }),
              (i.min = Math.min(i.min, r, f)),
              (i.max = Math.max(i.max, r, f)));
          },
          formatPointValue: function (n, t) {
            return this.chartService.format.auto(
              t,
              n.value.current,
              n.value.target
            );
          },
          pointValue: function (n) {
            return n.valueFields.current;
          },
          aboveAxis: function (n) {
            var t = n.value.current;
            return t > 0;
          },
          createAnimation: function () {
            var n,
              t,
              r = this,
              i = this.points;
            for (this._setAnimationOptions(), n = 0; n < i.length; n++)
              (t = i[n]),
                (t.options.animation = r.options.animation),
                t.createAnimation();
          },
        });
        fs.prototype._setAnimationOptions = oi.prototype._setAnimationOptions;
        f(fs, { animation: { type: ei } });
        ur = et.extend({
          init: function (n, i) {
            this.chartService = n;
            this.options = t({}, this.options, i);
          },
          getStyle: function (n, t) {
            var r,
              i,
              u = n.background,
              f = n.border.color;
            return (
              t &&
                ((r = t.color || t.options.color),
                (u = g(u, r)),
                (f = g(f, r))),
              (i = wt(n.padding || {}, "auto")),
              {
                backgroundColor: u,
                borderColor: f,
                font: n.font,
                color: n.color,
                opacity: n.opacity,
                borderWidth: vf(n.border.width),
                paddingTop: vf(i.top),
                paddingBottom: vf(i.bottom),
                paddingLeft: vf(i.left),
                paddingRight: vf(i.right),
              }
            );
          },
          show: function (n, t, i) {
            n.format = t.format;
            var r = this.getStyle(t, i);
            n.style = r;
            !u(t.color) &&
              new tr(r.backgroundColor).percBrightness() > 180 &&
              (n.className = "k-chart-tooltip-inverse");
            this.chartService.notify(th, n);
            this.visible = !0;
          },
          hide: function () {
            this.chartService && this.chartService.notify(ih);
            this.visible = !1;
          },
          destroy: function () {
            delete this.chartService;
          },
        });
        f(ur, { border: { width: 1 }, opacity: 1 });
        oh = ur.extend({
          init: function (n, t, i) {
            ur.fn.init.call(this, n, i);
            this.crosshair = t;
            this.formatService = n.format;
            this.initAxisName();
          },
          initAxisName: function () {
            var t,
              n = this.crosshair.axis,
              i = n.plotArea;
            t = i.categoryAxis
              ? n.getCategory
                ? "categoryAxis"
                : "valueAxis"
              : n.options.vertical
              ? "yAxis"
              : "xAxis";
            this.axisName = t;
          },
          showAt: function (n) {
            var f = this,
              t = f.crosshair.axis,
              i = f.options,
              r = t[i.stickyMode ? "getCategory" : "getValue"](n),
              u = r;
            i.format
              ? (u = this.formatService.auto(i.format, r))
              : t.options.type === sf &&
                (u = this.formatService.auto(
                  t.options.labels.dateFormats[t.options.baseUnit],
                  r
                ));
            this.show(
              {
                point: n,
                anchor: this.getAnchor(),
                crosshair: this.crosshair,
                value: u,
                axisName: this.axisName,
                axisIndex: this.crosshair.axis.axisIndex,
              },
              this.options
            );
          },
          hide: function () {
            this.chartService.notify(ih, {
              crosshair: this.crosshair,
              axisName: this.axisName,
              axisIndex: this.crosshair.axis.axisIndex,
            });
          },
          getAnchor: function () {
            var t,
              i,
              n,
              f = this,
              e = f.crosshair,
              o = f.options,
              s = o.position,
              r = o.padding,
              c = !e.axis.options.vertical,
              u = e.line.bbox();
            return (
              c
                ? ((t = h),
                  s === st
                    ? ((i = ut), (n = u.bottomLeft().translate(0, r)))
                    : ((i = st), (n = u.topLeft().translate(0, -r))))
                : ((i = h),
                  s === y
                    ? ((t = w), (n = u.topLeft().translate(-r, 0)))
                    : ((t = y), (n = u.topRight().translate(r, 0)))),
              { point: n, align: { horizontal: t, vertical: i } }
            );
          },
        });
        f(oh, { padding: 10 });
        sh = r.extend({
          init: function (n, i, u) {
            r.fn.init.call(this, u);
            this.axis = i;
            this.stickyMode = i instanceof fu;
            var f = this.options.tooltip;
            f.visible &&
              (this.tooltip = new oh(
                n,
                this,
                t({}, f, { stickyMode: this.stickyMode })
              ));
          },
          showAt: function (n) {
            this.point = n;
            this.moveLine();
            this.line.visible(!0);
            this.tooltip && this.tooltip.showAt(n);
          },
          hide: function () {
            this.line.visible(!1);
            this.tooltip && this.tooltip.hide();
          },
          moveLine: function () {
            var i,
              e,
              o = this,
              r = o.axis,
              u = o.point,
              s = r.options.vertical,
              n = this.getBox(),
              t = s ? l : a,
              f = new nt(n.x1, n.y1);
            i = s ? new nt(n.x2, n.y1) : new nt(n.x1, n.y2);
            u &&
              (this.stickyMode
                ? ((e = r.getSlot(r.pointCategoryIndex(u))),
                  (f[t] = i[t] = e.center()[t]))
                : (f[t] = i[t] = u[t]));
            this.box = n;
            this.line.moveTo(f).lineTo(i);
          },
          getBox: function () {
            for (
              var n,
                i,
                u = this.axis,
                e = u.pane.axes,
                s = e.length,
                o = u.options.vertical,
                f = u.lineBox().clone(),
                r = o ? a : l,
                t = 0;
              t < s;
              t++
            )
              (i = e[t]),
                i.options.vertical !== o &&
                  (n ? n.wrap(i.lineBox()) : (n = i.lineBox().clone()));
            return (f[r + 1] = n[r + 1]), (f[r + 2] = n[r + 2]), f;
          },
          createVisual: function () {
            r.fn.createVisual.call(this);
            var n = this.options;
            this.line = new v({
              stroke: {
                color: n.color,
                width: n.width,
                opacity: n.opacity,
                dashType: n.dashType,
              },
              visible: !1,
            });
            this.moveLine();
            this.visual.append(this.line);
          },
          destroy: function () {
            this.tooltip && this.tooltip.destroy();
            r.fn.destroy.call(this);
          },
        });
        f(sh, { color: uu, width: 2, zIndex: -1, tooltip: { visible: !1 } });
        hh = r.extend({
          init: function (n, t) {
            r.fn.init.call(this, n);
            this.pane = t;
          },
          shouldClip: function () {
            for (var t = this.children, i = t.length, n = 0; n < i; n++)
              if (t[n].options.clip === !0) return !0;
            return !1;
          },
          _clipBox: function () {
            return this.pane.chartsBox();
          },
          createVisual: function () {
            var t, i, n;
            this.visual = new lr({ zIndex: 0 });
            this.shouldClip() &&
              ((t = this.clipBox = this._clipBox()),
              (i = t.toRect()),
              (n = v.fromRect(i)),
              ki(n),
              this.visual.clip(n),
              this.unclipLabels());
          },
          stackRoot: function () {
            return this;
          },
          unclipLabels: function () {
            for (
              var f,
                e,
                r,
                n,
                t,
                u,
                o = this,
                s = o.children,
                h = o.clipBox,
                i = 0;
              i < s.length;
              i++
            )
              for (f = s[i].points || {}, e = f.length, r = 0; r < e; r++)
                (n = f[r]),
                  n &&
                    n.visible !== !1 &&
                    n.overlapsBox &&
                    n.overlapsBox(h) &&
                    (n.unclipElements
                      ? n.unclipElements()
                      : ((t = n.label),
                        (u = n.note),
                        t &&
                          t.options.visible &&
                          (t.alignToClipBox && t.alignToClipBox(h),
                          (t.options.noclip = !0)),
                        u && u.options.visible && (u.options.noclip = !0)));
          },
          destroy: function () {
            r.fn.destroy.call(this);
            delete this.parent;
          },
        });
        hh.prototype.isStackRoot = !0;
        we = li.extend({
          init: function (n) {
            li.fn.init.call(this, n);
            this.id = gp();
            this.createTitle();
            this.content = new r();
            this.chartContainer = new hh({}, this);
            this.append(this.content);
            this.axes = [];
            this.charts = [];
          },
          createTitle: function () {
            var n = this.options.title;
            di(n) && (n = t({}, n, { align: n.position, position: ut }));
            this.title = i.Title.buildTitle(
              n,
              this,
              we.prototype.options.title
            );
          },
          appendAxis: function (n) {
            this.content.append(n);
            this.axes.push(n);
            n.pane = this;
          },
          appendAxisAt: function (n, t) {
            this.content.append(n);
            this.axes.splice(t, 0, n);
            n.pane = this;
          },
          appendChart: function (n) {
            this.chartContainer.parent !== this.content &&
              this.content.append(this.chartContainer);
            this.charts.push(n);
            this.chartContainer.append(n);
            n.pane = this;
          },
          empty: function () {
            var n,
              t,
              r = this,
              i = this.parent;
            if (i) {
              for (n = 0; n < this.axes.length; n++) i.removeAxis(r.axes[n]);
              for (t = 0; t < this.charts.length; t++)
                i.removeChart(r.charts[t]);
            }
            this.axes = [];
            this.charts = [];
            this.content.destroy();
            this.content.children = [];
            this.chartContainer.children = [];
          },
          reflow: function (n) {
            var t;
            gi(this.children) === this.content && (t = this.children.pop());
            li.fn.reflow.call(this, n);
            t && this.children.push(t);
            this.title && (this.contentBox.y1 += this.title.box.height());
          },
          visualStyle: function () {
            var n = li.fn.visualStyle.call(this);
            return (n.zIndex = -10), n;
          },
          renderComplete: function () {
            this.options.visible && this.createGridLines();
          },
          stackRoot: function () {
            return this;
          },
          clipRoot: function () {
            return this;
          },
          createGridLines: function () {
            for (
              var i,
                r,
                u,
                t,
                f,
                e = this.axes,
                o = e.concat(this.parent.axes),
                s = [],
                h = [],
                n = 0;
              n < e.length;
              n++
            )
              for (
                i = e[n], r = i.options.vertical, u = r ? s : h, t = 0;
                t < o.length;
                t++
              )
                0 === u.length &&
                  ((f = o[t]),
                  r !== f.options.vertical && af(u, i.createGridLines(f)));
          },
          refresh: function () {
            this.visual.clear();
            this.content.parent = null;
            this.content.createGradient = this.createGradient.bind(this);
            this.content.renderVisual();
            this.content.parent = this;
            this.title && this.visual.append(this.title.visual);
            this.visual.append(this.content.visual);
            this.renderComplete();
            this.notifyRender();
          },
          chartsBox: function () {
            for (
              var u,
                t,
                f,
                e,
                c,
                r,
                s,
                h,
                v = this.axes,
                y = v.length,
                n = new o(),
                i = 0;
              i < y;
              i++
            )
              (u = v[i]),
                (t = u.options.vertical ? l : a),
                (f = u.lineBox()),
                (n[t + 1] = f[t + 1]),
                (n[t + 2] = f[t + 2]);
            if (0 === n.x2)
              for (e = this.parent.axes, c = e.length, r = 0; r < c; r++)
                (s = e[r]),
                  s.options.vertical ||
                    ((h = s.lineBox()), (n.x1 = h.x1), (n.x2 = h.x2));
            return n;
          },
          clipBox: function () {
            return this.chartContainer.clipBox;
          },
          notifyRender: function () {
            var n = this.getService();
            n &&
              n.notify(gl, {
                pane: new eo(this),
                index: this.paneIndex,
                name: this.options.name,
              });
          },
        });
        vy = 1;
        we.prototype.isStackRoot = !0;
        f(we, {
          zIndex: -1,
          shrinkToFit: !0,
          title: { align: y },
          visible: !0,
        });
        yy = /area/i;
        ht = r.extend({
          init: function (n, t, i) {
            r.fn.init.call(this, t);
            this.initFields(n, t);
            this.series = n;
            this.initSeries();
            this.charts = [];
            this.options.legend.items = [];
            this.axes = [];
            this.crosshairs = [];
            this.chartService = i;
            this.originalOptions = t;
            this.createPanes();
            this.render();
            this.createCrosshairs();
          },
          initFields: function () {},
          initSeries: function () {
            for (var t = this.series, n = 0; n < t.length; n++) t[n].index = n;
          },
          createPanes: function () {
            function e(n, i) {
              uo(n.title) && (n.title = { text: n.title });
              n.title = t({}, i.title, n.title);
            }
            for (
              var r,
                i,
                o = this,
                s = { title: { color: (this.options.title || {}).color } },
                u = [],
                f = this.options.panes || [],
                h = Math.max(f.length, 1),
                n = 0;
              n < h;
              n++
            )
              (r = f[n] || {}),
                e(r, s),
                (i = new we(r)),
                (i.paneIndex = n),
                u.push(i),
                o.append(i);
            this.panes = u;
          },
          createCrosshairs: function (n) {
            var i,
              r,
              u,
              t,
              f,
              e = this;
            for (void 0 === n && (n = this.panes), i = 0; i < n.length; i++)
              for (r = n[i], u = 0; u < r.axes.length; u++)
                (t = r.axes[u]),
                  t.options.crosshair &&
                    t.options.crosshair.visible &&
                    ((f = new sh(e.chartService, t, t.options.crosshair)),
                    e.crosshairs.push(f),
                    r.content.append(f));
          },
          removeCrosshairs: function (n) {
            for (
              var i, r = this.crosshairs, u = n.axes, t = r.length - 1;
              t >= 0;
              t--
            )
              for (i = 0; i < u.length; i++)
                if (r[t].axis === u[i]) {
                  r.splice(t, 1);
                  break;
                }
          },
          hideCrosshairs: function () {
            for (var t = this.crosshairs, n = 0; n < t.length; n++) t[n].hide();
          },
          findPane: function (n) {
            for (var r, i = this.panes, t = 0; t < i.length; t++)
              if (i[t].options.name === n) {
                r = i[t];
                break;
              }
            return r || i[0];
          },
          findPointPane: function (n) {
            for (var r, i = this.panes, t = 0; t < i.length; t++)
              if (i[t].box.containsPoint(n)) {
                r = i[t];
                break;
              }
            return r;
          },
          appendAxis: function (n) {
            var t = this.findPane(n.options.pane);
            t.appendAxis(n);
            this.axes.push(n);
            n.plotArea = this;
          },
          removeAxis: function (n) {
            for (var i, u = this, r = [], t = 0; t < this.axes.length; t++)
              (i = u.axes[t]), n !== i ? r.push(i) : i.destroy();
            this.axes = r;
          },
          appendChart: function (n, t) {
            this.charts.push(n);
            t ? t.appendChart(n) : this.append(n);
          },
          removeChart: function (n) {
            for (var i, u = this, r = [], t = 0; t < this.charts.length; t++)
              (i = u.charts[t]), i !== n ? r.push(i) : i.destroy();
            this.charts = r;
          },
          addToLegend: function (n) {
            for (
              var t,
                u,
                i,
                s,
                h,
                f,
                e,
                o,
                p = n.length,
                c = this.options.legend,
                a = c.labels || {},
                v = c.inactiveItems || {},
                l = v.labels || {},
                y = [],
                r = 0;
              r < p;
              r++
            )
              (t = n[r]),
                (u = t.visible !== !1),
                t.visibleInLegend !== !1 &&
                  ((i = t.name),
                  (s = u ? gt(a) : gt(l) || gt(a)),
                  s && (i = s({ text: at(i) ? i : "", series: t })),
                  (h = t._defaults),
                  (f = t.color),
                  tt(f) && h && (f = h.color),
                  (e = void 0),
                  (o = void 0),
                  u
                    ? ((e = {}), (o = f))
                    : ((e = { color: l.color, font: l.font }),
                      (o = v.markers.color)),
                  at(i) &&
                    "" !== i &&
                    y.push({
                      text: i,
                      labels: e,
                      markerColor: o,
                      series: t,
                      active: u,
                    }));
            af(c.items, y);
          },
          groupAxes: function (n) {
            for (var u, i, r, f = [], e = [], t = 0; t < n.length; t++)
              for (u = n[t].axes, i = 0; i < u.length; i++)
                (r = u[i]), r.options.vertical ? e.push(r) : f.push(r);
            return { x: f, y: e, any: f.concat(e) };
          },
          groupSeriesByPane: function () {
            for (
              var t, i, f = this, u = this.series, r = {}, n = 0;
              n < u.length;
              n++
            )
              (t = u[n]),
                (i = f.seriesPaneName(t)),
                r[i] ? r[i].push(t) : (r[i] = [t]);
            return r;
          },
          filterVisibleSeries: function (n) {
            for (var i, r = [], t = 0; t < n.length; t++)
              (i = n[t]), i.visible !== !1 && r.push(i);
            return r;
          },
          reflow: function (n) {
            var i = this.options.plotArea,
              t = this.panes,
              r = wt(i.margin);
            this.box = n.clone().unpad(r);
            this.reflowPanes();
            this.detachLabels();
            this.reflowAxes(t);
            this.reflowCharts(t);
          },
          redraw: function (n) {
            var u,
              i,
              r,
              f = this,
              t = [].concat(n);
            for (
              this.initSeries(),
                u = this.getRoot(),
                u && u.cleanGradients(),
                i = 0;
              i < t.length;
              i++
            )
              f.removeCrosshairs(t[i]), t[i].empty();
            for (
              this.render(t),
                this.detachLabels(),
                this.reflowAxes(this.panes),
                this.reflowCharts(t),
                this.createCrosshairs(t),
                r = 0;
              r < t.length;
              r++
            )
              t[r].refresh();
          },
          axisCrossingValues: function (n, t) {
            for (
              var u = n.options,
                i = [].concat(u.axisCrossingValues || u.axisCrossingValue),
                f = t.length - i.length,
                e = i[0] || 0,
                r = 0;
              r < f;
              r++
            )
              i.push(e);
            return i;
          },
          alignAxisTo: function (n, t, i, r) {
            var u = n.getSlot(i, i, !0),
              f = n.options.reverse ? 2 : 1,
              e = t.getSlot(r, r, !0),
              o = t.options.reverse ? 2 : 1,
              s = n.box.translate(e[a + o] - u[a + f], e[l + o] - u[l + f]);
            n.pane !== t.pane && s.translate(0, n.pane.box.y1 - t.pane.box.y1);
            n.reflow(s);
          },
          alignAxes: function (n, t) {
            for (
              var i,
                k,
                e,
                g,
                o,
                v,
                f,
                r,
                nt,
                h,
                tt,
                c,
                p,
                l = this,
                b = n[0],
                a = t[0],
                it = this.axisCrossingValues(b, t),
                rt = this.axisCrossingValues(a, n),
                ft = {},
                et = {},
                ot = {},
                ht = {},
                u = 0;
              u < t.length;
              u++
            )
              (i = t[u]),
                (k = i.pane),
                (e = k.id),
                (g = i.options.visible !== !1),
                (o = il(n, k) || b),
                (v = it),
                o !== b && (v = l.axisCrossingValues(o, t)),
                l.alignAxisTo(i, o, rt[u], v[u]),
                i.options._overlap ||
                  (d(i.lineBox().x1) === d(o.lineBox().x1) &&
                    (ft[e] &&
                      i.reflow(
                        i.box
                          .alignTo(ft[e].box, y)
                          .translate(-i.options.margin, 0)
                      ),
                    g && (ft[e] = i)),
                  d(i.lineBox().x2) === d(o.lineBox().x2) &&
                    (i._mirrored ||
                      ((i.options.labels.mirror = !i.options.labels.mirror),
                      (i._mirrored = !0)),
                    l.alignAxisTo(i, o, rt[u], v[u]),
                    et[e] &&
                      i.reflow(
                        i.box
                          .alignTo(et[e].box, w)
                          .translate(i.options.margin, 0)
                      ),
                    g && (et[e] = i)),
                  0 !== u &&
                    a.pane === i.pane &&
                    (i.alignTo(a), i.reflow(i.box)));
            for (f = 0; f < n.length; f++)
              (r = n[f]),
                (nt = r.pane),
                (h = nt.id),
                (tt = r.options.visible !== !1),
                (c = il(t, nt) || a),
                (p = rt),
                c !== a && (p = l.axisCrossingValues(c, n)),
                l.alignAxisTo(r, c, it[f], p[f]),
                r.options._overlap ||
                  (d(r.lineBox().y1) === d(c.lineBox().y1) &&
                    (r._mirrored ||
                      ((r.options.labels.mirror = !r.options.labels.mirror),
                      (r._mirrored = !0)),
                    l.alignAxisTo(r, c, it[f], p[f]),
                    ot[h] &&
                      r.reflow(
                        r.box
                          .alignTo(ot[h].box, ut)
                          .translate(0, -r.options.margin)
                      ),
                    tt && (ot[h] = r)),
                  d(r.lineBox().y2, s.COORD_PRECISION) ===
                    d(c.lineBox().y2, s.COORD_PRECISION) &&
                    (ht[h] &&
                      r.reflow(
                        r.box
                          .alignTo(ht[h].box, st)
                          .translate(0, r.options.margin)
                      ),
                    tt && (ht[h] = r)),
                  0 !== f && (r.alignTo(b), r.reflow(r.box)));
          },
          shrinkAxisWidth: function (n) {
            for (
              var f, i, r, e = this.groupAxes(n).any, o = tl(e), u = 0, t = 0;
              t < n.length;
              t++
            )
              (f = n[t]),
                f.axes.length > 0 &&
                  (u = Math.max(u, o.width() - f.contentBox.width()));
            if (0 !== u)
              for (i = 0; i < e.length; i++)
                (r = e[i]), r.options.vertical || r.reflow(r.box.shrink(u, 0));
          },
          shrinkAxisHeight: function (n) {
            for (var o, f, i, e, r, u, t = 0; t < n.length; t++)
              if (
                ((f = n[t]),
                (i = f.axes),
                (e = Math.max(0, tl(i).height() - f.contentBox.height())),
                0 !== e)
              ) {
                for (r = 0; r < i.length; r++)
                  (u = i[r]),
                    u.options.vertical && u.reflow(u.box.shrink(0, e));
                o = !0;
              }
            return o;
          },
          fitAxes: function (n) {
            for (
              var o,
                t,
                r,
                u,
                l,
                f,
                s,
                e,
                h,
                a = this.groupAxes(n).any,
                c = 0,
                i = 0;
              i < n.length;
              i++
            )
              if (((o = n[i]), (t = o.axes), (r = o.contentBox), t.length > 0))
                for (
                  u = tl(t),
                    l = Math.max(r.y1 - u.y1, r.y2 - u.y2),
                    c = Math.max(c, r.x1 - u.x1),
                    f = 0;
                  f < t.length;
                  f++
                )
                  (s = t[f]), s.reflow(s.box.translate(0, l));
            for (e = 0; e < a.length; e++)
              (h = a[e]), h.reflow(h.box.translate(c, 0));
          },
          reflowAxes: function (n) {
            for (var r = this, t = this.groupAxes(n), i = 0; i < n.length; i++)
              r.reflowPaneAxes(n[i]);
            t.x.length > 0 &&
              t.y.length > 0 &&
              (this.alignAxes(t.x, t.y),
              this.shrinkAxisWidth(n),
              this.autoRotateAxisLabels(t),
              this.alignAxes(t.x, t.y),
              this.shrinkAxisWidth(n) && this.alignAxes(t.x, t.y),
              this.shrinkAxisHeight(n),
              this.alignAxes(t.x, t.y),
              this.shrinkAxisHeight(n) && this.alignAxes(t.x, t.y),
              this.fitAxes(n));
          },
          autoRotateAxisLabels: function (n) {
            for (
              var u, f, i, o = this, s = this, r = s.panes, e = py(r), t = 0;
              t < e.length;
              t++
            )
              (f = e[t]), f.autoRotateLabels() && (u = !0);
            if (u) {
              for (i = 0; i < r.length; i++) o.reflowPaneAxes(r[i]);
              n.x.length > 0 &&
                n.y.length > 0 &&
                (this.alignAxes(n.x, n.y), this.shrinkAxisWidth(r));
            }
          },
          reflowPaneAxes: function (n) {
            var t,
              i = n.axes,
              r = i.length;
            if (r > 0) for (t = 0; t < r; t++) i[t].reflow(n.contentBox);
          },
          reflowCharts: function (n) {
            for (
              var i, r = this.charts, u = r.length, f = this.box, t = 0;
              t < u;
              t++
            )
              (i = r[t].pane), (i && !k(i, n)) || r[t].reflow(f);
          },
          reflowPanes: function () {
            for (
              var n,
                r,
                c,
                u,
                s,
                f,
                h,
                l,
                a = this,
                t = a.box,
                e = a.panes,
                o = e.length,
                v = t.height(),
                w = o,
                y = 0,
                p = t.y1,
                i = 0;
              i < o;
              i++
            )
              (n = e[i]),
                (r = n.options.height),
                (n.options.width = t.width()),
                n.options.height
                  ? (r.indexOf &&
                      r.indexOf("%") &&
                      ((c = parseInt(r, 10) / 100),
                      (n.options.height = c * t.height())),
                    n.reflow(t.clone()),
                    (v -= n.options.height))
                  : y++;
            for (u = 0; u < o; u++)
              (s = e[u]), s.options.height || (s.options.height = v / y);
            for (f = 0; f < o; f++)
              (h = e[f]),
                (l = t.clone().move(t.x1, p)),
                h.reflow(l),
                w--,
                (p += h.options.height);
          },
          backgroundBox: function () {
            for (
              var n, r, i, u, f, e = this.axes, o = e.length, t = 0;
              t < o;
              t++
            )
              for (r = e[t], i = 0; i < o; i++)
                (u = e[i]),
                  r.options.vertical !== u.options.vertical &&
                    ((f = r.lineBox().clone().wrap(u.lineBox())),
                    (n = n ? n.wrap(f) : f));
            return n || this.box;
          },
          chartsBoxes: function () {
            for (var t = this.panes, i = [], n = 0; n < t.length; n++)
              i.push(t[n].chartsBox());
            return i;
          },
          addBackgroundPaths: function (n) {
            for (var i = this.chartsBoxes(), t = 0; t < i.length; t++)
              n.paths.push(v.fromRect(i[t].toRect()));
          },
          backgroundContainsPoint: function (n) {
            for (var i = this.chartsBoxes(), t = 0; t < i.length; t++)
              if (i[t].containsPoint(n)) return !0;
          },
          createVisual: function () {
            var t, u, i, n, f;
            r.fn.createVisual.call(this);
            t = this.options.plotArea;
            u = t.opacity;
            i = t.background;
            n = t.border;
            void 0 === n && (n = {});
            tw(i) && ((i = lt), (u = 0));
            f = this._bgVisual = new ui.MultiPath({
              fill: { color: i, opacity: u },
              stroke: {
                color: n.width ? n.color : "",
                width: n.width,
                dashType: n.dashType,
              },
              zIndex: -1,
            });
            this.addBackgroundPaths(f);
            this.appendVisual(f);
          },
          pointsByCategoryIndex: function (n) {
            var t,
              o,
              i,
              f,
              r,
              e = this.charts,
              s = [];
            if (null !== n)
              for (t = 0; t < e.length; t++)
                if (
                  ((o = e[t]),
                  "_navigator" !== o.pane.options.name &&
                    ((i = e[t].categoryPoints[n]), i && i.length))
                )
                  for (f = 0; f < i.length; f++)
                    (r = i[f]),
                      r && u(r.value) && null !== r.value && s.push(r);
            return s;
          },
          pointsBySeriesIndex: function (n) {
            return this.filterPoints(function (t) {
              return t.series.index === n;
            });
          },
          pointsBySeriesName: function (n) {
            return this.filterPoints(function (t) {
              return t.series.name === n;
            });
          },
          filterPoints: function (n) {
            for (
              var f, u, r, t, e = this.charts, o = [], i = 0;
              i < e.length;
              i++
            )
              for (f = e[i], u = f.points, r = 0; r < u.length; r++)
                (t = u[r]), t && t.visible !== !1 && n(t) && o.push(t);
            return o;
          },
          findPoint: function (n) {
            for (var f, u, r, t, e = this.charts, i = 0; i < e.length; i++)
              for (f = e[i], u = f.points, r = 0; r < u.length; r++)
                if (((t = u[r]), t && t.visible !== !1 && n(t))) return t;
          },
          paneByPoint: function (n) {
            for (var i, r = this.panes, t = 0; t < r.length; t++)
              if (((i = r[t]), i.box.containsPoint(n))) return i;
          },
          detachLabels: function () {
            var n = this.groupAxes(this.panes),
              t = n.x,
              i = n.y;
            this.detachAxisGroupLabels(i, t);
            this.detachAxisGroupLabels(t, i);
          },
          detachAxisGroupLabels: function (n, t) {
            for (
              var r, u, o, s, f, h, c = this, e = 0, i = 0;
              i < n.length;
              i++
            )
              (r = n[i]),
                (u = r.pane),
                (o = il(t, u) || t[0]),
                (s = i + e),
                (f = c.createLabelAxis(r, s, o)),
                f && (e++, (h = u.axes.indexOf(r) + e), u.appendAxisAt(f, h));
          },
          createLabelAxis: function (n, t, i) {
            var e,
              c,
              f,
              l,
              u,
              o,
              a,
              r,
              v = n.options.labels,
              h = v.position,
              y = h !== s.END && h !== s.START,
              p = v.visible;
            return y || p === !1
              ? null
              : ((e = this.groupAxes(this.panes)),
                (c = i.options.vertical ? e.x : e.y),
                (f = this.axisCrossingValues(i, c)),
                (l = h === s.END),
                (u = i.range()),
                (o = l ? u.max : u.min),
                (a = ai(f[t], u.min, u.max)),
                a - o == 0
                  ? null
                  : (f.splice(t + 1, 0, o),
                    (i.options.axisCrossingValues = f),
                    (r = n.clone()),
                    n.clear(),
                    (r.options.name = void 0),
                    (r.options.line.visible = !1),
                    (r.options.crosshair = void 0),
                    (r.options.notes = void 0),
                    (r.options.plotBands = void 0),
                    r));
          },
        });
        py = function (n) {
          return n.reduce(function (n, t) {
            return n.concat(t.axes);
          }, []);
        };
        f(ht, {
          series: [],
          plotArea: { margin: {} },
          background: "",
          border: { color: uu, width: 0 },
          legend: {
            inactiveItems: {
              labels: { color: "#919191" },
              markers: { color: "#919191" },
            },
          },
        });
        be = {
          hover: function (n, t) {
            this._dispatchEvent(n, t, nh);
          },
          click: function (n, t) {
            this._dispatchEvent(n, t, kl);
          },
        };
        ha = et.extend({
          init: function (n, t, i) {
            var u,
              f,
              r,
              e = t.canonicalFields(n),
              s = t.valueFields(n),
              h = t.sourceFields(n, e),
              c = (this._seriesFields = []),
              l = i.query(n.type),
              o = n.aggregate || l;
            for (this._series = n, this._binder = t, u = 0; u < e.length; u++) {
              if (((f = e[u]), (r = void 0), di(o))) r = o[f];
              else {
                if (0 !== u && !k(f, s)) break;
                r = o;
              }
              r &&
                c.push({
                  canonicalName: f,
                  name: h[u],
                  transform: tt(r) ? r : oo[r],
                });
            }
          },
          aggregatePoints: function (n, t) {
            var s,
              r,
              f,
              l,
              i,
              y = this,
              a = this,
              p = a._series,
              v = a._seriesFields,
              h = this._bindPoints(n || []),
              e = h.dataItems[0],
              o = {};
            for (
              !e ||
                c(e) ||
                io(e) ||
                ((s = function () {}), (s.prototype = e), (o = new s())),
                r = 0;
              r < v.length;
              r++
            ) {
              if (
                ((f = v[r]),
                (l = y._bindField(h.values, f.canonicalName)),
                (i = f.transform(l, p, h.dataItems, t)),
                !(null === i || !di(i) || u(i.length) || i instanceof Date))
              ) {
                o = i;
                break;
              }
              u(i) && iw(f.name, o, i);
            }
            return o;
          },
          _bindPoints: function (n) {
            for (
              var i,
                r = this,
                o = r._binder,
                u = r._series,
                f = [],
                e = [],
                t = 0;
              t < n.length;
              t++
            )
              (i = n[t]), f.push(o.bindPoint(u, i)), e.push(u.data[i]);
            return { values: f, dataItems: e };
          },
          _bindField: function (n, t) {
            for (var r, f, e, o = [], s = n.length, i = 0; i < s; i++)
              (r = n[i]),
                (f = r.valueFields),
                (e = void 0),
                (e = u(f[t]) ? f[t] : r.fields[t]),
                o.push(e);
            return o;
          },
        });
        hi = et.extend({
          init: function () {
            this._defaults = {};
          },
          register: function (n, t) {
            for (var r = this, i = 0; i < n.length; i++) r._defaults[n[i]] = t;
          },
          query: function (n) {
            return this._defaults[n];
          },
        });
        hi.current = new hi();
        es = iu.extend({
          createLabel: function () {
            var n = this.options.labels,
              i = t({}, n, n.from),
              r = t({}, n, n.to);
            i.visible &&
              ((this.labelFrom = this._createLabel(i)),
              this.append(this.labelFrom));
            r.visible &&
              ((this.labelTo = this._createLabel(r)),
              this.append(this.labelTo));
          },
          _createLabel: function (n) {
            var i,
              r = gt(n),
              u = this.pointData();
            return (
              (i = r ? r(u) : this.formatValue(n.format)),
              new us(i, t({ vertical: this.options.vertical }, n), u)
            );
          },
          reflow: function (n) {
            var i, r, u, t;
            this.render();
            i = this;
            r = i.labelFrom;
            u = i.labelTo;
            t = i.value;
            this.box = n;
            r && ((r.options.aboveAxis = t.from > t.to), r.reflow(n));
            u && ((u.options.aboveAxis = t.to > t.from), u.reflow(n));
            this.note && this.note.reflow(n);
          },
        });
        es.prototype.defaults = t({}, es.prototype.defaults, {
          labels: { format: "{0} - {1}" },
          tooltip: { format: "{1}" },
        });
        ch = oi.extend({
          pointType: function () {
            return es;
          },
          pointValue: function (n) {
            return n.valueFields;
          },
          formatPointValue: function (n, t) {
            return null === n.value.from && null === n.value.to
              ? ""
              : this.chartService.format.auto(t, n.value.from, n.value.to);
          },
          plotRange: function (n) {
            return n ? [n.value.from, n.value.to] : 0;
          },
          updateRange: function (n, t) {
            var f = t.series.axis,
              r = n.from,
              u = n.to,
              i = this.valueAxisRanges[f];
            null !== n &&
              c(r) &&
              c(u) &&
              ((i = this.valueAxisRanges[f] = i || { min: rt, max: ot }),
              (i.min = Math.min(i.min, r)),
              (i.max = Math.max(i.max, r)),
              (i.min = Math.min(i.min, u)),
              (i.max = Math.max(i.max, u)));
          },
          aboveAxis: function (n) {
            var t = n.value;
            return t.from < t.to;
          },
        });
        ch.prototype.plotLimits = it.prototype.plotLimits;
        ca = bt.extend({
          aliasFor: function () {
            return this.parent;
          },
        });
        la = "auto";
        wy = "{0}";
        by = "{1}";
        uf = r.extend({
          init: function (n, t) {
            r.fn.init.call(this);
            this.value = n;
            this.options = t;
            this.aboveAxis = g(this.options.aboveAxis, !0);
            this.tooltipTracking = !0;
            this.initLabelsFormat();
          },
          render: function () {
            var n, i, r, u, f, e;
            this._rendered ||
              ((this._rendered = !0),
              (n = this.options),
              (i = n.markers),
              (r = n.labels),
              (u = this.value),
              (f = this.fromPoint =
                new ca(
                  u,
                  t({}, this.options, { labels: r.from, markers: i.from })
                )),
              (e = this.toPoint =
                new ca(
                  u,
                  t({}, this.options, { labels: r.to, markers: i.to })
                )),
              this.copyFields(f),
              this.copyFields(e),
              this.append(f),
              this.append(e));
          },
          reflow: function (n) {
            var t, i;
            this.render();
            t = n.from;
            i = n.to;
            this.positionLabels(t, i);
            this.fromPoint.reflow(t);
            this.toPoint.reflow(i);
            this.box = this.fromPoint
              .markerBox()
              .clone()
              .wrap(this.toPoint.markerBox());
          },
          createHighlight: function () {
            var n = new lr();
            return (
              n.append(this.fromPoint.createHighlight()),
              n.append(this.toPoint.createHighlight()),
              n
            );
          },
          highlightVisual: function () {
            return this.visual;
          },
          highlightVisualArgs: function () {
            return {
              options: this.options,
              from: this.fromPoint.highlightVisualArgs(),
              to: this.toPoint.highlightVisualArgs(),
            };
          },
          tooltipAnchor: function () {
            var n,
              t,
              f,
              i,
              r,
              u,
              o = this.owner.pane.clipBox(),
              s = !o || o.overlaps(this.box);
            if (s)
              return (
                (n = this.box),
                (t = n.center()),
                (f = y),
                this.options.vertical
                  ? ((i = t.x), (r = n.y1 - ni), (u = st))
                  : ((i = n.x2 + ni), (r = t.y), (u = h)),
                { point: new e(i, r), align: { horizontal: f, vertical: u } }
              );
          },
          formatValue: function (n) {
            return this.owner.formatPointValue(this, n);
          },
          overlapsBox: function (n) {
            return this.box.overlaps(n);
          },
          unclipElements: function () {
            this.fromPoint.unclipElements();
            this.toPoint.unclipElements();
          },
          initLabelsFormat: function () {
            var t = this.options.labels;
            t.format ||
              ((t.from && t.from.format) ||
                (t.from = n.extend({}, t.from, { format: wy })),
              (t.to && t.to.format) ||
                (t.to = n.extend({}, t.to, { format: by })));
          },
          positionLabels: function (n, t) {
            var i,
              r,
              f = this.options,
              u = f.labels,
              e = f.vertical;
            u.position === la &&
              (e
                ? t.y1 <= n.y1
                  ? ((r = gf), (i = so))
                  : ((r = so), (i = gf))
                : t.x1 <= n.x1
                ? ((r = y), (i = w))
                : ((r = w), (i = y)),
              (u.from && u.from.position) ||
                (this.fromPoint.options.labels.position = i),
              (u.to && u.to.position) ||
                (this.toPoint.options.labels.position = r));
          },
          copyFields: function (n) {
            n.dataItem = this.dataItem;
            n.category = this.category;
            n.series = this.series;
            n.color = this.color;
            n.owner = this.owner;
          },
        });
        t(uf.prototype, ii);
        t(uf.prototype, le);
        uf.prototype.defaults = {
          markers: {
            visible: !1,
            background: lt,
            size: df,
            type: sr,
            border: { width: 2 },
            opacity: 1,
          },
          labels: {
            visible: !1,
            margin: wt(3),
            padding: wt(4),
            animation: { type: yi, delay: vt },
            position: la,
          },
          notes: { label: {} },
          highlight: {
            markers: { border: { color: lt, width: 2 } },
            zIndex: s.HIGHLIGHT_ZINDEX,
          },
          tooltip: { format: "{0} - {1}" },
        };
        lh = tu.extend({
          createStrokeSegments: function () {
            return this.segmentsFromPoints(
              this.toGeometryPoints(this.toPoints())
            );
          },
          stackSegments: function () {
            var n = this.fromSegments;
            return (
              this.fromSegments ||
                (n = this.fromSegments =
                  this.segmentsFromPoints(
                    this.toGeometryPoints(this.fromPoints().reverse())
                  )),
              n
            );
          },
          createStroke: function (n) {
            var t = new v(n),
              i = new v(n);
            t.segments.push.apply(t.segments, this.strokeSegments());
            i.segments.push.apply(i.segments, this.stackSegments());
            this.visual.append(t);
            this.visual.append(i);
          },
          hasStackSegment: function () {
            return !0;
          },
          fromPoints: function () {
            return this.linePoints.map(function (n) {
              return n.fromPoint;
            });
          },
          toPoints: function () {
            return this.linePoints.map(function (n) {
              return n.toPoint;
            });
          },
        });
        ky = lh.extend({
          createStrokeSegments: function () {
            return this.createCurveSegments(this.toPoints());
          },
          stackSegments: function () {
            var n = this.fromSegments;
            return (
              this.fromSegments ||
                (n = this.fromSegments =
                  this.createCurveSegments(this.fromPoints().reverse())),
              n
            );
          },
          createCurveSegments: function (n) {
            var t = new ro();
            return t.process(this.toGeometryPoints(n));
          },
        });
        aa = lh.extend({
          createStrokeSegments: function () {
            return this.segmentsFromPoints(
              this.calculateStepPoints(this.toPoints())
            );
          },
          stackSegments: function () {
            var n = this.fromSegments;
            return (
              this.fromSegments ||
                ((n = this.fromSegments =
                  this.segmentsFromPoints(
                    this.calculateStepPoints(this.fromPoints())
                  )),
                n.reverse()),
              n
            );
          },
        });
        t(aa.prototype, rh);
        ah = it.extend({
          render: function () {
            it.fn.render.call(this);
            this.renderSegments();
          },
          pointType: function () {
            return uf;
          },
          createPoint: function (n, t) {
            var i,
              e,
              f,
              s = t.categoryIx,
              h = t.category,
              r = t.series,
              o = t.seriesIx,
              u = n.valueFields;
            if (!at(u.from) && !at(u.to)) {
              if (this.seriesMissingValues(r) !== fi) return null;
              u = { from: 0, to: 0 };
            }
            return (
              (i = this.pointOptions(r, o)),
              (i = this.evalPointOptions(i, u, h, s, r, o)),
              (e = n.fields.color || r.color),
              tt(r.color) && (e = i.color),
              (f = new uf(u, i)),
              (f.color = e),
              this.append(f),
              f
            );
          },
          createSegment: function (n, t, i) {
            var u,
              r = (t.line || {}).style;
            return new (u = "smooth" === r ? ky : "step" === r ? aa : lh)(
              n,
              t,
              i
            );
          },
          plotRange: function (n, t) {
            return n ? [n.value.from, n.value.to] : [t, t];
          },
          valueSlot: function (n, t) {
            var i = n.getSlot(t[0], t[0], !this.options.clip),
              r = n.getSlot(t[1], t[1], !this.options.clip);
            if (i && r) return { from: i, to: r };
          },
          pointSlot: function (n, t) {
            var u,
              f,
              i = t.from,
              r = t.to;
            return (
              this.options.invertAxes
                ? ((u = new o(i.x1, n.y1, i.x2, n.y2)),
                  (f = new o(r.x1, n.y1, r.x2, n.y2)))
                : ((u = new o(n.x1, i.y1, n.x2, i.y2)),
                  (f = new o(n.x1, r.y1, n.x2, r.y2))),
              { from: u, to: f }
            );
          },
          addValue: function (n, t) {
            var i = n.valueFields;
            c(i.from) || (i.from = i.to);
            c(i.to) || (i.to = i.from);
            it.fn.addValue.call(this, n, t);
          },
          updateRange: function (n, t) {
            var r, i, u, f;
            null !== n &&
              c(n.from) &&
              c(n.to) &&
              ((r = t.series.axis),
              (i = this.valueAxisRanges[r] =
                this.valueAxisRanges[r] || { min: rt, max: ot }),
              (u = n.from),
              (f = n.to),
              (i.min = Math.min(i.min, u, f)),
              (i.max = Math.max(i.max, u, f)));
          },
          formatPointValue: function (n, t) {
            var i = n.value;
            return this.chartService.format.auto(t, i.from, i.to);
          },
          animationPoints: function () {
            for (var t, r = this.points, i = [], n = 0; n < r.length; n++)
              (t = r[n]),
                t &&
                  (i.push((t.fromPoint || {}).marker),
                  i.push((t.toPoint || {}).marker));
            return i.concat(this._segments);
          },
        });
        t(ah.prototype, uh, is);
        va = si.extend({
          reflow: function (n) {
            var f,
              e = this,
              l = e.options,
              t = e.value,
              a = e.owner,
              o = a.seriesValueAxis(l),
              s = [],
              h = [],
              c = [],
              i = o.getSlot(t.low, t.high),
              r = o.getSlot(t.open, t.open),
              u = o.getSlot(t.close, t.close);
            r.x1 = u.x1 = i.x1 = n.x1;
            r.x2 = u.x2 = i.x2 = n.x2;
            f = i.center().x;
            s.push([r.x1, r.y1]);
            s.push([f, r.y1]);
            h.push([f, u.y1]);
            h.push([u.x2, u.y1]);
            c.push([f, i.y1]);
            c.push([f, i.y2]);
            this.lines = [s, h, c];
            this.box = i.clone().wrap(r.clone().wrap(u));
            this.reflowNote();
          },
          createBody: function () {},
        });
        ya = ve.extend({
          pointType: function () {
            return va;
          },
        });
        vh = r.extend({
          init: function (n, t, i) {
            r.fn.init.call(this);
            this.from = n;
            this.to = t;
            this.series = i;
          },
          linePoints: function () {
            var t,
              i,
              r = this.from,
              f = this,
              n = f.from.box,
              e = f.to.box,
              u = [];
            return (
              r.isVertical
                ? ((t = r.aboveAxis ? n.y1 : n.y2),
                  u.push([n.x1, t], [e.x2, t]))
                : ((i = r.aboveAxis ? n.x2 : n.x1),
                  u.push([i, n.y1], [i, e.y2])),
              u
            );
          },
          createVisual: function () {
            var n, t;
            r.fn.createVisual.call(this);
            n = this.series.line || {};
            t = v.fromPoints(this.linePoints(), {
              stroke: {
                color: n.color,
                width: n.width,
                opacity: n.opacity,
                dashType: n.dashType,
              },
            });
            ki(t);
            this.visual.append(t);
          },
        });
        f(vh, { animation: { type: yi, delay: vt } });
        pa = oi.extend({
          render: function () {
            oi.fn.render.call(this);
            this.createSegments();
          },
          traverseDataPoints: function (n) {
            for (
              var h,
                t,
                i,
                r,
                u,
                o,
                l,
                s,
                e,
                v = this,
                a = this.options.series,
                y = as(a),
                w = !this.options.invertAxes,
                f = 0;
              f < a.length;
              f++
            )
              for (h = a[f], t = 0, i = 0, r = 0; r < y; r++)
                (u = p.current.bindPoint(h, r)),
                  (o = u.valueFields.value),
                  (l = u.fields.summary),
                  (s = t),
                  (e = void 0),
                  l
                    ? "total" === l.toLowerCase()
                      ? ((u.valueFields.value = t), (s = 0), (e = t))
                      : ((u.valueFields.value = i), (e = s - i), (i = 0))
                    : c(o) && ((i += o), (t += o), (e = t)),
                  n(u, {
                    category: v.categoryAxis.categoryAt(r),
                    categoryIx: r,
                    series: h,
                    seriesIx: f,
                    total: t,
                    runningTotal: i,
                    from: s,
                    to: e,
                    isVertical: w,
                  });
          },
          updateRange: function (n, t) {
            oi.fn.updateRange.call(this, { value: t.to }, t);
          },
          aboveAxis: function (n) {
            return n.value >= 0;
          },
          plotRange: function (n) {
            return [n.from, n.to];
          },
          createSegments: function () {
            for (
              var e,
                u,
                t,
                i,
                r,
                f,
                s = this,
                o = this.options.series,
                h = this.seriesPoints,
                c = (this.segments = []),
                n = 0;
              n < o.length;
              n++
            )
              if (((e = o[n]), (u = h[n])))
                for (t = void 0, i = 0; i < u.length; i++)
                  (r = u[i]),
                    r && t && ((f = new vh(t, r, e)), c.push(f), s.append(f)),
                    (t = r);
          },
        });
        yh = [cu, kr, yu, nu];
        wa = [au, gr].concat(yh);
        ci = ht.extend({
          initFields: function (n) {
            var t,
              i,
              r = this;
            if (
              ((this.namedCategoryAxes = {}),
              (this.namedValueAxes = {}),
              (this.valueAxisRangeTracker = new ae()),
              n.length > 0)
            )
              for (
                this.invertAxes = k(n[0].type, [
                  ei,
                  yr,
                  gr,
                  kr,
                  nu,
                  br,
                  wr,
                  dr,
                ]),
                  t = 0;
                t < n.length;
                t++
              )
                if (((i = n[t].stack), i && "100%" === i.type)) {
                  r.stack100 = !0;
                  break;
                }
          },
          render: function (n) {
            void 0 === n && (n = this.panes);
            this.createCategoryAxes(n);
            this.aggregateCategories(n);
            this.createCategoryAxesLabels(n);
            this.createCharts(n);
            this.createValueAxes(n);
          },
          removeAxis: function (n) {
            var t = n.options.name;
            ht.fn.removeAxis.call(this, n);
            n instanceof fu
              ? delete this.namedCategoryAxes[t]
              : (this.valueAxisRangeTracker.reset(t),
                delete this.namedValueAxes[t]);
            n === this.categoryAxis && delete this.categoryAxis;
            n === this.valueAxis && delete this.valueAxis;
          },
          createCharts: function (n) {
            for (
              var u, f, o, e, i, r = this, s = this.groupSeriesByPane(), t = 0;
              t < n.length;
              t++
            )
              if (
                ((u = n[t]),
                (f = s[u.options.name || "default"] || []),
                r.addToLegend(f),
                (o = r.filterVisibleSeries(f)))
              )
                for (
                  e = r.groupSeriesByCategoryAxis(o), i = 0;
                  i < e.length;
                  i++
                )
                  r.createChartGroup(e[i], u);
          },
          createChartGroup: function (n, t) {
            this.createAreaChart(b(n, [cu, kr]), t);
            this.createRangeAreaChart(b(n, [yu, nu]), t);
            this.createBarChart(b(n, [pi, ei]), t);
            this.createRangeBarChart(b(n, [pu, br]), t);
            this.createBulletChart(b(n, [yr, fe]), t);
            this.createCandlestickChart(b(n, pr), t);
            this.createBoxPlotChart(b(n, [lu, dr]), t);
            this.createOHLCChart(b(n, vu), t);
            this.createWaterfallChart(b(n, [wu, wr]), t);
            this.createLineChart(b(n, [au, gr]), t);
          },
          aggregateCategories: function (n) {
            var r,
              t,
              i,
              e,
              o,
              u = this,
              f = this.srcSeries || this.series,
              s = [];
            for (
              this._currentPointsCache = {},
                this._seriesPointsCache = this._seriesPointsCache || {},
                r = 0;
              r < f.length;
              r++
            )
              (t = f[r]),
                (i = u.seriesCategoryAxis(t)),
                (e = u.findPane(i.options.pane)),
                (o = or(i.options.type, sf)),
                (t =
                  (o || t.categoryField) && k(e, n)
                    ? u.aggregateSeries(t, i)
                    : u.filterSeries(t, i)),
                s.push(t);
            this._seriesPointsCache = this._currentPointsCache;
            this._currentPointsCache = null;
            this.srcSeries = f;
            this.series = s;
          },
          filterSeries: function (n, i) {
            var r,
              e,
              f,
              o = (n.data || {}).length;
            return (
              (i._seriesMax = Math.max(i._seriesMax || 0, o)),
              c(i.options.min) || c(i.options.max)
                ? ((r = i.currentRangeIndices()),
                  (e = k(n.type, wa)),
                  (f = t({}, n)),
                  (f.data = (f.data || []).slice(r.min, r.max + 1)),
                  e &&
                    nl(
                      f,
                      r,
                      o,
                      function (t) {
                        return {
                          item: n.data[t],
                          category: i.categoryAt(t, !0),
                          categoryIx: t - r.min,
                        };
                      },
                      function (t) {
                        return u(n.data[t]);
                      }
                    ),
                  f)
                : n
            );
          },
          clearSeriesPointsCache: function () {
            this._seriesPointsCache = {};
          },
          seriesSourcePoints: function (n, t) {
            var s,
              l,
              h,
              c,
              a,
              i,
              r,
              f,
              o,
              v = this,
              e = n.index + ";" + t.categoriesHash();
            if (this._seriesPointsCache[e])
              return (
                (this._currentPointsCache[e] = this._seriesPointsCache[e]),
                this._seriesPointsCache[e]
              );
            for (
              s = t.options,
                l = s.srcCategories,
                h = or(s.type, sf),
                c = n.data,
                a = h ? kc : ke,
                i = [],
                h || t.mapCategories(),
                r = 0;
              r < c.length;
              r++
            )
              (f = void 0),
                (f = n.categoryField
                  ? a(n.categoryField, c[r], v.chartService.intl)
                  : l[r]),
                u(f) &&
                  null !== f &&
                  ((o = t.totalIndex(f)),
                  (i[o] = i[o] || { items: [], category: f }),
                  i[o].items.push(r));
            return (this._currentPointsCache[e] = i), i;
          },
          aggregateSeries: function (n, i) {
            var e,
              u,
              c,
              l,
              s,
              f,
              h,
              o,
              r,
              a = n.data;
            if (!a.length) return n;
            for (
              e = this.seriesSourcePoints(n, i),
                u = t({}, n),
                c = new ha(t({}, n), p.current, hi.current),
                l = u.data = [],
                s = i.options.dataItems || [],
                f = i.currentRangeIndices(),
                h = function (n) {
                  var r,
                    u = n - f.min,
                    t = e[n];
                  return (
                    t || (t = e[n] = {}),
                    (t.categoryIx = u),
                    t.item ||
                      ((r = i.categoryAt(n, !0)),
                      (t.category = r),
                      (t.item = c.aggregatePoints(t.items, r))),
                    t
                  );
                },
                o = f.min;
              o <= f.max;
              o++
            )
              (r = h(o)),
                (l[r.categoryIx] = r.item),
                r.items && r.items.length && (s[r.categoryIx] = r.item);
            return (
              k(u.type, wa) &&
                nl(u, f, i.totalCount(), h, function (n) {
                  return e[n];
                }),
              (i.options.dataItems = s),
              u
            );
          },
          appendChart: function (n, t) {
            var u = n.options.series,
              i = this.seriesCategoryAxis(u[0]),
              r = i.options.categories,
              f = Math.max(0, as(u) - r.length);
            if (f > 0)
              for (
                r = i.options.categories = i.options.categories.slice(0);
                f--;

              )
                r.push("");
            this.valueAxisRangeTracker.update(n.valueAxisRanges);
            ht.fn.appendChart.call(this, n, t);
          },
          seriesPaneName: function (n) {
            var t = this.options,
              i = n.axis,
              r = [].concat(t.valueAxis),
              u = yf(r, function (n) {
                return n.name === i;
              })[0],
              f = t.panes || [{}],
              e = (f[0] || {}).name || "default";
            return (u || {}).pane || e;
          },
          seriesCategoryAxis: function (n) {
            var t = n.categoryAxis,
              i = t ? this.namedCategoryAxes[t] : this.categoryAxis;
            if (!i)
              throw Error("Unable to locate category axis with name " + t);
            return i;
          },
          stackableChartOptions: function (n, t) {
            var i = n.stack,
              r = i && "100%" === i.type,
              u = t.options.clip;
            return { isStacked: i, isStacked100: r, clip: u };
          },
          groupSeriesByCategoryAxis: function (n) {
            for (var r, u, t, o, f, e = [], s = {}, i = 0; i < n.length; i++)
              (r = n[i].categoryAxis || "$$default$$"),
                s.hasOwnProperty(r) || ((s[r] = !0), e.push(r));
            for (u = [], t = 0; t < e.length; t++)
              (o = e[t]), (f = rw(n, o, t)), 0 !== f.length && u.push(f);
            return u;
          },
          createBarChart: function (t, i) {
            var r, u;
            0 !== t.length &&
              ((r = t[0]),
              (u = new oi(
                this,
                n.extend(
                  {
                    series: t,
                    invertAxes: this.invertAxes,
                    gap: r.gap,
                    spacing: r.spacing,
                  },
                  this.stackableChartOptions(r, i)
                )
              )),
              this.appendChart(u, i));
          },
          createRangeBarChart: function (n, t) {
            var i, r;
            0 !== n.length &&
              ((i = n[0]),
              (r = new ch(this, {
                series: n,
                invertAxes: this.invertAxes,
                gap: i.gap,
                spacing: i.spacing,
              })),
              this.appendChart(r, t));
          },
          createBulletChart: function (n, t) {
            var i, r;
            0 !== n.length &&
              ((i = n[0]),
              (r = new fs(this, {
                series: n,
                invertAxes: this.invertAxes,
                gap: i.gap,
                spacing: i.spacing,
                clip: t.options.clip,
              })),
              this.appendChart(r, t));
          },
          createLineChart: function (t, i) {
            var r, u;
            0 !== t.length &&
              ((r = t[0]),
              (u = new nf(
                this,
                n.extend(
                  { invertAxes: this.invertAxes, series: t },
                  this.stackableChartOptions(r, i)
                )
              )),
              this.appendChart(u, i));
          },
          createAreaChart: function (t, i) {
            var r, u;
            0 !== t.length &&
              ((r = t[0]),
              (u = new fa(
                this,
                n.extend(
                  { invertAxes: this.invertAxes, series: t },
                  this.stackableChartOptions(r, i)
                )
              )),
              this.appendChart(u, i));
          },
          createRangeAreaChart: function (n, t) {
            if (0 !== n.length) {
              var i = new ah(this, {
                invertAxes: this.invertAxes,
                series: n,
                clip: t.options.clip,
              });
              this.appendChart(i, t);
            }
          },
          createOHLCChart: function (n, t) {
            var i, r;
            0 !== n.length &&
              ((i = n[0]),
              (r = new ya(this, {
                invertAxes: this.invertAxes,
                gap: i.gap,
                series: n,
                spacing: i.spacing,
                clip: t.options.clip,
              })),
              this.appendChart(r, t));
          },
          createCandlestickChart: function (n, t) {
            var i, r;
            0 !== n.length &&
              ((i = n[0]),
              (r = new ve(this, {
                invertAxes: this.invertAxes,
                gap: i.gap,
                series: n,
                spacing: i.spacing,
                clip: t.options.clip,
              })),
              this.appendChart(r, t));
          },
          createBoxPlotChart: function (n, t) {
            var i, r;
            0 !== n.length &&
              ((i = n[0]),
              (r = new ea(this, {
                invertAxes: this.invertAxes,
                gap: i.gap,
                series: n,
                spacing: i.spacing,
                clip: t.options.clip,
              })),
              this.appendChart(r, t));
          },
          createWaterfallChart: function (n, t) {
            var i, r;
            0 !== n.length &&
              ((i = n[0]),
              (r = new pa(this, {
                series: n,
                invertAxes: this.invertAxes,
                gap: i.gap,
                spacing: i.spacing,
              })),
              this.appendChart(r, t));
          },
          axisRequiresRounding: function (n, t) {
            for (
              var r, f, u, e, s = this, o = b(this.series, ll), i = 0;
              i < this.series.length;
              i++
            )
              (r = s.series[i]),
                k(r.type, yh) &&
                  ((f = r.line), f && f.style === hu && o.push(r));
            for (u = 0; u < o.length; u++)
              if (((e = o[u].categoryAxis || ""), e === n || (!e && 0 === t)))
                return !0;
          },
          aggregatedAxis: function (n, t) {
            for (var r, u = this.series, i = 0; i < u.length; i++)
              if (
                ((r = u[i].categoryAxis || ""),
                (r === n || (!r && 0 === t)) && u[i].categoryField)
              )
                return !0;
          },
          createCategoryAxesLabels: function () {
            for (var t = this.axes, n = 0; n < t.length; n++)
              t[n] instanceof fu && t[n].createLabels();
          },
          createCategoryAxes: function (n) {
            for (
              var r,
                v,
                s,
                h,
                o,
                c,
                f = this,
                l = this.invertAxes,
                a = [].concat(this.options.categoryAxis),
                y = [],
                e = 0;
              e < a.length;
              e++
            )
              if (((r = a[e]), (v = f.findPane(r.pane)), k(v, n))) {
                if (
                  ((s = r.name),
                  (h = r.categories),
                  void 0 === h && (h = []),
                  (r = t(
                    {
                      vertical: l,
                      reverse: !l && f.chartService.rtl,
                      axisCrossingValue: l ? rt : 0,
                    },
                    r
                  )),
                  u(r.justified) || (r.justified = f.isJustified()),
                  f.axisRequiresRounding(s, e) && (r.justified = !1),
                  (o = void 0),
                  (o = dc(r, h[0])
                    ? new i.DateCategoryAxis(r, f.chartService)
                    : new fu(r, f.chartService)),
                  (a[e].categories = o.options.srcCategories),
                  s)
                ) {
                  if (f.namedCategoryAxes[s])
                    throw Error(
                      "Category axis with name " + s + " is already defined"
                    );
                  f.namedCategoryAxes[s] = o;
                }
                o.axisIndex = e;
                y.push(o);
                f.appendAxis(o);
              }
            c = this.categoryAxis || y[0];
            this.categoryAxis = c;
            l ? (this.axisY = c) : (this.axisX = c);
          },
          isJustified: function () {
            for (var t, i = this.series, n = 0; n < i.length; n++)
              if (((t = i[n]), !k(t.type, yh))) return !1;
            return !0;
          },
          createValueAxes: function (n) {
            var u,
              f,
              y,
              e,
              p,
              r,
              l,
              o,
              h,
              s = this,
              w = this.valueAxisRangeTracker,
              c = w.query(),
              b = [].concat(this.options.valueAxis),
              a = this.invertAxes,
              v = { vertical: !a, reverse: a && this.chartService.rtl },
              d = [];
            for (
              this.stack100 &&
                ((v.roundToMajorUnit = !1), (v.labels = { format: "P0" })),
                u = 0;
              u < b.length;
              u++
            )
              if (((f = b[u]), (y = s.findPane(f.pane)), k(y, n))) {
                if (
                  ((e = f.name),
                  (p = or(f.type, se)
                    ? { min: 0.1, max: 1 }
                    : { min: 0, max: 1 }),
                  (r = w.query(e) || c || p),
                  0 === u &&
                    r &&
                    c &&
                    ((r.min = Math.min(r.min, c.min)),
                    (r.max = Math.max(r.max, c.max))),
                  (l = void 0),
                  (l = or(f.type, se) ? i.LogarithmicAxis : i.NumericAxis),
                  (o = new l(r.min, r.max, t({}, v, f), s.chartService)),
                  e)
                ) {
                  if (s.namedValueAxes[e])
                    throw Error(
                      "Value axis with name " + e + " is already defined"
                    );
                  s.namedValueAxes[e] = o;
                }
                o.axisIndex = u;
                d.push(o);
                s.appendAxis(o);
              }
            h = this.valueAxis || d[0];
            this.valueAxis = h;
            a ? (this.axisX = h) : (this.axisY = h);
          },
          _dispatchEvent: function (n, t, i) {
            var s,
              u,
              f,
              c = n._eventCoordinates(t),
              o = new e(c.x, c.y),
              l = this.pointPane(o),
              r = [],
              h = [];
            if (l) {
              for (s = l.axes, u = 0; u < s.length; u++)
                (f = s[u]),
                  f.getValue ? ys(h, f.getValue(o)) : ys(r, f.getCategory(o));
              0 === r.length && ys(r, this.categoryAxis.getCategory(o));
              r.length > 0 &&
                h.length > 0 &&
                n.trigger(i, {
                  element: nr(t),
                  originalEvent: t,
                  category: de(r),
                  value: de(h),
                });
            }
          },
          pointPane: function (n) {
            for (var i, r = this.panes, t = 0; t < r.length; t++)
              if (((i = r[t]), i.contentBox.containsPoint(n))) return i;
          },
          updateAxisOptions: function (n, t) {
            pv(this.options, n, t);
            pv(this.originalOptions, n, t);
          },
        });
        f(ci, { categoryAxis: {}, valueAxis: {} });
        t(ci.prototype, be);
        ba = et.extend({
          init: function () {
            this._points = [];
          },
          destroy: function () {
            this._points = [];
          },
          show: function (n) {
            var i,
              t,
              r = this,
              u = [].concat(n);
            for (this.hide(), i = 0; i < u.length; i++)
              (t = u[i]),
                t &&
                  t.toggleHighlight &&
                  t.hasHighlight() &&
                  (r.togglePointHighlight(t, !0), r._points.push(t));
          },
          togglePointHighlight: function (n, t) {
            var i,
              r = (n.options.highlight || {}).toggle;
            r
              ? ((i = {
                  category: n.category,
                  series: n.series,
                  dataItem: n.dataItem,
                  value: n.value,
                  stackValue: n.stackValue,
                  preventDefault: uw,
                  visual: n.highlightVisual(),
                  show: t,
                }),
                r(i),
                i._defaultPrevented || n.toggleHighlight(t))
              : n.toggleHighlight(t);
          },
          hide: function () {
            for (var t = this, n = this._points; n.length; )
              t.togglePointHighlight(n.pop(), !1);
          },
          isHighlighted: function (n) {
            for (var i, r = this._points, t = 0; t < r.length; t++)
              if (((i = r[t]), n === i)) return !0;
            return !1;
          },
        });
        ph = et.extend({
          init: function (n, i) {
            this.plotArea = n;
            this.options = t({}, this.options, i);
          },
          start: function (n) {
            return (this._active = wv(n, this.options.key));
          },
          move: function (n) {
            if (this._active) {
              var t = (this.axisRanges = this._panAxes(n, a).concat(
                this._panAxes(n, l)
              ));
              if (t.length) return (this.axisRanges = t), rl(t);
            }
          },
          end: function () {
            var n = this._active;
            return (this._active = !1), n;
          },
          pan: function () {
            var n,
              t,
              u = this,
              i = u.plotArea,
              r = u.axisRanges;
            if (r.length) {
              for (n = 0; n < r.length; n++)
                (t = r[n]), i.updateAxisOptions(t.axis, t.range);
              i.redraw(i.panes);
            }
          },
          destroy: function () {
            delete this.plotArea;
          },
          _panAxes: function (n, t) {
            var f,
              r,
              i,
              u,
              s = this.plotArea,
              e = -n[t].delta,
              h = (this.options.lock || "").toLowerCase(),
              o = [];
            if (0 !== e && (h || "").toLowerCase() !== t)
              for (f = s.axes, r = 0; r < f.length; r++)
                (i = f[r]),
                  ((t === a && !i.options.vertical) ||
                    (t === l && i.options.vertical)) &&
                    ((u = i.pan(e)),
                    u && ((u.limitRange = !0), o.push({ axis: i, range: u })));
            return o;
          },
        });
        ph.prototype.options = { key: "none", lock: "none" };
        wh = et.extend({
          init: function (n, i) {
            this.chart = n;
            this.options = t({}, this.options, i);
            this.createElement();
          },
          createElement: function () {
            var n,
              t = (this._marquee = document.createElement("div"));
            t.className = "k-marquee";
            n = document.createElement("div");
            n.className = "k-marquee-color";
            t.appendChild(n);
          },
          removeElement: function () {
            this._marquee.parentNode &&
              this._marquee.parentNode.removeChild(this._marquee);
          },
          setStyles: function (n) {
            ft(this._marquee, n);
          },
          start: function (n) {
            var r, f, t, i, u;
            return (
              !!(
                wv(n, this.options.key) &&
                ((r = this.chart),
                (f = r._eventCoordinates(n)),
                (t = this._zoomPane = r._plotArea.paneByPoint(f)),
                (i = t ? t.chartsBox().clone() : null),
                t && i)
              ) &&
              ((u = this._elementOffset()),
              i.translate(u.left, u.top),
              (this._zoomPaneClipBox = i),
              document.body.appendChild(this._marquee),
              this.setStyles({
                left: n.pageX + 1,
                top: n.pageY + 1,
                width: 0,
                height: 0,
              }),
              !0)
            );
          },
          _elementOffset: function () {
            var n = this.chart.element,
              t = ft(n, ["paddingLeft", "paddingTop"]),
              u = t.paddingLeft,
              f = t.paddingTop,
              r = i.elementOffset(n);
            return { left: u + r.left, top: f + r.top };
          },
          move: function (n) {
            var t = this._zoomPane;
            t && this.setStyles(this._selectionPosition(n));
          },
          end: function (n) {
            var i,
              t,
              r,
              u,
              f = this._zoomPane;
            if (f)
              return (
                (i = this._elementOffset()),
                (t = this._selectionPosition(n)),
                (t.left -= i.left),
                (t.top -= i.top),
                (r = { x: t.left, y: t.top }),
                (u = { x: t.left + t.width, y: t.top + t.height }),
                this._updateAxisRanges(r, u),
                this.removeElement(),
                delete this._zoomPane,
                rl(this.axisRanges)
              );
          },
          zoom: function () {
            var n,
              t,
              r,
              i = this.axisRanges;
            if (i && i.length) {
              for (n = this.chart._plotArea, t = 0; t < i.length; t++)
                (r = i[t]), n.updateAxisOptions(r.axis, r.range);
              n.redraw(n.panes);
            }
          },
          destroy: function () {
            this.removeElement();
            delete this._marquee;
            delete this.chart;
          },
          _updateAxisRanges: function (n, t) {
            for (
              var r,
                u,
                f,
                e = (this.options.lock || "").toLowerCase(),
                o = [],
                s = this._zoomPane.axes,
                i = 0;
              i < s.length;
              i++
            )
              (r = s[i]),
                (u = r.options.vertical),
                (e === a && !u) ||
                  (e === l && u) ||
                  ((f = r.pointsRange(n, t)),
                  f && o.push({ axis: r, range: f }));
            this.axisRanges = o;
          },
          _selectionPosition: function (n) {
            var t = this._zoomPaneClipBox,
              i = { x: n.x.startLocation, y: n.y.startLocation },
              r = n.x.location,
              u = n.y.location,
              o = (this.options.lock || "").toLowerCase(),
              s = Math.min(i.x, r),
              h = Math.min(i.y, u),
              f = Math.abs(i.x - r),
              e = Math.abs(i.y - u);
            return (
              o === a && ((s = t.x1), (f = t.width())),
              o === l && ((h = t.y1), (e = t.height())),
              r > t.x2 && (f = t.x2 - i.x),
              r < t.x1 && (f = i.x - t.x1),
              u > t.y2 && (e = t.y2 - i.y),
              u < t.y1 && (e = i.y - t.y1),
              {
                left: Math.max(s, t.x1),
                top: Math.max(h, t.y1),
                width: f,
                height: e,
              }
            );
          },
        });
        wh.prototype.options = { key: "shift", lock: "none" };
        ka = et.extend({
          init: function (n, i) {
            this.chart = n;
            this.options = t({}, this.options, i);
          },
          updateRanges: function (n) {
            for (
              var i,
                r,
                u,
                e = (this.options.lock || "").toLowerCase(),
                f = [],
                o = this.chart._plotArea.axes,
                t = 0;
              t < o.length;
              t++
            )
              (i = o[t]),
                (r = i.options.vertical),
                (e === a && !r) ||
                  (e === l && r) ||
                  ((u = i.zoomRange(-n)), u && f.push({ axis: i, range: u }));
            return (this.axisRanges = f), rl(f);
          },
          zoom: function () {
            var n,
              t,
              r,
              i = this.axisRanges;
            if (i && i.length) {
              for (n = this.chart._plotArea, t = 0; t < i.length; t++)
                (r = i[t]), n.updateAxisOptions(r.axis, r.range);
              n.redraw(n.panes);
            }
          },
          destroy: function () {
            delete this.chart;
          },
        });
        da = r.extend({
          init: function (n, t) {
            r.fn.init.call(this, n);
            this.chartService = t;
          },
          render: function () {
            var n,
              r,
              u = this,
              f = u.children,
              t = u.options,
              i = t.vertical;
            for (
              this.visual = new ui.Layout(null, {
                spacing: i ? 0 : t.spacing,
                lineSpacing: i ? t.spacing : 0,
                orientation: i ? "vertical" : "horizontal",
                reverse: t.rtl,
                alignItems: i ? "start" : "center",
              }),
                n = 0;
              n < f.length;
              n++
            )
              (r = f[n]), r.reflow(new o()), r.renderVisual();
          },
          reflow: function (n) {
            this.visual.rect(n.toRect());
            this.visual.reflow();
            var t = this.visual.clippedBBox();
            this.box = t ? i.rectToBox(t) : new o();
          },
          renderVisual: function () {
            this.addVisual();
          },
          createVisual: function () {},
        });
        ga = li.extend({
          init: function (n) {
            li.fn.init.call(this, n);
            this.createContainer();
            n.rtl
              ? (this.createLabel(), this.createMarker())
              : (this.createMarker(), this.createLabel());
          },
          createContainer: function () {
            this.container = new i.FloatElement({
              vertical: !1,
              wrap: !1,
              align: h,
              spacing: this.options.spacing,
            });
            this.append(this.container);
          },
          createMarker: function () {
            this.container.append(new lf(this.markerOptions()));
          },
          markerOptions: function () {
            var n = this.options,
              i = n.markerColor;
            return t({}, n.markers, { background: i, border: { color: i } });
          },
          createLabel: function () {
            var n = this.options,
              i = t({}, n.labels);
            this.container.append(new cf(n.text, i));
          },
          renderComplete: function () {
            var n, t;
            li.fn.renderComplete.call(this);
            n = this.options.cursor || {};
            t = this._itemOverlay = v.fromRect(this.container.box.toRect(), {
              fill: { color: lt, opacity: 0 },
              stroke: null,
              cursor: n.style || n,
            });
            this.appendVisual(t);
          },
          click: function (n, t) {
            var i = this.eventArgs(t);
            !n.trigger(al, i) &&
              t &&
              "contextmenu" === t.type &&
              t.preventDefault();
          },
          over: function (n, t) {
            var i = this.eventArgs(t);
            return (
              n.trigger(vl, i) ||
                n._legendItemHover(i.seriesIndex, i.pointIndex),
              !0
            );
          },
          out: function (n, t) {
            n._unsetActivePoint();
            n.trigger(yl, this.eventArgs(t));
          },
          eventArgs: function (n) {
            var t = this.options;
            return {
              element: nr(n),
              text: t.text,
              series: t.series,
              seriesIndex: t.series.index,
              pointIndex: t.pointIndex,
            };
          },
          renderVisual: function () {
            var n = this,
              t = this.options,
              i = t.visual;
            i
              ? ((this.visual = i({
                  active: t.active,
                  series: t.series,
                  sender: this.getSender(),
                  pointIndex: t.pointIndex,
                  options: { markers: this.markerOptions(), labels: t.labels },
                  createVisual: function () {
                    n.createVisual();
                    n.renderChildren();
                    n.renderComplete();
                    var t = n.visual;
                    return delete n.visual, t;
                  },
                })),
                this.addVisual())
              : li.fn.renderVisual.call(this);
          },
        });
        nv = "horizontal";
        dy = "pointer";
        os = "custom";
        bh = r.extend({
          init: function (n, t) {
            void 0 === t && (t = {});
            r.fn.init.call(this, n);
            this.chartService = t;
            k(this.options.position, [ut, w, st, y, os]) ||
              (this.options.position = w);
            this.createContainer();
            this.createItems();
          },
          createContainer: function () {
            var n = this.options,
              i = n.position,
              t = n.align,
              u = i,
              r = h;
            i === os
              ? (u = y)
              : k(i, [ut, st])
              ? ((u = "start" === t ? y : "end" === t ? w : h), (r = i))
              : t && ("start" === t ? (r = ut) : "end" === t && (r = st));
            this.container = new li({
              margin: n.margin,
              padding: n.padding,
              background: n.background,
              border: n.border,
              vAlign: r,
              align: u,
              zIndex: n.zIndex,
              shrinkToFit: !0,
            });
            this.append(this.container);
          },
          createItems: function () {
            var e,
              i,
              o,
              u = this.getService(),
              n = this.options,
              s = this.isVertical(),
              f = new da({ vertical: s, spacing: n.spacing, rtl: u.rtl }, u),
              r = n.items;
            for (
              n.reverse && (r = r.slice(0).reverse()), e = r.length, i = 0;
              i < e;
              i++
            )
              (o = r[i]),
                f.append(
                  new ga(
                    t(
                      {},
                      { markers: n.markers, labels: n.labels, rtl: u.rtl },
                      n.item,
                      o
                    )
                  )
                );
            f.render();
            this.container.append(f);
          },
          isVertical: function () {
            var t = this.options,
              n = t.orientation,
              i = t.position;
            return (i === os && n !== nv) || (u(n) ? n !== nv : k(i, [y, w]));
          },
          hasItems: function () {
            return this.container.children[0].children.length > 0;
          },
          reflow: function (n) {
            var i = this.options,
              t = n.clone();
            return this.hasItems()
              ? void (i.position === os
                  ? (this.containerCustomReflow(t), (this.box = t))
                  : this.containerReflow(t))
              : void (this.box = t);
          },
          containerReflow: function (n) {
            var r,
              s = this,
              i = s.options,
              u = s.container,
              f = i.position,
              h = i.width,
              c = i.height,
              e = f === ut || f === st ? a : l,
              v = this.isVertical(),
              o = n.clone(),
              t = n.clone();
            (f !== y && f !== w) || (t.y1 = o.y1 = 0);
            v && c
              ? ((t.y2 = t.y1 + c), t.align(o, l, u.options.vAlign))
              : !v && h && ((t.x2 = t.x1 + h), t.align(o, a, u.options.align));
            u.reflow(t);
            t = u.box;
            r = t.clone();
            (i.offsetX || i.offsetY) &&
              (t.translate(i.offsetX, i.offsetY), this.container.reflow(t));
            r[e + 1] = n[e + 1];
            r[e + 2] = n[e + 2];
            this.box = r;
          },
          containerCustomReflow: function (n) {
            var u = this,
              i = u.options,
              r = u.container,
              f = i.offsetX,
              e = i.offsetY,
              s = i.width,
              h = i.height,
              c = this.isVertical(),
              t = n.clone();
            c && h ? (t.y2 = t.y1 + h) : !c && s && (t.x2 = t.x1 + s);
            r.reflow(t);
            t = r.box;
            r.reflow(new o(f, e, f + t.width(), e + t.height()));
          },
          renderVisual: function () {
            this.hasItems() && r.fn.renderVisual.call(this);
          },
        });
        f(bh, {
          position: w,
          items: [],
          offsetX: 0,
          offsetY: 0,
          margin: wt(5),
          padding: wt(5),
          border: { color: uu, width: 0 },
          item: { cursor: dy, spacing: 6 },
          spacing: 6,
          background: "",
          zIndex: 1,
          markers: {
            border: { width: 0 },
            width: 15,
            height: 3,
            type: "rect",
            align: y,
            vAlign: h,
          },
        });
        ri = et.extend({
          init: function () {
            this._registry = [];
          },
          register: function (n, t) {
            this._registry.push({ type: n, seriesTypes: t });
          },
          create: function (n, t, i) {
            for (
              var u, f, e = this._registry, o = e[0], r = 0;
              r < e.length;
              r++
            )
              if (((f = e[r]), (u = b(n, f.seriesTypes)), u.length > 0)) {
                o = f;
                break;
              }
            return new o.type(u, t, i);
          },
        });
        ri.current = new ri();
        gy = 3;
        np = 0.1;
        kh = et.extend({
          init: function (n, r, u, f) {
            var e = n.element;
            this.options = t({}, this.options, u);
            this.chart = n;
            this.observer = f;
            this.chartElement = e;
            this.categoryAxis = r;
            this._dateAxis = this.categoryAxis instanceof i.DateCategoryAxis;
            this.initOptions();
            this.options.visible &&
              (this.createElements(),
              this.set(
                this._index(this.options.from),
                this._index(this.options.to)
              ),
              this.bindEvents());
          },
          onPane: function (n) {
            return this.categoryAxis.pane === n;
          },
          createElements: function () {
            var t,
              i,
              r,
              u,
              e,
              o,
              f = this.options,
              n = (this.wrapper = bi("k-selector"));
            ft(n, {
              top: f.offset.top,
              left: f.offset.left,
              width: f.width,
              height: f.height,
              direction: "ltr",
            });
            t = this.selection = bi("k-selection");
            this.leftMask = bi("k-mask");
            this.rightMask = bi("k-mask");
            n.appendChild(this.leftMask);
            n.appendChild(this.rightMask);
            n.appendChild(t);
            t.appendChild(bi("k-selection-bg"));
            i = this.leftHandle = bi("k-handle k-left-handle");
            r = this.rightHandle = bi("k-handle k-right-handle");
            i.appendChild(bi());
            r.appendChild(bi());
            t.appendChild(i);
            t.appendChild(r);
            this.chartElement.appendChild(n);
            u = ft(t, ["borderLeftWidth", "borderRightWidth", "height"]);
            e = ft(i, "height").height;
            o = ft(r, "height").height;
            f.selection = {
              border: { left: u.borderLeftWidth, right: u.borderRightWidth },
            };
            ft(i, { top: (u.height - e) / 2 });
            ft(r, { top: (u.height - o) / 2 });
            n.style.cssText = n.style.cssText;
          },
          bindEvents: function () {
            if (this.options.mousewheel !== !1) {
              this._mousewheelHandler = this._mousewheel.bind(this);
              var n;
              pf(
                this.wrapper,
                ((n = {}), (n[ce] = this._mousewheelHandler), n)
              );
            }
            this._domEvents = ps.DomEventsBuilder.create(this.wrapper, {
              stopPropagation: !0,
              start: this._start.bind(this),
              move: this._move.bind(this),
              end: this._end.bind(this),
              tap: this._tap.bind(this),
              press: this._press.bind(this),
              gesturestart: this._gesturestart.bind(this),
              gesturechange: this._gesturechange.bind(this),
              gestureend: this._gestureend.bind(this),
            });
          },
          initOptions: function () {
            var u,
              f,
              e,
              o = this,
              n = o.options,
              s = o.categoryAxis,
              i = s.pane.chartsBox(),
              r = this.chart.chartService.intl;
            this._dateAxis &&
              t(n, {
                min: hr(r, n.min),
                max: hr(r, n.max),
                from: hr(r, n.from),
                to: hr(r, n.to),
              });
            u = ft(this.chartElement, ["paddingLeft", "paddingTop"]);
            f = u.paddingLeft;
            e = u.paddingTop;
            this.options = t(
              {},
              {
                width: i.width(),
                height: i.height() + np,
                padding: { left: f, top: e },
                offset: { left: i.x1 + f, top: i.y1 + e },
                from: n.min,
                to: n.max,
              },
              n
            );
          },
          destroy: function () {
            if (
              (this._domEvents &&
                (this._domEvents.destroy(), delete this._domEvents),
              clearTimeout(this._mwTimeout),
              (this._state = null),
              this.wrapper)
            ) {
              if (this._mousewheelHandler) {
                var n;
                wf(
                  this.wrapper,
                  ((n = {}), (n[ce] = this._mousewheelHandler), n)
                );
                this._mousewheelHandler = null;
              }
              this.chartElement.removeChild(this.wrapper);
              this.wrapper = null;
            }
          },
          _rangeEventArgs: function (n) {
            return {
              axis: this.categoryAxis.options,
              from: this._value(n.from),
              to: this._value(n.to),
            };
          },
          _start: function (n) {
            var r,
              t = this.options,
              i = nr(n);
            !this._state &&
              i &&
              (this.chart._unsetActivePoint(),
              (this._state = {
                moveTarget: bv(i) || i,
                startLocation: n.x ? n.x.location : 0,
                range: { from: this._index(t.from), to: this._index(t.to) },
              }),
              (r = this._rangeEventArgs({
                from: this._index(t.from),
                to: this._index(t.to),
              })),
              this.trigger(wo, r) && (this._state = null));
          },
          _press: function (n) {
            var t;
            t = this._state ? this._state.moveTarget : bv(nr(n));
            t && i.addClass(t, "k-handle-active");
          },
          _move: function (n) {
            var e, o, r, c, t, u, i, l, w, s, f, b, a, v, k, h, y, p;
            this._state &&
              ((e = this),
              (o = e._state),
              (r = e.options),
              (c = e.categoryAxis),
              (t = o.range),
              (u = o.moveTarget),
              (i = c.options.reverse),
              (l = this._index(r.from)),
              (w = this._index(r.to)),
              (s = this._index(r.min)),
              (f = this._index(r.max)),
              (b = o.startLocation - n.x.location),
              (a = { from: t.from, to: t.to }),
              (v = t.to - t.from),
              (k = ft(this.wrapper, "width").width / (c.categoriesCount() - 1)),
              (h = Math.round(b / k) * (i ? -1 : 1)),
              u &&
                ((y = fo(u, "k-left-handle")),
                (p = fo(u, "k-right-handle")),
                fo(u, "k-selection k-selection-bg")
                  ? ((t.from = Math.min(Math.max(s, l - h), f - v)),
                    (t.to = Math.min(t.from + v, f)))
                  : (y && !i) || (p && i)
                  ? ((t.from = Math.min(Math.max(s, l - h), f - 1)),
                    (t.to = Math.max(t.from + 1, t.to)))
                  : ((y && i) || (p && !i)) &&
                    ((t.to = Math.min(Math.max(s + 1, w - h), f)),
                    (t.from = Math.min(t.to - 1, t.from))),
                (t.from === a.from && t.to === a.to) ||
                  (this.move(t.from, t.to),
                  this.trigger(gu, this._rangeEventArgs(t)))));
          },
          _end: function () {
            var t, n;
            this._state &&
              ((t = this._state.moveTarget),
              t && i.removeClass(t, "k-handle-active"),
              (n = this._state.range),
              this.set(n.from, n.to),
              this.trigger(bo, this._rangeEventArgs(n)),
              delete this._state);
          },
          _tap: function (n) {
            var o = this,
              i = o.options,
              r = o.categoryAxis,
              c = this.chart._eventCoordinates(n),
              l = r.pointCategoryIndex(new e(c.x, r.box.y1)),
              u = this._index(i.from),
              a = this._index(i.to),
              v = this._index(i.min),
              s = this._index(i.max),
              f = a - u,
              y = u + f / 2,
              t = {},
              p = 3 === n.event.which,
              h = Math.round(y - l);
            this._state ||
              p ||
              (this.chart._unsetActivePoint(),
              r.options.justified || h--,
              (t.from = Math.min(Math.max(v, u - h), s - f)),
              (t.to = Math.min(t.from + f, s)),
              this._start(n),
              this._state &&
                ((this._state.range = t),
                this.trigger(gu, this._rangeEventArgs(t)),
                this._end()));
          },
          _mousewheel: function (n) {
            var r,
              u = this,
              t = i.mousewheelDelta(n);
            this._start({ target: this.selection });
            this._state &&
              ((r = this._state.range),
              n.preventDefault(),
              n.stopPropagation(),
              Math.abs(t) > 1 && (t *= gy),
              this.options.mousewheel.reverse && (t *= -1),
              this.expand(t) &&
                this.trigger(gu, {
                  axis: this.categoryAxis.options,
                  delta: t,
                  originalEvent: n,
                  from: this._value(r.from),
                  to: this._value(r.to),
                }),
              this._mwTimeout && clearTimeout(this._mwTimeout),
              (this._mwTimeout = setTimeout(function () {
                u._end();
              }, ko)));
          },
          _gesturestart: function (n) {
            var t,
              i = this.options;
            this._state = {
              range: { from: this._index(i.from), to: this._index(i.to) },
            };
            t = this._rangeEventArgs(this._state.range);
            this.trigger(wo, t) ? (this._state = null) : n.preventDefault();
          },
          _gestureend: function () {
            this._state &&
              (this.trigger(bo, this._rangeEventArgs(this._state.range)),
              delete this._state);
          },
          _gesturechange: function (n) {
            var i = this,
              r = i.chart,
              h = i._state,
              u = i.options,
              f = i.categoryAxis,
              t = h.range,
              o = r._toModelCoordinates(n.touches[0].x.location).x,
              s = r._toModelCoordinates(n.touches[1].x.location).x,
              c = Math.min(o, s),
              l = Math.max(o, s);
            n.preventDefault();
            t.from = f.pointCategoryIndex(new e(c)) || u.min;
            t.to = f.pointCategoryIndex(new e(l)) || u.max;
            this.move(t.from, t.to);
            this.trigger(gu, this._rangeEventArgs(t));
          },
          _index: function (n) {
            var t = n;
            return (
              n instanceof Date && (t = this.categoryAxis.categoryIndex(n)), t
            );
          },
          _value: function (n) {
            var t = n;
            return (
              this._dateAxis &&
                ((t = this.categoryAxis.categoryAt(n)),
                t > this.options.max && (t = this.options.max)),
              t
            );
          },
          _slot: function (n) {
            var i = this.categoryAxis,
              t = this._index(n);
            return i.getSlot(t, t, !0);
          },
          move: function (n, t) {
            var r,
              u,
              i = this.options,
              f = this.categoryAxis.options.reverse,
              s = i.offset,
              h = i.padding,
              c = i.selection.border,
              a = f ? t : n,
              v = f ? n : t,
              l = "x" + (f ? 2 : 1),
              e = this._slot(a),
              o = d(e[l] - s.left + h.left);
            ft(this.leftMask, { width: o });
            ft(this.selection, { left: o });
            e = this._slot(v);
            r = d(i.width - (e[l] - s.left + h.left));
            ft(this.rightMask, { width: r });
            u = i.width - r;
            u !== i.width && (u += c.right);
            ft(this.rightMask, { left: u });
            ft(this.selection, {
              width: Math.max(i.width - (o + r) - c.right, 0),
            });
          },
          set: function (n, t) {
            var i = this.options,
              e = this._index(i.min),
              u = this._index(i.max),
              r = ai(this._index(n), e, u),
              f = ai(this._index(t), r + 1, u);
            i.visible && this.move(r, f);
            i.from = this._value(r);
            i.to = this._value(f);
          },
          expand: function (n) {
            var r = this.options,
              e = this._index(r.min),
              u = this._index(r.max),
              o = r.mousewheel.zoom,
              s = this._index(r.from),
              f = this._index(r.to),
              i = { from: s, to: f },
              h = t({}, i);
            if (
              (this._state && (i = this._state.range),
              o !== w && (i.from = ai(ai(s - n, 0, f - 1), e, u)),
              o !== y && (i.to = ai(ai(f + n, i.from + 1, u), e, u)),
              i.from !== h.from || i.to !== h.to)
            )
              return this.set(i.from, i.to), !0;
          },
          trigger: function (n, t) {
            return (this.observer || this.chart).trigger(n, t);
          },
        });
        f(kh, { visible: !0, mousewheel: { zoom: "both" }, min: ot, max: rt });
        tv = ur.extend({
          show: function (n) {
            var r, i;
            n &&
              n.tooltipAnchor &&
              (!this._current || this._current !== n) &&
              ((r = t({}, this.options, n.options.tooltip)),
              (i = n.tooltipAnchor()),
              i
                ? ((this._current = n),
                  ur.fn.show.call(this, { point: n, anchor: i }, r, n))
                : this.hide());
          },
          hide: function () {
            delete this._current;
            ur.fn.hide.call(this);
          },
        });
        dh = ur.extend({
          init: function (n, t) {
            ur.fn.init.call(this, n.chartService, t);
            this.plotArea = n;
            this.formatService = n.chartService.format;
          },
          showAt: function (n, t) {
            var i,
              r,
              u,
              f = yf(n, function (n) {
                var t = n.series.tooltip,
                  i = t && t.visible === !1;
                return !i;
              });
            f.length > 0 &&
              ((i = f[0]),
              (r = this.plotArea.categoryAxis.getSlot(i.categoryIx)),
              (u = t ? this._slotAnchor(t, r) : this._defaultAnchor(i, r)),
              this.show(
                {
                  anchor: u,
                  shared: !0,
                  points: n,
                  category: i.category,
                  categoryText: this.formatService.auto(
                    this.options.categoryFormat,
                    i.category
                  ),
                  series: this.plotArea.series,
                },
                this.options
              ));
          },
          _slotAnchor: function (n, t) {
            var i = this.plotArea.categoryAxis;
            return (
              i.options.vertical || (n.x = t.center().x),
              { point: n, align: { horizontal: "left", vertical: "center" } }
            );
          },
          _defaultAnchor: function (n, t) {
            var i,
              f = n.owner.pane.chartsBox(),
              o = this.plotArea.categoryAxis.options.vertical,
              r = f.center(),
              u = t.center();
            return (
              (i = o ? new e(r.x, u.y) : new e(u.x, r.y)),
              { point: i, align: { horizontal: "center", vertical: "center" } }
            );
          },
        });
        f(dh, { categoryFormat: "{0:d}" });
        iv = cr.extend({
          setup: function () {
            var t,
              n,
              i = this,
              r = i.element,
              u = i.options,
              f = r.bbox();
            f
              ? ((this.origin = u.origin),
                (t = u.vertical ? l : a),
                (n = this.fromScale = new nt(1, 1)),
                (n[t] = ou),
                r.transform(eu().scale(n.x, n.y)))
              : this.abort();
          },
          step: function (n) {
            var t = i.interpolateValue(this.fromScale.x, 1, n),
              r = i.interpolateValue(this.fromScale.y, 1, n);
            this.element.transform(eu().scale(t, r, this.origin));
          },
          abort: function () {
            cr.fn.abort.call(this);
            this.element.transform(null);
          },
        });
        f(iv, { duration: vt });
        bf.current.register(ei, iv);
        rv = cr.extend({
          setup: function () {
            var n = (this.center = this.element.bbox().center());
            this.element.transform(eu().scale(ou, ou, n));
          },
          step: function (n) {
            this.element.transform(eu().scale(n, n, this.center));
          },
        });
        f(rv, { easing: "easeOutElastic" });
        bf.current.register(vr, rv);
        uv = cr.extend({
          setup: function () {
            this.fadeTo = this.element.opacity();
            this.element.opacity(0);
          },
          step: function (n) {
            this.element.opacity(n * this.fadeTo);
          },
        });
        f(uv, { duration: 200, easing: "linear" });
        bf.current.register(yi, uv);
        gh = cr.extend({
          setup: function () {
            this.element.transform(eu().scale(ou, ou, this.options.center));
          },
          step: function (n) {
            this.element.transform(eu().scale(n, n, this.options.center));
          },
        });
        f(gh, { easing: "easeOutElastic", duration: vt });
        bf.current.register(ir, gh);
        ss = kt.extend({
          render: function () {
            kt.fn.render.call(this);
            this.renderSegments();
          },
          createSegment: function (n, t, i) {
            var r,
              u = t.style;
            return new (r = u === ar ? ns : wi)(n, t, i);
          },
          animationPoints: function () {
            var n = kt.fn.animationPoints.call(this);
            return n.concat(this._segments);
          },
          createMissingValue: function (n, t) {
            if (t === fi) {
              var i = { x: n.x, y: n.y };
              return at(i.x) || (i.x = 0), at(i.y) || (i.y = 0), i;
            }
          },
        });
        t(ss.prototype, uh);
        hs = ht.extend({
          initFields: function () {
            this.namedXAxes = {};
            this.namedYAxes = {};
            this.xAxisRangeTracker = new ae();
            this.yAxisRangeTracker = new ae();
          },
          render: function (n) {
            var e,
              u,
              t,
              f,
              i,
              r = this;
            for (
              void 0 === n && (n = this.panes),
                e = this.groupSeriesByPane(),
                u = 0;
              u < n.length;
              u++
            )
              (t = n[u]),
                (f = e[t.options.name || "default"] || []),
                r.addToLegend(f),
                (i = r.filterVisibleSeries(f)),
                i &&
                  (r.createScatterChart(b(i, ao), t),
                  r.createScatterLineChart(b(i, vo), t),
                  r.createBubbleChart(b(i, vr), t));
            this.createAxes(n);
          },
          appendChart: function (n, t) {
            this.xAxisRangeTracker.update(n.xAxisRanges);
            this.yAxisRangeTracker.update(n.yAxisRanges);
            ht.fn.appendChart.call(this, n, t);
          },
          removeAxis: function (n) {
            var t = n.options.name;
            ht.fn.removeAxis.call(this, n);
            n.options.vertical
              ? (this.yAxisRangeTracker.reset(t), delete this.namedYAxes[t])
              : (this.xAxisRangeTracker.reset(t), delete this.namedXAxes[t]);
            n === this.axisX && delete this.axisX;
            n === this.axisY && delete this.axisY;
          },
          seriesPaneName: function (n) {
            var t = this.options,
              i = n.xAxis,
              r = [].concat(t.xAxis),
              u = yf(r, function (n) {
                return n.name === i;
              })[0],
              f = n.yAxis,
              e = [].concat(t.yAxis),
              o = yf(e, function (n) {
                return n.name === f;
              })[0],
              s = t.panes || [{}],
              h = s[0].name || "default";
            return (u || {}).pane || (o || {}).pane || h;
          },
          createScatterChart: function (n, t) {
            n.length > 0 &&
              this.appendChart(
                new kt(this, { series: n, clip: t.options.clip }),
                t
              );
          },
          createScatterLineChart: function (n, t) {
            n.length > 0 &&
              this.appendChart(
                new ss(this, { series: n, clip: t.options.clip }),
                t
              );
          },
          createBubbleChart: function (n, t) {
            n.length > 0 &&
              this.appendChart(
                new eh(this, { series: n, clip: t.options.clip }),
                t
              );
          },
          createXYAxis: function (n, r, u) {
            for (
              var a,
                v,
                w,
                b,
                c,
                k,
                o,
                s = n.name,
                d = r ? this.namedYAxes : this.namedXAxes,
                g = r ? this.yAxisRangeTracker : this.xAxisRangeTracker,
                f = t({ reverse: !r && this.chartService.rtl }, n, {
                  vertical: r,
                }),
                nt = or(f.type, se),
                l = g.query(),
                it = nt ? { min: 0.1, max: 1 } : { min: 0, max: 1 },
                e = g.query(s) || l || it,
                y = [f.min, f.max],
                tt = this.series,
                h = 0;
              h < tt.length;
              h++
            )
              if (
                ((a = tt[h]),
                (v = a[r ? "yAxis" : "xAxis"]),
                v === f.name || (0 === u && !v))
              ) {
                w = p.current.bindPoint(a, 0).valueFields;
                y.push(w[r ? "y" : "x"]);
                break;
              }
            for (
              0 === u &&
                l &&
                ((e.min = Math.min(e.min, l.min)),
                (e.max = Math.max(e.max, l.max))),
                c = 0;
              c < y.length;
              c++
            )
              if (y[c] instanceof Date) {
                b = !0;
                break;
              }
            if (
              ((k =
                or(f.type, sf) || (!f.type && b)
                  ? i.DateValueAxis
                  : nt
                  ? i.LogarithmicAxis
                  : i.NumericAxis),
              (o = new k(e.min, e.max, f, this.chartService)),
              (o.axisIndex = u),
              s)
            ) {
              if (d[s])
                throw Error(
                  (r ? "Y" : "X") +
                    " axis with name " +
                    s +
                    " is already defined"
                );
              d[s] = o;
            }
            return this.appendAxis(o), o;
          },
          createAxes: function (n) {
            for (
              var e,
                i,
                o,
                r = this,
                s = this.options,
                u = [].concat(s.xAxis),
                h = [],
                f = [].concat(s.yAxis),
                c = [],
                t = 0;
              t < u.length;
              t++
            )
              (e = r.findPane(u[t].pane)),
                k(e, n) && h.push(r.createXYAxis(u[t], !1, t));
            for (i = 0; i < f.length; i++)
              (o = r.findPane(f[i].pane)),
                k(o, n) && c.push(r.createXYAxis(f[i], !0, i));
            this.axisX = this.axisX || h[0];
            this.axisY = this.axisY || c[0];
          },
          _dispatchEvent: function (n, t, i) {
            for (
              var u,
                h,
                f,
                c = n._eventCoordinates(t),
                a = new e(c.x, c.y),
                l = this.axes,
                v = l.length,
                o = [],
                s = [],
                r = 0;
              r < v;
              r++
            )
              (u = l[r]),
                (h = u.options.vertical ? s : o),
                (f = u.getValue(a)),
                null !== f && h.push(f);
            o.length > 0 &&
              s.length > 0 &&
              n.trigger(i, {
                element: nr(t),
                originalEvent: t,
                x: de(o),
                y: de(s),
              });
          },
          updateAxisOptions: function (n, t) {
            var i = n.options.vertical,
              r = this.groupAxes(this.panes),
              u = (i ? r.y : r.x).indexOf(n);
            kv(this.options, u, i, t);
            kv(this.originalOptions, u, i, t);
          },
        });
        f(hs, { xAxis: {}, yAxis: {} });
        t(hs.prototype, be);
        ff = r.extend({
          init: function (n, t, i) {
            r.fn.init.call(this, i);
            this.value = n;
            this.sector = t;
          },
          render: function () {
            var r,
              u,
              e,
              f,
              n = this.options.labels,
              o = this.owner.chartService,
              i = this.value;
            this._rendered ||
              this.visible === !1 ||
              ((this._rendered = !0),
              (r = gt(n)),
              (u = this.pointData()),
              r ? (i = r(u)) : n.format && (i = o.format.auto(n.format, i)),
              n.visible &&
                (i || 0 === i) &&
                (n.position === h || n.position === he
                  ? (n.color ||
                      ((e = new tr(this.options.color).percBrightness()),
                      (n.color = e > 180 ? uu : lt)),
                    n.background || (n.background = this.options.color))
                  : ((f = o.theme.seriesDefaults.labels),
                    (n.color = n.color || f.color),
                    (n.background = n.background || f.background)),
                (this.label = new cf(
                  i,
                  t({}, n, {
                    align: h,
                    vAlign: "",
                    animation: { type: yi, delay: this.animationDelay },
                  }),
                  u
                )),
                this.append(this.label)));
          },
          reflow: function (n) {
            this.render();
            this.box = n;
            this.reflowLabel();
          },
          reflowLabel: function () {
            var r,
              u,
              n,
              f,
              c = this,
              e = c.options.labels,
              i = c.label,
              t = this.sector.clone(),
              l = e.distance,
              s = t.middle();
            i &&
              ((r = i.box.height()),
              (u = i.box.width()),
              e.position === h
                ? ((t.radius = Math.abs((t.radius - r) / 2) + r),
                  (n = t.point(s)),
                  i.reflow(new o(n.x, n.y - r / 2, n.x, n.y)))
                : e.position === he
                ? ((t.radius = t.radius - r / 2),
                  (n = t.point(s)),
                  i.reflow(new o(n.x, n.y - r / 2, n.x, n.y)))
                : ((n = t.clone().expand(l).point(s)),
                  n.x >= t.center.x
                    ? ((f = n.x + u), (i.orientation = w))
                    : ((f = n.x - u), (i.orientation = y)),
                  i.reflow(new o(f, n.y - r, n.x, n.y))));
          },
          createVisual: function () {
            var t,
              i,
              e = this,
              f = this,
              n = f.sector,
              u = f.options;
            r.fn.createVisual.call(this);
            this.value &&
              (u.visual
                ? ((t = (n.startAngle + 180) % 360),
                  (i = u.visual({
                    category: this.category,
                    dataItem: this.dataItem,
                    value: this.value,
                    series: this.series,
                    percentage: this.percentage,
                    center: new nt(n.center.x, n.center.y),
                    radius: n.radius,
                    innerRadius: n.innerRadius,
                    startAngle: t,
                    endAngle: t + n.angle,
                    options: u,
                    sender: this.getSender(),
                    createVisual: function () {
                      var n = new lr();
                      return e.createSegmentVisual(n), n;
                    },
                  })),
                  i && this.visual.append(i))
                : this.createSegmentVisual(this.visual));
          },
          createSegmentVisual: function (n) {
            var f = this,
              r = f.sector,
              i = f.options,
              u = i.border || {},
              h =
                u.width > 0
                  ? {
                      stroke: {
                        color: u.color,
                        width: u.width,
                        opacity: u.opacity,
                        dashType: u.dashType,
                      },
                    }
                  : {},
              e = i.color,
              o = { color: e, opacity: i.opacity },
              s = this.createSegment(
                r,
                t(
                  { fill: o, stroke: { opacity: i.opacity }, zIndex: i.zIndex },
                  h
                )
              );
            n.append(s);
            vs(i) &&
              n.append(
                this.createGradientOverlay(
                  s,
                  { baseColor: e, fallbackFill: o },
                  t(
                    {
                      center: [r.center.x, r.center.y],
                      innerRadius: r.innerRadius,
                      radius: r.radius,
                      userSpace: !0,
                    },
                    i.overlay
                  )
                )
              );
          },
          createSegment: function (n, t) {
            return t.singleSegment
              ? new ui.Circle(
                  new vi.Circle(new nt(n.center.x, n.center.y), n.radius),
                  t
                )
              : i.ShapeBuilder.current.createRing(n, t);
          },
          createAnimation: function () {
            var n = this,
              u = n.options,
              i = n.sector.center;
            t(u, {
              animation: { center: [i.x, i.y], delay: this.animationDelay },
            });
            r.fn.createAnimation.call(this);
          },
          createHighlight: function (n) {
            var i = this.options.highlight || {},
              r = i.border || {};
            return this.createSegment(
              this.sector,
              t({}, n, {
                fill: { color: i.color, opacity: i.opacity },
                stroke: { opacity: r.opacity, width: r.width, color: r.color },
              })
            );
          },
          highlightVisual: function () {
            return this.visual.children[0];
          },
          highlightVisualArgs: function () {
            var n = this.sector;
            return {
              options: this.options,
              radius: n.radius,
              innerRadius: n.innerRadius,
              center: new nt(n.center.x, n.center.y),
              startAngle: n.startAngle,
              endAngle: n.angle + n.startAngle,
              visual: this.visual,
            };
          },
          tooltipAnchor: function () {
            var n = this.sector.clone().expand(ni),
              t = n.middle(),
              i = n.point(t);
            return { point: i, align: fw(t + 180) };
          },
          formatValue: function (n) {
            return this.owner.formatPointValue(this, n);
          },
          pointData: function () {
            return {
              dataItem: this.dataItem,
              category: this.category,
              value: this.value,
              series: this.series,
              percentage: this.percentage,
            };
          },
        });
        tp = d(i.rad(30), no);
        ip = d(i.rad(60), no);
        f(ff, {
          color: lt,
          overlay: { gradient: "roundedBevel" },
          border: { width: 0.5 },
          labels: {
            visible: !1,
            distance: 35,
            font: s.DEFAULT_FONT,
            margin: wt(0.5),
            align: sr,
            zIndex: 1,
            position: rr,
          },
          animation: { type: ir },
          highlight: { visible: !0, border: { width: 1 } },
          visible: !0,
        });
        t(ff.prototype, ii);
        nc = {
          createLegendItem: function (n, t, i) {
            var u,
              f,
              r,
              e,
              o,
              h = this.options.legend || {},
              c = h.labels || {},
              l = h.inactiveItems || {},
              s = l.labels || {};
            i &&
              i.visibleInLegend !== !1 &&
              ((u = i.visible !== !1),
              (f = u ? gt(c) : gt(s) || gt(c)),
              (r = i.category),
              f &&
                (r = f({
                  text: r,
                  series: i.series,
                  dataItem: i.dataItem,
                  percentage: i.percentage,
                  value: n,
                })),
              u
                ? ((e = {}), (o = t.color))
                : ((e = { color: s.color, font: s.font }),
                  (o = (l.markers || {}).color)),
              at(r) &&
                "" !== r &&
                this.legendItems.push({
                  active: u,
                  pointIndex: i.index,
                  text: r,
                  series: i.series,
                  markerColor: o,
                  labels: e,
                }));
          },
        };
        rp = 70;
        ef = r.extend({
          init: function (n, t) {
            r.fn.init.call(this, t);
            this.plotArea = n;
            this.chartService = n.chartService;
            this.points = [];
            this.legendItems = [];
            this.render();
          },
          render: function () {
            this.traverseDataPoints(this.addValue.bind(this));
          },
          traverseDataPoints: function (n) {
            var it,
              p,
              s,
              r,
              t,
              w,
              c,
              l,
              b,
              rt,
              k,
              d,
              a,
              f,
              e,
              o,
              v,
              g,
              nt,
              ut,
              ft = this,
              et = this,
              ot = et.options,
              y = et.plotArea.options.seriesColors;
            for (
              void 0 === y && (y = []),
                it = y.length,
                p = ot.series,
                s = p.length,
                r = 0;
              r < s;
              r++
            )
              for (
                t = p[r],
                  w = t.data,
                  c = bc(t),
                  l = c.total,
                  b = c.points,
                  rt = c.count,
                  k = 360 / l,
                  d = void 0,
                  isFinite(k) || (d = 360 / rt),
                  a = void 0,
                  a = u(t.startAngle) ? t.startAngle : ot.startAngle,
                  r !== s - 1 &&
                    t.labels.position === rr &&
                    (t.labels.position = h),
                  f = 0;
                f < b.length;
                f++
              )
                (e = b[f]),
                  e &&
                    ((o = e.fields),
                    (v = e.value),
                    (g = e.visible),
                    (nt = 0 !== v ? d || v * k : 0),
                    (ut = 1 !== w.length && !!o.explode),
                    tt(t.color) || (t.color = o.color || y[f % it]),
                    n(e.valueFields.value, new i.Ring(null, 0, 0, a, nt), {
                      owner: ft,
                      category: u(o.category) ? o.category : "",
                      index: f,
                      series: t,
                      seriesIx: r,
                      dataItem: w[f],
                      percentage: 0 !== l ? v / l : 0,
                      explode: ut,
                      visibleInLegend: o.visibleInLegend,
                      visible: g,
                      zIndex: s - r,
                      animationDelay: ft.animationDelay(f, r, s),
                    }),
                    g !== !1 && (a += nt));
          },
          evalSegmentOptions: function (n, t, i) {
            var r = i.series;
            er(
              n,
              {
                value: t,
                series: r,
                dataItem: i.dataItem,
                category: i.category,
                percentage: i.percentage,
              },
              {
                defaults: r._defaults,
                excluded: ["data", "content", "template", "visual", "toggle"],
              }
            );
          },
          addValue: function (i, r, u) {
            var f,
              e = t({}, u.series, { index: u.index });
            this.evalSegmentOptions(e, i, u);
            this.createLegendItem(i, e, u);
            u.visible !== !1 &&
              ((f = new ff(i, r, e)),
              n.extend(f, u),
              this.append(f),
              this.points.push(f));
          },
          reflow: function (n) {
            var ut,
              i,
              k,
              f,
              a,
              ft,
              r,
              d,
              nt,
              tt,
              c,
              l,
              u,
              v,
              et,
              y,
              s,
              t,
              p,
              it,
              h,
              rt = this,
              ot = rt.options,
              st = rt.points,
              b = rt.seriesConfigs;
            for (
              void 0 === b && (b = []),
                ut = st.length,
                i = n.clone(),
                k = 5,
                f = Math.min(i.width(), i.height()),
                a = f / 2,
                ft = f - 0.85 * f,
                r = new o(i.x1, i.y1, i.x1 + f, i.y1 + f),
                d = r.center(),
                nt = i.center(),
                tt = ot.series.length,
                c = [],
                l = [],
                u = g(ot.padding, ft),
                u = u > a - k ? a - k : u,
                r.translate(nt.x - d.x, nt.y - d.y),
                v = a - u,
                et = new e(v + r.x1 + u, v + r.y1 + u),
                y = 0;
              y < ut;
              y++
            )
              (s = st[y]),
                (t = s.sector),
                (p = s.seriesIx),
                (t.radius = v),
                (t.center = et),
                b.length &&
                  ((it = b[p]),
                  (t.innerRadius = it.innerRadius),
                  (t.radius = it.radius)),
                p === tt - 1 &&
                  s.explode &&
                  (t.center = t
                    .clone()
                    .setRadius(0.15 * t.radius)
                    .point(t.middle())),
                s.reflow(r),
                (h = s.label),
                h &&
                  h.options.position === rr &&
                  p === tt - 1 &&
                  (h.orientation === w ? l.push(h) : c.push(h));
            c.length > 0 &&
              (c.sort(this.labelComparator(!0)), this.leftLabelsReflow(c));
            l.length > 0 &&
              (l.sort(this.labelComparator(!1)), this.rightLabelsReflow(l));
            this.box = r;
          },
          leftLabelsReflow: function (n) {
            var t = this.distanceBetweenLabels(n);
            this.distributeLabels(t, n);
          },
          rightLabelsReflow: function (n) {
            var t = this.distanceBetweenLabels(n);
            this.distributeLabels(t, n);
          },
          distanceBetweenLabels: function (n) {
            var t,
              o,
              s = gi(this.points),
              f = s.sector,
              e = n.length - 1,
              h = f.radius + s.options.labels.distance,
              u = [],
              i = n[0].box,
              r = d(i.y1 - (f.center.y - h - i.height() - i.height() / 2));
            for (u.push(r), t = 0; t < e; t++)
              (o = n[t + 1].box),
                (i = n[t].box),
                (r = d(o.y1 - i.y2)),
                u.push(r);
            return (
              (r = d(f.center.y + h - n[e].box.y2 - n[e].box.height() / 2)),
              u.push(r),
              u
            );
          },
          distributeLabels: function (n, t) {
            for (var u, f, r, e = this, o = n.length, i = 0; i < o; i++)
              for (r = -n[i], u = f = i; r > 0 && (u >= 0 || f < o); )
                (r = e._takeDistance(n, i, --u, r)),
                  (r = e._takeDistance(n, i, ++f, r));
            this.reflowLabels(n, t);
          },
          _takeDistance: function (n, t, i, r) {
            var u,
              f = r;
            return (
              n[i] > 0 &&
                ((u = Math.min(n[i], f)), (f -= u), (n[i] -= u), (n[t] += u)),
              f
            );
          },
          reflowLabels: function (n, t) {
            var r,
              s,
              f,
              e,
              a = this,
              l = gi(this.points),
              u = l.sector,
              c = l.options.labels,
              v = t.length,
              h = c.distance,
              i = u.center.y - (u.radius + h) - t[0].box.height();
            for (n[0] += 2, s = 0; s < v; s++)
              (f = t[s]),
                (e = f.box),
                (i += n[s]),
                (r = a.hAlignLabel(
                  e.x2,
                  u.clone().expand(h),
                  i,
                  i + e.height(),
                  f.orientation === w
                )),
                f.orientation === w
                  ? (c.align !== sr && (r = u.radius + u.center.x + h),
                    f.reflow(new o(r + e.width(), i, r, i)))
                  : (c.align !== sr && (r = u.center.x - u.radius - h),
                    f.reflow(new o(r - e.width(), i, r, i))),
                (i += e.height());
          },
          createVisual: function () {
            var p,
              c,
              t,
              a,
              k,
              g,
              i,
              l,
              d,
              f,
              o,
              s,
              u,
              n,
              b = this,
              nt = this,
              y = nt.options.connectors,
              tt = nt.points,
              it = tt.length,
              h = 4;
            for (
              r.fn.createVisual.call(this), this._connectorLines = [], p = 0;
              p < it;
              p++
            )
              (c = tt[p]),
                (t = c.sector),
                (a = c.label),
                (k = t.middle()),
                (g = (c.options.connectors || {}).color || y.color),
                a &&
                  ((i = new v({
                    stroke: { color: g, width: y.width },
                    animation: { type: yi, delay: c.animationDelay },
                  })),
                  a.options.position === rr &&
                    ((l = a.box),
                    (d = t.center),
                    (f = t.point(k)),
                    (o = new e(l.x1, l.center().y)),
                    (s = void 0),
                    (u = void 0),
                    (n = void 0),
                    (f = t.clone().expand(y.padding).point(k)),
                    i.moveTo(f.x, f.y),
                    a.orientation === w
                      ? ((u = new e(l.x1 - y.padding, l.center().y)),
                        (n = dv(d, f, o, u)),
                        (o = new e(u.x - h, u.y)),
                        (n = n || o),
                        (n.x = Math.min(n.x, o.x)),
                        b.pointInCircle(n, t.center, t.radius + h) ||
                        n.x < t.center.x
                          ? ((s = t.center.x + t.radius + h),
                            c.options.labels.align !== pi
                              ? s < o.x
                                ? i.lineTo(s, f.y)
                                : i.lineTo(f.x + 2 * h, f.y)
                              : i.lineTo(s, f.y),
                            i.lineTo(o.x, u.y))
                          : ((n.y = u.y), i.lineTo(n.x, n.y)))
                      : ((u = new e(l.x2 + y.padding, l.center().y)),
                        (n = dv(d, f, o, u)),
                        (o = new e(u.x + h, u.y)),
                        (n = n || o),
                        (n.x = Math.max(n.x, o.x)),
                        b.pointInCircle(n, t.center, t.radius + h) ||
                        n.x > t.center.x
                          ? ((s = t.center.x - t.radius - h),
                            c.options.labels.align !== pi
                              ? s > o.x
                                ? i.lineTo(s, f.y)
                                : i.lineTo(f.x - 2 * h, f.y)
                              : i.lineTo(s, f.y),
                            i.lineTo(o.x, u.y))
                          : ((n.y = u.y), i.lineTo(n.x, n.y))),
                    i.lineTo(u.x, u.y),
                    b._connectorLines.push(i),
                    b.visual.append(i)));
          },
          labelComparator: function (n) {
            var t = n ? -1 : 1;
            return function (n, i) {
              var r = (n.parent.sector.middle() + 270) % 360,
                u = (i.parent.sector.middle() + 270) % 360;
              return (r - u) * t;
            };
          },
          hAlignLabel: function (n, t, i, r, u) {
            var f = t.radius,
              o = t.center,
              h = o.x,
              s = o.y,
              e = Math.min(Math.abs(s - i), Math.abs(s - r));
            return e > f ? n : h + Math.sqrt(f * f - e * e) * (u ? 1 : -1);
          },
          pointInCircle: function (n, t, i) {
            return (
              Math.pow(t.x - n.x, 2) + Math.pow(t.y - n.y, 2) < Math.pow(i, 2)
            );
          },
          formatPointValue: function (n, t) {
            return this.chartService.format.auto(t, n.value);
          },
          animationDelay: function (n) {
            return n * rp;
          },
        });
        f(ef, {
          startAngle: 90,
          connectors: { width: 2, color: "#939393", padding: 8 },
          inactiveItems: { markers: {}, labels: {} },
        });
        t(ef.prototype, nc);
        tc = ht.extend({
          render: function () {
            this.createPieChart(this.series);
          },
          createPieChart: function (n) {
            var t = n[0],
              i = new ef(this, {
                series: n,
                padding: t.padding,
                startAngle: t.startAngle,
                connectors: t.connectors,
                legend: this.options.legend,
              });
            this.appendChart(i);
          },
          appendChart: function (n, t) {
            ht.fn.appendChart.call(this, n, t);
            af(this.options.legend.items, n.legendItems);
          },
        });
        of = ff.extend({
          reflowLabel: function () {
            var r,
              n,
              u = this,
              f = u.options.labels,
              i = u.label,
              t = this.sector.clone(),
              e = t.middle();
            i &&
              ((r = i.box.height()),
              f.position === h
                ? ((t.radius -= (t.radius - t.innerRadius) / 2),
                  (n = t.point(e)),
                  i.reflow(new o(n.x, n.y - r / 2, n.x, n.y)))
                : ff.fn.reflowLabel.call(this));
          },
          createSegment: function (n, t) {
            return i.ShapeBuilder.current.createRing(n, t);
          },
        });
        f(of, {
          overlay: { gradient: "roundedGlass" },
          labels: { position: h },
          animation: { type: ir },
        });
        t(of.prototype, ii);
        up = 50;
        ic = ef.extend({
          addValue: function (i, r, u) {
            var f,
              e = t({}, u.series, { index: u.index });
            this.evalSegmentOptions(e, i, u);
            this.createLegendItem(i, e, u);
            i &&
              u.visible !== !1 &&
              ((f = new of(i, r, e)),
              n.extend(f, u),
              this.append(f),
              this.points.push(f));
          },
          reflow: function (n) {
            var i,
              l,
              f,
              r,
              t,
              b,
              e,
              a,
              k,
              v,
              s,
              y,
              it = this,
              d = this.options,
              nt = n.clone(),
              tt = 5,
              p = Math.min(nt.width(), nt.height()),
              h = p / 2,
              rt = p - 0.85 * p,
              w = d.series,
              c = w.length,
              o = g(d.padding, rt);
            for (
              o = o > h - tt ? h - tt : o, i = h - o, l = 0, r = 0;
              r < c;
              r++
            )
              (t = w[r]),
                0 === r &&
                  u(t.holeSize) &&
                  ((f = t.holeSize), (i -= t.holeSize)),
                u(t.size) ? (i -= t.size) : l++,
                u(t.margin) && r !== c - 1 && (i -= t.margin);
            for (
              u(f) || ((b = (h - o) / (c + 0.75)), (f = 0.75 * b), (i -= f)),
                e = f,
                a = 0,
                this.seriesConfigs = [],
                s = 0;
              s < c;
              s++
            )
              (y = w[s]),
                (k = g(y.size, i / l)),
                (e += a),
                (v = e + k),
                it.seriesConfigs.push({ innerRadius: e, radius: v }),
                (a = y.margin || 0),
                (e = v);
            ef.fn.reflow.call(this, n);
          },
          animationDelay: function (n, t, i) {
            return n * up + (vt * (t + 1)) / (i + 1);
          },
        });
        f(ic, {
          startAngle: 90,
          connectors: { width: 2, color: "#939393", padding: 8 },
        });
        fv = tc.extend({
          render: function () {
            this.createDonutChart(this.series);
          },
          createDonutChart: function (n) {
            var t = n[0],
              i = new ic(this, {
                series: n,
                padding: t.padding,
                connectors: t.connectors,
                legend: this.options.legend,
              });
            this.appendChart(i);
          },
        });
        fp = 0.15;
        rc = ht.extend({
          initFields: function () {
            this.valueAxisRangeTracker = new ae();
          },
          render: function () {
            this.addToLegend(this.series);
            this.createPolarAxis();
            this.createCharts();
            this.createValueAxis();
          },
          alignAxes: function () {
            var n = this.valueAxis,
              t = n.range(),
              u = n.options.reverse ? t.max : t.min,
              i = n.getSlot(u),
              r = this.polarAxis.getSlot(0).center,
              f = n.box.translate(r.x - i.x1, r.y - i.y1);
            n.reflow(f);
          },
          createValueAxis: function () {
            var r,
              u,
              n,
              f,
              e = this.valueAxisRangeTracker,
              t = e.query(),
              o = this.valueAxisOptions({ roundToMajorUnit: !1, zIndex: -1 });
            o.type === se
              ? ((r = i.RadarLogarithmicAxis), (u = { min: 0.1, max: 1 }))
              : ((r = i.RadarNumericAxis), (u = { min: 0, max: 1 }));
            n = e.query(name) || t || u;
            n &&
              t &&
              ((n.min = Math.min(n.min, t.min)),
              (n.max = Math.max(n.max, t.max)));
            f = new r(n.min, n.max, o, this.chartService);
            this.valueAxis = f;
            this.appendAxis(f);
          },
          reflowAxes: function () {
            var u,
              f,
              i = this,
              o = i.options.plotArea,
              t = i.valueAxis,
              s = i.polarAxis,
              r = i.box,
              c = Math.min(r.width(), r.height()) * fp,
              a = wt(o.padding || {}, c),
              e = r.clone().unpad(a),
              n = e.clone();
            n.y2 = n.y1 + Math.min(n.width(), n.height());
            n.align(e, l, h);
            u = n.clone().shrink(0, n.height() / 2);
            s.reflow(n);
            t.reflow(u);
            f = t.lineBox().height() - t.box.height();
            t.reflow(t.box.unpad({ top: f }));
            this.axisBox = n;
            this.alignAxes(n);
          },
          backgroundBox: function () {
            return this.box;
          },
          detachLabels: function () {},
        });
        uc = kt.extend({
          pointSlot: function (n, t) {
            var r = n.center.y - t.y1,
              i = e.onCircle(n.center, n.startAngle, r);
            return new o(i.x, i.y, i.x, i.y);
          },
        });
        f(uc, { clip: !1 });
        cs = ss.extend({});
        cs.prototype.pointSlot = uc.prototype.pointSlot;
        f(cs, { clip: !1 });
        ep = rs.extend({
          fillToAxes: function (n) {
            var t = this._polarAxisCenter();
            n.lineTo(t.x, t.y);
          },
          _polarAxisCenter: function () {
            var n = this.parent.plotArea.polarAxis;
            return n.box.center();
          },
          strokeSegments: function () {
            var i,
              r,
              t,
              n = this._strokeSegments;
            return (
              n ||
                ((i = this._polarAxisCenter()),
                (r = new ro(!1)),
                (t = this.points()),
                t.push(i),
                (n = this._strokeSegments = r.process(t)),
                n.pop()),
              n
            );
          },
        });
        op = tu.extend({
          fillToAxes: function (n) {
            var r = this.parent.plotArea.polarAxis,
              t = r.box.center(),
              i = new vi.Segment([t.x, t.y]);
            n.segments.unshift(i);
            n.segments.push(i);
          },
        });
        sp = cs.extend({
          createSegment: function (n, t, i) {
            var r = (t.line || {}).style;
            return r === ar ? new ep(n, t, i) : new op(n, t, i);
          },
          createMissingValue: function (n, t) {
            var i;
            return (
              at(n.x) &&
                t !== su &&
                ((i = { x: n.x, y: n.y }), t === fi && (i.y = 0)),
              i
            );
          },
          seriesMissingValues: function (n) {
            return n.missingValues || fi;
          },
          _hasMissingValuesGap: function () {
            for (
              var i = this, t = this.options.series, n = 0;
              n < t.length;
              n++
            )
              if (i.seriesMissingValues(t[n]) === ds) return !0;
          },
          sortPoints: function (n) {
            var t,
              i,
              r,
              u = this;
            if ((n.sort(ew), this._hasMissingValuesGap()))
              for (t = 0; t < n.length; t++)
                (i = n[t]),
                  i &&
                    ((r = i.value),
                    at(r.y) ||
                      u.seriesMissingValues(i.series) !== ds ||
                      delete n[t]);
            return n;
          },
        });
        fc = rc.extend({
          createPolarAxis: function () {
            var n = new i.PolarAxis(this.options.xAxis, this.chartService);
            this.polarAxis = n;
            this.axisX = n;
            this.appendAxis(n);
          },
          valueAxisOptions: function (n) {
            return t(
              n,
              { majorGridLines: { type: to }, minorGridLines: { type: to } },
              this.options.yAxis
            );
          },
          createValueAxis: function () {
            rc.fn.createValueAxis.call(this);
            this.axisY = this.valueAxis;
          },
          appendChart: function (n, t) {
            this.valueAxisRangeTracker.update(n.yAxisRanges);
            ht.prototype.appendChart.call(this, n, t);
          },
          createCharts: function () {
            var n = this.filterVisibleSeries(this.series),
              t = this.panes[0];
            this.createLineChart(b(n, [co]), t);
            this.createScatterChart(b(n, [lo]), t);
            this.createAreaChart(b(n, [ho]), t);
          },
          createLineChart: function (n, t) {
            if (0 !== n.length) {
              var i = new cs(this, { series: n });
              this.appendChart(i, t);
            }
          },
          createScatterChart: function (n, t) {
            if (0 !== n.length) {
              var i = new uc(this, { series: n });
              this.appendChart(i, t);
            }
          },
          createAreaChart: function (n, t) {
            if (0 !== n.length) {
              var i = new sp(this, { series: n });
              this.appendChart(i, t);
            }
          },
          _dispatchEvent: function (n, t, i) {
            var r = n._eventCoordinates(t),
              u = new e(r.x, r.y),
              f = this.axisX.getValue(u),
              o = this.axisY.getValue(u);
            null !== f &&
              null !== o &&
              n.trigger(i, { element: nr(t), x: f, y: o });
          },
          createCrosshairs: function () {},
        });
        f(fc, { xAxis: {}, yAxis: {} });
        t(fc.prototype, be);
        ec = nf.extend({
          pointSlot: function (n, t) {
            var r = n.center.y - t.y1,
              i = e.onCircle(n.center, n.middle(), r);
            return new o(i.x, i.y, i.x, i.y);
          },
          createSegment: function (n, t, i) {
            var u,
              r,
              f = t.style;
            return (
              (u = f === ar ? ns : wi),
              (r = new u(n, t, i)),
              n.length === t.data.length && (r.options.closed = !0),
              r
            );
          },
        });
        f(ec, { clip: !1, limitPoints: !1 });
        hp = rs.extend({ fillToAxes: function () {} });
        cp = tu.extend({ fillToAxes: function () {} });
        lp = ec.extend({
          createSegment: function (n, t, i, r) {
            var f,
              e,
              u,
              o = this.options.isStacked,
              s = (t.line || {}).style;
            return (
              o && i > 0 && r && ((e = r.linePoints.slice(0)), (f = r)),
              s === ar
                ? ((u = new hp(n, t, i, f, e)), (u.options.closed = !0))
                : (n.push(n[0]), (u = new cp(n, t, i, f, e))),
              u
            );
          },
          seriesMissingValues: function (n) {
            return n.missingValues || fi;
          },
        });
        ev = of.extend({
          init: function (n, t) {
            of.fn.init.call(this, n, null, t);
          },
        });
        f(ev, { overlay: { gradient: "none" }, labels: { distance: 10 } });
        ov = r.extend({
          init: function (n) {
            r.fn.init.call(this, n);
            this.forEach = n.rtl ? av : lv;
          },
          reflow: function (n) {
            var i = this,
              r = i.options,
              u = i.children,
              f = r.gap,
              e = r.spacing,
              o = u.length,
              h = o + f + e * (o - 1),
              t = n.angle / h,
              s = n.startAngle + t * (f / 2);
            this.forEach(u, function (i) {
              var r = n.clone();
              r.startAngle = s;
              r.angle = t;
              i.sector && (r.radius = i.sector.radius);
              i.reflow(r);
              i.sector = r;
              s += t + t * e;
            });
          },
        });
        f(ov, { gap: 1, spacing: 0 });
        ap = r.extend({
          reflow: function (n) {
            var t,
              i,
              r = this,
              u = r.options.reverse,
              f = r.children,
              e = f.length,
              s = u ? e - 1 : 0,
              h = u ? -1 : 1;
            for (this.box = new o(), t = s; t >= 0 && t < e; t += h)
              (i = f[t].sector),
                (i.startAngle = n.startAngle),
                (i.angle = n.angle);
          },
        });
        oc = oi.extend({
          pointType: function () {
            return ev;
          },
          clusterType: function () {
            return ov;
          },
          stackType: function () {
            return ap;
          },
          categorySlot: function (n, t) {
            return n.getSlot(t);
          },
          pointSlot: function (n, t) {
            var i = n.clone(),
              r = n.center.y;
            return (i.radius = r - t.y1), (i.innerRadius = r - t.y2), i;
          },
          reflowPoint: function (n, t) {
            n.sector = t;
            n.reflow();
          },
          createAnimation: function () {
            this.options.animation.center = this.box.toRect().center();
            oi.fn.createAnimation.call(this);
          },
        });
        oc.prototype.reflow = it.prototype.reflow;
        f(oc, { clip: !1, limitPoints: !1, animation: { type: "pie" } });
        sc = rc.extend({
          createPolarAxis: function () {
            var n = new i.RadarCategoryAxis(
              this.options.categoryAxis,
              this.chartService
            );
            this.polarAxis = n;
            this.categoryAxis = n;
            this.appendAxis(n);
            this.aggregateCategories();
            this.createCategoryAxesLabels();
          },
          valueAxisOptions: function (n) {
            return (
              this._hasBarCharts &&
                t(n, {
                  majorGridLines: { type: to },
                  minorGridLines: { type: to },
                }),
              this._isStacked100 &&
                t(n, { roundToMajorUnit: !1, labels: { format: "P0" } }),
              t(n, this.options.valueAxis)
            );
          },
          aggregateCategories: function () {
            ci.prototype.aggregateCategories.call(this, this.panes);
          },
          createCategoryAxesLabels: function () {
            ci.prototype.createCategoryAxesLabels.call(this, this.panes);
          },
          filterSeries: function (n) {
            return n;
          },
          createCharts: function () {
            var n = this.filterVisibleSeries(this.series),
              t = this.panes[0];
            this.createAreaChart(b(n, [ie]), t);
            this.createLineChart(b(n, [ue]), t);
            this.createBarChart(b(n, [re]), t);
          },
          chartOptions: function (n) {
            var r,
              t,
              i = { series: n },
              u = n[0];
            return (
              u &&
                ((r = this.filterVisibleSeries(n)),
                (t = u.stack),
                (i.isStacked = t && r.length > 1),
                (i.isStacked100 = t && "100%" === t.type && r.length > 1),
                i.isStacked100 && (this._isStacked100 = !0)),
              i
            );
          },
          createAreaChart: function (n, t) {
            if (0 !== n.length) {
              var i = new lp(this, this.chartOptions(n));
              this.appendChart(i, t);
            }
          },
          createLineChart: function (n, t) {
            if (0 !== n.length) {
              var i = new ec(this, this.chartOptions(n));
              this.appendChart(i, t);
            }
          },
          createBarChart: function (n, t) {
            var r, i, u;
            0 !== n.length &&
              ((r = n[0]),
              (i = this.chartOptions(n)),
              (i.gap = r.gap),
              (i.spacing = r.spacing),
              (u = new oc(this, i)),
              this.appendChart(u, t),
              (this._hasBarCharts = !0));
          },
          seriesCategoryAxis: function () {
            return this.categoryAxis;
          },
          _dispatchEvent: function (n, t, i) {
            var r = n._eventCoordinates(t),
              u = new e(r.x, r.y),
              f = this.categoryAxis.getCategory(u),
              o = this.valueAxis.getValue(u);
            null !== f &&
              null !== o &&
              n.trigger(i, { element: nr(t), category: f, value: o });
          },
          createCrosshairs: function () {},
        });
        t(sc.prototype, be, {
          appendChart: ci.prototype.appendChart,
          aggregateSeries: ci.prototype.aggregateSeries,
          seriesSourcePoints: ci.prototype.seriesSourcePoints,
        });
        f(sc, { categoryAxis: { categories: [] }, valueAxis: {} });
        hc = r.extend({
          init: function (n, t, i) {
            r.fn.init.call(this, t);
            this.value = n;
            this.options.index = i.index;
          },
          reflow: function (n) {
            var t = this.points,
              i = this.children[0];
            this.box = new o(t[0].x, t[0].y, t[1].x, t[2].y);
            i && i.reflow(new o(n.x1, t[0].y, n.x2, t[2].y));
          },
          createVisual: function () {
            var n,
              i = this,
              t = this.options;
            r.fn.createVisual.call(this);
            n = t.visual
              ? t.visual({
                  category: this.category,
                  dataItem: this.dataItem,
                  value: this.value,
                  series: this.series,
                  percentage: this.percentage,
                  points: this.points,
                  options: t,
                  sender: this.getSender(),
                  createVisual: function () {
                    return i.createPath();
                  },
                })
              : this.createPath();
            n && this.visual.append(n);
          },
          createPath: function () {
            var n = this.options,
              t = n.border;
            return v
              .fromPoints(this.points, {
                fill: { color: n.color, opacity: n.opacity },
                stroke: { color: t.color, opacity: t.opacity, width: t.width },
              })
              .close();
          },
          createHighlight: function (n) {
            return v.fromPoints(this.points, n);
          },
          highlightVisual: function () {
            return this.visual.children[0];
          },
          highlightVisualArgs: function () {
            var n = v.fromPoints(this.points).close();
            return { options: this.options, path: n };
          },
          tooltipAnchor: function () {
            var n = this.box;
            return {
              point: new e(n.center().x, n.y1),
              align: { horizontal: "center", vertical: "top" },
            };
          },
          formatValue: function (n) {
            var t = this;
            return t.owner.formatPointValue(t, n);
          },
        });
        f(hc, { color: lt, border: { width: 1 } });
        t(hc.prototype, ii);
        cc = r.extend({
          init: function (n, t) {
            r.fn.init.call(this, t);
            this.plotArea = n;
            this.points = [];
            this.labels = [];
            this.legendItems = [];
            this.render();
          },
          formatPointValue: function (n, t) {
            return this.chartService.format.auto(t, n.value);
          },
          render: function () {
            var i,
              a,
              e,
              v,
              o,
              n,
              r,
              u,
              s,
              h,
              c,
              l = this,
              y = this,
              p = y.options,
              f = y.plotArea.options.seriesColors;
            if ((void 0 === f && (f = []), (i = p.series[0]), (a = i.data)))
              for (
                e = bc(i), v = e.total, o = e.points, n = 0;
                n < o.length;
                n++
              )
                (r = o[n]),
                  r &&
                    ((u = r.fields),
                    tt(i.color) || (i.color = u.color || f[n % f.length]),
                    (u = t(
                      {
                        index: n,
                        owner: l,
                        series: i,
                        dataItem: a[n],
                        percentage: r.value / v,
                      },
                      u,
                      { visible: r.visible }
                    )),
                    (s = r.valueFields.value),
                    (h = l.createSegment(s, u)),
                    (c = l.createLabel(s, u)),
                    h && c && h.append(c));
          },
          evalSegmentOptions: function (n, t, i) {
            var r = i.series;
            er(
              n,
              { value: t, series: r, dataItem: i.dataItem, index: i.index },
              {
                defaults: r._defaults,
                excluded: ["data", "content", "template", "toggle", "visual"],
              }
            );
          },
          createSegment: function (i, r) {
            var u,
              f = t({}, r.series);
            if (
              (this.evalSegmentOptions(f, i, r),
              this.createLegendItem(i, f, r),
              r.visible !== !1)
            )
              return (
                (u = new hc(i, f, r)),
                n.extend(u, r),
                this.append(u),
                this.points.push(u),
                u
              );
          },
          createLabel: function (n, i) {
            var e,
              o,
              h,
              s,
              u = i.series,
              c = i.dataItem,
              r = t({}, this.options.labels, u.labels),
              f = n;
            if (r.visible)
              return (
                (e = gt(r)),
                (o = {
                  dataItem: c,
                  value: n,
                  percentage: i.percentage,
                  category: i.category,
                  series: u,
                }),
                e
                  ? (f = e(o))
                  : r.format &&
                    (f = this.plotArea.chartService.format.auto(r.format, f)),
                r.color ||
                  ((h = new tr(u.color).percBrightness()),
                  (r.color = h > 180 ? uu : lt),
                  r.background || (r.background = u.color)),
                this.evalSegmentOptions(r, n, i),
                (s = new cf(f, t({ vAlign: r.position }, r), o)),
                this.labels.push(s),
                s
              );
          },
          labelPadding: function () {
            for (
              var f, i, r, u = this.labels, t = { left: 0, right: 0 }, n = 0;
              n < u.length;
              n++
            )
              (f = u[n]),
                (i = f.options.align),
                i !== h &&
                  ((r = u[n].box.width()),
                  i === y
                    ? (t.left = Math.max(t.left, r))
                    : (t.right = Math.max(t.right, r)));
            return t;
          },
          dynamicSlopeReflow: function (n, t, i) {
            for (
              var c,
                l,
                f,
                e,
                s,
                v,
                y,
                h,
                a,
                r,
                w = this,
                b = w.options,
                u = w.points,
                k = u.length,
                d = u[0],
                p = d,
                o = 0;
              o < u.length;
              o++
            )
              u[o].percentage > p.percentage && (p = u[o]);
            for (
              c = (d.percentage / p.percentage) * t,
                l = (t - c) / 2,
                f = 0,
                e = 0;
              e < k;
              e++
            )
              (s = u[e].percentage),
                (v = u[e + 1]),
                (y = v ? v.percentage : s),
                (h = u[e].points = []),
                (a = b.dynamicHeight ? i * s : i / k),
                (r = void 0),
                (r = s ? (t - c * (y / s)) / 2 : y ? 0 : t / 2),
                (r = ai(r, 0, t)),
                h.push(new nt(n.x1 + l, n.y1 + f)),
                h.push(new nt(n.x1 + t - l, n.y1 + f)),
                h.push(new nt(n.x1 + t - r, n.y1 + a + f)),
                h.push(new nt(n.x1 + r, n.y1 + a + f)),
                (l = r),
                (f += a + b.segmentSpacing),
                (c = ai(t - 2 * r, 0, t));
          },
          constantSlopeReflow: function (n, t, i) {
            for (
              var e,
                c,
                s,
                h,
                y = this,
                r = y.options,
                l = y.points,
                a = l.length,
                v = r.neckRatio <= 1,
                w = v ? r.neckRatio * t : t,
                u = v ? 0 : (t - t / r.neckRatio) / 2,
                b = v ? t : t - 2 * u,
                p = (b - w) / 2,
                o = 0,
                f = 0;
              f < a;
              f++
            )
              (e = l[f].points = []),
                (c = l[f].percentage),
                (s = r.dynamicHeight ? p * c : p / a),
                (h = r.dynamicHeight ? i * c : i / a),
                e.push(new nt(n.x1 + u, n.y1 + o)),
                e.push(new nt(n.x1 + t - u, n.y1 + o)),
                e.push(new nt(n.x1 + t - u - s, n.y1 + h + o)),
                e.push(new nt(n.x1 + u + s, n.y1 + h + o)),
                (u += s),
                (o += h + r.segmentSpacing);
          },
          reflow: function (n) {
            var r,
              t,
              u,
              f,
              i,
              o = this.points,
              e = o.length;
            if (e)
              for (
                r = this.options,
                  t = n.clone().unpad(this.labelPadding()),
                  u = t.height() - r.segmentSpacing * (e - 1),
                  f = t.width(),
                  r.dynamicSlope
                    ? this.dynamicSlopeReflow(t, f, u)
                    : this.constantSlopeReflow(t, f, u),
                  i = 0;
                i < e;
                i++
              )
                o[i].reflow(n);
          },
        });
        f(cc, {
          neckRatio: 0.3,
          width: 300,
          dynamicSlope: !1,
          dynamicHeight: !0,
          segmentSpacing: 0,
          labels: { visible: !1, align: h, position: h, zIndex: 1 },
        });
        t(cc.prototype, nc);
        vp = ht.extend({
          render: function () {
            this.createFunnelChart(this.series);
          },
          createFunnelChart: function (n) {
            var t = n[0],
              i = new cc(this, {
                series: n,
                legend: this.options.legend,
                neckRatio: t.neckRatio,
                dynamicHeight: t.dynamicHeight,
                dynamicSlope: t.dynamicSlope,
                segmentSpacing: t.segmentSpacing,
                highlight: t.highlight,
              });
            this.appendChart(i);
          },
          appendChart: function (n, t) {
            ht.fn.appendChart.call(this, n, t);
            af(this.options.legend.items, n.legendItems);
          },
        });
        dt = "color";
        yt = "first";
        yp = "from";
        ct = "max";
        lc = "min";
        fr = "noteText";
        pp = "summary";
        wp = "to";
        ri.current.register(ci, [
          ei,
          pi,
          au,
          gr,
          cu,
          kr,
          pr,
          vu,
          yr,
          fe,
          lu,
          dr,
          pu,
          br,
          wu,
          wr,
          yu,
          nu,
        ]);
        ri.current.register(hs, [ao, vo, vr]);
        ri.current.register(tc, [ir]);
        ri.current.register(fv, [ne]);
        ri.current.register(vp, [te]);
        ri.current.register(fc, [ho, co, lo]);
        ri.current.register(sc, [ie, re, ue]);
        p.current.register(
          [ei, pi, au, gr, cu, kr],
          [pt],
          [ti, dt, fr, bs, ks]
        );
        p.current.register([pu, br, yu, nu], [yp, wp], [ti, dt, fr]);
        p.current.register([wu, wr], [pt], [ti, dt, fr, pp]);
        p.current.register([ho, co, lo], [a, l], [dt]);
        p.current.register([ie, re, ue], [pt], [dt]);
        p.current.register([te], [pt], [ti, dt, "visibleInLegend", "visible"]);
        hi.current.register([ei, pi, au, gr, cu, kr, wu, wr], {
          value: ct,
          color: yt,
          noteText: yt,
          errorLow: lc,
          errorHigh: ct,
        });
        hi.current.register([pu, br, yu, nu], {
          from: lc,
          to: ct,
          color: yt,
          noteText: yt,
        });
        hi.current.register([ie, re, ue], { value: ct, color: yt });
        p.current.register([ao, vo, vr], [a, l], [dt, fr, ol, sl, hl, cl]);
        p.current.register([vr], [a, l, "size"], [dt, ti, fr]);
        p.current.register(
          [pr, vu],
          ["open", "high", "low", "close"],
          [ti, dt, "downColor", fr]
        );
        hi.current.register([pr, vu], {
          open: ct,
          high: ct,
          low: lc,
          close: ct,
          color: yt,
          downColor: yt,
          noteText: yt,
        });
        p.current.register(
          [lu, dr],
          ["lower", "q1", "median", "q3", "upper", "mean", "outliers"],
          [ti, dt, fr]
        );
        hi.current.register([lu, dr], {
          lower: ct,
          q1: ct,
          median: ct,
          q3: ct,
          upper: ct,
          mean: ct,
          outliers: yt,
          color: yt,
          noteText: yt,
        });
        p.current.register(
          [yr, fe],
          ["current", "target"],
          [ti, dt, "visibleInLegend", fr]
        );
        hi.current.register([yr, fe], {
          current: ct,
          target: ct,
          color: yt,
          noteText: yt,
        });
        p.current.register(
          [ir, ne],
          [pt],
          [ti, dt, "explode", "visibleInLegend", "visible"]
        );
        ac = [ti, pt, a, l];
        ru = "mousemove";
        sv = "contextmenu";
        hv = "mouseleave";
        bp = 20;
        cv = et.extend({
          init: function (n, r, u, f) {
            var o,
              e = this;
            void 0 === f && (f = {});
            this.observers = [];
            this.addObserver(f.observer);
            this.chartService = new ps.ChartService(this, f);
            this.chartService.theme = u;
            this._initElement(n);
            o = t({}, this.options, r);
            this._originalOptions = t({}, o);
            this._theme = u;
            this._initTheme(o, u);
            this._initHandlers();
            this._initSurface();
            this.bindCategories();
            i.FontLoader.preloadFonts(r, function () {
              e.fontLoaded = !0;
              e._destroyed ||
                (e.trigger("init"), e._redraw(), e._attachEvents());
            });
          },
          _initElement: function (n) {
            for (
              this._setElementClass(n), n.style.position = "relative";
              n.firstChild;

            )
              n.removeChild(n.firstChild);
            this.element = n;
          },
          _setElementClass: function (n) {
            i.addClass(n, "k-chart");
          },
          _initTheme: function (i, r) {
            for (var f = [], e = i.series || [], u = 0; u < e.length; u++)
              f.push(n.extend({}, e[u]));
            i.series = f;
            ow(i);
            this.applyDefaults(i, r);
            null === i.seriesColors && delete i.seriesColors;
            this.options = t({}, r, i);
            this.applySeriesColors();
          },
          getSize: function () {
            var n = this.options.chartArea || {},
              t = n.width
                ? parseInt(n.width, 10)
                : Math.floor(this.element.offsetWidth),
              i = n.height
                ? parseInt(n.height, 10)
                : Math.floor(this.element.offsetHeight);
            return { width: t, height: i };
          },
          resize: function (n) {
            var t = this.getSize(),
              i = this._size;
            (n ||
              ((t.width > 0 || t.height > 0) &&
                (!i || t.width !== i.width || t.height !== i.height))) &&
              ((this._size = t), this._resize(t, n), this.trigger("resize", t));
          },
          _resize: function () {
            this._noTransitionsRedraw();
          },
          redraw: function (n) {
            var t, i;
            this.applyDefaults(this.options);
            this.applySeriesColors();
            n
              ? ((t = this._model._plotArea), (i = t.findPane(n)), t.redraw(i))
              : this._redraw();
          },
          getAxis: function (n) {
            return vc(n, this._plotArea.axes);
          },
          findAxisByName: function (n) {
            return this.getAxis(n);
          },
          findPaneByName: function (n) {
            for (var i = this._plotArea.panes, t = 0; t < i.length; t++)
              if (i[t].options.name === n) return new eo(i[t]);
          },
          findPaneByIndex: function (n) {
            var t = this._plotArea.panes;
            if (t[n]) return new eo(t[n]);
          },
          plotArea: function () {
            return new el(this._plotArea);
          },
          toggleHighlight: function (n, t) {
            var r,
              u,
              f,
              i = this._plotArea,
              e = (i.srcSeries || i.series || [])[0];
            tt(t)
              ? (r = i.filterPoints(t))
              : (di(t) ? ((u = t.series), (f = t.category)) : (u = f = t),
                (r =
                  e.type === ne
                    ? gv(i.pointsBySeriesName(u), f)
                    : e.type === ir || e.type === te
                    ? gv((i.charts[0] || {}).points, f)
                    : i.pointsBySeriesName(u)));
            r && this.togglePointsHighlight(n, r);
          },
          togglePointsHighlight: function (n, t) {
            for (var r = this._highlight, i = 0; i < t.length; i++)
              r.togglePointHighlight(t[i], n);
          },
          showTooltip: function (n) {
            var t,
              i,
              f,
              r = this._sharedTooltip(),
              e = this,
              o = e._tooltip,
              s = e._plotArea;
            tt(n)
              ? ((t = s.findPoint(n)), t && r && (i = t.categoryIx))
              : r && u(n) && (i = s.categoryAxis.categoryIndex(n));
            r
              ? i >= 0 &&
                ((f = this._plotArea.pointsByCategoryIndex(i)), o.showAt(f))
              : t && o.show(t);
          },
          hideTooltip: function () {
            this._tooltip.hide();
          },
          _initSurface: function () {
            var r = this.surface,
              t = this._surfaceWrap(),
              n = this.options.chartArea;
            n.width && i.elementSize(t, { width: n.width });
            n.height && i.elementSize(t, { height: n.height });
            r && r.options.type === this.options.renderAs
              ? (this.surface.clear(), this.surface.resize())
              : (this._destroySurface(),
                (this.surface = ui.Surface.create(t, {
                  type: this.options.renderAs,
                })),
                this.surface.bind("mouseenter", this._surfaceMouseenterHandler),
                this.surface.bind(
                  "mouseleave",
                  this._surfaceMouseleaveHandler
                ));
          },
          _surfaceWrap: function () {
            return this.element;
          },
          _redraw: function () {
            var n = this._getModel();
            this._size = { width: n.options.width, height: n.options.height };
            this._destroyView();
            this._model = n;
            this._plotArea = n._plotArea;
            n.renderVisual();
            this.options.transitions !== !1 &&
              n.traverse(function (n) {
                n.animation && n.animation.setup();
              });
            this._initSurface();
            this.surface.draw(n.visual);
            this.options.transitions !== !1 &&
              n.traverse(function (n) {
                n.animation && n.animation.play();
              });
            this._tooltip = this._createTooltip();
            this._highlight = new ba();
            this._setupSelection();
            this._createPannable();
            this._createZoomSelection();
            this._createMousewheelZoom();
            this.trigger(dl);
            ty(this._plotArea.panes);
            this._navState || this._cancelDomEvents();
          },
          exportVisual: function (n) {
            var r, f, u, i;
            return (
              n && (n.width || n.height || n.options)
                ? ((f = this.options),
                  (u = t({}, n.options, {
                    chartArea: { width: n.width, height: n.height },
                  })),
                  ul(this._originalOptions, u),
                  (this.options = t({}, this._originalOptions, u)),
                  this._initTheme(this.options, this._theme),
                  this.bindCategories(),
                  (i = this._getModel()),
                  i.renderVisual(),
                  ty(i._plotArea.panes),
                  (r = i.visual),
                  (this.options = f))
                : (r = this.surface.exportVisual()),
              r
            );
          },
          _sharedTooltip: function () {
            return this._plotArea instanceof ci && this.options.tooltip.shared;
          },
          _createPannable: function () {
            var n = this.options;
            n.pannable !== !1 &&
              (this._pannable = new ph(this._plotArea, n.pannable));
          },
          _createZoomSelection: function () {
            var n = this.options.zoomable,
              t = (n || {}).selection;
            n !== !1 && t !== !1 && (this._zoomSelection = new wh(this, t));
          },
          _createMousewheelZoom: function () {
            var n = this.options.zoomable,
              t = (n || {}).mousewheel;
            n !== !1 && t !== !1 && (this._mousewheelZoom = new ka(this, t));
          },
          _toggleDragZoomEvents: function () {
            var u = this.options.pannable,
              n = this.options.zoomable,
              f = (n || {}).selection,
              e = (n || {}).mousewheel,
              t = !(
                u ||
                (n !== !1 && f !== !1) ||
                this.requiresHandlers([po, ee, oe])
              ),
              i =
                (n === !1 || e === !1) && !this.requiresHandlers([bu, ku, du]),
              r = this.element;
            this._dragZoomEnabled && t && i
              ? ((r.style.touchAction = this._touchAction || ""),
                (this._dragZoomEnabled = !1))
              : this._dragZoomEnabled ||
                (t && i) ||
                ((r.style.touchAction = "none"), (this._dragZoomEnabled = !0));
            this._toggleDomEvents(!t, !i);
          },
          _toggleDomEvents: function (n, t) {
            var i = this.domEvents;
            i &&
              (i.toggleDrag && i.toggleDrag(n),
              i.toggleZoom && i.toggleZoom(t));
          },
          _createTooltip: function () {
            var t = this,
              n = t.options.tooltip;
            return this._sharedTooltip()
              ? this._createSharedTooltip(n)
              : new tv(this.chartService, n);
          },
          _createSharedTooltip: function (n) {
            return new dh(this._plotArea, n);
          },
          applyDefaults: function (n, t) {
            sw(n, t);
            hw(n, t);
          },
          applySeriesColors: function () {
            for (
              var t,
                r,
                i,
                u = this.options,
                f = u.series,
                e = u.seriesColors || [],
                n = 0;
              n < f.length;
              n++
            )
              (t = f[n]),
                (r = e[n % e.length]),
                (i = t._defaults),
                (t.color = t.color || r),
                i && (i.color = i.color || r);
          },
          _getModel: function () {
            var r = this.options,
              t = this._createPlotArea(),
              n = new i.RootElement(this._modelOptions());
            return (
              (n.chart = this),
              (n._plotArea = t),
              i.Title.buildTitle(r.title, n),
              r.legend.visible &&
                n.append(new bh(t.options.legend, this.chartService)),
              n.append(t),
              n.reflow(),
              n
            );
          },
          _modelOptions: function () {
            var n = this.options,
              i = this.getSize();
            return t(
              {
                transitions: n.transitions,
                width: i.width || s.DEFAULT_WIDTH,
                height: i.height || s.DEFAULT_HEIGHT,
              },
              n.chartArea
            );
          },
          _createPlotArea: function (n) {
            var t = this.options;
            return ri.current.create(n ? [] : t.series, t, this.chartService);
          },
          _setupSelection: function () {
            for (
              var n,
                r,
                u,
                f,
                o = this,
                s = this,
                e = s._plotArea.axes,
                h = (this._selections = []),
                i = 0;
              i < e.length;
              i++
            )
              (n = e[i]),
                (r = n.options),
                n instanceof fu &&
                  r.select &&
                  !r.vertical &&
                  ((u = n.range()),
                  (f = new kh(o, n, t({ min: u.min, max: u.max }, r.select))),
                  h.push(f));
          },
          _selectStart: function (n) {
            return this.trigger(wo, n);
          },
          _select: function (n) {
            return this.trigger(gu, n);
          },
          _selectEnd: function (n) {
            return this.trigger(bo, n);
          },
          _initHandlers: function () {
            this._clickHandler = this._click.bind(this);
            this._mousewheelHandler = this._mousewheel.bind(this);
            this._mouseleaveHandler = this._mouseleave.bind(this);
            this._surfaceMouseenterHandler = this._mouseover.bind(this);
            this._surfaceMouseleaveHandler = this._mouseout.bind(this);
            this._mousemove = kendo.throttle(this._mousemove.bind(this), bp);
          },
          addObserver: function (n) {
            n && this.observers.push(n);
          },
          removeObserver: function (n) {
            var t = this.observers.indexOf(n);
            t >= 0 && this.observers.splice(t, 1);
          },
          requiresHandlers: function (n) {
            for (var i = this.observers, t = 0; t < i.length; t++)
              if (i[t].requiresHandlers(n)) return !0;
          },
          trigger: function (n, t) {
            var r, u, i;
            for (
              void 0 === t && (t = {}),
                n === th &&
                  (t.anchor.point = this._toDocumentCoordinates(
                    t.anchor.point
                  )),
                t.sender = this,
                r = this.observers,
                u = !1,
                i = 0;
              i < r.length;
              i++
            )
              r[i].trigger(n, t) && (u = !0);
            return u;
          },
          _attachEvents: function () {
            var n,
              t,
              i = this.element;
            this._touchAction = i.style.touchAction;
            pf(
              i,
              ((n = {}),
              (n[sv] = this._clickHandler),
              (n[ce] = this._mousewheelHandler),
              (n[hv] = this._mouseleaveHandler),
              n)
            );
            this._shouldAttachMouseMove() &&
              pf(i, ((t = {}), (t[ru] = this._mousemove), t));
            this.domEvents = ps.DomEventsBuilder.create(this.element, {
              start: this._start.bind(this),
              move: this._move.bind(this),
              end: this._end.bind(this),
              tap: this._tap.bind(this),
              gesturestart: this._gesturestart.bind(this),
              gesturechange: this._gesturechange.bind(this),
              gestureend: this._gestureend.bind(this),
            });
            this._toggleDragZoomEvents();
          },
          _mouseleave: function (n) {
            this._hoveredPoint &&
              (this._hoveredPoint.out(this, n), (this._hoveredPoint = null));
            this._plotArea.hovered &&
              (this.trigger(yo), (this._plotArea.hovered = !1));
          },
          _cancelDomEvents: function () {
            this.domEvents && this.domEvents.cancel && this.domEvents.cancel();
          },
          _gesturestart: function (n) {
            this._mousewheelZoom &&
              !this._stopChartHandlers(n) &&
              ((this._gestureDistance = n.distance),
              this._unsetActivePoint(),
              this.surface.suspendTracking());
          },
          _gestureend: function (n) {
            this._zooming &&
              !this._stopChartHandlers(n) &&
              (this.surface && this.surface.resumeTracking(),
              (this._zooming = !1),
              this.trigger(du, {}));
          },
          _gesturechange: function (n) {
            var u,
              t,
              i,
              f,
              r = this._mousewheelZoom;
            r &&
              !this._stopChartHandlers(n) &&
              (n.preventDefault(),
              (u = this._gestureDistance),
              (t = -n.distance / u + 1),
              Math.abs(t) >= 0.1 &&
                ((t = Math.round(10 * t)),
                (this._gestureDistance = n.distance),
                (i = {
                  delta: t,
                  axisRanges: ge(this._plotArea.axes),
                  originalEvent: n,
                }),
                (!this._zooming && this.trigger(bu, i)) ||
                  (this._zooming || (this._zooming = !0),
                  (f = i.axisRanges = r.updateRanges(t)),
                  f && !this.trigger(ku, i) && r.zoom())));
          },
          _mouseout: function (n) {
            if (n.element) {
              var t = this._drawingChartElement(n.element, n);
              t && t.leave && t.leave(this, n.originalEvent);
            }
          },
          _start: function (n) {
            var t = this._eventCoordinates(n);
            !this._stopChartHandlers(n) &&
              this._plotArea.backgroundContainsPoint(t) &&
              (this.requiresHandlers([po, ee, oe]) &&
                this._startNavigation(n, t, po),
              this._pannable &&
                this._pannable.start(n) &&
                (this.surface.suspendTracking(),
                this._unsetActivePoint(),
                (this._suppressHover = !0),
                (this.chartService.panning = !0)),
              this._zoomSelection &&
                this._zoomSelection.start(n) &&
                this.trigger(bu, {
                  axisRanges: ge(this._plotArea.axes),
                  originalEvent: n,
                }));
          },
          _move: function (n) {
            var u,
              i,
              f,
              r,
              t,
              c,
              e,
              o,
              l = this,
              s = l._navState,
              h = l._pannable;
            if (!this._stopChartHandlers(n)) {
              if (h)
                (u = h.move(n)),
                  u &&
                    !this.trigger(ee, { axisRanges: u, originalEvent: n }) &&
                    h.pan();
              else if (s) {
                for (i = {}, f = s.axes, r = 0; r < f.length; r++)
                  (t = f[r]),
                    (c = t.options.name),
                    c &&
                      ((e = t.options.vertical ? n.y : n.x),
                      (o = e.startLocation - e.location),
                      0 !== o && (i[t.options.name] = t.translateRange(o)));
                s.axisRanges = i;
                this.trigger(ee, { axisRanges: i, originalEvent: n });
              }
              this._zoomSelection && this._zoomSelection.move(n);
            }
          },
          _end: function (n) {
            var i, t;
            this._stopChartHandlers(n) ||
              ((i = this._pannable),
              i && i.end(n)
                ? (this.surface.resumeTracking(),
                  this.trigger(oe, {
                    axisRanges: ge(this._plotArea.axes),
                    originalEvent: n,
                  }),
                  (this._suppressHover = !1),
                  (this.chartService.panning = !1))
                : this._endNavigation(n, oe),
              this._zoomSelection &&
                ((t = this._zoomSelection.end(n)),
                t &&
                  !this.trigger(ku, { axisRanges: t, originalEvent: n }) &&
                  (this._zoomSelection.zoom(),
                  this.trigger(du, { axisRanges: t, originalEvent: n }))));
          },
          _stopChartHandlers: function (n) {
            var r,
              u,
              t,
              i = this._selections || [];
            if (!i.length) return !1;
            if (
              ((r = this._eventCoordinates(n)),
              (u = this._plotArea.paneByPoint(r)))
            )
              for (t = 0; t < i.length; t++) if (i[t].onPane(u)) return !0;
          },
          _mousewheel: function (n) {
            var t,
              r,
              v,
              o,
              s,
              h,
              e,
              c,
              l,
              u = this,
              f = i.mousewheelDelta(n),
              a = this._mousewheelZoom,
              y = this._eventCoordinates(n);
            if (
              !this._stopChartHandlers(n) &&
              this._plotArea.backgroundContainsPoint(y)
            )
              if (a)
                (t = {
                  delta: f,
                  axisRanges: ge(this._plotArea.axes),
                  originalEvent: n,
                }),
                  (!this._zooming && this.trigger(bu, t)) ||
                    (n.preventDefault(),
                    this._zooming ||
                      (this._unsetActivePoint(),
                      this.surface.suspendTracking(),
                      (this._zooming = !0)),
                    this._mwTimeout && clearTimeout(this._mwTimeout),
                    (t.axisRanges = a.updateRanges(f)),
                    t.axisRanges && !this.trigger(ku, t) && a.zoom(),
                    (this._mwTimeout = setTimeout(function () {
                      u.trigger(du, t);
                      u._zooming = !1;
                      u.surface && u.surface.resumeTracking();
                    }, ko)));
              else if (
                ((r = this._navState),
                r ||
                  ((v = this._startNavigation(n, y, bu)),
                  v || (r = this._navState)),
                r)
              ) {
                for (
                  o = r.totalDelta || f,
                    r.totalDelta = o + f,
                    s = this._navState.axes,
                    h = {},
                    e = 0;
                  e < s.length;
                  e++
                )
                  (c = s[e]),
                    (l = c.options.name),
                    l && (h[l] = c.scaleRange(-o));
                this.trigger(ku, { delta: f, axisRanges: h, originalEvent: n });
                this._mwTimeout && clearTimeout(this._mwTimeout);
                this._mwTimeout = setTimeout(function () {
                  u._endNavigation(n, du);
                }, ko);
              }
          },
          _startNavigation: function (n, t, i) {
            var r,
              u,
              f = this._model._plotArea,
              e = f.findPointPane(t),
              o = f.axes.slice(0);
            e &&
              ((r = ge(o)),
              (u = this.trigger(i, { axisRanges: r, originalEvent: n })),
              u
                ? this._cancelDomEvents()
                : ((this._suppressHover = !0),
                  this._unsetActivePoint(),
                  (this._navState = { axisRanges: r, pane: e, axes: o })));
          },
          _endNavigation: function (n, t) {
            this._navState &&
              (this.trigger(t, {
                axisRanges: this._navState.axisRanges,
                originalEvent: n,
              }),
              (this._suppressHover = !1),
              (this._navState = null));
          },
          _getChartElement: function (n, t) {
            var i = this.surface.eventTarget(n);
            if (i) return this._drawingChartElement(i, n, t);
          },
          _drawingChartElement: function (n, t, i) {
            for (var r, u = n; u && !r; ) (r = u.chartElement), (u = u.parent);
            if (r)
              return (
                r.aliasFor && (r = r.aliasFor(t, this._eventCoordinates(t))),
                i &&
                  ((r = r.closest(i)), r && r.aliasFor && (r = r.aliasFor())),
                r
              );
          },
          _eventCoordinates: function (n) {
            var t = i.eventCoordinates(n);
            return this._toModelCoordinates(t.x, t.y);
          },
          _elementPadding: function () {
            var n, t, i;
            return (
              this._padding ||
                ((n = ft(this.element, ["paddingLeft", "paddingTop"])),
                (t = n.paddingLeft),
                (i = n.paddingTop),
                (this._padding = { top: i, left: t })),
              this._padding
            );
          },
          _toDocumentCoordinates: function (n) {
            var t = this._elementPadding(),
              r = i.elementOffset(this.element);
            return {
              left: d(n.x + t.left + r.left),
              top: d(n.y + t.top + r.top),
            };
          },
          _toModelCoordinates: function (n, t) {
            var f = this.element,
              r = i.elementOffset(f),
              u = this._elementPadding();
            return new e(n - r.left - u.left, t - r.top - u.top);
          },
          _tap: function (n) {
            var r = this,
              t = this.surface.eventTarget(n),
              u = this._drawingChartElement(t, n),
              i = this._sharedTooltip();
            this._startHover(t, n) || i || this._unsetActivePoint();
            i && this._trackSharedTooltip(this._eventCoordinates(n), n, !0);
            this._propagateClick(u, n);
            this.handlingTap = !0;
            setTimeout(function () {
              r.handlingTap = !1;
            }, 0);
          },
          _click: function (n) {
            var t = this._getChartElement(n);
            this._propagateClick(t, n);
          },
          _propagateClick: function (n, t) {
            for (var r = this, i = n; i; )
              i.click && i.click(r, t), (i = i.parent);
          },
          _startHover: function (n, i) {
            var r, f, u, e;
            return (
              !this._suppressHover &&
              ((r = this._drawingChartElement(n, i, function (n) {
                return (n.hover || n.over) && !(n instanceof ht);
              })),
              (f = this._activePoint),
              (u = this._hoveredPoint),
              u && u !== r && (u.out(this, i), (this._hoveredPoint = null)),
              r &&
                u !== r &&
                r.over &&
                ((this._hoveredPoint = r), r.over(this, i)),
              r &&
                f !== r &&
                r.hover &&
                ((this._activePoint = r),
                this._sharedTooltip() ||
                  r.hover(this, i) ||
                  ((e = t({}, this.options.tooltip, r.options.tooltip)),
                  e.visible && this._tooltip.show(r),
                  this._highlight.show(r))),
              r)
            );
          },
          _mouseover: function (n) {
            var t,
              i = this._startHover(n.element, n.originalEvent);
            i &&
              i.tooltipTracking &&
              !this._mouseMoveTrackHandler &&
              !this._sharedTooltip() &&
              ((this._mouseMoveTrackHandler =
                this._mouseMoveTracking.bind(this)),
              pf(
                document,
                ((t = {}), (t[ru] = this._mouseMoveTrackHandler), t)
              ));
          },
          _mouseMoveTracking: function (n) {
            var i,
              o,
              f,
              u = this,
              s = u.options,
              h = u._tooltip,
              c = u._highlight,
              r = u._activePoint,
              e = this._eventCoordinates(n);
            this._plotArea.box.containsPoint(e)
              ? r &&
                r.tooltipTracking &&
                r.series &&
                r.parent.getNearestPoint &&
                ((i = r.parent.getNearestPoint(e.x, e.y, r.seriesIx)),
                i &&
                  i !== r &&
                  ((this._activePoint = i),
                  i.hover(this, n) ||
                    ((o = t({}, s.tooltip, i.options.tooltip)),
                    o.visible && h.show(i),
                    c.show(i))))
              : (wf(
                  document,
                  ((f = {}), (f[ru] = this._mouseMoveTrackHandler), f)
                ),
                this._unsetActivePoint(),
                (this._mouseMoveTrackHandler = null));
          },
          _mousemove: function (n) {
            var i,
              r = this._eventCoordinates(n),
              t = this._plotArea;
            this._trackCrosshairs(r);
            t.hover &&
              ((i = t.backgroundContainsPoint(r)),
              i
                ? ((t.hovered = !0), this._plotArea.hover(this, n))
                : t.hovered && !i && (this.trigger(yo), (t.hovered = !1)));
            this._sharedTooltip() && this._trackSharedTooltip(r, n);
          },
          _trackCrosshairs: function (n) {
            for (var i, r = this._plotArea.crosshairs, t = 0; t < r.length; t++)
              (i = r[t]), i.box.containsPoint(n) ? i.showAt(n) : i.hide();
          },
          _trackSharedTooltip: function (n, t, i) {
            var r, l, s, a, u, e, o, f, h, c;
            this._suppressHover ||
              ((r = this),
              (l = r.options.tooltip),
              (s = r._plotArea),
              (a = r._plotArea.categoryAxis),
              (u = r._tooltip),
              (e = r._highlight),
              s.backgroundContainsPoint(n)
                ? ((o = a.pointCategoryIndex(n)),
                  o !== this._tooltipCategoryIx || (!this._sharedHighlight && i)
                    ? ((f = s.pointsByCategoryIndex(o)),
                      (h = f.map(function (n) {
                        return n.eventArgs(t);
                      })),
                      (c = h[0] || {}),
                      (c.categoryPoints = h),
                      f.length > 0 && !this.trigger(gs, c)
                        ? (l.visible && u.showAt(f, n),
                          e.show(f),
                          (this._sharedHighlight = !0))
                        : u.hide(),
                      (this._tooltipCategoryIx = o))
                    : i &&
                      this._sharedHighlight &&
                      (e.hide(), u.hide(), (this._sharedHighlight = !1)))
                : this._sharedHighlight &&
                  (e.hide(),
                  u.hide(),
                  (this._tooltipCategoryIx = null),
                  (this._sharedHighlight = !1)));
          },
          hideElements: function () {
            var n = this._plotArea;
            this._mousemove.cancel();
            n.hideCrosshairs();
            this._unsetActivePoint();
          },
          _unsetActivePoint: function () {
            var n = this,
              t = n._tooltip,
              i = n._highlight;
            this._activePoint = null;
            this._hoveredPoint = null;
            t && t.hide();
            this._tooltipCategoryIx = null;
            this._sharedHighlight = !1;
            i && i.hide();
          },
          _deferRedraw: function () {
            this._redraw();
          },
          _clearRedrawTimeout: function () {
            this._redrawTimeout &&
              (clearInterval(this._redrawTimeout),
              (this._redrawTimeout = null));
          },
          bindCategories: function () {
            for (
              var t,
                r = this,
                u = this.options,
                i = [].concat(u.categoryAxis),
                n = 0;
              n < i.length;
              n++
            )
              (t = i[n]),
                t.autoBind !== !1 && r.bindCategoryAxisFromSeries(t, n);
          },
          bindCategoryAxisFromSeries: function (n, t) {
            for (
              var u,
                r,
                y,
                o,
                c,
                l,
                p,
                s,
                a,
                h,
                w,
                d = this,
                b = this.options.series,
                g = b.length,
                k = new i.HashMap(),
                f = [],
                v = !1,
                e = 0;
              e < g;
              e++
            )
              if (
                ((r = b[e]),
                (y = r.categoryAxis === n.name || (!r.categoryAxis && 0 === t)),
                (o = r.data),
                (c = o.length),
                (l = r.categoryField && y),
                (v = l || v),
                l && c > 0)
              )
                for (
                  u = dc(n, ke(r.categoryField, o[0])), p = u ? kc : ke, s = 0;
                  s < c;
                  s++
                )
                  (a = o[s]),
                    (h = p(r.categoryField, a, d.chartService.intl)),
                    (!u && k.get(h)) || (f.push([h, a]), u || k.set(h, !0));
            f.length > 0
              ? (u &&
                  (f = lw(f, function (n, t) {
                    return i.dateComparer(n[0], t[0]);
                  })),
                (w = aw(f)),
                (n.categories = w[0]))
              : v && (n.categories = []);
          },
          _isBindable: function (n) {
            for (
              var t, r = p.current.valueFields(n), f = !0, i = 0;
              i < r.length;
              i++
            )
              if (
                ((t = r[i]),
                t === pt ? (t = "field") : (t += "Field"),
                !u(n[t]))
              ) {
                f = !1;
                break;
              }
            return f;
          },
          _noTransitionsRedraw: function () {
            var t,
              n = this.options;
            n.transitions && ((n.transitions = !1), (t = !0));
            this._redraw();
            t && (n.transitions = !0);
          },
          _legendItemHover: function (n, t) {
            var r,
              u = this,
              i = u._plotArea,
              f = u._highlight,
              e = (i.srcSeries || i.series)[n];
            r = k(e.type, [ir, ne, te])
              ? i.findPoint(function (i) {
                  return i.series.index === n && i.index === t;
                })
              : i.pointsBySeriesIndex(n);
            f.show(r);
          },
          _shouldAttachMouseMove: function () {
            return (
              this._plotArea.crosshairs.length ||
              (this._tooltip && this._sharedTooltip()) ||
              this.requiresHandlers([nh, yo])
            );
          },
          updateMouseMoveHandler: function () {
            var n, t;
            wf(this.element, ((n = {}), (n[ru] = this._mousemove), n));
            this._shouldAttachMouseMove() &&
              pf(this.element, ((t = {}), (t[ru] = this._mousemove), t));
          },
          applyOptions: function (n, i) {
            ul(this._originalOptions, n);
            this._originalOptions = t(this._originalOptions, n);
            this.options = t({}, this._originalOptions);
            i && ((this._theme = i), (this.chartService.theme = i));
            this._initTheme(this.options, this._theme);
            this._toggleDragZoomEvents();
          },
          setOptions: function (n, t) {
            this.applyOptions(n, t);
            this.bindCategories();
            this.redraw();
            this.updateMouseMoveHandler();
          },
          setDirection: function (n) {
            this.chartService.rtl = !!n;
            this.surface &&
              "svg" === this.surface.type &&
              this._destroySurface();
          },
          setIntlService: function (n) {
            this.chartService.intl = n;
          },
          noTransitionsRedraw: function () {
            this._noTransitionsRedraw();
          },
          destroy: function () {
            var n, t;
            this._destroyed = !0;
            wf(
              this.element,
              ((n = {}),
              (n[sv] = this._clickHandler),
              (n[ce] = this._mousewheelHandler),
              (n[ru] = this._mousemove),
              (n[hv] = this._mouseleaveHandler),
              n)
            );
            this.domEvents && (this.domEvents.destroy(), delete this.domEvents);
            this._mouseMoveTrackHandler &&
              wf(
                document,
                ((t = {}), (t[ru] = this._mouseMoveTrackHandler), t)
              );
            this._destroyView();
            this._destroySurface();
            this._clearRedrawTimeout();
          },
          _destroySurface: function () {
            var n = this.surface;
            n &&
              (n.unbind("mouseenter", this._surfaceMouseenterHandler),
              n.unbind("mouseleave", this._surfaceMouseleaveHandler),
              n.destroy(),
              (this.surface = null));
          },
          _destroyView: function () {
            var t = this,
              i = t._model,
              n = t._selections;
            if ((i && (i.destroy(), (this._model = null)), n))
              for (; n.length > 0; ) n.shift().destroy();
            this._unsetActivePoint();
            this._tooltip && this._tooltip.destroy();
            this._highlight && this._highlight.destroy();
            this._zoomSelection &&
              (this._zoomSelection.destroy(), delete this._zoomSelection);
            this._pannable && (this._pannable.destroy(), delete this._pannable);
            this._mousewheelZoom &&
              (this._mousewheelZoom.destroy(), delete this._mousewheelZoom);
          },
        });
        kp = ["data", "categories"];
        f(cv, {
          renderAs: "",
          chartArea: {},
          legend: { visible: !0, labels: {} },
          categoryAxis: {},
          seriesDefaults: {
            type: pi,
            data: [],
            highlight: { visible: !0 },
            labels: {},
            negativeValues: { visible: !1 },
          },
          series: [],
          seriesColors: null,
          tooltip: { visible: !1 },
          transitions: !0,
          valueAxis: {},
          plotArea: {},
          title: {},
          xAxis: {},
          yAxis: {},
          panes: [{}],
          pannable: !1,
          zoomable: !1,
        });
        kendo.deepExtend(kendo.dataviz, {
          constants: hy,
          Aggregates: oo,
          AreaChart: fa,
          AreaSegment: tu,
          AxisGroupRangeTracker: ae,
          Bar: iu,
          BarChart: oi,
          BarLabel: us,
          BoxPlotChart: ea,
          BoxPlot: ye,
          BubbleChart: eh,
          Bullet: rf,
          BulletChart: fs,
          CandlestickChart: ve,
          Candlestick: si,
          CategoricalChart: it,
          CategoricalErrorBar: ia,
          CategoricalPlotArea: ci,
          Chart: cv,
          ChartContainer: hh,
          ClipAnimation: ts,
          ClusterLayout: tf,
          Crosshair: sh,
          CrosshairTooltip: oh,
          DefaultAggregates: hi,
          DonutChart: ic,
          DonutPlotArea: fv,
          DonutSegment: of,
          ErrorBarBase: go,
          ErrorRangeCalculator: ws,
          Highlight: ba,
          SharedTooltip: dh,
          Legend: bh,
          LegendItem: ga,
          LegendLayout: da,
          LineChart: nf,
          LinePoint: bt,
          LineSegment: wi,
          Pane: we,
          PieAnimation: gh,
          PieChart: ef,
          PieChartMixin: nc,
          PiePlotArea: tc,
          PieSegment: ff,
          PlotAreaBase: ht,
          PlotAreaEventsMixin: be,
          PlotAreaFactory: ri,
          PointEventsMixin: ii,
          RangeBar: es,
          RangeBarChart: ch,
          RangeAreaPoint: uf,
          RangeAreaChart: ah,
          ScatterChart: kt,
          ScatterErrorBar: oa,
          ScatterLineChart: ss,
          Selection: kh,
          SeriesAggregator: ha,
          SeriesBinder: p,
          SplineSegment: ns,
          SplineAreaSegment: rs,
          StackWrap: fh,
          Tooltip: tv,
          OHLCChart: ya,
          OHLCPoint: va,
          WaterfallChart: pa,
          WaterfallSegment: vh,
          XYPlotArea: hs,
          MousewheelZoom: ka,
          ZoomSelection: wh,
          Pannable: ph,
          ChartAxis: fl,
          ChartPane: eo,
          ChartPlotArea: el,
          findAxisByName: vc,
          anyHasZIndex: pc,
          appendIfNotNull: ys,
          areNumbers: wc,
          bindSegments: bc,
          categoriesCount: as,
          countNumbers: ls,
          equalsIgnoreCase: or,
          evalOptions: er,
          filterSeriesByType: b,
          getDateField: kc,
          getField: ke,
          hasGradientOverlay: vs,
          hasValue: at,
          isDateAxis: dc,
          segmentVisible: vv,
          singleItemOrArray: de,
          createOutOfRangePoints: nl,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/chart/chart.min",
      [
        "dataviz/chart/kendo-chart.min",
        "kendo.data.min",
        "kendo.dataviz.core.min",
        "kendo.dataviz.themes.min",
        "kendo.drawing.min",
        "kendo.userevents.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function pt(n) {
            s.fn[n] = function () {
              var t = this._instance;
              if (t) return t[n].apply(t, arguments);
            };
          }
          function wt(n, i) {
            var e,
              s,
              u,
              c = [],
              h = n.groupNameTemplate,
              a = i.length;
            if (0 === a) return (u = o({}, n)), (u.visibleInLegend = !1), [u];
            for (
              f(h)
                ? (r.logToConsole(
                    "'groupNameTemplate' is obsolete and will be removed in future versions. Specify the group name template as 'series.name'"
                  ),
                  h && (e = l(h)))
                : ((e = l(n.name || "")),
                  0 === e._slotCount &&
                    (e = l(
                      f(n.name)
                        ? "#= group.value #: #= series.name #"
                        : "#= group.value #"
                    ))),
                s = 0;
              s < a;
              s++
            )
              (u = o({}, n)),
                r.isFunction(u.color) || (u.color = t),
                (u._groupIx = s),
                (u._groupValue = i[s].value),
                c.push(u),
                e && (u.name = e({ series: u, group: i[s] }));
            return c;
          }
          function bt(n) {
            for (var i in n) n[i] === t && (n[i] = "");
            return n;
          }
          function kt(n) {
            for (var t = 0; t < n.length; t++) n[t].notifyRender();
          }
          var w,
            s,
            b,
            a,
            it,
            k,
            e,
            d,
            v,
            h,
            rt = ".kendoChart",
            r = window.kendo,
            g = r.Class,
            ut = r._outerWidth,
            ft = r._outerHeight,
            u = r.dataviz,
            i = u.constants,
            dt = u.Chart,
            gt = u.SeriesBinder,
            y = r.ui.Widget,
            et = r.data.DataSource,
            o = r.deepExtend,
            f = u.defined,
            ni = u.getField,
            ti = u.InstanceObserver,
            ii = u.inArray,
            ri = u.services,
            c = n.proxy,
            ui = n.isArray,
            ot = n.extend,
            l = r.template,
            p = "mouseleave" + rt,
            fi = i.AXIS_LABEL_CLICK,
            st = i.LEGEND_ITEM_CLICK,
            ei = i.LEGEND_ITEM_HOVER,
            oi = i.LEGEND_ITEM_LEAVE,
            si = i.SERIES_CLICK,
            hi = i.SERIES_HOVER,
            ci = i.SERIES_OVER,
            li = i.SERIES_LEAVE,
            ai = i.PANE_RENDER,
            vi = i.PLOT_AREA_CLICK,
            yi = i.PLOT_AREA_HOVER,
            pi = i.PLOT_AREA_LEAVE,
            wi = i.DRAG,
            bi = i.DRAG_END,
            ki = i.DRAG_START,
            di = i.ZOOM_START,
            gi = i.ZOOM,
            nr = i.ZOOM_END,
            tr = i.SELECT_START,
            ir = i.SELECT,
            rr = i.SELECT_END,
            ht = i.RENDER,
            ur = i.NOTE_CLICK,
            fr = i.NOTE_HOVER,
            er = i.NOTE_LEAVE,
            nt = "change",
            tt = "dataBound",
            ct = "leave",
            or = i.VALUE,
            lt = i.PIE,
            at = i.DONUT,
            vt = i.FUNNEL,
            yt = r.Observable,
            sr = 100,
            hr = "k-chart-tooltip-inverse",
            cr = "k-chart-shared-tooltip",
            lr = "rtl";
          for (
            ri.DomEventsBuilder.register({
              create: function (n, t) {
                return new r.UserEvents(
                  n,
                  o({ global: !0, multiTouch: !0, fastTap: !0 }, t)
                );
              },
            }),
              w = ti.extend({
                handlerMap: {
                  showTooltip: "_showTooltip",
                  hideTooltip: "_hideTooltip",
                  legendItemClick: "_onLegendItemClick",
                  render: "_onRender",
                  init: "_onInit",
                },
              }),
              s = y.extend({
                init: function (n, t) {
                  var i;
                  r.destroy(n);
                  y.fn.init.call(this, n);
                  t && ((i = t.dataSource), delete t.dataSource);
                  this.options = o({}, this.options, t);
                  this.wrapper = this.element;
                  this._attachEvents();
                  t && (t.dataSource = i);
                  this._seriesVisibility = new it();
                  this.bind(this.events, this.options);
                  this._initDataSource(t);
                  r.notify(this, u.ui);
                },
                events: [
                  tt,
                  si,
                  hi,
                  ci,
                  li,
                  fi,
                  st,
                  ei,
                  oi,
                  ai,
                  vi,
                  yi,
                  pi,
                  ki,
                  wi,
                  bi,
                  di,
                  gi,
                  nr,
                  tr,
                  ir,
                  rr,
                  ur,
                  fr,
                  er,
                  ht,
                ],
                options: {
                  name: "Chart",
                  renderAs: "",
                  theme: "default",
                  axisDefaults: {},
                  chartArea: {},
                  legend: {},
                  categoryAxis: {},
                  autoBind: !0,
                  seriesDefaults: {},
                  series: [],
                  seriesColors: null,
                  tooltip: {},
                  transitions: !0,
                  valueAxis: {},
                  plotArea: {},
                  title: {},
                  xAxis: {},
                  yAxis: {},
                  panes: [{}],
                  pannable: !1,
                  zoomable: !1,
                },
                items: function () {
                  return n();
                },
                refresh: function () {
                  var n = this,
                    t = n._instance;
                  t.applyDefaults(n.options);
                  t.applySeriesColors();
                  n._bindSeries();
                  n._bindCategories();
                  n.trigger(tt);
                  n._redraw();
                },
                getSize: function () {
                  return r.dimensions(this.element);
                },
                redraw: function (n) {
                  this._size = null;
                  this._instance.redraw(n);
                },
                setOptions: function (n) {
                  var t = this,
                    i = n.dataSource;
                  delete n.dataSource;
                  y.fn._setEvents.call(t, n);
                  this._instance.applyOptions(n, this._getThemeOptions(n));
                  this.options = this._instance.options;
                  this._tooltip.setOptions(this.options.tooltip);
                  this._seriesVisibility.setOptions(this.options);
                  this._sourceSeries = null;
                  i && t.setDataSource(i);
                  t._hasDataSource
                    ? t._onDataChanged()
                    : (t._bindCategories(), t.redraw());
                  t._instance.updateMouseMoveHandler();
                },
                setDataSource: function (n) {
                  var t = this;
                  t.dataSource.unbind(nt, t._dataChangeHandler);
                  t.dataSource = n = et.create(n);
                  t._hasDataSource = !0;
                  t._hasData = !1;
                  n.bind(nt, t._dataChangeHandler);
                  t.options.autoBind && n.fetch();
                },
                destroy: function () {
                  var n = this,
                    t = n.dataSource;
                  n.element.off(rt);
                  t && t.unbind(nt, n._dataChangeHandler);
                  n._instance && (n._instance.destroy(), delete this._instance);
                  this._tooltip &&
                    (this._tooltip.destroy(), delete this._tooltip);
                  this._destroyCrosshairTooltips();
                  y.fn.destroy.call(n);
                },
                findPaneByName: function (n) {
                  for (var i = this._plotArea.panes, t = 0; t < i.length; t++)
                    if (i[t].options.name === n) return new v(this, i[t]);
                },
                findPaneByIndex: function (n) {
                  var t = this._plotArea.panes;
                  if (t[n]) return new v(this, t[n]);
                },
                findSeries: function (n) {
                  for (
                    var r = this._plotArea, i = r.srcSeries || r.series, t = 0;
                    t < i.length;
                    t++
                  )
                    if (n(i[t])) return new h(this, i[t]);
                },
                findSeriesByName: function (n) {
                  return this._createSeries({ name: n });
                },
                findSeriesByIndex: function (n) {
                  return this._createSeries({ index: n });
                },
                exportVisual: function (n) {
                  var u,
                    i,
                    f,
                    r,
                    t = this._instance;
                  if (t)
                    return (
                      n && (n.width || n.height)
                        ? ((i = t.options.chartArea),
                          (f = t._originalOptions.chartArea),
                          o(i, n),
                          (r = t._getModel()),
                          (i.width = f.width),
                          (i.height = f.height),
                          r.renderVisual(),
                          kt(r._plotArea.panes),
                          (u = r.visual))
                        : (u = t.exportVisual()),
                      u
                    );
                },
                _createSeries: function (n) {
                  var t = this._seriesOptions(n);
                  if (t) return new h(this, t);
                },
                _seriesOptions: function (n) {
                  var r,
                    t,
                    u = this._plotArea,
                    i = u.srcSeries || u.series;
                  if (f(n.index)) r = i[n.index];
                  else if (f(n.name))
                    for (t = 0; t < i.length; t++)
                      if (i[t].name === n.name) {
                        r = i[t];
                        break;
                      }
                  return r;
                },
                _attachEvents: function () {
                  this.element.on(p, c(this._mouseleave, this));
                },
                _mouseleave: function (t) {
                  var i = this._instance,
                    u = this._tooltip,
                    r = t.relatedTarget;
                  (r && n(r).closest(u.element).length) ||
                    !i ||
                    i.handlingTap ||
                    i.hideElements();
                },
                _getThemeOptions: function (n) {
                  var r,
                    e,
                    i = (n || {}).theme;
                  return i && u.SASS_THEMES.indexOf(i.toLowerCase()) !== -1
                    ? u.autoTheme().chart
                    : f(i)
                    ? ((r = u.ui.themes || {}),
                      (e = r[i] || r[i.toLowerCase()] || {}),
                      e.chart || {})
                    : t;
                },
                _initChart: function () {
                  this._createChart(
                    this.options,
                    this._getThemeOptions(this.options)
                  );
                  this.options = this._instance.options;
                  this._seriesVisibility.setOptions(this.options);
                },
                _createChart: function (n, t) {
                  this._instance = new dt(this.element[0], n, t, {
                    observer: new w(this),
                    sender: this,
                    rtl: this._isRtl(),
                  });
                },
                _onInit: function (n) {
                  this._instance = n.sender;
                },
                _initDataSource: function (n) {
                  var t = this,
                    i = (n || {}).dataSource;
                  t._dataChangeHandler = c(t._onDataChanged, t);
                  t.dataSource = et
                    .create(i)
                    .bind("change", t._dataChangeHandler);
                  t._bindCategories();
                  i && (t._hasDataSource = !0);
                  this._initChart();
                  this._initTooltip();
                  i && t.options.autoBind && t.dataSource.fetch();
                },
                _destroyCrosshairTooltips: function () {
                  var t,
                    n = this._crosshairTooltips;
                  if (n) for (t in n) n[t].destroy();
                  this._crosshairTooltips = {};
                },
                _getCrosshairTooltip: function (n, t) {
                  var r = (this._crosshairTooltips =
                      this._crosshairTooltips || {}),
                    u = n + t,
                    i = r[u];
                  return i || (i = r[u] = new d(this.element)), i;
                },
                _showTooltip: function (n) {
                  if (n.crosshair) {
                    var t = this._getCrosshairTooltip(n.axisName, n.axisIndex);
                    t.show(n);
                  } else this._tooltip && this._tooltip.show(n);
                },
                _hideTooltip: function (n) {
                  if (n.crosshair) {
                    var t = this._getCrosshairTooltip(n.axisName, n.axisIndex);
                    t.hide();
                  } else this._tooltip && this._tooltip.hide(n);
                },
                _onRender: function (n) {
                  this._destroyCrosshairTooltips();
                  this._copyMembers(n.sender);
                  (this._hasDataSource &&
                    !this._hasData &&
                    this.options.autoBind) ||
                    this.trigger(ht);
                },
                _copyMembers: function (n) {
                  this.options = n.options;
                  this._originalOptions = n._originalOptions;
                  this.surface = n.surface;
                  this._plotArea = n._plotArea;
                  this._model = n._model;
                  this._highlight = n._highlight;
                  this._selections = n._selections;
                  this._pannable = n._pannable;
                  this._zoomSelection = n._zoomSelection;
                  this._mousewheelZoom = n._mousewheelZoom;
                },
                requiresHandlers: function (n) {
                  for (var i = this._events, t = 0; t < n.length; t++)
                    if (f(i[n[t]])) return !0;
                },
                _initTooltip: function () {
                  this._tooltip = this._createTooltip();
                  this._tooltip.bind(ct, c(this._tooltipleave, this));
                },
                _onLegendItemClick: function (n) {
                  this.trigger(st, n) ||
                    this._legendItemClick(n.seriesIndex, n.pointIndex);
                },
                _legendItemClick: function (t, i) {
                  var u,
                    e,
                    o,
                    s = this._instance,
                    h = s._plotArea,
                    r = (h.srcSeries || h.series)[t];
                  n.inArray(r.type, [lt, at, vt]) >= 0
                    ? ((u = r.data[i]),
                      u && f(u.visible)
                        ? (u.visible = !u.visible)
                        : ((e = r.pointVisibility = r.pointVisibility || {}),
                          (o = e[i]),
                          (e[i] = !!f(o) && !o)))
                    : ((r.visible = !r.visible),
                      this._seriesVisibility.save(r));
                  s._noTransitionsRedraw();
                },
                _createTooltip: function () {
                  return new e(
                    this.element,
                    ot({}, this.options.tooltip, { rtl: this._isRtl() })
                  );
                },
                _tooltipleave: function () {
                  this._instance && this._instance.hideElements();
                },
                _bindData: function (n) {
                  var r,
                    i,
                    f,
                    t = this,
                    s = t.options,
                    e = t._sourceSeries || s.series,
                    h = e.length,
                    c = t.dataSource.view(),
                    l = (t.dataSource.group() || []).length > 0,
                    u = [],
                    o = this._seriesVisibility;
                  for (o.read(), r = 0; r < h; r++)
                    (i = e[r]),
                      t._isBindable(i) && l
                        ? ((f = wt(i, c)),
                          (u = u.concat(f)),
                          o.applyByGroup(f, n))
                        : ((i = ot({}, i)), u.push(i), o.applyByIndex(i, n));
                  t._sourceSeries = e;
                  s.series = u;
                  this._instance.applySeriesColors();
                  t._bindSeries();
                  t._bindCategories();
                  this._hasData = !0;
                },
                _onDataChanged: function (n) {
                  this._bindData(n);
                  this.trigger(tt);
                  this._instance && this._instance.fontLoaded && this._redraw();
                },
                _bindSeries: function () {
                  for (
                    var n,
                      i,
                      u,
                      r = this,
                      e = r.dataSource.view(),
                      o = r.options.series,
                      s = o.length,
                      t = 0;
                    t < s;
                    t++
                  )
                    (n = o[t]),
                      r._isBindable(n) &&
                        ((i = n._groupIx),
                        (u = f(i) ? (e[i] || {}).items : e),
                        n.autoBind !== !1 && (n.data = u));
                },
                _bindCategories: function () {
                  var n,
                    i,
                    t = this,
                    r = t.dataSource.view() || [],
                    e = (t.dataSource.group() || []).length > 0,
                    u = r,
                    o = t.options,
                    f = [].concat(o.categoryAxis);
                  for (
                    e && r.length && (u = r[0].items), n = 0;
                    n < f.length;
                    n++
                  )
                    (i = f[n]),
                      i.autoBind !== !1 && t._bindCategoryAxis(i, u, n);
                },
                _bindCategoryAxis: function (n, t, i) {
                  var r,
                    f,
                    u,
                    e = (t || []).length;
                  if (n.field)
                    for (n.categories = [], r = 0; r < e; r++)
                      (u = t[r]),
                        (f = ni(n.field, u)),
                        0 === r
                          ? ((n.categories = [f]), (n.dataItems = [u]))
                          : (n.categories.push(f), n.dataItems.push(u));
                  else
                    this._instance &&
                      this._instance.bindCategoryAxisFromSeries(n, i);
                },
                _isBindable: function (n) {
                  for (
                    var t, r = gt.current.valueFields(n), u = !0, i = 0;
                    i < r.length;
                    i++
                  )
                    if (
                      ((t = r[i]),
                      t === or ? (t = "field") : (t += "Field"),
                      !f(n[t]))
                    ) {
                      u = !1;
                      break;
                    }
                  return u;
                },
                _isRtl: function () {
                  return (
                    r.support.isRtl(this.element) &&
                    this.element.css("direction") === lr
                  );
                },
              }),
              b = [
                "getAxis",
                "findAxisByName",
                "plotArea",
                "toggleHighlight",
                "showTooltip",
                "hideTooltip",
                "_resize",
                "_redraw",
                "_noTransitionsRedraw",
                "_legendItemHover",
                "_eventCoordinates",
              ],
              a = 0;
            a < b.length;
            a++
          )
            pt(b[a]);
          u.ExportMixin.extend(s.fn);
          r.PDFMixin && r.PDFMixin.extend(s.fn);
          u.ui.plugin(s);
          it = g.extend({
            init: function () {
              this.groups = {};
              this.index = {};
              this.options = {};
            },
            applyByGroup: function (n, t) {
              if ((t && t.action) || this.options.persistSeriesVisibility)
                for (var i = 0; i < n.length; i++)
                  this.groups[n[i]._groupValue] === !1 && (n[i].visible = !1);
              else this.groups = {};
            },
            applyByIndex: function (n, t) {
              (t && t.action) || this.options.persistSeriesVisibility
                ? this.index[n.index] === !1 && (n.visible = !1)
                : (this.index = {});
            },
            save: function (n) {
              n &&
                (this.options.persistSeriesVisibility
                  ? (this.options.series[n.index].visible = n.visible)
                  : this.saveState(n));
            },
            setOptions: function (n) {
              this.options = n;
              this.groups = {};
              this.index = {};
            },
            read: function () {
              var t,
                n,
                i = this.options;
              if (i.persistSeriesVisibility)
                for (t = i.series, n = 0; n < t.length; n++)
                  this.saveState(t[n]);
            },
            saveState: function (n) {
              f(n._groupValue)
                ? (this.groups[n._groupValue] = n.visible)
                : (this.index[n.index] = n.visible);
            },
          });
          k = r.geometry;
          e = yt.extend({
            init: function (t, i) {
              var f,
                u = this;
              yt.fn.init.call(u);
              this.setOptions(i);
              u.chartElement = t;
              u.template = e.template;
              u.template ||
                (u.template = e.template =
                  r.template(
                    "<div class='k-tooltip k-chart-tooltip#= d.rtl ? \" k-rtl\" : \"\"#' style='display:none; position: absolute; font: #= d.font #;#if (d.border) {# border: #= d.border.width #px solid; #}#opacity: #= d.opacity #; filter: alpha(opacity=#= d.opacity * 100 #);'></div>",
                    { useWithBlock: !1, paramName: "d" }
                  ));
              u.element = n(u.template(u.options));
              u.move = c(u.move, u);
              u._mouseleave = c(u._mouseleave, u);
              f = r.format("[{0}='content'],[{0}='scroller']", r.attr("role"));
              u._mobileScroller = t.closest(f).data("kendoMobileScroller");
            },
            destroy: function () {
              this._clearShowTimeout();
              this.element &&
                (this.element.off(p).remove(), (this.element = null));
            },
            setOptions: function (n) {
              this.options = o({}, this.options, n);
            },
            options: {
              opacity: 1,
              animation: { duration: 150 },
              sharedTemplate:
                "<table><th colspan='#= colspan #'>#= categoryText #</th># for(var i = 0; i < points.length; i++) { ## var point = points[i]; #<tr># if(colorMarker) { # <td><span class='k-chart-shared-tooltip-marker' style='background-color:#:point.series.color#'></span></td># } ## if(nameColumn) { # <td> #if (point.series.name) {# #: point.series.name #: #} else {# &nbsp; #}#</td># } #<td>#= content(point) #</td></tr># } #</table>",
              categoryFormat: "{0:d}",
            },
            move: function () {
              var t,
                n = this,
                r = n.options,
                i = n.element;
              n.anchor &&
                n.element &&
                ((t = n._offset()),
                n.visible || i.css({ top: t.top, left: t.left }),
                (n.visible = !0),
                n._ensureElement(document.body),
                i
                  .stop(!0, !0)
                  .show()
                  .animate({ left: t.left, top: t.top }, r.animation.duration));
            },
            _clearShowTimeout: function () {
              this.showTimeout &&
                (clearTimeout(this.showTimeout), (this.showTimeout = null));
            },
            getAnchor: function (n) {
              var u = this.anchor,
                f = u.point,
                t = u.align,
                i = f.left,
                r = f.top;
              return (
                "center" === t.horizontal
                  ? (i -= n.width / 2)
                  : "right" === t.horizontal && (i -= n.width),
                "center" === t.vertical
                  ? (r -= n.height / 2)
                  : "bottom" === t.vertical && (r -= n.height),
                { x: i, y: r }
              );
            },
            _offset: function () {
              var s,
                e,
                f = this,
                o = f._measure(),
                h = f.getAnchor(o),
                i = h.y,
                u = h.x,
                c = r.support.zoomLevel(),
                l = n(window),
                a =
                  window.pageYOffset || document.documentElement.scrollTop || 0,
                v =
                  window.pageXOffset ||
                  document.documentElement.scrollLeft ||
                  0,
                t = (this._mobileScroller || {}).movable;
              return (
                t && 1 !== t.scale
                  ? ((s = k.transform().scale(t.scale, t.scale, [t.x, t.y])),
                    (e = new k.Point(u, i).transform(s)),
                    (u = e.x),
                    (i = e.y))
                  : ((i += f._fit(i - a, o.height, ft(l) / c)),
                    (u += f._fit(u - v, o.width, ut(l) / c))),
                { top: i, left: u }
              );
            },
            show: function (n) {
              this.anchor = n.anchor;
              this.element.css(bt(n.style));
              this.element.toggleClass(hr, !!n.className);
              this.element.toggleClass(cr, !!n.shared);
              var t = n.shared
                ? this._sharedContent(n)
                : this._pointContent(n.point);
              this.element.html(t);
              this._clearShowTimeout();
              this.showTimeout = setTimeout(this.move, sr);
            },
            hide: function () {
              var n = this;
              clearTimeout(n.showTimeout);
              n._hideElement();
              n.visible &&
                ((n.point = null), (n.visible = !1), (n.index = null));
            },
            _sharedContent: function (n) {
              var i,
                h,
                e = n.points,
                o = u.grep(e, function (n) {
                  return f(n.series.name);
                }).length,
                s = n.series.length > 1,
                t = 1;
              return (
                o && t++,
                s && t++,
                (i = r.template(this.options.sharedTemplate)),
                (h = i({
                  points: e,
                  category: n.category,
                  categoryText: n.categoryText,
                  content: this._pointContent,
                  colorMarker: s,
                  nameColumn: o,
                  colspan: t,
                }))
              );
            },
            _measure: function () {
              this._ensureElement();
              return { width: ut(this.element), height: ft(this.element) };
            },
            _ensureElement: function () {
              this.element &&
                this.element.appendTo(document.body).on(p, this._mouseleave);
            },
            _mouseleave: function (t) {
              var i = t.relatedTarget,
                r = this.chartElement[0];
              i && i !== r && !n.contains(r, i) && this.trigger(ct);
            },
            _hideElement: function () {
              var t = this,
                n = this.element;
              n &&
                n.fadeOut({
                  always: function () {
                    t.visible || n.off(p).remove();
                  },
                });
            },
            _pointContent: function (n) {
              var t,
                r,
                u = this,
                i = o({}, u.options, n.options.tooltip);
              return (
                f(n.value) && (t = "" + n.value),
                i.template
                  ? ((r = l(i.template)),
                    (t = r({
                      value: n.value,
                      category: n.category,
                      series: n.series,
                      dataItem: n.dataItem,
                      percentage: n.percentage,
                      runningTotal: n.runningTotal,
                      total: n.total,
                      low: n.low,
                      high: n.high,
                      xLow: n.xLow,
                      xHigh: n.xHigh,
                      yLow: n.yLow,
                      yHigh: n.yHigh,
                    })))
                  : i.format && (t = n.formatValue(i.format)),
                t
              );
            },
            _fit: function (n, t, i) {
              var r = 0;
              return n + t > i && (r = i - (n + t)), n < 0 && (r = -n), r;
            },
          });
          d = e.extend({
            init: function (n, t) {
              e.fn.init.call(this, n, t);
              this.element.addClass("k-chart-crosshair-tooltip");
            },
            show: function (n) {
              var t = this.element;
              t &&
                ((this.anchor = n.anchor),
                this.element.css(n.style),
                this.element.html(this.content(n)),
                this.move());
            },
            move: function () {
              var n = this,
                i = n.element,
                t = n._offset();
              n._ensureElement();
              i.css({ top: t.top, left: t.left }).show();
            },
            content: function (n) {
              var t = n.value,
                i = n.crosshair.options.tooltip;
              return i.template && (t = l(i.template)({ value: t })), t;
            },
            hide: function () {
              this.element.hide();
            },
          });
          v = g.extend({
            init: function (n, t) {
              this._chart = n;
              this._pane = t;
              this.visual = t.visual;
              this.chartsVisual = t.chartContainer.visual;
              this.name = t.options.name;
            },
            series: function () {
              var n,
                i = this._chart,
                u = i._plotArea.groupSeriesByPane(),
                t = u[this.name || "default"],
                r = [];
              if (t) for (n = 0; n < t.length; n++) r.push(new h(i, t[n]));
              return r;
            },
          });
          h = g.extend({
            init: function (n, t) {
              this._chart = n;
              this._options = t;
            },
            points: function (n) {
              var i,
                u,
                t = this._points;
              return (
                t ||
                  ((i = this._seriesOptions()),
                  (u = this._chart._plotArea),
                  (this._points = t = u.pointsBySeriesIndex(i.index))),
                r.isFunction(n) && (t = this._filterPoints(t, n)),
                t
              );
            },
            data: function (n) {
              var t,
                u,
                r,
                f,
                i = this._seriesOptions();
              return (
                n &&
                  ((t = this._chart),
                  (u = t._plotArea),
                  (i.data = n),
                  i.categoryField &&
                    ((r = u.seriesCategoryAxis(i)),
                    (f = [].concat(t.options.categoryAxis)),
                    t._instance.bindCategoryAxisFromSeries(
                      f[r.axisIndex],
                      r.axisIndex
                    )),
                  t._noTransitionsRedraw(),
                  this._clearFields()),
                i.data
              );
            },
            findPoint: function (n) {
              for (var i = this.points(), t = 0; t < i.length; t++)
                if (n(i[t])) return i[t];
            },
            toggleHighlight: function (n, t) {
              t = t
                ? r.isFunction(t)
                  ? this.points(t)
                  : ui(t)
                  ? t
                  : [t]
                : this.points();
              this._chart._instance.togglePointsHighlight(n, t);
            },
            toggleVisibility: function (n, t) {
              var f,
                i,
                e = this._chart,
                u = this._seriesOptions(),
                o = r.isFunction(t);
              if (o)
                if (ii(u.type, [lt, at, vt]))
                  for (f = this._filterData(t), i = 0; i < f.length; i++)
                    f[i].visible = n;
                else
                  u.visible = function (i) {
                    return !t(i.dataItem) || n;
                  };
              else (u.visible = n), e._seriesVisibility.save(u);
              e._noTransitionsRedraw();
              this._clearFields();
            },
            _filterData: function (n) {
              for (
                var i = this._seriesOptions().data, u = i.length, r = [], t = 0;
                t < u;
                t++
              )
                n(i[t]) && r.push(i[t]);
              return r;
            },
            _filterPoints: function (n, t) {
              for (var r = [], u = n.length, i = 0; i < u; i++)
                t(n[i]) && r.push(n[i]);
              return r;
            },
            _seriesOptions: function () {
              var n = this._series;
              return (
                n ||
                  (n = this._series =
                    this._chart._seriesOptions(this._options)),
                n
              );
            },
            _clearFields: function () {
              delete this._points;
              delete this._series;
            },
          });
          u.Tooltip = e;
          u.CrosshairTooltip = d;
          u.ChartInstanceObserver = w;
          u.ChartPane = v;
          u.ChartSeries = h;
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.chart.min",
      ["dataviz/chart/kendo-chart.min", "dataviz/chart/chart.min"],
      n
    );
  })(
    function () {
      return window.kendo;
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/gauge/kendo-gauges.min",
      [
        "kendo.core.min",
        "kendo.color.min",
        "kendo.drawing.min",
        "kendo.dataviz.core.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        function gi(n, t) {
          var r = n.getOrigin(),
            u = n.getSize(),
            i = tt(t);
          return (
            n.setOrigin([r.x - i.left, r.y - i.top]),
            n.setSize([
              u.width + (i.left + i.right),
              u.height + (i.top + i.bottom),
            ]),
            n
          );
        }
        function nr(n, t) {
          var i = n.box,
            e = n.children[0].box,
            r = t.border || {},
            h = t.background || "",
            c = pi.fromRect(new s([i.x1, i.y1], [i.width(), i.height()]), {
              stroke: {},
            }),
            o = new sr(n.text, new f(e.x1, e.y1), {
              font: t.font,
              fill: { color: t.color },
            }),
            l = gi(o.bbox().clone(), t.padding),
            a = pi.fromRect(l, {
              stroke: {
                color: r.width ? r.color : "",
                width: r.width,
                dashType: r.dashType,
                lineJoin: "round",
                lineCap: "round",
              },
              fill: { color: h },
            }),
            u = new or();
          return u.append(c), u.append(a), u.append(o), u;
        }
        function tr(n, t, i) {
          var r = u(n.from) ? n.from : e.MIN_VALUE,
            f = u(n.to) ? n.to : e.MAX_VALUE;
          return (
            (n.from = Math.max(Math.min(f, r), t)),
            (n.to = Math.min(Math.max(f, r), i)),
            n
          );
        }
        function ir(n, t) {
          var i = tt(t);
          return (
            (i.left = -i.left),
            (i.top = -i.top),
            (i.right = -i.right),
            (i.bottom = -i.bottom),
            gi(n, i)
          );
        }
        function fu(n, t) {
          var r,
            u,
            o,
            i = n.position,
            f = n.tickX,
            e = n.tickY;
          return (
            n.vertical
              ? ((r = new vt(f, i)), (u = new vt(f + t.size, i)))
              : ((r = new vt(i, e)), (u = new vt(i, e + t.size))),
            (o = new dt({ stroke: { color: t.color, width: t.width } })
              .moveTo(r)
              .lineTo(u))
          );
        }
        function rr(n, t, i, r) {
          var e,
            u,
            f,
            o = t.length;
          if (r.visible)
            for (e = i.mirror, u = i.lineBox, f = r.skip; f < o; f += r.step)
              f % r.skipUnit != 0 &&
                ((i.tickX = e ? u.x2 : u.x2 - r.size),
                (i.tickY = e ? u.y1 - r.size : u.y1),
                (i.position = t[f]),
                n.append(fu(i, r)));
        }
        function ur(n, t, i, r) {
          var u,
            o,
            s,
            h = new pt(),
            e = n.center,
            c = n.getRadiusX();
          if (r.visible)
            for (u = 0; u < t.length; u++)
              (o = n.pointAt(t[u])),
                (s = new f(e.x + c - r.size, e.y).rotate(t[u], e)),
                h.append(
                  new kr({ stroke: { color: r.color, width: r.width } })
                    .moveTo(o)
                    .lineTo(s)
                );
          return h;
        }
        function oi(n, t, i, r) {
          return { from: n, to: t, color: i, opacity: r };
        }
        var i,
          tt,
          u,
          e,
          p,
          et,
          fr,
          t,
          ot,
          r,
          st,
          ht,
          o,
          h,
          c,
          l,
          v,
          y,
          w,
          ct,
          b,
          s,
          f,
          k,
          it,
          si,
          er,
          hi,
          rt,
          ci,
          d,
          li,
          ai,
          a,
          lt,
          kt,
          vi,
          yi,
          or,
          pi,
          sr,
          hr,
          cr,
          lr,
          at,
          dt,
          ut,
          vt,
          gt,
          ft,
          g,
          ni,
          nt,
          ar,
          wi,
          ti,
          vr,
          bi,
          ki,
          yr,
          pr,
          wr,
          di,
          yt,
          br,
          kr,
          pt,
          wt,
          ii,
          dr,
          gr,
          nu,
          tu,
          ri,
          iu,
          bt,
          ui,
          ru,
          fi,
          ei,
          uu;
        window.kendo.dataviz = window.kendo.dataviz || {};
        i = kendo.dataviz;
        tt = i.getSpacing;
        u = i.defined;
        e = i.constants;
        p = e.BLACK;
        et = e.COORD_PRECISION;
        fr = i.services;
        t = i.deepExtend;
        ot = i.isArray;
        r = i.setDefaultOptions;
        st = i.NumericAxis;
        ht = i.limitValue;
        o = i.Box;
        h = i.interpolateValue;
        c = i.round;
        l = kendo.drawing;
        v = l.Group;
        y = l.Path;
        w = l.Animation;
        ct = l.AnimationFactory;
        b = kendo.geometry;
        s = b.Rect;
        f = b.Point;
        k = b.transform;
        it = 150;
        si = 250;
        er = "arrow";
        hi = "arrowPointer";
        rt = "barPointer";
        ci = 200;
        d = 0.5;
        li = 200;
        ai = Math.PI / 180;
        a = "inside";
        lt = "linear";
        kt = "outside";
        vi = "radialPointer";
        yi = "radialRangePointer";
        or = v;
        pi = y;
        sr = l.Text;
        hr = 5;
        cr = y;
        lr = l.Surface;
        at = i.Class.extend({
          init: function (n, i, r, u) {
            void 0 === u && (u = {});
            this.element = n;
            this.theme = r;
            this.contextService = new fr.ChartService(this, u);
            this._originalOptions = t({}, this.options, i);
            this.options = t({}, this._originalOptions);
            this._initTheme(r);
            this.redraw();
          },
          destroy: function () {
            this.surface && (this.surface.destroy(), (this.surface = null));
            delete this.element;
            delete this.surfaceElement;
          },
          value: function (n) {
            var t = this.pointers[0];
            return 0 === arguments.length
              ? t.value()
              : (t.value(n), void this._setValueOptions(n));
          },
          _draw: function () {
            var n = this.surface;
            n.clear();
            n.draw(this._visuals);
          },
          exportVisual: function () {
            return this._visuals;
          },
          allValues: function (n) {
            var r,
              t,
              u = this.pointers,
              f = [];
            if (0 === arguments.length) {
              for (r = 0; r < u.length; r++) f.push(u[r].value());
              return f;
            }
            if (ot(n))
              for (t = 0; t < n.length; t++)
                i.isNumber(n[t]) && u[t].value(n[t]);
            this._setValueOptions(n);
          },
          _setValueOptions: function (n) {
            for (
              var r = [].concat(this.options.pointer), i = [].concat(n), t = 0;
              t < i.length;
              t++
            )
              r[t].value = i[t];
          },
          resize: function () {
            this.noTransitionsRedraw();
          },
          noTransitionsRedraw: function () {
            var n = this.options.transitions;
            this._toggleTransitions(!1);
            this.redraw();
            this._toggleTransitions(n);
          },
          redraw: function () {
            var n,
              t = this._surfaceSize(),
              i = new s([0, 0], [t.width, t.height]);
            this._initSurface();
            this.gaugeArea = this._createGaugeArea();
            this._createModel();
            n = ir(i.bbox(), this._gaugeAreaMargin);
            this.reflow(n);
          },
          setOptions: function (n, i) {
            this._originalOptions = t(this._originalOptions, n);
            this.options = t({}, this._originalOptions);
            this._initTheme(i);
            this.redraw();
          },
          setDirection: function (n) {
            this.contextService.rtl = !!n;
            this.surface &&
              "svg" === this.surface.type &&
              (this.surface.destroy(), (this.surface = null));
          },
          setIntlService: function (n) {
            this.contextService.intl = n;
          },
          _initTheme: function (n) {
            var u,
              i,
              f,
              r,
              e = n || this.theme || {};
            if (
              ((this.theme = e),
              (this.options = t({}, e, this.options)),
              (u = this.options),
              (i = u.pointer),
              ot(i))
            ) {
              for (f = [], r = 0; r < i.length; r++)
                f.push(t({}, e.pointer, i[r]));
              u.pointer = f;
            }
          },
          _createGaugeArea: function () {
            var u,
              t = this.options.gaugeArea,
              r = this.surface.size(),
              n = t.border || {},
              i = new s([0, 0], [r.width, r.height]);
            return (
              (this._gaugeAreaMargin = t.margin || hr),
              n.width > 0 && (i = ir(i, n.width)),
              (u = cr.fromRect(i, {
                stroke: {
                  color: n.width ? n.color : "",
                  width: n.width,
                  dashType: n.dashType,
                  lineJoin: "round",
                  lineCap: "round",
                },
                fill: { color: t.background },
              }))
            );
          },
          _initSurface: function () {
            var t = this,
              r = t.options,
              n = t.surface,
              u = this._surfaceElement(),
              f = this._surfaceSize();
            i.elementSize(u, f);
            n && n.options.type === r.renderAs
              ? (this.surface.clear(), this.surface.resize())
              : (n && n.destroy(),
                (this.surface = lr.create(u, { type: r.renderAs })));
          },
          _surfaceSize: function () {
            var n = this.options,
              i = this._getSize();
            return n.gaugeArea && t(i, n.gaugeArea), i;
          },
          _surfaceElement: function () {
            return (
              this.surfaceElement ||
                ((this.surfaceElement = document.createElement("div")),
                this.element.appendChild(this.surfaceElement)),
              this.surfaceElement
            );
          },
          getSize: function () {
            return this._getSize();
          },
          _getSize: function () {
            var i = this.element,
              r = this._defaultSize(),
              n = i.offsetWidth,
              t = i.offsetHeight;
            return (
              n || (n = r.width), t || (t = r.height), { width: n, height: t }
            );
          },
          _defaultSize: function () {
            return { width: li, height: ci };
          },
          _toggleTransitions: function (n) {
            var t,
              i = this;
            for (
              this.options.transitions = n, t = 0;
              t < this.pointers.length;
              t++
            )
              i.pointers[t].options.animation.transitions = n;
          },
        });
        r(at, {
          plotArea: {},
          theme: "default",
          renderAs: "",
          pointer: {},
          scale: {},
          gaugeArea: {},
        });
        dt = y;
        ut = v;
        vt = f;
        gt = st.extend({
          init: function (t, i) {
            var r = t || {};
            !u(r.reverse) &&
              r.vertical === !1 &&
              (i || {}).rtl &&
              (r = n.extend({}, r, { reverse: !0 }));
            st.fn.init.call(this, 0, 1, r, i);
            this.options.minorUnit =
              this.options.minorUnit || this.options.majorUnit / 10;
          },
          initUserOptions: function (n) {
            var r = t({}, this.options, n);
            return (
              (r = t({}, r, { labels: { mirror: r.mirror } })),
              (r.majorUnit = r.majorUnit || i.autoMajorUnit(r.min, r.max)),
              r
            );
          },
          initFields: function () {},
          render: function () {
            var n = (this.elements = new ut()),
              t = this.renderLabels(),
              i = this.renderLine(),
              r = this.renderTicks(),
              u = this.renderRanges();
            return n.append(i, t, r, u), n;
          },
          renderRanges: function () {
            for (
              var t,
                f,
                i,
                r,
                e = this,
                n = this.options,
                v = n.min,
                y = n.max,
                o = n.vertical,
                h = n.labels.mirror,
                c = n.ranges || [],
                l = new ut(),
                p = c.length,
                a = n.rangeSize || n.minorTicks.size / 2,
                u = 0;
              u < p;
              u++
            )
              (t = tr(c[u], v, y)),
                (f = e.getSlot(t.from, t.to)),
                (i = o ? e.lineBox() : f),
                (r = o ? f : e.lineBox()),
                o ? (i.x1 -= a * (h ? -1 : 1)) : (r.y2 += a * (h ? -1 : 1)),
                l.append(
                  dt.fromRect(new s([i.x1, r.y1], [i.x2 - i.x1, r.y2 - r.y1]), {
                    fill: { color: t.color, opacity: t.opacity },
                    stroke: {},
                  })
                );
            return l;
          },
          renderLabels: function () {
            for (
              var t = this, i = t.labels, u = t.options, r = new ut(), n = 0;
              n < i.length;
              n++
            )
              r.append(nr(i[n], u.labels));
            return r;
          },
          renderLine: function () {
            var i,
              n = this.options.line,
              t = this.lineBox(),
              r = new ut();
            return (
              n.width > 0 &&
                n.visible &&
                ((i = new dt({
                  stroke: {
                    color: n.color,
                    dashType: n.dashType,
                    width: n.width,
                  },
                })),
                i.moveTo(t.x1, t.y1).lineTo(t.x2, t.y2),
                r.append(i)),
              r
            );
          },
          renderTicks: function () {
            var i = new ut(),
              n = this.options,
              u = n.majorTicks.visible ? n.majorUnit : 0,
              r = {
                vertical: n.vertical,
                mirror: n.labels.mirror,
                lineBox: this.lineBox(),
              };
            return (
              rr(i, this.getMajorTickPositions(), r, n.majorTicks),
              rr(
                i,
                this.getMinorTickPositions(),
                r,
                t({}, { skipUnit: u / n.minorUnit }, n.minorTicks)
              ),
              i
            );
          },
        });
        r(gt, {
          min: 0,
          max: 50,
          majorTicks: { size: 15, align: a, color: p, width: d, visible: !0 },
          minorTicks: { size: 10, align: a, color: p, width: d, visible: !0 },
          line: { width: d },
          labels: { position: a, padding: 2 },
          mirror: !1,
          _alignLines: !1,
        });
        ft = i.Class.extend({
          init: function (n, i) {
            var f = n.options,
              e = f.min,
              o = f.max,
              r = (this.options = t({}, this.options, i));
            r.fill = r.color;
            this.scale = n;
            r.value = u(r.value) ? ht(r.value, e, o) : e;
          },
          value: function (n) {
            var i,
              r,
              f,
              t = this.options,
              e = t.value;
            return 0 === arguments.length
              ? e
              : ((i = this.scale.options),
                (r = i.min),
                (f = i.max),
                (t._oldValue = u(t._oldValue) ? t.value : r),
                (t.value = ht(n, r, f)),
                void (this.elements && this.repaint()));
          },
        });
        r(ft, { color: p });
        g = ft.extend({
          init: function (n, i) {
            ft.fn.init.call(this, n, i);
            this.options = t({ track: { visible: u(i.track) } }, this.options);
          },
          reflow: function () {
            var h,
              u,
              i,
              c = this,
              r = c.options,
              l = c.scale,
              a = l.options,
              f = a.mirror,
              v = a.vertical,
              n = l.lineBox(),
              e = r.track.size || r.size,
              s = r.size / 2,
              y = tt(r.margin),
              t = v ? y[f ? "left" : "right"] : y[f ? "bottom" : "top"];
            t = f ? -t : t;
            v
              ? ((i = new o(n.x1 + t, n.y1, n.x1 + t, n.y2)),
                f ? (i.x1 -= e) : (i.x2 += e),
                r.shape !== rt &&
                  ((u = new o(n.x2 + t, n.y1 - s, n.x2 + t, n.y2 + s)),
                  (h = u)))
              : ((i = new o(n.x1, n.y1 - t, n.x2, n.y1 - t)),
                f ? (i.y2 += e) : (i.y1 -= e),
                r.shape !== rt &&
                  ((u = new o(n.x1 - s, n.y1 - t, n.x2 + s, n.y1 - t)),
                  (h = u)));
            this.trackBox = i;
            this.pointerRangeBox = u;
            this.box = h || i.clone().pad(r.border.width);
          },
          getElementOptions: function () {
            var n = this.options;
            return {
              fill: { color: n.color, opacity: n.opacity },
              stroke: u(n.border)
                ? {
                    color: n.border.width ? n.border.color || n.color : "",
                    width: n.border.width,
                    dashType: n.border.dashType,
                    opacity: n.opacity,
                  }
                : null,
            };
          },
          _margin: function () {
            var n = this,
              u = n.scale,
              f = n.options,
              t = u.options,
              i = t.mirror,
              e = t.vertical,
              r = tt(f.margin);
            return e ? r[i ? "left" : "right"] : r[i ? "bottom" : "top"];
          },
        });
        r(g, {
          shape: rt,
          track: { border: { width: 1 } },
          color: p,
          border: { width: 1 },
          opacity: 1,
          margin: tt(3),
          animation: { type: rt },
          visible: !0,
        });
        ni = w.extend({
          setup: function () {
            var e,
              o,
              n = this.options,
              t = n.margin,
              i = n.from,
              r = n.to,
              s = n.vertical,
              u = s ? "x1" : "y1";
            n.mirror === s
              ? ((i[u] -= t), (r[u] -= t))
              : ((i[u] += t), (r[u] += t));
            e = this.fromScale = new f(i.x1, i.y1);
            o = this.toScale = new f(r.x1, r.y1);
            0 !== n.duration &&
              (n.duration = Math.max((e.distanceTo(o) / n.duration) * 1e3, 1));
          },
          step: function (n) {
            var t = h(this.fromScale.x, this.toScale.x, n),
              i = h(this.fromScale.y, this.toScale.y, n);
            this.element.transform(k().translate(t, i));
          },
        });
        r(ni, { easing: lt, duration: si });
        ct.current.register(hi, ni);
        nt = f;
        ar = y;
        wi = g.extend({
          init: function (n, t) {
            g.fn.init.call(this, n, t);
            u(this.options.size) ||
              (this.options.size = 0.6 * this.scale.options.majorTicks.size);
          },
          pointerShape: function () {
            var i = this,
              r = i.scale,
              t = i.options.size,
              n = t / 2,
              u = r.options.mirror ? -1 : 1;
            return r.options.vertical
              ? [new nt(0, 0 - n), new nt(0 - u * t, 0), new nt(0, 0 + n)]
              : [new nt(0 - n, 0), new nt(0, 0 + u * t), new nt(0 + n, 0)];
          },
          repaint: function () {
            var u = this,
              i = u.scale,
              n = u.options,
              r = new ni(
                this.elements,
                t(n.animation, {
                  vertical: i.options.vertical,
                  mirror: i.options.mirror,
                  margin: this._margin(n.margin),
                  from: i.getSlot(n._oldValue),
                  to: i.getSlot(n.value),
                })
              );
            n.animation.transitions === !1 && (r.options.duration = 0);
            r.setup();
            r.play();
          },
          render: function () {
            var n,
              t,
              u = this,
              e = u.scale,
              i = u.options,
              f = this.getElementOptions(),
              r = this.pointerShape(i.value);
            return (
              (i.animation.type = hi),
              (n = new ar({ stroke: f.stroke, fill: f.fill })
                .moveTo(r[0])
                .lineTo(r[1])
                .lineTo(r[2])
                .close()),
              (t = e.getSlot(i.value)),
              n.transform(k().translate(t.x1, t.y1)),
              (this.elements = n),
              n
            );
          },
        });
        ti = w.extend({
          setup: function () {
            var n = this.options,
              t = (this.axis = n.vertical ? e.Y : e.X),
              r = (this.to = n.newPoints[0][t]),
              i = (this.from = n.oldPoints[0][t]);
            0 !== n.duration &&
              (n.duration = Math.max((Math.abs(r - i) / n.speed) * 1e3, 1));
            this._set(i);
          },
          step: function (n) {
            var t = h(this.from, this.to, n);
            this._set(t);
          },
          _set: function (n) {
            var t = "set" + this.axis.toUpperCase(),
              i = this.options.newPoints;
            i[0][t](n);
            i[1][t](n);
          },
        });
        r(ti, { easing: lt, speed: si });
        ct.current.register(rt, ti);
        vr = v;
        bi = y;
        ki = g.extend({
          init: function (n, t) {
            g.fn.init.call(this, n, t);
            u(this.options.size) ||
              (this.options.size = 0.3 * this.scale.options.majorTicks.size);
          },
          pointerShape: function (n) {
            var t,
              u,
              o,
              v = this,
              s = v.scale,
              k = v.options,
              y = s.options,
              d = y.mirror,
              r = y.vertical,
              p = d === r ? -1 : 1,
              h = k.size * p,
              w = s.getSlot(s.options.min),
              b = s.getSlot(n),
              c = r ? e.Y : e.X,
              l = r ? e.X : e.Y,
              a = this._margin() * p,
              i = new f();
            return (
              (i[c] = w[c + "1"]),
              (i[l] = w[l + "1"]),
              (t = new f()),
              (t[c] = b[c + "1"]),
              (t[l] = b[l + "1"]),
              r
                ? (i.translate(a, 0), t.translate(a, 0))
                : (i.translate(0, a), t.translate(0, a)),
              (u = t.clone()),
              (o = i.clone()),
              r
                ? (u.translate(h, 0), o.translate(h, 0))
                : (u.translate(0, h), o.translate(0, h)),
              [i, t, u, o]
            );
          },
          repaint: function () {
            var i,
              u = this,
              f = u.scale,
              r = u.options,
              n = this.pointerShape(r.value),
              e = this.pointerPath,
              o = this.pointerShape(r._oldValue);
            e.moveTo(n[0]).lineTo(n[1]).lineTo(n[2]).lineTo(n[3]).close();
            i = new ti(
              e,
              t(r.animation, {
                reverse: f.options.reverse,
                vertical: f.options.vertical,
                oldPoints: [o[1], o[2]],
                newPoints: [n[1], n[2]],
              })
            );
            r.animation.transitions === !1 && (i.options.duration = 0);
            i.setup();
            i.play();
          },
          render: function () {
            var t,
              n = new vr(),
              i = this.getElementOptions();
            return (
              this.options.track.visible && n.append(this.renderTrack()),
              (t = this.pointerPath =
                new bi({ stroke: i.stroke, fill: i.fill })),
              n.append(t),
              (this.elements = n),
              n
            );
          },
          renderTrack: function () {
            var t = this.options.track,
              n = t.border || {},
              i = this.trackBox.clone().pad(n.width || 0);
            return new bi.fromRect(i.toRect(), {
              fill: { color: t.color, opacity: t.opacity },
              stroke: {
                color: n.width ? n.color || t.color : "",
                width: n.width,
                dashType: n.dashType,
              },
            });
          },
        });
        yr = 60;
        pr = 60;
        wr = v;
        di = at.extend({
          reflow: function (n) {
            var t,
              r = this.pointers,
              u = n.origin.x,
              f = n.origin.y,
              i = new o(u, f, u + n.width(), f + n.height());
            for (
              this.scale.reflow(i), this._shrinkScaleWidth(i), t = 0;
              t < r.length;
              t++
            )
              r[t].reflow();
            this.bbox = this._getBox(i);
            this._alignElements();
            this._shrinkElements();
            this._buildVisual();
            this._draw();
          },
          _buildVisual: function () {
            var n,
              t,
              i = new wr(),
              u = this.scale.render(),
              r = this.pointers;
            for (
              i.append(this.gaugeArea), i.append(u), n = 0;
              n < r.length;
              n++
            )
              (t = r[n]), i.append(t.render()), t.value(t.options.value);
            this._visuals = i;
          },
          _createModel: function () {
            var n,
              i,
              r,
              f,
              e = this,
              u = this.options,
              o = (this.scale = new gt(u.scale, this.contextService));
            for (
              this.pointers = [], n = u.pointer, n = ot(n) ? n : [n], i = 0;
              i < n.length;
              i++
            )
              (r = t({}, n[i], { animation: { transitions: u.transitions } })),
                (f = r.shape === er ? wi : ki),
                e.pointers.push(new f(o, r));
          },
          _defaultSize: function () {
            var n = this.options.scale.vertical;
            return { width: n ? yr : li, height: n ? ci : pr };
          },
          _getBox: function (n) {
            for (
              var t,
                e = this,
                s = e.scale,
                f = e.pointers,
                u = n.center(),
                i = f[0].box.clone().wrap(s.box),
                r = 0;
              r < f.length;
              r++
            )
              i.wrap(f[r].box.clone());
            return (
              s.options.vertical
                ? ((t = i.width() / 2),
                  (i = new o(u.x - t, n.y1, u.x + t, n.y2)))
                : ((t = i.height() / 2),
                  (i = new o(n.x1, u.y - t, n.x2, u.y + t))),
              i
            );
          },
          _alignElements: function () {
            for (
              var n,
                f,
                c = this,
                h = this,
                i = h.scale,
                r = h.pointers,
                t = i.box,
                s = r[0].box.clone().wrap(i.box),
                e = this.bbox,
                u = 0;
              u < r.length;
              u++
            )
              s.wrap(r[u].box.clone());
            for (
              i.options.vertical
                ? ((n = e.center().x - s.center().x),
                  i.reflow(new o(t.x1 + n, e.y1, t.x2 + n, e.y2)))
                : ((n = e.center().y - s.center().y),
                  i.reflow(new o(t.x1, t.y1 + n, t.x2, t.y2 + n))),
                f = 0;
              f < r.length;
              f++
            )
              r[f].reflow(c.bbox);
          },
          _shrinkScaleWidth: function (n) {
            var i,
              r = this,
              t = r.scale;
            t.options.vertical ||
              ((i = t.contentBox().width() - n.width()),
              i > 0 &&
                (t.box.shrink(i, 0),
                t.box.alignTo(n, "center"),
                t.reflow(t.box)));
          },
          _shrinkElements: function () {
            for (
              var u,
                s = this,
                o = this,
                f = o.scale,
                t = o.pointers,
                i = f.box.clone(),
                n = f.options.vertical ? "y" : "x",
                e = t[0].box,
                r = 0;
              r < t.length;
              r++
            )
              e.wrap(t[r].box.clone());
            for (
              i[n + 1] += Math.max(i[n + 1] - e[n + 1], 0),
                i[n + 2] -= Math.max(e[n + 2] - i[n + 2], 0),
                f.reflow(i),
                u = 0;
              u < t.length;
              u++
            )
              t[u].reflow(s.bbox);
          },
        });
        r(di, {
          transitions: !0,
          gaugeArea: { background: "" },
          scale: { vertical: !0 },
        });
        yt = 180;
        br = l.Arc;
        kr = y;
        pt = v;
        wt = st.extend({
          init: function (n, t) {
            st.fn.init.call(this, 0, 1, n, t);
          },
          initUserOptions: function (n) {
            var r = t({}, this.options, n);
            return (
              (r.majorUnit = r.majorUnit || i.autoMajorUnit(r.min, r.max)),
              (r.minorUnit = r.minorUnit || r.majorUnit / 10),
              r
            );
          },
          initFields: function () {},
          render: function (n, t) {
            var i = this.renderArc(n, t);
            this.bbox = i.bbox();
            this.labelElements = this.renderLabels();
            this.ticks = this.renderTicks();
            this.ranges = this.renderRanges();
          },
          reflow: function (n) {
            var t = n.center(),
              i = Math.min(n.height(), n.width()) / 2;
            return u(this.bbox)
              ? ((this.bbox = this.arc.bbox()),
                this.radius(this.arc.getRadiusX()),
                this.repositionRanges(),
                this.renderLabels(),
                void 0)
              : this.render(t, i);
          },
          slotAngle: function (n) {
            var r,
              t = this.options,
              i = t.min,
              u = t.max,
              s = t.reverse,
              f = t.startAngle,
              e = t.endAngle,
              o = e - f;
            return (
              (r = s
                ? e - ((n - i) / (u - i)) * o
                : ((n - i) / (u - i)) * o + f),
              r + yt
            );
          },
          hasRanges: function () {
            var n = this.options.ranges;
            return n && n.length;
          },
          ticksSize: function () {
            var t = this.options,
              i = t.majorTicks,
              r = t.minorTicks,
              n = 0;
            return (
              i.visible && (n = i.size),
              r.visible && (n = Math.max(r.size, n)),
              n
            );
          },
          renderLabels: function () {
            var y,
              h,
              p,
              w,
              st,
              b,
              r,
              i,
              c,
              l,
              d,
              g,
              nt,
              tt,
              it,
              rt,
              n,
              ut,
              ft,
              et = this,
              t = this.options,
              v = this.arc.clone(),
              e = v.getRadiusX(),
              ct = this.tickAngles(v, t.majorUnit),
              lt = (t.rangeSize = t.rangeSize || 0.1 * e),
              ht = new pt(),
              ot = 0.05 * e;
            for (
              u(t.rangeDistance)
                ? (ot = t.rangeDistance)
                : (t.rangeDistance = ot),
                y = t.labels,
                h = y.position === a,
                p = u(this.labelElements),
                h &&
                  ((e -= this.ticksSize()),
                  this.hasRanges() && !p && (e -= lt + ot),
                  v.setRadiusX(e).setRadiusY(e)),
                w = this.labels,
                st = w.length,
                b = y.padding,
                r = 0;
              r < st;
              r++
            )
              (i = w[r]),
                (c = i.box.width() / 2),
                (l = i.box.height() / 2),
                (d = ct[r]),
                (g = (d - yt) * ai),
                (nt = v.pointAt(d)),
                (tt = nt.x + Math.cos(g) * (c + b) * (h ? 1 : -1)),
                (it = nt.y + Math.sin(g) * (l + b) * (h ? 1 : -1)),
                i.reflow(new o(tt - c, it - l, tt + c, it + l)),
                (rt = new f(i.box.x1, i.box.y1)),
                (n = void 0),
                p
                  ? ((n = et.labelElements.children[r]),
                    (ut = n.bbox().origin),
                    (ft = n.transform() || k()),
                    ft.translate(rt.x - ut.x, rt.y - ut.y),
                    n.transform(ft))
                  : ((n = nr(i, t.labels)), ht.append(n)),
                (et.bbox = s.union(et.bbox, n.bbox()));
            return ht;
          },
          repositionRanges: function () {
            var t,
              e,
              i,
              r,
              u,
              n,
              f = this.ranges.children;
            if (f.length > 0) {
              for (
                t = this.options,
                  e = t.rangeDistance,
                  i = t.rangeSize,
                  r = this.getRangeRadius(),
                  this.options.labels.position === a && (r += i + e),
                  u = r + i / 2,
                  n = 0;
                n < f.length;
                n++
              )
                f[n]._geometry.setRadiusX(u).setRadiusY(u);
              this.bbox = s.union(this.bbox, this.ranges.bbox());
            }
          },
          renderRanges: function () {
            var n,
              o,
              r,
              s,
              h,
              t,
              i,
              u,
              f,
              e = this,
              c = this.rangeSegments(),
              l = c.length,
              a = new pt();
            if (l)
              for (
                n = this.options,
                  o = n.rangeSize,
                  r = n.reverse,
                  s = n.rangeDistance,
                  h = this.getRangeRadius(),
                  this.radius(this.radius() - o - s),
                  t = 0;
                t < l;
                t++
              )
                (i = c[t]),
                  (u = e.slotAngle(i[r ? "to" : "from"])),
                  (f = e.slotAngle(i[r ? "from" : "to"])),
                  f - u != 0 && a.append(e.createRange(u, f, h, i));
            return a;
          },
          createRange: function (n, t, i, r) {
            var u = this.options.rangeSize,
              f = new b.Arc(this.arc.center, {
                radiusX: i + u / 2,
                radiusY: i + u / 2,
                startAngle: n,
                endAngle: t,
              });
            return new br(f, {
              stroke: {
                width: u,
                color: r.color,
                opacity: r.opacity,
                lineCap: r.lineCap,
              },
            });
          },
          rangeSegments: function () {
            var e,
              o,
              s,
              r,
              n,
              h,
              u,
              t,
              f = this.options,
              c = f.ranges || [],
              l = c.length,
              i = [];
            if (l)
              for (
                e = f.min,
                  o = f.max,
                  s = f.rangePlaceholderColor,
                  i.push(oi(e, o, s)),
                  r = 0;
                r < l;
                r++
              )
                for (n = tr(c[r], e, o), h = i.length, u = 0; u < h; u++)
                  if (((t = i[u]), t.from <= n.from && n.from <= t.to)) {
                    i.push(oi(n.from, n.to, n.color, n.opacity));
                    t.from <= n.to &&
                      n.to <= t.to &&
                      i.push(oi(n.to, t.to, s, n.opacity));
                    t.to = n.from;
                    break;
                  }
            return i;
          },
          getRangeRadius: function () {
            var t = this,
              i = t.arc,
              n = t.options,
              r = n.rangeSize,
              u = n.rangeDistance,
              f = n.majorTicks.size;
            return n.labels.position === kt
              ? i.getRadiusX() - f - u - r
              : i.getRadiusX() - r;
          },
          renderArc: function (n, t) {
            var i = this.options;
            return (this.arc = new b.Arc(n, {
              radiusX: t,
              radiusY: t,
              startAngle: i.startAngle + yt,
              endAngle: i.endAngle + yt,
            }));
          },
          renderTicks: function () {
            var t,
              i,
              r,
              f,
              o = this,
              e = o.arc,
              n = o.options,
              u = e.clone();
            return (
              (this.majorTickAngles = this.tickAngles(e, n.majorUnit)),
              (this.majorTicks = ur(
                u,
                this.majorTickAngles,
                n.majorUnit,
                n.majorTicks
              )),
              (t = new pt()),
              t.append(this.majorTicks),
              (i = n.majorTicks.size),
              (r = n.minorTicks.size),
              (this._tickDifference = i - r),
              n.labels.position === kt &&
                ((f = u.getRadiusX()),
                u.setRadiusX(f - i + r).setRadiusY(f - i + r)),
              (this.minorTickAngles = this.normalizeTickAngles(
                this.tickAngles(e, n.minorUnit)
              )),
              (this.minorTicks = ur(
                u,
                this.minorTickAngles,
                n.minorUnit,
                n.minorTicks
              )),
              t.append(this.minorTicks),
              t
            );
          },
          normalizeTickAngles: function (n) {
            for (
              var i = this.options,
                r = i.majorUnit / i.minorUnit,
                t = n.length - 1;
              t >= 0;
              t--
            )
              t % r == 0 && n.splice(t, 1);
            return n;
          },
          tickAngles: function (n, t) {
            var r,
              u,
              f = this.options,
              h = f.reverse,
              l = f.max - f.min,
              o = n.endAngle - n.startAngle,
              s = l / t,
              i = n.startAngle,
              e = o / s;
            for (h && ((i += o), (e = -e)), r = [], u = 0; u < s; u++)
              r.push(c(i, et)), (i += e);
            return c(i) <= n.endAngle && r.push(i), r;
          },
          radius: function (n) {
            return n
              ? (this.arc.setRadiusX(n).setRadiusY(n),
                this.repositionTicks(
                  this.majorTicks.children,
                  this.majorTickAngles
                ),
                this.repositionTicks(
                  this.minorTicks.children,
                  this.minorTickAngles,
                  !0
                ),
                void 0)
              : this.arc.getRadiusX();
          },
          repositionTicks: function (n, t, i) {
            var r,
              f,
              e,
              s,
              h,
              o = i ? this._tickDifference || 0 : 0,
              u = this.arc,
              c = u.getRadiusX();
            for (
              i &&
                this.options.labels.position === kt &&
                0 !== o &&
                ((u = this.arc.clone()), u.setRadiusX(c - o).setRadiusY(c - o)),
                r = 0;
              r < n.length;
              r++
            )
              (f = u.pointAt(t[r])),
                (e = n[r].segments),
                (s = f.x - e[0].anchor().x),
                (h = f.y - e[0].anchor().y),
                n[r].transform(new k().translate(s, h));
          },
        });
        r(wt, {
          min: 0,
          max: 100,
          majorTicks: { size: 15, align: a, color: p, width: d, visible: !0 },
          minorTicks: { size: 10, align: a, color: p, width: d, visible: !0 },
          startAngle: -30,
          endAngle: 210,
          labels: { position: a, padding: 2 },
        });
        ii = w.extend({
          init: function (n, t) {
            w.fn.init.call(this, n, t);
            var i = this.options;
            i.duration = Math.max(
              (Math.abs(i.newAngle - i.oldAngle) / i.duration) * 1e3,
              1
            );
          },
          step: function (n) {
            var t = this.options,
              i = h(t.oldAngle, t.newAngle, n);
            this.element.transform(k().rotate(i, t.center));
          },
        });
        r(ii, { easing: lt, duration: it });
        ct.current.register(vi, ii);
        dr = 0.05;
        gr = l.Circle;
        nu = v;
        tu = y;
        ri = ft.extend({
          setAngle: function (n) {
            this.elements.transform(k().rotate(n, this.center));
          },
          repaint: function () {
            var i = this,
              r = i.scale,
              n = i.options,
              f = r.slotAngle(n._oldValue),
              u = r.slotAngle(n.value);
            n.animation.transitions === !1
              ? this.setAngle(u)
              : new ii(
                  this.elements,
                  t(n.animation, { oldAngle: f, newAngle: u })
                ).play();
          },
          render: function () {
            var i = this,
              r = i.scale,
              u = i.options,
              n = new nu();
            return (
              u.animation !== !1 &&
                t(u.animation, {
                  startAngle: 0,
                  center: r.arc.center,
                  reverse: r.options.reverse,
                }),
              n.append(this._renderNeedle(), this._renderCap()),
              (this.elements = n),
              this.setAngle(ai),
              n
            );
          },
          reflow: function (n) {
            var t = (this.center = n.center),
              r = ht(this.options.length || 1, 0.1, 1.5),
              u = (this.radius = n.getRadiusX() * r),
              i = (this.capSize = Math.round(u * this.options.cap.size));
            this.bbox = s.fromPoints(
              new f(t.x - i, t.y - i),
              new f(t.x + i, t.y + i)
            );
          },
          _renderNeedle: function () {
            var r = this.scale.options.minorTicks.size,
              n = this.center,
              t = this.options.color,
              i = new tu({
                fill: { color: t },
                stroke: { color: t, width: d },
              });
            return (
              i
                .moveTo(n.x + this.radius - r, n.y)
                .lineTo(n.x, n.y - this.capSize / 2)
                .lineTo(n.x, n.y + this.capSize / 2)
                .close(),
              i
            );
          },
          _renderCap: function () {
            var n = this.options,
              t = n.cap.color || n.color,
              i = new b.Circle(this.center, this.capSize);
            return new gr(i, { fill: { color: t }, stroke: { color: t } });
          },
        });
        r(ri, {
          cap: { size: dr },
          arrow: { width: 16, height: 14 },
          animation: { type: vi, duration: it },
        });
        iu = v;
        bt = at.extend({
          reflow: function (n) {
            var t,
              r = this,
              i = this.pointers;
            for (
              this.scale.reflow(n),
                this._initialPlotArea = this.scale.bbox,
                t = 0;
              t < i.length;
              t++
            )
              i[t].reflow(r.scale.arc),
                (r._initialPlotArea = s.union(r._initialPlotArea, i[t].bbox));
            this.fitScale(n);
            this.alignScale(n);
            this._buildVisual(this.gaugeArea, i, this.scale);
            this._draw();
          },
          _buildVisual: function (n, t, i) {
            var r = (this._visuals = new iu());
            r.append(n);
            r.append(i.ticks);
            r.append(i.ranges);
            this._buildPointers(t);
            r.append(i.labelElements);
          },
          _buildPointers: function (n) {
            for (var t, r = this, i = 0; i < n.length; i++)
              (t = n[i]),
                t.render(),
                r._visuals.append(t.elements),
                t.value(t.options.value);
          },
          fitScale: function (n) {
            for (
              var i,
                r,
                t,
                u,
                l,
                o = this,
                s = this.scale.arc,
                v = this._initialPlotArea,
                a = Math.abs(this.getDiff(v, n)),
                f = c(a, et),
                e = c(-a, et),
                h = 0,
                y = 0;
              !(
                !(y++ < 100) ||
                ((h = l === t ? h + 1 : 0), h > 5) ||
                (f !== u && ((i = o.getPlotBox(f, n, s)), 0 <= i && i <= 2)) ||
                (e !== u && ((t = o.getPlotBox(e, n, s)), 0 <= t && t <= 2)) ||
                ((u =
                  i > 0 && t > 0
                    ? 2 * f
                    : i < 0 && t < 0
                    ? 2 * e
                    : c((f + e) / 2 || 1, et)),
                (r = o.getPlotBox(u, n, s)),
                0 <= r && r <= 2)
              );

            )
              (l = t), r > 0 ? ((e = u), (t = r)) : ((f = u), (i = r));
          },
          getPlotBox: function (n, t, i) {
            var r,
              o = this,
              u = this.scale,
              f = this.pointers,
              h = i.getRadiusX(),
              e = i.clone();
            for (
              e.setRadiusX(h + n).setRadiusY(h + n),
                u.arc = e,
                u.reflow(t),
                this.plotBbox = u.bbox,
                r = 0;
              r < f.length;
              r++
            )
              f[r].reflow(e), (o.plotBbox = s.union(o.plotBbox, f[r].bbox));
            return this.getDiff(this.plotBbox, t);
          },
          getDiff: function (n, t) {
            return Math.min(t.width() - n.width(), t.height() - n.height());
          },
          alignScale: function (n) {
            var t,
              o = this,
              u = this.plotBbox.center(),
              f = n.center(),
              h = u.x - f.x,
              c = u.y - f.y,
              e = this,
              i = e.scale,
              r = e.pointers;
            for (
              i.arc.center.x -= h, i.arc.center.y -= c, i.reflow(n), t = 0;
              t < r.length;
              t++
            )
              r[t].reflow(i.arc), (o.plotBbox = s.union(i.bbox, r[t].bbox));
          },
          _createModel: function () {
            var i,
              n,
              f,
              e = this,
              r = this.options,
              u = r.pointer,
              o = (this.scale = new wt(r.scale, this.contextService));
            for (
              this.pointers = [], i = ot(u) ? u : [u], n = 0;
              n < i.length;
              n++
            )
              (f = new ri(
                o,
                t({}, i[n], { animation: { transitions: r.transitions } })
              )),
                e.pointers.push(f);
          },
        });
        r(bt, { transitions: !0, gaugeArea: { background: "" } });
        ui = wt.extend({
          rangeSegments: function () {
            var n = this.options,
              t = n.min,
              i = n.max,
              r = n.rangePlaceholderColor,
              u = n.rangeLineCap;
            return [{ from: t, to: i, color: r, lineCap: u }];
          },
          hasRanges: function () {
            return !0;
          },
          placeholderRangeAngle: function (n) {
            var t = this.ranges.children[0].geometry();
            this.options.reverse ? t.setEndAngle(n) : t.setStartAngle(n);
          },
          addRange: function (n, t, i) {
            var r = this.options.reverse,
              f = this.slotAngle(r ? t : n),
              e = this.slotAngle(r ? n : t),
              u = this.createRange(f, e, this.getRangeRadius(), i);
            return this.ranges.append(u), u;
          },
        });
        r(ui, {
          min: 0,
          max: 100,
          majorTicks: { visible: !1 },
          minorTicks: { visible: !1 },
          labels: { visible: !1 },
          startAngle: 0,
          endAngle: 180,
          rangeLineCap: "round",
        });
        ru = 800;
        fi = w.extend({
          init: function (n, t) {
            var i, f, r, u;
            w.fn.init.call(this, n, t);
            i = this.options;
            f = (Math.abs(i.newAngle - i.oldAngle) / i.duration) * 1e3;
            i.duration = ht(f, it, ru);
            r = n.elements.options.get("stroke.color");
            u = n.currentColor();
            r !== u &&
              ((this.startColor = new kendo.Color(r)),
              (this.color = new kendo.Color(u)));
          },
          step: function (n) {
            var u,
              f,
              e,
              i = this,
              o = i.options,
              r = i.startColor,
              t = i.color,
              s = h(o.oldAngle, o.newAngle, n);
            this.element.angle(s);
            t &&
              ((u = c(h(r.r, t.r, n))),
              (f = c(h(r.g, t.g, n))),
              (e = c(h(r.b, t.b, n))),
              this.element.stroke(new kendo.Color(u, f, e).toHex()));
          },
        });
        r(fi, { easing: lt, duration: it });
        ct.current.register(yi, fi);
        ei = ft.extend({
          repaint: function () {
            var i = this,
              r = i.scale,
              n = i.options,
              f = r.slotAngle(n._oldValue),
              u = r.slotAngle(n.value);
            this.animation && this.animation.abort();
            n.animation.transitions === !1
              ? (this.angle(u), this.stroke(this.currentColor()))
              : ((this.animation = new fi(
                  this,
                  t(n.animation, { oldAngle: f, newAngle: u })
                )),
                this.animation.play());
          },
          angle: function (n) {
            var t = this.elements.geometry();
            this.scale.options.reverse ? t.setStartAngle(n) : t.setEndAngle(n);
            this.scale.placeholderRangeAngle(n);
          },
          stroke: function (n) {
            this.elements.stroke(n);
          },
          render: function () {
            var r, n, i;
            this.elements ||
              ((r = this),
              (n = r.scale),
              (i = r.options),
              i.animation !== !1 &&
                t(i.animation, {
                  startAngle: 0,
                  center: n.arc.center,
                  reverse: n.options.reverse,
                }),
              (this.elements = n.addRange(n.options.min, this.options.value, {
                color: this.currentColor(),
                opacity: i.opacity,
                lineCap: n.options.rangeLineCap,
              })));
          },
          currentColor: function () {
            var n,
              t,
              o,
              r,
              u,
              s = this.scale.options,
              h = s.min,
              a = s.max,
              f = this.options,
              e = f.colors,
              v = f.color,
              c = f.value,
              l = i.isNumber(c) ? c : h;
            if (e)
              for (n = 0; n < e.length; n++)
                if (
                  ((t = e[n]),
                  (o = t.color),
                  (r = t.from),
                  void 0 === r && (r = h),
                  (u = t.to),
                  void 0 === u && (u = a),
                  r <= l && l <= u)
                )
                  return o;
            return v;
          },
          reflow: function () {
            this.render();
            this.bbox = this.elements.bbox();
          },
        });
        r(ei, { animation: { type: yi, duration: it } });
        uu = bt.extend({
          _initTheme: function (n) {
            bt.fn._initTheme.call(this, n);
            this.options.color =
              this.options.color || (this.theme.pointer || {}).color;
          },
          _createModel: function () {
            var n = this.options,
              i = (this.scale = new ui(n.scale, this.contextService)),
              r = new ei(
                i,
                t(
                  {},
                  {
                    colors: n.colors,
                    color: n.color,
                    value: n.value,
                    opacity: n.opacity,
                    animation: { transitions: n.transitions },
                  }
                )
              );
            this.pointers = [r];
          },
          _buildPointers: function (n) {
            for (var i, t = 0; t < n.length; t++)
              (i = n[t]), i.render(), i.value(i.options.value);
          },
          _setValueOptions: function (n) {
            this.options.value = n;
          },
          currentColor: function () {
            var n = this.pointers[0];
            if (n) return n.currentColor();
          },
          centerLabelPosition: function (n, t) {
            var f,
              e,
              o,
              s,
              u = this.getSize(),
              h = this.scale.arc.center,
              i = h.x - n / 2,
              r = h.y - t / 2;
            return (
              n < u.width &&
                ((f = i + n),
                (i = Math.max(i, 0)),
                f > u.width && (i -= f - u.width)),
              t < u.height &&
                ((e = this.scale.bbox),
                (o = e.bottomRight().y),
                (s = r + t),
                (r = Math.max(r, e.origin.y)),
                s > o && (r -= s - o)),
              { left: i, top: r }
            );
          },
        });
        kendo.deepExtend(kendo.dataviz, {
          Gauge: at,
          LinearGauge: di,
          LinearPointer: g,
          ArrowLinearPointer: wi,
          BarLinearPointer: ki,
          LinearScale: gt,
          RadialGauge: bt,
          RadialPointer: ri,
          RadialScale: wt,
          ArcGauge: uu,
          RangePointer: ei,
          ArcScale: ui,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/gauge/main.min", ["dataviz/gauge/kendo-gauges.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function c(n) {
            var i = t.ui.themes || {},
              r = n.theme || "",
              u = r.toLowerCase();
            return t.SASS_THEMES.indexOf(u) != -1
              ? t.autoTheme().gauge
              : (i[r] || i[u] || {}).gauge;
          }
          function v(n) {
            i.fn[n] = function () {
              return this._instance[n].apply(this._instance, arguments);
            };
          }
          function y(n) {
            f.fn[n] = function (t) {
              var i = this,
                r = l[n];
              return i._centerElement
                ? l.drawDOM(i.element).then(function (n) {
                    return r(n, t);
                  })
                : r(i.exportVisual(), t);
            };
          }
          for (
            var e,
              o,
              f,
              s,
              u = window.kendo,
              h = u.ui.Widget,
              t = u.dataviz,
              p = t.LinearGauge,
              w = t.RadialGauge,
              b = t.ArcGauge,
              l = u.drawing,
              i = h.extend({
                init: function (i, r) {
                  u.destroy(i);
                  n(i).empty();
                  h.fn.init.call(this, i);
                  this.options = u.deepExtend(this.options, r);
                  this.wrapper = this.element;
                  this._createInstance();
                  this.element.addClass("k-gauge");
                  u.notify(this, t.ui);
                },
                options: {
                  theme: "default",
                  renderAs: "",
                  pointer: {},
                  scale: {},
                  gaugeArea: { background: "" },
                  transitions: !0,
                },
                setOptions: function (n) {
                  this._instance.setOptions(n, c(n));
                  this._copyFields();
                },
                redraw: function () {
                  this._instance.redraw();
                  this._copyFields();
                },
                destroy: function () {
                  h.fn.destroy.call(this);
                  this._instance.destroy();
                },
                _createInstance: function () {
                  var n = this._gaugeType();
                  this._instance = new n(
                    this.element[0],
                    this.options,
                    c(this.options)
                  );
                  this._copyFields();
                },
                _copyFields: function () {
                  this._originalOptions = this._instance._originalOptions;
                  this.options = this._instance.options;
                  this.surface = this._instance.surface;
                  this.bbox = this._instance.bbox;
                  this.gaugeArea = this._instance.gaugeArea;
                  this.pointers = this._instance.pointers;
                  this.scale = this._instance.scale;
                },
                _resize: function () {
                  this._instance.resize();
                },
              }),
              a = ["getSize", "value", "allValues", "exportVisual"],
              r = 0;
            r < a.length;
            r++
          )
            v(a[r]);
          for (
            t.ExportMixin.extend(i.fn),
              e = i.extend({
                options: { name: "RadialGauge" },
                _gaugeType: function () {
                  return w;
                },
              }),
              o = i.extend({
                options: { name: "LinearGauge", scale: { vertical: !0 } },
                _gaugeType: function () {
                  return p;
                },
              }),
              f = i.extend({
                init: function (n, t) {
                  i.fn.init.call(this, n, t);
                  this.element.css("position", "relative");
                  this.element.addClass("k-arcgauge");
                  this._centerTemplate();
                },
                options: { name: "ArcGauge" },
                setOptions: function (n) {
                  i.fn.setOptions.call(this, n);
                  this._centerTemplate();
                },
                redraw: function () {
                  i.fn.redraw.call(this);
                  this._centerTemplate();
                },
                value: function (n) {
                  var t = this._instance;
                  return 0 === arguments.length
                    ? t.value()
                    : (t.value(n), void this._centerTemplate());
                },
                destroy: function () {
                  i.fn.destroy.call(this);
                  delete this._centerElement;
                },
                exportVisual: function () {
                  return !this._centerElement && i.fn.exportVisual.call(this);
                },
                _resize: function () {
                  this._instance.resize();
                  this._centerTemplate();
                },
                _centerTemplate: function () {
                  var i, t, n, r;
                  this.options.centerTemplate
                    ? ((i = u.template(this.options.centerTemplate)),
                      (t = this._instance),
                      (n = this._getCenterElement()),
                      n.html(i({ color: t.currentColor(), value: t.value() })),
                      (r = t.centerLabelPosition(n.width(), n.height())),
                      n.css(r))
                    : this._centerElement &&
                      (this._centerElement.remove(),
                      (this._centerElement = null));
                },
                _getCenterElement: function () {
                  var t = this._centerElement;
                  return (
                    t ||
                      ((t = this._centerElement =
                        n("<div></div>").addClass("k-arcgauge-label")),
                      this.element.append(t)),
                    t
                  );
                },
                _gaugeType: function () {
                  return b;
                },
              }),
              s = ["exportSVG", "exportImage", "exportPDF"],
              r = 0;
            r < s.length;
            r++
          )
            y(s[r]);
          t.ui.plugin(o);
          t.ui.plugin(e);
          t.ui.plugin(f);
          u.deepExtend(t, {
            Gauge: i,
            LinearGauge: o,
            RadialGauge: e,
            ArcGauge: f,
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.gauge.min",
      ["dataviz/gauge/main.min", "kendo.dataviz.themes.min"],
      n
    );
  })(
    function () {
      return window.kendo;
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.barcode.min",
      ["kendo.dataviz.core.min", "kendo.drawing.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function p(n, t, i) {
            return n.substring(t, t + i);
          }
          var c,
            w,
            f,
            o,
            l,
            b,
            r = window.kendo,
            k = r.ui.Widget,
            d = n.extend,
            g = r.deepExtend,
            e = n.inArray,
            ut = n.isPlainObject,
            s = r.drawing,
            a = r.geometry,
            ft = r.drawing.util,
            v = ft.defined,
            h = r.dataviz,
            nt = h.Box2D,
            et = h.TextBox,
            ot = 300,
            st = 100,
            tt = 10,
            y = /^\d+$/,
            ht = /^[a-z0-9]+$/i,
            ct = "Character '{0}' is not valid for symbology {1}",
            u = r.Class.extend({
              init: function (n) {
                this.setOptions(n);
              },
              setOptions: function (n) {
                var t = this;
                t.options = d({}, t.options, n);
                t.quietZoneLength = t.options.addQuietZone
                  ? 2 * t.options.quietZoneLength
                  : 0;
              },
              encode: function (n, t, i) {
                var r = this;
                return (
                  v(n) && (n += ""),
                  r.initValue(n, t, i),
                  r.options.addQuietZone && r.addQuietZone(),
                  r.addData(),
                  r.options.addQuietZone && r.addQuietZone(),
                  { baseUnit: r.baseUnit, pattern: r.pattern }
                );
              },
              options: {
                quietZoneLength: tt,
                addQuietZone: !0,
                addCheckSum: !0,
              },
              initValue: function () {},
              addQuietZone: function () {
                this.pattern.push(this.options.quietZoneLength || tt);
              },
              addData: function () {},
              invalidCharacterError: function (n) {
                throw Error(r.format(ct, n, this.name));
              },
            }),
            i = {},
            it = u.extend({
              minBaseUnitLength: 0.7,
              addData: function () {
                var t,
                  n = this,
                  i = n.value;
                for (n.addStart(), t = 0; t < i.length; t++)
                  n.addCharacter(i.charAt(t));
                n.options.addCheckSum && n.pushCheckSum();
                n.addStop();
                n.prepareValues();
              },
              addCharacter: function (n) {
                var t = this,
                  i = t.characterMap[n];
                i || t.invalidCharacterError(n);
                t.addBase(i);
              },
              addBase: function () {},
            }),
            rt = {
              addCharacter: function (n) {
                var t = this;
                t.characterMap[n]
                  ? t.addBase(t.characterMap[n])
                  : n.charCodeAt(0) > 127
                  ? t.invalidCharacterError(n)
                  : t.addExtended(n.charCodeAt(0));
              },
              addExtended: function (n) {
                for (
                  var r, f, i = this, u = 0;
                  u < i.extendedMappings.length;
                  u++
                )
                  if ((r = i.extendedMappings[u].call(i, n))) {
                    for (f = 0; f < r.length; f++) i.addBase(r[f]);
                    return (i.dataLength += r.length - 1), t;
                  }
              },
              extendedMappings: [
                function (n) {
                  if (97 <= n && n <= 122) {
                    var t = this;
                    return [
                      t.characterMap[t.shiftCharacters[0]],
                      t.characterMap[String.fromCharCode(n - 32)],
                    ];
                  }
                },
                function (n) {
                  if (33 <= n && n <= 58) {
                    var t = this;
                    return [
                      t.characterMap[t.shiftCharacters[1]],
                      t.characterMap[String.fromCharCode(n + 32)],
                    ];
                  }
                },
                function (n) {
                  if (1 <= n && n <= 26) {
                    var t = this;
                    return [
                      t.characterMap[t.shiftCharacters[2]],
                      t.characterMap[String.fromCharCode(n + 64)],
                    ];
                  }
                },
                function (n) {
                  var i,
                    u,
                    r,
                    t = this;
                  if (t.specialAsciiCodes[n])
                    for (i = [], r = 0; r < t.specialAsciiCodes[n].length; r++)
                      i.push(t.characterMap[t.shiftCharacters[3]]),
                        i.push(t.characterMap[t.specialAsciiCodes[n][r]]);
                  else
                    (u = 6 * Math.floor(n / 32) + ((n - 27) % 32) + 64),
                      (i = [
                        t.characterMap[t.shiftCharacters[3]],
                        t.characterMap[String.fromCharCode(u)],
                      ]);
                  return i;
                },
              ],
              specialAsciiCodes: {
                0: ["U"],
                64: ["V"],
                96: ["W"],
                127: ["T", "X", "Y", "Z"],
              },
              shiftValuesAsciiCodes: { 39: 36, 40: 47, 41: 43, 42: 37 },
              characterMap: { "+": !1, "/": !1, $: !1, "%": !1 },
              shiftCharacters: ["SHIFT0", "SHIFT1", "SHIFT2", "SHIFT3"],
            };
          i.code39 = it.extend({
            name: "Code 39",
            checkSumMod: 43,
            minRatio: 2.5,
            maxRatio: 3,
            gapWidth: 1,
            splitCharacter: "|",
            initValue: function (n, t, i) {
              var r = this;
              r.width = t;
              r.height = i;
              r.value = n;
              r.dataLength = n.length;
              r.pattern = [];
              r.patternString = "";
            },
            prepareValues: function () {
              var i,
                u,
                n = this,
                r = n.minBaseUnitLength,
                t = n.maxRatio,
                f = n.minRatio,
                e = Math.max(0.15 * n.width, 24);
              if (n.height < e)
                throw Error(
                  "Insufficient Height. The minimum height for value: " +
                    n.value +
                    " is: " +
                    e
                );
              for (; (i = n.getBaseUnit(t)) < r && t > f; )
                t = parseFloat((t - 0.1).toFixed(1));
              if (i < r)
                throw (
                  ((u = Math.ceil(n.getBaseWidth(f) * r)),
                  Error(
                    "Insufficient width. The minimum width for value: " +
                      n.value +
                      " is: " +
                      u
                  ))
                );
              n.ratio = t;
              n.baseUnit = i;
              n.patternString = n.patternString.substring(
                0,
                n.patternString.length - 1
              );
              n.pattern = n.pattern.concat(
                n.patternString.replace(/ratio/g, t).split(n.splitCharacter)
              );
            },
            getBaseUnit: function (n) {
              return this.width / this.getBaseWidth(n);
            },
            getBaseWidth: function (n) {
              var t = this,
                i = 3 * (n + 2);
              return (
                t.quietZoneLength +
                i * (t.dataLength + 2) +
                t.gapWidth * (t.dataLength + 1)
              );
            },
            addStart: function () {
              var n = this;
              n.addPattern(n.characterMap.START.pattern);
              n.addCharacterGap();
            },
            addBase: function (n) {
              this.addPattern(n.pattern);
              this.addCharacterGap();
            },
            addStop: function () {
              this.addPattern(this.characterMap.START.pattern);
            },
            addPattern: function (n) {
              for (var t = 0; t < n.length; t++)
                this.patternString += this.patternMappings[n.charAt(t)];
            },
            addCharacterGap: function () {
              var n = this;
              n.patternString += n.gapWidth + n.splitCharacter;
            },
            patternMappings: { b: "1|", w: "1|", B: "ratio|", W: "ratio|" },
            characterMap: {
              0: { pattern: "bwbWBwBwb", value: 0 },
              1: { pattern: "BwbWbwbwB", value: 1 },
              2: { pattern: "bwBWbwbwB", value: 2 },
              3: { pattern: "BwBWbwbwb", value: 3 },
              4: { pattern: "bwbWBwbwB", value: 4 },
              5: { pattern: "BwbWBwbwb", value: 5 },
              6: { pattern: "bwBWBwbwb", value: 6 },
              7: { pattern: "bwbWbwBwB", value: 7 },
              8: { pattern: "BwbWbwBwb", value: 8 },
              9: { pattern: "bwBWbwBwb", value: 9 },
              A: { pattern: "BwbwbWbwB", value: 10 },
              B: { pattern: "bwBwbWbwB", value: 11 },
              C: { pattern: "BwBwbWbwb", value: 12 },
              D: { pattern: "bwbwBWbwB", value: 13 },
              E: { pattern: "BwbwBWbwb", value: 14 },
              F: { pattern: "bwBwBWbwb", value: 15 },
              G: { pattern: "bwbwbWBwB", value: 16 },
              H: { pattern: "BwbwbWBwb", value: 17 },
              I: { pattern: "bwBwbWBwb", value: 18 },
              J: { pattern: "bwbwBWBwb", value: 19 },
              K: { pattern: "BwbwbwbWB", value: 20 },
              L: { pattern: "bwBwbwbWB", value: 21 },
              M: { pattern: "BwBwbwbWb", value: 22 },
              N: { pattern: "bwbwBwbWB", value: 23 },
              O: { pattern: "BwbwBwbWb", value: 24 },
              P: { pattern: "bwBwBwbWb", value: 25 },
              Q: { pattern: "bwbwbwBWB", value: 26 },
              R: { pattern: "BwbwbwBWb", value: 27 },
              S: { pattern: "bwBwbwBWb", value: 28 },
              T: { pattern: "bwbwBwBWb", value: 29 },
              U: { pattern: "BWbwbwbwB", value: 30 },
              V: { pattern: "bWBwbwbwB", value: 31 },
              W: { pattern: "BWBwbwbwb", value: 32 },
              X: { pattern: "bWbwBwbwB", value: 33 },
              Y: { pattern: "BWbwBwbwb", value: 34 },
              Z: { pattern: "bWBwBwbwb", value: 35 },
              "-": { pattern: "bWbwbwBwB", value: 36 },
              ".": { pattern: "BWbwbwBwb", value: 37 },
              " ": { pattern: "bWBwbwBwb", value: 38 },
              $: { pattern: "bWbWbWbwb", value: 39 },
              "/": { pattern: "bWbWbwbWb", value: 40 },
              "+": { pattern: "bWbwbWbWb", value: 41 },
              "%": { pattern: "bwbWbWbWb", value: 42 },
              START: { pattern: "bWbwBwBwb" },
            },
            options: { addCheckSum: !1 },
          });
          i.code39extended = i.code39.extend(
            g({}, rt, {
              name: "Code 39 extended",
              characterMap: {
                SHIFT0: { pattern: "bWbwbWbWb", value: 41 },
                SHIFT1: { pattern: "bWbWbwbWb", value: 40 },
                SHIFT2: { pattern: "bWbWbWbwb", value: 39 },
                SHIFT3: { pattern: "bwbWbWbWb", value: 42 },
              },
            })
          );
          i.code93 = it.extend({
            name: "Code 93",
            cCheckSumTotal: 20,
            kCheckSumTotal: 15,
            checkSumMod: 47,
            initValue: function (n, t, i) {
              var r = this;
              r.value = n;
              r.width = t;
              r.height = i;
              r.pattern = [];
              r.values = [];
              r.dataLength = n.length;
            },
            prepareValues: function () {
              var n = this,
                t = Math.max(0.15 * n.width, 24);
              if (n.height < t) throw Error("Insufficient Height");
              if ((n.setBaseUnit(), n.baseUnit < n.minBaseUnitLength))
                throw Error("Insufficient Width");
            },
            setBaseUnit: function () {
              var n = this;
              n.baseUnit =
                n.width / (9 * (n.dataLength + 2 + 2) + n.quietZoneLength + 1);
            },
            addStart: function () {
              var n = this.characterMap.START.pattern;
              this.addPattern(n);
            },
            addStop: function () {
              var n = this;
              n.addStart();
              n.pattern.push(n.characterMap.TERMINATION_BAR);
            },
            addBase: function (n) {
              this.addPattern(n.pattern);
              this.values.push(n.value);
            },
            pushCheckSum: function () {
              var r,
                t,
                n = this,
                i = n._getCheckValues();
              for (n.checksum = i.join(""), t = 0; t < i.length; t++)
                (r = n.characterMap[n._findCharacterByValue(i[t])]),
                  n.addPattern(r.pattern);
            },
            _getCheckValues: function () {
              for (
                var u,
                  e,
                  t = this,
                  f = t.values,
                  r = f.length,
                  i = 0,
                  n = r - 1;
                n >= 0;
                n--
              )
                i += t.weightedValue(f[n], r - n, t.cCheckSumTotal);
              for (
                u = i % t.checkSumMod,
                  i = t.weightedValue(u, 1, t.kCheckSumTotal),
                  n = r - 1;
                n >= 0;
                n--
              )
                i += t.weightedValue(f[n], r - n + 1, t.kCheckSumTotal);
              return (e = i % t.checkSumMod), [u, e];
            },
            _findCharacterByValue: function (n) {
              for (var t in this.characterMap)
                if (this.characterMap[t].value === n) return t;
            },
            weightedValue: function (n, t, i) {
              return (t % i || i) * n;
            },
            addPattern: function (n) {
              for (var i, t = 0; t < n.length; t++)
                (i = parseInt(n.charAt(t), 10)), this.pattern.push(i);
            },
            characterMap: {
              0: { pattern: "131112", value: 0 },
              1: { pattern: "111213", value: 1 },
              2: { pattern: "111312", value: 2 },
              3: { pattern: "111411", value: 3 },
              4: { pattern: "121113", value: 4 },
              5: { pattern: "121212", value: 5 },
              6: { pattern: "121311", value: 6 },
              7: { pattern: "111114", value: 7 },
              8: { pattern: "131211", value: 8 },
              9: { pattern: "141111", value: 9 },
              A: { pattern: "211113", value: 10 },
              B: { pattern: "211212", value: 11 },
              C: { pattern: "211311", value: 12 },
              D: { pattern: "221112", value: 13 },
              E: { pattern: "221211", value: 14 },
              F: { pattern: "231111", value: 15 },
              G: { pattern: "112113", value: 16 },
              H: { pattern: "112212", value: 17 },
              I: { pattern: "112311", value: 18 },
              J: { pattern: "122112", value: 19 },
              K: { pattern: "132111", value: 20 },
              L: { pattern: "111123", value: 21 },
              M: { pattern: "111222", value: 22 },
              N: { pattern: "111321", value: 23 },
              O: { pattern: "121122", value: 24 },
              P: { pattern: "131121", value: 25 },
              Q: { pattern: "212112", value: 26 },
              R: { pattern: "212211", value: 27 },
              S: { pattern: "211122", value: 28 },
              T: { pattern: "211221", value: 29 },
              U: { pattern: "221121", value: 30 },
              V: { pattern: "222111", value: 31 },
              W: { pattern: "112122", value: 32 },
              X: { pattern: "112221", value: 33 },
              Y: { pattern: "122121", value: 34 },
              Z: { pattern: "123111", value: 35 },
              "-": { pattern: "121131", value: 36 },
              ".": { pattern: "311112", value: 37 },
              " ": { pattern: "311211", value: 38 },
              $: { pattern: "321111", value: 39 },
              "/": { pattern: "112131", value: 40 },
              "+": { pattern: "113121", value: 41 },
              "%": { pattern: "211131", value: 42 },
              SHIFT0: { pattern: "122211", value: 46 },
              SHIFT1: { pattern: "311121", value: 45 },
              SHIFT2: { pattern: "121221", value: 43 },
              SHIFT3: { pattern: "312111", value: 44 },
              START: { pattern: "111141" },
              TERMINATION_BAR: "1",
            },
          });
          i.code93extended = i.code93.extend(
            g({}, rt, {
              name: "Code 93 extended",
              pushCheckSum: function () {
                var t,
                  i,
                  n = this,
                  r = n._getCheckValues();
                for (n.checksum = r.join(""), i = 0; i < r.length; i++)
                  (t = r[i]),
                    n.shiftValuesAsciiCodes[t]
                      ? n.addExtended(n.shiftValuesAsciiCodes[t])
                      : n.addPattern(
                          n.characterMap[n._findCharacterByValue(t)].pattern
                        );
              },
            })
          );
          c = r.Class.extend({
            init: function (n) {
              this.encoding = n;
            },
            addStart: function () {},
            is: function () {},
            move: function () {},
            pushState: function () {},
          });
          w = c.extend({
            FNC4: "FNC4",
            init: function (n, t) {
              var i = this;
              i.encoding = n;
              i.states = t;
              i._initMoves(t);
            },
            addStart: function () {
              this.encoding.addPattern(this.START);
            },
            is: function (n, t) {
              var i = n.charCodeAt(t);
              return this.isCode(i);
            },
            move: function (n) {
              for (
                var t = this, i = 0;
                !t._moves[i].call(t, n) && i < t._moves.length;

              )
                i++;
            },
            pushState: function (n) {
              var i,
                r,
                t = this,
                o = t.states,
                u = n.value,
                f = u.length;
              for (
                e("C", o) >= 0 &&
                ((r = u.substr(n.index).match(/\d{4,}/g)),
                r && (f = u.indexOf(r[0], n.index)));
                (i = n.value.charCodeAt(n.index)) >= 0 &&
                t.isCode(i) &&
                n.index < f;

              )
                t.encoding.addPattern(t.getValue(i)), n.index++;
            },
            _initMoves: function (n) {
              var t = this;
              t._moves = [];
              e(t.FNC4, n) >= 0 && t._moves.push(t._moveFNC);
              e(t.shiftKey, n) >= 0 && t._moves.push(t._shiftState);
              t._moves.push(t._moveState);
            },
            _moveFNC: function (n) {
              if (n.fnc) return (n.fnc = !1), n.previousState == this.key;
            },
            _shiftState: function (n) {
              var t = this;
              if (
                n.previousState == t.shiftKey &&
                (n.index + 1 >= n.value.length ||
                  t.encoding[t.shiftKey].is(n.value, n.index + 1))
              )
                return t.encoding.addPattern(t.SHIFT), (n.shifted = !0), !0;
            },
            _moveState: function () {
              return this.encoding.addPattern(this.MOVE), !0;
            },
            SHIFT: 98,
          });
          f = {};
          f.A = w.extend({
            key: "A",
            shiftKey: "B",
            isCode: function (n) {
              return 0 <= n && n < 96;
            },
            getValue: function (n) {
              return n < 32 ? n + 64 : n - 32;
            },
            MOVE: 101,
            START: 103,
          });
          f.B = w.extend({
            key: "B",
            shiftKey: "A",
            isCode: function (n) {
              return 32 <= n && n < 128;
            },
            getValue: function (n) {
              return n - 32;
            },
            MOVE: 100,
            START: 104,
          });
          f.C = c.extend({
            key: "C",
            addStart: function () {
              this.encoding.addPattern(this.START);
            },
            is: function (n, t) {
              var i = p(n, t, 4);
              return (t + 4 <= n.length || 2 == n.length) && y.test(i);
            },
            move: function () {
              this.encoding.addPattern(this.MOVE);
            },
            pushState: function (n) {
              for (
                var t;
                (t = p(n.value, n.index, 2)) && y.test(t) && 2 == t.length;

              )
                this.encoding.addPattern(parseInt(t, 10)), (n.index += 2);
            },
            getValue: function (n) {
              return n;
            },
            MOVE: 99,
            START: 105,
          });
          f.FNC4 = c.extend({
            key: "FNC4",
            dependentStates: ["A", "B"],
            init: function (n, t) {
              this.encoding = n;
              this._initSubStates(t);
            },
            addStart: function (n) {
              var t = n.value.charCodeAt(0) - 128,
                i = this._getSubState(t);
              this.encoding[i].addStart();
            },
            is: function (n, t) {
              var i = n.charCodeAt(t);
              return this.isCode(i);
            },
            isCode: function (n) {
              return 128 <= n && n < 256;
            },
            pushState: function (n) {
              var u,
                r = this,
                t = r._initSubState(n),
                i = r.encoding,
                f = t.value.length;
              if (((n.index += f), f < 3))
                for (; t.index < f; t.index++)
                  (u = t.value.charCodeAt(t.index)),
                    (t.state = r._getSubState(u)),
                    t.previousState != t.state &&
                      ((t.previousState = t.state), i[t.state].move(t)),
                    i.addPattern(i[t.state].MOVE),
                    i.addPattern(i[t.state].getValue(u));
              else
                t.state != t.previousState && i[t.state].move(t),
                  r._pushStart(t),
                  i.pushData(t, r.subStates),
                  n.index < n.value.length && r._pushStart(t);
              n.fnc = !0;
              n.state = t.state;
            },
            _pushStart: function (n) {
              var t = this;
              t.encoding.addPattern(t.encoding[n.state].MOVE);
              t.encoding.addPattern(t.encoding[n.state].MOVE);
            },
            _initSubState: function (n) {
              var i = this,
                t = { value: i._getAll(n.value, n.index), index: 0 };
              return (
                (t.state = i._getSubState(t.value.charCodeAt(0))),
                (t.previousState =
                  n.previousState == i.key ? t.state : n.previousState),
                t
              );
            },
            _initSubStates: function (n) {
              var t,
                i = this;
              for (i.subStates = [], t = 0; t < n.length; t++)
                e(n[t], i.dependentStates) >= 0 && i.subStates.push(n[t]);
            },
            _getSubState: function (n) {
              for (var i = this, t = 0; t < i.subStates.length; t++)
                if (i.encoding[i.subStates[t]].isCode(n)) return i.subStates[t];
            },
            _getAll: function (n, t) {
              for (var i, r = ""; (i = n.charCodeAt(t++)) && this.isCode(i); )
                r += String.fromCharCode(i - 128);
              return r;
            },
          });
          f.FNC1 = c.extend({
            key: "FNC1",
            startState: "C",
            dependentStates: ["C", "B"],
            startAI: "(",
            endAI: ")",
            init: function (n, t) {
              this.encoding = n;
              this.states = t;
            },
            addStart: function () {
              this.encoding[this.startState].addStart();
            },
            is: function () {
              return e(this.key, this.states) >= 0;
            },
            pushState: function (n) {
              var i,
                f,
                o,
                t = this,
                s = t.encoding,
                r = n.value.replace(/\s/g, ""),
                h = RegExp("[" + t.startAI + t.endAI + "]", "g"),
                u = n.index,
                e = { state: t.startState };
              for (s.addPattern(t.START); ; ) {
                if (
                  ((e.index = 0),
                  (o = r.charAt(u) === t.startAI ? 2 : 0),
                  (i = o > 0 ? t.getBySeparator(r, u) : t.getByLength(r, u)),
                  i.ai.length)
                )
                  f = u + o + i.id.length + i.ai.length;
                else if (((f = r.indexOf(t.startAI, u + 1)), f < 0)) {
                  if (u + i.ai.max + i.id.length + o < r.length)
                    throw Error(
                      "Separators are required after variable length identifiers"
                    );
                  f = r.length;
                }
                if (
                  ((e.value = r.substring(u, f).replace(h, "")),
                  t.validate(i, e.value),
                  s.pushData(e, t.dependentStates),
                  f >= r.length)
                )
                  break;
                u = f;
                e.state != t.startState &&
                  (s[t.startState].move(e), (e.state = t.startState));
                i.ai.length || s.addPattern(t.START);
              }
              n.index = n.value.length;
            },
            validate: function (n, t) {
              var r = t.substr(n.id.length),
                i = n.ai;
              if (!i.type && !y.test(r))
                throw Error(
                  "Application identifier " +
                    n.id +
                    " is numeric only but contains non numeric character(s)."
                );
              if ("alphanumeric" == i.type && !ht.test(r))
                throw Error(
                  "Application identifier " +
                    n.id +
                    " is alphanumeric only but contains non alphanumeric character(s)."
                );
              if (i.length && i.length !== r.length)
                throw Error(
                  "Application identifier " +
                    n.id +
                    " must be " +
                    i.length +
                    " characters long."
                );
              if (i.min && i.min > r.length)
                throw Error(
                  "Application identifier " +
                    n.id +
                    " must be at least " +
                    i.min +
                    " characters long."
                );
              if (i.max && i.max < r.length)
                throw Error(
                  "Application identifier " +
                    n.id +
                    " must be at most " +
                    i.max +
                    " characters long."
                );
            },
            getByLength: function (n, t) {
              for (var i, f, u = this, r = 2; r <= 4; r++)
                if (
                  ((i = p(n, t, r)),
                  (f = u.getAI(i) || u.getAI(i.substring(0, i.length - 1))))
                )
                  return { id: i, ai: f };
              u.unsupportedAIError(i);
            },
            unsupportedAIError: function (n) {
              throw Error(
                r.format("'{0}' is not a supported Application Identifier"),
                n
              );
            },
            getBySeparator: function (n, t) {
              var i = this,
                u = n.indexOf(i.startAI, t),
                e = n.indexOf(i.endAI, u),
                r = n.substring(u + 1, e),
                f = i.getAI(r) || i.getAI(r.substr(r.length - 1));
              return f || i.unsupportedAIError(r), { ai: f, id: r };
            },
            getAI: function (n) {
              var t,
                u,
                r,
                f = this.applicationIdentifiers,
                i = f.multiKey;
              if (f[n]) return f[n];
              for (t = 0; t < i.length; t++) {
                if (i[t].ids && e(n, i[t].ids) >= 0) return i[t].type;
                if (i[t].ranges)
                  for (u = i[t].ranges, r = 0; r < u.length; r++)
                    if (u[r][0] <= n && n <= u[r][1]) return i[t].type;
              }
            },
            applicationIdentifiers: {
              22: { max: 29, type: "alphanumeric" },
              402: { length: 17 },
              7004: { max: 4, type: "alphanumeric" },
              242: { max: 6, type: "alphanumeric" },
              8020: { max: 25, type: "alphanumeric" },
              703: { min: 3, max: 30, type: "alphanumeric" },
              8008: { min: 8, max: 12, type: "alphanumeric" },
              253: { min: 13, max: 17, type: "alphanumeric" },
              8003: { min: 14, max: 30, type: "alphanumeric" },
              multiKey: [
                {
                  ids: ["15", "17", "8005", "8100"],
                  ranges: [
                    [11, 13],
                    [310, 316],
                    [320, 336],
                    [340, 369],
                  ],
                  type: { length: 6 },
                },
                {
                  ids: [
                    "240",
                    "241",
                    "250",
                    "251",
                    "400",
                    "401",
                    "403",
                    "7002",
                    "8004",
                    "8007",
                    "8110",
                  ],
                  ranges: [[-9]],
                  type: { max: 30, type: "alphanumeric" },
                },
                { ids: ["7001"], ranges: [[410, 414]], type: { length: 13 } },
                {
                  ids: ["10", "21", "254", "420", "8002"],
                  type: { max: 20, type: "alphanumeric" },
                },
                { ids: ["00", "8006", "8017", "8018"], type: { length: 18 } },
                { ids: ["01", "02", "8001"], type: { length: 14 } },
                { ids: ["422"], ranges: [[424, 426]], type: { length: 3 } },
                { ids: ["20", "8102"], type: { length: 2 } },
                { ids: ["30", "37"], type: { max: 8, type: "alphanumeric" } },
                {
                  ids: ["390", "392"],
                  type: { max: 15, type: "alphanumeric" },
                },
                {
                  ids: ["421", "423"],
                  type: { min: 3, max: 15, type: "alphanumeric" },
                },
                {
                  ids: ["391", "393"],
                  type: { min: 3, max: 18, type: "alphanumeric" },
                },
                { ids: ["7003", "8101"], type: { length: 10 } },
              ],
            },
            START: 102,
          });
          o = u.extend({
            init: function (n) {
              u.fn.init.call(this, n);
              this._initStates();
            },
            _initStates: function () {
              for (var n = this, t = 0; t < n.states.length; t++)
                n[n.states[t]] = new f[n.states[t]](n, n.states);
            },
            initValue: function (n, t, i) {
              var r = this;
              r.pattern = [];
              r.value = n;
              r.width = t;
              r.height = i;
              r.checkSum = 0;
              r.totalUnits = 0;
              r.index = 0;
              r.position = 1;
            },
            addData: function () {
              var n = this,
                t = { value: n.value, index: 0, state: "" };
              0 !== n.value.length &&
                ((t.state = t.previousState = n.getNextState(t, n.states)),
                n.addStart(t),
                n.pushData(t, n.states),
                n.addCheckSum(),
                n.addStop(),
                n.setBaseUnit());
            },
            pushData: function (n, t) {
              for (var r, i = this; ; ) {
                if ((i[n.state].pushState(n), n.index >= n.value.length)) break;
                n.shifted
                  ? ((r = n.state),
                    (n.state = n.previousState),
                    (n.previousState = r),
                    (n.shifted = !1))
                  : ((n.previousState = n.state),
                    (n.state = i.getNextState(n, t)),
                    i[n.state].move(n));
              }
            },
            addStart: function (n) {
              this[n.state].addStart(n);
              this.position = 1;
            },
            addCheckSum: function () {
              var n = this;
              n.checksum = n.checkSum % 103;
              n.addPattern(n.checksum);
            },
            addStop: function () {
              this.addPattern(this.STOP);
            },
            setBaseUnit: function () {
              var n = this;
              n.baseUnit = n.width / (n.totalUnits + n.quietZoneLength);
            },
            addPattern: function (n) {
              for (
                var r, t = this, u = "" + t.characterMap[n], i = 0;
                i < u.length;
                i++
              )
                (r = parseInt(u.charAt(i), 10)),
                  t.pattern.push(r),
                  (t.totalUnits += r);
              t.checkSum += n * t.position++;
            },
            getNextState: function (n, t) {
              for (var i = 0; i < t.length; i++)
                if (this[t[i]].is(n.value, n.index)) return t[i];
              this.invalidCharacterError(n.value.charAt(n.index));
            },
            characterMap: [
              212222, 222122, 222221, 121223, 121322, 131222, 122213, 122312,
              132212, 221213, 221312, 231212, 112232, 122132, 122231, 113222,
              123122, 123221, 223211, 221132, 221231, 213212, 223112, 312131,
              311222, 321122, 321221, 312212, 322112, 322211, 212123, 212321,
              232121, 111323, 131123, 131321, 112313, 132113, 132311, 211313,
              231113, 231311, 112133, 112331, 132131, 113123, 113321, 133121,
              313121, 211331, 231131, 213113, 213311, 213131, 311123, 311321,
              331121, 312113, 312311, 332111, 314111, 221411, 431111, 111224,
              111422, 121124, 121421, 141122, 141221, 112214, 112412, 122114,
              122411, 142112, 142211, 241211, 221114, 413111, 241112, 134111,
              111242, 121142, 121241, 114212, 124112, 124211, 411212, 421112,
              421211, 212141, 214121, 412121, 111143, 111341, 131141, 114113,
              114311, 411113, 411311, 113141, 114131, 311141, 411131, 211412,
              211214, 211232, 2331112,
            ],
            STOP: 106,
          });
          i.code128a = o.extend({ name: "Code 128 A", states: ["A"] });
          i.code128b = o.extend({ name: "Code 128 B", states: ["B"] });
          i.code128c = o.extend({ name: "Code 128 C", states: ["C"] });
          i.code128 = o.extend({
            name: "Code 128",
            states: ["C", "B", "A", "FNC4"],
          });
          i["gs1-128"] = o.extend({
            name: "Code GS1-128",
            states: ["FNC1", "C", "B"],
          });
          l = u.extend({
            initValue: function (n, t) {
              var i = this;
              i.pattern = [];
              i.value = n;
              i.checkSumLength = 0;
              i.width = t;
            },
            setBaseUnit: function () {
              var n = this;
              n.baseUnit =
                n.width /
                (12 * (n.value.length + n.checkSumLength) +
                  n.quietZoneLength +
                  7);
            },
            addData: function () {
              var t,
                n = this,
                i = n.value;
              for (n.addPattern(n.START), t = 0; t < i.length; t++)
                n.addCharacter(i.charAt(t));
              n.options.addCheckSum && n.addCheckSum();
              n.addPattern(n.STOP);
              n.setBaseUnit();
            },
            addCharacter: function (n) {
              var t = this,
                i = t.characterMap[n];
              i || t.invalidCharacterError(n);
              t.addPattern(i);
            },
            addPattern: function (n) {
              for (var t = 0; t < n.length; t++)
                this.pattern.push(parseInt(n.charAt(t), 10));
            },
            addCheckSum: function () {
              var t,
                n = this,
                r = n.checkSums[n.checkSumType],
                i = r.call(n.checkSums, n.value);
              for (n.checksum = i.join(""), t = 0; t < i.length; t++)
                n.checkSumLength++, n.addPattern(n.characterMap[i[t]]);
            },
            checkSums: {
              Modulo10: function (n) {
                for (
                  var i, r, u = [0, ""], f = n.length % 2, t = 0;
                  t < n.length;
                  t++
                )
                  u[(t + f) % 2] += parseInt(n.charAt(t), 10);
                for (r = u[0], i = "" + 2 * u[1], t = 0; t < i.length; t++)
                  r += parseInt(i.charAt(t), 10);
                return [(10 - (r % 10)) % 10];
              },
              Modulo11: function (n) {
                for (var u, i, f = 0, r = 11, e = n.length, t = 0; t < e; t++)
                  (u = ((e - t) % 6 || 6) + 1), (f += u * n.charAt(t));
                return (i = (r - (f % r)) % r), 10 != i ? [i] : [1, 0];
              },
              Modulo11Modulo10: function (n) {
                var t,
                  i = this.Modulo11(n);
                return (t = n + i[0]), i.concat(this.Modulo10(t));
              },
              Modulo10Modulo10: function (n) {
                var t,
                  i = this.Modulo10(n);
                return (t = n + i[0]), i.concat(this.Modulo10(t));
              },
            },
            characterMap: [
              "12121212",
              "12121221",
              "12122112",
              "12122121",
              "12211212",
              "12211221",
              "12212112",
              "12212121",
              "21121212",
              "21121221",
            ],
            START: "21",
            STOP: "121",
            checkSumType: "",
          });
          i.msimod10 = l.extend({
            name: "MSI Modulo10",
            checkSumType: "Modulo10",
          });
          i.msimod11 = l.extend({
            name: "MSI Modulo11",
            checkSumType: "Modulo11",
          });
          i.msimod1110 = l.extend({
            name: "MSI Modulo11 Modulo10",
            checkSumType: "Modulo11Modulo10",
          });
          i.msimod1010 = l.extend({
            name: "MSI Modulo10 Modulo10",
            checkSumType: "Modulo10Modulo10",
          });
          i.code11 = u.extend({
            name: "Code 11",
            cCheckSumTotal: 10,
            kCheckSumTotal: 9,
            kCheckSumMinLength: 10,
            checkSumMod: 11,
            DASH_VALUE: 10,
            DASH: "-",
            START: "112211",
            STOP: "11221",
            initValue: function (n, t) {
              var i = this;
              i.pattern = [];
              i.value = n;
              i.width = t;
              i.totalUnits = 0;
            },
            addData: function () {
              var t,
                n = this,
                i = n.value;
              for (n.addPattern(n.START), t = 0; t < i.length; t++)
                n.addCharacter(i.charAt(t));
              n.options.addCheckSum && n.addCheckSum();
              n.addPattern(n.STOP);
              n.setBaseUnit();
            },
            setBaseUnit: function () {
              var n = this;
              n.baseUnit = n.width / (n.totalUnits + n.quietZoneLength);
            },
            addCheckSum: function () {
              var i,
                n = this,
                r = n.value,
                t = r.length,
                u = n.getWeightedSum(r, t, n.cCheckSumTotal) % n.checkSumMod;
              n.checksum = u + "";
              n.addPattern(n.characterMap[u]);
              t++;
              t >= n.kCheckSumMinLength &&
                ((i =
                  (u + n.getWeightedSum(r, t, n.kCheckSumTotal)) %
                  n.checkSumMod),
                (n.checksum += i),
                n.addPattern(n.characterMap[i]));
            },
            getWeightedSum: function (n, t, i) {
              for (var u = 0, r = 0; r < n.length; r++)
                u += this.weightedValue(this.getValue(n.charAt(r)), t, r, i);
              return u;
            },
            weightedValue: function (n, t, i, r) {
              var u = (t - i) % r || r;
              return u * n;
            },
            getValue: function (n) {
              var t = this;
              return isNaN(n)
                ? (n !== t.DASH && t.invalidCharacterError(n), t.DASH_VALUE)
                : parseInt(n, 10);
            },
            addCharacter: function (n) {
              var t = this,
                i = t.getValue(n),
                r = t.characterMap[i];
              t.addPattern(r);
            },
            addPattern: function (n) {
              for (var i, t = 0; t < n.length; t++)
                (i = parseInt(n.charAt(t), 10)),
                  this.pattern.push(i),
                  (this.totalUnits += i);
            },
            characterMap: [
              "111121",
              "211121",
              "121121",
              "221111",
              "112121",
              "212111",
              "122111",
              "111221",
              "211211",
              "211111",
              "112111",
            ],
            options: { addCheckSum: !0 },
          });
          i.postnet = u.extend({
            name: "Postnet",
            START: "2",
            VALID_CODE_LENGTHS: [5, 9, 11],
            DIGIT_SEPARATOR: "-",
            initValue: function (n, t, i) {
              var r = this;
              r.height = i;
              r.width = t;
              r.baseHeight = i / 2;
              r.value = n.replace(RegExp(r.DIGIT_SEPARATOR, "g"), "");
              r.pattern = [];
              r.validate(r.value);
              r.checkSum = 0;
              r.setBaseUnit();
            },
            addData: function () {
              var t,
                n = this,
                i = n.value;
              for (n.addPattern(n.START), t = 0; t < i.length; t++)
                n.addCharacter(i.charAt(t));
              n.options.addCheckSum && n.addCheckSum();
              n.addPattern(n.START);
              n.pattern.pop();
            },
            addCharacter: function (n) {
              var t = this,
                i = t.characterMap[n];
              t.checkSum += parseInt(n, 10);
              t.addPattern(i);
            },
            addCheckSum: function () {
              var n = this;
              n.checksum = (10 - (n.checkSum % 10)) % 10;
              n.addCharacter(n.checksum);
            },
            setBaseUnit: function () {
              var n = this;
              n.baseUnit =
                n.width / (10 * (n.value.length + 1) + 3 + n.quietZoneLength);
            },
            validate: function (n) {
              var t = this;
              if (
                (y.test(n) || t.invalidCharacterError(n.match(/[^0-9]/)[0]),
                e(n.length, t.VALID_CODE_LENGTHS) < 0)
              )
                throw Error(
                  "Invalid value length. Valid lengths for the Postnet symbology are " +
                    t.VALID_CODE_LENGTHS.join(",")
                );
            },
            addPattern: function (n) {
              for (var r, t = this, i = 0; i < n.length; i++)
                (r = t.height - t.baseHeight * n.charAt(i)),
                  t.pattern.push({ width: 1, y1: r, y2: t.height }),
                  t.pattern.push(1);
            },
            characterMap: [
              "22111",
              "11122",
              "11212",
              "11221",
              "12112",
              "12121",
              "12211",
              "21112",
              "21121",
              "21211",
            ],
          });
          i.ean13 = u.extend({
            initValue: function (n, t, i) {
              if (((n += ""), 12 != n.length || /\D/.test(n)))
                throw Error(
                  'The value of the "EAN13" encoding should be 12 symbols'
                );
              var r = this;
              r.pattern = [];
              r.options.height = i;
              r.baseUnit = t / (95 + r.quietZoneLength);
              r.value = n;
              r.checksum = r.calculateChecksum();
              r.leftKey = n[0];
              r.leftPart = n.substr(1, 6);
              r.rightPart = n.substr(7) + r.checksum;
            },
            addData: function () {
              var n = this;
              n.addPieces(n.characterMap.start);
              n.addSide(n.leftPart, n.leftKey);
              n.addPieces(n.characterMap.middle);
              n.addSide(n.rightPart);
              n.addPieces(n.characterMap.start);
            },
            addSide: function (n, t) {
              for (var r = this, i = 0; i < n.length; i++)
                t && parseInt(r.keyTable[t].charAt(i), 10)
                  ? r.addPieces(
                      Array.prototype.slice
                        .call(r.characterMap.digits[n.charAt(i)])
                        .reverse(),
                      !0
                    )
                  : r.addPieces(r.characterMap.digits[n.charAt(i)], !0);
            },
            addPieces: function (n, t) {
              for (var r = this, i = 0; i < n.length; i++)
                r.pattern.push(
                  t ? { y1: 0, y2: 0.95 * r.options.height, width: n[i] } : n[i]
                );
            },
            calculateChecksum: function () {
              for (
                var i = 0,
                  r = 0,
                  t = this.value.split("").reverse().join(""),
                  n = 0;
                n < t.length;
                n++
              )
                n % 2
                  ? (r += parseInt(t.charAt(n), 10))
                  : (i += parseInt(t.charAt(n), 10));
              return (10 - ((3 * i + r) % 10)) % 10;
            },
            keyTable: [
              "000000",
              "001011",
              "001101",
              "001110",
              "010011",
              "011001",
              "011100",
              "010101",
              "010110",
              "011010",
            ],
            characterMap: {
              digits: [
                [3, 2, 1, 1],
                [2, 2, 2, 1],
                [2, 1, 2, 2],
                [1, 4, 1, 1],
                [1, 1, 3, 2],
                [1, 2, 3, 1],
                [1, 1, 1, 4],
                [1, 3, 1, 2],
                [1, 2, 1, 3],
                [3, 1, 1, 2],
              ],
              start: [1, 1, 1],
              middle: [1, 1, 1, 1, 1],
            },
          });
          i.ean8 = i.ean13.extend({
            initValue: function (n, t, i) {
              var r = this;
              if (7 != n.length || /\D/.test(n))
                throw Error("Invalid value provided");
              r.value = n;
              r.options.height = i;
              r.checksum = r.calculateChecksum(r.value);
              r.leftPart = r.value.substr(0, 4);
              r.rightPart = r.value.substr(4) + r.checksum;
              r.pattern = [];
              r.baseUnit = t / (67 + r.quietZoneLength);
            },
          });
          b = k.extend({
            init: function (t, i) {
              var r = this;
              k.fn.init.call(r, t, i);
              r.element = n(t);
              r.wrapper = r.element;
              r.element.addClass("k-barcode").css("display", "block");
              r.surfaceWrap = n("<div />")
                .css("position", "relative")
                .appendTo(this.element);
              r.surface = s.Surface.create(r.surfaceWrap, {
                type: r.options.renderAs,
              });
              r._setOptions(i);
              i && v(i.value) && r.redraw();
            },
            setOptions: function (n) {
              this._setOptions(n);
              this.redraw();
            },
            redraw: function () {
              var n = this._getSize();
              this.surface.clear();
              this.surface.setSize({ width: n.width, height: n.height });
              this.createVisual();
              this.surface.draw(this.visual);
            },
            getSize: function () {
              return r.dimensions(this.element);
            },
            _resize: function () {
              this.redraw();
            },
            createVisual: function () {
              this.visual = this._render();
            },
            _render: function () {
              var u,
                f,
                y,
                n = this,
                t = n.options,
                e = t.value,
                i = t.text,
                p = h.getSpacing(i.margin),
                o = n._getSize(),
                w = t.border || {},
                c = n.encoding,
                l = new nt(0, 0, o.width, o.height)
                  .unpad(w.width)
                  .unpad(t.padding),
                a = l.height(),
                r = new s.Group();
              return (
                (n.contentBox = l),
                r.append(n._getBackground(o)),
                i.visible &&
                  ((y = s.util.measureText(e, { font: i.font }).height),
                  (a -= y + p.top + p.bottom)),
                (u = c.encode(e, l.width(), a)),
                i.visible &&
                  ((f = e),
                  t.checksum && v(c.checksum) && (f += " " + c.checksum),
                  r.append(n._getText(f))),
                (n.barHeight = a),
                (this._bandsGroup = this._getBands(u.pattern, u.baseUnit)),
                r.append(this._bandsGroup),
                r
              );
            },
            exportVisual: function () {
              return this._render();
            },
            _getSize: function () {
              var n = this,
                i = n.element,
                t = new a.Size(ot, st);
              return (
                i.width() > 0 && (t.width = i.width()),
                i.height() > 0 && (t.height = i.height()),
                n.options.width && (t.width = n.options.width),
                n.options.height && (t.height = n.options.height),
                t
              );
            },
            value: function (n) {
              var i = this;
              return v(n)
                ? ((i.options.value = n + ""), i.redraw(), t)
                : i.options.value;
            },
            _getBands: function (n, t) {
              for (
                var u,
                  r,
                  h,
                  c,
                  f = this,
                  e = f.contentBox,
                  o = e.x1,
                  l = new s.Group(),
                  i = 0;
                i < n.length;
                i++
              )
                (r = ut(n[i]) ? n[i] : { width: n[i], y1: 0, y2: f.barHeight }),
                  (u = r.width * t),
                  i % 2 &&
                    ((h = a.Rect.fromPoints(
                      new a.Point(o, r.y1 + e.y1),
                      new a.Point(o + u, r.y2 + e.y1)
                    )),
                    (c = s.Path.fromRect(h, {
                      fill: { color: f.options.color },
                      stroke: null,
                    })),
                    l.append(c)),
                  (o += u);
              return l;
            },
            _getBackground: function (n) {
              var r = this,
                i = r.options,
                t = i.border || {},
                u = new nt(0, 0, n.width, n.height).unpad(t.width / 2);
              return s.Path.fromRect(u.toRect(), {
                fill: { color: i.background },
                stroke: {
                  color: t.width ? t.color : "",
                  width: t.width,
                  dashType: t.dashType,
                },
              });
            },
            _getText: function (n) {
              var t = this,
                i = t.options.text,
                r = (t._textbox = new et(n, {
                  font: i.font,
                  color: i.color,
                  align: "center",
                  vAlign: "bottom",
                  margin: i.margin,
                }));
              return r.reflow(t.contentBox), r.renderVisual(), r.visual;
            },
            _setOptions: function (n) {
              var t = this;
              if (
                ((t.type = (n.type || t.options.type).toLowerCase()),
                "upca" == t.type &&
                  ((t.type = "ean13"), (n.value = "0" + n.value)),
                "upce" == t.type &&
                  ((t.type = "ean8"), (n.value = "0" + n.value)),
                !i[t.type])
              )
                throw Error("Encoding " + t.type + "is not supported.");
              t.encoding = new i[t.type]();
              t.options = d(!0, t.options, n);
            },
            options: {
              name: "Barcode",
              renderAs: "svg",
              value: "",
              type: "code39",
              checksum: !1,
              width: 0,
              height: 0,
              color: "black",
              background: "white",
              text: {
                visible: !0,
                font: "16px Consolas, Monaco, Sans Mono, monospace, sans-serif",
                color: "black",
                margin: { top: 0, bottom: 0, left: 0, right: 0 },
              },
              border: { width: 0, dashType: "solid", color: "black" },
              padding: { top: 0, bottom: 0, left: 0, right: 0 },
            },
          });
          h.ExportMixin.extend(b.fn);
          h.ui.plugin(b);
          r.deepExtend(h, { encodings: i, Encoding: u });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.qrcode.min",
      ["kendo.dataviz.core.min", "kendo.drawing.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function y(n) {
            return parseInt(n, 2);
          }
          function r(n, t) {
            var i = (+n).toString(2);
            return i.length < t && (i = Array(t - i.length + 1).join(0) + i), i;
          }
          function ci(n, t) {
            for (var r = [], i = 0; i < n.length; )
              r.push(n.substring(i, i + t)), (i += t);
            return r;
          }
          function i(n, t, i, r) {
            for (var u = 0; u < n.length; u++) n[u][i][r] = t;
          }
          function li(n, t, i, r) {
            for (var u = 0; u < si.length; u++)
              n[u][i][r] = si[u](i, r) ? 1 ^ t : parseInt(t, 10);
          }
          function tr() {
            for (var n, t = 1; t < 255; t++)
              (n = 2 * u[t - 1]),
                n > 255 && (n = 285 ^ n),
                (u[t] = n),
                (it[n] = t);
            n = (2 * u[t - 1]) ^ 285;
            u[t] = n;
            u[-1] = 0;
          }
          function ir() {
            for (var t, i, n = 2; n <= 68; n++)
              (t = rt[n - 1]), (i = [n, 0]), (rt[n] = ct(t, i));
          }
          function rr(n, i) {
            var f = [],
              r = n.length - 1;
            do (f[r] = u[(n[r] + i) % 255]), r--;
            while (n[r] !== t);
            return f;
          }
          function h(n, t) {
            return parseInt(n.charAt(t), 10);
          }
          function ai(n, t, i, r, u) {
            t[n][r] = ((t[n][r] << 1) ^ u) % 128;
            t[n][r] == yr && (i[n] += 40);
          }
          function vi(n, t, i, r, u, f) {
            i[n][f] == r
              ? u[n][f]++
              : ((i[n][f] = r),
                u[n][f] >= 5 && (t[n] += 3 + u[n][f] - 5),
                (u[n][f] = 1));
          }
          function ur(n, t) {
            var i = Math.floor((n / t) * 100),
              r = i % 5,
              u = Math.abs(i - r - 50),
              f = Math.abs(i + 5 - r - 50);
            return 10 * Math.min(u / 5, f / 5);
          }
          var e,
            ft,
            et,
            ot,
            st,
            ht,
            ct,
            lt,
            at,
            p,
            vt,
            yt,
            w,
            pt,
            wt,
            b,
            bt,
            kt,
            k,
            dt,
            d,
            o,
            c,
            gt,
            ni,
            ti,
            ii,
            ri,
            yi,
            l,
            pi,
            ui,
            f,
            g,
            s = window.kendo,
            fr = n.extend,
            nt = s.drawing,
            tt = s.dataviz,
            wi = s.ui.Widget,
            er = tt.Box2D,
            bi = "0000",
            ki = "numeric",
            fi = "alphanumeric",
            ei = "byte",
            it = { 1: 0 },
            u = { 0: 1 },
            rt = [
              [1, 0],
              [1, 25, 0],
            ],
            or = {
              15: 20,
              16: 20,
              18: 24,
              19: 24,
              22: 20,
              24: 22,
              26: 24,
              28: 20,
              30: 20,
              31: 24,
              32: 28,
              33: 24,
              36: 18,
              37: 22,
              39: 20,
              40: 24,
            },
            a = [
              {
                L: {
                  groups: [[1, 19]],
                  totalDataCodewords: 19,
                  errorCodewordsPerBlock: 7,
                },
                M: {
                  groups: [[1, 16]],
                  totalDataCodewords: 16,
                  errorCodewordsPerBlock: 10,
                },
                Q: {
                  groups: [[1, 13]],
                  totalDataCodewords: 13,
                  errorCodewordsPerBlock: 13,
                },
                H: {
                  groups: [[1, 9]],
                  totalDataCodewords: 9,
                  errorCodewordsPerBlock: 17,
                },
              },
              {
                L: {
                  groups: [[1, 34]],
                  totalDataCodewords: 34,
                  errorCodewordsPerBlock: 10,
                },
                M: {
                  groups: [[1, 28]],
                  totalDataCodewords: 28,
                  errorCodewordsPerBlock: 16,
                },
                Q: {
                  groups: [[1, 22]],
                  totalDataCodewords: 22,
                  errorCodewordsPerBlock: 22,
                },
                H: {
                  groups: [[1, 16]],
                  totalDataCodewords: 16,
                  errorCodewordsPerBlock: 28,
                },
              },
              {
                L: {
                  groups: [[1, 55]],
                  totalDataCodewords: 55,
                  errorCodewordsPerBlock: 15,
                },
                M: {
                  groups: [[1, 44]],
                  totalDataCodewords: 44,
                  errorCodewordsPerBlock: 26,
                },
                Q: {
                  groups: [[2, 17]],
                  totalDataCodewords: 34,
                  errorCodewordsPerBlock: 18,
                },
                H: {
                  groups: [[2, 13]],
                  totalDataCodewords: 26,
                  errorCodewordsPerBlock: 22,
                },
              },
              {
                L: {
                  groups: [[1, 80]],
                  totalDataCodewords: 80,
                  errorCodewordsPerBlock: 20,
                },
                M: {
                  groups: [[2, 32]],
                  totalDataCodewords: 64,
                  errorCodewordsPerBlock: 18,
                },
                Q: {
                  groups: [[2, 24]],
                  totalDataCodewords: 48,
                  errorCodewordsPerBlock: 26,
                },
                H: {
                  groups: [[4, 9]],
                  totalDataCodewords: 36,
                  errorCodewordsPerBlock: 16,
                },
              },
              {
                L: {
                  groups: [[1, 108]],
                  totalDataCodewords: 108,
                  errorCodewordsPerBlock: 26,
                },
                M: {
                  groups: [[2, 43]],
                  totalDataCodewords: 86,
                  errorCodewordsPerBlock: 24,
                },
                Q: {
                  groups: [
                    [2, 15],
                    [2, 16],
                  ],
                  totalDataCodewords: 62,
                  errorCodewordsPerBlock: 18,
                },
                H: {
                  groups: [
                    [2, 11],
                    [2, 12],
                  ],
                  totalDataCodewords: 46,
                  errorCodewordsPerBlock: 22,
                },
              },
              {
                L: {
                  groups: [[2, 68]],
                  totalDataCodewords: 136,
                  errorCodewordsPerBlock: 18,
                },
                M: {
                  groups: [[4, 27]],
                  totalDataCodewords: 108,
                  errorCodewordsPerBlock: 16,
                },
                Q: {
                  groups: [[4, 19]],
                  totalDataCodewords: 76,
                  errorCodewordsPerBlock: 24,
                },
                H: {
                  groups: [[4, 15]],
                  totalDataCodewords: 60,
                  errorCodewordsPerBlock: 28,
                },
              },
              {
                L: {
                  groups: [[2, 78]],
                  totalDataCodewords: 156,
                  errorCodewordsPerBlock: 20,
                },
                M: {
                  groups: [[4, 31]],
                  totalDataCodewords: 124,
                  errorCodewordsPerBlock: 18,
                },
                Q: {
                  groups: [
                    [2, 14],
                    [4, 15],
                  ],
                  totalDataCodewords: 88,
                  errorCodewordsPerBlock: 18,
                },
                H: {
                  groups: [
                    [4, 13],
                    [1, 14],
                  ],
                  totalDataCodewords: 66,
                  errorCodewordsPerBlock: 26,
                },
              },
              {
                L: {
                  groups: [[2, 97]],
                  totalDataCodewords: 194,
                  errorCodewordsPerBlock: 24,
                },
                M: {
                  groups: [
                    [2, 38],
                    [2, 39],
                  ],
                  totalDataCodewords: 154,
                  errorCodewordsPerBlock: 22,
                },
                Q: {
                  groups: [
                    [4, 18],
                    [2, 19],
                  ],
                  totalDataCodewords: 110,
                  errorCodewordsPerBlock: 22,
                },
                H: {
                  groups: [
                    [4, 14],
                    [2, 15],
                  ],
                  totalDataCodewords: 86,
                  errorCodewordsPerBlock: 26,
                },
              },
              {
                L: {
                  groups: [[2, 116]],
                  totalDataCodewords: 232,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [3, 36],
                    [2, 37],
                  ],
                  totalDataCodewords: 182,
                  errorCodewordsPerBlock: 22,
                },
                Q: {
                  groups: [
                    [4, 16],
                    [4, 17],
                  ],
                  totalDataCodewords: 132,
                  errorCodewordsPerBlock: 20,
                },
                H: {
                  groups: [
                    [4, 12],
                    [4, 13],
                  ],
                  totalDataCodewords: 100,
                  errorCodewordsPerBlock: 24,
                },
              },
              {
                L: {
                  groups: [
                    [2, 68],
                    [2, 69],
                  ],
                  totalDataCodewords: 274,
                  errorCodewordsPerBlock: 18,
                },
                M: {
                  groups: [
                    [4, 43],
                    [1, 44],
                  ],
                  totalDataCodewords: 216,
                  errorCodewordsPerBlock: 26,
                },
                Q: {
                  groups: [
                    [6, 19],
                    [2, 20],
                  ],
                  totalDataCodewords: 154,
                  errorCodewordsPerBlock: 24,
                },
                H: {
                  groups: [
                    [6, 15],
                    [2, 16],
                  ],
                  totalDataCodewords: 122,
                  errorCodewordsPerBlock: 28,
                },
              },
              {
                L: {
                  groups: [[4, 81]],
                  totalDataCodewords: 324,
                  errorCodewordsPerBlock: 20,
                },
                M: {
                  groups: [
                    [1, 50],
                    [4, 51],
                  ],
                  totalDataCodewords: 254,
                  errorCodewordsPerBlock: 30,
                },
                Q: {
                  groups: [
                    [4, 22],
                    [4, 23],
                  ],
                  totalDataCodewords: 180,
                  errorCodewordsPerBlock: 28,
                },
                H: {
                  groups: [
                    [3, 12],
                    [8, 13],
                  ],
                  totalDataCodewords: 140,
                  errorCodewordsPerBlock: 24,
                },
              },
              {
                L: {
                  groups: [
                    [2, 92],
                    [2, 93],
                  ],
                  totalDataCodewords: 370,
                  errorCodewordsPerBlock: 24,
                },
                M: {
                  groups: [
                    [6, 36],
                    [2, 37],
                  ],
                  totalDataCodewords: 290,
                  errorCodewordsPerBlock: 22,
                },
                Q: {
                  groups: [
                    [4, 20],
                    [6, 21],
                  ],
                  totalDataCodewords: 206,
                  errorCodewordsPerBlock: 26,
                },
                H: {
                  groups: [
                    [7, 14],
                    [4, 15],
                  ],
                  totalDataCodewords: 158,
                  errorCodewordsPerBlock: 28,
                },
              },
              {
                L: {
                  groups: [[4, 107]],
                  totalDataCodewords: 428,
                  errorCodewordsPerBlock: 26,
                },
                M: {
                  groups: [
                    [8, 37],
                    [1, 38],
                  ],
                  totalDataCodewords: 334,
                  errorCodewordsPerBlock: 22,
                },
                Q: {
                  groups: [
                    [8, 20],
                    [4, 21],
                  ],
                  totalDataCodewords: 244,
                  errorCodewordsPerBlock: 24,
                },
                H: {
                  groups: [
                    [12, 11],
                    [4, 12],
                  ],
                  totalDataCodewords: 180,
                  errorCodewordsPerBlock: 22,
                },
              },
              {
                L: {
                  groups: [
                    [3, 115],
                    [1, 116],
                  ],
                  totalDataCodewords: 461,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [4, 40],
                    [5, 41],
                  ],
                  totalDataCodewords: 365,
                  errorCodewordsPerBlock: 24,
                },
                Q: {
                  groups: [
                    [11, 16],
                    [5, 17],
                  ],
                  totalDataCodewords: 261,
                  errorCodewordsPerBlock: 20,
                },
                H: {
                  groups: [
                    [11, 12],
                    [5, 13],
                  ],
                  totalDataCodewords: 197,
                  errorCodewordsPerBlock: 24,
                },
              },
              {
                L: {
                  groups: [
                    [5, 87],
                    [1, 88],
                  ],
                  totalDataCodewords: 523,
                  errorCodewordsPerBlock: 22,
                },
                M: {
                  groups: [
                    [5, 41],
                    [5, 42],
                  ],
                  totalDataCodewords: 415,
                  errorCodewordsPerBlock: 24,
                },
                Q: {
                  groups: [
                    [5, 24],
                    [7, 25],
                  ],
                  totalDataCodewords: 295,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [11, 12],
                    [7, 13],
                  ],
                  totalDataCodewords: 223,
                  errorCodewordsPerBlock: 24,
                },
              },
              {
                L: {
                  groups: [
                    [5, 98],
                    [1, 99],
                  ],
                  totalDataCodewords: 589,
                  errorCodewordsPerBlock: 24,
                },
                M: {
                  groups: [
                    [7, 45],
                    [3, 46],
                  ],
                  totalDataCodewords: 453,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [15, 19],
                    [2, 20],
                  ],
                  totalDataCodewords: 325,
                  errorCodewordsPerBlock: 24,
                },
                H: {
                  groups: [
                    [3, 15],
                    [13, 16],
                  ],
                  totalDataCodewords: 253,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [1, 107],
                    [5, 108],
                  ],
                  totalDataCodewords: 647,
                  errorCodewordsPerBlock: 28,
                },
                M: {
                  groups: [
                    [10, 46],
                    [1, 47],
                  ],
                  totalDataCodewords: 507,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [1, 22],
                    [15, 23],
                  ],
                  totalDataCodewords: 367,
                  errorCodewordsPerBlock: 28,
                },
                H: {
                  groups: [
                    [2, 14],
                    [17, 15],
                  ],
                  totalDataCodewords: 283,
                  errorCodewordsPerBlock: 28,
                },
              },
              {
                L: {
                  groups: [
                    [5, 120],
                    [1, 121],
                  ],
                  totalDataCodewords: 721,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [9, 43],
                    [4, 44],
                  ],
                  totalDataCodewords: 563,
                  errorCodewordsPerBlock: 26,
                },
                Q: {
                  groups: [
                    [17, 22],
                    [1, 23],
                  ],
                  totalDataCodewords: 397,
                  errorCodewordsPerBlock: 28,
                },
                H: {
                  groups: [
                    [2, 14],
                    [19, 15],
                  ],
                  totalDataCodewords: 313,
                  errorCodewordsPerBlock: 28,
                },
              },
              {
                L: {
                  groups: [
                    [3, 113],
                    [4, 114],
                  ],
                  totalDataCodewords: 795,
                  errorCodewordsPerBlock: 28,
                },
                M: {
                  groups: [
                    [3, 44],
                    [11, 45],
                  ],
                  totalDataCodewords: 627,
                  errorCodewordsPerBlock: 26,
                },
                Q: {
                  groups: [
                    [17, 21],
                    [4, 22],
                  ],
                  totalDataCodewords: 445,
                  errorCodewordsPerBlock: 26,
                },
                H: {
                  groups: [
                    [9, 13],
                    [16, 14],
                  ],
                  totalDataCodewords: 341,
                  errorCodewordsPerBlock: 26,
                },
              },
              {
                L: {
                  groups: [
                    [3, 107],
                    [5, 108],
                  ],
                  totalDataCodewords: 861,
                  errorCodewordsPerBlock: 28,
                },
                M: {
                  groups: [
                    [3, 41],
                    [13, 42],
                  ],
                  totalDataCodewords: 669,
                  errorCodewordsPerBlock: 26,
                },
                Q: {
                  groups: [
                    [15, 24],
                    [5, 25],
                  ],
                  totalDataCodewords: 485,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [15, 15],
                    [10, 16],
                  ],
                  totalDataCodewords: 385,
                  errorCodewordsPerBlock: 28,
                },
              },
              {
                L: {
                  groups: [
                    [4, 116],
                    [4, 117],
                  ],
                  totalDataCodewords: 932,
                  errorCodewordsPerBlock: 28,
                },
                M: {
                  groups: [[17, 42]],
                  totalDataCodewords: 714,
                  errorCodewordsPerBlock: 26,
                },
                Q: {
                  groups: [
                    [17, 22],
                    [6, 23],
                  ],
                  totalDataCodewords: 512,
                  errorCodewordsPerBlock: 28,
                },
                H: {
                  groups: [
                    [19, 16],
                    [6, 17],
                  ],
                  totalDataCodewords: 406,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [2, 111],
                    [7, 112],
                  ],
                  totalDataCodewords: 1006,
                  errorCodewordsPerBlock: 28,
                },
                M: {
                  groups: [[17, 46]],
                  totalDataCodewords: 782,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [7, 24],
                    [16, 25],
                  ],
                  totalDataCodewords: 568,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [[34, 13]],
                  totalDataCodewords: 442,
                  errorCodewordsPerBlock: 24,
                },
              },
              {
                L: {
                  groups: [
                    [4, 121],
                    [5, 122],
                  ],
                  totalDataCodewords: 1094,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [4, 47],
                    [14, 48],
                  ],
                  totalDataCodewords: 860,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [11, 24],
                    [14, 25],
                  ],
                  totalDataCodewords: 614,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [16, 15],
                    [14, 16],
                  ],
                  totalDataCodewords: 464,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [6, 117],
                    [4, 118],
                  ],
                  totalDataCodewords: 1174,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [6, 45],
                    [14, 46],
                  ],
                  totalDataCodewords: 914,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [11, 24],
                    [16, 25],
                  ],
                  totalDataCodewords: 664,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [30, 16],
                    [2, 17],
                  ],
                  totalDataCodewords: 514,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [8, 106],
                    [4, 107],
                  ],
                  totalDataCodewords: 1276,
                  errorCodewordsPerBlock: 26,
                },
                M: {
                  groups: [
                    [8, 47],
                    [13, 48],
                  ],
                  totalDataCodewords: 1e3,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [7, 24],
                    [22, 25],
                  ],
                  totalDataCodewords: 718,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [22, 15],
                    [13, 16],
                  ],
                  totalDataCodewords: 538,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [10, 114],
                    [2, 115],
                  ],
                  totalDataCodewords: 1370,
                  errorCodewordsPerBlock: 28,
                },
                M: {
                  groups: [
                    [19, 46],
                    [4, 47],
                  ],
                  totalDataCodewords: 1062,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [28, 22],
                    [6, 23],
                  ],
                  totalDataCodewords: 754,
                  errorCodewordsPerBlock: 28,
                },
                H: {
                  groups: [
                    [33, 16],
                    [4, 17],
                  ],
                  totalDataCodewords: 596,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [8, 122],
                    [4, 123],
                  ],
                  totalDataCodewords: 1468,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [22, 45],
                    [3, 46],
                  ],
                  totalDataCodewords: 1128,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [8, 23],
                    [26, 24],
                  ],
                  totalDataCodewords: 808,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [12, 15],
                    [28, 16],
                  ],
                  totalDataCodewords: 628,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [3, 117],
                    [10, 118],
                  ],
                  totalDataCodewords: 1531,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [3, 45],
                    [23, 46],
                  ],
                  totalDataCodewords: 1193,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [4, 24],
                    [31, 25],
                  ],
                  totalDataCodewords: 871,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [11, 15],
                    [31, 16],
                  ],
                  totalDataCodewords: 661,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [7, 116],
                    [7, 117],
                  ],
                  totalDataCodewords: 1631,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [21, 45],
                    [7, 46],
                  ],
                  totalDataCodewords: 1267,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [1, 23],
                    [37, 24],
                  ],
                  totalDataCodewords: 911,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [19, 15],
                    [26, 16],
                  ],
                  totalDataCodewords: 701,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [5, 115],
                    [10, 116],
                  ],
                  totalDataCodewords: 1735,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [19, 47],
                    [10, 48],
                  ],
                  totalDataCodewords: 1373,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [15, 24],
                    [25, 25],
                  ],
                  totalDataCodewords: 985,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [23, 15],
                    [25, 16],
                  ],
                  totalDataCodewords: 745,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [13, 115],
                    [3, 116],
                  ],
                  totalDataCodewords: 1843,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [2, 46],
                    [29, 47],
                  ],
                  totalDataCodewords: 1455,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [42, 24],
                    [1, 25],
                  ],
                  totalDataCodewords: 1033,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [23, 15],
                    [28, 16],
                  ],
                  totalDataCodewords: 793,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [[17, 115]],
                  totalDataCodewords: 1955,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [10, 46],
                    [23, 47],
                  ],
                  totalDataCodewords: 1541,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [10, 24],
                    [35, 25],
                  ],
                  totalDataCodewords: 1115,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [19, 15],
                    [35, 16],
                  ],
                  totalDataCodewords: 845,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [17, 115],
                    [1, 116],
                  ],
                  totalDataCodewords: 2071,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [14, 46],
                    [21, 47],
                  ],
                  totalDataCodewords: 1631,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [29, 24],
                    [19, 25],
                  ],
                  totalDataCodewords: 1171,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [11, 15],
                    [46, 16],
                  ],
                  totalDataCodewords: 901,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [13, 115],
                    [6, 116],
                  ],
                  totalDataCodewords: 2191,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [14, 46],
                    [23, 47],
                  ],
                  totalDataCodewords: 1725,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [44, 24],
                    [7, 25],
                  ],
                  totalDataCodewords: 1231,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [59, 16],
                    [1, 17],
                  ],
                  totalDataCodewords: 961,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [12, 121],
                    [7, 122],
                  ],
                  totalDataCodewords: 2306,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [12, 47],
                    [26, 48],
                  ],
                  totalDataCodewords: 1812,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [39, 24],
                    [14, 25],
                  ],
                  totalDataCodewords: 1286,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [22, 15],
                    [41, 16],
                  ],
                  totalDataCodewords: 986,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [6, 121],
                    [14, 122],
                  ],
                  totalDataCodewords: 2434,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [6, 47],
                    [34, 48],
                  ],
                  totalDataCodewords: 1914,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [46, 24],
                    [10, 25],
                  ],
                  totalDataCodewords: 1354,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [2, 15],
                    [64, 16],
                  ],
                  totalDataCodewords: 1054,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [17, 122],
                    [4, 123],
                  ],
                  totalDataCodewords: 2566,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [29, 46],
                    [14, 47],
                  ],
                  totalDataCodewords: 1992,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [49, 24],
                    [10, 25],
                  ],
                  totalDataCodewords: 1426,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [24, 15],
                    [46, 16],
                  ],
                  totalDataCodewords: 1096,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [4, 122],
                    [18, 123],
                  ],
                  totalDataCodewords: 2702,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [13, 46],
                    [32, 47],
                  ],
                  totalDataCodewords: 2102,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [48, 24],
                    [14, 25],
                  ],
                  totalDataCodewords: 1502,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [42, 15],
                    [32, 16],
                  ],
                  totalDataCodewords: 1142,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [20, 117],
                    [4, 118],
                  ],
                  totalDataCodewords: 2812,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [40, 47],
                    [7, 48],
                  ],
                  totalDataCodewords: 2216,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [43, 24],
                    [22, 25],
                  ],
                  totalDataCodewords: 1582,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [10, 15],
                    [67, 16],
                  ],
                  totalDataCodewords: 1222,
                  errorCodewordsPerBlock: 30,
                },
              },
              {
                L: {
                  groups: [
                    [19, 118],
                    [6, 119],
                  ],
                  totalDataCodewords: 2956,
                  errorCodewordsPerBlock: 30,
                },
                M: {
                  groups: [
                    [18, 47],
                    [31, 48],
                  ],
                  totalDataCodewords: 2334,
                  errorCodewordsPerBlock: 28,
                },
                Q: {
                  groups: [
                    [34, 24],
                    [34, 25],
                  ],
                  totalDataCodewords: 1666,
                  errorCodewordsPerBlock: 30,
                },
                H: {
                  groups: [
                    [20, 15],
                    [61, 16],
                  ],
                  totalDataCodewords: 1276,
                  errorCodewordsPerBlock: 30,
                },
              },
            ],
            oi = [1, 0, 1, 1, 1],
            sr = [1, 0, 1],
            hr = { L: "01", M: "00", Q: "11", H: "10" },
            cr = "101010000010010",
            lr = "10100110111",
            ar = "1111100100101",
            vr = ["11101100", "00010001"],
            yr = 93,
            si = [
              function (n, t) {
                return (n + t) % 2 == 0;
              },
              function (n) {
                return n % 2 == 0;
              },
              function (n, t) {
                return t % 3 == 0;
              },
              function (n, t) {
                return (n + t) % 3 == 0;
              },
              function (n, t) {
                return (Math.floor(n / 2) + Math.floor(t / 3)) % 2 == 0;
              },
              function (n, t) {
                return ((n * t) % 2) + ((n * t) % 3) == 0;
              },
              function (n, t) {
                return (((n * t) % 2) + ((n * t) % 3)) % 2 == 0;
              },
              function (n, t) {
                return (((n + t) % 2) + ((n * t) % 3)) % 2 == 0;
              },
            ],
            pr = /^\d+/,
            di = "A-Z0-9 $%*+./:-",
            wr = RegExp("^[A-Z $%*+./:-]+"),
            gi = RegExp("^[" + di + "]+"),
            nr = RegExp("^[^" + di + "]+"),
            br = 8,
            kr = 5,
            dr = 8,
            gr = 17,
            nu = 9,
            tu = 16,
            ut = Math.round,
            hi = s.Class.extend({
              getVersionIndex: function (n) {
                return n < 10 ? 0 : n > 26 ? 2 : 1;
              },
              getBitsCharacterCount: function (n) {
                var t = this;
                return t.bitsInCharacterCount[t.getVersionIndex(n || 40)];
              },
              getModeCountString: function (n, t) {
                var i = this;
                return i.modeIndicator + r(n, i.getBitsCharacterCount(t));
              },
              encode: function () {},
              getStringBitsLength: function () {},
              getValue: function () {},
              modeIndicator: "",
              bitsInCharacterCount: [],
            }),
            v = {};
          v[ki] = hi.extend({
            bitsInCharacterCount: [10, 12, 14],
            modeIndicator: "0001",
            getValue: function (n) {
              return parseInt(n, 10);
            },
            encode: function (n, t) {
              for (
                var e = this,
                  u = ci(n, 3),
                  f = e.getModeCountString(n.length, t),
                  i = 0;
                i < u.length - 1;
                i++
              )
                f += r(u[i], 10);
              return f + r(u[i], 1 + 3 * u[i].length);
            },
            getStringBitsLength: function (n, t) {
              var i = n % 3;
              return (
                4 +
                this.getBitsCharacterCount(t) +
                10 * Math.floor(n / 3) +
                3 * i +
                (0 === i ? 0 : 1)
              );
            },
          });
          v[fi] = hi.extend({
            characters: {
              0: 0,
              1: 1,
              2: 2,
              3: 3,
              4: 4,
              5: 5,
              6: 6,
              7: 7,
              8: 8,
              9: 9,
              A: 10,
              B: 11,
              C: 12,
              D: 13,
              E: 14,
              F: 15,
              G: 16,
              H: 17,
              I: 18,
              J: 19,
              K: 20,
              L: 21,
              M: 22,
              N: 23,
              O: 24,
              P: 25,
              Q: 26,
              R: 27,
              S: 28,
              T: 29,
              U: 30,
              V: 31,
              W: 32,
              X: 33,
              Y: 34,
              Z: 35,
              " ": 36,
              $: 37,
              "%": 38,
              "*": 39,
              "+": 40,
              "-": 41,
              ".": 42,
              "/": 43,
              ":": 44,
            },
            bitsInCharacterCount: [9, 11, 13],
            modeIndicator: "0010",
            getValue: function (n) {
              return this.characters[n];
            },
            encode: function (n, t) {
              for (
                var e,
                  f = this,
                  u = ci(n, 2),
                  o = f.getModeCountString(n.length, t),
                  i = 0;
                i < u.length - 1;
                i++
              )
                (e =
                  45 * f.getValue(u[i].charAt(0)) + f.getValue(u[i].charAt(1))),
                  (o += r(e, 11));
              return (
                (e =
                  2 == u[i].length
                    ? 45 * f.getValue(u[i].charAt(0)) +
                      f.getValue(u[i].charAt(1))
                    : f.getValue(u[i].charAt(0))),
                o + r(e, 1 + 5 * u[i].length)
              );
            },
            getStringBitsLength: function (n, t) {
              return (
                4 +
                this.getBitsCharacterCount(t) +
                11 * Math.floor(n / 2) +
                6 * (n % 2)
              );
            },
          });
          v[ei] = hi.extend({
            bitsInCharacterCount: [8, 16, 16],
            modeIndicator: "0100",
            getValue: function (n) {
              var t = n.charCodeAt(0);
              if (t <= 127 || (160 <= t && t <= 255)) return t;
              throw Error("Unsupported character: " + n);
            },
            encode: function (n, t) {
              for (
                var u = this, f = u.getModeCountString(n.length, t), i = 0;
                i < n.length;
                i++
              )
                f += r(u.getValue(n.charAt(i)), 8);
              return f;
            },
            getStringBitsLength: function (n, t) {
              return 4 + this.getBitsCharacterCount(t) + 8 * n;
            },
          });
          e = {};
          for (ft in v) e[ft] = new v[ft]();
          et = function (n) {
            var u = this,
              i = n.length - 1,
              r = n.length - 1,
              f = r,
              e = -1,
              o = 0;
            u.move = function () {
              i += e * o;
              o ^= 1;
              r = f - o;
            };
            u.getNextCell = function () {
              for (; n[i][r] !== t; )
                u.move(),
                  (i < 0 || i >= n.length) &&
                    ((e = -e),
                    (f -= 8 != f ? 2 : 3),
                    (r = f),
                    (i = e < 0 ? n.length - 1 : 0));
              return { row: i, column: r };
            };
            u.getNextRemainderCell = function () {
              if ((u.move(), n[i][r] === t)) return { row: i, column: r };
            };
          };
          ot = function (n, t) {
            for (var i, u, r, e, o, s = new et(n[0]), f = 0; f < t.length; f++)
              for (i = t[f], u = 0; i.length > 0; ) {
                for (e = 0; e < i.length; e++)
                  for (o = 0; o < 8; o++)
                    (r = s.getNextCell()),
                      li(n, i[e][u].charAt(o), r.row, r.column);
                for (u++; i[0] && u == i[0].length; ) i.splice(0, 1);
              }
            for (; (r = s.getNextRemainderCell()); ) li(n, 0, r.row, r.column);
          };
          st = function (n, t) {
            for (var i = 8 * t, r = 0, u = 0; n.length < i && r < bi.length; )
              n += bi.charAt(r++);
            for (
              n.length % 8 != 0 && (n += Array(9 - (n.length % 8)).join("0"));
              n.length < i;

            )
              (n += vr[u]), (u ^= 1);
            return n;
          };
          ht = function (n, t) {
            for (var r = [], u = n.length - 2, i = u; i >= 0; i--)
              r[i] = n[i] ^ t[i];
            return r;
          };
          ct = function (n, i) {
            for (var r, e = [], f = 0; f < n.length; f++)
              for (r = 0; r < i.length; r++)
                e[f + r] =
                  e[f + r] === t
                    ? (n[f] + (i[r] >= 0 ? i[r] : 0)) % 255
                    : it[u[e[f + r]] ^ u[(n[f] + i[r]) % 255]];
            return e;
          };
          tr();
          ir();
          lt = function (n, t) {
            for (
              var f,
                e = rt[t - 1],
                u = Array(t).concat(n),
                o = Array(u.length - e.length).concat(e),
                h = n.length,
                s = [],
                i = 0;
              i < h;
              i++
            )
              (f = rr(o, it[u[u.length - 1]])), o.splice(0, 1), (u = ht(f, u));
            for (i = u.length - 1; i >= 0; i--) s[t - 1 - i] = r(u[i], 8);
            return s;
          };
          at = function (n, t) {
            for (
              var u,
                f,
                l,
                e,
                o,
                s,
                r,
                h = 0,
                a = [],
                v = [],
                c = t.groups,
                i = 0;
              i < c.length;
              i++
            )
              for (l = c[i][0], s = 0; s < l; s++) {
                for (f = c[i][1], u = [], e = [], r = 1; r <= f; r++)
                  (o = n.substring(h, h + 8)),
                    u.push(o),
                    (e[f - r] = y(o)),
                    (h += 8);
                a.push(u);
                v.push(lt(e, t.errorCodewordsPerBlock));
              }
            return [a, v];
          };
          p = function (n, t, i, r, u) {
            var o,
              s,
              h = pr.exec(n),
              f = h ? h[0] : "",
              c = wr.exec(n),
              a = c ? c[0] : "",
              l = gi.exec(n),
              e = l ? l[0] : "";
            return (
              f &&
              (f.length >= t ||
                n.length == f.length ||
                (f.length >= i && !gi.test(n.charAt(f.length))))
                ? ((o = ki), (s = f))
                : e && (n.length == e.length || e.length >= r || u == fi)
                ? ((o = fi), (s = f || a))
                : ((o = ei),
                  (s = e
                    ? e + nr.exec(n.substring(e.length))[0]
                    : nr.exec(n)[0])),
              { mode: o, modeString: s }
            );
          };
          vt = function (n) {
            var r,
              t,
              i = [],
              u = 0;
            for (
              i.push(p(n, br, kr, dr, r)),
                r = i[0].mode,
                n = n.substr(i[0].modeString.length);
              n.length > 0;

            )
              (t = p(n, gr, nu, tu, r)),
                t.mode != r
                  ? ((r = t.mode), i.push(t), u++)
                  : (i[u].modeString += t.modeString),
                (n = n.substr(t.modeString.length));
            return i;
          };
          yt = function (n) {
            for (var i, r = 0, t = 0; t < n.length; t++)
              (i = e[n[t].mode]),
                (r += i.getStringBitsLength(n[t].modeString.length));
            return Math.ceil(r / 8);
          };
          w = function (n, t) {
            var i = 0,
              u = a.length - 1,
              r = Math.floor(a.length / 2);
            do
              n < a[r][t].totalDataCodewords ? (u = r) : (i = r),
                (r = i + Math.floor((u - i) / 2));
            while (u - i > 1);
            return n <= a[i][t].totalDataCodewords ? r + 1 : u + 1;
          };
          pt = function (n, t) {
            for (var r, u = "", i = 0; i < n.length; i++)
              (r = e[n[i].mode]), (u += r.encode(n[i].modeString, t));
            return u;
          };
          wt = function (n) {
            var i,
              t,
              u = y(n),
              r = "";
            if (0 === u) return "101010000010010";
            for (i = b(y(n), lr, 15), t = 0; t < i.length; t++)
              r += i.charAt(t) ^ cr.charAt(t);
            return r;
          };
          b = function (n, t, i) {
            var f = y(t),
              u = t.length - 1,
              e = n << u,
              o = i - u,
              s = r(n, o),
              h = bt(e, f);
            return s + r(h, u);
          };
          bt = function (n, t) {
            var r = t.toString(2).length,
              i = n.toString(2).length;
            do (n ^= t << (i - r)), (i = n.toString(2).length);
            while (i >= r);
            return n;
          };
          kt = function (n) {
            for (var i, r = [], u = 17 + 4 * n, t = 0; t < si.length; t++)
              for (r[t] = Array(u), i = 0; i < u; i++) r[t][i] = Array(u);
            return r;
          };
          k = function (n, t) {
            for (var f = n[0], e = 0, o = t.length, r = 0, u = 8; r <= 8; r++)
              6 !== r && i(n, h(t, o - 1 - e++), r, u);
            for (r = 8, u = 7; u >= 0; u--)
              6 !== u && i(n, h(t, o - 1 - e++), r, u);
            for (e = 0, u = f.length - 1, r = 8; u >= f.length - 8; u--)
              i(n, h(t, o - 1 - e++), r, u);
            for (
              i(n, 1, f.length - 8, 8), r = f.length - 7, u = 8;
              r < f.length;
              r++
            )
              i(n, h(t, o - 1 - e++), r, u);
          };
          dt = function (n) {
            return b(n, ar, 18);
          };
          d = function (n, t) {
            for (
              var u,
                f,
                e,
                s = n[0],
                o = s.length,
                c = o - 11,
                l = o - 11,
                r = 0;
              r < t.length;
              r++
            )
              (u = Math.floor(r / 3)),
                (f = r % 3),
                (e = h(t, t.length - r - 1)),
                i(n, e, 0 + u, c + f),
                i(n, e, l + f, 0 + u);
          };
          o = function (n, t, r, u) {
            for (
              var o, e, h = t.length + 2, s = t.length + 1, f = 0;
              f < t.length;
              f++
            )
              for (e = f; e < h - f; e++)
                (o = t[f]),
                  i(n, o, r + e, u + f),
                  i(n, o, r + f, u + e),
                  i(n, o, r + s - e, u + s - f),
                  i(n, o, r + s - f, u + s - e);
          };
          c = function (n, t, r, u) {
            var f = r,
              e = u,
              o = n[0];
            do i(n, 0, f, u), i(n, 0, r, e), (f += t[0]), (e += t[1]);
            while (f >= 0 && f < o.length);
          };
          gt = function (n) {
            var t = n[0].length;
            o(n, oi, 0, 0);
            c(n, [-1, -1], 7, 7);
            o(n, oi, t - 7, 0);
            c(n, [1, -1], t - 8, 7);
            o(n, oi, 0, t - 7);
            c(n, [-1, 1], 7, t - 8);
          };
          ni = function (n, i) {
            var l, e, a, r, s, h, c, u, f;
            if (!(i < 2)) {
              for (
                l = n[0],
                  e = l.length,
                  a = Math.floor(i / 7),
                  r = [6],
                  c = 0,
                  (s = or[i])
                    ? (h = (e - 13 - s) / a)
                    : (s = h = (e - 13) / (a + 1)),
                  r.push(r[c++] + s);
                r[c] + h < e;

              )
                r.push(r[c++] + h);
              for (u = 0; u < r.length; u++)
                for (f = 0; f < r.length; f++)
                  l[r[u]][r[f]] === t && o(n, sr, r[u] - 2, r[f] - 2);
            }
          };
          ti = function (n) {
            for (var r = 1, u = n[0].length, t = 8; t < u - 8; t++)
              i(n, r, 6, t), i(n, r, t, 6), (r ^= 1);
          };
          ii = function (n) {
            for (
              var f,
                r,
                i,
                v,
                y,
                h,
                u = [],
                e = [],
                c = [],
                l = [],
                a = [],
                o = 0,
                p = 1,
                s = n[0].length,
                t = 0;
              t < n.length;
              t++
            )
              (u[t] = 0),
                (c[t] = 0),
                (a[t] = [0, 0]),
                (l[t] = [0, 0]),
                (e[t] = []);
            for (t = 0; t < s; t++)
              for (r = 0; r < s; r++)
                for (i = 0; i < n.length; i++)
                  (f = n[i]),
                    (c[i] += parseInt(f[t][r], 10)),
                    e[i][o] === f[t][r] &&
                      t + 1 < s &&
                      r - 1 >= 0 &&
                      f[t + 1][r] == e[i][o] &&
                      f[t + 1][r - 1] == e[i][o] &&
                      (u[i] += 3),
                    ai(i, l, u, o, f[t][r]),
                    ai(i, l, u, p, f[r][t]),
                    vi(i, u, e, f[t][r], a, o),
                    vi(i, u, e, f[r][t], a, p);
            for (v = s * s, h = Number.MAX_VALUE, t = 0; t < u.length; t++)
              (u[t] += ur(c[t], v)), u[t] < h && ((h = u[t]), (y = t));
            return y;
          };
          ri = function (n, t) {
            this.dataString = n;
            this.version = t;
          };
          yi = function () {
            this.getEncodingResult = function (n, t) {
              var i = vt(n),
                u = yt(i),
                r = w(u, t),
                f = pt(i, r);
              return new ri(f, r);
            };
          };
          l = function () {
            this.mode = e[this.encodingMode];
          };
          l.fn = l.prototype = {
            encodingMode: ei,
            utfBOM: "111011111011101110111111",
            initialModeCountStringLength: 20,
            getEncodingResult: function (n, t) {
              var i = this,
                r = i.encode(n),
                f = i.getDataCodewordsCount(r),
                u = w(f, t),
                e = i.mode.getModeCountString(r.length / 8, u) + r;
              return new ri(e, u);
            },
            getDataCodewordsCount: function (n) {
              var t = this,
                i = n.length;
              return Math.ceil((t.initialModeCountStringLength + i) / 8);
            },
            encode: function (n) {
              for (var i = this, r = i.utfBOM, t = 0; t < n.length; t++)
                r += i.encodeCharacter(n.charCodeAt(t));
              return r;
            },
            encodeCharacter: function (n) {
              var u,
                i,
                f = this.getBytesCount(n),
                e = f - 1,
                t = "";
              if (1 == f) t = r(n, 8);
              else {
                for (u = 8 - f, i = 0; i < e; i++)
                  t = r(((n >> (6 * i)) & 63) | 128, 8) + t;
                t = ((n >> (6 * e)) | ((255 >> u) << u)).toString(2) + t;
              }
              return t;
            },
            getBytesCount: function (n) {
              for (var i = this.ranges, t = 0; t < i.length; t++)
                if (n < i[t]) return t + 1;
            },
            ranges: [128, 2048, 65536, 2097152, 67108864],
          };
          pi = function (n) {
            return n && n.toLowerCase().indexOf("utf_8") >= 0
              ? new l()
              : new yi();
          };
          ui = function (n, t, i) {
            var o,
              e,
              s,
              l = new pi(i),
              h = l.getEncodingResult(n, t),
              f = h.version,
              c = a[f - 1][t],
              v = st(h.dataString, c.totalDataCodewords),
              y = at(v, c),
              u = kt(f);
            return (
              gt(u),
              ni(u, f),
              ti(u),
              f >= 7 && d(u, r(0, 18)),
              k(u, r(0, 15)),
              ot(u, y),
              (o = ii(u)),
              (e = u[o]),
              f >= 7 && d([e], dt(f)),
              (s = hr[t] + r(o, 3)),
              k([e], wt(s)),
              e
            );
          };
          f = {
            DEFAULT_SIZE: 200,
            QUIET_ZONE_LENGTH: 4,
            DEFAULT_ERROR_CORRECTION_LEVEL: "L",
            DEFAULT_BACKGROUND: "#fff",
            DEFAULT_DARK_MODULE_COLOR: "#000",
            MIN_BASE_UNIT_SIZE: 1,
          };
          g = wi.extend({
            init: function (t, i) {
              var r = this;
              wi.fn.init.call(r, t, i);
              r.element = n(t);
              r.wrapper = r.element;
              r.element.addClass("k-qrcode");
              r.surfaceWrap = n("<div />")
                .css("position", "relative")
                .appendTo(this.element);
              r.surface = nt.Surface.create(r.surfaceWrap, {
                type: r.options.renderAs,
              });
              r.setOptions(i);
            },
            redraw: function () {
              var n = this._getSize();
              this.surfaceWrap.css({ width: n, height: n });
              this.surface.clear();
              this.createVisual();
              this.surface.draw(this.visual);
            },
            getSize: function () {
              return s.dimensions(this.element);
            },
            _resize: function () {
              this.redraw();
            },
            createVisual: function () {
              this.visual = this._render();
            },
            exportVisual: function () {
              return this._render();
            },
            _render: function () {
              var r,
                s,
                t,
                u,
                h,
                f,
                i,
                n = this,
                c = n._value,
                e = n.options.border || {},
                l = n.options.padding || 0,
                o = e.width || 0;
              return (
                (e.width = o),
                (i = new nt.Group()),
                c &&
                  ((t = ui(c, n.options.errorCorrection, n.options.encoding)),
                  (u = n._getSize()),
                  (f = u - 2 * (o + l)),
                  (r = n._calculateBaseUnit(f, t.length)),
                  (h = t.length * r),
                  (s = o + l + (f - h) / 2),
                  i.append(n._renderBackground(u, e)),
                  i.append(n._renderMatrix(t, r, s))),
                i
              );
            },
            _getSize: function () {
              var n,
                t,
                i,
                r = this;
              return (
                r.options.size
                  ? (n = parseInt(r.options.size, 10))
                  : ((t = r.element),
                    (i = Math.min(t.width(), t.height())),
                    (n = i > 0 ? i : f.DEFAULT_SIZE)),
                n
              );
            },
            _calculateBaseUnit: function (n, t) {
              var i = Math.floor(n / t);
              if (i < f.MIN_BASE_UNIT_SIZE) throw Error("Insufficient size.");
              return i * t >= n && i - 1 >= f.MIN_BASE_UNIT_SIZE && i--, i;
            },
            _renderMatrix: function (n, t, i) {
              for (
                var f,
                  r,
                  c,
                  e,
                  o,
                  s,
                  h,
                  l = new nt.MultiPath({
                    fill: { color: this.options.color },
                    stroke: null,
                  }),
                  u = 0;
                u < n.length;
                u++
              )
                for (f = i + u * t, r = 0; r < n.length; ) {
                  for (; 0 === n[u][r] && r < n.length; ) r++;
                  if (r < n.length) {
                    for (c = r; 1 == n[u][r]; ) r++;
                    e = ut(i + c * t);
                    o = ut(f);
                    s = ut(i + r * t);
                    h = ut(f + t);
                    l.moveTo(e, o)
                      .lineTo(e, h)
                      .lineTo(s, h)
                      .lineTo(s, o)
                      .close();
                  }
                }
              return l;
            },
            _renderBackground: function (n, t) {
              var i = new er(0, 0, n, n).unpad(t.width / 2);
              return nt.Path.fromRect(i.toRect(), {
                fill: { color: this.options.background },
                stroke: { color: t.color, width: t.width },
              });
            },
            setOptions: function (n) {
              var i = this;
              n = n || {};
              i.options = fr(i.options, n);
              n.value !== t && (i._value = i.options.value + "");
              i.redraw();
            },
            value: function (n) {
              var i = this;
              return n === t ? i._value : ((i._value = n + ""), i.redraw(), t);
            },
            options: {
              name: "QRCode",
              renderAs: "svg",
              encoding: "ISO_8859_1",
              value: "",
              errorCorrection: f.DEFAULT_ERROR_CORRECTION_LEVEL,
              background: f.DEFAULT_BACKGROUND,
              color: f.DEFAULT_DARK_MODULE_COLOR,
              size: "",
              padding: 0,
              border: { color: "", width: 0 },
            },
          });
          tt.ExportMixin.extend(g.fn);
          tt.ui.plugin(g);
          s.deepExtend(tt, {
            QRCode: g,
            QRCodeDefaults: f,
            QRCodeFunctions: {
              FreeCellVisitor: et,
              fillData: ot,
              padDataString: st,
              generateErrorCodewords: lt,
              xorPolynomials: ht,
              getBlocks: at,
              multiplyPolynomials: ct,
              chooseMode: p,
              getModes: vt,
              getDataCodewordsCount: yt,
              getVersion: w,
              getDataString: pt,
              encodeFormatInformation: wt,
              encodeBCH: b,
              dividePolynomials: bt,
              initMatrices: kt,
              addFormatInformation: k,
              encodeVersionInformation: dt,
              addVersionInformation: d,
              addCentricPattern: o,
              addFinderSeparator: c,
              addFinderPatterns: gt,
              addAlignmentPatterns: ni,
              addTimingFunctions: ti,
              scoreMaskMatrixes: ii,
              encodeData: ui,
              UTF8Encoder: l,
            },
            QRCodeFields: {
              modes: e,
              powersOfTwo: it,
              powersOfTwoResult: u,
              generatorPolynomials: rt,
            },
          });
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/stock/kendo-stock-chart.min", ["kendo.dataviz.chart.min"], n);
  })(
    function () {
      !(function () {
        function l(n, t) {
          var i = document.createElement("div");
          return (i.className = n), t && (i.style.cssText = t), i;
        }
        function v() {}
        function k(n) {
          return (v.prototype = n), new v();
        }
        var n, i, t, r, s, e, h, y, c, f, u, p, w, o, b, a;
        window.kendo.dataviz = window.kendo.dataviz || {};
        n = kendo.dataviz;
        i = n.elementStyles;
        t = n.deepExtend;
        r = n.toTime;
        s = n.constants;
        e = n.Chart;
        h = kendo.drawing;
        y = h.Animation.extend({
          setup: function () {
            this._initialOpacity = parseFloat(
              i(this.element, "opacity").opacity
            );
          },
          step: function (t) {
            i(this.element, {
              opacity: n.interpolateValue(this._initialOpacity, 0, t) + "",
            });
          },
          abort: function () {
            h.Animation.fn.abort.call(this);
            i(this.element, {
              display: "none",
              opacity: this._initialOpacity + "",
            });
          },
          cancel: function () {
            h.Animation.fn.abort.call(this);
            i(this.element, { opacity: this._initialOpacity + "" });
          },
        });
        c = n.Class.extend({
          init: function (n, r, u) {
            this.options = t({}, this.options, u);
            this.container = n;
            this.chartService = r;
            var f = i(n, ["paddingLeft", "paddingTop"]);
            this.chartPadding = { top: f.paddingTop, left: f.paddingLeft };
            this.createElements();
            n.appendChild(this.element);
          },
          createElements: function () {
            var n = (this.element = l(
                "k-navigator-hint",
                "display: none; position: absolute; top: 1px; left: 1px;"
              )),
              t = (this.tooltip = l("k-tooltip k-chart-tooltip")),
              i = (this.scroll = l("k-scroll"));
            t.innerHTML = "&nbsp;";
            n.appendChild(t);
            n.appendChild(i);
          },
          show: function (t, u, f) {
            var o,
              s = this,
              c = s.element,
              e = s.options,
              p = s.scroll,
              h = s.tooltip,
              w = n.toDate(r(t) + r(u - t) / 2),
              l = 0.4 * f.width(),
              a = f.center().x - l,
              b = f.center().x,
              k = b - a,
              d = e.max - e.min,
              g = k / d,
              nt = w - e.min,
              v = this.chartService.intl.format(e.format, t, u),
              y = n.getTemplate(e);
            this.clearHideTimeout();
            this._visible ||
              (i(c, { visibility: "hidden", display: "block" }),
              (this._visible = !0));
            y && (v = y({ from: t, to: u }));
            h.innerHTML = v;
            i(h, { left: f.center().x - h.offsetWidth / 2, top: f.y1 });
            o = i(h, ["marginTop", "borderTopWidth", "height"]);
            i(p, {
              width: l,
              left: a + nt * g,
              top: f.y1 + o.marginTop + o.borderTopWidth + o.height / 2,
            });
            i(c, { visibility: "visible" });
          },
          clearHideTimeout: function () {
            this._hideTimeout && clearTimeout(this._hideTimeout);
            this._hideAnimation && this._hideAnimation.cancel();
          },
          hide: function () {
            var n = this;
            this.clearHideTimeout();
            this._hideTimeout = setTimeout(function () {
              n._visible = !1;
              n._hideAnimation = new y(n.element);
              n._hideAnimation.setup();
              n._hideAnimation.play();
            }, this.options.hideDelay);
          },
          destroy: function () {
            this.clearHideTimeout();
            this.container && this.container.removeChild(this.element);
            delete this.container;
            delete this.chartService;
            delete this.element;
            delete this.tooltip;
            delete this.scroll;
          },
        });
        n.setDefaultOptions(c, { format: "{0:d} - {1:d}", hideDelay: 500 });
        f = "_navigator";
        u = f;
        p = { NAVIGATOR_AXIS: u, NAVIGATOR_PANE: f };
        w = 3;
        o = n.Class.extend({
          init: function (i) {
            var f, r, u;
            this.chart = i;
            f = this.options = t({}, this.options, i.options.navigator);
            r = f.select;
            r &&
              ((r.from = this.parseDate(r.from)),
              (r.to = this.parseDate(r.to)));
            n.defined(f.hint.visible) || (f.hint.visible = f.visible);
            this.chartObserver = new n.InstanceObserver(
              this,
              ((u = {}),
              (u[s.DRAG] = "_drag"),
              (u[s.DRAG_END] = "_dragEnd"),
              (u[s.ZOOM] = "_zoom"),
              (u[s.ZOOM_END] = "_zoomEnd"),
              u)
            );
            i.addObserver(this.chartObserver);
          },
          parseDate: function (t) {
            return n.parseDate(this.chart.chartService.intl, t);
          },
          clean: function () {
            this.selection &&
              (this.selection.destroy(), (this.selection = null));
            this.hint && (this.hint.destroy(), (this.hint = null));
          },
          destroy: function () {
            this.chart &&
              (this.chart.removeObserver(this.chartObserver),
              delete this.chart);
            this.clean();
          },
          redraw: function () {
            this._redrawSelf();
            this.initSelection();
          },
          initSelection: function () {
            var o = this,
              r = o.chart,
              t = o.options,
              i = this.mainAxis(),
              s = i.roundedRange(),
              u = s.min,
              f = s.max,
              e = t.select,
              l = e.from,
              a = e.to,
              v = e.mousewheel,
              h = k(i);
            0 !== i.categoriesCount() &&
              (this.clean(),
              (h.box = i.box),
              (this.selection = new n.Selection(
                r,
                h,
                {
                  min: u,
                  max: f,
                  from: l || u,
                  to: a || f,
                  mousewheel: n.valueOrDefault(v, { zoom: "left" }),
                  visible: t.visible,
                },
                new n.InstanceObserver(this, {
                  selectStart: "_selectStart",
                  select: "_select",
                  selectEnd: "_selectEnd",
                })
              )),
              t.hint.visible &&
                (this.hint = new c(r.element, r.chartService, {
                  min: u,
                  max: f,
                  template: n.getTemplate(t.hint),
                  format: t.hint.format,
                })));
          },
          setRange: function () {
            var n,
              s = this.chart._createPlotArea(!0),
              h = s.namedCategoryAxes[u],
              o = h.roundedRange(),
              i = o.min,
              r = o.max,
              f = this.options.select || {},
              e = f.from || i;
            e < i && (e = i);
            n = f.to || r;
            n > r && (n = r);
            this.options.select = t({}, f, { from: e, to: n });
            this.filterAxes();
          },
          _redrawSelf: function (t) {
            var i = this.chart._plotArea;
            i && i.redraw(n.last(i.panes), t);
          },
          redrawSlaves: function () {
            var t = this.chart,
              n = t._plotArea,
              i = n.panes.slice(0, -1);
            n.srcSeries = t.options.series;
            n.options.categoryAxis = t.options.categoryAxis;
            n.clearSeriesPointsCache();
            n.redraw(i);
          },
          _drag: function (t) {
            var u,
              i,
              f,
              h = this,
              c = h.chart,
              e = h.selection,
              v = c._eventCoordinates(t.originalEvent),
              l = this.mainAxis(),
              o = l.roundedRange(),
              y = l.pane.box.containsPoint(v),
              p = c._plotArea.categoryAxis,
              a = t.axisRanges[p.options.name],
              s = this.options.select;
            a &&
              !y &&
              e &&
              ((u =
                s.from && s.to
                  ? r(s.to) - r(s.from)
                  : r(e.options.to) - r(e.options.from)),
              (i = n.toDate(n.limitValue(r(a.min), o.min, r(o.max) - u))),
              (f = n.toDate(n.limitValue(r(i) + u, r(o.min) + u, o.max))),
              (this.options.select = { from: i, to: f }),
              this.options.liveDrag && (this.filterAxes(), this.redrawSlaves()),
              e.set(i, f),
              this.showHint(i, f));
          },
          _dragEnd: function () {
            this.filterAxes();
            this.filter();
            this.redrawSlaves();
            this.hint && this.hint.hide();
          },
          readSelection: function () {
            var n = this,
              t = n.selection.options,
              r = t.from,
              u = t.to,
              i = n.options.select;
            i.from = r;
            i.to = u;
          },
          filterAxes: function () {
            var u,
              r,
              e,
              o,
              n,
              t,
              s = this,
              i = s.options.select;
            for (
              void 0 === i && (i = {}),
                u = s.chart,
                r = u.options.categoryAxis,
                e = i.from,
                o = i.to,
                n = 0;
              n < r.length;
              n++
            )
              (t = r[n]), t.pane !== f && ((t.min = e), (t.max = o));
          },
          filter: function () {
            var e,
              r,
              i,
              o = this,
              f = o.chart,
              u = o.options.select;
            f.requiresHandlers(["navigatorFilter"]) &&
              ((e = this.mainAxis()),
              (r = { from: u.from, to: u.to }),
              "category" !== e.options.type &&
                ((i = new n.DateCategoryAxis(
                  t({ baseUnit: "fit" }, f.options.categoryAxis[0], {
                    categories: [u.from, u.to],
                  }),
                  f.chartService
                ).options),
                (r.from = n.addDuration(i.min, -i.baseUnitStep, i.baseUnit)),
                (r.to = n.addDuration(i.max, i.baseUnitStep, i.baseUnit))),
              this.chart.trigger("navigatorFilter", r));
          },
          _zoom: function (n) {
            var f,
              e,
              r = this,
              o = r.chart._plotArea.categoryAxis,
              t = r.selection,
              s = r.options,
              i = s.select,
              c = s.liveDrag,
              h = this.mainAxis(),
              u = n.delta;
            t &&
              ((f = h.categoryIndex(t.options.from)),
              (e = h.categoryIndex(t.options.to)),
              n.originalEvent.preventDefault(),
              Math.abs(u) > 1 && (u *= w),
              e - f > 1
                ? (t.expand(u), this.readSelection())
                : ((o.options.min = i.from),
                  (i.from = o.scaleRange(-n.delta).min)),
              c && (this.filterAxes(), this.redrawSlaves()),
              t.set(i.from, i.to),
              this.showHint(this.options.select.from, this.options.select.to));
          },
          _zoomEnd: function (n) {
            this._dragEnd(n);
          },
          showHint: function (n, t) {
            var i = this.chart._plotArea;
            this.hint && this.hint.show(n, t, i.backgroundBox());
          },
          _selectStart: function (n) {
            return this.chart._selectStart(n);
          },
          _select: function (n) {
            return this.showHint(n.from, n.to), this.chart._select(n);
          },
          _selectEnd: function (n) {
            return (
              this.hint && this.hint.hide(),
              this.readSelection(),
              this.filterAxes(),
              this.filter(),
              this.redrawSlaves(),
              this.chart._selectEnd(n)
            );
          },
          mainAxis: function () {
            var n = this.chart._plotArea;
            if (n) return n.namedCategoryAxes[u];
          },
          select: function (n, t) {
            var i = this.options.select;
            return (
              n &&
                t &&
                ((i.from = this.parseDate(n)),
                (i.to = this.parseDate(t)),
                this.filterAxes(),
                this.filter(),
                this.redrawSlaves(),
                this.selection.set(n, t)),
              { from: i.from, to: i.to }
            );
          },
        });
        o.setup = function (n, i) {
          var r, e, u;
          void 0 === n && (n = {});
          void 0 === i && (i = {});
          n.__navi ||
            ((n.__navi = !0),
            (r = t({}, i.navigator, n.navigator)),
            (e = n.panes = [].concat(n.panes)),
            (u = t({}, r.pane, { name: f })),
            r.visible || ((u.visible = !1), (u.height = 0.1)),
            e.push(u),
            o.attachAxes(n, r),
            o.attachSeries(n, r, i));
        };
        o.attachAxes = function (i, r) {
          var c = r.series || [],
            l = (i.categoryAxis = [].concat(i.categoryAxis)),
            a = (i.valueAxis = [].concat(i.valueAxis)),
            v = n.filterSeriesByType(c, s.EQUALLY_SPACED_SERIES),
            h = 0 === v.length,
            e = t({
              type: "date",
              pane: f,
              roundToBaseUnit: !h,
              justified: h,
              _collapse: !1,
              majorTicks: { visible: !0 },
              tooltip: { visible: !1 },
              labels: { step: 1 },
              autoBind: r.autoBindElements,
              autoBaseUnitSteps: {
                minutes: [1],
                hours: [1, 2],
                days: [1, 2],
                weeks: [],
                months: [1],
                years: [1],
              },
            }),
            o = r.categoryAxis;
          l.push(
            t({}, e, { maxDateGroups: 200 }, o, {
              name: u,
              title: null,
              baseUnit: "fit",
              baseUnitStep: "auto",
              labels: { visible: !1 },
              majorTicks: { visible: !1 },
            }),
            t({}, e, o, {
              name: u + "_labels",
              maxDateGroups: 20,
              baseUnitStep: "auto",
              labels: { position: "" },
              plotBands: [],
              autoBaseUnitSteps: { minutes: [] },
              _overlap: !0,
            }),
            t({}, e, o, {
              name: u + "_ticks",
              maxDateGroups: 200,
              majorTicks: { width: 0.5 },
              plotBands: [],
              title: null,
              labels: { visible: !1, mirror: !0 },
              _overlap: !0,
            })
          );
          a.push(
            t(
              {
                name: u,
                pane: f,
                majorGridLines: { visible: !1 },
                visible: !1,
              },
              r.valueAxis
            )
          );
        };
        o.attachSeries = function (n, i, r) {
          for (
            var s = (n.series = n.series || []),
              e = [].concat(i.series || []),
              o = r.seriesColors,
              h = i.seriesDefaults,
              f = 0;
            f < e.length;
            f++
          )
            s.push(
              t(
                {
                  color: o[f % o.length],
                  categoryField: i.dateField,
                  visibleInLegend: !1,
                  tooltip: { visible: !1 },
                },
                h,
                e[f],
                { axis: u, categoryAxis: u, autoBind: i.autoBindElements }
              )
            );
        };
        b = 28;
        a = e.extend({
          applyDefaults: function (i, r) {
            var f = n.elementSize(this.element).width || s.DEFAULT_WIDTH,
              u = r,
              h = {
                seriesDefaults: { categoryField: i.dateField },
                axisDefaults: {
                  categoryAxis: {
                    name: "default",
                    majorGridLines: { visible: !1 },
                    labels: { step: 2 },
                    majorTicks: { visible: !1 },
                    maxDateGroups: Math.floor(f / b),
                  },
                },
              };
            u && (u = t({}, u, h));
            o.setup(i, u);
            e.fn.applyDefaults.call(this, i, u);
          },
          _setElementClass: function (t) {
            n.addClass(t, "k-chart k-stockchart");
          },
          setOptions: function (n) {
            this.destroyNavigator();
            e.fn.setOptions.call(this, n);
          },
          noTransitionsRedraw: function () {
            var n = this.options.transitions;
            this.options.transitions = !1;
            this._fullRedraw();
            this.options.transitions = n;
          },
          _resize: function () {
            this.noTransitionsRedraw();
          },
          _redraw: function () {
            var n = this.navigator;
            !this._dirty() && n && n.options.partialRedraw
              ? n.redrawSlaves()
              : this._fullRedraw();
          },
          _dirty: function () {
            var t = this.options,
              r = [].concat(t.series, t.navigator.series),
              i = n.grep(r, function (n) {
                return n && n.visible;
              }).length,
              u = this._seriesCount !== i;
            return (this._seriesCount = i), u;
          },
          _fullRedraw: function () {
            var n = this.navigator;
            n ||
              ((n = this.navigator = new o(this)),
              this.trigger("navigatorCreated", { navigator: n }));
            n.clean();
            n.setRange();
            e.fn._redraw.call(this);
            n.initSelection();
          },
          _trackSharedTooltip: function (n) {
            var i = this._plotArea,
              t = i.paneByPoint(n);
            t && t.options.name === f
              ? this._unsetActivePoint()
              : e.fn._trackSharedTooltip.call(this, n);
          },
          bindCategories: function () {
            e.fn.bindCategories.call(this);
            this.copyNavigatorCategories();
          },
          copyNavigatorCategories: function () {
            for (
              var i, n, r = [].concat(this.options.categoryAxis), t = 0;
              t < r.length;
              t++
            )
              (n = r[t]),
                n.name === u
                  ? (i = n.categories)
                  : i && n.pane === f && (n.categories = i);
          },
          destroyNavigator: function () {
            this.navigator &&
              (this.navigator.destroy(), (this.navigator = null));
          },
          destroy: function () {
            this.destroyNavigator();
            e.fn.destroy.call(this);
          },
          _stopChartHandlers: function (n) {
            var i = this._eventCoordinates(n),
              t = this._plotArea.paneByPoint(i);
            return (
              e.fn._stopChartHandlers.call(this, n) ||
              (t && t.options.name === f)
            );
          },
        });
        n.setDefaultOptions(a, {
          dateField: "date",
          axisDefaults: {
            categoryAxis: { type: "date", baseUnit: "fit", justified: !0 },
            valueAxis: { narrowRange: !0, labels: { format: "C" } },
          },
          navigator: {
            select: {},
            seriesDefaults: {
              markers: { visible: !1 },
              tooltip: { visible: !0 },
              line: { width: 2 },
            },
            hint: {},
            visible: !0,
          },
          tooltip: { visible: !0 },
          legend: { visible: !1 },
        });
        kendo.deepExtend(kendo.dataviz, {
          constants: p,
          Navigator: o,
          NavigatorHint: c,
          StockChart: a,
        });
      })();
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/stock/stock-chart.min",
      ["dataviz/stock/kendo-stock-chart.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        function u(n, t) {
          return [
            { field: "Date", operator: "gte", value: n },
            { field: "Date", operator: "lt", value: t },
          ];
        }
        var i = window.kendo,
          t = i.dataviz,
          h = t.ChartInstanceObserver,
          r = t.ui.Chart,
          c = t.StockChart,
          f = t.constants,
          e = f.NAVIGATOR_AXIS,
          l = f.NAVIGATOR_PANE,
          o = i.deepExtend,
          a = t.defined,
          v = n.proxy,
          s = "change",
          y = h.extend({
            handlerMap: {
              navigatorFilter: "_onNavigatorFilter",
              navigatorCreated: "_onNavigatorCreated",
            },
          }),
          p = r.extend({
            options: {
              name: "StockChart",
              dateField: "date",
              axisDefaults: {
                categoryAxis: { type: "date", baseUnit: "fit", justified: !0 },
                valueAxis: { narrowRange: !0, labels: { format: "C" } },
              },
              navigator: {
                select: {},
                seriesDefaults: {
                  markers: { visible: !1 },
                  tooltip: {
                    visible: !0,
                    template: "#= kendo.toString(category, 'd') #",
                  },
                  line: { width: 2 },
                },
                hint: {},
                visible: !0,
              },
              tooltip: { visible: !0 },
              legend: { visible: !1 },
              persistSeriesVisibility: !0,
            },
            _createChart: function (n, t) {
              this._initNavigatorOptions(n);
              this._instance = new c(this.element[0], n, t, {
                observer: new y(this),
                sender: this,
                rtl: this._isRtl(),
              });
            },
            _initNavigatorOptions: function (n) {
              var t = n.navigator || {},
                r = i.support,
                u = r.touch,
                f = r.browser.mozilla;
              o(t, {
                autoBindElements: !t.dataSource,
                partialRedraw: t.dataSource,
                liveDrag: !u && !f,
              });
            },
            _initDataSource: function (n) {
              var c,
                l,
                s,
                a,
                h = n || {},
                e = h.dataSource,
                v = e && e.serverFiltering,
                y = [].concat(h.categoryAxis)[0],
                p = h.navigator || {},
                f = p.select,
                w = f && f.from && f.to;
              v &&
                w &&
                ((c = [].concat(e.filter || [])),
                (l = i.parseDate(f.from)),
                (s = i.parseDate(f.to)),
                (a = new t.DateCategoryAxis(
                  o({ baseUnit: "fit" }, y, { categories: [l, s] }),
                  i
                )),
                (e.filter = u(a.range().min, s).concat(c)));
              r.fn._initDataSource.call(this, n);
            },
            _onNavigatorCreated: function (n) {
              this._instance = n.sender;
              this.options = n.sender.options;
              this._navigator = this.navigator = n.navigator;
              this._initNavigatorDataSource();
            },
            _initNavigatorDataSource: function () {
              var t = this.options.navigator,
                n = t.autoBind,
                r = t.dataSource;
              r &&
                ((this._navigatorDataChangedHandler =
                  this._navigatorDataChangedHandler ||
                  v(this._onNavigatorDataChanged, this)),
                (this._navigatorDataSource = i.data.DataSource.create(r).bind(
                  s,
                  this._navigatorDataChangedHandler
                )),
                a(n) || (n = this.options.autoBind),
                n && this._navigatorDataSource.fetch());
            },
            _bindNavigatorSeries: function (n, t) {
              for (var r, u = n.length, i = 0; i < u; i++)
                (r = n[i]), r.axis == e && this._isBindable(r) && (r.data = t);
            },
            _onNavigatorDataChanged: function () {
              var i,
                t,
                f,
                r,
                n = this,
                s = n._instance,
                o = n.options.categoryAxis,
                h = o.length,
                u = n._navigatorDataSource.view();
              for (
                this._bindNavigatorSeries(n.options.series, u),
                  n._sourceSeries &&
                    this._bindNavigatorSeries(n._sourceSeries, u),
                  i = 0;
                i < h;
                i++
              )
                (t = o[i]),
                  t.pane == l &&
                    (t.name == e
                      ? (n._bindCategoryAxis(t, u, i), (f = t.categories))
                      : (t.categories = f));
              s._model &&
                ((r = this.navigator),
                r.redraw(),
                r.setRange(),
                (!n.options.dataSource ||
                  (n.options.dataSource && n._dataBound)) &&
                  r.redrawSlaves());
            },
            _bindCategories: function () {
              r.fn._bindCategories.call(this);
              this._instance && this._instance.copyNavigatorCategories();
            },
            _onDataChanged: function () {
              r.fn._onDataChanged.call(this);
              this._dataBound = !0;
            },
            setOptions: function (n) {
              this._removeNavigatorDataSource();
              this._initNavigatorOptions(n);
              this._instance.destroyNavigator();
              r.fn.setOptions.call(this, n);
            },
            _onNavigatorFilter: function (n) {
              this.dataSource.filter(u(n.from, n.to));
            },
            requiresHandlers: function (n) {
              var i, u;
              return t.inArray("navigatorFilter", n)
                ? ((i = this.dataSource),
                  (u = i && i.options.serverFiltering),
                  u && this.options.navigator.dataSource)
                : r.fn.requiresHandlers.call(this, n);
            },
            _removeNavigatorDataSource: function () {
              var n = this._navigatorDataSource;
              n &&
                (n.unbind(s, this._navigatorDataChangedHandler),
                delete this._navigatorDataSource);
            },
            destroy: function () {
              r.fn.destroy.call(this);
              this._removeNavigatorDataSource();
            },
          });
        t.ui.plugin(p);
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.stock.min",
      ["dataviz/stock/kendo-stock-chart.min", "dataviz/stock/stock-chart.min"],
      n
    );
  })(
    function () {},
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/sparkline/kendo-sparkline.min", ["kendo.dataviz.chart.min"], n);
  })(
    function () {
      !(function () {
        function o(n) {
          for (var i, r = [], t = 0; t < n.length; t++)
            (i = n[t]), (r[t] = i.style.display), (i.style.display = "none");
          return r;
        }
        function s(n, t) {
          for (var i = 0; i < n.length; i++) n[i].style.display = t[i];
        }
        function h(t) {
          return n.isNumber(t) ? [t] : t;
        }
        var n, t, r, i, u, c, l, a, v, e, f;
        window.kendo.dataviz = window.kendo.dataviz || {};
        n = kendo.dataviz;
        t = n.constants;
        r = n.Chart;
        i = n.elementSize;
        u = n.deepExtend;
        c = -2;
        l = n.SharedTooltip.extend({
          _slotAnchor: function (t, i) {
            var r,
              f = this.plotArea.categoryAxis,
              u = f.options.vertical,
              e = u
                ? { horizontal: "left", vertical: "center" }
                : { horizontal: "center", vertical: "bottom" };
            return (
              (r = u
                ? new n.Point(this.plotArea.box.x2, i.center().y)
                : new n.Point(i.center().x, c)),
              { point: r, align: e }
            );
          },
          _defaultAnchor: function (n, t) {
            return this._slotAnchor({}, t);
          },
        });
        a = 150;
        v = 150;
        e = [t.BAR, t.BULLET];
        f = r.extend({
          _setElementClass: function (t) {
            n.addClass(t, "k-sparkline");
          },
          _initElement: function (n) {
            r.fn._initElement.call(this, n);
            this._initialWidth = Math.floor(i(n).width);
          },
          _resize: function () {
            var n = this.element,
              t = o(n.childNodes);
            this._initialWidth = Math.floor(i(n).width);
            s(n.childNodes, t);
            r.fn._resize.call(this);
          },
          _modelOptions: function () {
            var t,
              f = this.options,
              n = this._surfaceWrap(),
              e = o(n.childNodes),
              r = document.createElement("span");
            return (
              (r.innerHTML = "&nbsp;"),
              n.appendChild(r),
              (t = u(
                {
                  width: this._autoWidth,
                  height: i(n).height,
                  transitions: f.transitions,
                },
                f.chartArea,
                { inline: !0, align: !1 }
              )),
              i(n, { width: t.width, height: t.height }),
              n.removeChild(r),
              s(n.childNodes, e),
              this.surface && this.surface.resize(),
              t
            );
          },
          _surfaceWrap: function () {
            if (!this.stage) {
              var n = (this.stage = document.createElement("span"));
              this.element.appendChild(n);
            }
            return this.stage;
          },
          _createPlotArea: function (n) {
            var t = r.fn._createPlotArea.call(this, n);
            return (
              (this._autoWidth = this._initialWidth || this._calculateWidth(t)),
              t
            );
          },
          _calculateWidth: function (r) {
            for (
              var u,
                f,
                s,
                c,
                o,
                l = this.options,
                y = n.getSpacing(l.chartArea.margin),
                p = r.charts,
                w = this._surfaceWrap(),
                h = 0,
                e = 0;
              e < p.length;
              e++
            )
              if (((u = p[e]), (f = (u.options.series || [])[0]))) {
                if (f.type === t.BAR) return a;
                if (f.type === t.BULLET) return v;
                if (f.type === t.PIE) return i(w).height;
                s = u.categoryAxis;
                s &&
                  ((c =
                    s.categoriesCount() *
                    (!u.options.isStacked &&
                    n.inArray(f.type, [t.COLUMN, t.VERTICAL_BULLET])
                      ? u.seriesOptions.length
                      : 1)),
                  (h = Math.max(h, c)));
              }
            return (o = h * l.pointWidth), o > 0 && (o += y.left + y.right), o;
          },
          _createSharedTooltip: function (n) {
            return new l(this._plotArea, n);
          },
        });
        f.normalizeOptions = function (t) {
          var i = h(t);
          return (
            (i = n.isArray(i) ? { seriesDefaults: { data: i } } : u({}, i)),
            i.series || (i.series = [{ data: h(i.data) }]),
            u(i, { seriesDefaults: { type: i.type } }),
            (n.inArray(i.series[0].type, e) ||
              n.inArray(i.seriesDefaults.type, e)) &&
              (i = u({}, { categoryAxis: { crosshair: { visible: !1 } } }, i)),
            i
          );
        };
        n.setDefaultOptions(f, {
          chartArea: { margin: 2 },
          axisDefaults: {
            visible: !1,
            majorGridLines: { visible: !1 },
            valueAxis: { narrowRange: !0 },
          },
          seriesDefaults: {
            type: "line",
            area: { line: { width: 0.5 } },
            bar: { stack: !0 },
            padding: 2,
            width: 0.5,
            overlay: { gradient: null },
            highlight: { visible: !1 },
            border: { width: 0 },
            markers: { size: 2, visible: !1 },
          },
          tooltip: { visible: !0, shared: !0 },
          categoryAxis: {
            crosshair: { visible: !0, tooltip: { visible: !1 } },
          },
          legend: { visible: !1 },
          transitions: !1,
          pointWidth: 5,
          panes: [{ clip: !1 }],
        });
        kendo.deepExtend(kendo.dataviz, { Sparkline: f });
      })();
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/sparkline/sparkline.min",
      ["dataviz/sparkline/kendo-sparkline.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var i,
          t = kendo.dataviz,
          r = t.ui.Chart,
          u = t.Sparkline,
          f = t.ChartInstanceObserver,
          e = n.extend,
          o = r.extend({
            init: function (n, t) {
              var i = t;
              i instanceof kendo.data.ObservableArray &&
                (i = { seriesDefaults: { data: i } });
              r.fn.init.call(this, n, u.normalizeOptions(i));
            },
            _createChart: function (n, t) {
              this._instance = new u(this.element[0], n, t, {
                observer: new f(this),
                sender: this,
                rtl: this._isRtl(),
              });
            },
            _createTooltip: function () {
              return new i(
                this.element,
                e({}, this.options.tooltip, { rtl: this._isRtl() })
              );
            },
            options: {
              name: "Sparkline",
              chartArea: { margin: 2 },
              axisDefaults: {
                visible: !1,
                majorGridLines: { visible: !1 },
                valueAxis: { narrowRange: !0 },
              },
              seriesDefaults: {
                type: "line",
                area: { line: { width: 0.5 } },
                bar: { stack: !0 },
                padding: 2,
                width: 0.5,
                overlay: { gradient: null },
                highlight: { visible: !1 },
                border: { width: 0 },
                markers: { size: 2, visible: !1 },
              },
              tooltip: { visible: !0, shared: !0 },
              categoryAxis: {
                crosshair: { visible: !0, tooltip: { visible: !1 } },
              },
              legend: { visible: !1 },
              transitions: !1,
              pointWidth: 5,
              panes: [{ clip: !1 }],
            },
          });
        t.ui.plugin(o);
        i = t.Tooltip.extend({
          options: { animation: { duration: 0 } },
          _hideElement: function () {
            this.element && this.element.hide().remove();
          },
        });
        t.SparklineTooltip = i;
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.sparkline.min",
      [
        "dataviz/sparkline/kendo-sparkline.min",
        "dataviz/sparkline/sparkline.min",
      ],
      n
    );
  })(
    function () {},
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/map/location.min", ["kendo.drawing.min", "util/main.min"], n);
  })(
    function () {
      !(function (n, t) {
        var e,
          r = Math,
          nt = r.abs,
          w = r.atan,
          l = r.atan2,
          o = r.cos,
          b = r.max,
          k = r.min,
          f = r.sin,
          d = r.tan,
          s = window.kendo,
          g = s.Class,
          y = s.dataviz,
          tt = s.deepExtend,
          c = s.drawing.util,
          it = c.defined,
          a = c.deg,
          h = c.rad,
          p = c.round,
          v = c.valueOrDefault,
          u = s.util.sqr,
          i = g.extend({
            init: function (n, t) {
              1 === arguments.length
                ? ((this.lat = n[0]), (this.lng = n[1]))
                : ((this.lat = n), (this.lng = t));
            },
            DISTANCE_ITERATIONS: 100,
            DISTANCE_CONVERGENCE: 1e-12,
            DISTANCE_PRECISION: 2,
            FORMAT: "{0:N6},{1:N6}",
            toArray: function () {
              return [this.lat, this.lng];
            },
            equals: function (n) {
              return n && n.lat === this.lat && n.lng === this.lng;
            },
            clone: function () {
              return new i(this.lat, this.lng);
            },
            round: function (n) {
              return (
                (this.lng = p(this.lng, n)), (this.lat = p(this.lat, n)), this
              );
            },
            wrap: function () {
              return (
                (this.lng = this.lng % 180), (this.lat = this.lat % 90), this
              );
            },
            distanceTo: function (n, t) {
              return this.greatCircleTo(n, t).distance;
            },
            destination: function (n, t, u) {
              var e, p, c, v, w;
              return (
                (t = h(t)),
                (u = u || y.map.datums.WGS84),
                (e = h(this.lat)),
                (p = h(this.lng)),
                (c = n / s.dataviz.map.datums.WGS84.a),
                (v = r.asin(f(e) * o(c) + o(e) * f(c) * o(t))),
                (w = p + l(f(t) * f(c) * o(e), o(c) - f(e) * f(v))),
                new i(a(v), a(w))
              );
            },
            greatCircleTo: function (n, t) {
              var wt,
                ot,
                b,
                ct,
                lt,
                k,
                v,
                at,
                g,
                s,
                tt,
                bt,
                kt,
                vt,
                ut,
                ft,
                it,
                rt,
                et,
                c,
                yt,
                pt,
                st,
                e,
                dt,
                ht,
                gt,
                ni,
                ti;
              if (
                ((n = i.create(n)),
                (t = t || y.map.datums.WGS84),
                !n || this.clone().round(8).equals(n.clone().round(8)))
              )
                return { distance: 0, azimuthFrom: 0, azimuthTo: 0 };
              for (
                wt = t.a,
                  ot = t.b,
                  b = t.f,
                  ct = h(n.lng - this.lng),
                  lt = w((1 - b) * d(h(this.lat))),
                  k = f(lt),
                  v = o(lt),
                  at = w((1 - b) * d(h(n.lat))),
                  g = f(at),
                  s = o(at),
                  tt = ct,
                  kt = this.DISTANCE_ITERATIONS,
                  vt = !1;
                !vt && kt-- > 0;

              )
                (ut = f(tt)),
                  (ft = o(tt)),
                  (it = r.sqrt(u(s * ut) + u(v * g - k * s * ft))),
                  (et = k * g + v * s * ft),
                  (yt = l(it, et)),
                  (pt = (v * s * ut) / it),
                  (rt = 1 - u(pt)),
                  (c = 0),
                  0 !== rt && (c = et - (2 * k * g) / rt),
                  (bt = tt),
                  (st = (b / 16) * rt * (4 + b * (4 - 3 * rt))),
                  (tt =
                    ct +
                    (1 - st) *
                      b *
                      pt *
                      (yt + st * it * (c + st * et * (-1 + 2 * u(c))))),
                  (vt = nt(tt - bt) <= this.DISTANCE_CONVERGENCE);
              return (
                (e = (rt * (u(wt) - u(ot))) / u(ot)),
                (dt =
                  1 + (e / 16384) * (4096 + e * (-768 + e * (320 - 175 * e)))),
                (ht = (e / 1024) * (256 + e * (-128 + e * (74 - 47 * e)))),
                (gt =
                  ht *
                  it *
                  (c +
                    (ht / 4) *
                      (et * (-1 + 2 * u(c)) -
                        (ht / 6) * c * (-3 + 4 * u(it)) * (-3 + 4 * u(c))))),
                (ni = l(s * ut, v * g - k * s * ft)),
                (ti = l(v * ut, -k * s + v * g * ft)),
                {
                  distance: p(ot * dt * (yt - gt), this.DISTANCE_PRECISION),
                  azimuthFrom: a(ni),
                  azimuthTo: a(ti),
                }
              );
            },
          });
        i.fn.toString = function () {
          return s.format(this.FORMAT, this.lat, this.lng);
        };
        i.fromLngLat = function (n) {
          return new i(n[1], n[0]);
        };
        i.fromLatLng = function (n) {
          return new i(n[0], n[1]);
        };
        i.create = function (n, t) {
          if (it(n))
            return n instanceof i
              ? n.clone()
              : 1 === arguments.length && 2 === n.length
              ? i.fromLatLng(n)
              : new i(n, t);
        };
        e = g.extend({
          init: function (n, t) {
            n = i.create(n);
            t = i.create(t);
            n.lng + 180 > t.lng + 180 && n.lat + 90 < t.lat + 90
              ? ((this.se = n), (this.nw = t))
              : ((this.se = t), (this.nw = n));
          },
          contains: function (n) {
            var t = this.nw,
              i = this.se,
              r = v(n.lng, n[1]),
              u = v(n.lat, n[0]);
            return (
              n &&
              r + 180 >= t.lng + 180 &&
              r + 180 <= i.lng + 180 &&
              u + 90 >= i.lat + 90 &&
              u + 90 <= t.lat + 90
            );
          },
          center: function () {
            var n = this.nw,
              t = this.se,
              r = n.lng + (t.lng - n.lng) / 2,
              u = n.lat + (t.lat - n.lat) / 2;
            return new i(u, r);
          },
          containsAny: function (n) {
            for (var i = !1, t = 0; t < n.length; t++)
              i = i || this.contains(n[t]);
            return i;
          },
          include: function (n) {
            var t = this.nw,
              i = this.se,
              r = v(n.lng, n[1]),
              u = v(n.lat, n[0]);
            t.lng = k(t.lng, r);
            t.lat = b(t.lat, u);
            i.lng = b(i.lng, r);
            i.lat = k(i.lat, u);
          },
          includeAll: function (n) {
            for (var t = 0; t < n.length; t++) this.include(n[t]);
          },
          edges: function () {
            var n = this.nw,
              t = this.se;
            return {
              nw: this.nw,
              ne: new i(n.lat, t.lng),
              se: this.se,
              sw: new i(t.lat, n.lng),
            };
          },
          toArray: function () {
            var n = this.nw,
              t = this.se;
            return [n, new i(n.lat, t.lng), t, new i(t.lat, n.lng)];
          },
          overlaps: function (n) {
            return (
              this.containsAny(n.toArray()) || n.containsAny(this.toArray())
            );
          },
        });
        e.World = new e([90, -180], [-90, 180]);
        e.create = function (n, i) {
          return n instanceof e
            ? n
            : n && i
            ? new e(n, i)
            : n && 4 === n.length && !i
            ? new e([n[0], n[1]], [n[2], n[3]])
            : t;
        };
        tt(y, { map: { Extent: e, Location: i } });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/map/attribution.min", ["kendo.drawing.min"], n);
  })(
    function () {
      !(function () {
        var n = window.kendo,
          t = n.ui.Widget,
          u = n.template,
          i = n.drawing.util,
          r = i.valueOrDefault,
          f = i.defined,
          e = t.extend({
            init: function (n, i) {
              t.fn.init.call(this, n, i);
              this._initOptions(i);
              this.items = [];
              this.element.addClass("k-widget k-attribution");
            },
            options: {
              name: "Attribution",
              separator: "&nbsp;|&nbsp;",
              itemTemplate: "#= text #",
            },
            filter: function (n, t) {
              this._extent = n;
              this._zoom = t;
              this._render();
            },
            add: function (n) {
              f(n) &&
                ("string" == typeof n && (n = { text: n }),
                this.items.push(n),
                this._render());
            },
            remove: function (n) {
              for (var i, r = [], t = 0; t < this.items.length; t++)
                (i = this.items[t]), i.text !== n && r.push(i);
              this.items = r;
              this._render();
            },
            clear: function () {
              this.items = [];
              this.element.empty();
            },
            _render: function () {
              for (
                var r, t, i = [], f = u(this.options.itemTemplate), n = 0;
                n < this.items.length;
                n++
              )
                (r = this.items[n]),
                  (t = this._itemText(r)),
                  "" !== t && i.push(f({ text: t }));
              i.length > 0
                ? this.element
                    .empty()
                    .append(i.join(this.options.separator))
                    .show()
                : this.element.hide();
            },
            _itemText: function (n) {
              var t = "",
                i = this._inZoomLevel(n.minZoom, n.maxZoom),
                r = this._inArea(n.extent);
              return i && r && (t += n.text), t;
            },
            _inZoomLevel: function (n, t) {
              var i = !0;
              return (
                (n = r(n, -Number.MAX_VALUE)),
                (t = r(t, Number.MAX_VALUE)),
                (i = this._zoom > n && this._zoom < t)
              );
            },
            _inArea: function (n) {
              var t = !0;
              return n && (t = n.contains(this._extent)), t;
            },
          });
        n.dataviz.ui.plugin(e);
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/map/navigator.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        function i(n) {
          return t.format(
            '<button class="k-button k-navigator-{0}" aria-label="move {0}"><span class="k-icon k-i-arrow-60-{0}"/></button>',
            n
          );
        }
        var t = window.kendo,
          u = t.ui.Widget,
          r = t.keys,
          f = n.proxy,
          e = ".kendoNavigator",
          o = i("up") + i("right") + i("down") + i("left"),
          s = u.extend({
            init: function (n, i) {
              u.fn.init.call(this, n, i);
              this._initOptions(i);
              this.element
                .addClass("k-widget k-header k-shadow k-navigator")
                .append(o)
                .on("click" + e, ".k-button", f(this, "_click"));
              var r = this.element.parent().closest("[" + t.attr("role") + "]");
              this._keyroot = r.length > 0 ? r : this.element;
              this._tabindex(this._keyroot);
              this._keydown = f(this._keydown, this);
              this._keyroot.on("keydown", this._keydown);
            },
            options: { name: "Navigator", panStep: 1 },
            events: ["pan"],
            dispose: function () {
              this._keyroot.off("keydown", this._keydown);
            },
            _pan: function (n, t) {
              var i = this.options.panStep;
              this.trigger("pan", { x: n * i, y: t * i });
            },
            _click: function (t) {
              var r = 0,
                u = 0,
                i = n(t.currentTarget);
              i.is(".k-navigator-up")
                ? (u = 1)
                : i.is(".k-navigator-down")
                ? (u = -1)
                : i.is(".k-navigator-right")
                ? (r = 1)
                : i.is(".k-navigator-left") && (r = -1);
              this._pan(r, u);
              t.preventDefault();
            },
            _keydown: function (n) {
              switch (n.which) {
                case r.UP:
                  this._pan(0, 1);
                  n.preventDefault();
                  break;
                case r.DOWN:
                  this._pan(0, -1);
                  n.preventDefault();
                  break;
                case r.RIGHT:
                  this._pan(1, 0);
                  n.preventDefault();
                  break;
                case r.LEFT:
                  this._pan(-1, 0);
                  n.preventDefault();
              }
            },
          });
        t.dataviz.ui.plugin(s);
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/map/zoom.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n) {
        function i(n, i) {
          return t.format(
            '<button class="k-button k-zoom-{0}" title="zoom-{0}" aria-label="zoom-{0}"><span class="k-icon {1}"></span></button>',
            n,
            i
          );
        }
        var t = window.kendo,
          r = t.ui.Widget,
          u = t.keys,
          f = n.proxy,
          e = ".kendoZoomControl",
          o = i("in", "k-i-plus") + i("out", "k-i-minus"),
          s = 187,
          h = 189,
          c = 61,
          l = 173,
          a = r.extend({
            init: function (n, i) {
              r.fn.init.call(this, n, i);
              this._initOptions(i);
              this.element
                .addClass(
                  "k-widget k-zoom-control k-button-wrap k-buttons-horizontal k-button-group k-group-horizontal"
                )
                .append(o)
                .on("click" + e, ".k-button", f(this, "_click"));
              var u = this.element.parent().closest("[" + t.attr("role") + "]");
              this._keyroot = u.length > 0 ? u : this.element;
              this._tabindex(this._keyroot);
              this._keydown = f(this._keydown, this);
              this._keyroot.on("keydown", this._keydown);
            },
            options: { name: "ZoomControl", zoomStep: 1 },
            events: ["change"],
            _change: function (n) {
              var t = this.options.zoomStep;
              this.trigger("change", { delta: n * t });
            },
            _click: function (t) {
              var r = n(t.currentTarget),
                i = 1;
              r.is(".k-zoom-out") && (i = -1);
              this._change(i);
              t.preventDefault();
            },
            _keydown: function (n) {
              switch (n.which) {
                case u.NUMPAD_PLUS:
                case s:
                case c:
                  this._change(1);
                  break;
                case u.NUMPAD_MINUS:
                case h:
                case l:
                  this._change(-1);
              }
            },
          });
        t.dataviz.ui.plugin(a);
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/map/crs.min",
      ["dataviz/map/location.min", "kendo.drawing.min"],
      n
    );
  })(
    function () {
      !(function () {
        var n = Math,
          f = n.atan,
          l = n.exp,
          a = n.pow,
          v = n.sin,
          y = n.log,
          p = n.tan,
          t = window.kendo,
          i = t.Class,
          w = t.dataviz,
          rt = t.deepExtend,
          e = t.geometry,
          b = e.Point,
          ut = w.map,
          k = ut.Location,
          o = t.drawing.util,
          s = o.rad,
          d = o.deg,
          r = o.limitValue,
          u = n.PI,
          h = u / 2,
          g = u / 4,
          ft = u / 180,
          nt = {
            a: 6378137,
            b: 6356752.3142451793,
            f: 0.0033528106647474805,
            e: 0.081819190842621486,
          },
          c = i.extend({
            init: function (n) {
              this._initOptions(n);
            },
            MAX_LNG: 180,
            MAX_LAT: 85.0840590501,
            INVERSE_ITERATIONS: 15,
            INVERSE_CONVERGENCE: 1e-12,
            options: { centralMeridian: 0, datum: nt },
            forward: function (n, t) {
              var i = this,
                u = i.options,
                f = u.datum,
                e = f.a,
                o = u.centralMeridian,
                h = r(n.lat, -i.MAX_LAT, i.MAX_LAT),
                c = t ? r(n.lng, -i.MAX_LNG, i.MAX_LNG) : n.lng,
                l = s(c - o) * e,
                a = i._projectLat(h);
              return new b(l, a);
            },
            _projectLat: function (n) {
              var t = this.options.datum,
                i = t.e,
                f = t.a,
                r = s(n),
                e = p(g + r / 2),
                u = i * v(r),
                o = a((1 - u) / (1 + u), i / 2);
              return f * y(e * o);
            },
            inverse: function (n, t) {
              var i = this,
                f = i.options,
                e = f.datum,
                o = e.a,
                s = f.centralMeridian,
                u = n.x / (ft * o) + s,
                h = r(i._inverseY(n.y), -i.MAX_LAT, i.MAX_LAT);
              return t && (u = r(u, -i.MAX_LNG, i.MAX_LNG)), new k(h, u);
            },
            _inverseY: function (t) {
              for (
                var u,
                  s,
                  e,
                  o = this,
                  c = o.options.datum,
                  w = c.a,
                  y = c.e,
                  b = y / 2,
                  p = l(-t / w),
                  i = h - 2 * f(p),
                  r = 0;
                r <= o.INVERSE_ITERATIONS &&
                ((u = y * v(i)),
                (s = a((1 - u) / (1 + u), b)),
                (e = h - 2 * f(p * s) - i),
                (i += e),
                !(n.abs(e) <= o.INVERSE_CONVERGENCE));
                r++
              );
              return d(i);
            },
          }),
          tt = c.extend({
            MAX_LAT: 85.0511287798,
            _projectLat: function (n) {
              var t = this.options.datum.a,
                i = s(n),
                r = p(g + i / 2);
              return t * y(r);
            },
            _inverseY: function (n) {
              var t = this.options.datum.a,
                i = l(-n / t);
              return d(h - 2 * f(i));
            },
          }),
          it = i.extend({
            forward: function (n) {
              return new b(n.lng, n.lat);
            },
            inverse: function (n) {
              return new k(n.y, n.x);
            },
          }),
          et = i.extend({
            init: function () {
              var t = this,
                i = (t._proj = new tt()),
                n = (this.c = 2 * u * i.options.datum.a);
              this._tm = e
                .transform()
                .translate(0.5, 0.5)
                .scale(1 / n, -1 / n);
              this._itm = e.transform().scale(n, -n).translate(-0.5, -0.5);
            },
            toPoint: function (n, t, i) {
              var r = this._proj.forward(n, i);
              return r.transform(this._tm).scale(t || 1);
            },
            toLocation: function (n, t, i) {
              return (
                (n = n
                  .clone()
                  .scale(1 / (t || 1))
                  .transform(this._itm)),
                this._proj.inverse(n, i)
              );
            },
          }),
          ot = i.extend({
            init: function () {
              this._proj = new c();
            },
            toPoint: function (n) {
              return this._proj.forward(n);
            },
            toLocation: function (n) {
              return this._proj.inverse(n);
            },
          }),
          st = i.extend({
            init: function () {
              this._proj = new it();
            },
            toPoint: function (n) {
              return this._proj.forward(n);
            },
            toLocation: function (n) {
              return this._proj.inverse(n);
            },
          });
        rt(w, {
          map: {
            crs: { EPSG3395: ot, EPSG3857: et, EPSG4326: st },
            datums: { WGS84: nt },
            projections: {
              Equirectangular: it,
              Mercator: c,
              SphericalMercator: tt,
            },
          },
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/map/layers/base.min",
      ["kendo.core.min", "dataviz/map/location.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var t = n.proxy,
          i = window.kendo,
          f = i.Class,
          r = i.dataviz,
          e = i.deepExtend,
          o = r.map.Extent,
          s = i.drawing.util,
          u = s.defined,
          h = f.extend({
            init: function (i, r) {
              this._initOptions(r);
              this.map = i;
              this.element = n("<div class='k-layer'></div>")
                .css({
                  zIndex: this.options.zIndex,
                  opacity: this.options.opacity,
                })
                .appendTo(i.scrollElement);
              this._beforeReset = t(this._beforeReset, this);
              this._reset = t(this._reset, this);
              this._resize = t(this._resize, this);
              this._panEnd = t(this._panEnd, this);
              this._activate();
              this._updateAttribution();
            },
            destroy: function () {
              this._deactivate();
            },
            show: function () {
              this.reset();
              this._activate();
              this._applyExtent(!0);
            },
            hide: function () {
              this._deactivate();
              this._setVisibility(!1);
            },
            reset: function () {
              this._beforeReset();
              this._reset();
            },
            _reset: function () {
              this._applyExtent();
            },
            _beforeReset: n.noop,
            _resize: n.noop,
            _panEnd: function () {
              this._applyExtent();
            },
            _applyExtent: function () {
              var n = this.options,
                t = this.map.zoom(),
                r = !u(n.minZoom) || t >= n.minZoom,
                f = !u(n.maxZoom) || t <= n.maxZoom,
                i = o.create(n.extent),
                e = !i || i.overlaps(this.map.extent());
              this._setVisibility(r && f && e);
            },
            _setVisibility: function (n) {
              this.element.css("display", n ? "" : "none");
            },
            _activate: function () {
              var n = this.map;
              this._deactivate();
              n.bind("beforeReset", this._beforeReset);
              n.bind("reset", this._reset);
              n.bind("resize", this._resize);
              n.bind("panEnd", this._panEnd);
            },
            _deactivate: function () {
              var n = this.map;
              n.unbind("beforeReset", this._beforeReset);
              n.unbind("reset", this._reset);
              n.unbind("resize", this._resize);
              n.unbind("panEnd", this._panEnd);
            },
            _updateAttribution: function () {
              var n = this.map.attribution;
              n && n.add(this.options.attribution);
            },
          });
        e(r, { map: { layers: { Layer: h } } });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/map/layers/shape.min",
      ["dataviz/map/layers/base.min", "dataviz/map/location.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var f = n.proxy,
          t = window.kendo,
          a = t.Class,
          v = t.data.DataSource,
          e = t.dataviz,
          o = t.deepExtend,
          y = t.geometry,
          i = t.drawing,
          u = i.Group,
          p = i.util.last,
          w = i.util.defined,
          s = e.map,
          h = s.Location,
          r = s.layers.Layer,
          c = r.extend({
            init: function (n, u) {
              this._pan = f(this._pan, this);
              r.fn.init.call(this, n, u);
              this.surface = i.Surface.create(this.element, {
                width: n.scrollElement.width(),
                height: n.scrollElement.height(),
              });
              this._initRoot();
              this.movable = new t.ui.Movable(this.surface.element);
              this._markers = [];
              this._click = this._handler("shapeClick");
              this.surface.bind("click", this._click);
              this._mouseenter = this._handler("shapeMouseEnter");
              this.surface.bind("mouseenter", this._mouseenter);
              this._mouseleave = this._handler("shapeMouseLeave");
              this.surface.bind("mouseleave", this._mouseleave);
              this._initDataSource();
            },
            options: { autoBind: !0 },
            destroy: function () {
              r.fn.destroy.call(this);
              this.surface.destroy();
              this.dataSource.unbind("change", this._dataChange);
            },
            setDataSource: function (n) {
              this.dataSource &&
                this.dataSource.unbind("change", this._dataChange);
              this.dataSource = t.data.DataSource.create(n);
              this.dataSource.bind("change", this._dataChange);
              this.options.autoBind && this.dataSource.fetch();
            },
            _reset: function () {
              r.fn._reset.call(this);
              this._translateSurface();
              this._data && this._load(this._data);
            },
            _initRoot: function () {
              this._root = new u();
              this.surface.draw(this._root);
            },
            _beforeReset: function () {
              this.surface.clear();
              this._initRoot();
            },
            _resize: function () {
              this.surface.size(this.map.size());
            },
            _initDataSource: function () {
              var n = this.options.dataSource;
              this._dataChange = f(this._dataChange, this);
              this.dataSource = v.create(n).bind("change", this._dataChange);
              n && this.options.autoBind && this.dataSource.fetch();
            },
            _dataChange: function (n) {
              this._data = n.sender.view();
              this._load(this._data);
            },
            _load: function (n) {
              var i, t, r;
              for (
                this._clearMarkers(),
                  this._loader ||
                    (this._loader = new l(this.map, this.options.style, this)),
                  i = new u(),
                  t = 0;
                t < n.length;
                t++
              )
                (r = this._loader.parse(n[t])), r && i.append(r);
              this._root.clear();
              this._root.append(i);
            },
            shapeCreated: function (n) {
              var r,
                t = !1;
              return (
                n instanceof i.Circle && (t = w(this._createMarker(n))),
                t ||
                  ((r = { layer: this, shape: n }),
                  (t = this.map.trigger("shapeCreated", r))),
                t
              );
            },
            featureCreated: function (n) {
              n.layer = this;
              this.map.trigger("shapeFeatureCreated", n);
            },
            _createMarker: function (n) {
              var t = this.map.markers.bind(
                { location: n.location },
                n.dataItem
              );
              return t && this._markers.push(t), t;
            },
            _clearMarkers: function () {
              for (var n = 0; n < this._markers.length; n++)
                this.map.markers.remove(this._markers[n]);
              this._markers = [];
            },
            _pan: function () {
              this._panning ||
                ((this._panning = !0), this.surface.suspendTracking());
            },
            _panEnd: function (n) {
              r.fn._panEnd.call(this, n);
              this._translateSurface();
              this.surface.resumeTracking();
              this._panning = !1;
            },
            _translateSurface: function () {
              var t = this.map,
                n = t.locationToView(t.extent().nw);
              this.surface.translate &&
                (this.surface.translate(n),
                this.movable.moveTo({ x: n.x, y: n.y }));
            },
            _handler: function (n) {
              var t = this;
              return function (i) {
                if (i.element) {
                  var r = {
                    layer: t,
                    shape: i.element,
                    originalEvent: i.originalEvent,
                  };
                  t.map.trigger(n, r);
                }
              };
            },
            _activate: function () {
              r.fn._activate.call(this);
              this.map.bind("pan", this._pan);
            },
            _deactivate: function () {
              r.fn._deactivate.call(this);
              this.map.unbind("pan", this._pan);
            },
          }),
          l = a.extend({
            init: function (n, t, i) {
              this.observer = i;
              this.locator = n;
              this.style = t;
            },
            parse: function (n) {
              var t = new u(),
                i = !0;
              return (
                "Feature" === n.type
                  ? ((i = !1),
                    this._loadGeometryTo(t, n.geometry, n),
                    this._featureCreated(t, n))
                  : this._loadGeometryTo(t, n, n),
                i && t.children.length < 2 && (t = t.children[0]),
                t
              );
            },
            _shapeCreated: function (n) {
              var t = !1;
              return (
                this.observer &&
                  this.observer.shapeCreated &&
                  (t = this.observer.shapeCreated(n)),
                t
              );
            },
            _featureCreated: function (n, t) {
              this.observer &&
                this.observer.featureCreated &&
                this.observer.featureCreated({
                  group: n,
                  dataItem: t,
                  properties: t.properties,
                });
            },
            _loadGeometryTo: function (n, t, i) {
              var r,
                f,
                u = t.coordinates;
              switch (t.type) {
                case "LineString":
                  f = this._loadPolygon(n, [u], i);
                  this._setLineFill(f);
                  break;
                case "MultiLineString":
                  for (r = 0; r < u.length; r++)
                    (f = this._loadPolygon(n, [u[r]], i)), this._setLineFill(f);
                  break;
                case "Polygon":
                  this._loadPolygon(n, u, i);
                  break;
                case "MultiPolygon":
                  for (r = 0; r < u.length; r++) this._loadPolygon(n, u[r], i);
                  break;
                case "Point":
                  this._loadPoint(n, u, i);
                  break;
                case "MultiPoint":
                  for (r = 0; r < u.length; r++) this._loadPoint(n, u[r], i);
              }
            },
            _setLineFill: function (n) {
              var t = n.segments;
              (t.length < 4 || !t[0].anchor().equals(p(t).anchor())) &&
                (n.options.fill = null);
            },
            _loadShape: function (n, t) {
              return this._shapeCreated(t) || n.append(t), t;
            },
            _loadPolygon: function (n, t, i) {
              var r = this._buildPolygon(t);
              return (r.dataItem = i), this._loadShape(n, r);
            },
            _buildPolygon: function (n) {
              for (
                var r,
                  u,
                  e = n.length > 1 ? i.MultiPath : i.Path,
                  f = new e(this.style),
                  t = 0;
                t < n.length;
                t++
              )
                for (r = 0; r < n[t].length; r++)
                  (u = this.locator.locationToView(h.fromLngLat(n[t][r]))),
                    0 === r ? f.moveTo(u.x, u.y) : f.lineTo(u.x, u.y);
              return f;
            },
            _loadPoint: function (n, t, r) {
              var f = h.fromLngLat(t),
                e = this.locator.locationToView(f),
                o = new y.Circle(e, 10),
                u = new i.Circle(o, this.style);
              return (u.dataItem = r), (u.location = f), this._loadShape(n, u);
            },
          });
        o(t.data, {
          schemas: {
            geojson: {
              type: "json",
              data: function (n) {
                return "FeatureCollection" === n.type
                  ? n.features
                  : "GeometryCollection" === n.type
                  ? n.geometries
                  : n;
              },
            },
          },
          transports: { geojson: { read: { dataType: "json" } } },
        });
        o(e, {
          map: { layers: { shape: c, ShapeLayer: c }, GeoJSONLoader: l },
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/map/layers/bubble.min", ["dataviz/map/layers/shape.min"], n);
  })(
    function () {
      !(function () {
        var n = window.kendo,
          i = n.getter,
          t = n.dataviz,
          o = n.deepExtend,
          s = n.geometry,
          r = n.drawing,
          h = r.util,
          u = h.defined,
          f = t.map,
          c = f.Location,
          l = f.layers.ShapeLayer,
          e = l.extend({
            options: {
              autoBind: !0,
              locationField: "location",
              valueField: "value",
              minSize: 0,
              maxSize: 100,
              scale: "sqrt",
              symbol: "circle",
            },
            _load: function (n) {
              var t, h, a, l, s, f, r, e, v, y, o;
              if ((this.surface.clear(), 0 !== n.length))
                for (
                  t = this.options,
                    h = i(t.valueField),
                    n = n.slice(0),
                    n.sort(function (n, t) {
                      return h(t) - h(n);
                    }),
                    a = this._scaleType(),
                    s = 0;
                  s < n.length;
                  s++
                )
                  (f = n[s]),
                    (r = i(t.locationField)(f)),
                    (e = i(t.valueField)(f)),
                    u(r) &&
                      u(e) &&
                      (l || (l = new a([0, e], [t.minSize, t.maxSize])),
                      (r = c.create(r)),
                      (v = this.map.locationToView(r)),
                      (y = l.map(e)),
                      (o = this._createSymbol({
                        center: v,
                        size: y,
                        style: t.style,
                        dataItem: f,
                        location: r,
                      })),
                      (o.dataItem = f),
                      (o.location = r),
                      (o.value = e),
                      this._drawSymbol(o));
            },
            _scaleType: function () {
              var i = this.options.scale;
              return n.isFunction(i) ? i : t.map.scales[i];
            },
            _createSymbol: function (i) {
              var r = this.options.symbol;
              return n.isFunction(r) || (r = t.map.symbols[r]), r(i);
            },
            _drawSymbol: function (n) {
              var t = { layer: this, shape: n },
                i = this.map.trigger("shapeCreated", t);
              i || this.surface.draw(n);
            },
          }),
          a = n.Class.extend({
            init: function (n, t) {
              var i, r;
              this._domain = n;
              this._range = t;
              i = Math.sqrt(n[1]) - Math.sqrt(n[0]);
              r = t[1] - t[0];
              this._ratio = r / i;
            },
            map: function (n) {
              var t = (Math.sqrt(n) - Math.sqrt(this._domain[0])) * this._ratio;
              return this._range[0] + t;
            },
          }),
          v = {
            circle: function (n) {
              var t = new s.Circle(n.center, n.size / 2);
              return new r.Circle(t, n.style);
            },
            square: function (n) {
              var u = new r.Path(n.style),
                t = n.size / 2,
                i = n.center;
              return (
                u
                  .moveTo(i.x - t, i.y - t)
                  .lineTo(i.x + t, i.y - t)
                  .lineTo(i.x + t, i.y + t)
                  .lineTo(i.x - t, i.y + t)
                  .close(),
                u
              );
            },
          };
        o(t, {
          map: {
            layers: { bubble: e, BubbleLayer: e },
            scales: { sqrt: a },
            symbols: v,
          },
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/map/layers/tile.min",
      ["dataviz/map/layers/base.min", "dataviz/map/location.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        function b(n) {
          return new f(a(n.x), a(n.y));
        }
        var i = Math,
          e = n.proxy,
          t = window.kendo,
          u = t.Class,
          o = t.template,
          s = t.dataviz,
          k = t.deepExtend,
          d = t.geometry,
          f = d.Point,
          r = s.map.layers.Layer,
          h = t.util,
          c = h.renderSize,
          l = t.drawing.util,
          a = l.round,
          g = l.limitValue,
          v = r.extend({
            init: function (n, t) {
              r.fn.init.call(this, n, t);
              "string" == typeof this.options.subdomains &&
                (this.options.subdomains = this.options.subdomains.split(""));
              var i = this._viewType();
              this._view = new i(this.element, this.options);
            },
            destroy: function () {
              r.fn.destroy.call(this);
              this._view.destroy();
              this._view = null;
            },
            _beforeReset: function () {
              var n = this.map,
                t = n.locationToLayer(n.extent().nw).round();
              this._view.viewOrigin(t);
            },
            _reset: function () {
              r.fn._reset.call(this);
              this._updateView();
              this._view.reset();
            },
            _viewType: function () {
              return y;
            },
            _activate: function () {
              r.fn._activate.call(this);
              t.support.mobileOS ||
                (this._pan ||
                  (this._pan = t.throttle(e(this._render, this), 100)),
                this.map.bind("pan", this._pan));
            },
            _deactivate: function () {
              r.fn._deactivate.call(this);
              this._pan && this.map.unbind("pan", this._pan);
            },
            _updateView: function () {
              var t = this._view,
                n = this.map,
                i = n.extent(),
                r = {
                  nw: n.locationToLayer(i.nw).round(),
                  se: n.locationToLayer(i.se).round(),
                };
              t.center(n.locationToLayer(n.center()));
              t.extent(r);
              t.zoom(n.zoom());
            },
            _resize: function () {
              this._render();
            },
            _panEnd: function (n) {
              r.fn._panEnd.call(this, n);
              this._render();
            },
            _render: function () {
              this._updateView();
              this._view.render();
            },
          }),
          y = u.extend({
            init: function (n, t) {
              this.element = n;
              this._initOptions(t);
              this.pool = new w();
            },
            options: {
              tileSize: 256,
              subdomains: ["a", "b", "c"],
              urlTemplate: "",
            },
            center: function (n) {
              this._center = n;
            },
            extent: function (n) {
              this._extent = n;
            },
            viewOrigin: function (n) {
              this._viewOrigin = n;
            },
            zoom: function (n) {
              this._zoom = n;
            },
            pointToTileIndex: function (n) {
              return new f(
                i.floor(n.x / this.options.tileSize),
                i.floor(n.y / this.options.tileSize)
              );
            },
            tileCount: function () {
              var n = this.size(),
                u = this.pointToTileIndex(this._extent.nw),
                t = this._extent.nw,
                r = this.indexToPoint(u).translate(-t.x, -t.y);
              return {
                x: i.ceil((i.abs(r.x) + n.width) / this.options.tileSize),
                y: i.ceil((i.abs(r.y) + n.height) / this.options.tileSize),
              };
            },
            size: function () {
              var n = this._extent.nw,
                i = this._extent.se,
                t = i.clone().translate(-n.x, -n.y);
              return { width: t.x, height: t.y };
            },
            indexToPoint: function (n) {
              var t = n.x,
                i = n.y;
              return new f(
                t * this.options.tileSize,
                i * this.options.tileSize
              );
            },
            subdomainText: function () {
              var n = this.options.subdomains;
              return n[this.subdomainIndex++ % n.length];
            },
            destroy: function () {
              this.element.empty();
              this.pool.empty();
            },
            reset: function () {
              this.pool.reset();
              this.subdomainIndex = 0;
              this.render();
            },
            render: function () {
              for (
                var i,
                  t,
                  r = this.tileCount(),
                  u = this.pointToTileIndex(this._extent.nw),
                  n = 0;
                n < r.x;
                n++
              )
                for (t = 0; t < r.y; t++)
                  (i = this.createTile({ x: u.x + n, y: u.y + t })),
                    i.visible || i.show();
            },
            createTile: function (n) {
              var i = this.tileOptions(n),
                t = this.pool.get(this._center, i);
              return (
                0 === t.element.parent().length &&
                  this.element.append(t.element),
                t
              );
            },
            tileOptions: function (n) {
              var r = this.wrapIndex(n),
                t = this.indexToPoint(n),
                i = this._viewOrigin,
                u = t.clone().translate(-i.x, -i.y);
              return {
                index: r,
                currentIndex: n,
                point: t,
                offset: b(u),
                zoom: this._zoom,
                size: this.options.tileSize,
                subdomain: this.subdomainText(),
                urlTemplate: this.options.urlTemplate,
                errorUrlTemplate: this.options.errorUrlTemplate,
              };
            },
            wrapIndex: function (n) {
              var t = i.pow(2, this._zoom);
              return { x: this.wrapValue(n.x, t), y: g(n.y, 0, t - 1) };
            },
            wrapValue: function (n, t) {
              var r = i.abs(n) % t;
              return n >= 0 ? r : t - (0 === r ? t : r);
            },
          }),
          p = u.extend({
            init: function (n, t) {
              this.id = n;
              this.visible = !0;
              this._initOptions(t);
              this.createElement();
              this.show();
            },
            options: { urlTemplate: "", errorUrlTemplate: "" },
            createElement: function () {
              this.element = n(
                "<img style='position: absolute; display: block;' alt='' />"
              )
                .css({ width: this.options.size, height: this.options.size })
                .on(
                  "error",
                  e(function (n) {
                    this.errorUrl()
                      ? n.target.setAttribute("src", this.errorUrl())
                      : n.target.removeAttribute("src");
                  }, this)
                );
            },
            show: function () {
              var t,
                n = this.element[0];
              n.style.top = c(this.options.offset.y);
              n.style.left = c(this.options.offset.x);
              t = this.url();
              t && n.setAttribute("src", t);
              n.style.visibility = "visible";
              this.visible = !0;
            },
            hide: function () {
              this.element[0].style.visibility = "hidden";
              this.visible = !1;
            },
            url: function () {
              var n = o(this.options.urlTemplate);
              return n(this.urlOptions());
            },
            errorUrl: function () {
              var n = o(this.options.errorUrlTemplate);
              return n(this.urlOptions());
            },
            urlOptions: function () {
              var n = this.options;
              return {
                zoom: n.zoom,
                subdomain: n.subdomain,
                z: n.zoom,
                x: n.index.x,
                y: n.index.y,
                s: n.subdomain,
                quadkey: n.quadkey,
                q: n.quadkey,
                culture: n.culture,
                c: n.culture,
              };
            },
            destroy: function () {
              this.element && (this.element.remove(), (this.element = null));
            },
          }),
          w = u.extend({
            init: function () {
              this._items = [];
            },
            options: { maxSize: 100 },
            get: function (n, t) {
              return (
                this._items.length >= this.options.maxSize && this._remove(n),
                this._create(t)
              );
            },
            empty: function () {
              for (var t = this._items, n = 0; n < t.length; n++)
                t[n].destroy();
              this._items = [];
            },
            reset: function () {
              for (var t = this._items, n = 0; n < t.length; n++) t[n].hide();
            },
            _create: function (n) {
              for (
                var t,
                  r = this._items,
                  u = h.hashKey(
                    "" + n.point + ("" + n.offset) + n.zoom + n.urlTemplate
                  ),
                  i = 0;
                i < r.length;
                i++
              )
                if (r[i].id === u) {
                  t = r[i];
                  break;
                }
              return t ? t.show() : ((t = new p(u, n)), this._items.push(t)), t;
            },
            _remove: function (n) {
              for (
                var u, i = this._items, f = -1, r = -1, t = 0;
                t < i.length;
                t++
              )
                (u = i[t].options.point.distanceTo(n)),
                  u > f && !i[t].visible && ((r = t), (f = u));
              r !== -1 && (i[r].destroy(), i.splice(r, 1));
            },
          });
        k(s, {
          map: {
            layers: {
              tile: v,
              TileLayer: v,
              ImageTile: p,
              TilePool: w,
              TileView: y,
            },
          },
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/map/layers/bing.min", ["dataviz/map/layers/tile.min"], n);
  })(
    function () {
      !(function (n, t) {
        var r = window.kendo,
          i = r.dataviz,
          u = r.deepExtend,
          f = r.drawing.util.defined,
          l = i.map.Extent,
          e = i.map.Location,
          o = i.map.layers.TileLayer,
          s = i.map.layers.TileView,
          h = o.extend({
            init: function (t, i) {
              this.options.baseUrl =
                this._scheme() +
                "://dev.virtualearth.net/REST/v1/Imagery/Metadata/";
              o.fn.init.call(this, t, i);
              this._onMetadata = n.proxy(this._onMetadata, this);
              this._fetchMetadata();
            },
            options: { imagerySet: "road" },
            _fetchMetadata: function () {
              var t = this.options;
              if (!t.key) throw Error("Bing tile layer: API key is required");
              n.ajax({
                url: t.baseUrl + t.imagerySet,
                data: {
                  output: "json",
                  include: "ImageryProviders",
                  key: t.key,
                  uriScheme: this._scheme(),
                },
                type: "get",
                dataType: "jsonp",
                jsonp: "jsonp",
                success: this._onMetadata,
              });
            },
            _scheme: function (n) {
              return (
                (n = n || window.location.protocol),
                "https" === n.replace(":", "") ? "https" : "http"
              );
            },
            _onMetadata: function (n) {
              var t, i;
              n &&
                n.resourceSets.length &&
                ((t = this.resource = n.resourceSets[0].resources[0]),
                u(this._view.options, {
                  urlTemplate: t.imageUrl
                    .replace("{subdomain}", "#= subdomain #")
                    .replace("{quadkey}", "#= quadkey #")
                    .replace("{culture}", "#= culture #"),
                  subdomains: t.imageUrlSubdomains,
                }),
                (i = this.options),
                f(i.minZoom) || (i.minZoom = t.zoomMin),
                f(i.maxZoom) || (i.maxZoom = t.zoomMax),
                this._addAttribution(),
                "none" !== this.element.css("display") && this._reset());
            },
            _viewType: function () {
              return c;
            },
            _addAttribution: function () {
              var u,
                t,
                i,
                r,
                n,
                f = this.map.attribution;
              if (f && (u = this.resource.imageryProviders))
                for (t = 0; t < u.length; t++)
                  for (i = u[t], r = 0; r < i.coverageAreas.length; r++)
                    (n = i.coverageAreas[r]),
                      f.add({
                        text: i.attribution,
                        minZoom: n.zoomMin,
                        maxZoom: n.zoomMax,
                        extent: new l(
                          new e(n.bbox[2], n.bbox[1]),
                          new e(n.bbox[0], n.bbox[3])
                        ),
                      });
            },
            imagerySet: function (n) {
              return n
                ? ((this.options.imagerySet = n),
                  this.map.attribution.clear(),
                  this._fetchMetadata(),
                  t)
                : this.options.imagerySet;
            },
          }),
          c = s.extend({
            options: { culture: "en-US" },
            tileOptions: function (n) {
              var t = s.fn.tileOptions.call(this, n);
              return (
                (t.culture = this.options.culture),
                (t.quadkey = this.tileQuadKey(this.wrapIndex(n))),
                t
              );
            },
            tileQuadKey: function (n) {
              for (var t, r, u = "", i = this._zoom; i > 0; i--)
                (t = 0),
                  (r = 1 << (i - 1)),
                  0 != (n.x & r) && t++,
                  0 != (n.y & r) && (t += 2),
                  (u += t);
              return u;
            },
          });
        u(i, { map: { layers: { bing: h, BingLayer: h, BingView: c } } });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/map/layers/marker.min",
      [
        "dataviz/map/layers/base.min",
        "dataviz/map/location.min",
        "kendo.data.min",
        "kendo.tooltip.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        var a = document,
          f = Math,
          v = n.inArray,
          e = n.proxy,
          t = window.kendo,
          y = t.Class,
          p = t.data.DataSource,
          o = t.ui.Tooltip,
          s = t.dataviz,
          h = t.deepExtend,
          u = s.map,
          c = u.Location,
          r = u.layers.Layer,
          l = r.extend({
            init: function (n, t) {
              r.fn.init.call(this, n, t);
              this._markerClick = e(this._markerClick, this);
              this.element.on("click", ".k-marker", this._markerClick);
              this.items = [];
              this._initDataSource();
            },
            destroy: function () {
              r.fn.destroy.call(this);
              this.element.off("click", ".k-marker", this._markerClick);
              this.dataSource.unbind("change", this._dataChange);
              this.clear();
            },
            options: {
              zIndex: 1e3,
              autoBind: !0,
              dataSource: {},
              locationField: "location",
              titleField: "title",
            },
            add: function (t) {
              if (!n.isArray(t)) return this._addOne(t);
              for (var i = 0; i < t.length; i++) this._addOne(t[i]);
            },
            remove: function (n) {
              n.destroy();
              var t = v(n, this.items);
              t > -1 && this.items.splice(t, 1);
            },
            clear: function () {
              for (var n = 0; n < this.items.length; n++)
                this.items[n].destroy();
              this.items = [];
            },
            update: function (n) {
              var t,
                i = n.location();
              i &&
                (n.showAt(this.map.locationToView(i)),
                (t = { marker: n, layer: this }),
                this.map.trigger("markerActivate", t));
            },
            _reset: function () {
              var t, n;
              for (
                r.fn._reset.call(this), t = this.items, n = 0;
                n < t.length;
                n++
              )
                this.update(t[n]);
            },
            bind: function (n, t) {
              var r,
                f,
                i = u.Marker.create(n, this.options);
              if (
                ((i.dataItem = t),
                (r = { marker: i, layer: this }),
                (f = this.map.trigger("markerCreated", r)),
                !f)
              )
                return this.add(i), i;
            },
            setDataSource: function (n) {
              this.dataSource &&
                this.dataSource.unbind("change", this._dataChange);
              this.dataSource = t.data.DataSource.create(n);
              this.dataSource.bind("change", this._dataChange);
              this.options.autoBind && this.dataSource.fetch();
            },
            _addOne: function (n) {
              var t = i.create(n, this.options);
              return t.addTo(this), t;
            },
            _initDataSource: function () {
              var n = this.options.dataSource;
              this._dataChange = e(this._dataChange, this);
              this.dataSource = p.create(n).bind("change", this._dataChange);
              n && this.options.autoBind && this.dataSource.fetch();
            },
            _dataChange: function (n) {
              this._load(n.sender.view());
            },
            _load: function (n) {
              var u, f, i, r;
              for (
                this._data = n,
                  this.clear(),
                  u = t.getter(this.options.locationField),
                  f = t.getter(this.options.titleField),
                  i = 0;
                i < n.length;
                i++
              )
                (r = n[i]), this.bind({ location: u(r), title: f(r) }, r);
            },
            _markerClick: function (t) {
              var i = { marker: n(t.target).data("kendoMarker"), layer: this };
              this.map.trigger("markerClick", i);
            },
          }),
          i = y.extend({
            init: function (n) {
              this.options = n || {};
            },
            addTo: function (n) {
              this.layer = n.markers || n;
              this.layer.items.push(this);
              this.layer.update(this);
            },
            location: function (n) {
              return n
                ? ((this.options.location = c.create(n).toArray()),
                  this.layer && this.layer.update(this),
                  this)
                : c.create(this.options.location);
            },
            showAt: function (n) {
              this.render();
              this.element.css({ left: f.round(n.x), top: f.round(n.y) });
              this.tooltip &&
                this.tooltip.popup &&
                this.tooltip.popup._position();
            },
            hide: function () {
              this.element && (this.element.remove(), (this.element = null));
              this.tooltip && (this.tooltip.destroy(), (this.tooltip = null));
            },
            destroy: function () {
              this.layer = null;
              this.hide();
            },
            render: function () {
              var i, r;
              this.element ||
                ((i = this.options),
                (r = this.layer),
                (this.element = n(a.createElement("span"))
                  .addClass(
                    "k-marker k-icon k-i-marker-" +
                      t.toHyphens(i.shape || "pin")
                  )
                  .attr("title", i.title)
                  .attr(i.attributes || {})
                  .data("kendoMarker", this)
                  .css("zIndex", i.zIndex)),
                r && r.element.append(this.element),
                this.renderTooltip());
            },
            renderTooltip: function () {
              var r,
                u,
                i = this,
                f = i.options.title,
                n = i.options.tooltip || {};
              n &&
                o &&
                ((r = n.template),
                r &&
                  ((u = t.template(r)),
                  (n.content = function (n) {
                    return (n.location = i.location()), (n.marker = i), u(n);
                  })),
                (f || n.content || n.contentUrl) &&
                  ((this.tooltip = new o(this.element, n)),
                  (this.tooltip.marker = this)));
            },
          });
        i.create = function (n, t) {
          return n instanceof i ? n : new i(h({}, t, n));
        };
        h(s, { map: { layers: { marker: l, MarkerLayer: l }, Marker: i } });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/map/main.min",
      ["dataviz/map/crs.min", "dataviz/map/location.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var d = document,
          r = Math,
          p = r.min,
          l = r.pow,
          t = n.proxy,
          i = window.kendo,
          s = i.ui.Widget,
          w = i.deepExtend,
          u = i.dataviz,
          f = u.ui,
          e = i.geometry,
          b = e.Point,
          h = u.map,
          a = h.Extent,
          o = h.Location,
          g = h.crs.EPSG3857,
          nt = i.util,
          k = nt.renderPos,
          v = i.drawing.util,
          tt = v.defined,
          c = v.limitValue,
          y = v.valueOrDefault,
          it = "k-",
          rt = 0.9,
          ut = 0.93,
          ft = "DOMMouseScroll mousewheel",
          et = 5,
          ot = 1,
          st = s.extend({
            init: function (n, r) {
              i.destroy(n);
              s.fn.init.call(this, n);
              this._initOptions(r);
              this.bind(this.events, r);
              this.crs = new g();
              this.element
                .addClass(it + this.options.name.toLowerCase())
                .css("position", "relative")
                .empty()
                .append(d.createElement("div"));
              this._viewOrigin = this._getOrigin();
              this._initScroller();
              this._initMarkers();
              this._initControls();
              this._initLayers();
              this._reset();
              this._mousewheel = t(this._mousewheel, this);
              this.element.bind(ft, this._mousewheel);
            },
            options: {
              name: "Map",
              controls: {
                attribution: !0,
                navigator: { panStep: 100 },
                zoom: !0,
              },
              layers: [],
              layerDefaults: {
                shape: {
                  style: {
                    fill: { color: "#fff" },
                    stroke: { color: "#aaa", width: 0.5 },
                  },
                },
                bubble: {
                  style: {
                    fill: { color: "#fff", opacity: 0.5 },
                    stroke: { color: "#aaa", width: 0.5 },
                  },
                },
                marker: { shape: "pinTarget", tooltip: { position: "top" } },
              },
              center: [0, 0],
              zoom: 3,
              minSize: 256,
              minZoom: 1,
              maxZoom: 19,
              markers: [],
              markerDefaults: {
                shape: "pinTarget",
                tooltip: { position: "top" },
              },
              wraparound: !0,
            },
            events: [
              "beforeReset",
              "click",
              "markerActivate",
              "markerClick",
              "markerCreated",
              "pan",
              "panEnd",
              "reset",
              "shapeClick",
              "shapeCreated",
              "shapeFeatureCreated",
              "shapeMouseEnter",
              "shapeMouseLeave",
              "zoomEnd",
              "zoomStart",
            ],
            destroy: function () {
              this.scroller.destroy();
              this.navigator && this.navigator.destroy();
              this.attribution && this.attribution.destroy();
              this.zoomControl && this.zoomControl.destroy();
              this.markers.destroy();
              for (var n = 0; n < this.layers.length; n++)
                this.layers[n].destroy();
              s.fn.destroy.call(this);
            },
            zoom: function (n) {
              var t = this.options;
              return tt(n)
                ? ((n = r.round(c(n, t.minZoom, t.maxZoom))),
                  t.zoom !== n && ((t.zoom = n), this._reset()),
                  this)
                : t.zoom;
            },
            center: function (n) {
              return n
                ? ((this.options.center = o.create(n).toArray()),
                  this._reset(),
                  this)
                : o.create(this.options.center);
            },
            extent: function (n) {
              return n ? (this._setExtent(n), this) : this._getExtent();
            },
            setOptions: function (n) {
              s.fn.setOptions.call(this, n);
              this._reset();
            },
            locationToLayer: function (n, t) {
              var i = !this.options.wraparound;
              return (
                (n = o.create(n)), this.crs.toPoint(n, this._layerSize(t), i)
              );
            },
            layerToLocation: function (n, t) {
              var i = !this.options.wraparound;
              return (
                (n = b.create(n)), this.crs.toLocation(n, this._layerSize(t), i)
              );
            },
            locationToView: function (n) {
              var t, i;
              return (
                (n = o.create(n)),
                (t = this.locationToLayer(this._viewOrigin)),
                (i = this.locationToLayer(n)),
                i.translateWith(t.scale(-1))
              );
            },
            viewToLocation: function (n, t) {
              var i = this.locationToLayer(this._getOrigin(), t);
              return (
                (n = b.create(n)),
                (n = n.clone().translateWith(i)),
                this.layerToLocation(n, t)
              );
            },
            eventOffset: function (n) {
              var f,
                i,
                r,
                o,
                t,
                u = this.element.offset();
              return (
                n.x || n.y
                  ? ((o = "location"),
                    (i = n.x[o] - u.left),
                    (r = n.y[o] - u.top),
                    (f = new e.Point(i, r)))
                  : ((t = n.originalEvent || n),
                    (i = y(t.pageX, t.clientX) - u.left),
                    (r = y(t.pageY, t.clientY) - u.top),
                    (f = new e.Point(i, r))),
                f
              );
            },
            eventToView: function (n) {
              var t = this.eventOffset(n);
              return this.locationToView(this.viewToLocation(t));
            },
            eventToLayer: function (n) {
              return this.locationToLayer(this.eventToLocation(n));
            },
            eventToLocation: function (n) {
              var t = this.eventOffset(n);
              return this.viewToLocation(t);
            },
            viewSize: function () {
              var t = this.element,
                i = this._layerSize(),
                n = t.width();
              return (
                this.options.wraparound || (n = p(i, n)),
                { width: n, height: p(i, t.height()) }
              );
            },
            exportVisual: function () {
              return this._reset(), !1;
            },
            _setOrigin: function (n, t) {
              var i,
                r = this.viewSize();
              return (
                (n = this._origin = o.create(n)),
                (i = this.locationToLayer(n, t)),
                (i.x += r.width / 2),
                (i.y += r.height / 2),
                (this.options.center = this.layerToLocation(i, t).toArray()),
                this
              );
            },
            _getOrigin: function (n) {
              var t,
                i = this.viewSize();
              return (
                (!n && this._origin) ||
                  ((t = this.locationToLayer(this.center())),
                  (t.x -= i.width / 2),
                  (t.y -= i.height / 2),
                  (this._origin = this.layerToLocation(t))),
                this._origin
              );
            },
            _setExtent: function (n) {
              var e,
                o,
                t,
                u,
                f,
                s,
                h,
                c = a.create(n),
                i = c.se.clone();
              for (
                this.options.wraparound &&
                  i.lng < 0 &&
                  n.nw.lng > 0 &&
                  (i.lng = 180 + (180 + i.lng)),
                  n = new a(c.nw, i),
                  this.center(n.center()),
                  e = this.element.width(),
                  o = this.element.height(),
                  t = this.options.maxZoom;
                t >= this.options.minZoom &&
                ((u = this.locationToLayer(n.nw, t)),
                (f = this.locationToLayer(n.se, t)),
                (s = r.abs(f.x - u.x)),
                (h = r.abs(f.y - u.y)),
                !(s <= e && h <= o));
                t--
              );
              this.zoom(t);
            },
            _getExtent: function () {
              var t,
                i = this._getOrigin(),
                n = this.locationToLayer(i),
                r = this.viewSize();
              return (
                (n.x += r.width),
                (n.y += r.height),
                (t = this.layerToLocation(n)),
                new a(i, t)
              );
            },
            _zoomAround: function (n, t) {
              this._setOrigin(this.layerToLocation(n, t), t);
              this.zoom(t);
            },
            _initControls: function () {
              var n = this.options.controls;
              f.Attribution &&
                n.attribution &&
                this._createAttribution(n.attribution);
              i.support.mobileOS ||
                (f.Navigator &&
                  n.navigator &&
                  this._createNavigator(n.navigator),
                f.ZoomControl && n.zoom && this._createZoomControl(n.zoom));
            },
            _createControlElement: function (t, i) {
              var u = t.position || i,
                f = "." + k(u).replace(" ", "."),
                r = n(".k-map-controls" + f, this.element);
              return (
                0 === r.length &&
                  (r = n("<div>")
                    .addClass("k-map-controls " + k(u))
                    .appendTo(this.element)),
                n("<div>").appendTo(r)
              );
            },
            _createAttribution: function (n) {
              var t = this._createControlElement(n, "bottomRight");
              this.attribution = new f.Attribution(t, n);
            },
            _createNavigator: function (n) {
              var r = this._createControlElement(n, "topLeft"),
                i = (this.navigator = new f.Navigator(r, n));
              this._navigatorPan = t(this._navigatorPan, this);
              i.bind("pan", this._navigatorPan);
              this._navigatorCenter = t(this._navigatorCenter, this);
              i.bind("center", this._navigatorCenter);
            },
            _navigatorPan: function (n) {
              var t = this,
                f = t.scroller,
                r = f.scrollLeft + n.x,
                u = f.scrollTop - n.y,
                i = this._virtualSize,
                e = this.element.height(),
                o = this.element.width();
              r = c(r, i.x.min, i.x.max - o);
              u = c(u, i.y.min, i.y.max - e);
              t.scroller.one("scroll", function (n) {
                t._scrollEnd(n);
              });
              t.scroller.scrollTo(-r, -u);
            },
            _navigatorCenter: function () {
              this.center(this.options.center);
            },
            _createZoomControl: function (n) {
              var i = this._createControlElement(n, "topLeft"),
                r = (this.zoomControl = new f.ZoomControl(i, n));
              this._zoomControlChange = t(this._zoomControlChange, this);
              r.bind("change", this._zoomControlChange);
            },
            _zoomControlChange: function (n) {
              this.trigger("zoomStart", { originalEvent: n }) ||
                (this.zoom(this.zoom() + n.delta),
                this.trigger("zoomEnd", { originalEvent: n }));
            },
            _initScroller: function () {
              var r = i.support.mobileOS ? ut : rt,
                u = this.options.zoomable !== !1,
                n = (this.scroller = new i.mobile.ui.Scroller(
                  this.element.children(0),
                  {
                    friction: r,
                    velocityMultiplier: et,
                    zoom: u,
                    mousewheelScrolling: !1,
                    supportDoubleTap: !0,
                  }
                ));
              n.bind("scroll", t(this._scroll, this));
              n.bind("scrollEnd", t(this._scrollEnd, this));
              n.userEvents.bind("gesturestart", t(this._scaleStart, this));
              n.userEvents.bind("gestureend", t(this._scale, this));
              n.userEvents.bind("doubleTap", t(this._doubleTap, this));
              n.userEvents.bind("tap", t(this._tap, this));
              this.scrollElement = n.scrollElement;
            },
            _initLayers: function () {
              for (
                var t,
                  i,
                  r,
                  f,
                  e = this.options.layers,
                  o = (this.layers = []),
                  n = 0;
                n < e.length;
                n++
              )
                (t = e[n]),
                  (i = t.type || "shape"),
                  (r = this.options.layerDefaults[i]),
                  (f = u.map.layers[i]),
                  o.push(new f(this, w({}, r, t)));
            },
            _initMarkers: function () {
              this.markers = new h.layers.MarkerLayer(
                this,
                this.options.markerDefaults
              );
              this.markers.add(this.options.markers);
            },
            _scroll: function (n) {
              var t = this.locationToLayer(this._viewOrigin).round(),
                i = n.sender.movable,
                r = new e.Point(i.x, i.y).scale(-1).scale(1 / i.scale);
              t.x += r.x;
              t.y += r.y;
              this._scrollOffset = r;
              this._setOrigin(this.layerToLocation(t));
              this.trigger("pan", {
                originalEvent: n,
                origin: this._getOrigin(),
                center: this.center(),
              });
            },
            _scrollEnd: function (n) {
              this._scrollOffset &&
                this._panComplete() &&
                ((this._scrollOffset = null),
                (this._panEndTS = new Date()),
                this.trigger("panEnd", {
                  originalEvent: n,
                  origin: this._getOrigin(),
                  center: this.center(),
                }));
            },
            _panComplete: function () {
              return new Date() - (this._panEndTS || 0) > 50;
            },
            _scaleStart: function (n) {
              if (this.trigger("zoomStart", { originalEvent: n })) {
                var t = n.touches[1];
                t && t.cancel();
              }
            },
            _scale: function (n) {
              var r = this.scroller.movable.scale,
                t = this._scaleToZoom(r),
                i = new e.Point(n.center.x, n.center.y),
                u = this.viewToLocation(i, t),
                f = this.locationToLayer(u, t),
                o = f.translate(-i.x, -i.y);
              this._zoomAround(o, t);
              this.trigger("zoomEnd", { originalEvent: n });
            },
            _scaleToZoom: function (n) {
              var t = this._layerSize() * n,
                i = t / this.options.minSize,
                u = r.log(i) / r.log(2);
              return r.round(u);
            },
            _reset: function () {
              this.attribution &&
                this.attribution.filter(this.center(), this.zoom());
              this._viewOrigin = this._getOrigin(!0);
              this._resetScroller();
              this.trigger("beforeReset");
              this.trigger("reset");
            },
            _resetScroller: function () {
              var u,
                n,
                i,
                f,
                t = this.scroller,
                o = t.dimensions.x,
                s = t.dimensions.y,
                e = this._layerSize(),
                h = this.extent().nw,
                r = this.locationToLayer(h).round();
              t.movable.round = !0;
              t.reset();
              t.userEvents.cancel();
              u = this.zoom();
              t.dimensions.forcedMinScale = l(2, this.options.minZoom - u);
              t.dimensions.maxScale = l(2, this.options.maxZoom - u);
              n = { min: -r.x, max: e - r.x };
              i = { min: -r.y, max: e - r.y };
              this.options.wraparound && ((n.max = 20 * e), (n.min = -n.max));
              this.options.pannable === !1 &&
                ((f = this.viewSize()),
                (n.min = i.min = 0),
                (n.max = f.width),
                (i.max = f.height));
              o.makeVirtual();
              s.makeVirtual();
              o.virtualSize(n.min, n.max);
              s.virtualSize(i.min, i.max);
              this._virtualSize = { x: n, y: i };
            },
            _renderLayers: function () {
              var n,
                t,
                i,
                r,
                f,
                e = this.options.layers,
                o = (this.layers = []),
                s = this.scrollWrap;
              for (s.empty(), n = 0; n < e.length; n++)
                (t = e[n]),
                  (i = t.type || "shape"),
                  (r = this.options.layerDefaults[i]),
                  (f = u.map.layers[i]),
                  o.push(new f(this, w({}, r, t)));
            },
            _layerSize: function (n) {
              return (
                (n = y(n, this.options.zoom)), this.options.minSize * l(2, n)
              );
            },
            _tap: function (n) {
              if (this._panComplete()) {
                var t = this.eventOffset(n);
                this.trigger("click", {
                  originalEvent: n,
                  location: this.viewToLocation(t),
                });
              }
            },
            _doubleTap: function (n) {
              var i,
                t,
                r,
                u,
                f,
                e = this.options;
              e.zoomable !== !1 &&
                (this.trigger("zoomStart", { originalEvent: n }) ||
                  ((i = this.zoom() + ot),
                  (t = this.eventOffset(n)),
                  (r = this.viewToLocation(t)),
                  (u = this.locationToLayer(r, i)),
                  (f = u.translate(-t.x, -t.y)),
                  this._zoomAround(f, i),
                  this.trigger("zoomEnd", { originalEvent: n })));
            },
            _mousewheel: function (n) {
              var e, t, f, i, r, o, s, h;
              n.preventDefault();
              e = u.mwDelta(n) > 0 ? -1 : 1;
              t = this.options;
              f = this.zoom();
              i = c(f + e, t.minZoom, t.maxZoom);
              t.zoomable !== !1 &&
                i !== f &&
                (this.trigger("zoomStart", { originalEvent: n }) ||
                  ((r = this.eventOffset(n)),
                  (o = this.viewToLocation(r)),
                  (s = this.locationToLayer(o, i)),
                  (h = s.translate(-r.x, -r.y)),
                  this._zoomAround(h, i),
                  this.trigger("zoomEnd", { originalEvent: n })));
            },
          });
        u.ui.plugin(st);
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.map.min",
      [
        "kendo.data.min",
        "kendo.userevents.min",
        "kendo.tooltip.min",
        "kendo.mobile.scroller.min",
        "kendo.draganddrop.min",
        "kendo.dataviz.core.min",
        "dataviz/map/location.min",
        "dataviz/map/attribution.min",
        "dataviz/map/navigator.min",
        "dataviz/map/zoom.min",
        "dataviz/map/crs.min",
        "dataviz/map/layers/base.min",
        "dataviz/map/layers/shape.min",
        "dataviz/map/layers/bubble.min",
        "dataviz/map/layers/tile.min",
        "dataviz/map/layers/bing.min",
        "dataviz/map/layers/marker.min",
        "dataviz/map/main.min",
      ],
      n
    );
  })(
    function () {
      return window.kendo;
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/diagram/utils.min", ["kendo.core.min"], n);
  })(
    function () {
      !(function (n, t) {
        function o(n, r, u) {
          function h(n) {
            for (var t = 1; (n * t) % 1; ) t *= 10;
            return t;
          }
          var e, s, o, f;
          if (t === n || t === r) return [];
          if (u && i.sign(r - n) != i.sign(u))
            throw "The sign of the increment should allow to reach the stop-value.";
          if (((u = u || 1), (n = n || 0), (r = r || n), (r - n) / u == 1 / 0))
            throw "Infinite range defined.";
          if (
            ((e = []),
            (s = -1),
            (f = h(Math.abs(u))),
            (n *= f),
            (r *= f),
            (u *= f),
            n > r && u > 0 && (u = -u),
            u < 0)
          )
            for (; (o = n + u * ++s) >= r; ) e.push(o / f);
          else for (; (o = n + u * ++s) <= r; ) e.push(o / f);
          return e;
        }
        function s(n, t) {
          if (n == t) return 0;
          var r = t.x - n.x,
            u = n.y - t.y,
            i = Math.atan(r / u);
          return u >= 0 ? (r < 0 ? i + 2 * Math.PI : i) : i + Math.PI;
        }
        var f,
          e,
          r = window.kendo,
          u = (r.dataviz.diagram = {}),
          h = r.deepExtend,
          c = n.isArray,
          l = 1e-6,
          i = {};
        h(i, {
          isNearZero: function (n) {
            return Math.abs(n) < l;
          },
          isDefined: function (n) {
            return t !== n;
          },
          isUndefined: function (n) {
            return t === n || null === n;
          },
          isObject: function (n) {
            return n === Object(n);
          },
          has: function (n, t) {
            return Object.hasOwnProperty.call(n, t);
          },
          isString: function (n) {
            return "[object String]" == Object.prototype.toString.call(n);
          },
          isBoolean: function (n) {
            return "[object Boolean]" == Object.prototype.toString.call(n);
          },
          isType: function (n, t) {
            return Object.prototype.toString.call(n) == "[object " + t + "]";
          },
          isNumber: function (n) {
            return !isNaN(parseFloat(n)) && isFinite(n);
          },
          isEmpty: function (n) {
            if (null === n) return !0;
            if (c(n) || i.isString(n)) return 0 === n.length;
            for (var t in n) if (i.has(n, t)) return !1;
            return !0;
          },
          simpleExtend: function (n, t) {
            if (i.isObject(t)) for (var r in t) n[r] = t[r];
          },
          initArray: function (n, t) {
            for (var r = [], i = 0; i < n; ++i) r[i] = t;
            return r;
          },
          serializePoints: function (n) {
            for (var i, r = [], t = 0; t < n.length; t++)
              (i = n[t]), r.push(i.x + ";" + i.y);
            return r.join(";");
          },
          deserializePoints: function (n) {
            var t,
              i = n.split(";"),
              r = [];
            if (i.length % 2 != 0) throw "Not an array of points.";
            for (t = 0; t < i.length; t += 2)
              r.push(new u.Point(parseInt(i[t], 10), parseInt(i[t + 1], 10)));
            return r;
          },
          randomInteger: function (n, t) {
            return parseInt(Math.floor(Math.random() * t) + n, 10);
          },
          DFT: function (n, t) {
            var i, r;
            if ((t(n), n.childNodes))
              for (i = 0; i < n.childNodes.length; i++)
                (r = n.childNodes[i]), this.DFT(r, t);
          },
          getMatrixAngle: function (n) {
            return null === n || 0 === n.d
              ? 0
              : (180 * Math.atan2(n.b, n.d)) / Math.PI;
          },
          getMatrixScaling: function (n) {
            var t = Math.sqrt(n.a * n.a + n.c * n.c),
              i = Math.sqrt(n.b * n.b + n.d * n.d);
            return [t, i];
          },
        });
        i.sign = function (n) {
          return n ? (n < 0 ? -1 : 1) : 0;
        };
        i.findAngle = function (n, t) {
          return (180 * s(n, t)) / Math.PI;
        };
        i.forEach = function (n, t, i) {
          for (var r = 0; r < n.length; r++) t.call(i, n[r], r, n);
        };
        i.any = function (n, t) {
          for (var i = 0; i < n.length; ++i) if (t(n[i])) return n[i];
          return null;
        };
        i.remove = function (n, t) {
          for (var r; (r = i.indexOf(n, t)) !== -1; ) n.splice(r, 1);
          return n;
        };
        i.contains = function (n, t) {
          return i.indexOf(n, t) !== -1;
        };
        i.indexOf = function (t, i) {
          return n.inArray(i, t);
        };
        i.fold = function (n, t, i, r) {
          for (var f, e = arguments.length > 2, u = 0; u < n.length; u++)
            (f = n[u]), e ? (i = t.call(r, i, f, u, n)) : ((i = f), (e = !0));
          if (!e) throw "Reduce of empty array with no initial value";
          return i;
        };
        i.find = function (n, t, r) {
          var u;
          return (
            i.any(n, function (n, i, f) {
              return !!t.call(r, n, i, f) && ((u = n), !0);
            }),
            u
          );
        };
        i.first = function (n, t, r) {
          return 0 === n.length
            ? null
            : i.isUndefined(t)
            ? n[0]
            : i.find(n, t, r);
        };
        i.insert = function (n, t, i) {
          return n.splice(i, 0, t), n;
        };
        i.all = function (n, t, i) {
          for (
            var f, u = !0, r = 0;
            r < n.length && ((f = n[r]), (u = u && t.call(i, f, r, n)), u);
            r++
          );
          return u;
        };
        i.clear = function (n) {
          n.splice(0, n.length);
        };
        i.bisort = function (n, t, r) {
          if (i.isUndefined(n)) throw "First array is not specified.";
          if (i.isUndefined(t)) throw "Second array is not specified.";
          if (n.length != t.length)
            throw "The two arrays should have equal length";
          for (var f = [], u = 0; u < n.length; u++)
            f.push({ x: n[u], y: t[u] });
          for (
            f.sort(
              i.isUndefined(r)
                ? function (n, t) {
                    return n.x - t.x;
                  }
                : function (n, t) {
                    return r(n.x, t.x);
                  }
            ),
              i.clear(n),
              i.clear(t),
              u = 0;
            u < f.length;
            u++
          )
            n.push(f[u].x), t.push(f[u].y);
        };
        i.addRange = function (n, t) {
          n.push.apply(n, t);
        };
        f = {
          easeInOut: function (n) {
            return -Math.cos(n * Math.PI) / 2 + 0.5;
          },
        };
        e = r.Class.extend({
          init: function () {
            this.adapters = [];
            this.target = 0;
            this.tick = 0;
            this.interval = 20;
            this.duration = 800;
            this.lastTime = null;
            this.handlers = [];
            var n = this;
            this.transition = f.easeInOut;
            this.timerDelegate = function () {
              n.onTimerEvent();
            };
          },
          addAdapter: function (n) {
            this.adapters.push(n);
          },
          onComplete: function (n) {
            this.handlers.push(n);
          },
          removeHandler: function (t) {
            this.handlers = n.grep(this.handlers, function (n) {
              return n !== t;
            });
          },
          trigger: function () {
            var n = this;
            this.handlers &&
              i.forEach(this.handlers, function (t) {
                return t.call(null !== n.caller ? n.caller : n);
              });
          },
          onStep: function () {},
          seekTo: function (n) {
            this.seekFromTo(this.tick, n);
          },
          seekFromTo: function (n, t) {
            this.target = Math.max(0, Math.min(1, t));
            this.tick = Math.max(0, Math.min(1, n));
            this.lastTime = new Date().getTime();
            this.intervalId ||
              (this.intervalId = window.setInterval(
                this.timerDelegate,
                this.interval
              ));
          },
          stop: function () {
            this.intervalId &&
              (window.clearInterval(this.intervalId),
              (this.intervalId = null),
              this.trigger());
          },
          play: function (n) {
            0 !== this.adapters.length &&
              (null !== n && (this.caller = n),
              this.initState(),
              this.seekFromTo(0, 1));
          },
          reverse: function () {
            this.seekFromTo(1, 0);
          },
          initState: function () {
            if (0 !== this.adapters.length)
              for (var n = 0; n < this.adapters.length; n++)
                this.adapters[n].initState();
          },
          propagate: function () {
            for (
              var t = this.transition(this.tick), n = 0;
              n < this.adapters.length;
              n++
            )
              this.adapters[n].update(t);
          },
          onTimerEvent: function () {
            var n,
              t = new Date().getTime(),
              i = t - this.lastTime;
            this.lastTime = t;
            n = (i / this.duration) * (this.tick < this.target ? 1 : -1);
            Math.abs(n) >= Math.abs(this.tick - this.target)
              ? (this.tick = this.target)
              : (this.tick += n);
            try {
              this.propagate();
            } finally {
              this.onStep.call(this);
              this.target == this.tick && this.stop();
            }
          },
        });
        r.deepExtend(u, {
          init: function (n) {
            r.init(n, u.ui);
          },
          Utils: i,
          Range: o,
          Ticker: e,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/diagram/math.min",
      ["dataviz/diagram/utils.min", "kendo.dataviz.core.min"],
      n
    );
  })(
    function () {
      !(function (n, t) {
        function st(n) {
          return Math.abs(n) < at;
        }
        function rt(n, t, i, u, f) {
          var h,
            c,
            e,
            o,
            s = (t.x - n.x) * (u.y - i.y) - (t.y - n.y) * (u.x - i.x);
          if (
            !st(s) &&
            ((h = (n.y - i.y) * (u.x - i.x) - (n.x - i.x) * (u.y - i.y)),
            (c = (n.y - i.y) * (t.x - n.x) - (n.x - i.x) * (t.y - n.y)),
            (e = h / s),
            (o = c / s),
            !f || !(e < 0 || e > 1 || o < 0 || o > 1))
          )
            return new r(n.x + e * (t.x - n.x), n.y + e * (t.y - n.y));
        }
        function ht(n, t) {
          var r, u, i;
          do
            (r = 2 * Math.random() - 1),
              (u = 2 * Math.random() - 1),
              (i = r * r + u * u);
          while (!i || i > 1);
          return n + t * r * Math.sqrt((-2 * Math.log(i)) / i);
        }
        function p(n) {
          var t, r, u;
          for (
            i.isUndefined(n) && (n = 10),
              t = "",
              r =
                "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
              u = n;
            u > 0;
            --u
          )
            t += r.charAt(Math.round(Math.random() * (r.length - 1)));
          return t;
        }
        var ut,
          f,
          k,
          l,
          ft,
          a,
          s,
          nt,
          et,
          w,
          h,
          tt,
          ot,
          c,
          b,
          e,
          u = window.kendo,
          v = u.dataviz.diagram,
          y = u.Class,
          it = u.deepExtend,
          ct = u.dataviz,
          i = v.Utils,
          r = ct.Point2D,
          lt = u.isFunction,
          o = i.contains,
          d = n.map,
          g = 3,
          at = 1e-6;
        it(r.fn, {
          plus: function (n) {
            return new r(this.x + n.x, this.y + n.y);
          },
          minus: function (n) {
            return new r(this.x - n.x, this.y - n.y);
          },
          offset: function (n) {
            return new r(this.x - n, this.y - n);
          },
          times: function (n) {
            return new r(this.x * n, this.y * n);
          },
          normalize: function () {
            return 0 === this.length()
              ? new r()
              : this.times(1 / this.length());
          },
          length: function () {
            return Math.sqrt(this.x * this.x + this.y * this.y);
          },
          toString: function () {
            return "(" + this.x + "," + this.y + ")";
          },
          lengthSquared: function () {
            return this.x * this.x + this.y * this.y;
          },
          middleOf: function (n, t) {
            return new r(t.x - n.x, t.y - n.y).times(0.5).plus(n);
          },
          toPolar: function (n) {
            var u,
              i,
              t,
              r = 1;
            if (
              (n && (r = 180 / Math.PI),
              (u = Math.atan2(Math.abs(this.y), Math.abs(this.x))),
              (i = Math.PI / 2),
              (t = this.length()),
              0 === this.x)
            ) {
              if (0 === this.y) return new a(0, 0);
              if (this.y > 0) return new a(t, r * i);
              if (this.y < 0) return new a(t, 3 * r * i);
            } else if (this.x > 0) {
              if (0 === this.y) return new a(t, 0);
              if (this.y > 0) return new a(t, r * u);
              if (this.y < 0) return new a(t, r * (4 * i - u));
            } else {
              if (0 === this.y) return new a(t, 2 * i);
              if (this.y > 0) return new a(t, r * (2 * i - u));
              if (this.y < 0) return new a(t, r * (2 * i + u));
            }
          },
          isOnLine: function (n, t) {
            var o, i, r, u, e;
            return (
              n.x > t.x && ((o = t), (t = n), (n = o)),
              (i = new f(n.x, n.y).inflate(g, g)),
              (r = new f(t.x, t.y).inflate(g, g)),
              !!i.union(r).contains(this) &&
                (n.x === t.x ||
                  n.y === t.y ||
                  (n.y < t.y
                    ? ((u =
                        i.x +
                        ((r.x - i.x) * (this.y - (i.y + i.height))) /
                          (r.y + r.height - (i.y + i.height))),
                      (e =
                        i.x +
                        i.width +
                        ((r.x + r.width - (i.x + i.width)) * (this.y - i.y)) /
                          (r.y - i.y)))
                    : ((u = i.x + ((r.x - i.x) * (this.y - i.y)) / (r.y - i.y)),
                      (e =
                        i.x +
                        i.width +
                        ((r.x + r.width - (i.x + i.width)) *
                          (this.y - (i.y + i.height))) /
                          (r.y + r.height - (i.y + i.height)))),
                  this.x > u && this.x < e))
            );
          },
        });
        it(r, {
          parse: function (n) {
            var f = n.slice(1, n.length - 1),
              t = f.split(","),
              i = parseInt(t[0], 10),
              u = parseInt(t[1], 10);
            if (!isNaN(i) && !isNaN(u)) return new r(i, u);
          },
        });
        ut = y.extend({
          init: function (n, t, i) {
            this.point = n;
            this.left = t;
            this.right = i;
          },
        });
        f = y.extend({
          init: function (n, t, i, r) {
            this.x = n || 0;
            this.y = t || 0;
            this.width = i || 0;
            this.height = r || 0;
          },
          contains: function (n) {
            return (
              n.x >= this.x &&
              n.x <= this.x + this.width &&
              n.y >= this.y &&
              n.y <= this.y + this.height
            );
          },
          inflate: function (n, i) {
            return (
              i === t && (i = n),
              (this.x -= n),
              (this.y -= i),
              (this.width += 2 * n + 1),
              (this.height += 2 * i + 1),
              this
            );
          },
          offset: function (n, t) {
            var i = n,
              u = t;
            return (
              n instanceof r && ((i = n.x), (u = n.y)),
              (this.x += i),
              (this.y += u),
              this
            );
          },
          union: function (n) {
            var t = Math.min(this.x, n.x),
              i = Math.min(this.y, n.y),
              r = Math.max(this.x + this.width, n.x + n.width),
              u = Math.max(this.y + this.height, n.y + n.height);
            return new f(t, i, r - t, u - i);
          },
          center: function () {
            return new r(this.x + this.width / 2, this.y + this.height / 2);
          },
          top: function () {
            return new r(this.x + this.width / 2, this.y);
          },
          right: function () {
            return new r(this.x + this.width, this.y + this.height / 2);
          },
          bottom: function () {
            return new r(this.x + this.width / 2, this.y + this.height);
          },
          left: function () {
            return new r(this.x, this.y + this.height / 2);
          },
          topLeft: function () {
            return new r(this.x, this.y);
          },
          topRight: function () {
            return new r(this.x + this.width, this.y);
          },
          bottomLeft: function () {
            return new r(this.x, this.y + this.height);
          },
          bottomRight: function () {
            return new r(this.x + this.width, this.y + this.height);
          },
          clone: function () {
            return new f(this.x, this.y, this.width, this.height);
          },
          isEmpty: function () {
            return !this.width && !this.height;
          },
          equals: function (n) {
            return (
              this.x === n.x &&
              this.y === n.y &&
              this.width === n.width &&
              this.height === n.height
            );
          },
          rotatedBounds: function (n) {
            var t = this.clone(),
              i = this.rotatedPoints(n),
              r = i[0],
              u = i[1],
              f = i[2],
              e = i[3];
            return (
              (t.x = Math.min(f.x, r.x, u.x, e.x)),
              (t.y = Math.min(f.y, r.y, u.y, e.y)),
              (t.width = Math.max(f.x, r.x, u.x, e.x) - t.x),
              (t.height = Math.max(f.y, r.y, u.y, e.y) - t.y),
              t
            );
          },
          rotatedPoints: function (n) {
            var t = this,
              i = t.center(),
              r = t.bottomRight().rotate(i, 360 - n),
              u = t.topLeft().rotate(i, 360 - n),
              f = t.topRight().rotate(i, 360 - n),
              e = t.bottomLeft().rotate(i, 360 - n);
            return [u, f, r, e];
          },
          toString: function (n) {
            return (
              (n = n || " "),
              this.x + n + this.y + n + this.width + n + this.height
            );
          },
          scale: function (n, t, i, u, f) {
            var o,
              s,
              h,
              e = this.topLeft(),
              c = this.center();
            e.rotate(c, 360 - f).rotate(u, f);
            o = i.minus(e);
            s = new r(o.x * n, o.y * t);
            h = o.minus(s);
            e = e.plus(h);
            e.rotate(u, 360 - f).rotate(c, f);
            this.x = e.x;
            this.y = e.y;
            this.width *= n;
            this.height *= t;
          },
          zoom: function (n) {
            return (
              (this.x *= n),
              (this.y *= n),
              (this.width *= n),
              (this.height *= n),
              this
            );
          },
          overlaps: function (n) {
            var t = this.bottomRight(),
              i = n.bottomRight();
            return !(t.x < n.x || t.y < n.y || i.x < this.x || i.y < this.y);
          },
        });
        k = y.extend({
          init: function (n, t) {
            this.width = n;
            this.height = t;
          },
        });
        k.prototype.Empty = new k(0, 0);
        f.toRect = function (n) {
          return n instanceof f || (n = new f(n.x, n.y, n.width, n.height)), n;
        };
        f.empty = function () {
          return new f(0, 0, 0, 0);
        };
        f.fromPoints = function (n, t) {
          if (isNaN(n.x) || isNaN(n.y) || isNaN(t.x) || isNaN(t.y))
            throw "Some values are NaN.";
          return new f(
            Math.min(n.x, t.x),
            Math.min(n.y, t.y),
            Math.abs(n.x - t.x),
            Math.abs(n.y - t.y)
          );
        };
        l = {
          lines: function (n, t, i, r) {
            return rt(n, t, i, r);
          },
          segments: function (n, t, i, r) {
            return rt(n, t, i, r, !0);
          },
          rectWithLine: function (n, t, i) {
            return (
              l.segments(t, i, n.topLeft(), n.topRight()) ||
              l.segments(t, i, n.topRight(), n.bottomRight()) ||
              l.segments(t, i, n.bottomLeft(), n.bottomRight()) ||
              l.segments(t, i, n.topLeft(), n.bottomLeft())
            );
          },
          rects: function (n, t, i) {
            var h,
              s,
              r = t.topLeft(),
              u = t.topRight(),
              f = t.bottomLeft(),
              e = t.bottomRight(),
              o = t.center();
            return (
              i &&
                ((r = r.rotate(o, i)),
                (u = u.rotate(o, i)),
                (f = f.rotate(o, i)),
                (e = e.rotate(o, i))),
              (h =
                n.contains(r) ||
                n.contains(u) ||
                n.contains(f) ||
                n.contains(e) ||
                l.rectWithLine(n, r, u) ||
                l.rectWithLine(n, r, f) ||
                l.rectWithLine(n, u, e) ||
                l.rectWithLine(n, f, e)),
              h ||
                ((r = n.topLeft()),
                (u = n.topRight()),
                (f = n.bottomLeft()),
                (e = n.bottomRight()),
                i &&
                  ((s = 360 - i),
                  (r = r.rotate(o, s)),
                  (u = u.rotate(o, s)),
                  (f = f.rotate(o, s)),
                  (e = e.rotate(o, s))),
                (h =
                  t.contains(r) ||
                  t.contains(u) ||
                  t.contains(f) ||
                  t.contains(e))),
              h
            );
          },
        };
        ft = y.extend({
          init: function (n) {
            this.container = f.toRect(n);
          },
          align: function (n, t) {
            for (var r = t.toLowerCase().split(" "), i = 0; i < r.length; i++)
              n = this._singleAlign(n, r[i]);
            return n;
          },
          _singleAlign: function (n, t) {
            return lt(this[t]) ? this[t](n) : n;
          },
          left: function (n) {
            return this._align(n, this._left);
          },
          center: function (n) {
            return this._align(n, this._center);
          },
          right: function (n) {
            return this._align(n, this._right);
          },
          stretch: function (n) {
            return this._align(n, this._stretch);
          },
          top: function (n) {
            return this._align(n, this._top);
          },
          middle: function (n) {
            return this._align(n, this._middle);
          },
          bottom: function (n) {
            return this._align(n, this._bottom);
          },
          _left: function (n, t) {
            t.x = n.x;
          },
          _center: function (n, t) {
            t.x = (n.width - t.width) / 2 || 0;
          },
          _right: function (n, t) {
            t.x = n.width - t.width;
          },
          _top: function (n, t) {
            t.y = n.y;
          },
          _middle: function (n, t) {
            t.y = (n.height - t.height) / 2 || 0;
          },
          _bottom: function (n, t) {
            t.y = n.height - t.height;
          },
          _stretch: function (n, t) {
            t.x = 0;
            t.y = 0;
            t.height = n.height;
            t.width = n.width;
          },
          _align: function (n, t) {
            return (n = f.toRect(n)), t(this.container, n), n;
          },
        });
        a = y.extend({
          init: function (n, t) {
            this.r = n;
            this.angle = t;
          },
        });
        s = y.extend({
          init: function (n, t, i, r, u, f) {
            this.a = n || 0;
            this.b = t || 0;
            this.c = i || 0;
            this.d = r || 0;
            this.e = u || 0;
            this.f = f || 0;
          },
          plus: function (n) {
            this.a += n.a;
            this.b += n.b;
            this.c += n.c;
            this.d += n.d;
            this.e += n.e;
            this.f += n.f;
          },
          minus: function (n) {
            this.a -= n.a;
            this.b -= n.b;
            this.c -= n.c;
            this.d -= n.d;
            this.e -= n.e;
            this.f -= n.f;
          },
          times: function (n) {
            return new s(
              this.a * n.a + this.c * n.b,
              this.b * n.a + this.d * n.b,
              this.a * n.c + this.c * n.d,
              this.b * n.c + this.d * n.d,
              this.a * n.e + this.c * n.f + this.e,
              this.b * n.e + this.d * n.f + this.f
            );
          },
          apply: function (n) {
            return new r(
              this.a * n.x + this.c * n.y + this.e,
              this.b * n.x + this.d * n.y + this.f
            );
          },
          applyRect: function (n) {
            return f.fromPoints(
              this.apply(n.topLeft()),
              this.apply(n.bottomRight())
            );
          },
          toString: function () {
            return (
              "matrix(" +
              this.a +
              " " +
              this.b +
              " " +
              this.c +
              " " +
              this.d +
              " " +
              this.e +
              " " +
              this.f +
              ")"
            );
          },
        });
        it(s, {
          fromSVGMatrix: function (n) {
            var t = new s();
            return (
              (t.a = n.a),
              (t.b = n.b),
              (t.c = n.c),
              (t.d = n.d),
              (t.e = n.e),
              (t.f = n.f),
              t
            );
          },
          fromMatrixVector: function (n) {
            var t = new s();
            return (
              (t.a = n.a),
              (t.b = n.b),
              (t.c = n.c),
              (t.d = n.d),
              (t.e = n.e),
              (t.f = n.f),
              t
            );
          },
          fromList: function (n) {
            if (6 !== n.length)
              throw "The given list should consist of six elements.";
            var t = new s();
            return (
              (t.a = n[0]),
              (t.b = n[1]),
              (t.c = n[2]),
              (t.d = n[3]),
              (t.e = n[4]),
              (t.f = n[5]),
              t
            );
          },
          translation: function (n, t) {
            var i = new s();
            return (
              (i.a = 1),
              (i.b = 0),
              (i.c = 0),
              (i.d = 1),
              (i.e = n),
              (i.f = t),
              i
            );
          },
          unit: function () {
            return new s(1, 0, 0, 1, 0, 0);
          },
          rotation: function (n, t, i) {
            var r = new s();
            return (
              (r.a = Math.cos((n * Math.PI) / 180)),
              (r.b = Math.sin((n * Math.PI) / 180)),
              (r.c = -r.b),
              (r.d = r.a),
              (r.e = t - t * r.a + i * r.b || 0),
              (r.f = i - i * r.a - t * r.b || 0),
              r
            );
          },
          scaling: function (n, t) {
            var i = new s();
            return (
              (i.a = n),
              (i.b = 0),
              (i.c = 0),
              (i.d = t),
              (i.e = 0),
              (i.f = 0),
              i
            );
          },
          parse: function (n) {
            var t, i;
            if (n) {
              if (((n = n.trim()), "matrix" === n.slice(0, 6).toLowerCase())) {
                if (
                  ((i = n.slice(7, n.length - 1).trim()),
                  (t = i.split(",")),
                  6 === t.length)
                )
                  return s.fromList(
                    d(t, function (n) {
                      return parseFloat(n);
                    })
                  );
                if (((t = i.split(" ")), 6 === t.length))
                  return s.fromList(
                    d(t, function (n) {
                      return parseFloat(n);
                    })
                  );
              }
              if (
                ("(" === n.slice(0, 1) &&
                  ")" === n.slice(n.length - 1) &&
                  (n = n.substr(1, n.length - 1)),
                n.indexOf(",") > 0 && ((t = n.split(",")), 6 === t.length))
              )
                return s.fromList(
                  d(t, function (n) {
                    return parseFloat(n);
                  })
                );
              if (n.indexOf(" ") > 0 && ((t = n.split(" ")), 6 === t.length))
                return s.fromList(
                  d(t, function (n) {
                    return parseFloat(n);
                  })
                );
            }
            return t;
          },
        });
        nt = y.extend({
          init: function (n, t, i, r, u, f) {
            this.a = n || 0;
            this.b = t || 0;
            this.c = i || 0;
            this.d = r || 0;
            this.e = u || 0;
            this.f = f || 0;
          },
          fromMatrix: function (n) {
            var t = new nt();
            return (
              (t.a = n.a),
              (t.b = n.b),
              (t.c = n.c),
              (t.d = n.d),
              (t.e = n.e),
              (t.f = n.f),
              t
            );
          },
        });
        et = {
          _distanceToLineSquared: function (n, t, i) {
            function e(n, t) {
              return (n.x - t.x) * (n.x - t.x) + (n.y - t.y) * (n.y - t.y);
            }
            if (t === i) return e(n, t);
            var u = i.x - t.x,
              f = i.y - t.y,
              r = (n.x - t.x) * u + (n.y - t.y) * f;
            return r < 0
              ? e(t, n)
              : ((r = (i.x - n.x) * u + (i.y - n.y) * f),
                r < 0
                  ? e(i, n)
                  : ((r = (i.x - n.x) * f - (i.y - n.y) * u),
                    (r * r) / (u * u + f * f)));
          },
          distanceToLine: function (n, t, i) {
            return Math.sqrt(this._distanceToLineSquared(n, t, i));
          },
          distanceToPolyline: function (n, t) {
            var r,
              e,
              o,
              u,
              f = Number.MAX_VALUE;
            if (i.isUndefined(t) || 0 === t.length) return Number.MAX_VALUE;
            for (r = 0; r < t.length - 1; r++)
              (e = t[r]),
                (o = t[r + 1]),
                (u = this._distanceToLineSquared(n, e, o)),
                u < f && (f = u);
            return Math.sqrt(f);
          },
        };
        w = u.Class.extend({
          init: function () {
            this._buckets = [];
            this.length = 0;
          },
          add: function (n, t) {
            var r = this._createGetBucket(n);
            return i.isDefined(t) && (r.value = t), r;
          },
          get: function (n) {
            return this._bucketExists(n) ? this._createGetBucket(n) : null;
          },
          set: function (n, t) {
            this.add(n, t);
          },
          containsKey: function (n) {
            return this._bucketExists(n);
          },
          remove: function (n) {
            if (this._bucketExists(n)) {
              var t = this._hash(n);
              return delete this._buckets[t], this.length--, n;
            }
          },
          forEach: function (n) {
            for (var f, r, e = this._hashes(), t = 0, u = e.length; t < u; t++)
              (f = e[t]), (r = this._buckets[f]), i.isUndefined(r) || n(r);
          },
          clone: function () {
            for (
              var u, t, f = new w(), e = this._hashes(), n = 0, r = e.length;
              n < r;
              n++
            )
              (u = e[n]),
                (t = this._buckets[u]),
                i.isUndefined(t) || f.add(t.key, t.value);
            return f;
          },
          _hashes: function () {
            var n,
              t = [];
            for (n in this._buckets)
              this._buckets.hasOwnProperty(n) && t.push(n);
            return t;
          },
          _bucketExists: function (n) {
            var t = this._hash(n);
            return i.isDefined(this._buckets[t]);
          },
          _createGetBucket: function (n) {
            var r = this._hash(n),
              t = this._buckets[r];
            return (
              i.isUndefined(t) &&
                ((t = { key: n }), (this._buckets[r] = t), this.length++),
              t
            );
          },
          _hash: function (n) {
            if (i.isNumber(n)) return n;
            if (i.isString(n)) return this._hashString(n);
            if (i.isObject(n)) return this._objectHashId(n);
            throw "Unsupported key type.";
          },
          _hashString: function (n) {
            var i,
              r,
              t = 0;
            if (0 === n.length) return t;
            for (i = 0; i < n.length; i++)
              (r = n.charCodeAt(i)), (t = 32 * t - t + r);
            return t;
          },
          _objectHashId: function (n) {
            var t = n._hashId;
            return i.isUndefined(t) && ((t = p()), (n._hashId = t)), t;
          },
        });
        h = u.Observable.extend({
          init: function (t) {
            var r,
              f = this;
            if (
              (u.Observable.fn.init.call(f),
              (this._hashTable = new w()),
              (this.length = 0),
              i.isDefined(t))
            )
              if (n.isArray(t)) for (r = 0; r < t.length; r++) this.add(t[r]);
              else
                t.forEach(function (n, t) {
                  this.add(n, t);
                }, this);
          },
          add: function (n, t) {
            var i = this._hashTable.get(n);
            i ||
              ((i = this._hashTable.add(n)),
              this.length++,
              this.trigger("changed"));
            i.value = t;
          },
          set: function (n, t) {
            this.add(n, t);
          },
          get: function (n) {
            var t = this._hashTable.get(n);
            if (t) return t.value;
            throw Error("Cannot find key " + n);
          },
          containsKey: function (n) {
            return this._hashTable.containsKey(n);
          },
          remove: function (n) {
            if (this.containsKey(n))
              return (
                this.trigger("changed"),
                this.length--,
                this._hashTable.remove(n)
              );
          },
          forEach: function (n, t) {
            this._hashTable.forEach(function (i) {
              n.call(t, i.key, i.value);
            });
          },
          forEachValue: function (n, t) {
            this._hashTable.forEach(function (i) {
              n.call(t, i.value);
            });
          },
          forEachKey: function (n, t) {
            this._hashTable.forEach(function (i) {
              n.call(t, i.key);
            });
          },
          keys: function () {
            var n = [];
            return (
              this.forEachKey(function (t) {
                n.push(t);
              }),
              n
            );
          },
        });
        tt = u.Class.extend({
          init: function () {
            this._tail = null;
            this._head = null;
            this.length = 0;
          },
          enqueue: function (n) {
            var t = { value: n, next: null };
            this._head
              ? ((this._tail.next = t), (this._tail = this._tail.next))
              : ((this._head = t), (this._tail = this._head));
            this.length++;
          },
          dequeue: function () {
            if (this.length < 1) throw Error("The queue is empty.");
            var n = this._head.value;
            return (this._head = this._head.next), this.length--, n;
          },
          contains: function (n) {
            for (var t = this._head; t; ) {
              if (t.value === n) return !0;
              t = t.next;
            }
            return !1;
          },
        });
        ot = u.Observable.extend({
          init: function (n) {
            var t = this;
            u.Observable.fn.init.call(t);
            this._hashTable = new w();
            this.length = 0;
            i.isDefined(n) &&
              (n instanceof w
                ? n.forEach(function (n) {
                    this.add(n);
                  })
                : n instanceof h &&
                  n.forEach(function (n, t) {
                    this.add({ key: n, value: t });
                  }, this));
          },
          contains: function (n) {
            return this._hashTable.containsKey(n);
          },
          add: function (n) {
            var t = this._hashTable.get(n);
            t ||
              (this._hashTable.add(n, n),
              this.length++,
              this.trigger("changed"));
          },
          get: function (n) {
            return this.contains(n) ? this._hashTable.get(n).value : null;
          },
          hash: function (n) {
            return this._hashTable._hash(n);
          },
          remove: function (n) {
            this.contains(n) &&
              (this._hashTable.remove(n),
              this.length--,
              this.trigger("changed"));
          },
          forEach: function (n, t) {
            this._hashTable.forEach(function (t) {
              n(t.value);
            }, t);
          },
          toArray: function () {
            var n = [];
            return (
              this.forEach(function (t) {
                n.push(t);
              }),
              n
            );
          },
        });
        c = u.Class.extend({
          init: function (n, t) {
            if (
              ((this.links = []),
              (this.outgoing = []),
              (this.incoming = []),
              (this.weight = 1),
              (this.id = i.isDefined(n) ? n : p()),
              i.isDefined(t))
            ) {
              this.associatedShape = t;
              var r = t.bounds();
              this.width = r.width;
              this.height = r.height;
              this.x = r.x;
              this.y = r.y;
            } else this.associatedShape = null;
            this.data = null;
            this.type = "Node";
            this.shortForm = "Node '" + this.id + "'";
            this.isVirtual = !1;
          },
          isIsolated: function () {
            return i.isEmpty(this.links);
          },
          bounds: function (n) {
            return i.isDefined(n)
              ? ((this.x = n.x),
                (this.y = n.y),
                (this.width = n.width),
                (this.height = n.height),
                t)
              : new v.Rect(this.x, this.y, this.width, this.height);
          },
          isLinkedTo: function (n) {
            var t = this;
            return i.any(t.links, function (i) {
              return i.getComplement(t) === n;
            });
          },
          getChildren: function () {
            var t, n, i, r;
            if (0 === this.outgoing.length) return [];
            for (t = [], n = 0, i = this.outgoing.length; n < i; n++)
              (r = this.outgoing[n]), t.push(r.getComplement(this));
            return t;
          },
          getParents: function () {
            var t, n, i, r;
            if (0 === this.incoming.length) return [];
            for (t = [], n = 0, i = this.incoming.length; n < i; n++)
              (r = this.incoming[n]), t.push(r.getComplement(this));
            return t;
          },
          clone: function () {
            var n = new c();
            return (
              i.isDefined(this.weight) && (n.weight = this.weight),
              i.isDefined(this.balance) && (n.balance = this.balance),
              i.isDefined(this.owner) && (n.owner = this.owner),
              (n.associatedShape = this.associatedShape),
              (n.x = this.x),
              (n.y = this.y),
              (n.width = this.width),
              (n.height = this.height),
              n
            );
          },
          adjacentTo: function (n) {
            return null !== this.isLinkedTo(n);
          },
          removeLink: function (n) {
            n.source === this &&
              (i.remove(this.links, n),
              i.remove(this.outgoing, n),
              (n.source = null));
            n.target === this &&
              (i.remove(this.links, n),
              i.remove(this.incoming, n),
              (n.target = null));
          },
          hasLinkTo: function (n) {
            return i.any(this.outgoing, function (t) {
              return t.target === n;
            });
          },
          degree: function () {
            return this.links.length;
          },
          incidentWith: function (n) {
            return o(this.links, n);
          },
          getLinksWith: function (n) {
            return i.all(
              this.links,
              function (t) {
                return t.getComplement(this) === n;
              },
              this
            );
          },
          getNeighbors: function () {
            var n = [];
            return (
              i.forEach(
                this.incoming,
                function (t) {
                  n.push(t.getComplement(this));
                },
                this
              ),
              i.forEach(
                this.outgoing,
                function (t) {
                  n.push(t.getComplement(this));
                },
                this
              ),
              n
            );
          },
        });
        b = u.Class.extend({
          init: function (n, t, r, u) {
            if (i.isUndefined(n))
              throw "The source of the new link is not set.";
            if (i.isUndefined(t))
              throw "The target of the new link is not set.";
            var f, e;
            f = i.isString(n) ? new c(n) : n;
            e = i.isString(t) ? new c(t) : t;
            this.source = f;
            this.target = e;
            this.source.links.push(this);
            this.target.links.push(this);
            this.source.outgoing.push(this);
            this.target.incoming.push(this);
            this.id = i.isDefined(r) ? r : p();
            this.associatedConnection = i.isDefined(u) ? u : null;
            this.type = "Link";
            this.shortForm =
              "Link '" + this.source.id + "->" + this.target.id + "'";
          },
          getComplement: function (n) {
            if (this.source !== n && this.target !== n)
              throw "The given node is not incident with this link.";
            return this.source === n ? this.target : this.source;
          },
          getCommonNode: function (n) {
            return this.source === n.source || this.source === n.target
              ? this.source
              : this.target === n.source || this.target === n.target
              ? this.target
              : null;
          },
          isBridging: function (n, t) {
            return (
              (this.source === n && this.target === t) ||
              (this.source === t && this.target === n)
            );
          },
          getNodes: function () {
            return [this.source, this.target];
          },
          incidentWith: function (n) {
            return this.source === n || this.target === n;
          },
          adjacentTo: function (n) {
            return o(this.source.links, n) || o(this.target.links, n);
          },
          changeSource: function (n) {
            i.remove(this.source.links, this);
            i.remove(this.source.outgoing, this);
            n.links.push(this);
            n.outgoing.push(this);
            this.source = n;
          },
          changeTarget: function (n) {
            i.remove(this.target.links, this);
            i.remove(this.target.incoming, this);
            n.links.push(this);
            n.incoming.push(this);
            this.target = n;
          },
          changesNodes: function (n, t) {
            this.source === n
              ? this.changeSource(t)
              : this.target === n && this.changeTarget(t);
          },
          reverse: function () {
            var n = this.source,
              t = this.target;
            return (
              (this.source = t),
              i.remove(n.outgoing, this),
              this.source.outgoing.push(this),
              (this.target = n),
              i.remove(t.incoming, this),
              this.target.incoming.push(this),
              this
            );
          },
          directTo: function (n) {
            if (this.source !== n && this.target !== n)
              throw "The given node is not incident with this link.";
            this.target !== n && this.reverse();
          },
          createReverseEdge: function () {
            var n = this.clone();
            return n.reverse(), (n.reversed = !0), n;
          },
          clone: function () {
            return new b(this.source, this.target);
          },
        });
        e = u.Class.extend({
          init: function (n) {
            this.links = [];
            this.nodes = [];
            this._nodeMap = new h();
            this.diagram = null;
            this._root = null;
            i.isDefined(n)
              ? i.isString(n)
                ? (this.id = n)
                : ((this.diagram = n), (this.id = n.id))
              : (this.id = p());
            this.bounds = new f();
            this._hasCachedRelationships = !1;
            this.type = "Graph";
          },
          cacheRelationships: function (n) {
            var r, u, t;
            if (
              (i.isUndefined(n) && (n = !1), !this._hasCachedRelationships || n)
            ) {
              for (r = 0, u = this.nodes.length; r < u; r++)
                (t = this.nodes[r]),
                  (t.children = this.getChildren(t)),
                  (t.parents = this.getParents(t));
              this._hasCachedRelationships = !0;
            }
          },
          assignLevels: function (n, t, r) {
            var e, u, o, f;
            if (!n) throw "Start node not specified.";
            for (
              i.isUndefined(t) && (t = 0),
                this.cacheRelationships(),
                i.isUndefined(r) &&
                  ((r = new h()),
                  i.forEach(this.nodes, function (n) {
                    r.add(n, !1);
                  })),
                r.set(n, !0),
                n.level = t,
                e = n.children,
                u = 0,
                o = e.length;
              u < o;
              u++
            )
              (f = e[u]), f && !r.get(f) && this.assignLevels(f, t + 1, r);
          },
          root: function (n) {
            if (i.isUndefined(n)) {
              if (this._root) return this._root;
              var t = i.first(this.nodes, function (n) {
                return 0 === n.incoming.length;
              });
              return t ? t : i.first(this.nodes);
            }
            this._root = n;
          },
          getConnectedComponents: function () {
            var t, r, u, n, f;
            for (
              this.componentIndex = 0,
                this.setItemIndices(),
                t = i.initArray(this.nodes.length, -1),
                r = 0;
              r < this.nodes.length;
              r++
            )
              t[r] === -1 &&
                (this._collectConnectedNodes(t, r), this.componentIndex++);
            for (u = [], n = 0; n < this.componentIndex; ++n) u[n] = new e();
            for (n = 0; n < t.length; ++n)
              (f = u[t[n]]), f.addNodeAndOutgoings(this.nodes[n]);
            return (
              u.sort(function (n, t) {
                return t.nodes.length - n.nodes.length;
              }),
              u
            );
          },
          _collectConnectedNodes: function (n, t) {
            n[t] = this.componentIndex;
            var r = this.nodes[t];
            i.forEach(
              r.links,
              function (t) {
                var u = t.getComplement(r),
                  i = u.index;
                n[i] === -1 && this._collectConnectedNodes(n, i);
              },
              this
            );
          },
          calcBounds: function () {
            var n, t, r, i;
            if (this.isEmpty()) return (this.bounds = new f());
            for (n = null, t = 0, r = this.nodes.length; t < r; t++)
              (i = this.nodes[t]), (n = n ? n.union(i.bounds()) : i.bounds());
            return (this.bounds = n);
          },
          getSpanningTree: function (n) {
            var s,
              c,
              a,
              l,
              v,
              r,
              y,
              k,
              t,
              d,
              p,
              w,
              u = new e(),
              f = new h();
            for (
              u.root = n.clone(),
                u.root.level = 0,
                u.root.id = n.id,
                f.add(n, u.root),
                n.level = 0,
                a = [],
                l = [],
                u._addNode(u.root),
                a.push(n),
                l.push(n),
                v = 1;
              l.length > 0;

            )
              for (r = l.pop(), y = 0; y < r.links.length; y++)
                (k = r.links[y]),
                  (t = k.getComplement(r)),
                  o(a, t) ||
                    ((t.level = r.level + 1),
                    v < t.level + 1 && (v = t.level + 1),
                    o(l, t) || l.push(t),
                    o(a, t) || a.push(t),
                    f.containsKey(r)
                      ? (s = f.get(r))
                      : ((s = r.clone()),
                        (s.level = r.level),
                        (s.id = r.id),
                        f.add(r, s)),
                    f.containsKey(t)
                      ? (c = f.get(t))
                      : ((c = t.clone()),
                        (c.level = t.level),
                        (c.id = t.id),
                        f.add(t, c)),
                    (d = new b(s, c)),
                    u.addLink(d));
            for (p = [], w = 0; w < v; w++) p.push([]);
            return (
              i.forEach(u.nodes, function (n) {
                p[n.level].push(n);
              }),
              (u.treeLevels = p),
              u.cacheRelationships(),
              u
            );
          },
          takeRandomNode: function (t, r) {
            if (
              (i.isUndefined(t) && (t = []),
              i.isUndefined(r) && (r = 4),
              0 === this.nodes.length)
            )
              return null;
            if (1 === this.nodes.length)
              return o(t, this.nodes[0]) ? null : this.nodes[0];
            var u = n.grep(this.nodes, function (n) {
              return !o(t, n) && n.degree() <= r;
            });
            return i.isEmpty(u) ? null : u[i.randomInteger(0, u.length)];
          },
          isEmpty: function () {
            return i.isEmpty(this.nodes);
          },
          isHealthy: function () {
            return i.all(
              this.links,
              function (n) {
                return o(this.nodes, n.source) && o(this.nodes, n.target);
              },
              this
            );
          },
          getParents: function (n) {
            if (!this.hasNode(n))
              throw "The given node is not part of this graph.";
            return n.getParents();
          },
          getChildren: function (n) {
            if (!this.hasNode(n))
              throw "The given node is not part of this graph.";
            return n.getChildren();
          },
          addLink: function (n, r, u) {
            var f, e, o;
            if (i.isUndefined(n))
              throw "The source of the link is not defined.";
            if (i.isUndefined(r)) {
              if (i.isDefined(n.type) && "Link" === n.type)
                return this.addExistingLink(n), t;
              throw "The target of the link is not defined.";
            }
            return (
              (f = this.getNode(n)),
              i.isUndefined(f) && (f = this.addNode(n)),
              (e = this.getNode(r)),
              i.isUndefined(e) && (e = this.addNode(r)),
              (o = new b(f, e)),
              i.isDefined(u) && (o.owner = u),
              this.links.push(o),
              o
            );
          },
          removeAllLinks: function () {
            for (; this.links.length > 0; ) {
              var n = this.links[0];
              this.removeLink(n);
            }
          },
          addExistingLink: function (n) {
            var t, i;
            this.hasLink(n) ||
              (this.links.push(n),
              this.hasNode(n.source.id)
                ? ((t = this.getNode(n.source.id)), n.changeSource(t))
                : this.addNode(n.source),
              this.hasNode(n.target.id)
                ? ((i = this.getNode(n.target.id)), n.changeTarget(i))
                : this.addNode(n.target));
          },
          hasLink: function (n) {
            if (i.isString(n))
              return i.any(this.links, function (t) {
                return t.id === n;
              });
            if ("Link" === n.type) return o(this.links, n);
            throw "The given object is neither an identifier nor a Link.";
          },
          getNode: function (n) {
            var t = n.id || n;
            if (this._nodeMap.containsKey(t)) return this._nodeMap.get(t);
          },
          hasNode: function (n) {
            var t = n.id || n;
            return this._nodeMap.containsKey(t);
          },
          _addNode: function (n) {
            this.nodes.push(n);
            this._nodeMap.add(n.id, n);
          },
          _removeNode: function (n) {
            i.remove(this.nodes, n);
            this._nodeMap.remove(n.id);
          },
          removeNode: function (n) {
            var u,
              r,
              f,
              e,
              t = n;
            if ((i.isString(n) && (t = this.getNode(n)), !i.isDefined(t)))
              throw "The identifier should be a Node or the Id (string) of a node.";
            for (u = t.links, t.links = [], r = 0, f = u.length; r < f; r++)
              (e = u[r]), this.removeLink(e);
            this._removeNode(t);
          },
          areConnected: function (n, t) {
            return i.any(this.links, function (i) {
              return (
                (i.source == n && i.target == t) ||
                (i.source == t && i.target == n)
              );
            });
          },
          removeLink: function (n) {
            i.remove(this.links, n);
            i.remove(n.source.outgoing, n);
            i.remove(n.source.links, n);
            i.remove(n.target.incoming, n);
            i.remove(n.target.links, n);
          },
          addNode: function (n, t, r) {
            var u = null;
            if (!i.isDefined(n))
              throw "No Node or identifier for a new Node is given.";
            if (i.isString(n)) {
              if (this.hasNode(n)) return this.getNode(n);
              u = new c(n);
            } else {
              if (this.hasNode(n)) return this.getNode(n);
              u = n;
            }
            return (
              i.isDefined(t) && u.bounds(t),
              i.isDefined(r) && (u.owner = r),
              this._addNode(u),
              u
            );
          },
          addNodeAndOutgoings: function (n) {
            this.hasNode(n) || this._addNode(n);
            var t = n.outgoing;
            n.outgoing = [];
            i.forEach(
              t,
              function (n) {
                this.addExistingLink(n);
              },
              this
            );
          },
          setItemIndices: function () {
            for (var n = 0; n < this.nodes.length; ++n) this.nodes[n].index = n;
            for (n = 0; n < this.links.length; ++n) this.links[n].index = n;
          },
          clone: function (n) {
            var r,
              t = new e(),
              u = i.isDefined(n) && n === !0;
            return (
              u && ((t.nodeMap = new h()), (t.linkMap = new h())),
              (r = new h()),
              i.forEach(this.nodes, function (n) {
                var i = n.clone();
                r.set(n, i);
                t._addNode(i);
                u && t.nodeMap.set(i, n);
              }),
              i.forEach(this.links, function (n) {
                if (r.containsKey(n.source) && r.containsKey(n.target)) {
                  var i = t.addLink(r.get(n.source), r.get(n.target));
                  u && t.linkMap.set(i, n);
                }
              }),
              t
            );
          },
          linearize: function (n) {
            return e.Utils.linearize(this, n);
          },
          depthFirstTraversal: function (n, t) {
            var r, u;
            if (i.isUndefined(n)) throw "You need to supply a starting node.";
            if (i.isUndefined(t)) throw "You need to supply an action.";
            if (!this.hasNode(n))
              throw "The given start-node is not part of this graph";
            r = this.getNode(n);
            u = [];
            this._dftIterator(r, t, u);
          },
          _dftIterator: function (n, t, i) {
            var u, r, e, f;
            for (
              t(n), i.push(n), u = n.getChildren(), r = 0, e = u.length;
              r < e;
              r++
            )
              (f = u[r]), o(i, f) || this._dftIterator(f, t, i);
          },
          breadthFirstTraversal: function (n, t) {
            var c, r, s, u, h, f, l, e;
            if (i.isUndefined(n)) throw "You need to supply a starting node.";
            if (i.isUndefined(t)) throw "You need to supply an action.";
            if (!this.hasNode(n))
              throw "The given start-node is not part of this graph";
            for (
              c = this.getNode(n), r = new tt(), s = [], r.enqueue(c);
              r.length > 0;

            )
              for (
                u = r.dequeue(),
                  t(u),
                  s.push(u),
                  h = u.getChildren(),
                  f = 0,
                  l = h.length;
                f < l;
                f++
              )
                (e = h[f]), o(s, e) || o(r, e) || r.enqueue(e);
          },
          _stronglyConnectedComponents: function (n, t, i, r, u, f, e) {
            var l, s, h, a, c;
            for (
              i.add(t, e),
                r.add(t, e),
                e++,
                f.push(t),
                l = t.getChildren(),
                h = 0,
                a = l.length;
              h < a;
              h++
            )
              (s = l[h]),
                i.containsKey(s)
                  ? o(f, s) && r.add(t, Math.min(r.get(t), i.get(s)))
                  : (this._stronglyConnectedComponents(n, s, i, r, u, f, e),
                    r.add(t, Math.min(r.get(t), r.get(s))));
            if (r.get(t) === i.get(t)) {
              c = [];
              do (s = f.pop()), c.push(s);
              while (s !== t);
              (!n || c.length > 1) && u.push(c);
            }
          },
          findCycles: function (n) {
            var r, e, u, o, t, s, f;
            for (
              i.isUndefined(n) && (n = !0),
                r = new h(),
                e = new h(),
                u = [],
                o = [],
                t = 0,
                s = this.nodes.length;
              t < s;
              t++
            )
              (f = this.nodes[t]),
                r.containsKey(f) ||
                  this._stronglyConnectedComponents(n, f, r, e, u, o, 0);
            return u;
          },
          isAcyclic: function () {
            return i.isEmpty(this.findCycles());
          },
          isSubGraph: function (n) {
            var t = n.linearize(),
              r = this.linearize();
            return i.all(t, function (n) {
              return o(r, n);
            });
          },
          makeAcyclic: function () {
            var g,
              st,
              ht,
              p,
              ct,
              nt,
              lt,
              f,
              t,
              n,
              l,
              a,
              e,
              tt,
              r,
              u,
              o,
              it,
              w,
              rt,
              ut,
              b,
              ft,
              s,
              at,
              c,
              k,
              et,
              v,
              d,
              y,
              ot;
            if (
              this.isEmpty() ||
              this.nodes.length <= 1 ||
              this.links.length <= 1
            )
              return [];
            if (2 == this.nodes.length) {
              if (((g = []), this.links.length > 1))
                for (
                  st = this.links[0],
                    ht = st.source,
                    p = 0,
                    ct = this.links.length;
                  p < ct;
                  p++
                )
                  (nt = this.links[p]),
                    nt.source != ht && ((lt = nt.reverse()), g.push(lt));
              return g;
            }
            for (
              f = this.clone(!0),
                t = this.nodes.length,
                n = new h(),
                l = function (n) {
                  return 0 === n.outgoing.length
                    ? 2 - t
                    : 0 === n.incoming.length
                    ? t - 2
                    : n.outgoing.length - n.incoming.length;
                },
                a = function (n, i) {
                  var r = l(n, t);
                  i.containsKey(r) || i.set(r, []);
                  i.get(r).push(n);
                },
                i.forEach(f.nodes, function (t) {
                  a(t, n);
                }),
                e = [],
                tt = [];
              f.nodes.length > 0;

            ) {
              if (n.containsKey(2 - t))
                for (it = n.get(2 - t); it.length > 0; ) {
                  for (u = it.pop(), w = 0; w < u.links.length; w++)
                    (rt = u.links[w]),
                      (r = rt.getComplement(u)),
                      (o = l(r, t)),
                      i.remove(n.get(o), r),
                      r.removeLink(rt),
                      a(r, n);
                  f._removeNode(u);
                  tt.unshift(u);
                }
              if (n.containsKey(t - 2))
                for (ut = n.get(t - 2); ut.length > 0; ) {
                  for (r = ut.pop(), b = 0; b < r.links.length; b++)
                    (ft = r.links[b]),
                      (u = ft.getComplement(r)),
                      (o = l(u, t)),
                      i.remove(n.get(o), u),
                      u.removeLink(ft),
                      a(u, n);
                  e.push(r);
                  f._removeNode(r);
                }
              if (f.nodes.length > 0)
                for (s = t - 3; s > 2 - t; s--)
                  if (n.containsKey(s) && n.get(s).length > 0) {
                    for (
                      at = n.get(s), c = at.pop(), k = 0;
                      k < c.links.length;
                      k++
                    )
                      (et = c.links[k]),
                        (v = et.getComplement(c)),
                        (o = l(v, t)),
                        i.remove(n.get(o), v),
                        v.removeLink(et),
                        a(v, n);
                    e.push(c);
                    f._removeNode(c);
                    break;
                  }
            }
            for (
              e = e.concat(tt), d = new h(), y = 0;
              y < this.nodes.length;
              y++
            )
              d.set(f.nodeMap.get(e[y]), y);
            return (
              (ot = []),
              i.forEach(this.links, function (n) {
                d.get(n.source) > d.get(n.target) && (n.reverse(), ot.push(n));
              }),
              ot
            );
          },
        });
        e.Predefined = {
          EightGraph: function () {
            return e.Utils.parse([
              "1->2",
              "2->3",
              "3->4",
              "4->1",
              "3->5",
              "5->6",
              "6->7",
              "7->3",
            ]);
          },
          Mindmap: function () {
            return e.Utils.parse([
              "0->1",
              "0->2",
              "0->3",
              "0->4",
              "0->5",
              "1->6",
              "1->7",
              "7->8",
              "2->9",
              "9->10",
              "9->11",
              "3->12",
              "12->13",
              "13->14",
              "4->15",
              "4->16",
              "15->17",
              "15->18",
              "18->19",
              "18->20",
              "14->21",
              "14->22",
              "5->23",
              "23->24",
              "23->25",
              "6->26",
            ]);
          },
          ThreeGraph: function () {
            return e.Utils.parse(["1->2", "2->3", "3->1"]);
          },
          BinaryTree: function (n) {
            return (
              i.isUndefined(n) && (n = 5), e.Utils.createBalancedTree(n, 2)
            );
          },
          Linear: function (n) {
            return (
              i.isUndefined(n) && (n = 10), e.Utils.createBalancedTree(n, 1)
            );
          },
          Tree: function (n, t) {
            return e.Utils.createBalancedTree(n, t);
          },
          Forest: function (n, t, i) {
            return e.Utils.createBalancedForest(n, t, i);
          },
          Workflow: function () {
            return e.Utils.parse([
              "0->1",
              "1->2",
              "2->3",
              "1->4",
              "4->3",
              "3->5",
              "5->6",
              "6->3",
              "6->7",
              "5->4",
            ]);
          },
          Grid: function (n, t) {
            var i,
              e,
              u,
              f,
              o,
              r = new v.Graph();
            if (n <= 0 && t <= 0) return r;
            for (i = 0; i < n + 1; i++)
              for (e = null, u = 0; u < t + 1; u++)
                (f = new c("" + i + "." + u)),
                  r.addNode(f),
                  e && r.addLink(e, f),
                  i > 0 &&
                    ((o = r.getNode("" + (i - 1) + "." + u)), r.addLink(o, f)),
                  (e = f);
            return r;
          },
        };
        e.Utils = {
          parse: function (n) {
            for (
              var r,
                t,
                e,
                s = new v.Graph(),
                h = n.slice(),
                f = 0,
                o = h.length;
              f < o;
              f++
            ) {
              if (((t = h[f]), i.isString(t))) {
                if (t.indexOf("->") < 0)
                  throw "The link should be specified as 'a->b'.";
                if (((e = t.split("->")), 2 != e.length))
                  throw "The link should be specified as 'a->b'.";
                r = new b(e[0], e[1]);
                s.addLink(r);
              }
              if (i.isObject(t)) {
                if (!r) throw "Specification found before Link definition.";
                u.deepExtend(r, t);
              }
            }
            return s;
          },
          linearize: function (n, t) {
            var r, u, e, f;
            if (i.isUndefined(n))
              throw "Expected an instance of a Graph object in slot one.";
            for (
              i.isUndefined(t) && (t = !1), r = [], u = 0, e = n.links.length;
              u < e;
              u++
            )
              (f = n.links[u]),
                r.push(f.source.id + "->" + f.target.id),
                t && r.push({ id: f.id });
            return r;
          },
          _addShape: function (n, t, r, f) {
            return (
              i.isUndefined(t) && (t = new v.Point(0, 0)),
              i.isUndefined(r) && (r = p()),
              (f = u.deepExtend(
                {
                  width: 20,
                  height: 20,
                  id: r,
                  radius: 10,
                  fill: "#778899",
                  data: "circle",
                  undoable: !1,
                  x: t.x,
                  y: t.y,
                },
                f
              )),
              n.addShape(f)
            );
          },
          _addConnection: function (n, t, i, r) {
            return n.connect(t, i, r);
          },
          createDiagramFromGraph: function (n, t, e, o) {
            var g, nt, c, s, l, a, tt, v, b, h, y, p, k, d, it, w;
            if (i.isUndefined(n)) throw "The diagram surface is undefined.";
            if (i.isUndefined(t)) throw "No graph specification defined.";
            for (
              i.isUndefined(e) && (e = !0),
                i.isUndefined(o) && (o = !1),
                g = n.element.clientWidth || 200,
                nt = n.element.clientHeight || 200,
                c = [],
                a = 0,
                tt = t.nodes.length;
              a < tt;
              a++
            )
              (s = t.nodes[a]),
                (v = s.position),
                i.isUndefined(v) &&
                  (v =
                    i.isDefined(s.x) && i.isDefined(s.y)
                      ? new r(s.x, s.y)
                      : new r(
                          i.randomInteger(10, g - 20),
                          i.randomInteger(10, nt - 20)
                        )),
                (b = {}),
                "0" === s.id ||
                  (o &&
                    u.deepExtend(b, {
                      width: 150 * Math.random() + 20,
                      height: 80 * Math.random() + 50,
                      data: "rectangle",
                      fill: { color: "#778899" },
                    })),
                (l = this._addShape(n, v, s.id, b)),
                (h = l.bounds()),
                i.isDefined(h) &&
                  ((s.x = h.x),
                  (s.y = h.y),
                  (s.width = h.width),
                  (s.height = h.height)),
                (c[s.id] = l);
            for (y = 0; y < t.links.length; y++)
              (p = t.links[y]),
                (k = c[p.source.id]),
                i.isUndefined(k) ||
                  ((d = c[p.target.id]),
                  i.isUndefined(d) ||
                    this._addConnection(n, k, d, { id: p.id }));
            if (e)
              for (
                it = new n.SpringLayout(n),
                  it.layoutGraph(t, { limitToView: !1 }),
                  w = 0;
                w < t.nodes.length;
                w++
              )
                (s = t.nodes[w]),
                  (l = c[s.id]),
                  l.bounds(new f(s.x, s.y, s.width, s.height));
          },
          createBalancedTree: function (n, t) {
            var r, o, u, s, f, h, e, y, l, a;
            if (
              (i.isUndefined(n) && (n = 3),
              i.isUndefined(t) && (t = 3),
              (r = new v.Graph()),
              (o = -1),
              (u = []),
              n <= 0 || t <= 0)
            )
              return r;
            for (
              f = new c("" + ++o), r.addNode(f), r.root = f, u.push(f), h = 0;
              h < n;
              h++
            ) {
              for (s = [], e = 0; e < u.length; e++)
                for (y = u[e], l = 0; l < t; l++)
                  (a = new c("" + ++o)), r.addLink(y, a), s.push(a);
              u = s;
            }
            return r;
          },
          createBalancedForest: function (n, t, r) {
            var u, o, f, s, h, l, a, e, w, y, p;
            if (
              (i.isUndefined(n) && (n = 3),
              i.isUndefined(t) && (t = 3),
              i.isUndefined(r) && (r = 5),
              (u = new v.Graph()),
              (o = -1),
              (f = []),
              n <= 0 || t <= 0 || r <= 0)
            )
              return u;
            for (h = 0; h < r; h++)
              for (
                l = new c("" + ++o), u.addNode(l), f = [l], a = 0;
                a < n;
                a++
              ) {
                for (s = [], e = 0; e < f.length; e++)
                  for (w = f[e], y = 0; y < t; y++)
                    (p = new c("" + ++o)), u.addLink(w, p), s.push(p);
                f = s;
              }
            return u;
          },
          createRandomConnectedGraph: function (n, t, r) {
            var u, l, a, f, s, y, p, h, e, o;
            if (
              (i.isUndefined(n) && (n = 40),
              i.isUndefined(t) && (t = 4),
              i.isUndefined(r) && (r = !1),
              (u = new v.Graph()),
              (l = -1),
              n <= 0) ||
              ((a = new c("" + ++l)), u.addNode(a), 1 === n)
            )
              return u;
            if (n > 1) {
              for (f = 1; f < n && ((s = u.takeRandomNode([], t)), s); f++)
                (y = u.addNode("" + f)), u.addLink(s, y);
              if (!r && n > 1)
                for (p = i.randomInteger(1, n), h = 0; h < p; h++)
                  (e = u.takeRandomNode([], t)),
                    (o = u.takeRandomNode([], t)),
                    e && o && !u.areConnected(e, o) && u.addLink(e, o);
              return u;
            }
          },
          randomDiagram: function (n, t, i, r, f) {
            var o = u.dataviz.diagram.Graph.Utils.createRandomConnectedGraph(
              t,
              i,
              r
            );
            e.Utils.createDiagramFromGraph(n, o, !1, f);
          },
        };
        u.deepExtend(v, {
          init: function (n) {
            u.init(n, v.ui);
          },
          Point: r,
          Intersect: l,
          Geometry: et,
          Rect: f,
          Size: k,
          RectAlign: ft,
          Matrix: s,
          MatrixVector: nt,
          normalVariable: ht,
          randomId: p,
          Dictionary: h,
          HashTable: w,
          Queue: tt,
          Set: ot,
          Node: c,
          Link: b,
          Graph: e,
          PathDefiner: ut,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/diagram/svg.min",
      ["kendo.drawing.min", "dataviz/diagram/math.min"],
      n
    );
  })(
    function () {
      !(function (n, t) {
        function ni(n, t) {
          for (var i, r, f = this.options, e = !1, u = 0; u < t.length; u++)
            (r = t[u]),
              (i = n[r]),
              tt(i) && f[r] !== i && ((f[r] = i), (e = !0));
          return e;
        }
        function ti(n) {
          return {
            x: n.x || 0,
            y: n.y || 0,
            width: n.width || 0,
            height: n.height || 0,
          };
        }
        function b(n) {
          if (n) {
            var t = n;
            return (
              pt(t) && (t = { color: t }), t.color && (t.color = st(t.color)), t
            );
          }
        }
        function st(n) {
          return n != wt ? new i.Color(n).toHex() : n;
        }
        function hi(n, t) {
          var r = t.x - n.x,
            u = t.y - n.y;
          return i.util.deg(Math.atan2(u, r));
        }
        function l(n, t) {
          return new i.Segment(new e.Point(n, t));
        }
        function ii(n) {
          if (n) return new e.Rect([n.x, n.y], [n.width, n.height]);
        }
        var k,
          a,
          o,
          it,
          d,
          h,
          r,
          ht,
          ri,
          rt,
          ct,
          lt,
          ut,
          ft,
          at,
          vt,
          ui,
          g,
          fi,
          yt,
          ei,
          s = window.kendo,
          c = s.dataviz.diagram,
          y = s.Class,
          f = s.deepExtend,
          p = c.Point,
          nt = c.Rect,
          w = c.Matrix,
          oi = c.Utils,
          tt = oi.isNumber,
          pt = oi.isString,
          ci = c.MatrixVector,
          e = s.geometry,
          i = s.drawing,
          u = i.util.defined,
          si = n.inArray,
          wt = "transparent",
          et = {
            none: "none",
            arrowStart: "ArrowStart",
            filledCircle: "FilledCircle",
            arrowEnd: "ArrowEnd",
          },
          li = 360,
          v = "start",
          ot = "end",
          bt = "width",
          kt = "height",
          dt = "x",
          gt = "y";
        c.Markers = et;
        k = y.extend({
          init: function (n, t) {
            this.x = n;
            this.y = t;
          },
          toMatrix: function () {
            return w.scaling(this.x, this.y);
          },
          toString: function () {
            return s.format("scale({0},{1})", this.x, this.y);
          },
          invert: function () {
            return new k(1 / this.x, 1 / this.y);
          },
        });
        a = y.extend({
          init: function (n, t) {
            this.x = n;
            this.y = t;
          },
          toMatrixVector: function () {
            return new ci(0, 0, 0, 0, this.x, this.y);
          },
          toMatrix: function () {
            return w.translation(this.x, this.y);
          },
          toString: function () {
            return s.format("translate({0},{1})", this.x, this.y);
          },
          plus: function (n) {
            this.x += n.x;
            this.y += n.y;
          },
          times: function (n) {
            this.x *= n;
            this.y *= n;
          },
          length: function () {
            return Math.sqrt(this.x * this.x + this.y * this.y);
          },
          normalize: function () {
            0 !== this.Length && this.times(1 / this.length());
          },
          invert: function () {
            return new a(-this.x, -this.y);
          },
        });
        o = y.extend({
          init: function (n, t, i) {
            this.x = t || 0;
            this.y = i || 0;
            this.angle = n;
          },
          toString: function () {
            return this.x && this.y
              ? s.format("rotate({0},{1},{2})", this.angle, this.x, this.y)
              : s.format("rotate({0})", this.angle);
          },
          toMatrix: function () {
            return w.rotation(this.angle, this.x, this.y);
          },
          center: function () {
            return new p(this.x, this.y);
          },
          invert: function () {
            return new o(li - this.angle, this.x, this.y);
          },
        });
        o.ZERO = new o(0);
        o.create = function (n) {
          return new o(n.angle, n.x, n.y);
        };
        o.parse = function (n) {
          var t = n.slice(1, n.length - 1).split(","),
            i = t[0],
            r = t[1],
            u = t[2];
          return new o(i, r, u);
        };
        it = y.extend({
          init: function (n, i, r, u, f, e) {
            this.translate = new a(n, i);
            r !== t && u !== t && (this.scale = new k(r, u));
            f !== t && (this.rotate = e ? new o(f, e.x, e.y) : new o(f));
          },
          toString: function () {
            var n = function (n) {
              return n ? "" + n : "";
            };
            return n(this.translate) + n(this.rotate) + n(this.scale);
          },
          render: function (n) {
            n._transform = this;
            n._renderTransform();
          },
          toMatrix: function () {
            var n = w.unit();
            return (
              this.translate && (n = n.times(this.translate.toMatrix())),
              this.rotate && (n = n.times(this.rotate.toMatrix())),
              this.scale && (n = n.times(this.scale.toMatrix())),
              n
            );
          },
          invert: function () {
            var f,
              n,
              r = this.rotate ? this.rotate.invert() : t,
              e = r ? r.toMatrix() : w.unit(),
              u = this.scale ? this.scale.invert() : t,
              o = u ? u.toMatrix() : w.unit(),
              i = new p(-this.translate.x, -this.translate.y);
            return (
              (i = e.times(o).apply(i)),
              (f = new a(i.x, i.y)),
              (n = new it()),
              (n.translate = f),
              (n.rotate = r),
              (n.scale = u),
              n
            );
          },
        });
        d = {
          _setScale: function () {
            var i = this.options,
              r = this._originWidth,
              u = this._originHeight,
              n = i.width / r,
              t = i.height / u;
            tt(n) || (n = 1);
            tt(t) || (t = 1);
            this._transform.scale = new k(n, t);
          },
          _setTranslate: function () {
            var n = this.options,
              t = n.x || 0,
              i = n.y || 0;
            this._transform.translate = new a(t, i);
          },
          _initSize: function () {
            var n = this.options,
              t = !1;
            n.autoSize !== !1 &&
              (u(n.width) || u(n.height)) &&
              (this._measure(!0), this._setScale(), (t = !0));
            (u(n.x) || u(n.y)) && (this._setTranslate(), (t = !0));
            t && this._renderTransform();
          },
          _updateSize: function (n) {
            var t = !1;
            return (
              this.options.autoSize !== !1 &&
                this._diffNumericOptions(n, [bt, kt]) &&
                ((t = !0), this._measure(!0), this._setScale()),
              this._diffNumericOptions(n, [dt, gt]) &&
                ((t = !0), this._setTranslate()),
              t && this._renderTransform(),
              t
            );
          },
        };
        h = y.extend({
          init: function (n) {
            var t = this;
            t.options = f({}, t.options, n);
            t.id = t.options.id;
            t._originSize = nt.empty();
            t._transform = new it();
          },
          visible: function (n) {
            return this.drawingContainer().visible(n);
          },
          redraw: function (n) {
            n && n.id && (this.id = n.id);
          },
          position: function (n, i) {
            var r = this.options;
            return u(n)
              ? (u(i)
                  ? ((r.x = n), (r.y = i))
                  : n instanceof p && ((r.x = n.x), (r.y = n.y)),
                (this._transform.translate = new a(r.x, r.y)),
                this._renderTransform(),
                t)
              : new p(r.x, r.y);
          },
          rotate: function (n, t) {
            return (
              u(n) &&
                ((this._transform.rotate = new o(n, t.x, t.y)),
                this._renderTransform()),
              this._transform.rotate || o.ZERO
            );
          },
          drawingContainer: function () {
            return this.drawingElement;
          },
          _renderTransform: function () {
            var n = this._transform.toMatrix();
            this.drawingContainer().transform(
              new e.Matrix(n.a, n.b, n.c, n.d, n.e, n.f)
            );
          },
          _hover: function () {},
          _diffNumericOptions: ni,
          _measure: function (n) {
            var t, i, r;
            return (
              !this._measured || n
                ? ((i = this._boundingBox() || new e.Rect()),
                  (r = i.topLeft()),
                  (t = new nt(r.x, r.y, i.width(), i.height())),
                  (this._originSize = t),
                  (this._originWidth = t.width),
                  (this._originHeight = t.height),
                  (this._measured = !0))
                : (t = this._originSize),
              t
            );
          },
          _boundingBox: function () {
            return this.drawingElement.rawBBox();
          },
        });
        r = h.extend({
          init: function (n) {
            h.fn.init.call(this, n);
            n = this.options;
            n.fill = b(n.fill);
            n.stroke = b(n.stroke);
          },
          options: { stroke: { color: "gray", width: 1 }, fill: { color: wt } },
          fill: function (n, t) {
            this._fill({ color: st(n), opacity: t });
          },
          stroke: function (n, t, i) {
            this._stroke({ color: st(n), width: t, opacity: i });
          },
          redraw: function (n) {
            var t, i;
            n &&
              ((t = n.stroke),
              (i = n.fill),
              t && this._stroke(b(t)),
              i && this._fill(b(i)),
              h.fn.redraw.call(this, n));
          },
          _hover: function (n) {
            var t,
              u = this.drawingElement,
              r = this.options,
              i = r.hover;
            i &&
              i.fill &&
              ((t = n ? b(i.fill) : r.fill), u.fill(t.color, t.opacity));
          },
          _stroke: function (n) {
            var t,
              i = this.options;
            f(i, { stroke: n });
            n = i.stroke;
            t = null;
            n.width > 0 &&
              (t = {
                color: n.color,
                width: n.width,
                opacity: n.opacity,
                dashType: n.dashType,
              });
            this.drawingElement.options.set("stroke", t);
          },
          _fill: function (n) {
            var t,
              r,
              u,
              e = this.options;
            f(e, { fill: n || {} });
            t = e.fill;
            t.gradient
              ? ((r = t.gradient),
                (u = "radial" === r.type ? i.RadialGradient : i.LinearGradient),
                this.drawingElement.fill(new u(r)))
              : this.drawingElement.fill(t.color, t.opacity);
          },
        });
        ht = r.extend({
          init: function (n) {
            n = this._textColor(n);
            r.fn.init.call(this, n);
            this._font();
            this._initText();
            this._initSize();
          },
          options: {
            fontSize: 15,
            fontFamily: "sans-serif",
            stroke: { width: 0 },
            fill: { color: "black" },
            autoSize: !0,
          },
          _initText: function () {
            var n = this.options;
            this.drawingElement = new i.Text(
              u(n.text) ? n.text : "",
              new e.Point(),
              { font: n.font }
            );
            this._fill();
            this._stroke();
          },
          _textColor: function (n) {
            return (
              n && n.color && (n = f({}, n, { fill: { color: n.color } })), n
            );
          },
          _font: function () {
            var t,
              n = this.options;
            n.fontFamily && u(n.fontSize)
              ? ((t = []),
                n.fontStyle && t.push(n.fontStyle),
                n.fontWeight && t.push(n.fontWeight),
                t.push(n.fontSize + (tt(n.fontSize) ? "px" : "")),
                t.push(n.fontFamily),
                (n.font = t.join(" ")))
              : delete n.font;
          },
          content: function (n) {
            return this.drawingElement.content(n);
          },
          redraw: function (n) {
            var t, i;
            n &&
              ((t = !1),
              (i = this.options),
              (n = this._textColor(n)),
              r.fn.redraw.call(this, n),
              (n.fontFamily || u(n.fontSize) || n.fontStyle || n.fontWeight) &&
                (f(i, {
                  fontFamily: n.fontFamily,
                  fontSize: n.fontSize,
                  fontStyle: n.fontStyle,
                  fontWeight: n.fontWeight,
                }),
                this._font(),
                this.drawingElement.options.set("font", i.font),
                (t = !0)),
              n.text && (this.content(n.text), (t = !0)),
              !this._updateSize(n) && t && this._initSize());
          },
        });
        f(ht.fn, d);
        ri = r.extend({
          init: function (n) {
            r.fn.init.call(this, n);
            this._initPath();
            this._setPosition();
          },
          _setPosition: function () {
            var n = this.options,
              t = n.x,
              i = n.y;
            (u(t) || u(i)) && this.position(t || 0, i || 0);
          },
          redraw: function (n) {
            n &&
              (r.fn.redraw.call(this, n),
              this._diffNumericOptions(n, [bt, kt]) && this._drawPath(),
              this._diffNumericOptions(n, [dt, gt]) && this._setPosition());
          },
          _initPath: function () {
            var n = this.options;
            this.drawingElement = new i.Path({ stroke: n.stroke, closed: !0 });
            this._fill();
            this._drawPath();
          },
          _drawPath: function () {
            var r = this.drawingElement,
              n = ti(this.options),
              t = n.width,
              i = n.height;
            r.segments.elements([l(0, 0), l(t, 0), l(t, i), l(0, i)]);
          },
        });
        rt = r.extend({
          init: function (n) {
            r.fn.init.call(this, n);
            var t = this.options.anchor;
            this.anchor = new e.Point(t.x, t.y);
            this.createElement();
          },
          options: {
            stroke: { color: wt, width: 0 },
            fill: { color: "black" },
          },
          _transformToPath: function (n, t) {
            var i = t.transform();
            return n && i && (n = n.transformCopy(i)), n;
          },
          redraw: function (n) {
            n &&
              (n.position && (this.options.position = n.position),
              r.fn.redraw.call(this, n));
          },
        });
        ct = rt.extend({
          options: { radius: 4, anchor: { x: 0, y: 0 } },
          createElement: function () {
            var n = this.options;
            this.drawingElement = new i.Circle(
              new e.Circle(this.anchor, n.radius),
              { fill: n.fill, stroke: n.stroke }
            );
          },
          positionMarker: function (n) {
            var t,
              i,
              u = this.options,
              f = u.position,
              r = n.segments;
            t = f == v ? r[0] : r[r.length - 1];
            t &&
              ((i = this._transformToPath(t.anchor(), n)),
              this.drawingElement.transform(e.transform().translate(i.x, i.y)));
          },
        });
        lt = rt.extend({
          options: {
            path: "M 0 0 L 10 5 L 0 10 L 3 5 z",
            anchor: { x: 10, y: 5 },
          },
          createElement: function () {
            var n = this.options;
            this.drawingElement = i.Path.parse(n.path, {
              fill: n.fill,
              stroke: n.stroke,
            });
          },
          positionMarker: function (n) {
            var i,
              r,
              f = this._linePoints(n),
              o = f.start,
              t = f.end,
              u = e.transform();
            o && u.rotate(hi(o, t), t);
            t &&
              ((i = this.anchor),
              (r = t.clone().translate(-i.x, -i.y)),
              u.translate(r.x, r.y));
            this.drawingElement.transform(u);
          },
          _linePoints: function (n) {
            var i,
              u,
              t,
              f,
              e,
              o = this.options,
              r = n.segments;
            if (
              (o.position == v
                ? ((t = r[0]),
                  t &&
                    ((u = t.anchor()),
                    (i = t.controlOut()),
                    (f = r[1]),
                    !i && f && (i = f.anchor())))
                : ((t = r[r.length - 1]),
                  t &&
                    ((u = t.anchor()),
                    (i = t.controlIn()),
                    (e = r[r.length - 2]),
                    !i && e && (i = e.anchor()))),
              u)
            )
              return {
                start: this._transformToPath(i, n),
                end: this._transformToPath(u, n),
              };
          },
        });
        ut = {
          _getPath: function (n) {
            var t = this.drawingElement;
            if (
              (t instanceof i.MultiPath &&
                (t = n == v ? t.paths[0] : t.paths[t.paths.length - 1]),
              t && t.segments.length)
            )
              return t;
          },
          _normalizeMarkerOptions: function (n) {
            var t = n.startCap,
              i = n.endCap;
            pt(t) && (n.startCap = { type: t });
            pt(i) && (n.endCap = { type: i });
          },
          _removeMarker: function (n) {
            var t = this._markers[n];
            t &&
              (this.drawingContainer().remove(t.drawingElement),
              delete this._markers[n]);
          },
          _createMarkers: function () {
            var n = this.options;
            this._normalizeMarkerOptions(n);
            this._markers = {};
            this._markers[v] = this._createMarker(n.startCap, v);
            this._markers[ot] = this._createMarker(n.endCap, ot);
          },
          _createMarker: function (n, i) {
            var r,
              u,
              e = (n || {}).type,
              o = this._getPath(i);
            return o
              ? (e == et.filledCircle
                  ? (r = ct)
                  : e == et.arrowStart || e == et.arrowEnd
                  ? (r = lt)
                  : this._removeMarker(i),
                r
                  ? ((u = new r(f({}, n, { position: i }))),
                    u.positionMarker(o),
                    this.drawingContainer().append(u.drawingElement),
                    u)
                  : t)
              : (this._removeMarker(i), t);
          },
          _positionMarker: function (n) {
            var t,
              i = this._markers[n];
            i &&
              ((t = this._getPath(n)),
              t ? i.positionMarker(t) : this._removeMarker(n));
          },
          _capMap: { start: "startCap", end: "endCap" },
          _redrawMarker: function (n, t, i) {
            var u, r, s, e, o;
            return (
              this._normalizeMarkerOptions(i),
              (u = this.options),
              (r = this._capMap[t]),
              (s = (u[r] || {}).type),
              (e = i[r]),
              (o = !1),
              e
                ? ((u[r] = f({}, u[r], e)),
                  e.type && s != e.type
                    ? (this._removeMarker(t),
                      (this._markers[t] = this._createMarker(u[r], t)),
                      (o = !0))
                    : this._markers[t] && this._markers[t].redraw(e))
                : n &&
                  !this._markers[t] &&
                  u[r] &&
                  ((this._markers[t] = this._createMarker(u[r], t)), (o = !0)),
              o
            );
          },
          _redrawMarkers: function (n, t) {
            !this._redrawMarker(n, v, t) && n && this._positionMarker(v);
            !this._redrawMarker(n, ot, t) && n && this._positionMarker(ot);
          },
        };
        ft = r.extend({
          init: function (n) {
            r.fn.init.call(this, n);
            this.container = new i.Group();
            this._createElements();
            this._initSize();
          },
          options: { autoSize: !0 },
          drawingContainer: function () {
            return this.container;
          },
          data: function (n) {
            var i = this.options;
            return n
              ? (i.data != n &&
                  ((i.data = n),
                  this._setData(n),
                  this._initSize(),
                  this._redrawMarkers(!0, {})),
                t)
              : i.data;
          },
          redraw: function (n) {
            var i, t;
            n &&
              (r.fn.redraw.call(this, n),
              (i = this.options),
              (t = n.data),
              u(t) && i.data != t
                ? ((i.data = t),
                  this._setData(t),
                  this._updateSize(n) || this._initSize(),
                  this._redrawMarkers(!0, n))
                : (this._updateSize(n), this._redrawMarkers(!1, n)));
          },
          _createElements: function () {
            var n = this.options;
            this.drawingElement = i.Path.parse(n.data || "", {
              stroke: n.stroke,
            });
            this._fill();
            this.container.append(this.drawingElement);
            this._createMarkers();
          },
          _setData: function (n) {
            var r = this.drawingElement,
              t = i.Path.parse(n || ""),
              u = t.paths.slice(0);
            t.paths.elements([]);
            r.paths.elements(u);
          },
        });
        f(ft.fn, d);
        f(ft.fn, ut);
        at = r.extend({
          init: function (n) {
            r.fn.init.call(this, n);
            this.container = new i.Group();
            this._initPath();
            this._createMarkers();
          },
          drawingContainer: function () {
            return this.container;
          },
          redraw: function (n) {
            var t, i;
            n &&
              ((n = n || {}),
              (t = n.from),
              (i = n.to),
              t && (this.options.from = t),
              i && (this.options.to = i),
              t || i
                ? (this._drawPath(), this._redrawMarkers(!0, n))
                : this._redrawMarkers(!1, n),
              r.fn.redraw.call(this, n));
          },
          _initPath: function () {
            var n = this.options,
              t = (this.drawingElement = new i.Path({ stroke: n.stroke }));
            this._fill();
            this._drawPath();
            this.container.append(t);
          },
          _drawPath: function () {
            var n = this.options,
              r = this.drawingElement,
              t = n.from || new p(),
              i = n.to || new p();
            r.segments.elements([l(t.x, t.y), l(i.x, i.y)]);
          },
        });
        f(at.fn, ut);
        vt = r.extend({
          init: function (n) {
            r.fn.init.call(this, n);
            this.container = new i.Group();
            this._initPath();
            this._createMarkers();
          },
          drawingContainer: function () {
            return this.container;
          },
          points: function (n) {
            var i = this.options;
            return n ? ((i.points = n), this._updatePath(), t) : i.points;
          },
          redraw: function (n) {
            if (n) {
              var t = n.points;
              r.fn.redraw.call(this, n);
              t && this._pointsDiffer(t)
                ? (this.points(t), this._redrawMarkers(!0, n))
                : this._redrawMarkers(!1, n);
            }
          },
          _initPath: function () {
            var n = this.options;
            this.drawingElement = new i.Path({ stroke: n.stroke });
            this._fill();
            this.container.append(this.drawingElement);
            n.points && this._updatePath();
          },
          _pointsDiffer: function (n) {
            var t,
              i = this.options.points,
              r = i.length !== n.length;
            if (!r)
              for (t = 0; t < n.length; t++)
                if (i[t].x !== n[t].x || i[t].y !== n[t].y) {
                  r = !0;
                  break;
                }
            return r;
          },
          _updatePath: function () {
            for (
              var t,
                u = this.drawingElement,
                f = this.options,
                i = f.points,
                r = [],
                n = 0;
              n < i.length;
              n++
            )
              (t = i[n]), r.push(l(t.x, t.y));
            u.segments.elements(r);
          },
          options: { points: [] },
        });
        f(vt.fn, ut);
        ui = h.extend({
          init: function (n) {
            h.fn.init.call(this, n);
            this._initImage();
          },
          redraw: function (n) {
            n &&
              (n.source && this.drawingElement.src(n.source),
              this._diffNumericOptions(n, [bt, kt, dt, gt]) &&
                this.drawingElement.rect(this._rect()),
              h.fn.redraw.call(this, n));
          },
          _initImage: function () {
            var n = this.options,
              t = this._rect();
            this.drawingElement = new i.Image(n.source, t, {});
          },
          _rect: function () {
            var n = ti(this.options),
              t = new e.Point(n.x, n.y),
              i = new e.Size(n.width, n.height);
            return new e.Rect(t, i);
          },
        });
        g = h.extend({
          init: function (n) {
            this.children = [];
            h.fn.init.call(this, n);
            this.drawingElement = new i.Group();
            this._initSize();
          },
          options: { autoSize: !1 },
          append: function (n) {
            this.drawingElement.append(n.drawingContainer());
            this.children.push(n);
            this._childrenChange = !0;
          },
          remove: function (n) {
            this._remove(n) && (this._childrenChange = !0);
          },
          _remove: function (n) {
            var t = si(n, this.children);
            if (t >= 0)
              return (
                this.drawingElement.removeAt(t), this.children.splice(t, 1), !0
              );
          },
          clear: function () {
            this.drawingElement.clear();
            this.children = [];
            this._childrenChange = !0;
          },
          toFront: function (n) {
            for (var i, t = 0; t < n.length; t++)
              (i = n[t]), this._remove(i) && this.append(i);
          },
          toBack: function (n) {
            this._reorderChildren(n, 0);
          },
          toIndex: function (n, t) {
            this._reorderChildren(n, t);
          },
          _reorderChildren: function (n, t) {
            for (
              var r,
                e,
                h,
                u,
                f = this.drawingElement,
                o = f.children.slice(0),
                s = this.children,
                c = tt(t),
                i = 0;
              i < n.length;
              i++
            )
              (u = n[i]),
                (h = u.drawingContainer()),
                (r = si(u, s)),
                r >= 0 &&
                  (o.splice(r, 1),
                  s.splice(r, 1),
                  (e = c ? t : t[i]),
                  o.splice(e, 0, h),
                  s.splice(e, 0, u));
            f.clear();
            f.append.apply(f, o);
          },
          redraw: function (n) {
            n &&
              (this._childrenChange
                ? ((this._childrenChange = !1),
                  this._updateSize(n) || this._initSize())
                : this._updateSize(n),
              h.fn.redraw.call(this, n));
          },
          _boundingBox: function () {
            for (var n, t, i, u = this.children, r = 0; r < u.length; r++)
              (t = u[r]),
                t.visible() &&
                  t._includeInBBox !== !1 &&
                  ((i = t.drawingContainer().clippedBBox(null)),
                  i && (n = n ? e.Rect.union(n, i) : i));
            return n;
          },
        });
        f(g.fn, d);
        fi = g.extend({
          init: function (n, t) {
            this.children = [];
            h.fn.init.call(this, t);
            this.drawingElement = new i.Layout(ii(n), t);
            this._initSize();
          },
          rect: function (n) {
            if (n) this.drawingElement.rect(ii(n));
            else {
              var t = this.drawingElement.rect();
              if (t)
                return new nt(
                  t.origin.x,
                  t.origin.y,
                  t.size.width,
                  t.size.height
                );
            }
          },
          reflow: function () {
            this.drawingElement.reflow();
          },
          redraw: function (n) {
            s.deepExtend(this.drawingElement.options, n);
            g.fn.redraw.call(this, n);
          },
        });
        yt = r.extend({
          init: function (n) {
            r.fn.init.call(this, n);
            this._initCircle();
            this._initSize();
          },
          redraw: function (n) {
            if (n) {
              var t = this.options;
              n.center &&
                (f(t, { center: n.center }),
                this._center.move(t.center.x, t.center.y));
              this._diffNumericOptions(n, ["radius"]) &&
                this._circle.setRadius(t.radius);
              this._updateSize(n);
              r.fn.redraw.call(this, n);
            }
          },
          _initCircle: function () {
            var o,
              n = this.options,
              r = n.width,
              f = n.height,
              t = n.radius;
            u(t) ||
              (u(r) || (r = f),
              u(f) || (f = r),
              (n.radius = t = Math.min(r, f) / 2));
            o = n.center || { x: t, y: t };
            this._center = new e.Point(o.x, o.y);
            this._circle = new e.Circle(this._center, t);
            this.drawingElement = new i.Circle(this._circle, {
              stroke: n.stroke,
            });
            this._fill();
          },
        });
        f(yt.fn, d);
        ei = y.extend({
          init: function (n, t) {
            t = t || {};
            this.element = n;
            this.surface = i.Surface.create(n, t);
            s.isFunction(this.surface.translate) &&
              (this.translate = this._translate);
            this.drawingElement = new i.Group();
            this._viewBox = new nt(0, 0, t.width, t.height);
            this.size(this._viewBox);
          },
          bounds: function () {
            var n = this.drawingElement.clippedBBox();
            return new nt(0, 0, n.width(), n.height());
          },
          size: function (n) {
            var t = this._viewBox;
            return (
              u(n) &&
                ((t.width = n.width),
                (t.height = n.height),
                this.surface.setSize(n)),
              { width: t.width, height: t.height }
            );
          },
          _translate: function (n, t) {
            var i = this._viewBox;
            return (
              u(n) &&
                u(t) &&
                ((i.x = n), (i.y = t), this.surface.translate({ x: n, y: t })),
              { x: i.x, y: i.y }
            );
          },
          draw: function () {
            this.surface.draw(this.drawingElement);
          },
          append: function (n) {
            return this.drawingElement.append(n.drawingContainer()), this;
          },
          remove: function (n) {
            this.drawingElement.remove(n.drawingContainer());
          },
          insertBefore: function () {},
          clear: function () {
            this.drawingElement.clear();
          },
          destroy: function (t) {
            this.surface.destroy();
            t && n(this.element).remove();
          },
        });
        s.deepExtend(c, {
          init: function (n) {
            s.init(n, c.ui);
          },
          diffNumericOptions: ni,
          Element: h,
          Scale: k,
          Translation: a,
          Rotation: o,
          Circle: yt,
          Group: g,
          Rectangle: ri,
          Canvas: ei,
          Path: ft,
          Layout: fi,
          Line: at,
          MarkerBase: rt,
          ArrowMarker: lt,
          CircleMarker: ct,
          Polyline: vt,
          CompositeTransform: it,
          TextBlock: ht,
          Image: ui,
          VisualBase: r,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/diagram/services.min",
      ["kendo.drawing.min", "dataviz/diagram/svg.min"],
      n
    );
  })(
    function () {
      !(function (n, t) {
        function c(n, t) {
          return t.charCodeAt(0) == n || t.toUpperCase().charCodeAt(0) == n;
        }
        function ir(n, t) {
          var i;
          return (
            n.x == -1 && n.y == -1
              ? (i = t.bottomRight())
              : 1 == n.x && 1 == n.y
              ? (i = t.topLeft())
              : n.x == -1 && 1 == n.y
              ? (i = t.topRight())
              : 1 == n.x && n.y == -1
              ? (i = t.bottomLeft())
              : 0 === n.x && n.y == -1
              ? (i = t.bottom())
              : 0 === n.x && 1 == n.y
              ? (i = t.top())
              : 1 == n.x && 0 === n.y
              ? (i = t.left())
              : n.x == -1 && 0 === n.y && (i = t.right()),
            i
          );
        }
        function y(n) {
          var t = n.options.editable;
          return t && t.drag !== !1;
        }
        function rr(n, t) {
          for (var r, u, f, i = 0; i < n.connectors.length; i++)
            if (
              ((r = n.connectors[i]),
              (u = r.position()),
              (f = new o(u.x, u.y)),
              f.inflate(v, v),
              f.contains(t))
            )
              return r;
        }
        function wt(n) {
          return n.ctrlKey === !1 && n.altKey === !1 && n.shiftKey === !1;
        }
        var bt,
          kt,
          k,
          dt,
          gt,
          ni,
          ti,
          d,
          ii,
          ri,
          ui,
          g,
          fi,
          ei,
          oi,
          nt,
          tt,
          it,
          rt,
          ut,
          ft,
          si,
          w,
          p,
          hi,
          ci,
          l,
          li,
          ai,
          vi,
          yi,
          et,
          e = window.kendo,
          ur = e.dataviz,
          u = ur.diagram,
          r = e.Class,
          fr = u.Group,
          o = u.Rect,
          ot = u.Rectangle,
          a = u.Utils,
          er = a.isUndefined,
          i = u.Point,
          st = u.Circle,
          or = u.Ticker,
          f = e.deepExtend,
          sr = e.ui.Movable,
          pi = e.support.browser,
          wi = e.drawing.util,
          h = wi.defined,
          ht = n.inArray,
          bi = n.proxy,
          s = {
            arrow: "default",
            grip: "pointer",
            cross: "pointer",
            add: "pointer",
            move: "move",
            select: "pointer",
            south: "s-resize",
            east: "e-resize",
            west: "w-resize",
            north: "n-resize",
            rowresize: "row-resize",
            colresize: "col-resize",
          },
          v = 10,
          ki = "Auto",
          ct = "Top",
          di = "Right",
          lt = "Left",
          gi = "Bottom",
          hr = 10,
          cr = 10,
          at = "dragStart",
          vt = "drag",
          yt = "dragEnd",
          lr = "itemRotate",
          pt = "itemBoundsChange",
          ar = 5,
          vr = 5,
          yr = "mouseEnter",
          pr = "mouseLeave",
          wr = "zoomStart",
          br = "zoomEnd",
          kr = -2e4,
          dr = 2e4,
          gr = 0.9,
          nu = 0.93,
          tu = 5,
          nr = "transparent",
          iu = "pan",
          tr = "rotated",
          b = "target",
          ru = { "-1": "source", 1: b };
        u.Cursors = s;
        bt = e.Class.extend({
          init: function (n) {
            this.layoutState = n;
            this.diagram = n.diagram;
          },
          initState: function () {
            function n(n, t) {
              var i = this.diagram.getShapeById(n);
              i &&
                (this.subjects.push(i),
                this.froms.push(i.bounds().topLeft()),
                this.tos.push(t.topLeft()));
            }
            this.froms = [];
            this.tos = [];
            this.subjects = [];
            this.layoutState.nodeMap.forEach(n, this);
          },
          update: function (n) {
            if (!(this.subjects.length <= 0))
              for (var t = 0; t < this.subjects.length; t++)
                this.subjects[t].position(
                  new i(
                    this.froms[t].x + (this.tos[t].x - this.froms[t].x) * n,
                    this.froms[t].y + (this.tos[t].y - this.froms[t].y) * n
                  )
                );
          },
        });
        kt = r.extend({
          init: function (n, t, i) {
            this.animate = !er(i) && i;
            this._initialState = n;
            this._finalState = t;
            this.title = "Diagram layout";
          },
          undo: function () {
            this.setState(this._initialState);
          },
          redo: function () {
            this.setState(this._finalState);
          },
          setState: function (n) {
            var t,
              i = n.diagram;
            this.animate
              ? (n.linkMap.forEach(function (n, t) {
                  var r = i.getShapeById(n);
                  r.visible(!1);
                  r && r.points(t);
                }),
                (t = new or()),
                t.addAdapter(new bt(n)),
                t.onComplete(function () {
                  n.linkMap.forEach(function (n) {
                    var t = i.getShapeById(n);
                    t.visible(!0);
                  });
                }),
                t.play())
              : (n.nodeMap.forEach(function (n, t) {
                  var r = i.getShapeById(n);
                  r && r.position(t.topLeft());
                }),
                n.linkMap.forEach(function (n, t) {
                  var r = i.getShapeById(n);
                  r && r.points(t);
                }));
          },
        });
        k = r.extend({
          init: function (n) {
            this.units = [];
            this.title = "Composite unit";
            n !== t && this.units.push(n);
          },
          add: function (n) {
            this.units.push(n);
          },
          undo: function () {
            for (var n = 0; n < this.units.length; n++) this.units[n].undo();
          },
          redo: function () {
            for (var n = 0; n < this.units.length; n++) this.units[n].redo();
          },
        });
        dt = r.extend({
          init: function (n, t, i) {
            this.item = n;
            this._redoSource = t;
            this._redoTarget = i;
            h(t) && (this._undoSource = n.source());
            h(i) && (this._undoTarget = n.target());
            this.title = "Connection Editing";
          },
          undo: function () {
            this._undoSource !== t &&
              this.item._updateConnector(this._undoSource, "source");
            this._undoTarget !== t &&
              this.item._updateConnector(this._undoTarget, "target");
            this.item.updateModel();
          },
          redo: function () {
            this._redoSource !== t &&
              this.item._updateConnector(this._redoSource, "source");
            this._redoTarget !== t &&
              this.item._updateConnector(this._redoTarget, "target");
            this.item.updateModel();
          },
        });
        gt = r.extend({
          init: function (n, t, i) {
            this.item = n;
            this._undoSource = t;
            this._undoTarget = i;
            this._redoSource = n.source();
            this._redoTarget = n.target();
            this.title = "Connection Editing";
          },
          undo: function () {
            this.item._updateConnector(this._undoSource, "source");
            this.item._updateConnector(this._undoTarget, "target");
            this.item.updateModel();
          },
          redo: function () {
            this.item._updateConnector(this._redoSource, "source");
            this.item._updateConnector(this._redoTarget, "target");
            this.item.updateModel();
          },
        });
        ni = r.extend({
          init: function (n) {
            this.connection = n;
            this.diagram = n.diagram;
            this.targetConnector = n.targetConnector;
            this.title = "Delete connection";
          },
          undo: function () {
            this.diagram._addConnection(this.connection, !1);
          },
          redo: function () {
            this.diagram.remove(this.connection, !1);
          },
        });
        ti = r.extend({
          init: function (n) {
            this.shape = n;
            this.diagram = n.diagram;
            this.title = "Deletion";
          },
          undo: function () {
            this.diagram._addShape(this.shape, !1);
            this.shape.select(!1);
          },
          redo: function () {
            this.shape.select(!1);
            this.diagram.remove(this.shape, !1);
          },
        });
        d = r.extend({
          init: function (n, t, i) {
            var r, u;
            for (
              this.shapes = n,
                this.undoStates = t,
                this.title = "Transformation",
                this.redoStates = [],
                this.adorner = i,
                r = 0;
              r < this.shapes.length;
              r++
            )
              (u = this.shapes[r]), this.redoStates.push(u.bounds());
          },
          undo: function () {
            for (var t, n = 0; n < this.shapes.length; n++)
              (t = this.shapes[n]),
                t.bounds(this.undoStates[n]),
                t.hasOwnProperty("layout") &&
                  t.layout(t, this.redoStates[n], this.undoStates[n]),
                t.updateModel();
            this.adorner &&
              (this.adorner.refreshBounds(), this.adorner.refresh());
          },
          redo: function () {
            for (var t, n = 0; n < this.shapes.length; n++)
              (t = this.shapes[n]),
                t.bounds(this.redoStates[n]),
                t.hasOwnProperty("layout") &&
                  t.layout(t, this.undoStates[n], this.redoStates[n]),
                t.updateModel();
            this.adorner &&
              (this.adorner.refreshBounds(), this.adorner.refresh());
          },
        });
        ii = r.extend({
          init: function (n, t) {
            this.connection = n;
            this.diagram = t;
            this.title = "New connection";
          },
          undo: function () {
            this.diagram.remove(this.connection, !1);
          },
          redo: function () {
            this.diagram._addConnection(this.connection, !1);
          },
        });
        ri = r.extend({
          init: function (n, t) {
            this.shape = n;
            this.diagram = t;
            this.title = "New shape";
          },
          undo: function () {
            this.diagram.deselect();
            this.diagram.remove(this.shape, !1);
          },
          redo: function () {
            this.diagram._addShape(this.shape, !1);
          },
        });
        ui = r.extend({
          init: function (n, t, i) {
            this.initial = n;
            this.finalPos = t;
            this.diagram = i;
            this.title = "Pan Unit";
          },
          undo: function () {
            this.diagram.pan(this.initial);
          },
          redo: function () {
            this.diagram.pan(this.finalPos);
          },
        });
        g = r.extend({
          init: function (n, t, i) {
            var r, u;
            for (
              this.shapes = t,
                this.undoRotates = i,
                this.title = "Rotation",
                this.redoRotates = [],
                this.redoAngle = n._angle,
                this.adorner = n,
                this.center = n._innerBounds.center(),
                r = 0;
              r < this.shapes.length;
              r++
            )
              (u = this.shapes[r]), this.redoRotates.push(u.rotate().angle);
          },
          undo: function () {
            for (var n, t = 0; t < this.shapes.length; t++)
              (n = this.shapes[t]),
                n.rotate(this.undoRotates[t], this.center, !1),
                n.hasOwnProperty("layout") && n.layout(n),
                n.updateModel();
            this.adorner &&
              (this.adorner._initialize(), this.adorner.refresh());
          },
          redo: function () {
            for (var n, t = 0; t < this.shapes.length; t++)
              (n = this.shapes[t]),
                n.rotate(this.redoRotates[t], this.center, !1),
                n.hasOwnProperty("layout") && n.layout(n),
                n.updateModel();
            this.adorner &&
              (this.adorner._initialize(), this.adorner.refresh());
          },
        });
        fi = r.extend({
          init: function (n, t, i) {
            this.diagram = n;
            this.indices = i;
            this.items = t;
            this.title = "Rotate Unit";
          },
          undo: function () {
            this.diagram._toIndex(this.items, this.indices);
          },
          redo: function () {
            this.diagram.toFront(this.items, !1);
          },
        });
        ei = r.extend({
          init: function (n, t, i) {
            this.diagram = n;
            this.indices = i;
            this.items = t;
            this.title = "Rotate Unit";
          },
          undo: function () {
            this.diagram._toIndex(this.items, this.indices);
          },
          redo: function () {
            this.diagram.toBack(this.items, !1);
          },
        });
        oi = e.Observable.extend({
          init: function (n) {
            e.Observable.fn.init.call(this, n);
            this.bind(this.events, n);
            this.stack = [];
            this.index = 0;
            this.capacity = 100;
          },
          events: ["undone", "redone"],
          begin: function () {
            this.composite = new k();
          },
          cancel: function () {
            this.composite = t;
          },
          commit: function (n) {
            this.composite.units.length > 0 && this._restart(this.composite, n);
            this.composite = t;
          },
          addCompositeItem: function (n) {
            this.composite ? this.composite.add(n) : this.add(n);
          },
          add: function (n, t) {
            this._restart(n, t);
          },
          pop: function () {
            this.index > 0 && (this.stack.pop(), this.index--);
          },
          count: function () {
            return this.stack.length;
          },
          undo: function () {
            this.index > 0 &&
              (this.index--,
              this.stack[this.index].undo(),
              this.trigger("undone"));
          },
          redo: function () {
            this.stack.length > 0 &&
              this.index < this.stack.length &&
              (this.stack[this.index].redo(),
              this.index++,
              this.trigger("redone"));
          },
          _restart: function (n, t) {
            this.stack.splice(this.index, this.stack.length - this.index);
            this.stack.push(n);
            t !== !1 ? this.redo() : this.index++;
            this.stack.length > this.capacity &&
              (this.stack.splice(0, this.stack.length - this.capacity),
              (this.index = this.capacity));
          },
          clear: function () {
            this.stack = [];
            this.index = 0;
          },
        });
        nt = r.extend({
          init: function (n) {
            this.toolService = n;
          },
          start: function () {},
          move: function () {},
          end: function () {},
          tryActivate: function () {
            return !1;
          },
          getCursor: function () {
            return s.arrow;
          },
        });
        tt = nt.extend({
          init: function (t) {
            var r,
              f,
              u,
              o,
              i = this,
              s = e.support.mobileOS ? nu : gr;
            nt.fn.init.call(i, t);
            r = i.toolService.diagram;
            f = r.canvas;
            u =
              r.scroller =
              i.scroller =
                n(r.scrollable)
                  .kendoMobileScroller({
                    friction: s,
                    velocityMultiplier: tu,
                    mousewheelScrolling: !1,
                    zoom: !1,
                    scroll: bi(i._move, i),
                  })
                  .data("kendoMobileScroller");
            f.translate && (i.movableCanvas = new sr(f.element));
            o = function (n, t, i) {
              n.makeVirtual();
              n.virtualSize(t || kr, i || dr);
            };
            o(u.dimensions.x);
            o(u.dimensions.y);
            u.disable();
          },
          tryActivate: function (n, t) {
            var r = this.toolService,
              i = r.diagram.options.pannable,
              u = t.ctrlKey;
            return (
              h(i.key) &&
                (u =
                  i.key && "none" != i.key
                    ? t[i.key + "Key"]
                    : wt(t) && !h(r.hoveredItem)),
              i !== !1 && u && !h(r.hoveredAdorner) && !h(r._hoveredConnector)
            );
          },
          start: function () {
            this.scroller.enable();
          },
          move: function () {},
          _move: function (n) {
            var u = this,
              r = u.toolService.diagram,
              f = r.canvas,
              t = new i(n.scrollLeft, n.scrollTop);
            f.translate
              ? (r._storePan(t.times(-1)),
                u.movableCanvas.moveTo(t),
                f.translate(t.x, t.y))
              : (t = t.plus(r._pan.times(-1)));
            r.trigger(iu, { pan: t });
          },
          end: function () {
            this.scroller.disable();
          },
          getCursor: function () {
            return s.move;
          },
        });
        it = r.extend({
          init: function (n) {
            this.toolService = n;
          },
          tryActivate: function () {
            return !0;
          },
          start: function (n, t) {
            var i = this.toolService,
              u = i.diagram,
              r = i.hoveredItem;
            r &&
              (i.selectSingle(r, t),
              r.adorner &&
                ((this.adorner = r.adorner),
                (this.handle = this.adorner._hitTest(n))));
            this.handle ||
              ((this.handle = u._resizingAdorner._hitTest(n)),
              this.handle && (this.adorner = u._resizingAdorner));
            this.adorner &&
              (this.adorner.isDragHandle(this.handle) &&
              u.trigger(at, { shapes: this.adorner.shapes, connections: [] })
                ? ((i.startPoint = n), i.end(n))
                : this.adorner.start(n));
          },
          move: function (n) {
            this.adorner &&
              (this.adorner.move(this.handle, n),
              this.adorner.isDragHandle(this.handle) &&
                this.toolService.diagram.trigger(vt, {
                  shapes: this.adorner.shapes,
                  connections: [],
                }));
          },
          end: function () {
            var i,
              r = this.toolService.diagram,
              n = this.adorner;
            n &&
              (n.isDragHandle(this.handle) &&
              r.trigger(yt, { shapes: n.shapes, connections: [] })
                ? n.cancel()
                : ((i = n.stop()), i && r.undoRedoService.add(i, !1)));
            this.adorner = t;
            this.handle = t;
          },
          getCursor: function (n) {
            return this.toolService.hoveredItem
              ? this.toolService.hoveredItem._getCursor(n)
              : s.arrow;
          },
        });
        rt = r.extend({
          init: function (n) {
            this.toolService = n;
          },
          tryActivate: function (n, t) {
            var r = this.toolService,
              i = r.diagram.options.selectable,
              u = i && i.multiple !== !1;
            return (
              u && (u = i.key && "none" != i.key ? t[i.key + "Key"] : wt(t)),
              u && !h(r.hoveredItem) && !h(r.hoveredAdorner)
            );
          },
          start: function (n) {
            var t = this.toolService.diagram;
            t.deselect();
            t.selector.start(n);
          },
          move: function (n) {
            var t = this.toolService.diagram;
            t.selector.move(n);
          },
          end: function (n, t) {
            var i = this.toolService.diagram,
              r = this.toolService.hoveredItem,
              u = i.selector.bounds();
            (r && r.isSelected) || t.ctrlKey || i.deselect();
            u.isEmpty() || i.selectArea(u);
            i.selector.end();
          },
          getCursor: function () {
            return s.arrow;
          },
        });
        ut = r.extend({
          init: function (n) {
            this.toolService = n;
            this.type = "ConnectionTool";
          },
          tryActivate: function () {
            return this.toolService._hoveredConnector;
          },
          start: function (n, t) {
            var i = this.toolService,
              u = i.diagram,
              f = i._hoveredConnector,
              r = u._createConnection({}, f._c, n);
            y(r) &&
            !u.trigger(at, {
              shapes: [],
              connections: [r],
              connectionHandle: b,
            }) &&
            u._addConnection(r)
              ? (i._connectionManipulation(r, f._c.shape, !0),
                i._removeHover(),
                i.selectSingle(i.activeConnection, t),
                "touchmove" == t.type && (u._cachedTouchTarget = f.visual))
              : (r.source(null), i.end(n));
          },
          move: function (n) {
            var t = this.toolService,
              i = t.activeConnection;
            return (
              i.target(n),
              t.diagram.trigger(vt, {
                shapes: [],
                connections: [i],
                connectionHandle: b,
              }),
              !0
            );
          },
          end: function (n) {
            var o,
              r = this.toolService,
              t = r.diagram,
              i = r.activeConnection,
              f = r.hoveredItem,
              e = r._hoveredConnector,
              s = t._cachedTouchTarget;
            i &&
              ((o =
                e && e._c != i.sourceConnector
                  ? e._c
                  : f && f instanceof u.Shape
                  ? f.getConnector(ki) || f.getConnector(n)
                  : n),
              i.target(o),
              t.trigger(yt, {
                shapes: [],
                connections: [i],
                connectionHandle: b,
              })
                ? (t.remove(i, !1), t.undoRedoService.pop())
                : (i.updateModel(), t._syncConnectionChanges()),
              r._connectionManipulation(),
              s &&
                (t._connectorsAdorner.visual.remove(s),
                (t._cachedTouchTarget = null)));
          },
          getCursor: function () {
            return s.arrow;
          },
        });
        ft = r.extend({
          init: function (n) {
            this.toolService = n;
            this.type = "ConnectionTool";
          },
          tryActivate: function (n, t) {
            var r = this.toolService,
              f = r.diagram,
              e = f.options.selectable,
              i = r.hoveredItem,
              u = e !== !1 && i && i.path && !(i.isSelected && t.ctrlKey);
            return u && (this._c = i), u;
          },
          start: function (n, t) {
            var i,
              f,
              e,
              r = this.toolService,
              u = this._c;
            r.selectSingle(u, t);
            i = u.adorner;
            i && ((f = i._hitTest(n)), (e = ru[f]));
            y(u) &&
            i &&
            !r.diagram.trigger(at, {
              shapes: [],
              connections: [u],
              connectionHandle: e,
            })
              ? ((this.handle = f), (this.handleName = e), i.start(n))
              : ((r.startPoint = n), r.end(n));
          },
          move: function (n) {
            var t = this._c.adorner;
            if (y(this._c) && t)
              return (
                t.move(this.handle, n),
                this.toolService.diagram.trigger(vt, {
                  shapes: [],
                  connections: [this._c],
                  connectionHandle: this.handleName,
                }),
                !0
              );
          },
          end: function (n) {
            var i,
              t = this._c,
              u = t.adorner,
              f = this.toolService,
              r = f.diagram;
            u &&
              y(t) &&
              ((i = u.stop(n)),
              r.trigger(yt, {
                shapes: [],
                connections: [t],
                connectionHandle: this.handleName,
              })
                ? i.undo()
                : (r.undoRedoService.add(i, !1),
                  t.updateModel(),
                  r._syncConnectionChanges()));
          },
          getCursor: function () {
            return s.move;
          },
        });
        si = r.extend({
          init: function (n) {
            this.diagram = n;
            this.tools = [
              new tt(this),
              new ft(this),
              new ut(this),
              new rt(this),
              new it(this),
            ];
            this.activeTool = t;
          },
          start: function (n, t) {
            return (
              (t = f({}, t)),
              this.activeTool && this.activeTool.end(n, t),
              this._updateHoveredItem(n),
              this._activateTool(n, t),
              this.activeTool.start(n, t),
              this._updateCursor(n),
              this.diagram.focus(),
              this.diagram.canvas.surface.suspendTracking(),
              (this.startPoint = n),
              !0
            );
          },
          move: function (n, t) {
            t = f({}, t);
            var i = !0;
            return (
              this.activeTool && (i = this.activeTool.move(n, t)),
              i && this._updateHoveredItem(n),
              this._updateCursor(n),
              !0
            );
          },
          end: function (n, i) {
            return (
              (i = f({}, i)),
              this.activeTool && this.activeTool.end(n, i),
              this.diagram.canvas.surface.resumeTracking(),
              (this.activeTool = t),
              this._updateCursor(n),
              !0
            );
          },
          keyDown: function (n, t) {
            var r,
              i = this.diagram;
            if (
              ((t = f({ ctrlKey: !1, metaKey: !1, altKey: !1 }, t)),
              (t.ctrlKey || t.metaKey) && !t.altKey)
            ) {
              if (c(n, "a")) return i.selectAll(), i._destroyToolBar(), !0;
              if (c(n, "z")) return i.undo(), i._destroyToolBar(), !0;
              if (c(n, "y")) return i.redo(), i._destroyToolBar(), !0;
              c(n, "c")
                ? (i.copy(), i._destroyToolBar())
                : c(n, "x")
                ? (i.cut(), i._destroyToolBar())
                : c(n, "v")
                ? (i.paste(), i._destroyToolBar())
                : c(n, "l")
                ? (i.layout(), i._destroyToolBar())
                : c(n, "d") && (i._destroyToolBar(), i.copy(), i.paste());
            } else {
              if (46 === n || 8 === n)
                return (
                  (r = this.diagram._triggerRemove(i.select())),
                  r.length &&
                    (this.diagram.remove(r, !0),
                    this.diagram._syncChanges(),
                    this.diagram._destroyToolBar()),
                  !0
                );
              if (27 === n)
                return (
                  this._discardNewConnection(),
                  i.deselect(),
                  i._destroyToolBar(),
                  !0
                );
            }
          },
          wheel: function (n, t) {
            var r = this.diagram,
              s = t.delta,
              i = r.zoom(),
              f = r.options,
              o = f.zoomRate,
              u = { point: n, meta: t, zoom: i };
            if (!r.trigger(wr, u))
              return (
                s < 0 ? (i += o) : (i -= o),
                (i = e.dataviz.round(
                  Math.max(f.zoomMin, Math.min(f.zoomMax, i)),
                  2
                )),
                (u.zoom = i),
                r.zoom(i, u),
                r.trigger(br, u),
                !0
              );
          },
          setTool: function (n, t) {
            n.toolService = this;
            this.tools[t] = n;
          },
          selectSingle: function (n, t) {
            var i,
              r = this.diagram,
              u = r.options.selectable;
            u &&
              !n.isSelected &&
              n.options.selectable !== !1 &&
              ((i = t.ctrlKey && u.multiple !== !1),
              r.select(n, { addToSelection: i }));
          },
          _discardNewConnection: function () {
            this.newConnection &&
              (this.diagram.remove(this.newConnection),
              (this.newConnection = t));
          },
          _activateTool: function (n, t) {
            for (var r, i = 0; i < this.tools.length; i++)
              if (((r = this.tools[i]), r.tryActivate(n, t))) {
                this.activeTool = r;
                break;
              }
          },
          _updateCursor: function (n) {
            var t = this.diagram.element,
              i = this.activeTool
                ? this.activeTool.getCursor(n)
                : this.hoveredAdorner
                ? this.hoveredAdorner._getCursor(n)
                : this.hoveredItem
                ? this.hoveredItem._getCursor(n)
                : s.arrow;
            t.css({ cursor: i });
            pi.msie &&
              7 == pi.version &&
              (t[0].style.cssText = t[0].style.cssText);
          },
          _connectionManipulation: function (n, i, r) {
            this.activeConnection = n;
            this.disabledShape = i;
            this.newConnection = r ? this.activeConnection : t;
          },
          _updateHoveredItem: function (n) {
            var i = this._hitTest(n),
              r = this.diagram;
            i == this.hoveredItem ||
              (this.disabledShape && i == this.disabledShape) ||
              (this.hoveredItem &&
                (r.trigger(pr, { item: this.hoveredItem }),
                this.hoveredItem._hover(!1)),
              i && i.options.enable
                ? (r.trigger(yr, { item: i }),
                  (this.hoveredItem = i),
                  this.hoveredItem._hover(!0))
                : (this.hoveredItem = t));
          },
          _removeHover: function () {
            this.hoveredItem &&
              (this.hoveredItem._hover(!1), (this.hoveredItem = t));
          },
          _hitTest: function (n) {
            var i,
              e,
              f,
              o,
              r = this.diagram;
            if (
              (this._hoveredConnector &&
                (this._hoveredConnector._hover(!1),
                (this._hoveredConnector = t)),
              r._connectorsAdorner._visible &&
                (i = r._connectorsAdorner._hitTest(n)))
            )
              return i;
            if ((i = this.diagram._resizingAdorner._hitTest(n))) {
              if (
                ((this.hoveredAdorner = r._resizingAdorner),
                0 !== i.x || 0 !== i.y)
              )
                return;
              i = t;
            } else this.hoveredAdorner = t;
            if (!this.activeTool || "ConnectionTool" !== this.activeTool.type) {
              for (o = [], f = 0; f < r._selectedItems.length; f++)
                (e = r._selectedItems[f]),
                  e instanceof u.Connection && o.push(e);
              i = this._hitTestItems(o, n);
            }
            return i || this._hitTestElements(n);
          },
          _hitTestElements: function (n) {
            var f,
              r,
              e,
              o,
              u = this.diagram,
              t = this._hitTestItems(u.shapes, n),
              i = this._hitTestItems(u.connections, n);
            return (
              (this.activeTool && "ConnectionTool" == this.activeTool.type) ||
                !t ||
                !i ||
                rr(t, n) ||
                ((r = u.mainLayer),
                (e = ht(t.visual, r.children)),
                (o = ht(i.visual, r.children)),
                (f = e > o ? t : i)),
              f || t || i
            );
          },
          _hitTestItems: function (n, t) {
            for (var r, u, i = n.length - 1; i >= 0; i--)
              if (((r = n[i]), (u = r._hitTest(t)))) return u;
          },
        });
        w = e.Class.extend({ init: function () {} });
        p = w.extend({
          init: function (n) {
            var t = this;
            w.fn.init.call(t);
            this.connection = n;
          },
          hitTest: function (n) {
            var t = this.getBounds().inflate(v);
            return (
              !!t.contains(n) &&
              u.Geometry.distanceToPolyline(n, this.connection.allPoints()) < v
            );
          },
          getBounds: function () {
            for (
              var n = this.connection.allPoints(),
                i = n[0],
                r = n[n.length - 1],
                e = Math.max(i.x, r.x),
                u = Math.min(i.x, r.x),
                f = Math.min(i.y, r.y),
                s = Math.max(i.y, r.y),
                t = 1;
              t < n.length - 1;
              ++t
            )
              (e = Math.max(e, n[t].x)),
                (u = Math.min(u, n[t].x)),
                (f = Math.min(f, n[t].y)),
                (s = Math.max(s, n[t].y));
            return new o(u, f, e - u, s - f);
          },
        });
        hi = p.extend({
          init: function (n) {
            var t = this;
            p.fn.init.call(t);
            this.connection = n;
          },
          route: function () {},
        });
        ci = p.extend({
          SAME_SIDE_DISTANCE_RATIO: 5,
          init: function (n) {
            var t = this;
            p.fn.init.call(t);
            this.connection = n;
          },
          routePoints: function (n, t, i, r) {
            return i && r
              ? this._connectorPoints(n, t, i, r)
              : this._floatingPoints(n, t, i);
          },
          route: function () {
            var n = this.connection._resolvedSourceConnector,
              t = this.connection._resolvedTargetConnector,
              i = this.connection.sourcePoint(),
              r = this.connection.targetPoint(),
              u = this.routePoints(i, r, n, t);
            this.connection.points(u);
          },
          _connectorSides: [
            {
              name: "Top",
              axis: "y",
              boundsPoint: "topLeft",
              secondarySign: 1,
            },
            {
              name: "Left",
              axis: "x",
              boundsPoint: "topLeft",
              secondarySign: 1,
            },
            {
              name: "Bottom",
              axis: "y",
              boundsPoint: "bottomRight",
              secondarySign: -1,
            },
            {
              name: "Right",
              axis: "x",
              boundsPoint: "bottomRight",
              secondarySign: -1,
            },
          ],
          _connectorSide: function (n, t) {
            for (
              var f,
                i,
                u,
                r,
                o = n.position(),
                h = n.shape.bounds(tr),
                l = { topLeft: h.topLeft(), bottomRight: h.bottomRight() },
                c = this._connectorSides,
                s = wi.MAX_NUM,
                e = 0;
              e < c.length;
              e++
            )
              (r = c[e]),
                (u = r.axis),
                (f = Math.round(Math.abs(o[u] - l[r.boundsPoint][u]))),
                f < s
                  ? ((s = f), (i = r))
                  : f === s &&
                    (o[u] - t[u]) * r.secondarySign >
                      (o[i.axis] - t[i.axis]) * i.secondarySign &&
                    (i = r);
            return i.name;
          },
          _sameSideDistance: function (n) {
            var t = n.shape.bounds(tr);
            return Math.min(t.width, t.height) / this.SAME_SIDE_DISTANCE_RATIO;
          },
          _connectorPoints: function (n, t, r, u) {
            var h,
              c,
              e = this._connectorSide(r, t),
              o = this._connectorSide(u, n),
              a = t.x - n.x,
              l = t.y - n.y,
              s = this._sameSideDistance(r),
              f = [];
            return (
              e === ct || e == gi
                ? o == ct || o == gi
                  ? e == o
                    ? ((c =
                        e == ct
                          ? Math.min(n.y, t.y) - s
                          : Math.max(n.y, t.y) + s),
                      (f = [new i(n.x, c), new i(t.x, c)]))
                    : (f = [new i(n.x, n.y + l / 2), new i(t.x, n.y + l / 2)])
                  : (f = [new i(n.x, t.y)])
                : o == lt || o == di
                ? e == o
                  ? ((h =
                      e == lt
                        ? Math.min(n.x, t.x) - s
                        : Math.max(n.x, t.x) + s),
                    (f = [new i(h, n.y), new i(h, t.y)]))
                  : (f = [new i(n.x + a / 2, n.y), new i(n.x + a / 2, n.y + l)])
                : (f = [new i(t.x, n.y)]),
              f
            );
          },
          _floatingPoints: function (n, t, r) {
            for (
              var o,
                s,
                a = r ? this._connectorSide(r, t) : null,
                h = this._startHorizontal(n, t, a),
                f = [n, n, t, t],
                c = t.x - n.x,
                l = t.y - n.y,
                e = f.length,
                u = 1;
              u < e - 1;
              ++u
            )
              h
                ? u % 2 != 0
                  ? ((o = c / (e / 2)), (s = 0))
                  : ((o = 0), (s = l / ((e - 1) / 2)))
                : u % 2 != 0
                ? ((o = 0), (s = l / (e / 2)))
                : ((o = c / ((e - 1) / 2)), (s = 0)),
                (f[u] = new i(f[u - 1].x + o, f[u - 1].y + s));
            return (
              u--,
              (f[e - 2] =
                (h && u % 2 != 0) || (!h && u % 2 == 0)
                  ? new i(f[e - 1].x, f[e - 2].y)
                  : new i(f[e - 2].x, f[e - 1].y)),
              [f[1], f[2]]
            );
          },
          _startHorizontal: function (n, t, i) {
            return (
              (null !== i && (i === di || i === lt)) ||
              Math.abs(n.x - t.x) > Math.abs(n.y - t.y)
            );
          },
        });
        l = r.extend({
          init: function (n, t) {
            var i = this;
            i.diagram = n;
            i.options = f({}, i.options, t);
            i.visual = new fr();
            i.diagram._adorners.push(i);
          },
          refresh: function () {},
        });
        li = l.extend({
          init: function (n, t) {
            var r,
              u,
              e,
              i = this;
            i.connection = n;
            r = i.connection.diagram;
            i._ts = r.toolService;
            l.fn.init.call(i, r, t);
            u = i.connection.sourcePoint();
            e = i.connection.targetPoint();
            i.spVisual = new st(f(i.options.handles, { center: u }));
            i.epVisual = new st(f(i.options.handles, { center: e }));
            i.visual.append(i.spVisual);
            i.visual.append(i.epVisual);
          },
          options: { handles: {} },
          _getCursor: function () {
            return s.move;
          },
          start: function (n) {
            switch (
              ((this.handle = this._hitTest(n)),
              (this.startPoint = n),
              (this._initialSource = this.connection.source()),
              (this._initialTarget = this.connection.target()),
              this.handle)
            ) {
              case -1:
                this.connection.targetConnector &&
                  this._ts._connectionManipulation(
                    this.connection,
                    this.connection.targetConnector.shape
                  );
                break;
              case 1:
                this.connection.sourceConnector &&
                  this._ts._connectionManipulation(
                    this.connection,
                    this.connection.sourceConnector.shape
                  );
            }
          },
          move: function (n, t) {
            switch (n) {
              case -1:
                this.connection.source(t);
                break;
              case 1:
                this.connection.target(t);
                break;
              default:
                var i = t.minus(this.startPoint);
                this.startPoint = t;
                this.connection.sourceConnector ||
                  this.connection.source(this.connection.sourcePoint().plus(i));
                this.connection.targetConnector ||
                  this.connection.target(this.connection.targetPoint().plus(i));
            }
            return this.refresh(), !0;
          },
          stop: function (n) {
            var r,
              f = this.diagram.toolService,
              i = f.hoveredItem;
            return (
              (r = f._hoveredConnector
                ? f._hoveredConnector._c
                : i && i instanceof u.Shape
                ? i.getConnector(ki) || i.getConnector(n)
                : n),
              this.handle === -1
                ? this.connection.source(r)
                : 1 === this.handle && this.connection.target(r),
              (this.handle = t),
              this._ts._connectionManipulation(),
              new gt(this.connection, this._initialSource, this._initialTarget)
            );
          },
          _hitTest: function (n) {
            var t = this.connection.sourcePoint(),
              i = this.connection.targetPoint(),
              u = this.options.handles.width / 2 + v,
              f = this.options.handles.height / 2 + v,
              e = t.distanceTo(n),
              s = i.distanceTo(n),
              h = new o(t.x, t.y).inflate(u, f).contains(n),
              c = new o(i.x, i.y).inflate(u, f).contains(n),
              r = 0;
            return (
              h && (!c || e < s) ? (r = -1) : c && (!h || s < e) && (r = 1), r
            );
          },
          refresh: function () {
            this.spVisual.redraw({
              center: this.diagram.modelToLayer(this.connection.sourcePoint()),
            });
            this.epVisual.redraw({
              center: this.diagram.modelToLayer(this.connection.targetPoint()),
            });
          },
        });
        ai = l.extend({
          init: function (n, t) {
            var i = this;
            l.fn.init.call(i, n, t);
            i._refreshHandler = function (n) {
              n.item == i.shape && i.refresh();
            };
          },
          show: function (n) {
            var u,
              i,
              r,
              t = this;
            for (
              t._visible = !0,
                t.shape = n,
                t.diagram.bind(pt, t._refreshHandler),
                u = n.connectors.length,
                t.connectors = [],
                t._clearVisual(),
                i = 0;
              i < u;
              i++
            )
              (r = new et(n.connectors[i])),
                t.connectors.push(r),
                t.visual.append(r.visual);
            t.visual.visible(!0);
            t.refresh();
          },
          _clearVisual: function () {
            var n = this;
            n.diagram._cachedTouchTarget
              ? n._keepCachedTouchTarget()
              : n.visual.clear();
          },
          _keepCachedTouchTarget: function () {
            for (
              var t = this,
                i = t.visual.children,
                r = i.length,
                u = ht(t.diagram._cachedTouchTarget, i),
                n = r - 1;
              n >= 0;
              n--
            )
              n != u && t.visual.remove(i[n]);
          },
          destroy: function () {
            var n = this;
            n.diagram.unbind(pt, n._refreshHandler);
            n.shape = t;
            n._visible = t;
            n.visual.visible(!1);
          },
          _hitTest: function (n) {
            for (var t, i = 0; i < this.connectors.length; i++)
              if (((t = this.connectors[i]), t._hitTest(n))) {
                t._hover(!0);
                this.diagram.toolService._hoveredConnector = t;
                break;
              }
          },
          refresh: function () {
            if (this.shape) {
              var t = this.shape.bounds();
              t = this.diagram.modelToLayer(t);
              this.visual.position(t.topLeft());
              n.each(this.connectors, function () {
                this.refresh();
              });
            }
          },
        });
        vi = l.extend({
          init: function (n, t) {
            var i = this;
            l.fn.init.call(i, n, t);
            i._manipulating = !1;
            i.map = [];
            i.shapes = [];
            i._initSelection();
            i._createHandles();
            i.redraw();
            i.diagram.bind("select", function (n) {
              i._initialize(n.selected);
            });
            i._refreshHandler = function () {
              i._internalChange || (i.refreshBounds(), i.refresh());
            };
            i._rotatedHandler = function () {
              1 == i.shapes.length && (i._angle = i.shapes[0].rotate().angle);
              i._refreshHandler();
            };
            i.diagram.bind(pt, i._refreshHandler).bind(lr, i._rotatedHandler);
            i.refreshBounds();
            i.refresh();
          },
          options: {
            handles: {
              fill: { color: "#fff" },
              stroke: { color: "#282828" },
              height: 7,
              width: 7,
              hover: {
                fill: { color: "#282828" },
                stroke: { color: "#282828" },
              },
            },
            selectable: {
              stroke: { color: "#778899", width: 1, dashType: "dash" },
              fill: { color: nr },
            },
            offset: 10,
          },
          _initSelection: function () {
            var n = this,
              t = n.diagram,
              i = t.options.selectable,
              r = f({}, n.options.selectable, i);
            n.rect = new ot(r);
            n.visual.append(n.rect);
          },
          _resizable: function () {
            return this.options.editable && this.options.editable.resize !== !1;
          },
          _handleOptions: function () {
            return (
              (this.options.editable.resize || {}).handles ||
              this.options.handles
            );
          },
          _createHandles: function () {
            var r, i, n, t;
            if (this._resizable())
              for (r = this._handleOptions(), t = -1; t <= 1; t++)
                for (n = -1; n <= 1; n++)
                  (0 === t && 0 === n) ||
                    ((i = new ot(r)),
                    (i.drawingElement._hover = bi(this._hover, this)),
                    this.map.push({ x: t, y: n, visual: i }),
                    this.visual.append(i));
          },
          bounds: function (n) {
            return n
              ? ((this._innerBounds = n.clone()),
                (this._bounds = this.diagram
                  .modelToLayer(n)
                  .inflate(this.options.offset, this.options.offset)),
                t)
              : this._bounds;
          },
          _hitTest: function (n) {
            var t,
              u,
              f,
              e,
              r = this.diagram.modelToLayer(n),
              o = this.map.length;
            if (
              (this._angle &&
                (r = r.clone().rotate(this._bounds.center(), this._angle)),
              this._resizable())
            )
              for (t = 0; t < o; t++)
                if (
                  ((e = this.map[t]),
                  (u = new i(e.x, e.y)),
                  (f = this._getHandleBounds(u)),
                  f.offset(this._bounds.x, this._bounds.y),
                  f.contains(r))
                )
                  return u;
            if (this._bounds.contains(r)) return new i(0, 0);
          },
          _getHandleBounds: function (n) {
            if (this._resizable()) {
              var u = this._handleOptions(),
                i = u.width,
                r = u.height,
                t = new o(0, 0, i, r);
              return (
                n.x < 0
                  ? (t.x = -i / 2)
                  : 0 === n.x
                  ? (t.x = Math.floor(this._bounds.width / 2) - i / 2)
                  : n.x > 0 && (t.x = this._bounds.width + 1 - i / 2),
                n.y < 0
                  ? (t.y = -r / 2)
                  : 0 === n.y
                  ? (t.y = Math.floor(this._bounds.height / 2) - r / 2)
                  : n.y > 0 && (t.y = this._bounds.height + 1 - r / 2),
                t
              );
            }
          },
          _getCursor: function (n) {
            var r,
              t = this._hitTest(n);
            if (
              t &&
              t.x >= -1 &&
              t.x <= 1 &&
              t.y >= -1 &&
              t.y <= 1 &&
              this._resizable()
            ) {
              if (
                ((r = this._angle),
                r &&
                  ((r = 360 - r),
                  t.rotate(new i(0, 0), r),
                  (t = new i(Math.round(t.x), Math.round(t.y)))),
                t.x == -1 && t.y == -1)
              )
                return "nw-resize";
              if (1 == t.x && 1 == t.y) return "se-resize";
              if (t.x == -1 && 1 == t.y) return "sw-resize";
              if (1 == t.x && t.y == -1) return "ne-resize";
              if (0 === t.x && t.y == -1) return "n-resize";
              if (0 === t.x && 1 == t.y) return "s-resize";
              if (1 == t.x && 0 === t.y) return "e-resize";
              if (t.x == -1 && 0 === t.y) return "w-resize";
            }
            return this._manipulating ? s.move : s.select;
          },
          _initialize: function () {
            var t,
              r,
              n = this,
              f = n.diagram.select();
            for (n.shapes = [], t = 0; t < f.length; t++)
              (r = f[t]),
                r instanceof u.Shape &&
                  (n.shapes.push(r), (r._rotationOffset = new i()));
            n._angle = 1 == n.shapes.length ? n.shapes[0].rotate().angle : 0;
            n._startAngle = n._angle;
            n._rotates();
            n._positions();
            n.refreshBounds();
            n.refresh();
            n.redraw();
          },
          _rotates: function () {
            var n,
              i,
              t = this;
            for (t.initialRotates = [], n = 0; n < t.shapes.length; n++)
              (i = t.shapes[n]), t.initialRotates.push(i.rotate().angle);
          },
          _positions: function () {
            var n,
              i,
              t = this;
            for (t.initialStates = [], n = 0; n < t.shapes.length; n++)
              (i = t.shapes[n]), t.initialStates.push(i.bounds());
          },
          _hover: function (n, t) {
            if (this._resizable()) {
              var u = this._handleOptions(),
                r = u.hover,
                i = u.stroke,
                e = u.fill;
              n && a.isDefined(r.stroke) && (i = f({}, i, r.stroke));
              n && a.isDefined(r.fill) && (e = r.fill);
              t.stroke(i.color, i.width, i.opacity);
              t.fill(e.color, e.opacity);
            }
          },
          start: function (n) {
            var t, i;
            for (
              this._sp = n,
                this._cp = n,
                this._lp = n,
                this._manipulating = !0,
                this._internalChange = !0,
                this.shapeStates = [],
                t = 0;
              t < this.shapes.length;
              t++
            )
              (i = this.shapes[t]), this.shapeStates.push(i.bounds());
          },
          redraw: function () {
            for (var t, i = this._resizable(), n = 0; n < this.map.length; n++)
              (t = this.map[n]), t.visual.visible(i);
          },
          angle: function (n) {
            return h(n) && (this._angle = n), this._angle;
          },
          rotate: function () {
            var n,
              i,
              r = this._innerBounds.center(),
              t = this.angle();
            for (this._internalChange = !0, n = 0; n < this.shapes.length; n++)
              (i = this.shapes[n]),
                (t = (t + this.initialRotates[n] - this._startAngle) % 360),
                i.rotate(t, r);
            this.refresh();
          },
          move: function (n, r) {
            var e,
              c,
              l,
              k,
              u,
              s,
              g,
              f,
              nt,
              tt,
              it,
              h,
              w,
              b,
              v = new i(),
              p = new i(),
              d = 0;
            if (n.y === -2 && n.x === -1) {
              for (
                k = this._innerBounds.center(),
                  this._angle = this._truncateAngle(a.findAngle(k, r)),
                  s = 0;
                s < this.shapes.length;
                s++
              )
                (u = this.shapes[s]),
                  (g =
                    (this._angle + this.initialRotates[s] - this._startAngle) %
                    360),
                  u.rotate(g, k),
                  u.hasOwnProperty("layout") && u.layout(u),
                  (this._rotating = !0);
              this.refresh();
            } else {
              if (this.shouldSnap()) {
                if (
                  ((h = this._truncateDistance(r.minus(this._lp))),
                  0 === h.x && 0 === h.y)
                )
                  return (this._cp = r), t;
                e = h;
                this._lp = new i(this._lp.x + h.x, this._lp.y + h.y);
              } else e = r.minus(this._cp);
              for (
                this.isDragHandle(n)
                  ? ((p = v = e), (c = !0))
                  : (this._angle && e.rotate(new i(0, 0), this._angle),
                    n.x == -1 ? (v.x = e.x) : 1 == n.x && (p.x = e.x),
                    n.y == -1 ? (v.y = e.y) : 1 == n.y && (p.y = e.y)),
                  c ||
                    ((nt = ir(n, this._innerBounds)),
                    (tt =
                      (this._innerBounds.width + e.x * n.x) /
                      this._innerBounds.width),
                    (it =
                      (this._innerBounds.height + e.y * n.y) /
                      this._innerBounds.height)),
                  s = 0;
                s < this.shapes.length;
                s++
              ) {
                if (((u = this.shapes[s]), (l = u.bounds()), c)) {
                  if (!y(u)) continue;
                  f = this._displaceBounds(l, v, p, c);
                } else
                  (f = l.clone()),
                    f.scale(
                      tt,
                      it,
                      nt,
                      this._innerBounds.center(),
                      u.rotate().angle
                    ),
                    (w = f.center()),
                    w.rotate(l.center(), -this._angle),
                    (f = new o(
                      w.x - f.width / 2,
                      w.y - f.height / 2,
                      f.width,
                      f.height
                    ));
                f.width >= u.options.minWidth &&
                  f.height >= u.options.minHeight &&
                  ((b = l),
                  u.bounds(f),
                  u.hasOwnProperty("layout") && u.layout(u, b, f),
                  (b.width === f.width && b.height === f.height) ||
                    u.rotate(u.rotate().angle),
                  (d += 1));
              }
              d &&
                (d == s
                  ? ((f = this._displaceBounds(this._innerBounds, v, p, c)),
                    this.bounds(f))
                  : this.refreshBounds(),
                this.refresh());
              this._positions();
            }
            this._cp = r;
          },
          isDragHandle: function (n) {
            return 0 === n.x && 0 === n.y;
          },
          cancel: function () {
            for (
              var i = this.shapes, r = this.shapeStates, n = 0;
              n < i.length;
              n++
            )
              i[n].bounds(r[n]);
            this.refreshBounds();
            this.refresh();
            this._manipulating = t;
            this._internalChange = t;
            this._rotating = t;
          },
          _truncatePositionToGuides: function (n) {
            return this.diagram.ruler
              ? this.diagram.ruler.truncatePositionToGuides(n)
              : n;
          },
          _truncateSizeToGuides: function (n) {
            return this.diagram.ruler
              ? this.diagram.ruler.truncateSizeToGuides(n)
              : n;
          },
          _truncateAngle: function (n) {
            var t = this.snapOptions(),
              i = Math.max(t.angle || cr, vr);
            return t ? Math.floor((n % 360) / i) * i : n % 360;
          },
          _truncateDistance: function (n) {
            var t, i;
            return n instanceof u.Point
              ? new u.Point(
                  this._truncateDistance(n.x),
                  this._truncateDistance(n.y)
                )
              : ((t = this.snapOptions() || {}),
                (i = Math.max(t.size || hr, ar)),
                t ? Math.floor(n / i) * i : n);
          },
          snapOptions: function () {
            var n = this.diagram.options.editable;
            return ((n || {}).drag || {}).snap || {};
          },
          shouldSnap: function () {
            var n = this.diagram.options.editable,
              t = (n || {}).drag,
              i = (t || {}).snap;
            return n !== !1 && t !== !1 && i !== !1;
          },
          _displaceBounds: function (n, t, i, r) {
            var f,
              e = n.topLeft().plus(t),
              s = n.bottomRight().plus(i),
              u = o.fromPoints(e, s);
            return (
              r ||
                ((f = u.center()),
                f.rotate(n.center(), -this._angle),
                (u = new o(
                  f.x - u.width / 2,
                  f.y - u.height / 2,
                  u.width,
                  u.height
                ))),
              u
            );
          },
          stop: function () {
            var u, n, i, r;
            if (this._cp != this._sp)
              if (this._rotating)
                (u = new g(this, this.shapes, this.initialRotates)),
                  (this._rotating = !1);
              else if (this._diffStates()) {
                if (this.diagram.ruler)
                  for (n = 0; n < this.shapes.length; n++)
                    (i = this.shapes[n]),
                      (r = i.bounds()),
                      (r = this._truncateSizeToGuides(
                        this._truncatePositionToGuides(r)
                      )),
                      i.bounds(r),
                      this.refreshBounds(),
                      this.refresh();
                for (n = 0; n < this.shapes.length; n++)
                  (i = this.shapes[n]), i.updateModel();
                u = new d(this.shapes, this.shapeStates, this);
                this.diagram._syncShapeChanges();
              }
            return (
              (this._manipulating = t),
              (this._internalChange = t),
              (this._rotating = t),
              u
            );
          },
          _diffStates: function () {
            for (
              var t = this.shapes, i = this.shapeStates, n = 0;
              n < t.length;
              n++
            )
              if (!t[n].bounds().equals(i[n])) return !0;
            return !1;
          },
          refreshBounds: function () {
            var n =
              1 == this.shapes.length
                ? this.shapes[0].bounds().clone()
                : this.diagram.boundingBox(this.shapes, !0);
            this.bounds(n);
          },
          refresh: function () {
            var u,
              t,
              f,
              r,
              e = this;
            this.shapes.length > 0
              ? ((t = this.bounds()),
                this.visual.visible(!0),
                this.visual.position(t.topLeft()),
                n.each(this.map, function () {
                  u = e._getHandleBounds(new i(this.x, this.y));
                  this.visual.position(u.topLeft());
                }),
                this.visual.position(t.topLeft()),
                (f = new i(t.width / 2, t.height / 2)),
                this.visual.rotate(this._angle, f),
                this.rect.redraw({ width: t.width, height: t.height }),
                this.rotationThumb &&
                  ((r = this.options.editable.rotate.thumb),
                  (this._rotationThumbBounds = new o(
                    t.center().x,
                    t.y + r.y,
                    0,
                    0
                  ).inflate(r.width)),
                  this.rotationThumb.redraw({ x: t.width / 2 - r.width / 2 })))
              : this.visual.visible(!1);
          },
        });
        yi = r.extend({
          init: function (n) {
            var t = n.options.selectable;
            this.options = f({}, this.options, t);
            this.visual = new ot(this.options);
            this.diagram = n;
          },
          options: {
            stroke: { color: "#778899", width: 1, dashType: "dash" },
            fill: { color: nr },
          },
          start: function (n) {
            this._sp = this._ep = n;
            this.refresh();
            this.diagram._adorn(this, !0);
          },
          end: function () {
            this._sp = this._ep = t;
            this.diagram._adorn(this, !1);
          },
          bounds: function (n) {
            return n && (this._bounds = n), this._bounds;
          },
          move: function (n) {
            this._ep = n;
            this.refresh();
          },
          refresh: function () {
            if (this._sp) {
              var n = o.fromPoints(
                this.diagram.modelToLayer(this._sp),
                this.diagram.modelToLayer(this._ep)
              );
              this.bounds(o.fromPoints(this._sp, this._ep));
              this.visual.position(n.topLeft());
              this.visual.redraw({ height: n.height + 1, width: n.width + 1 });
            }
          },
        });
        et = r.extend({
          init: function (n) {
            this.options = f({}, n.options);
            this._c = n;
            this.visual = new st(this.options);
            this.refresh();
          },
          _hover: function (n) {
            var i = this.options,
              t = i.hover,
              r = i.stroke,
              u = i.fill;
            n && a.isDefined(t.stroke) && (r = f({}, r, t.stroke));
            n && a.isDefined(t.fill) && (u = t.fill);
            this.visual.redraw({ stroke: r, fill: u });
          },
          refresh: function () {
            var n = this._c.shape.diagram.modelToView(this._c.position()),
              t = n.minus(this._c.shape.bounds("transformed").topLeft()),
              r = new o(n.x, n.y, 0, 0);
            r.inflate(this.options.width / 2, this.options.height / 2);
            this._visualBounds = r;
            this.visual.redraw({ center: new i(t.x, t.y) });
          },
          _hitTest: function (n) {
            var t = this._c.shape.diagram.modelToView(n);
            return this._visualBounds.contains(t);
          },
        });
        f(u, {
          CompositeUnit: k,
          TransformUnit: d,
          PanUndoUnit: ui,
          AddShapeUnit: ri,
          AddConnectionUnit: ii,
          DeleteShapeUnit: ti,
          DeleteConnectionUnit: ni,
          ConnectionEditAdorner: li,
          ConnectionTool: ut,
          ConnectorVisual: et,
          UndoRedoService: oi,
          ResizingAdorner: vi,
          Selector: yi,
          ToolService: si,
          ConnectorsAdorner: ai,
          LayoutUndoUnit: kt,
          ConnectionEditUnit: dt,
          ToFrontUnit: fi,
          ToBackUnit: ei,
          ConnectionRouterBase: w,
          PolylineRouter: hi,
          CascadingRouter: ci,
          SelectionTool: rt,
          ScrollerTool: tt,
          PointerTool: it,
          ConnectionEditTool: ft,
          RotateUnit: g,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("dataviz/diagram/layout.min", ["dataviz/diagram/math.min"], n);
  })(
    function () {
      !(function (n) {
        var e = window.kendo,
          u = e.dataviz.diagram,
          p = u.Graph,
          v = u.Node,
          y = u.Link,
          k = e.deepExtend,
          o = u.Size,
          f = u.Rect,
          i = u.Dictionary,
          w = u.Set,
          d = u.Graph,
          t = u.Utils,
          r = u.Point,
          l = 1e-6,
          b = Math.PI / 180,
          h = t.contains,
          c = n.grep,
          s = e.Class.extend({
            defaultOptions: {
              type: "Tree",
              subtype: "Down",
              roots: null,
              animate: !1,
              limitToView: !1,
              friction: 0.9,
              nodeDistance: 50,
              iterations: 300,
              horizontalSeparation: 90,
              verticalSeparation: 50,
              underneathVerticalTopOffset: 15,
              underneathHorizontalOffset: 15,
              underneathVerticalSeparation: 15,
              grid: {
                width: 1500,
                offsetX: 50,
                offsetY: 50,
                componentSpacingX: 20,
                componentSpacingY: 20,
              },
              layerSeparation: 50,
              layeredIterations: 2,
              startRadialAngle: 0,
              endRadialAngle: 360,
              radialSeparation: 150,
              radialFirstLevelSeparation: 200,
              keepComponentsInOneRadialLayout: !1,
              ignoreContainers: !0,
              layoutContainerChildren: !1,
              ignoreInvisible: !0,
              animateTransitions: !1,
            },
            init: function () {},
            gridLayoutComponents: function (n) {
              var y, p, w, e, h, b, o, c, i, l, a, u, v, f, s;
              if (!n) throw "No components supplied.";
              for (
                t.forEach(n, function (n) {
                  n.calcBounds();
                }),
                  n.sort(function (n, t) {
                    return t.bounds.width - n.bounds.width;
                  }),
                  y = this.options.grid.width,
                  p = this.options.grid.componentSpacingX,
                  w = this.options.grid.componentSpacingY,
                  e = 0,
                  h = this.options.grid.offsetX,
                  b = this.options.grid.offsetY,
                  o = h,
                  c = b,
                  l = [],
                  a = [];
                n.length > 0;

              ) {
                for (
                  o >= y && ((o = h), (c += e + w), (e = 0)),
                    u = n.pop(),
                    this.moveToOffset(u, new r(o, c)),
                    i = 0;
                  i < u.nodes.length;
                  i++
                )
                  a.push(u.nodes[i]);
                for (i = 0; i < u.links.length; i++) l.push(u.links[i]);
                v = u.bounds;
                f = v.height;
                (f <= 0 || isNaN(f)) && (f = 0);
                s = v.width;
                (s <= 0 || isNaN(s)) && (s = 0);
                f >= e && (e = f);
                o += s + p;
              }
              return { nodes: a, links: l };
            },
            moveToOffset: function (n, t) {
              for (
                var e,
                  h,
                  i,
                  o,
                  c,
                  l,
                  s,
                  a = n.bounds,
                  v = t.x - a.x,
                  y = t.y - a.y,
                  u = 0;
                u < n.nodes.length;
                u++
              )
                (h = n.nodes[u]),
                  (i = h.bounds()),
                  0 === i.width &&
                    0 === i.height &&
                    0 === i.x &&
                    0 === i.y &&
                    (i = new f(0, 0, 0, 0)),
                  (i.x += v),
                  (i.y += y),
                  h.bounds(i);
              for (u = 0; u < n.links.length; u++)
                if (((o = n.links[u]), o.points)) {
                  for (c = [], l = o.points, e = 0; e < l.length; e++)
                    (s = l[e]), (s.x += v), (s.y += y), c.push(s);
                  o.points = c;
                }
              return (
                (this.currentHorizontalOffset +=
                  a.width + this.options.grid.offsetX),
                new r(v, y)
              );
            },
            transferOptions: function (n) {
              this.options = e.deepExtend({}, this.defaultOptions);
              t.isUndefined(n) ||
                (this.options = e.deepExtend(this.options, n || {}));
            },
          }),
          a = e.Class.extend({
            init: function (n) {
              this.nodeMap = new i();
              this.shapeMap = new i();
              this.nodes = [];
              this.edges = [];
              this.edgeMap = new i();
              this.finalNodes = [];
              this.finalLinks = [];
              this.ignoredConnections = [];
              this.ignoredShapes = [];
              this.hyperMap = new i();
              this.hyperTree = new p();
              this.finalGraph = null;
              this.diagram = n;
            },
            convert: function (n) {
              if (t.isUndefined(this.diagram)) throw "No diagram to convert.";
              return (
                (this.options = e.deepExtend(
                  {
                    ignoreInvisible: !0,
                    ignoreContainers: !0,
                    layoutContainerChildren: !1,
                  },
                  n || {}
                )),
                this.clear(),
                this._renormalizeShapes(),
                this._renormalizeConnections(),
                (this.finalNodes = new i(this.nodes)),
                (this.finalLinks = new i(this.edges)),
                (this.finalGraph = new p()),
                this.finalNodes.forEach(function (n) {
                  this.finalGraph.addNode(n);
                }, this),
                this.finalLinks.forEach(function (n) {
                  this.finalGraph.addExistingLink(n);
                }, this),
                this.finalGraph
              );
            },
            mapConnection: function (n) {
              return this.edgeMap.get(n.id);
            },
            mapShape: function (n) {
              return this.nodeMap.get(n.id);
            },
            getEdge: function (n, i) {
              return t.first(n.links, function (t) {
                return t.getComplement(n) === i;
              });
            },
            clear: function () {
              this.finalGraph = null;
              this.hyperTree =
                !this.options.ignoreContainers &&
                this.options.layoutContainerChildren
                  ? new d()
                  : null;
              this.hyperMap =
                !this.options.ignoreContainers &&
                this.options.layoutContainerChildren
                  ? new i()
                  : null;
              this.nodeMap = new i();
              this.shapeMap = new i();
              this.nodes = [];
              this.edges = [];
              this.edgeMap = new i();
              this.ignoredConnections = [];
              this.ignoredShapes = [];
              this.finalNodes = [];
              this.finalLinks = [];
            },
            listToRoot: function (n) {
              var i = [],
                t = n.container;
              if (!t) return i;
              for (i.push(t); t.parentContainer; )
                (t = t.parentContainer), i.push(t);
              return i.reverse(), i;
            },
            firstNonIgnorableContainer: function (n) {
              return n.isContainer && !this._isIgnorableItem(n)
                ? n
                : n.parentContainer
                ? this.firstNonIgnorableContainer(n.parentContainer)
                : null;
            },
            isContainerConnection: function (n, t) {
              return (
                !(!n.isContainer || !this.isDescendantOf(n, t)) ||
                (t.isContainer && this.isDescendantOf(t, n))
              );
            },
            isDescendantOf: function (n, t) {
              var u, i, f, r;
              if (!n.isContainer) throw "Expecting a container.";
              if (n === t) return !1;
              if (h(n.children, t)) return !0;
              for (u = [], i = 0, f = n.children.length; i < f; i++)
                (r = n.children[i]),
                  r.isContainer && this.isDescendantOf(r, t) && u.push(r);
              return u.length > 0;
            },
            isIgnorableItem: function (n) {
              return this.options.ignoreInvisible
                ? (!n.isCollapsed || !this._isVisible(n)) &&
                    !(!n.isCollapsed && this._isVisible(n))
                : n.isCollapsed && !this._isTop(n);
            },
            isShapeMapped: function (n) {
              return n.isCollapsed && !this._isVisible(n) && !this._isTop(n);
            },
            leastCommonAncestor: function (n, i) {
              var u, f, e, o, s, r;
              if (!n) throw "Parameter should not be null.";
              if (!i) throw "Parameter should not be null.";
              if (!this.hyperTree) throw "No hypertree available.";
              if (
                ((u = this.listToRoot(n)),
                (f = this.listToRoot(i)),
                (e = null),
                t.isEmpty(u) || t.isEmpty(f))
              )
                return this.hyperTree.root.data;
              for (
                o = u[0], s = f[0], r = 0;
                o === s && ((e = u[r]), r++, !(r >= u.length || r >= f.length));

              )
                (o = u[r]), (s = f[r]);
              return e
                ? c(this.hyperTree.nodes, function (n) {
                    return n.data.container === e;
                  })
                : this.hyperTree.root.data;
            },
            _isTop: function (n) {
              return !n.parentContainer;
            },
            _isVisible: function (n) {
              return (
                !!n.visible() &&
                (n.parentContainer
                  ? this._isVisible(n.parentContainer)
                  : n.visible())
              );
            },
            _isCollapsed: function (n) {
              return (
                !(!n.isContainer || !n.isCollapsed) ||
                (n.parentContainer && this._isCollapsed(n.parentContainer))
              );
            },
            _renormalizeShapes: function () {
              var t, r, n, i;
              if (!this.options.ignoreContainers)
                throw "Containers are not supported yet, but stay tuned.";
              for (t = 0, r = this.diagram.shapes.length; t < r; t++)
                (n = this.diagram.shapes[t]),
                  (this.options.ignoreInvisible && !this._isVisible(n)) ||
                  n.isContainer
                    ? this.ignoredShapes.push(n)
                    : ((i = new v(n.id, n)),
                      (i.isVirtual = !1),
                      this.nodeMap.add(n.id, i),
                      this.nodes.push(i));
            },
            _renormalizeConnections: function () {
              var f, o, n, t, i, r, u, e;
              if (0 !== this.diagram.connections.length)
                for (f = 0, o = this.diagram.connections.length; f < o; f++)
                  if (
                    ((n = this.diagram.connections[f]), this.isIgnorableItem(n))
                  )
                    this.ignoredConnections.push(n);
                  else if (
                    ((t = n.sourceConnector ? n.sourceConnector.shape : null),
                    (i = n.targetConnector ? n.targetConnector.shape : null),
                    t && i)
                  )
                    if (
                      !h(this.ignoredShapes, t) ||
                      this.shapeMap.containsKey(t)
                    )
                      if (
                        !h(this.ignoredShapes, i) ||
                        this.shapeMap.containsKey(i)
                      )
                        if (
                          (this.shapeMap.containsKey(t) &&
                            (t = this.shapeMap[t]),
                          this.shapeMap.containsKey(i) &&
                            (i = this.shapeMap[i]),
                          (r = this.mapShape(t)),
                          (u = this.mapShape(i)),
                          r === u || this.areConnectedAlready(r, u))
                        )
                          this.ignoredConnections.push(n);
                        else {
                          if (null === r || null === u)
                            throw "A shape was not mapped to a node.";
                          if (!this.options.ignoreContainers)
                            throw "Containers are not supported yet, but stay tuned.";
                          r.isVirtual || u.isVirtual
                            ? this.ignoredConnections.push(n)
                            : ((e = new y(r, u, n.id, n)),
                              this.edgeMap.add(n.id, e),
                              this.edges.push(e));
                        }
                      else this.ignoredConnections.push(n);
                    else this.ignoredConnections.push(n);
                  else this.ignoredConnections.push(n);
            },
            areConnectedAlready: function (n, i) {
              return t.any(this.edges, function (t) {
                return (
                  (t.source === n && t.target === i) ||
                  (t.source === i && t.target === n)
                );
              });
            },
          }),
          g = s.extend({
            init: function (n) {
              var i = this;
              if ((s.fn.init.call(i), t.isUndefined(n)))
                throw "Diagram is not specified.";
              this.diagram = n;
            },
            layout: function (n) {
              var e, f, i, r, o, s;
              if (
                (this.transferOptions(n),
                (e = new a(this.diagram)),
                (f = e.convert(n)),
                !f.isEmpty() &&
                  ((i = f.getConnectedComponents()), !t.isEmpty(i)))
              ) {
                for (r = 0; r < i.length; r++)
                  (o = i[r]), this.layoutGraph(o, n);
                return (
                  (s = this.gridLayoutComponents(i)),
                  new u.LayoutState(this.diagram, s)
                );
              }
            },
            layoutGraph: function (n, i) {
              var u, f, r;
              for (
                t.isDefined(i) && this.transferOptions(i),
                  this.graph = n,
                  u = 9 * this.options.nodeDistance,
                  this.temperature = u,
                  f = this._expectedBounds(),
                  this.width = f.width,
                  this.height = f.height,
                  r = 0;
                r < this.options.iterations;
                r++
              )
                (this.refineStage = r >= (5 * this.options.iterations) / 6),
                  this.tick(),
                  (this.temperature = this.refineStage
                    ? u / 30
                    : u * (1 - r / (2 * this.options.iterations)));
            },
            tick: function () {
              for (var n, i, t = 0; t < this.graph.nodes.length; t++)
                this._repulsion(this.graph.nodes[t]);
              for (t = 0; t < this.graph.links.length; t++)
                this._attraction(this.graph.links[t]);
              for (t = 0; t < this.graph.nodes.length; t++) {
                if (
                  ((n = this.graph.nodes[t]),
                  (i = Math.sqrt(n.dx * n.dx + n.dy * n.dy)),
                  0 === i)
                )
                  return;
                n.x += (Math.min(i, this.temperature) * n.dx) / i;
                n.y += (Math.min(i, this.temperature) * n.dy) / i;
                this.options.limitToView &&
                  ((n.x = Math.min(this.width, Math.max(n.width / 2, n.x))),
                  (n.y = Math.min(this.height, Math.max(n.height / 2, n.y))));
              }
            },
            _shake: function (n) {
              var t = (Math.random() * this.options.nodeDistance) / 4,
                i = 2 * Math.random() * Math.PI;
              n.x += t * Math.cos(i);
              n.y -= t * Math.sin(i);
            },
            _InverseSquareForce: function (n, t, i) {
              var r, u, f, e, o, s, h;
              return (
                this.refineStage
                  ? ((u = t.x - i.x),
                    (f = t.y - i.y),
                    (e = t.width / 2),
                    (o = t.height / 2),
                    (s = i.width / 2),
                    (h = i.height / 2),
                    (r =
                      Math.pow(u, 2) /
                        Math.pow(e + s + this.options.nodeDistance, 2) +
                      Math.pow(f, 2) /
                        Math.pow(o + h + this.options.nodeDistance, 2)))
                  : (r =
                      Math.pow(n, 2) / Math.pow(this.options.nodeDistance, 2)),
                (4 * r) / 3
              );
            },
            _SquareForce: function (n, t, i) {
              return 1 / this._InverseSquareForce(n, t, i);
            },
            _repulsion: function (n) {
              n.dx = 0;
              n.dy = 0;
              t.forEach(
                this.graph.nodes,
                function (t) {
                  var i, r, u, f;
                  if (t !== n) {
                    for (; n.x === t.x && n.y === t.y; ) this._shake(t);
                    i = n.x - t.x;
                    r = n.y - t.y;
                    u = Math.sqrt(i * i + r * r);
                    f = 2 * this._SquareForce(u, n, t);
                    n.dx += (i / u) * f;
                    n.dy += (r / u) * f;
                  }
                },
                this
              );
            },
            _attraction: function (n) {
              var r,
                u,
                f,
                e,
                o,
                s,
                t = n.target,
                i = n.source;
              if (i !== t) {
                for (; i.x === t.x && i.y === t.y; ) this._shake(t);
                r = i.x - t.x;
                u = i.y - t.y;
                f = Math.sqrt(r * r + u * u);
                e = 5 * this._InverseSquareForce(f, i, t);
                o = (r / f) * e;
                s = (u / f) * e;
                t.dx += o;
                t.dy += s;
                i.dx -= o;
                i.dy -= s;
              }
            },
            _expectedBounds: function () {
              var n,
                u,
                i,
                f,
                e,
                r = this.graph.nodes.length,
                o = 1.5,
                s = 4;
              return 0 === r
                ? n
                : ((n = t.fold(
                    this.graph.nodes,
                    function (n, t) {
                      var i = t.width * t.height;
                      return i > 0 ? (n += Math.sqrt(i)) : 0;
                    },
                    0,
                    this
                  )),
                  (u = n / r),
                  (i = u * Math.ceil(Math.sqrt(r))),
                  (f = i * Math.sqrt(o)),
                  (e = i / Math.sqrt(o)),
                  { width: f * s, height: e * s });
            },
          }),
          nt = e.Class.extend({
            init: function (n) {
              this.center = null;
              this.options = n;
            },
            layout: function (n, t) {
              if (
                ((this.graph = n),
                this.graph.nodes && 0 !== this.graph.nodes.length)
              ) {
                if (!h(this.graph.nodes, t))
                  throw "The given root is not in the graph.";
                this.center = t;
                this.graph.cacheRelationships();
                this.layoutSwitch();
              }
            },
            layoutLeft: function (n) {
              var u, f, e, t, i, s, h, c;
              for (
                this.setChildrenDirection(this.center, "Left", !1),
                  this.setChildrenLayout(this.center, "Default", !1),
                  u = 0,
                  f = 0,
                  t = 0;
                t < n.length;
                t++
              )
                (i = n[t]),
                  (i.TreeDirection = "Left"),
                  (s = this.measure(i, o.Empty)),
                  (f = Math.max(f, s.Width)),
                  (u += s.height + this.options.verticalSeparation);
              for (
                u -= this.options.verticalSeparation,
                  h = this.center.x - this.options.horizontalSeparation,
                  e = this.center.y + (this.center.height - u) / 2,
                  t = 0;
                t < n.length;
                t++
              )
                (i = n[t]),
                  (c = new r(h - i.Size.width, e)),
                  this.arrange(i, c),
                  (e += i.Size.height + this.options.verticalSeparation);
            },
            layoutRight: function (n) {
              var u, f, e, t, i, s, h, c;
              for (
                this.setChildrenDirection(this.center, "Right", !1),
                  this.setChildrenLayout(this.center, "Default", !1),
                  u = 0,
                  f = 0,
                  t = 0;
                t < n.length;
                t++
              )
                (i = n[t]),
                  (i.TreeDirection = "Right"),
                  (s = this.measure(i, o.Empty)),
                  (f = Math.max(f, s.Width)),
                  (u += s.height + this.options.verticalSeparation);
              for (
                u -= this.options.verticalSeparation,
                  h =
                    this.center.x +
                    this.options.horizontalSeparation +
                    this.center.width,
                  e = this.center.y + (this.center.height - u) / 2,
                  t = 0;
                t < n.length;
                t++
              )
                (i = n[t]),
                  (c = new r(h, e)),
                  this.arrange(i, c),
                  (e += i.Size.height + this.options.verticalSeparation);
            },
            layoutUp: function (n) {
              var u, e, i, t, s, f, h;
              for (
                this.setChildrenDirection(this.center, "Up", !1),
                  this.setChildrenLayout(this.center, "Default", !1),
                  u = 0,
                  t = 0;
                t < n.length;
                t++
              )
                (i = n[t]),
                  (i.TreeDirection = "Up"),
                  (s = this.measure(i, o.Empty)),
                  (u += s.width + this.options.horizontalSeparation);
              for (
                u -= this.options.horizontalSeparation,
                  f = this.center.x + this.center.width / 2 - u / 2,
                  t = 0;
                t < n.length;
                t++
              )
                (i = n[t]),
                  (e =
                    this.center.y -
                    this.options.verticalSeparation -
                    i.Size.height),
                  (h = new r(f, e)),
                  this.arrange(i, h),
                  (f += i.Size.width + this.options.horizontalSeparation);
            },
            layoutDown: function (n) {
              var i, t, u, e, s, f, h;
              for (
                this.setChildrenDirection(this.center, "Down", !1),
                  this.setChildrenLayout(this.center, "Default", !1),
                  u = 0,
                  t = 0;
                t < n.length;
                t++
              )
                (i = n[t]),
                  (i.treeDirection = "Down"),
                  (s = this.measure(i, o.Empty)),
                  (u += s.width + this.options.horizontalSeparation);
              for (
                u -= this.options.horizontalSeparation,
                  f = this.center.x + this.center.width / 2 - u / 2,
                  e =
                    this.center.y +
                    this.options.verticalSeparation +
                    this.center.height,
                  t = 0;
                t < n.length;
                t++
              )
                (i = n[t]),
                  (h = new r(f, e)),
                  this.arrange(i, h),
                  (f += i.Size.width + this.options.horizontalSeparation);
            },
            layoutRadialTree: function () {
              var n, t;
              if (
                (this.setChildrenDirection(this.center, "Radial", !1),
                this.setChildrenLayout(this.center, "Default", !1),
                (this.previousRoot = null),
                (n = this.options.startRadialAngle * b),
                (t = this.options.endRadialAngle * b),
                t <= n)
              )
                throw "Final angle should not be less than the start angle.";
              this.maxDepth = 0;
              this.origin = new r(this.center.x, this.center.y);
              this.calculateAngularWidth(this.center, 0);
              this.maxDepth > 0 &&
                this.radialLayout(
                  this.center,
                  this.options.radialFirstLevelSeparation,
                  n,
                  t
                );
              this.center.Angle = t - n;
            },
            tipOverTree: function (n, i) {
              var f, h, e, u, c, s, l;
              for (
                t.isUndefined(i) && (i = 0),
                  this.setChildrenDirection(this.center, "Down", !1),
                  this.setChildrenLayout(this.center, "Default", !1),
                  this.setChildrenLayout(this.center, "Underneath", !1, i),
                  f = 0,
                  u = 0;
                u < n.length;
                u++
              )
                (e = n[u]),
                  (e.TreeDirection = "Down"),
                  (c = this.measure(e, o.Empty)),
                  (f += c.width + this.options.horizontalSeparation);
              for (
                f -= this.options.horizontalSeparation,
                  f -= n[n.length - 1].width,
                  f += n[n.length - 1].associatedShape.bounds().width,
                  s = this.center.x + this.center.width / 2 - f / 2,
                  h =
                    this.center.y +
                    this.options.verticalSeparation +
                    this.center.height,
                  u = 0;
                u < n.length;
                u++
              )
                (e = n[u]),
                  (l = new r(s, h)),
                  this.arrange(e, l),
                  (s += e.Size.width + this.options.horizontalSeparation);
            },
            calculateAngularWidth: function (n, t) {
              var i, u, f, e, r, o, s;
              if (
                (t > this.maxDepth && (this.maxDepth = t),
                (i = 0),
                (u = 1e3),
                (f = 1e3),
                (e = 0 === t ? 0 : Math.sqrt(u * u + f * f) / t),
                n.children.length > 0)
              ) {
                for (r = 0, o = n.children.length; r < o; r++)
                  (s = n.children[r]),
                    (i += this.calculateAngularWidth(s, t + 1));
                i = Math.max(e, i);
              } else i = e;
              return (n.sectorAngle = i), i;
            },
            sortChildren: function (n) {
              var i,
                f,
                s,
                h,
                e,
                c,
                o,
                l,
                u,
                a,
                v,
                y = 0;
              if (n.parents.length > 1) throw "Node is not part of a tree.";
              if (
                ((f = n.parents[0]),
                f &&
                  ((s = new r(f.x, f.y)),
                  (h = new r(n.x, n.y)),
                  (y = this.normalizeAngle(Math.atan2(s.y - h.y, s.x - h.x)))),
                (e = n.children.length),
                0 === e)
              )
                return null;
              for (c = [], o = [], i = 0; i < e; ++i)
                (l = n.children[i]),
                  (u = new r(l.x, l.y)),
                  (o[i] = i),
                  (c[i] = this.normalizeAngle(
                    -y + Math.atan2(u.y - u.y, u.x - u.x)
                  ));
              for (t.bisort(c, o), a = [], v = n.children, i = 0; i < e; ++i)
                a.push(v[o[i]]);
              return a;
            },
            normalizeAngle: function (n) {
              for (; n > 2 * Math.PI; ) n -= 2 * Math.PI;
              for (; n < 0; ) n += 2 * Math.PI;
              return n;
            },
            radialLayout: function (n, t, i, r) {
              for (
                var u,
                  h,
                  f,
                  e = r - i,
                  a = e / 2,
                  v = n.sectorAngle,
                  s = 0,
                  l = this.sortChildren(n),
                  o = 0,
                  c = l.length;
                o < c;
                o++
              )
                (u = l[o]),
                  (h = u),
                  (f = h.sectorAngle / v),
                  u.children.length > 0 &&
                    this.radialLayout(
                      u,
                      t + this.options.radialSeparation,
                      i + s * e,
                      i + (s + f) * e
                    ),
                  this.setPolarLocation(u, t, i + s * e + f * a),
                  (h.angle = f * e),
                  (s += f);
            },
            setPolarLocation: function (n, t, i) {
              n.x = this.origin.x + t * Math.cos(i);
              n.y = this.origin.y + t * Math.sin(i);
              n.BoundingRectangle = new f(n.x, n.y, n.width, n.height);
            },
            setChildrenDirection: function (n, t, i) {
              var r = n.treeDirection;
              this.graph.depthFirstTraversal(n, function (n) {
                n.treeDirection = t;
              });
              i || (n.treeDirection = r);
            },
            setChildrenLayout: function (n, i, r, u) {
              t.isUndefined(u) && (u = 0);
              var f = n.childrenLayout;
              u > 0
                ? (this.graph.assignLevels(n),
                  this.graph.depthFirstTraversal(n, function (n) {
                    n.level >= u + 1 && (n.childrenLayout = i);
                  }))
                : (this.graph.depthFirstTraversal(n, function (n) {
                    n.childrenLayout = i;
                  }),
                  r || (n.childrenLayout = f));
            },
            measure: function (n, i) {
              var r,
                v,
                s,
                h,
                y,
                e,
                c,
                u = 0,
                f = 0,
                a = new o(0, 0);
              if (!n) throw "";
              if (
                ((v = n.associatedShape.bounds()),
                (s = v.width),
                (h = v.height),
                1 !== n.parents.length)
              )
                throw "Node not in a spanning tree.";
              if (
                ((y = n.parents[0]),
                "Undefined" === n.treeDirection &&
                  (n.treeDirection = y.treeDirection),
                t.isEmpty(n.children))
              )
                a = new o(Math.abs(s) < l ? 50 : s, Math.abs(h) < l ? 25 : h);
              else if (1 === n.children.length) {
                switch (n.treeDirection) {
                  case "Radial":
                    r = this.measure(n.children[0], i);
                    u =
                      s +
                      this.options.radialSeparation *
                        Math.cos(n.AngleToParent) +
                      r.width;
                    f =
                      h +
                      Math.abs(
                        this.options.radialSeparation *
                          Math.sin(n.AngleToParent)
                      ) +
                      r.height;
                    break;
                  case "Left":
                  case "Right":
                    switch (n.childrenLayout) {
                      case "TopAlignedWithParent":
                        break;
                      case "BottomAlignedWithParent":
                        break;
                      case "Underneath":
                        r = this.measure(n.children[0], i);
                        u =
                          s + r.width + this.options.underneathHorizontalOffset;
                        f =
                          h +
                          this.options.underneathVerticalTopOffset +
                          r.height;
                        break;
                      case "Default":
                        r = this.measure(n.children[0], i);
                        u = s + this.options.horizontalSeparation + r.width;
                        f = Math.max(h, r.height);
                        break;
                      default:
                        throw "Unhandled TreeDirection in the Radial layout measuring.";
                    }
                    break;
                  case "Up":
                  case "Down":
                    switch (n.childrenLayout) {
                      case "TopAlignedWithParent":
                      case "BottomAlignedWithParent":
                        break;
                      case "Underneath":
                        r = this.measure(n.children[0], i);
                        u = Math.max(
                          s,
                          r.width + this.options.underneathHorizontalOffset
                        );
                        f =
                          h +
                          this.options.underneathVerticalTopOffset +
                          r.height;
                        break;
                      case "Default":
                        r = this.measure(n.children[0], i);
                        f = h + this.options.verticalSeparation + r.height;
                        u = Math.max(s, r.width);
                        break;
                      default:
                        throw "Unhandled TreeDirection in the Down layout measuring.";
                    }
                    break;
                  default:
                    throw "Unhandled TreeDirection in the layout measuring.";
                }
                a = new o(u, f);
              } else {
                switch (n.treeDirection) {
                  case "Left":
                  case "Right":
                    switch (n.childrenLayout) {
                      case "TopAlignedWithParent":
                      case "BottomAlignedWithParent":
                        break;
                      case "Underneath":
                        for (
                          u = s,
                            f = h + this.options.underneathVerticalTopOffset,
                            e = 0;
                          e < n.children.length;
                          e++
                        )
                          (c = n.children[e]),
                            (r = this.measure(c, i)),
                            (u = Math.max(
                              u,
                              r.width + this.options.underneathHorizontalOffset
                            )),
                            (f +=
                              r.height +
                              this.options.underneathVerticalSeparation);
                        f -= this.options.underneathVerticalSeparation;
                        break;
                      case "Default":
                        for (u = s, f = 0, e = 0; e < n.children.length; e++)
                          (c = n.children[e]),
                            (r = this.measure(c, i)),
                            (u = Math.max(
                              u,
                              s + this.options.horizontalSeparation + r.width
                            )),
                            (f += r.height + this.options.verticalSeparation);
                        f -= this.options.verticalSeparation;
                        break;
                      default:
                        throw "Unhandled TreeDirection in the Right layout measuring.";
                    }
                    break;
                  case "Up":
                  case "Down":
                    switch (n.childrenLayout) {
                      case "TopAlignedWithParent":
                      case "BottomAlignedWithParent":
                        break;
                      case "Underneath":
                        for (
                          u = s,
                            f = h + this.options.underneathVerticalTopOffset,
                            e = 0;
                          e < n.children.length;
                          e++
                        )
                          (c = n.children[e]),
                            (r = this.measure(c, i)),
                            (u = Math.max(
                              u,
                              r.width + this.options.underneathHorizontalOffset
                            )),
                            (f +=
                              r.height +
                              this.options.underneathVerticalSeparation);
                        f -= this.options.underneathVerticalSeparation;
                        break;
                      case "Default":
                        for (u = 0, f = 0, e = 0; e < n.children.length; e++)
                          (c = n.children[e]),
                            (r = this.measure(c, i)),
                            (u += r.width + this.options.horizontalSeparation),
                            (f = Math.max(
                              f,
                              r.height + this.options.verticalSeparation + h
                            ));
                        u -= this.options.horizontalSeparation;
                        break;
                      default:
                        throw "Unhandled TreeDirection in the Down layout measuring.";
                    }
                    break;
                  default:
                    throw "Unhandled TreeDirection in the layout measuring.";
                }
                a = new o(u, f);
              }
              return (
                (n.SectorAngle = Math.sqrt((u * u) / 4 + (f * f) / 4)),
                (n.Size = a),
                a
              );
            },
            arrange: function (n, i) {
              var u,
                c,
                p,
                o,
                a,
                h,
                s,
                e,
                w = n.associatedShape.bounds(),
                v = w.width,
                y = w.height;
              if (t.isEmpty(n.children))
                (n.x = i.x),
                  (n.y = i.y),
                  (n.BoundingRectangle = new f(i.x, i.y, v, y));
              else
                switch (n.treeDirection) {
                  case "Left":
                    switch (n.childrenLayout) {
                      case "TopAlignedWithParent":
                      case "BottomAlignedWithParent":
                        break;
                      case "Underneath":
                        for (
                          e = i,
                            n.x = e.x,
                            n.y = e.y,
                            n.BoundingRectangle = new f(
                              n.x,
                              n.y,
                              n.width,
                              n.height
                            ),
                            s =
                              i.y +
                              y +
                              this.options.underneathVerticalTopOffset,
                            u = 0;
                          u < o.children.length;
                          u++
                        )
                          (o = o.children[u]),
                            (h =
                              e.x -
                              o.associatedShape.width -
                              this.options.underneathHorizontalOffset),
                            (c = new r(h, s)),
                            this.arrange(o, c),
                            (s +=
                              o.Size.height +
                              this.options.underneathVerticalSeparation);
                        break;
                      case "Default":
                        for (
                          e = new r(
                            i.x + n.Size.width - v,
                            i.y + (n.Size.height - y) / 2
                          ),
                            n.x = e.x,
                            n.y = e.y,
                            n.BoundingRectangle = new f(
                              n.x,
                              n.y,
                              n.width,
                              n.height
                            ),
                            h = e.x - this.options.horizontalSeparation,
                            s = i.y,
                            u = 0;
                          u < n.children.length;
                          u++
                        )
                          (o = n.children[u]),
                            (c = new r(h - o.Size.width, s)),
                            this.arrange(o, c),
                            (s +=
                              o.Size.height + this.options.verticalSeparation);
                        break;
                      default:
                        throw "Unsupported TreeDirection";
                    }
                    break;
                  case "Right":
                    switch (n.childrenLayout) {
                      case "TopAlignedWithParent":
                      case "BottomAlignedWithParent":
                        break;
                      case "Underneath":
                        for (
                          e = i,
                            n.x = e.x,
                            n.y = e.y,
                            n.BoundingRectangle = new f(
                              n.x,
                              n.y,
                              n.width,
                              n.height
                            ),
                            h =
                              i.x + v + this.options.underneathHorizontalOffset,
                            s =
                              i.y +
                              y +
                              this.options.underneathVerticalTopOffset,
                            u = 0;
                          u < n.children.length;
                          u++
                        )
                          (o = n.children[u]),
                            (c = new r(h, s)),
                            this.arrange(o, c),
                            (s +=
                              o.Size.height +
                              this.options.underneathVerticalSeparation);
                        break;
                      case "Default":
                        for (
                          e = new r(i.x, i.y + (n.Size.height - y) / 2),
                            n.x = e.x,
                            n.y = e.y,
                            n.BoundingRectangle = new f(
                              n.x,
                              n.y,
                              n.width,
                              n.height
                            ),
                            h = i.x + v + this.options.horizontalSeparation,
                            s = i.y,
                            u = 0;
                          u < n.children.length;
                          u++
                        )
                          (o = n.children[u]),
                            (c = new r(h, s)),
                            this.arrange(o, c),
                            (s +=
                              o.Size.height + this.options.verticalSeparation);
                        break;
                      default:
                        throw "Unsupported TreeDirection";
                    }
                    break;
                  case "Up":
                    if (
                      ((e = new r(
                        i.x + (n.Size.width - v) / 2,
                        i.y + n.Size.height - y
                      )),
                      (n.x = e.x),
                      (n.y = e.y),
                      (n.BoundingRectangle = new f(
                        n.x,
                        n.y,
                        n.width,
                        n.height
                      )),
                      Math.abs(e.x - i.x) < l)
                    ) {
                      for (a = 0, u = 0; u < n.children.length; u++)
                        (p = n.children[u]),
                          (a +=
                            p.Size.width + this.options.horizontalSeparation);
                      a -= this.options.horizontalSeparation;
                      h = i.x + (v - a) / 2;
                    } else h = i.x;
                    for (u = 0; u < n.children.length; u++)
                      (o = n.children[u]),
                        (s =
                          e.y -
                          this.options.verticalSeparation -
                          o.Size.height),
                        (c = new r(h, s)),
                        this.arrange(o, c),
                        (h += o.Size.width + this.options.horizontalSeparation);
                    break;
                  case "Down":
                    switch (n.childrenLayout) {
                      case "TopAlignedWithParent":
                      case "BottomAlignedWithParent":
                        break;
                      case "Underneath":
                        for (
                          e = i,
                            n.x = e.x,
                            n.y = e.y,
                            n.BoundingRectangle = new f(
                              n.x,
                              n.y,
                              n.width,
                              n.height
                            ),
                            h = i.x + this.options.underneathHorizontalOffset,
                            s =
                              i.y +
                              y +
                              this.options.underneathVerticalTopOffset,
                            u = 0;
                          u < n.children.length;
                          u++
                        )
                          (o = n.children[u]),
                            (c = new r(h, s)),
                            this.arrange(o, c),
                            (s +=
                              o.Size.height +
                              this.options.underneathVerticalSeparation);
                        break;
                      case "Default":
                        if (
                          ((e = new r(i.x + (n.Size.width - v) / 2, i.y)),
                          (n.x = e.x),
                          (n.y = e.y),
                          (n.BoundingRectangle = new f(
                            n.x,
                            n.y,
                            n.width,
                            n.height
                          )),
                          Math.abs(e.x - i.x) < l)
                        ) {
                          for (a = 0, u = 0; u < n.children.length; u++)
                            (p = n.children[u]),
                              (a +=
                                p.Size.width +
                                this.options.horizontalSeparation);
                          a -= this.options.horizontalSeparation;
                          h = i.x + (v - a) / 2;
                        } else h = i.x;
                        for (u = 0; u < n.children.length; u++)
                          (o = n.children[u]),
                            (s = e.y + this.options.verticalSeparation + y),
                            (c = new r(h, s)),
                            this.arrange(o, c),
                            (h +=
                              o.Size.width + this.options.horizontalSeparation);
                        break;
                      default:
                        throw "Unsupported TreeDirection";
                    }
                    break;
                  case "None":
                    break;
                  default:
                    throw "Unsupported TreeDirection";
                }
            },
            layoutSwitch: function () {
              var r, u, f, e, i, n;
              if (this.center && !t.isEmpty(this.center.children))
                switch (
                  ((r = this.options.subtype),
                  t.isUndefined(r) && (r = "Down"),
                  (n = this.center.children),
                  r.toLowerCase())
                ) {
                  case "radial":
                  case "radialtree":
                    this.layoutRadialTree();
                    break;
                  case "mindmaphorizontal":
                  case "mindmap":
                    u = this.center.children;
                    1 === this.center.children.length
                      ? this.layoutRight(u)
                      : ((i = n.length / 2),
                        (f = c(this.center.children, function (r) {
                          return t.indexOf(n, r) < i;
                        })),
                        (e = c(this.center.children, function (r) {
                          return t.indexOf(n, r) >= i;
                        })),
                        this.layoutLeft(f),
                        this.layoutRight(e));
                    break;
                  case "mindmapvertical":
                    u = this.center.children;
                    1 === this.center.children.length
                      ? this.layoutDown(u)
                      : ((i = n.length / 2),
                        (f = c(this.center.children, function (r) {
                          return t.indexOf(n, r) < i;
                        })),
                        (e = c(this.center.children, function (r) {
                          return t.indexOf(n, r) >= i;
                        })),
                        this.layoutUp(f),
                        this.layoutDown(e));
                    break;
                  case "right":
                    this.layoutRight(this.center.children);
                    break;
                  case "left":
                    this.layoutLeft(this.center.children);
                    break;
                  case "up":
                  case "bottom":
                    this.layoutUp(this.center.children);
                    break;
                  case "down":
                  case "top":
                    this.layoutDown(this.center.children);
                    break;
                  case "tipover":
                  case "tipovertree":
                    if (this.options.tipOverTreeStartLevel < 0)
                      throw "The tip-over level should be a positive integer.";
                    this.tipOverTree(
                      this.center.children,
                      this.options.tipOverTreeStartLevel
                    );
                }
            },
          }),
          tt = s.extend({
            init: function (n) {
              var i = this;
              if ((s.fn.init.call(i), t.isUndefined(n)))
                throw "No diagram specified.";
              this.diagram = n;
            },
            layout: function (n) {
              var t, i;
              return (
                this.transferOptions(n),
                (t = new a(this.diagram)),
                (this.graph = t.convert()),
                (i = this.layoutComponents()),
                new u.LayoutState(this.diagram, i)
              );
            },
            layoutComponents: function () {
              var n, e, u, i, o, r, s, f;
              if (
                !this.graph.isEmpty() &&
                ((n = this.graph.getConnectedComponents()), !t.isEmpty(n))
              ) {
                for (
                  e = new nt(this.options), u = [], i = 0;
                  i < n.length;
                  i++
                ) {
                  if (((o = n[i]), (r = this.getTree(o)), !r))
                    throw "Failed to find a spanning tree for the component.";
                  s = r.root;
                  f = r.tree;
                  e.layout(f, s);
                  u.push(f);
                }
                return this.gridLayoutComponents(u);
              }
            },
            getTree: function (n) {
              var i,
                f,
                u,
                r,
                e,
                t = null;
              if (this.options.roots && this.options.roots.length > 0)
                for (i = 0, f = n.nodes.length; i < f; i++)
                  for (
                    u = n.nodes[i], r = 0;
                    r < this.options.roots.length;
                    r++
                  )
                    if (
                      ((e = this.options.roots[r]), e === u.associatedShape)
                    ) {
                      t = u;
                      break;
                    }
              if (!t && ((t = n.root()), !t))
                throw "Unable to find a root for the tree.";
              return this.getTreeForRoot(n, t);
            },
            getTreeForRoot: function (n, i) {
              var r = n.getSpanningTree(i);
              return t.isUndefined(r) || r.isEmpty()
                ? null
                : { tree: r, root: r.root };
            },
          }),
          it = s.extend({
            init: function (n) {
              var i = this;
              if ((s.fn.init.call(i), t.isUndefined(n)))
                throw "Diagram is not specified.";
              this.diagram = n;
            },
            layout: function (n) {
              var e, f, i, r, o, s;
              if (
                (this.transferOptions(n),
                (e = new a(this.diagram)),
                (f = e.convert(n)),
                !f.isEmpty() &&
                  ((i = f.getConnectedComponents()), !t.isEmpty(i)))
              ) {
                for (r = 0; r < i.length; r++)
                  (o = i[r]), this.layoutGraph(o, n);
                return (
                  (s = this.gridLayoutComponents(i)),
                  new u.LayoutState(this.diagram, s)
                );
              }
            },
            _initRuntimeProperties: function () {
              for (var n, t = 0; t < this.graph.nodes.length; t++)
                (n = this.graph.nodes[t]),
                  (n.layer = -1),
                  (n.downstreamLinkCount = 0),
                  (n.upstreamLinkCount = 0),
                  (n.isVirtual = !1),
                  (n.uBaryCenter = 0),
                  (n.dBaryCenter = 0),
                  (n.upstreamPriority = 0),
                  (n.downstreamPriority = 0),
                  (n.gridPosition = 0);
            },
            _prepare: function (n) {
              var r,
                f,
                v,
                y,
                s,
                e,
                p,
                w,
                c,
                l,
                o,
                a = [],
                u = new i(),
                b = 0;
              for (
                t.forEach(n.nodes, function (n) {
                  0 === n.incoming.length && (u.set(n, 0), a.push(n));
                });
                a.length > 0;

              )
                for (s = a.shift(), r = 0; r < s.outgoing.length; r++)
                  (v = s.outgoing[r]),
                    (e = v.target),
                    (y = u.containsKey(e)
                      ? Math.max(u.get(s) + 1, u.get(e))
                      : u.get(s) + 1),
                    u.set(e, y),
                    y > b && (b = y),
                    h(a, e) || a.push(e);
              for (
                p = u.keys(),
                  p.sort(function (n, i) {
                    var r = u.get(n),
                      f = u.get(i);
                    return t.sign(f - r);
                  }),
                  w = 0;
                w < p.length;
                ++w
              )
                if (
                  ((c = p[w]), (l = Number.MAX_VALUE), 0 !== c.outgoing.length)
                ) {
                  for (f = 0; f < c.outgoing.length; ++f)
                    (v = c.outgoing[f]), (l = Math.min(l, u.get(v.target)));
                  l > 1 && u.set(c, l - 1);
                }
              for (this.layers = [], r = 0; r < b + 1; r++)
                (o = []), (o.linksTo = {}), this.layers.push(o);
              for (
                u.forEach(function (n, t) {
                  n.layer = t;
                  this.layers[t].push(n);
                }, this),
                  f = 0;
                f < this.layers.length;
                f++
              )
                for (o = this.layers[f], r = 0; r < o.length; r++)
                  o[r].gridPosition = r;
            },
            layoutGraph: function (n, i) {
              if (t.isUndefined(n))
                throw "No graph given or graph analysis of the diagram failed.";
              t.isDefined(i) && this.transferOptions(i);
              this.graph = n;
              n.setItemIndices();
              var r = n.makeAcyclic();
              this._initRuntimeProperties();
              this._prepare(n, i);
              this._dummify();
              this._optimizeCrossings();
              this._swapPairs();
              this.arrangeNodes();
              this._moveThingsAround();
              this._dedummify();
              t.forEach(r, function (n) {
                n.points && n.points.reverse();
              });
            },
            setMinDist: function (n, t, i) {
              var r = n.layer,
                u = n.layerIndex;
              this.minDistances[r][u] = i;
            },
            getMinDist: function (n, t) {
              for (
                var r = 0,
                  u = n.layerIndex,
                  f = t.layerIndex,
                  e = n.layer,
                  o = Math.min(u, f),
                  s = Math.max(u, f),
                  i = o;
                i < s;
                ++i
              )
                r += this.minDistances[e][i];
              return r;
            },
            placeLeftToRight: function (n) {
              for (
                var r, u, e, h, c, f, l, a, v, o = new i(), s = 0;
                s < this.layers.length;
                ++s
              )
                if ((e = n[s])) {
                  for (r = 0; r < e.length; r++)
                    (u = e[r]), o.containsKey(u) || this.placeLeft(u, o, s);
                  for (h = Number.POSITIVE_INFINITY, r = 0; r < e.length; r++)
                    (u = e[r]),
                      (c = this.rightSibling(u)),
                      c &&
                        this.nodeLeftClass.get(c) !== s &&
                        (h = Math.min(
                          h,
                          o.get(c) - o.get(u) - this.getMinDist(u, c)
                        ));
                  if (h === Number.POSITIVE_INFINITY) {
                    for (f = [], r = 0; r < e.length; r++)
                      for (
                        u = e[r],
                          l = [],
                          t.addRange(l, this.upNodes.get(u)),
                          t.addRange(l, this.downNodes.get(u)),
                          a = 0;
                        a < l.length;
                        a++
                      )
                        (v = l[a]),
                          this.nodeLeftClass.get(v) < s &&
                            f.push(o.get(v) - o.get(u));
                    f.sort();
                    h =
                      0 === f.length
                        ? 0
                        : f.length % 2 == 1
                        ? f[this.intDiv(f.length, 2)]
                        : (f[this.intDiv(f.length, 2) - 1] +
                            f[this.intDiv(f.length, 2)]) /
                          2;
                  }
                  for (r = 0; r < e.length; r++)
                    (u = e[r]), o.set(u, o.get(u) + h);
                }
              return o;
            },
            placeRightToLeft: function (n) {
              for (
                var r, u, e, h, c, f, l, a, v, o = new i(), s = 0;
                s < this.layers.length;
                ++s
              )
                if ((e = n[s])) {
                  for (r = 0; r < e.length; r++)
                    (u = e[r]), o.containsKey(u) || this.placeRight(u, o, s);
                  for (h = Number.NEGATIVE_INFINITY, r = 0; r < e.length; r++)
                    (u = e[r]),
                      (c = this.leftSibling(u)),
                      c &&
                        this.nodeRightClass.get(c) !== s &&
                        (h = Math.max(
                          h,
                          o.get(c) - o.get(u) + this.getMinDist(c, u)
                        ));
                  if (h === Number.NEGATIVE_INFINITY) {
                    for (f = [], r = 0; r < e.length; r++)
                      for (
                        u = e[r],
                          l = [],
                          t.addRange(l, this.upNodes.get(u)),
                          t.addRange(l, this.downNodes.get(u)),
                          a = 0;
                        a < l.length;
                        a++
                      )
                        (v = l[a]),
                          this.nodeRightClass.get(v) < s &&
                            f.push(o.get(u) - o.get(v));
                    f.sort();
                    h =
                      0 === f.length
                        ? 0
                        : f.length % 2 == 1
                        ? f[this.intDiv(f.length, 2)]
                        : (f[this.intDiv(f.length, 2) - 1] +
                            f[this.intDiv(f.length, 2)]) /
                          2;
                  }
                  for (r = 0; r < e.length; r++)
                    (u = e[r]), o.set(u, o.get(u) + h);
                }
              return o;
            },
            _getLeftWing: function () {
              var n = { value: null },
                t = this.computeClasses(n, 1);
              return (this.nodeLeftClass = n.value), t;
            },
            _getRightWing: function () {
              var n = { value: null },
                t = this.computeClasses(n, -1);
              return (this.nodeRightClass = n.value), t;
            },
            computeClasses: function (n, t) {
              for (
                var s,
                  e,
                  r,
                  l,
                  h,
                  v,
                  u,
                  a,
                  c = 0,
                  o = (n.value = new i()),
                  f = 0;
                f < this.layers.length;
                ++f
              )
                for (
                  c = f, s = this.layers[f], e = 1 === t ? 0 : s.length - 1;
                  0 <= e && e < s.length;
                  e += t
                )
                  if (((r = s[e]), o.containsKey(r))) c = o.get(r);
                  else if ((o.set(r, c), r.isVirtual))
                    for (l = this._nodesInLink(r), h = 0; h < l.length; h++)
                      (v = l[h]), o.set(v, c);
              for (u = [], a = 0; a < this.layers.length; a++) u.push(null);
              return (
                o.forEach(function (n, t) {
                  null === u[t] && (u[t] = []);
                  u[t].push(n);
                }),
                u
              );
            },
            _isVerticalLayout: function () {
              return (
                "up" === this.options.subtype.toLowerCase() ||
                "down" === this.options.subtype.toLowerCase() ||
                "vertical" === this.options.subtype.toLowerCase()
              );
            },
            _isHorizontalLayout: function () {
              return (
                "right" === this.options.subtype.toLowerCase() ||
                "left" === this.options.subtype.toLowerCase() ||
                "horizontal" === this.options.subtype.toLowerCase()
              );
            },
            _isIncreasingLayout: function () {
              return (
                "right" === this.options.subtype.toLowerCase() ||
                "down" === this.options.subtype.toLowerCase()
              );
            },
            _moveThingsAround: function () {
              function st(n, t) {
                for (var u, r = Number.MIN_VALUE, i = 0; i < n.length; ++i)
                  (u = n[i]),
                    (r = t._isVerticalLayout()
                      ? Math.max(r, u.height)
                      : Math.max(r, u.width));
                return r;
              }
              for (
                var n,
                  e,
                  u,
                  r,
                  a,
                  w,
                  h,
                  c,
                  d,
                  b,
                  k,
                  g,
                  nt,
                  tt,
                  it,
                  o,
                  v,
                  l,
                  s,
                  rt,
                  ut,
                  ft,
                  et,
                  ot,
                  y,
                  p,
                  f = 0;
                f < this.layers.length;
                ++f
              )
                (u = this.layers[f]), u.sort(this._gridPositionComparer);
              for (this.minDistances = [], f = 0; f < this.layers.length; ++f)
                for (
                  u = this.layers[f], this.minDistances[f] = [], r = 0;
                  r < u.length;
                  ++r
                )
                  (e = u[r]),
                    (e.layerIndex = r),
                    (this.minDistances[f][r] = this.options.nodeDistance),
                    r < u.length - 1 &&
                      (this.minDistances[f][r] += this._isVerticalLayout()
                        ? (e.width + u[r + 1].width) / 2
                        : (e.height + u[r + 1].height) / 2);
              for (
                this.downNodes = new i(),
                  this.upNodes = new i(),
                  t.forEach(
                    this.graph.nodes,
                    function (n) {
                      this.downNodes.set(n, []);
                      this.upNodes.set(n, []);
                    },
                    this
                  ),
                  t.forEach(
                    this.graph.links,
                    function (n) {
                      var r = n.source,
                        u = n.target,
                        t = null,
                        i = null;
                      r.layer > u.layer
                        ? ((t = n.source), (i = n.target))
                        : ((i = n.source), (t = n.target));
                      this.downNodes.get(i).push(t);
                      this.upNodes.get(t).push(i);
                    },
                    this
                  ),
                  this.downNodes.forEachValue(function (n) {
                    n.sort(this._gridPositionComparer);
                  }, this),
                  this.upNodes.forEachValue(function (n) {
                    n.sort(this._gridPositionComparer);
                  }, this),
                  f = 0;
                f < this.layers.length - 1;
                ++f
              )
                for (u = this.layers[f], a = 0; a < u.length - 1; a++)
                  if (
                    ((w = u[a]),
                    w.isVirtual &&
                      ((h = this.downNodes.get(w)[0]), h.isVirtual))
                  )
                    for (r = a + 1; r < u.length; ++r)
                      (e = u[r]),
                        e.isVirtual &&
                          ((c = this.downNodes.get(e)[0]),
                          c.isVirtual &&
                            h.gridPosition > c.gridPosition &&
                            ((d = h.gridPosition),
                            (h.gridPosition = c.gridPosition),
                            (c.gridPosition = d),
                            (b = h.layerIndex),
                            (k = c.layerIndex),
                            (this.layers[f + 1][b] = c),
                            (this.layers[f + 1][k] = h),
                            (h.layerIndex = k),
                            (c.layerIndex = b)));
              for (
                g = this._getLeftWing(),
                  nt = this._getRightWing(),
                  tt = this.placeLeftToRight(g),
                  it = this.placeRightToLeft(nt),
                  o = new i(),
                  t.forEach(this.graph.nodes, function (n) {
                    o.set(n, (tt.get(n) + it.get(n)) / 2);
                  }),
                  v = new i(),
                  l = new i(),
                  f = 0;
                f < this.layers.length;
                ++f
              )
                for (
                  u = this.layers[f], s = -1, rt = -1, r = 0;
                  r < u.length;
                  ++r
                )
                  (e = u[r]),
                    v.set(e, 0),
                    l.set(e, !1),
                    e.isVirtual &&
                      (s === -1
                        ? (s = r)
                        : s === r - 1
                        ? (s = r)
                        : ((rt = r),
                          v.set(u[s], 0),
                          o.get(e) - o.get(u[s]) === this.getMinDist(u[s], e)
                            ? l.set(u[s], !0)
                            : l.set(u[s], !1),
                          (s = r)));
              for (
                ut = [1, -1],
                  t.forEach(
                    ut,
                    function (t) {
                      for (
                        var u,
                          f,
                          r,
                          i,
                          s,
                          h,
                          c = 1 === t ? 0 : this.layers.length - 1,
                          e = c;
                        0 <= e && e < this.layers.length;
                        e += t
                      ) {
                        if (
                          ((u = this.layers[e]),
                          (f = this._firstVirtualNode(u)),
                          (r = null),
                          (i = null),
                          f !== -1)
                        )
                          for (r = u[f], i = [], n = 0; n < f; n++)
                            i.push(u[n]);
                        else (r = null), (i = u);
                        if (i.length > 0) {
                          for (
                            this._sequencer(o, null, r, t, i), n = 0;
                            n < i.length - 1;
                            ++n
                          )
                            this.setMinDist(
                              i[n],
                              i[n + 1],
                              o.get(i[n + 1]) - o.get(i[n])
                            );
                          r &&
                            this.setMinDist(
                              i[i.length - 1],
                              r,
                              o.get(r) - o.get(i[i.length - 1])
                            );
                        }
                        for (; r; ) {
                          if ((s = this.nextVirtualNode(u, r))) {
                            if (v.get(r) === t) {
                              for (
                                f = r.layerIndex,
                                  h = s.layerIndex,
                                  i = [],
                                  n = f + 1;
                                n < h;
                                n++
                              )
                                i.push(u[n]);
                              i.length > 0 && this._sequencer(o, r, s, t, i);
                              l.set(r, !0);
                            }
                          } else {
                            for (
                              f = r.layerIndex, i = [], n = f + 1;
                              n < u.length;
                              n++
                            )
                              i.push(u[n]);
                            if (i.length > 0) {
                              for (
                                this._sequencer(o, r, null, t, i), n = 0;
                                n < i.length - 1;
                                ++n
                              )
                                this.setMinDist(
                                  i[n],
                                  i[n + 1],
                                  o.get(i[n + 1]) - o.get(i[n])
                                );
                              this.setMinDist(r, i[0], o.get(i[0]) - o.get(r));
                            }
                          }
                          r = s;
                        }
                        this.adjustDirections(e, t, v, l);
                      }
                    },
                    this
                  ),
                  ft = this._isIncreasingLayout() ? 0 : this.layers.length - 1,
                  et = function (n, t) {
                    return t._isIncreasingLayout()
                      ? n < t.layers.length
                      : n >= 0;
                  },
                  ot = this._isIncreasingLayout() ? 1 : -1,
                  y = 0,
                  n = ft;
                et(n, this);
                n += ot
              ) {
                for (
                  u = this.layers[n], p = st(u, this), r = 0;
                  r < u.length;
                  ++r
                )
                  (e = u[r]),
                    this._isVerticalLayout()
                      ? ((e.x = o.get(e)), (e.y = y + p / 2))
                      : ((e.x = y + p / 2), (e.y = o.get(e)));
                y += this.options.layerSeparation + p;
              }
            },
            adjustDirections: function (n, t, i, r) {
              var u, h, f, c, e, l, a, v, y, p, o, w, b, s;
              if (!(n + t < 0 || n + t >= this.layers.length))
                for (
                  u = null, h = null, f = this.layers[n + t], c = 0;
                  c < f.length;
                  ++c
                )
                  if (
                    ((e = f[c]),
                    e.isVirtual &&
                      ((l = this.getNeighborOnLayer(e, n)), l.isVirtual))
                  ) {
                    if (u) {
                      for (
                        a = r.get(h),
                          v = this.layers[n],
                          y = h.layerIndex,
                          p = l.layerIndex,
                          o = y + 1;
                        o < p;
                        ++o
                      )
                        v[o].isVirtual && (a = a && r.get(v[o]));
                      if (a)
                        for (
                          i.set(u, t),
                            w = u.layerIndex,
                            b = e.layerIndex,
                            s = w + 1;
                          s < b;
                          ++s
                        )
                          f[s].isVirtual && i.set(f[s], t);
                    }
                    u = e;
                    h = l;
                  }
            },
            getNeighborOnLayer: function (n, t) {
              var i = this.upNodes.get(n)[0];
              return i.layer === t
                ? i
                : ((i = this.downNodes.get(n)[0]), i.layer === t ? i : null);
            },
            _sequencer: function (n, t, i, r, u) {
              if (
                (1 === u.length && this._sequenceSingle(n, t, i, r, u[0]),
                u.length > 1)
              ) {
                var e = u.length,
                  f = this.intDiv(e, 2);
                this._sequencer(n, t, i, r, u.slice(0, f));
                this._sequencer(n, t, i, r, u.slice(f));
                this.combineSequences(n, t, i, r, u);
              }
            },
            _sequenceSingle: function (n, t, i, r, u) {
              var e = r === -1 ? this.downNodes.get(u) : this.upNodes.get(u),
                f = e.length;
              0 !== f &&
                (f % 2 == 1
                  ? n.set(u, n.get(e[this.intDiv(f, 2)]))
                  : n.set(
                      u,
                      (n.get(e[this.intDiv(f, 2) - 1]) +
                        n.get(e[this.intDiv(f, 2)])) /
                        2
                    ),
                t &&
                  n.set(
                    u,
                    Math.max(n.get(u), n.get(t) + this.getMinDist(t, u))
                  ),
                i &&
                  n.set(
                    u,
                    Math.min(n.get(u), n.get(i) - this.getMinDist(u, i))
                  ));
            },
            combineSequences: function (n, t, i, r, u) {
              for (
                var o,
                  s,
                  c,
                  l,
                  a,
                  h,
                  p,
                  w,
                  v,
                  b = u.length,
                  e = this.intDiv(b, 2),
                  y = [],
                  f = 0;
                f < e;
                ++f
              ) {
                for (
                  o = 0,
                    c =
                      r === -1
                        ? this.downNodes.get(u[f])
                        : this.upNodes.get(u[f]),
                    s = 0;
                  s < c.length;
                  ++s
                )
                  (l = c[s]),
                    n.get(l) >= n.get(u[f])
                      ? o++
                      : (o--,
                        y.push({
                          k: n.get(l) + this.getMinDist(u[f], u[e - 1]),
                          v: 2,
                        }));
                y.push({
                  k: n.get(u[f]) + this.getMinDist(u[f], u[e - 1]),
                  v: o,
                });
              }
              for (
                t &&
                  y.push({
                    k: n.get(t) + this.getMinDist(t, u[e - 1]),
                    v: Number.MAX_VALUE,
                  }),
                  y.sort(this._positionDescendingComparer),
                  h = [],
                  f = e;
                f < b;
                ++f
              ) {
                for (
                  o = 0,
                    c =
                      r === -1
                        ? this.downNodes.get(u[f])
                        : this.upNodes.get(u[f]),
                    s = 0;
                  s < c.length;
                  ++s
                )
                  (l = c[s]),
                    n.get(l) <= n.get(u[f])
                      ? o++
                      : (o--,
                        h.push({
                          k: n.get(l) - this.getMinDist(u[f], u[e]),
                          v: 2,
                        }));
                h.push({ k: n.get(u[f]) - this.getMinDist(u[f], u[e]), v: o });
              }
              for (
                i &&
                  h.push({
                    k: n.get(i) - this.getMinDist(i, u[e]),
                    v: Number.MAX_VALUE,
                  }),
                  h.sort(this._positionAscendingComparer),
                  p = 0,
                  w = 0,
                  v = this.getMinDist(u[e - 1], u[e]);
                n.get(u[e]) - n.get(u[e - 1]) < v;

              )
                if (p < w) {
                  if (0 === y.length) {
                    n.set(u[e - 1], n.get(u[e]) - v);
                    break;
                  }
                  a = y.shift();
                  p += a.v;
                  n.set(u[e - 1], a.k);
                  n.set(u[e - 1], Math.max(n.get(u[e - 1]), n.get(u[e]) - v));
                } else {
                  if (0 === h.length) {
                    n.set(u[e], n.get(u[e - 1]) + v);
                    break;
                  }
                  a = h.shift();
                  w += a.v;
                  n.set(u[e], a.k);
                  n.set(u[e], Math.min(n.get(u[e]), n.get(u[e - 1]) + v));
                }
              for (f = e - 2; f >= 0; f--)
                n.set(
                  u[f],
                  Math.min(
                    n.get(u[f]),
                    n.get(u[e - 1]) - this.getMinDist(u[f], u[e - 1])
                  )
                );
              for (f = e + 1; f < b; f++)
                n.set(
                  u[f],
                  Math.max(
                    n.get(u[f]),
                    n.get(u[e]) + this.getMinDist(u[f], u[e])
                  )
                );
            },
            placeLeft: function (n, i, r) {
              var u = Number.NEGATIVE_INFINITY;
              t.forEach(
                this._getComposite(n),
                function (n) {
                  var t = this.leftSibling(n);
                  t &&
                    this.nodeLeftClass.get(t) === this.nodeLeftClass.get(n) &&
                    (i.containsKey(t) || this.placeLeft(t, i, r),
                    (u = Math.max(u, i.get(t) + this.getMinDist(t, n))));
                },
                this
              );
              u === Number.NEGATIVE_INFINITY && (u = 0);
              t.forEach(this._getComposite(n), function (n) {
                i.set(n, u);
              });
            },
            placeRight: function (n, i, r) {
              var u = Number.POSITIVE_INFINITY;
              t.forEach(
                this._getComposite(n),
                function (n) {
                  var t = this.rightSibling(n);
                  t &&
                    this.nodeRightClass.get(t) === this.nodeRightClass.get(n) &&
                    (i.containsKey(t) || this.placeRight(t, i, r),
                    (u = Math.min(u, i.get(t) - this.getMinDist(n, t))));
                },
                this
              );
              u === Number.POSITIVE_INFINITY && (u = 0);
              t.forEach(this._getComposite(n), function (n) {
                i.set(n, u);
              });
            },
            leftSibling: function (n) {
              var i = this.layers[n.layer],
                t = n.layerIndex;
              return 0 === t ? null : i[t - 1];
            },
            rightSibling: function (n) {
              var t = this.layers[n.layer],
                i = n.layerIndex;
              return i === t.length - 1 ? null : t[i + 1];
            },
            _getComposite: function (n) {
              return n.isVirtual ? this._nodesInLink(n) : [n];
            },
            arrangeNodes: function () {
              for (var u, t, r, i, o, e, f, n = 0; n < this.layers.length; n++)
                for (r = this.layers[n], t = 0; t < r.length; t++)
                  (i = r[t]),
                    (i.upstreamPriority = i.upstreamLinkCount),
                    (i.downstreamPriority = i.downstreamLinkCount);
              for (o = 2, e = 0; e < o; e++) {
                for (u = this.layers.length - 1; u >= 1; u--)
                  this.layoutLayer(!1, u);
                for (u = 0; u < this.layers.length - 1; u++)
                  this.layoutLayer(!0, u);
              }
              for (f = Number.MAX_VALUE, n = 0; n < this.layers.length; n++)
                for (r = this.layers[n], t = 0; t < r.length; t++)
                  (i = r[t]), (f = Math.min(f, i.gridPosition));
              if (f < 0)
                for (n = 0; n < this.layers.length; n++)
                  for (r = this.layers[n], t = 0; t < r.length; t++)
                    (i = r[t]), (i.gridPosition = i.gridPosition - f);
            },
            layoutLayer: function (n, i) {
              var r, u, f, e;
              for (
                u = n ? this.layers[(r = i + 1)] : this.layers[(r = i - 1)],
                  f = [],
                  e = 0;
                e < u.length;
                e++
              )
                f.push(u[e]);
              f.sort(function (n, t) {
                var i = (n.upstreamPriority + n.downstreamPriority) / 2,
                  r = (t.upstreamPriority + t.downstreamPriority) / 2;
                return Math.abs(i - r) < 0.0001 ? 0 : i < r ? 1 : -1;
              });
              t.forEach(
                f,
                function (n) {
                  var t = n.gridPosition,
                    i = this.calcBaryCenter(n),
                    r = (n.upstreamPriority + n.downstreamPriority) / 2;
                  if (!(Math.abs(t - i) < 0.0001 || Math.abs(t - i) < 0.2501))
                    if (t < i)
                      for (; t < i && this.moveRight(n, u, r); )
                        t = n.gridPosition;
                    else
                      for (; t > i && this.moveLeft(n, u, r); )
                        t = n.gridPosition;
                },
                this
              );
              r > 0 && this.calcDownData(r - 1);
              r < this.layers.length - 1 && this.calcUpData(r + 1);
            },
            moveRight: function (n, i, r) {
              var u,
                f,
                e = t.indexOf(i, n);
              return e === i.length - 1
                ? ((n.gridPosition = n.gridPosition + 0.5), !0)
                : ((u = i[e + 1]),
                  (f = (u.upstreamPriority + u.downstreamPriority) / 2),
                  u.gridPosition > n.gridPosition + 1
                    ? ((n.gridPosition = n.gridPosition + 0.5), !0)
                    : !(f > r || Math.abs(f - r) < 0.0001) &&
                      !!this.moveRight(u, i, r) &&
                      ((n.gridPosition = n.gridPosition + 0.5), !0));
            },
            moveLeft: function (n, i, r) {
              var u,
                f,
                e = t.indexOf(i, n);
              return 0 === e
                ? ((n.gridPosition = n.gridPosition - 0.5), !0)
                : ((u = i[e - 1]),
                  (f = (u.upstreamPriority + u.downstreamPriority) / 2),
                  u.gridPosition < n.gridPosition - 1
                    ? ((n.gridPosition = n.gridPosition - 0.5), !0)
                    : !(f > r || Math.abs(f - r) < 0.0001) &&
                      !!this.moveLeft(u, i, r) &&
                      ((n.gridPosition = n.gridPosition - 0.5), !0));
            },
            mapVirtualNode: function (n, t) {
              this.nodeToLinkMap.set(n, t);
              this.linkToNodeMap.containsKey(t) ||
                this.linkToNodeMap.set(t, []);
              this.linkToNodeMap.get(t).push(n);
            },
            _nodesInLink: function (n) {
              return this.linkToNodeMap.get(this.nodeToLinkMap.get(n));
            },
            _dummify: function () {
              var e, r, n, b, a, l, u, g, nt, c, k, h, o, tt, s, f, p, d, it, w;
              for (
                this.linkToNodeMap = new i(),
                  this.nodeToLinkMap = new i(),
                  nt = this.graph.links.slice(0),
                  c = this.layers,
                  k = function (n, t, i) {
                    c[n].linksTo[t] = c[n].linksTo[t] || [];
                    c[n].linksTo[t].push(i);
                  },
                  g = 0;
                g < nt.length;
                g++
              )
                if (
                  ((h = nt[g]),
                  (o = h.source),
                  (tt = h.target),
                  (s = o.layer),
                  (f = tt.layer),
                  (p = o.gridPosition),
                  (d = tt.gridPosition),
                  (it = (d - p) / Math.abs(f - s)),
                  (w = o),
                  s - f > 1)
                ) {
                  for (u = s - 1; u > f; u--) {
                    for (
                      n = new v(),
                        n.x = o.x,
                        n.y = o.y,
                        n.width = o.width / 100,
                        n.height = o.height / 100,
                        e = c[u],
                        r = (u - f) * it + p,
                        r > e.length && (r = e.length),
                        p >= c[s].length - 1 && d >= c[f].length - 1
                          ? (r = e.length)
                          : 0 === p && 0 === d && (r = 0),
                        n.layer = u,
                        n.uBaryCenter = 0,
                        n.dBaryCenter = 0,
                        n.upstreamLinkCount = 0,
                        n.downstreamLinkCount = 0,
                        n.gridPosition = r,
                        n.isVirtual = !0,
                        t.insert(e, n, r),
                        a = r + 1;
                      a < e.length;
                      a++
                    )
                      (b = e[a]), (b.gridPosition = b.gridPosition + 1);
                    l = new y(w, n);
                    l.depthOfDumminess = 0;
                    k(u - 1, u, l);
                    w = n;
                    this.graph._addNode(n);
                    this.graph.addLink(l);
                    n.index = this.graph.nodes.length - 1;
                    this.mapVirtualNode(n, h);
                  }
                  k(f - 1, f, l);
                  h.changeSource(w);
                  h.depthOfDumminess = s - f - 1;
                } else if (s - f < -1) {
                  for (u = s + 1; u < f; u++) {
                    for (
                      n = new v(),
                        n.x = o.x,
                        n.y = o.y,
                        n.width = o.width / 100,
                        n.height = o.height / 100,
                        e = c[u],
                        r = (u - s) * it + p,
                        r > e.length && (r = e.length),
                        p >= c[s].length - 1 && d >= c[f].length - 1
                          ? (r = e.length)
                          : 0 === p && 0 === d && (r = 0),
                        n.layer = u,
                        n.uBaryCenter = 0,
                        n.dBaryCenter = 0,
                        n.upstreamLinkCount = 0,
                        n.downstreamLinkCount = 0,
                        n.gridPosition = r,
                        n.isVirtual = !0,
                        r &= r,
                        t.insert(e, n, r),
                        a = r + 1;
                      a < e.length;
                      a++
                    )
                      (b = e[a]), (b.gridPosition = b.gridPosition + 1);
                    l = new y(w, n);
                    l.depthOfDumminess = 0;
                    k(u - 1, u, l);
                    w = n;
                    this.graph._addNode(n);
                    this.graph.addLink(l);
                    n.index = this.graph.nodes.length - 1;
                    this.mapVirtualNode(n, h);
                  }
                  k(f - 1, f, h);
                  h.changeSource(w);
                  h.depthOfDumminess = f - s - 1;
                } else k(s, f, h);
            },
            _dedummify: function () {
              for (var i, n, t, r, o, f, s, u, e = !0; e; )
                for (e = !1, i = 0; i < this.graph.links.length; i++)
                  if (((n = this.graph.links[i]), n.depthOfDumminess)) {
                    for (
                      t = [],
                        t.unshift({ x: n.target.x, y: n.target.y }),
                        t.unshift({ x: n.source.x, y: n.source.y }),
                        r = n,
                        o = n.depthOfDumminess,
                        f = 0;
                      f < o;
                      f++
                    )
                      (s = r.source),
                        (u = s.incoming[0]),
                        t.unshift({ x: u.source.x, y: u.source.y }),
                        (r = u);
                    n.changeSource(r.source);
                    n.depthOfDumminess = 0;
                    t.length > 2
                      ? (t.splice(0, 1), t.splice(t.length - 1), (n.points = t))
                      : (n.points = []);
                    e = !0;
                    break;
                  }
            },
            _optimizeCrossings: function () {
              for (var n, t = -1, i = 0; 0 !== t && !(i++ > 3); ) {
                for (t = 0, n = this.layers.length - 1; n >= 1; n--)
                  t += this.optimizeLayerCrossings(!1, n);
                for (n = 0; n < this.layers.length - 1; n++)
                  t += this.optimizeLayerCrossings(!0, n);
              }
            },
            calcUpData: function (n) {
              var s, t, r, u, e, h, i, o, f;
              if (0 !== n) {
                for (
                  s = this.layers[n],
                    e = new w(),
                    h = this.layers[n - 1],
                    t = 0;
                  t < h.length;
                  t++
                )
                  e.add(h[t]);
                for (t = 0; t < s.length; t++) {
                  for (
                    i = s[t], o = 0, f = 0, r = 0;
                    r < i.incoming.length;
                    r++
                  )
                    (u = i.incoming[r]),
                      e.contains(u.source) &&
                        (f++, (o += u.source.gridPosition));
                  for (r = 0; r < i.outgoing.length; r++)
                    (u = i.outgoing[r]),
                      e.contains(u.target) &&
                        (f++, (o += u.target.gridPosition));
                  f > 0
                    ? ((i.uBaryCenter = o / f), (i.upstreamLinkCount = f))
                    : ((i.uBaryCenter = t), (i.upstreamLinkCount = 0));
                }
              }
            },
            calcDownData: function (n) {
              var s, t, r, u, e, h, i, o, f;
              if (n !== this.layers.length - 1) {
                for (
                  s = this.layers[n],
                    e = new w(),
                    h = this.layers[n + 1],
                    t = 0;
                  t < h.length;
                  t++
                )
                  e.add(h[t]);
                for (t = 0; t < s.length; t++) {
                  for (
                    i = s[t], o = 0, f = 0, r = 0;
                    r < i.incoming.length;
                    r++
                  )
                    (u = i.incoming[r]),
                      e.contains(u.source) &&
                        (f++, (o += u.source.gridPosition));
                  for (r = 0; r < i.outgoing.length; r++)
                    (u = i.outgoing[r]),
                      e.contains(u.target) &&
                        (f++, (o += u.target.gridPosition));
                  f > 0
                    ? ((i.dBaryCenter = o / f), (i.downstreamLinkCount = f))
                    : ((i.dBaryCenter = t), (i.downstreamLinkCount = 0));
                }
              }
            },
            optimizeLayerCrossings: function (n, t) {
              var f, r, o, u, i, e, s, h;
              for (
                r = n ? this.layers[(f = t + 1)] : this.layers[(f = t - 1)],
                  o = r.slice(0),
                  n ? this.calcUpData(f) : this.calcDownData(f),
                  u = this,
                  r.sort(function (n, t) {
                    var i,
                      r = u.calcBaryCenter(n),
                      f = u.calcBaryCenter(t);
                    return Math.abs(r - f) < 0.0001
                      ? n.degree() === t.degree()
                        ? u.compareByIndex(n, t)
                        : n.degree() < t.degree()
                        ? 1
                        : -1
                      : ((i = 1e3 * (f - r)),
                        i > 0 ? -1 : i < 0 ? 1 : u.compareByIndex(n, t));
                  }),
                  e = 0,
                  i = 0;
                i < r.length;
                i++
              )
                r[i] !== o[i] && e++;
              if (e > 0)
                for (s = 0, i = 0; i < r.length; i++)
                  (h = r[i]), (h.gridPosition = s++);
              return e;
            },
            _swapPairs: function () {
              for (
                var s,
                  b,
                  n,
                  i,
                  a,
                  h,
                  v,
                  t,
                  r,
                  u,
                  o,
                  f,
                  e,
                  c,
                  l,
                  y,
                  p,
                  k = this.options.layeredIterations,
                  w = 0;
                ;

              ) {
                if (w++ > k) break;
                for (
                  s = w % 4 <= 1,
                    b = w % 4 == 1,
                    n = s ? 0 : this.layers.length - 1;
                  s ? n <= this.layers.length - 1 : n >= 0;
                  n += s ? 1 : -1
                ) {
                  for (
                    i = this.layers[n], a = !1, h = !0, v = 0, t = 0;
                    t < i.length - 1;
                    t++
                  )
                    (r = 0),
                      (u = 0),
                      (o = 0),
                      h
                        ? (0 !== n &&
                            (r = this.countLinksCrossingBetweenTwoLayers(
                              n - 1,
                              n
                            )),
                          n !== this.layers.length - 1 &&
                            (u = this.countLinksCrossingBetweenTwoLayers(
                              n,
                              n + 1
                            )),
                          s ? (r *= 2) : (u *= 2),
                          (o = r + u))
                        : (o = v),
                      0 !== o &&
                        ((f = i[t]),
                        (e = i[t + 1]),
                        (c = f.gridPosition),
                        (l = e.gridPosition),
                        (i[t] = e),
                        (i[t + 1] = f),
                        (f.gridPosition = l),
                        (e.gridPosition = c),
                        (r = 0),
                        0 !== n &&
                          (r = this.countLinksCrossingBetweenTwoLayers(
                            n - 1,
                            n
                          )),
                        (u = 0),
                        n !== this.layers.length - 1 &&
                          (u = this.countLinksCrossingBetweenTwoLayers(
                            n,
                            n + 1
                          )),
                        s ? (r *= 2) : (u *= 2),
                        (y = r + u),
                        (p = !1),
                        (p = b ? y >= o : y > o),
                        p
                          ? ((f = i[t]),
                            (e = i[t + 1]),
                            (c = f.gridPosition),
                            (l = e.gridPosition),
                            (i[t] = e),
                            (i[t + 1] = f),
                            (f.gridPosition = l),
                            (e.gridPosition = c),
                            (v = o),
                            (h = !1))
                          : ((a = !0), (h = !0)));
                  a &&
                    (n !== this.layers.length - 1 && this.calcUpData(n + 1),
                    0 !== n && this.calcDownData(n - 1));
                }
              }
            },
            countLinksCrossingBetweenTwoLayers: function (n, t) {
              for (
                var i,
                  r,
                  e,
                  o,
                  s,
                  h,
                  f,
                  l,
                  a,
                  v,
                  y,
                  c = this.layers[n].linksTo[t],
                  p = 0,
                  w = c.length,
                  u = 0;
                u < w;
                u++
              )
                for (i = c[u], f = u + 1; f < w; f++)
                  (r = c[f]),
                    i.target.layer === t
                      ? ((e = i.source), (o = i.target))
                      : ((e = i.target), (o = i.source)),
                    r.target.layer === t
                      ? ((s = r.source), (h = r.target))
                      : ((s = r.target), (h = r.source)),
                    (l = e.gridPosition),
                    (a = o.gridPosition),
                    (v = s.gridPosition),
                    (y = h.gridPosition),
                    (l - v) * (a - y) < 0 && p++;
              return p;
            },
            calcBaryCenter: function (n) {
              var t = n.upstreamLinkCount,
                i = n.downstreamLinkCount,
                r = n.uBaryCenter,
                u = n.dBaryCenter;
              return t > 0 && i > 0 ? (r + u) / 2 : t > 0 ? r : i > 0 ? u : 0;
            },
            _gridPositionComparer: function (n, t) {
              return n.gridPosition < t.gridPosition
                ? -1
                : n.gridPosition > t.gridPosition
                ? 1
                : 0;
            },
            _positionAscendingComparer: function (n, t) {
              return n.k < t.k ? -1 : n.k > t.k ? 1 : 0;
            },
            _positionDescendingComparer: function (n, t) {
              return n.k < t.k ? 1 : n.k > t.k ? -1 : 0;
            },
            _firstVirtualNode: function (n) {
              for (var t = 0; t < n.length; t++) if (n[t].isVirtual) return t;
              return -1;
            },
            compareByIndex: function (n, t) {
              var i = n.index,
                r = t.index;
              return i < r ? 1 : i > r ? -1 : 0;
            },
            intDiv: function (n, t) {
              return (n - (n % t)) / t;
            },
            nextVirtualNode: function (n, t) {
              for (var r = t.layerIndex, i = r + 1; i < n.length; ++i)
                if (n[i].isVirtual) return n[i];
              return null;
            },
          }),
          rt = e.Class.extend({
            init: function (n, r) {
              if (t.isUndefined(n)) throw "No diagram given";
              this.diagram = n;
              this.nodeMap = new i();
              this.linkMap = new i();
              this.capture(r ? r : n);
            },
            capture: function (n) {
              var i, o, r, t, e, s, h, c, l;
              if (n instanceof u.Graph) {
                for (t = 0; t < n.nodes.length; t++)
                  (i = n.nodes[t]),
                    (r = i.associatedShape),
                    this.nodeMap.set(
                      r.visual.id,
                      new f(i.x, i.y, i.width, i.height)
                    );
                for (t = 0; t < n.links.length; t++)
                  (s = n.links[t]),
                    (e = s.associatedConnection),
                    this.linkMap.set(e.visual.id, s.points());
              } else if (n instanceof Array)
                for (o = n, t = 0; t < o.length; t++)
                  (i = o[t]),
                    (r = i.associatedShape),
                    r &&
                      this.nodeMap.set(
                        r.visual.id,
                        new f(i.x, i.y, i.width, i.height)
                      );
              else if (n.hasOwnProperty("links") && n.hasOwnProperty("nodes")) {
                for (o = n.nodes, h = n.links, t = 0; t < o.length; t++)
                  (i = o[t]),
                    (r = i.associatedShape),
                    r &&
                      this.nodeMap.set(
                        r.visual.id,
                        new f(i.x, i.y, i.width, i.height)
                      );
                for (t = 0; t < h.length; t++)
                  (s = h[t]),
                    (e = s.associatedConnection),
                    e && this.linkMap.set(e.visual.id, s.points);
              } else {
                for (
                  c = this.diagram.shapes, l = this.diagram.connections, t = 0;
                  t < c.length;
                  t++
                )
                  (r = c[t]), this.nodeMap.set(r.visual.id, r.bounds());
                for (t = 0; t < l.length; t++)
                  (e = l[t]), this.linkMap.set(e.visual.id, e.points());
              }
            },
          });
        k(u, {
          init: function (n) {
            e.init(n, u.ui);
          },
          SpringLayout: g,
          TreeLayout: tt,
          GraphAdapter: a,
          LayeredLayout: it,
          LayoutBase: s,
          LayoutState: rt,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "dataviz/diagram/dom.min",
      [
        "kendo.data.min",
        "kendo.draganddrop.min",
        "kendo.toolbar.min",
        "kendo.editable.min",
        "kendo.window.min",
        "kendo.dropdownlist.min",
        "kendo.dataviz.core.min",
        "kendo.dataviz.themes.min",
        "dataviz/diagram/svg.min",
        "dataviz/diagram/services.min",
        "dataviz/diagram/layout.min",
      ],
      n
    );
  })(
    function () {
      !(function (n, t) {
        function fr(n) {
          var i = n.originalEvent,
            t = 0;
          return (
            i.wheelDelta
              ? ((t = -i.wheelDelta / 40), (t = t > 0 ? o.ceil(t) : o.floor(t)))
              : i.detail && (t = i.detail),
            t
          );
        }
        function ut(n) {
          return n.options.name.toLowerCase() === nt.toLowerCase();
        }
        function pt(n, t) {
          for (var f, i, u, e = oi, r = 0; r < t.length; r++)
            (i = t[r]),
              ut(i) ||
                ((u = n.distanceTo(i.position())), u < e && ((e = u), (f = i)));
          return f;
        }
        function li(n, t) {
          for (
            var u,
              i,
              f = [],
              e = n.drawingContainer().children,
              o = e.length,
              r = 0;
            r < t.length;
            r++
          )
            for (u = t[r], i = 0; i < o; i++)
              if (e[i] == u.drawingContainer()) {
                f.push(i);
                break;
              }
          return f;
        }
        function ai(n) {
          var t = {};
          return (
            (n = n || {}),
            r(n.text) && null !== n.text && (t.text = n.text),
            r(n.x) && null !== n.x && (t.x = n.x),
            r(n.y) && null !== n.y && (t.y = n.y),
            r(n.width) && null !== n.width && (t.width = n.width),
            r(n.height) && null !== n.height && (t.height = n.height),
            r(n.type) && null !== n.type && (t.type = n.type),
            t
          );
        }
        function er(n) {
          var t = {};
          return (
            (n = n || {}),
            r(n.text) && null !== n.text && (t.content = n.text),
            r(n.type) && null !== n.type && (t.type = n.type),
            r(n.from) && null !== n.from && (t.from = n.from),
            r(n.fromConnector) &&
              null !== n.fromConnector &&
              (t.fromConnector = n.fromConnector),
            r(n.fromX) && null !== n.fromX && (t.fromX = n.fromX),
            r(n.fromY) && null !== n.fromY && (t.fromY = n.fromY),
            r(n.to) && null !== n.to && (t.to = n.to),
            r(n.toConnector) &&
              null !== n.toConnector &&
              (t.toConnector = n.toConnector),
            r(n.toX) && null !== n.toX && (t.toX = n.toX),
            r(n.toY) && null !== n.toY && (t.toY = n.toY),
            t
          );
        }
        function or(t, i) {
          var u,
            r = this.dataSource.reader.model;
          r &&
            ((u = r.fn.fields.text ? "text" : r.idField),
            n("<input name='" + i.field + "' />")
              .appendTo(t)
              .kendoDropDownList({
                dataValueField: r.idField,
                dataTextField: u,
                dataSource: this.dataSource.data().toJSON(),
                optionLabel: " ",
                valuePrimitive: !0,
              }));
        }
        function wt(n) {
          this.dataItem = n;
          this.callbacks = [];
        }
        function bt() {
          this.items = {};
        }
        function ot(n) {
          var t = n;
          return (
            n instanceof kendo.data.Model &&
              ((t = n.toJSON()), (t[n.idField] = n._defaultId)),
            t
          );
        }
        function vi(n) {
          for (var t, r = [], u = [], i = 0; i < n.length; i++)
            (t = n[i]), t instanceof h ? u.push(t) : r.push(t);
          return { shapes: u, connections: r };
        }
        function st(n, t) {
          return n.reader.model
            ? new n.reader.model(t)
            : new kendo.data.ObservableObject(t);
        }
        function w(n, t) {
          r(t[n]) && t.set(n, null);
        }
        function yi(n, t, i) {
          for (var u, f = 0; f < i.length; f++)
            (u = i[f]), t && !r(t[u]) && (t[u] = n[u]);
        }
        function sr(n) {
          var t = n.drawingContainer().clippedBBox(null);
          (0 === t.origin.x && 0 === t.origin.y) ||
            n.position(-t.origin.x, -t.origin.y);
        }
        function hr(n) {
          n.preventDefault();
        }
        var pi,
          b,
          v,
          h,
          a,
          ht,
          ct,
          lt,
          kt,
          tt,
          k,
          dt,
          y = kendo.dataviz,
          it = kendo.drawing,
          gt = kendo.geometry,
          i = y.diagram,
          ni = kendo.ui.Widget,
          ti = kendo.Class,
          u = n.proxy,
          e = kendo.deepExtend,
          cr = kendo._outerWidth,
          ii = kendo._outerHeight,
          lr = n.extend,
          ar = kendo.data.HierarchicalDataSource,
          vr = i.Canvas,
          ri = i.Group,
          yr = i.Rectangle,
          pr = i.Circle,
          ui = i.CompositeTransform,
          c = i.Rect,
          wi = i.Path,
          wr = i.DeleteShapeUnit,
          br = i.DeleteConnectionUnit,
          fi = i.TextBlock,
          kr = i.Image,
          f = i.Point,
          bi = i.Intersect,
          dr = i.ConnectionEditAdorner,
          gr = i.UndoRedoService,
          nu = i.ToolService,
          tu = i.Selector,
          iu = i.ResizingAdorner,
          ru = i.ConnectorsAdorner,
          uu = i.Cursors,
          s = i.Utils,
          ki = kendo.Observable,
          fu = i.ToBackUnit,
          eu = i.ToFrontUnit,
          ou = i.PolylineRouter,
          di = i.CascadingRouter,
          d = s.isUndefined,
          p = s.isDefined,
          r = it.util.defined,
          g = n.isArray,
          at = kendo.isFunction,
          vt = s.isString,
          su = n.isPlainObject,
          o = Math,
          l = ".kendoDiagram",
          gi = "cascading",
          ei = "itemBoundsChange",
          rt = "change",
          ft = "click",
          nr = "error",
          nt = "Auto",
          oi = 9007199254740992,
          tr = "select",
          si = "itemRotate",
          hi = "pan",
          yt = "zoomStart",
          ci = "zoomEnd",
          ir = "none",
          hu = 600,
          cu = 600,
          lu = "rectangle",
          au = 100,
          vu = 100,
          yu = 20,
          pu = 20,
          rr = 0,
          wu = Number.MAX_VALUE,
          bu = -Number.MAX_VALUE,
          ku = "absolute",
          ur = "transformed",
          et = "rotated",
          du = "transparent",
          gu = "width",
          nf = "height",
          tf = "x",
          rf = "y",
          uf = "DOMMouseScroll" + l + " mousewheel" + l,
          ff = 0.05,
          ef = 5,
          of =
            '<a class="k-button k-button-icontext #=className#" href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>',
          sf = 5;
        i.DefaultConnectors = [
          { name: "Top" },
          { name: "Bottom" },
          { name: "Left" },
          { name: "Right" },
          {
            name: nt,
            position: function (n) {
              return n.getPosition("center");
            },
          },
        ];
        pi = {
          cancel: {
            text: "Cancel",
            imageClass: "k-i-cancel",
            className: "k-diagram-cancel",
            iconClass: "k-icon",
          },
          update: {
            text: "Update",
            imageClass: "k-i-checkmark",
            className: "k-diagram-update",
            iconClass: "k-icon",
          },
        };
        i.shapeDefaults = function (n) {
          var t = {
            type: lu,
            path: "",
            autoSize: !0,
            visual: null,
            x: rr,
            y: rr,
            minWidth: yu,
            minHeight: pu,
            width: au,
            height: vu,
            hover: {},
            editable: { connect: !0, tools: [] },
            connectors: i.DefaultConnectors,
            rotation: { angle: 0 },
          };
          return s.simpleExtend(t, n), t;
        };
        b = ki.extend({
          init: function (n) {
            var t = this;
            t.dataItem = (n || {}).dataItem;
            ki.fn.init.call(t);
            t.options = e({ id: i.randomId() }, t.options, n);
            t.isSelected = !1;
            t.visual = new ri({
              id: t.options.id,
              autoSize: t.options.autoSize,
            });
            t.id = t.options.id;
            t._template();
          },
          options: {
            hover: {},
            cursor: uu.grip,
            content: { align: "center middle" },
            selectable: !0,
            serializable: !0,
            enable: !0,
          },
          _getCursor: function (n) {
            return this.adorner
              ? this.adorner._getCursor(n)
              : this.options.cursor;
          },
          visible: function (n) {
            return d(n) ? this.visual.visible() : (this.visual.visible(n), t);
          },
          bounds: function () {},
          refresh: function () {
            this.visual.redraw();
          },
          position: function (n) {
            this.options.x = n.x;
            this.options.y = n.y;
            this.visual.position(n);
          },
          toString: function () {
            return this.options.id;
          },
          serialize: function () {
            var n = e({}, { options: this.options });
            return this.dataItem && (n.dataItem = "" + this.dataItem), n;
          },
          _content: function (n) {
            var r, u, f;
            return (
              n !== t &&
                ((r = this.options),
                i.Utils.isString(n) ? (r.content.text = n) : e(r.content, n),
                (u = r.content),
                (f = this._contentVisual),
                f
                  ? this._updateContentVisual(u)
                  : this._createContentVisual(u)),
              this.options.content.text
            );
          },
          _createContentVisual: function (n) {
            n.text &&
              ((this._contentVisual = new fi(n)),
              (this._contentVisual._includeInBBox = !1),
              this.visual.append(this._contentVisual));
          },
          _updateContentVisual: function (n) {
            this._contentVisual.redraw(n);
          },
          _hitTest: function (n) {
            var t = this.bounds();
            return this.visible() && t.contains(n) && this.options.enable;
          },
          _template: function () {
            var t,
              i,
              n = this;
            n.options.content.template &&
              ((t = n.dataItem || {}),
              (i = kendo.template(n.options.content.template, {
                paramName: "dataItem",
              })),
              (n.options.content.text = i(t)));
          },
          _canSelect: function () {
            return this.options.selectable !== !1;
          },
          toJSON: function () {
            return { id: this.options.id };
          },
        });
        v = ti.extend({
          init: function (n, t) {
            this.options = e({}, this.options, t);
            this.connections = [];
            this.shape = n;
          },
          options: {
            width: 7,
            height: 7,
            fill: { color: "Yellow" },
            hover: {},
          },
          position: function () {
            return this.options.position
              ? this.options.position(this.shape)
              : this.shape.getPosition(this.options.name);
          },
          toJSON: function () {
            return { shapeId: "" + this.shape, connector: this.options.name };
          },
        });
        v.parse = function (n, t) {
          for (
            var r, u = t.split(":"), f = u[0], e = u[1] || nt, i = 0;
            i < n.shapes.length;
            i++
          )
            if (((r = n.shapes[i]), r.options.id == f))
              return r.getConnector(e.trim());
        };
        h = b.extend({
          init: function (n, t) {
            var i = this;
            b.fn.init.call(i, n);
            this.diagram = t;
            this.updateOptionsFromModel();
            n = i.options;
            i.connectors = [];
            i.type = n.type;
            i.createShapeVisual();
            i.updateBounds();
            i.content(i.content());
            i._createConnectors();
          },
          options: i.shapeDefaults(),
          _setOptionsFromModel: function (n) {
            var t = ai(n || this.dataItem);
            this.options = e({}, this.options, t);
            this.redrawVisual();
          },
          updateOptionsFromModel: function (n, t) {
            var i, r;
            this.diagram &&
              this.diagram._isEditable &&
              ((i = ai(n || this.dataItem)),
              n && t
                ? y.inArray(t, ["x", "y", "width", "height"])
                  ? ((r = this.bounds()), (r[t] = n[t]), this.bounds(r))
                  : (this.options.visual
                      ? this._redrawVisual()
                      : i.type &&
                        ((this.options = e({}, this.options, i)),
                        this._redrawVisual()),
                    this.options.content &&
                      (this._template(), this.content(this.options.content)))
                : (this.options = e({}, this.options, i)));
          },
          _redrawVisual: function () {
            this.visual.clear();
            this._contentVisual = null;
            this.options.dataItem = this.dataItem;
            this.createShapeVisual();
            this.updateBounds();
          },
          redrawVisual: function () {
            this._redrawVisual();
            this.options.content &&
              (this._template(), this.content(this.options.content));
          },
          updateModel: function (n) {
            var i,
              t,
              u = this.diagram;
            u &&
              u._isEditable &&
              ((i = this._bounds),
              (t = this.dataItem),
              t &&
                (u._suspendModelRefresh(),
                r(t.x) && i.x !== t.x && t.set("x", i.x),
                r(t.y) && i.y !== t.y && t.set("y", i.y),
                r(t.width) && i.width !== t.width && t.set("width", i.width),
                r(t.height) &&
                  i.height !== t.height &&
                  t.set("height", i.height),
                (this.dataItem = t),
                u._resumeModelRefresh(),
                n && u._syncShapeChanges()));
          },
          updateBounds: function () {
            var n = this.visual._measure(!0),
              t = this.options;
            this.bounds(new c(t.x, t.y, n.width, n.height));
            this._rotate();
            this._alignContent();
          },
          content: function (n) {
            var t = this._content(n);
            return this._alignContent(), t;
          },
          _alignContent: function () {
            var r,
              u,
              n,
              f,
              e,
              o = this.options.content || {},
              t = this._contentVisual;
            t &&
              o.align &&
              ((r = this.visual._measure()),
              (u = new i.RectAlign(r)),
              (n = t.drawingElement.bbox(null)),
              (f = new c(0, 0, n.width(), n.height())),
              (e = u.align(f, o.align)),
              t.position(e.topLeft()));
          },
          _createConnectors: function () {
            for (
              var i,
                t = this.options,
                r = t.connectors.length,
                u = t.connectorDefaults,
                n = 0;
              n < r;
              n++
            )
              (i = new v(this, e({}, u, t.connectors[n]))),
                this.connectors.push(i);
          },
          bounds: function (n) {
            var t, i;
            if (n)
              if (vt(n))
                switch (n) {
                  case ur:
                    t = this._transformedBounds();
                    break;
                  case ku:
                    t = this._transformedBounds();
                    i = this.diagram._pan;
                    t.x += i.x;
                    t.y += i.y;
                    break;
                  case et:
                    t = this._rotatedBounds();
                    break;
                  default:
                    t = this._bounds;
                }
              else
                this._setBounds(n),
                  this._triggerBoundsChange(),
                  (this.diagram && this.diagram._layouting) ||
                    this.refreshConnections();
            else t = this._bounds;
            return t;
          },
          _setBounds: function (n) {
            var t = this.options,
              i = n.topLeft(),
              r = (t.x = i.x),
              u = (t.y = i.y),
              f = (t.width = o.max(n.width, t.minWidth)),
              e = (t.height = o.max(n.height, t.minHeight));
            this._bounds = new c(r, u, f, e);
            this.visual.redraw({ x: r, y: u, width: f, height: e });
          },
          position: function (n) {
            return n
              ? (this.bounds(
                  new c(n.x, n.y, this._bounds.width, this._bounds.height)
                ),
                t)
              : this._bounds.topLeft();
          },
          clone: function () {
            var n = this.serialize();
            return (
              (n.options.id = i.randomId()),
              this.diagram &&
                this.diagram._isEditable &&
                r(this.dataItem) &&
                (n.options.dataItem = ot(this.dataItem)),
              new h(n.options)
            );
          },
          select: function (n) {
            var i,
              r,
              t = this.diagram;
            if ((d(n) && (n = !0), this._canSelect() && this.isSelected != n))
              return (
                (i = []),
                (r = []),
                (this.isSelected = n),
                this.isSelected
                  ? (t._selectedItems.push(this), i.push(this))
                  : (s.remove(t._selectedItems, this), r.push(this)),
                t._internalSelection || t._selectionChanged(i, r),
                !0
              );
          },
          rotate: function (n, r, u) {
            var e,
              s,
              c,
              h,
              o = this.visual.rotate();
            return (
              n !== t &&
                (u !== !1 &&
                  this.diagram &&
                  this.diagram.undoRedoService &&
                  n !== o.angle &&
                  this.diagram.undoRedoService.add(
                    new i.RotateUnit(
                      this.diagram._resizingAdorner,
                      [this],
                      [o.angle]
                    ),
                    !1
                  ),
                (e = this.bounds()),
                (s = new f(e.width / 2, e.height / 2)),
                r &&
                  ((c = n - o.angle),
                  (h = e
                    .center()
                    .rotate(r, 360 - c)
                    .minus(s)),
                  (this._rotationOffset = this._rotationOffset.plus(
                    h.minus(e.topLeft())
                  )),
                  this.position(h)),
                this.visual.rotate(n, s),
                (this.options.rotation.angle = n),
                this.diagram &&
                  this.diagram._connectorsAdorner &&
                  this.diagram._connectorsAdorner.refresh(),
                this.refreshConnections(),
                this.diagram && this.diagram.trigger(si, { item: this })),
              o
            );
          },
          connections: function (n) {
            for (
              var r, t, u, s, e, o, f = [], i = 0;
              i < this.connectors.length;
              i++
            )
              for (
                s = this.connectors[i], u = s.connections, r = 0, u;
                r < u.length;
                r++
              )
                (t = u[r]),
                  "out" == n
                    ? ((e = t.source()),
                      e.shape && e.shape == this && f.push(t))
                    : "in" == n
                    ? ((o = t.target()),
                      o.shape && o.shape == this && f.push(t))
                    : f.push(t);
            return f;
          },
          refreshConnections: function () {
            n.each(this.connections(), function () {
              this.refresh();
            });
          },
          getConnector: function (n) {
            var t, i;
            if (!vt(n))
              return n instanceof f
                ? pt(n, this.connectors)
                : this.connectors.length
                ? this.connectors[0]
                : null;
            for (
              n = n.toLocaleLowerCase(), t = 0;
              t < this.connectors.length;
              t++
            )
              if (
                ((i = this.connectors[t]),
                i.options.name.toLocaleLowerCase() == n)
              )
                return i;
          },
          getPosition: function (n) {
            var t = this.bounds(),
              i = n.charAt(0).toLowerCase() + n.slice(1);
            return at(t[i]) ? this._transformPoint(t[i]()) : t.center();
          },
          redraw: function (n) {
            var t, i;
            n &&
              ((t = this.options),
              this.shapeVisual.redraw(this._visualOptions(n)),
              this._diffNumericOptions(n, [gu, nf, tf, rf]) &&
                (this.bounds(new c(t.x, t.y, t.width, t.height)), (i = !0)),
              n.connectors &&
                ((t.connectors = n.connectors), this._updateConnectors()),
              (t = e(t, n)),
              (n.rotation || i) && this._rotate(),
              t.content && this.content(t.content));
          },
          _updateConnectors: function () {
            var n,
              t,
              i,
              r,
              u = this.connections();
            for (
              this.connectors = [], this._createConnectors(), r = 0;
              r < u.length;
              r++
            )
              (n = u[r]),
                (t = n.source()),
                (i = n.target()),
                t.shape && t.shape === this
                  ? n.source(this.getConnector(t.options.name) || null)
                  : i.shape &&
                    i.shape === this &&
                    n.target(this.getConnector(i.options.name) || null),
                n.updateModel();
          },
          _diffNumericOptions: i.diffNumericOptions,
          _visualOptions: function (n) {
            return {
              data: n.path,
              source: n.source,
              hover: n.hover,
              fill: n.fill,
              stroke: n.stroke,
            };
          },
          _triggerBoundsChange: function () {
            this.diagram &&
              this.diagram.trigger(ei, {
                item: this,
                bounds: this._bounds.clone(),
              });
          },
          _transformPoint: function (n) {
            var t = this.rotate(),
              i = this.bounds(),
              r = i.topLeft();
            return t.angle && n.rotate(t.center().plus(r), 360 - t.angle), n;
          },
          _transformedBounds: function () {
            var n = this.bounds(),
              t = n.topLeft(),
              i = n.bottomRight();
            return c.fromPoints(
              this.diagram.modelToView(t),
              this.diagram.modelToView(i)
            );
          },
          _rotatedBounds: function () {
            var n = this.bounds().rotatedBounds(this.rotate().angle),
              t = n.topLeft(),
              i = n.bottomRight();
            return c.fromPoints(t, i);
          },
          _rotate: function () {
            var n = this.options.rotation;
            n && n.angle && this.rotate(n.angle);
            this._rotationOffset = new f();
          },
          _hover: function (n) {
            var t = this.options,
              i = t.hover,
              r = t.stroke,
              u = t.fill;
            n && p(i.stroke) && (r = e({}, r, i.stroke));
            n && p(i.fill) && (u = i.fill);
            this.shapeVisual.redraw({ stroke: r, fill: u });
            t.editable &&
              t.editable.connect &&
              this.diagram._showConnectors(this, n);
          },
          _hitTest: function (n) {
            if (this.visible()) {
              var r,
                t = this.bounds(),
                i = this.rotate().angle;
              if (n.isEmpty && !n.isEmpty()) return bi.rects(n, t, i ? i : 0);
              if (((r = n.clone().rotate(t.center(), i)), t.contains(r)))
                return this;
            }
          },
          toJSON: function () {
            return { shapeId: this.options.id };
          },
          createShapeVisual: function () {
            var i,
              t = this.options,
              n = this._visualOptions(t),
              u = t.visual,
              r = (t.type + "").toLocaleLowerCase();
            n.width = t.width;
            n.height = t.height;
            at(u)
              ? (i = u.call(this, t))
              : n.data
              ? ((i = new wi(n)), sr(i))
              : (i =
                  "rectangle" == r
                    ? new yr(n)
                    : "circle" == r
                    ? new pr(n)
                    : "text" == r
                    ? new fi(n)
                    : "image" == r
                    ? new kr(n)
                    : new wi(n));
            this.shapeVisual = i;
            this.visual.append(this.shapeVisual);
          },
        });
        a = b.extend({
          init: function (n, t, u) {
            var e = this;
            b.fn.init.call(e, u);
            this.updateOptionsFromModel();
            this._initRouter();
            e.path = new i.Polyline(e.options);
            e.path.fill(du);
            e.visual.append(e.path);
            e._sourcePoint = e._targetPoint = new f();
            e._setSource(n);
            e._setTarget(t);
            e.content(e.options.content);
            e.definers = [];
            r(u) && u.points && e.points(u.points);
          },
          options: {
            hover: { stroke: {} },
            startCap: ir,
            endCap: ir,
            points: [],
            selectable: !0,
            fromConnector: nt,
            toConnector: nt,
          },
          _setOptionsFromModel: function (n) {
            this.updateOptionsFromModel(n || this.dataItem);
          },
          updateOptionsFromModel: function (n) {
            var o, t, i, u;
            this.diagram &&
              this.diagram._isEditable &&
              ((o = this.diagram._dataMap),
              (t = er(n || this.dataItem)),
              n
                ? (r(t.from)
                    ? ((i = o[t.from]),
                      i &&
                        r(t.fromConnector) &&
                        (i = i.getConnector(t.fromConnector)),
                      this.source(i))
                    : r(t.fromX) &&
                      r(t.fromY) &&
                      this.source(new f(t.fromX, t.fromY)),
                  r(t.to)
                    ? ((u = o[t.to]),
                      u &&
                        r(t.toConnector) &&
                        (u = u.getConnector(t.toConnector)),
                      this.target(u))
                    : r(t.toX) && r(t.toY) && this.target(new f(t.toX, t.toY)),
                  r(t.type) &&
                    this.type() !== t.type &&
                    (this.points([]), this.type(t.type)),
                  (this.dataItem = n),
                  this._template(),
                  this.redraw(this.options))
                : (this.options = e({}, t, this.options)));
          },
          updateModel: function (n) {
            if (
              this.diagram &&
              this.diagram._isEditable &&
              this.diagram.connectionsDataSource
            ) {
              var t = this.diagram.connectionsDataSource.getByUid(
                this.dataItem.uid
              );
              t &&
                (this.diagram._suspendModelRefresh(),
                r(this.options.fromX) && null !== this.options.fromX
                  ? (w("from", t),
                    w("fromConnector", t),
                    t.set("fromX", this.options.fromX),
                    t.set("fromY", this.options.fromY))
                  : (t.set("from", this.options.from),
                    r(t.fromConnector) &&
                      t.set(
                        "fromConnector",
                        this.sourceConnector
                          ? this.sourceConnector.options.name
                          : null
                      ),
                    w("fromX", t),
                    w("fromY", t)),
                r(this.options.toX) && null !== this.options.toX
                  ? (w("to", t),
                    w("toConnector", t),
                    t.set("toX", this.options.toX),
                    t.set("toY", this.options.toY))
                  : (t.set("to", this.options.to),
                    r(t.toConnector) &&
                      t.set(
                        "toConnector",
                        this.targetConnector
                          ? this.targetConnector.options.name
                          : null
                      ),
                    w("toX", t),
                    w("toY", t)),
                r(this.options.type) &&
                  r(t.type) &&
                  t.set("type", this.options.type),
                (this.dataItem = t),
                this.diagram._resumeModelRefresh(),
                n && this.diagram._syncConnectionChanges());
            }
          },
          sourcePoint: function () {
            return this._resolvedSourceConnector
              ? this._resolvedSourceConnector.position()
              : this._sourcePoint;
          },
          _setSource: function (n) {
            var i,
              r = n instanceof h,
              u = this.options.fromConnector || nt;
            (r && !n.getConnector(u)) ||
              (n !== t && (this.from = n),
              this._removeFromSourceConnector(),
              null === n
                ? this.sourceConnector &&
                  ((this._sourcePoint = (
                    this._resolvedSourceConnector || this.sourceConnector
                  ).position()),
                  this._clearSourceConnector(),
                  this._setFromOptions(null, this._sourcePoint))
                : n instanceof v
                ? ((i = n.shape.dataItem),
                  i && this._setFromOptions(i.id),
                  (this.sourceConnector = n),
                  this.sourceConnector.connections.push(this))
                : n instanceof f
                ? (this._setFromOptions(null, n),
                  (this._sourcePoint = n),
                  this.sourceConnector && this._clearSourceConnector())
                : r &&
                  ((i = n.dataItem),
                  i && this._setFromOptions(i.id),
                  (this.sourceConnector = n.getConnector(u)),
                  this.sourceConnector.connections.push(this)));
          },
          source: function (n, t) {
            return (
              p(n) &&
                (t &&
                  this.diagram &&
                  this.diagram.undoRedoService.addCompositeItem(
                    new i.ConnectionEditUnit(this, n)
                  ),
                this._setSource(n),
                this.refresh()),
              this.sourceConnector ? this.sourceConnector : this._sourcePoint
            );
          },
          _setFromOptions: function (n, t) {
            this.options.from = n;
            t
              ? ((this.options.fromX = t.x), (this.options.fromY = t.y))
              : ((this.options.fromX = null), (this.options.fromY = null));
          },
          sourceDefiner: function (n) {
            if (!n)
              return (
                this._sourceDefiner ||
                  (this._sourceDefiner = new i.PathDefiner(
                    this.sourcePoint(),
                    null,
                    null
                  )),
                this._sourceDefiner
              );
            if (!(n instanceof i.PathDefiner))
              throw "The sourceDefiner needs to be a PathDefiner.";
            n.left = null;
            this._sourceDefiner = n;
            this.source(n.point);
          },
          targetPoint: function () {
            return this._resolvedTargetConnector
              ? this._resolvedTargetConnector.position()
              : this._targetPoint;
          },
          _setTarget: function (n) {
            var i,
              r = n instanceof h,
              u = this.options.toConnector || nt;
            (r && !n.getConnector(u)) ||
              (n !== t && (this.to = n),
              this._removeFromTargetConnector(),
              null === n
                ? this.targetConnector &&
                  ((this._targetPoint = (
                    this._resolvedTargetConnector || this.targetConnector
                  ).position()),
                  this._clearTargetConnector(),
                  this._setToOptions(null, this._targetPoint))
                : n instanceof v
                ? ((i = n.shape.dataItem),
                  i && this._setToOptions(i.id),
                  (this.targetConnector = n),
                  this.targetConnector.connections.push(this))
                : n instanceof f
                ? (this._setToOptions(null, n),
                  (this._targetPoint = n),
                  this.targetConnector && this._clearTargetConnector())
                : r &&
                  ((i = n.dataItem),
                  i && this._setToOptions(i.id),
                  (this.targetConnector = n.getConnector(u)),
                  this.targetConnector.connections.push(this)));
          },
          target: function (n, r) {
            return (
              p(n) &&
                (r &&
                  this.diagram &&
                  this.diagram.undoRedoService.addCompositeItem(
                    new i.ConnectionEditUnit(this, t, n)
                  ),
                this._setTarget(n),
                this.refresh()),
              this.targetConnector ? this.targetConnector : this._targetPoint
            );
          },
          _setToOptions: function (n, t) {
            this.options.to = n;
            t
              ? ((this.options.toX = t.x), (this.options.toY = t.y))
              : ((this.options.toX = null), (this.options.toY = null));
          },
          targetDefiner: function (n) {
            if (!n)
              return (
                this._targetDefiner ||
                  (this._targetDefiner = new i.PathDefiner(
                    this.targetPoint(),
                    null,
                    null
                  )),
                this._targetDefiner
              );
            if (!(n instanceof i.PathDefiner))
              throw "The sourceDefiner needs to be a PathDefiner.";
            n.right = null;
            this._targetDefiner = n;
            this.target(n.point);
          },
          _updateConnectors: function () {
            this._updateConnector(this.source(), "source");
            this._updateConnector(this.target(), "target");
          },
          _updateConnector: function (n, t) {
            var r,
              o,
              f,
              e,
              u = this,
              i = u.diagram;
            n instanceof v && !i.getShapeById(n.shape.id)
              ? ((r = n.shape.dataItem),
                (o = n.options.name),
                (f = function () {
                  var f = i._dataMap[r.id];
                  n = f.getConnector(o);
                  u[t](n, !1);
                  u.updateModel();
                }),
                i._dataMap[r.id]
                  ? f()
                  : ((e = i._inactiveShapeItems.getByUid(r.uid)),
                    e && i._deferredConnectionUpdates.push(e.onActivate(f))))
              : u[t](n, !1);
          },
          content: function (n) {
            var t = this._content(n);
            return r(n) && this._alignContent(), t;
          },
          _createContentVisual: function (n) {
            var t;
            return (
              at(n.visual)
                ? (t = n.visual.call(this, n))
                : n.text && (t = new fi(n)),
              t &&
                ((this._contentVisual = t),
                (t._includeInBBox = !1),
                this.visual.append(t)),
              t
            );
          },
          _updateContentVisual: function (n) {
            at(n.visual)
              ? (this.visual.remove(this._contentVisual),
                this._createContentVisual(n))
              : this._contentVisual.redraw(n);
          },
          _alignContent: function () {
            var u, i, h, c, r, t, l, a, s, v, y, n, e, p, w, b;
            if (this._contentVisual) {
              for (
                u = sf,
                  i = this.allPoints(),
                  h = o.floor(i.length / 2),
                  c = h - 1;
                c > 0 && i[c].equals(i[h]);

              )
                c--, h++;
              r = i[h];
              t = i[c];
              l = this._contentVisual._measure();
              a = l.width;
              s = l.height;
              v = i.length % 2 == 0;
              y = t.distanceTo(r);
              v &&
                i.length > 2 &&
                y > 0 &&
                ((t.y === r.y && y < a) || (t.x === r.x && y < s)) &&
                ((v = !1), (u = 0));
              v
                ? ((e = it.util.deg(o.atan2(r.y - t.y, r.x - t.x))),
                  (n = new f((r.x - t.x) / 2 + t.x, (r.y - t.y) / 2 + t.y)),
                  90 === o.abs(e)
                    ? ((n.x += u), (n.y -= s / 2))
                    : e % 180 == 0
                    ? ((n.x -= a / 2), (n.y -= s + u))
                    : e < -90 || (0 < e && e < 90)
                    ? (n.y -= s)
                    : (e < 0 || e > 90) && ((n.x -= a), (n.y -= s)))
                : ((p = o.floor(i.length / 2)),
                  (n = i[p].clone()),
                  (t = i[p - 1]),
                  (r = i[p + 1]),
                  (w = t.x <= n.x && r.x <= n.x ? u : -l.width - u),
                  (b = t.y <= n.y && r.y <= n.y ? u : -l.height - u),
                  (n.x += w),
                  (n.y += b));
              this._contentVisual.position(n);
            }
          },
          select: function (n) {
            var r,
              u,
              i = this.diagram;
            if (this._canSelect() && this.isSelected !== n)
              return (
                (this.isSelected = n),
                (r = []),
                (u = []),
                this.isSelected
                  ? ((this.adorner = new dr(this, this.options.selection)),
                    i._adorn(this.adorner, !0),
                    i._selectedItems.push(this),
                    r.push(this))
                  : this.adorner &&
                    (i._adorn(this.adorner, !1),
                    s.remove(i._selectedItems, this),
                    (this.adorner = t),
                    u.push(this)),
                this.adorner && this.adorner.refresh(),
                i._internalSelection || i._selectionChanged(r, u),
                !0
              );
          },
          bounds: function (n) {
            return !n || vt(n) ? this._bounds : ((this._bounds = n), t);
          },
          type: function (n) {
            var i = this.options;
            return n
              ? (n !== i.type &&
                  ((i.type = n), this._initRouter(), this.refresh()),
                t)
              : i.type;
          },
          _initRouter: function () {
            var n = (this.options.type || "").toLowerCase();
            this._router = n == gi ? new di(this) : new ou(this);
          },
          points: function (n) {
            var r, t, e, u;
            if (!n) {
              if (((e = []), p(this.definers)))
                for (u = 0; u < this.definers.length; u++)
                  e.push(this.definers[u].point);
              return e;
            }
            for (this.definers = [], r = 0; r < n.length; r++)
              if (((t = n[r]), t instanceof i.Point))
                this.definers.push(new i.PathDefiner(t));
              else {
                if (!t.hasOwnProperty("x") || !t.hasOwnProperty("y"))
                  throw "A Connection point needs to be a Point or an object with x and y properties.";
                this.definers.push(new i.PathDefiner(new f(t.x, t.y)));
              }
          },
          allPoints: function () {
            var n,
              t = [this.sourcePoint()];
            if (this.definers)
              for (n = 0; n < this.definers.length; n++)
                t.push(this.definers[n].point);
            return t.push(this.targetPoint()), t;
          },
          refresh: function () {
            this._resolveConnectors();
            this._refreshPath();
            this._alignContent();
            this.adorner && this.adorner.refresh();
          },
          _resolveConnectors: function () {
            var e,
              o,
              r,
              i,
              u = this,
              n = u.source(),
              t = u.target();
            n instanceof f
              ? (e = n)
              : n instanceof v && (r = ut(n) ? n.shape.connectors : [n]);
            t instanceof f
              ? (o = t)
              : t instanceof v && (i = ut(t) ? t.shape.connectors : [t]);
            e
              ? i && (u._resolvedTargetConnector = pt(e, i))
              : r &&
                (o
                  ? (u._resolvedSourceConnector = pt(o, r))
                  : i && this._resolveAutoConnectors(r, i));
          },
          _resolveAutoConnectors: function (n, t) {
            for (
              var s, v, h, c, l, a, i, r, e, u, y = oi, p = oi, f = 0;
              f < n.length;
              f++
            )
              if (((i = n[f]), !ut(i)))
                for (h = i.position(), e = 0; e < t.length; e++)
                  (r = t[e]),
                    ut(r) ||
                      ((c = r.position()),
                      (u = o.round(h.distanceTo(c))),
                      u < y &&
                        this.diagram &&
                        this._testRoutePoints(h, c, i, r) &&
                        ((y = u), (s = i), (v = r)),
                      u < p && ((l = i), (a = r), (p = u)));
            s && ((l = s), (a = v));
            this._resolvedSourceConnector = l;
            this._resolvedTargetConnector = a;
          },
          _testRoutePoints: function (n, t, i, r) {
            var f,
              e,
              s,
              u,
              l,
              h,
              a = this._router,
              v = !0;
            if (a instanceof di)
              for (
                f = a.routePoints(n, t, i, r),
                  l = this._getRouteExclude(n, t, i.shape, r.shape),
                  f.unshift(n),
                  f.push(t),
                  h = 1;
                h < f.length;
                h++
              )
                if (
                  ((e = f[h - 1]),
                  (s = f[h]),
                  (u = new c(
                    o.min(e.x, s.x),
                    o.min(e.y, s.y),
                    o.abs(e.x - s.x),
                    o.abs(e.y - s.y)
                  )),
                  u.width > 0 && (u.x++, (u.width -= 2)),
                  u.height > 0 && (u.y++, (u.height -= 2)),
                  !u.isEmpty() &&
                    this.diagram._shapesQuadTree.hitTestRect(u, l))
                ) {
                  v = !1;
                  break;
                }
            return v;
          },
          _getRouteExclude: function (n, t, i, r) {
            var u = [];
            return (
              this._isPointInsideShape(n, i) && u.push(i),
              this._isPointInsideShape(t, r) && u.push(r),
              u
            );
          },
          _isPointInsideShape: function (n, t) {
            var r,
              u,
              f,
              i = t.bounds(),
              s = t.rotate().angle,
              e = i.x,
              o = i.y;
            return (
              (r = n.clone().rotate(i.center(), s)),
              (u = r.x),
              (f = r.y),
              u > e && u < e + i.width && f > o && f < o + i.height
            );
          },
          redraw: function (n) {
            if (n) {
              this.options = e({}, this.options, n);
              var t = this.options.points;
              r(t) && t.length > 0 && (this.points(t), this._refreshPath());
              ((n && n.content) || n.text) && this.content(n.content);
              this.path.redraw({
                fill: n.fill,
                stroke: n.stroke,
                startCap: n.startCap,
                endCap: n.endCap,
              });
            }
          },
          clone: function () {
            var n = this.serialize();
            return (
              this.diagram &&
                this.diagram._isEditable &&
                r(this.dataItem) &&
                (n.options.dataItem = ot(this.dataItem)),
              new a(this.from, this.to, n.options)
            );
          },
          serialize: function () {
            var t = this.from.toJSON ? this.from.toJSON : "" + this.from,
              i = this.to.toJSON ? this.to.toJSON : "" + this.to,
              n = e({}, { options: this.options, from: t, to: i });
            return (
              r(this.dataItem) && (n.dataItem = "" + this.dataItem),
              (n.options.points = this.points()),
              n
            );
          },
          _hitTest: function (n) {
            if (this.visible()) {
              var t = new f(n.x, n.y),
                i = this.sourcePoint(),
                r = this.targetPoint();
              if (
                (n.isEmpty && !n.isEmpty() && n.contains(i) && n.contains(r)) ||
                this._router.hitTest(t)
              )
                return this;
            }
          },
          _hover: function (n) {
            var t = (this.options.stroke || {}).color;
            n &&
              p(this.options.hover.stroke.color) &&
              (t = this.options.hover.stroke.color);
            this.path.redraw({ stroke: { color: t } });
          },
          _refreshPath: function () {
            r(this.path) &&
              (this._drawPath(), this.bounds(this._router.getBounds()));
          },
          _drawPath: function () {
            var n, t, i;
            this._router && this._router.route();
            n = this.sourcePoint();
            t = this.targetPoint();
            i = this.points();
            this.path.redraw({ points: [n].concat(i, [t]) });
          },
          _clearSourceConnector: function () {
            this.sourceConnector = t;
            this._resolvedSourceConnector = t;
          },
          _clearTargetConnector: function () {
            this.targetConnector = t;
            this._resolvedTargetConnector = t;
          },
          _removeFromSourceConnector: function () {
            this.sourceConnector &&
              s.remove(this.sourceConnector.connections, this);
          },
          _removeFromTargetConnector: function () {
            this.targetConnector &&
              s.remove(this.targetConnector.connections, this);
          },
          toJSON: function () {
            var i,
              r,
              t,
              n = this;
            return (
              n.from && n.from.toJSON
                ? (i = n.from.toJSON())
                : ((t = n._sourcePoint), (i = { x: t.x, y: t.y })),
              n.to && n.to.toJSON
                ? (r = n.to.toJSON())
                : ((t = n._targetPoint), (r = { x: t.x, y: t.y })),
              { from: i, to: r }
            );
          },
        });
        ht = ni.extend({
          init: function (n, t) {
            var i = this;
            kendo.destroy(n);
            ni.fn.init.call(i, n, t);
            i._initTheme();
            i._initElements();
            i._extendLayoutOptions(i.options);
            i._initDefaults(t);
            i._interactionDefaults();
            i._initCanvas();
            i.mainLayer = new ri({ id: "main-layer" });
            i.canvas.append(i.mainLayer);
            i._shapesQuadTree = new dt(i);
            i._pan = new f();
            i._adorners = [];
            i.adornerLayer = new ri({ id: "adorner-layer" });
            i.canvas.append(i.adornerLayer);
            i._createHandlers();
            i._initialize();
            i._resizingAdorner = new iu(i, { editable: i.options.editable });
            i._connectorsAdorner = new ru(i);
            i._adorn(i._resizingAdorner, !0);
            i._adorn(i._connectorsAdorner, !0);
            i.selector = new tu(i);
            i._clipboard = [];
            i.pauseMouseHandlers = !1;
            i._fetchFreshData();
            i._createGlobalToolBar();
            i._createOptionElements();
            i.zoom(i.options.zoom);
            i.canvas.draw();
          },
          options: {
            name: "Diagram",
            theme: "default",
            layout: "",
            zoomRate: 0.1,
            zoom: 1,
            zoomMin: 0,
            zoomMax: 2,
            dataSource: {},
            draggable: !0,
            template: "",
            autoBind: !0,
            editable: {
              rotate: {},
              resize: {},
              text: !0,
              tools: [],
              drag: { snap: { size: 10, angle: 10 } },
              remove: !0,
            },
            pannable: {},
            selectable: { key: "none" },
            tooltip: { enabled: !0, format: "{0}" },
            copy: { enabled: !0, offsetX: 20, offsetY: 20 },
            shapeDefaults: i.shapeDefaults({ undoable: !0 }),
            connectionDefaults: { editable: { tools: [] }, type: gi },
            shapes: [],
            connections: [],
          },
          events: [
            ci,
            yt,
            hi,
            tr,
            si,
            ei,
            rt,
            ft,
            "mouseEnter",
            "mouseLeave",
            "toolBarClick",
            "save",
            "cancel",
            "edit",
            "remove",
            "add",
            "dataBound",
            "dragStart",
            "drag",
            "dragEnd",
          ],
          items: function () {
            return n();
          },
          _createGlobalToolBar: function () {
            var n,
              t = this.options.editable;
            t &&
              ((n = t.tools),
              !this._isEditable ||
                n === !1 ||
                (n && 0 !== n.length) ||
                (n = [
                  "createShape",
                  "undo",
                  "redo",
                  "rotateClockwise",
                  "rotateAnticlockwise",
                ]),
              n &&
                n.length &&
                ((this.toolBar = new ct(this, {
                  tools: n || {},
                  click: u(this._toolBarClick, this),
                  modal: !1,
                })),
                this.toolBar.element.css({ textAlign: "left" }),
                this.element.prepend(this.toolBar.element),
                this._resize()));
          },
          createShape: function () {
            var n, r, u, t, i, f;
            ((this.editor && this.editor.end()) || !this.editor) &&
              ((n = this.dataSource),
              (r = n.view() || []),
              (u = r.length),
              (t = st(n, {})),
              (i = this._createShape(t, {})),
              this.trigger("add", { shape: i }) ||
                (n.insert(u, t),
                (f = this._inactiveShapeItems.getByUid(t.uid)),
                (f.element = i),
                this.edit(i)));
          },
          _createShape: function (n, t) {
            t = e({}, this.options.shapeDefaults, t);
            t.dataItem = n;
            return new h(t, this);
          },
          createConnection: function () {
            var t, r, u, i, n;
            ((this.editor && this.editor.end()) || !this.editor) &&
              ((t = this.connectionsDataSource),
              (r = t.view() || []),
              (u = r.length),
              (i = st(t, {})),
              (n = this._createConnection(i)),
              this.trigger("add", { connection: n }) ||
                ((this._connectionsDataMap[i.uid] = n),
                t.insert(u, i),
                this.addConnection(n, !1),
                this.edit(n)));
          },
          _createConnection: function (n, t, i) {
            var u,
              r = e({}, this.options.connectionDefaults);
            return (r.dataItem = n), (u = new a(t || new f(), i || new f(), r));
          },
          editModel: function (n, t) {
            var r, f, i, o;
            if ((this.cancelEdit(), (i = this.options.editable), "shape" == t))
              (r = i.shapeEditors), (f = i.shapeTemplate);
            else {
              if ("connection" != t) return;
              o = u(or, this);
              r = e({}, { from: o, to: o }, i.connectionEditors);
              f = i.connectionTemplate;
            }
            this.editor = new kt(this.element, {
              update: u(this._update, this),
              cancel: u(this._cancel, this),
              model: n,
              type: t,
              target: this,
              editors: r,
              template: f,
            });
            this.trigger("edit", this._editArgs());
          },
          edit: function (n) {
            if (n.dataItem) {
              var t = n instanceof h ? "shape" : "connection";
              this.editModel(n.dataItem, t);
            }
          },
          cancelEdit: function () {
            this.editor &&
              (this._getEditDataSource().cancelChanges(this.editor.model),
              this._destroyEditor());
          },
          saveEdit: function () {
            this.editor &&
              this.editor.end() &&
              !this.trigger("save", this._editArgs()) &&
              this._getEditDataSource().sync();
          },
          _update: function () {
            this.editor &&
              this.editor.end() &&
              !this.trigger("save", this._editArgs()) &&
              (this._getEditDataSource().sync(), this._destroyEditor());
          },
          _cancel: function () {
            var n, t;
            this.editor &&
              !this.trigger("cancel", this._editArgs()) &&
              ((n = this.editor.model),
              this._getEditDataSource().cancelChanges(n),
              (t = this._connectionsDataMap[n.uid] || this._dataMap[n.id]),
              t && t._setOptionsFromModel(n),
              this._destroyEditor());
          },
          _getEditDataSource: function () {
            return "shape" === this.editor.options.type
              ? this.dataSource
              : this.connectionsDataSource;
          },
          _editArgs: function () {
            var n = { container: this.editor.wrapper };
            return (n[this.editor.options.type] = this.editor.model), n;
          },
          _destroyEditor: function () {
            this.editor && (this.editor.close(), (this.editor = null));
          },
          _initElements: function () {
            this.wrapper = this.element
              .empty()
              .css("position", "relative")
              .attr("tabindex", 0)
              .addClass("k-widget k-diagram");
            this.scrollable = n("<div />").appendTo(this.element);
          },
          _initDefaults: function (n) {
            var t = this.options,
              i = t.editable,
              u = t.shapeDefaults,
              f = t.connectionDefaults,
              r = (n || {}).shapeDefaults;
            i === !1
              ? ((u.editable = !1), (f.editable = !1))
              : (yi(i, u.editable, ["drag", "remove", "connect"]),
                yi(i, f.editable, ["drag", "remove"]));
            r && r.connectors && (t.shapeDefaults.connectors = r.connectors);
          },
          _interactionDefaults: function () {
            var n = this.options,
              t = n.selectable,
              i = n.pannable,
              u = kendo.support.mobileOS;
            t &&
              !r(t.multiple) &&
              (n.selectable = e({ multiple: !u }, n.selectable));
            i &&
              !r(i.key) &&
              (n.pannable = e({ key: u ? "none" : "ctrl" }, n.pannable));
          },
          _initCanvas: function () {
            var i = n("<div class='k-layer'></div>").appendTo(
                this.scrollable
              )[0],
              t = this.viewport();
            this.canvas = new vr(i, {
              width: t.width || hu,
              height: t.height || cu,
            });
          },
          _createHandlers: function () {
            var n = this,
              t = n.element;
            t.on(uf, u(n._wheel, n)).on("keydown" + l, u(n._keydown, n));
            n._userEvents = new kendo.UserEvents(this.scrollable, {
              multiTouch: !0,
              fastTap: !0,
              tap: u(n._tap, n),
              start: u(n._dragStart, n),
              move: u(n._drag, n),
              end: u(n._dragEnd, n),
              gesturestart: u(n._gestureStart, n),
              gesturechange: u(n._gestureChange, n),
              gestureend: u(n._gestureEnd, n),
              doubleTap: u(n._doubleTap, n),
              supportDoubleTap: !0,
            });
            n.toolService = new nu(n);
            this.scrollable
              .on("mouseover" + l, u(n._mouseover, n))
              .on("mouseout" + l, u(n._mouseout, n))
              .on("mousemove" + l, u(n._mouseMove, n))
              .on("mousedown" + l, u(n._mouseDown, n))
              .on("mouseup" + l, u(n._mouseUp, n));
            this._syncHandler = u(n._syncChanges, n);
            n._resizeHandler = u(n.resize, n, !1);
            kendo.onResize(n._resizeHandler);
            this.bind(yt, u(n._destroyToolBar, n));
            this.bind(hi, u(n._destroyToolBar, n));
          },
          _dragStart: function (n) {
            var i, t;
            this._pauseMouseHandlers = !0;
            i = this._eventPositions(n, !0);
            t = n.event;
            this.toolService.start(i, this._meta(t)) &&
              (this._destroyToolBar(), t.preventDefault());
          },
          _drag: function (n) {
            var i = this._eventPositions(n),
              t = n.event;
            this.toolService.move(i, this._meta(t)) && t.preventDefault();
          },
          _dragEnd: function (n) {
            var i, t;
            this._pauseMouseHandlers = !1;
            i = this._eventPositions(n);
            t = n.event;
            this.toolService.end(i, this._meta(t)) &&
              (this._createToolBar(), t.preventDefault());
          },
          _mouseMove: function (n) {
            if (!this._pauseMouseHandlers) {
              var t = this._eventPositions(n);
              this.toolService._updateHoveredItem(t);
              this.toolService._updateCursor(t);
            }
          },
          _mouseDown: function () {
            this._pauseMouseHandlers = !0;
          },
          _mouseUp: function () {
            this._pauseMouseHandlers = !1;
          },
          _tap: function (n) {
            var t,
              f,
              i,
              r = this.toolService,
              u = this.options.selectable,
              e = this._eventPositions(n),
              o = this.focus();
            r._updateHoveredItem(e);
            r.hoveredItem
              ? ((t = r.hoveredItem),
                this.trigger("click", { item: t, point: e }),
                u &&
                  t.options.selectable !== !1 &&
                  ((f = u.multiple !== !1),
                  (i = kendo.support.mobileOS || this._meta(n.event).ctrlKey),
                  t.isSelected
                    ? i
                      ? (this._destroyToolBar(), t.select(!1))
                      : this._createToolBar(o)
                    : (this._destroyToolBar(),
                      this.select(t, { addToSelection: f && i }),
                      this._createToolBar(o))))
              : u && (this._destroyToolBar(), this.deselect());
          },
          _keydown: function (n) {
            this.toolService.keyDown(n.keyCode, this._meta(n)) &&
              n.preventDefault();
          },
          _wheel: function (n) {
            var t = fr(n),
              i = this._eventPositions(n),
              r = e(this._meta(n), { delta: t });
            this.toolService.wheel(i, r) && n.preventDefault();
          },
          _meta: function (n) {
            return {
              ctrlKey: n.ctrlKey,
              metaKey: n.metaKey,
              altKey: n.altKey,
              shiftKey: n.shiftKey,
              type: n.type,
            };
          },
          _eventPositions: function (n, t) {
            var i, r, u;
            return (
              n.touch
                ? ((r = t ? "startLocation" : "location"),
                  (i = new f(n.x[r], n.y[r])))
                : ((u = n.originalEvent), (i = new f(u.pageX, u.pageY))),
              this.documentToModel(i)
            );
          },
          _gestureStart: function (n) {
            var t, i;
            this._destroyToolBar();
            this.scroller.disable();
            t = this.documentToModel(new f(n.center.x, n.center.y));
            i = { point: t, zoom: this.zoom() };
            this.trigger(yt, i) ||
              ((this._gesture = n), (this._initialCenter = t));
          },
          _gestureChange: function (n) {
            var r,
              i,
              s = this._gesture,
              h = this._initialCenter,
              c = this.documentToView(new f(n.center.x, n.center.y)),
              u = n.distance / s.distance,
              t = this._zoom,
              e = !1;
            o.abs(u - 1) >= ff &&
              ((this._zoom = t = this._getValidZoom(t * u)),
              (this.options.zoom = t),
              (this._gesture = n),
              (e = !0));
            r = h.times(t);
            i = c.minus(r);
            (e || this._pan.distanceTo(i) >= ef) &&
              (this._panTransform(i), this._updateAdorners());
            n.preventDefault();
          },
          _doubleTap: function (n) {
            var t = this,
              f = this._eventPositions(n),
              u = t.options,
              e = u.zoomRate,
              i = t.zoom() + e,
              o = this._meta(n),
              r = { point: f, meta: o, zoom: i };
            t.trigger(yt, r) ||
              ((i = kendo.dataviz.round(
                Math.max(u.zoomMin, Math.min(u.zoomMax, i)),
                2
              )),
              (r.zoom = i),
              t.zoom(i, r),
              t.trigger(ci, r));
          },
          _gestureEnd: function () {
            this.options.pannable !== !1 && this.scroller.enable();
            this.trigger(ci, { point: this._initialCenter, zoom: this.zoom() });
          },
          _resize: function () {
            var n = this.viewport();
            this.canvas && this.canvas.size(n);
            this.scrollable && this.toolBar && this.scrollable.height(n.height);
          },
          _mouseover: function (n) {
            var t = n.target._kendoNode;
            t && t.srcElement._hover && t.srcElement._hover(!0, t.srcElement);
          },
          _mouseout: function (n) {
            var t = n.target._kendoNode;
            t && t.srcElement._hover && t.srcElement._hover(!1, t.srcElement);
          },
          _initTheme: function () {
            var t,
              n = this,
              i = ((n.options || {}).theme || "").toLowerCase(),
              r = y.ui.themes || {};
            t =
              y.SASS_THEMES.indexOf(i) != -1
                ? y.autoTheme().diagram
                : (r[i] || {}).diagram;
            n.options = e({}, t, n.options);
            n.options.editable === !0 &&
              e(n.options, { editable: (t || {}).editable });
          },
          _createOptionElements: function () {
            var n = this.options,
              t = n.shapes.length;
            t && this._createShapes();
            n.connections.length && this._createConnections();
            t && n.layout && this.layout(n.layout);
          },
          _createShapes: function () {
            for (
              var t, i = this, u = i.options, r = u.shapes, n = 0;
              n < r.length;
              n++
            )
              (t = r[n]), i.addShape(t);
          },
          _createConnections: function () {
            for (
              var n,
                r,
                u,
                i = this,
                f = i.options,
                s = f.connectionDefaults,
                o = f.connections,
                t = 0;
              t < o.length;
              t++
            )
              (n = o[t]),
                (r = i._findConnectionTarget(n.from)),
                (u = i._findConnectionTarget(n.to)),
                i.connect(r, u, e({}, s, n));
          },
          _findConnectionTarget: function (n) {
            var r, i, t;
            return (
              (n = n || {}),
              (r = this),
              (i = vt(n) ? n : n.shapeId || n.id),
              i
                ? ((t = r.getShapeById(i)),
                  n.connector && (t = t.getConnector(n.connector)))
                : (t = new f(n.x || 0, n.y || 0)),
              t
            );
          },
          destroy: function () {
            var n = this;
            ni.fn.destroy.call(n);
            this._userEvents && this._userEvents.destroy();
            kendo.unbindResize(n._resizeHandler);
            n.clear();
            n.element.off(l);
            n.scroller.wrapper.off(l);
            n.canvas.destroy(!0);
            n.canvas = t;
            n._destroyEditor();
            n.destroyScroller();
            n._destroyGlobalToolBar();
            n._destroyToolBar();
          },
          destroyScroller: function () {
            var n = this.scroller;
            n && (n.destroy(), n.element.remove(), (this.scroller = null));
          },
          save: function () {
            for (
              var t, i, r = { shapes: [], connections: [] }, n = 0;
              n < this.shapes.length;
              n++
            )
              (i = this.shapes[n]),
                i.options.serializable && r.shapes.push(i.options);
            for (n = 0; n < this.connections.length; n++)
              (t = this.connections[n]),
                r.connections.push(e({}, t.options, t.toJSON()));
            return r;
          },
          focus: function () {
            if (!this.element.is(kendo._activeElement())) {
              var t,
                r = this.element,
                n = r[0],
                i = [],
                u = [],
                f = document.documentElement;
              do
                (n = n.parentNode),
                  n.scrollHeight > n.clientHeight &&
                    (i.push(n), u.push(n.scrollTop));
              while (n != f);
              for (r.focus(), t = 0; t < i.length; t++) i[t].scrollTop = u[t];
              return !0;
            }
          },
          load: function (n) {
            this.clear();
            this.setOptions(n);
            this._createShapes();
            this._createConnections();
          },
          setOptions: function (n) {
            e(this.options, n);
          },
          clear: function () {
            var n = this;
            n.select(!1);
            n.mainLayer.clear();
            n._shapesQuadTree.clear();
            n._initialize();
          },
          connect: function (n, t, i) {
            var r, u;
            return (
              this.connectionsDataSource && this._isEditable
                ? ((u = this.connectionsDataSource.add({})),
                  (r = this._connectionsDataMap[u.uid]),
                  r.source(n),
                  r.target(t),
                  r.redraw(i),
                  r.updateModel())
                : ((r = new a(n, t, e({}, this.options.connectionDefaults, i))),
                  this.addConnection(r)),
              r
            );
          },
          connected: function (n, t) {
            for (var r, i = 0; i < this.connections.length; i++)
              if (((r = this.connections[i]), r.from == n && r.to == t))
                return !0;
            return !1;
          },
          addConnection: function (n, t) {
            return (
              t !== !1 &&
                this.undoRedoService.add(new i.AddConnectionUnit(n, this), !1),
              (n.diagram = this),
              n._setOptionsFromModel(),
              n.refresh(),
              this.mainLayer.append(n.visual),
              this.connections.push(n),
              this.trigger(rt, { added: [n], removed: [] }),
              n
            );
          },
          _addConnection: function (n, t) {
            var i,
              r = this.connectionsDataSource;
            if (r && this._isEditable) {
              if (
                ((i = st(r, ot(n.dataItem))),
                (n.dataItem = i),
                n.updateModel(),
                !this.trigger("add", { connection: n }))
              )
                return (
                  (this._connectionsDataMap[i.uid] = n),
                  r.add(i),
                  this.addConnection(n, t),
                  n._updateConnectors(),
                  n
                );
            } else if (!this.trigger("add", { connection: n }))
              return this.addConnection(n, t), n._updateConnectors(), n;
          },
          addShape: function (n, t) {
            var r,
              u = this.options.shapeDefaults;
            if (n instanceof h) r = n;
            else {
              if (n instanceof kendo.Class) return;
              u = e({}, u, n || {});
              r = new h(u, this);
            }
            return (
              t !== !1 &&
                this.undoRedoService.add(new i.AddShapeUnit(r, this), !1),
              this.shapes.push(r),
              r.diagram !== this &&
                (this._shapesQuadTree.insert(r), (r.diagram = this)),
              this.mainLayer.append(r.visual),
              this.trigger(rt, { added: [r], removed: [] }),
              r
            );
          },
          _addShape: function (n, t) {
            var i,
              r,
              f = this,
              u = f.dataSource;
            if (u && this._isEditable) {
              if (
                ((i = st(u, ot(n.dataItem))),
                (n.dataItem = i),
                n.updateModel(),
                !this.trigger("add", { shape: n }))
              )
                return (
                  this.dataSource.add(i),
                  (r = this._inactiveShapeItems.getByUid(i.uid)),
                  (r.element = n),
                  (r.undoable = t),
                  n
                );
            } else if (!this.trigger("add", { shape: n }))
              return this.addShape(n, t);
          },
          remove: function (n, t) {
            var f, e, u, i;
            for (
              n = g(n) ? n.slice(0) : [n],
                f = vi(n),
                e = f.shapes,
                u = f.connections,
                r(t) || (t = !0),
                t && this.undoRedoService.begin(),
                this._suspendModelRefresh(),
                i = e.length - 1;
              i >= 0;
              i--
            )
              this._removeItem(e[i], t, u);
            for (i = u.length - 1; i >= 0; i--) this._removeItem(u[i], t);
            this._resumeModelRefresh();
            t && this.undoRedoService.commit(!1);
            this.trigger(rt, { added: [], removed: n });
          },
          _removeShapeDataItem: function (n) {
            this._isEditable &&
              (this.dataSource.remove(n.dataItem),
              delete this._dataMap[n.dataItem.id]);
          },
          _removeConnectionDataItem: function (n) {
            this._isEditable &&
              (this.connectionsDataSource.remove(n.dataItem),
              delete this._connectionsDataMap[n.dataItem.uid]);
          },
          _triggerRemove: function (n) {
            for (var t, u, r, f = [], i = 0; i < n.length; i++)
              (t = n[i]),
                (r = t.options.editable),
                (u = t instanceof h ? { shape: t } : { connection: t }),
                r && r.remove !== !1 && !this.trigger("remove", u) && f.push(t);
            return f;
          },
          undo: function () {
            this.undoRedoService.undo();
          },
          redo: function () {
            this.undoRedoService.redo();
          },
          select: function (n, t) {
            if (!p(n)) return this._selectedItems;
            t = e({ addToSelection: !1 }, t);
            var i,
              u,
              o = t.addToSelection,
              r = [],
              f = [];
            for (
              o || this.deselect(),
                this._internalSelection = !0,
                n instanceof Array ? (r = n) : n instanceof b && (r = [n]),
                i = 0;
              i < r.length;
              i++
            )
              (u = r[i]), u.select(!0) && f.push(u);
            this._selectionChanged(f, []);
            this._internalSelection = !1;
          },
          selectAll: function () {
            this.select(this.shapes.concat(this.connections));
          },
          selectArea: function (n) {
            var i, r, t, u;
            if (((this._internalSelection = !0), (u = []), n instanceof c))
              for (
                r = this.shapes.concat(this.connections), i = 0;
                i < r.length;
                i++
              )
                (t = r[i]),
                  (!n || t._hitTest(n)) &&
                    t.options.enable &&
                    t.select(!0) &&
                    u.push(t);
            this._selectionChanged(u, []);
            this._internalSelection = !1;
          },
          deselect: function (n) {
            this._internalSelection = !0;
            var r,
              i,
              u = [],
              t = [];
            for (
              n instanceof Array
                ? (t = n)
                : n instanceof b
                ? t.push(n)
                : p(n) || (t = this._selectedItems.slice(0)),
                i = 0;
              i < t.length;
              i++
            )
              (r = t[i]), r.select(!1) && u.push(r);
            this._selectionChanged([], u);
            this._internalSelection = !1;
          },
          toFront: function (n, t) {
            var i, u, f;
            n || (n = this._selectedItems.slice());
            i = this._getDiagramItems(n);
            !r(t) || t
              ? ((u = li(this.mainLayer, i.visuals)),
                (f = new eu(this, n, u)),
                this.undoRedoService.add(f))
              : (this.mainLayer.toFront(i.visuals), this._fixOrdering(i, !0));
          },
          toBack: function (n, t) {
            var i, u, f;
            n || (n = this._selectedItems.slice());
            i = this._getDiagramItems(n);
            !r(t) || t
              ? ((u = li(this.mainLayer, i.visuals)),
                (f = new fu(this, n, u)),
                this.undoRedoService.add(f))
              : (this.mainLayer.toBack(i.visuals), this._fixOrdering(i, !1));
          },
          bringIntoView: function (n, t) {
            var s,
              r,
              f,
              h,
              u = this.viewport(),
              l = new i.RectAlign(u);
            0 !== u.width &&
              0 !== u.height &&
              ((t = e({ animate: !1, align: "center middle" }, t)),
              "none" == t.align && (t.align = "center middle"),
              n instanceof b
                ? (r = n.bounds(ur))
                : g(n)
                ? (r = this.boundingBox(n))
                : n instanceof c && (r = n.clone()),
              (f = r.clone()),
              r.zoom(this._zoom),
              (r.width > u.width || r.height > u.height) &&
                ((this._zoom = this._getValidZoom(
                  o.min(u.width / f.width, u.height / f.height)
                )),
                (r = f.clone().zoom(this._zoom))),
              this._zoomMainLayer(),
              (s = r.clone()),
              l.align(r, t.align),
              (h = r.topLeft().minus(s.topLeft())),
              this.pan(h.times(-1), t.animate));
          },
          alignShapes: function (n) {
            var e, r, t, u, s, c, l;
            if ((d(n) && (n = "Left"), (e = this.select()), 0 !== e.length)) {
              switch (n.toLowerCase()) {
                case "left":
                case "top":
                  r = wu;
                  break;
                case "right":
                case "bottom":
                  r = bu;
              }
              for (u = 0; u < e.length; u++)
                if (((t = e[u]), t instanceof h))
                  switch (n.toLowerCase()) {
                    case "left":
                      r = o.min(r, t.options.x);
                      break;
                    case "top":
                      r = o.min(r, t.options.y);
                      break;
                    case "right":
                      r = o.max(r, t.options.x);
                      break;
                    case "bottom":
                      r = o.max(r, t.options.y);
                  }
              for (s = [], c = [], u = 0; u < e.length; u++)
                if (((t = e[u]), t instanceof h))
                  switch ((c.push(t), s.push(t.bounds()), n.toLowerCase())) {
                    case "left":
                    case "right":
                      t.position(new f(r, t.options.y));
                      break;
                    case "top":
                    case "bottom":
                      t.position(new f(t.options.x, r));
                  }
              l = new i.TransformUnit(c, s);
              this.undoRedoService.add(l, !1);
            }
          },
          zoom: function (n, t) {
            var r, f, e, u;
            return (
              n &&
                ((r = t ? t.point : new i.Point(0, 0)),
                (n = this._zoom = this._getValidZoom(n)),
                d(r) ||
                  ((r = new i.Point(o.round(r.x), o.round(r.y))),
                  (f = r.times(n)),
                  (e = this.modelToView(r)),
                  (u = e.minus(f)),
                  this._storePan(new i.Point(o.round(u.x), o.round(u.y)))),
                t && (t.zoom = n),
                this._panTransform(),
                this.canvas.surface.hideTooltip(),
                this._updateAdorners()),
              this._zoom
            );
          },
          _getPan: function (n) {
            var t = this.canvas;
            return t.translate || (n = n.plus(this._pan)), n;
          },
          pan: function (n, i) {
            var r, u;
            return n instanceof f
              ? ((r = this),
                (u = r.scroller),
                (n = r._getPan(n)),
                (n = n.times(-1)),
                i
                  ? u.animatedScrollTo(n.x, n.y, function () {
                      r._updateAdorners();
                    })
                  : (u.scrollTo(n.x, n.y), r._updateAdorners()),
                t)
              : this._pan.times(-1);
          },
          viewport: function () {
            var n = this.element,
              i = n.width(),
              t = n.height();
            return (
              this.toolBar && (t -= ii(this.toolBar.element)), new c(0, 0, i, t)
            );
          },
          copy: function () {
            var n, t;
            if (this.options.copy.enabled)
              for (
                this._clipboard = [], this._copyOffset = 1, n = 0;
                n < this._selectedItems.length;
                n++
              )
                (t = this._selectedItems[n]), this._clipboard.push(t);
          },
          cut: function () {
            var n, t;
            if (this.options.copy.enabled) {
              for (
                this._clipboard = [], this._copyOffset = 0, n = 0;
                n < this._selectedItems.length;
                n++
              )
                (t = this._selectedItems[n]), this._clipboard.push(t);
              this.remove(this._clipboard, !0);
            }
          },
          paste: function () {
            var t, n, i, u, e, o, s, r;
            if (this._clipboard.length > 0) {
              for (
                u = {},
                  e = vi(this._clipboard),
                  o = e.connections,
                  s = e.shapes,
                  r = {
                    x: this._copyOffset * this.options.copy.offsetX,
                    y: this._copyOffset * this.options.copy.offsetY,
                  },
                  this.deselect(),
                  i = 0;
                i < s.length;
                i++
              )
                (t = s[i]),
                  (n = t.clone()),
                  (u[t.id] = n),
                  n.position(new f(t.options.x + r.x, t.options.y + r.y)),
                  (n.diagram = this),
                  (n = this._addShape(n)),
                  n && n.select();
              for (i = 0; i < o.length; i++)
                (t = o[i]),
                  (n = this._addConnection(t.clone())),
                  n &&
                    (this._updateCopiedConnection(n, t, "source", u, r),
                    this._updateCopiedConnection(n, t, "target", u, r),
                    n.select(!0),
                    n.updateModel());
              this._syncChanges();
              this._copyOffset += 1;
            }
          },
          _updateCopiedConnection: function (n, t, i, r, u) {
            var c,
              h,
              e,
              o = t[i](),
              s = this;
            o instanceof v && r[o.shape.id]
              ? ((e = r[o.shape.id]),
                s.getShapeById(e.id)
                  ? n[i](e.getConnector(o.options.name))
                  : ((h = s._inactiveShapeItems.getByUid(e.dataItem.uid)),
                    h &&
                      ((c = function (t) {
                        e = s._dataMap[t.id];
                        n[i](e.getConnector(o.options.name));
                        n.updateModel();
                      }),
                      s._deferredConnectionUpdates.push(h.onActivate(c)))))
              : n[i](new f(t[i + "Point"]().x + u.x, t[i + "Point"]().y + u.y));
          },
          boundingBox: function (n, t) {
            var r,
              i,
              u,
              f = c.empty(),
              e = p(n) ? this._getDiagramItems(n) : { shapes: this.shapes };
            if (e.shapes.length > 0)
              for (
                i = e.shapes[0], f = i.bounds(et), u = 1;
                u < e.shapes.length;
                u++
              )
                (i = e.shapes[u]),
                  (r = i.bounds(et)),
                  t === !0 &&
                    ((r.x -= i._rotationOffset.x),
                    (r.y -= i._rotationOffset.y)),
                  (f = f.union(r));
            return f;
          },
          _containerOffset: function () {
            var n = this.element.offset();
            return this.toolBar && (n.top += ii(this.toolBar.element)), n;
          },
          documentToView: function (n) {
            var t = this._containerOffset();
            return new f(n.x - t.left, n.y - t.top);
          },
          viewToDocument: function (n) {
            var t = this._containerOffset();
            return new f(n.x + t.left, n.y + t.top);
          },
          viewToModel: function (n) {
            return this._transformWithMatrix(n, this._matrixInvert);
          },
          modelToView: function (n) {
            return this._transformWithMatrix(n, this._matrix);
          },
          modelToLayer: function (n) {
            return this._transformWithMatrix(n, this._layerMatrix);
          },
          layerToModel: function (n) {
            return this._transformWithMatrix(n, this._layerMatrixInvert);
          },
          documentToModel: function (n) {
            var t = this.documentToView(n);
            return (
              this.canvas.translate ||
                ((t.x = t.x + this.scroller.scrollLeft),
                (t.y = t.y + this.scroller.scrollTop)),
              this.viewToModel(t)
            );
          },
          modelToDocument: function (n) {
            return this.viewToDocument(this.modelToView(n));
          },
          _transformWithMatrix: function (n, t) {
            var r,
              u,
              i = n;
            return (
              n instanceof f
                ? t && (i = t.apply(n))
                : ((r = this._transformWithMatrix(n.topLeft(), t)),
                  (u = this._transformWithMatrix(n.bottomRight(), t)),
                  (i = c.fromPoints(r, u))),
              i
            );
          },
          setDataSource: function (n) {
            this.options.dataSource = n;
            this._dataSource();
            this.options.autoBind && this.dataSource.fetch();
          },
          setConnectionsDataSource: function (n) {
            this.options.connectionsDataSource = n;
            this._connectionDataSource();
            this.options.autoBind && this.connectionsDataSource.fetch();
          },
          layout: function (n) {
            var r, t, f, u, e;
            switch (
              ((this._layouting = !0),
              d(n) && (n = this.options.layout),
              (r = d(n) || d(n.type) ? "Tree" : n.type),
              r.toLowerCase())
            ) {
              case "tree":
                t = new i.TreeLayout(this);
                break;
              case "layered":
                t = new i.LayeredLayout(this);
                break;
              case "forcedirected":
              case "force":
              case "spring":
              case "springembedder":
                t = new i.SpringLayout(this);
                break;
              default:
                throw "Layout algorithm '" + r + "' is not supported.";
            }
            f = new i.LayoutState(this);
            u = t.layout(n);
            u &&
              ((e = new i.LayoutUndoUnit(f, u, n ? n.animate : null)),
              this.undoRedoService.add(e));
            this._layouting = !1;
            this._redrawConnections();
          },
          getShapeById: function (n) {
            var t;
            return (t = s.first(this.shapes, function (t) {
              return t.visual.id === n;
            }))
              ? t
              : (t = s.first(this.connections, function (t) {
                  return t.visual.id === n;
                }));
          },
          getShapeByModelId: function (n) {
            return this._isEditable
              ? this._dataMap[n]
              : s.first(this.shapes, function (t) {
                  return (t.dataItem || {}).id === n;
                });
          },
          getShapeByModelUid: function (n) {
            return this._isEditable
              ? s.first(this.shapes, function (t) {
                  return (t.dataItem || {}).uid === n;
                })
              : this._dataMap[n];
          },
          getConnectionByModelId: function (n) {
            var t;
            return (
              this.connectionsDataSource &&
                (t = s.first(this.connections, function (t) {
                  return (t.dataItem || {}).id === n;
                })),
              t
            );
          },
          getConnectionByModelUid: function (n) {
            var t;
            return (
              this.connectionsDataSource && (t = this._connectionsDataMap[n]), t
            );
          },
          _extendLayoutOptions: function (n) {
            n.layout &&
              (n.layout = e(
                {},
                i.LayoutBase.fn.defaultOptions || {},
                n.layout
              ));
          },
          _selectionChanged: function (n, t) {
            (n.length || t.length) &&
              this.trigger(tr, { selected: n, deselected: t });
          },
          _getValidZoom: function (n) {
            return o.min(o.max(n, this.options.zoomMin), this.options.zoomMax);
          },
          _panTransform: function (n) {
            var t = this,
              i = n || t._pan;
            t.canvas.translate
              ? (t.scroller.scrollTo(i.x, i.y), t._zoomMainLayer())
              : (t._storePan(i), t._transformMainLayer());
          },
          _finishPan: function () {
            this.trigger(hi, { total: this._pan, delta: Number.NaN });
          },
          _storePan: function (n) {
            this._pan = n;
            this._storeViewMatrix();
          },
          _zoomMainLayer: function () {
            var n = this._zoom,
              t = new ui(0, 0, n, n);
            t.render(this.mainLayer);
            this._storeLayerMatrix(t);
            this._storeViewMatrix();
          },
          _transformMainLayer: function () {
            var n = this._pan,
              t = this._zoom,
              i = new ui(n.x, n.y, t, t);
            i.render(this.mainLayer);
            this._storeLayerMatrix(i);
            this._storeViewMatrix();
          },
          _storeLayerMatrix: function (n) {
            this._layerMatrix = n.toMatrix();
            this._layerMatrixInvert = n.invert().toMatrix();
          },
          _storeViewMatrix: function () {
            var n = this._pan,
              t = this._zoom,
              i = new ui(n.x, n.y, t, t);
            this._matrix = i.toMatrix();
            this._matrixInvert = i.invert().toMatrix();
          },
          _toIndex: function (n, t) {
            var i = this._getDiagramItems(n);
            this.mainLayer.toIndex(i.visuals, t);
            this._fixOrdering(i, !1);
          },
          _fixOrdering: function (n, t) {
            for (
              var r,
                u = t ? this.shapes.length - 1 : 0,
                f = t ? this.connections.length - 1 : 0,
                i = 0;
              i < n.shapes.length;
              i++
            )
              (r = n.shapes[i]),
                s.remove(this.shapes, r),
                s.insert(this.shapes, r, u);
            for (i = 0; i < n.cons.length; i++)
              (r = n.cons[i]),
                s.remove(this.connections, r),
                s.insert(this.connections, r, f);
          },
          _getDiagramItems: function (n) {
            var r,
              i,
              t = {},
              u = n;
            for (
              t.visuals = [],
                t.shapes = [],
                t.cons = [],
                n ? g(n) || (u = [n]) : (u = this._selectedItems.slice()),
                r = 0;
              r < u.length;
              r++
            )
              (i = u[r]),
                i instanceof h
                  ? (t.shapes.push(i), t.visuals.push(i.visual))
                  : i instanceof a &&
                    (t.cons.push(i), t.visuals.push(i.visual));
            return t;
          },
          _removeItem: function (n, t, i) {
            n.select(!1);
            n instanceof h
              ? (this._removeShapeDataItem(n), this._removeShape(n, t, i))
              : n instanceof a &&
                (this._removeConnectionDataItem(n),
                this._removeConnection(n, t));
            this.mainLayer.remove(n.visual);
          },
          _removeShape: function (n, t, i) {
            var r,
              u,
              f,
              e,
              o = [],
              h = [];
            for (
              this.toolService._removeHover(),
                t && this.undoRedoService.addCompositeItem(new wr(n)),
                s.remove(this.shapes, n),
                this._shapesQuadTree.remove(n),
                r = 0;
              r < n.connectors.length;
              r++
            )
              for (f = n.connectors[r], e = 0; e < f.connections.length; e++)
                (u = f.connections[e]),
                  (i && y.inArray(u, i)) ||
                    (u.sourceConnector == f
                      ? o.push(u)
                      : u.targetConnector == f && h.push(u));
            for (r = 0; r < o.length; r++)
              o[r].source(null, t), o[r].updateModel();
            for (r = 0; r < h.length; r++)
              h[r].target(null, t), h[r].updateModel();
          },
          _removeConnection: function (n, t) {
            n.sourceConnector && s.remove(n.sourceConnector.connections, n);
            n.targetConnector && s.remove(n.targetConnector.connections, n);
            t && this.undoRedoService.addCompositeItem(new br(n));
            s.remove(this.connections, n);
          },
          _removeDataItems: function (n, t) {
            var i, f, r, u;
            for (n = g(n) ? n : [n]; n.length; )
              if (
                ((i = n.shift()),
                (r = this._dataMap[i.uid]),
                r &&
                  (this._removeShapeConnections(r),
                  this._removeItem(r, !1),
                  delete this._dataMap[i.uid],
                  t && i.hasChildren && i.loaded()))
              )
                for (f = i.children.data(), u = 0; u < f.length; u++)
                  n.push(f[u]);
          },
          _removeShapeConnections: function (n) {
            var t,
              i = n.connections();
            if (i) for (t = 0; t < i.length; t++) this._removeItem(i[t], !1);
          },
          _addDataItem: function (n, t) {
            var i, u;
            if (r(n))
              return (i = this._dataMap[n.id])
                ? i
                : ((u = e({}, this.options.shapeDefaults)),
                  (u.dataItem = n),
                  (i = new h(u, this)),
                  this.addShape(i, t !== !1),
                  (this._dataMap[n.id] = i),
                  i);
          },
          _addDataItemByUid: function (n) {
            var t, i;
            if (r(n))
              return (t = this._dataMap[n.uid])
                ? t
                : ((i = e({}, this.options.shapeDefaults)),
                  (i.dataItem = n),
                  (t = new h(i, this)),
                  this.addShape(t),
                  (this._dataMap[n.uid] = t),
                  t);
          },
          _addDataItems: function (n, t) {
            for (var f, u, r, e, i = 0; i < n.length; i++)
              (f = n[i]),
                (u = this._addDataItemByUid(f)),
                (r = this._addDataItemByUid(t)),
                r && !this.connected(r, u) && (e = this.connect(r, u));
          },
          _refreshSource: function (n) {
            var t,
              u,
              f = this,
              e = n.node,
              i = n.action,
              r = n.items,
              o = f.options;
            if (n.field)
              for (t = 0; t < r.length; t++)
                this._dataMap[r[t].uid] &&
                  this._dataMap[r[t].uid].redrawVisual();
            else {
              if ("remove" == i) this._removeDataItems(n.items, !0);
              else
                for (
                  (i && "itemloaded" !== i) ||
                    this._bindingRoots ||
                    ((this._bindingRoots = !0), (u = !0)),
                    i || e || f.clear(),
                    this._addDataItems(r, e),
                    t = 0;
                  t < r.length;
                  t++
                )
                  r[t].load();
              o.layout &&
                (u || "remove" == i || "add" == i) &&
                f.layout(o.layout);
              u && (this.trigger("dataBound"), (this._bindingRoots = !1));
            }
          },
          _addItem: function (n) {
            n instanceof h
              ? this.addShape(n)
              : n instanceof a && this.addConnection(n);
          },
          _createToolBar: function (n) {
            var i,
              e,
              r,
              v,
              t,
              y,
              p,
              s,
              c,
              l = this.toolService.diagram;
            this.singleToolBar ||
              1 !== l.select().length ||
              ((i = l.select()[0]),
              i &&
                i.options.editable !== !1 &&
                ((e = i.options.editable),
                (r = e.tools),
                this._isEditable &&
                  0 === r.length &&
                  (i instanceof h
                    ? (r = ["edit", "rotateClockwise", "rotateAnticlockwise"])
                    : i instanceof a && (r = ["edit"]),
                  e && e.remove !== !1 && r.push("delete")),
                r &&
                  r.length &&
                  ((v = 20),
                  (this.singleToolBar = new ct(l, {
                    tools: r,
                    click: u(this._toolBarClick, this),
                    modal: !0,
                    popupZIndex:
                      parseInt(
                        l.element.closest(".k-window").css("zIndex"),
                        10
                      ) + 10,
                  })),
                  (y = cr(this.singleToolBar._popup.element)),
                  (p = ii(this.singleToolBar._popup.element)),
                  i instanceof h
                    ? ((s = this.modelToView(i.bounds(et))),
                      (t = new f(s.x, s.y).minus(
                        new f((y - s.width) / 2, p + v)
                      )))
                    : i instanceof a &&
                      ((c = this.modelToView(i.bounds())),
                      (t = new f(c.x, c.y).minus(
                        new f((y - c.width - 20) / 2, p + v)
                      ))),
                  t
                    ? (this.canvas.translate ||
                        (t = t.minus(
                          new f(
                            this.scroller.scrollLeft,
                            this.scroller.scrollTop
                          )
                        )),
                      (t = this.viewToDocument(t)),
                      (t = new f(o.max(t.x, 0), o.max(t.y, 0))),
                      this.singleToolBar.showAt(t),
                      n && this.singleToolBar._popup.one("close", hr))
                    : this._destroyToolBar())));
          },
          _toolBarClick: function (n) {
            this.trigger("toolBarClick", n);
            this._destroyToolBar();
          },
          _normalizePointZoom: function (n) {
            return n.times(1 / this.zoom());
          },
          _initialize: function () {
            this.shapes = [];
            this._selectedItems = [];
            this.connections = [];
            this._dataMap = {};
            this._connectionsDataMap = {};
            this._inactiveShapeItems = new bt();
            this._deferredConnectionUpdates = [];
            this.undoRedoService = new gr({
              undone: this._syncHandler,
              redone: this._syncHandler,
            });
            this.id = i.randomId();
          },
          _fetchFreshData: function () {
            var n = this;
            n._dataSource();
            n._isEditable && n._connectionDataSource();
            n.options.autoBind &&
              (n._isEditable
                ? ((this._loadingShapes = !0),
                  (this._loadingConnections = !0),
                  n.dataSource.fetch(),
                  n.connectionsDataSource.fetch())
                : n.dataSource.fetch());
          },
          _dataSource: function () {
            var n, t;
            r(this.options.connectionsDataSource)
              ? ((this._isEditable = !0),
                (n = this.options.dataSource || {}),
                (t = g(n) ? { data: n } : n),
                this.dataSource && this._shapesRefreshHandler
                  ? this.dataSource
                      .unbind("change", this._shapesRefreshHandler)
                      .unbind("requestStart", this._shapesRequestStartHandler)
                      .unbind("error", this._shapesErrorHandler)
                  : ((this._shapesRefreshHandler = u(
                      this._refreshShapes,
                      this
                    )),
                    (this._shapesRequestStartHandler = u(
                      this._shapesRequestStart,
                      this
                    )),
                    (this._shapesErrorHandler = u(this._error, this))),
                (this.dataSource = kendo.data.DataSource.create(t)
                  .bind("change", this._shapesRefreshHandler)
                  .bind("requestStart", this._shapesRequestStartHandler)
                  .bind("error", this._shapesErrorHandler)))
              : (this._treeDataSource(), (this._isEditable = !1));
          },
          _connectionDataSource: function () {
            var t,
              n = this.options.connectionsDataSource;
            n &&
              ((t = g(n) ? { data: n } : n),
              this.connectionsDataSource && this._connectionsRefreshHandler
                ? this.connectionsDataSource
                    .unbind("change", this._connectionsRefreshHandler)
                    .unbind(
                      "requestStart",
                      this._connectionsRequestStartHandler
                    )
                    .unbind("error", this._connectionsErrorHandler)
                : ((this._connectionsRefreshHandler = u(
                    this._refreshConnections,
                    this
                  )),
                  (this._connectionsRequestStartHandler = u(
                    this._connectionsRequestStart,
                    this
                  )),
                  (this._connectionsErrorHandler = u(
                    this._connectionsError,
                    this
                  ))),
              (this.connectionsDataSource = kendo.data.DataSource.create(t)
                .bind("change", this._connectionsRefreshHandler)
                .bind("requestStart", this._connectionsRequestStartHandler)
                .bind("error", this._connectionsErrorHandler)));
          },
          _shapesRequestStart: function (n) {
            "read" == n.type && (this._loadingShapes = !0);
          },
          _connectionsRequestStart: function (n) {
            "read" == n.type && (this._loadingConnections = !0);
          },
          _error: function () {
            this._loadingShapes = !1;
          },
          _connectionsError: function () {
            this._loadingConnections = !1;
          },
          _refreshShapes: function (n) {
            "remove" === n.action
              ? this._shouldRefresh() && this._removeShapes(n.items)
              : "itemchange" === n.action
              ? this._shouldRefresh() && this._updateShapes(n.items, n.field)
              : "add" === n.action
              ? this._inactiveShapeItems.add(n.items)
              : "sync" === n.action
              ? this._syncShapes(n.items)
              : this.refresh();
          },
          _shouldRefresh: function () {
            return !this._suspended;
          },
          _suspendModelRefresh: function () {
            this._suspended = (this._suspended || 0) + 1;
          },
          _resumeModelRefresh: function () {
            this._suspended = o.max((this._suspended || 0) - 1, 0);
          },
          refresh: function () {
            this._loadingShapes = !1;
            this._loadingConnections || this._rebindShapesAndConnections();
          },
          _rebindShapesAndConnections: function () {
            this.clear();
            this._addShapes(this.dataSource.view());
            this.connectionsDataSource &&
              this._addConnections(this.connectionsDataSource.view(), !1);
            this.options.layout
              ? this.layout(this.options.layout)
              : this._redrawConnections();
            this.trigger("dataBound");
          },
          refreshConnections: function () {
            this._loadingConnections = !1;
            this._loadingShapes || this._rebindShapesAndConnections();
          },
          _redrawConnections: function () {
            for (var t = this.connections, n = 0; n < t.length; n++)
              t[n].refresh();
          },
          _removeShapes: function (n) {
            for (var t, r = this._dataMap, i = 0; i < n.length; i++)
              (t = n[i]),
                r[t.id] && (this.remove(r[t.id], !1), (r[t.id] = null));
          },
          _syncShapes: function () {
            var n = this,
              t = n._inactiveShapeItems;
            t.forEach(function (i) {
              var r = i.dataItem,
                u = i.element;
              r.isNew() ||
                (u
                  ? (u._setOptionsFromModel(),
                    n.addShape(u, i.undoable),
                    (n._dataMap[r.id] = u))
                  : n._addDataItem(r),
                i.activate(),
                t.remove(r));
            });
          },
          _updateShapes: function (n, t) {
            for (var r, u, i = 0; i < n.length; i++)
              (r = n[i]),
                (u = this._dataMap[r.id]),
                u && u.updateOptionsFromModel(r, t);
          },
          _addShapes: function (n) {
            for (var t = 0; t < n.length; t++) this._addDataItem(n[t], !1);
          },
          _refreshConnections: function (n) {
            "remove" === n.action
              ? this._shouldRefresh() && this._removeConnections(n.items)
              : "add" === n.action
              ? this._addConnections(n.items)
              : "sync" === n.action ||
                ("itemchange" === n.action
                  ? this._shouldRefresh() && this._updateConnections(n.items)
                  : this.refreshConnections());
          },
          _removeConnections: function (n) {
            for (var t = 0; t < n.length; t++)
              this.remove(this._connectionsDataMap[n[t].uid], !1),
                (this._connectionsDataMap[n[t].uid] = null);
          },
          _updateConnections: function (n) {
            for (var i, r, t = 0; t < n.length; t++)
              (i = n[t]),
                (r = this._connectionsDataMap[i.uid]),
                r.updateOptionsFromModel(i);
          },
          _addConnections: function (n, t) {
            for (var r, u = n.length, i = 0; i < u; i++)
              (r = n[i]), this._addConnectionDataItem(r, t);
          },
          _addConnectionDataItem: function (n, t) {
            var i, u, o, s;
            this._connectionsDataMap[n.uid] ||
              ((i = this._validateConnector(n.from)),
              (r(i) && null !== i) || (i = new f(n.fromX, n.fromY)),
              (u = this._validateConnector(n.to)),
              (r(u) && null !== u) || (u = new f(n.toX, n.toY)),
              r(i) &&
                r(u) &&
                ((o = e({}, this.options.connectionDefaults)),
                (o.dataItem = n),
                (s = new a(i, u, o)),
                (this._connectionsDataMap[n.uid] = s),
                this.addConnection(s, t)));
          },
          _validateConnector: function (n) {
            var t;
            return r(n) && null !== n && (t = this._dataMap[n]), t;
          },
          _treeDataSource: function () {
            var n = this,
              i = n.options,
              t = i.dataSource;
            if (
              ((t = g(t) ? { data: t } : t),
              t instanceof kendo.data.DataSource &&
                !(t instanceof kendo.data.HierarchicalDataSource))
            )
              throw Error(
                "Incorrect DataSource type. If a single dataSource instance is set to the diagram then it should be a HierarchicalDataSource. You should set only the options instead of an instance or a HierarchicalDataSource instance or supply connectionsDataSource as well."
              );
            t.fields ||
              (t.fields = [
                { field: "text" },
                { field: "url" },
                { field: "spriteCssClass" },
                { field: "imageUrl" },
              ]);
            n.dataSource && n._refreshHandler && n._unbindDataSource();
            n._refreshHandler = u(n._refreshSource, n);
            n._errorHandler = u(n._error, n);
            n.dataSource = ar
              .create(t)
              .bind(rt, n._refreshHandler)
              .bind(nr, n._errorHandler);
          },
          _unbindDataSource: function () {
            var n = this;
            n.dataSource
              .unbind(rt, n._refreshHandler)
              .unbind(nr, n._errorHandler);
          },
          _adorn: function (n, i) {
            i !== t &&
              n &&
              (i
                ? (this._adorners.push(n), this.adornerLayer.append(n.visual))
                : (s.remove(this._adorners, n),
                  this.adornerLayer.remove(n.visual)));
          },
          _showConnectors: function (n, t) {
            t
              ? this._connectorsAdorner.show(n)
              : this._connectorsAdorner.destroy();
          },
          _updateAdorners: function () {
            for (var t, i = this._adorners, n = 0; n < i.length; n++)
              (t = i[n]), t.refreshBounds && t.refreshBounds(), t.refresh();
          },
          _refresh: function () {
            for (var n = 0; n < this.connections.length; n++)
              this.connections[n].refresh();
          },
          _destroyToolBar: function () {
            this.singleToolBar &&
              (this.singleToolBar.hide(),
              this.singleToolBar.destroy(),
              (this.singleToolBar = null));
          },
          _destroyGlobalToolBar: function () {
            this.toolBar &&
              (this.toolBar.hide(),
              this.toolBar.destroy(),
              (this.toolBar = null));
          },
          exportDOMVisual: function () {
            var n = this.canvas._viewBox,
              r = gt.transform().translate(-n.x, -n.y),
              u = new gt.Rect([0, 0], [n.width, n.height]),
              f = it.Path.fromRect(u),
              t = new it.Group({ transform: r }),
              i = new it.Group({ clip: f }),
              e = this.canvas.drawingElement.children[0];
            return i.append(t), t.children.push(e), i;
          },
          exportVisual: function () {
            var t = gt.transform().scale(1 / this._zoom),
              n = new it.Group({ transform: t }),
              i = this.mainLayer.drawingElement;
            return n.children.push(i), n;
          },
          _syncChanges: function () {
            this._syncShapeChanges();
            this._syncConnectionChanges();
          },
          _syncShapeChanges: function () {
            this.dataSource && this._isEditable && this.dataSource.sync();
          },
          _syncConnectionChanges: function () {
            var t = this;
            t.connectionsDataSource &&
              t._isEditable &&
              (n.when.apply(n, t._deferredConnectionUpdates).then(function () {
                t.connectionsDataSource.sync();
              }),
              (t.deferredConnectionUpdates = []));
          },
        });
        y.ExportMixin.extend(ht.fn, !0);
        kendo.PDFMixin && kendo.PDFMixin.extend(ht.fn);
        ct = kendo.Observable.extend({
          init: function (n, t) {
            kendo.Observable.fn.init.call(this);
            this.diagram = n;
            this.options = e({}, this.options, t);
            this._tools = [];
            this.createToolBar();
            this.createTools();
            this.appendTools();
            this.options.modal && this.createPopup();
            this.bind(this.events, t);
          },
          events: ["click"],
          createPopup: function () {
            this.container = n("<div/>").append(this.element);
            this._popup = this.container.kendoPopup({}).getKendoPopup();
          },
          appendTools: function () {
            for (var n, t = 0; t < this._tools.length; t++)
              (n = this._tools[t]),
                ((n.buttons && n.buttons.length) || !r(n.buttons)) &&
                  this._toolBar.add(n);
          },
          createToolBar: function () {
            this.element = n("<div/>");
            this._toolBar = this.element
              .kendoToolBar({ click: u(this.click, this), resizable: !1 })
              .getKendoToolBar();
            this.element.css("border", "none");
          },
          createTools: function () {
            for (var n = 0; n < this.options.tools.length; n++)
              this.createTool(this.options.tools[n]);
          },
          createTool: function (n) {
            su(n) || (n = { name: n });
            var t = n.name + "Tool";
            this[t]
              ? this[t](n)
              : this._tools.push(
                  e({}, n, {
                    attributes: this._setAttributes({ action: n.name }),
                  })
                );
          },
          showAt: function (n) {
            var t = parseInt(this.options.popupZIndex, 10);
            this._popup &&
              (this._popup.open(n.x, n.y),
              t && this._popup.wrapper.css("zIndex", t));
          },
          hide: function () {
            this._popup && this._popup.close();
          },
          newGroup: function () {
            return { type: "buttonGroup", buttons: [] };
          },
          editTool: function () {
            this._tools.push({
              icon: "edit",
              showText: "overflow",
              type: "button",
              text: "Edit",
              attributes: this._setAttributes({ action: "edit" }),
            });
          },
          deleteTool: function () {
            this._tools.push({
              icon: "close",
              showText: "overflow",
              type: "button",
              text: "Delete",
              attributes: this._setAttributes({ action: "delete" }),
            });
          },
          rotateAnticlockwiseTool: function (n) {
            this._appendGroup("rotate");
            this._rotateGroup.buttons.push({
              icon: "rotate-left",
              showText: "overflow",
              text: "RotateAnticlockwise",
              group: "rotate",
              attributes: this._setAttributes({
                action: "rotateAnticlockwise",
                step: n.step,
              }),
            });
          },
          rotateClockwiseTool: function (n) {
            this._appendGroup("rotate");
            this._rotateGroup.buttons.push({
              icon: "rotate-right",
              attributes: this._setAttributes({
                action: "rotateClockwise",
                step: n.step,
              }),
              showText: "overflow",
              text: "RotateClockwise",
              group: "rotate",
            });
          },
          createShapeTool: function () {
            this._appendGroup("create");
            this._createGroup.buttons.push({
              icon: "shape",
              showText: "overflow",
              text: "CreateShape",
              group: "create",
              attributes: this._setAttributes({ action: "createShape" }),
            });
          },
          createConnectionTool: function () {
            this._appendGroup("create");
            this._createGroup.buttons.push({
              icon: "connector",
              showText: "overflow",
              text: "CreateConnection",
              group: "create",
              attributes: this._setAttributes({ action: "createConnection" }),
            });
          },
          undoTool: function () {
            this._appendGroup("history");
            this._historyGroup.buttons.push({
              icon: "undo",
              showText: "overflow",
              text: "Undo",
              group: "history",
              attributes: this._setAttributes({ action: "undo" }),
            });
          },
          redoTool: function () {
            this._appendGroup("history");
            this._historyGroup.buttons.push({
              icon: "redo",
              showText: "overflow",
              text: "Redo",
              group: "history",
              attributes: this._setAttributes({ action: "redo" }),
            });
          },
          _appendGroup: function (n) {
            var t = "_" + n + "Group";
            this[t] || ((this[t] = this.newGroup()), this._tools.push(this[t]));
          },
          _setAttributes: function (n) {
            var t = {};
            return (
              n.action && (t[kendo.attr("action")] = n.action),
              n.step && (t[kendo.attr("step")] = n.step),
              t
            );
          },
          _getAttributes: function (n) {
            var t,
              i = {},
              r = n.attr(kendo.attr("action"));
            return (
              r && (i.action = r),
              (t = n.attr(kendo.attr("step"))),
              t && (i.step = t),
              i
            );
          },
          click: function (t) {
            var r = this._getAttributes(n(t.target)),
              i = r.action;
            i && this[i] && this[i](r);
            this.trigger("click", this.eventData(i, t.target));
          },
          eventData: function (n, t) {
            for (
              var i,
                u = this.selectedElements(),
                o = u.length,
                f = [],
                e = [],
                r = 0;
              r < o;
              r++
            )
              (i = u[r]), i instanceof h ? f.push(i) : e.push(i);
            return { shapes: f, connections: e, action: n, target: t };
          },
          delete: function () {
            var t = this.diagram,
              n = t._triggerRemove(this.selectedElements());
            n.length &&
              (this.diagram.remove(n, !0), this.diagram._syncChanges());
          },
          edit: function () {
            var n = this.selectedElements();
            1 === n.length && this.diagram.edit(n[0]);
          },
          rotateClockwise: function (n) {
            var t = parseFloat(n.step || 90);
            this._rotate(t);
          },
          rotateAnticlockwise: function (n) {
            var t = parseFloat(n.step || 90);
            this._rotate(-t);
          },
          _rotate: function (n) {
            var t = this.diagram._resizingAdorner;
            t.angle(t.angle() + n);
            t.rotate();
          },
          selectedElements: function () {
            return this.diagram.select();
          },
          createShape: function () {
            this.diagram.createShape();
          },
          createConnection: function () {
            this.diagram.createConnection();
          },
          undo: function () {
            this.diagram.undo();
          },
          redo: function () {
            this.diagram.redo();
          },
          destroy: function () {
            this.diagram = null;
            this.element = null;
            this.options = null;
            this._toolBar && this._toolBar.destroy();
            this._popup && this._popup.destroy();
          },
        });
        lt = kendo.Observable.extend({
          init: function (n, t) {
            kendo.Observable.fn.init.call(this);
            this.options = lr(!0, {}, this.options, t);
            this.element = n;
            this.model = this.options.model;
            this.fields = this._getFields();
            this._initContainer();
            this.createEditable();
          },
          options: { editors: {} },
          _initContainer: function () {
            this.wrapper = this.element;
          },
          createEditable: function () {
            var n = this.options;
            this.editable = new kendo.ui.Editable(this.wrapper, {
              fields: this.fields,
              target: n.target,
              clearContainer: !1,
              model: this.model,
            });
          },
          _isEditable: function (n) {
            return this.model.editable && this.model.editable(n);
          },
          _getFields: function () {
            var n,
              t,
              i,
              r = [],
              u = this.model.fields;
            for (n in u)
              (t = {}),
                this._isEditable(n) &&
                  ((i = this.options.editors[n]),
                  i && (t.editor = i),
                  (t.field = n),
                  r.push(t));
            return r;
          },
          end: function () {
            return this.editable.end();
          },
          destroy: function () {
            this.editable.destroy();
            this.editable.element
              .find("[" + kendo.attr("container-for") + "]")
              .empty();
            this.model =
              this.wrapper =
              this.element =
              this.columns =
              this.editable =
                null;
          },
        });
        kt = lt.extend({
          init: function (n, t) {
            lt.fn.init.call(this, n, t);
            this.bind(this.events, this.options);
            this.open();
          },
          events: ["update", "cancel"],
          options: {
            window: {
              modal: !0,
              resizable: !1,
              draggable: !0,
              title: "Edit",
              visible: !1,
            },
          },
          _initContainer: function () {
            var t,
              i = this;
            this.wrapper = n('<div class="k-popup-edit-form"/>').attr(
              kendo.attr("uid"),
              this.model.uid
            );
            t = "";
            this.options.template
              ? ((t += this._renderTemplate()), (this.fields = []))
              : (t += this._renderFields());
            t += this._renderButtons();
            this.wrapper.append(
              n('<div class="k-edit-form-container"/>').append(t)
            );
            this.window = new kendo.ui.Window(
              this.wrapper.appendTo(this.element),
              this.options.window
            );
            this.window.bind("close", function (n) {
              n.userTriggered && (n.sender.element.focus(), i._cancelClick(n));
            });
            this._attachButtonEvents();
          },
          _renderTemplate: function () {
            var n = this.options.template;
            return (
              "string" == typeof n && (n = kendo.unescape(n)),
              (n = kendo.template(n)(this.model))
            );
          },
          _renderFields: function () {
            for (var n, i = "", t = 0; t < this.fields.length; t++)
              (n = this.fields[t]),
                (i +=
                  '<div class="k-edit-label"><label for="' +
                  n.field +
                  '">' +
                  (n.field || "") +
                  "</label></div>"),
                this._isEditable(n.field) &&
                  (i +=
                    "<div " +
                    kendo.attr("container-for") +
                    '="' +
                    n.field +
                    '" class="k-edit-field"></div>');
            return i;
          },
          _renderButtons: function () {
            var n = '<div class="k-edit-buttons k-state-default">';
            return (
              (n += this._createButton("update")),
              (n += this._createButton("cancel")),
              n + "</div>"
            );
          },
          _createButton: function (n) {
            return kendo.template(of)(pi[n]);
          },
          _attachButtonEvents: function () {
            this._cancelClickHandler = u(this._cancelClick, this);
            this.window.element.on(
              ft + l,
              "a.k-diagram-cancel",
              this._cancelClickHandler
            );
            this._updateClickHandler = u(this._updateClick, this);
            this.window.element.on(
              ft + l,
              "a.k-diagram-update",
              this._updateClickHandler
            );
          },
          _updateClick: function (n) {
            n.preventDefault();
            this.trigger("update");
          },
          _cancelClick: function (n) {
            n.preventDefault();
            this.trigger("cancel");
          },
          open: function () {
            this.window.center().open();
          },
          close: function () {
            this.window.bind("deactivate", u(this.destroy, this)).close();
          },
          destroy: function () {
            this.window.close().destroy();
            this.window.element.off(
              ft + l,
              "a.k-diagram-cancel",
              this._cancelClickHandler
            );
            this.window.element.off(
              ft + l,
              "a.k-diagram-update",
              this._updateClickHandler
            );
            this._cancelClickHandler = null;
            this._editUpdateClickHandler = null;
            this.window = null;
            lt.fn.destroy.call(this);
          },
        });
        wt.fn = wt.prototype = {
          onActivate: function (t) {
            var i = n.Deferred();
            return this.callbacks.push({ callback: t, deferred: i }), i;
          },
          activate: function () {
            for (var t, i = this.callbacks, n = 0; n < i.length; n++)
              (t = this.callbacks[n]),
                t.callback(this.dataItem),
                t.deferred.resolve();
            this.callbacks = [];
          },
        };
        bt.fn = bt.prototype = {
          add: function (n) {
            for (var t = 0; t < n.length; t++)
              this.items[n[t].uid] = new wt(n[t]);
          },
          forEach: function (n) {
            for (var t in this.items) n(this.items[t]);
          },
          getByUid: function (n) {
            return this.items[n];
          },
          remove: function (n) {
            delete this.items[n.uid];
          },
        };
        tt = ti.extend({
          init: function () {
            this.shapes = [];
          },
          _add: function (n, t) {
            this.shapes.push({ bounds: t, shape: n });
            n._quadNode = this;
          },
          insert: function (n, t) {
            this._add(n, t);
          },
          remove: function (n) {
            for (var i = this.shapes, r = i.length, t = 0; t < r; t++)
              if (i[t].shape === n) {
                i.splice(t, 1);
                break;
              }
          },
          hitTestRect: function (n, t) {
            for (var r = this.shapes, u = r.length, i = 0; i < u; i++)
              if (this._testRect(r[i].shape, n) && !y.inArray(r[i].shape, t))
                return !0;
          },
          _testRect: function (n, t) {
            var i = n.rotate().angle,
              r = n.bounds();
            return i ? bi.rects(t, r, -i) : r.overlaps(t);
          },
        });
        k = tt.extend({
          init: function (n) {
            tt.fn.init.call(this);
            this.children = [];
            this.rect = n;
          },
          inBounds: function (n) {
            var t = this.rect,
              i = t.bottomRight(),
              r = n.bottomRight();
            return t.x <= n.x && t.y <= n.y && r.x <= i.x && r.y <= i.y;
          },
          overlapsBounds: function (n) {
            return this.rect.overlaps(n);
          },
          insert: function (n, t) {
            var i,
              r = !1,
              u = this.children,
              f = u.length;
            if (this.inBounds(t)) {
              if (!f && this.shapes.length < 4) this._add(n, t);
              else {
                for (f || this._initChildren(), i = 0; i < u.length; i++)
                  if (u[i].insert(n, t)) {
                    r = !0;
                    break;
                  }
                r || this._add(n, t);
              }
              r = !0;
            }
            return r;
          },
          _initChildren: function () {
            var i,
              t,
              n = this.rect,
              o = this.children,
              r = this.shapes,
              u = n.center(),
              f = n.width / 2,
              e = n.height / 2;
            for (
              o.push(
                new k(new c(n.x, n.y, f, e)),
                new k(new c(u.x, n.y, f, e)),
                new k(new c(n.x, u.y, f, e)),
                new k(new c(u.x, u.y, f, e))
              ),
                t = r.length - 1;
              t >= 0;
              t--
            )
              for (i = 0; i < o.length; i++)
                if (o[i].insert(r[t].shape, r[t].bounds)) {
                  r.splice(t, 1);
                  break;
                }
          },
          hitTestRect: function (n, t) {
            var i,
              u = this.children,
              f = u.length,
              r = !1;
            if (this.overlapsBounds(n))
              if (tt.fn.hitTestRect.call(this, n, t)) r = !0;
              else
                for (i = 0; i < f; i++)
                  if (u[i].hitTestRect(n, t)) {
                    r = !0;
                    break;
                  }
            return r;
          },
        });
        dt = ti.extend({
          ROOT_SIZE: 1e3,
          init: function (n) {
            var t = u(this._boundsChange, this);
            n.bind(ei, t);
            n.bind(si, t);
            this.initRoots();
          },
          initRoots: function () {
            this.rootMap = {};
            this.root = new tt();
          },
          clear: function () {
            this.initRoots();
          },
          _boundsChange: function (n) {
            n.item._quadNode && n.item._quadNode.remove(n.item);
            this.insert(n.item);
          },
          insert: function (n) {
            var u = n.bounds(et),
              i = this.ROOT_SIZE,
              f = this.getSectors(u),
              t = f[0][0],
              r = f[1][0];
            this.inRoot(f)
              ? this.root.insert(n, u)
              : (this.rootMap[t] || (this.rootMap[t] = {}),
                this.rootMap[t][r] ||
                  (this.rootMap[t][r] = new k(new c(t * i, r * i, i, i))),
                this.rootMap[t][r].insert(n, u));
          },
          remove: function (n) {
            n._quadNode && n._quadNode.remove(n);
          },
          inRoot: function (n) {
            return n[0].length > 1 || n[1].length > 1;
          },
          getSectors: function (n) {
            for (
              var i,
                r = this.ROOT_SIZE,
                f = n.bottomRight(),
                e = o.floor(f.x / r),
                s = o.floor(f.y / r),
                u = [[], []],
                t = o.floor(n.x / r);
              t <= e;
              t++
            )
              u[0].push(t);
            for (i = o.floor(n.y / r); i <= s; i++) u[1].push(i);
            return u;
          },
          hitTestRect: function (n, t) {
            var i,
              r,
              e,
              o,
              f,
              u = this.getSectors(n);
            if (this.root.hitTestRect(n, t)) return !0;
            for (i = 0; i < u[0].length; i++)
              for (e = u[0][i], r = 0; r < u[1].length; r++)
                if (
                  ((o = u[1][r]),
                  (f = (this.rootMap[e] || {})[o]),
                  f && f.hitTestRect(n, t))
                )
                  return !0;
            return !1;
          },
        });
        y.ui.plugin(ht);
        e(i, {
          Shape: h,
          Connection: a,
          Connector: v,
          DiagramToolBar: ct,
          QuadNode: k,
          QuadRoot: tt,
          ShapesQuadTree: dt,
          PopupEditor: kt,
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.diagram.min",
      [
        "kendo.data.min",
        "kendo.draganddrop.min",
        "kendo.userevents.min",
        "kendo.mobile.scroller.min",
        "kendo.drawing.min",
        "dataviz/diagram/utils.min",
        "dataviz/diagram/math.min",
        "dataviz/diagram/svg.min",
        "dataviz/diagram/services.min",
        "dataviz/diagram/layout.min",
        "dataviz/diagram/dom.min",
      ],
      n
    );
  })(
    function () {
      return window.kendo;
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.treemap.min",
      ["kendo.data.min", "kendo.userevents.min", "kendo.dataviz.themes.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function l(n, t) {
            if (null === t) return t;
            var i = at(n, !0);
            return i(t);
          }
          function u(n) {
            return typeof n !== pt;
          }
          function ot(n, t, i) {
            var r,
              s,
              f = v(n),
              e = v(t),
              o = w(n) - w(t) < 0,
              u = [];
            for (u.push(n), r = 0; r < i; r++)
              (s = {
                r: a(f.r, e.r, r, i, o),
                g: a(f.g, e.g, r, i, o),
                b: a(f.b, e.b, r, i, o),
              }),
                u.push(st(s));
            return u.push(t), u;
          }
          function a(n, t, i, u, f) {
            var e = r.min(r.abs(n), r.abs(t)),
              o = r.max(r.abs(n), r.abs(t)),
              h = (o - e) / (u + 1),
              s = h * (i + 1);
            return f ? e + s : o - s;
          }
          function st(n) {
            return "#" + y(n.r) + y(n.g) + y(n.b);
          }
          function v(n) {
            n = n.replace("#", "");
            var t = ht(n);
            return { r: p(t.r), g: p(t.g), b: p(t.b) };
          }
          function y(n) {
            var t = r.round(n).toString(16).toUpperCase();
            return 1 === t.length && (t = "0" + t), t;
          }
          function ht(n) {
            var i = n.length,
              t = {};
            return (
              3 === i
                ? ((t.r = n[0]), (t.g = n[1]), (t.b = n[2]))
                : ((t.r = n.substring(0, 2)),
                  (t.g = n.substring(2, 4)),
                  (t.b = n.substring(4, 6))),
              t
            );
          }
          function p(n) {
            return parseInt(n.toString(16), 16);
          }
          function w(n) {
            var t = 0;
            return (
              n &&
                ((n = v(n)),
                (t = r.sqrt(
                  0.241 * n.r * n.r + 0.691 * n.g * n.g + 0.068 * n.b * n.b
                ))),
              t
            );
          }
          function e(n) {
            var t = r.pow(10, 4);
            return r.round(n * t) / t;
          }
          var r = Math,
            o = n.proxy,
            ct = n.isArray,
            i = window.kendo,
            nt = i._outerHeight,
            s = i._outerWidth,
            b = i.Class,
            h = i.ui.Widget,
            lt = i.template,
            f = i.deepExtend,
            tt = i.data.HierarchicalDataSource,
            at = i.getter,
            k = i.dataviz,
            d = ".kendoTreeMap",
            c = "change",
            it = "dataBound",
            g = "itemCreated",
            rt = Number.MAX_VALUE,
            vt = "mouseover" + d,
            yt = "mouseleave" + d,
            pt = "undefined",
            wt = h.extend({
              init: function (t, r) {
                i.destroy(t);
                n(t).empty();
                h.fn.init.call(this, t, r);
                this.wrapper = this.element;
                this._initTheme(this.options);
                this.element.addClass("k-widget k-treemap");
                this._setLayout();
                this._originalOptions = f({}, this.options);
                this._initDataSource();
                this._attachEvents();
                i.notify(this, k.ui);
              },
              options: {
                name: "TreeMap",
                theme: "default",
                autoBind: !0,
                textField: "text",
                valueField: "value",
                colorField: "color",
              },
              events: [it, g],
              _initTheme: function (n) {
                var t = this,
                  i = k.ui.themes || {},
                  r = ((n || {}).theme || "").toLowerCase(),
                  u = (i[r] || {}).treeMap;
                t.options = f({}, u, n);
              },
              _attachEvents: function () {
                this.element
                  .on(vt, o(this._mouseover, this))
                  .on(yt, o(this._mouseleave, this));
                this._resizeHandler = o(this.resize, this, !1);
                i.onResize(this._resizeHandler);
              },
              _setLayout: function () {
                "horizontal" === this.options.type
                  ? ((this._layout = new ft(!1)),
                    (this._view = new et(this, this.options)))
                  : "vertical" === this.options.type
                  ? ((this._layout = new ft(!0)),
                    (this._view = new et(this, this.options)))
                  : ((this._layout = new bt()),
                    (this._view = new ut(this, this.options)));
              },
              _initDataSource: function () {
                var n = this,
                  i = n.options,
                  t = i.dataSource;
                n._dataChangeHandler = o(n._onDataChange, n);
                n.dataSource = tt.create(t).bind(c, n._dataChangeHandler);
                t && n.options.autoBind && n.dataSource.fetch();
              },
              setDataSource: function (n) {
                var t = this;
                t.dataSource.unbind(c, t._dataChangeHandler);
                t.dataSource = n.bind(c, t._dataChangeHandler);
                n && t.options.autoBind && t.dataSource.fetch();
              },
              _onDataChange: function (n) {
                var f,
                  t,
                  r,
                  o,
                  e = n.node,
                  u = n.items,
                  h = this.options;
                if (e) {
                  if (u.length) {
                    for (
                      r = this._getByUid(e.uid),
                        r.children = [],
                        u = new i.data.Query(u)._sortForGrouping(
                          h.valueField,
                          "desc"
                        ),
                        t = 0;
                      t < u.length;
                      t++
                    )
                      (f = u[t]), r.children.push(this._wrapItem(f));
                    o = this._view.htmlSize(r);
                    this._layout.compute(r.children, r.coord, o);
                    this._setColors(r.children);
                    this._view.render(r);
                  }
                } else
                  this._cleanItems(),
                    this.element.empty(),
                    (f = this._wrapItem(u[0])),
                    this._layout.createRoot(
                      f,
                      s(this.element),
                      nt(this.element),
                      "vertical" === this.options.type
                    ),
                    this._view.createRoot(f),
                    (this._root = f),
                    (this._colorIdx = 0);
                for (t = 0; t < u.length; t++) u[t].load();
                e && this.trigger(it, { node: e });
              },
              _cleanItems: function () {
                var n = this;
                n.angular("cleanup", function () {
                  return {
                    elements: n.element.find(
                      ".k-leaf div,.k-treemap-title,.k-treemap-title-vertical"
                    ),
                  };
                });
              },
              _setColors: function (n) {
                var f,
                  i,
                  e,
                  t,
                  o = this.options.colors,
                  s = this._colorIdx,
                  r = o[s % o.length];
                for (
                  ct(r) && (f = ot(r[0], r[1], n.length)), e = !1, t = 0;
                  t < n.length;
                  t++
                )
                  (i = n[t]),
                    u(i.color) || (i.color = f ? f[t] : r),
                    i.dataItem.hasChildren || (e = !0);
                e && this._colorIdx++;
              },
              _contentSize: function (n) {
                this.view.renderHeight(n);
              },
              _wrapItem: function (n) {
                var t = {};
                return (
                  u(this.options.valueField) &&
                    (t.value = l(this.options.valueField, n)),
                  u(this.options.colorField) &&
                    (t.color = l(this.options.colorField, n)),
                  u(this.options.textField) &&
                    (t.text = l(this.options.textField, n)),
                  (t.level = n.level()),
                  (t.dataItem = n),
                  t
                );
              },
              _getByUid: function (n) {
                for (var t, i = [this._root]; i.length; ) {
                  if (((t = i.pop()), t.dataItem.uid === n)) return t;
                  t.children && (i = i.concat(t.children));
                }
              },
              dataItem: function (t) {
                var u = n(t).attr(i.attr("uid")),
                  r = this.dataSource;
                return r && r.getByUid(u);
              },
              findByUid: function (n) {
                return this.element.find(
                  ".k-treemap-tile[" + i.attr("uid") + "='" + n + "']"
                );
              },
              _mouseover: function (t) {
                var i = n(t.target);
                i.hasClass("k-leaf") &&
                  (this._removeActiveState(),
                  i.removeClass("k-state-hover").addClass("k-state-hover"));
              },
              _removeActiveState: function () {
                this.element
                  .find(".k-state-hover")
                  .removeClass("k-state-hover");
              },
              _mouseleave: function () {
                this._removeActiveState();
              },
              destroy: function () {
                h.fn.destroy.call(this);
                this.element.off(d);
                this.dataSource &&
                  this.dataSource.unbind(c, this._dataChangeHandler);
                this._root = null;
                i.unbindResize(this._resizeHandler);
                i.destroy(this.element);
              },
              items: function () {
                return n();
              },
              getSize: function () {
                return i.dimensions(this.element);
              },
              _resize: function () {
                var t,
                  i,
                  n = this._root;
                n &&
                  ((t = this.element),
                  (i = t.children()),
                  (n.coord.width = s(t)),
                  (n.coord.height = nt(t)),
                  i.css({ width: n.coord.width, height: n.coord.height }),
                  this._resizeItems(n, i));
              },
              _resizeItems: function (n, t) {
                var e, r, f, u;
                if (n.children && n.children.length)
                  for (
                    e = t.children(".k-treemap-wrap").children(),
                      this._layout.compute(n.children, n.coord, {
                        text: this._view.titleSize(n, t),
                      }),
                      u = 0;
                    u < n.children.length;
                    u++
                  )
                    (r = n.children[u]),
                      (f = e.filter(
                        "[" + i.attr("uid") + "='" + r.dataItem.uid + "']"
                      )),
                      this._view.setItemSize(r, f),
                      this._resizeItems(r, f);
              },
              setOptions: function (n) {
                var i = n.dataSource;
                n.dataSource = t;
                this._originalOptions = f(this._originalOptions, n);
                this.options = f({}, this._originalOptions);
                this._setLayout();
                this._initTheme(this.options);
                h.fn._setEvents.call(this, n);
                i && this.setDataSource(tt.create(i));
                this.options.autoBind && this.dataSource.fetch();
              },
            }),
            bt = b.extend({
              createRoot: function (n, t, i) {
                n.coord = { width: t, height: i, top: 0, left: 0 };
              },
              leaf: function (n) {
                return !n.children;
              },
              layoutChildren: function (n, t) {
                for (
                  var u, f, e, s = t.width * t.height, o = 0, r = [], i = 0;
                  i < n.length;
                  i++
                )
                  (r[i] = parseFloat(n[i].value)), (o += r[i]);
                for (i = 0; i < r.length; i++) n[i].area = (s * r[i]) / o;
                u = this.layoutHorizontal() ? t.height : t.width;
                f = [n[0]];
                e = n.slice(1);
                this.squarify(e, f, u, t);
              },
              squarify: function (n, t, i, r) {
                this.computeDim(n, t, i, r);
              },
              computeDim: function (n, i, r, u) {
                var o, f, e;
                return n.length + i.length == 1
                  ? ((o = 1 == n.length ? n : i), this.layoutLast(o, r, u), t)
                  : (n.length >= 2 &&
                      0 === i.length &&
                      ((i = [n[0]]), (n = n.slice(1))),
                    0 === n.length
                      ? (i.length > 0 && this.layoutRow(i, r, u), t)
                      : ((f = n[0]),
                        this.worstAspectRatio(i, r) >=
                        this.worstAspectRatio([f].concat(i), r)
                          ? this.computeDim(n.slice(1), i.concat([f]), r, u)
                          : ((e = this.layoutRow(i, r, u)),
                            this.computeDim(n, [], e.dim, e)),
                        t));
              },
              layoutLast: function (n, t, i) {
                n[0].coord = i;
              },
              layoutRow: function (n, t, i) {
                return this.layoutHorizontal()
                  ? this.layoutV(n, t, i)
                  : this.layoutH(n, t, i);
              },
              orientation: "h",
              layoutVertical: function () {
                return "v" === this.orientation;
              },
              layoutHorizontal: function () {
                return "h" === this.orientation;
              },
              layoutChange: function () {
                this.orientation = this.layoutVertical() ? "h" : "v";
              },
              worstAspectRatio: function (n, t) {
                var i, f, e, o, u;
                if (!n || 0 === n.length) return rt;
                for (i = 0, f = 0, e = rt, o = 0; o < n.length; o++)
                  (u = n[o].area),
                    (i += u),
                    (e = e < u ? e : u),
                    (f = f > u ? f : u);
                return r.max((t * t * f) / (i * i), (i * i) / (t * t * e));
              },
              compute: function (n, t, i) {
                if (
                  ((t.width >= t.height && this.layoutHorizontal()) ||
                    this.layoutChange(),
                  n && n.length > 0)
                ) {
                  var r = {
                    width: t.width,
                    height: t.height - i.text,
                    top: 0,
                    left: 0,
                  };
                  this.layoutChildren(n, r);
                }
              },
              layoutV: function (n, t, i) {
                var f,
                  o,
                  u,
                  h = this._totalArea(n),
                  s = 0;
                for (t = e(h / t), f = 0; f < n.length; f++)
                  (o = e(n[f].area / t)),
                    (n[f].coord = {
                      height: o,
                      width: t,
                      top: i.top + s,
                      left: i.left,
                    }),
                    (s += o);
                return (
                  (u = {
                    height: i.height,
                    width: i.width - t,
                    top: i.top,
                    left: i.left + t,
                  }),
                  (u.dim = r.min(u.width, u.height)),
                  u.dim != u.height && this.layoutChange(),
                  u
                );
              },
              layoutH: function (n, t, i) {
                for (
                  var u,
                    h = this._totalArea(n),
                    o = e(h / t),
                    c = i.top,
                    s = 0,
                    f = 0;
                  f < n.length;
                  f++
                )
                  (n[f].coord = {
                    height: o,
                    width: e(n[f].area / o),
                    top: c,
                    left: i.left + s,
                  }),
                    (s += n[f].coord.width);
                return (
                  (u = {
                    height: i.height - o,
                    width: i.width,
                    top: i.top + o,
                    left: i.left,
                  }),
                  (u.dim = r.min(u.width, u.height)),
                  u.dim != u.width && this.layoutChange(),
                  u
                );
              },
              _totalArea: function (n) {
                for (var i = 0, t = 0; t < n.length; t++) i += n[t].area;
                return i;
              },
            }),
            ut = b.extend({
              init: function (t, i) {
                this.options = f({}, this.options, i);
                this.treeMap = t;
                this.element = n(t.element);
                this.offset = 0;
              },
              titleSize: function (n, t) {
                var i = t.children(".k-treemap-title");
                return i.height() || 0;
              },
              htmlSize: function (n) {
                var r,
                  i,
                  t = this._getByUid(n.dataItem.uid),
                  u = { text: 0 };
                return (
                  n.children &&
                    (this._clean(t),
                    (r = this._getText(n)),
                    r &&
                      ((i = this._createTitle(n)),
                      t.append(i),
                      this._compile(i, n.dataItem),
                      (u.text = i.height())),
                    t.append(this._createWrap()),
                    (this.offset = (s(t) - t.innerWidth()) / 2)),
                  u
                );
              },
              _compile: function (n, t) {
                this.treeMap.angular("compile", function () {
                  return { elements: n, data: [{ dataItem: t }] };
                });
              },
              _getByUid: function (n) {
                return this.element.find(
                  ".k-treemap-tile[" + i.attr("uid") + "='" + n + "']"
                );
              },
              render: function (n) {
                var f,
                  t,
                  r,
                  i,
                  e = this._getByUid(n.dataItem.uid),
                  u = n.children;
                if (u)
                  for (f = e.find(".k-treemap-wrap"), t = 0; t < u.length; t++)
                    (r = u[t]),
                      (i = this._createLeaf(r)),
                      f.append(i),
                      this._compile(i.children(), r.dataItem),
                      this.treeMap.trigger(g, { element: i });
              },
              createRoot: function (n) {
                var t = this._createLeaf(n);
                this.element.append(t);
                this._compile(t.children(), n.dataItem);
                this.treeMap.trigger(g, { element: t });
              },
              _clean: function (n) {
                this.treeMap.angular("cleanup", function () {
                  return { elements: n.children(":not(.k-treemap-wrap)") };
                });
                n.css("background-color", "");
                n.removeClass("k-leaf");
                n.removeClass("k-inverse");
                n.empty();
              },
              _createLeaf: function (t) {
                return this._createTile(t)
                  .css("background-color", t.color)
                  .addClass("k-leaf")
                  .toggleClass("k-inverse", this._tileColorBrightness(t) > 180)
                  .toggle(0 !== t.value)
                  .append(n("<div></div>").html(this._getText(t)));
              },
              _createTile: function (t) {
                var r = n("<div class='k-treemap-tile'></div>");
                return (
                  this.setItemSize(t, r),
                  u(t.dataItem) &&
                    u(t.dataItem.uid) &&
                    r.attr(i.attr("uid"), t.dataItem.uid),
                  r
                );
              },
              _itemCoordinates: function (n) {
                var t = {
                  width: n.coord.width,
                  height: n.coord.height,
                  left: n.coord.left,
                  top: n.coord.top,
                };
                return (
                  (t.width +=
                    t.left && this.offset ? 2 * this.offset : this.offset),
                  (t.height += t.top ? 2 * this.offset : this.offset),
                  t
                );
              },
              setItemSize: function (n, t) {
                var i = this._itemCoordinates(n);
                t.css({
                  width: i.width,
                  height: i.height,
                  left: i.left,
                  top: i.top,
                });
              },
              _getText: function (n) {
                var t = n.text;
                return (
                  this.options.template && (t = this._renderTemplate(n)), t
                );
              },
              _renderTemplate: function (n) {
                var t = lt(this.options.template);
                return t({ dataItem: n.dataItem, text: n.text });
              },
              _createTitle: function (t) {
                return n("<div class='k-treemap-title'></div>").append(
                  n("<div></div>").html(this._getText(t))
                );
              },
              _createWrap: function () {
                return n("<div class='k-treemap-wrap'></div>");
              },
              _tileColorBrightness: function (n) {
                return w(n.color);
              },
            }),
            ft = b.extend({
              createRoot: function (n, t, i, r) {
                n.coord = { width: t, height: i, top: 0, left: 0 };
                n.vertical = r;
              },
              init: function (n) {
                this.vertical = n;
                this.quotient = n ? 1 : 0;
              },
              compute: function (n, t, i) {
                var r, u, f;
                n.length > 0 &&
                  ((r = t.width),
                  (u = t.height),
                  this.vertical ? (u -= i.text) : (r -= i.text),
                  (f = { width: r, height: u, top: 0, left: 0 }),
                  this.layoutChildren(n, f));
              },
              layoutChildren: function (n, t) {
                for (
                  var u, e = t.width * t.height, f = 0, r = [], i = 0;
                  i < n.length;
                  i++
                )
                  (u = n[i]),
                    (r[i] = parseFloat(n[i].value)),
                    (f += r[i]),
                    (u.vertical = this.vertical);
                for (i = 0; i < r.length; i++) n[i].area = (e * r[i]) / f;
                this.sliceAndDice(n, t);
              },
              sliceAndDice: function (n, t) {
                var i = this._totalArea(n);
                n[0].level % 2 === this.quotient
                  ? this.layoutHorizontal(n, t, i)
                  : this.layoutVertical(n, t, i);
              },
              layoutHorizontal: function (n, t, i) {
                for (var u, f, e = 0, r = 0; r < n.length; r++)
                  (u = n[r]),
                    (f = u.area / (i / t.width)),
                    (u.coord = {
                      height: t.height,
                      width: f,
                      top: t.top,
                      left: t.left + e,
                    }),
                    (e += f);
              },
              layoutVertical: function (n, t, i) {
                for (var u, f, e = 0, r = 0; r < n.length; r++)
                  (u = n[r]),
                    (f = u.area / (i / t.height)),
                    (u.coord = {
                      height: f,
                      width: t.width,
                      top: t.top + e,
                      left: t.left,
                    }),
                    (e += f);
              },
              _totalArea: function (n) {
                for (var i = 0, t = 0; t < n.length; t++) i += n[t].area;
                return i;
              },
            }),
            et = ut.extend({
              htmlSize: function (n) {
                var r,
                  t,
                  i = this._getByUid(n.dataItem.uid),
                  u = { text: 0, offset: 0 };
                return (
                  n.children &&
                    (this._clean(i),
                    (r = this._getText(n)),
                    r &&
                      ((t = this._createTitle(n)),
                      i.append(t),
                      this._compile(t, n.dataItem),
                      (u.text = n.vertical ? t.height() : t.width())),
                    i.append(this._createWrap()),
                    (this.offset = (s(i) - i.innerWidth()) / 2)),
                  u
                );
              },
              titleSize: function (n, t) {
                var i;
                return (
                  (i = n.vertical
                    ? t.children(".k-treemap-title").height()
                    : t.children(".k-treemap-title-vertical").width()),
                  i || 0
                );
              },
              _createTitle: function (t) {
                var i;
                return (
                  (i = n(
                    t.vertical
                      ? "<div class='k-treemap-title'></div>"
                      : "<div class='k-treemap-title-vertical'></div>"
                  )),
                  i.append(n("<div></div>").html(this._getText(t)))
                );
              },
            });
          k.ui.plugin(wt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.dataviz.min",
      [
        "kendo.core.min",
        "kendo.fx.min",
        "kendo.router.min",
        "kendo.view.min",
        "kendo.data.odata.min",
        "kendo.data.xml.min",
        "kendo.data.min",
        "kendo.data.signalr.min",
        "kendo.binder.min",
        "kendo.userevents.min",
        "kendo.draganddrop.min",
        "kendo.mobile.scroller.min",
        "kendo.popup.min",
        "kendo.tooltip.min",
        "kendo.drawing.min",
        "kendo.dataviz.core.min",
        "kendo.dataviz.themes.min",
        "kendo.dataviz.chart.min",
        "kendo.dataviz.gauge.min",
        "kendo.dataviz.barcode.min",
        "kendo.dataviz.qrcode.min",
        "kendo.dataviz.stock.min",
        "kendo.dataviz.sparkline.min",
        "kendo.dataviz.map.min",
        "kendo.dataviz.diagram.min",
        "kendo.dataviz.treemap.min",
        "kendo.angular.min",
      ],
      n
    );
  })(
    function () {
      "bundle all";
      return window.kendo;
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mobile.view.min",
      [
        "kendo.core.min",
        "kendo.fx.min",
        "kendo.mobile.scroller.min",
        "kendo.view.min",
      ],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function v(n) {
            for (
              var e = n.find(r("popover")), o = u.roles, t = 0, f = e.length;
              t < f;
              t++
            )
              i.initWidget(e[t], {}, o);
          }
          function y(n) {
            i.triggeredByInput(n) || n.preventDefault();
          }
          function p(t) {
            t.each(function () {
              i.initWidget(n(this), {}, u.roles);
            });
          }
          var i = window.kendo,
            f = i.mobile,
            u = f.ui,
            c = i.attr,
            e = u.Widget,
            ct = i.ViewClone,
            o = "init",
            lt =
              '<div style="height: 100%; width: 100%; position: absolute; top: 0; left: 0; z-index: 20000; display: none" />',
            w = "beforeShow",
            s = "show",
            b = "afterShow",
            k = "beforeHide",
            d = "transitionEnd",
            g = "transitionStart",
            h = "hide",
            nt = "destroy",
            tt = i.attrValue,
            r = i.roleSelector,
            it = i.directiveSelector,
            l = i.compileMobileDirective,
            at = e.extend({
              init: function (t, i) {
                e.fn.init.call(this, t, i);
                this.params = {};
                n.extend(this, i);
                this.transition = this.transition || this.defaultTransition;
                this._id();
                this.options.$angular
                  ? this._overlay()
                  : (this._layout(),
                    this._overlay(),
                    this._scroller(),
                    this._model());
              },
              events: [o, w, s, b, k, h, nt, g, d],
              options: {
                name: "View",
                title: "",
                layout: null,
                getLayout: n.noop,
                reload: !1,
                transition: "",
                defaultTransition: "",
                useNativeScrolling: !1,
                stretch: !1,
                zoom: !1,
                model: null,
                modelScope: window,
                scroller: {},
                initWidgets: !0,
              },
              enable: function (n) {
                t === n && (n = !0);
                n ? this.overlay.hide() : this.overlay.show();
              },
              destroy: function () {
                this.layout && this.layout.detach(this);
                this.trigger(nt);
                e.fn.destroy.call(this);
                this.scroller && this.scroller.destroy();
                this.options.$angular && this.element.scope().$destroy();
                i.destroy(this.element);
              },
              purge: function () {
                this.destroy();
                this.element.remove();
              },
              triggerBeforeShow: function () {
                return !this.trigger(w, { view: this });
              },
              triggerBeforeHide: function () {
                return !this.trigger(k, { view: this });
              },
              showStart: function () {
                var n = this.element;
                n.css("display", "");
                this.inited
                  ? this._invokeNgController()
                  : ((this.inited = !0), this.trigger(o, { view: this }));
                this.layout && this.layout.attach(this);
                this._padIfNativeScrolling();
                this.trigger(s, { view: this });
                i.resize(n);
              },
              showEnd: function () {
                this.trigger(b, { view: this });
                this._padIfNativeScrolling();
              },
              hideEnd: function () {
                var n = this;
                n.element.hide();
                n.trigger(h, { view: n });
                n.layout && n.layout.trigger(h, { view: n, layout: n.layout });
              },
              beforeTransition: function (n) {
                this.trigger(g, { type: n });
              },
              afterTransition: function (n) {
                this.trigger(d, { type: n });
              },
              _padIfNativeScrolling: function () {
                if (f.appLevelNativeScrolling()) {
                  var t = i.support.mobileOS && i.support.mobileOS.android,
                    n = f.application.skin() || "",
                    r = f.application.os.android || n.indexOf("android") > -1,
                    u = "flat" === n || n.indexOf("material") > -1,
                    e = (!t && !r) || u ? "header" : "footer",
                    o = (!t && !r) || u ? "footer" : "header";
                  this.content.css({
                    paddingTop: this[e].height(),
                    paddingBottom: this[o].height(),
                  });
                }
              },
              contentElement: function () {
                var n = this;
                return n.options.stretch ? n.content : n.scrollerContent;
              },
              clone: function () {
                return new ct(this);
              },
              _scroller: function () {
                var t = this;
                f.appLevelNativeScrolling() ||
                  (t.options.stretch
                    ? t.content.addClass("km-stretched-view")
                    : (t.content.kendoMobileScroller(
                        n.extend(t.options.scroller, {
                          zoom: t.options.zoom,
                          useNative: t.options.useNativeScrolling,
                        })
                      ),
                      (t.scroller = t.content.data("kendoMobileScroller")),
                      (t.scrollerContent = t.scroller.scrollElement)),
                  i.support.kineticScrollNeeded &&
                    (n(t.element).on("touchmove", ".km-header", y),
                    t.options.useNativeScrolling ||
                      t.options.stretch ||
                      n(t.element).on("touchmove", ".km-content", y)));
              },
              _model: function () {
                var n = this,
                  r = n.element,
                  t = n.options.model;
                "string" == typeof t && (t = i.getter(t)(n.options.modelScope));
                n.model = t;
                v(r);
                n.element.css("display", "");
                n.options.initWidgets &&
                  (t
                    ? i.bind(r, t, u, i.ui, i.dataviz.ui)
                    : f.init(r.children()));
                n.element.css("display", "none");
              },
              _id: function () {
                var n = this.element,
                  t = n.attr("id") || "";
                this.id = tt(n, "url") || "#" + t;
                "#" == this.id && ((this.id = i.guid()), n.attr("id", this.id));
              },
              _layout: function () {
                var t = r("content"),
                  n = this.element;
                n.addClass("km-view");
                this.header = n.children(r("header")).addClass("km-header");
                this.footer = n.children(r("footer")).addClass("km-footer");
                n.children(t)[0] ||
                  n.wrapInner("<div " + c("role") + '="content"></div>');
                this.content = n.children(r("content")).addClass("km-content");
                this.element.prepend(this.header).append(this.footer);
                this.layout = this.options.getLayout(this.layout);
                this.layout && this.layout.setup(this);
              },
              _overlay: function () {
                this.overlay = n(lt).appendTo(this.element);
              },
              _invokeNgController: function () {
                var i, t, r;
                this.options.$angular &&
                  ((i = this.element.controller()),
                  (t = this.options.$angular[0]),
                  i &&
                    ((r = n.proxy(this, "_callController", i, t)),
                    /^\$(digest|apply)$/.test(t.$$phase) ? r() : t.$apply(r)));
              },
              _callController: function (n, t) {
                this.element.injector().invoke(n.constructor, n, { $scope: t });
              },
            }),
            vt = e.extend({
              init: function (n, t) {
                e.fn.init.call(this, n, t);
                n = this.element;
                this.header = n
                  .children(this._locate("header"))
                  .addClass("km-header");
                this.footer = n
                  .children(this._locate("footer"))
                  .addClass("km-footer");
                this.elements = this.header.add(this.footer);
                v(n);
                this.options.$angular || i.mobile.init(this.element.children());
                this.element.detach();
                this.trigger(o, { layout: this });
              },
              _locate: function (n) {
                return this.options.$angular ? it(n) : r(n);
              },
              options: { name: "Layout", id: null, platform: null },
              events: [o, s, h],
              setup: function (n) {
                n.header[0] || (n.header = this.header);
                n.footer[0] || (n.footer = this.footer);
              },
              detach: function (n) {
                var t = this;
                n.header === t.header &&
                  t.header[0] &&
                  n.element.prepend(t.header.detach()[0].cloneNode(!0));
                n.footer === t.footer &&
                  t.footer.length &&
                  n.element.append(t.footer.detach()[0].cloneNode(!0));
              },
              attach: function (n) {
                var t = this,
                  i = t.currentView;
                i && t.detach(i);
                n.header === t.header &&
                  (t.header.detach(),
                  n.element.children(r("header")).remove(),
                  n.element.prepend(t.header));
                n.footer === t.footer &&
                  (t.footer.detach(),
                  n.element.children(r("footer")).remove(),
                  n.element.append(t.footer));
                t.trigger(s, { layout: t, view: n });
                t.currentView = n;
              },
            }),
            rt = i.Observable,
            yt = /<body[^>]*>(([\u000a\u000d\u2028\u2029]|.)*)<\/body>/i,
            ut = "loadStart",
            ft = "loadComplete",
            et = "showStart",
            ot = "sameViewRequested",
            st = "viewShow",
            ht = "viewTypeDetermined",
            a = "after",
            pt = rt.extend({
              init: function (t) {
                var e,
                  o,
                  u,
                  f,
                  r = this;
                if (
                  (rt.fn.init.call(r),
                  n.extend(r, t),
                  (r.sandbox = n("<div />")),
                  (u = r.container),
                  (e = r._hideViews(u)),
                  (r.rootView = e.first()),
                  !r.rootView[0] && t.rootNeeded)
                )
                  throw (
                    ((o =
                      u[0] == i.mobile.application.element[0]
                        ? 'Your kendo mobile application element does not contain any direct child elements with data-role="view" attribute set. Make sure that you instantiate the mobile application using the correct container.'
                        : 'Your pane element does not contain any direct child elements with data-role="view" attribute set.'),
                    Error(o))
                  );
                r.layouts = {};
                r.viewContainer = new i.ViewContainer(r.container);
                r.viewContainer.bind("accepted", function (n) {
                  n.view.params = r.params;
                });
                r.viewContainer.bind("complete", function (n) {
                  r.trigger(st, { view: n.view });
                });
                r.viewContainer.bind(a, function () {
                  r.trigger(a);
                });
                this.getLayoutProxy = n.proxy(this, "_getLayout");
                r._setupLayouts(u);
                f = u.children(r._locate("modalview drawer"));
                r.$angular
                  ? ((r.$angular[0].viewOptions = {
                      defaultTransition: r.transition,
                      loader: r.loader,
                      container: r.container,
                      getLayout: r.getLayoutProxy,
                    }),
                    f.each(function (i, r) {
                      l(n(r), t.$angular[0]);
                    }))
                  : p(f);
                this.bind(this.events, t);
              },
              events: [et, a, st, ut, ft, ot, ht],
              destroy: function () {
                i.destroy(this.container);
                for (var n in this.layouts) this.layouts[n].destroy();
              },
              view: function () {
                return this.viewContainer.view;
              },
              showView: function (n, t, r) {
                if (
                  ((n = n.replace(RegExp("^" + this.remoteViewURLPrefix), "")),
                  "" === n && this.remoteViewURLPrefix && (n = "/"),
                  n.replace(/^#/, "") === this.url)
                )
                  return this.trigger(ot), !1;
                this.trigger(et);
                var u = this,
                  o = function (i) {
                    return u.viewContainer.show(i, t, n);
                  },
                  e = u._findViewElement(n),
                  f = i.widgetInstance(e);
                return (
                  (u.url = n.replace(/^#/, "")),
                  (u.params = r),
                  f && f.reload && (f.purge(), (e = [])),
                  this.trigger(ht, { remote: 0 === e.length, url: n }),
                  e[0]
                    ? (f || (f = u._createView(e)), o(f))
                    : (this.serverNavigation
                        ? (location.href = n)
                        : u._loadView(n, o),
                      !0)
                );
              },
              append: function (n, t) {
                var u,
                  f,
                  r,
                  i = this.sandbox,
                  e = (t || "").split("?")[0],
                  o = this.container;
                return (
                  yt.test(n) && (n = RegExp.$1),
                  (i[0].innerHTML = n),
                  o.append(i.children("script, style")),
                  (u = this._hideViews(i)),
                  (r = u.first()),
                  r.length ||
                    (u = r = i.wrapInner("<div data-role=view />").children()),
                  e && r.hide().attr(c("url"), e),
                  this._setupLayouts(i),
                  (f = i.children(this._locate("modalview drawer"))),
                  o.append(
                    i.children(this._locate("layout modalview drawer")).add(u)
                  ),
                  p(f),
                  this._createView(r)
                );
              },
              _locate: function (n) {
                return this.$angular ? it(n) : r(n);
              },
              _findViewElement: function (n) {
                var i,
                  t = n.split("?")[0];
                return t
                  ? ((i = this.container.children(
                      "[" + c("url") + "='" + t + "']"
                    )),
                    i[0] ||
                      t.indexOf("/") !== -1 ||
                      (i = this.container.children(
                        "#" === t.charAt(0) ? t : "#" + t
                      )),
                    i)
                  : this.rootView;
              },
              _createView: function (n) {
                return this.$angular
                  ? l(n, this.$angular[0])
                  : i.initWidget(
                      n,
                      {
                        defaultTransition: this.transition,
                        loader: this.loader,
                        container: this.container,
                        getLayout: this.getLayoutProxy,
                        modelScope: this.modelScope,
                        reload: tt(n, "reload"),
                      },
                      u.roles
                    );
              },
              _getLayout: function (n) {
                return "" === n
                  ? null
                  : n
                  ? this.layouts[n]
                  : this.layouts[this.layout];
              },
              _loadView: function (t, r) {
                this._xhr && this._xhr.abort();
                this.trigger(ut);
                this._xhr = n
                  .get(i.absoluteURL(t, this.remoteViewURLPrefix), "html")
                  .always(n.proxy(this, "_xhrComplete", r, t));
              },
              _xhrComplete: function (n, t, i) {
                var r = !0;
                if ("object" == typeof i && 0 === i.status) {
                  if (!(i.responseText && i.responseText.length > 0)) return;
                  r = !0;
                  i = i.responseText;
                }
                this.trigger(ft);
                r && n(this.append(i, t));
              },
              _hideViews: function (n) {
                return n.children(this._locate("view splitview")).hide();
              },
              _setupLayouts: function (t) {
                var r,
                  e = this;
                t.children(e._locate("layout")).each(function () {
                  r = e.$angular
                    ? l(n(this), e.$angular[0])
                    : i.initWidget(n(this), {}, u.roles);
                  var t = r.options.platform;
                  t && t !== f.application.os.name
                    ? r.destroy()
                    : (e.layouts[r.options.id] = r);
                });
              },
            });
          i.mobile.ViewEngine = pt;
          u.plugin(at);
          u.plugin(vt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.mobile.loader.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var t = window.kendo,
            i = t.mobile.ui,
            r = i.Widget,
            u = n
              .map(t.eventMap, function (n) {
                return n;
              })
              .join(" ")
              .split(" "),
            f = r.extend({
              init: function (t, i) {
                var u = this,
                  f = n(
                    '<div class="km-loader"><span class="km-loading km-spin"></span><span class="km-loading-left"></span><span class="km-loading-right"></span></div>'
                  );
                r.fn.init.call(u, f, i);
                u.container = t;
                u.captureEvents = !1;
                u._attachCapture();
                f.append(u.options.loading).hide().appendTo(t);
              },
              options: {
                name: "Loader",
                loading: "<h1>Loading...</h1>",
                timeout: 100,
              },
              show: function () {
                var n = this;
                clearTimeout(n._loading);
                n.options.loading !== !1 &&
                  ((n.captureEvents = !0),
                  (n._loading = setTimeout(function () {
                    n.element.show();
                  }, n.options.timeout)));
              },
              hide: function () {
                this.captureEvents = !1;
                clearTimeout(this._loading);
                this.element.hide();
              },
              changeMessage: function (n) {
                this.options.loading = n;
                this.element.find(">h1").html(n);
              },
              transition: function () {
                this.captureEvents = !0;
                this.container.css("pointer-events", "none");
              },
              transitionDone: function () {
                this.captureEvents = !1;
                this.container.css("pointer-events", "");
              },
              _attachCapture: function () {
                function i(n) {
                  t.captureEvents && n.preventDefault();
                }
                var n,
                  t = this;
                for (t.captureEvents = !1, n = 0; n < u.length; n++)
                  t.container[0].addEventListener(u[n], i, !0);
              },
            });
          i.plugin(f);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mobile.pane.min",
      ["kendo.mobile.view.min", "kendo.mobile.loader.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          var i = window.kendo,
            f = i.mobile,
            r = i.roleSelector,
            u = f.ui,
            o = u.Widget,
            k = f.ViewEngine,
            a = u.View,
            d = f.ui.Loader,
            v = "external",
            s = "href",
            y = "#!",
            p = "navigate",
            w = "viewShow",
            h = "sameViewRequested",
            c = i.support.mobileOS,
            b = c.ios && !c.appMode && c.flatVersion >= 700,
            g = /popover|actionsheet|modalview|drawer/,
            nt = "#:back",
            e = i.attrValue,
            l = o.extend({
              init: function (n, t) {
                var r = this;
                o.fn.init.call(r, n, t);
                t = r.options;
                n = r.element;
                n.addClass("km-pane");
                r.options.collapsible && n.addClass("km-collapsible-pane");
                this.history = [];
                this.historyCallback = function (n, t, i) {
                  var u = r.transition;
                  return (
                    (r.transition = null),
                    b && i && (u = "none"),
                    r.viewEngine.showView(n, u, t)
                  );
                };
                this._historyNavigate = function (n) {
                  if (n === nt) {
                    if (1 === r.history.length) return;
                    r.history.pop();
                    n = r.history[r.history.length - 1];
                  } else r.history.push(n);
                  r.historyCallback(n, i.parseQueryStringParams(n));
                };
                this._historyReplace = function (n) {
                  var t = i.parseQueryStringParams(n);
                  r.history[r.history.length - 1] = n;
                  r.historyCallback(n, t);
                };
                r.loader = new d(n, { loading: r.options.loading });
                r.viewEngine = new k({
                  container: n,
                  transition: t.transition,
                  modelScope: t.modelScope,
                  rootNeeded: !t.initial,
                  serverNavigation: t.serverNavigation,
                  remoteViewURLPrefix: t.root || "",
                  layout: t.layout,
                  $angular: t.$angular,
                  loader: r.loader,
                  showStart: function () {
                    r.loader.transition();
                    r.closeActiveDialogs();
                  },
                  after: function () {
                    r.loader.transitionDone();
                  },
                  viewShow: function (n) {
                    r.trigger(w, n);
                  },
                  loadStart: function () {
                    r.loader.show();
                  },
                  loadComplete: function () {
                    r.loader.hide();
                  },
                  sameViewRequested: function () {
                    r.trigger(h);
                  },
                  viewTypeDetermined: function (n) {
                    (n.remote && r.options.serverNavigation) ||
                      r.trigger(p, { url: n.url });
                  },
                });
                this._setPortraitWidth();
                i.onResize(function () {
                  r._setPortraitWidth();
                });
                r._setupAppLinks();
              },
              closeActiveDialogs: function () {
                var t = this.element
                  .find(r("actionsheet popover modalview"))
                  .filter(":visible");
                t.each(function () {
                  i.widgetInstance(n(this), u).close();
                });
              },
              navigateToInitial: function () {
                var n = this.options.initial;
                return n && this.navigate(n), n;
              },
              options: {
                name: "Pane",
                portraitWidth: "",
                transition: "",
                layout: "",
                collapsible: !1,
                initial: null,
                modelScope: window,
                loading: "<h1>Loading...</h1>",
              },
              events: [p, w, h],
              append: function (n) {
                return this.viewEngine.append(n);
              },
              destroy: function () {
                o.fn.destroy.call(this);
                this.viewEngine.destroy();
                this.userEvents.destroy();
              },
              navigate: function (n, t) {
                n instanceof a && (n = n.id);
                this.transition = t;
                this._historyNavigate(n);
              },
              replace: function (n, t) {
                n instanceof a && (n = n.id);
                this.transition = t;
                this._historyReplace(n);
              },
              bindToRouter: function (n) {
                var t = this,
                  r = this.history,
                  u = this.viewEngine;
                n.bind("init", function (t) {
                  var f,
                    e = t.url,
                    o = n.pushState ? e : "/";
                  u.rootView.attr(i.attr("url"), o);
                  f = r.length;
                  "/" === e &&
                    f &&
                    (n.navigate(r[f - 1], !0), t.preventDefault());
                });
                n.bind("routeMissing", function (n) {
                  t.historyCallback(n.url, n.params, n.backButtonPressed) ||
                    n.preventDefault();
                });
                n.bind("same", function () {
                  t.trigger(h);
                });
                t._historyNavigate = function (t) {
                  n.navigate(t);
                };
                t._historyReplace = function (t) {
                  n.replace(t);
                };
              },
              hideLoading: function () {
                this.loader.hide();
              },
              showLoading: function () {
                this.loader.show();
              },
              changeLoadingMessage: function (n) {
                this.loader.changeMessage(n);
              },
              view: function () {
                return this.viewEngine.view();
              },
              _setPortraitWidth: function () {
                var n,
                  t = this.options.portraitWidth;
                t &&
                  ((n = i.mobile.application.element.is(".km-vertical")
                    ? t
                    : "auto"),
                  this.element.css("width", n));
              },
              _setupAppLinks: function () {
                var e = this,
                  u = "tab",
                  t = "[data-" + i.ns + "navigate-on-press]",
                  f = n
                    .map(
                      ["button", "backbutton", "detailbutton", "listview-link"],
                      function (n) {
                        return r(n) + ":not(" + t + ")";
                      }
                    )
                    .join(",");
                this.element
                  .handler(this)
                  .on("down", r(u) + "," + t, "_mouseup")
                  .on("click", r(u) + "," + f + "," + t, "_appLinkClick");
                this.userEvents = new i.UserEvents(this.element, {
                  fastTap: !0,
                  filter: f,
                  tap: function (n) {
                    n.event.currentTarget = n.touch.currentTarget;
                    e._mouseup(n.event);
                  },
                });
                this.element.css("-ms-touch-action", "");
              },
              _appLinkClick: function (t) {
                var i = n(t.currentTarget).attr("href"),
                  r = i && "#" !== i[0] && this.options.serverNavigation;
                r || e(n(t.currentTarget), "rel") == v || t.preventDefault();
              },
              _mouseup: function (r) {
                if (!(r.which > 1 || r.isDefaultPrevented())) {
                  var l = this,
                    o = n(r.currentTarget),
                    p = e(o, "transition"),
                    c = e(o, "rel") || "",
                    a = e(o, "target"),
                    h = o.attr(s),
                    w = b && 0 === o[0].offsetHeight,
                    k = h && "#" !== h[0] && this.options.serverNavigation;
                  w ||
                    k ||
                    c === v ||
                    t === h ||
                    h === y ||
                    (o.attr(s, y),
                    setTimeout(function () {
                      o.attr(s, h);
                    }),
                    c.match(g)
                      ? (i.widgetInstance(n(h), u).openFor(o),
                        ("actionsheet" !== c && "drawer" !== c) ||
                          r.stopPropagation())
                      : ("_top" === a
                          ? (l = f.application.pane)
                          : a && (l = n("#" + a).data("kendoMobilePane")),
                        l.navigate(h, p)),
                    r.preventDefault());
                }
              },
            });
          l.wrap = function (n) {
            n.is(r("view")) ||
              (n = n
                .wrap(
                  "<div data-" + i.ns + 'role="view" data-stretch="true"></div>'
                )
                .parent());
            var u = n
                .wrap('<div class="km-pane-wrapper"><div></div></div>')
                .parent(),
              t = new l(u);
            return t.navigate(""), t;
          };
          u.plugin(l);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mobile.popover.min",
      ["kendo.popup.min", "kendo.mobile.pane.min"],
      n
    );
  })(
    function () {
      return (
        (function (n) {
          var r = window.kendo,
            s = r.mobile,
            i = s.ui,
            u = "hide",
            f = "open",
            e = "close",
            h = '<div class="km-popup-wrapper" />',
            c = '<div class="km-popup-arrow" />',
            l = '<div class="km-popup-overlay" />',
            a = "km-up km-down km-left km-right",
            t = i.Widget,
            v = {
              down: { origin: "bottom center", position: "top center" },
              up: { origin: "top center", position: "bottom center" },
              left: {
                origin: "center left",
                position: "center right",
                collision: "fit flip",
              },
              right: {
                origin: "center right",
                position: "center left",
                collision: "fit flip",
              },
            },
            y = {
              animation: {
                open: { effects: "fade:in", duration: 0 },
                close: { effects: "fade:out", duration: 400 },
              },
            },
            p = {
              horizontal: { offset: "top", size: "height" },
              vertical: { offset: "left", size: "width" },
            },
            w = { up: "down", down: "up", left: "right", right: "left" },
            o = t.extend({
              init: function (i, f) {
                var a,
                  w,
                  e = this,
                  b = i.closest(".km-modalview-wrapper"),
                  o = i.closest(".km-root").children(".km-pane").first(),
                  s = b[0] ? b : o;
                f.viewport ? (o = f.viewport) : o[0] || (o = window);
                f.container ? (s = f.container) : s[0] || (s = document.body);
                a = {
                  viewport: o,
                  copyAnchorStyles: !1,
                  autosize: !0,
                  open: function () {
                    e.overlay.show();
                  },
                  activate: n.proxy(e._activate, e),
                  deactivate: function () {
                    e.overlay.hide();
                    e._apiCall || e.trigger(u);
                    e._apiCall = !1;
                  },
                };
                t.fn.init.call(e, i, f);
                i = e.element;
                f = e.options;
                i.wrap(h).addClass("km-popup").show();
                w = e.options.direction.match(/left|right/)
                  ? "horizontal"
                  : "vertical";
                e.dimensions = p[w];
                e.wrapper = i
                  .parent()
                  .css({ width: f.width, height: f.height })
                  .addClass("km-popup-wrapper km-" + f.direction)
                  .hide();
                e.arrow = n(c).prependTo(e.wrapper).hide();
                e.overlay = n(l).appendTo(s).hide();
                a.appendTo = e.overlay;
                f.className && e.overlay.addClass(f.className);
                e.popup = new r.ui.Popup(
                  e.wrapper,
                  n.extend(!0, a, y, v[f.direction])
                );
              },
              options: {
                name: "Popup",
                width: 240,
                height: "",
                direction: "down",
                container: null,
                viewport: null,
              },
              events: [u],
              show: function (t) {
                this.popup.options.anchor = n(t);
                this.popup.open();
              },
              hide: function () {
                this._apiCall = !0;
                this.popup.close();
              },
              destroy: function () {
                t.fn.destroy.call(this);
                this.popup.destroy();
                this.overlay.remove();
              },
              target: function () {
                return this.popup.options.anchor;
              },
              _activate: function () {
                var t = this,
                  e = t.options.direction,
                  i = t.dimensions,
                  u = i.offset,
                  f = t.popup,
                  o = f.options.anchor,
                  c = n(o).offset(),
                  l = n(f.element).offset(),
                  v = f.flipped ? w[e] : e,
                  s = 2 * t.arrow[i.size](),
                  h = t.element[i.size]() - t.arrow[i.size](),
                  y = n(o)[i.size](),
                  r = c[u] - l[u] + y / 2;
                r < s && (r = s);
                r > h && (r = h);
                t.wrapper.removeClass(a).addClass("km-" + v);
                t.arrow.css(u, r).show();
              },
            }),
            b = t.extend({
              init: function (u, f) {
                var h,
                  s = this;
                s.initialOpen = !1;
                t.fn.init.call(s, u, f);
                h = n.extend(
                  {
                    className: "km-popover-root",
                    hide: function () {
                      s.trigger(e);
                    },
                  },
                  this.options.popup
                );
                s.popup = new o(s.element, h);
                s.popup.overlay.on("move", function (n) {
                  n.target == s.popup.overlay[0] && n.preventDefault();
                });
                s.pane = new i.Pane(
                  s.element,
                  n.extend(this.options.pane, {
                    $angular: this.options.$angular,
                  })
                );
                r.notify(s, i);
              },
              options: { name: "PopOver", popup: {}, pane: {} },
              events: [f, e],
              open: function (n) {
                this.popup.show(n);
                this.initialOpen
                  ? this.pane.view()._invokeNgController()
                  : (this.pane.navigateToInitial() || this.pane.navigate(""),
                    this.popup.popup._position(),
                    (this.initialOpen = !0));
              },
              openFor: function (n) {
                this.open(n);
                this.trigger(f, { target: this.popup.target() });
              },
              close: function () {
                this.popup.hide();
              },
              destroy: function () {
                t.fn.destroy.call(this);
                this.pane.destroy();
                this.popup.destroy();
                r.destroy(this.element);
              },
            });
          i.plugin(o);
          i.plugin(b);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.mobile.shim.min", ["kendo.popup.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          var i = window.kendo,
            u = i.mobile.ui,
            e = i.ui.Popup,
            o = '<div class="km-shim"/>',
            f = "hide",
            r = u.Widget,
            s = r.extend({
              init: function (t, u) {
                var s = this,
                  h = i.mobile.application,
                  y = i.support.mobileOS,
                  l = h ? h.os.name : y ? y.name : "ios",
                  a = "ios" === l || "wp" === l || (!!h && h.os.skin),
                  v = "blackberry" === l,
                  p =
                    u.align ||
                    (a
                      ? "bottom center"
                      : v
                      ? "center right"
                      : "center center"),
                  w =
                    u.position ||
                    (a
                      ? "bottom center"
                      : v
                      ? "center right"
                      : "center center"),
                  b =
                    u.effect ||
                    (a ? "slideIn:up" : v ? "slideIn:left" : "fade:in"),
                  c = n(o).handler(s).hide();
                r.fn.init.call(s, t, u);
                s.shim = c;
                t = s.element;
                u = s.options;
                u.className && s.shim.addClass(u.className);
                u.modal || s.shim.on("down", "_hide");
                (h ? h.element : n(document.body)).append(c);
                s.popup = new e(s.element, {
                  anchor: c,
                  modal: !0,
                  appendTo: c,
                  origin: p,
                  position: w,
                  animation: {
                    open: { effects: b, duration: u.duration },
                    close: { duration: u.duration },
                  },
                  close: function (n) {
                    var t = !1;
                    s._apiCall || (t = s.trigger(f));
                    t && n.preventDefault();
                    s._apiCall = !1;
                  },
                  deactivate: function () {
                    c.hide();
                  },
                  open: function () {
                    c.show();
                  },
                });
                i.notify(s);
              },
              events: [f],
              options: {
                name: "Shim",
                modal: !1,
                align: t,
                position: t,
                effect: t,
                duration: 200,
              },
              show: function () {
                this.popup.open();
              },
              hide: function () {
                this._apiCall = !0;
                this.popup.close();
              },
              destroy: function () {
                r.fn.destroy.call(this);
                this.shim.kendoDestroy();
                this.popup.destroy();
                this.shim.remove();
              },
              _hide: function (t) {
                (t &&
                  n.contains(
                    this.shim.children().children(".k-popup")[0],
                    t.target
                  )) ||
                  this.popup.close();
              },
            });
          u.plugin(s);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mobile.modalview.min",
      ["kendo.mobile.shim.min", "kendo.mobile.view.min"],
      n
    );
  })(
    function () {
      return (
        (function (n) {
          var o = window.kendo,
            t = o.mobile.ui,
            s = t.Shim,
            r = t.Widget,
            u = "beforeOpen",
            f = "open",
            i = "close",
            e = "init",
            h = '<div class="km-modalview-wrapper" />',
            c = t.View.extend({
              init: function (n, t) {
                var i = this;
                r.fn.init.call(i, n, t);
                i._id();
                i._wrap();
                i._shim();
                this.options.$angular ||
                  (i._layout(), i._scroller(), i._model());
                i.element.css("display", "");
                i.trigger(e);
              },
              events: [e, u, f, i],
              options: {
                name: "ModalView",
                modal: !0,
                width: null,
                height: null,
              },
              destroy: function () {
                r.fn.destroy.call(this);
                this.shim.destroy();
              },
              open: function (t) {
                var i = this;
                i.target = n(t);
                i.shim.show();
                i._invokeNgController();
                i.trigger("show", { view: i });
              },
              openFor: function (n) {
                this.trigger(u, { target: n }) ||
                  (this.open(n), this.trigger(f, { target: n }));
              },
              close: function () {
                this.element.is(":visible") &&
                  !this.trigger(i) &&
                  this.shim.hide();
              },
              _wrap: function () {
                var r,
                  t,
                  i = this,
                  n = i.element,
                  u = i.options;
                r = n[0].style.width || "auto";
                t = n[0].style.height || "auto";
                n.addClass("km-modalview").wrap(h);
                i.wrapper = n
                  .parent()
                  .css({
                    width: u.width || r || 300,
                    height: u.height || t || 300,
                  })
                  .addClass("auto" == t ? " km-auto-height" : "");
                n.css({ width: "", height: "" });
              },
              _shim: function () {
                var n = this;
                n.shim = new s(n.wrapper, {
                  modal: n.options.modal,
                  position: "center center",
                  align: "center center",
                  effect: "fade:in",
                  className: "km-modalview-root",
                  hide: function (t) {
                    n.trigger(i) && t.preventDefault();
                  },
                });
              },
            });
          t.plugin(c);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mobile.drawer.min",
      ["kendo.mobile.view.min", "kendo.userevents.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          var i = window.kendo,
            o = i.mobile,
            f = i.support.mobileOS,
            s = i.effects.Transition,
            h = i.roleSelector,
            u = "x",
            e = o.ui,
            p = !(f.ios && 7 == f.majorVersion && !f.appMode),
            c = "beforeShow",
            l = "init",
            a = "show",
            v = "hide",
            y = "afterHide",
            w = { enable: n.noop },
            r = e.View.extend({
              init: function (t, r) {
                var s, f, e, u, c;
                if (
                  (n(t).parent().prepend(t),
                  o.ui.Widget.fn.init.call(this, t, r),
                  this.options.$angular || (this._layout(), this._scroller()),
                  this._model(),
                  (s = this.element.closest(h("pane")).data("kendoMobilePane")))
                )
                  (this.pane = s),
                    this.pane.bind("viewShow", function (n) {
                      u._viewShow(n);
                    }),
                    this.pane.bind("sameViewRequested", function () {
                      u.hide();
                    }),
                    (f = this.userEvents =
                      new i.UserEvents(s.element, {
                        fastTap: !0,
                        filter: h("view splitview"),
                        allowSelection: !0,
                      }));
                else {
                  if (
                    ((this.currentView = w),
                    (e = n(this.options.container)),
                    !e)
                  )
                    throw Error(
                      "The drawer needs a container configuration option set."
                    );
                  f = this.userEvents = new i.UserEvents(e, {
                    fastTap: !0,
                    allowSelection: !0,
                  });
                  this._attachTransition(e);
                }
                u = this;
                c = function (n) {
                  u.visible && (u.hide(), n.preventDefault());
                };
                this.options.swipeToOpen && p
                  ? (f.bind("press", function () {
                      u.transition.cancel();
                    }),
                    f.bind("start", function (n) {
                      u._start(n);
                    }),
                    f.bind("move", function (n) {
                      u._update(n);
                    }),
                    f.bind("end", function (n) {
                      u._end(n);
                    }),
                    f.bind("tap", c))
                  : f.bind("press", c);
                this.leftPositioned = "left" === this.options.position;
                this.visible = !1;
                this.element
                  .hide()
                  .addClass("km-drawer")
                  .addClass(
                    this.leftPositioned ? "km-left-drawer" : "km-right-drawer"
                  );
                this.trigger(l);
              },
              options: {
                name: "Drawer",
                position: "left",
                views: [],
                swipeToOpenViews: [],
                swipeToOpen: !0,
                title: "",
                container: null,
              },
              events: [c, v, y, l, a],
              show: function () {
                this._activate() && this._show();
              },
              hide: function () {
                this.currentView &&
                  (this.currentView.enable(),
                  (r.current = null),
                  this._moveViewTo(0),
                  this.trigger(v, { view: this }));
              },
              openFor: function () {
                this.visible ? this.hide() : this.show();
              },
              destroy: function () {
                e.View.fn.destroy.call(this);
                this.userEvents.destroy();
              },
              _activate: function () {
                if (this.visible) return !0;
                var n = this._currentViewIncludedIn(this.options.views);
                return (
                  !(!n || this.trigger(c, { view: this })) &&
                  (this._setAsCurrent(),
                  this.element.show(),
                  this.trigger(a, { view: this }),
                  this._invokeNgController(),
                  !0)
                );
              },
              _currentViewIncludedIn: function (t) {
                if (!this.pane || !t.length) return !0;
                var i = this.pane.view();
                return (
                  n.inArray(i.id.replace("#", ""), t) > -1 ||
                  n.inArray(i.element.attr("id"), t) > -1
                );
              },
              _show: function () {
                this.currentView.enable(!1);
                this.visible = !0;
                var n = this.element.width();
                this.leftPositioned || (n = -n);
                this._moveViewTo(n);
              },
              _setAsCurrent: function () {
                r.last !== this &&
                  (r.last && r.last.element.hide(), this.element.show());
                r.last = this;
                r.current = this;
              },
              _moveViewTo: function (n) {
                this.userEvents.cancel();
                this.transition.moveTo({
                  location: n,
                  duration: 400,
                  ease: s.easeOutExpo,
                });
              },
              _viewShow: function (n) {
                return (
                  this.currentView && this.currentView.enable(),
                  this.currentView === n.view
                    ? (this.hide(), t)
                    : ((this.currentView = n.view),
                      this._attachTransition(n.view.element),
                      t)
                );
              },
              _attachTransition: function (n) {
                var t = this,
                  r = this.movable,
                  f = r && r.x;
                this.transition &&
                  (this.transition.cancel(), this.movable.moveAxis("x", 0));
                r = this.movable = new i.ui.Movable(n);
                this.transition = new s({
                  axis: u,
                  movable: this.movable,
                  onEnd: function () {
                    0 === r[u] &&
                      ((n[0].style.cssText = ""),
                      t.element.hide(),
                      t.trigger(y),
                      (t.visible = !1));
                  },
                });
                f &&
                  (n.addClass("k-fx-hidden"),
                  i.animationFrame(function () {
                    n.removeClass("k-fx-hidden");
                    t.movable.moveAxis(u, f);
                    t.hide();
                  }));
              },
              _start: function (n) {
                var u,
                  f,
                  s,
                  h,
                  e,
                  o = n.sender;
                return Math.abs(n.x.velocity) < Math.abs(n.y.velocity) ||
                  i.triggeredByInput(n.event) ||
                  !this._currentViewIncludedIn(this.options.swipeToOpenViews)
                  ? (o.cancel(), t)
                  : ((u = this.leftPositioned),
                    (f = this.visible),
                    (s = (u && f) || (!u && !r.current)),
                    (h = (!u && f) || (u && !r.current)),
                    (e = n.x.velocity < 0),
                    ((s && e) || (h && !e)) && this._activate()
                      ? (o.capture(), t)
                      : (o.cancel(), t));
              },
              _update: function (n) {
                var t,
                  r = this.movable,
                  i = r.x + n.x.delta;
                t = this.leftPositioned
                  ? Math.min(Math.max(0, i), this.element.width())
                  : Math.max(Math.min(0, i), -this.element.width());
                this.movable.moveAxis(u, t);
                n.event.preventDefault();
                n.event.stopPropagation();
              },
              _end: function (n) {
                var r,
                  t = n.x.velocity,
                  u = Math.abs(this.movable.x) > this.element.width() / 2,
                  i = 0.8;
                r = this.leftPositioned
                  ? t > -i && (t > i || u)
                  : t < i && (t < -i || u);
                r ? this._show() : this.hide();
              },
            });
          e.plugin(r);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.mobile.splitview.min", ["kendo.mobile.pane.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var t = window.kendo,
            i = t.mobile.ui,
            r = i.Widget,
            u = "<div class='km-expanded-pane-shim' />",
            f = i.View,
            e = f.extend({
              init: function (f, e) {
                var s,
                  h,
                  o = this;
                r.fn.init.call(o, f, e);
                f = o.element;
                n.extend(o, e);
                o._id();
                o.options.$angular ? o._overlay() : (o._layout(), o._overlay());
                o._style();
                h = f.children(o._locate("modalview"));
                o.options.$angular
                  ? h.each(function (i, r) {
                      t.compileMobileDirective(n(r), e.$angular[0]);
                    })
                  : t.mobile.init(h);
                o.panes = [];
                o._paramsHistory = [];
                o.options.$angular
                  ? (o.element
                      .children(t.directiveSelector("pane"))
                      .each(function () {
                        s = t.compileMobileDirective(n(this), e.$angular[0]);
                        o.panes.push(s);
                      }),
                    o.element
                      .children(t.directiveSelector("header footer"))
                      .each(function () {
                        t.compileMobileDirective(n(this), e.$angular[0]);
                      }))
                  : o.content
                      .children(t.roleSelector("pane"))
                      .each(function () {
                        s = t.initWidget(this, {}, i.roles);
                        o.panes.push(s);
                      });
                o.expandedPaneShim = n(u).appendTo(o.element);
                o._shimUserEvents = new t.UserEvents(o.expandedPaneShim, {
                  fastTap: !0,
                  tap: function () {
                    o.collapsePanes();
                  },
                });
              },
              _locate: function (n) {
                return this.options.$angular
                  ? t.directiveSelector(n)
                  : t.roleSelector(n);
              },
              options: { name: "SplitView", style: "horizontal" },
              expandPanes: function () {
                this.element.addClass("km-expanded-splitview");
              },
              collapsePanes: function () {
                this.element.removeClass("km-expanded-splitview");
              },
              _layout: function () {
                var n = this,
                  i = n.element;
                n.transition = t.attrValue(i, "transition");
                t.mobile.ui.View.prototype._layout.call(this);
                t.mobile.init(this.header.add(this.footer));
                n.element.addClass("km-splitview");
                n.content.addClass("km-split-content");
              },
              _style: function () {
                var t,
                  i = this.options.style,
                  r = this.element;
                i &&
                  ((t = i.split(" ")),
                  n.each(t, function () {
                    r.addClass("km-split-" + this);
                  }));
              },
              showStart: function () {
                var t = this;
                t.element.css("display", "");
                t.inited
                  ? this._invokeNgController()
                  : ((t.inited = !0),
                    n.each(t.panes, function () {
                      this.options.initial
                        ? this.navigateToInitial()
                        : this.navigate("");
                    }),
                    t.trigger("init", { view: t }));
                t.trigger("show", { view: t });
              },
            });
          i.plugin(e);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mobile.application.min",
      ["kendo.mobile.pane.min", "kendo.router.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function tt(n, t) {
            var r = [];
            return (
              i && r.push("km-on-" + i.name),
              r.push(
                n.skin
                  ? "km-" + n.skin
                  : "ios" == n.name && n.majorVersion > 6
                  ? "km-ios7"
                  : "km-" + n.name
              ),
              (("ios" == n.name && n.majorVersion < 7) || "ios" != n.name) &&
                r.push("km-" + n.name + n.majorVersion),
              r.push("km-" + n.majorVersion),
              r.push("km-m" + (n.minorVersion ? n.minorVersion[0] : 0)),
              n.variant &&
                ((n.skin && n.skin === n.name) ||
                  !n.skin ||
                  n.setDefaultPlatform === !1) &&
                r.push("km-" + (n.skin ? n.skin : n.name) + "-" + n.variant),
              n.cordova && r.push("km-cordova"),
              r.push(n.appMode ? "km-app" : "km-web"),
              t &&
                t.statusBarStyle &&
                r.push("km-" + t.statusBarStyle + "-status-bar"),
              r.join(" ")
            );
          }
          function it(t) {
            return (
              "km-wp-" +
              (t.noVariantSet
                ? 0 ===
                  parseInt(
                    n("<div style='background: Background' />")
                      .css("background-color")
                      .split(",")[1],
                    10
                  )
                  ? "dark"
                  : "light"
                : t.variant + " km-wp-" + t.variant + "-force")
            );
          }
          function h(n) {
            return i.wp
              ? "-kendo-landscape" == n.css("animation-name")
              : Math.abs(window.orientation) / 90 == 1;
          }
          function y(n) {
            return h(n) ? ot : et;
          }
          function p(n) {
            n.parent().addBack().css("min-height", window.innerHeight);
          }
          function w() {
            n("meta[name=viewport]").remove();
            e.append(
              d({
                height:
                  ", width=device-width" +
                  (h()
                    ? ", height=" + window.innerHeight + "px"
                    : u.mobileOS.flatVersion >= 600 &&
                      u.mobileOS.flatVersion < 700
                    ? ", height=" + window.innerWidth + "px"
                    : ", height=device-height"),
              })
            );
          }
          var r = window.kendo,
            c = r.mobile,
            u = r.support,
            l = c.ui.Widget,
            rt = c.ui.Pane,
            ut = "ios7",
            i = u.mobileOS,
            a =
              "blackberry" == i.device &&
              i.flatVersion >= 600 &&
              i.flatVersion < 1e3 &&
              i.appMode,
            ft = 0.93,
            et = "km-vertical",
            v = "chrome" === i.browser,
            b =
              i.ios &&
              i.flatVersion >= 700 &&
              i.flatVersion < 800 &&
              (i.appMode || v),
            o = Math.abs(window.orientation) / 90 == 1,
            ot = "km-horizontal",
            k = {
              ios7: {
                ios: !0,
                browser: "default",
                device: "iphone",
                flatVersion: "700",
                majorVersion: "7",
                minorVersion: "0.0",
                name: "ios",
                tablet: !1,
              },
              ios: {
                ios: !0,
                browser: "default",
                device: "iphone",
                flatVersion: "612",
                majorVersion: "6",
                minorVersion: "1.2",
                name: "ios",
                tablet: !1,
              },
              android: {
                android: !0,
                browser: "default",
                device: "android",
                flatVersion: "442",
                majorVersion: "4",
                minorVersion: "4.2",
                name: "android",
                tablet: !1,
              },
              blackberry: {
                blackberry: !0,
                browser: "default",
                device: "blackberry",
                flatVersion: "710",
                majorVersion: "7",
                minorVersion: "1.0",
                name: "blackberry",
                tablet: !1,
              },
              meego: {
                meego: !0,
                browser: "default",
                device: "meego",
                flatVersion: "850",
                majorVersion: "8",
                minorVersion: "5.0",
                name: "meego",
                tablet: !1,
              },
              wp: {
                wp: !0,
                browser: "default",
                device: "wp",
                flatVersion: "800",
                majorVersion: "8",
                minorVersion: "0.0",
                name: "wp",
                tablet: !1,
              },
            },
            d = r.template(
              '<meta content="initial-scale=#: data.scale #, maximum-scale=#: data.scale #, user-scalable=no#=data.height#" name="viewport" />',
              { usedWithBlock: !1 }
            ),
            st = r.template(
              '<meta name="apple-mobile-web-app-capable" content="#= data.webAppCapable === false ? \'no\' : \'yes\' #" /> <meta name="apple-mobile-web-app-status-bar-style" content="#=data.statusBarStyle#" /> <meta name="msapplication-tap-highlight" content="no" /> ',
              { usedWithBlock: !1 }
            ),
            ht = r.template(
              "<style>.km-view { clip: rect(0 #= data.width #px #= data.height #px 0); }</style>",
              { usedWithBlock: !1 }
            ),
            ct = (i.android && "chrome" != i.browser) || i.blackberry,
            lt = r.template(
              '<link rel="apple-touch-icon' +
                (i.android ? "-precomposed" : "") +
                '" # if(data.size) { # sizes="#=data.size#" #}# href="#=data.icon#" />',
              { usedWithBlock: !1 }
            ),
            at =
              ("iphone" == i.device || "ipod" == i.device) &&
              i.majorVersion < 7,
            vt =
              ("iphone" == i.device || "ipod" == i.device) &&
              i.majorVersion >= 7,
            yt = vt ? "none" : null,
            pt = "mobilesafari" == i.browser ? 60 : 0,
            s = 20,
            wt = n(window),
            f = window.screen,
            e = n("head"),
            g = "init",
            bt = n.proxy,
            nt = l.extend({
              init: function (t, i) {
                c.application = this;
                n(n.proxy(this, "bootstrap", t, i));
              },
              bootstrap: function (t, i) {
                var f, u, e;
                t = n(t);
                t[0] || (t = n(document.body));
                l.fn.init.call(this, t, i);
                this.element.removeAttr("data-" + r.ns + "role");
                this._setupPlatform();
                this._attachMeta();
                this._setupElementClass();
                this._attachHideBarHandlers();
                f = n.extend({}, this.options);
                delete f.name;
                u = this;
                e = function () {
                  u.pane = new rt(u.element, f);
                  u.pane.navigateToInitial();
                  u.options.updateDocumentTitle && u._setupDocumentTitle();
                  u._startHistory();
                  u.trigger(g);
                };
                this.options.$angular ? setTimeout(e) : e();
              },
              options: {
                name: "Application",
                hideAddressBar: !0,
                browserHistory: !0,
                historyTransition: yt,
                modelScope: window,
                statusBarStyle: "black",
                transition: "",
                retina: !1,
                platform: null,
                skin: null,
                updateDocumentTitle: !0,
                useNativeScrolling: !1,
              },
              events: [g],
              navigate: function (n, t) {
                this.pane.navigate(n, t);
              },
              replace: function (n, t) {
                this.pane.replace(n, t);
              },
              scroller: function () {
                return this.view().scroller;
              },
              hideLoading: function () {
                if (!this.pane)
                  throw Error(
                    "The mobile application instance is not fully instantiated. Please consider activating loading in the application init event handler."
                  );
                this.pane.hideLoading();
              },
              showLoading: function () {
                if (!this.pane)
                  throw Error(
                    "The mobile application instance is not fully instantiated. Please consider activating loading in the application init event handler."
                  );
                this.pane.showLoading();
              },
              changeLoadingMessage: function (n) {
                if (!this.pane)
                  throw Error(
                    "The mobile application instance is not fully instantiated. Please consider changing the message in the application init event handler."
                  );
                this.pane.changeLoadingMessage(n);
              },
              view: function () {
                return this.pane.view();
              },
              skin: function (n) {
                var t = this;
                return arguments.length
                  ? ((t.options.skin = n || ""),
                    (t.element[0].className = "km-pane"),
                    t._setupPlatform(),
                    t._setupElementClass(),
                    t.options.skin)
                  : t.options.skin;
              },
              destroy: function () {
                l.fn.destroy.call(this);
                this.pane.destroy();
                this.options.browserHistory && this.router.destroy();
              },
              _setupPlatform: function () {
                var t = this,
                  f = t.options.platform,
                  e = t.options.skin,
                  u = [],
                  r = i || k[ut];
                f &&
                  ((r.setDefaultPlatform = !0),
                  "string" == typeof f
                    ? ((u = f.split("-")),
                      (r = n.extend({ variant: u[1] }, r, k[u[0]])))
                    : (r = f));
                e &&
                  ((u = e.split("-")),
                  i || (r.setDefaultPlatform = !1),
                  (r = n.extend({}, r, { skin: u[0], variant: u[1] })));
                r.variant || ((r.noVariantSet = !0), (r.variant = "dark"));
                t.os = r;
                t.osCssClass = tt(t.os, t.options);
                "wp" == r.name &&
                  (t.refreshBackgroundColorProxy ||
                    (t.refreshBackgroundColorProxy = n.proxy(function () {
                      ((t.os.variant && t.os.skin && t.os.skin === t.os.name) ||
                        !t.os.skin) &&
                        t.element
                          .removeClass(
                            "km-wp-dark km-wp-light km-wp-dark-force km-wp-light-force"
                          )
                          .addClass(it(t.os));
                    }, t)),
                  n(document).off(
                    "visibilitychange",
                    t.refreshBackgroundColorProxy
                  ),
                  n(document).off("resume", t.refreshBackgroundColorProxy),
                  r.skin ||
                    (t.element.parent().css("overflow", "hidden"),
                    n(document).on(
                      "visibilitychange",
                      t.refreshBackgroundColorProxy
                    ),
                    n(document).on("resume", t.refreshBackgroundColorProxy),
                    t.refreshBackgroundColorProxy()));
              },
              _startHistory: function () {
                this.options.browserHistory
                  ? ((this.router = new r.Router({
                      pushState: this.options.pushState,
                      root: this.options.root,
                      hashBang: this.options.hashBang,
                    })),
                    this.pane.bindToRouter(this.router),
                    this.router.start())
                  : this.options.initial || this.pane.navigate("");
              },
              _resizeToScreenHeight: function () {
                var t,
                  i = n("meta[name=apple-mobile-web-app-status-bar-style]")
                    .attr("content")
                    .match(/black-translucent|hidden/),
                  r = this.element;
                t = v
                  ? window.innerHeight
                  : h(r)
                  ? i
                    ? o
                      ? f.availWidth + s
                      : f.availWidth
                    : o
                    ? f.availWidth
                    : f.availWidth - s
                  : i
                  ? o
                    ? f.availHeight
                    : f.availHeight + s
                  : o
                  ? f.availHeight - s
                  : f.availHeight;
                r.height(t);
              },
              _setupElementClass: function () {
                var f,
                  i = this,
                  t = i.element;
                t.parent().addClass(
                  "km-root km-" + (i.os.tablet ? "tablet" : "phone")
                );
                t.addClass(i.osCssClass + " " + y(t));
                this.options.useNativeScrolling &&
                  t.parent().addClass("km-native-scrolling");
                v && t.addClass("km-ios-chrome");
                u.wpDevicePixelRatio &&
                  t.parent().css("font-size", u.wpDevicePixelRatio + "em");
                this.options.retina &&
                  (t.parent().addClass("km-retina"),
                  t.parent().css("font-size", u.devicePixelRatio * ft + "em"));
                a && w();
                i.options.useNativeScrolling
                  ? t.parent().addClass("km-native-scrolling")
                  : ct &&
                    ((f =
                      (screen.availWidth > screen.availHeight
                        ? screen.availWidth
                        : screen.availHeight) + 200),
                    n(ht({ width: f, height: f })).appendTo(e));
                b && i._resizeToScreenHeight();
                r.onResize(function () {
                  t.removeClass("km-horizontal km-vertical").addClass(y(t));
                  i.options.useNativeScrolling && p(t);
                  b && i._resizeToScreenHeight();
                  a && w();
                  r.resize(t);
                });
              },
              _clearExistingMeta: function () {
                e.find("meta")
                  .filter(
                    "[name|='apple-mobile-web-app'],[name|='msapplication-tap'],[name='viewport']"
                  )
                  .remove();
              },
              _attachMeta: function () {
                var t,
                  i = this.options,
                  n = i.icon;
                if (
                  (this._clearExistingMeta(),
                  a ||
                    e.prepend(
                      d({
                        height: "",
                        scale: this.options.retina
                          ? 1 / u.devicePixelRatio
                          : "1.0",
                      })
                    ),
                  e.prepend(st(i)),
                  n)
                ) {
                  "string" == typeof n && (n = { "": n });
                  for (t in n) e.prepend(lt({ icon: n[t], size: t }));
                }
                i.useNativeScrolling && p(this.element);
              },
              _attachHideBarHandlers: function () {
                var n = this,
                  t = bt(n, "_hideBar");
                !u.mobileOS.appMode &&
                  n.options.hideAddressBar &&
                  at &&
                  !n.options.useNativeScrolling &&
                  ((n._initialHeight = {}),
                  wt.on("load", t),
                  r.onResize(function () {
                    setTimeout(window.scrollTo, 0, 0, 1);
                  }));
              },
              _setupDocumentTitle: function () {
                var n = this,
                  i = document.title;
                n.pane.bind("viewShow", function (n) {
                  var r = n.view.title;
                  document.title = r !== t ? r : i;
                });
              },
              _hideBar: function () {
                var t = this,
                  i = t.element;
                i.height(
                  r.support.transforms.css + "calc(100% + " + pt + "px)"
                );
                n(window).trigger(r.support.resize);
              },
            });
          r.mobile.Application = nt;
          r.ui.plugin(nt, r.mobile, "Mobile");
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mobile.actionsheet.min",
      ["kendo.mobile.popover.min", "kendo.mobile.shim.min"],
      n
    );
  })(
    function () {
      return (
        (function (n) {
          var t = window.kendo,
            h = t.support,
            i = t.mobile.ui,
            c = i.Shim,
            l = i.Popup,
            r = i.Widget,
            f = "open",
            u = "close",
            e = "command",
            o = "li>a",
            a = "actionsheetContext",
            v = '<div class="km-actionsheet-wrapper" />',
            s = t.template(
              '<li class="km-actionsheet-cancel"><a href="\\#">#:cancel#</a></li>'
            ),
            y = r.extend({
              init: function (u, f) {
                var w,
                  p,
                  a,
                  e = this,
                  y = h.mobileOS;
                r.fn.init.call(e, u, f);
                f = e.options;
                a = f.type;
                u = e.element;
                p = "auto" === a ? y && y.tablet : "tablet" === a;
                w = p ? l : c;
                f.cancelTemplate && (s = t.template(f.cancelTemplate));
                u.addClass("km-actionsheet")
                  .append(s({ cancel: e.options.cancel }))
                  .wrap(v)
                  .on("up", o, "_click")
                  .on("click", o, t.preventDefault);
                e.view().bind("destroy", function () {
                  e.destroy();
                });
                e.wrapper = u
                  .parent()
                  .addClass(a ? " km-actionsheet-" + a : "");
                e.shim = new w(
                  e.wrapper,
                  n.extend(
                    {
                      modal: y.ios && y.majorVersion < 7,
                      className: "km-actionsheet-root",
                    },
                    e.options.popup
                  )
                );
                e._closeProxy = n.proxy(e, "_close");
                e._shimHideProxy = n.proxy(e, "_shimHide");
                e.shim.bind("hide", e._shimHideProxy);
                p && t.onResize(e._closeProxy);
                t.notify(e, i);
              },
              events: [f, u, e],
              options: {
                name: "ActionSheet",
                cancel: "Cancel",
                type: "auto",
                popup: { height: "auto" },
              },
              open: function (t, i) {
                var r = this;
                r.target = n(t);
                r.context = i;
                r.shim.show(t);
              },
              close: function () {
                this.context = this.target = null;
                this.shim.hide();
              },
              openFor: function (n) {
                var t = this,
                  i = n.data(a);
                t.open(n, i);
                t.trigger(f, { target: n, context: i });
              },
              destroy: function () {
                r.fn.destroy.call(this);
                t.unbindResize(this._closeProxy);
                this.shim.destroy();
              },
              _click: function (i) {
                var u, r, f, o;
                i.isDefaultPrevented() ||
                  ((u = n(i.currentTarget)),
                  (r = u.data("action")),
                  r &&
                    ((f = { target: this.target, context: this.context }),
                    (o = this.options.$angular),
                    o
                      ? this.element.injector().get("$parse")(r)(o[0])(f)
                      : t.getter(r)(window)(f)),
                  this.trigger(e, {
                    target: this.target,
                    context: this.context,
                    currentTarget: u,
                  }),
                  i.preventDefault(),
                  this._close());
              },
              _shimHide: function (n) {
                this.trigger(u)
                  ? n.preventDefault()
                  : (this.context = this.target = null);
              },
              _close: function (n) {
                this.trigger(u) ? n.preventDefault() : this.close();
              },
            });
          i.plugin(y);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.mobile.button.min", ["kendo.userevents.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function f(t, i, r) {
            n(i.target)
              .closest(".km-button,.km-detail")
              .toggleClass("km-state-active", r);
            c &&
              t.deactivateTimeoutID &&
              (clearTimeout(t.deactivateTimeoutID),
              (t.deactivateTimeoutID = 0));
          }
          function s(t) {
            return n('<span class="km-badge">' + t + "</span>");
          }
          var e = window.kendo,
            a = e.mobile,
            r = a.ui,
            o = r.Widget,
            v = e.support,
            h = v.mobileOS,
            c = h.android && h.flatVersion >= 300,
            l = "click",
            u = "disabled",
            y = "km-state-disabled",
            i = o.extend({
              init: function (n, t) {
                var r,
                  i = this;
                o.fn.init.call(i, n, t);
                r = "up" === i.options.clickOn;
                i._wrap();
                i._style();
                r || i.element.attr("data-navigate-on-press", !0);
                i.options.enable = i.options.enable && !i.element.attr(u);
                i.enable(i.options.enable);
                i._userEvents = new e.UserEvents(i.element, {
                  allowSelection: !r,
                  fastTap: !0,
                  press: function (n) {
                    i._activate(n);
                  },
                  release: function (n) {
                    f(i, n, !1);
                    r || n.event.stopPropagation();
                  },
                });
                i._userEvents.bind(r ? "tap" : "press", function (n) {
                  i._release(n);
                });
                c &&
                  i.element.on("move", function (n) {
                    i._timeoutDeactivate(n);
                  });
              },
              destroy: function () {
                o.fn.destroy.call(this);
                this._userEvents.destroy();
              },
              events: [l],
              options: {
                name: "Button",
                icon: "",
                style: "",
                badge: "",
                clickOn: "up",
                enable: !0,
              },
              badge: function (n) {
                var t = (this.badgeElement =
                  this.badgeElement || s(n).appendTo(this.element));
                return n || 0 === n
                  ? (t.html(n), this)
                  : n === !1
                  ? (t.empty().remove(), (this.badgeElement = !1), this)
                  : t.html();
              },
              enable: function (n) {
                var i = this.element;
                t === n && (n = !0);
                this.options.enable = n;
                n ? i.removeAttr(u) : i.attr(u, u);
                i.toggleClass(y, !n);
              },
              _timeoutDeactivate: function (n) {
                this.deactivateTimeoutID ||
                  (this.deactivateTimeoutID = setTimeout(f, 500, this, n, !1));
              },
              _activate: function (n) {
                var t = document.activeElement,
                  i = t ? t.nodeName : "";
                this.options.enable &&
                  (f(this, n, !0),
                  ("INPUT" != i && "TEXTAREA" != i) || t.blur());
              },
              _release: function (i) {
                var r = this;
                if (!(i.which > 1))
                  return r.options.enable
                    ? (r.trigger(l, {
                        target: n(i.target),
                        button: r.element,
                      }) && i.preventDefault(),
                      t)
                    : (i.preventDefault(), t);
              },
              _style: function () {
                var t,
                  i = this.options.style,
                  r = this.element;
                i &&
                  ((t = i.split(" ")),
                  n.each(t, function () {
                    r.addClass("km-" + this);
                  }));
              },
              _wrap: function () {
                var i = this,
                  f = i.options.icon,
                  r = i.options.badge,
                  e = '<span class="km-icon km-' + f,
                  t = i.element.addClass("km-button"),
                  u = t.children("span:not(.km-icon)").addClass("km-text"),
                  o = t.find("img").addClass("km-image");
                !u[0] &&
                  t.html() &&
                  (u = t
                    .wrapInner('<span class="km-text" />')
                    .children("span.km-text"));
                !o[0] &&
                  f &&
                  (u[0] || (e += " km-notext"),
                  (i.iconElement = t.prepend(n(e + '" />'))));
                (r || 0 === r) && (i.badgeElement = s(r).appendTo(t));
              },
            }),
            p = i.extend({
              options: { name: "BackButton", style: "back" },
              init: function (n, r) {
                var u = this;
                i.fn.init.call(u, n, r);
                t === u.element.attr("href") &&
                  u.element.attr("href", "#:back");
              },
            }),
            w = i.extend({
              options: { name: "DetailButton", style: "" },
              init: function (n, t) {
                i.fn.init.call(this, n, t);
              },
              _style: function () {
                var t,
                  i = this.options.style + " detail",
                  r = this.element;
                i &&
                  ((t = i.split(" ")),
                  n.each(t, function () {
                    r.addClass("km-" + this);
                  }));
              },
              _wrap: function () {
                var i = this,
                  r = i.options.icon,
                  u = '<span class="km-icon km-' + r,
                  t = i.element,
                  f = t.children("span"),
                  e = t.find("img").addClass("km-image");
                !e[0] &&
                  r &&
                  (f[0] || (u += " km-notext"), t.prepend(n(u + '" />')));
              },
            });
          r.plugin(i);
          r.plugin(p);
          r.plugin(w);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.mobile.buttongroup.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function i(n) {
            return "k-" + n + " km-" + n;
          }
          function e(t) {
            return n('<span class="' + i("badge") + '">' + t + "</span>");
          }
          var u = window.kendo,
            o = u.mobile.ui,
            s = o.Widget,
            r = "state-active",
            f = "state-disabled",
            h = "select",
            c = "li:not(.km-" + r + ")",
            l = s.extend({
              init: function (n, t) {
                var r = this;
                s.fn.init.call(r, n, t);
                r.element
                  .addClass("km-buttongroup k-widget k-button-group")
                  .find("li")
                  .each(r._button);
                r.element.on(r.options.selectOn, c, "_select");
                r._enable = !0;
                r.select(r.options.index);
                r.options.enable ||
                  ((r._enable = !1), r.wrapper.addClass(i(f)));
              },
              events: [h],
              options: {
                name: "ButtonGroup",
                selectOn: "down",
                index: -1,
                enable: !0,
              },
              current: function () {
                return this.element.find(".km-" + r);
              },
              select: function (u) {
                var e = this,
                  o = -1;
                u !== t &&
                  u !== -1 &&
                  e._enable &&
                  !n(u).is(".km-" + f) &&
                  (e.current().removeClass(i(r)),
                  "number" == typeof u
                    ? ((o = u), (u = n(e.element[0].children[u])))
                    : u.nodeType && ((u = n(u)), (o = u.index())),
                  u.addClass(i(r)),
                  (e.selectedIndex = o));
              },
              badge: function (t, i) {
                var r,
                  u = this.element;
                return (
                  isNaN(t) || (t = u.children().get(t)),
                  (t = u.find(t)),
                  (r = n(t.children(".km-badge")[0] || e(i).appendTo(t))),
                  i || 0 === i
                    ? (r.html(i), this)
                    : i === !1
                    ? (r.empty().remove(), this)
                    : r.html()
                );
              },
              enable: function (n) {
                t === n && (n = !0);
                this.wrapper.toggleClass(i(f), !n);
                this._enable = this.options.enable = n;
              },
              _button: function () {
                var t = n(this).addClass(i("button")),
                  o = u.attrValue(t, "icon"),
                  r = u.attrValue(t, "badge"),
                  f = t.children("span"),
                  s = t.find("img").addClass(i("image"));
                f[0] || (f = t.wrapInner("<span/>").children("span"));
                f.addClass(i("text"));
                !s[0] &&
                  o &&
                  t.prepend(
                    n('<span class="' + i("icon") + " " + i(o) + '"/>')
                  );
                (r || 0 === r) && e(r).appendTo(t);
              },
              _select: function (n) {
                n.which > 1 ||
                  n.isDefaultPrevented() ||
                  !this._enable ||
                  (this.select(n.currentTarget),
                  this.trigger(h, { index: this.selectedIndex }));
              },
            });
          o.plugin(l);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.mobile.collapsible.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          var t = window.kendo,
            e = t.mobile.ui,
            r = e.Widget,
            h = "km-collapsible",
            c = "km-collapsibleinset",
            l =
              "<div data-role='collapsible-header' class='km-collapsible-header'></div>",
            a =
              "<div data-role='collapsible-content' class='km-collapsible-content'></div>",
            i = "km-collapsed",
            u = "km-expanded",
            f = "km-animated",
            o = "expand",
            s = "collapse",
            v = r.extend({
              init: function (e, o) {
                var s = this,
                  l = n(e);
                r.fn.init.call(s, l, o);
                l.addClass(h);
                s._buildHeader();
                s.content = l.children().not(s.header).wrapAll(a).parent();
                s._userEvents = new t.UserEvents(s.header, {
                  fastTap: !0,
                  tap: function () {
                    s.toggle();
                  },
                });
                l.addClass(s.options.collapsed ? i : u);
                s.options.inset && l.addClass(c);
                s.options.animation
                  ? (s.content.addClass(f),
                    s.content.height(0),
                    s.options.collapsed && s.content.hide())
                  : s.options.collapsed && s.content.hide();
              },
              events: [o, s],
              options: {
                name: "Collapsible",
                collapsed: !0,
                collapseIcon: "arrow-n",
                expandIcon: "arrow-s",
                iconPosition: "left",
                animation: !0,
                inset: !1,
              },
              destroy: function () {
                r.fn.destroy.call(this);
                this._userEvents.destroy();
              },
              expand: function (n) {
                var e = this.options.collapseIcon,
                  r = this.content,
                  s = t.support.mobileOS.ios;
                this.trigger(o) ||
                  (e &&
                    this.header
                      .find(".km-icon")
                      .removeClass()
                      .addClass("km-icon km-" + e),
                  this.element.removeClass(i).addClass(u),
                  this.options.animation && !n
                    ? (r.off("transitionend"),
                      r.show(),
                      s && r.removeClass(f),
                      r.height(this._getContentHeight()),
                      s && r.addClass(f),
                      t.resize(r))
                    : r.show());
              },
              collapse: function (n) {
                var r = this.options.expandIcon,
                  t = this.content;
                this.trigger(s) ||
                  (r &&
                    this.header
                      .find(".km-icon")
                      .removeClass()
                      .addClass("km-icon km-" + r),
                  this.element.removeClass(u).addClass(i),
                  this.options.animation && !n
                    ? (t.one("transitionend", function () {
                        t.hide();
                      }),
                      t.height(0))
                    : t.hide());
              },
              toggle: function (n) {
                this.isCollapsed() ? this.expand(n) : this.collapse(n);
              },
              isCollapsed: function () {
                return this.element.hasClass(i);
              },
              resize: function () {
                !this.isCollapsed() &&
                  this.options.animation &&
                  this.content.height(this._getContentHeight());
              },
              _buildHeader: function () {
                var t = this.element.children(":header").wrapAll(l),
                  i = n('<span class="km-icon"/>'),
                  r = this.options.collapsed
                    ? this.options.expandIcon
                    : this.options.collapseIcon,
                  u = this.options.iconPosition;
                r && (t.prepend(i), i.addClass("km-" + r));
                this.header = t.parent();
                this.header.addClass("km-icon-" + u);
              },
              _getContentHeight: function () {
                var n,
                  t = this.content.attr("style");
                return (
                  this.content.css({
                    position: "absolute",
                    visibility: "hidden",
                    height: "auto",
                  }),
                  (n = this.content.height()),
                  this.content.attr("style", t ? t : ""),
                  n
                );
              },
            });
          e.plugin(v);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mobile.listview.min",
      ["kendo.data.min", "kendo.userevents.min", "kendo.mobile.button.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function ct() {
            return this.nodeType === yt.TEXT_NODE && this.nodeValue.match(ii);
          }
          function f(n, t) {
            t &&
              !n[0].querySelector(".km-icon") &&
              n.prepend('<span class="km-icon km-' + t + '"/>');
          }
          function lt(n) {
            f(n, u(n, "icon"));
            f(n, u(n.children(bt), "icon"));
          }
          function at(n) {
            var t = n.parent(),
              r = n.add(t.children(i.roleSelector("detailbutton"))),
              e = t.contents().not(r).not(ct);
            e.length ||
              (n
                .addClass("km-listview-link")
                .attr(i.attr("role"), "listview-link"),
              f(n, u(t, "icon")),
              f(n, u(n, "icon")));
          }
          function vt(n) {
            if (n[0].querySelector("input[type=checkbox],input[type=radio]")) {
              var t = n.parent();
              t
                .contents()
                .not(n)
                .not(function () {
                  return 3 == this.nodeType;
                })[0] ||
                (n.addClass("km-listview-label"),
                n
                  .children("[type=checkbox],[type=radio]")
                  .addClass("km-widget km-icon km-check"));
            }
          }
          function h(t, i) {
            n(t).css("transform", "translate3d(0px, " + i + "px, 0px)");
          }
          var k,
            c,
            l,
            d,
            g,
            nt,
            tt,
            it,
            i = window.kendo,
            yt = window.Node,
            a = i.mobile,
            r = a.ui,
            v = i._outerHeight,
            pt = i.data.DataSource,
            y = r.DataBoundWidget,
            wt = ".km-list > li, > li:not(.km-group-container)",
            rt = ".km-listview-link, .km-listview-label",
            bt = "[" + i.attr("icon") + "]",
            e = n.proxy,
            u = i.attrValue,
            o = "km-group-title",
            kt = "km-state-active",
            dt = '<div class="' + o + '"><div class="km-text"></div></div>',
            gt = i.template(
              '<li><div class="' +
                o +
                '"><div class="km-text">#= this.headerTemplate(data) #</div></div><ul>#= kendo.render(this.template, data.items)#</ul></li>'
            ),
            ni = '<div class="km-listview-wrapper" />',
            ti = i.template(
              '<form class="km-filter-form"><div class="km-filter-wrap"><input type="search" placeholder="#=placeholder#"/><a href="\\#" class="km-filter-reset" title="Clear"><span class="km-icon km-clear"></span><span class="km-text">Clear</span></a></div></form>'
            ),
            s = ".kendoMobileListView",
            ut = "styled",
            p = "dataBound",
            ft = "dataBinding",
            w = "itemChange",
            b = "click",
            et = "change",
            ot = "progress",
            st = "function",
            ii = /^\s+$/,
            ri = /button/,
            ui = i.Class.extend({
              init: function (n) {
                var i,
                  t,
                  r = n.scroller();
                r &&
                  ((this.options = n.options),
                  (this.element = n.element),
                  (this.scroller = n.scroller()),
                  this._shouldFixHeaders(),
                  (i = this),
                  (t = function () {
                    i._cacheHeaders();
                  }),
                  n.bind("resize", t),
                  n.bind(ut, t),
                  n.bind(p, t),
                  (this._scrollHandler = function (n) {
                    i._fixHeader(n);
                  }),
                  r.bind("scroll", this._scrollHandler));
              },
              destroy: function () {
                var n = this;
                n.scroller && n.scroller.unbind("scroll", n._scrollHandler);
              },
              _fixHeader: function (t) {
                if (this.fixedHeaders) {
                  var i,
                    f,
                    r,
                    u = 0,
                    e = this.scroller,
                    o = this.headers,
                    s = t.scrollTop;
                  do {
                    if (((i = o[u++]), !i)) {
                      r = n("<div />");
                      break;
                    }
                    f = i.offset;
                    r = i.header;
                  } while (f + 1 > s);
                  this.currentHeader != u &&
                    (e.fixedContainer.html(r.clone()),
                    (this.currentHeader = u));
                }
              },
              _shouldFixHeaders: function () {
                this.fixedHeaders =
                  "group" === this.options.type && this.options.fixedHeaders;
              },
              _cacheHeaders: function () {
                if ((this._shouldFixHeaders(), this.fixedHeaders)) {
                  var t = [],
                    i = this.scroller.scrollTop;
                  this.element.find("." + o).each(function (r, u) {
                    u = n(u);
                    t.unshift({ offset: u.position().top + i, header: u });
                  });
                  this.headers = t;
                  this._fixHeader({ scrollTop: i });
                }
              },
            }),
            fi = function () {
              return { page: 1 };
            },
            ei = i.Class.extend({
              init: function (n) {
                var t = this,
                  i = n.options,
                  r = n.scroller(),
                  u = i.pullParameters || fi;
                this.listView = n;
                this.scroller = r;
                n.bind("_dataSource", function (n) {
                  t.setDataSource(n.dataSource);
                });
                r.setOptions({
                  pullToRefresh: !0,
                  pull: function () {
                    t._pulled ||
                      ((t._pulled = !0),
                      t.dataSource.read(u.call(n, t._first)));
                  },
                  messages: {
                    pullTemplate: i.messages.pullTemplate,
                    releaseTemplate: i.messages.releaseTemplate,
                    refreshTemplate: i.messages.refreshTemplate,
                  },
                });
              },
              setDataSource: function (n) {
                var t = this;
                this._first = n.view()[0];
                this.dataSource = n;
                n.bind("change", function () {
                  t._change();
                });
                n.bind("error", function () {
                  t._change();
                });
              },
              _change: function () {
                var n,
                  t = this.scroller,
                  i = this.dataSource;
                this._pulled && t.pullHandled();
                (!this._pulled && this._first) ||
                  ((n = i.view()), n[0] && (this._first = n[0]));
                this._pulled = !1;
              },
            }),
            ht = i.Observable.extend({
              init: function (n) {
                var t = this;
                i.Observable.fn.init.call(t);
                t.buffer = n.buffer;
                t.height = n.height;
                t.item = n.item;
                t.items = [];
                t.footer = n.footer;
                t.buffer.bind("reset", function () {
                  t.refresh();
                });
              },
              refresh: function () {
                for (
                  var u, f, t, i, r = this.buffer, n = this.items, e = !1;
                  n.length;

                )
                  n.pop().destroy();
                for (
                  this.offset = r.offset, u = this.item, i = 0;
                  i < r.viewSize;
                  i++
                ) {
                  if (i === r.total()) {
                    e = !0;
                    break;
                  }
                  t = u(this.content(this.offset + n.length));
                  t.below(f);
                  f = t;
                  n.push(t);
                }
                this.itemCount = n.length;
                this.trigger("reset");
                this._resize();
                e && this.trigger("endReached");
              },
              totalHeight: function () {
                if (!this.items[0]) return 0;
                var n = this,
                  t = n.items,
                  r = t[0].top,
                  i = t[t.length - 1].bottom,
                  u = (i - r) / n.itemCount,
                  f = n.buffer.length - n.offset - n.itemCount;
                return (this.footer ? this.footer.height : 0) + i + f * u;
              },
              batchUpdate: function (n) {
                var i,
                  r,
                  u = this.height(),
                  t = this.items,
                  f = this.offset;
                if (t[0]) {
                  if (this.lastDirection)
                    for (
                      ;
                      t[t.length - 1].bottom > n + 2 * u && 0 !== this.offset;

                    )
                      this.offset--,
                        (i = t.pop()),
                        i.update(this.content(this.offset)),
                        i.above(t[0]),
                        t.unshift(i);
                  else
                    for (; t[0].top < n - u; ) {
                      if (
                        ((r = this.offset + this.itemCount),
                        r === this.buffer.total())
                      ) {
                        this.trigger("endReached");
                        break;
                      }
                      if (r === this.buffer.length) break;
                      i = t.shift();
                      i.update(this.content(this.offset + this.itemCount));
                      i.below(t[t.length - 1]);
                      t.push(i);
                      this.offset++;
                    }
                  f !== this.offset && this._resize();
                }
              },
              update: function (n) {
                var i,
                  e,
                  o,
                  u,
                  f = this,
                  t = this.items,
                  s = this.height(),
                  a = this.itemCount,
                  r = s / 2,
                  h = (this.lastTop || 0) > n,
                  c = n - r,
                  l = n + s + r;
                t[0] &&
                  ((this.lastTop = n),
                  (this.lastDirection = h),
                  h
                    ? t[0].top > c &&
                      t[t.length - 1].bottom > l + r &&
                      this.offset > 0 &&
                      (this.offset--,
                      (i = t.pop()),
                      (e = t[0]),
                      i.update(this.content(this.offset)),
                      t.unshift(i),
                      i.above(e),
                      f._resize())
                    : t[t.length - 1].bottom < l &&
                      t[0].top < c - r &&
                      ((u = this.offset + a),
                      u === this.buffer.total()
                        ? this.trigger("endReached")
                        : u !== this.buffer.length &&
                          ((i = t.shift()),
                          (o = t[t.length - 1]),
                          t.push(i),
                          i.update(this.content(this.offset + this.itemCount)),
                          f.offset++,
                          i.below(o),
                          f._resize())));
              },
              content: function (n) {
                return this.buffer.at(n);
              },
              destroy: function () {
                this.unbind();
              },
              _resize: function () {
                var n = this.items,
                  t = 0,
                  i = 0,
                  r = n[0],
                  u = n[n.length - 1];
                r && ((t = r.top), (i = u.bottom));
                this.trigger("resize", { top: t, bottom: i });
                this.footer && this.footer.below(u);
              },
            });
          i.mobile.ui.VirtualList = ht;
          k = i.Class.extend({
            init: function (t, i) {
              var r = t.append([i], !0)[0],
                u = r.offsetHeight;
              n.extend(this, {
                top: 0,
                element: r,
                listView: t,
                height: u,
                bottom: u,
              });
            },
            update: function (n) {
              this.element = this.listView.setDataItem(this.element, n);
            },
            above: function (n) {
              n &&
                ((this.height = this.element.offsetHeight),
                (this.top = n.top - this.height),
                (this.bottom = n.top),
                h(this.element, this.top));
            },
            below: function (n) {
              n &&
                ((this.height = this.element.offsetHeight),
                (this.top = n.bottom),
                (this.bottom = this.top + this.height),
                h(this.element, this.top));
            },
            destroy: function () {
              i.destroy(this.element);
              n(this.element).remove();
            },
          });
          c =
            '<div><span class="km-icon"></span><span class="km-loading-left"></span><span class="km-loading-right"></span></div>';
          l = i.Class.extend({
            init: function (t) {
              this.element = n(
                '<li class="km-load-more km-scroller-refresh" style="display: none"></li>'
              ).appendTo(t.element);
              this._loadIcon = n(c).appendTo(this.element);
            },
            enable: function () {
              this.element.show();
              this.height = v(this.element, !0);
            },
            disable: function () {
              this.element.hide();
              this.height = 0;
            },
            below: function (n) {
              n &&
                ((this.top = n.bottom),
                (this.bottom = this.height + this.top),
                h(this.element, this.top));
            },
          });
          d = l.extend({
            init: function (t, i) {
              this._loadIcon = n(c).hide();
              this._loadButton = n(
                '<a class="km-load">' + t.options.messages.loadMoreText + "</a>"
              ).hide();
              this.element = n(
                '<li class="km-load-more" style="display: none"></li>'
              )
                .append(this._loadIcon)
                .append(this._loadButton)
                .appendTo(t.element);
              var r = this;
              this._loadButton
                .kendoMobileButton()
                .data("kendoMobileButton")
                .bind("click", function () {
                  r._hideShowButton();
                  i.next();
                });
              i.bind("resize", function () {
                r._showLoadButton();
              });
              this.height = v(this.element, !0);
              this.disable();
            },
            _hideShowButton: function () {
              this._loadButton.hide();
              this.element.addClass("km-scroller-refresh");
              this._loadIcon.css("display", "block");
            },
            _showLoadButton: function () {
              this._loadButton.show();
              this.element.removeClass("km-scroller-refresh");
              this._loadIcon.hide();
            },
          });
          g = i.Class.extend({
            init: function (n) {
              var t = this;
              this.chromeHeight = v(n.wrapper.children().not(n.element));
              this.listView = n;
              this.scroller = n.scroller();
              this.options = n.options;
              n.bind("_dataSource", function (n) {
                t.setDataSource(n.dataSource, n.empty);
              });
              n.bind("resize", function () {
                t.list.items.length &&
                  (t.scroller.reset(), t.buffer.range(0), t.list.refresh());
              });
              this.scroller.makeVirtual();
              this._scroll = function (n) {
                t.list.update(n.scrollTop);
              };
              this.scroller.bind("scroll", this._scroll);
              this._scrollEnd = function (n) {
                t.list.batchUpdate(n.scrollTop);
              };
              this.scroller.bind("scrollEnd", this._scrollEnd);
            },
            destroy: function () {
              this.list.unbind();
              this.buffer.unbind();
              this.scroller.unbind("scroll", this._scroll);
              this.scroller.unbind("scrollEnd", this._scrollEnd);
            },
            setDataSource: function (t, r) {
              var s,
                f,
                o,
                u,
                h = this,
                a = this.options,
                e = this.listView,
                c = e.scroller(),
                v = a.loadMore;
              if (
                ((this.dataSource = t),
                (s = t.pageSize() || a.virtualViewSize),
                !s && !r)
              )
                throw Error(
                  "the DataSource does not have page size configured. Page Size setting is mandatory for the mobile listview virtual scrolling to work as expected."
                );
              this.buffer && this.buffer.destroy();
              f = new i.data.Buffer(t, Math.floor(s / 2), v);
              o = v ? new d(e, f) : new l(e);
              this.list && this.list.destroy();
              u = new ht({
                buffer: f,
                footer: o,
                item: function (n) {
                  return new k(e, n);
                },
                height: function () {
                  return c.height();
                },
              });
              u.bind("resize", function () {
                h.updateScrollerSize();
                e.updateSize();
              });
              u.bind("reset", function () {
                h.footer.enable();
              });
              u.bind("endReached", function () {
                o.disable();
                h.updateScrollerSize();
              });
              f.bind("expand", function () {
                u.lastDirection = !1;
                u.batchUpdate(c.scrollTop);
              });
              n.extend(this, { buffer: f, scroller: c, list: u, footer: o });
            },
            updateScrollerSize: function () {
              this.scroller.virtualSize(
                0,
                this.list.totalHeight() + this.chromeHeight
              );
            },
            refresh: function () {
              this.list.refresh();
            },
            reset: function () {
              this.buffer.range(0);
              this.list.refresh();
            },
          });
          nt = i.Class.extend({
            init: function (n) {
              var t,
                i = this;
              this.listView = n;
              this.options = n.options;
              t = this;
              this._refreshHandler = function (n) {
                t.refresh(n);
              };
              this._progressHandler = function () {
                n.showLoading();
              };
              n.bind("_dataSource", function (n) {
                i.setDataSource(n.dataSource);
              });
            },
            destroy: function () {
              this._unbindDataSource();
            },
            reset: function () {},
            refresh: function (n) {
              var h,
                c,
                s,
                l,
                v,
                y,
                a,
                f = n && n.action,
                u = n && n.items,
                i = this.listView,
                w = this.dataSource,
                b = this.options.appendOnRefresh,
                e = w.view(),
                k = w.group(),
                o = k && k[0];
              return "itemchange" === f
                ? (i._hasBindingTarget() ||
                    ((h = i.findByDataItem(u)[0]), h && i.setDataItem(h, u[0])),
                  t)
                : ((v = ("add" === f && !o) || (b && !i._filter)),
                  (y = "remove" === f && !o),
                  v ? (c = []) : y && (c = i.findByDataItem(u)),
                  i.trigger(ft, {
                    action: f || "rebind",
                    items: u,
                    removedItems: c,
                    index: n && n.index,
                  })
                    ? (this._shouldShowLoading() && i.hideLoading(), t)
                    : ("add" !== f || o
                        ? "remove" !== f || o
                          ? o
                            ? i.replaceGrouped(e)
                            : b && !i._filter
                            ? ((s = i.prepend(e)), (l = e))
                            : i.replace(e)
                          : ((s = []), i.remove(u))
                        : ((a = e.indexOf(u[0])),
                          a > -1 && ((s = i.insertAt(u, a)), (l = u))),
                      this._shouldShowLoading() && i.hideLoading(),
                      i.trigger(p, { ns: r, addedItems: s, addedDataItems: l }),
                      t));
            },
            setDataSource: function (n) {
              this.dataSource && this._unbindDataSource();
              this.dataSource = n;
              n.bind(et, this._refreshHandler);
              this._shouldShowLoading() &&
                this.dataSource.bind(ot, this._progressHandler);
            },
            _unbindDataSource: function () {
              this.dataSource
                .unbind(et, this._refreshHandler)
                .unbind(ot, this._progressHandler);
            },
            _shouldShowLoading: function () {
              var n = this.options;
              return !n.pullToRefresh && !n.loadMore && !n.endlessScroll;
            },
          });
          tt = i.Class.extend({
            init: function (t) {
              var r = this,
                i = t.options.filterable,
                u = "change paste",
                f = this;
              this.listView = t;
              this.options = i;
              t.element.before(
                ti({ placeholder: i.placeholder || "Search..." })
              );
              i.autoFilter !== !1 && (u += " keyup");
              this.element = t.wrapper.find(".km-search-form");
              this.searchInput = t.wrapper
                .find("input[type=search]")
                .closest("form")
                .on("submit" + s, function (n) {
                  n.preventDefault();
                })
                .end()
                .on("focus" + s, function () {
                  r._oldFilter = r.searchInput.val();
                })
                .on(
                  u.split(" ").join(s + " ") + s,
                  e(this._filterChange, this)
                );
              this.clearButton = t.wrapper
                .find(".km-filter-reset")
                .on(b, e(this, "_clearFilter"))
                .hide();
              this._dataSourceChange = n.proxy(this._refreshInput, this);
              t.bind("_dataSource", function (n) {
                n.dataSource.bind("change", f._dataSourceChange);
              });
            },
            _refreshInput: function () {
              var n = this.listView.dataSource.filter(),
                t = this.listView._filter.searchInput;
              t.val(
                n &&
                  n.filters[0].field === this.listView.options.filterable.field
                  ? n.filters[0].value
                  : ""
              );
            },
            _search: function (n) {
              this._filter = !0;
              this.clearButton[n ? "show" : "hide"]();
              this.listView.dataSource.filter(n);
            },
            _filterChange: function (n) {
              var t = this;
              "paste" == n.type && this.options.autoFilter !== !1
                ? setTimeout(function () {
                    t._applyFilter();
                  }, 1)
                : this._applyFilter();
            },
            _applyFilter: function () {
              var t = this.options,
                n = this.searchInput.val(),
                i = n.length
                  ? {
                      field: t.field,
                      operator: t.operator || "startswith",
                      ignoreCase: t.ignoreCase,
                      value: n,
                    }
                  : null;
              n !== this._oldFilter && ((this._oldFilter = n), this._search(i));
            },
            _clearFilter: function (n) {
              this.searchInput.val("");
              this._search(null);
              n.preventDefault();
            },
          });
          it = y.extend({
            init: function (t, r) {
              var u = this;
              y.fn.init.call(this, t, r);
              t = this.element;
              r = this.options;
              r.scrollTreshold && (r.scrollThreshold = r.scrollTreshold);
              t.on("down", rt, "_highlight").on("move up cancel", rt, "_dim");
              this._userEvents = new i.UserEvents(t, {
                fastTap: !0,
                filter: wt,
                allowSelection: !0,
                tap: function (n) {
                  u._click(n);
                },
              });
              t.css("-ms-touch-action", "auto");
              t.wrap(ni);
              this.wrapper = this.element.parent();
              this._headerFixer = new ui(this);
              this._itemsCache = {};
              this._templates();
              this.virtual = r.endlessScroll || r.loadMore;
              this._style();
              this.options.$angular &&
              (this.virtual || this.options.pullToRefresh)
                ? setTimeout(n.proxy(this, "_start"))
                : this._start();
            },
            _start: function () {
              var n = this.options;
              this.options.filterable && (this._filter = new tt(this));
              this._itemBinder = this.virtual ? new g(this) : new nt(this);
              this.options.pullToRefresh &&
                (this._pullToRefreshHandler = new ei(this));
              this.setDataSource(n.dataSource);
              this._enhanceItems(this.items());
              i.notify(this, r);
            },
            events: [b, ft, p, w],
            options: {
              name: "ListView",
              style: "",
              type: "flat",
              autoBind: !0,
              fixedHeaders: !1,
              template: "#:data#",
              headerTemplate: '<span class="km-text">#:value#</span>',
              appendOnRefresh: !1,
              loadMore: !1,
              endlessScroll: !1,
              scrollThreshold: 30,
              pullToRefresh: !1,
              messages: {
                loadMoreText: "Press to load more",
                pullTemplate: "Pull to refresh",
                releaseTemplate: "Release to refresh",
                refreshTemplate: "Refreshing",
              },
              pullOffset: 140,
              filterable: !1,
              virtualViewSize: null,
            },
            refresh: function () {
              this._itemBinder.refresh();
            },
            reset: function () {
              this._itemBinder.reset();
            },
            setDataSource: function (n) {
              var t = !n;
              this.dataSource = pt.create(n);
              this.trigger("_dataSource", {
                dataSource: this.dataSource,
                empty: t,
              });
              this.options.autoBind &&
                !t &&
                (this.items().remove(), this.dataSource.fetch());
            },
            destroy: function () {
              y.fn.destroy.call(this);
              i.destroy(this.element);
              this._userEvents.destroy();
              this._itemBinder && this._itemBinder.destroy();
              this._headerFixer && this._headerFixer.destroy();
              this.element.unwrap();
              delete this.element;
              delete this.wrapper;
              delete this._userEvents;
            },
            items: function () {
              return "group" === this.options.type
                ? this.element.find(".km-list").children()
                : this.element.children().not(".km-load-more");
            },
            scroller: function () {
              return (
                this._scrollerInstance ||
                  (this._scrollerInstance = this.element
                    .closest(".km-scroll-wrapper")
                    .data("kendoMobileScroller")),
                this._scrollerInstance
              );
            },
            showLoading: function () {
              var n = this.view();
              n && n.loader && n.loader.show();
            },
            hideLoading: function () {
              var n = this.view();
              n && n.loader && n.loader.hide();
            },
            insertAt: function (n, t, i) {
              var u = this;
              return u._renderItems(n, function (f) {
                if (
                  (0 === t
                    ? u.element.prepend(f)
                    : t === -1
                    ? u.element.append(f)
                    : u
                        .items()
                        .eq(t - 1)
                        .after(f),
                  i)
                )
                  for (var e = 0; e < f.length; e++)
                    u.trigger(w, { item: f.eq(e), data: n[e], ns: r });
              });
            },
            append: function (n, t) {
              return this.insertAt(n, -1, t);
            },
            prepend: function (n, t) {
              return this.insertAt(n, 0, t);
            },
            replace: function (n) {
              return (
                (this.options.type = "flat"),
                this._angularItems("cleanup"),
                i.destroy(this.element.children()),
                this.element.empty(),
                this._userEvents.cancel(),
                this._style(),
                this.insertAt(n, 0)
              );
            },
            replaceGrouped: function (t) {
              this.options.type = "group";
              this._angularItems("cleanup");
              this.element.empty();
              var r = n(i.render(this.groupTemplate, t));
              this._enhanceItems(r.children("ul").children("li"));
              this.element.append(r);
              a.init(r);
              this._style();
              this._angularItems("compile");
            },
            remove: function (n) {
              var t = this.findByDataItem(n);
              this.angular("cleanup", function () {
                return { elements: t };
              });
              i.destroy(t);
              t.remove();
            },
            findByDataItem: function (n) {
              for (var u = [], t = 0, r = n.length; t < r; t++)
                u[t] = "[data-" + i.ns + "uid=" + n[t].uid + "]";
              return this.element.find(u.join(","));
            },
            setDataItem: function (t, u) {
              var f = this,
                e = function (e) {
                  var o = n(e[0]);
                  i.destroy(t);
                  f.angular("cleanup", function () {
                    return { elements: [n(t)] };
                  });
                  n(t).replaceWith(o);
                  f.trigger(w, { item: o, data: u, ns: r });
                };
              return this._renderItems([u], e)[0];
            },
            updateSize: function () {
              this._size = this.getSize();
            },
            _renderItems: function (t, r) {
              var u = n(i.render(this.template, t));
              return (
                r(u),
                this.angular("compile", function () {
                  return {
                    elements: u,
                    data: t.map(function (n) {
                      return { dataItem: n };
                    }),
                  };
                }),
                a.init(u),
                this._enhanceItems(u),
                u
              );
            },
            _dim: function (n) {
              this._toggle(n, !1);
            },
            _highlight: function (n) {
              this._toggle(n, !0);
            },
            _toggle: function (t, i) {
              if (!(t.which > 1)) {
                var r = n(t.currentTarget),
                  f = r.parent(),
                  e = u(r, "role") || "",
                  o = !e.match(ri),
                  s = t.isDefaultPrevented();
                o && f.toggleClass(kt, i && !s);
              }
            },
            _templates: function () {
              var n = this.options.template,
                t = this.options.headerTemplate,
                u = {},
                r = {};
              typeof n === st &&
                ((u.template = n), (n = "#=this.template(data)#"));
              this.template = e(
                i.template(
                  '<li data-uid="#=arguments[0].uid || ""#">' + n + "</li>"
                ),
                u
              );
              r.template = this.template;
              typeof t === st &&
                ((r._headerTemplate = t),
                (t = "#=this._headerTemplate(data)#"));
              r.headerTemplate = i.template(t);
              this.groupTemplate = e(gt, r);
            },
            _click: function (t) {
              if (!(t.event.which > 1 || t.event.isDefaultPrevented())) {
                var u,
                  f = t.target,
                  e = n(t.event.target),
                  s = e.closest(
                    i.roleSelector("button", "detailbutton", "backbutton")
                  ),
                  h = i.widgetInstance(s, r),
                  o = f.attr(i.attr("uid"));
                o && (u = this.dataSource.getByUid(o));
                this.trigger(b, {
                  target: e,
                  item: f,
                  dataItem: u,
                  button: h,
                }) && t.preventDefault();
              }
            },
            _styleGroups: function () {
              var t = this.element.children();
              t.children("ul").addClass("km-list");
              t.each(function () {
                var i = n(this),
                  t = i.contents().first();
                i.addClass("km-group-container");
                t.is("ul") || t.is("div." + o) || t.wrap(dt);
              });
            },
            _style: function () {
              var r = this.options,
                n = "group" === r.type,
                i = this.element,
                t = "inset" === r.style;
              i.addClass("km-listview")
                .toggleClass("km-list", !n)
                .toggleClass("km-virtual-list", this.virtual)
                .toggleClass("km-listinset", !n && t)
                .toggleClass("km-listgroup", n && !t)
                .toggleClass("km-listgroupinset", n && t);
              i.parents(".km-listview")[0] ||
                i.closest(".km-content").toggleClass("km-insetcontent", t);
              n && this._styleGroups();
              this.trigger(ut);
            },
            _enhanceItems: function (t) {
              t.each(function () {
                var t,
                  r = n(this),
                  i = !1;
                r.children().each(function () {
                  t = n(this);
                  t.is("a")
                    ? (at(t), (i = !0))
                    : t.is("label") && (vt(t), (i = !0));
                });
                i || lt(r);
              });
            },
          });
          r.plugin(it);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.mobile.navbar.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function r(i, r) {
            var u = r.find("[" + t.attr("align") + "=" + i + "]");
            if (u[0])
              return n('<div class="km-' + i + 'item" />')
                .append(u)
                .prependTo(r);
          }
          function f(i) {
            var r = i.siblings(),
              u = !!i.children("ul")[0],
              f = !!r[0] && "" === n.trim(i.text()),
              e = !(
                !t.mobile.application ||
                !t.mobile.application.element.is(".km-android")
              );
            i.prevAll().toggleClass("km-absolute", u);
            i.toggleClass("km-show-title", f);
            i.toggleClass("km-fill-title", f && !n.trim(i.html()));
            i.toggleClass("km-no-title", u);
            i.toggleClass("km-hide-title", e && !r.children().is(":visible"));
          }
          var t = window.kendo,
            e = t.mobile,
            u = e.ui,
            i = u.Widget,
            o = i.extend({
              init: function (t, u) {
                var f = this;
                i.fn.init.call(f, t, u);
                t = f.element;
                f.container().bind("show", n.proxy(this, "refresh"));
                t.addClass("km-navbar").wrapInner(
                  n('<div class="km-view-title km-show-title" />')
                );
                f.leftElement = r("left", t);
                f.rightElement = r("right", t);
                f.centerElement = t.find(".km-view-title");
              },
              options: { name: "NavBar" },
              title: function (n) {
                this.element.find(t.roleSelector("view-title")).text(n);
                f(this.centerElement);
              },
              refresh: function (n) {
                var t = n.view;
                this.title(t.options.title);
              },
              destroy: function () {
                i.fn.destroy.call(this);
                t.destroy(this.element);
              },
            });
          u.plugin(o);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mobile.scrollview.min",
      ["kendo.fx.min", "kendo.data.min", "kendo.draganddrop.min"],
      n
    );
  })(
    function () {
      return (
        (function (n, t) {
          function u(n) {
            return "k-" + n + " km-" + n;
          }
          var p,
            w,
            b,
            k,
            d,
            o,
            g,
            rt,
            i = window.kendo,
            at = i.mobile,
            ut = at.ui,
            r = n.proxy,
            h = i.effects.Transition,
            vt = i.ui.Pane,
            yt = i.ui.PaneDimensions,
            nt = ut.DataBoundWidget,
            ft = i.data.DataSource,
            pt = i.data.Buffer,
            wt = i.data.BatchBuffer,
            s = Math,
            c = s.abs,
            l = s.ceil,
            et = s.round,
            bt = s.max,
            kt = s.min,
            ot = s.floor,
            f = "change",
            a = "changing",
            e = "refresh",
            tt = "current-page",
            st = "virtual-page",
            ht = "function",
            it = "itemChange",
            ct = "cleanup",
            dt = 3,
            gt = -1,
            ni = 0,
            ti = 1,
            v = -1,
            ii = 0,
            y = 1,
            lt = i.Class.extend({
              init: function (t) {
                var i = this,
                  o = n("<ol class='" + u("pages") + "'/>");
                t.element.append(o);
                this._changeProxy = r(i, "_change");
                this._refreshProxy = r(i, "_refresh");
                t.bind(f, this._changeProxy);
                t.bind(e, this._refreshProxy);
                n.extend(i, { element: o, scrollView: t });
              },
              items: function () {
                return this.element.children();
              },
              _refresh: function (n) {
                for (var i = "", t = 0; t < n.pageCount; t++) i += "<li/>";
                this.element.html(i);
                this.items().eq(n.page).addClass(u(tt));
              },
              _change: function (n) {
                this.items().removeClass(u(tt)).eq(n.page).addClass(u(tt));
              },
              destroy: function () {
                this.scrollView.unbind(f, this._changeProxy);
                this.scrollView.unbind(e, this._refreshProxy);
                this.element.remove();
              },
            });
          i.mobile.ui.ScrollViewPager = lt;
          p = "transitionEnd";
          w = "dragStart";
          b = "dragEnd";
          k = i.Observable.extend({
            init: function (t, r) {
              var o,
                l,
                e,
                s,
                a,
                v,
                u = this;
              i.Observable.fn.init.call(this);
              this.element = t;
              this.container = t.parent();
              o = new i.ui.Movable(u.element);
              l = new h({
                axis: "x",
                movable: o,
                onEnd: function () {
                  u.trigger(p);
                },
              });
              e = new i.UserEvents(t, {
                fastTap: !0,
                start: function (n) {
                  2 * c(n.x.velocity) >= c(n.y.velocity)
                    ? e.capture()
                    : e.cancel();
                  u.trigger(w, n);
                  l.cancel();
                },
                allowSelection: !0,
                end: function (n) {
                  u.trigger(b, n);
                },
              });
              s = new yt({ element: u.element, container: u.container });
              a = s.x;
              a.bind(f, function () {
                u.trigger(f);
              });
              v = new vt({
                dimensions: s,
                userEvents: e,
                movable: o,
                elastic: !0,
              });
              n.extend(u, {
                duration: (r && r.duration) || 1,
                movable: o,
                transition: l,
                userEvents: e,
                dimensions: s,
                dimension: a,
                pane: v,
              });
              this.bind([p, w, b, f], r);
            },
            size: function () {
              return {
                width: this.dimensions.x.getSize(),
                height: this.dimensions.y.getSize(),
              };
            },
            total: function () {
              return this.dimension.getTotal();
            },
            offset: function () {
              return -this.movable.x;
            },
            updateDimension: function () {
              this.dimension.update(!0);
            },
            refresh: function () {
              this.dimensions.refresh();
            },
            moveTo: function (n) {
              this.movable.moveAxis("x", -n);
            },
            transitionTo: function (n, t, i) {
              i
                ? this.moveTo(-n)
                : this.transition.moveTo({
                    location: n,
                    duration: this.duration,
                    ease: t,
                  });
            },
          });
          i.mobile.ui.ScrollViewElasticPane = k;
          d = i.Observable.extend({
            init: function (n, t, r) {
              var u = this;
              i.Observable.fn.init.call(this);
              u.element = n;
              u.pane = t;
              u._getPages();
              this.page = 0;
              this.pageSize = r.pageSize || 1;
              this.contentHeight = r.contentHeight;
              this.enablePager = r.enablePager;
              this.pagerOverlay = r.pagerOverlay;
            },
            scrollTo: function (n, t) {
              this.page = n;
              this.pane.transitionTo(
                -n * this.pane.size().width,
                h.easeOutExpo,
                t
              );
            },
            paneMoved: function (n, t, i, r) {
              var o,
                f,
                u = this,
                e = u.pane,
                c = e.size().width * u.pageSize,
                s = et,
                a = t ? h.easeOutBack : h.easeOutExpo;
              n === v ? (s = l) : n === y && (s = ot);
              f = s(e.offset() / c);
              o = bt(u.minSnap, kt(-f * c, u.maxSnap));
              f != u.page &&
                i &&
                i({ currentPage: u.page, nextPage: f }) &&
                (o = -u.page * e.size().width);
              e.transitionTo(o, a, r);
            },
            updatePage: function () {
              var n = this.pane,
                t = et(n.offset() / n.size().width);
              return t != this.page && ((this.page = t), !0);
            },
            forcePageUpdate: function () {
              return this.updatePage();
            },
            resizeTo: function (n) {
              var t,
                u,
                f = this.pane,
                r = n.width;
              this.pageElements.width(r);
              "100%" === this.contentHeight &&
                ((t = this.element.parent().height()),
                this.enablePager === !0 &&
                  ((u = this.element.parent().find("ol.km-pages")),
                  !this.pagerOverlay &&
                    u.length &&
                    (t -= i._outerHeight(u, !0))),
                this.element.css("height", t),
                this.pageElements.css("height", t));
              f.updateDimension();
              this._paged || (this.page = ot(f.offset() / r));
              this.scrollTo(this.page, !0);
              this.pageCount = l(f.total() / r);
              this.minSnap = -(this.pageCount - 1) * r;
              this.maxSnap = 0;
            },
            _getPages: function () {
              this.pageElements = this.element.find(i.roleSelector("page"));
              this._paged = this.pageElements.length > 0;
            },
          });
          i.mobile.ui.ScrollViewContent = d;
          o = i.Observable.extend({
            init: function (n, t, r) {
              var u = this;
              i.Observable.fn.init.call(this);
              u.element = n;
              u.pane = t;
              u.options = r;
              u._templates();
              u.page = r.page || 0;
              u.pages = [];
              u._initPages();
              u.resizeTo(u.pane.size());
              u.pane.dimension.forceEnabled();
            },
            setDataSource: function (n) {
              this.dataSource = ft.create(n);
              this._buffer();
              this._pendingPageRefresh = !1;
              this._pendingWidgetRefresh = !1;
            },
            _viewShow: function () {
              var n = this;
              n._pendingWidgetRefresh &&
                (setTimeout(function () {
                  n._resetPages();
                }, 0),
                (n._pendingWidgetRefresh = !1));
            },
            _buffer: function () {
              var n = this.options.itemsPerPage;
              this.buffer && this.buffer.destroy();
              this.buffer =
                n > 1
                  ? new wt(this.dataSource, n)
                  : new pt(this.dataSource, 3 * n);
              this._resizeProxy = r(this, "_onResize");
              this._resetProxy = r(this, "_onReset");
              this._endReachedProxy = r(this, "_onEndReached");
              this.buffer.bind({
                resize: this._resizeProxy,
                reset: this._resetProxy,
                endreached: this._endReachedProxy,
              });
            },
            _templates: function () {
              var n = this.options.template,
                t = this.options.emptyTemplate,
                u = {},
                f = {};
              typeof n === ht &&
                ((u.template = n), (n = "#=this.template(data)#"));
              this.template = r(i.template(n), u);
              typeof t === ht &&
                ((f.emptyTemplate = t), (t = "#=this.emptyTemplate(data)#"));
              this.emptyTemplate = r(i.template(t), f);
            },
            _initPages: function () {
              for (var t, i = this.pages, r = this.element, n = 0; n < dt; n++)
                (t = new g(r)), i.push(t);
              this.pane.updateDimension();
            },
            resizeTo: function (n) {
              for (
                var t, f, r = this.pages, e = this.pane, u = 0;
                u < r.length;
                u++
              )
                r[u].setWidth(n.width);
              "auto" === this.options.contentHeight
                ? this.element.css("height", this.pages[1].element.height())
                : "100%" === this.options.contentHeight &&
                  ((t = this.element.parent().height()),
                  this.options.enablePager === !0 &&
                    ((f = this.element.parent().find("ol.km-pages")),
                    !this.options.pagerOverlay &&
                      f.length &&
                      (t -= i._outerHeight(f, !0))),
                  this.element.css("height", t),
                  r[0].element.css("height", t),
                  r[1].element.css("height", t),
                  r[2].element.css("height", t));
              e.updateDimension();
              this._repositionPages();
              this.width = n.width;
            },
            scrollTo: function (n) {
              var t,
                i = this.buffer;
              i.syncDataSource();
              t = i.at(n);
              t && (this._updatePagesContent(n), (this.page = n));
            },
            paneMoved: function (n, t, r, u) {
              var o,
                f = this,
                h = f.pane,
                a = h.size().width,
                s = h.offset(),
                c = Math.abs(s) >= a / 3,
                p = t
                  ? i.effects.Transition.easeOutBack
                  : i.effects.Transition.easeOutExpo,
                l = f.page + 2 > f.buffer.total(),
                e = 0;
              n === y
                ? 0 !== f.page && (e = -1)
                : n !== v || l
                ? s > 0 && c && !l
                  ? (e = 1)
                  : s < 0 && c && 0 !== f.page && (e = -1)
                : (e = 1);
              o = f.page;
              e && (o = e > 0 ? o + 1 : o - 1);
              r && r({ currentPage: f.page, nextPage: o }) && (e = 0);
              0 === e
                ? f._cancelMove(p, u)
                : e === -1
                ? f._moveBackward(u)
                : 1 === e && f._moveForward(u);
            },
            updatePage: function () {
              var n = this.pages;
              return (
                0 !== this.pane.offset() &&
                (this.pane.offset() > 0
                  ? (n.push(this.pages.shift()),
                    this.page++,
                    this.setPageContent(n[2], this.page + 1))
                  : (n.unshift(this.pages.pop()),
                    this.page--,
                    this.setPageContent(n[0], this.page - 1)),
                this._repositionPages(),
                this._resetMovable(),
                !0)
              );
            },
            forcePageUpdate: function () {
              var n = this.pane.offset(),
                t = (3 * this.pane.size().width) / 4;
              return c(n) > t && this.updatePage();
            },
            _resetMovable: function () {
              this.pane.moveTo(0);
            },
            _moveForward: function (n) {
              this.pane.transitionTo(
                -this.width,
                i.effects.Transition.easeOutExpo,
                n
              );
            },
            _moveBackward: function (n) {
              this.pane.transitionTo(
                this.width,
                i.effects.Transition.easeOutExpo,
                n
              );
            },
            _cancelMove: function (n, t) {
              this.pane.transitionTo(0, n, t);
            },
            _resetPages: function () {
              this.page = this.options.page || 0;
              this._updatePagesContent(this.page);
              this._repositionPages();
              this.trigger("reset");
            },
            _onResize: function () {
              this.pageCount = l(
                this.dataSource.total() / this.options.itemsPerPage
              );
              this._pendingPageRefresh &&
                (this._updatePagesContent(this.page),
                (this._pendingPageRefresh = !1));
              this.trigger("resize");
            },
            _onReset: function () {
              this.pageCount = l(
                this.dataSource.total() / this.options.itemsPerPage
              );
              this._resetPages();
            },
            _onEndReached: function () {
              this._pendingPageRefresh = !0;
            },
            _repositionPages: function () {
              var n = this.pages;
              n[0].position(gt);
              n[1].position(ni);
              n[2].position(ti);
            },
            _updatePagesContent: function (n) {
              var t = this.pages,
                i = n || 0;
              this.setPageContent(t[0], i - 1);
              this.setPageContent(t[1], i);
              this.setPageContent(t[2], i + 1);
            },
            setPageContent: function (t, r) {
              var f = this.buffer,
                e = this.template,
                o = this.emptyTemplate,
                u = null;
              r >= 0 &&
                ((u = f.at(r)), n.isArray(u) && !u.length && (u = null));
              this.trigger(ct, { item: t.element });
              t.content(null !== u ? e(u) : o({}));
              i.mobile.init(t.element);
              this.trigger(it, { item: t.element, data: u, ns: i.mobile.ui });
            },
          });
          i.mobile.ui.VirtualScrollViewContent = o;
          g = i.Class.extend({
            init: function (t) {
              this.element = n("<div class='" + u(st) + "'></div>");
              this.width = t.width();
              this.element.width(this.width);
              t.append(this.element);
            },
            content: function (n) {
              this.element.html(n);
            },
            position: function (n) {
              this.element.css(
                "transform",
                "translate3d(" + this.width * n + "px, 0, 0)"
              );
            },
            setWidth: function (n) {
              this.width = n;
              this.element.width(n);
            },
          });
          i.mobile.ui.VirtualPage = g;
          rt = nt.extend({
            init: function (n, t) {
              var c,
                s,
                h,
                f = this;
              nt.fn.init.call(f, n, t);
              t = f.options;
              n = f.element;
              i.stripWhitespace(n[0]);
              n.wrapInner("<div/>").addClass("k-widget " + u("scrollview"));
              this.options.enablePager &&
                ((this.pager = new lt(this)),
                this.options.pagerOverlay &&
                  n.addClass(u("scrollview-overlay")));
              f.inner = n.children().first();
              f.page = 0;
              f.inner.css("height", t.contentHeight);
              f.pane = new k(f.inner, {
                duration: this.options.duration,
                transitionEnd: r(this, "_transitionEnd"),
                dragStart: r(this, "_dragStart"),
                dragEnd: r(this, "_dragEnd"),
                change: r(this, e),
              });
              f.bind("resize", function () {
                f.pane.refresh();
              });
              f.page = t.page;
              c = 0 === this.inner.children().length;
              s = c ? new o(f.inner, f.pane, t) : new d(f.inner, f.pane, t);
              s.page = f.page;
              s.bind("reset", function () {
                this._pendingPageRefresh = !1;
                f._syncWithContent();
                f.trigger(e, { pageCount: s.pageCount, page: s.page });
              });
              s.bind("resize", function () {
                f.trigger(e, { pageCount: s.pageCount, page: s.page });
              });
              s.bind(it, function (n) {
                f.trigger(it, n);
                f.angular("compile", function () {
                  return { elements: n.item, data: [{ dataItem: n.data }] };
                });
              });
              s.bind(ct, function (n) {
                f.angular("cleanup", function () {
                  return { elements: n.item };
                });
              });
              f._content = s;
              f.setDataSource(t.dataSource);
              h = f.container();
              h.nullObject
                ? (f.viewInit(), f.viewShow())
                : h
                    .bind("show", r(this, "viewShow"))
                    .bind("init", r(this, "viewInit"));
            },
            options: {
              name: "ScrollView",
              page: 0,
              duration: 400,
              velocityThreshold: 0.8,
              contentHeight: "auto",
              pageSize: 1,
              itemsPerPage: 1,
              bounceVelocityThreshold: 1.6,
              enablePager: !0,
              pagerOverlay: !1,
              autoBind: !0,
              template: "",
              emptyTemplate: "",
            },
            events: [a, f, e],
            destroy: function () {
              nt.fn.destroy.call(this);
              i.destroy(this.element);
            },
            viewInit: function () {
              this.options.autoBind &&
                this._content.scrollTo(this._content.page, !0);
            },
            viewShow: function () {
              this.pane.refresh();
            },
            refresh: function () {
              var n = this._content;
              n.resizeTo(this.pane.size());
              this.page = n.page;
              this.trigger(e, { pageCount: n.pageCount, page: n.page });
            },
            content: function (n) {
              this.element.children().first().html(n);
              this._content._getPages();
              this.pane.refresh();
            },
            value: function (n) {
              var i = this.dataSource;
              return n ? (this.scrollTo(i.indexOf(n), !0), t) : i.at(this.page);
            },
            scrollTo: function (n, t) {
              this._content.scrollTo(n, t);
              this._syncWithContent();
            },
            prev: function () {
              var n = this,
                i = n.page - 1;
              n._content instanceof o
                ? n._content.paneMoved(y, t, function (t) {
                    return n.trigger(a, t);
                  })
                : i > -1 && n.scrollTo(i);
            },
            next: function () {
              var n = this,
                i = n.page + 1;
              n._content instanceof o
                ? n._content.paneMoved(v, t, function (t) {
                    return n.trigger(a, t);
                  })
                : i < n._content.pageCount && n.scrollTo(i);
            },
            setDataSource: function (n) {
              if (this._content instanceof o) {
                var t = !n;
                this.dataSource = ft.create(n);
                this._content.setDataSource(this.dataSource);
                this.options.autoBind && !t && this.dataSource.fetch();
              }
            },
            items: function () {
              return this.element.find(".km-" + st);
            },
            _syncWithContent: function () {
              var n,
                i,
                r = this._content.pages,
                u = this._content.buffer;
              this.page = this._content.page;
              n = u ? u.at(this.page) : t;
              n instanceof Array || (n = [n]);
              i = r ? r[1].element : t;
              this.trigger(f, { page: this.page, element: i, data: n });
            },
            _dragStart: function () {
              this._content.forcePageUpdate() && this._syncWithContent();
            },
            _dragEnd: function (n) {
              var u = this,
                t = n.x.velocity,
                r = this.options.velocityThreshold,
                i = ii,
                f = c(t) > this.options.bounceVelocityThreshold;
              t > r ? (i = y) : t < -r && (i = v);
              this._content.paneMoved(i, f, function (n) {
                return u.trigger(a, n);
              });
            },
            _transitionEnd: function () {
              this._content.updatePage() && this._syncWithContent();
            },
          });
          ut.plugin(rt);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.mobile.switch.min", ["kendo.fx.min", "kendo.userevents.min"], n);
  })(
    function () {
      return (
        (function (n, t) {
          function i(n) {
            return "km-" + n;
          }
          function p(n, t, i) {
            return Math.max(t, Math.min(i, n));
          }
          var r = window.kendo,
            s = r.mobile.ui,
            h = r._outerWidth,
            f = s.Widget,
            c = r.support,
            l = "change",
            a = "switch-on",
            v = "switch-off",
            e = "margin-left",
            y = "state-active",
            w = "state-disabled",
            u = "disabled",
            b = c.transitions.css === t ? "" : c.transitions.css,
            k = b + "transform",
            o = n.proxy,
            d =
              '<span class="' +
              i("switch") +
              " " +
              i("widget") +
              '">        <span class="' +
              i("switch-wrapper") +
              '">            <span class="' +
              i("switch-background") +
              '"></span>        </span>         <span class="' +
              i("switch-container") +
              '">            <span class="' +
              i("switch-handle") +
              '">                 <span class="' +
              i("switch-label-on") +
              '">{0}</span>                 <span class="' +
              i("switch-label-off") +
              '">{1}</span>             </span>         </span>    </span>',
            g = f.extend({
              init: function (t, i) {
                var s,
                  o = this;
                f.fn.init.call(o, t, i);
                i = o.options;
                o.wrapper = n(r.format(d, i.onLabel, i.offLabel));
                o.handle = o.wrapper.find(".km-switch-handle");
                o.background = o.wrapper.find(".km-switch-background");
                o.wrapper.insertBefore(o.element).prepend(o.element);
                o._drag();
                o.origin = parseInt(o.background.css(e), 10);
                o.constrain = 0;
                o.snapPoint = 0;
                t = o.element[0];
                t.type = "checkbox";
                o._animateBackground = !0;
                s = o.options.checked;
                null === s && (s = t.checked);
                o.check(s);
                o.options.enable = o.options.enable && !o.element.attr(u);
                o.enable(o.options.enable);
                o.refresh();
                r.notify(o, r.mobile.ui);
              },
              refresh: function () {
                var n = this,
                  t = h(n.handle, !0);
                n.width = n.wrapper.width();
                n.constrain = n.width - t;
                n.snapPoint = n.constrain / 2;
                "number" != typeof n.origin &&
                  (n.origin = parseInt(n.background.css(e), 10));
                n.background.data("origin", n.origin);
                n.check(n.element[0].checked);
              },
              events: [l],
              options: {
                name: "Switch",
                onLabel: "on",
                offLabel: "off",
                checked: null,
                enable: !0,
              },
              check: function (n) {
                var r = this,
                  u = r.element[0];
                return n === t
                  ? u.checked
                  : (r._position(n ? r.constrain : 0),
                    (u.checked = n),
                    r.wrapper.toggleClass(i(a), n).toggleClass(i(v), !n),
                    t);
              },
              value: function () {
                return this.check.apply(this, arguments);
              },
              destroy: function () {
                f.fn.destroy.call(this);
                this.userEvents.destroy();
              },
              toggle: function () {
                var n = this;
                n.check(!n.element[0].checked);
              },
              enable: function (n) {
                var r = this.element,
                  f = this.wrapper;
                t === n && (n = !0);
                this.options.enable = n;
                n ? r.removeAttr(u) : r.attr(u, u);
                f.toggleClass(i(w), !n);
              },
              _resize: function () {
                this.refresh();
              },
              _move: function (n) {
                var t = this;
                n.preventDefault();
                t._position(
                  p(t.position + n.x.delta, 0, t.width - h(t.handle, !0))
                );
              },
              _position: function (n) {
                var t = this;
                t.position = n;
                t.handle.css(k, "translatex(" + n + "px)");
                t._animateBackground && t.background.css(e, t.origin + n);
              },
              _start: function () {
                this.options.enable
                  ? (this.userEvents.capture(), this.handle.addClass(i(y)))
                  : this.userEvents.cancel();
              },
              _stop: function () {
                var n = this;
                n.handle.removeClass(i(y));
                n._toggle(n.position > n.snapPoint);
              },
              _toggle: function (n) {
                var u,
                  t = this,
                  o = t.handle,
                  f = t.element[0],
                  s = f.checked,
                  e =
                    r.mobile.application && r.mobile.application.os.wp
                      ? 100
                      : 200;
                t.wrapper.toggleClass(i(a), n).toggleClass(i(v), !n);
                t.position = u = n * t.constrain;
                t._animateBackground &&
                  t.background
                    .kendoStop(!0, !0)
                    .kendoAnimate({
                      effects: "slideMargin",
                      offset: u,
                      reset: !0,
                      reverse: !n,
                      axis: "left",
                      duration: e,
                    });
                o.kendoStop(!0, !0).kendoAnimate({
                  effects: "slideTo",
                  duration: e,
                  offset: u + "px,0",
                  reset: !0,
                  complete: function () {
                    s !== n && ((f.checked = n), t.trigger(l, { checked: n }));
                  },
                });
              },
              _drag: function () {
                var n = this;
                n.userEvents = new r.UserEvents(n.wrapper, {
                  fastTap: !0,
                  tap: function () {
                    n.options.enable && n._toggle(!n.element[0].checked);
                  },
                  start: o(n._start, n),
                  move: o(n._move, n),
                  end: o(n._stop, n),
                });
              },
            });
          s.plugin(g);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t("kendo.mobile.tabstrip.min", ["kendo.core.min"], n);
  })(
    function () {
      return (
        (function (n) {
          function r(t) {
            return n('<span class="km-badge">' + t + "</span>");
          }
          var t = window.kendo,
            u = t.mobile.ui,
            f = u.Widget,
            i = "km-state-active",
            e = "select",
            o = f.extend({
              init: function (t, r) {
                var u = this;
                f.fn.init.call(u, t, r);
                u.container().bind("show", n.proxy(this, "refresh"));
                u.element
                  .addClass("km-tabstrip")
                  .find("a")
                  .each(u._buildButton)
                  .eq(u.options.selectedIndex)
                  .addClass(i);
                u.element.on("down", "a", "_release");
              },
              events: [e],
              switchTo: function (t) {
                var i,
                  r,
                  u = this.element.find("a"),
                  f = 0,
                  e = u.length;
                if (!isNaN(t)) return this._setActiveItem(u.eq(t)), !0;
                for (; f < e; f++)
                  if (
                    ((i = u[f]),
                    (r = i.href.replace(/(\#.+)(\?.+)$/, "$1")),
                    r.indexOf(t, r.length - t.length) !== -1)
                  )
                    return this._setActiveItem(n(i)), !0;
                return !1;
              },
              switchByFullUrl: function (n) {
                var t;
                t = this.element.find("a[href$='" + n + "']");
                this._setActiveItem(t);
              },
              clear: function () {
                this.currentItem().removeClass(i);
              },
              currentItem: function () {
                return this.element.children("." + i);
              },
              badge: function (t, i) {
                var u,
                  f = this.element;
                return (
                  isNaN(t) || (t = f.children().get(t)),
                  (t = f.find(t)),
                  (u = n(
                    t.find(".km-badge")[0] ||
                      r(i).insertAfter(t.children(".km-icon"))
                  )),
                  i || 0 === i
                    ? (u.html(i), this)
                    : i === !1
                    ? (u.empty().remove(), this)
                    : u.html()
                );
              },
              _release: function (t) {
                if (!(t.which > 1)) {
                  var i = this,
                    r = n(t.currentTarget);
                  r[0] !== i.currentItem()[0] &&
                    (i.trigger(e, { item: r })
                      ? t.preventDefault()
                      : i._setActiveItem(r));
                }
              },
              _setActiveItem: function (n) {
                n[0] && (this.clear(), n.addClass(i));
              },
              _buildButton: function () {
                var i = n(this),
                  o = t.attrValue(i, "icon"),
                  u = t.attrValue(i, "badge"),
                  f = i.find("img"),
                  e = n('<span class="km-icon"/>');
                i.addClass("km-button")
                  .attr(t.attr("role"), "tab")
                  .contents()
                  .not(f)
                  .wrapAll('<span class="km-text"/>');
                f[0]
                  ? f.addClass("km-image").prependTo(i)
                  : (i.prepend(e),
                    o &&
                      (e.addClass("km-" + o),
                      (u || 0 === u) && r(u).insertAfter(e)));
              },
              refresh: function (n) {
                var t = n.view.id;
                t && !this.switchTo(n.view.id) && this.switchTo(t);
              },
              options: { name: "TabStrip", selectedIndex: 0, enable: !0 },
            });
          u.plugin(o);
        })(window.kendo.jQuery),
        window.kendo
      );
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.mobile.min",
      [
        "kendo.core.min",
        "kendo.fx.min",
        "kendo.data.odata.min",
        "kendo.data.xml.min",
        "kendo.data.min",
        "kendo.data.signalr.min",
        "kendo.binder.min",
        "kendo.validator.min",
        "kendo.router.min",
        "kendo.view.min",
        "kendo.userevents.min",
        "kendo.draganddrop.min",
        "kendo.popup.min",
        "kendo.touch.min",
        "kendo.mobile.popover.min",
        "kendo.mobile.loader.min",
        "kendo.mobile.scroller.min",
        "kendo.mobile.shim.min",
        "kendo.mobile.view.min",
        "kendo.mobile.modalview.min",
        "kendo.mobile.drawer.min",
        "kendo.mobile.splitview.min",
        "kendo.mobile.pane.min",
        "kendo.mobile.application.min",
        "kendo.mobile.actionsheet.min",
        "kendo.mobile.button.min",
        "kendo.mobile.buttongroup.min",
        "kendo.mobile.collapsible.min",
        "kendo.mobile.listview.min",
        "kendo.mobile.navbar.min",
        "kendo.mobile.scrollview.min",
        "kendo.mobile.switch.min",
        "kendo.mobile.tabstrip.min",
        "kendo.angular.min",
      ],
      n
    );
  })(
    function () {
      "bundle all";
      return window.kendo;
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.all.min",
      [
        "kendo.web.min",
        "kendo.dataviz.min",
        "kendo.mobile.min",
        "kendo.drawing.min",
        "kendo.dom.min",
      ],
      n
    );
  })(
    function () {
      "bundle all";
      return window.kendo;
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  );
!(function (n, t) {
  t(
    "aspnetmvc/kendo.data.aspnetmvc.min",
    [
      "kendo.data.min",
      "kendo.combobox.min",
      "kendo.multiselect.min",
      "kendo.validator.min",
    ],
    n
  );
})(
  function () {
    !(function (n, t) {
      function u(t, i, r) {
        var f,
          u = {};
        return (
          t.sort
            ? ((u[this.options.prefix + "sort"] = n
                .map(t.sort, function (n) {
                  return n.field + "-" + n.dir;
                })
                .join("~")),
              delete t.sort)
            : (u[this.options.prefix + "sort"] = ""),
          t.page && ((u[this.options.prefix + "page"] = t.page), delete t.page),
          t.pageSize &&
            ((u[this.options.prefix + "pageSize"] = t.pageSize),
            delete t.pageSize),
          t.group
            ? ((u[this.options.prefix + "group"] = n
                .map(t.group, function (n) {
                  return n.field + "-" + n.dir;
                })
                .join("~")),
              delete t.group)
            : (u[this.options.prefix + "group"] = ""),
          t.aggregate &&
            ((u[this.options.prefix + "aggregate"] = n
              .map(t.aggregate, function (n) {
                return n.field + "-" + n.aggregate;
              })
              .join("~")),
            delete t.aggregate),
          t.filter
            ? ((u[this.options.prefix + "filter"] = o(t.filter, r.encode)),
              delete t.filter)
            : ((u[this.options.prefix + "filter"] = ""), delete t.filter),
          delete t.take,
          delete t.skip,
          (f = new e(r)),
          f.serialize(u, t, ""),
          u
        );
      }
      function o(i, r) {
        return i.filters
          ? n
              .map(i.filters, function (n) {
                var i = n.filters && n.filters.length > 1,
                  t = o(n, r);
                return t && i && (t = "(" + t + ")"), t;
              })
              .join("~" + i.logic + "~")
          : i.field
          ? i.field + "~" + i.operator + "~" + a(i.value, r)
          : t;
      }
      function a(n, t) {
        if ("string" == typeof n) {
          if (!(n.indexOf("Date(") > -1))
            return (
              (n = n.replace(p, "''")),
              t && (n = encodeURIComponent(n)),
              "'" + n + "'"
            );
          n = new Date(parseInt(n.replace(/^\/Date\((.*?)\)\/$/, "$1"), 10));
        }
        return n && n.getTime
          ? "datetime'" + i.format("{0:yyyy-MM-ddTHH-mm-ss}", n) + "'"
          : n;
      }
      function s(n, i) {
        return t !== n ? n : i;
      }
      function h(t) {
        var i = t.HasSubgroups || t.hasSubgroups || !1,
          r = t.Items || t.items;
        return {
          value: s(t.Key, s(t.key, t.value)),
          field: t.Member || t.member || t.field,
          hasSubgroups: i,
          aggregates: y(t.Aggregates || t.aggregates),
          items: i ? n.map(r, h) : r,
        };
      }
      function v(n) {
        var t = {};
        return (t[n.AggregateMethodName.toLowerCase()] = n.Value), t;
      }
      function y(n) {
        var t,
          i,
          r,
          u = {};
        for (t in n) {
          u = {};
          r = n[t];
          for (i in r) u[i.toLowerCase()] = r[i];
          n[t] = u;
        }
        return n;
      }
      function c(n) {
        for (var i, u = {}, t = 0, f = n.length; t < f; t++)
          (i = n[t]), (u[i.Member] = r(!0, u[i.Member], v(i)));
        return u;
      }
      var i = window.kendo,
        p = /'/gi,
        r = n.extend,
        w = n.isArray,
        f = n.isPlainObject,
        l = ".",
        e = function (n) {
          n = n || {};
          this.culture = n.culture || i.culture();
          this.stringifyDates = n.stringifyDates;
          this.decimalSeparator = this.culture.numberFormat[l];
        };
      e.prototype = e.fn = {
        serialize: function (n, t, i) {
          var u;
          for (var r in t)
            (u = i ? i + "." + r : r), this.serializeField(n, t[r], t, r, u);
        },
        serializeField: function (n, i, r, u, e) {
          w(i)
            ? this.serializeArray(n, i, e)
            : f(i)
            ? this.serialize(n, i, e)
            : n[e] === t && (n[e] = r[u] = this.serializeValue(i));
        },
        serializeArray: function (n, t, i) {
          for (var e, u, o, r = 0, f = 0; r < t.length; r++)
            (e = t[r]),
              (u = "[" + f + "]"),
              (o = i + u),
              this.serializeField(n, e, t, u, o),
              f++;
        },
        serializeValue: function (n) {
          return (
            n instanceof Date
              ? (n = this.stringifyDates
                  ? i.stringify(n).replace(/"/g, "")
                  : i.toString(n, "G", this.culture.name))
              : "number" == typeof n &&
                (n = ("" + n).replace(l, this.decimalSeparator)),
            n
          );
        },
      };
      r(!0, i.data, {
        schemas: {
          "aspnetmvc-ajax": {
            groups: function (t) {
              return n.map(this._dataAccessFunction(t), h);
            },
            aggregates: function (t) {
              var i, r;
              if (
                ((t = t.d || t), (i = t.AggregateResults || []), !n.isArray(i))
              ) {
                for (r in i) i[r] = c(i[r]);
                return i;
              }
              return c(i);
            },
          },
        },
      });
      r(!0, i.data, {
        transports: {
          "aspnetmvc-ajax": i.data.RemoteTransport.extend({
            init: function (n) {
              var t = this,
                f = (n || {}).stringifyDates;
              i.data.RemoteTransport.fn.init.call(
                this,
                r(!0, {}, this.options, n, {
                  parameterMap: function (n, i) {
                    return u.call(t, n, i, { encode: !1, stringifyDates: f });
                  },
                })
              );
            },
            read: function (n) {
              var t = this.options.data,
                r = this.options.read.url;
              f(t)
                ? (r && (this.options.data = null),
                  !t.Data.length && r
                    ? i.data.RemoteTransport.fn.read.call(this, n)
                    : n.success(t))
                : i.data.RemoteTransport.fn.read.call(this, n);
            },
            options: {
              read: { type: "POST" },
              update: { type: "POST" },
              create: { type: "POST" },
              destroy: { type: "POST" },
              parameterMap: u,
              prefix: "",
            },
          }),
        },
      });
      r(!0, i.data, { schemas: { webapi: i.data.schemas["aspnetmvc-ajax"] } });
      r(!0, i.data, {
        transports: {
          webapi: i.data.RemoteTransport.extend({
            init: function (n) {
              var t,
                f,
                e = this,
                o = (n || {}).stringifyDates,
                s = i.cultures[n.culture] || i.cultures["en-US"];
              n.update &&
                ((t = "string" == typeof n.update ? n.update : n.update.url),
                (n.update = r(n.update, {
                  url: function (r) {
                    return i.format(t, r[n.idField]);
                  },
                })));
              n.destroy &&
                ((f = "string" == typeof n.destroy ? n.destroy : n.destroy.url),
                (n.destroy = r(n.destroy, {
                  url: function (t) {
                    return i.format(f, t[n.idField]);
                  },
                })));
              n.create &&
                "string" == typeof n.create &&
                (n.create = { url: n.create });
              i.data.RemoteTransport.fn.init.call(
                this,
                r(!0, {}, this.options, n, {
                  parameterMap: function (n, t) {
                    return u.call(e, n, t, {
                      encode: !1,
                      stringifyDates: o,
                      culture: s,
                    });
                  },
                })
              );
            },
            read: function (n) {
              var t = this.options.data,
                r = this.options.read.url;
              f(t)
                ? (r && (this.options.data = null),
                  !t.Data.length && r
                    ? i.data.RemoteTransport.fn.read.call(this, n)
                    : n.success(t))
                : i.data.RemoteTransport.fn.read.call(this, n);
            },
            options: {
              read: { type: "GET" },
              update: { type: "PUT" },
              create: { type: "POST" },
              destroy: { type: "DELETE" },
              parameterMap: u,
              prefix: "",
            },
          }),
        },
      });
      r(!0, i.data, {
        transports: {
          "aspnetmvc-server": i.data.RemoteTransport.extend({
            init: function (n) {
              var t = this;
              i.data.RemoteTransport.fn.init.call(
                this,
                r(n, {
                  parameterMap: function (n, i) {
                    return u.call(t, n, i, { encode: !0 });
                  },
                })
              );
            },
            read: function (t) {
              var r,
                i,
                u = this.options.prefix,
                f = [
                  u + "sort",
                  u + "page",
                  u + "pageSize",
                  u + "group",
                  u + "aggregate",
                  u + "filter",
                ],
                e = RegExp("(" + f.join("|") + ")=[^&]*&?", "g");
              i = location.search.replace(e, "").replace("?", "");
              i.length && !/&$/.test(i) && (i += "&");
              t = this.setup(t, "read");
              r = t.url;
              r.indexOf("?") >= 0
                ? ((i = i.replace(/(.*?=.*?)&/g, function (n) {
                    return r.indexOf(n.substr(0, n.indexOf("="))) >= 0 ? "" : n;
                  })),
                  (r += "&" + i))
                : (r += "?" + i);
              r += n
                .map(t.data, function (n, t) {
                  return t + "=" + n;
                })
                .join("&");
              location.href = r;
            },
          }),
        },
      });
    })(window.kendo.jQuery);
  },
  "function" == typeof define && define.amd
    ? define
    : function (n, t, i) {
        (i || t)();
      }
),
  (function (n, t) {
    t(
      "aspnetmvc/kendo.combobox.aspnetmvc.min",
      ["aspnetmvc/kendo.data.aspnetmvc.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var i = window.kendo,
          t = i.ui;
        t &&
          t.ComboBox &&
          (t.ComboBox.requestData = function (t) {
            var i,
              r,
              u = n(t).data("kendoComboBox");
            if (u)
              return (
                (i = u.dataSource.filter()),
                (r = u.input.val()),
                (i && i.filters.length) || (r = ""),
                { text: r }
              );
          });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "aspnetmvc/kendo.multicolumncombobox.aspnetmvc.min",
      ["aspnetmvc/kendo.data.aspnetmvc.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var i = window.kendo,
          t = i.ui;
        t &&
          t.MultiColumnComboBox &&
          (t.MultiColumnComboBox.requestData = function (t) {
            var i,
              r,
              u = n(t).data("kendoMultiColumnComboBox");
            if (u)
              return (
                (i = u.dataSource.filter()),
                (r = u.input.val()),
                (i && i.filters.length) || (r = ""),
                { text: r }
              );
          });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "aspnetmvc/kendo.dropdownlist.aspnetmvc.min",
      ["aspnetmvc/kendo.data.aspnetmvc.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var i = window.kendo,
          t = i.ui;
        t &&
          t.DropDownList &&
          (t.DropDownList.requestData = function (t) {
            var i,
              r,
              u,
              f = n(t).data("kendoDropDownList");
            if (f)
              return (
                (i = f.dataSource.filter()),
                (r = f.filterInput),
                (u = r ? r.val() : ""),
                (i && i.filters.length) || (u = ""),
                { text: u }
              );
          });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "aspnetmvc/kendo.dropdowntree.aspnetmvc.min",
      ["aspnetmvc/kendo.data.aspnetmvc.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var i = window.kendo,
          t = i.ui;
        t &&
          t.DropDownTree &&
          (t.DropDownTree.requestData = function (t) {
            var i,
              r,
              u,
              f = n(t).data("kendoDropDownTree");
            if (f)
              return (
                (i = f.dataSource.filter()),
                (r = f.filterInput),
                (u = r ? r.val() : ""),
                (i && i.filters.length) || (u = ""),
                { text: u }
              );
          });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "aspnetmvc/kendo.multiselect.aspnetmvc.min",
      ["aspnetmvc/kendo.combobox.aspnetmvc.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var i = window.kendo,
          t = i.ui;
        t &&
          t.MultiSelect &&
          (t.MultiSelect.requestData = function (t) {
            var i,
              r = n(t).data("kendoMultiSelect");
            if (r)
              return (
                (i = r.input.val()),
                { text: i !== r.options.placeholder ? i : "" }
              );
          });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "aspnetmvc/kendo.imagebrowser.aspnetmvc.min",
      ["aspnetmvc/kendo.multiselect.aspnetmvc.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        var t = window.kendo,
          i = n.extend,
          r = n.isFunction;
        i(!0, t.data, {
          schemas: {
            "imagebrowser-aspnetmvc": {
              data: function (n) {
                return n || [];
              },
              model: {
                id: "name",
                fields: {
                  name: { field: "Name" },
                  size: { field: "Size" },
                  type: {
                    field: "EntryType",
                    parse: function (n) {
                      return 0 == n ? "f" : "d";
                    },
                  },
                },
              },
            },
          },
        });
        i(!0, t.data, {
          schemas: {
            "filebrowser-aspnetmvc": t.data.schemas["imagebrowser-aspnetmvc"],
          },
        });
        i(!0, t.data, {
          transports: {
            "imagebrowser-aspnetmvc": t.data.RemoteTransport.extend({
              init: function (i) {
                t.data.RemoteTransport.fn.init.call(
                  this,
                  n.extend(!0, {}, this.options, i)
                );
              },
              _call: function (i, u) {
                u.data = n.extend({}, u.data, { path: this.options.path() });
                r(this.options[i])
                  ? this.options[i].call(this, u)
                  : t.data.RemoteTransport.fn[i].call(this, u);
              },
              read: function (n) {
                this._call("read", n);
              },
              create: function (n) {
                this._call("create", n);
              },
              destroy: function (n) {
                this._call("destroy", n);
              },
              update: function () {},
              options: {
                read: { type: "POST" },
                update: { type: "POST" },
                create: { type: "POST" },
                destroy: { type: "POST" },
                parameterMap: function (n, t) {
                  return (
                    "read" != t && (n.EntryType = "f" === n.EntryType ? 0 : 1),
                    n
                  );
                },
              },
            }),
          },
        });
        i(!0, t.data, {
          transports: {
            "filebrowser-aspnetmvc":
              t.data.transports["imagebrowser-aspnetmvc"],
          },
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "aspnetmvc/kendo.validator.aspnetmvc.min",
      ["aspnetmvc/kendo.imagebrowser.aspnetmvc.min"],
      n
    );
  })(
    function () {
      !(function (n) {
        function u() {
          var n,
            i = {};
          for (n in t) i["mvc" + n] = h(n);
          return i;
        }
        function f() {
          var n,
            i = {};
          for (n in t) i["mvc" + n] = c(n);
          return i;
        }
        function e(n, t) {
          var u,
            i,
            r,
            f = {},
            e = n.data(),
            o = t.length;
          for (r in e)
            (i = r.toLowerCase()),
              (u = i.indexOf(t)),
              u > -1 &&
                ((i = i.substring(u + o, r.length)), i && (f[i] = e[r]));
          return f;
        }
        function o(t) {
          for (var u = t.Fields || [], f = {}, i = 0, r = u.length; i < r; i++)
            n.extend(!0, f, s(u[i]));
          return f;
        }
        function s(n) {
          for (
            var i,
              f,
              o = {},
              s = {},
              u = n.FieldName,
              r = n.ValidationRules,
              t = 0,
              e = r.length;
            t < e;
            t++
          )
            (i = r[t].ValidationType),
              (f = r[t].ValidationParameters),
              (o[u + i] = a(u, i, f)),
              (s[u + i] = l(r[t].ErrorMessage));
          return { rules: o, messages: s };
        }
        function h(n) {
          return function (t) {
            return t.attr("data-val-" + n);
          };
        }
        function c(n) {
          return function (i) {
            return !i.filter("[data-val-" + n + "]").length || t[n](i, e(i, n));
          };
        }
        function l(n) {
          return function () {
            return n;
          };
        }
        function a(n, i, r) {
          return function (u) {
            return !u.filter("[name=" + n + "]").length || t[i](u, r);
          };
        }
        function v(n, t) {
          return (
            "string" == typeof t && (t = RegExp("^(?:" + t + ")$")), t.test(n)
          );
        }
        var i =
            /("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,
          r = ".k-switch",
          t = {
            required: function (n) {
              var o,
                e,
                u,
                f = n.val(),
                t = n.filter("[type=checkbox]");
              return (
                t.length &&
                  ((o = t[0].name.replace(i, "\\$1")),
                  (e = "input:hidden[name='" + o + "']"),
                  t.closest(r).length && (t = t.closest(r)),
                  (u = t.next(e)),
                  u.length || (u = t.next("label.k-checkbox-label").next(e)),
                  (f = u.length ? u.val() : n.prop("checked") === !0)),
                !("" === f || !f || 0 === f.length)
              );
            },
            number: function (n) {
              return (
                "" === n.val() ||
                null == n.val() ||
                null !== kendo.parseFloat(n.val())
              );
            },
            regex: function (n, t) {
              return "" === n.val() || v(n.val(), t.pattern);
            },
            range: function (n, t) {
              return "" === n.val() || (this.min(n, t) && this.max(n, t));
            },
            min: function (n, t) {
              var i = parseFloat(t.min) || 0,
                r = kendo.parseFloat(n.val());
              return i <= r;
            },
            max: function (n, t) {
              var i = parseFloat(t.max) || 0,
                r = kendo.parseFloat(n.val());
              return r <= i;
            },
            date: function (n) {
              return "" === n.val() || null !== kendo.parseDate(n.val());
            },
            length: function (t, i) {
              if ("" !== t.val()) {
                var r = n.trim(t.val()).length;
                return (
                  (!i.min || r >= (i.min || 0)) && (!i.max || r <= (i.max || 0))
                );
              }
              return !0;
            },
          };
        n.extend(!0, kendo.ui.validator, {
          rules: f(),
          messages: u(),
          messageLocators: {
            mvcLocator: {
              locate: function (n, t) {
                return (
                  (t = t.replace(i, "\\$1")),
                  n.find(
                    ".field-validation-valid[data-valmsg-for='" +
                      t +
                      "'], .field-validation-error[data-valmsg-for='" +
                      t +
                      "']"
                  )
                );
              },
              decorate: function (n, t) {
                n.addClass("field-validation-error").attr(
                  "data-valmsg-for",
                  t || ""
                );
              },
            },
            mvcMetadataLocator: {
              locate: function (n, t) {
                return (
                  (t = t.replace(i, "\\$1")),
                  n.find("#" + t + "_validationMessage.field-validation-valid")
                );
              },
              decorate: function (n, t) {
                n.addClass("field-validation-error").attr(
                  "id",
                  t + "_validationMessage"
                );
              },
            },
          },
          ruleResolvers: {
            mvcMetaDataResolver: {
              resolve: function (t) {
                var i,
                  r = window.mvcClientValidationMetadata || [];
                if (r.length)
                  for (t = n(t), i = 0; i < r.length; i++)
                    if (r[i].FormId == t.attr("id")) return o(r[i]);
                return {};
              },
            },
          },
        });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  ),
  (function (n, t) {
    t(
      "kendo.aspnetmvc.min",
      [
        "kendo.data.min",
        "kendo.combobox.min",
        "kendo.dropdownlist.min",
        "kendo.dropdowntree.min",
        "kendo.multiselect.min",
        "kendo.validator.min",
        "aspnetmvc/kendo.data.aspnetmvc.min",
        "aspnetmvc/kendo.combobox.aspnetmvc.min",
        "aspnetmvc/kendo.multicolumncombobox.aspnetmvc.min",
        "aspnetmvc/kendo.dropdownlist.aspnetmvc.min",
        "aspnetmvc/kendo.dropdowntree.aspnetmvc.min",
        "aspnetmvc/kendo.multiselect.aspnetmvc.min",
        "aspnetmvc/kendo.imagebrowser.aspnetmvc.min",
        "aspnetmvc/kendo.validator.aspnetmvc.min",
      ],
      n
    );
  })(
    function () {
      !(function (n) {
        function t(t) {
          kendo.__documentIsReady ? t() : n(t);
        }
        var i = n.extend;
        n(function () {
          kendo.__documentIsReady = !0;
        });
        i(kendo, { syncReady: t });
      })(window.kendo.jQuery);
    },
    "function" == typeof define && define.amd
      ? define
      : function (n, t, i) {
          (i || t)();
        }
  );
!(function (n) {
  if ("object" == typeof exports && "undefined" != typeof module)
    module.exports = n();
  else if ("function" == typeof define && define.amd) define([], n);
  else {
    var t;
    t =
      "undefined" != typeof window
        ? window
        : "undefined" != typeof global
        ? global
        : "undefined" != typeof self
        ? self
        : this;
    t.JSZip = n();
  }
})(function () {
  return (function n(t, i, r) {
    function u(f, o) {
      var h, c, s;
      if (!i[f]) {
        if (!t[f]) {
          if (((h = "function" == typeof require && require), !o && h))
            return h(f, !0);
          if (e) return e(f, !0);
          c = new Error("Cannot find module '" + f + "'");
          throw ((c.code = "MODULE_NOT_FOUND"), c);
        }
        s = i[f] = { exports: {} };
        t[f][0].call(
          s.exports,
          function (n) {
            var i = t[f][1][n];
            return u(i ? i : n);
          },
          s,
          s.exports,
          n,
          t,
          i,
          r
        );
      }
      return i[f].exports;
    }
    for (
      var e = "function" == typeof require && require, f = 0;
      f < r.length;
      f++
    )
      u(r[f]);
    return u;
  })(
    {
      1: [
        function (n, t) {
          "use strict";
          function i(n) {
            if (n) {
              this.data = n;
              this.length = this.data.length;
              this.index = 0;
              this.zero = 0;
              for (var t = 0; t < this.data.length; t++) n[t] = 255 & n[t];
            }
          }
          var r = n("./dataReader");
          i.prototype = new r();
          i.prototype.byteAt = function (n) {
            return this.data[this.zero + n];
          };
          i.prototype.lastIndexOfSignature = function (n) {
            for (
              var i = n.charCodeAt(0),
                r = n.charCodeAt(1),
                u = n.charCodeAt(2),
                f = n.charCodeAt(3),
                t = this.length - 4;
              t >= 0;
              --t
            )
              if (
                this.data[t] === i &&
                this.data[t + 1] === r &&
                this.data[t + 2] === u &&
                this.data[t + 3] === f
              )
                return t - this.zero;
            return -1;
          };
          i.prototype.readData = function (n) {
            if ((this.checkOffset(n), 0 === n)) return [];
            var t = this.data.slice(
              this.zero + this.index,
              this.zero + this.index + n
            );
            return (this.index += n), t;
          };
          t.exports = i;
        },
        { "./dataReader": 6 },
      ],
      2: [
        function (n, t, i) {
          "use strict";
          var r =
            "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
          i.encode = function (n) {
            for (var e, t, i, h, c, o, u, s = "", f = 0; f < n.length; )
              (e = n.charCodeAt(f++)),
                (t = n.charCodeAt(f++)),
                (i = n.charCodeAt(f++)),
                (h = e >> 2),
                (c = ((3 & e) << 4) | (t >> 4)),
                (o = ((15 & t) << 2) | (i >> 6)),
                (u = 63 & i),
                isNaN(t) ? (o = u = 64) : isNaN(i) && (u = 64),
                (s = s + r.charAt(h) + r.charAt(c) + r.charAt(o) + r.charAt(u));
            return s;
          };
          i.decode = function (n) {
            var o,
              s,
              h,
              c,
              f,
              i,
              e,
              u = "",
              t = 0;
            for (n = n.replace(/[^A-Za-z0-9\+\/\=]/g, ""); t < n.length; )
              (c = r.indexOf(n.charAt(t++))),
                (f = r.indexOf(n.charAt(t++))),
                (i = r.indexOf(n.charAt(t++))),
                (e = r.indexOf(n.charAt(t++))),
                (o = (c << 2) | (f >> 4)),
                (s = ((15 & f) << 4) | (i >> 2)),
                (h = ((3 & i) << 6) | e),
                (u += String.fromCharCode(o)),
                64 != i && (u += String.fromCharCode(s)),
                64 != e && (u += String.fromCharCode(h));
            return u;
          };
        },
        {},
      ],
      3: [
        function (n, t) {
          "use strict";
          function i() {
            this.compressedSize = 0;
            this.uncompressedSize = 0;
            this.crc32 = 0;
            this.compressionMethod = null;
            this.compressedContent = null;
          }
          i.prototype = {
            getContent: function () {
              return null;
            },
            getCompressedContent: function () {
              return null;
            },
          };
          t.exports = i;
        },
        {},
      ],
      4: [
        function (n, t, i) {
          "use strict";
          i.STORE = {
            magic: "\0\0",
            compress: function (n) {
              return n;
            },
            uncompress: function (n) {
              return n;
            },
            compressInputType: null,
            uncompressInputType: null,
          };
          i.DEFLATE = n("./flate");
        },
        { "./flate": 9 },
      ],
      5: [
        function (n, t) {
          "use strict";
          var i = n("./utils"),
            r = [
              0, 1996959894, 3993919788, 2567524794, 124634137, 1886057615,
              3915621685, 2657392035, 249268274, 2044508324, 3772115230,
              2547177864, 162941995, 2125561021, 3887607047, 2428444049,
              498536548, 1789927666, 4089016648, 2227061214, 450548861,
              1843258603, 4107580753, 2211677639, 325883990, 1684777152,
              4251122042, 2321926636, 335633487, 1661365465, 4195302755,
              2366115317, 997073096, 1281953886, 3579855332, 2724688242,
              1006888145, 1258607687, 3524101629, 2768942443, 901097722,
              1119000684, 3686517206, 2898065728, 853044451, 1172266101,
              3705015759, 2882616665, 651767980, 1373503546, 3369554304,
              3218104598, 565507253, 1454621731, 3485111705, 3099436303,
              671266974, 1594198024, 3322730930, 2970347812, 795835527,
              1483230225, 3244367275, 3060149565, 1994146192, 31158534,
              2563907772, 4023717930, 1907459465, 112637215, 2680153253,
              3904427059, 2013776290, 251722036, 2517215374, 3775830040,
              2137656763, 141376813, 2439277719, 3865271297, 1802195444,
              476864866, 2238001368, 4066508878, 1812370925, 453092731,
              2181625025, 4111451223, 1706088902, 314042704, 2344532202,
              4240017532, 1658658271, 366619977, 2362670323, 4224994405,
              1303535960, 984961486, 2747007092, 3569037538, 1256170817,
              1037604311, 2765210733, 3554079995, 1131014506, 879679996,
              2909243462, 3663771856, 1141124467, 855842277, 2852801631,
              3708648649, 1342533948, 654459306, 3188396048, 3373015174,
              1466479909, 544179635, 3110523913, 3462522015, 1591671054,
              702138776, 2966460450, 3352799412, 1504918807, 783551873,
              3082640443, 3233442989, 3988292384, 2596254646, 62317068,
              1957810842, 3939845945, 2647816111, 81470997, 1943803523,
              3814918930, 2489596804, 225274430, 2053790376, 3826175755,
              2466906013, 167816743, 2097651377, 4027552580, 2265490386,
              503444072, 1762050814, 4150417245, 2154129355, 426522225,
              1852507879, 4275313526, 2312317920, 282753626, 1742555852,
              4189708143, 2394877945, 397917763, 1622183637, 3604390888,
              2714866558, 953729732, 1340076626, 3518719985, 2797360999,
              1068828381, 1219638859, 3624741850, 2936675148, 906185462,
              1090812512, 3747672003, 2825379669, 829329135, 1181335161,
              3412177804, 3160834842, 628085408, 1382605366, 3423369109,
              3138078467, 570562233, 1426400815, 3317316542, 2998733608,
              733239954, 1555261956, 3268935591, 3050360625, 752459403,
              1541320221, 2607071920, 3965973030, 1969922972, 40735498,
              2617837225, 3943577151, 1913087877, 83908371, 2512341634,
              3803740692, 2075208622, 213261112, 2463272603, 3855990285,
              2094854071, 198958881, 2262029012, 4057260610, 1759359992,
              534414190, 2176718541, 4139329115, 1873836001, 414664567,
              2282248934, 4279200368, 1711684554, 285281116, 2405801727,
              4167216745, 1634467795, 376229701, 2685067896, 3608007406,
              1308918612, 956543938, 2808555105, 3495958263, 1231636301,
              1047427035, 2932959818, 3654703836, 1088359270, 936918e3,
              2847714899, 3736837829, 1202900863, 817233897, 3183342108,
              3401237130, 1404277552, 615818150, 3134207493, 3453421203,
              1423857449, 601450431, 3009837614, 3294710456, 1567103746,
              711928724, 3020668471, 3272380065, 1510334235, 755167117,
            ];
          t.exports = function (n, t) {
            var f, u, h;
            if ("undefined" == typeof n || !n.length) return 0;
            f = "string" !== i.getTypeOf(n);
            "undefined" == typeof t && (t = 0);
            var e = 0,
              o = 0,
              s = 0;
            for (t ^= -1, u = 0, h = n.length; u < h; u++)
              (s = f ? n[u] : n.charCodeAt(u)),
                (o = 255 & (t ^ s)),
                (e = r[o]),
                (t = (t >>> 8) ^ e);
            return t ^ -1;
          };
        },
        { "./utils": 22 },
      ],
      6: [
        function (n, t) {
          "use strict";
          function i() {
            this.data = null;
            this.length = 0;
            this.index = 0;
            this.zero = 0;
          }
          var r = n("./utils");
          i.prototype = {
            checkOffset: function (n) {
              this.checkIndex(this.index + n);
            },
            checkIndex: function (n) {
              if (this.length < this.zero + n || n < 0)
                throw new Error(
                  "End of data reached (data length = " +
                    this.length +
                    ", asked index = " +
                    n +
                    "). Corrupted zip ?"
                );
            },
            setIndex: function (n) {
              this.checkIndex(n);
              this.index = n;
            },
            skip: function (n) {
              this.setIndex(this.index + n);
            },
            byteAt: function () {},
            readInt: function (n) {
              var t,
                i = 0;
              for (
                this.checkOffset(n), t = this.index + n - 1;
                t >= this.index;
                t--
              )
                i = (i << 8) + this.byteAt(t);
              return (this.index += n), i;
            },
            readString: function (n) {
              return r.transformTo("string", this.readData(n));
            },
            readData: function () {},
            lastIndexOfSignature: function () {},
            readDate: function () {
              var n = this.readInt(4);
              return new Date(
                ((n >> 25) & 127) + 1980,
                ((n >> 21) & 15) - 1,
                (n >> 16) & 31,
                (n >> 11) & 31,
                (n >> 5) & 63,
                (31 & n) << 1
              );
            },
          };
          t.exports = i;
        },
        { "./utils": 22 },
      ],
      7: [
        function (n, t, i) {
          "use strict";
          i.base64 = !1;
          i.binary = !1;
          i.dir = !1;
          i.createFolders = !1;
          i.date = null;
          i.compression = null;
          i.compressionOptions = null;
          i.comment = null;
          i.unixPermissions = null;
          i.dosPermissions = null;
        },
        {},
      ],
      8: [
        function (n, t, i) {
          "use strict";
          var r = n("./utils");
          i.string2binary = function (n) {
            return r.string2binary(n);
          };
          i.string2Uint8Array = function (n) {
            return r.transformTo("uint8array", n);
          };
          i.uint8Array2String = function (n) {
            return r.transformTo("string", n);
          };
          i.string2Blob = function (n) {
            var t = r.transformTo("arraybuffer", n);
            return r.arrayBuffer2Blob(t);
          };
          i.arrayBuffer2Blob = function (n) {
            return r.arrayBuffer2Blob(n);
          };
          i.transformTo = function (n, t) {
            return r.transformTo(n, t);
          };
          i.getTypeOf = function (n) {
            return r.getTypeOf(n);
          };
          i.checkSupport = function (n) {
            return r.checkSupport(n);
          };
          i.MAX_VALUE_16BITS = r.MAX_VALUE_16BITS;
          i.MAX_VALUE_32BITS = r.MAX_VALUE_32BITS;
          i.pretty = function (n) {
            return r.pretty(n);
          };
          i.findCompression = function (n) {
            return r.findCompression(n);
          };
          i.isRegExp = function (n) {
            return r.isRegExp(n);
          };
        },
        { "./utils": 22 },
      ],
      9: [
        function (n, t, i) {
          "use strict";
          var r =
              "undefined" != typeof Uint8Array &&
              "undefined" != typeof Uint16Array &&
              "undefined" != typeof Uint32Array,
            u = n("pako");
          i.uncompressInputType = r ? "uint8array" : "array";
          i.compressInputType = r ? "uint8array" : "array";
          i.magic = "\b\0";
          i.compress = function (n, t) {
            return u.deflateRaw(n, { level: t.level || -1 });
          };
          i.uncompress = function (n) {
            return u.inflateRaw(n);
          };
        },
        { pako: 25 },
      ],
      10: [
        function (n, t) {
          "use strict";
          function i(n, t) {
            return this instanceof i
              ? ((this.files = {}),
                (this.comment = null),
                (this.root = ""),
                n && this.load(n, t),
                void (this.clone = function () {
                  var t = new i();
                  for (var n in this)
                    "function" != typeof this[n] && (t[n] = this[n]);
                  return t;
                }))
              : new i(n, t);
          }
          var r = n("./base64");
          i.prototype = n("./object");
          i.prototype.load = n("./load");
          i.support = n("./support");
          i.defaults = n("./defaults");
          i.utils = n("./deprecatedPublicUtils");
          i.base64 = {
            encode: function (n) {
              return r.encode(n);
            },
            decode: function (n) {
              return r.decode(n);
            },
          };
          i.compressions = n("./compressions");
          t.exports = i;
        },
        {
          "./base64": 2,
          "./compressions": 4,
          "./defaults": 7,
          "./deprecatedPublicUtils": 8,
          "./load": 11,
          "./object": 14,
          "./support": 18,
        },
      ],
      11: [
        function (n, t) {
          "use strict";
          var i = n("./base64"),
            r = n("./utf8"),
            u = n("./utils"),
            f = n("./zipEntries");
          t.exports = function (n, t) {
            var h, o, s, e;
            for (
              t = u.extend(t || {}, {
                base64: !1,
                checkCRC32: !1,
                optimizedBinaryString: !1,
                createFolders: !1,
                decodeFileName: r.utf8decode,
              }),
                t.base64 && (n = i.decode(n)),
                o = new f(n, t),
                h = o.files,
                s = 0;
              s < h.length;
              s++
            )
              (e = h[s]),
                this.file(e.fileNameStr, e.decompressed, {
                  binary: !0,
                  optimizedBinaryString: !0,
                  date: e.date,
                  dir: e.dir,
                  comment: e.fileCommentStr.length ? e.fileCommentStr : null,
                  unixPermissions: e.unixPermissions,
                  dosPermissions: e.dosPermissions,
                  createFolders: t.createFolders,
                });
            return o.zipComment.length && (this.comment = o.zipComment), this;
          };
        },
        { "./base64": 2, "./utf8": 21, "./utils": 22, "./zipEntries": 23 },
      ],
      12: [
        function (n, t) {
          (function (n) {
            "use strict";
            t.exports = function (t, i) {
              return new n(t, i);
            };
            t.exports.test = function (t) {
              return n.isBuffer(t);
            };
          }).call(this, "undefined" != typeof Buffer ? Buffer : void 0);
        },
        {},
      ],
      13: [
        function (n, t) {
          "use strict";
          function i(n) {
            this.data = n;
            this.length = this.data.length;
            this.index = 0;
            this.zero = 0;
          }
          var r = n("./uint8ArrayReader");
          i.prototype = new r();
          i.prototype.readData = function (n) {
            this.checkOffset(n);
            var t = this.data.slice(
              this.zero + this.index,
              this.zero + this.index + n
            );
            return (this.index += n), t;
          };
          t.exports = i;
        },
        { "./uint8ArrayReader": 19 },
      ],
      14: [
        function (n, t) {
          "use strict";
          var k = n("./support"),
            i = n("./utils"),
            e = n("./crc32"),
            o = n("./signature"),
            d = n("./defaults"),
            a = n("./base64"),
            s = n("./compressions"),
            f = n("./compressedObject"),
            g = n("./nodeBuffer"),
            u = n("./utf8"),
            nt = n("./stringWriter"),
            tt = n("./uint8ArrayWriter"),
            v = function (n) {
              if (
                n._data instanceof f &&
                ((n._data = n._data.getContent()),
                (n.options.binary = !0),
                (n.options.base64 = !1),
                "uint8array" === i.getTypeOf(n._data))
              ) {
                var t = n._data;
                n._data = new Uint8Array(t.length);
                0 !== t.length && n._data.set(t, 0);
              }
              return n._data;
            },
            h = function (n) {
              var t = v(n),
                r = i.getTypeOf(t);
              return "string" === r
                ? !n.options.binary && k.nodebuffer
                  ? g(t, "utf-8")
                  : n.asBinary()
                : t;
            },
            y = function (n) {
              var t = v(this);
              return null === t || "undefined" == typeof t
                ? ""
                : (this.options.base64 && (t = a.decode(t)),
                  (t =
                    n && this.options.binary
                      ? l.utf8decode(t)
                      : i.transformTo("string", t)),
                  n ||
                    this.options.binary ||
                    (t = i.transformTo("string", l.utf8encode(t))),
                  t);
            },
            c = function (n, t, i) {
              this.name = n;
              this.dir = i.dir;
              this.date = i.date;
              this.comment = i.comment;
              this.unixPermissions = i.unixPermissions;
              this.dosPermissions = i.dosPermissions;
              this._data = t;
              this.options = i;
              this._initialMetadata = { dir: i.dir, date: i.date };
            };
          c.prototype = {
            asText: function () {
              return y.call(this, !0);
            },
            asBinary: function () {
              return y.call(this, !1);
            },
            asNodeBuffer: function () {
              var n = h(this);
              return i.transformTo("nodebuffer", n);
            },
            asUint8Array: function () {
              var n = h(this);
              return i.transformTo("uint8array", n);
            },
            asArrayBuffer: function () {
              return this.asUint8Array().buffer;
            },
          };
          var r = function (n, t) {
              for (var r = "", i = 0; i < t; i++)
                (r += String.fromCharCode(255 & n)), (n >>>= 8);
              return r;
            },
            it = function (n) {
              return (
                (n = n || {}),
                n.base64 !== !0 ||
                  (null !== n.binary && void 0 !== n.binary) ||
                  (n.binary = !0),
                (n = i.extend(n, d)),
                (n.date = n.date || new Date()),
                null !== n.compression &&
                  (n.compression = n.compression.toUpperCase()),
                n
              );
            },
            p = function (n, t, r) {
              var o,
                u = i.getTypeOf(t),
                e;
              if (
                ((r = it(r)),
                "string" == typeof r.unixPermissions &&
                  (r.unixPermissions = parseInt(r.unixPermissions, 8)),
                r.unixPermissions && 16384 & r.unixPermissions && (r.dir = !0),
                r.dosPermissions && 16 & r.dosPermissions && (r.dir = !0),
                r.dir && (n = w(n)),
                r.createFolders && (o = rt(n)) && b.call(this, o, !0),
                r.dir || null === t || "undefined" == typeof t)
              )
                (r.base64 = !1), (r.binary = !1), (t = null), (u = null);
              else if ("string" === u)
                r.binary &&
                  !r.base64 &&
                  r.optimizedBinaryString !== !0 &&
                  (t = i.string2binary(t));
              else {
                if (((r.base64 = !1), (r.binary = !0), !(u || t instanceof f)))
                  throw new Error(
                    "The data of '" + n + "' is in an unsupported format !"
                  );
                "arraybuffer" === u && (t = i.transformTo("uint8array", t));
              }
              return (e = new c(n, t, r)), (this.files[n] = e), e;
            },
            rt = function (n) {
              "/" == n.slice(-1) && (n = n.substring(0, n.length - 1));
              var t = n.lastIndexOf("/");
              return t > 0 ? n.substring(0, t) : "";
            },
            w = function (n) {
              return "/" != n.slice(-1) && (n += "/"), n;
            },
            b = function (n, t) {
              return (
                (t = "undefined" != typeof t && t),
                (n = w(n)),
                this.files[n] ||
                  p.call(this, n, null, { dir: !0, createFolders: t }),
                this.files[n]
              );
            },
            ut = function (n, t, r) {
              var o,
                u = new f();
              return (
                n._data instanceof f
                  ? ((u.uncompressedSize = n._data.uncompressedSize),
                    (u.crc32 = n._data.crc32),
                    0 === u.uncompressedSize || n.dir
                      ? ((t = s.STORE),
                        (u.compressedContent = ""),
                        (u.crc32 = 0))
                      : n._data.compressionMethod === t.magic
                      ? (u.compressedContent = n._data.getCompressedContent())
                      : ((o = n._data.getContent()),
                        (u.compressedContent = t.compress(
                          i.transformTo(t.compressInputType, o),
                          r
                        ))))
                  : ((o = h(n)),
                    (o && 0 !== o.length && !n.dir) ||
                      ((t = s.STORE), (o = "")),
                    (u.uncompressedSize = o.length),
                    (u.crc32 = e(o)),
                    (u.compressedContent = t.compress(
                      i.transformTo(t.compressInputType, o),
                      r
                    ))),
                (u.compressedSize = u.compressedContent.length),
                (u.compressionMethod = t.magic),
                u
              );
            },
            ft = function (n, t) {
              var i = n;
              return n || (i = t ? 16893 : 33204), (65535 & i) << 16;
            },
            et = function (n) {
              return 63 & (n || 0);
            },
            ot = function (n, t, f, s, h, c) {
              var v,
                y,
                b,
                a,
                at = (f.compressedContent, c !== u.utf8encode),
                k = i.transformTo("string", c(t.name)),
                rt = i.transformTo("string", u.utf8encode(t.name)),
                g = t.comment || "",
                nt = i.transformTo("string", c(g)),
                ut = i.transformTo("string", u.utf8encode(g)),
                ot = rt.length !== t.name.length,
                st = ut.length !== g.length,
                ht = t.options,
                p = "",
                tt = "",
                it = "",
                w,
                d,
                l,
                ct,
                lt;
              return (
                (b = t._initialMetadata.dir !== t.dir ? t.dir : ht.dir),
                (a = t._initialMetadata.date !== t.date ? t.date : ht.date),
                (w = 0),
                (d = 0),
                b && (w |= 16),
                "UNIX" === h
                  ? ((d = 798), (w |= ft(t.unixPermissions, b)))
                  : ((d = 20), (w |= et(t.dosPermissions, b))),
                (v = a.getHours()),
                (v <<= 6),
                (v |= a.getMinutes()),
                (v <<= 5),
                (v |= a.getSeconds() / 2),
                (y = a.getFullYear() - 1980),
                (y <<= 4),
                (y |= a.getMonth() + 1),
                (y <<= 5),
                (y |= a.getDate()),
                ot &&
                  ((tt = r(1, 1) + r(e(k), 4) + rt),
                  (p += "up" + r(tt.length, 2) + tt)),
                st &&
                  ((it = r(1, 1) + r(this.crc32(nt), 4) + ut),
                  (p += "uc" + r(it.length, 2) + it)),
                (l = ""),
                (l += "\n\0"),
                (l += at || (!ot && !st) ? "\0\0" : "\0\b"),
                (l += f.compressionMethod),
                (l += r(v, 2)),
                (l += r(y, 2)),
                (l += r(f.crc32, 4)),
                (l += r(f.compressedSize, 4)),
                (l += r(f.uncompressedSize, 4)),
                (l += r(k.length, 2)),
                (l += r(p.length, 2)),
                (ct = o.LOCAL_FILE_HEADER + l + k + p),
                (lt =
                  o.CENTRAL_FILE_HEADER +
                  r(d, 2) +
                  l +
                  r(nt.length, 2) +
                  "\0\0\0\0" +
                  r(w, 4) +
                  r(s, 4) +
                  k +
                  p +
                  nt),
                { fileRecord: ct, dirRecord: lt, compressedObject: f }
              );
            },
            l = {
              load: function () {
                throw new Error(
                  "Load method is not defined. Is the file jszip-load.js included ?"
                );
              },
              filter: function (n) {
                var t,
                  f,
                  r,
                  u,
                  e = [];
                for (t in this.files)
                  this.files.hasOwnProperty(t) &&
                    ((r = this.files[t]),
                    (u = new c(r.name, r._data, i.extend(r.options))),
                    (f = t.slice(this.root.length, t.length)),
                    t.slice(0, this.root.length) === this.root &&
                      n(f, u) &&
                      e.push(u));
                return e;
              },
              file: function (n, t, r) {
                if (1 === arguments.length) {
                  if (i.isRegExp(n)) {
                    var u = n;
                    return this.filter(function (n, t) {
                      return !t.dir && u.test(n);
                    });
                  }
                  return (
                    this.filter(function (t, i) {
                      return !i.dir && t === n;
                    })[0] || null
                  );
                }
                return (n = this.root + n), p.call(this, n, t, r), this;
              },
              folder: function (n) {
                if (!n) return this;
                if (i.isRegExp(n))
                  return this.filter(function (t, i) {
                    return i.dir && n.test(t);
                  });
                var r = this.root + n,
                  u = b.call(this, r),
                  t = this.clone();
                return (t.root = u.name), t;
              },
              remove: function (n) {
                var t, r, i;
                if (
                  ((n = this.root + n),
                  (t = this.files[n]),
                  t || ("/" != n.slice(-1) && (n += "/"), (t = this.files[n])),
                  t && !t.dir)
                )
                  delete this.files[n];
                else
                  for (
                    r = this.filter(function (t, i) {
                      return i.name.slice(0, n.length) === n;
                    }),
                      i = 0;
                    i < r.length;
                    i++
                  )
                    delete this.files[r[i].name];
                return this;
              },
              generate: function (n) {
                var p, l, v, h;
                n = i.extend(n || {}, {
                  base64: !0,
                  compression: "STORE",
                  compressionOptions: null,
                  type: "base64",
                  platform: "DOS",
                  comment: null,
                  mimeType: "application/zip",
                  encodeFileName: u.utf8encode,
                });
                i.checkSupport(n.type);
                ("darwin" !== n.platform &&
                  "freebsd" !== n.platform &&
                  "linux" !== n.platform &&
                  "sunos" !== n.platform) ||
                  (n.platform = "UNIX");
                "win32" === n.platform && (n.platform = "DOS");
                var e,
                  t,
                  f = [],
                  c = 0,
                  y = 0,
                  k = i.transformTo(
                    "string",
                    n.encodeFileName(n.comment || this.comment || "")
                  );
                for (p in this.files)
                  if (this.files.hasOwnProperty(p)) {
                    var w = this.files[p],
                      d = w.options.compression || n.compression.toUpperCase(),
                      g = s[d];
                    if (!g)
                      throw new Error(
                        d + " is not a valid compression method !"
                      );
                    var rt =
                        w.options.compressionOptions ||
                        n.compressionOptions ||
                        {},
                      it = ut.call(this, w, g, rt),
                      b = ot.call(
                        this,
                        p,
                        w,
                        it,
                        c,
                        n.platform,
                        n.encodeFileName
                      );
                    c += b.fileRecord.length + it.compressedSize;
                    y += b.dirRecord.length;
                    f.push(b);
                  }
                for (
                  l = "",
                    l =
                      o.CENTRAL_DIRECTORY_END +
                      "\0\0\0\0" +
                      r(f.length, 2) +
                      r(f.length, 2) +
                      r(y, 4) +
                      r(c, 4) +
                      r(k.length, 2) +
                      k,
                    v = n.type.toLowerCase(),
                    e =
                      "uint8array" === v ||
                      "arraybuffer" === v ||
                      "blob" === v ||
                      "nodebuffer" === v
                        ? new tt(c + y + l.length)
                        : new nt(c + y + l.length),
                    t = 0;
                  t < f.length;
                  t++
                )
                  e.append(f[t].fileRecord),
                    e.append(f[t].compressedObject.compressedContent);
                for (t = 0; t < f.length; t++) e.append(f[t].dirRecord);
                e.append(l);
                h = e.finalize();
                switch (n.type.toLowerCase()) {
                  case "uint8array":
                  case "arraybuffer":
                  case "nodebuffer":
                    return i.transformTo(n.type.toLowerCase(), h);
                  case "blob":
                    return i.arrayBuffer2Blob(
                      i.transformTo("arraybuffer", h),
                      n.mimeType
                    );
                  case "base64":
                    return n.base64 ? a.encode(h) : h;
                  default:
                    return h;
                }
              },
              crc32: function (n, t) {
                return e(n, t);
              },
              utf8encode: function (n) {
                return i.transformTo("string", u.utf8encode(n));
              },
              utf8decode: function (n) {
                return u.utf8decode(n);
              },
            };
          t.exports = l;
        },
        {
          "./base64": 2,
          "./compressedObject": 3,
          "./compressions": 4,
          "./crc32": 5,
          "./defaults": 7,
          "./nodeBuffer": 12,
          "./signature": 15,
          "./stringWriter": 17,
          "./support": 18,
          "./uint8ArrayWriter": 20,
          "./utf8": 21,
          "./utils": 22,
        },
      ],
      15: [
        function (n, t, i) {
          "use strict";
          i.LOCAL_FILE_HEADER = "PK\x03\x04";
          i.CENTRAL_FILE_HEADER = "PK\x01\x02";
          i.CENTRAL_DIRECTORY_END = "PK\x05\x06";
          i.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07";
          i.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06";
          i.DATA_DESCRIPTOR = "PK\x07\b";
        },
        {},
      ],
      16: [
        function (n, t) {
          "use strict";
          function i(n, t) {
            this.data = n;
            t || (this.data = u.string2binary(this.data));
            this.length = this.data.length;
            this.index = 0;
            this.zero = 0;
          }
          var r = n("./dataReader"),
            u = n("./utils");
          i.prototype = new r();
          i.prototype.byteAt = function (n) {
            return this.data.charCodeAt(this.zero + n);
          };
          i.prototype.lastIndexOfSignature = function (n) {
            return this.data.lastIndexOf(n) - this.zero;
          };
          i.prototype.readData = function (n) {
            this.checkOffset(n);
            var t = this.data.slice(
              this.zero + this.index,
              this.zero + this.index + n
            );
            return (this.index += n), t;
          };
          t.exports = i;
        },
        { "./dataReader": 6, "./utils": 22 },
      ],
      17: [
        function (n, t) {
          "use strict";
          var r = n("./utils"),
            i = function () {
              this.data = [];
            };
          i.prototype = {
            append: function (n) {
              n = r.transformTo("string", n);
              this.data.push(n);
            },
            finalize: function () {
              return this.data.join("");
            },
          };
          t.exports = i;
        },
        { "./utils": 22 },
      ],
      18: [
        function (n, t, i) {
          (function (n) {
            "use strict";
            var t, u, r;
            if (
              ((i.base64 = !0),
              (i.array = !0),
              (i.string = !0),
              (i.arraybuffer =
                "undefined" != typeof ArrayBuffer &&
                "undefined" != typeof Uint8Array),
              (i.nodebuffer = "undefined" != typeof n),
              (i.uint8array = "undefined" != typeof Uint8Array),
              "undefined" == typeof ArrayBuffer)
            )
              i.blob = !1;
            else {
              t = new ArrayBuffer(0);
              try {
                i.blob = 0 === new Blob([t], { type: "application/zip" }).size;
              } catch (f) {
                try {
                  u =
                    window.BlobBuilder ||
                    window.WebKitBlobBuilder ||
                    window.MozBlobBuilder ||
                    window.MSBlobBuilder;
                  r = new u();
                  r.append(t);
                  i.blob = 0 === r.getBlob("application/zip").size;
                } catch (f) {
                  i.blob = !1;
                }
              }
            }
          }).call(this, "undefined" != typeof Buffer ? Buffer : void 0);
        },
        {},
      ],
      19: [
        function (n, t) {
          "use strict";
          function i(n) {
            n &&
              ((this.data = n),
              (this.length = this.data.length),
              (this.index = 0),
              (this.zero = 0));
          }
          var r = n("./arrayReader");
          i.prototype = new r();
          i.prototype.readData = function (n) {
            if ((this.checkOffset(n), 0 === n)) return new Uint8Array(0);
            var t = this.data.subarray(
              this.zero + this.index,
              this.zero + this.index + n
            );
            return (this.index += n), t;
          };
          t.exports = i;
        },
        { "./arrayReader": 1 },
      ],
      20: [
        function (n, t) {
          "use strict";
          var r = n("./utils"),
            i = function (n) {
              this.data = new Uint8Array(n);
              this.index = 0;
            };
          i.prototype = {
            append: function (n) {
              0 !== n.length &&
                ((n = r.transformTo("uint8array", n)),
                this.data.set(n, this.index),
                (this.index += n.length));
            },
            finalize: function () {
              return this.data;
            },
          };
          t.exports = i;
        },
        { "./utils": 22 },
      ],
      21: [
        function (n, t, i) {
          "use strict";
          for (
            var e = n("./utils"),
              u = n("./support"),
              s = n("./nodeBuffer"),
              f = new Array(256),
              r = 0;
            r < 256;
            r++
          )
            f[r] =
              r >= 252
                ? 6
                : r >= 248
                ? 5
                : r >= 240
                ? 4
                : r >= 224
                ? 3
                : r >= 192
                ? 2
                : 1;
          f[254] = f[254] = 1;
          var h = function (n) {
              for (var r, t, e, f, s = n.length, o = 0, i = 0; i < s; i++)
                (t = n.charCodeAt(i)),
                  55296 == (64512 & t) &&
                    i + 1 < s &&
                    ((e = n.charCodeAt(i + 1)),
                    56320 == (64512 & e) &&
                      ((t = 65536 + ((t - 55296) << 10) + (e - 56320)), i++)),
                  (o += t < 128 ? 1 : t < 2048 ? 2 : t < 65536 ? 3 : 4);
              for (
                r = u.uint8array ? new Uint8Array(o) : new Array(o),
                  f = 0,
                  i = 0;
                f < o;
                i++
              )
                (t = n.charCodeAt(i)),
                  55296 == (64512 & t) &&
                    i + 1 < s &&
                    ((e = n.charCodeAt(i + 1)),
                    56320 == (64512 & e) &&
                      ((t = 65536 + ((t - 55296) << 10) + (e - 56320)), i++)),
                  t < 128
                    ? (r[f++] = t)
                    : t < 2048
                    ? ((r[f++] = 192 | (t >>> 6)), (r[f++] = 128 | (63 & t)))
                    : t < 65536
                    ? ((r[f++] = 224 | (t >>> 12)),
                      (r[f++] = 128 | ((t >>> 6) & 63)),
                      (r[f++] = 128 | (63 & t)))
                    : ((r[f++] = 240 | (t >>> 18)),
                      (r[f++] = 128 | ((t >>> 12) & 63)),
                      (r[f++] = 128 | ((t >>> 6) & 63)),
                      (r[f++] = 128 | (63 & t)));
              return r;
            },
            c = function (n, t) {
              var i;
              for (
                t = t || n.length, t > n.length && (t = n.length), i = t - 1;
                i >= 0 && 128 == (192 & n[i]);

              )
                i--;
              return i < 0 ? t : 0 === i ? t : i + f[n[i]] > t ? i : t;
            },
            o = function (n) {
              for (
                var t, u, s = n.length, i = new Array(2 * s), r = 0, o = 0;
                o < s;

              )
                if (((t = n[o++]), t < 128)) i[r++] = t;
                else if (((u = f[t]), u > 4)) (i[r++] = 65533), (o += u - 1);
                else {
                  for (t &= 2 === u ? 31 : 3 === u ? 15 : 7; u > 1 && o < s; )
                    (t = (t << 6) | (63 & n[o++])), u--;
                  u > 1
                    ? (i[r++] = 65533)
                    : t < 65536
                    ? (i[r++] = t)
                    : ((t -= 65536),
                      (i[r++] = 55296 | ((t >> 10) & 1023)),
                      (i[r++] = 56320 | (1023 & t)));
                }
              return (
                i.length !== r &&
                  (i.subarray ? (i = i.subarray(0, r)) : (i.length = r)),
                e.applyFromCharCode(i)
              );
            };
          i.utf8encode = function (n) {
            return u.nodebuffer ? s(n, "utf-8") : h(n);
          };
          i.utf8decode = function (n) {
            var i;
            if (u.nodebuffer)
              return e.transformTo("nodebuffer", n).toString("utf-8");
            n = e.transformTo(u.uint8array ? "uint8array" : "array", n);
            for (var r = [], t = 0, f = n.length; t < f; )
              (i = c(n, Math.min(t + 65536, f))),
                u.uint8array
                  ? r.push(o(n.subarray(t, i)))
                  : r.push(o(n.slice(t, i))),
                (t = i);
            return r.join("");
          };
        },
        { "./nodeBuffer": 12, "./support": 18, "./utils": 22 },
      ],
      22: [
        function (n, t, i) {
          "use strict";
          function f(n) {
            return n;
          }
          function c(n, t) {
            for (var i = 0; i < n.length; ++i) t[i] = 255 & n.charCodeAt(i);
            return t;
          }
          function e(n) {
            var t = 65536,
              e = [],
              o = n.length,
              s = i.getTypeOf(n),
              r = 0,
              c = !0,
              h,
              f;
            try {
              switch (s) {
                case "uint8array":
                  String.fromCharCode.apply(null, new Uint8Array(0));
                  break;
                case "nodebuffer":
                  String.fromCharCode.apply(null, u(0));
              }
            } catch (l) {
              c = !1;
            }
            if (!c) {
              for (h = "", f = 0; f < n.length; f++)
                h += String.fromCharCode(n[f]);
              return h;
            }
            for (; r < o && t > 1; )
              try {
                "array" === s || "nodebuffer" === s
                  ? e.push(
                      String.fromCharCode.apply(
                        null,
                        n.slice(r, Math.min(r + t, o))
                      )
                    )
                  : e.push(
                      String.fromCharCode.apply(
                        null,
                        n.subarray(r, Math.min(r + t, o))
                      )
                    );
                r += t;
              } catch (l) {
                t = Math.floor(t / 2);
              }
            return e.join("");
          }
          function o(n, t) {
            for (var i = 0; i < n.length; i++) t[i] = n[i];
            return t;
          }
          var s = n("./support"),
            h = n("./compressions"),
            u = n("./nodeBuffer"),
            r;
          i.string2binary = function (n) {
            for (var i = "", t = 0; t < n.length; t++)
              i += String.fromCharCode(255 & n.charCodeAt(t));
            return i;
          };
          i.arrayBuffer2Blob = function (n, t) {
            i.checkSupport("blob");
            t = t || "application/zip";
            try {
              return new Blob([n], { type: t });
            } catch (f) {
              try {
                var u =
                    window.BlobBuilder ||
                    window.WebKitBlobBuilder ||
                    window.MozBlobBuilder ||
                    window.MSBlobBuilder,
                  r = new u();
                return r.append(n), r.getBlob(t);
              } catch (f) {
                throw new Error("Bug : can't construct the Blob.");
              }
            }
          };
          i.applyFromCharCode = e;
          r = {};
          r.string = {
            string: f,
            array: function (n) {
              return c(n, new Array(n.length));
            },
            arraybuffer: function (n) {
              return r.string.uint8array(n).buffer;
            },
            uint8array: function (n) {
              return c(n, new Uint8Array(n.length));
            },
            nodebuffer: function (n) {
              return c(n, u(n.length));
            },
          };
          r.array = {
            string: e,
            array: f,
            arraybuffer: function (n) {
              return new Uint8Array(n).buffer;
            },
            uint8array: function (n) {
              return new Uint8Array(n);
            },
            nodebuffer: function (n) {
              return u(n);
            },
          };
          r.arraybuffer = {
            string: function (n) {
              return e(new Uint8Array(n));
            },
            array: function (n) {
              return o(new Uint8Array(n), new Array(n.byteLength));
            },
            arraybuffer: f,
            uint8array: function (n) {
              return new Uint8Array(n);
            },
            nodebuffer: function (n) {
              return u(new Uint8Array(n));
            },
          };
          r.uint8array = {
            string: e,
            array: function (n) {
              return o(n, new Array(n.length));
            },
            arraybuffer: function (n) {
              return n.buffer;
            },
            uint8array: f,
            nodebuffer: function (n) {
              return u(n);
            },
          };
          r.nodebuffer = {
            string: e,
            array: function (n) {
              return o(n, new Array(n.length));
            },
            arraybuffer: function (n) {
              return r.nodebuffer.uint8array(n).buffer;
            },
            uint8array: function (n) {
              return o(n, new Uint8Array(n.length));
            },
            nodebuffer: f,
          };
          i.transformTo = function (n, t) {
            if ((t || (t = ""), !n)) return t;
            i.checkSupport(n);
            var u = i.getTypeOf(t);
            return r[u][n](t);
          };
          i.getTypeOf = function (n) {
            return "string" == typeof n
              ? "string"
              : "[object Array]" === Object.prototype.toString.call(n)
              ? "array"
              : s.nodebuffer && u.test(n)
              ? "nodebuffer"
              : s.uint8array && n instanceof Uint8Array
              ? "uint8array"
              : s.arraybuffer && n instanceof ArrayBuffer
              ? "arraybuffer"
              : void 0;
          };
          i.checkSupport = function (n) {
            var t = s[n.toLowerCase()];
            if (!t) throw new Error(n + " is not supported by this browser");
          };
          i.MAX_VALUE_16BITS = 65535;
          i.MAX_VALUE_32BITS = -1;
          i.pretty = function (n) {
            for (var i, r = "", t = 0; t < (n || "").length; t++)
              (i = n.charCodeAt(t)),
                (r +=
                  "\\x" + (i < 16 ? "0" : "") + i.toString(16).toUpperCase());
            return r;
          };
          i.findCompression = function (n) {
            for (var t in h)
              if (h.hasOwnProperty(t) && h[t].magic === n) return h[t];
            return null;
          };
          i.isRegExp = function (n) {
            return "[object RegExp]" === Object.prototype.toString.call(n);
          };
          i.extend = function () {
            for (var t, i = {}, n = 0; n < arguments.length; n++)
              for (t in arguments[n])
                arguments[n].hasOwnProperty(t) &&
                  "undefined" == typeof i[t] &&
                  (i[t] = arguments[n][t]);
            return i;
          };
        },
        { "./compressions": 4, "./nodeBuffer": 12, "./support": 18 },
      ],
      23: [
        function (n, t) {
          "use strict";
          function f(n, t) {
            this.files = [];
            this.loadOptions = t;
            n && this.load(n);
          }
          var e = n("./stringReader"),
            o = n("./nodeBufferReader"),
            s = n("./uint8ArrayReader"),
            h = n("./arrayReader"),
            i = n("./utils"),
            r = n("./signature"),
            c = n("./zipEntry"),
            u = n("./support");
          n("./object");
          f.prototype = {
            checkSignature: function (n) {
              var t = this.reader.readString(4);
              if (t !== n)
                throw new Error(
                  "Corrupted zip or bug : unexpected signature (" +
                    i.pretty(t) +
                    ", expected " +
                    i.pretty(n) +
                    ")"
                );
            },
            isSignature: function (n, t) {
              var u = this.reader.index,
                i,
                r;
              return (
                this.reader.setIndex(n),
                (i = this.reader.readString(4)),
                (r = i === t),
                this.reader.setIndex(u),
                r
              );
            },
            readBlockEndOfCentral: function () {
              this.diskNumber = this.reader.readInt(2);
              this.diskWithCentralDirStart = this.reader.readInt(2);
              this.centralDirRecordsOnThisDisk = this.reader.readInt(2);
              this.centralDirRecords = this.reader.readInt(2);
              this.centralDirSize = this.reader.readInt(4);
              this.centralDirOffset = this.reader.readInt(4);
              this.zipCommentLength = this.reader.readInt(2);
              var n = this.reader.readData(this.zipCommentLength),
                t = u.uint8array ? "uint8array" : "array",
                r = i.transformTo(t, n);
              this.zipComment = this.loadOptions.decodeFileName(r);
            },
            readBlockZip64EndOfCentral: function () {
              this.zip64EndOfCentralSize = this.reader.readInt(8);
              this.versionMadeBy = this.reader.readString(2);
              this.versionNeeded = this.reader.readInt(2);
              this.diskNumber = this.reader.readInt(4);
              this.diskWithCentralDirStart = this.reader.readInt(4);
              this.centralDirRecordsOnThisDisk = this.reader.readInt(8);
              this.centralDirRecords = this.reader.readInt(8);
              this.centralDirSize = this.reader.readInt(8);
              this.centralDirOffset = this.reader.readInt(8);
              this.zip64ExtensibleData = {};
              for (var n, t, i, r = this.zip64EndOfCentralSize - 44; 0 < r; )
                (n = this.reader.readInt(2)),
                  (t = this.reader.readInt(4)),
                  (i = this.reader.readString(t)),
                  (this.zip64ExtensibleData[n] = {
                    id: n,
                    length: t,
                    value: i,
                  });
            },
            readBlockZip64EndOfCentralLocator: function () {
              if (
                ((this.diskWithZip64CentralDirStart = this.reader.readInt(4)),
                (this.relativeOffsetEndOfZip64CentralDir =
                  this.reader.readInt(8)),
                (this.disksCount = this.reader.readInt(4)),
                this.disksCount > 1)
              )
                throw new Error("Multi-volumes zip are not supported");
            },
            readLocalFiles: function () {
              for (var n, t = 0; t < this.files.length; t++)
                (n = this.files[t]),
                  this.reader.setIndex(n.localHeaderOffset),
                  this.checkSignature(r.LOCAL_FILE_HEADER),
                  n.readLocalPart(this.reader),
                  n.handleUTF8(),
                  n.processAttributes();
            },
            readCentralDir: function () {
              var n;
              for (
                this.reader.setIndex(this.centralDirOffset);
                this.reader.readString(4) === r.CENTRAL_FILE_HEADER;

              )
                (n = new c({ zip64: this.zip64 }, this.loadOptions)),
                  n.readCentralPart(this.reader),
                  this.files.push(n);
              if (
                this.centralDirRecords !== this.files.length &&
                0 !== this.centralDirRecords &&
                0 === this.files.length
              )
                throw new Error(
                  "Corrupted zip or bug: expected " +
                    this.centralDirRecords +
                    " records in central dir, got " +
                    this.files.length
                );
            },
            readEndOfCentral: function () {
              var n = this.reader.lastIndexOfSignature(r.CENTRAL_DIRECTORY_END),
                e,
                f,
                u,
                t;
              if (n < 0) {
                e = !this.isSignature(0, r.LOCAL_FILE_HEADER);
                throw e
                  ? new Error(
                      "Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html"
                    )
                  : new Error(
                      "Corrupted zip : can't find end of central directory"
                    );
              }
              if (
                (this.reader.setIndex(n),
                (f = n),
                this.checkSignature(r.CENTRAL_DIRECTORY_END),
                this.readBlockEndOfCentral(),
                this.diskNumber === i.MAX_VALUE_16BITS ||
                  this.diskWithCentralDirStart === i.MAX_VALUE_16BITS ||
                  this.centralDirRecordsOnThisDisk === i.MAX_VALUE_16BITS ||
                  this.centralDirRecords === i.MAX_VALUE_16BITS ||
                  this.centralDirSize === i.MAX_VALUE_32BITS ||
                  this.centralDirOffset === i.MAX_VALUE_32BITS)
              ) {
                if (
                  ((this.zip64 = !0),
                  (n = this.reader.lastIndexOfSignature(
                    r.ZIP64_CENTRAL_DIRECTORY_LOCATOR
                  )),
                  n < 0)
                )
                  throw new Error(
                    "Corrupted zip : can't find the ZIP64 end of central directory locator"
                  );
                if (
                  (this.reader.setIndex(n),
                  this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR),
                  this.readBlockZip64EndOfCentralLocator(),
                  !this.isSignature(
                    this.relativeOffsetEndOfZip64CentralDir,
                    r.ZIP64_CENTRAL_DIRECTORY_END
                  ) &&
                    ((this.relativeOffsetEndOfZip64CentralDir =
                      this.reader.lastIndexOfSignature(
                        r.ZIP64_CENTRAL_DIRECTORY_END
                      )),
                    this.relativeOffsetEndOfZip64CentralDir < 0))
                )
                  throw new Error(
                    "Corrupted zip : can't find the ZIP64 end of central directory"
                  );
                this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);
                this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_END);
                this.readBlockZip64EndOfCentral();
              }
              if (
                ((u = this.centralDirOffset + this.centralDirSize),
                this.zip64 &&
                  ((u += 20), (u += 12 + this.zip64EndOfCentralSize)),
                (t = f - u),
                t > 0)
              )
                this.isSignature(f, r.CENTRAL_FILE_HEADER) ||
                  (this.reader.zero = t);
              else if (t < 0)
                throw new Error(
                  "Corrupted zip: missing " + Math.abs(t) + " bytes."
                );
            },
            prepareReader: function (n) {
              var t = i.getTypeOf(n);
              if ((i.checkSupport(t), "string" !== t || u.uint8array))
                if ("nodebuffer" === t) this.reader = new o(n);
                else if (u.uint8array)
                  this.reader = new s(i.transformTo("uint8array", n));
                else {
                  if (!u.array)
                    throw new Error(
                      "Unexpected error: unsupported type '" + t + "'"
                    );
                  this.reader = new h(i.transformTo("array", n));
                }
              else
                this.reader = new e(n, this.loadOptions.optimizedBinaryString);
            },
            load: function (n) {
              this.prepareReader(n);
              this.readEndOfCentral();
              this.readCentralDir();
              this.readLocalFiles();
            },
          };
          t.exports = f;
        },
        {
          "./arrayReader": 1,
          "./nodeBufferReader": 13,
          "./object": 14,
          "./signature": 15,
          "./stringReader": 16,
          "./support": 18,
          "./uint8ArrayReader": 19,
          "./utils": 22,
          "./zipEntry": 24,
        },
      ],
      24: [
        function (n, t) {
          "use strict";
          function f(n, t) {
            this.options = n;
            this.loadOptions = t;
          }
          var u = n("./stringReader"),
            i = n("./utils"),
            e = n("./compressedObject"),
            r = n("./object"),
            o = n("./support"),
            s = 0,
            h = 3;
          f.prototype = {
            isEncrypted: function () {
              return 1 == (1 & this.bitFlag);
            },
            useUTF8: function () {
              return 2048 == (2048 & this.bitFlag);
            },
            prepareCompressedContent: function (n, t, i) {
              return function () {
                var u = n.index,
                  r;
                return n.setIndex(t), (r = n.readData(i)), n.setIndex(u), r;
              };
            },
            prepareContent: function (n, t, r, u, f) {
              return function () {
                var t = i.transformTo(
                    u.uncompressInputType,
                    this.getCompressedContent()
                  ),
                  n = u.uncompress(t);
                if (n.length !== f)
                  throw new Error("Bug : uncompressed data size mismatch");
                return n;
              };
            },
            readLocalPart: function (n) {
              var t, u;
              if (
                (n.skip(22),
                (this.fileNameLength = n.readInt(2)),
                (u = n.readInt(2)),
                (this.fileName = n.readData(this.fileNameLength)),
                n.skip(u),
                this.compressedSize == -1 || this.uncompressedSize == -1)
              )
                throw new Error(
                  "Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)"
                );
              if (((t = i.findCompression(this.compressionMethod)), null === t))
                throw new Error(
                  "Corrupted zip : compression " +
                    i.pretty(this.compressionMethod) +
                    " unknown (inner file : " +
                    i.transformTo("string", this.fileName) +
                    ")"
                );
              if (
                ((this.decompressed = new e()),
                (this.decompressed.compressedSize = this.compressedSize),
                (this.decompressed.uncompressedSize = this.uncompressedSize),
                (this.decompressed.crc32 = this.crc32),
                (this.decompressed.compressionMethod = this.compressionMethod),
                (this.decompressed.getCompressedContent =
                  this.prepareCompressedContent(
                    n,
                    n.index,
                    this.compressedSize,
                    t
                  )),
                (this.decompressed.getContent = this.prepareContent(
                  n,
                  n.index,
                  this.compressedSize,
                  t,
                  this.uncompressedSize
                )),
                this.loadOptions.checkCRC32 &&
                  ((this.decompressed = i.transformTo(
                    "string",
                    this.decompressed.getContent()
                  )),
                  r.crc32(this.decompressed) !== this.crc32))
              )
                throw new Error("Corrupted zip : CRC32 mismatch");
            },
            readCentralPart: function (n) {
              if (
                ((this.versionMadeBy = n.readInt(2)),
                (this.versionNeeded = n.readInt(2)),
                (this.bitFlag = n.readInt(2)),
                (this.compressionMethod = n.readString(2)),
                (this.date = n.readDate()),
                (this.crc32 = n.readInt(4)),
                (this.compressedSize = n.readInt(4)),
                (this.uncompressedSize = n.readInt(4)),
                (this.fileNameLength = n.readInt(2)),
                (this.extraFieldsLength = n.readInt(2)),
                (this.fileCommentLength = n.readInt(2)),
                (this.diskNumberStart = n.readInt(2)),
                (this.internalFileAttributes = n.readInt(2)),
                (this.externalFileAttributes = n.readInt(4)),
                (this.localHeaderOffset = n.readInt(4)),
                this.isEncrypted())
              )
                throw new Error("Encrypted zip are not supported");
              this.fileName = n.readData(this.fileNameLength);
              this.readExtraFields(n);
              this.parseZIP64ExtraField(n);
              this.fileComment = n.readData(this.fileCommentLength);
            },
            processAttributes: function () {
              this.unixPermissions = null;
              this.dosPermissions = null;
              var n = this.versionMadeBy >> 8;
              this.dir = !!(16 & this.externalFileAttributes);
              n === s &&
                (this.dosPermissions = 63 & this.externalFileAttributes);
              n === h &&
                (this.unixPermissions =
                  (this.externalFileAttributes >> 16) & 65535);
              this.dir || "/" !== this.fileNameStr.slice(-1) || (this.dir = !0);
            },
            parseZIP64ExtraField: function () {
              if (this.extraFields[1]) {
                var n = new u(this.extraFields[1].value);
                this.uncompressedSize === i.MAX_VALUE_32BITS &&
                  (this.uncompressedSize = n.readInt(8));
                this.compressedSize === i.MAX_VALUE_32BITS &&
                  (this.compressedSize = n.readInt(8));
                this.localHeaderOffset === i.MAX_VALUE_32BITS &&
                  (this.localHeaderOffset = n.readInt(8));
                this.diskNumberStart === i.MAX_VALUE_32BITS &&
                  (this.diskNumberStart = n.readInt(4));
              }
            },
            readExtraFields: function (n) {
              var t,
                i,
                r,
                u = n.index;
              for (
                this.extraFields = this.extraFields || {};
                n.index < u + this.extraFieldsLength;

              )
                (t = n.readInt(2)),
                  (i = n.readInt(2)),
                  (r = n.readString(i)),
                  (this.extraFields[t] = { id: t, length: i, value: r });
            },
            handleUTF8: function () {
              var u = o.uint8array ? "uint8array" : "array",
                n,
                f,
                t,
                e;
              this.useUTF8()
                ? ((this.fileNameStr = r.utf8decode(this.fileName)),
                  (this.fileCommentStr = r.utf8decode(this.fileComment)))
                : ((n = this.findExtraFieldUnicodePath()),
                  null !== n
                    ? (this.fileNameStr = n)
                    : ((f = i.transformTo(u, this.fileName)),
                      (this.fileNameStr = this.loadOptions.decodeFileName(f))),
                  (t = this.findExtraFieldUnicodeComment()),
                  null !== t
                    ? (this.fileCommentStr = t)
                    : ((e = i.transformTo(u, this.fileComment)),
                      (this.fileCommentStr =
                        this.loadOptions.decodeFileName(e))));
            },
            findExtraFieldUnicodePath: function () {
              var t = this.extraFields[28789],
                n;
              return t
                ? ((n = new u(t.value)),
                  1 !== n.readInt(1)
                    ? null
                    : r.crc32(this.fileName) !== n.readInt(4)
                    ? null
                    : r.utf8decode(n.readString(t.length - 5)))
                : null;
            },
            findExtraFieldUnicodeComment: function () {
              var t = this.extraFields[25461],
                n;
              return t
                ? ((n = new u(t.value)),
                  1 !== n.readInt(1)
                    ? null
                    : r.crc32(this.fileComment) !== n.readInt(4)
                    ? null
                    : r.utf8decode(n.readString(t.length - 5)))
                : null;
            },
          };
          t.exports = f;
        },
        {
          "./compressedObject": 3,
          "./object": 14,
          "./stringReader": 16,
          "./support": 18,
          "./utils": 22,
        },
      ],
      25: [
        function (n, t) {
          "use strict";
          var r = n("./lib/utils/common").assign,
            u = n("./lib/deflate"),
            f = n("./lib/inflate"),
            e = n("./lib/zlib/constants"),
            i = {};
          r(i, u, f, e);
          t.exports = i;
        },
        {
          "./lib/deflate": 26,
          "./lib/inflate": 27,
          "./lib/utils/common": 28,
          "./lib/zlib/constants": 31,
        },
      ],
      26: [
        function (n, t, i) {
          "use strict";
          function r(n) {
            var t, i, o;
            if (!(this instanceof r)) return new r(n);
            if (
              ((this.options = e.assign(
                {
                  level: k,
                  method: g,
                  chunkSize: 16384,
                  windowBits: 15,
                  memLevel: 8,
                  strategy: d,
                  to: "",
                },
                n || {}
              )),
              (t = this.options),
              t.raw && t.windowBits > 0
                ? (t.windowBits = -t.windowBits)
                : t.gzip &&
                  t.windowBits > 0 &&
                  t.windowBits < 16 &&
                  (t.windowBits += 16),
              (this.err = 0),
              (this.msg = ""),
              (this.ended = !1),
              (this.chunks = []),
              (this.strm = new w()),
              (this.strm.avail_out = 0),
              (i = f.deflateInit2(
                this.strm,
                t.level,
                t.method,
                t.windowBits,
                t.memLevel,
                t.strategy
              )),
              i !== u)
            )
              throw new Error(c[i]);
            if (
              (t.header && f.deflateSetHeader(this.strm, t.header),
              t.dictionary)
            ) {
              if (
                ((o =
                  "string" == typeof t.dictionary
                    ? s.string2buf(t.dictionary)
                    : "[object ArrayBuffer]" === l.call(t.dictionary)
                    ? new Uint8Array(t.dictionary)
                    : t.dictionary),
                (i = f.deflateSetDictionary(this.strm, o)),
                i !== u)
              )
                throw new Error(c[i]);
              this._dict_set = !0;
            }
          }
          function o(n, t) {
            var i = new r(t);
            if ((i.push(n, !0), i.err)) throw i.msg;
            return i.result;
          }
          function y(n, t) {
            return (t = t || {}), (t.raw = !0), o(n, t);
          }
          function p(n, t) {
            return (t = t || {}), (t.gzip = !0), o(n, t);
          }
          var f = n("./zlib/deflate"),
            e = n("./utils/common"),
            s = n("./utils/strings"),
            c = n("./zlib/messages"),
            w = n("./zlib/zstream"),
            l = Object.prototype.toString,
            b = 0,
            h = 4,
            u = 0,
            a = 1,
            v = 2,
            k = -1,
            d = 0,
            g = 8;
          r.prototype.push = function (n, t) {
            var r,
              o,
              i = this.strm,
              c = this.options.chunkSize;
            if (this.ended) return !1;
            o = t === ~~t ? t : t === !0 ? h : b;
            i.input =
              "string" == typeof n
                ? s.string2buf(n)
                : "[object ArrayBuffer]" === l.call(n)
                ? new Uint8Array(n)
                : n;
            i.next_in = 0;
            i.avail_in = i.input.length;
            do {
              if (
                (0 === i.avail_out &&
                  ((i.output = new e.Buf8(c)),
                  (i.next_out = 0),
                  (i.avail_out = c)),
                (r = f.deflate(i, o)),
                r !== a && r !== u)
              )
                return this.onEnd(r), (this.ended = !0), !1;
              (0 !== i.avail_out &&
                (0 !== i.avail_in || (o !== h && o !== v))) ||
                ("string" === this.options.to
                  ? this.onData(
                      s.buf2binstring(e.shrinkBuf(i.output, i.next_out))
                    )
                  : this.onData(e.shrinkBuf(i.output, i.next_out)));
            } while ((i.avail_in > 0 || 0 === i.avail_out) && r !== a);
            return o === h
              ? ((r = f.deflateEnd(this.strm)),
                this.onEnd(r),
                (this.ended = !0),
                r === u)
              : o !== v || (this.onEnd(u), (i.avail_out = 0), !0);
          };
          r.prototype.onData = function (n) {
            this.chunks.push(n);
          };
          r.prototype.onEnd = function (n) {
            n === u &&
              (this.result =
                "string" === this.options.to
                  ? this.chunks.join("")
                  : e.flattenChunks(this.chunks));
            this.chunks = [];
            this.err = n;
            this.msg = this.strm.msg;
          };
          i.Deflate = r;
          i.deflate = o;
          i.deflateRaw = y;
          i.gzip = p;
        },
        {
          "./utils/common": 28,
          "./utils/strings": 29,
          "./zlib/deflate": 33,
          "./zlib/messages": 38,
          "./zlib/zstream": 40,
        },
      ],
      27: [
        function (n, t, i) {
          "use strict";
          function u(n) {
            var t, i;
            if (!(this instanceof u)) return new u(n);
            if (
              ((this.options = e.assign(
                { chunkSize: 16384, windowBits: 0, to: "" },
                n || {}
              )),
              (t = this.options),
              t.raw &&
                t.windowBits >= 0 &&
                t.windowBits < 16 &&
                ((t.windowBits = -t.windowBits),
                0 === t.windowBits && (t.windowBits = -15)),
              !(t.windowBits >= 0 && t.windowBits < 16) ||
                (n && n.windowBits) ||
                (t.windowBits += 32),
              t.windowBits > 15 &&
                t.windowBits < 48 &&
                0 == (15 & t.windowBits) &&
                (t.windowBits |= 15),
              (this.err = 0),
              (this.msg = ""),
              (this.ended = !1),
              (this.chunks = []),
              (this.strm = new a()),
              (this.strm.avail_out = 0),
              (i = f.inflateInit2(this.strm, t.windowBits)),
              i !== r.Z_OK)
            )
              throw new Error(l[i]);
            this.header = new v();
            f.inflateGetHeader(this.strm, this.header);
          }
          function s(n, t) {
            var i = new u(t);
            if ((i.push(n, !0), i.err)) throw i.msg;
            return i.result;
          }
          function c(n, t) {
            return (t = t || {}), (t.raw = !0), s(n, t);
          }
          var f = n("./zlib/inflate"),
            e = n("./utils/common"),
            o = n("./utils/strings"),
            r = n("./zlib/constants"),
            l = n("./zlib/messages"),
            a = n("./zlib/zstream"),
            v = n("./zlib/gzheader"),
            h = Object.prototype.toString;
          u.prototype.push = function (n, t) {
            var u,
              s,
              a,
              l,
              p,
              w,
              i = this.strm,
              v = this.options.chunkSize,
              c = this.options.dictionary,
              y = !1;
            if (this.ended) return !1;
            s = t === ~~t ? t : t === !0 ? r.Z_FINISH : r.Z_NO_FLUSH;
            i.input =
              "string" == typeof n
                ? o.binstring2buf(n)
                : "[object ArrayBuffer]" === h.call(n)
                ? new Uint8Array(n)
                : n;
            i.next_in = 0;
            i.avail_in = i.input.length;
            do {
              if (
                (0 === i.avail_out &&
                  ((i.output = new e.Buf8(v)),
                  (i.next_out = 0),
                  (i.avail_out = v)),
                (u = f.inflate(i, r.Z_NO_FLUSH)),
                u === r.Z_NEED_DICT &&
                  c &&
                  ((w =
                    "string" == typeof c
                      ? o.string2buf(c)
                      : "[object ArrayBuffer]" === h.call(c)
                      ? new Uint8Array(c)
                      : c),
                  (u = f.inflateSetDictionary(this.strm, w))),
                u === r.Z_BUF_ERROR && y === !0 && ((u = r.Z_OK), (y = !1)),
                u !== r.Z_STREAM_END && u !== r.Z_OK)
              )
                return this.onEnd(u), (this.ended = !0), !1;
              i.next_out &&
                ((0 !== i.avail_out &&
                  u !== r.Z_STREAM_END &&
                  (0 !== i.avail_in ||
                    (s !== r.Z_FINISH && s !== r.Z_SYNC_FLUSH))) ||
                  ("string" === this.options.to
                    ? ((a = o.utf8border(i.output, i.next_out)),
                      (l = i.next_out - a),
                      (p = o.buf2string(i.output, a)),
                      (i.next_out = l),
                      (i.avail_out = v - l),
                      l && e.arraySet(i.output, i.output, a, l, 0),
                      this.onData(p))
                    : this.onData(e.shrinkBuf(i.output, i.next_out))));
              0 === i.avail_in && 0 === i.avail_out && (y = !0);
            } while (
              (i.avail_in > 0 || 0 === i.avail_out) &&
              u !== r.Z_STREAM_END
            );
            return (
              u === r.Z_STREAM_END && (s = r.Z_FINISH),
              s === r.Z_FINISH
                ? ((u = f.inflateEnd(this.strm)),
                  this.onEnd(u),
                  (this.ended = !0),
                  u === r.Z_OK)
                : s !== r.Z_SYNC_FLUSH ||
                  (this.onEnd(r.Z_OK), (i.avail_out = 0), !0)
            );
          };
          u.prototype.onData = function (n) {
            this.chunks.push(n);
          };
          u.prototype.onEnd = function (n) {
            n === r.Z_OK &&
              (this.result =
                "string" === this.options.to
                  ? this.chunks.join("")
                  : e.flattenChunks(this.chunks));
            this.chunks = [];
            this.err = n;
            this.msg = this.strm.msg;
          };
          i.Inflate = u;
          i.inflate = s;
          i.inflateRaw = c;
          i.ungzip = s;
        },
        {
          "./utils/common": 28,
          "./utils/strings": 29,
          "./zlib/constants": 31,
          "./zlib/gzheader": 34,
          "./zlib/inflate": 36,
          "./zlib/messages": 38,
          "./zlib/zstream": 40,
        },
      ],
      28: [
        function (n, t, i) {
          "use strict";
          var f =
              "undefined" != typeof Uint8Array &&
              "undefined" != typeof Uint16Array &&
              "undefined" != typeof Int32Array,
            r,
            u;
          i.assign = function (n) {
            for (
              var t, i, r = Array.prototype.slice.call(arguments, 1);
              r.length;

            )
              if (((t = r.shift()), t)) {
                if ("object" != typeof t)
                  throw new TypeError(t + "must be non-object");
                for (i in t) t.hasOwnProperty(i) && (n[i] = t[i]);
              }
            return n;
          };
          i.shrinkBuf = function (n, t) {
            return n.length === t
              ? n
              : n.subarray
              ? n.subarray(0, t)
              : ((n.length = t), n);
          };
          r = {
            arraySet: function (n, t, i, r, u) {
              if (t.subarray && n.subarray)
                return void n.set(t.subarray(i, i + r), u);
              for (var f = 0; f < r; f++) n[u + f] = t[i + f];
            },
            flattenChunks: function (n) {
              var t, i, r, u, f, e;
              for (r = 0, t = 0, i = n.length; t < i; t++) r += n[t].length;
              for (
                e = new Uint8Array(r), u = 0, t = 0, i = n.length;
                t < i;
                t++
              )
                (f = n[t]), e.set(f, u), (u += f.length);
              return e;
            },
          };
          u = {
            arraySet: function (n, t, i, r, u) {
              for (var f = 0; f < r; f++) n[u + f] = t[i + f];
            },
            flattenChunks: function (n) {
              return [].concat.apply([], n);
            },
          };
          i.setTyped = function (n) {
            n
              ? ((i.Buf8 = Uint8Array),
                (i.Buf16 = Uint16Array),
                (i.Buf32 = Int32Array),
                i.assign(i, r))
              : ((i.Buf8 = Array),
                (i.Buf16 = Array),
                (i.Buf32 = Array),
                i.assign(i, u));
          };
          i.setTyped(f);
        },
        {},
      ],
      29: [
        function (n, t, i) {
          "use strict";
          function e(n, t) {
            if (t < 65537 && ((n.subarray && s) || (!n.subarray && o)))
              return String.fromCharCode.apply(null, f.shrinkBuf(n, t));
            for (var r = "", i = 0; i < t; i++) r += String.fromCharCode(n[i]);
            return r;
          }
          var f = n("./common"),
            o = !0,
            s = !0,
            u,
            r;
          try {
            String.fromCharCode.apply(null, [0]);
          } catch (h) {
            o = !1;
          }
          try {
            String.fromCharCode.apply(null, new Uint8Array(1));
          } catch (h) {
            s = !1;
          }
          for (u = new f.Buf8(256), r = 0; r < 256; r++)
            u[r] =
              r >= 252
                ? 6
                : r >= 248
                ? 5
                : r >= 240
                ? 4
                : r >= 224
                ? 3
                : r >= 192
                ? 2
                : 1;
          u[254] = u[254] = 1;
          i.string2buf = function (n) {
            for (var r, t, e, u, o = n.length, s = 0, i = 0; i < o; i++)
              (t = n.charCodeAt(i)),
                55296 == (64512 & t) &&
                  i + 1 < o &&
                  ((e = n.charCodeAt(i + 1)),
                  56320 == (64512 & e) &&
                    ((t = 65536 + ((t - 55296) << 10) + (e - 56320)), i++)),
                (s += t < 128 ? 1 : t < 2048 ? 2 : t < 65536 ? 3 : 4);
            for (r = new f.Buf8(s), u = 0, i = 0; u < s; i++)
              (t = n.charCodeAt(i)),
                55296 == (64512 & t) &&
                  i + 1 < o &&
                  ((e = n.charCodeAt(i + 1)),
                  56320 == (64512 & e) &&
                    ((t = 65536 + ((t - 55296) << 10) + (e - 56320)), i++)),
                t < 128
                  ? (r[u++] = t)
                  : t < 2048
                  ? ((r[u++] = 192 | (t >>> 6)), (r[u++] = 128 | (63 & t)))
                  : t < 65536
                  ? ((r[u++] = 224 | (t >>> 12)),
                    (r[u++] = 128 | ((t >>> 6) & 63)),
                    (r[u++] = 128 | (63 & t)))
                  : ((r[u++] = 240 | (t >>> 18)),
                    (r[u++] = 128 | ((t >>> 12) & 63)),
                    (r[u++] = 128 | ((t >>> 6) & 63)),
                    (r[u++] = 128 | (63 & t)));
            return r;
          };
          i.buf2binstring = function (n) {
            return e(n, n.length);
          };
          i.binstring2buf = function (n) {
            for (var i = new f.Buf8(n.length), t = 0, r = i.length; t < r; t++)
              i[t] = n.charCodeAt(t);
            return i;
          };
          i.buf2string = function (n, t) {
            for (
              var i, f, h = t || n.length, o = new Array(2 * h), r = 0, s = 0;
              s < h;

            )
              if (((i = n[s++]), i < 128)) o[r++] = i;
              else if (((f = u[i]), f > 4)) (o[r++] = 65533), (s += f - 1);
              else {
                for (i &= 2 === f ? 31 : 3 === f ? 15 : 7; f > 1 && s < h; )
                  (i = (i << 6) | (63 & n[s++])), f--;
                f > 1
                  ? (o[r++] = 65533)
                  : i < 65536
                  ? (o[r++] = i)
                  : ((i -= 65536),
                    (o[r++] = 55296 | ((i >> 10) & 1023)),
                    (o[r++] = 56320 | (1023 & i)));
              }
            return e(o, r);
          };
          i.utf8border = function (n, t) {
            var i;
            for (
              t = t || n.length, t > n.length && (t = n.length), i = t - 1;
              i >= 0 && 128 == (192 & n[i]);

            )
              i--;
            return i < 0 ? t : 0 === i ? t : i + u[n[i]] > t ? i : t;
          };
        },
        { "./common": 28 },
      ],
      30: [
        function (n, t) {
          "use strict";
          function i(n, t, i, r) {
            for (
              var u = (65535 & n) | 0, f = ((n >>> 16) & 65535) | 0, e = 0;
              0 !== i;

            ) {
              e = i > 2e3 ? 2e3 : i;
              i -= e;
              do (u = (u + t[r++]) | 0), (f = (f + u) | 0);
              while (--e);
              u %= 65521;
              f %= 65521;
            }
            return u | (f << 16) | 0;
          }
          t.exports = i;
        },
        {},
      ],
      31: [
        function (n, t) {
          "use strict";
          t.exports = {
            Z_NO_FLUSH: 0,
            Z_PARTIAL_FLUSH: 1,
            Z_SYNC_FLUSH: 2,
            Z_FULL_FLUSH: 3,
            Z_FINISH: 4,
            Z_BLOCK: 5,
            Z_TREES: 6,
            Z_OK: 0,
            Z_STREAM_END: 1,
            Z_NEED_DICT: 2,
            Z_ERRNO: -1,
            Z_STREAM_ERROR: -2,
            Z_DATA_ERROR: -3,
            Z_BUF_ERROR: -5,
            Z_NO_COMPRESSION: 0,
            Z_BEST_SPEED: 1,
            Z_BEST_COMPRESSION: 9,
            Z_DEFAULT_COMPRESSION: -1,
            Z_FILTERED: 1,
            Z_HUFFMAN_ONLY: 2,
            Z_RLE: 3,
            Z_FIXED: 4,
            Z_DEFAULT_STRATEGY: 0,
            Z_BINARY: 0,
            Z_TEXT: 1,
            Z_UNKNOWN: 2,
            Z_DEFLATED: 8,
          };
        },
        {},
      ],
      32: [
        function (n, t) {
          "use strict";
          function i() {
            for (var n, r, i = [], t = 0; t < 256; t++) {
              for (n = t, r = 0; r < 8; r++)
                n = 1 & n ? 3988292384 ^ (n >>> 1) : n >>> 1;
              i[t] = n;
            }
            return i;
          }
          function r(n, t, i, r) {
            var e = u,
              o = r + i,
              f;
            for (n ^= -1, f = r; f < o; f++)
              n = (n >>> 8) ^ e[255 & (n ^ t[f])];
            return n ^ -1;
          }
          var u = i();
          t.exports = r;
        },
        {},
      ],
      33: [
        function (n, t, i) {
          "use strict";
          function v(n, t) {
            return (n.msg = wi[t]), t;
          }
          function kt(n) {
            return (n << 1) - (n > 4 ? 9 : 0);
          }
          function y(n) {
            for (var t = n.length; --t >= 0; ) n[t] = 0;
          }
          function p(n) {
            var i = n.state,
              t = i.pending;
            t > n.avail_out && (t = n.avail_out);
            0 !== t &&
              (o.arraySet(
                n.output,
                i.pending_buf,
                i.pending_out,
                t,
                n.next_out
              ),
              (n.next_out += t),
              (i.pending_out += t),
              (n.total_out += t),
              (n.avail_out -= t),
              (i.pending -= t),
              0 === i.pending && (i.pending_out = 0));
          }
          function e(n, t) {
            s._tr_flush_block(
              n,
              n.block_start >= 0 ? n.block_start : -1,
              n.strstart - n.block_start,
              t
            );
            n.block_start = n.strstart;
            p(n.strm);
          }
          function u(n, t) {
            n.pending_buf[n.pending++] = t;
          }
          function ft(n, t) {
            n.pending_buf[n.pending++] = (t >>> 8) & 255;
            n.pending_buf[n.pending++] = 255 & t;
          }
          function fi(n, t, i, r) {
            var u = n.avail_in;
            return (
              u > r && (u = r),
              0 === u
                ? 0
                : ((n.avail_in -= u),
                  o.arraySet(t, n.input, n.next_in, u, i),
                  1 === n.state.wrap
                    ? (n.adler = ii(n.adler, t, u, i))
                    : 2 === n.state.wrap && (n.adler = w(n.adler, t, u, i)),
                  (n.next_in += u),
                  (n.total_in += u),
                  u)
            );
          }
          function dt(n, t) {
            var u,
              e,
              h = n.max_chain_length,
              r = n.strstart,
              f = n.prev_length,
              o = n.nice_match,
              v = n.strstart > n.w_size - c ? n.strstart - (n.w_size - c) : 0,
              i = n.window,
              y = n.w_mask,
              p = n.prev,
              s = n.strstart + k,
              l = i[r + f - 1],
              a = i[r + f];
            n.prev_length >= n.good_match && (h >>= 2);
            o > n.lookahead && (o = n.lookahead);
            do
              if (
                ((u = t),
                i[u + f] === a &&
                  i[u + f - 1] === l &&
                  i[u] === i[r] &&
                  i[++u] === i[r + 1])
              ) {
                r += 2;
                u++;
                do;
                while (
                  i[++r] === i[++u] &&
                  i[++r] === i[++u] &&
                  i[++r] === i[++u] &&
                  i[++r] === i[++u] &&
                  i[++r] === i[++u] &&
                  i[++r] === i[++u] &&
                  i[++r] === i[++u] &&
                  i[++r] === i[++u] &&
                  r < s
                );
                if (((e = k - (s - r)), (r = s - k), e > f)) {
                  if (((n.match_start = t), (f = e), e >= o)) break;
                  l = i[r + f - 1];
                  a = i[r + f];
                }
              }
            while ((t = p[t & y]) > v && 0 != --h);
            return f <= n.lookahead ? f : n.lookahead;
          }
          function d(n) {
            var f,
              i,
              e,
              s,
              u,
              t = n.w_size;
            do {
              if (
                ((s = n.window_size - n.lookahead - n.strstart),
                n.strstart >= t + (t - c))
              ) {
                o.arraySet(n.window, n.window, t, t, 0);
                n.match_start -= t;
                n.strstart -= t;
                n.block_start -= t;
                i = n.hash_size;
                f = i;
                do (e = n.head[--f]), (n.head[f] = e >= t ? e - t : 0);
                while (--i);
                i = t;
                f = i;
                do (e = n.prev[--f]), (n.prev[f] = e >= t ? e - t : 0);
                while (--i);
                s += t;
              }
              if (0 === n.strm.avail_in) break;
              if (
                ((i = fi(n.strm, n.window, n.strstart + n.lookahead, s)),
                (n.lookahead += i),
                n.lookahead + n.insert >= r)
              )
                for (
                  u = n.strstart - n.insert,
                    n.ins_h = n.window[u],
                    n.ins_h =
                      ((n.ins_h << n.hash_shift) ^ n.window[u + 1]) &
                      n.hash_mask;
                  n.insert &&
                  ((n.ins_h =
                    ((n.ins_h << n.hash_shift) ^ n.window[u + r - 1]) &
                    n.hash_mask),
                  (n.prev[u & n.w_mask] = n.head[n.ins_h]),
                  (n.head[n.ins_h] = u),
                  u++,
                  n.insert--,
                  !(n.lookahead + n.insert < r));

                );
            } while (n.lookahead < c && 0 !== n.strm.avail_in);
          }
          function ei(n, t) {
            var r = 65535,
              i;
            for (
              r > n.pending_buf_size - 5 && (r = n.pending_buf_size - 5);
              ;

            ) {
              if (n.lookahead <= 1) {
                if ((d(n), 0 === n.lookahead && t === g)) return f;
                if (0 === n.lookahead) break;
              }
              if (
                ((n.strstart += n.lookahead),
                (n.lookahead = 0),
                (i = n.block_start + r),
                (0 === n.strstart || n.strstart >= i) &&
                  ((n.lookahead = n.strstart - i),
                  (n.strstart = i),
                  e(n, !1),
                  0 === n.strm.avail_out)) ||
                (n.strstart - n.block_start >= n.w_size - c &&
                  (e(n, !1), 0 === n.strm.avail_out))
              )
                return f;
            }
            return (
              (n.insert = 0),
              t === b
                ? (e(n, !0), 0 === n.strm.avail_out ? tt : ut)
                : n.strstart > n.block_start &&
                  (e(n, !1), 0 === n.strm.avail_out)
                ? f
                : f
            );
          }
          function yt(n, t) {
            for (var i, u; ; ) {
              if (n.lookahead < c) {
                if ((d(n), n.lookahead < c && t === g)) return f;
                if (0 === n.lookahead) break;
              }
              if (
                ((i = 0),
                n.lookahead >= r &&
                  ((n.ins_h =
                    ((n.ins_h << n.hash_shift) ^ n.window[n.strstart + r - 1]) &
                    n.hash_mask),
                  (i = n.prev[n.strstart & n.w_mask] = n.head[n.ins_h]),
                  (n.head[n.ins_h] = n.strstart)),
                0 !== i &&
                  n.strstart - i <= n.w_size - c &&
                  (n.match_length = dt(n, i)),
                n.match_length >= r)
              )
                if (
                  ((u = s._tr_tally(
                    n,
                    n.strstart - n.match_start,
                    n.match_length - r
                  )),
                  (n.lookahead -= n.match_length),
                  n.match_length <= n.max_lazy_match && n.lookahead >= r)
                ) {
                  n.match_length--;
                  do
                    n.strstart++,
                      (n.ins_h =
                        ((n.ins_h << n.hash_shift) ^
                          n.window[n.strstart + r - 1]) &
                        n.hash_mask),
                      (i = n.prev[n.strstart & n.w_mask] = n.head[n.ins_h]),
                      (n.head[n.ins_h] = n.strstart);
                  while (0 != --n.match_length);
                  n.strstart++;
                } else
                  (n.strstart += n.match_length),
                    (n.match_length = 0),
                    (n.ins_h = n.window[n.strstart]),
                    (n.ins_h =
                      ((n.ins_h << n.hash_shift) ^ n.window[n.strstart + 1]) &
                      n.hash_mask);
              else
                (u = s._tr_tally(n, 0, n.window[n.strstart])),
                  n.lookahead--,
                  n.strstart++;
              if (u && (e(n, !1), 0 === n.strm.avail_out)) return f;
            }
            return (
              (n.insert = n.strstart < r - 1 ? n.strstart : r - 1),
              t === b
                ? (e(n, !0), 0 === n.strm.avail_out ? tt : ut)
                : n.last_lit && (e(n, !1), 0 === n.strm.avail_out)
                ? f
                : ot
            );
          }
          function it(n, t) {
            for (var i, u, o; ; ) {
              if (n.lookahead < c) {
                if ((d(n), n.lookahead < c && t === g)) return f;
                if (0 === n.lookahead) break;
              }
              if (
                ((i = 0),
                n.lookahead >= r &&
                  ((n.ins_h =
                    ((n.ins_h << n.hash_shift) ^ n.window[n.strstart + r - 1]) &
                    n.hash_mask),
                  (i = n.prev[n.strstart & n.w_mask] = n.head[n.ins_h]),
                  (n.head[n.ins_h] = n.strstart)),
                (n.prev_length = n.match_length),
                (n.prev_match = n.match_start),
                (n.match_length = r - 1),
                0 !== i &&
                  n.prev_length < n.max_lazy_match &&
                  n.strstart - i <= n.w_size - c &&
                  ((n.match_length = dt(n, i)),
                  n.match_length <= 5 &&
                    (n.strategy === nr ||
                      (n.match_length === r &&
                        n.strstart - n.match_start > 4096)) &&
                    (n.match_length = r - 1)),
                n.prev_length >= r && n.match_length <= n.prev_length)
              ) {
                o = n.strstart + n.lookahead - r;
                u = s._tr_tally(
                  n,
                  n.strstart - 1 - n.prev_match,
                  n.prev_length - r
                );
                n.lookahead -= n.prev_length - 1;
                n.prev_length -= 2;
                do
                  ++n.strstart <= o &&
                    ((n.ins_h =
                      ((n.ins_h << n.hash_shift) ^
                        n.window[n.strstart + r - 1]) &
                      n.hash_mask),
                    (i = n.prev[n.strstart & n.w_mask] = n.head[n.ins_h]),
                    (n.head[n.ins_h] = n.strstart));
                while (0 != --n.prev_length);
                if (
                  ((n.match_available = 0),
                  (n.match_length = r - 1),
                  n.strstart++,
                  u && (e(n, !1), 0 === n.strm.avail_out))
                )
                  return f;
              } else if (n.match_available) {
                if (
                  ((u = s._tr_tally(n, 0, n.window[n.strstart - 1])),
                  u && e(n, !1),
                  n.strstart++,
                  n.lookahead--,
                  0 === n.strm.avail_out)
                )
                  return f;
              } else (n.match_available = 1), n.strstart++, n.lookahead--;
            }
            return (
              n.match_available &&
                ((u = s._tr_tally(n, 0, n.window[n.strstart - 1])),
                (n.match_available = 0)),
              (n.insert = n.strstart < r - 1 ? n.strstart : r - 1),
              t === b
                ? (e(n, !0), 0 === n.strm.avail_out ? tt : ut)
                : n.last_lit && (e(n, !1), 0 === n.strm.avail_out)
                ? f
                : ot
            );
          }
          function oi(n, t) {
            for (var h, u, i, c, o = n.window; ; ) {
              if (n.lookahead <= k) {
                if ((d(n), n.lookahead <= k && t === g)) return f;
                if (0 === n.lookahead) break;
              }
              if (
                ((n.match_length = 0),
                n.lookahead >= r &&
                  n.strstart > 0 &&
                  ((i = n.strstart - 1),
                  (u = o[i]),
                  u === o[++i] && u === o[++i] && u === o[++i]))
              ) {
                c = n.strstart + k;
                do;
                while (
                  u === o[++i] &&
                  u === o[++i] &&
                  u === o[++i] &&
                  u === o[++i] &&
                  u === o[++i] &&
                  u === o[++i] &&
                  u === o[++i] &&
                  u === o[++i] &&
                  i < c
                );
                n.match_length = k - (c - i);
                n.match_length > n.lookahead && (n.match_length = n.lookahead);
              }
              if (
                (n.match_length >= r
                  ? ((h = s._tr_tally(n, 1, n.match_length - r)),
                    (n.lookahead -= n.match_length),
                    (n.strstart += n.match_length),
                    (n.match_length = 0))
                  : ((h = s._tr_tally(n, 0, n.window[n.strstart])),
                    n.lookahead--,
                    n.strstart++),
                h && (e(n, !1), 0 === n.strm.avail_out))
              )
                return f;
            }
            return (
              (n.insert = 0),
              t === b
                ? (e(n, !0), 0 === n.strm.avail_out ? tt : ut)
                : n.last_lit && (e(n, !1), 0 === n.strm.avail_out)
                ? f
                : ot
            );
          }
          function si(n, t) {
            for (var i; ; ) {
              if (0 === n.lookahead && (d(n), 0 === n.lookahead)) {
                if (t === g) return f;
                break;
              }
              if (
                ((n.match_length = 0),
                (i = s._tr_tally(n, 0, n.window[n.strstart])),
                n.lookahead--,
                n.strstart++,
                i && (e(n, !1), 0 === n.strm.avail_out))
              )
                return f;
            }
            return (
              (n.insert = 0),
              t === b
                ? (e(n, !0), 0 === n.strm.avail_out ? tt : ut)
                : n.last_lit && (e(n, !1), 0 === n.strm.avail_out)
                ? f
                : ot
            );
          }
          function l(n, t, i, r, u) {
            this.good_length = n;
            this.max_lazy = t;
            this.nice_length = i;
            this.max_chain = r;
            this.func = u;
          }
          function hi(n) {
            n.window_size = 2 * n.w_size;
            y(n.head);
            n.max_lazy_match = rt[n.level].max_lazy;
            n.good_match = rt[n.level].good_length;
            n.nice_match = rt[n.level].nice_length;
            n.max_chain_length = rt[n.level].max_chain;
            n.strstart = 0;
            n.block_start = 0;
            n.lookahead = 0;
            n.insert = 0;
            n.match_length = n.prev_length = r - 1;
            n.match_available = 0;
            n.ins_h = 0;
          }
          function ci() {
            this.strm = null;
            this.status = 0;
            this.pending_buf = null;
            this.pending_buf_size = 0;
            this.pending_out = 0;
            this.pending = 0;
            this.wrap = 0;
            this.gzhead = null;
            this.gzindex = 0;
            this.method = ht;
            this.last_flush = -1;
            this.w_size = 0;
            this.w_bits = 0;
            this.w_mask = 0;
            this.window = null;
            this.window_size = 0;
            this.prev = null;
            this.head = null;
            this.ins_h = 0;
            this.hash_size = 0;
            this.hash_bits = 0;
            this.hash_mask = 0;
            this.hash_shift = 0;
            this.block_start = 0;
            this.match_length = 0;
            this.prev_match = 0;
            this.match_available = 0;
            this.strstart = 0;
            this.match_start = 0;
            this.lookahead = 0;
            this.prev_length = 0;
            this.max_chain_length = 0;
            this.max_lazy_match = 0;
            this.level = 0;
            this.strategy = 0;
            this.good_match = 0;
            this.nice_match = 0;
            this.dyn_ltree = new o.Buf16(2 * cr);
            this.dyn_dtree = new o.Buf16(2 * (2 * sr + 1));
            this.bl_tree = new o.Buf16(2 * (2 * hr + 1));
            y(this.dyn_ltree);
            y(this.dyn_dtree);
            y(this.bl_tree);
            this.l_desc = null;
            this.d_desc = null;
            this.bl_desc = null;
            this.bl_count = new o.Buf16(lr + 1);
            this.heap = new o.Buf16(2 * wt + 1);
            y(this.heap);
            this.heap_len = 0;
            this.heap_max = 0;
            this.depth = new o.Buf16(2 * wt + 1);
            y(this.depth);
            this.l_buf = 0;
            this.lit_bufsize = 0;
            this.last_lit = 0;
            this.d_buf = 0;
            this.opt_len = 0;
            this.static_len = 0;
            this.matches = 0;
            this.insert = 0;
            this.bi_buf = 0;
            this.bi_valid = 0;
          }
          function gt(n) {
            var t;
            return n && n.state
              ? ((n.total_in = n.total_out = 0),
                (n.data_type = ur),
                (t = n.state),
                (t.pending = 0),
                (t.pending_out = 0),
                t.wrap < 0 && (t.wrap = -t.wrap),
                (t.status = t.wrap ? ct : nt),
                (n.adler = 2 === t.wrap ? 0 : 1),
                (t.last_flush = g),
                s._tr_init(t),
                a)
              : v(n, h);
          }
          function ni(n) {
            var t = gt(n);
            return t === a && hi(n.state), t;
          }
          function li(n, t) {
            return n && n.state
              ? 2 !== n.state.wrap
                ? h
                : ((n.state.gzhead = t), a)
              : h;
          }
          function ti(n, t, i, u, f, e) {
            var c, s;
            return n
              ? ((c = 1),
                t === gi && (t = 6),
                u < 0 ? ((c = 0), (u = -u)) : u > 15 && ((c = 2), (u -= 16)),
                f < 1 ||
                  f > fr ||
                  i !== ht ||
                  u < 8 ||
                  u > 15 ||
                  t < 0 ||
                  t > 9 ||
                  e < 0 ||
                  e > ir)
                ? v(n, h)
                : (8 === u && (u = 9),
                  (s = new ci()),
                  (n.state = s),
                  (s.strm = n),
                  (s.wrap = c),
                  (s.gzhead = null),
                  (s.w_bits = u),
                  (s.w_size = 1 << s.w_bits),
                  (s.w_mask = s.w_size - 1),
                  (s.hash_bits = f + 7),
                  (s.hash_size = 1 << s.hash_bits),
                  (s.hash_mask = s.hash_size - 1),
                  (s.hash_shift = ~~((s.hash_bits + r - 1) / r)),
                  (s.window = new o.Buf8(2 * s.w_size)),
                  (s.head = new o.Buf16(s.hash_size)),
                  (s.prev = new o.Buf16(s.w_size)),
                  (s.lit_bufsize = 1 << (f + 6)),
                  (s.pending_buf_size = 4 * s.lit_bufsize),
                  (s.pending_buf = new o.Buf8(s.pending_buf_size)),
                  (s.d_buf = 1 * s.lit_bufsize),
                  (s.l_buf = 3 * s.lit_bufsize),
                  (s.level = t),
                  (s.strategy = e),
                  (s.method = i),
                  ni(n))
              : h;
          }
          function ai(n, t) {
            return ti(n, t, ht, er, or, rr);
          }
          function vi(n, t) {
            var k, i, r, e, o, l, c;
            if (!n || !n.state || t > ri || t < 0) return n ? v(n, h) : h;
            if (
              ((i = n.state),
              !n.output ||
                (!n.input && 0 !== n.avail_in) ||
                (i.status === et && t !== b))
            )
              return v(n, 0 === n.avail_out ? pt : h);
            if (
              (((i.strm = n),
              (k = i.last_flush),
              (i.last_flush = t),
              i.status === ct) &&
                (2 === i.wrap
                  ? ((n.adler = 0),
                    u(i, 31),
                    u(i, 139),
                    u(i, 8),
                    i.gzhead
                      ? (u(
                          i,
                          (i.gzhead.text ? 1 : 0) +
                            (i.gzhead.hcrc ? 2 : 0) +
                            (i.gzhead.extra ? 4 : 0) +
                            (i.gzhead.name ? 8 : 0) +
                            (i.gzhead.comment ? 16 : 0)
                        ),
                        u(i, 255 & i.gzhead.time),
                        u(i, (i.gzhead.time >> 8) & 255),
                        u(i, (i.gzhead.time >> 16) & 255),
                        u(i, (i.gzhead.time >> 24) & 255),
                        u(
                          i,
                          9 === i.level
                            ? 2
                            : i.strategy >= st || i.level < 2
                            ? 4
                            : 0
                        ),
                        u(i, 255 & i.gzhead.os),
                        i.gzhead.extra &&
                          i.gzhead.extra.length &&
                          (u(i, 255 & i.gzhead.extra.length),
                          u(i, (i.gzhead.extra.length >> 8) & 255)),
                        i.gzhead.hcrc &&
                          (n.adler = w(n.adler, i.pending_buf, i.pending, 0)),
                        (i.gzindex = 0),
                        (i.status = bt))
                      : (u(i, 0),
                        u(i, 0),
                        u(i, 0),
                        u(i, 0),
                        u(i, 0),
                        u(
                          i,
                          9 === i.level
                            ? 2
                            : i.strategy >= st || i.level < 2
                            ? 4
                            : 0
                        ),
                        u(i, vr),
                        (i.status = nt)))
                  : ((o = (ht + ((i.w_bits - 8) << 4)) << 8),
                    (l = -1),
                    (l =
                      i.strategy >= st || i.level < 2
                        ? 0
                        : i.level < 6
                        ? 1
                        : 6 === i.level
                        ? 2
                        : 3),
                    (o |= l << 6),
                    0 !== i.strstart && (o |= ar),
                    (o += 31 - (o % 31)),
                    (i.status = nt),
                    ft(i, o),
                    0 !== i.strstart &&
                      (ft(i, n.adler >>> 16), ft(i, 65535 & n.adler)),
                    (n.adler = 1))),
              i.status === bt)
            )
              if (i.gzhead.extra) {
                for (
                  r = i.pending;
                  i.gzindex < (65535 & i.gzhead.extra.length) &&
                  (i.pending !== i.pending_buf_size ||
                    (i.gzhead.hcrc &&
                      i.pending > r &&
                      (n.adler = w(n.adler, i.pending_buf, i.pending - r, r)),
                    p(n),
                    (r = i.pending),
                    i.pending !== i.pending_buf_size));

                )
                  u(i, 255 & i.gzhead.extra[i.gzindex]), i.gzindex++;
                i.gzhead.hcrc &&
                  i.pending > r &&
                  (n.adler = w(n.adler, i.pending_buf, i.pending - r, r));
                i.gzindex === i.gzhead.extra.length &&
                  ((i.gzindex = 0), (i.status = lt));
              } else i.status = lt;
            if (i.status === lt)
              if (i.gzhead.name) {
                r = i.pending;
                do {
                  if (
                    i.pending === i.pending_buf_size &&
                    (i.gzhead.hcrc &&
                      i.pending > r &&
                      (n.adler = w(n.adler, i.pending_buf, i.pending - r, r)),
                    p(n),
                    (r = i.pending),
                    i.pending === i.pending_buf_size)
                  ) {
                    e = 1;
                    break;
                  }
                  e =
                    i.gzindex < i.gzhead.name.length
                      ? 255 & i.gzhead.name.charCodeAt(i.gzindex++)
                      : 0;
                  u(i, e);
                } while (0 !== e);
                i.gzhead.hcrc &&
                  i.pending > r &&
                  (n.adler = w(n.adler, i.pending_buf, i.pending - r, r));
                0 === e && ((i.gzindex = 0), (i.status = at));
              } else i.status = at;
            if (i.status === at)
              if (i.gzhead.comment) {
                r = i.pending;
                do {
                  if (
                    i.pending === i.pending_buf_size &&
                    (i.gzhead.hcrc &&
                      i.pending > r &&
                      (n.adler = w(n.adler, i.pending_buf, i.pending - r, r)),
                    p(n),
                    (r = i.pending),
                    i.pending === i.pending_buf_size)
                  ) {
                    e = 1;
                    break;
                  }
                  e =
                    i.gzindex < i.gzhead.comment.length
                      ? 255 & i.gzhead.comment.charCodeAt(i.gzindex++)
                      : 0;
                  u(i, e);
                } while (0 !== e);
                i.gzhead.hcrc &&
                  i.pending > r &&
                  (n.adler = w(n.adler, i.pending_buf, i.pending - r, r));
                0 === e && (i.status = vt);
              } else i.status = vt;
            if (
              (i.status === vt &&
                (i.gzhead.hcrc
                  ? (i.pending + 2 > i.pending_buf_size && p(n),
                    i.pending + 2 <= i.pending_buf_size &&
                      (u(i, 255 & n.adler),
                      u(i, (n.adler >> 8) & 255),
                      (n.adler = 0),
                      (i.status = nt)))
                  : (i.status = nt)),
              0 !== i.pending)
            ) {
              if ((p(n), 0 === n.avail_out)) return (i.last_flush = -1), a;
            } else if (0 === n.avail_in && kt(t) <= kt(k) && t !== b)
              return v(n, pt);
            if (i.status === et && 0 !== n.avail_in) return v(n, pt);
            if (
              0 !== n.avail_in ||
              0 !== i.lookahead ||
              (t !== g && i.status !== et)
            ) {
              if (
                ((c =
                  i.strategy === st
                    ? si(i, t)
                    : i.strategy === tr
                    ? oi(i, t)
                    : rt[i.level].func(i, t)),
                (c !== tt && c !== ut) || (i.status = et),
                c === f || c === tt)
              )
                return 0 === n.avail_out && (i.last_flush = -1), a;
              if (
                c === ot &&
                (t === bi
                  ? s._tr_align(i)
                  : t !== ri &&
                    (s._tr_stored_block(i, 0, 0, !1),
                    t === ki &&
                      (y(i.head),
                      0 === i.lookahead &&
                        ((i.strstart = 0),
                        (i.block_start = 0),
                        (i.insert = 0)))),
                p(n),
                0 === n.avail_out)
              )
                return (i.last_flush = -1), a;
            }
            return t !== b
              ? a
              : i.wrap <= 0
              ? ui
              : (2 === i.wrap
                  ? (u(i, 255 & n.adler),
                    u(i, (n.adler >> 8) & 255),
                    u(i, (n.adler >> 16) & 255),
                    u(i, (n.adler >> 24) & 255),
                    u(i, 255 & n.total_in),
                    u(i, (n.total_in >> 8) & 255),
                    u(i, (n.total_in >> 16) & 255),
                    u(i, (n.total_in >> 24) & 255))
                  : (ft(i, n.adler >>> 16), ft(i, 65535 & n.adler)),
                p(n),
                i.wrap > 0 && (i.wrap = -i.wrap),
                0 !== i.pending ? a : ui);
          }
          function yi(n) {
            var t;
            return n && n.state
              ? ((t = n.state.status),
                t !== ct &&
                t !== bt &&
                t !== lt &&
                t !== at &&
                t !== vt &&
                t !== nt &&
                t !== et
                  ? v(n, h)
                  : ((n.state = null), t === nt ? v(n, di) : a))
              : h;
          }
          function pi(n, t) {
            var i,
              u,
              c,
              f,
              l,
              v,
              p,
              s,
              e = t.length;
            if (
              !n ||
              !n.state ||
              ((i = n.state),
              (f = i.wrap),
              2 === f || (1 === f && i.status !== ct) || i.lookahead)
            )
              return h;
            for (
              1 === f && (n.adler = ii(n.adler, t, e, 0)),
                i.wrap = 0,
                e >= i.w_size &&
                  (0 === f &&
                    (y(i.head),
                    (i.strstart = 0),
                    (i.block_start = 0),
                    (i.insert = 0)),
                  (s = new o.Buf8(i.w_size)),
                  o.arraySet(s, t, e - i.w_size, i.w_size, 0),
                  (t = s),
                  (e = i.w_size)),
                l = n.avail_in,
                v = n.next_in,
                p = n.input,
                n.avail_in = e,
                n.next_in = 0,
                n.input = t,
                d(i);
              i.lookahead >= r;

            ) {
              u = i.strstart;
              c = i.lookahead - (r - 1);
              do
                (i.ins_h =
                  ((i.ins_h << i.hash_shift) ^ i.window[u + r - 1]) &
                  i.hash_mask),
                  (i.prev[u & i.w_mask] = i.head[i.ins_h]),
                  (i.head[i.ins_h] = u),
                  u++;
              while (--c);
              i.strstart = u;
              i.lookahead = r - 1;
              d(i);
            }
            return (
              (i.strstart += i.lookahead),
              (i.block_start = i.strstart),
              (i.insert = i.lookahead),
              (i.lookahead = 0),
              (i.match_length = i.prev_length = r - 1),
              (i.match_available = 0),
              (n.next_in = v),
              (n.input = p),
              (n.avail_in = l),
              (i.wrap = f),
              a
            );
          }
          var rt,
            o = n("../utils/common"),
            s = n("./trees"),
            ii = n("./adler32"),
            w = n("./crc32"),
            wi = n("./messages"),
            g = 0,
            bi = 1,
            ki = 3,
            b = 4,
            ri = 5,
            a = 0,
            ui = 1,
            h = -2,
            di = -3,
            pt = -5,
            gi = -1,
            nr = 1,
            st = 2,
            tr = 3,
            ir = 4,
            rr = 0,
            ur = 2,
            ht = 8,
            fr = 9,
            er = 15,
            or = 8,
            wt = 286,
            sr = 30,
            hr = 19,
            cr = 2 * wt + 1,
            lr = 15,
            r = 3,
            k = 258,
            c = k + r + 1,
            ar = 32,
            ct = 42,
            bt = 69,
            lt = 73,
            at = 91,
            vt = 103,
            nt = 113,
            et = 666,
            f = 1,
            ot = 2,
            tt = 3,
            ut = 4,
            vr = 3;
          rt = [
            new l(0, 0, 0, 0, ei),
            new l(4, 4, 8, 4, yt),
            new l(4, 5, 16, 8, yt),
            new l(4, 6, 32, 32, yt),
            new l(4, 4, 16, 16, it),
            new l(8, 16, 32, 32, it),
            new l(8, 16, 128, 128, it),
            new l(8, 32, 128, 256, it),
            new l(32, 128, 258, 1024, it),
            new l(32, 258, 258, 4096, it),
          ];
          i.deflateInit = ai;
          i.deflateInit2 = ti;
          i.deflateReset = ni;
          i.deflateResetKeep = gt;
          i.deflateSetHeader = li;
          i.deflate = vi;
          i.deflateEnd = yi;
          i.deflateSetDictionary = pi;
          i.deflateInfo = "pako deflate (from Nodeca project)";
        },
        {
          "../utils/common": 28,
          "./adler32": 30,
          "./crc32": 32,
          "./messages": 38,
          "./trees": 39,
        },
      ],
      34: [
        function (n, t) {
          "use strict";
          function i() {
            this.text = 0;
            this.time = 0;
            this.xflags = 0;
            this.os = 0;
            this.extra = null;
            this.extra_len = 0;
            this.name = "";
            this.comment = "";
            this.hcrc = 0;
            this.done = !1;
          }
          t.exports = i;
        },
        {},
      ],
      35: [
        function (n, t) {
          "use strict";
          var i = 30,
            r = 12;
          t.exports = function (n, t) {
            var c,
              a,
              d,
              f,
              rt,
              g,
              ut,
              nt,
              ft,
              w,
              k,
              l,
              e,
              tt,
              it,
              et,
              ot,
              v,
              u,
              h,
              y,
              s,
              p,
              b,
              o;
            c = n.state;
            a = n.next_in;
            b = n.input;
            d = a + (n.avail_in - 5);
            f = n.next_out;
            o = n.output;
            rt = f - (t - n.avail_out);
            g = f + (n.avail_out - 257);
            ut = c.dmax;
            nt = c.wsize;
            ft = c.whave;
            w = c.wnext;
            k = c.window;
            l = c.hold;
            e = c.bits;
            tt = c.lencode;
            it = c.distcode;
            et = (1 << c.lenbits) - 1;
            ot = (1 << c.distbits) - 1;
            n: do {
              e < 15 &&
                ((l += b[a++] << e), (e += 8), (l += b[a++] << e), (e += 8));
              v = tt[l & et];
              t: for (;;) {
                if (
                  ((u = v >>> 24),
                  (l >>>= u),
                  (e -= u),
                  (u = (v >>> 16) & 255),
                  0 === u)
                )
                  o[f++] = 65535 & v;
                else {
                  if (!(16 & u)) {
                    if (0 == (64 & u)) {
                      v = tt[(65535 & v) + (l & ((1 << u) - 1))];
                      continue t;
                    }
                    if (32 & u) {
                      c.mode = r;
                      break n;
                    }
                    n.msg = "invalid literal/length code";
                    c.mode = i;
                    break n;
                  }
                  h = 65535 & v;
                  u &= 15;
                  u &&
                    (e < u && ((l += b[a++] << e), (e += 8)),
                    (h += l & ((1 << u) - 1)),
                    (l >>>= u),
                    (e -= u));
                  e < 15 &&
                    ((l += b[a++] << e),
                    (e += 8),
                    (l += b[a++] << e),
                    (e += 8));
                  v = it[l & ot];
                  i: for (;;) {
                    if (
                      ((u = v >>> 24),
                      (l >>>= u),
                      (e -= u),
                      (u = (v >>> 16) & 255),
                      !(16 & u))
                    ) {
                      if (0 == (64 & u)) {
                        v = it[(65535 & v) + (l & ((1 << u) - 1))];
                        continue i;
                      }
                      n.msg = "invalid distance code";
                      c.mode = i;
                      break n;
                    }
                    if (
                      ((y = 65535 & v),
                      (u &= 15),
                      e < u &&
                        ((l += b[a++] << e),
                        (e += 8),
                        e < u && ((l += b[a++] << e), (e += 8))),
                      (y += l & ((1 << u) - 1)),
                      y > ut)
                    ) {
                      n.msg = "invalid distance too far back";
                      c.mode = i;
                      break n;
                    }
                    if (((l >>>= u), (e -= u), (u = f - rt), y > u)) {
                      if (((u = y - u), u > ft && c.sane)) {
                        n.msg = "invalid distance too far back";
                        c.mode = i;
                        break n;
                      }
                      if (((s = 0), (p = k), 0 === w)) {
                        if (((s += nt - u), u < h)) {
                          h -= u;
                          do o[f++] = k[s++];
                          while (--u);
                          s = f - y;
                          p = o;
                        }
                      } else if (w < u) {
                        if (((s += nt + w - u), (u -= w), u < h)) {
                          h -= u;
                          do o[f++] = k[s++];
                          while (--u);
                          if (((s = 0), w < h)) {
                            u = w;
                            h -= u;
                            do o[f++] = k[s++];
                            while (--u);
                            s = f - y;
                            p = o;
                          }
                        }
                      } else if (((s += w - u), u < h)) {
                        h -= u;
                        do o[f++] = k[s++];
                        while (--u);
                        s = f - y;
                        p = o;
                      }
                      for (; h > 2; )
                        (o[f++] = p[s++]),
                          (o[f++] = p[s++]),
                          (o[f++] = p[s++]),
                          (h -= 3);
                      h && ((o[f++] = p[s++]), h > 1 && (o[f++] = p[s++]));
                    } else {
                      s = f - y;
                      do
                        (o[f++] = o[s++]),
                          (o[f++] = o[s++]),
                          (o[f++] = o[s++]),
                          (h -= 3);
                      while (h > 2);
                      h && ((o[f++] = o[s++]), h > 1 && (o[f++] = o[s++]));
                    }
                    break;
                  }
                }
                break;
              }
            } while (a < d && f < g);
            h = e >> 3;
            a -= h;
            e -= h << 3;
            l &= (1 << e) - 1;
            n.next_in = a;
            n.next_out = f;
            n.avail_in = a < d ? 5 + (d - a) : 5 - (a - d);
            n.avail_out = f < g ? 257 + (g - f) : 257 - (f - g);
            c.hold = l;
            c.bits = e;
          };
        },
        {},
      ],
      36: [
        function (n, t, i) {
          "use strict";
          function tt(n) {
            return (
              ((n >>> 24) & 255) +
              ((n >>> 8) & 65280) +
              ((65280 & n) << 8) +
              ((255 & n) << 24)
            );
          }
          function yi() {
            this.mode = 0;
            this.last = !1;
            this.wrap = 0;
            this.havedict = !1;
            this.flags = 0;
            this.dmax = 0;
            this.check = 0;
            this.total = 0;
            this.head = null;
            this.wbits = 0;
            this.wsize = 0;
            this.whave = 0;
            this.wnext = 0;
            this.window = null;
            this.hold = 0;
            this.bits = 0;
            this.length = 0;
            this.offset = 0;
            this.extra = 0;
            this.lencode = null;
            this.distcode = null;
            this.lenbits = 0;
            this.distbits = 0;
            this.ncode = 0;
            this.nlen = 0;
            this.ndist = 0;
            this.have = 0;
            this.next = null;
            this.lens = new u.Buf16(320);
            this.work = new u.Buf16(288);
            this.lendyn = null;
            this.distdyn = null;
            this.sane = 0;
            this.back = 0;
            this.was = 0;
          }
          function it(n) {
            var t;
            return n && n.state
              ? ((t = n.state),
                (n.total_in = n.total_out = t.total = 0),
                (n.msg = ""),
                t.wrap && (n.adler = 1 & t.wrap),
                (t.mode = at),
                (t.last = 0),
                (t.havedict = 0),
                (t.dmax = 32768),
                (t.head = null),
                (t.hold = 0),
                (t.bits = 0),
                (t.lencode = t.lendyn = new u.Buf32(or)),
                (t.distcode = t.distdyn = new u.Buf32(sr)),
                (t.sane = 1),
                (t.back = -1),
                s)
              : f;
          }
          function rt(n) {
            var t;
            return n && n.state
              ? ((t = n.state),
                (t.wsize = 0),
                (t.whave = 0),
                (t.wnext = 0),
                it(n))
              : f;
          }
          function ut(n, t) {
            var r, i;
            return n && n.state
              ? ((i = n.state),
                t < 0
                  ? ((r = 0), (t = -t))
                  : ((r = (t >> 4) + 1), t < 48 && (t &= 15)),
                t && (t < 8 || t > 15)
                  ? f
                  : (null !== i.window && i.wbits !== t && (i.window = null),
                    (i.wrap = r),
                    (i.wbits = t),
                    rt(n)))
              : f;
          }
          function ft(n, t) {
            var i, r;
            return n
              ? ((r = new yi()),
                (n.state = r),
                (r.window = null),
                (i = ut(n, t)),
                i !== s && (n.state = null),
                i)
              : f;
          }
          function pi(n) {
            return ft(n, hr);
          }
          function wi(n) {
            if (vi) {
              var t;
              for (y = new u.Buf32(512), p = new u.Buf32(32), t = 0; t < 144; )
                n.lens[t++] = 8;
              for (; t < 256; ) n.lens[t++] = 9;
              for (; t < 280; ) n.lens[t++] = 7;
              for (; t < 288; ) n.lens[t++] = 8;
              for (
                h(ot, n.lens, 0, 288, y, 0, n.work, { bits: 9 }), t = 0;
                t < 32;

              )
                n.lens[t++] = 5;
              h(st, n.lens, 0, 32, p, 0, n.work, { bits: 5 });
              vi = !1;
            }
            n.lencode = y;
            n.lenbits = 9;
            n.distcode = p;
            n.distbits = 5;
          }
          function et(n, t, i, r) {
            var e,
              f = n.state;
            return (
              null === f.window &&
                ((f.wsize = 1 << f.wbits),
                (f.wnext = 0),
                (f.whave = 0),
                (f.window = new u.Buf8(f.wsize))),
              r >= f.wsize
                ? (u.arraySet(f.window, t, i - f.wsize, f.wsize, 0),
                  (f.wnext = 0),
                  (f.whave = f.wsize))
                : ((e = f.wsize - f.wnext),
                  e > r && (e = r),
                  u.arraySet(f.window, t, i - r, e, f.wnext),
                  (r -= e),
                  r
                    ? (u.arraySet(f.window, t, i - r, r, 0),
                      (f.wnext = r),
                      (f.whave = f.wsize))
                    : ((f.wnext += e),
                      f.wnext === f.wsize && (f.wnext = 0),
                      f.whave < f.wsize && (f.whave += e))),
              0
            );
          }
          function bi(n, t) {
            var i,
              ft,
              lr,
              ut,
              hr,
              it,
              ki,
              p,
              y,
              yr,
              yi,
              rt,
              pr,
              kr,
              vi,
              gi,
              sr,
              or,
              wr,
              br,
              pi,
              cr,
              vr,
              ar,
              bi = 0,
              di = new u.Buf8(4),
              dr = [
                16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1,
                15,
              ];
            if (!n || !n.state || !n.output || (!n.input && 0 !== n.avail_in))
              return f;
            i = n.state;
            i.mode === o && (i.mode = k);
            hr = n.next_out;
            lr = n.output;
            ki = n.avail_out;
            ut = n.next_in;
            ft = n.input;
            it = n.avail_in;
            p = i.hold;
            y = i.bits;
            yr = it;
            yi = ki;
            cr = s;
            n: for (;;)
              switch (i.mode) {
                case at:
                  if (0 === i.wrap) {
                    i.mode = k;
                    break;
                  }
                  for (; y < 16; ) {
                    if (0 === it) break n;
                    it--;
                    p += ft[ut++] << y;
                    y += 8;
                  }
                  if (2 & i.wrap && 35615 === p) {
                    i.check = 0;
                    di[0] = 255 & p;
                    di[1] = (p >>> 8) & 255;
                    i.check = e(i.check, di, 2, 0);
                    p = 0;
                    y = 0;
                    i.mode = vt;
                    break;
                  }
                  if (
                    ((i.flags = 0),
                    i.head && (i.head.done = !1),
                    !(1 & i.wrap) || (((255 & p) << 8) + (p >> 8)) % 31)
                  ) {
                    n.msg = "incorrect header check";
                    i.mode = r;
                    break;
                  }
                  if ((15 & p) !== lt) {
                    n.msg = "unknown compression method";
                    i.mode = r;
                    break;
                  }
                  if (
                    ((p >>>= 4), (y -= 4), (pi = (15 & p) + 8), 0 === i.wbits)
                  )
                    i.wbits = pi;
                  else if (pi > i.wbits) {
                    n.msg = "invalid window size";
                    i.mode = r;
                    break;
                  }
                  i.dmax = 1 << pi;
                  n.adler = i.check = 1;
                  i.mode = 512 & p ? ni : o;
                  p = 0;
                  y = 0;
                  break;
                case vt:
                  for (; y < 16; ) {
                    if (0 === it) break n;
                    it--;
                    p += ft[ut++] << y;
                    y += 8;
                  }
                  if (((i.flags = p), (255 & i.flags) !== lt)) {
                    n.msg = "unknown compression method";
                    i.mode = r;
                    break;
                  }
                  if (57344 & i.flags) {
                    n.msg = "unknown header flags set";
                    i.mode = r;
                    break;
                  }
                  i.head && (i.head.text = (p >> 8) & 1);
                  512 & i.flags &&
                    ((di[0] = 255 & p),
                    (di[1] = (p >>> 8) & 255),
                    (i.check = e(i.check, di, 2, 0)));
                  p = 0;
                  y = 0;
                  i.mode = yt;
                case yt:
                  for (; y < 32; ) {
                    if (0 === it) break n;
                    it--;
                    p += ft[ut++] << y;
                    y += 8;
                  }
                  i.head && (i.head.time = p);
                  512 & i.flags &&
                    ((di[0] = 255 & p),
                    (di[1] = (p >>> 8) & 255),
                    (di[2] = (p >>> 16) & 255),
                    (di[3] = (p >>> 24) & 255),
                    (i.check = e(i.check, di, 4, 0)));
                  p = 0;
                  y = 0;
                  i.mode = pt;
                case pt:
                  for (; y < 16; ) {
                    if (0 === it) break n;
                    it--;
                    p += ft[ut++] << y;
                    y += 8;
                  }
                  i.head && ((i.head.xflags = 255 & p), (i.head.os = p >> 8));
                  512 & i.flags &&
                    ((di[0] = 255 & p),
                    (di[1] = (p >>> 8) & 255),
                    (i.check = e(i.check, di, 2, 0)));
                  p = 0;
                  y = 0;
                  i.mode = wt;
                case wt:
                  if (1024 & i.flags) {
                    for (; y < 16; ) {
                      if (0 === it) break n;
                      it--;
                      p += ft[ut++] << y;
                      y += 8;
                    }
                    i.length = p;
                    i.head && (i.head.extra_len = p);
                    512 & i.flags &&
                      ((di[0] = 255 & p),
                      (di[1] = (p >>> 8) & 255),
                      (i.check = e(i.check, di, 2, 0)));
                    p = 0;
                    y = 0;
                  } else i.head && (i.head.extra = null);
                  i.mode = bt;
                case bt:
                  if (
                    1024 & i.flags &&
                    ((rt = i.length),
                    rt > it && (rt = it),
                    rt &&
                      (i.head &&
                        ((pi = i.head.extra_len - i.length),
                        i.head.extra ||
                          (i.head.extra = new Array(i.head.extra_len)),
                        u.arraySet(i.head.extra, ft, ut, rt, pi)),
                      512 & i.flags && (i.check = e(i.check, ft, rt, ut)),
                      (it -= rt),
                      (ut += rt),
                      (i.length -= rt)),
                    i.length)
                  )
                    break n;
                  i.length = 0;
                  i.mode = kt;
                case kt:
                  if (2048 & i.flags) {
                    if (0 === it) break n;
                    rt = 0;
                    do
                      (pi = ft[ut + rt++]),
                        i.head &&
                          pi &&
                          i.length < 65536 &&
                          (i.head.name += String.fromCharCode(pi));
                    while (pi && rt < it);
                    if (
                      (512 & i.flags && (i.check = e(i.check, ft, rt, ut)),
                      (it -= rt),
                      (ut += rt),
                      pi)
                    )
                      break n;
                  } else i.head && (i.head.name = null);
                  i.length = 0;
                  i.mode = dt;
                case dt:
                  if (4096 & i.flags) {
                    if (0 === it) break n;
                    rt = 0;
                    do
                      (pi = ft[ut + rt++]),
                        i.head &&
                          pi &&
                          i.length < 65536 &&
                          (i.head.comment += String.fromCharCode(pi));
                    while (pi && rt < it);
                    if (
                      (512 & i.flags && (i.check = e(i.check, ft, rt, ut)),
                      (it -= rt),
                      (ut += rt),
                      pi)
                    )
                      break n;
                  } else i.head && (i.head.comment = null);
                  i.mode = gt;
                case gt:
                  if (512 & i.flags) {
                    for (; y < 16; ) {
                      if (0 === it) break n;
                      it--;
                      p += ft[ut++] << y;
                      y += 8;
                    }
                    if (p !== (65535 & i.check)) {
                      n.msg = "header crc mismatch";
                      i.mode = r;
                      break;
                    }
                    p = 0;
                    y = 0;
                  }
                  i.head &&
                    ((i.head.hcrc = (i.flags >> 9) & 1), (i.head.done = !0));
                  n.adler = i.check = 0;
                  i.mode = o;
                  break;
                case ni:
                  for (; y < 32; ) {
                    if (0 === it) break n;
                    it--;
                    p += ft[ut++] << y;
                    y += 8;
                  }
                  n.adler = i.check = tt(p);
                  p = 0;
                  y = 0;
                  i.mode = l;
                case l:
                  if (0 === i.havedict)
                    return (
                      (n.next_out = hr),
                      (n.avail_out = ki),
                      (n.next_in = ut),
                      (n.avail_in = it),
                      (i.hold = p),
                      (i.bits = y),
                      ur
                    );
                  n.adler = i.check = 1;
                  i.mode = o;
                case o:
                  if (t === ir || t === c) break n;
                case k:
                  if (i.last) {
                    p >>>= 7 & y;
                    y -= 7 & y;
                    i.mode = g;
                    break;
                  }
                  for (; y < 3; ) {
                    if (0 === it) break n;
                    it--;
                    p += ft[ut++] << y;
                    y += 8;
                  }
                  switch (((i.last = 1 & p), (p >>>= 1), (y -= 1), 3 & p)) {
                    case 0:
                      i.mode = ti;
                      break;
                    case 1:
                      if ((wi(i), (i.mode = a), t === c)) {
                        p >>>= 2;
                        y -= 2;
                        break n;
                      }
                      break;
                    case 2:
                      i.mode = ri;
                      break;
                    case 3:
                      n.msg = "invalid block type";
                      i.mode = r;
                  }
                  p >>>= 2;
                  y -= 2;
                  break;
                case ti:
                  for (p >>>= 7 & y, y -= 7 & y; y < 32; ) {
                    if (0 === it) break n;
                    it--;
                    p += ft[ut++] << y;
                    y += 8;
                  }
                  if ((65535 & p) != ((p >>> 16) ^ 65535)) {
                    n.msg = "invalid stored block lengths";
                    i.mode = r;
                    break;
                  }
                  if (
                    ((i.length = 65535 & p),
                    (p = 0),
                    (y = 0),
                    (i.mode = d),
                    t === c)
                  )
                    break n;
                case d:
                  i.mode = ii;
                case ii:
                  if ((rt = i.length)) {
                    if ((rt > it && (rt = it), rt > ki && (rt = ki), 0 === rt))
                      break n;
                    u.arraySet(lr, ft, ut, rt, hr);
                    it -= rt;
                    ut += rt;
                    ki -= rt;
                    hr += rt;
                    i.length -= rt;
                    break;
                  }
                  i.mode = o;
                  break;
                case ri:
                  for (; y < 14; ) {
                    if (0 === it) break n;
                    it--;
                    p += ft[ut++] << y;
                    y += 8;
                  }
                  if (
                    ((i.nlen = (31 & p) + 257),
                    (p >>>= 5),
                    (y -= 5),
                    (i.ndist = (31 & p) + 1),
                    (p >>>= 5),
                    (y -= 5),
                    (i.ncode = (15 & p) + 4),
                    (p >>>= 4),
                    (y -= 4),
                    i.nlen > 286 || i.ndist > 30)
                  ) {
                    n.msg = "too many length or distance symbols";
                    i.mode = r;
                    break;
                  }
                  i.have = 0;
                  i.mode = ui;
                case ui:
                  for (; i.have < i.ncode; ) {
                    for (; y < 3; ) {
                      if (0 === it) break n;
                      it--;
                      p += ft[ut++] << y;
                      y += 8;
                    }
                    i.lens[dr[i.have++]] = 7 & p;
                    p >>>= 3;
                    y -= 3;
                  }
                  for (; i.have < 19; ) i.lens[dr[i.have++]] = 0;
                  if (
                    ((i.lencode = i.lendyn),
                    (i.lenbits = 7),
                    (vr = { bits: i.lenbits }),
                    (cr = h(tr, i.lens, 0, 19, i.lencode, 0, i.work, vr)),
                    (i.lenbits = vr.bits),
                    cr)
                  ) {
                    n.msg = "invalid code lengths set";
                    i.mode = r;
                    break;
                  }
                  i.have = 0;
                  i.mode = fi;
                case fi:
                  for (; i.have < i.nlen + i.ndist; ) {
                    for (
                      ;
                      (bi = i.lencode[p & ((1 << i.lenbits) - 1)]),
                        (vi = bi >>> 24),
                        (gi = (bi >>> 16) & 255),
                        (sr = 65535 & bi),
                        !(vi <= y);

                    ) {
                      if (0 === it) break n;
                      it--;
                      p += ft[ut++] << y;
                      y += 8;
                    }
                    if (sr < 16)
                      (p >>>= vi), (y -= vi), (i.lens[i.have++] = sr);
                    else {
                      if (16 === sr) {
                        for (ar = vi + 2; y < ar; ) {
                          if (0 === it) break n;
                          it--;
                          p += ft[ut++] << y;
                          y += 8;
                        }
                        if (((p >>>= vi), (y -= vi), 0 === i.have)) {
                          n.msg = "invalid bit length repeat";
                          i.mode = r;
                          break;
                        }
                        pi = i.lens[i.have - 1];
                        rt = 3 + (3 & p);
                        p >>>= 2;
                        y -= 2;
                      } else if (17 === sr) {
                        for (ar = vi + 3; y < ar; ) {
                          if (0 === it) break n;
                          it--;
                          p += ft[ut++] << y;
                          y += 8;
                        }
                        p >>>= vi;
                        y -= vi;
                        pi = 0;
                        rt = 3 + (7 & p);
                        p >>>= 3;
                        y -= 3;
                      } else {
                        for (ar = vi + 7; y < ar; ) {
                          if (0 === it) break n;
                          it--;
                          p += ft[ut++] << y;
                          y += 8;
                        }
                        p >>>= vi;
                        y -= vi;
                        pi = 0;
                        rt = 11 + (127 & p);
                        p >>>= 7;
                        y -= 7;
                      }
                      if (i.have + rt > i.nlen + i.ndist) {
                        n.msg = "invalid bit length repeat";
                        i.mode = r;
                        break;
                      }
                      for (; rt--; ) i.lens[i.have++] = pi;
                    }
                  }
                  if (i.mode === r) break;
                  if (0 === i.lens[256]) {
                    n.msg = "invalid code -- missing end-of-block";
                    i.mode = r;
                    break;
                  }
                  if (
                    ((i.lenbits = 9),
                    (vr = { bits: i.lenbits }),
                    (cr = h(ot, i.lens, 0, i.nlen, i.lencode, 0, i.work, vr)),
                    (i.lenbits = vr.bits),
                    cr)
                  ) {
                    n.msg = "invalid literal/lengths set";
                    i.mode = r;
                    break;
                  }
                  if (
                    ((i.distbits = 6),
                    (i.distcode = i.distdyn),
                    (vr = { bits: i.distbits }),
                    (cr = h(
                      st,
                      i.lens,
                      i.nlen,
                      i.ndist,
                      i.distcode,
                      0,
                      i.work,
                      vr
                    )),
                    (i.distbits = vr.bits),
                    cr)
                  ) {
                    n.msg = "invalid distances set";
                    i.mode = r;
                    break;
                  }
                  if (((i.mode = a), t === c)) break n;
                case a:
                  i.mode = v;
                case v:
                  if (it >= 6 && ki >= 258) {
                    n.next_out = hr;
                    n.avail_out = ki;
                    n.next_in = ut;
                    n.avail_in = it;
                    i.hold = p;
                    i.bits = y;
                    nr(n, yi);
                    hr = n.next_out;
                    lr = n.output;
                    ki = n.avail_out;
                    ut = n.next_in;
                    ft = n.input;
                    it = n.avail_in;
                    p = i.hold;
                    y = i.bits;
                    i.mode === o && (i.back = -1);
                    break;
                  }
                  for (
                    i.back = 0;
                    (bi = i.lencode[p & ((1 << i.lenbits) - 1)]),
                      (vi = bi >>> 24),
                      (gi = (bi >>> 16) & 255),
                      (sr = 65535 & bi),
                      !(vi <= y);

                  ) {
                    if (0 === it) break n;
                    it--;
                    p += ft[ut++] << y;
                    y += 8;
                  }
                  if (gi && 0 == (240 & gi)) {
                    for (
                      or = vi, wr = gi, br = sr;
                      (bi =
                        i.lencode[br + ((p & ((1 << (or + wr)) - 1)) >> or)]),
                        (vi = bi >>> 24),
                        (gi = (bi >>> 16) & 255),
                        (sr = 65535 & bi),
                        !(or + vi <= y);

                    ) {
                      if (0 === it) break n;
                      it--;
                      p += ft[ut++] << y;
                      y += 8;
                    }
                    p >>>= or;
                    y -= or;
                    i.back += or;
                  }
                  if (
                    ((p >>>= vi),
                    (y -= vi),
                    (i.back += vi),
                    (i.length = sr),
                    0 === gi)
                  ) {
                    i.mode = ci;
                    break;
                  }
                  if (32 & gi) {
                    i.back = -1;
                    i.mode = o;
                    break;
                  }
                  if (64 & gi) {
                    n.msg = "invalid literal/length code";
                    i.mode = r;
                    break;
                  }
                  i.extra = 15 & gi;
                  i.mode = ei;
                case ei:
                  if (i.extra) {
                    for (ar = i.extra; y < ar; ) {
                      if (0 === it) break n;
                      it--;
                      p += ft[ut++] << y;
                      y += 8;
                    }
                    i.length += p & ((1 << i.extra) - 1);
                    p >>>= i.extra;
                    y -= i.extra;
                    i.back += i.extra;
                  }
                  i.was = i.length;
                  i.mode = oi;
                case oi:
                  for (
                    ;
                    (bi = i.distcode[p & ((1 << i.distbits) - 1)]),
                      (vi = bi >>> 24),
                      (gi = (bi >>> 16) & 255),
                      (sr = 65535 & bi),
                      !(vi <= y);

                  ) {
                    if (0 === it) break n;
                    it--;
                    p += ft[ut++] << y;
                    y += 8;
                  }
                  if (0 == (240 & gi)) {
                    for (
                      or = vi, wr = gi, br = sr;
                      (bi =
                        i.distcode[br + ((p & ((1 << (or + wr)) - 1)) >> or)]),
                        (vi = bi >>> 24),
                        (gi = (bi >>> 16) & 255),
                        (sr = 65535 & bi),
                        !(or + vi <= y);

                    ) {
                      if (0 === it) break n;
                      it--;
                      p += ft[ut++] << y;
                      y += 8;
                    }
                    p >>>= or;
                    y -= or;
                    i.back += or;
                  }
                  if (((p >>>= vi), (y -= vi), (i.back += vi), 64 & gi)) {
                    n.msg = "invalid distance code";
                    i.mode = r;
                    break;
                  }
                  i.offset = sr;
                  i.extra = 15 & gi;
                  i.mode = si;
                case si:
                  if (i.extra) {
                    for (ar = i.extra; y < ar; ) {
                      if (0 === it) break n;
                      it--;
                      p += ft[ut++] << y;
                      y += 8;
                    }
                    i.offset += p & ((1 << i.extra) - 1);
                    p >>>= i.extra;
                    y -= i.extra;
                    i.back += i.extra;
                  }
                  if (i.offset > i.dmax) {
                    n.msg = "invalid distance too far back";
                    i.mode = r;
                    break;
                  }
                  i.mode = hi;
                case hi:
                  if (0 === ki) break n;
                  if (((rt = yi - ki), i.offset > rt)) {
                    if (((rt = i.offset - rt), rt > i.whave && i.sane)) {
                      n.msg = "invalid distance too far back";
                      i.mode = r;
                      break;
                    }
                    rt > i.wnext
                      ? ((rt -= i.wnext), (pr = i.wsize - rt))
                      : (pr = i.wnext - rt);
                    rt > i.length && (rt = i.length);
                    kr = i.window;
                  } else (kr = lr), (pr = hr - i.offset), (rt = i.length);
                  rt > ki && (rt = ki);
                  ki -= rt;
                  i.length -= rt;
                  do lr[hr++] = kr[pr++];
                  while (--rt);
                  0 === i.length && (i.mode = v);
                  break;
                case ci:
                  if (0 === ki) break n;
                  lr[hr++] = i.length;
                  ki--;
                  i.mode = v;
                  break;
                case g:
                  if (i.wrap) {
                    for (; y < 32; ) {
                      if (0 === it) break n;
                      it--;
                      p |= ft[ut++] << y;
                      y += 8;
                    }
                    if (
                      ((yi -= ki),
                      (n.total_out += yi),
                      (i.total += yi),
                      yi &&
                        (n.adler = i.check =
                          i.flags
                            ? e(i.check, lr, yi, hr - yi)
                            : w(i.check, lr, yi, hr - yi)),
                      (yi = ki),
                      (i.flags ? p : tt(p)) !== i.check)
                    ) {
                      n.msg = "incorrect data check";
                      i.mode = r;
                      break;
                    }
                    p = 0;
                    y = 0;
                  }
                  i.mode = li;
                case li:
                  if (i.wrap && i.flags) {
                    for (; y < 32; ) {
                      if (0 === it) break n;
                      it--;
                      p += ft[ut++] << y;
                      y += 8;
                    }
                    if (p !== (4294967295 & i.total)) {
                      n.msg = "incorrect length check";
                      i.mode = r;
                      break;
                    }
                    p = 0;
                    y = 0;
                  }
                  i.mode = ai;
                case ai:
                  cr = rr;
                  break n;
                case r:
                  cr = ct;
                  break n;
                case nt:
                  return b;
                case er:
                default:
                  return f;
              }
            return (
              (n.next_out = hr),
              (n.avail_out = ki),
              (n.next_in = ut),
              (n.avail_in = it),
              (i.hold = p),
              (i.bits = y),
              (i.wsize ||
                (yi !== n.avail_out &&
                  i.mode < r &&
                  (i.mode < g || t !== ht))) &&
              et(n, n.output, n.next_out, yi - n.avail_out)
                ? ((i.mode = nt), b)
                : ((yr -= n.avail_in),
                  (yi -= n.avail_out),
                  (n.total_in += yr),
                  (n.total_out += yi),
                  (i.total += yi),
                  i.wrap &&
                    yi &&
                    (n.adler = i.check =
                      i.flags
                        ? e(i.check, lr, yi, n.next_out - yi)
                        : w(i.check, lr, yi, n.next_out - yi)),
                  (n.data_type =
                    i.bits +
                    (i.last ? 64 : 0) +
                    (i.mode === o ? 128 : 0) +
                    (i.mode === a || i.mode === d ? 256 : 0)),
                  ((0 === yr && 0 === yi) || t === ht) && cr === s && (cr = fr),
                  cr)
            );
          }
          function ki(n) {
            if (!n || !n.state) return f;
            var t = n.state;
            return t.window && (t.window = null), (n.state = null), s;
          }
          function di(n, t) {
            var i;
            return n && n.state
              ? ((i = n.state),
                0 == (2 & i.wrap) ? f : ((i.head = t), (t.done = !1), s))
              : f;
          }
          function gi(n, t) {
            var i,
              r,
              e,
              u = t.length;
            return n && n.state
              ? ((i = n.state),
                0 !== i.wrap && i.mode !== l
                  ? f
                  : i.mode === l &&
                    ((r = 1), (r = w(r, t, u, 0)), r !== i.check)
                  ? ct
                  : (e = et(n, t, u, u))
                  ? ((i.mode = nt), b)
                  : ((i.havedict = 1), s))
              : f;
          }
          var y,
            p,
            u = n("../utils/common"),
            w = n("./adler32"),
            e = n("./crc32"),
            nr = n("./inffast"),
            h = n("./inftrees"),
            tr = 0,
            ot = 1,
            st = 2,
            ht = 4,
            ir = 5,
            c = 6,
            s = 0,
            rr = 1,
            ur = 2,
            f = -2,
            ct = -3,
            b = -4,
            fr = -5,
            lt = 8,
            at = 1,
            vt = 2,
            yt = 3,
            pt = 4,
            wt = 5,
            bt = 6,
            kt = 7,
            dt = 8,
            gt = 9,
            ni = 10,
            l = 11,
            o = 12,
            k = 13,
            ti = 14,
            d = 15,
            ii = 16,
            ri = 17,
            ui = 18,
            fi = 19,
            a = 20,
            v = 21,
            ei = 22,
            oi = 23,
            si = 24,
            hi = 25,
            ci = 26,
            g = 27,
            li = 28,
            ai = 29,
            r = 30,
            nt = 31,
            er = 32,
            or = 852,
            sr = 592,
            hr = 15,
            vi = !0;
          i.inflateReset = rt;
          i.inflateReset2 = ut;
          i.inflateResetKeep = it;
          i.inflateInit = pi;
          i.inflateInit2 = ft;
          i.inflate = bi;
          i.inflateEnd = ki;
          i.inflateGetHeader = di;
          i.inflateSetDictionary = gi;
          i.inflateInfo = "pako inflate (from Nodeca project)";
        },
        {
          "../utils/common": 28,
          "./adler32": 30,
          "./crc32": 32,
          "./inffast": 35,
          "./inftrees": 37,
        },
      ],
      37: [
        function (n, t) {
          "use strict";
          var u = n("../utils/common"),
            i = 15,
            f = 852,
            e = 592,
            o = 0,
            r = 1,
            s = 2,
            h = [
              3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43,
              51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0,
            ],
            c = [
              16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
              19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78,
            ],
            l = [
              1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257,
              385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289,
              16385, 24577, 0, 0,
            ],
            a = [
              16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
              23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64,
            ];
          t.exports = function (n, t, v, y, p, w, b, k) {
            for (
              var ot,
                ct,
                vt,
                dt,
                lt,
                at,
                gt,
                yt,
                pt,
                ri = k.bits,
                d = 0,
                g = 0,
                ut = 0,
                nt = 0,
                tt = 0,
                ft = 0,
                it = 0,
                et = 0,
                ht = 0,
                rt = 0,
                wt = null,
                ni = 0,
                st = new u.Buf16(i + 1),
                bt = new u.Buf16(i + 1),
                kt = null,
                ti = 0,
                ii,
                d = 0;
              d <= i;
              d++
            )
              st[d] = 0;
            for (g = 0; g < y; g++) st[t[v + g]]++;
            for (tt = ri, nt = i; nt >= 1 && 0 === st[nt]; nt--);
            if ((tt > nt && (tt = nt), 0 === nt))
              return (p[w++] = 20971520), (p[w++] = 20971520), (k.bits = 1), 0;
            for (ut = 1; ut < nt && 0 === st[ut]; ut++);
            for (tt < ut && (tt = ut), et = 1, d = 1; d <= i; d++)
              if (((et <<= 1), (et -= st[d]), et < 0)) return -1;
            if (et > 0 && (n === o || 1 !== nt)) return -1;
            for (bt[1] = 0, d = 1; d < i; d++) bt[d + 1] = bt[d] + st[d];
            for (g = 0; g < y; g++) 0 !== t[v + g] && (b[bt[t[v + g]]++] = g);
            if (
              (n === o
                ? ((wt = kt = b), (at = 19))
                : n === r
                ? ((wt = h), (ni -= 257), (kt = c), (ti -= 257), (at = 256))
                : ((wt = l), (kt = a), (at = -1)),
              (rt = 0),
              (g = 0),
              (d = ut),
              (lt = w),
              (ft = tt),
              (it = 0),
              (vt = -1),
              (ht = 1 << tt),
              (dt = ht - 1),
              (n === r && ht > f) || (n === s && ht > e))
            )
              return 1;
            for (ii = 0; ; ) {
              ii++;
              gt = d - it;
              b[g] < at
                ? ((yt = 0), (pt = b[g]))
                : b[g] > at
                ? ((yt = kt[ti + b[g]]), (pt = wt[ni + b[g]]))
                : ((yt = 96), (pt = 0));
              ot = 1 << (d - it);
              ct = 1 << ft;
              ut = ct;
              do
                (ct -= ot),
                  (p[lt + (rt >> it) + ct] = (gt << 24) | (yt << 16) | pt | 0);
              while (0 !== ct);
              for (ot = 1 << (d - 1); rt & ot; ) ot >>= 1;
              if (
                (0 !== ot ? ((rt &= ot - 1), (rt += ot)) : (rt = 0),
                g++,
                0 == --st[d])
              ) {
                if (d === nt) break;
                d = t[v + b[g]];
              }
              if (d > tt && (rt & dt) !== vt) {
                for (
                  0 === it && (it = tt), lt += ut, ft = d - it, et = 1 << ft;
                  ft + it < nt && ((et -= st[ft + it]), !(et <= 0));

                )
                  ft++, (et <<= 1);
                if (
                  ((ht += 1 << ft), (n === r && ht > f) || (n === s && ht > e))
                )
                  return 1;
                vt = rt & dt;
                p[vt] = (tt << 24) | (ft << 16) | (lt - w) | 0;
              }
            }
            return (
              0 !== rt && (p[lt + rt] = ((d - it) << 24) | 4194304),
              (k.bits = tt),
              0
            );
          };
        },
        { "../utils/common": 28 },
      ],
      38: [
        function (n, t) {
          "use strict";
          t.exports = {
            2: "need dictionary",
            1: "stream end",
            0: "",
            "-1": "file error",
            "-2": "stream error",
            "-3": "data error",
            "-4": "insufficient memory",
            "-5": "buffer error",
            "-6": "incompatible version",
          };
        },
        {},
      ],
      39: [
        function (n, t, i) {
          "use strict";
          function o(n) {
            for (var t = n.length; --t >= 0; ) n[t] = 0;
          }
          function k(n, t, i, r, u) {
            this.static_tree = n;
            this.extra_bits = t;
            this.extra_base = i;
            this.elems = r;
            this.max_length = u;
            this.has_stree = n && n.length;
          }
          function d(n, t) {
            this.dyn_tree = n;
            this.max_code = 0;
            this.stat_desc = t;
          }
          function ot(n) {
            return n < 256 ? c[n] : c[256 + (n >>> 7)];
          }
          function a(n, t) {
            n.pending_buf[n.pending++] = 255 & t;
            n.pending_buf[n.pending++] = (t >>> 8) & 255;
          }
          function r(n, t, i) {
            n.bi_valid > rt - i
              ? ((n.bi_buf |= (t << n.bi_valid) & 65535),
                a(n, n.bi_buf),
                (n.bi_buf = t >> (rt - n.bi_valid)),
                (n.bi_valid += i - rt))
              : ((n.bi_buf |= (t << n.bi_valid) & 65535), (n.bi_valid += i));
          }
          function u(n, t, i) {
            r(n, i[2 * t], i[2 * t + 1]);
          }
          function st(n, t) {
            var i = 0;
            do (i |= 1 & n), (n >>>= 1), (i <<= 1);
            while (--t > 0);
            return i >>> 1;
          }
          function oi(n) {
            16 === n.bi_valid
              ? (a(n, n.bi_buf), (n.bi_buf = 0), (n.bi_valid = 0))
              : n.bi_valid >= 8 &&
                ((n.pending_buf[n.pending++] = 255 & n.bi_buf),
                (n.bi_buf >>= 8),
                (n.bi_valid -= 8));
          }
          function si(n, t) {
            for (
              var o,
                r,
                f,
                h,
                l,
                u = t.dyn_tree,
                a = t.max_code,
                y = t.stat_desc.static_tree,
                p = t.stat_desc.has_stree,
                w = t.stat_desc.extra_bits,
                v = t.stat_desc.extra_base,
                s = t.stat_desc.max_length,
                c = 0,
                i = 0;
              i <= e;
              i++
            )
              n.bl_count[i] = 0;
            for (
              u[2 * n.heap[n.heap_max] + 1] = 0, o = n.heap_max + 1;
              o < gt;
              o++
            )
              (r = n.heap[o]),
                (i = u[2 * u[2 * r + 1] + 1] + 1),
                i > s && ((i = s), c++),
                (u[2 * r + 1] = i),
                r > a ||
                  (n.bl_count[i]++,
                  (h = 0),
                  r >= v && (h = w[r - v]),
                  (l = u[2 * r]),
                  (n.opt_len += l * (i + h)),
                  p && (n.static_len += l * (y[2 * r + 1] + h)));
            if (0 !== c) {
              do {
                for (i = s - 1; 0 === n.bl_count[i]; ) i--;
                n.bl_count[i]--;
                n.bl_count[i + 1] += 2;
                n.bl_count[s]--;
                c -= 2;
              } while (c > 0);
              for (i = s; 0 !== i; i--)
                for (r = n.bl_count[i]; 0 !== r; )
                  (f = n.heap[--o]),
                    f > a ||
                      (u[2 * f + 1] !== i &&
                        ((n.opt_len += (i - u[2 * f + 1]) * u[2 * f]),
                        (u[2 * f + 1] = i)),
                      r--);
            }
          }
          function ht(n, t, i) {
            for (var u, o = new Array(e + 1), s = 0, f, r = 1; r <= e; r++)
              o[r] = s = (s + i[r - 1]) << 1;
            for (u = 0; u <= t; u++)
              (f = n[2 * u + 1]), 0 !== f && (n[2 * u] = st(o[f]++, f));
          }
          function hi() {
            for (
              var n, u, i, r = new Array(e + 1), o = 0, t = 0;
              t < tt - 1;
              t++
            )
              for (b[t] = o, n = 0; n < 1 << ft[t]; n++) l[o++] = t;
            for (l[o - 1] = t, i = 0, t = 0; t < 16; t++)
              for (p[t] = i, n = 0; n < 1 << w[t]; n++) c[i++] = t;
            for (i >>= 7; t < s; t++)
              for (p[t] = i << 7, n = 0; n < 1 << (w[t] - 7); n++)
                c[256 + i++] = t;
            for (u = 0; u <= e; u++) r[u] = 0;
            for (n = 0; n <= 143; ) (f[2 * n + 1] = 8), n++, r[8]++;
            for (; n <= 255; ) (f[2 * n + 1] = 9), n++, r[9]++;
            for (; n <= 279; ) (f[2 * n + 1] = 7), n++, r[7]++;
            for (; n <= 287; ) (f[2 * n + 1] = 8), n++, r[8]++;
            for (ht(f, y + 1, r), n = 0; n < s; n++)
              (h[2 * n + 1] = 5), (h[2 * n] = st(n, 5));
            ui = new k(f, ft, v + 1, y, e);
            fi = new k(h, w, 0, s, e);
            ei = new k(new Array(0), rr, 0, it, ir);
          }
          function ct(n) {
            for (var t = 0; t < y; t++) n.dyn_ltree[2 * t] = 0;
            for (t = 0; t < s; t++) n.dyn_dtree[2 * t] = 0;
            for (t = 0; t < it; t++) n.bl_tree[2 * t] = 0;
            n.dyn_ltree[2 * ut] = 1;
            n.opt_len = n.static_len = 0;
            n.last_lit = n.matches = 0;
          }
          function lt(n) {
            n.bi_valid > 8
              ? a(n, n.bi_buf)
              : n.bi_valid > 0 && (n.pending_buf[n.pending++] = n.bi_buf);
            n.bi_buf = 0;
            n.bi_valid = 0;
          }
          function ci(n, t, i, r) {
            lt(n);
            r && (a(n, i), a(n, ~i));
            ki.arraySet(n.pending_buf, n.window, t, i, n.pending);
            n.pending += i;
          }
          function at(n, t, i, r) {
            var u = 2 * t,
              f = 2 * i;
            return n[u] < n[f] || (n[u] === n[f] && r[t] <= r[i]);
          }
          function g(n, t, i) {
            for (
              var u = n.heap[i], r = i << 1;
              r <= n.heap_len &&
              (r < n.heap_len &&
                at(t, n.heap[r + 1], n.heap[r], n.depth) &&
                r++,
              !at(t, u, n.heap[r], n.depth));

            )
              (n.heap[i] = n.heap[r]), (i = r), (r <<= 1);
            n.heap[i] = u;
          }
          function vt(n, t, i) {
            var e,
              s,
              f,
              o,
              h = 0;
            if (0 !== n.last_lit)
              do
                (e =
                  (n.pending_buf[n.d_buf + 2 * h] << 8) |
                  n.pending_buf[n.d_buf + 2 * h + 1]),
                  (s = n.pending_buf[n.l_buf + h]),
                  h++,
                  0 === e
                    ? u(n, s, t)
                    : ((f = l[s]),
                      u(n, f + v + 1, t),
                      (o = ft[f]),
                      0 !== o && ((s -= b[f]), r(n, s, o)),
                      e--,
                      (f = ot(e)),
                      u(n, f, i),
                      (o = w[f]),
                      0 !== o && ((e -= p[f]), r(n, e, o)));
              while (h < n.last_lit);
            u(n, ut, t);
          }
          function nt(n, t) {
            var i,
              f,
              u,
              r = t.dyn_tree,
              s = t.stat_desc.static_tree,
              h = t.stat_desc.has_stree,
              o = t.stat_desc.elems,
              e = -1;
            for (n.heap_len = 0, n.heap_max = gt, i = 0; i < o; i++)
              0 !== r[2 * i]
                ? ((n.heap[++n.heap_len] = e = i), (n.depth[i] = 0))
                : (r[2 * i + 1] = 0);
            for (; n.heap_len < 2; )
              (u = n.heap[++n.heap_len] = e < 2 ? ++e : 0),
                (r[2 * u] = 1),
                (n.depth[u] = 0),
                n.opt_len--,
                h && (n.static_len -= s[2 * u + 1]);
            for (t.max_code = e, i = n.heap_len >> 1; i >= 1; i--) g(n, r, i);
            u = o;
            do
              (i = n.heap[1]),
                (n.heap[1] = n.heap[n.heap_len--]),
                g(n, r, 1),
                (f = n.heap[1]),
                (n.heap[--n.heap_max] = i),
                (n.heap[--n.heap_max] = f),
                (r[2 * u] = r[2 * i] + r[2 * f]),
                (n.depth[u] =
                  (n.depth[i] >= n.depth[f] ? n.depth[i] : n.depth[f]) + 1),
                (r[2 * i + 1] = r[2 * f + 1] = u),
                (n.heap[1] = u++),
                g(n, r, 1);
            while (n.heap_len >= 2);
            n.heap[--n.heap_max] = n.heap[1];
            si(n, t);
            ht(r, e, n.bl_count);
          }
          function yt(n, t, i) {
            var s,
              r,
              h = -1,
              u = t[1],
              f = 0,
              e = 7,
              o = 4;
            for (
              0 === u && ((e = 138), (o = 3)),
                t[2 * (i + 1) + 1] = 65535,
                s = 0;
              s <= i;
              s++
            )
              (r = u),
                (u = t[2 * (s + 1) + 1]),
                (++f < e && r === u) ||
                  (f < o
                    ? (n.bl_tree[2 * r] += f)
                    : 0 !== r
                    ? (r !== h && n.bl_tree[2 * r]++, n.bl_tree[2 * ni]++)
                    : f <= 10
                    ? n.bl_tree[2 * ti]++
                    : n.bl_tree[2 * ii]++,
                  (f = 0),
                  (h = r),
                  0 === u
                    ? ((e = 138), (o = 3))
                    : r === u
                    ? ((e = 6), (o = 3))
                    : ((e = 7), (o = 4)));
          }
          function pt(n, t, i) {
            var c,
              e,
              l = -1,
              o = t[1],
              f = 0,
              s = 7,
              h = 4;
            for (0 === o && ((s = 138), (h = 3)), c = 0; c <= i; c++)
              if (((e = o), (o = t[2 * (c + 1) + 1]), !(++f < s && e === o))) {
                if (f < h) {
                  do u(n, e, n.bl_tree);
                  while (0 != --f);
                } else
                  0 !== e
                    ? (e !== l && (u(n, e, n.bl_tree), f--),
                      u(n, ni, n.bl_tree),
                      r(n, f - 3, 2))
                    : f <= 10
                    ? (u(n, ti, n.bl_tree), r(n, f - 3, 3))
                    : (u(n, ii, n.bl_tree), r(n, f - 11, 7));
                f = 0;
                l = e;
                0 === o
                  ? ((s = 138), (h = 3))
                  : e === o
                  ? ((s = 6), (h = 3))
                  : ((s = 7), (h = 4));
              }
          }
          function li(n) {
            var t;
            for (
              yt(n, n.dyn_ltree, n.l_desc.max_code),
                yt(n, n.dyn_dtree, n.d_desc.max_code),
                nt(n, n.bl_desc),
                t = it - 1;
              t >= 3 && 0 === n.bl_tree[2 * ri[t] + 1];
              t--
            );
            return (n.opt_len += 3 * (t + 1) + 5 + 5 + 4), t;
          }
          function ai(n, t, i, u) {
            var f;
            for (
              r(n, t - 257, 5), r(n, i - 1, 5), r(n, u - 4, 4), f = 0;
              f < u;
              f++
            )
              r(n, n.bl_tree[2 * ri[f] + 1], 3);
            pt(n, n.dyn_ltree, t - 1);
            pt(n, n.dyn_dtree, i - 1);
          }
          function vi(n) {
            for (var i = 4093624447, t = 0; t <= 31; t++, i >>>= 1)
              if (1 & i && 0 !== n.dyn_ltree[2 * t]) return bt;
            if (
              0 !== n.dyn_ltree[18] ||
              0 !== n.dyn_ltree[20] ||
              0 !== n.dyn_ltree[26]
            )
              return kt;
            for (t = 32; t < v; t++) if (0 !== n.dyn_ltree[2 * t]) return kt;
            return bt;
          }
          function yi(n) {
            et || (hi(), (et = !0));
            n.l_desc = new d(n.dyn_ltree, ui);
            n.d_desc = new d(n.dyn_dtree, fi);
            n.bl_desc = new d(n.bl_tree, ei);
            n.bi_buf = 0;
            n.bi_valid = 0;
            ct(n);
          }
          function wt(n, t, i, u) {
            r(n, (nr << 1) + (u ? 1 : 0), 3);
            ci(n, t, i, !0);
          }
          function pi(n) {
            r(n, dt << 1, 3);
            u(n, ut, f);
            oi(n);
          }
          function wi(n, t, i, u) {
            var e,
              o,
              s = 0;
            n.level > 0
              ? (n.strm.data_type === gi && (n.strm.data_type = vi(n)),
                nt(n, n.l_desc),
                nt(n, n.d_desc),
                (s = li(n)),
                (e = (n.opt_len + 3 + 7) >>> 3),
                (o = (n.static_len + 3 + 7) >>> 3),
                o <= e && (e = o))
              : (e = o = i + 5);
            i + 4 <= e && t !== -1
              ? wt(n, t, i, u)
              : n.strategy === di || o === e
              ? (r(n, (dt << 1) + (u ? 1 : 0), 3), vt(n, f, h))
              : (r(n, (tr << 1) + (u ? 1 : 0), 3),
                ai(n, n.l_desc.max_code + 1, n.d_desc.max_code + 1, s + 1),
                vt(n, n.dyn_ltree, n.dyn_dtree));
            ct(n);
            u && lt(n);
          }
          function bi(n, t, i) {
            return (
              (n.pending_buf[n.d_buf + 2 * n.last_lit] = (t >>> 8) & 255),
              (n.pending_buf[n.d_buf + 2 * n.last_lit + 1] = 255 & t),
              (n.pending_buf[n.l_buf + n.last_lit] = 255 & i),
              n.last_lit++,
              0 === t
                ? n.dyn_ltree[2 * i]++
                : (n.matches++,
                  t--,
                  n.dyn_ltree[2 * (l[i] + v + 1)]++,
                  n.dyn_dtree[2 * ot(t)]++),
              n.last_lit === n.lit_bufsize - 1
            );
          }
          var ki = n("../utils/common"),
            di = 4,
            bt = 0,
            kt = 1,
            gi = 2,
            nr = 0,
            dt = 1,
            tr = 2,
            tt = 29,
            v = 256,
            y = v + 1 + tt,
            s = 30,
            it = 19,
            gt = 2 * y + 1,
            e = 15,
            rt = 16,
            ir = 7,
            ut = 256,
            ni = 16,
            ti = 17,
            ii = 18,
            ft = [
              0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4,
              4, 4, 5, 5, 5, 5, 0,
            ],
            w = [
              0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,
              10, 10, 11, 11, 12, 12, 13, 13,
            ],
            rr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7],
            ri = [
              16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15,
            ],
            f = new Array(2 * (y + 2)),
            h,
            c,
            l,
            b,
            p,
            ui,
            fi,
            ei,
            et;
          o(f);
          h = new Array(2 * s);
          o(h);
          c = new Array(512);
          o(c);
          l = new Array(256);
          o(l);
          b = new Array(tt);
          o(b);
          p = new Array(s);
          o(p);
          et = !1;
          i._tr_init = yi;
          i._tr_stored_block = wt;
          i._tr_flush_block = wi;
          i._tr_tally = bi;
          i._tr_align = pi;
        },
        { "../utils/common": 28 },
      ],
      40: [
        function (n, t) {
          "use strict";
          function i() {
            this.input = null;
            this.next_in = 0;
            this.avail_in = 0;
            this.total_in = 0;
            this.output = null;
            this.next_out = 0;
            this.avail_out = 0;
            this.total_out = 0;
            this.msg = "";
            this.state = null;
            this.data_type = 2;
            this.adler = 0;
          }
          t.exports = i;
        },
        {},
      ],
    },
    {},
    [10]
  )(10);
});
