/*!
 * @license
 *
 * dhtmlxScheduler v.6.0.0 Standard
 *
 * To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com
 *
 * (c) XB Software Ltd.
 *
 */
!(function (e, t) {
  "object" == typeof exports && "object" == typeof module
    ? (module.exports = t())
    : "function" == typeof define && define.amd
    ? define("dhtmlxscheduler", [], t)
    : "object" == typeof exports
    ? (exports.dhtmlxscheduler = t())
    : (e.dhtmlxscheduler = t());
})(window, function () {
  return (function (e) {
    var t = {};
    function a(n) {
      if (t[n]) return t[n].exports;
      var i = (t[n] = { i: n, l: !1, exports: {} });
      return e[n].call(i.exports, i, i.exports, a), (i.l = !0), i.exports;
    }
    return (
      (a.m = e),
      (a.c = t),
      (a.d = function (e, t, n) {
        a.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: n });
      }),
      (a.r = function (e) {
        "undefined" != typeof Symbol &&
          Symbol.toStringTag &&
          Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
          Object.defineProperty(e, "__esModule", { value: !0 });
      }),
      (a.t = function (e, t) {
        if ((1 & t && (e = a(e)), 8 & t)) return e;
        if (4 & t && "object" == typeof e && e && e.__esModule) return e;
        var n = Object.create(null);
        if (
          (a.r(n),
          Object.defineProperty(n, "default", { enumerable: !0, value: e }),
          2 & t && "string" != typeof e)
        )
          for (var i in e)
            a.d(
              n,
              i,
              function (t) {
                return e[t];
              }.bind(null, i)
            );
        return n;
      }),
      (a.n = function (e) {
        var t =
          e && e.__esModule
            ? function () {
                return e.default;
              }
            : function () {
                return e;
              };
        return a.d(t, "a", t), t;
      }),
      (a.o = function (e, t) {
        return Object.prototype.hasOwnProperty.call(e, t);
      }),
      (a.p = "/codebase/"),
      a((a.s = 9))
    );
  })([
    function (e, t, a) {
      "use strict";
      (function (e) {
        var a;
        (a = "undefined" != typeof window ? window : e), (t.a = a);
      }.call(this, a(1)));
    },
    function (e, t) {
      function a(e) {
        "@babel/helpers - typeof";
        return (a =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      var n;
      n = (function () {
        return this;
      })();
      try {
        n = n || new Function("return this")();
      } catch (e) {
        "object" === ("undefined" == typeof window ? "undefined" : a(window)) &&
          (n = window);
      }
      e.exports = n;
    },
    function (e, t) {
      e.exports = function (e) {
        return function () {
          var e = {};
          for (var t in this._events) {
            var a = this._events[t];
            -1 == a.id.toString().indexOf("#") && (e[a.id] = a);
          }
          return e;
        }.bind(e);
      };
    },
    function (e, t) {
      e.exports = function (e) {
        if ("string" == typeof e || "number" == typeof e) return e;
        var t = "";
        for (var a in e) {
          var n = "";
          e.hasOwnProperty(a) &&
            ((n =
              a +
              "=" +
              (n =
                "string" == typeof e[a]
                  ? encodeURIComponent(e[a])
                  : "number" == typeof e[a]
                  ? e[a]
                  : encodeURIComponent(JSON.stringify(e[a])))),
            t.length && (n = "&" + n),
            (t += n));
        }
        return t;
      };
    },
    function (e, t, a) {
      "use strict";
      a.r(t);
    },
    function (e, t) {
      var a,
        n,
        i = (e.exports = {});
      function r() {
        throw new Error("setTimeout has not been defined");
      }
      function o() {
        throw new Error("clearTimeout has not been defined");
      }
      function s(e) {
        if (a === setTimeout) return setTimeout(e, 0);
        if ((a === r || !a) && setTimeout)
          return (a = setTimeout), setTimeout(e, 0);
        try {
          return a(e, 0);
        } catch (t) {
          try {
            return a.call(null, e, 0);
          } catch (t) {
            return a.call(this, e, 0);
          }
        }
      }
      !(function () {
        try {
          a = "function" == typeof setTimeout ? setTimeout : r;
        } catch (e) {
          a = r;
        }
        try {
          n = "function" == typeof clearTimeout ? clearTimeout : o;
        } catch (e) {
          n = o;
        }
      })();
      var _,
        d = [],
        l = !1,
        c = -1;
      function u() {
        l &&
          _ &&
          ((l = !1), _.length ? (d = _.concat(d)) : (c = -1), d.length && h());
      }
      function h() {
        if (!l) {
          var e = s(u);
          l = !0;
          for (var t = d.length; t; ) {
            for (_ = d, d = []; ++c < t; ) _ && _[c].run();
            (c = -1), (t = d.length);
          }
          (_ = null),
            (l = !1),
            (function (e) {
              if (n === clearTimeout) return clearTimeout(e);
              if ((n === o || !n) && clearTimeout)
                return (n = clearTimeout), clearTimeout(e);
              try {
                n(e);
              } catch (t) {
                try {
                  return n.call(null, e);
                } catch (t) {
                  return n.call(this, e);
                }
              }
            })(e);
        }
      }
      function f(e, t) {
        (this.fun = e), (this.array = t);
      }
      function p() {}
      (i.nextTick = function (e) {
        var t = new Array(arguments.length - 1);
        if (arguments.length > 1)
          for (var a = 1; a < arguments.length; a++) t[a - 1] = arguments[a];
        d.push(new f(e, t)), 1 !== d.length || l || s(h);
      }),
        (f.prototype.run = function () {
          this.fun.apply(null, this.array);
        }),
        (i.title = "browser"),
        (i.browser = !0),
        (i.env = {}),
        (i.argv = []),
        (i.version = ""),
        (i.versions = {}),
        (i.on = p),
        (i.addListener = p),
        (i.once = p),
        (i.off = p),
        (i.removeListener = p),
        (i.removeAllListeners = p),
        (i.emit = p),
        (i.prependListener = p),
        (i.prependOnceListener = p),
        (i.listeners = function (e) {
          return [];
        }),
        (i.binding = function (e) {
          throw new Error("process.binding is not supported");
        }),
        (i.cwd = function () {
          return "/";
        }),
        (i.chdir = function (e) {
          throw new Error("process.chdir is not supported");
        }),
        (i.umask = function () {
          return 0;
        });
    },
    function (e, t, a) {
      (function (a, n, i) {
        var r, o, s;
        function _(e) {
          "@babel/helpers - typeof";
          return (_ =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (e) {
                  return typeof e;
                }
              : function (e) {
                  return e &&
                    "function" == typeof Symbol &&
                    e.constructor === Symbol &&
                    e !== Symbol.prototype
                    ? "symbol"
                    : typeof e;
                })(e);
        }
        /* @preserve
         * The MIT License (MIT)
         *
         * Copyright (c) 2013-2018 Petka Antonov
         *
         * Permission is hereby granted, free of charge, to any person obtaining a copy
         * of this software and associated documentation files (the "Software"), to deal
         * in the Software without restriction, including without limitation the rights
         * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         * copies of the Software, and to permit persons to whom the Software is
         * furnished to do so, subject to the following conditions:
         *
         * The above copyright notice and this permission notice shall be included in
         * all copies or substantial portions of the Software.
         *
         * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
         * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
         * THE SOFTWARE.
         *
         */ !(function (a) {
          "object" == _(t) && void 0 !== e
            ? (e.exports = a())
            : ((o = []),
              void 0 ===
                (s = "function" == typeof (r = a) ? r.apply(t, o) : r) ||
                (e.exports = s));
        })(function () {
          var e, t, r;
          return (function e(t, a, n) {
            function i(o, s) {
              if (!a[o]) {
                if (!t[o]) {
                  var _ = "function" == typeof _dereq_ && _dereq_;
                  if (!s && _) return _(o, !0);
                  if (r) return r(o, !0);
                  var d = new Error("Cannot find module '" + o + "'");
                  throw ((d.code = "MODULE_NOT_FOUND"), d);
                }
                var l = (a[o] = { exports: {} });
                t[o][0].call(
                  l.exports,
                  function (e) {
                    var a = t[o][1][e];
                    return i(a || e);
                  },
                  l,
                  l.exports,
                  e,
                  t,
                  a,
                  n
                );
              }
              return a[o].exports;
            }
            for (
              var r = "function" == typeof _dereq_ && _dereq_, o = 0;
              o < n.length;
              o++
            )
              i(n[o]);
            return i;
          })(
            {
              1: [
                function (e, t, n) {
                  "use strict";
                  var i;
                  try {
                    throw new Error();
                  } catch (e) {
                    i = e;
                  }
                  var r = e("./schedule"),
                    o = e("./queue");
                  function s() {
                    (this._customScheduler = !1),
                      (this._isTickUsed = !1),
                      (this._lateQueue = new o(16)),
                      (this._normalQueue = new o(16)),
                      (this._haveDrainedQueues = !1);
                    var e = this;
                    (this.drainQueues = function () {
                      e._drainQueues();
                    }),
                      (this._schedule = r);
                  }
                  function _(e) {
                    for (; e.length() > 0; ) d(e);
                  }
                  function d(e) {
                    var t = e.shift();
                    if ("function" != typeof t) t._settlePromises();
                    else {
                      var a = e.shift(),
                        n = e.shift();
                      t.call(a, n);
                    }
                  }
                  (s.prototype.setScheduler = function (e) {
                    var t = this._schedule;
                    return (
                      (this._schedule = e), (this._customScheduler = !0), t
                    );
                  }),
                    (s.prototype.hasCustomScheduler = function () {
                      return this._customScheduler;
                    }),
                    (s.prototype.haveItemsQueued = function () {
                      return this._isTickUsed || this._haveDrainedQueues;
                    }),
                    (s.prototype.fatalError = function (e, t) {
                      t
                        ? (a.stderr.write(
                            "Fatal " + (e instanceof Error ? e.stack : e) + "\n"
                          ),
                          a.exit(2))
                        : this.throwLater(e);
                    }),
                    (s.prototype.throwLater = function (e, t) {
                      if (
                        (1 === arguments.length &&
                          ((t = e),
                          (e = function () {
                            throw t;
                          })),
                        "undefined" != typeof setTimeout)
                      )
                        setTimeout(function () {
                          e(t);
                        }, 0);
                      else
                        try {
                          this._schedule(function () {
                            e(t);
                          });
                        } catch (e) {
                          throw new Error(
                            "No async scheduler available\n\n    See http://goo.gl/MqrFmX\n"
                          );
                        }
                    }),
                    (s.prototype.invokeLater = function (e, t, a) {
                      this._lateQueue.push(e, t, a), this._queueTick();
                    }),
                    (s.prototype.invoke = function (e, t, a) {
                      this._normalQueue.push(e, t, a), this._queueTick();
                    }),
                    (s.prototype.settlePromises = function (e) {
                      this._normalQueue._pushOne(e), this._queueTick();
                    }),
                    (s.prototype._drainQueues = function () {
                      _(this._normalQueue),
                        this._reset(),
                        (this._haveDrainedQueues = !0),
                        _(this._lateQueue);
                    }),
                    (s.prototype._queueTick = function () {
                      this._isTickUsed ||
                        ((this._isTickUsed = !0),
                        this._schedule(this.drainQueues));
                    }),
                    (s.prototype._reset = function () {
                      this._isTickUsed = !1;
                    }),
                    (t.exports = s),
                    (t.exports.firstLineError = i);
                },
                { "./queue": 17, "./schedule": 18 },
              ],
              2: [
                function (e, t, a) {
                  "use strict";
                  t.exports = function (e, t, a, n) {
                    var i = !1,
                      r = function (e, t) {
                        this._reject(t);
                      },
                      o = function (e, t) {
                        (t.promiseRejectionQueued = !0),
                          t.bindingPromise._then(r, r, null, this, e);
                      },
                      s = function (e, t) {
                        0 == (50397184 & this._bitField) &&
                          this._resolveCallback(t.target);
                      },
                      _ = function (e, t) {
                        t.promiseRejectionQueued || this._reject(e);
                      };
                    (e.prototype.bind = function (r) {
                      i ||
                        ((i = !0),
                        (e.prototype._propagateFrom =
                          n.propagateFromFunction()),
                        (e.prototype._boundValue = n.boundValueFunction()));
                      var d = a(r),
                        l = new e(t);
                      l._propagateFrom(this, 1);
                      var c = this._target();
                      if ((l._setBoundTo(d), d instanceof e)) {
                        var u = {
                          promiseRejectionQueued: !1,
                          promise: l,
                          target: c,
                          bindingPromise: d,
                        };
                        c._then(t, o, void 0, l, u),
                          d._then(s, _, void 0, l, u),
                          l._setOnCancel(d);
                      } else l._resolveCallback(c);
                      return l;
                    }),
                      (e.prototype._setBoundTo = function (e) {
                        void 0 !== e
                          ? ((this._bitField = 2097152 | this._bitField),
                            (this._boundTo = e))
                          : (this._bitField = -2097153 & this._bitField);
                      }),
                      (e.prototype._isBound = function () {
                        return 2097152 == (2097152 & this._bitField);
                      }),
                      (e.bind = function (t, a) {
                        return e.resolve(a).bind(t);
                      });
                  };
                },
                {},
              ],
              3: [
                function (e, t, a) {
                  "use strict";
                  var n;
                  "undefined" != typeof Promise && (n = Promise);
                  var i = e("./promise")();
                  (i.noConflict = function () {
                    try {
                      Promise === i && (Promise = n);
                    } catch (e) {}
                    return i;
                  }),
                    (t.exports = i);
                },
                { "./promise": 15 },
              ],
              4: [
                function (e, t, a) {
                  "use strict";
                  t.exports = function (t, a, n, i) {
                    var r = e("./util"),
                      o = r.tryCatch,
                      s = r.errorObj,
                      _ = t._async;
                    (t.prototype.break = t.prototype.cancel =
                      function () {
                        if (!i.cancellation())
                          return this._warn("cancellation is disabled");
                        for (var e = this, t = e; e._isCancellable(); ) {
                          if (!e._cancelBy(t)) {
                            t._isFollowing()
                              ? t._followee().cancel()
                              : t._cancelBranched();
                            break;
                          }
                          var a = e._cancellationParent;
                          if (null == a || !a._isCancellable()) {
                            e._isFollowing()
                              ? e._followee().cancel()
                              : e._cancelBranched();
                            break;
                          }
                          e._isFollowing() && e._followee().cancel(),
                            e._setWillBeCancelled(),
                            (t = e),
                            (e = a);
                        }
                      }),
                      (t.prototype._branchHasCancelled = function () {
                        this._branchesRemainingToCancel--;
                      }),
                      (t.prototype._enoughBranchesHaveCancelled = function () {
                        return (
                          void 0 === this._branchesRemainingToCancel ||
                          this._branchesRemainingToCancel <= 0
                        );
                      }),
                      (t.prototype._cancelBy = function (e) {
                        return e === this
                          ? ((this._branchesRemainingToCancel = 0),
                            this._invokeOnCancel(),
                            !0)
                          : (this._branchHasCancelled(),
                            !!this._enoughBranchesHaveCancelled() &&
                              (this._invokeOnCancel(), !0));
                      }),
                      (t.prototype._cancelBranched = function () {
                        this._enoughBranchesHaveCancelled() && this._cancel();
                      }),
                      (t.prototype._cancel = function () {
                        this._isCancellable() &&
                          (this._setCancelled(),
                          _.invoke(this._cancelPromises, this, void 0));
                      }),
                      (t.prototype._cancelPromises = function () {
                        this._length() > 0 && this._settlePromises();
                      }),
                      (t.prototype._unsetOnCancel = function () {
                        this._onCancelField = void 0;
                      }),
                      (t.prototype._isCancellable = function () {
                        return this.isPending() && !this._isCancelled();
                      }),
                      (t.prototype.isCancellable = function () {
                        return this.isPending() && !this.isCancelled();
                      }),
                      (t.prototype._doInvokeOnCancel = function (e, t) {
                        if (r.isArray(e))
                          for (var a = 0; a < e.length; ++a)
                            this._doInvokeOnCancel(e[a], t);
                        else if (void 0 !== e)
                          if ("function" == typeof e) {
                            if (!t) {
                              var n = o(e).call(this._boundValue());
                              n === s &&
                                (this._attachExtraTrace(n.e),
                                _.throwLater(n.e));
                            }
                          } else e._resultCancelled(this);
                      }),
                      (t.prototype._invokeOnCancel = function () {
                        var e = this._onCancel();
                        this._unsetOnCancel(),
                          _.invoke(this._doInvokeOnCancel, this, e);
                      }),
                      (t.prototype._invokeInternalOnCancel = function () {
                        this._isCancellable() &&
                          (this._doInvokeOnCancel(this._onCancel(), !0),
                          this._unsetOnCancel());
                      }),
                      (t.prototype._resultCancelled = function () {
                        this.cancel();
                      });
                  };
                },
                { "./util": 21 },
              ],
              5: [
                function (e, t, a) {
                  "use strict";
                  t.exports = function (t) {
                    var a = e("./util"),
                      n = e("./es5").keys,
                      i = a.tryCatch,
                      r = a.errorObj;
                    return function (e, o, s) {
                      return function (_) {
                        var d = s._boundValue();
                        e: for (var l = 0; l < e.length; ++l) {
                          var c = e[l];
                          if (
                            c === Error ||
                            (null != c && c.prototype instanceof Error)
                          ) {
                            if (_ instanceof c) return i(o).call(d, _);
                          } else if ("function" == typeof c) {
                            var u = i(c).call(d, _);
                            if (u === r) return u;
                            if (u) return i(o).call(d, _);
                          } else if (a.isObject(_)) {
                            for (var h = n(c), f = 0; f < h.length; ++f) {
                              var p = h[f];
                              if (c[p] != _[p]) continue e;
                            }
                            return i(o).call(d, _);
                          }
                        }
                        return t;
                      };
                    };
                  };
                },
                { "./es5": 10, "./util": 21 },
              ],
              6: [
                function (e, t, a) {
                  "use strict";
                  t.exports = function (e) {
                    var t = !1,
                      a = [];
                    function n() {
                      this._trace = new n.CapturedTrace(i());
                    }
                    function i() {
                      var e = a.length - 1;
                      if (e >= 0) return a[e];
                    }
                    return (
                      (e.prototype._promiseCreated = function () {}),
                      (e.prototype._pushContext = function () {}),
                      (e.prototype._popContext = function () {
                        return null;
                      }),
                      (e._peekContext = e.prototype._peekContext =
                        function () {}),
                      (n.prototype._pushContext = function () {
                        void 0 !== this._trace &&
                          ((this._trace._promiseCreated = null),
                          a.push(this._trace));
                      }),
                      (n.prototype._popContext = function () {
                        if (void 0 !== this._trace) {
                          var e = a.pop(),
                            t = e._promiseCreated;
                          return (e._promiseCreated = null), t;
                        }
                        return null;
                      }),
                      (n.CapturedTrace = null),
                      (n.create = function () {
                        if (t) return new n();
                      }),
                      (n.deactivateLongStackTraces = function () {}),
                      (n.activateLongStackTraces = function () {
                        var a = e.prototype._pushContext,
                          r = e.prototype._popContext,
                          o = e._peekContext,
                          s = e.prototype._peekContext,
                          _ = e.prototype._promiseCreated;
                        (n.deactivateLongStackTraces = function () {
                          (e.prototype._pushContext = a),
                            (e.prototype._popContext = r),
                            (e._peekContext = o),
                            (e.prototype._peekContext = s),
                            (e.prototype._promiseCreated = _),
                            (t = !1);
                        }),
                          (t = !0),
                          (e.prototype._pushContext = n.prototype._pushContext),
                          (e.prototype._popContext = n.prototype._popContext),
                          (e._peekContext = e.prototype._peekContext = i),
                          (e.prototype._promiseCreated = function () {
                            var e = this._peekContext();
                            e &&
                              null == e._promiseCreated &&
                              (e._promiseCreated = this);
                          });
                      }),
                      n
                    );
                  };
                },
                {},
              ],
              7: [
                function (e, t, n) {
                  "use strict";
                  t.exports = function (t, n, i, r) {
                    var o,
                      s,
                      d,
                      l,
                      c = t._async,
                      u = e("./errors").Warning,
                      h = e("./util"),
                      f = e("./es5"),
                      p = h.canAttachTrace,
                      v =
                        /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,
                      g = /\((?:timers\.js):\d+:\d+\)/,
                      m = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,
                      y = null,
                      b = null,
                      x = !1,
                      k = !(0 == h.env("BLUEBIRD_DEBUG")),
                      w = !(
                        0 == h.env("BLUEBIRD_WARNINGS") ||
                        (!k && !h.env("BLUEBIRD_WARNINGS"))
                      ),
                      E = !(
                        0 == h.env("BLUEBIRD_LONG_STACK_TRACES") ||
                        (!k && !h.env("BLUEBIRD_LONG_STACK_TRACES"))
                      ),
                      S =
                        0 != h.env("BLUEBIRD_W_FORGOTTEN_RETURN") &&
                        (w || !!h.env("BLUEBIRD_W_FORGOTTEN_RETURN"));
                    !(function () {
                      var e = [];
                      function a() {
                        for (var t = 0; t < e.length; ++t)
                          e[t]._notifyUnhandledRejection();
                        n();
                      }
                      function n() {
                        e.length = 0;
                      }
                      (l = function (t) {
                        e.push(t), setTimeout(a, 1);
                      }),
                        f.defineProperty(t, "_unhandledRejectionCheck", {
                          value: a,
                        }),
                        f.defineProperty(t, "_unhandledRejectionClear", {
                          value: n,
                        });
                    })(),
                      (t.prototype.suppressUnhandledRejections = function () {
                        var e = this._target();
                        e._bitField = (-1048577 & e._bitField) | 524288;
                      }),
                      (t.prototype._ensurePossibleRejectionHandled =
                        function () {
                          0 == (524288 & this._bitField) &&
                            (this._setRejectionIsUnhandled(), l(this));
                        }),
                      (t.prototype._notifyUnhandledRejectionIsHandled =
                        function () {
                          K("rejectionHandled", o, void 0, this);
                        }),
                      (t.prototype._setReturnedNonUndefined = function () {
                        this._bitField = 268435456 | this._bitField;
                      }),
                      (t.prototype._returnedNonUndefined = function () {
                        return 0 != (268435456 & this._bitField);
                      }),
                      (t.prototype._notifyUnhandledRejection = function () {
                        if (this._isRejectionUnhandled()) {
                          var e = this._settledValue();
                          this._setUnhandledRejectionIsNotified(),
                            K("unhandledRejection", s, e, this);
                        }
                      }),
                      (t.prototype._setUnhandledRejectionIsNotified =
                        function () {
                          this._bitField = 262144 | this._bitField;
                        }),
                      (t.prototype._unsetUnhandledRejectionIsNotified =
                        function () {
                          this._bitField = -262145 & this._bitField;
                        }),
                      (t.prototype._isUnhandledRejectionNotified = function () {
                        return (262144 & this._bitField) > 0;
                      }),
                      (t.prototype._setRejectionIsUnhandled = function () {
                        this._bitField = 1048576 | this._bitField;
                      }),
                      (t.prototype._unsetRejectionIsUnhandled = function () {
                        (this._bitField = -1048577 & this._bitField),
                          this._isUnhandledRejectionNotified() &&
                            (this._unsetUnhandledRejectionIsNotified(),
                            this._notifyUnhandledRejectionIsHandled());
                      }),
                      (t.prototype._isRejectionUnhandled = function () {
                        return (1048576 & this._bitField) > 0;
                      }),
                      (t.prototype._warn = function (e, t, a) {
                        return q(e, t, a || this);
                      }),
                      (t.onPossiblyUnhandledRejection = function (e) {
                        var a = t._getContext();
                        s = h.contextBind(a, e);
                      }),
                      (t.onUnhandledRejectionHandled = function (e) {
                        var a = t._getContext();
                        o = h.contextBind(a, e);
                      });
                    var D = function () {};
                    (t.longStackTraces = function () {
                      if (c.haveItemsQueued() && !ne.longStackTraces)
                        throw new Error(
                          "cannot enable long stack traces after promises have been created\n\n    See http://goo.gl/MqrFmX\n"
                        );
                      if (!ne.longStackTraces && X()) {
                        var e = t.prototype._captureStackTrace,
                          a = t.prototype._attachExtraTrace,
                          i = t.prototype._dereferenceTrace;
                        (ne.longStackTraces = !0),
                          (D = function () {
                            if (c.haveItemsQueued() && !ne.longStackTraces)
                              throw new Error(
                                "cannot enable long stack traces after promises have been created\n\n    See http://goo.gl/MqrFmX\n"
                              );
                            (t.prototype._captureStackTrace = e),
                              (t.prototype._attachExtraTrace = a),
                              (t.prototype._dereferenceTrace = i),
                              n.deactivateLongStackTraces(),
                              (ne.longStackTraces = !1);
                          }),
                          (t.prototype._captureStackTrace = B),
                          (t.prototype._attachExtraTrace = V),
                          (t.prototype._dereferenceTrace = U),
                          n.activateLongStackTraces();
                      }
                    }),
                      (t.hasLongStackTraces = function () {
                        return ne.longStackTraces && X();
                      });
                    var N = {
                        unhandledrejection: {
                          before: function () {
                            var e = h.global.onunhandledrejection;
                            return (h.global.onunhandledrejection = null), e;
                          },
                          after: function (e) {
                            h.global.onunhandledrejection = e;
                          },
                        },
                        rejectionhandled: {
                          before: function () {
                            var e = h.global.onrejectionhandled;
                            return (h.global.onrejectionhandled = null), e;
                          },
                          after: function (e) {
                            h.global.onrejectionhandled = e;
                          },
                        },
                      },
                      C = (function () {
                        var e = function (e, t) {
                          if (!e) return !h.global.dispatchEvent(t);
                          var a;
                          try {
                            return (a = e.before()), !h.global.dispatchEvent(t);
                          } finally {
                            e.after(a);
                          }
                        };
                        try {
                          if ("function" == typeof CustomEvent) {
                            var t = new CustomEvent("CustomEvent");
                            return (
                              h.global.dispatchEvent(t),
                              function (t, a) {
                                t = t.toLowerCase();
                                var n = new CustomEvent(t, {
                                  detail: a,
                                  cancelable: !0,
                                });
                                return (
                                  f.defineProperty(n, "promise", {
                                    value: a.promise,
                                  }),
                                  f.defineProperty(n, "reason", {
                                    value: a.reason,
                                  }),
                                  e(N[t], n)
                                );
                              }
                            );
                          }
                          if ("function" == typeof Event) {
                            t = new Event("CustomEvent");
                            return (
                              h.global.dispatchEvent(t),
                              function (t, a) {
                                t = t.toLowerCase();
                                var n = new Event(t, { cancelable: !0 });
                                return (
                                  (n.detail = a),
                                  f.defineProperty(n, "promise", {
                                    value: a.promise,
                                  }),
                                  f.defineProperty(n, "reason", {
                                    value: a.reason,
                                  }),
                                  e(N[t], n)
                                );
                              }
                            );
                          }
                          return (
                            (t =
                              document.createEvent(
                                "CustomEvent"
                              )).initCustomEvent("testingtheevent", !1, !0, {}),
                            h.global.dispatchEvent(t),
                            function (t, a) {
                              t = t.toLowerCase();
                              var n = document.createEvent("CustomEvent");
                              return (
                                n.initCustomEvent(t, !1, !0, a), e(N[t], n)
                              );
                            }
                          );
                        } catch (e) {}
                        return function () {
                          return !1;
                        };
                      })(),
                      T = h.isNode
                        ? function () {
                            return a.emit.apply(a, arguments);
                          }
                        : h.global
                        ? function (e) {
                            var t = "on" + e.toLowerCase(),
                              a = h.global[t];
                            return (
                              !!a &&
                              (a.apply(h.global, [].slice.call(arguments, 1)),
                              !0)
                            );
                          }
                        : function () {
                            return !1;
                          };
                    function M(e, t) {
                      return { promise: t };
                    }
                    var A = {
                        promiseCreated: M,
                        promiseFulfilled: M,
                        promiseRejected: M,
                        promiseResolved: M,
                        promiseCancelled: M,
                        promiseChained: function (e, t, a) {
                          return { promise: t, child: a };
                        },
                        warning: function (e, t) {
                          return { warning: t };
                        },
                        unhandledRejection: function (e, t, a) {
                          return { reason: t, promise: a };
                        },
                        rejectionHandled: M,
                      },
                      O = function (e) {
                        var t = !1;
                        try {
                          t = T.apply(null, arguments);
                        } catch (e) {
                          c.throwLater(e), (t = !0);
                        }
                        var a = !1;
                        try {
                          a = C(e, A[e].apply(null, arguments));
                        } catch (e) {
                          c.throwLater(e), (a = !0);
                        }
                        return a || t;
                      };
                    function H() {
                      return !1;
                    }
                    function j(e, t, a) {
                      var n = this;
                      try {
                        e(t, a, function (e) {
                          if ("function" != typeof e)
                            throw new TypeError(
                              "onCancel must be a function, got: " +
                                h.toString(e)
                            );
                          n._attachCancellationCallback(e);
                        });
                      } catch (e) {
                        return e;
                      }
                    }
                    function L(e) {
                      if (!this._isCancellable()) return this;
                      var t = this._onCancel();
                      void 0 !== t
                        ? h.isArray(t)
                          ? t.push(e)
                          : this._setOnCancel([t, e])
                        : this._setOnCancel(e);
                    }
                    function P() {
                      return this._onCancelField;
                    }
                    function z(e) {
                      this._onCancelField = e;
                    }
                    function $() {
                      (this._cancellationParent = void 0),
                        (this._onCancelField = void 0);
                    }
                    function F(e, t) {
                      if (0 != (1 & t)) {
                        this._cancellationParent = e;
                        var a = e._branchesRemainingToCancel;
                        void 0 === a && (a = 0),
                          (e._branchesRemainingToCancel = a + 1);
                      }
                      0 != (2 & t) &&
                        e._isBound() &&
                        this._setBoundTo(e._boundTo);
                    }
                    (t.config = function (e) {
                      if (
                        ("longStackTraces" in (e = Object(e)) &&
                          (e.longStackTraces
                            ? t.longStackTraces()
                            : !e.longStackTraces &&
                              t.hasLongStackTraces() &&
                              D()),
                        "warnings" in e)
                      ) {
                        var a = e.warnings;
                        (ne.warnings = !!a),
                          (S = ne.warnings),
                          h.isObject(a) &&
                            "wForgottenReturn" in a &&
                            (S = !!a.wForgottenReturn);
                      }
                      if (
                        "cancellation" in e &&
                        e.cancellation &&
                        !ne.cancellation
                      ) {
                        if (c.haveItemsQueued())
                          throw new Error(
                            "cannot enable cancellation after promises are in use"
                          );
                        (t.prototype._clearCancellationData = $),
                          (t.prototype._propagateFrom = F),
                          (t.prototype._onCancel = P),
                          (t.prototype._setOnCancel = z),
                          (t.prototype._attachCancellationCallback = L),
                          (t.prototype._execute = j),
                          (I = F),
                          (ne.cancellation = !0);
                      }
                      if (
                        ("monitoring" in e &&
                          (e.monitoring && !ne.monitoring
                            ? ((ne.monitoring = !0),
                              (t.prototype._fireEvent = O))
                            : !e.monitoring &&
                              ne.monitoring &&
                              ((ne.monitoring = !1),
                              (t.prototype._fireEvent = H))),
                        "asyncHooks" in e && h.nodeSupportsAsyncResource)
                      ) {
                        var n = ne.asyncHooks,
                          o = !!e.asyncHooks;
                        n !== o && ((ne.asyncHooks = o), o ? i() : r());
                      }
                      return t;
                    }),
                      (t.prototype._fireEvent = H),
                      (t.prototype._execute = function (e, t, a) {
                        try {
                          e(t, a);
                        } catch (e) {
                          return e;
                        }
                      }),
                      (t.prototype._onCancel = function () {}),
                      (t.prototype._setOnCancel = function (e) {}),
                      (t.prototype._attachCancellationCallback = function (
                        e
                      ) {}),
                      (t.prototype._captureStackTrace = function () {}),
                      (t.prototype._attachExtraTrace = function () {}),
                      (t.prototype._dereferenceTrace = function () {}),
                      (t.prototype._clearCancellationData = function () {}),
                      (t.prototype._propagateFrom = function (e, t) {});
                    var I = function (e, t) {
                      0 != (2 & t) &&
                        e._isBound() &&
                        this._setBoundTo(e._boundTo);
                    };
                    function R() {
                      var e = this._boundTo;
                      return void 0 !== e && e instanceof t
                        ? e.isFulfilled()
                          ? e.value()
                          : void 0
                        : e;
                    }
                    function B() {
                      this._trace = new te(this._peekContext());
                    }
                    function V(e, t) {
                      if (p(e)) {
                        var a = this._trace;
                        if (
                          (void 0 !== a && t && (a = a._parent), void 0 !== a)
                        )
                          a.attachExtraTrace(e);
                        else if (!e.__stackCleaned__) {
                          var n = Y(e);
                          h.notEnumerableProp(
                            e,
                            "stack",
                            n.message + "\n" + n.stack.join("\n")
                          ),
                            h.notEnumerableProp(e, "__stackCleaned__", !0);
                        }
                      }
                    }
                    function U() {
                      this._trace = void 0;
                    }
                    function q(e, a, n) {
                      if (ne.warnings) {
                        var i,
                          r = new u(e);
                        if (a) n._attachExtraTrace(r);
                        else if (ne.longStackTraces && (i = t._peekContext()))
                          i.attachExtraTrace(r);
                        else {
                          var o = Y(r);
                          r.stack = o.message + "\n" + o.stack.join("\n");
                        }
                        O("warning", r) || W(r, "", !0);
                      }
                    }
                    function J(e) {
                      for (var t = [], a = 0; a < e.length; ++a) {
                        var n = e[a],
                          i = "    (No stack trace)" === n || y.test(n),
                          r = i && Q(n);
                        i &&
                          !r &&
                          (x && " " !== n.charAt(0) && (n = "    " + n),
                          t.push(n));
                      }
                      return t;
                    }
                    function Y(e) {
                      var t = e.stack,
                        a = e.toString();
                      return (
                        (t =
                          "string" == typeof t && t.length > 0
                            ? (function (e) {
                                for (
                                  var t = e.stack
                                      .replace(/\s+$/g, "")
                                      .split("\n"),
                                    a = 0;
                                  a < t.length;
                                  ++a
                                ) {
                                  var n = t[a];
                                  if ("    (No stack trace)" === n || y.test(n))
                                    break;
                                }
                                return (
                                  a > 0 &&
                                    "SyntaxError" != e.name &&
                                    (t = t.slice(a)),
                                  t
                                );
                              })(e)
                            : ["    (No stack trace)"]),
                        {
                          message: a,
                          stack: "SyntaxError" == e.name ? t : J(t),
                        }
                      );
                    }
                    function W(e, t, a) {
                      if ("undefined" != typeof console) {
                        var n;
                        if (h.isObject(e)) {
                          var i = e.stack;
                          n = t + b(i, e);
                        } else n = t + String(e);
                        "function" == typeof d
                          ? d(n, a)
                          : ("function" != typeof console.log &&
                              "object" !== _(console.log)) ||
                            console.log(n);
                      }
                    }
                    function K(e, t, a, n) {
                      var i = !1;
                      try {
                        "function" == typeof t &&
                          ((i = !0), "rejectionHandled" === e ? t(n) : t(a, n));
                      } catch (e) {
                        c.throwLater(e);
                      }
                      "unhandledRejection" === e
                        ? O(e, a, n) || i || W(a, "Unhandled rejection ")
                        : O(e, n);
                    }
                    function G(e) {
                      var t;
                      if ("function" == typeof e)
                        t = "[function " + (e.name || "anonymous") + "]";
                      else {
                        t =
                          e && "function" == typeof e.toString
                            ? e.toString()
                            : h.toString(e);
                        if (/\[object [a-zA-Z0-9$_]+\]/.test(t))
                          try {
                            t = JSON.stringify(e);
                          } catch (e) {}
                        0 === t.length && (t = "(empty array)");
                      }
                      return (
                        "(<" +
                        (function (e) {
                          if (e.length < 41) return e;
                          return e.substr(0, 38) + "...";
                        })(t) +
                        ">, no stack trace)"
                      );
                    }
                    function X() {
                      return "function" == typeof ae;
                    }
                    var Q = function () {
                        return !1;
                      },
                      Z = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
                    function ee(e) {
                      var t = e.match(Z);
                      if (t)
                        return { fileName: t[1], line: parseInt(t[2], 10) };
                    }
                    function te(e) {
                      (this._parent = e), (this._promisesCreated = 0);
                      var t = (this._length =
                        1 + (void 0 === e ? 0 : e._length));
                      ae(this, te), t > 32 && this.uncycle();
                    }
                    h.inherits(te, Error),
                      (n.CapturedTrace = te),
                      (te.prototype.uncycle = function () {
                        var e = this._length;
                        if (!(e < 2)) {
                          for (
                            var t = [], a = {}, n = 0, i = this;
                            void 0 !== i;
                            ++n
                          )
                            t.push(i), (i = i._parent);
                          for (n = (e = this._length = n) - 1; n >= 0; --n) {
                            var r = t[n].stack;
                            void 0 === a[r] && (a[r] = n);
                          }
                          for (n = 0; n < e; ++n) {
                            var o = a[t[n].stack];
                            if (void 0 !== o && o !== n) {
                              o > 0 &&
                                ((t[o - 1]._parent = void 0),
                                (t[o - 1]._length = 1)),
                                (t[n]._parent = void 0),
                                (t[n]._length = 1);
                              var s = n > 0 ? t[n - 1] : this;
                              o < e - 1
                                ? ((s._parent = t[o + 1]),
                                  s._parent.uncycle(),
                                  (s._length = s._parent._length + 1))
                                : ((s._parent = void 0), (s._length = 1));
                              for (
                                var _ = s._length + 1, d = n - 2;
                                d >= 0;
                                --d
                              )
                                (t[d]._length = _), _++;
                              return;
                            }
                          }
                        }
                      }),
                      (te.prototype.attachExtraTrace = function (e) {
                        if (!e.__stackCleaned__) {
                          this.uncycle();
                          for (
                            var t = Y(e),
                              a = t.message,
                              n = [t.stack],
                              i = this;
                            void 0 !== i;

                          )
                            n.push(J(i.stack.split("\n"))), (i = i._parent);
                          !(function (e) {
                            for (var t = e[0], a = 1; a < e.length; ++a) {
                              for (
                                var n = e[a],
                                  i = t.length - 1,
                                  r = t[i],
                                  o = -1,
                                  s = n.length - 1;
                                s >= 0;
                                --s
                              )
                                if (n[s] === r) {
                                  o = s;
                                  break;
                                }
                              for (s = o; s >= 0; --s) {
                                var _ = n[s];
                                if (t[i] !== _) break;
                                t.pop(), i--;
                              }
                              t = n;
                            }
                          })(n),
                            (function (e) {
                              for (var t = 0; t < e.length; ++t)
                                (0 === e[t].length ||
                                  (t + 1 < e.length &&
                                    e[t][0] === e[t + 1][0])) &&
                                  (e.splice(t, 1), t--);
                            })(n),
                            h.notEnumerableProp(
                              e,
                              "stack",
                              (function (e, t) {
                                for (var a = 0; a < t.length - 1; ++a)
                                  t[a].push("From previous event:"),
                                    (t[a] = t[a].join("\n"));
                                return (
                                  a < t.length && (t[a] = t[a].join("\n")),
                                  e + "\n" + t.join("\n")
                                );
                              })(a, n)
                            ),
                            h.notEnumerableProp(e, "__stackCleaned__", !0);
                        }
                      });
                    var ae = (function () {
                      var e = /^\s*at\s*/,
                        t = function (e, t) {
                          return "string" == typeof e
                            ? e
                            : void 0 !== t.name && void 0 !== t.message
                            ? t.toString()
                            : G(t);
                        };
                      if (
                        "number" == typeof Error.stackTraceLimit &&
                        "function" == typeof Error.captureStackTrace
                      ) {
                        (Error.stackTraceLimit += 6), (y = e), (b = t);
                        var a = Error.captureStackTrace;
                        return (
                          (Q = function (e) {
                            return v.test(e);
                          }),
                          function (e, t) {
                            (Error.stackTraceLimit += 6),
                              a(e, t),
                              (Error.stackTraceLimit -= 6);
                          }
                        );
                      }
                      var n,
                        i = new Error();
                      if (
                        "string" == typeof i.stack &&
                        i.stack.split("\n")[0].indexOf("stackDetection@") >= 0
                      )
                        return (
                          (y = /@/),
                          (b = t),
                          (x = !0),
                          function (e) {
                            e.stack = new Error().stack;
                          }
                        );
                      try {
                        throw new Error();
                      } catch (e) {
                        n = "stack" in e;
                      }
                      return "stack" in i ||
                        !n ||
                        "number" != typeof Error.stackTraceLimit
                        ? ((b = function (e, t) {
                            return "string" == typeof e
                              ? e
                              : ("object" !== _(t) && "function" != typeof t) ||
                                void 0 === t.name ||
                                void 0 === t.message
                              ? G(t)
                              : t.toString();
                          }),
                          null)
                        : ((y = e),
                          (b = t),
                          function (e) {
                            Error.stackTraceLimit += 6;
                            try {
                              throw new Error();
                            } catch (t) {
                              e.stack = t.stack;
                            }
                            Error.stackTraceLimit -= 6;
                          });
                    })();
                    "undefined" != typeof console &&
                      void 0 !== console.warn &&
                      ((d = function (e) {
                        console.warn(e);
                      }),
                      h.isNode && a.stderr.isTTY
                        ? (d = function (e, t) {
                            var a = t ? "[33m" : "[31m";
                            console.warn(a + e + "[0m\n");
                          })
                        : h.isNode ||
                          "string" != typeof new Error().stack ||
                          (d = function (e, t) {
                            console.warn(
                              "%c" + e,
                              t ? "color: darkorange" : "color: red"
                            );
                          }));
                    var ne = {
                      warnings: w,
                      longStackTraces: !1,
                      cancellation: !1,
                      monitoring: !1,
                      asyncHooks: !1,
                    };
                    return (
                      E && t.longStackTraces(),
                      {
                        asyncHooks: function () {
                          return ne.asyncHooks;
                        },
                        longStackTraces: function () {
                          return ne.longStackTraces;
                        },
                        warnings: function () {
                          return ne.warnings;
                        },
                        cancellation: function () {
                          return ne.cancellation;
                        },
                        monitoring: function () {
                          return ne.monitoring;
                        },
                        propagateFromFunction: function () {
                          return I;
                        },
                        boundValueFunction: function () {
                          return R;
                        },
                        checkForgottenReturns: function (e, t, a, n, i) {
                          if (void 0 === e && null !== t && S) {
                            if (void 0 !== i && i._returnedNonUndefined())
                              return;
                            if (0 == (65535 & n._bitField)) return;
                            a && (a += " ");
                            var r = "",
                              o = "";
                            if (t._trace) {
                              for (
                                var s = t._trace.stack.split("\n"),
                                  _ = J(s),
                                  d = _.length - 1;
                                d >= 0;
                                --d
                              ) {
                                var l = _[d];
                                if (!g.test(l)) {
                                  var c = l.match(m);
                                  c &&
                                    (r =
                                      "at " +
                                      c[1] +
                                      ":" +
                                      c[2] +
                                      ":" +
                                      c[3] +
                                      " ");
                                  break;
                                }
                              }
                              if (_.length > 0) {
                                var u = _[0];
                                for (d = 0; d < s.length; ++d)
                                  if (s[d] === u) {
                                    d > 0 && (o = "\n" + s[d - 1]);
                                    break;
                                  }
                              }
                            }
                            var h =
                              "a promise was created in a " +
                              a +
                              "handler " +
                              r +
                              "but was not returned from it, see http://goo.gl/rRqMUw" +
                              o;
                            n._warn(h, !0, t);
                          }
                        },
                        setBounds: function (e, t) {
                          if (X()) {
                            for (
                              var a,
                                n,
                                i = (e.stack || "").split("\n"),
                                r = (t.stack || "").split("\n"),
                                o = -1,
                                s = -1,
                                _ = 0;
                              _ < i.length;
                              ++_
                            )
                              if ((d = ee(i[_]))) {
                                (a = d.fileName), (o = d.line);
                                break;
                              }
                            for (_ = 0; _ < r.length; ++_) {
                              var d;
                              if ((d = ee(r[_]))) {
                                (n = d.fileName), (s = d.line);
                                break;
                              }
                            }
                            o < 0 ||
                              s < 0 ||
                              !a ||
                              !n ||
                              a !== n ||
                              o >= s ||
                              (Q = function (e) {
                                if (v.test(e)) return !0;
                                var t = ee(e);
                                return !!(
                                  t &&
                                  t.fileName === a &&
                                  o <= t.line &&
                                  t.line <= s
                                );
                              });
                          }
                        },
                        warn: q,
                        deprecated: function (e, t) {
                          var a =
                            e +
                            " is deprecated and will be removed in a future version.";
                          return t && (a += " Use " + t + " instead."), q(a);
                        },
                        CapturedTrace: te,
                        fireDomEvent: C,
                        fireGlobalEvent: T,
                      }
                    );
                  };
                },
                { "./errors": 9, "./es5": 10, "./util": 21 },
              ],
              8: [
                function (e, t, a) {
                  "use strict";
                  t.exports = function (e) {
                    function t() {
                      return this.value;
                    }
                    function a() {
                      throw this.reason;
                    }
                    (e.prototype.return = e.prototype.thenReturn =
                      function (a) {
                        return (
                          a instanceof e && a.suppressUnhandledRejections(),
                          this._then(t, void 0, void 0, { value: a }, void 0)
                        );
                      }),
                      (e.prototype.throw = e.prototype.thenThrow =
                        function (e) {
                          return this._then(
                            a,
                            void 0,
                            void 0,
                            { reason: e },
                            void 0
                          );
                        }),
                      (e.prototype.catchThrow = function (e) {
                        if (arguments.length <= 1)
                          return this._then(
                            void 0,
                            a,
                            void 0,
                            { reason: e },
                            void 0
                          );
                        var t = arguments[1];
                        return this.caught(e, function () {
                          throw t;
                        });
                      }),
                      (e.prototype.catchReturn = function (a) {
                        if (arguments.length <= 1)
                          return (
                            a instanceof e && a.suppressUnhandledRejections(),
                            this._then(void 0, t, void 0, { value: a }, void 0)
                          );
                        var n = arguments[1];
                        n instanceof e && n.suppressUnhandledRejections();
                        return this.caught(a, function () {
                          return n;
                        });
                      });
                  };
                },
                {},
              ],
              9: [
                function (e, t, a) {
                  "use strict";
                  var n,
                    i,
                    r = e("./es5"),
                    o = r.freeze,
                    s = e("./util"),
                    _ = s.inherits,
                    d = s.notEnumerableProp;
                  function l(e, t) {
                    function a(n) {
                      if (!(this instanceof a)) return new a(n);
                      d(this, "message", "string" == typeof n ? n : t),
                        d(this, "name", e),
                        Error.captureStackTrace
                          ? Error.captureStackTrace(this, this.constructor)
                          : Error.call(this);
                    }
                    return _(a, Error), a;
                  }
                  var c = l("Warning", "warning"),
                    u = l("CancellationError", "cancellation error"),
                    h = l("TimeoutError", "timeout error"),
                    f = l("AggregateError", "aggregate error");
                  try {
                    (n = TypeError), (i = RangeError);
                  } catch (e) {
                    (n = l("TypeError", "type error")),
                      (i = l("RangeError", "range error"));
                  }
                  for (
                    var p =
                        "join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(
                          " "
                        ),
                      v = 0;
                    v < p.length;
                    ++v
                  )
                    "function" == typeof Array.prototype[p[v]] &&
                      (f.prototype[p[v]] = Array.prototype[p[v]]);
                  r.defineProperty(f.prototype, "length", {
                    value: 0,
                    configurable: !1,
                    writable: !0,
                    enumerable: !0,
                  }),
                    (f.prototype.isOperational = !0);
                  var g = 0;
                  function m(e) {
                    if (!(this instanceof m)) return new m(e);
                    d(this, "name", "OperationalError"),
                      d(this, "message", e),
                      (this.cause = e),
                      (this.isOperational = !0),
                      e instanceof Error
                        ? (d(this, "message", e.message),
                          d(this, "stack", e.stack))
                        : Error.captureStackTrace &&
                          Error.captureStackTrace(this, this.constructor);
                  }
                  (f.prototype.toString = function () {
                    var e = Array(4 * g + 1).join(" "),
                      t = "\n" + e + "AggregateError of:\n";
                    g++, (e = Array(4 * g + 1).join(" "));
                    for (var a = 0; a < this.length; ++a) {
                      for (
                        var n =
                            this[a] === this
                              ? "[Circular AggregateError]"
                              : this[a] + "",
                          i = n.split("\n"),
                          r = 0;
                        r < i.length;
                        ++r
                      )
                        i[r] = e + i[r];
                      t += (n = i.join("\n")) + "\n";
                    }
                    return g--, t;
                  }),
                    _(m, Error);
                  var y = Error.__BluebirdErrorTypes__;
                  y ||
                    ((y = o({
                      CancellationError: u,
                      TimeoutError: h,
                      OperationalError: m,
                      RejectionError: m,
                      AggregateError: f,
                    })),
                    r.defineProperty(Error, "__BluebirdErrorTypes__", {
                      value: y,
                      writable: !1,
                      enumerable: !1,
                      configurable: !1,
                    })),
                    (t.exports = {
                      Error: Error,
                      TypeError: n,
                      RangeError: i,
                      CancellationError: y.CancellationError,
                      OperationalError: y.OperationalError,
                      TimeoutError: y.TimeoutError,
                      AggregateError: y.AggregateError,
                      Warning: c,
                    });
                },
                { "./es5": 10, "./util": 21 },
              ],
              10: [
                function (e, t, a) {
                  var n = (function () {
                    "use strict";
                    return void 0 === this;
                  })();
                  if (n)
                    t.exports = {
                      freeze: Object.freeze,
                      defineProperty: Object.defineProperty,
                      getDescriptor: Object.getOwnPropertyDescriptor,
                      keys: Object.keys,
                      names: Object.getOwnPropertyNames,
                      getPrototypeOf: Object.getPrototypeOf,
                      isArray: Array.isArray,
                      isES5: n,
                      propertyIsWritable: function (e, t) {
                        var a = Object.getOwnPropertyDescriptor(e, t);
                        return !(a && !a.writable && !a.set);
                      },
                    };
                  else {
                    var i = {}.hasOwnProperty,
                      r = {}.toString,
                      o = {}.constructor.prototype,
                      s = function (e) {
                        var t = [];
                        for (var a in e) i.call(e, a) && t.push(a);
                        return t;
                      };
                    t.exports = {
                      isArray: function (e) {
                        try {
                          return "[object Array]" === r.call(e);
                        } catch (e) {
                          return !1;
                        }
                      },
                      keys: s,
                      names: s,
                      defineProperty: function (e, t, a) {
                        return (e[t] = a.value), e;
                      },
                      getDescriptor: function (e, t) {
                        return { value: e[t] };
                      },
                      freeze: function (e) {
                        return e;
                      },
                      getPrototypeOf: function (e) {
                        try {
                          return Object(e).constructor.prototype;
                        } catch (e) {
                          return o;
                        }
                      },
                      isES5: n,
                      propertyIsWritable: function () {
                        return !0;
                      },
                    };
                  }
                },
                {},
              ],
              11: [
                function (e, t, a) {
                  "use strict";
                  t.exports = function (t, a, n) {
                    var i = e("./util"),
                      r = t.CancellationError,
                      o = i.errorObj,
                      s = e("./catch_filter")(n);
                    function _(e, t, a) {
                      (this.promise = e),
                        (this.type = t),
                        (this.handler = a),
                        (this.called = !1),
                        (this.cancelPromise = null);
                    }
                    function d(e) {
                      this.finallyHandler = e;
                    }
                    function l(e, t) {
                      return (
                        null != e.cancelPromise &&
                        (arguments.length > 1
                          ? e.cancelPromise._reject(t)
                          : e.cancelPromise._cancel(),
                        (e.cancelPromise = null),
                        !0)
                      );
                    }
                    function c() {
                      return h.call(
                        this,
                        this.promise._target()._settledValue()
                      );
                    }
                    function u(e) {
                      if (!l(this, e)) return (o.e = e), o;
                    }
                    function h(e) {
                      var i = this.promise,
                        s = this.handler;
                      if (!this.called) {
                        this.called = !0;
                        var _ = this.isFinallyHandler()
                          ? s.call(i._boundValue())
                          : s.call(i._boundValue(), e);
                        if (_ === n) return _;
                        if (void 0 !== _) {
                          i._setReturnedNonUndefined();
                          var h = a(_, i);
                          if (h instanceof t) {
                            if (null != this.cancelPromise) {
                              if (h._isCancelled()) {
                                var f = new r("late cancellation observer");
                                return i._attachExtraTrace(f), (o.e = f), o;
                              }
                              h.isPending() &&
                                h._attachCancellationCallback(new d(this));
                            }
                            return h._then(c, u, void 0, this, void 0);
                          }
                        }
                      }
                      return i.isRejected()
                        ? (l(this), (o.e = e), o)
                        : (l(this), e);
                    }
                    return (
                      (_.prototype.isFinallyHandler = function () {
                        return 0 === this.type;
                      }),
                      (d.prototype._resultCancelled = function () {
                        l(this.finallyHandler);
                      }),
                      (t.prototype._passThrough = function (e, t, a, n) {
                        return "function" != typeof e
                          ? this.then()
                          : this._then(a, n, void 0, new _(this, t, e), void 0);
                      }),
                      (t.prototype.lastly = t.prototype.finally =
                        function (e) {
                          return this._passThrough(e, 0, h, h);
                        }),
                      (t.prototype.tap = function (e) {
                        return this._passThrough(e, 1, h);
                      }),
                      (t.prototype.tapCatch = function (e) {
                        var a = arguments.length;
                        if (1 === a) return this._passThrough(e, 1, void 0, h);
                        var n,
                          r = new Array(a - 1),
                          o = 0;
                        for (n = 0; n < a - 1; ++n) {
                          var _ = arguments[n];
                          if (!i.isObject(_))
                            return t.reject(
                              new TypeError(
                                "tapCatch statement predicate: expecting an object but got " +
                                  i.classString(_)
                              )
                            );
                          r[o++] = _;
                        }
                        r.length = o;
                        var d = arguments[n];
                        return this._passThrough(s(r, d, this), 1, void 0, h);
                      }),
                      _
                    );
                  };
                },
                { "./catch_filter": 5, "./util": 21 },
              ],
              12: [
                function (e, t, a) {
                  "use strict";
                  t.exports = function (t, a, n, i, r) {
                    var o = e("./util");
                    o.canEvaluate, o.tryCatch, o.errorObj;
                    t.join = function () {
                      var e,
                        t = arguments.length - 1;
                      t > 0 &&
                        "function" == typeof arguments[t] &&
                        (e = arguments[t]);
                      var n = [].slice.call(arguments);
                      e && n.pop();
                      var i = new a(n).promise();
                      return void 0 !== e ? i.spread(e) : i;
                    };
                  };
                },
                { "./util": 21 },
              ],
              13: [
                function (e, t, a) {
                  "use strict";
                  t.exports = function (t, a, n, i, r) {
                    var o = e("./util"),
                      s = o.tryCatch;
                    (t.method = function (e) {
                      if ("function" != typeof e)
                        throw new t.TypeError(
                          "expecting a function but got " + o.classString(e)
                        );
                      return function () {
                        var n = new t(a);
                        n._captureStackTrace(), n._pushContext();
                        var i = s(e).apply(this, arguments),
                          o = n._popContext();
                        return (
                          r.checkForgottenReturns(i, o, "Promise.method", n),
                          n._resolveFromSyncValue(i),
                          n
                        );
                      };
                    }),
                      (t.attempt = t.try =
                        function (e) {
                          if ("function" != typeof e)
                            return i(
                              "expecting a function but got " + o.classString(e)
                            );
                          var n,
                            _ = new t(a);
                          if (
                            (_._captureStackTrace(),
                            _._pushContext(),
                            arguments.length > 1)
                          ) {
                            r.deprecated(
                              "calling Promise.try with more than 1 argument"
                            );
                            var d = arguments[1],
                              l = arguments[2];
                            n = o.isArray(d)
                              ? s(e).apply(l, d)
                              : s(e).call(l, d);
                          } else n = s(e)();
                          var c = _._popContext();
                          return (
                            r.checkForgottenReturns(n, c, "Promise.try", _),
                            _._resolveFromSyncValue(n),
                            _
                          );
                        }),
                      (t.prototype._resolveFromSyncValue = function (e) {
                        e === o.errorObj
                          ? this._rejectCallback(e.e, !1)
                          : this._resolveCallback(e, !0);
                      });
                  };
                },
                { "./util": 21 },
              ],
              14: [
                function (e, t, a) {
                  "use strict";
                  var n = e("./util"),
                    i = n.maybeWrapAsError,
                    r = e("./errors").OperationalError,
                    o = e("./es5");
                  var s = /^(?:name|message|stack|cause)$/;
                  function _(e) {
                    var t;
                    if (
                      (function (e) {
                        return (
                          e instanceof Error &&
                          o.getPrototypeOf(e) === Error.prototype
                        );
                      })(e)
                    ) {
                      ((t = new r(e)).name = e.name),
                        (t.message = e.message),
                        (t.stack = e.stack);
                      for (var a = o.keys(e), i = 0; i < a.length; ++i) {
                        var _ = a[i];
                        s.test(_) || (t[_] = e[_]);
                      }
                      return t;
                    }
                    return n.markAsOriginatingFromRejection(e), e;
                  }
                  t.exports = function (e, t) {
                    return function (a, n) {
                      if (null !== e) {
                        if (a) {
                          var r = _(i(a));
                          e._attachExtraTrace(r), e._reject(r);
                        } else if (t) {
                          var o = [].slice.call(arguments, 1);
                          e._fulfill(o);
                        } else e._fulfill(n);
                        e = null;
                      }
                    };
                  };
                },
                { "./errors": 9, "./es5": 10, "./util": 21 },
              ],
              15: [
                function (e, t, n) {
                  "use strict";
                  t.exports = function () {
                    var n = function () {
                        return new m(
                          "circular promise resolution chain\n\n    See http://goo.gl/MqrFmX\n"
                        );
                      },
                      i = function () {
                        return new O.PromiseInspection(this._target());
                      },
                      r = function (e) {
                        return O.reject(new m(e));
                      };
                    function o() {}
                    var s = {},
                      _ = e("./util");
                    _.setReflectHandler(i);
                    var d = function () {
                        var e = a.domain;
                        return void 0 === e ? null : e;
                      },
                      l = function () {
                        return { domain: d(), async: null };
                      },
                      c =
                        _.isNode && _.nodeSupportsAsyncResource
                          ? e("async_hooks").AsyncResource
                          : null,
                      u = function () {
                        return {
                          domain: d(),
                          async: new c("Bluebird::Promise"),
                        };
                      },
                      h = _.isNode
                        ? l
                        : function () {
                            return null;
                          };
                    _.notEnumerableProp(O, "_getContext", h);
                    var f = e("./es5"),
                      p = e("./async"),
                      v = new p();
                    f.defineProperty(O, "_async", { value: v });
                    var g = e("./errors"),
                      m = (O.TypeError = g.TypeError);
                    O.RangeError = g.RangeError;
                    var y = (O.CancellationError = g.CancellationError);
                    (O.TimeoutError = g.TimeoutError),
                      (O.OperationalError = g.OperationalError),
                      (O.RejectionError = g.OperationalError),
                      (O.AggregateError = g.AggregateError);
                    var b = function () {},
                      x = {},
                      k = {},
                      w = e("./thenables")(O, b),
                      E = e("./promise_array")(O, b, w, r, o),
                      S = e("./context")(O),
                      D =
                        (S.create,
                        e("./debuggability")(
                          O,
                          S,
                          function () {
                            (h = u), _.notEnumerableProp(O, "_getContext", u);
                          },
                          function () {
                            (h = l), _.notEnumerableProp(O, "_getContext", l);
                          }
                        )),
                      N = (D.CapturedTrace, e("./finally")(O, w, k)),
                      C = e("./catch_filter")(k),
                      T = e("./nodeback"),
                      M = _.errorObj,
                      A = _.tryCatch;
                    function O(e) {
                      e !== b &&
                        (function (e, t) {
                          if (null == e || e.constructor !== O)
                            throw new m(
                              "the promise constructor cannot be invoked directly\n\n    See http://goo.gl/MqrFmX\n"
                            );
                          if ("function" != typeof t)
                            throw new m(
                              "expecting a function but got " + _.classString(t)
                            );
                        })(this, e),
                        (this._bitField = 0),
                        (this._fulfillmentHandler0 = void 0),
                        (this._rejectionHandler0 = void 0),
                        (this._promise0 = void 0),
                        (this._receiver0 = void 0),
                        this._resolveFromExecutor(e),
                        this._promiseCreated(),
                        this._fireEvent("promiseCreated", this);
                    }
                    function H(e) {
                      this.promise._resolveCallback(e);
                    }
                    function j(e) {
                      this.promise._rejectCallback(e, !1);
                    }
                    function L(e) {
                      var t = new O(b);
                      (t._fulfillmentHandler0 = e),
                        (t._rejectionHandler0 = e),
                        (t._promise0 = e),
                        (t._receiver0 = e);
                    }
                    return (
                      (O.prototype.toString = function () {
                        return "[object Promise]";
                      }),
                      (O.prototype.caught = O.prototype.catch =
                        function (e) {
                          var t = arguments.length;
                          if (t > 1) {
                            var a,
                              n = new Array(t - 1),
                              i = 0;
                            for (a = 0; a < t - 1; ++a) {
                              var o = arguments[a];
                              if (!_.isObject(o))
                                return r(
                                  "Catch statement predicate: expecting an object but got " +
                                    _.classString(o)
                                );
                              n[i++] = o;
                            }
                            if (
                              ((n.length = i),
                              "function" != typeof (e = arguments[a]))
                            )
                              throw new m(
                                "The last argument to .catch() must be a function, got " +
                                  _.toString(e)
                              );
                            return this.then(void 0, C(n, e, this));
                          }
                          return this.then(void 0, e);
                        }),
                      (O.prototype.reflect = function () {
                        return this._then(i, i, void 0, this, void 0);
                      }),
                      (O.prototype.then = function (e, t) {
                        if (
                          D.warnings() &&
                          arguments.length > 0 &&
                          "function" != typeof e &&
                          "function" != typeof t
                        ) {
                          var a =
                            ".then() only accepts functions but was passed: " +
                            _.classString(e);
                          arguments.length > 1 &&
                            (a += ", " + _.classString(t)),
                            this._warn(a);
                        }
                        return this._then(e, t, void 0, void 0, void 0);
                      }),
                      (O.prototype.done = function (e, t) {
                        this._then(e, t, void 0, void 0, void 0)._setIsFinal();
                      }),
                      (O.prototype.spread = function (e) {
                        return "function" != typeof e
                          ? r(
                              "expecting a function but got " + _.classString(e)
                            )
                          : this.all()._then(e, void 0, void 0, x, void 0);
                      }),
                      (O.prototype.toJSON = function () {
                        var e = {
                          isFulfilled: !1,
                          isRejected: !1,
                          fulfillmentValue: void 0,
                          rejectionReason: void 0,
                        };
                        return (
                          this.isFulfilled()
                            ? ((e.fulfillmentValue = this.value()),
                              (e.isFulfilled = !0))
                            : this.isRejected() &&
                              ((e.rejectionReason = this.reason()),
                              (e.isRejected = !0)),
                          e
                        );
                      }),
                      (O.prototype.all = function () {
                        return (
                          arguments.length > 0 &&
                            this._warn(
                              ".all() was passed arguments but it does not take any"
                            ),
                          new E(this).promise()
                        );
                      }),
                      (O.prototype.error = function (e) {
                        return this.caught(_.originatesFromRejection, e);
                      }),
                      (O.getNewLibraryCopy = t.exports),
                      (O.is = function (e) {
                        return e instanceof O;
                      }),
                      (O.fromNode = O.fromCallback =
                        function (e) {
                          var t = new O(b);
                          t._captureStackTrace();
                          var a =
                              arguments.length > 1 &&
                              !!Object(arguments[1]).multiArgs,
                            n = A(e)(T(t, a));
                          return (
                            n === M && t._rejectCallback(n.e, !0),
                            t._isFateSealed() || t._setAsyncGuaranteed(),
                            t
                          );
                        }),
                      (O.all = function (e) {
                        return new E(e).promise();
                      }),
                      (O.cast = function (e) {
                        var t = w(e);
                        return (
                          t instanceof O ||
                            ((t = new O(b))._captureStackTrace(),
                            t._setFulfilled(),
                            (t._rejectionHandler0 = e)),
                          t
                        );
                      }),
                      (O.resolve = O.fulfilled = O.cast),
                      (O.reject = O.rejected =
                        function (e) {
                          var t = new O(b);
                          return (
                            t._captureStackTrace(), t._rejectCallback(e, !0), t
                          );
                        }),
                      (O.setScheduler = function (e) {
                        if ("function" != typeof e)
                          throw new m(
                            "expecting a function but got " + _.classString(e)
                          );
                        return v.setScheduler(e);
                      }),
                      (O.prototype._then = function (e, t, a, n, i) {
                        var r = void 0 !== i,
                          o = r ? i : new O(b),
                          s = this._target(),
                          d = s._bitField;
                        r ||
                          (o._propagateFrom(this, 3),
                          o._captureStackTrace(),
                          void 0 === n &&
                            0 != (2097152 & this._bitField) &&
                            (n =
                              0 != (50397184 & d)
                                ? this._boundValue()
                                : s === this
                                ? void 0
                                : this._boundTo),
                          this._fireEvent("promiseChained", this, o));
                        var l = h();
                        if (0 != (50397184 & d)) {
                          var c,
                            u,
                            f = s._settlePromiseCtx;
                          0 != (33554432 & d)
                            ? ((u = s._rejectionHandler0), (c = e))
                            : 0 != (16777216 & d)
                            ? ((u = s._fulfillmentHandler0),
                              (c = t),
                              s._unsetRejectionIsUnhandled())
                            : ((f = s._settlePromiseLateCancellationObserver),
                              (u = new y("late cancellation observer")),
                              s._attachExtraTrace(u),
                              (c = t)),
                            v.invoke(f, s, {
                              handler: _.contextBind(l, c),
                              promise: o,
                              receiver: n,
                              value: u,
                            });
                        } else s._addCallbacks(e, t, o, n, l);
                        return o;
                      }),
                      (O.prototype._length = function () {
                        return 65535 & this._bitField;
                      }),
                      (O.prototype._isFateSealed = function () {
                        return 0 != (117506048 & this._bitField);
                      }),
                      (O.prototype._isFollowing = function () {
                        return 67108864 == (67108864 & this._bitField);
                      }),
                      (O.prototype._setLength = function (e) {
                        this._bitField =
                          (-65536 & this._bitField) | (65535 & e);
                      }),
                      (O.prototype._setFulfilled = function () {
                        (this._bitField = 33554432 | this._bitField),
                          this._fireEvent("promiseFulfilled", this);
                      }),
                      (O.prototype._setRejected = function () {
                        (this._bitField = 16777216 | this._bitField),
                          this._fireEvent("promiseRejected", this);
                      }),
                      (O.prototype._setFollowing = function () {
                        (this._bitField = 67108864 | this._bitField),
                          this._fireEvent("promiseResolved", this);
                      }),
                      (O.prototype._setIsFinal = function () {
                        this._bitField = 4194304 | this._bitField;
                      }),
                      (O.prototype._isFinal = function () {
                        return (4194304 & this._bitField) > 0;
                      }),
                      (O.prototype._unsetCancelled = function () {
                        this._bitField = -65537 & this._bitField;
                      }),
                      (O.prototype._setCancelled = function () {
                        (this._bitField = 65536 | this._bitField),
                          this._fireEvent("promiseCancelled", this);
                      }),
                      (O.prototype._setWillBeCancelled = function () {
                        this._bitField = 8388608 | this._bitField;
                      }),
                      (O.prototype._setAsyncGuaranteed = function () {
                        if (!v.hasCustomScheduler()) {
                          var e = this._bitField;
                          this._bitField =
                            e | (((536870912 & e) >> 2) ^ 134217728);
                        }
                      }),
                      (O.prototype._setNoAsyncGuarantee = function () {
                        this._bitField =
                          -134217729 & (536870912 | this._bitField);
                      }),
                      (O.prototype._receiverAt = function (e) {
                        var t = 0 === e ? this._receiver0 : this[4 * e - 4 + 3];
                        if (t !== s)
                          return void 0 === t && this._isBound()
                            ? this._boundValue()
                            : t;
                      }),
                      (O.prototype._promiseAt = function (e) {
                        return this[4 * e - 4 + 2];
                      }),
                      (O.prototype._fulfillmentHandlerAt = function (e) {
                        return this[4 * e - 4 + 0];
                      }),
                      (O.prototype._rejectionHandlerAt = function (e) {
                        return this[4 * e - 4 + 1];
                      }),
                      (O.prototype._boundValue = function () {}),
                      (O.prototype._migrateCallback0 = function (e) {
                        e._bitField;
                        var t = e._fulfillmentHandler0,
                          a = e._rejectionHandler0,
                          n = e._promise0,
                          i = e._receiverAt(0);
                        void 0 === i && (i = s),
                          this._addCallbacks(t, a, n, i, null);
                      }),
                      (O.prototype._migrateCallbackAt = function (e, t) {
                        var a = e._fulfillmentHandlerAt(t),
                          n = e._rejectionHandlerAt(t),
                          i = e._promiseAt(t),
                          r = e._receiverAt(t);
                        void 0 === r && (r = s),
                          this._addCallbacks(a, n, i, r, null);
                      }),
                      (O.prototype._addCallbacks = function (e, t, a, n, i) {
                        var r = this._length();
                        if (
                          (r >= 65531 && ((r = 0), this._setLength(0)), 0 === r)
                        )
                          (this._promise0 = a),
                            (this._receiver0 = n),
                            "function" == typeof e &&
                              (this._fulfillmentHandler0 = _.contextBind(i, e)),
                            "function" == typeof t &&
                              (this._rejectionHandler0 = _.contextBind(i, t));
                        else {
                          var o = 4 * r - 4;
                          (this[o + 2] = a),
                            (this[o + 3] = n),
                            "function" == typeof e &&
                              (this[o + 0] = _.contextBind(i, e)),
                            "function" == typeof t &&
                              (this[o + 1] = _.contextBind(i, t));
                        }
                        return this._setLength(r + 1), r;
                      }),
                      (O.prototype._proxy = function (e, t) {
                        this._addCallbacks(void 0, void 0, t, e, null);
                      }),
                      (O.prototype._resolveCallback = function (e, t) {
                        if (0 == (117506048 & this._bitField)) {
                          if (e === this) return this._rejectCallback(n(), !1);
                          var a = w(e, this);
                          if (!(a instanceof O)) return this._fulfill(e);
                          t && this._propagateFrom(a, 2);
                          var i = a._target();
                          if (i !== this) {
                            var r = i._bitField;
                            if (0 == (50397184 & r)) {
                              var o = this._length();
                              o > 0 && i._migrateCallback0(this);
                              for (var s = 1; s < o; ++s)
                                i._migrateCallbackAt(this, s);
                              this._setFollowing(),
                                this._setLength(0),
                                this._setFollowee(a);
                            } else if (0 != (33554432 & r))
                              this._fulfill(i._value());
                            else if (0 != (16777216 & r))
                              this._reject(i._reason());
                            else {
                              var _ = new y("late cancellation observer");
                              i._attachExtraTrace(_), this._reject(_);
                            }
                          } else this._reject(n());
                        }
                      }),
                      (O.prototype._rejectCallback = function (e, t, a) {
                        var n = _.ensureErrorObject(e),
                          i = n === e;
                        if (!i && !a && D.warnings()) {
                          var r =
                            "a promise was rejected with a non-error: " +
                            _.classString(e);
                          this._warn(r, !0);
                        }
                        this._attachExtraTrace(n, !!t && i), this._reject(e);
                      }),
                      (O.prototype._resolveFromExecutor = function (e) {
                        if (e !== b) {
                          var t = this;
                          this._captureStackTrace(), this._pushContext();
                          var a = !0,
                            n = this._execute(
                              e,
                              function (e) {
                                t._resolveCallback(e);
                              },
                              function (e) {
                                t._rejectCallback(e, a);
                              }
                            );
                          (a = !1),
                            this._popContext(),
                            void 0 !== n && t._rejectCallback(n, !0);
                        }
                      }),
                      (O.prototype._settlePromiseFromHandler = function (
                        e,
                        t,
                        a,
                        n
                      ) {
                        var i = n._bitField;
                        if (0 == (65536 & i)) {
                          var r;
                          n._pushContext(),
                            t === x
                              ? a && "number" == typeof a.length
                                ? (r = A(e).apply(this._boundValue(), a))
                                : ((r = M).e = new m(
                                    "cannot .spread() a non-array: " +
                                      _.classString(a)
                                  ))
                              : (r = A(e).call(t, a));
                          var o = n._popContext();
                          0 == (65536 & (i = n._bitField)) &&
                            (r === k
                              ? n._reject(a)
                              : r === M
                              ? n._rejectCallback(r.e, !1)
                              : (D.checkForgottenReturns(r, o, "", n, this),
                                n._resolveCallback(r)));
                        }
                      }),
                      (O.prototype._target = function () {
                        for (var e = this; e._isFollowing(); )
                          e = e._followee();
                        return e;
                      }),
                      (O.prototype._followee = function () {
                        return this._rejectionHandler0;
                      }),
                      (O.prototype._setFollowee = function (e) {
                        this._rejectionHandler0 = e;
                      }),
                      (O.prototype._settlePromise = function (e, t, a, n) {
                        var r = e instanceof O,
                          s = this._bitField,
                          _ = 0 != (134217728 & s);
                        0 != (65536 & s)
                          ? (r && e._invokeInternalOnCancel(),
                            a instanceof N && a.isFinallyHandler()
                              ? ((a.cancelPromise = e),
                                A(t).call(a, n) === M && e._reject(M.e))
                              : t === i
                              ? e._fulfill(i.call(a))
                              : a instanceof o
                              ? a._promiseCancelled(e)
                              : r || e instanceof E
                              ? e._cancel()
                              : a.cancel())
                          : "function" == typeof t
                          ? r
                            ? (_ && e._setAsyncGuaranteed(),
                              this._settlePromiseFromHandler(t, a, n, e))
                            : t.call(a, n, e)
                          : a instanceof o
                          ? a._isResolved() ||
                            (0 != (33554432 & s)
                              ? a._promiseFulfilled(n, e)
                              : a._promiseRejected(n, e))
                          : r &&
                            (_ && e._setAsyncGuaranteed(),
                            0 != (33554432 & s) ? e._fulfill(n) : e._reject(n));
                      }),
                      (O.prototype._settlePromiseLateCancellationObserver =
                        function (e) {
                          var t = e.handler,
                            a = e.promise,
                            n = e.receiver,
                            i = e.value;
                          "function" == typeof t
                            ? a instanceof O
                              ? this._settlePromiseFromHandler(t, n, i, a)
                              : t.call(n, i, a)
                            : a instanceof O && a._reject(i);
                        }),
                      (O.prototype._settlePromiseCtx = function (e) {
                        this._settlePromise(
                          e.promise,
                          e.handler,
                          e.receiver,
                          e.value
                        );
                      }),
                      (O.prototype._settlePromise0 = function (e, t, a) {
                        var n = this._promise0,
                          i = this._receiverAt(0);
                        (this._promise0 = void 0),
                          (this._receiver0 = void 0),
                          this._settlePromise(n, e, i, t);
                      }),
                      (O.prototype._clearCallbackDataAtIndex = function (e) {
                        var t = 4 * e - 4;
                        this[t + 2] =
                          this[t + 3] =
                          this[t + 0] =
                          this[t + 1] =
                            void 0;
                      }),
                      (O.prototype._fulfill = function (e) {
                        var t = this._bitField;
                        if (!((117506048 & t) >>> 16)) {
                          if (e === this) {
                            var a = n();
                            return this._attachExtraTrace(a), this._reject(a);
                          }
                          this._setFulfilled(),
                            (this._rejectionHandler0 = e),
                            (65535 & t) > 0 &&
                              (0 != (134217728 & t)
                                ? this._settlePromises()
                                : v.settlePromises(this),
                              this._dereferenceTrace());
                        }
                      }),
                      (O.prototype._reject = function (e) {
                        var t = this._bitField;
                        if (!((117506048 & t) >>> 16)) {
                          if (
                            (this._setRejected(),
                            (this._fulfillmentHandler0 = e),
                            this._isFinal())
                          )
                            return v.fatalError(e, _.isNode);
                          (65535 & t) > 0
                            ? v.settlePromises(this)
                            : this._ensurePossibleRejectionHandled();
                        }
                      }),
                      (O.prototype._fulfillPromises = function (e, t) {
                        for (var a = 1; a < e; a++) {
                          var n = this._fulfillmentHandlerAt(a),
                            i = this._promiseAt(a),
                            r = this._receiverAt(a);
                          this._clearCallbackDataAtIndex(a),
                            this._settlePromise(i, n, r, t);
                        }
                      }),
                      (O.prototype._rejectPromises = function (e, t) {
                        for (var a = 1; a < e; a++) {
                          var n = this._rejectionHandlerAt(a),
                            i = this._promiseAt(a),
                            r = this._receiverAt(a);
                          this._clearCallbackDataAtIndex(a),
                            this._settlePromise(i, n, r, t);
                        }
                      }),
                      (O.prototype._settlePromises = function () {
                        var e = this._bitField,
                          t = 65535 & e;
                        if (t > 0) {
                          if (0 != (16842752 & e)) {
                            var a = this._fulfillmentHandler0;
                            this._settlePromise0(this._rejectionHandler0, a, e),
                              this._rejectPromises(t, a);
                          } else {
                            var n = this._rejectionHandler0;
                            this._settlePromise0(
                              this._fulfillmentHandler0,
                              n,
                              e
                            ),
                              this._fulfillPromises(t, n);
                          }
                          this._setLength(0);
                        }
                        this._clearCancellationData();
                      }),
                      (O.prototype._settledValue = function () {
                        var e = this._bitField;
                        return 0 != (33554432 & e)
                          ? this._rejectionHandler0
                          : 0 != (16777216 & e)
                          ? this._fulfillmentHandler0
                          : void 0;
                      }),
                      "undefined" != typeof Symbol &&
                        Symbol.toStringTag &&
                        f.defineProperty(O.prototype, Symbol.toStringTag, {
                          get: function () {
                            return "Object";
                          },
                        }),
                      (O.defer = O.pending =
                        function () {
                          return (
                            D.deprecated("Promise.defer", "new Promise"),
                            { promise: new O(b), resolve: H, reject: j }
                          );
                        }),
                      _.notEnumerableProp(O, "_makeSelfResolutionError", n),
                      e("./method")(O, b, w, r, D),
                      e("./bind")(O, b, w, D),
                      e("./cancel")(O, E, r, D),
                      e("./direct_resolve")(O),
                      e("./synchronous_inspection")(O),
                      e("./join")(O, E, w, b, v),
                      (O.Promise = O),
                      (O.version = "3.7.2"),
                      _.toFastProperties(O),
                      _.toFastProperties(O.prototype),
                      L({ a: 1 }),
                      L({ b: 2 }),
                      L({ c: 3 }),
                      L(1),
                      L(function () {}),
                      L(void 0),
                      L(!1),
                      L(new O(b)),
                      D.setBounds(p.firstLineError, _.lastLineError),
                      O
                    );
                  };
                },
                {
                  "./async": 1,
                  "./bind": 2,
                  "./cancel": 4,
                  "./catch_filter": 5,
                  "./context": 6,
                  "./debuggability": 7,
                  "./direct_resolve": 8,
                  "./errors": 9,
                  "./es5": 10,
                  "./finally": 11,
                  "./join": 12,
                  "./method": 13,
                  "./nodeback": 14,
                  "./promise_array": 16,
                  "./synchronous_inspection": 19,
                  "./thenables": 20,
                  "./util": 21,
                  async_hooks: void 0,
                },
              ],
              16: [
                function (e, t, a) {
                  "use strict";
                  t.exports = function (t, a, n, i, r) {
                    var o = e("./util");
                    o.isArray;
                    function s(e) {
                      var n = (this._promise = new t(a));
                      e instanceof t &&
                        (n._propagateFrom(e, 3),
                        e.suppressUnhandledRejections()),
                        n._setOnCancel(this),
                        (this._values = e),
                        (this._length = 0),
                        (this._totalResolved = 0),
                        this._init(void 0, -2);
                    }
                    return (
                      o.inherits(s, r),
                      (s.prototype.length = function () {
                        return this._length;
                      }),
                      (s.prototype.promise = function () {
                        return this._promise;
                      }),
                      (s.prototype._init = function e(a, r) {
                        var s = n(this._values, this._promise);
                        if (s instanceof t) {
                          var _ = (s = s._target())._bitField;
                          if (((this._values = s), 0 == (50397184 & _)))
                            return (
                              this._promise._setAsyncGuaranteed(),
                              s._then(e, this._reject, void 0, this, r)
                            );
                          if (0 == (33554432 & _))
                            return 0 != (16777216 & _)
                              ? this._reject(s._reason())
                              : this._cancel();
                          s = s._value();
                        }
                        if (null !== (s = o.asArray(s)))
                          0 !== s.length
                            ? this._iterate(s)
                            : -5 === r
                            ? this._resolveEmptyArray()
                            : this._resolve(
                                (function (e) {
                                  switch (e) {
                                    case -2:
                                      return [];
                                    case -3:
                                      return {};
                                    case -6:
                                      return new Map();
                                  }
                                })(r)
                              );
                        else {
                          var d = i(
                            "expecting an array or an iterable object but got " +
                              o.classString(s)
                          ).reason();
                          this._promise._rejectCallback(d, !1);
                        }
                      }),
                      (s.prototype._iterate = function (e) {
                        var a = this.getActualLength(e.length);
                        (this._length = a),
                          (this._values = this.shouldCopyValues()
                            ? new Array(a)
                            : this._values);
                        for (
                          var i = this._promise, r = !1, o = null, s = 0;
                          s < a;
                          ++s
                        ) {
                          var _ = n(e[s], i);
                          (o =
                            _ instanceof t
                              ? (_ = _._target())._bitField
                              : null),
                            r
                              ? null !== o && _.suppressUnhandledRejections()
                              : null !== o
                              ? 0 == (50397184 & o)
                                ? (_._proxy(this, s), (this._values[s] = _))
                                : (r =
                                    0 != (33554432 & o)
                                      ? this._promiseFulfilled(_._value(), s)
                                      : 0 != (16777216 & o)
                                      ? this._promiseRejected(_._reason(), s)
                                      : this._promiseCancelled(s))
                              : (r = this._promiseFulfilled(_, s));
                        }
                        r || i._setAsyncGuaranteed();
                      }),
                      (s.prototype._isResolved = function () {
                        return null === this._values;
                      }),
                      (s.prototype._resolve = function (e) {
                        (this._values = null), this._promise._fulfill(e);
                      }),
                      (s.prototype._cancel = function () {
                        !this._isResolved() &&
                          this._promise._isCancellable() &&
                          ((this._values = null), this._promise._cancel());
                      }),
                      (s.prototype._reject = function (e) {
                        (this._values = null),
                          this._promise._rejectCallback(e, !1);
                      }),
                      (s.prototype._promiseFulfilled = function (e, t) {
                        return (
                          (this._values[t] = e),
                          ++this._totalResolved >= this._length &&
                            (this._resolve(this._values), !0)
                        );
                      }),
                      (s.prototype._promiseCancelled = function () {
                        return this._cancel(), !0;
                      }),
                      (s.prototype._promiseRejected = function (e) {
                        return this._totalResolved++, this._reject(e), !0;
                      }),
                      (s.prototype._resultCancelled = function () {
                        if (!this._isResolved()) {
                          var e = this._values;
                          if ((this._cancel(), e instanceof t)) e.cancel();
                          else
                            for (var a = 0; a < e.length; ++a)
                              e[a] instanceof t && e[a].cancel();
                        }
                      }),
                      (s.prototype.shouldCopyValues = function () {
                        return !0;
                      }),
                      (s.prototype.getActualLength = function (e) {
                        return e;
                      }),
                      s
                    );
                  };
                },
                { "./util": 21 },
              ],
              17: [
                function (e, t, a) {
                  "use strict";
                  function n(e) {
                    (this._capacity = e), (this._length = 0), (this._front = 0);
                  }
                  (n.prototype._willBeOverCapacity = function (e) {
                    return this._capacity < e;
                  }),
                    (n.prototype._pushOne = function (e) {
                      var t = this.length();
                      this._checkCapacity(t + 1),
                        (this[(this._front + t) & (this._capacity - 1)] = e),
                        (this._length = t + 1);
                    }),
                    (n.prototype.push = function (e, t, a) {
                      var n = this.length() + 3;
                      if (this._willBeOverCapacity(n))
                        return (
                          this._pushOne(e),
                          this._pushOne(t),
                          void this._pushOne(a)
                        );
                      var i = this._front + n - 3;
                      this._checkCapacity(n);
                      var r = this._capacity - 1;
                      (this[(i + 0) & r] = e),
                        (this[(i + 1) & r] = t),
                        (this[(i + 2) & r] = a),
                        (this._length = n);
                    }),
                    (n.prototype.shift = function () {
                      var e = this._front,
                        t = this[e];
                      return (
                        (this[e] = void 0),
                        (this._front = (e + 1) & (this._capacity - 1)),
                        this._length--,
                        t
                      );
                    }),
                    (n.prototype.length = function () {
                      return this._length;
                    }),
                    (n.prototype._checkCapacity = function (e) {
                      this._capacity < e && this._resizeTo(this._capacity << 1);
                    }),
                    (n.prototype._resizeTo = function (e) {
                      var t = this._capacity;
                      (this._capacity = e),
                        (function (e, t, a, n, i) {
                          for (var r = 0; r < i; ++r)
                            (a[r + n] = e[r + t]), (e[r + t] = void 0);
                        })(
                          this,
                          0,
                          this,
                          t,
                          (this._front + this._length) & (t - 1)
                        );
                    }),
                    (t.exports = n);
                },
                {},
              ],
              18: [
                function (e, t, r) {
                  "use strict";
                  var o,
                    s = e("./util"),
                    _ = s.getNativePromise();
                  if (s.isNode && "undefined" == typeof MutationObserver) {
                    var d = n.setImmediate,
                      l = a.nextTick;
                    o = s.isRecentNode
                      ? function (e) {
                          d.call(n, e);
                        }
                      : function (e) {
                          l.call(a, e);
                        };
                  } else if (
                    "function" == typeof _ &&
                    "function" == typeof _.resolve
                  ) {
                    var c = _.resolve();
                    o = function (e) {
                      c.then(e);
                    };
                  } else
                    o =
                      "undefined" != typeof MutationObserver &&
                      ("undefined" == typeof window ||
                        !window.navigator ||
                        (!window.navigator.standalone && !window.cordova)) &&
                      "classList" in document.documentElement
                        ? (function () {
                            var e = document.createElement("div"),
                              t = { attributes: !0 },
                              a = !1,
                              n = document.createElement("div");
                            new MutationObserver(function () {
                              e.classList.toggle("foo"), (a = !1);
                            }).observe(n, t);
                            return function (i) {
                              var r = new MutationObserver(function () {
                                r.disconnect(), i();
                              });
                              r.observe(e, t),
                                a || ((a = !0), n.classList.toggle("foo"));
                            };
                          })()
                        : void 0 !== i
                        ? function (e) {
                            i(e);
                          }
                        : "undefined" != typeof setTimeout
                        ? function (e) {
                            setTimeout(e, 0);
                          }
                        : function () {
                            throw new Error(
                              "No async scheduler available\n\n    See http://goo.gl/MqrFmX\n"
                            );
                          };
                  t.exports = o;
                },
                { "./util": 21 },
              ],
              19: [
                function (e, t, a) {
                  "use strict";
                  t.exports = function (e) {
                    function t(e) {
                      void 0 !== e
                        ? ((e = e._target()),
                          (this._bitField = e._bitField),
                          (this._settledValueField = e._isFateSealed()
                            ? e._settledValue()
                            : void 0))
                        : ((this._bitField = 0),
                          (this._settledValueField = void 0));
                    }
                    t.prototype._settledValue = function () {
                      return this._settledValueField;
                    };
                    var a = (t.prototype.value = function () {
                        if (!this.isFulfilled())
                          throw new TypeError(
                            "cannot get fulfillment value of a non-fulfilled promise\n\n    See http://goo.gl/MqrFmX\n"
                          );
                        return this._settledValue();
                      }),
                      n =
                        (t.prototype.error =
                        t.prototype.reason =
                          function () {
                            if (!this.isRejected())
                              throw new TypeError(
                                "cannot get rejection reason of a non-rejected promise\n\n    See http://goo.gl/MqrFmX\n"
                              );
                            return this._settledValue();
                          }),
                      i = (t.prototype.isFulfilled = function () {
                        return 0 != (33554432 & this._bitField);
                      }),
                      r = (t.prototype.isRejected = function () {
                        return 0 != (16777216 & this._bitField);
                      }),
                      o = (t.prototype.isPending = function () {
                        return 0 == (50397184 & this._bitField);
                      }),
                      s = (t.prototype.isResolved = function () {
                        return 0 != (50331648 & this._bitField);
                      });
                    (t.prototype.isCancelled = function () {
                      return 0 != (8454144 & this._bitField);
                    }),
                      (e.prototype.__isCancelled = function () {
                        return 65536 == (65536 & this._bitField);
                      }),
                      (e.prototype._isCancelled = function () {
                        return this._target().__isCancelled();
                      }),
                      (e.prototype.isCancelled = function () {
                        return 0 != (8454144 & this._target()._bitField);
                      }),
                      (e.prototype.isPending = function () {
                        return o.call(this._target());
                      }),
                      (e.prototype.isRejected = function () {
                        return r.call(this._target());
                      }),
                      (e.prototype.isFulfilled = function () {
                        return i.call(this._target());
                      }),
                      (e.prototype.isResolved = function () {
                        return s.call(this._target());
                      }),
                      (e.prototype.value = function () {
                        return a.call(this._target());
                      }),
                      (e.prototype.reason = function () {
                        var e = this._target();
                        return e._unsetRejectionIsUnhandled(), n.call(e);
                      }),
                      (e.prototype._value = function () {
                        return this._settledValue();
                      }),
                      (e.prototype._reason = function () {
                        return (
                          this._unsetRejectionIsUnhandled(),
                          this._settledValue()
                        );
                      }),
                      (e.PromiseInspection = t);
                  };
                },
                {},
              ],
              20: [
                function (e, t, a) {
                  "use strict";
                  t.exports = function (t, a) {
                    var n = e("./util"),
                      i = n.errorObj,
                      r = n.isObject;
                    var o = {}.hasOwnProperty;
                    return function (e, s) {
                      if (r(e)) {
                        if (e instanceof t) return e;
                        var _ = (function (e) {
                          try {
                            return (function (e) {
                              return e.then;
                            })(e);
                          } catch (e) {
                            return (i.e = e), i;
                          }
                        })(e);
                        if (_ === i) {
                          s && s._pushContext();
                          var d = t.reject(_.e);
                          return s && s._popContext(), d;
                        }
                        if ("function" == typeof _)
                          return (function (e) {
                            try {
                              return o.call(e, "_promise0");
                            } catch (e) {
                              return !1;
                            }
                          })(e)
                            ? ((d = new t(a)),
                              e._then(d._fulfill, d._reject, void 0, d, null),
                              d)
                            : (function (e, r, o) {
                                var s = new t(a),
                                  _ = s;
                                o && o._pushContext(),
                                  s._captureStackTrace(),
                                  o && o._popContext();
                                var d = !0,
                                  l = n.tryCatch(r).call(
                                    e,
                                    function (e) {
                                      s && (s._resolveCallback(e), (s = null));
                                    },
                                    function (e) {
                                      s &&
                                        (s._rejectCallback(e, d, !0),
                                        (s = null));
                                    }
                                  );
                                return (
                                  (d = !1),
                                  s &&
                                    l === i &&
                                    (s._rejectCallback(l.e, !0, !0),
                                    (s = null)),
                                  _
                                );
                              })(e, _, s);
                      }
                      return e;
                    };
                  };
                },
                { "./util": 21 },
              ],
              21: [
                function (e, t, i) {
                  "use strict";
                  var r = e("./es5"),
                    o = "undefined" == typeof navigator,
                    s = { e: {} },
                    d,
                    l =
                      "undefined" != typeof self
                        ? self
                        : "undefined" != typeof window
                        ? window
                        : void 0 !== n
                        ? n
                        : void 0 !== this
                        ? this
                        : null;
                  function c() {
                    try {
                      var e = d;
                      return (d = null), e.apply(this, arguments);
                    } catch (e) {
                      return (s.e = e), s;
                    }
                  }
                  function u(e) {
                    return (d = e), c;
                  }
                  var h = function (e, t) {
                    var a = {}.hasOwnProperty;
                    function n() {
                      for (var n in ((this.constructor = e),
                      (this.constructor$ = t),
                      t.prototype))
                        a.call(t.prototype, n) &&
                          "$" !== n.charAt(n.length - 1) &&
                          (this[n + "$"] = t.prototype[n]);
                    }
                    return (
                      (n.prototype = t.prototype),
                      (e.prototype = new n()),
                      e.prototype
                    );
                  };
                  function f(e) {
                    return (
                      null == e ||
                      !0 === e ||
                      !1 === e ||
                      "string" == typeof e ||
                      "number" == typeof e
                    );
                  }
                  function p(e) {
                    return (
                      "function" == typeof e ||
                      ("object" === _(e) && null !== e)
                    );
                  }
                  function v(e) {
                    return f(e) ? new Error(C(e)) : e;
                  }
                  function g(e, t) {
                    var a,
                      n = e.length,
                      i = new Array(n + 1);
                    for (a = 0; a < n; ++a) i[a] = e[a];
                    return (i[a] = t), i;
                  }
                  function m(e, t, a) {
                    if (!r.isES5)
                      return {}.hasOwnProperty.call(e, t) ? e[t] : void 0;
                    var n = Object.getOwnPropertyDescriptor(e, t);
                    return null != n
                      ? null == n.get && null == n.set
                        ? n.value
                        : a
                      : void 0;
                  }
                  function y(e, t, a) {
                    if (f(e)) return e;
                    var n = {
                      value: a,
                      configurable: !0,
                      enumerable: !1,
                      writable: !0,
                    };
                    return r.defineProperty(e, t, n), e;
                  }
                  function b(e) {
                    throw e;
                  }
                  var x = (function () {
                      var e = [
                          Array.prototype,
                          Object.prototype,
                          Function.prototype,
                        ],
                        t = function (t) {
                          for (var a = 0; a < e.length; ++a)
                            if (e[a] === t) return !0;
                          return !1;
                        };
                      if (r.isES5) {
                        var a = Object.getOwnPropertyNames;
                        return function (e) {
                          for (
                            var n = [], i = Object.create(null);
                            null != e && !t(e);

                          ) {
                            var o;
                            try {
                              o = a(e);
                            } catch (e) {
                              return n;
                            }
                            for (var s = 0; s < o.length; ++s) {
                              var _ = o[s];
                              if (!i[_]) {
                                i[_] = !0;
                                var d = Object.getOwnPropertyDescriptor(e, _);
                                null != d &&
                                  null == d.get &&
                                  null == d.set &&
                                  n.push(_);
                              }
                            }
                            e = r.getPrototypeOf(e);
                          }
                          return n;
                        };
                      }
                      var n = {}.hasOwnProperty;
                      return function (a) {
                        if (t(a)) return [];
                        var i = [];
                        e: for (var r in a)
                          if (n.call(a, r)) i.push(r);
                          else {
                            for (var o = 0; o < e.length; ++o)
                              if (n.call(e[o], r)) continue e;
                            i.push(r);
                          }
                        return i;
                      };
                    })(),
                    k = /this\s*\.\s*\S+\s*=/;
                  function w(e) {
                    try {
                      if ("function" == typeof e) {
                        var t = r.names(e.prototype),
                          a = r.isES5 && t.length > 1,
                          n =
                            t.length > 0 &&
                            !(1 === t.length && "constructor" === t[0]),
                          i = k.test(e + "") && r.names(e).length > 0;
                        if (a || n || i) return !0;
                      }
                      return !1;
                    } catch (e) {
                      return !1;
                    }
                  }
                  function E(e) {
                    function t() {}
                    t.prototype = e;
                    var a = new t();
                    function n() {
                      return _(a.foo);
                    }
                    return n(), n(), e;
                  }
                  var S = /^[a-z$_][a-z$_0-9]*$/i;
                  function D(e) {
                    return S.test(e);
                  }
                  function N(e, t, a) {
                    for (var n = new Array(e), i = 0; i < e; ++i)
                      n[i] = t + i + a;
                    return n;
                  }
                  function C(e) {
                    try {
                      return e + "";
                    } catch (e) {
                      return "[no string representation]";
                    }
                  }
                  function T(e) {
                    return (
                      e instanceof Error ||
                      (null !== e &&
                        "object" === _(e) &&
                        "string" == typeof e.message &&
                        "string" == typeof e.name)
                    );
                  }
                  function M(e) {
                    try {
                      y(e, "isOperational", !0);
                    } catch (e) {}
                  }
                  function A(e) {
                    return (
                      null != e &&
                      (e instanceof
                        Error.__BluebirdErrorTypes__.OperationalError ||
                        !0 === e.isOperational)
                    );
                  }
                  function O(e) {
                    return T(e) && r.propertyIsWritable(e, "stack");
                  }
                  var H =
                    "stack" in new Error()
                      ? function (e) {
                          return O(e) ? e : new Error(C(e));
                        }
                      : function (e) {
                          if (O(e)) return e;
                          try {
                            throw new Error(C(e));
                          } catch (e) {
                            return e;
                          }
                        };
                  function j(e) {
                    return {}.toString.call(e);
                  }
                  function L(e, t, a) {
                    for (var n = r.names(e), i = 0; i < n.length; ++i) {
                      var o = n[i];
                      if (a(o))
                        try {
                          r.defineProperty(t, o, r.getDescriptor(e, o));
                        } catch (e) {}
                    }
                  }
                  var P = function (e) {
                    return r.isArray(e) ? e : null;
                  };
                  if ("undefined" != typeof Symbol && Symbol.iterator) {
                    var z =
                      "function" == typeof Array.from
                        ? function (e) {
                            return Array.from(e);
                          }
                        : function (e) {
                            for (
                              var t, a = [], n = e[Symbol.iterator]();
                              !(t = n.next()).done;

                            )
                              a.push(t.value);
                            return a;
                          };
                    P = function (e) {
                      return r.isArray(e)
                        ? e
                        : null != e && "function" == typeof e[Symbol.iterator]
                        ? z(e)
                        : null;
                    };
                  }
                  var $ =
                      void 0 !== a && "[object process]" === j(a).toLowerCase(),
                    F = void 0 !== a && void 0 !== a.env,
                    I;
                  function R(e) {
                    return F ? a.env[e] : void 0;
                  }
                  function B() {
                    if ("function" == typeof Promise)
                      try {
                        if (
                          "[object Promise]" === j(new Promise(function () {}))
                        )
                          return Promise;
                      } catch (e) {}
                  }
                  function V(e, t) {
                    if (null === e || "function" != typeof t || t === I)
                      return t;
                    null !== e.domain && (t = e.domain.bind(t));
                    var a = e.async;
                    if (null !== a) {
                      var n = t;
                      t = function () {
                        var e = new Array(2).concat([].slice.call(arguments));
                        return (
                          (e[0] = n),
                          (e[1] = this),
                          a.runInAsyncScope.apply(a, e)
                        );
                      };
                    }
                    return t;
                  }
                  var U = {
                    setReflectHandler: function (e) {
                      I = e;
                    },
                    isClass: w,
                    isIdentifier: D,
                    inheritedDataKeys: x,
                    getDataPropertyOrDefault: m,
                    thrower: b,
                    isArray: r.isArray,
                    asArray: P,
                    notEnumerableProp: y,
                    isPrimitive: f,
                    isObject: p,
                    isError: T,
                    canEvaluate: o,
                    errorObj: s,
                    tryCatch: u,
                    inherits: h,
                    withAppended: g,
                    maybeWrapAsError: v,
                    toFastProperties: E,
                    filledRange: N,
                    toString: C,
                    canAttachTrace: O,
                    ensureErrorObject: H,
                    originatesFromRejection: A,
                    markAsOriginatingFromRejection: M,
                    classString: j,
                    copyDescriptors: L,
                    isNode: $,
                    hasEnvVariables: F,
                    env: R,
                    global: l,
                    getNativePromise: B,
                    contextBind: V,
                  };
                  (U.isRecentNode =
                    U.isNode &&
                    (function () {
                      var e;
                      return (
                        a.versions && a.versions.node
                          ? (e = a.versions.node.split(".").map(Number))
                          : a.version && (e = a.version.split(".").map(Number)),
                        (0 === e[0] && e[1] > 10) || e[0] > 0
                      );
                    })()),
                    (U.nodeSupportsAsyncResource =
                      U.isNode &&
                      (function () {
                        var t = !1;
                        try {
                          t =
                            "function" ==
                            typeof e("async_hooks").AsyncResource.prototype
                              .runInAsyncScope;
                        } catch (e) {
                          t = !1;
                        }
                        return t;
                      })()),
                    U.isNode && U.toFastProperties(a);
                  try {
                    throw new Error();
                  } catch (e) {
                    U.lastLineError = e;
                  }
                  t.exports = U;
                },
                { "./es5": 10, async_hooks: void 0 },
              ],
            },
            {},
            [3]
          )(3);
        }),
          "undefined" != typeof window && null !== window
            ? (window.P = window.Promise)
            : "undefined" != typeof self &&
              null !== self &&
              (self.P = self.Promise);
      }.call(this, a(5), a(1), a(7).setImmediate));
    },
    function (e, t, a) {
      (function (e) {
        var n =
            (void 0 !== e && e) ||
            ("undefined" != typeof self && self) ||
            window,
          i = Function.prototype.apply;
        function r(e, t) {
          (this._id = e), (this._clearFn = t);
        }
        (t.setTimeout = function () {
          return new r(i.call(setTimeout, n, arguments), clearTimeout);
        }),
          (t.setInterval = function () {
            return new r(i.call(setInterval, n, arguments), clearInterval);
          }),
          (t.clearTimeout = t.clearInterval =
            function (e) {
              e && e.close();
            }),
          (r.prototype.unref = r.prototype.ref = function () {}),
          (r.prototype.close = function () {
            this._clearFn.call(n, this._id);
          }),
          (t.enroll = function (e, t) {
            clearTimeout(e._idleTimeoutId), (e._idleTimeout = t);
          }),
          (t.unenroll = function (e) {
            clearTimeout(e._idleTimeoutId), (e._idleTimeout = -1);
          }),
          (t._unrefActive = t.active =
            function (e) {
              clearTimeout(e._idleTimeoutId);
              var t = e._idleTimeout;
              t >= 0 &&
                (e._idleTimeoutId = setTimeout(function () {
                  e._onTimeout && e._onTimeout();
                }, t));
            }),
          a(8),
          (t.setImmediate =
            ("undefined" != typeof self && self.setImmediate) ||
            (void 0 !== e && e.setImmediate) ||
            (this && this.setImmediate)),
          (t.clearImmediate =
            ("undefined" != typeof self && self.clearImmediate) ||
            (void 0 !== e && e.clearImmediate) ||
            (this && this.clearImmediate));
      }.call(this, a(1)));
    },
    function (e, t, a) {
      (function (e, t) {
        !(function (e, a) {
          "use strict";
          if (!e.setImmediate) {
            var n,
              i = 1,
              r = {},
              o = !1,
              s = e.document,
              _ = Object.getPrototypeOf && Object.getPrototypeOf(e);
            (_ = _ && _.setTimeout ? _ : e),
              "[object process]" === {}.toString.call(e.process)
                ? (n = function (e) {
                    t.nextTick(function () {
                      l(e);
                    });
                  })
                : (function () {
                    if (e.postMessage && !e.importScripts) {
                      var t = !0,
                        a = e.onmessage;
                      return (
                        (e.onmessage = function () {
                          t = !1;
                        }),
                        e.postMessage("", "*"),
                        (e.onmessage = a),
                        t
                      );
                    }
                  })()
                ? (function () {
                    var t = "setImmediate$" + Math.random() + "$",
                      a = function (a) {
                        a.source === e &&
                          "string" == typeof a.data &&
                          0 === a.data.indexOf(t) &&
                          l(+a.data.slice(t.length));
                      };
                    e.addEventListener
                      ? e.addEventListener("message", a, !1)
                      : e.attachEvent("onmessage", a),
                      (n = function (a) {
                        e.postMessage(t + a, "*");
                      });
                  })()
                : e.MessageChannel
                ? (function () {
                    var e = new MessageChannel();
                    (e.port1.onmessage = function (e) {
                      l(e.data);
                    }),
                      (n = function (t) {
                        e.port2.postMessage(t);
                      });
                  })()
                : s && "onreadystatechange" in s.createElement("script")
                ? (function () {
                    var e = s.documentElement;
                    n = function (t) {
                      var a = s.createElement("script");
                      (a.onreadystatechange = function () {
                        l(t),
                          (a.onreadystatechange = null),
                          e.removeChild(a),
                          (a = null);
                      }),
                        e.appendChild(a);
                    };
                  })()
                : (n = function (e) {
                    setTimeout(l, 0, e);
                  }),
              (_.setImmediate = function (e) {
                "function" != typeof e && (e = new Function("" + e));
                for (
                  var t = new Array(arguments.length - 1), a = 0;
                  a < t.length;
                  a++
                )
                  t[a] = arguments[a + 1];
                var o = { callback: e, args: t };
                return (r[i] = o), n(i), i++;
              }),
              (_.clearImmediate = d);
          }
          function d(e) {
            delete r[e];
          }
          function l(e) {
            if (o) setTimeout(l, 0, e);
            else {
              var t = r[e];
              if (t) {
                o = !0;
                try {
                  !(function (e) {
                    var t = e.callback,
                      n = e.args;
                    switch (n.length) {
                      case 0:
                        t();
                        break;
                      case 1:
                        t(n[0]);
                        break;
                      case 2:
                        t(n[0], n[1]);
                        break;
                      case 3:
                        t(n[0], n[1], n[2]);
                        break;
                      default:
                        t.apply(a, n);
                    }
                  })(t);
                } finally {
                  d(e), (o = !1);
                }
              }
            }
          }
        })("undefined" == typeof self ? (void 0 === e ? this : e) : self);
      }.call(this, a(1), a(5)));
    },
    function (e, t, a) {
      "use strict";
      a.r(t),
        a.d(t, "scheduler", function () {
          return Fe;
        }),
        a.d(t, "Scheduler", function () {
          return Ie;
        });
      var n = a(0);
      a(4);
      function i(e) {
        function t(e) {
          var t = document.createElement("div");
          return (
            (e || "").split(" ").forEach(function (e) {
              t.classList.add(e);
            }),
            t
          );
        }
        var a = {
          rows_container: function () {
            return t("dhx_cal_navbar_rows_container");
          },
          row: function () {
            return t("dhx_cal_navbar_row");
          },
          view: function (a) {
            var n = t("dhx_cal_tab");
            return (
              n.setAttribute("name", a.view + "_tab"),
              n.setAttribute("data-tab", a.view),
              e.config.fix_tab_position &&
                (a.$firstTab
                  ? n.classList.add("dhx_cal_tab_first")
                  : a.$lastTab
                  ? n.classList.add("dhx_cal_tab_last")
                  : "week" !== a.view &&
                    n.classList.add("dhx_cal_tab_standalone")),
              n
            );
          },
          date: function () {
            return t("dhx_cal_date");
          },
          button: function (e) {
            return t(
              "dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab"
            );
          },
          builtInButton: function (e) {
            return t("dhx_cal_" + e.view + "_button dhx_cal_nav_button");
          },
          spacer: function () {
            return t("dhx_cal_line_spacer");
          },
          minicalendarButton: function (a) {
            var n = t("dhx_minical_icon");
            return (
              a.click ||
                (n.onclick = function () {
                  e.isCalendarVisible()
                    ? e.destroyCalendar()
                    : e.renderCalendar({
                        position: this,
                        date: e.getState().date,
                        navigation: !0,
                        handler: function (t, a) {
                          e.setCurrentView(t), e.destroyCalendar();
                        },
                      });
                }),
              n
            );
          },
          html_element: function (e) {
            return t("dhx_cal_nav_content");
          },
        };
        function n(e) {
          var t = (function (e) {
            var t;
            if (e.view)
              switch (e.view) {
                case "today":
                case "next":
                case "prev":
                  t = a.builtInButton;
                  break;
                case "date":
                  t = a.date;
                  break;
                case "spacer":
                  t = a.spacer;
                  break;
                case "button":
                  t = a.button;
                  break;
                case "minicalendar":
                  t = a.minicalendarButton;
                  break;
                default:
                  t = a.view;
              }
            else e.rows ? (t = a.rows_container) : e.cols && (t = a.row);
            return t;
          })(e);
          if (t) {
            var n = t(e);
            if ((e.css && n.classList.add(e.css), e.width))
              (i = e.width) === 1 * i && (i += "px"), (n.style.width = i);
            if (e.height)
              (i = e.height) === 1 * i && (i += "px"), (n.style.height = i);
            if (
              (e.click && n.addEventListener("click", e.click),
              e.html && (n.innerHTML = e.html),
              e.align)
            ) {
              var i = "";
              "right" == e.align
                ? (i = "flex-end")
                : "left" == e.align && (i = "flex-start"),
                (n.style.justifyContent = i);
            }
            return n;
          }
        }
        function i(e) {
          return (
            "string" == typeof e && (e = { view: e }),
            e.view || e.rows || e.cols || (e.view = "button"),
            e
          );
        }
        e._init_nav_bar = function (t) {
          var a = this.$container.querySelector(".dhx_cal_navline");
          return (
            a ||
            (((a = document.createElement("div")).className =
              "dhx_cal_navline dhx_cal_navline_flex"),
            e._update_nav_bar(t, a),
            a)
          );
        };
        var r = null;
        e._update_nav_bar = function (t, a) {
          if (t) {
            var o = !1,
              s = !1,
              _ = t.height || e.xy.nav_height;
            (null !== r && r === _) || (o = !0),
              (s = !0),
              o && (e.xy.nav_height = _),
              s &&
                ((a.innerHTML = ""),
                a.appendChild(
                  (function e(t) {
                    var a,
                      r = document.createDocumentFragment();
                    a = Array.isArray(t) ? t : [t];
                    for (var o = 0; o < a.length; o++) {
                      var s,
                        _ = i(a[o]);
                      "day" === _.view &&
                        a[o + 1] &&
                        (("week" !== (s = i(a[o + 1])).view &&
                          "month" !== s.view) ||
                          (_.$firstTab = !0)),
                        "month" === _.view &&
                          a[o - 1] &&
                          (("week" !== (s = i(a[o - 1])).view &&
                            "day" !== s.view) ||
                            (_.$lastTab = !0));
                      var d = n(_);
                      r.appendChild(d),
                        (_.cols || _.rows) &&
                          d.appendChild(e(_.cols || _.rows));
                    }
                    return r;
                  })(t)
                )),
              (o || s) && ((e._els = []), e.get_elements(), e.set_actions()),
              (a.style.display = 0 === _ ? "none" : ""),
              (r = _);
          }
        };
      }
      function r(e) {
        function t(e) {
          for (var t = document.body; e && e != t; ) e = e.parentNode;
          return !(t != e);
        }
        function a(e) {
          return {
            w: e.innerWidth || document.documentElement.clientWidth,
            h: e.innerHeight || document.documentElement.clientHeight,
          };
        }
        function n(e, n) {
          var r,
            o = a(n);
          e.event(n, "resize", function () {
            clearTimeout(r),
              (r = setTimeout(function () {
                if (t(e.$container)) {
                  var r = a(n);
                  (function (e, t) {
                    return e.w == t.w && e.h == t.h;
                  })(o, r) || ((o = r), i(e));
                }
              }, 150));
          });
        }
        function i(e) {
          !e.$destroyed &&
            e.$root &&
            t(e.$root) &&
            e.callEvent("onSchedulerResize", []) &&
            (e.updateView(), e.callEvent("onAfterSchedulerResize", []));
        }
        !(function (e) {
          var t = e.$container;
          "static" == window.getComputedStyle(t).getPropertyValue("position") &&
            (t.style.position = "relative");
          var a = document.createElement("iframe");
          (a.className = "scheduler_container_resize_watcher"),
            (a.tabIndex = -1),
            e.config.wai_aria_attributes &&
              (a.setAttribute("role", "none"),
              a.setAttribute("aria-hidden", !0)),
            window.Sfdc || window.$A || window.Aura
              ? (function (e) {
                  var t = e.$root.offsetHeight,
                    a = e.$root.offsetWidth;
                  !(function n() {
                    e.$destroyed ||
                      (e.$root &&
                        ((e.$root.offsetHeight == t &&
                          e.$root.offsetWidth == a) ||
                          i(e),
                        (t = e.$root.offsetHeight),
                        (a = e.$root.offsetWidth)),
                      setTimeout(n, 200));
                  })();
                })(e)
              : (t.appendChild(a),
                a.contentWindow
                  ? n(e, a.contentWindow)
                  : (t.removeChild(a), n(e, window)));
        })(e);
      }
      function o(e, t) {
        for (var a = 0; a < t.length; a++) {
          var n = t[a];
          (n.enumerable = n.enumerable || !1),
            (n.configurable = !0),
            "value" in n && (n.writable = !0),
            Object.defineProperty(e, n.key, n);
        }
      }
      var s = (function () {
          function e() {
            !(function (e, t) {
              if (!(e instanceof t))
                throw new TypeError("Cannot call a class as a function");
            })(this, e),
              (this._silent_mode = !1),
              (this.listeners = {});
          }
          return (
            (function (e, t, a) {
              t && o(e.prototype, t), a && o(e, a);
            })(e, [
              {
                key: "_silentStart",
                value: function () {
                  this._silent_mode = !0;
                },
              },
              {
                key: "_silentEnd",
                value: function () {
                  this._silent_mode = !1;
                },
              },
            ]),
            e
          );
        })(),
        _ = function (e) {
          var t = {},
            a = 0,
            n = function () {
              var a = !0;
              for (var n in t) {
                var i = t[n].apply(e, arguments);
                a = a && i;
              }
              return a;
            };
          return (
            (n.addEvent = function (e, i) {
              if ("function" == typeof e) {
                var r;
                if ((i && i.id ? (r = i.id) : ((r = a), a++), i && i.once)) {
                  var o = e;
                  e = function () {
                    o(), n.removeEvent(r);
                  };
                }
                return (t[r] = e), r;
              }
              return !1;
            }),
            (n.removeEvent = function (e) {
              delete t[e];
            }),
            (n.clear = function () {
              t = {};
            }),
            n
          );
        };
      var d = function (e) {
        var t = new s();
        (e.attachEvent = function (e, a, n) {
          (e = "ev_" + e.toLowerCase()),
            t.listeners[e] || (t.listeners[e] = _(this)),
            n && n.thisObject && (a = a.bind(n.thisObject));
          var i = e + ":" + t.listeners[e].addEvent(a, n);
          return n && n.id && (i = n.id), i;
        }),
          (e.attachAll = function (e) {
            this.attachEvent("listen_all", e);
          }),
          (e.callEvent = function (e, a) {
            if (t._silent_mode) return !0;
            var n = "ev_" + e.toLowerCase(),
              i = t.listeners;
            return (
              i.ev_listen_all && i.ev_listen_all.apply(this, [e].concat(a)),
              !i[n] || i[n].apply(this, a)
            );
          }),
          (e.checkEvent = function (e) {
            return !!t.listeners["ev_" + e.toLowerCase()];
          }),
          (e.detachEvent = function (e) {
            if (e) {
              var a = t.listeners;
              for (var n in a) a[n].removeEvent(e);
              var i = e.split(":");
              if (((a = t.listeners), 2 === i.length)) {
                var r = i[0],
                  o = i[1];
                a[r] && a[r].removeEvent(o);
              }
            }
          }),
          (e.detachAllEvents = function () {
            for (var e in t.listeners) t.listeners[e].clear();
          });
      };
      function l(e) {
        "@babel/helpers - typeof";
        return (l =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      function c(e) {
        "@babel/helpers - typeof";
        return (c =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      function u(e) {
        "@babel/helpers - typeof";
        return (u =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      function h(e) {
        "@babel/helpers - typeof";
        return (h =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      var f = Date.now();
      function p(e) {
        return (
          !(!e || "object" !== h(e)) &&
          !!(e.getFullYear && e.getMonth && e.getDate)
        );
      }
      var v = {
        uid: function () {
          return f++;
        },
        mixin: function (e, t, a) {
          for (var n in t) (void 0 === e[n] || a) && (e[n] = t[n]);
          return e;
        },
        copy: function e(t) {
          var a, n;
          if (t && "object" == h(t))
            switch (!0) {
              case p(t):
                n = new Date(t);
                break;
              case (function (e) {
                return Array.isArray
                  ? Array.isArray(e)
                  : e && void 0 !== e.length && e.pop && e.push;
              })(t):
                for (n = new Array(t.length), a = 0; a < t.length; a++)
                  n[a] = e(t[a]);
                break;
              case (function (e) {
                return (
                  e &&
                  "object" === h(e) &&
                  "function String() { [native code] }" ===
                    Function.prototype.toString.call(e.constructor)
                );
              })(t):
                n = new String(t);
                break;
              case (function (e) {
                return (
                  e &&
                  "object" === h(e) &&
                  "function Number() { [native code] }" ===
                    Function.prototype.toString.call(e.constructor)
                );
              })(t):
                n = new Number(t);
                break;
              case (function (e) {
                return (
                  e &&
                  "object" === h(e) &&
                  "function Boolean() { [native code] }" ===
                    Function.prototype.toString.call(e.constructor)
                );
              })(t):
                n = new Boolean(t);
                break;
              default:
                for (a in ((n = {}), t))
                  Object.prototype.hasOwnProperty.apply(t, [a]) &&
                    (n[a] = e(t[a]));
            }
          return n || t;
        },
        defined: function (e) {
          return void 0 !== e;
        },
        isDate: p,
      };
      function g(e) {
        if (!e) return "";
        var t = e.className || "";
        return t.baseVal && (t = t.baseVal), t.indexOf || (t = ""), t || "";
      }
      function m(e, t, a) {
        void 0 === a && (a = !0);
        for (var n = e.target || e.srcElement, i = ""; n; ) {
          if ((i = g(n))) {
            var r = i.indexOf(t);
            if (r >= 0) {
              if (!a) return n;
              var o = 0 === r || !(i.charAt(r - 1) || "").trim(),
                s = r + t.length >= i.length || !i.charAt(r + t.length).trim();
              if (o && s) return n;
            }
          }
          n = n.parentNode;
        }
        return null;
      }
      function y(e) {
        var t = !1,
          a = !1;
        if (window.getComputedStyle) {
          var n = window.getComputedStyle(e, null);
          (t = n.display), (a = n.visibility);
        } else
          e.currentStyle &&
            ((t = e.currentStyle.display), (a = e.currentStyle.visibility));
        var i = !1,
          r = m({ target: e }, "dhx_form_repeat", !1);
        return (
          r && (i = !("0px" != r.style.height)),
          (i = i || !e.offsetHeight),
          "none" != t && "hidden" != a && !i
        );
      }
      function b(e) {
        return (
          !isNaN(e.getAttribute("tabindex")) &&
          1 * e.getAttribute("tabindex") >= 0
        );
      }
      function x(e) {
        return (
          !{ a: !0, area: !0 }[e.nodeName.loLowerCase()] ||
          !!e.getAttribute("href")
        );
      }
      function k(e) {
        return (
          !{ input: !0, select: !0, textarea: !0, button: !0, object: !0 }[
            e.nodeName.toLowerCase()
          ] || !e.hasAttribute("disabled")
        );
      }
      function w() {
        return document.head.createShadowRoot || document.head.attachShadow;
      }
      function E(e) {
        if (!e) return document.body;
        if (!w()) return document.body;
        for (; e.parentNode && (e = e.parentNode); )
          if (e instanceof ShadowRoot) return e.host;
        return document.body;
      }
      var S,
        D = {
          getAbsoluteLeft: function (e) {
            return this.getOffset(e).left;
          },
          getAbsoluteTop: function (e) {
            return this.getOffset(e).top;
          },
          getOffsetSum: function (e) {
            for (var t = 0, a = 0; e; )
              (t += parseInt(e.offsetTop)),
                (a += parseInt(e.offsetLeft)),
                (e = e.offsetParent);
            return { top: t, left: a };
          },
          getOffsetRect: function (e) {
            var t = e.getBoundingClientRect(),
              a = 0,
              n = 0;
            if (/Mobi/.test(navigator.userAgent)) {
              var i = document.createElement("div");
              (i.style.position = "absolute"),
                (i.style.left = "0px"),
                (i.style.top = "0px"),
                (i.style.width = "1px"),
                (i.style.height = "1px"),
                document.body.appendChild(i);
              var r = i.getBoundingClientRect();
              (a = t.top - r.top),
                (n = t.left - r.left),
                i.parentNode.removeChild(i);
            } else {
              var o = document.body,
                s = document.documentElement,
                _ = window.pageYOffset || s.scrollTop || o.scrollTop,
                d = window.pageXOffset || s.scrollLeft || o.scrollLeft,
                l = s.clientTop || o.clientTop || 0,
                c = s.clientLeft || o.clientLeft || 0;
              (a = t.top + _ - l), (n = t.left + d - c);
            }
            return { top: Math.round(a), left: Math.round(n) };
          },
          getOffset: function (e) {
            return e.getBoundingClientRect
              ? this.getOffsetRect(e)
              : this.getOffsetSum(e);
          },
          closest: function (e, t) {
            return e && t ? S(e, t) : null;
          },
          insertAfter: function (e, t) {
            t.nextSibling
              ? t.parentNode.insertBefore(e, t.nextSibling)
              : t.parentNode.appendChild(e);
          },
          remove: function (e) {
            e && e.parentNode && e.parentNode.removeChild(e);
          },
          getFocusableNodes: function (e) {
            for (
              var t = e.querySelectorAll(
                  [
                    "a[href]",
                    "area[href]",
                    "input",
                    "select",
                    "textarea",
                    "button",
                    "iframe",
                    "object",
                    "embed",
                    "[tabindex]",
                    "[contenteditable]",
                  ].join(", ")
                ),
                a = Array.prototype.slice.call(t, 0),
                n = 0;
              n < a.length;
              n++
            )
              a[n].$position = n;
            for (
              a.sort(function (e, t) {
                return 0 === e.tabIndex && 0 !== t.tabIndex
                  ? 1
                  : 0 !== e.tabIndex && 0 === t.tabIndex
                  ? -1
                  : e.tabIndex === t.tabIndex
                  ? e.$position - t.$position
                  : e.tabIndex < t.tabIndex
                  ? -1
                  : 1;
              }),
                n = 0;
              n < a.length;
              n++
            ) {
              var i = a[n];
              ((b(i) || k(i) || x(i)) && y(i)) || (a.splice(n, 1), n--);
            }
            return a;
          },
          getClassName: g,
          locateCss: m,
          getRootNode: E,
          hasShadowParent: function (e) {
            return !!E(e);
          },
          isShadowDomSupported: w,
          getActiveElement: function () {
            var e = document.activeElement;
            return (
              e.shadowRoot && (e = e.shadowRoot.activeElement),
              e === document.body &&
                document.getSelection &&
                (e = document.getSelection().focusNode || document.body),
              e
            );
          },
          getRelativeEventPosition: function (e, t) {
            var a = document.documentElement,
              n = (function (e) {
                var t = 0,
                  a = 0,
                  n = 0,
                  i = 0;
                if (e.getBoundingClientRect) {
                  var r = e.getBoundingClientRect(),
                    o = document.body,
                    s =
                      document.documentElement ||
                      document.body.parentNode ||
                      document.body,
                    _ = window.pageYOffset || s.scrollTop || o.scrollTop,
                    d = window.pageXOffset || s.scrollLeft || o.scrollLeft,
                    l = s.clientTop || o.clientTop || 0,
                    c = s.clientLeft || o.clientLeft || 0;
                  (t = r.top + _ - l),
                    (a = r.left + d - c),
                    (n = document.body.offsetWidth - r.right),
                    (i = document.body.offsetHeight - r.bottom);
                } else {
                  for (; e; )
                    (t += parseInt(e.offsetTop, 10)),
                      (a += parseInt(e.offsetLeft, 10)),
                      (e = e.offsetParent);
                  (n = document.body.offsetWidth - e.offsetWidth - a),
                    (i = document.body.offsetHeight - e.offsetHeight - t);
                }
                return {
                  y: Math.round(t),
                  x: Math.round(a),
                  width: e.offsetWidth,
                  height: e.offsetHeight,
                  right: Math.round(n),
                  bottom: Math.round(i),
                };
              })(t);
            return {
              x: e.clientX + a.scrollLeft - a.clientLeft - n.x + t.scrollLeft,
              y: e.clientY + a.scrollTop - a.clientTop - n.y + t.scrollTop,
            };
          },
        };
      if (Element.prototype.closest)
        S = function (e, t) {
          return e.closest(t);
        };
      else {
        var N =
          Element.prototype.matches ||
          Element.prototype.msMatchesSelector ||
          Element.prototype.webkitMatchesSelector;
        S = function (e, t) {
          var a = e;
          do {
            if (N.call(a, t)) return a;
            a = a.parentElement || a.parentNode;
          } while (null !== a && 1 === a.nodeType);
          return null;
        };
      }
      var C = "undefined" != typeof window,
        T = {
          isIE:
            C &&
            (navigator.userAgent.indexOf("MSIE") >= 0 ||
              navigator.userAgent.indexOf("Trident") >= 0),
          isIE6:
            C && !XMLHttpRequest && navigator.userAgent.indexOf("MSIE") >= 0,
          isIE7:
            C &&
            navigator.userAgent.indexOf("MSIE 7.0") >= 0 &&
            navigator.userAgent.indexOf("Trident") < 0,
          isIE8:
            C &&
            navigator.userAgent.indexOf("MSIE 8.0") >= 0 &&
            navigator.userAgent.indexOf("Trident") >= 0,
          isOpera: C && navigator.userAgent.indexOf("Opera") >= 0,
          isChrome: C && navigator.userAgent.indexOf("Chrome") >= 0,
          isKHTML:
            C &&
            (navigator.userAgent.indexOf("Safari") >= 0 ||
              navigator.userAgent.indexOf("Konqueror") >= 0),
          isFF: C && navigator.userAgent.indexOf("Firefox") >= 0,
          isIPad: C && navigator.userAgent.search(/iPad/gi) >= 0,
          isEdge: C && -1 != navigator.userAgent.indexOf("Edge"),
          isNode: !C || "undefined" == typeof navigator,
        },
        M = a(6).Promise;
      var A = a(3),
        O = a.n(A);
      function H(e) {
        "@babel/helpers - typeof";
        return (H =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      function j(e) {
        var t = function (e, t) {
            for (
              var a = "var temp=date.match(/[a-zA-Z]+|[0-9]+/g);",
                n = e.match(/%[a-zA-Z]/g),
                i = 0;
              i < n.length;
              i++
            )
              switch (n[i]) {
                case "%j":
                case "%d":
                  a += "set[2]=temp[" + i + "]||1;";
                  break;
                case "%n":
                case "%m":
                  a += "set[1]=(temp[" + i + "]||1)-1;";
                  break;
                case "%y":
                  a +=
                    "set[0]=temp[" + i + "]*1+(temp[" + i + "]>50?1900:2000);";
                  break;
                case "%g":
                case "%G":
                case "%h":
                case "%H":
                  a += "set[3]=temp[" + i + "]||0;";
                  break;
                case "%i":
                  a += "set[4]=temp[" + i + "]||0;";
                  break;
                case "%Y":
                  a += "set[0]=temp[" + i + "]||0;";
                  break;
                case "%a":
                case "%A":
                  a +=
                    "set[3]=set[3]%12+((temp[" +
                    i +
                    "]||'').toLowerCase()=='am'?0:12);";
                  break;
                case "%s":
                  a += "set[5]=temp[" + i + "]||0;";
                  break;
                case "%M":
                  a +=
                    "set[1]=this.locale.date.month_short_hash[temp[" +
                    i +
                    "]]||0;";
                  break;
                case "%F":
                  a +=
                    "set[1]=this.locale.date.month_full_hash[temp[" +
                    i +
                    "]]||0;";
              }
            var r = "set[0],set[1],set[2],set[3],set[4],set[5]";
            return (
              t && (r = " Date.UTC(" + r + ")"),
              new Function(
                "date",
                "var set=[0,0,1,0,0,0]; " + a + " return new Date(" + r + ");"
              )
            );
          },
          a = function (t, a) {
            return function (n) {
              for (
                var i = [0, 0, 1, 0, 0, 0],
                  r = n.match(/[a-zA-Z]+|[0-9]+/g),
                  o = t.match(/%[a-zA-Z]/g),
                  s = 0;
                s < o.length;
                s++
              )
                switch (o[s]) {
                  case "%j":
                  case "%d":
                    i[2] = r[s] || 1;
                    break;
                  case "%n":
                  case "%m":
                    i[1] = (r[s] || 1) - 1;
                    break;
                  case "%y":
                    i[0] = 1 * r[s] + (r[s] > 50 ? 1900 : 2e3);
                    break;
                  case "%g":
                  case "%G":
                  case "%h":
                  case "%H":
                    i[3] = r[s] || 0;
                    break;
                  case "%i":
                    i[4] = r[s] || 0;
                    break;
                  case "%Y":
                    i[0] = r[s] || 0;
                    break;
                  case "%a":
                  case "%A":
                    i[3] =
                      (i[3] % 12) +
                      ("am" == (r[s] || "").toLowerCase() ? 0 : 12);
                    break;
                  case "%s":
                    i[5] = r[s] || 0;
                    break;
                  case "%M":
                    i[1] = e.locale.date.month_short_hash[r[s]] || 0;
                    break;
                  case "%F":
                    i[1] = e.locale.date.month_full_hash[r[s]] || 0;
                }
              return a
                ? new Date(Date.UTC(i[0], i[1], i[2], i[3], i[4], i[5]))
                : new Date(i[0], i[1], i[2], i[3], i[4], i[5]);
            };
          },
          n = !1;
        function i() {
          return "auto" === e.config.csp ? n : e.config.csp;
        }
        !(function () {
          try {
            new Function("canUseCsp = false;");
          } catch (e) {
            n = !0;
          }
        })(),
          (e.date = {
            init: function () {
              for (
                var t = e.locale.date.month_short,
                  a = (e.locale.date.month_short_hash = {}),
                  n = 0;
                n < t.length;
                n++
              )
                a[t[n]] = n;
              for (
                t = e.locale.date.month_full,
                  a = e.locale.date.month_full_hash = {},
                  n = 0;
                n < t.length;
                n++
              )
                a[t[n]] = n;
            },
            _bind_host_object: function (t) {
              return t.bind
                ? t.bind(e)
                : function () {
                    return t.apply(e, arguments);
                  };
            },
            date_part: function (e) {
              var t = new Date(e);
              return (
                e.setHours(0),
                e.setMinutes(0),
                e.setSeconds(0),
                e.setMilliseconds(0),
                e.getHours() &&
                  (e.getDate() < t.getDate() ||
                    e.getMonth() < t.getMonth() ||
                    e.getFullYear() < t.getFullYear()) &&
                  e.setTime(e.getTime() + 36e5 * (24 - e.getHours())),
                e
              );
            },
            time_part: function (e) {
              return (e.valueOf() / 1e3 - 60 * e.getTimezoneOffset()) % 86400;
            },
            week_start: function (t) {
              var a = t.getDay();
              return (
                e.config.start_on_monday && (0 === a ? (a = 6) : a--),
                this.date_part(this.add(t, -1 * a, "day"))
              );
            },
            month_start: function (e) {
              return e.setDate(1), this.date_part(e);
            },
            year_start: function (e) {
              return e.setMonth(0), this.month_start(e);
            },
            day_start: function (e) {
              return this.date_part(e);
            },
            _add_days: function (e, t) {
              var a = new Date(e.valueOf());
              if ((a.setDate(a.getDate() + t), t == Math.round(t) && t > 0)) {
                var n = (+a - +e) % 864e5;
                if (n && e.getTimezoneOffset() == a.getTimezoneOffset()) {
                  var i = n / 36e5;
                  a.setTime(a.getTime() + 60 * (24 - i) * 60 * 1e3);
                }
              }
              return (
                t >= 0 &&
                  !e.getHours() &&
                  a.getHours() &&
                  (a.getDate() < e.getDate() ||
                    a.getMonth() < e.getMonth() ||
                    a.getFullYear() < e.getFullYear()) &&
                  a.setTime(a.getTime() + 36e5 * (24 - a.getHours())),
                a
              );
            },
            add: function (t, a, n) {
              var i = new Date(t.valueOf());
              switch (n) {
                case "day":
                  i = e.date._add_days(i, a);
                  break;
                case "week":
                  i = e.date._add_days(i, 7 * a);
                  break;
                case "month":
                  i.setMonth(i.getMonth() + a);
                  break;
                case "year":
                  i.setYear(i.getFullYear() + a);
                  break;
                case "hour":
                  i.setTime(i.getTime() + 60 * a * 60 * 1e3);
                  break;
                case "minute":
                  i.setTime(i.getTime() + 60 * a * 1e3);
                  break;
                default:
                  return e.date["add_" + n](t, a, n);
              }
              return i;
            },
            to_fixed: function (e) {
              return e < 10 ? "0" + e : e;
            },
            copy: function (e) {
              return new Date(e.valueOf());
            },
            date_to_str: function (t, a) {
              if (i())
                return (function (t, a) {
                  return function (n) {
                    return t.replace(/%[a-zA-Z]/g, function (t) {
                      switch (t) {
                        case "%d":
                          return a
                            ? e.date.to_fixed(n.getUTCDate())
                            : e.date.to_fixed(n.getDate());
                        case "%m":
                          return a
                            ? e.date.to_fixed(n.getUTCMonth() + 1)
                            : e.date.to_fixed(n.getMonth() + 1);
                        case "%j":
                          return a ? n.getUTCDate() : n.getDate();
                        case "%n":
                          return a ? n.getUTCMonth() + 1 : n.getMonth() + 1;
                        case "%y":
                          return a
                            ? e.date.to_fixed(n.getUTCFullYear() % 100)
                            : e.date.to_fixed(n.getFullYear() % 100);
                        case "%Y":
                          return a ? n.getUTCFullYear() : n.getFullYear();
                        case "%D":
                          return a
                            ? e.locale.date.day_short[n.getUTCDay()]
                            : e.locale.date.day_short[n.getDay()];
                        case "%l":
                          return a
                            ? e.locale.date.day_full[n.getUTCDay()]
                            : e.locale.date.day_full[n.getDay()];
                        case "%M":
                          return a
                            ? e.locale.date.month_short[n.getUTCMonth()]
                            : e.locale.date.month_short[n.getMonth()];
                        case "%F":
                          return a
                            ? e.locale.date.month_full[n.getUTCMonth()]
                            : e.locale.date.month_full[n.getMonth()];
                        case "%h":
                          return a
                            ? e.date.to_fixed(((n.getUTCHours() + 11) % 12) + 1)
                            : e.date.to_fixed(((n.getHours() + 11) % 12) + 1);
                        case "%g":
                          return a
                            ? ((n.getUTCHours() + 11) % 12) + 1
                            : ((n.getHours() + 11) % 12) + 1;
                        case "%G":
                          return a ? n.getUTCHours() : n.getHours();
                        case "%H":
                          return a
                            ? e.date.to_fixed(n.getUTCHours())
                            : e.date.to_fixed(n.getHours());
                        case "%i":
                          return a
                            ? e.date.to_fixed(n.getUTCMinutes())
                            : e.date.to_fixed(n.getMinutes());
                        case "%a":
                          return a
                            ? n.getUTCHours() > 11
                              ? "pm"
                              : "am"
                            : n.getHours() > 11
                            ? "pm"
                            : "am";
                        case "%A":
                          return a
                            ? n.getUTCHours() > 11
                              ? "PM"
                              : "AM"
                            : n.getHours() > 11
                            ? "PM"
                            : "AM";
                        case "%s":
                          return a
                            ? e.date.to_fixed(n.getUTCSeconds())
                            : e.date.to_fixed(n.getSeconds());
                        case "%W":
                          return a
                            ? e.date.to_fixed(e.date.getUTCISOWeek(n))
                            : e.date.to_fixed(e.date.getISOWeek(n));
                        default:
                          return t;
                      }
                    });
                  };
                })(t, a);
              (t = t.replace(/%[a-zA-Z]/g, function (e) {
                switch (e) {
                  case "%d":
                    return '"+this.date.to_fixed(date.getDate())+"';
                  case "%m":
                    return '"+this.date.to_fixed((date.getMonth()+1))+"';
                  case "%j":
                    return '"+date.getDate()+"';
                  case "%n":
                    return '"+(date.getMonth()+1)+"';
                  case "%y":
                    return '"+this.date.to_fixed(date.getFullYear()%100)+"';
                  case "%Y":
                    return '"+date.getFullYear()+"';
                  case "%D":
                    return '"+this.locale.date.day_short[date.getDay()]+"';
                  case "%l":
                    return '"+this.locale.date.day_full[date.getDay()]+"';
                  case "%M":
                    return '"+this.locale.date.month_short[date.getMonth()]+"';
                  case "%F":
                    return '"+this.locale.date.month_full[date.getMonth()]+"';
                  case "%h":
                    return '"+this.date.to_fixed((date.getHours()+11)%12+1)+"';
                  case "%g":
                    return '"+((date.getHours()+11)%12+1)+"';
                  case "%G":
                    return '"+date.getHours()+"';
                  case "%H":
                    return '"+this.date.to_fixed(date.getHours())+"';
                  case "%i":
                    return '"+this.date.to_fixed(date.getMinutes())+"';
                  case "%a":
                    return '"+(date.getHours()>11?"pm":"am")+"';
                  case "%A":
                    return '"+(date.getHours()>11?"PM":"AM")+"';
                  case "%s":
                    return '"+this.date.to_fixed(date.getSeconds())+"';
                  case "%W":
                    return '"+this.date.to_fixed(this.date.getISOWeek(date))+"';
                  default:
                    return e;
                }
              })),
                a && (t = t.replace(/date\.get/g, "date.getUTC"));
              var n = new Function("date", 'return "' + t + '";');
              return e.date._bind_host_object(n);
            },
            str_to_date: function (n, r, o) {
              var s = (i() ? a : t)(n, r),
                _ =
                  /^[0-9]{4}(\-|\/)[0-9]{2}(\-|\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,
                d =
                  /^[0-9]{2}\/[0-9]{2}\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/,
                l =
                  /^[0-9]{2}\-[0-9]{2}\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,
                c =
                  /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,
                u = t("%Y-%m-%d %H:%i:%s", r),
                h = t("%m/%d/%Y %H:%i:%s", r),
                f = t("%d-%m-%Y %H:%i:%s", r);
              return function (t) {
                if (!o && !e.config.parse_exact_format) {
                  if (t && t.getISOWeek) return new Date(t);
                  if ("number" == typeof t) return new Date(t);
                  if (
                    (function (e) {
                      return _.test(String(e));
                    })(t)
                  )
                    return u(t);
                  if (
                    (function (e) {
                      return d.test(String(e));
                    })(t)
                  )
                    return h(t);
                  if (
                    (function (e) {
                      return l.test(String(e));
                    })(t)
                  )
                    return f(t);
                  if (
                    (function (e) {
                      return c.test(e);
                    })(t)
                  )
                    return new Date(t);
                }
                return s.call(e, t);
              };
            },
            getISOWeek: function (e) {
              if (!e) return !1;
              var t = (e = this.date_part(new Date(e))).getDay();
              0 === t && (t = 7);
              var a = new Date(e.valueOf());
              a.setDate(e.getDate() + (4 - t));
              var n = a.getFullYear(),
                i = Math.round(
                  (a.getTime() - new Date(n, 0, 1).getTime()) / 864e5
                );
              return 1 + Math.floor(i / 7);
            },
            getUTCISOWeek: function (e) {
              return this.getISOWeek(this.convert_to_utc(e));
            },
            convert_to_utc: function (e) {
              return new Date(
                e.getUTCFullYear(),
                e.getUTCMonth(),
                e.getUTCDate(),
                e.getUTCHours(),
                e.getUTCMinutes(),
                e.getUTCSeconds()
              );
            },
          });
      }
      function L(e) {
        "@babel/helpers - typeof";
        return (L =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      function P(e) {
        "@babel/helpers - typeof";
        return (P =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      var z = a(2),
        $ = a.n(z);
      function F(e) {
        "@babel/helpers - typeof";
        return (F =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      function I(e) {
        (e._loaded = {}),
          (e._load = function (t, a) {
            if ((t = t || this._load_url)) {
              var n;
              if (
                ((t +=
                  (-1 == t.indexOf("?") ? "?" : "&") +
                  "timeshift=" +
                  new Date().getTimezoneOffset()),
                this.config.prevent_cache && (t += "&uid=" + this.uid()),
                (a = a || this._date),
                this._load_mode)
              ) {
                var i = this.templates.load_format;
                for (
                  a = this.date[this._load_mode + "_start"](
                    new Date(a.valueOf())
                  );
                  a > this._min_date;

                )
                  a = this.date.add(a, -1, this._load_mode);
                n = a;
                for (var r = !0; n < this._max_date; )
                  (n = this.date.add(n, 1, this._load_mode)),
                    this._loaded[i(a)] && r
                      ? (a = this.date.add(a, 1, this._load_mode))
                      : (r = !1);
                var o = n;
                do {
                  (n = o), (o = this.date.add(n, -1, this._load_mode));
                } while (o > a && this._loaded[i(o)]);
                if (n <= a) return !1;
                for (
                  e.ajax.get(t + "&from=" + i(a) + "&to=" + i(n), s);
                  a < n;

                )
                  (this._loaded[i(a)] = !0),
                    (a = this.date.add(a, 1, this._load_mode));
              } else e.ajax.get(t, s);
              return (
                this.callEvent("onXLS", []),
                this.callEvent("onLoadStart", []),
                !0
              );
            }
            function s(t) {
              e.on_load(t), e.callEvent("onLoadEnd", []);
            }
          }),
          (e._parsers = {}),
          (function (e) {
            e._parsers.xml = {
              canParse: function (t, a) {
                if (a.responseXML && a.responseXML.firstChild) return !0;
                try {
                  var n = e.ajax.parse(a.responseText),
                    i = e.ajax.xmltop("data", n);
                  if (i && "data" === i.tagName) return !0;
                } catch (e) {}
                return !1;
              },
              parse: function (t) {
                var a;
                if (
                  (t.xmlDoc.responseXML ||
                    (t.xmlDoc.responseXML = e.ajax.parse(
                      t.xmlDoc.responseText
                    )),
                  "data" != (a = e.ajax.xmltop("data", t.xmlDoc)).tagName)
                )
                  return null;
                var n = a.getAttribute("dhx_security");
                n &&
                  (window.dhtmlx && (window.dhtmlx.security_key = n),
                  (e.security_key = n));
                for (
                  var i = e.ajax.xpath("//coll_options", t.xmlDoc), r = 0;
                  r < i.length;
                  r++
                ) {
                  var o = i[r].getAttribute("for"),
                    s = e.serverList[o];
                  s || (e.serverList[o] = s = []), s.splice(0, s.length);
                  for (
                    var _ = e.ajax.xpath(".//item", i[r]), d = 0;
                    d < _.length;
                    d++
                  ) {
                    for (
                      var l = _[d].attributes,
                        c = {
                          key: _[d].getAttribute("value"),
                          label: _[d].getAttribute("label"),
                        },
                        u = 0;
                      u < l.length;
                      u++
                    ) {
                      var h = l[u];
                      "value" != h.nodeName &&
                        "label" != h.nodeName &&
                        (c[h.nodeName] = h.nodeValue);
                    }
                    s.push(c);
                  }
                }
                i.length && e.callEvent("onOptionsLoad", []);
                var f = e.ajax.xpath("//userdata", t.xmlDoc);
                for (r = 0; r < f.length; r++) {
                  var p = e._xmlNodeToJSON(f[r]);
                  e._userdata[p.name] = p.text;
                }
                var v = [];
                for (
                  a = e.ajax.xpath("//event", t.xmlDoc), r = 0;
                  r < a.length;
                  r++
                ) {
                  var g = (v[r] = e._xmlNodeToJSON(a[r]));
                  e._init_event(g);
                }
                return v;
              },
            };
          })(e),
          (function (e) {
            e.json = e._parsers.json = {
              canParse: function (e) {
                if (e && "object" === P(e)) return !0;
                if ("string" == typeof e)
                  try {
                    var t = JSON.parse(e);
                    return (
                      "[object Object]" === Object.prototype.toString.call(t) ||
                      "[object Array]" === Object.prototype.toString.call(t)
                    );
                  } catch (e) {
                    return !1;
                  }
                return !1;
              },
              parse: function (t) {
                var a = [];
                "string" == typeof t && (t = JSON.parse(t)),
                  "[object Array]" === Object.prototype.toString.call(t)
                    ? (a = t)
                    : t && (t.events ? (a = t.events) : t.data && (a = t.data)),
                  (a = a || []),
                  t.dhx_security &&
                    (window.dhtmlx &&
                      (window.dhtmlx.security_key = t.dhx_security),
                    (e.security_key = t.dhx_security));
                var n = t && t.collections ? t.collections : {},
                  i = !1;
                for (var r in n)
                  if (n.hasOwnProperty(r)) {
                    i = !0;
                    var o = n[r],
                      s = e.serverList[r];
                    s || (e.serverList[r] = s = []), s.splice(0, s.length);
                    for (var _ = 0; _ < o.length; _++) {
                      var d = o[_],
                        l = { key: d.value, label: d.label };
                      for (var c in d)
                        if (d.hasOwnProperty(c)) {
                          if ("value" == c || "label" == c) continue;
                          l[c] = d[c];
                        }
                      s.push(l);
                    }
                  }
                i && e.callEvent("onOptionsLoad", []);
                for (var u = [], h = 0; h < a.length; h++) {
                  var f = a[h];
                  e._init_event(f), u.push(f);
                }
                return u;
              },
            };
          })(e),
          (function (e) {
            e.ical = e._parsers.ical = {
              canParse: function (e) {
                return (
                  "string" == typeof e && new RegExp("^BEGIN:VCALENDAR").test(e)
                );
              },
              parse: function (e) {
                var t = e.match(
                  RegExp(this.c_start + "[^\f]*" + this.c_end, "")
                );
                if (t.length) {
                  (t[0] = t[0].replace(/[\r\n]+ /g, "")),
                    (t[0] = t[0].replace(/[\r\n]+(?=[a-z \t])/g, " ")),
                    (t[0] = t[0].replace(/;[^:\r\n]*:/g, ":"));
                  for (
                    var a,
                      n = [],
                      i = RegExp(
                        "(?:" +
                          this.e_start +
                          ")([^\f]*?)(?:" +
                          this.e_end +
                          ")",
                        "g"
                      );
                    null !== (a = i.exec(t));

                  ) {
                    for (
                      var r, o = {}, s = /[^\r\n]+[\r\n]+/g;
                      null !== (r = s.exec(a[1]));

                    )
                      this.parse_param(r.toString(), o);
                    o.uid && !o.id && (o.id = o.uid), n.push(o);
                  }
                  return n;
                }
              },
              parse_param: function (e, t) {
                var a = e.indexOf(":");
                if (-1 != a) {
                  var n = e.substr(0, a).toLowerCase(),
                    i = e
                      .substr(a + 1)
                      .replace(/\\,/g, ",")
                      .replace(/[\r\n]+$/, "");
                  "summary" == n
                    ? (n = "text")
                    : "dtstart" == n
                    ? ((n = "start_date"), (i = this.parse_date(i, 0, 0)))
                    : "dtend" == n &&
                      ((n = "end_date"), (i = this.parse_date(i, 0, 0))),
                    (t[n] = i);
                }
              },
              parse_date: function (t, a, n) {
                var i = t.split("T"),
                  r = !1;
                i[1] &&
                  ((a = i[1].substr(0, 2)),
                  (n = i[1].substr(2, 2)),
                  (r = !("Z" != i[1][6])));
                var o = i[0].substr(0, 4),
                  s = parseInt(i[0].substr(4, 2), 10) - 1,
                  _ = i[0].substr(6, 2);
                return e.config.server_utc || r
                  ? new Date(Date.UTC(o, s, _, a, n))
                  : new Date(o, s, _, a, n);
              },
              c_start: "BEGIN:VCALENDAR",
              e_start: "BEGIN:VEVENT",
              e_end: "END:VEVENT",
              c_end: "END:VCALENDAR",
            };
          })(e),
          (e.on_load = function (e) {
            var t;
            this.callEvent("onBeforeParse", []);
            var a = !1,
              n = !1;
            for (var i in this._parsers) {
              var r = this._parsers[i];
              if (r.canParse(e.xmlDoc.responseText, e.xmlDoc)) {
                try {
                  var o = e.xmlDoc.responseText;
                  "xml" === i && (o = e), (t = r.parse(o)) || (a = !0);
                } catch (e) {
                  a = !0;
                }
                n = !0;
                break;
              }
            }
            if (!n)
              if (this._process && this[this._process])
                try {
                  t = this[this._process].parse(e.xmlDoc.responseText);
                } catch (e) {
                  a = !0;
                }
              else a = !0;
            (a || (e.xmlDoc.status && e.xmlDoc.status >= 400)) &&
              (this.callEvent("onLoadError", [e.xmlDoc]), (t = [])),
              this._process_loading(t),
              this.callEvent("onXLE", []),
              this.callEvent("onParse", []);
          }),
          (e._process_loading = function (e) {
            (this._loading = !0), (this._not_render = !0);
            for (var t = 0; t < e.length; t++)
              this.callEvent("onEventLoading", [e[t]]) && this.addEvent(e[t]);
            (this._not_render = !1),
              this._render_wait && this.render_view_data(),
              (this._loading = !1),
              this._after_call && this._after_call(),
              (this._after_call = null);
          }),
          (e._init_event = function (t) {
            (t.text = t.text || t._tagvalue || ""),
              (t.start_date = e._init_date(t.start_date)),
              (t.end_date = e._init_date(t.end_date));
          }),
          (e._init_date = function (t) {
            return t
              ? "string" == typeof t
                ? e._helpers.parseDate(t)
                : new Date(t)
              : null;
          });
        var t = $()(e);
        (e.serialize = function () {
          var a = [],
            n = t();
          for (var i in n) {
            var r = {},
              o = n[i];
            for (var s in o)
              if ("$" != s.charAt(0) && "_" != s.charAt(0)) {
                var _ = void 0,
                  d = o[s];
                (_ = e.utils.isDate(d)
                  ? e.defined(e.templates.xml_format)
                    ? e.templates.xml_format(d)
                    : e.templates.format_date(d)
                  : d),
                  (r[s] = _);
              }
            a.push(r);
          }
          return a;
        }),
          (e.parse = function (e, t) {
            (this._process = t), this.on_load({ xmlDoc: { responseText: e } });
          }),
          (e.load = function (e, t) {
            "string" == typeof t && ((this._process = t), (t = arguments[2])),
              (this._load_url = e),
              (this._after_call = t),
              this._load(e, this._date);
          }),
          (e.setLoadMode = function (e) {
            "all" == e && (e = ""), (this._load_mode = e);
          }),
          (e.serverList = function (e, t) {
            return t
              ? ((this.serverList[e] = t.slice(0)), this.serverList[e])
              : ((this.serverList[e] = this.serverList[e] || []),
                this.serverList[e]);
          }),
          (e._userdata = {}),
          (e._xmlNodeToJSON = function (e) {
            for (var t = {}, a = 0; a < e.attributes.length; a++)
              t[e.attributes[a].name] = e.attributes[a].value;
            for (a = 0; a < e.childNodes.length; a++) {
              var n = e.childNodes[a];
              1 == n.nodeType &&
                (t[n.tagName] = n.firstChild ? n.firstChild.nodeValue : "");
            }
            return (
              t.text || (t.text = e.firstChild ? e.firstChild.nodeValue : ""), t
            );
          }),
          e.attachEvent("onXLS", function () {
            var e;
            !0 === this.config.show_loading &&
              (((e = this.config.show_loading =
                document.createElement("div")).className = "dhx_loading"),
              (e.style.left = Math.round((this._x - 128) / 2) + "px"),
              (e.style.top = Math.round((this._y - 15) / 2) + "px"),
              this._obj.appendChild(e));
          }),
          e.attachEvent("onXLE", function () {
            var e = this.config.show_loading;
            e &&
              "object" == F(e) &&
              (e.parentNode && e.parentNode.removeChild(e),
              (this.config.show_loading = !0));
          });
      }
      function R(e) {
        (e._init_touch_events = function () {
          if (
            (((this.config.touch &&
              (-1 != navigator.userAgent.indexOf("Mobile") ||
                -1 != navigator.userAgent.indexOf("iPad") ||
                -1 != navigator.userAgent.indexOf("Android") ||
                -1 != navigator.userAgent.indexOf("Touch")) &&
              !window.MSStream) ||
              ("MacIntel" === navigator.platform &&
                navigator.maxTouchPoints > 1)) &&
              ((this.xy.scroll_width = 0), (this._mobile = !0)),
            this.config.touch)
          ) {
            var e = !0;
            try {
              document.createEvent("TouchEvent");
            } catch (t) {
              e = !1;
            }
            e
              ? this._touch_events(
                  ["touchmove", "touchstart", "touchend"],
                  function (e) {
                    return e.touches && e.touches.length > 1
                      ? null
                      : e.touches[0]
                      ? {
                          target: e.target,
                          pageX: e.touches[0].pageX,
                          pageY: e.touches[0].pageY,
                          clientX: e.touches[0].clientX,
                          clientY: e.touches[0].clientY,
                        }
                      : e;
                  },
                  function () {
                    return !1;
                  }
                )
              : window.PointerEvent || window.navigator.pointerEnabled
              ? this._touch_events(
                  ["pointermove", "pointerdown", "pointerup"],
                  function (e) {
                    return "mouse" == e.pointerType ? null : e;
                  },
                  function (e) {
                    return !e || "mouse" == e.pointerType;
                  }
                )
              : window.navigator.msPointerEnabled &&
                this._touch_events(
                  ["MSPointerMove", "MSPointerDown", "MSPointerUp"],
                  function (e) {
                    return e.pointerType == e.MSPOINTER_TYPE_MOUSE ? null : e;
                  },
                  function (e) {
                    return !e || e.pointerType == e.MSPOINTER_TYPE_MOUSE;
                  }
                );
          }
        }),
          (e._touch_events = function (t, a, n) {
            var i,
              r,
              o,
              s,
              _,
              d,
              l = 0;
            function c(t, a, i) {
              t.addEventListener(
                a,
                function (t) {
                  return !!e._is_lightbox_open() || (n(t) ? void 0 : i(t));
                },
                { passive: !1 }
              );
            }
            function u(t) {
              n(t) ||
                (e._hide_global_tip(),
                s && (e._on_mouse_up(a(t)), (e._temp_touch_block = !1)),
                (e._drag_id = null),
                (e._drag_mode = null),
                (e._drag_pos = null),
                (e._pointerDragId = null),
                clearTimeout(o),
                (s = d = !1),
                (_ = !0));
            }
            c(document.body, t[0], function (t) {
              if (!n(t)) {
                var l = a(t);
                if (l) {
                  if (s)
                    return (
                      (function (t) {
                        if (!n(t)) {
                          var a = e.getState().drag_mode,
                            i = !!e.matrix && e.matrix[e._mode],
                            r = e.render_view_data;
                          "create" == a &&
                            i &&
                            (e.render_view_data = function () {
                              for (
                                var t = e.getState().drag_id,
                                  a = e.getEvent(t),
                                  n = i.y_property,
                                  r = e.getEvents(a.start_date, a.end_date),
                                  o = 0;
                                o < r.length;
                                o++
                              )
                                r[o][n] != a[n] && (r.splice(o, 1), o--);
                              (a._sorder = r.length - 1),
                                (a._count = r.length),
                                this.render_data([a], e.getState().mode);
                            }),
                            e._on_mouse_move(t),
                            "create" == a && i && (e.render_view_data = r),
                            t.preventDefault && t.preventDefault(),
                            (t.cancelBubble = !0);
                        }
                      })(l),
                      t.preventDefault && t.preventDefault(),
                      (t.cancelBubble = !0),
                      e._update_global_tip(),
                      !1
                    );
                  (r = a(t)),
                    d &&
                      (r
                        ? (i.target != r.target ||
                            Math.abs(i.pageX - r.pageX) > 5 ||
                            Math.abs(i.pageY - r.pageY) > 5) &&
                          ((_ = !0), clearTimeout(o))
                        : (_ = !0));
                }
              }
            }),
              c(this._els.dhx_cal_data[0], "touchcancel", u),
              c(this._els.dhx_cal_data[0], "contextmenu", function (e) {
                if (!n(e))
                  return d
                    ? (e && e.preventDefault && e.preventDefault(),
                      (e.cancelBubble = !0),
                      !1)
                    : void 0;
              }),
              c(this._obj, t[1], function (t) {
                var c;
                if (
                  (document &&
                    document.body &&
                    document.body.classList.add("dhx_cal_touch_active"),
                  !n(t))
                )
                  if (
                    ((e._pointerDragId = t.pointerId),
                    (s = _ = !1),
                    (d = !0),
                    (c = r = a(t)))
                  ) {
                    var u = new Date();
                    if (!_ && !s && u - l < 250)
                      return (
                        e._click.dhx_cal_data(c),
                        window.setTimeout(function () {
                          (c.type = "dblclick"), e._on_dbl_click(c);
                        }, 50),
                        t.preventDefault && t.preventDefault(),
                        (t.cancelBubble = !0),
                        (e._block_next_stop = !0),
                        !1
                      );
                    if (((l = u), !_ && !s && e.config.touch_drag)) {
                      var h = e._locate_event(document.activeElement),
                        f = e._locate_event(c.target),
                        p = i ? e._locate_event(i.target) : null;
                      if (h && f && h == f && h != p)
                        return (
                          t.preventDefault && t.preventDefault(),
                          (t.cancelBubble = !0),
                          (e._ignore_next_click = !1),
                          e._click.dhx_cal_data(c),
                          (i = c),
                          !1
                        );
                      (o = setTimeout(function () {
                        s = !0;
                        var t = i.target,
                          a = e._getClassName(t);
                        t &&
                          -1 != a.indexOf("dhx_body") &&
                          (t = t.previousSibling),
                          e._on_mouse_down(i, t),
                          e._drag_mode &&
                            "create" != e._drag_mode &&
                            e.for_rendered(e._drag_id, function (t, a) {
                              (t.style.display = "none"),
                                e._rendered.splice(a, 1);
                            }),
                          e.config.touch_tip && e._show_global_tip(),
                          e.updateEvent(e._drag_id);
                      }, e.config.touch_drag)),
                        (i = c);
                    }
                  } else _ = !0;
              }),
              c(this._els.dhx_cal_data[0], t[2], function (t) {
                if (
                  (document &&
                    document.body &&
                    document.body.classList.remove("dhx_cal_touch_active"),
                  !n(t))
                )
                  return (
                    e.config.touch_swipe_dates &&
                      !s &&
                      (function (t, a, n, i) {
                        if (!t || !a) return !1;
                        for (var r = t.target; r && r != e._obj; )
                          r = r.parentNode;
                        if (r != e._obj) return !1;
                        if (
                          e.matrix &&
                          e.matrix[e.getState().mode] &&
                          e.matrix[e.getState().mode].scrollable
                        )
                          return !1;
                        var o = Math.abs(t.pageY - a.pageY),
                          s = Math.abs(t.pageX - a.pageX);
                        return (
                          o < i &&
                          s > n &&
                          (!o || s / o > 3) &&
                          (t.pageX > a.pageX
                            ? e._click.dhx_cal_next_button()
                            : e._click.dhx_cal_prev_button(),
                          !0)
                        );
                      })(i, r, 200, 100) &&
                      (e._block_next_stop = !0),
                    s &&
                      ((e._ignore_next_click = !0),
                      setTimeout(function () {
                        e._ignore_next_click = !1;
                      }, 100)),
                    u(t),
                    e._block_next_stop
                      ? ((e._block_next_stop = !1),
                        t.preventDefault && t.preventDefault(),
                        (t.cancelBubble = !0),
                        !1)
                      : void 0
                  );
              }),
              e.event(document.body, t[2], u);
          }),
          (e._show_global_tip = function () {
            e._hide_global_tip();
            var t = (e._global_tip = document.createElement("div"));
            (t.className = "dhx_global_tip"),
              e._update_global_tip(1),
              document.body.appendChild(t);
          }),
          (e._update_global_tip = function (t) {
            var a = e._global_tip;
            if (a) {
              var n = "";
              if (e._drag_id && !t) {
                var i = e.getEvent(e._drag_id);
                i &&
                  (n =
                    "<div>" +
                    (i._timed
                      ? e.templates.event_header(i.start_date, i.end_date, i)
                      : e.templates.day_date(i.start_date, i.end_date, i)) +
                    "</div>");
              }
              "create" == e._drag_mode || "new-size" == e._drag_mode
                ? (a.innerHTML =
                    (e.locale.labels.drag_to_create || "Drag to create") + n)
                : (a.innerHTML =
                    (e.locale.labels.drag_to_move || "Drag to move") + n);
            }
          }),
          (e._hide_global_tip = function () {
            var t = e._global_tip;
            t &&
              t.parentNode &&
              (t.parentNode.removeChild(t), (e._global_tip = 0));
          });
      }
      function B(e) {
        var t, a;
        function n() {
          if (e._is_material_skin()) return !0;
          if (void 0 !== a) return a;
          var t = document.createElement("div");
          (t.style.position = "absolute"),
            (t.style.left = "-9999px"),
            (t.style.top = "-9999px"),
            (t.innerHTML =
              "<div class='dhx_cal_container'><div class='dhx_cal_data'><div class='dhx_cal_event'><div class='dhx_body'></div></div><div>"),
            document.body.appendChild(t);
          var n = window
            .getComputedStyle(t.querySelector(".dhx_body"))
            .getPropertyValue("box-sizing");
          document.body.removeChild(t),
            (a = !("border-box" !== n)) ||
              setTimeout(function () {
                a = void 0;
              }, 1e3);
        }
        function i() {
          if (!e._is_material_skin() && !e._border_box_events()) {
            var i = a;
            (a = void 0),
              (t = void 0),
              i !== n() &&
                e.$container &&
                e.getState().mode &&
                e.setCurrentView();
          }
        }
        (e._skin_settings = {
          fix_tab_position: [1, 0],
          use_select_menu_space: [1, 0],
          wide_form: [1, 0],
          hour_size_px: [44, 42],
          displayed_event_color: ["#ff4a4a", "ffc5ab"],
          displayed_event_text_color: ["#ffef80", "7e2727"],
        }),
          (e._skin_xy = {
            lightbox_additional_height: [90, 50],
            nav_height: [59, 22],
            bar_height: [24, 20],
          }),
          (e._is_material_skin = function () {
            return e.skin
              ? (e.skin + "").indexOf("material") > -1
              : (function () {
                  if (void 0 === t) {
                    var e = document.createElement("div");
                    (e.style.position = "absolute"),
                      (e.style.left = "-9999px"),
                      (e.style.top = "-9999px"),
                      (e.innerHTML =
                        "<div class='dhx_cal_container'><div class='dhx_cal_scale_placeholder'></div><div>"),
                      document.body.appendChild(e);
                    var a = window.getComputedStyle(
                        e.querySelector(".dhx_cal_scale_placeholder")
                      ),
                      n = a.getPropertyValue("position");
                    (t = "absolute" === n),
                      setTimeout(function () {
                        t = null;
                      }, 500);
                  }
                  return t;
                })();
          }),
          window.addEventListener("DOMContentLoaded", i),
          window.addEventListener("load", i),
          (e._border_box_events = function () {
            return n();
          }),
          (e._configure = function (e, t, a) {
            for (var n in t) void 0 === e[n] && (e[n] = t[n][a]);
          }),
          (e._skin_init = function () {
            if (!e.skin)
              for (
                var t = document.getElementsByTagName("link"), a = 0;
                a < t.length;
                a++
              ) {
                var n = t[a].href.match("dhtmlxscheduler_([a-z]+).css");
                if (n) {
                  e.skin = n[1];
                  break;
                }
              }
            var i = 0;
            if (
              (!e.skin ||
                ("classic" !== e.skin && "glossy" !== e.skin) ||
                (i = 1),
              e._is_material_skin())
            ) {
              var r = e.config.buttons_left.$inital,
                o = e.config.buttons_right.$inital;
              if (
                r &&
                e.config.buttons_left.slice().join() == r &&
                o &&
                e.config.buttons_right.slice().join() == o
              ) {
                var s = e.config.buttons_left.slice();
                (e.config.buttons_left = e.config.buttons_right.slice()),
                  (e.config.buttons_right = s);
              }
              (e.xy.event_header_height = 18),
                (e.xy.week_agenda_scale_height = 35),
                (e.xy.map_icon_width = 38),
                (e._lightbox_controls.defaults.textarea.height = 64),
                (e._lightbox_controls.defaults.time.height = "auto");
            }
            if (
              (this._configure(e.config, e._skin_settings, i),
              this._configure(e.xy, e._skin_xy, i),
              "flat" === e.skin &&
                ((e.xy.scale_height = 35),
                (e.templates.hour_scale = function (e) {
                  var t = e.getMinutes();
                  return (
                    (t = t < 10 ? "0" + t : t),
                    "<span class='dhx_scale_h'>" +
                      e.getHours() +
                      "</span><span class='dhx_scale_m'>&nbsp;" +
                      t +
                      "</span>"
                  );
                })),
              !i)
            ) {
              var _ = e.config.minicalendar;
              _ && (_.padding = 14),
                (e.templates.event_bar_date = function (t, a, n) {
                  return "• <b>" + e.templates.event_date(t) + "</b> ";
                }),
                e.attachEvent("onTemplatesReady", function () {
                  var t = e.date.date_to_str("%d");
                  e.templates._old_month_day ||
                    (e.templates._old_month_day = e.templates.month_day);
                  var a = e.templates._old_month_day;
                  if (
                    ((e.templates.month_day = function (n) {
                      if ("month" == this._mode) {
                        var i = t(n);
                        return (
                          1 == n.getDate() &&
                            (i =
                              e.locale.date.month_full[n.getMonth()] + " " + i),
                          +n == +e.date.date_part(this._currentDate()) &&
                            (i =
                              e.locale.labels.dhx_cal_today_button + " " + i),
                          i
                        );
                      }
                      return a.call(this, n);
                    }),
                    e.config.fix_tab_position)
                  ) {
                    var n =
                        e._els.dhx_cal_navline[0].getElementsByTagName("div"),
                      i = null,
                      r = 211,
                      o = [14, 75, 136],
                      s = 14;
                    e._is_material_skin() &&
                      ((o = [16, 103, 192]), (r = 294), (s = -1));
                    for (var _ = 0; _ < n.length; _++) {
                      var d = n[_],
                        l =
                          d.getAttribute("data-tab") || d.getAttribute("name");
                      if (l) {
                        switch (((d.style.right = "auto"), l)) {
                          case "day":
                          case "day_tab":
                            (d.style.left = o[0] + "px"),
                              (d.className += " dhx_cal_tab_first");
                            break;
                          case "week":
                          case "week_tab":
                            d.style.left = o[1] + "px";
                            break;
                          case "month":
                          case "month_tab":
                            (d.style.left = o[2] + "px"),
                              (d.className += " dhx_cal_tab_last");
                            break;
                          default:
                            (d.style.left = r + "px"),
                              (d.className += " dhx_cal_tab_standalone"),
                              (r = r + s + d.offsetWidth);
                        }
                        d.className += " " + l;
                      } else
                        0 === (d.className || "").indexOf("dhx_minical_icon") &&
                          d.parentNode == e._els.dhx_cal_navline[0] &&
                          (i = d);
                    }
                    i && (i.style.left = r + "px");
                  }
                }),
                (e._skin_init = function () {});
            }
          });
      }
      function V(e) {
        "@babel/helpers - typeof";
        return (V =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      function U(e) {
        return (
          (this.serverProcessor = e),
          (this.action_param = "!nativeeditor_status"),
          (this.object = null),
          (this.updatedRows = []),
          (this.autoUpdate = !0),
          (this.updateMode = "cell"),
          (this._tMode = "GET"),
          (this._headers = null),
          (this._payload = null),
          (this.post_delim = "_"),
          (this._waitMode = 0),
          (this._in_progress = {}),
          (this._invalid = {}),
          (this.messages = []),
          (this.styles = {
            updated: "font-weight:bold;",
            inserted: "font-weight:bold;",
            deleted: "text-decoration : line-through;",
            invalid: "background-color:FFE0E0;",
            invalid_cell: "border-bottom:2px solid red;",
            error: "color:red;",
            clear: "font-weight:normal;text-decoration:none;",
          }),
          this.enableUTFencoding(!0),
          d(this),
          this
        );
      }
      function q(e) {
        "@babel/helpers - typeof";
        return (q =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      U.prototype = {
        setTransactionMode: function (e, t) {
          "object" == V(e)
            ? ((this._tMode = e.mode || this._tMode),
              void 0 !== e.headers && (this._headers = e.headers),
              void 0 !== e.payload && (this._payload = e.payload),
              (this._tSend = !!t))
            : ((this._tMode = e), (this._tSend = t)),
            "REST" == this._tMode && ((this._tSend = !1), (this._endnm = !0)),
            "JSON" === this._tMode || "REST-JSON" === this._tMode
              ? ((this._tSend = !1),
                (this._endnm = !0),
                (this._serializeAsJson = !0),
                (this._headers = this._headers || {}),
                (this._headers["Content-Type"] = "application/json"))
              : this._headers &&
                !this._headers["Content-Type"] &&
                (this._headers["Content-Type"] =
                  "application/x-www-form-urlencoded"),
            "CUSTOM" === this._tMode &&
              ((this._tSend = !1),
              (this._endnm = !0),
              (this._router = e.router));
        },
        escape: (function (e) {
          function t(t) {
            return e.apply(this, arguments);
          }
          return (
            (t.toString = function () {
              return e.toString();
            }),
            t
          );
        })(function (e) {
          return this._utf ? encodeURIComponent(e) : escape(e);
        }),
        enableUTFencoding: function (e) {
          this._utf = !!e;
        },
        setDataColumns: function (e) {
          this._columns = "string" == typeof e ? e.split(",") : e;
        },
        getSyncState: function () {
          return !this.updatedRows.length;
        },
        enableDataNames: function (e) {
          this._endnm = !!e;
        },
        enablePartialDataSend: function (e) {
          this._changed = !!e;
        },
        setUpdateMode: function (e, t) {
          (this.autoUpdate = "cell" == e),
            (this.updateMode = e),
            (this.dnd = t);
        },
        ignore: function (e, t) {
          (this._silent_mode = !0),
            e.call(t || window),
            (this._silent_mode = !1);
        },
        setUpdated: function (e, t, a) {
          if (!this._silent_mode) {
            var n = this.findRow(e);
            a = a || "updated";
            var i = this.$scheduler.getUserData(e, this.action_param);
            i && "updated" == a && (a = i),
              t
                ? (this.set_invalid(e, !1),
                  (this.updatedRows[n] = e),
                  this.$scheduler.setUserData(e, this.action_param, a),
                  this._in_progress[e] && (this._in_progress[e] = "wait"))
                : this.is_invalid(e) ||
                  (this.updatedRows.splice(n, 1),
                  this.$scheduler.setUserData(e, this.action_param, "")),
              this.markRow(e, t, a),
              t && this.autoUpdate && this.sendData(e);
          }
        },
        markRow: function (e, t, a) {
          var n = "",
            i = this.is_invalid(e);
          if (
            (i && ((n = this.styles[i]), (t = !0)),
            this.callEvent("onRowMark", [e, t, a, i]) &&
              ((n = this.styles[t ? a : "clear"] + n),
              this.$scheduler[this._methods[0]](e, n),
              i && i.details))
          ) {
            n += this.styles[i + "_cell"];
            for (var r = 0; r < i.details.length; r++)
              i.details[r] && this.$scheduler[this._methods[1]](e, r, n);
          }
        },
        getActionByState: function (e) {
          return "inserted" === e
            ? "create"
            : "updated" === e
            ? "update"
            : "deleted" === e
            ? "delete"
            : "update";
        },
        getState: function (e) {
          return this.$scheduler.getUserData(e, this.action_param);
        },
        is_invalid: function (e) {
          return this._invalid[e];
        },
        set_invalid: function (e, t, a) {
          a &&
            (t = {
              value: t,
              details: a,
              toString: function () {
                return this.value.toString();
              },
            }),
            (this._invalid[e] = t);
        },
        checkBeforeUpdate: function (e) {
          return !0;
        },
        sendData: function (e) {
          return (
            this.$scheduler.editStop && this.$scheduler.editStop(),
            void 0 === e || this._tSend
              ? this.sendAllData()
              : !this._in_progress[e] &&
                ((this.messages = []),
                !(
                  !this.checkBeforeUpdate(e) &&
                  this.callEvent("onValidationError", [e, this.messages])
                ) && void this._beforeSendData(this._getRowData(e), e))
          );
        },
        _beforeSendData: function (e, t) {
          if (!this.callEvent("onBeforeUpdate", [t, this.getState(t), e]))
            return !1;
          this._sendData(e, t);
        },
        serialize: function (e, t) {
          if (this._serializeAsJson) return this._serializeAsJSON(e);
          if ("string" == typeof e) return e;
          if (void 0 !== t) return this.serialize_one(e, "");
          var a = [],
            n = [];
          for (var i in e)
            e.hasOwnProperty(i) &&
              (a.push(this.serialize_one(e[i], i + this.post_delim)),
              n.push(i));
          return (
            a.push("ids=" + this.escape(n.join(","))),
            this.$scheduler.security_key &&
              a.push("dhx_security=" + this.$scheduler.security_key),
            a.join("&")
          );
        },
        serialize_one: function (e, t) {
          if ("string" == typeof e) return e;
          var a = [],
            n = "";
          for (var i in e)
            if (e.hasOwnProperty(i)) {
              if (
                ("id" == i || i == this.action_param) &&
                "REST" == this._tMode
              )
                continue;
              (n =
                "string" == typeof e[i] || "number" == typeof e[i]
                  ? e[i]
                  : JSON.stringify(e[i])),
                a.push(this.escape((t || "") + i) + "=" + this.escape(n));
            }
          return a.join("&");
        },
        _applyPayload: function (e) {
          var t = this.$scheduler.ajax;
          if (this._payload)
            for (var a in this._payload)
              e =
                e +
                t.urlSeparator(e) +
                this.escape(a) +
                "=" +
                this.escape(this._payload[a]);
          return e;
        },
        _sendData: function (e, t) {
          if (e) {
            if (
              !this.callEvent(
                "onBeforeDataSending",
                t ? [t, this.getState(t), e] : [null, null, e]
              )
            )
              return !1;
            t && (this._in_progress[t] = new Date().valueOf());
            var a = this,
              n = this.$scheduler.ajax;
            if ("CUSTOM" !== this._tMode) {
              var i,
                r = {
                  callback: function (n) {
                    var i = [];
                    if (t) i.push(t);
                    else if (e) for (var r in e) i.push(r);
                    return a.afterUpdate(a, n, i);
                  },
                  headers: a._headers,
                },
                o =
                  this.serverProcessor +
                  (this._user
                    ? n.urlSeparator(this.serverProcessor) +
                      [
                        "dhx_user=" + this._user,
                        "dhx_version=" +
                          this.$scheduler.getUserData(0, "version"),
                      ].join("&")
                    : ""),
                s = this._applyPayload(o);
              switch (this._tMode) {
                case "GET":
                  (i = this._cleanupArgumentsBeforeSend(e)),
                    (r.url = s + n.urlSeparator(s) + this.serialize(i, t)),
                    (r.method = "GET");
                  break;
                case "POST":
                  (i = this._cleanupArgumentsBeforeSend(e)),
                    (r.url = s),
                    (r.method = "POST"),
                    (r.data = this.serialize(i, t));
                  break;
                case "JSON":
                  i = {};
                  var _ = this._cleanupItemBeforeSend(e);
                  for (var d in _)
                    d !== this.action_param &&
                      "id" !== d &&
                      "gr_id" !== d &&
                      (i[d] = _[d]);
                  (r.url = s),
                    (r.method = "POST"),
                    (r.data = JSON.stringify({
                      id: t,
                      action: e[this.action_param],
                      data: i,
                    }));
                  break;
                case "REST":
                case "REST-JSON":
                  switch (
                    ((s = o.replace(/(&|\?)editing=true/, "")),
                    (i = ""),
                    this.getState(t))
                  ) {
                    case "inserted":
                      (r.method = "POST"), (r.data = this.serialize(e, t));
                      break;
                    case "deleted":
                      (r.method = "DELETE"),
                        (s = s + ("/" === s.slice(-1) ? "" : "/") + t);
                      break;
                    default:
                      (r.method = "PUT"),
                        (r.data = this.serialize(e, t)),
                        (s = s + ("/" === s.slice(-1) ? "" : "/") + t);
                  }
                  r.url = this._applyPayload(s);
              }
              return this._waitMode++, n.query(r);
            }
            var l,
              c = this.getState(t),
              u = this.getActionByState(c),
              h = function (e) {
                if (e && e.responseText && e.setRequestHeader) {
                  200 !== e.status && (u = "error");
                  try {
                    e = JSON.parse(e.responseText);
                  } catch (e) {}
                }
                u = u || "updated";
                var n = t,
                  i = t;
                e &&
                  ((u = e.action || c),
                  (n = e.sid || n),
                  (i = e.id || e.tid || i)),
                  a.afterUpdateCallback(n, i, u, e);
              };
            if (this._router instanceof Function)
              l = this._router("event", u, e, t);
            else
              switch (c) {
                case "inserted":
                  l = this._router.create(e);
                  break;
                case "deleted":
                  l = this._router.delete(t);
                  break;
                default:
                  l = this._router.update(e, t);
              }
            if (l) {
              if (
                !l.then &&
                void 0 === l.id &&
                void 0 === l.tid &&
                void 0 === l.action
              )
                throw new Error(
                  "Incorrect router return value. A Promise or a response object is expected"
                );
              l.then
                ? l.then(h).catch(function (e) {
                    e && e.action ? h(e) : h({ action: "error", value: e });
                  })
                : h(l);
            } else h(null);
          }
        },
        sendAllData: function () {
          if (this.updatedRows.length && "off" !== this.updateMode) {
            this.messages = [];
            var e = !0;
            if (
              (this._forEachUpdatedRow(function (t) {
                e = e && this.checkBeforeUpdate(t);
              }),
              !e && !this.callEvent("onValidationError", ["", this.messages]))
            )
              return !1;
            this._tSend
              ? this._sendData(this._getAllData())
              : this._forEachUpdatedRow(function (e) {
                  if (!this._in_progress[e]) {
                    if (this.is_invalid(e)) return;
                    this._beforeSendData(this._getRowData(e), e);
                  }
                });
          }
        },
        _getAllData: function (e) {
          var t = {},
            a = !1;
          return (
            this._forEachUpdatedRow(function (e) {
              if (!this._in_progress[e] && !this.is_invalid(e)) {
                var n = this._getRowData(e);
                this.callEvent("onBeforeUpdate", [e, this.getState(e), n]) &&
                  ((t[e] = n),
                  (a = !0),
                  (this._in_progress[e] = new Date().valueOf()));
              }
            }),
            a ? t : null
          );
        },
        findRow: function (e) {
          var t = 0;
          for (
            t = 0;
            t < this.updatedRows.length && e != this.updatedRows[t];
            t++
          );
          return t;
        },
        defineAction: function (e, t) {
          this._uActions || (this._uActions = {}), (this._uActions[e] = t);
        },
        afterUpdateCallback: function (e, t, a, n) {
          if (this.$scheduler) {
            var i = e,
              r = "error" !== a && "invalid" !== a;
            if (
              (r || this.set_invalid(e, a),
              this._uActions && this._uActions[a] && !this._uActions[a](n))
            )
              return delete this._in_progress[i];
            "wait" !== this._in_progress[i] && this.setUpdated(e, !1);
            var o = e;
            switch (a) {
              case "inserted":
              case "insert":
                t != e &&
                  (this.setUpdated(e, !1),
                  this.$scheduler[this._methods[2]](e, t),
                  (e = t));
                break;
              case "delete":
              case "deleted":
                return (
                  this.$scheduler.setUserData(
                    e,
                    this.action_param,
                    "true_deleted"
                  ),
                  this.$scheduler[this._methods[3]](e, t),
                  delete this._in_progress[i],
                  this.callEvent("onAfterUpdate", [e, a, t, n])
                );
            }
            "wait" !== this._in_progress[i]
              ? (r && this.$scheduler.setUserData(e, this.action_param, ""),
                delete this._in_progress[i])
              : (delete this._in_progress[i],
                this.setUpdated(
                  t,
                  !0,
                  this.$scheduler.getUserData(e, this.action_param)
                )),
              this.callEvent("onAfterUpdate", [o, a, t, n]);
          }
        },
        _errorResponse: function (e, t) {
          return (
            this.$scheduler &&
              this.$scheduler.callEvent &&
              this.$scheduler.callEvent("onSaveError", [t, e.xmlDoc]),
            this.cleanUpdate(t)
          );
        },
        _setDefaultTransactionMode: function () {
          this.serverProcessor &&
            (this.setTransactionMode("POST", !0),
            (this.serverProcessor +=
              (-1 !== this.serverProcessor.indexOf("?") ? "&" : "?") +
              "editing=true"),
            (this._serverProcessor = this.serverProcessor));
        },
        afterUpdate: function (e, t, a) {
          var n = this.$scheduler.ajax;
          if (200 === t.xmlDoc.status) {
            var i;
            try {
              i = JSON.parse(t.xmlDoc.responseText);
            } catch (e) {
              t.xmlDoc.responseText.length || (i = {});
            }
            if (i) {
              var r = i.action || this.getState(a) || "updated",
                o = i.sid || a[0],
                s = i.tid || a[0];
              return e.afterUpdateCallback(o, s, r, i), void e.finalizeUpdate();
            }
            var _ = n.xmltop("data", t.xmlDoc);
            if (!_) return this._errorResponse(t, a);
            var d = n.xpath("//data/action", _);
            if (!d.length) return this._errorResponse(t, a);
            for (var l = 0; l < d.length; l++) {
              var c = d[l];
              (r = c.getAttribute("type")),
                (o = c.getAttribute("sid")),
                (s = c.getAttribute("tid"));
              e.afterUpdateCallback(o, s, r, c);
            }
            e.finalizeUpdate();
          } else this._errorResponse(t, a);
        },
        cleanUpdate: function (e) {
          if (e)
            for (var t = 0; t < e.length; t++) delete this._in_progress[e[t]];
        },
        finalizeUpdate: function () {
          this._waitMode && this._waitMode--,
            this.callEvent("onAfterUpdateFinish", []),
            this.updatedRows.length || this.callEvent("onFullSync", []);
        },
        init: function (e) {
          if (!this._initialized) {
            (this.$scheduler = e),
              this.$scheduler._dp_init && this.$scheduler._dp_init(this),
              this._setDefaultTransactionMode(),
              (this._methods = this._methods || [
                "_set_event_text_style",
                "",
                "_dp_change_event_id",
                "_dp_hook_delete",
              ]),
              (function (e, t) {
                (e._validId = function (e) {
                  return !0;
                }),
                  (e.setUserData = function (e, t, a) {
                    if (e) {
                      var n = this.getEvent(e);
                      n && (n[t] = a);
                    } else this._userdata[t] = a;
                  }),
                  (e.getUserData = function (e, t) {
                    if (e) {
                      var a = this.getEvent(e);
                      return a ? a[t] : null;
                    }
                    return this._userdata[t];
                  }),
                  (e._set_event_text_style = function (t, a) {
                    if (e.getEvent(t)) {
                      this.for_rendered(t, function (e) {
                        e.style.cssText += ";" + a;
                      });
                      var n = this.getEvent(t);
                      (n._text_style = a), this.event_updated(n);
                    }
                  }),
                  (e._update_callback = function (t, a) {
                    var n = e._xmlNodeToJSON(t.firstChild);
                    "none" == n.rec_type && (n.rec_pattern = "none"),
                      (n.text = n.text || n._tagvalue),
                      (n.start_date = e._helpers.parseDate(n.start_date)),
                      (n.end_date = e._helpers.parseDate(n.end_date)),
                      e.addEvent(n),
                      e._add_rec_marker && e.setCurrentView();
                  }),
                  (e._dp_change_event_id = function (t, a) {
                    e.getEvent(t) && e.changeEventId(t, a);
                  }),
                  (e._dp_hook_delete = function (a, n) {
                    if (e.getEvent(a))
                      return (
                        n &&
                          a != n &&
                          ("true_deleted" ==
                            this.getUserData(a, t.action_param) &&
                            this.setUserData(a, t.action_param, "updated"),
                          this.changeEventId(a, n)),
                        this.deleteEvent(n, !0)
                      );
                  }),
                  (e.setDp = function () {
                    this._dp = t;
                  }),
                  e.setDp();
              })(this.$scheduler, this);
            var t = new (function (e, t) {
              (this.$scheduler = e),
                (this.$dp = t),
                (this._dataProcessorHandlers = []),
                (this.attach = function () {
                  var e = this.$dp,
                    t = this.$scheduler;
                  this._dataProcessorHandlers.push(
                    t.attachEvent("onEventAdded", function (t) {
                      !this._loading &&
                        this._validId(t) &&
                        e.setUpdated(t, !0, "inserted");
                    })
                  ),
                    this._dataProcessorHandlers.push(
                      t.attachEvent(
                        "onConfirmedBeforeEventDelete",
                        function (t) {
                          if (this._validId(t)) {
                            var a = e.getState(t);
                            return "inserted" == a || this._new_event
                              ? (e.setUpdated(t, !1), !0)
                              : "deleted" != a &&
                                  ("true_deleted" == a ||
                                    (e.setUpdated(t, !0, "deleted"), !1));
                          }
                        }
                      )
                    ),
                    this._dataProcessorHandlers.push(
                      t.attachEvent("onEventChanged", function (t) {
                        !this._loading &&
                          this._validId(t) &&
                          e.setUpdated(t, !0, "updated");
                      })
                    ),
                    this._dataProcessorHandlers.push(
                      t.attachEvent("onClearAll", function () {
                        (e._in_progress = {}),
                          (e._invalid = {}),
                          (e.updatedRows = []),
                          (e._waitMode = 0);
                      })
                    ),
                    e.attachEvent("insertCallback", t._update_callback),
                    e.attachEvent("updateCallback", t._update_callback),
                    e.attachEvent("deleteCallback", function (e, a) {
                      t.getEvent(a)
                        ? (t.setUserData(a, this.action_param, "true_deleted"),
                          t.deleteEvent(a))
                        : t._add_rec_marker && t._update_callback(e, a);
                    });
                }),
                (this.detach = function () {
                  for (var e in this._dataProcessorHandlers) {
                    var t = this._dataProcessorHandlers[e];
                    this.$scheduler.detachEvent(t);
                  }
                  this._dataProcessorHandlers = [];
                });
            })(this.$scheduler, this);
            t.attach(),
              this.attachEvent("onDestroy", function () {
                delete this._getRowData,
                  delete this.$scheduler._dp,
                  delete this.$scheduler._dataprocessor,
                  delete this.$scheduler._set_event_text_style,
                  delete this.$scheduler._dp_change_event_id,
                  delete this.$scheduler._dp_hook_delete,
                  delete this.$scheduler,
                  t.detach();
              }),
              this.$scheduler.callEvent("onDataProcessorReady", [this]),
              (this._initialized = !0),
              (e._dataprocessor = this);
          }
        },
        setOnAfterUpdate: function (e) {
          this.attachEvent("onAfterUpdate", e);
        },
        setOnBeforeUpdateHandler: function (e) {
          this.attachEvent("onBeforeDataSending", e);
        },
        setAutoUpdate: function (e, t) {
          (e = e || 2e3),
            (this._user = t || new Date().valueOf()),
            (this._need_update = !1),
            (this._update_busy = !1),
            this.attachEvent("onAfterUpdate", function (e, t, a, n) {
              this.afterAutoUpdate(e, t, a, n);
            }),
            this.attachEvent("onFullSync", function () {
              this.fullSync();
            });
          var a = this;
          n.a.setInterval(function () {
            a.loadUpdate();
          }, e);
        },
        afterAutoUpdate: function (e, t, a, n) {
          return "collision" != t || ((this._need_update = !0), !1);
        },
        fullSync: function () {
          return (
            this._need_update && ((this._need_update = !1), this.loadUpdate()),
            !0
          );
        },
        getUpdates: function (e, t) {
          var a = this.$scheduler.ajax;
          if (this._update_busy) return !1;
          (this._update_busy = !0), a.get(e, t);
        },
        _getXmlNodeValue: function (e) {
          return e.firstChild ? e.firstChild.nodeValue : "";
        },
        loadUpdate: function () {
          var e = this,
            t = this.$scheduler.ajax,
            a = this.$scheduler.getUserData(0, "version"),
            n =
              this.serverProcessor +
              t.urlSeparator(this.serverProcessor) +
              ["dhx_user=" + this._user, "dhx_version=" + a].join("&");
          (n = n.replace("editing=true&", "")),
            this.getUpdates(n, function (a) {
              var n = t.xpath("//userdata", a);
              e.$scheduler.setUserData(0, "version", e._getXmlNodeValue(n[0]));
              var i = t.xpath("//update", a);
              if (i.length) {
                e._silent_mode = !0;
                for (var r = 0; r < i.length; r++) {
                  var o = i[r].getAttribute("status"),
                    s = i[r].getAttribute("id"),
                    _ = i[r].getAttribute("parent");
                  switch (o) {
                    case "inserted":
                      this.callEvent("insertCallback", [i[r], s, _]);
                      break;
                    case "updated":
                      this.callEvent("updateCallback", [i[r], s, _]);
                      break;
                    case "deleted":
                      this.callEvent("deleteCallback", [i[r], s, _]);
                  }
                }
                e._silent_mode = !1;
              }
              (e._update_busy = !1), (e = null);
            });
        },
        destructor: function () {
          this.callEvent("onDestroy", []),
            this.detachAllEvents(),
            (this.updatedRows = []),
            (this._in_progress = {}),
            (this._invalid = {}),
            (this._headers = null),
            (this._payload = null),
            delete this._initialized;
        },
        url: function (e) {
          this.serverProcessor = this._serverProcessor = e;
        },
        _serializeAsJSON: function (e) {
          if ("string" == typeof e) return e;
          var t = this.$scheduler.utils.copy(e);
          return (
            "REST-JSON" === this._tMode &&
              (delete t.id, delete t[this.action_param]),
            JSON.stringify(t)
          );
        },
        _cleanupArgumentsBeforeSend: function (e) {
          var t;
          if (void 0 === e[this.action_param])
            for (var a in ((t = {}), e))
              t[a] = this._cleanupArgumentsBeforeSend(e[a]);
          else t = this._cleanupItemBeforeSend(e);
          return t;
        },
        _cleanupItemBeforeSend: function (e) {
          var t = null;
          return (
            e &&
              ("deleted" === e[this.action_param]
                ? (((t = {}).id = e.id),
                  (t[this.action_param] = e[this.action_param]))
                : (t = e)),
            t
          );
        },
        _forEachUpdatedRow: function (e) {
          for (var t = this.updatedRows.slice(), a = 0; a < t.length; a++) {
            var n = t[a];
            this.$scheduler.getUserData(n, this.action_param) &&
              e.call(this, n);
          }
        },
        _prepareDataItem: function (e) {
          var t = {},
            a = this.$scheduler,
            n = a.utils.copy(e);
          for (var i in n)
            0 !== i.indexOf("_") &&
              n[i] &&
              (n[i].getUTCFullYear
                ? (t[i] = a._helpers.formatDate(n[i]))
                : "object" == V(n[i])
                ? (t[i] = this._prepareDataItem(n[i]))
                : null === n[i]
                ? (t[i] = "")
                : (t[i] = n[i]));
          return (
            (t[this.action_param] = a.getUserData(e.id, this.action_param)), t
          );
        },
        _getRowData: function (e) {
          var t = this.$scheduler.getEvent(e);
          return t || (t = { id: e }), this._prepareDataItem(t);
        },
      };
      var J = function (e) {
          var t = "data-dhxbox",
            a = null;
          function n(e, t) {
            var n = e.callback;
            p.hide(e.box), (a = e.box = null), n && n(t);
          }
          function i(e) {
            if (a) {
              var t = e.which || e.keyCode,
                i = !1;
              if (g.keyboard) {
                if (13 == t || 32 == t) {
                  var r = e.target || e.srcElement;
                  D.getClassName(r).indexOf("scheduler_popup_button") > -1 &&
                  r.click
                    ? r.click()
                    : (n(a, !0), (i = !0));
                }
                27 == t && (n(a, !1), (i = !0));
              }
              return i
                ? (e.preventDefault && e.preventDefault(),
                  !(e.cancelBubble = !0))
                : void 0;
            }
          }
          function r(e) {
            r.cover ||
              ((r.cover = document.createElement("div")),
              (r.cover.onkeydown = i),
              (r.cover.className = "dhx_modal_cover"),
              document.body.appendChild(r.cover)),
              (r.cover.style.display = e ? "inline-block" : "none");
          }
          function o(t, a, n) {
            var i = e._waiAria.messageButtonAttrString(t),
              r = (a || "").toLowerCase().replace(/ /g, "_"),
              o = "scheduler_"
                .concat(r, "_button dhtmlx_")
                .concat(r, "_button");
            return "<div "
              .concat(i, " class='scheduler_popup_button dhtmlx_popup_button ")
              .concat(o, "' data-result='")
              .concat(n, "' result='")
              .concat(n, "' ><div>")
              .concat(t, "</div></div>");
          }
          function s(t) {
            g.area ||
              ((g.area = document.createElement("div")),
              (g.area.className = "scheduler_message_area dhtmlx_message_area"),
              (g.area.style[g.position] = "5px"),
              document.body.appendChild(g.area)),
              g.hide(t.id);
            var a = document.createElement("div");
            return (
              (a.innerHTML = "<div>" + t.text + "</div>"),
              (a.className =
                "scheduler-info dhtmlx-info scheduler-" +
                t.type +
                " dhtmlx-" +
                t.type),
              (a.onclick = function () {
                g.hide(t.id), (t = null);
              }),
              e._waiAria.messageInfoAttr(a),
              "bottom" == g.position && g.area.firstChild
                ? g.area.insertBefore(a, g.area.firstChild)
                : g.area.appendChild(a),
              t.expire > 0 &&
                (g.timers[t.id] = window.setTimeout(function () {
                  g && g.hide(t.id);
                }, t.expire)),
              (g.pull[t.id] = a),
              (a = null),
              t.id
            );
          }
          function _() {
            for (
              var e = [].slice.apply(arguments, [0]), t = 0;
              t < e.length;
              t++
            )
              if (e[t]) return e[t];
          }
          function d(s, d, l) {
            var c = s.tagName
              ? s
              : (function (i, r, s) {
                  var d = document.createElement("div"),
                    l = v.uid();
                  e._waiAria.messageModalAttr(d, l),
                    (d.className =
                      " scheduler_modal_box dhtmlx_modal_box scheduler-" +
                      i.type +
                      " dhtmlx-" +
                      i.type),
                    d.setAttribute(t, 1);
                  var c = "";
                  if (
                    (i.width && (d.style.width = i.width),
                    i.height && (d.style.height = i.height),
                    i.title &&
                      (c +=
                        '<div class="scheduler_popup_title dhtmlx_popup_title">' +
                        i.title +
                        "</div>"),
                    (c +=
                      '<div class="scheduler_popup_text dhtmlx_popup_text" id="' +
                      l +
                      '"><span>' +
                      (i.content ? "" : i.text) +
                      '</span></div><div  class="scheduler_popup_controls dhtmlx_popup_controls">'),
                    r &&
                      (c += o(
                        _(i.ok, e.locale.labels.message_ok, "OK"),
                        "ok",
                        !0
                      )),
                    s &&
                      (c += o(
                        _(i.cancel, e.locale.labels.message_cancel, "Cancel"),
                        "cancel",
                        !1
                      )),
                    i.buttons)
                  )
                    for (var u = 0; u < i.buttons.length; u++) {
                      var h = i.buttons[u];
                      "object" == q(h)
                        ? (c += o(
                            h.label,
                            h.css ||
                              "scheduler_" +
                                h.label.toLowerCase() +
                                "_button dhtmlx_" +
                                h.label.toLowerCase() +
                                "_button",
                            h.value || u
                          ))
                        : (c += o(h, h, u));
                    }
                  if (((c += "</div>"), (d.innerHTML = c), i.content)) {
                    var f = i.content;
                    "string" == typeof f && (f = document.getElementById(f)),
                      "none" == f.style.display && (f.style.display = ""),
                      d.childNodes[i.title ? 1 : 0].appendChild(f);
                  }
                  return (
                    (d.onclick = function (e) {
                      var t = e.target || e.srcElement;
                      if (
                        (t.className || (t = t.parentNode),
                        D.closest(t, ".scheduler_popup_button"))
                      ) {
                        var a = t.getAttribute("data-result");
                        n(i, (a = "true" == a || ("false" != a && a)));
                      }
                    }),
                    (i.box = d),
                    (r || s) && (a = i),
                    d
                  );
                })(s, d, l);
            s.hidden || r(!0), document.body.appendChild(c);
            var u = Math.abs(
                Math.floor(
                  ((window.innerWidth || document.documentElement.offsetWidth) -
                    c.offsetWidth) /
                    2
                )
              ),
              h = Math.abs(
                Math.floor(
                  ((window.innerHeight ||
                    document.documentElement.offsetHeight) -
                    c.offsetHeight) /
                    2
                )
              );
            return (
              "top" == s.position
                ? (c.style.top = "-3px")
                : (c.style.top = h + "px"),
              (c.style.left = u + "px"),
              (c.onkeydown = i),
              p.focus(c),
              s.hidden && p.hide(c),
              e.callEvent("onMessagePopup", [c]),
              c
            );
          }
          function l(e) {
            return d(e, !0, !1);
          }
          function c(e) {
            return d(e, !0, !0);
          }
          function u(e) {
            return d(e);
          }
          function h(e, t, a) {
            return (
              "object" != q(e) &&
                ("function" == typeof t && ((a = t), (t = "")),
                (e = { text: e, type: t, callback: a })),
              e
            );
          }
          function f(e, t, a, n) {
            return (
              "object" != q(e) && (e = { text: e, type: t, expire: a, id: n }),
              (e.id = e.id || v.uid()),
              (e.expire = e.expire || g.expire),
              e
            );
          }
          e.event(document, "keydown", i, !0);
          var p = function () {
            var e = h.apply(this, arguments);
            return (e.type = e.type || "alert"), u(e);
          };
          (p.hide = function (a) {
            for (; a && a.getAttribute && !a.getAttribute(t); )
              a = a.parentNode;
            a &&
              (a.parentNode.removeChild(a),
              r(!1),
              e.callEvent("onAfterMessagePopup", [a]));
          }),
            (p.focus = function (e) {
              setTimeout(function () {
                var t = D.getFocusableNodes(e);
                t.length && t[0].focus && t[0].focus();
              }, 1);
            });
          var g = function (e, t, a, n) {
            switch (
              (((e = f.apply(this, arguments)).type = e.type || "info"),
              e.type.split("-")[0])
            ) {
              case "alert":
                return l(e);
              case "confirm":
                return c(e);
              case "modalbox":
                return u(e);
              default:
                return s(e);
            }
          };
          (g.seed = new Date().valueOf()),
            (g.uid = v.uid),
            (g.expire = 4e3),
            (g.keyboard = !0),
            (g.position = "top"),
            (g.pull = {}),
            (g.timers = {}),
            (g.hideAll = function () {
              for (var e in g.pull) g.hide(e);
            }),
            (g.hide = function (e) {
              var t = g.pull[e];
              t &&
                t.parentNode &&
                (window.setTimeout(function () {
                  t.parentNode.removeChild(t), (t = null);
                }, 2e3),
                (t.className += " hidden"),
                g.timers[e] && window.clearTimeout(g.timers[e]),
                delete g.pull[e]);
            });
          var m = [];
          return (
            e.attachEvent("onMessagePopup", function (e) {
              m.push(e);
            }),
            e.attachEvent("onAfterMessagePopup", function (e) {
              for (var t = 0; t < m.length; t++)
                m[t] === e && (m.splice(t, 1), t--);
            }),
            e.attachEvent("onDestroy", function () {
              r.cover &&
                r.cover.parentNode &&
                r.cover.parentNode.removeChild(r.cover);
              for (var e = 0; e < m.length; e++)
                m[e].parentNode && m[e].parentNode.removeChild(m[e]);
              (m = null),
                g.area &&
                  g.area.parentNode &&
                  g.area.parentNode.removeChild(g.area),
                (g = null);
            }),
            {
              alert: function () {
                var e = h.apply(this, arguments);
                return (e.type = e.type || "confirm"), l(e);
              },
              confirm: function () {
                var e = h.apply(this, arguments);
                return (e.type = e.type || "alert"), c(e);
              },
              message: g,
              modalbox: p,
            }
          );
        },
        Y = {
          date: {
            month_full: [
              "كانون الثاني",
              "شباط",
              "آذار",
              "نيسان",
              "أيار",
              "حزيران",
              "تموز",
              "آب",
              "أيلول",
              "تشرين الأول",
              "تشرين الثاني",
              "كانون الأول",
            ],
            month_short: [
              "يناير",
              "فبراير",
              "مارس",
              "أبريل",
              "مايو",
              "يونيو",
              "يوليو",
              "أغسطس",
              "سبتمبر",
              "أكتوبر",
              "نوفمبر",
              "ديسمبر",
            ],
            day_full: [
              "الأحد",
              "الأثنين",
              "ألثلاثاء",
              "الأربعاء",
              "ألحميس",
              "ألجمعة",
              "السبت",
            ],
            day_short: [
              "احد",
              "اثنين",
              "ثلاثاء",
              "اربعاء",
              "خميس",
              "جمعة",
              "سبت",
            ],
          },
          labels: {
            dhx_cal_today_button: "اليوم",
            day_tab: "يوم",
            week_tab: "أسبوع",
            month_tab: "شهر",
            new_event: "حدث جديد",
            icon_save: "اخزن",
            icon_cancel: "الغاء",
            icon_details: "تفاصيل",
            icon_edit: "تحرير",
            icon_delete: "حذف",
            confirm_closing: "التغييرات سوف تضيع, هل انت متأكد؟",
            confirm_deleting: "الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟",
            section_description: "الوصف",
            section_time: "الفترة الزمنية",
            full_day: "طوال اليوم",
            confirm_recurring:
              "هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟",
            section_recurring: "تكرار الحدث",
            button_recurring: "تعطيل",
            button_recurring_open: "تمكين",
            button_edit_series: "تحرير سلسلة",
            button_edit_occurrence: "تعديل نسخة",
            grid_tab: "جدول",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
          },
        },
        W = {
          date: {
            month_full: [
              "Студзень",
              "Люты",
              "Сакавік",
              "Красавік",
              "Maй",
              "Чэрвень",
              "Ліпень",
              "Жнівень",
              "Верасень",
              "Кастрычнік",
              "Лістапад",
              "Снежань",
            ],
            month_short: [
              "Студз",
              "Лют",
              "Сак",
              "Крас",
              "Maй",
              "Чэр",
              "Ліп",
              "Жнів",
              "Вер",
              "Каст",
              "Ліст",
              "Снеж",
            ],
            day_full: [
              "Нядзеля",
              "Панядзелак",
              "Аўторак",
              "Серада",
              "Чацвер",
              "Пятніца",
              "Субота",
            ],
            day_short: ["Нд", "Пн", "Аўт", "Ср", "Чцв", "Пт", "Сб"],
          },
          labels: {
            dhx_cal_today_button: "Сёння",
            day_tab: "Дзень",
            week_tab: "Тыдзень",
            month_tab: "Месяц",
            new_event: "Новая падзея",
            icon_save: "Захаваць",
            icon_cancel: "Адмяніць",
            icon_details: "Дэталі",
            icon_edit: "Змяніць",
            icon_delete: "Выдаліць",
            confirm_closing: "",
            confirm_deleting: "Падзея будзе выдалена незваротна, працягнуць?",
            section_description: "Апісанне",
            section_time: "Перыяд часу",
            full_day: "Увесь дзень",
            confirm_recurring:
              "Вы хочаце змяніць усю серыю паўтаральных падзей?",
            section_recurring: "Паўтарэнне",
            button_recurring: "Адключана",
            button_recurring_open: "Уключана",
            button_edit_series: "Рэдагаваць серыю",
            button_edit_occurrence: "Рэдагаваць асобнік",
            agenda_tab: "Спіс",
            date: "Дата",
            description: "Апісанне",
            year_tab: "Год",
            week_agenda_tab: "Спіс",
            grid_tab: "Спic",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Дзень",
            repeat_radio_week: "Тыдзень",
            repeat_radio_month: "Месяц",
            repeat_radio_year: "Год",
            repeat_radio_day_type: "Кожны",
            repeat_text_day_count: "дзень",
            repeat_radio_day_type2: "Кожны працоўны дзень",
            repeat_week: " Паўтараць кожны",
            repeat_text_week_count: "тыдзень",
            repeat_radio_month_type: "Паўтараць",
            repeat_radio_month_start: "",
            repeat_text_month_day: " чысла кожнага",
            repeat_text_month_count: "месяцу",
            repeat_text_month_count2_before: "кожны ",
            repeat_text_month_count2_after: "месяц",
            repeat_year_label: "",
            select_year_day2: "",
            repeat_text_year_day: "день",
            select_year_month: "",
            repeat_radio_end: "Без даты заканчэння",
            repeat_text_occurences_count: "паўтораў",
            repeat_radio_end2: "",
            repeat_radio_end3: "Да ",
            month_for_recurring: [
              "Студзеня",
              "Лютага",
              "Сакавіка",
              "Красавіка",
              "Мая",
              "Чэрвеня",
              "Ліпeня",
              "Жніўня",
              "Верасня",
              "Кастрычніка",
              "Лістапада",
              "Снежня",
            ],
            day_for_recurring: [
              "Нядзелю",
              "Панядзелак",
              "Аўторак",
              "Сераду",
              "Чацвер",
              "Пятніцу",
              "Суботу",
            ],
          },
        },
        K = {
          date: {
            month_full: [
              "Gener",
              "Febrer",
              "Març",
              "Abril",
              "Maig",
              "Juny",
              "Juliol",
              "Agost",
              "Setembre",
              "Octubre",
              "Novembre",
              "Desembre",
            ],
            month_short: [
              "Gen",
              "Feb",
              "Mar",
              "Abr",
              "Mai",
              "Jun",
              "Jul",
              "Ago",
              "Set",
              "Oct",
              "Nov",
              "Des",
            ],
            day_full: [
              "Diumenge",
              "Dilluns",
              "Dimarts",
              "Dimecres",
              "Dijous",
              "Divendres",
              "Dissabte",
            ],
            day_short: ["Dg", "Dl", "Dm", "Dc", "Dj", "Dv", "Ds"],
          },
          labels: {
            dhx_cal_today_button: "Hui",
            day_tab: "Dia",
            week_tab: "Setmana",
            month_tab: "Mes",
            new_event: "Nou esdeveniment",
            icon_save: "Guardar",
            icon_cancel: "Cancel·lar",
            icon_details: "Detalls",
            icon_edit: "Editar",
            icon_delete: "Esborrar",
            confirm_closing: "",
            confirm_deleting:
              "L'esdeveniment s'esborrarà definitivament, continuar ?",
            section_description: "Descripció",
            section_time: "Periode de temps",
            full_day: "Tot el dia",
            confirm_recurring:
              "¿Desitja modificar el conjunt d'esdeveniments repetits?",
            section_recurring: "Repeteixca l'esdeveniment",
            button_recurring: "Impedit",
            button_recurring_open: "Permés",
            button_edit_series: "Edit sèrie",
            button_edit_occurrence: "Edita Instància",
            agenda_tab: "Agenda",
            date: "Data",
            description: "Descripció",
            year_tab: "Any",
            week_agenda_tab: "Agenda",
            grid_tab: "Taula",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
          },
        },
        G = {
          date: {
            month_full: [
              "一月",
              "二月",
              "三月",
              "四月",
              "五月",
              "六月",
              "七月",
              "八月",
              "九月",
              "十月",
              "十一月",
              "十二月",
            ],
            month_short: [
              "1月",
              "2月",
              "3月",
              "4月",
              "5月",
              "6月",
              "7月",
              "8月",
              "9月",
              "10月",
              "11月",
              "12月",
            ],
            day_full: [
              "星期日",
              "星期一",
              "星期二",
              "星期三",
              "星期四",
              "星期五",
              "星期六",
            ],
            day_short: ["日", "一", "二", "三", "四", "五", "六"],
          },
          labels: {
            dhx_cal_today_button: "今天",
            day_tab: "日",
            week_tab: "周",
            month_tab: "月",
            new_event: "新建日程",
            icon_save: "保存",
            icon_cancel: "关闭",
            icon_details: "详细",
            icon_edit: "编辑",
            icon_delete: "删除",
            confirm_closing: "请确认是否撤销修改!",
            confirm_deleting: "是否删除日程?",
            section_description: "描述",
            section_time: "时间范围",
            full_day: "整天",
            confirm_recurring: "请确认是否将日程设为重复模式?",
            section_recurring: "重复周期",
            button_recurring: "禁用",
            button_recurring_open: "启用",
            button_edit_series: "编辑系列",
            button_edit_occurrence: "编辑实例",
            agenda_tab: "议程",
            date: "日期",
            description: "说明",
            year_tab: "今年",
            week_agenda_tab: "议程",
            grid_tab: "电网",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "按天",
            repeat_radio_week: "按周",
            repeat_radio_month: "按月",
            repeat_radio_year: "按年",
            repeat_radio_day_type: "每",
            repeat_text_day_count: "天",
            repeat_radio_day_type2: "每个工作日",
            repeat_week: " 重复 每",
            repeat_text_week_count: "星期的:",
            repeat_radio_month_type: "重复",
            repeat_radio_month_start: "在",
            repeat_text_month_day: "日 每",
            repeat_text_month_count: "月",
            repeat_text_month_count2_before: "每",
            repeat_text_month_count2_after: "月",
            repeat_year_label: "在",
            select_year_day2: "的",
            repeat_text_year_day: "日",
            select_year_month: "月",
            repeat_radio_end: "无结束日期",
            repeat_text_occurences_count: "次结束",
            repeat_radio_end2: "重复",
            repeat_radio_end3: "结束于",
            month_for_recurring: [
              "一月",
              "二月",
              "三月",
              "四月",
              "五月",
              "六月",
              "七月",
              "八月",
              "九月",
              "十月",
              "十一月",
              "十二月",
            ],
            day_for_recurring: [
              "星期日",
              "星期一",
              "星期二",
              "星期三",
              "星期四",
              "星期五",
              "星期六",
            ],
          },
        },
        X = {
          date: {
            month_full: [
              "Leden",
              "Únor",
              "Březen",
              "Duben",
              "Květen",
              "Červen",
              "Červenec",
              "Srpen",
              "Září",
              "Říjen",
              "Listopad",
              "Prosinec",
            ],
            month_short: [
              "Led",
              "Ún",
              "Bře",
              "Dub",
              "Kvě",
              "Čer",
              "Čec",
              "Srp",
              "Září",
              "Říj",
              "List",
              "Pro",
            ],
            day_full: [
              "Neděle",
              "Pondělí",
              "Úterý",
              "Středa",
              "Čtvrtek",
              "Pátek",
              "Sobota",
            ],
            day_short: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"],
          },
          labels: {
            dhx_cal_today_button: "Dnes",
            day_tab: "Den",
            week_tab: "Týden",
            month_tab: "Měsíc",
            new_event: "Nová událost",
            icon_save: "Uložit",
            icon_cancel: "Zpět",
            icon_details: "Detail",
            icon_edit: "Edituj",
            icon_delete: "Smazat",
            confirm_closing: "",
            confirm_deleting: "Událost bude trvale smazána, opravdu?",
            section_description: "Poznámky",
            section_time: "Doba platnosti",
            confirm_recurring:
              "Přejete si upravit celou řadu opakovaných událostí?",
            section_recurring: "Opakování události",
            button_recurring: "Vypnuto",
            button_recurring_open: "Zapnuto",
            button_edit_series: "Edit series",
            button_edit_occurrence: "Upravit instance",
            agenda_tab: "Program",
            date: "Datum",
            description: "Poznámka",
            year_tab: "Rok",
            full_day: "Full day",
            week_agenda_tab: "Program",
            grid_tab: "Mřížka",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Denně",
            repeat_radio_week: "Týdně",
            repeat_radio_month: "Měsíčně",
            repeat_radio_year: "Ročně",
            repeat_radio_day_type: "každý",
            repeat_text_day_count: "Den",
            repeat_radio_day_type2: "pracovní dny",
            repeat_week: "Opakuje každých",
            repeat_text_week_count: "Týdnů na:",
            repeat_radio_month_type: "u každého",
            repeat_radio_month_start: "na",
            repeat_text_month_day: "Den každého",
            repeat_text_month_count: "Měsíc",
            repeat_text_month_count2_before: "každý",
            repeat_text_month_count2_after: "Měsíc",
            repeat_year_label: "na",
            select_year_day2: "v",
            repeat_text_year_day: "Den v",
            select_year_month: "",
            repeat_radio_end: "bez data ukončení",
            repeat_text_occurences_count: "Události",
            repeat_radio_end2: "po",
            repeat_radio_end3: "Konec",
            month_for_recurring: [
              "Leden",
              "Únor",
              "Březen",
              "Duben",
              "Květen",
              "Červen",
              "Červenec",
              "Srpen",
              "Září",
              "Říjen",
              "Listopad",
              "Prosinec",
            ],
            day_for_recurring: [
              "Neděle ",
              "Pondělí",
              "Úterý",
              "Středa",
              "Čtvrtek",
              "Pátek",
              "Sobota",
            ],
          },
        },
        Q = {
          date: {
            month_full: [
              "Januar",
              "Februar",
              "Marts",
              "April",
              "Maj",
              "Juni",
              "Juli",
              "August",
              "September",
              "Oktober",
              "November",
              "December",
            ],
            month_short: [
              "Jan",
              "Feb",
              "Mar",
              "Apr",
              "Maj",
              "Jun",
              "Jul",
              "Aug",
              "Sep",
              "Okt",
              "Nov",
              "Dec",
            ],
            day_full: [
              "Søndag",
              "Mandag",
              "Tirsdag",
              "Onsdag",
              "Torsdag",
              "Fredag",
              "Lørdag",
            ],
            day_short: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"],
          },
          labels: {
            dhx_cal_today_button: "Idag",
            day_tab: "Dag",
            week_tab: "Uge",
            month_tab: "Måned",
            new_event: "Ny begivenhed",
            icon_save: "Gem",
            icon_cancel: "Fortryd",
            icon_details: "Detaljer",
            icon_edit: "Tilret",
            icon_delete: "Slet",
            confirm_closing: "Dine rettelser vil gå tabt.. Er dy sikker?",
            confirm_deleting:
              "Bigivenheden vil blive slettet permanent. Er du sikker?",
            section_description: "Beskrivelse",
            section_time: "Tidsperiode",
            confirm_recurring:
              "Vil du tilrette hele serien af gentagne begivenheder?",
            section_recurring: "Gentag begivenhed",
            button_recurring: "Frakoblet",
            button_recurring_open: "Tilkoblet",
            button_edit_series: "Rediger serien",
            button_edit_occurrence: "Rediger en kopi",
            agenda_tab: "Dagsorden",
            date: "Dato",
            description: "Beskrivelse",
            year_tab: "År",
            week_agenda_tab: "Dagsorden",
            grid_tab: "Grid",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Daglig",
            repeat_radio_week: "Ugenlig",
            repeat_radio_month: "Månedlig",
            repeat_radio_year: "Årlig",
            repeat_radio_day_type: "Hver",
            repeat_text_day_count: "dag",
            repeat_radio_day_type2: "På hver arbejdsdag",
            repeat_week: " Gentager sig hver",
            repeat_text_week_count: "uge på følgende dage:",
            repeat_radio_month_type: "Hver den",
            repeat_radio_month_start: "Den",
            repeat_text_month_day: " i hver",
            repeat_text_month_count: "måned",
            repeat_text_month_count2_before: "hver",
            repeat_text_month_count2_after: "måned",
            repeat_year_label: "Den",
            select_year_day2: "i",
            repeat_text_year_day: "dag i",
            select_year_month: "",
            repeat_radio_end: "Ingen slutdato",
            repeat_text_occurences_count: "gentagelse",
            repeat_radio_end2: "Efter",
            repeat_radio_end3: "Slut",
            month_for_recurring: [
              "Januar",
              "Februar",
              "März",
              "April",
              "Mai",
              "Juni",
              "Juli",
              "August",
              "September",
              "Oktober",
              "November",
              "Dezember",
            ],
            day_for_recurring: [
              "Søndag",
              "Mandag",
              "Tirsdag",
              "Onsdag",
              "Torsdag",
              "Fredag",
              "Lørdag",
            ],
          },
        },
        Z = {
          date: {
            month_full: [
              " Januar",
              " Februar",
              " März ",
              " April",
              " Mai",
              " Juni",
              " Juli",
              " August",
              " September ",
              " Oktober",
              " November ",
              " Dezember",
            ],
            month_short: [
              "Jan",
              "Feb",
              "Mär",
              "Apr",
              "Mai",
              "Jun",
              "Jul",
              "Aug",
              "Sep",
              "Okt",
              "Nov",
              "Dez",
            ],
            day_full: [
              "Sonntag",
              "Montag",
              "Dienstag",
              " Mittwoch",
              " Donnerstag",
              "Freitag",
              "Samstag",
            ],
            day_short: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
          },
          labels: {
            dhx_cal_today_button: "Heute",
            day_tab: "Tag",
            week_tab: "Woche",
            month_tab: "Monat",
            new_event: "neuer Eintrag",
            icon_save: "Speichern",
            icon_cancel: "Abbrechen",
            icon_details: "Details",
            icon_edit: "Ändern",
            icon_delete: "Löschen",
            confirm_closing: "",
            confirm_deleting: "Der Eintrag wird gelöscht",
            section_description: "Beschreibung",
            section_time: "Zeitspanne",
            full_day: "Ganzer Tag",
            confirm_recurring:
              "Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?",
            section_recurring: "Wiederholung",
            button_recurring: "Aus",
            button_recurring_open: "An",
            button_edit_series: "Bearbeiten Sie die Serie",
            button_edit_occurrence: "Bearbeiten Sie eine Kopie",
            agenda_tab: "Agenda",
            date: "Datum",
            description: "Beschreibung",
            year_tab: "Jahre",
            week_agenda_tab: "Agenda",
            grid_tab: "Grid",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Täglich",
            repeat_radio_week: "Wöchentlich",
            repeat_radio_month: "Monatlich",
            repeat_radio_year: "Jährlich",
            repeat_radio_day_type: "jeden",
            repeat_text_day_count: "Tag",
            repeat_radio_day_type2: "an jedem Arbeitstag",
            repeat_week: " Wiederholt sich jede",
            repeat_text_week_count: "Woche am:",
            repeat_radio_month_type: "an jedem",
            repeat_radio_month_start: "am",
            repeat_text_month_day: "Tag eines jeden",
            repeat_text_month_count: "Monats",
            repeat_text_month_count2_before: "jeden",
            repeat_text_month_count2_after: "Monats",
            repeat_year_label: "am",
            select_year_day2: "im",
            repeat_text_year_day: "Tag im",
            select_year_month: "",
            repeat_radio_end: "kein Enddatum",
            repeat_text_occurences_count: "Ereignissen",
            repeat_radio_end3: "Schluß",
            repeat_radio_end2: "nach",
            month_for_recurring: [
              "Januar",
              "Februar",
              "März",
              "April",
              "Mai",
              "Juni",
              "Juli",
              "August",
              "September",
              "Oktober",
              "November",
              "Dezember",
            ],
            day_for_recurring: [
              "Sonntag",
              "Montag",
              "Dienstag",
              "Mittwoch",
              "Donnerstag",
              "Freitag",
              "Samstag",
            ],
          },
        },
        ee = {
          date: {
            month_full: [
              "Ιανουάριος",
              "Φεβρουάριος",
              "Μάρτιος",
              "Απρίλιος",
              "Μάϊος",
              "Ιούνιος",
              "Ιούλιος",
              "Αύγουστος",
              "Σεπτέμβριος",
              "Οκτώβριος",
              "Νοέμβριος",
              "Δεκέμβριος",
            ],
            month_short: [
              "ΙΑΝ",
              "ΦΕΒ",
              "ΜΑΡ",
              "ΑΠΡ",
              "ΜΑΙ",
              "ΙΟΥΝ",
              "ΙΟΥΛ",
              "ΑΥΓ",
              "ΣΕΠ",
              "ΟΚΤ",
              "ΝΟΕ",
              "ΔΕΚ",
            ],
            day_full: [
              "Κυριακή",
              "Δευτέρα",
              "Τρίτη",
              "Τετάρτη",
              "Πέμπτη",
              "Παρασκευή",
              "Κυριακή",
            ],
            day_short: ["ΚΥ", "ΔΕ", "ΤΡ", "ΤΕ", "ΠΕ", "ΠΑ", "ΣΑ"],
          },
          labels: {
            dhx_cal_today_button: "Σήμερα",
            day_tab: "Ημέρα",
            week_tab: "Εβδομάδα",
            month_tab: "Μήνας",
            new_event: "Νέο έργο",
            icon_save: "Αποθήκευση",
            icon_cancel: "Άκυρο",
            icon_details: "Λεπτομέρειες",
            icon_edit: "Επεξεργασία",
            icon_delete: "Διαγραφή",
            confirm_closing: "",
            confirm_deleting:
              "Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;",
            section_description: "Περιγραφή",
            section_time: "Χρονική περίοδος",
            full_day: "Πλήρης Ημέρα",
            confirm_recurring:
              "Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;",
            section_recurring: "Επαναλαμβανόμενο έργο",
            button_recurring: "Ανενεργό",
            button_recurring_open: "Ενεργό",
            button_edit_series: "Επεξεργαστείτε τη σειρά",
            button_edit_occurrence: "Επεξεργασία ένα αντίγραφο",
            agenda_tab: "Ημερήσια Διάταξη",
            date: "Ημερομηνία",
            description: "Περιγραφή",
            year_tab: "Έτος",
            week_agenda_tab: "Ημερήσια Διάταξη",
            grid_tab: "Πλέγμα",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Ημερησίως",
            repeat_radio_week: "Εβδομαδιαίως",
            repeat_radio_month: "Μηνιαίως",
            repeat_radio_year: "Ετησίως",
            repeat_radio_day_type: "Κάθε",
            repeat_text_day_count: "ημέρα",
            repeat_radio_day_type2: "Κάθε εργάσιμη",
            repeat_week: " Επανάληψη κάθε",
            repeat_text_week_count: "εβδομάδα τις επόμενες ημέρες:",
            repeat_radio_month_type: "Επανάληψη",
            repeat_radio_month_start: "Την",
            repeat_text_month_day: "ημέρα κάθε",
            repeat_text_month_count: "μήνα",
            repeat_text_month_count2_before: "κάθε",
            repeat_text_month_count2_after: "μήνα",
            repeat_year_label: "Την",
            select_year_day2: "του",
            repeat_text_year_day: "ημέρα",
            select_year_month: "μήνα",
            repeat_radio_end: "Χωρίς ημερομηνία λήξεως",
            repeat_text_occurences_count: "επαναλήψεις",
            repeat_radio_end3: "Λήγει την",
            repeat_radio_end2: "Μετά από",
            month_for_recurring: [
              "Ιανουάριος",
              "Φεβρουάριος",
              "Μάρτιος",
              "Απρίλιος",
              "Μάϊος",
              "Ιούνιος",
              "Ιούλιος",
              "Αύγουστος",
              "Σεπτέμβριος",
              "Οκτώβριος",
              "Νοέμβριος",
              "Δεκέμβριος",
            ],
            day_for_recurring: [
              "Κυριακή",
              "Δευτέρα",
              "Τρίτη",
              "Τετάρτη",
              "Πέμπτη",
              "Παρασκευή",
              "Σάββατο",
            ],
          },
        },
        te = {
          date: {
            month_full: [
              "January",
              "February",
              "March",
              "April",
              "May",
              "June",
              "July",
              "August",
              "September",
              "October",
              "November",
              "December",
            ],
            month_short: [
              "Jan",
              "Feb",
              "Mar",
              "Apr",
              "May",
              "Jun",
              "Jul",
              "Aug",
              "Sep",
              "Oct",
              "Nov",
              "Dec",
            ],
            day_full: [
              "Sunday",
              "Monday",
              "Tuesday",
              "Wednesday",
              "Thursday",
              "Friday",
              "Saturday",
            ],
            day_short: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
          },
          labels: {
            dhx_cal_today_button: "Today",
            day_tab: "Day",
            week_tab: "Week",
            month_tab: "Month",
            new_event: "New event",
            icon_save: "Save",
            icon_cancel: "Cancel",
            icon_details: "Details",
            icon_edit: "Edit",
            icon_delete: "Delete",
            confirm_closing: "",
            confirm_deleting:
              "Event will be deleted permanently, are you sure?",
            section_description: "Description",
            section_time: "Time period",
            full_day: "Full day",
            confirm_recurring:
              "Do you want to edit the whole set of repeated events?",
            section_recurring: "Repeat event",
            button_recurring: "Disabled",
            button_recurring_open: "Enabled",
            button_edit_series: "Edit series",
            button_edit_occurrence: "Edit occurrence",
            agenda_tab: "Agenda",
            date: "Date",
            description: "Description",
            year_tab: "Year",
            week_agenda_tab: "Agenda",
            grid_tab: "Grid",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Daily",
            repeat_radio_week: "Weekly",
            repeat_radio_month: "Monthly",
            repeat_radio_year: "Yearly",
            repeat_radio_day_type: "Every",
            repeat_text_day_count: "day",
            repeat_radio_day_type2: "Every workday",
            repeat_week: " Repeat every",
            repeat_text_week_count: "week next days:",
            repeat_radio_month_type: "Repeat",
            repeat_radio_month_start: "On",
            repeat_text_month_day: "day every",
            repeat_text_month_count: "month",
            repeat_text_month_count2_before: "every",
            repeat_text_month_count2_after: "month",
            repeat_year_label: "On",
            select_year_day2: "of",
            repeat_text_year_day: "day",
            select_year_month: "month",
            repeat_radio_end: "No end date",
            repeat_text_occurences_count: "occurrences",
            repeat_radio_end2: "After",
            repeat_radio_end3: "End by",
            month_for_recurring: [
              "January",
              "February",
              "March",
              "April",
              "May",
              "June",
              "July",
              "August",
              "September",
              "October",
              "November",
              "December",
            ],
            day_for_recurring: [
              "Sunday",
              "Monday",
              "Tuesday",
              "Wednesday",
              "Thursday",
              "Friday",
              "Saturday",
            ],
          },
        },
        ae = {
          date: {
            month_full: [
              "Enero",
              "Febrero",
              "Marzo",
              "Abril",
              "Mayo",
              "Junio",
              "Julio",
              "Agosto",
              "Septiembre",
              "Octubre",
              "Noviembre",
              "Diciembre",
            ],
            month_short: [
              "Ene",
              "Feb",
              "Mar",
              "Abr",
              "May",
              "Jun",
              "Jul",
              "Ago",
              "Sep",
              "Oct",
              "Nov",
              "Dic",
            ],
            day_full: [
              "Domingo",
              "Lunes",
              "Martes",
              "Miércoles",
              "Jueves",
              "Viernes",
              "Sábado",
            ],
            day_short: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"],
          },
          labels: {
            dhx_cal_today_button: "Hoy",
            day_tab: "Día",
            week_tab: "Semana",
            month_tab: "Mes",
            new_event: "Nuevo evento",
            icon_save: "Guardar",
            icon_cancel: "Cancelar",
            icon_details: "Detalles",
            icon_edit: "Editar",
            icon_delete: "Eliminar",
            confirm_closing: "",
            confirm_deleting:
              "El evento se borrará definitivamente, ¿continuar?",
            section_description: "Descripción",
            section_time: "Período",
            full_day: "Todo el día",
            confirm_recurring:
              "¿Desea modificar el conjunto de eventos repetidos?",
            section_recurring: "Repita el evento",
            button_recurring: "Impedido",
            button_recurring_open: "Permitido",
            button_edit_series: "Editar la serie",
            button_edit_occurrence: "Editar este evento",
            agenda_tab: "Día",
            date: "Fecha",
            description: "Descripción",
            year_tab: "Año",
            week_agenda_tab: "Día",
            grid_tab: "Reja",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Diariamente",
            repeat_radio_week: "Semanalmente",
            repeat_radio_month: "Mensualmente",
            repeat_radio_year: "Anualmente",
            repeat_radio_day_type: "Cada",
            repeat_text_day_count: "dia",
            repeat_radio_day_type2: "Cada jornada de trabajo",
            repeat_week: " Repetir cada",
            repeat_text_week_count: "semana:",
            repeat_radio_month_type: "Repita",
            repeat_radio_month_start: "El",
            repeat_text_month_day: "dia cada ",
            repeat_text_month_count: "mes",
            repeat_text_month_count2_before: "cada",
            repeat_text_month_count2_after: "mes",
            repeat_year_label: "El",
            select_year_day2: "del",
            repeat_text_year_day: "dia",
            select_year_month: "mes",
            repeat_radio_end: "Sin fecha de finalización",
            repeat_text_occurences_count: "ocurrencias",
            repeat_radio_end3: "Fin",
            repeat_radio_end2: "Después de",
            month_for_recurring: [
              "Enero",
              "Febrero",
              "Маrzo",
              "Аbril",
              "Mayo",
              "Junio",
              "Julio",
              "Аgosto",
              "Setiembre",
              "Octubre",
              "Noviembre",
              "Diciembre",
            ],
            day_for_recurring: [
              "Domingo",
              "Lunes",
              "Martes",
              "Miércoles",
              "Jeuves",
              "Viernes",
              "Sabado",
            ],
          },
        },
        ne = {
          date: {
            month_full: [
              "Tammikuu",
              "Helmikuu",
              "Maaliskuu",
              "Huhtikuu",
              "Toukokuu",
              "Kes&auml;kuu",
              "Hein&auml;kuu",
              "Elokuu",
              "Syyskuu",
              "Lokakuu",
              "Marraskuu",
              "Joulukuu",
            ],
            month_short: [
              "Tam",
              "Hel",
              "Maa",
              "Huh",
              "Tou",
              "Kes",
              "Hei",
              "Elo",
              "Syy",
              "Lok",
              "Mar",
              "Jou",
            ],
            day_full: [
              "Sunnuntai",
              "Maanantai",
              "Tiistai",
              "Keskiviikko",
              "Torstai",
              "Perjantai",
              "Lauantai",
            ],
            day_short: ["Su", "Ma", "Ti", "Ke", "To", "Pe", "La"],
          },
          labels: {
            dhx_cal_today_button: "Tänään",
            day_tab: "Päivä",
            week_tab: "Viikko",
            month_tab: "Kuukausi",
            new_event: "Uusi tapahtuma",
            icon_save: "Tallenna",
            icon_cancel: "Peru",
            icon_details: "Tiedot",
            icon_edit: "Muokkaa",
            icon_delete: "Poista",
            confirm_closing: "",
            confirm_deleting: "Haluatko varmasti poistaa tapahtuman?",
            section_description: "Kuvaus",
            section_time: "Aikajakso",
            full_day: "Koko päivä",
            confirm_recurring:
              "Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?",
            section_recurring: "Toista tapahtuma",
            button_recurring: "Ei k&auml;yt&ouml;ss&auml;",
            button_recurring_open: "K&auml;yt&ouml;ss&auml;",
            button_edit_series: "Muokkaa sarja",
            button_edit_occurrence: "Muokkaa kopio",
            agenda_tab: "Esityslista",
            date: "Päivämäärä",
            description: "Kuvaus",
            year_tab: "Vuoden",
            week_agenda_tab: "Esityslista",
            grid_tab: "Ritilä",
            drag_to_create: "Luo uusi vetämällä",
            drag_to_move: "Siirrä vetämällä",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "P&auml;ivitt&auml;in",
            repeat_radio_week: "Viikoittain",
            repeat_radio_month: "Kuukausittain",
            repeat_radio_year: "Vuosittain",
            repeat_radio_day_type: "Joka",
            repeat_text_day_count: "p&auml;iv&auml;",
            repeat_radio_day_type2: "Joka arkip&auml;iv&auml;",
            repeat_week: "Toista joka",
            repeat_text_week_count: "viikko n&auml;in&auml; p&auml;ivin&auml;:",
            repeat_radio_month_type: "Toista",
            repeat_radio_month_start: "",
            repeat_text_month_day: "p&auml;iv&auml;n&auml; joka",
            repeat_text_month_count: "kuukausi",
            repeat_text_month_count2_before: "joka",
            repeat_text_month_count2_after: "kuukausi",
            repeat_year_label: "",
            select_year_day2: "",
            repeat_text_year_day: "p&auml;iv&auml;",
            select_year_month: "kuukausi",
            repeat_radio_end: "Ei loppumisaikaa",
            repeat_text_occurences_count: "Toiston j&auml;lkeen",
            repeat_radio_end3: "Loppuu",
            repeat_radio_end2: "",
            month_for_recurring: [
              "Tammikuu",
              "Helmikuu",
              "Maaliskuu",
              "Huhtikuu",
              "Toukokuu",
              "Kes&auml;kuu",
              "Hein&auml;kuu",
              "Elokuu",
              "Syyskuu",
              "Lokakuu",
              "Marraskuu",
              "Joulukuu",
            ],
            day_for_recurring: [
              "Sunnuntai",
              "Maanantai",
              "Tiistai",
              "Keskiviikko",
              "Torstai",
              "Perjantai",
              "Lauantai",
            ],
          },
        },
        ie = {
          date: {
            month_full: [
              "Janvier",
              "Février",
              "Mars",
              "Avril",
              "Mai",
              "Juin",
              "Juillet",
              "Août",
              "Septembre",
              "Octobre",
              "Novembre",
              "Décembre",
            ],
            month_short: [
              "Jan",
              "Fév",
              "Mar",
              "Avr",
              "Mai",
              "Juin",
              "Juil",
              "Aoû",
              "Sep",
              "Oct",
              "Nov",
              "Déc",
            ],
            day_full: [
              "Dimanche",
              "Lundi",
              "Mardi",
              "Mercredi",
              "Jeudi",
              "Vendredi",
              "Samedi",
            ],
            day_short: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"],
          },
          labels: {
            dhx_cal_today_button: "Aujourd'hui",
            day_tab: "Jour",
            week_tab: "Semaine",
            month_tab: "Mois",
            new_event: "Nouvel événement",
            icon_save: "Enregistrer",
            icon_cancel: "Annuler",
            icon_details: "Détails",
            icon_edit: "Modifier",
            icon_delete: "Effacer",
            confirm_closing: "",
            confirm_deleting:
              "L'événement sera effacé sans appel, êtes-vous sûr ?",
            section_description: "Description",
            section_time: "Période",
            full_day: "Journée complète",
            confirm_recurring:
              "Voulez-vous éditer toute une série d'évènements répétés?",
            section_recurring: "Périodicité",
            button_recurring: "Désactivé",
            button_recurring_open: "Activé",
            button_edit_series: "Modifier la série",
            button_edit_occurrence: "Modifier une copie",
            agenda_tab: "Jour",
            date: "Date",
            description: "Description",
            year_tab: "Année",
            week_agenda_tab: "Jour",
            grid_tab: "Grille",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Quotidienne",
            repeat_radio_week: "Hebdomadaire",
            repeat_radio_month: "Mensuelle",
            repeat_radio_year: "Annuelle",
            repeat_radio_day_type: "Chaque",
            repeat_text_day_count: "jour",
            repeat_radio_day_type2: "Chaque journée de travail",
            repeat_week: " Répéter toutes les",
            repeat_text_week_count: "semaine:",
            repeat_radio_month_type: "Répéter",
            repeat_radio_month_start: "Le",
            repeat_text_month_day: "jour chaque",
            repeat_text_month_count: "mois",
            repeat_text_month_count2_before: "chaque",
            repeat_text_month_count2_after: "mois",
            repeat_year_label: "Le",
            select_year_day2: "du",
            repeat_text_year_day: "jour",
            select_year_month: "mois",
            repeat_radio_end: "Pas de date d&quot;achèvement",
            repeat_text_occurences_count: "occurrences",
            repeat_radio_end3: "Fin",
            repeat_radio_end2: "Après",
            month_for_recurring: [
              "Janvier",
              "Février",
              "Mars",
              "Avril",
              "Mai",
              "Juin",
              "Juillet",
              "Août",
              "Septembre",
              "Octobre",
              "Novembre",
              "Décembre",
            ],
            day_for_recurring: [
              "Dimanche",
              "Lundi",
              "Mardi",
              "Mercredi",
              "Jeudi",
              "Vendredi",
              "Samedi",
            ],
          },
        },
        re = {
          date: {
            month_full: [
              "ינואר",
              "פברואר",
              "מרץ",
              "אפריל",
              "מאי",
              "יוני",
              "יולי",
              "אוגוסט",
              "ספטמבר",
              "אוקטובר",
              "נובמבר",
              "דצמבר",
            ],
            month_short: [
              "ינו",
              "פבר",
              "מרץ",
              "אפר",
              "מאי",
              "יונ",
              "יול",
              "אוג",
              "ספט",
              "אוק",
              "נוב",
              "דצמ",
            ],
            day_full: [
              "ראשון",
              "שני",
              "שלישי",
              "רביעי",
              "חמישי",
              "שישי",
              "שבת",
            ],
            day_short: ["א", "ב", "ג", "ד", "ה", "ו", "ש"],
          },
          labels: {
            dhx_cal_today_button: "היום",
            day_tab: "יום",
            week_tab: "שבוע",
            month_tab: "חודש",
            new_event: "ארוע חדש",
            icon_save: "שמור",
            icon_cancel: "בטל",
            icon_details: "פרטים",
            icon_edit: "ערוך",
            icon_delete: "מחק",
            confirm_closing: "",
            confirm_deleting: "ארוע ימחק סופית.להמשיך?",
            section_description: "תיאור",
            section_time: "תקופה",
            confirm_recurring: "האם ברצונך לשנות כל סדרת ארועים מתמשכים?",
            section_recurring: "להעתיק ארוע",
            button_recurring: "לא פעיל",
            button_recurring_open: "פעיל",
            full_day: "יום שלם",
            button_edit_series: "ערוך את הסדרה",
            button_edit_occurrence: "עריכת עותק",
            agenda_tab: "סדר יום",
            date: "תאריך",
            description: "תיאור",
            year_tab: "לשנה",
            week_agenda_tab: "סדר יום",
            grid_tab: "סורג",
            drag_to_create: "Drag to create",
            drag_to_move: "גרור כדי להזיז",
            message_ok: "OK",
            message_cancel: "בטל",
            next: "הבא",
            prev: "הקודם",
            year: "שנה",
            month: "חודש",
            day: "יום",
            hour: "שעה",
            minute: "דקה",
            repeat_radio_day: "יומי",
            repeat_radio_week: "שבועי",
            repeat_radio_month: "חודשי",
            repeat_radio_year: "שנתי",
            repeat_radio_day_type: "חזור כל",
            repeat_text_day_count: "ימים",
            repeat_radio_day_type2: "חזור כל יום עבודה",
            repeat_week: " חזור כל",
            repeat_text_week_count: "שבוע לפי ימים:",
            repeat_radio_month_type: "חזור כל",
            repeat_radio_month_start: "כל",
            repeat_text_month_day: "ימים כל",
            repeat_text_month_count: "חודשים",
            repeat_text_month_count2_before: "חזור כל",
            repeat_text_month_count2_after: "חודש",
            repeat_year_label: "כל",
            select_year_day2: "בחודש",
            repeat_text_year_day: "ימים",
            select_year_month: "חודש",
            repeat_radio_end: "לעולם לא מסתיים",
            repeat_text_occurences_count: "אירועים",
            repeat_radio_end3: "מסתיים ב",
            repeat_radio_end2: "אחרי",
            month_for_recurring: [
              "ינואר",
              "פברואר",
              "מרץ",
              "אפריל",
              "מאי",
              "יוני",
              "יולי",
              "אוגוסט",
              "ספטמבר",
              "אוקטובר",
              "נובמבר",
              "דצמבר",
            ],
            day_for_recurring: [
              "ראשון",
              "שני",
              "שלישי",
              "רביעי",
              "חמישי",
              "שישי",
              "שבת",
            ],
          },
        },
        oe = {
          date: {
            month_full: [
              "Január",
              "Február",
              "Március",
              "Április",
              "Május",
              "Június",
              "Július",
              "Augusztus",
              "Szeptember",
              "Október",
              "November",
              "December",
            ],
            month_short: [
              "Jan",
              "Feb",
              "Már",
              "Ápr",
              "Máj",
              "Jún",
              "Júl",
              "Aug",
              "Sep",
              "Okt",
              "Nov",
              "Dec",
            ],
            day_full: [
              "Vasárnap",
              "Hétfõ",
              "Kedd",
              "Szerda",
              "Csütörtök",
              "Péntek",
              "szombat",
            ],
            day_short: ["Va", "Hé", "Ke", "Sze", "Csü", "Pé", "Szo"],
          },
          labels: {
            dhx_cal_today_button: "Ma",
            day_tab: "Nap",
            week_tab: "Hét",
            month_tab: "Hónap",
            new_event: "Új esemény",
            icon_save: "Mentés",
            icon_cancel: "Mégse",
            icon_details: "Részletek",
            icon_edit: "Szerkesztés",
            icon_delete: "Törlés",
            confirm_closing: "",
            confirm_deleting: "Az esemény törölve lesz, biztosan folytatja?",
            section_description: "Leírás",
            section_time: "Idõszak",
            full_day: "Egesz napos",
            confirm_recurring:
              "Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?",
            section_recurring: "Esemény ismétlése",
            button_recurring: "Tiltás",
            button_recurring_open: "Engedélyezés",
            button_edit_series: "Edit series",
            button_edit_occurrence: "Szerkesztés bíróság",
            agenda_tab: "Napirend",
            date: "Dátum",
            description: "Leírás",
            year_tab: "Év",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
          },
        },
        se = {
          date: {
            month_full: [
              "Januari",
              "Februari",
              "Maret",
              "April",
              "Mei",
              "Juni",
              "Juli",
              "Agustus",
              "September",
              "Oktober",
              "November",
              "Desember",
            ],
            month_short: [
              "Jan",
              "Feb",
              "Mar",
              "Apr",
              "Mei",
              "Jun",
              "Jul",
              "Ags",
              "Sep",
              "Okt",
              "Nov",
              "Des",
            ],
            day_full: [
              "Minggu",
              "Senin",
              "Selasa",
              "Rabu",
              "Kamis",
              "Jumat",
              "Sabtu",
            ],
            day_short: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
          },
          labels: {
            dhx_cal_today_button: "Hari Ini",
            day_tab: "Hari",
            week_tab: "Minggu",
            month_tab: "Bulan",
            new_event: "Acara Baru",
            icon_save: "Simpan",
            icon_cancel: "Batal",
            icon_details: "Detail",
            icon_edit: "Edit",
            icon_delete: "Hapus",
            confirm_closing: "",
            confirm_deleting: "Acara akan dihapus",
            section_description: "Keterangan",
            section_time: "Periode",
            full_day: "Hari penuh",
            confirm_recurring: "Apakah acara ini akan berulang?",
            section_recurring: "Acara Rutin",
            button_recurring: "Tidak Difungsikan",
            button_recurring_open: "Difungsikan",
            button_edit_series: "Mengedit seri",
            button_edit_occurrence: "Mengedit salinan",
            agenda_tab: "Agenda",
            date: "Tanggal",
            description: "Keterangan",
            year_tab: "Tahun",
            week_agenda_tab: "Agenda",
            grid_tab: "Tabel",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
          },
        },
        _e = {
          date: {
            month_full: [
              "Gennaio",
              "Febbraio",
              "Marzo",
              "Aprile",
              "Maggio",
              "Giugno",
              "Luglio",
              "Agosto",
              "Settembre",
              "Ottobre",
              "Novembre",
              "Dicembre",
            ],
            month_short: [
              "Gen",
              "Feb",
              "Mar",
              "Apr",
              "Mag",
              "Giu",
              "Lug",
              "Ago",
              "Set",
              "Ott",
              "Nov",
              "Dic",
            ],
            day_full: [
              "Domenica",
              "Lunedì",
              "Martedì",
              "Mercoledì",
              "Giovedì",
              "Venerdì",
              "Sabato",
            ],
            day_short: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"],
          },
          labels: {
            dhx_cal_today_button: "Oggi",
            day_tab: "Giorno",
            week_tab: "Settimana",
            month_tab: "Mese",
            new_event: "Nuovo evento",
            icon_save: "Salva",
            icon_cancel: "Chiudi",
            icon_details: "Dettagli",
            icon_edit: "Modifica",
            icon_delete: "Elimina",
            confirm_closing: "",
            confirm_deleting: "L'evento sarà eliminato, siete sicuri?",
            section_description: "Descrizione",
            section_time: "Periodo di tempo",
            full_day: "Intera giornata",
            confirm_recurring: "Vuoi modificare l'intera serie di eventi?",
            section_recurring: "Ripetere l'evento",
            button_recurring: "Disattivato",
            button_recurring_open: "Attivato",
            button_edit_series: "Modificare la serie",
            button_edit_occurrence: "Modificare una copia",
            agenda_tab: "Agenda",
            date: "Data",
            description: "Descrizione",
            year_tab: "Anno",
            week_agenda_tab: "Agenda",
            grid_tab: "Griglia",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Quotidiano",
            repeat_radio_week: "Settimanale",
            repeat_radio_month: "Mensile",
            repeat_radio_year: "Annuale",
            repeat_radio_day_type: "Ogni",
            repeat_text_day_count: "giorno",
            repeat_radio_day_type2: "Ogni giornata lavorativa",
            repeat_week: " Ripetere ogni",
            repeat_text_week_count: "settimana:",
            repeat_radio_month_type: "Ripetere",
            repeat_radio_month_start: "Il",
            repeat_text_month_day: "giorno ogni",
            repeat_text_month_count: "mese",
            repeat_text_month_count2_before: "ogni",
            repeat_text_month_count2_after: "mese",
            repeat_year_label: "Il",
            select_year_day2: "del",
            repeat_text_year_day: "giorno",
            select_year_month: "mese",
            repeat_radio_end: "Senza data finale",
            repeat_text_occurences_count: "occorenze",
            repeat_radio_end3: "Fine",
            repeat_radio_end2: "Dopo",
            month_for_recurring: [
              "Gennaio",
              "Febbraio",
              "Marzo",
              "Aprile",
              "Maggio",
              "Jiugno",
              "Luglio",
              "Agosto",
              "Settembre",
              "Ottobre",
              "Novembre",
              "Dicembre",
            ],
            day_for_recurring: [
              "Domenica",
              "Lunedì",
              "Martedì",
              "Mercoledì",
              "Jovedì",
              "Venerdì",
              "Sabato",
            ],
          },
        },
        de = {
          date: {
            month_full: [
              "1月",
              "2月",
              "3月",
              "4月",
              "5月",
              "6月",
              "7月",
              "8月",
              "9月",
              "10月",
              "11月",
              "12月",
            ],
            month_short: [
              "1月",
              "2月",
              "3月",
              "4月",
              "5月",
              "6月",
              "7月",
              "8月",
              "9月",
              "10月",
              "11月",
              "12月",
            ],
            day_full: [
              "日曜日",
              "月曜日",
              "火曜日",
              "水曜日",
              "木曜日",
              "金曜日",
              "土曜日",
            ],
            day_short: ["日", "月", "火", "水", "木", "金", "土"],
          },
          labels: {
            dhx_cal_today_button: "今日",
            day_tab: "日",
            week_tab: "週",
            month_tab: "月",
            new_event: "新イベント",
            icon_save: "保存",
            icon_cancel: "キャンセル",
            icon_details: "詳細",
            icon_edit: "編集",
            icon_delete: "削除",
            confirm_closing: "",
            confirm_deleting: "イベント完全に削除されます、宜しいですか？",
            section_description: "デスクリプション",
            section_time: "期間",
            confirm_recurring: "繰り返されているイベントを全て編集しますか？",
            section_recurring: "イベントを繰り返す",
            button_recurring: "無効",
            button_recurring_open: "有効",
            full_day: "終日",
            button_edit_series: "シリーズを編集します",
            button_edit_occurrence: "コピーを編集",
            agenda_tab: "議題は",
            date: "日付",
            description: "説明",
            year_tab: "今年",
            week_agenda_tab: "議題は",
            grid_tab: "グリッド",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
          },
        };
      function le(e, t) {
        for (var a = 0; a < t.length; a++) {
          var n = t[a];
          (n.enumerable = n.enumerable || !1),
            (n.configurable = !0),
            "value" in n && (n.writable = !0),
            Object.defineProperty(e, n.key, n);
        }
      }
      var ce = (function () {
          function e(t) {
            for (var a in ((function (e, t) {
              if (!(e instanceof t))
                throw new TypeError("Cannot call a class as a function");
            })(this, e),
            (this._locales = {}),
            t))
              this._locales[a] = t[a];
          }
          return (
            (function (e, t, a) {
              t && le(e.prototype, t), a && le(e, a);
            })(e, [
              {
                key: "addLocale",
                value: function (e, t) {
                  this._locales[e] = t;
                },
              },
              {
                key: "getLocale",
                value: function (e) {
                  return this._locales[e];
                },
              },
            ]),
            e
          );
        })(),
        ue = {
          date: {
            month_full: [
              "Januar",
              "Februar",
              "Mars",
              "April",
              "Mai",
              "Juni",
              "Juli",
              "August",
              "September",
              "Oktober",
              "November",
              "Desember",
            ],
            month_short: [
              "Jan",
              "Feb",
              "Mar",
              "Apr",
              "Mai",
              "Jun",
              "Jul",
              "Aug",
              "Sep",
              "Okt",
              "Nov",
              "Des",
            ],
            day_full: [
              "Søndag",
              "Mandag",
              "Tirsdag",
              "Onsdag",
              "Torsdag",
              "Fredag",
              "Lørdag",
            ],
            day_short: ["Søn", "Mon", "Tir", "Ons", "Tor", "Fre", "Lør"],
          },
          labels: {
            dhx_cal_today_button: "I dag",
            day_tab: "Dag",
            week_tab: "Uke",
            month_tab: "Måned",
            new_event: "Ny hendelse",
            icon_save: "Lagre",
            icon_cancel: "Avbryt",
            icon_details: "Detaljer",
            icon_edit: "Rediger",
            icon_delete: "Slett",
            confirm_closing: "",
            confirm_deleting:
              "Hendelsen vil bli slettet permanent. Er du sikker?",
            section_description: "Beskrivelse",
            section_time: "Tidsperiode",
            confirm_recurring:
              "Vil du forandre hele dette settet av repeterende hendelser?",
            section_recurring: "Repeter hendelsen",
            button_recurring: "Av",
            button_recurring_open: "På",
            button_edit_series: "Rediger serien",
            button_edit_occurrence: "Redigere en kopi",
            agenda_tab: "Agenda",
            date: "Dato",
            description: "Beskrivelse",
            year_tab: "År",
            week_agenda_tab: "Agenda",
            grid_tab: "Grid",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Daglig",
            repeat_radio_week: "Ukentlig",
            repeat_radio_month: "Månedlig",
            repeat_radio_year: "Årlig",
            repeat_radio_day_type: "Hver",
            repeat_text_day_count: "dag",
            repeat_radio_day_type2: "Alle hverdager",
            repeat_week: " Gjentas hver",
            repeat_text_week_count: "uke på:",
            repeat_radio_month_type: "På hver",
            repeat_radio_month_start: "På",
            repeat_text_month_day: "dag hver",
            repeat_text_month_count: "måned",
            repeat_text_month_count2_before: "hver",
            repeat_text_month_count2_after: "måned",
            repeat_year_label: "på",
            select_year_day2: "i",
            repeat_text_year_day: "dag i",
            select_year_month: "",
            repeat_radio_end: "Ingen sluttdato",
            repeat_text_occurences_count: "forekomst",
            repeat_radio_end3: "Stop den",
            repeat_radio_end2: "Etter",
            month_for_recurring: [
              "Januar",
              "Februar",
              "Mars",
              "April",
              "Mai",
              "Juni",
              "Juli",
              "August",
              "September",
              "Oktober",
              "November",
              "Desember",
            ],
            day_for_recurring: [
              "Sondag",
              "Mandag",
              "Tirsdag",
              "Onsdag",
              "Torsdag",
              "Fredag",
              "Lørdag",
            ],
          },
        },
        he = {
          date: {
            month_full: [
              "Januari",
              "Februari",
              "Maart",
              "April",
              "Mei",
              "Juni",
              "Juli",
              "Augustus",
              "September",
              "Oktober",
              "November",
              "December",
            ],
            month_short: [
              "Jan",
              "Feb",
              "mrt",
              "Apr",
              "Mei",
              "Jun",
              "Jul",
              "Aug",
              "Sep",
              "Okt",
              "Nov",
              "Dec",
            ],
            day_full: [
              "Zondag",
              "Maandag",
              "Dinsdag",
              "Woensdag",
              "Donderdag",
              "Vrijdag",
              "Zaterdag",
            ],
            day_short: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za"],
          },
          labels: {
            dhx_cal_today_button: "Vandaag",
            day_tab: "Dag",
            week_tab: "Week",
            month_tab: "Maand",
            new_event: "Nieuw item",
            icon_save: "Opslaan",
            icon_cancel: "Annuleren",
            icon_details: "Details",
            icon_edit: "Bewerken",
            icon_delete: "Verwijderen",
            confirm_closing: "",
            confirm_deleting: "Item zal permanent worden verwijderd, doorgaan?",
            section_description: "Beschrijving",
            section_time: "Tijd periode",
            full_day: "Hele dag",
            confirm_recurring: "Wilt u alle terugkerende items bijwerken?",
            section_recurring: "Item herhalen",
            button_recurring: "Uit",
            button_recurring_open: "Aan",
            button_edit_series: "Bewerk de serie",
            button_edit_occurrence: "Bewerk een kopie",
            agenda_tab: "Agenda",
            date: "Datum",
            description: "Omschrijving",
            year_tab: "Jaar",
            week_agenda_tab: "Agenda",
            grid_tab: "Tabel",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Dagelijks",
            repeat_radio_week: "Wekelijks",
            repeat_radio_month: "Maandelijks",
            repeat_radio_year: "Jaarlijks",
            repeat_radio_day_type: "Elke",
            repeat_text_day_count: "dag(en)",
            repeat_radio_day_type2: "Elke werkdag",
            repeat_week: " Herhaal elke",
            repeat_text_week_count: "week op de volgende dagen:",
            repeat_radio_month_type: "Herhaal",
            repeat_radio_month_start: "Op",
            repeat_text_month_day: "dag iedere",
            repeat_text_month_count: "maanden",
            repeat_text_month_count2_before: "iedere",
            repeat_text_month_count2_after: "maanden",
            repeat_year_label: "Op",
            select_year_day2: "van",
            repeat_text_year_day: "dag",
            select_year_month: "maand",
            repeat_radio_end: "Geen eind datum",
            repeat_text_occurences_count: "keren",
            repeat_radio_end3: "Eindigd per",
            repeat_radio_end2: "Na",
            month_for_recurring: [
              "Januari",
              "Februari",
              "Maart",
              "April",
              "Mei",
              "Juni",
              "Juli",
              "Augustus",
              "September",
              "Oktober",
              "November",
              "December",
            ],
            day_for_recurring: [
              "Zondag",
              "Maandag",
              "Dinsdag",
              "Woensdag",
              "Donderdag",
              "Vrijdag",
              "Zaterdag",
            ],
          },
        },
        fe = {
          date: {
            month_full: [
              "Januar",
              "Februar",
              "Mars",
              "April",
              "Mai",
              "Juni",
              "Juli",
              "August",
              "September",
              "Oktober",
              "November",
              "Desember",
            ],
            month_short: [
              "Jan",
              "Feb",
              "Mar",
              "Apr",
              "Mai",
              "Jun",
              "Jul",
              "Aug",
              "Sep",
              "Okt",
              "Nov",
              "Des",
            ],
            day_full: [
              "Søndag",
              "Mandag",
              "Tirsdag",
              "Onsdag",
              "Torsdag",
              "Fredag",
              "Lørdag",
            ],
            day_short: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"],
          },
          labels: {
            dhx_cal_today_button: "Idag",
            day_tab: "Dag",
            week_tab: "Uke",
            month_tab: "Måned",
            new_event: "Ny",
            icon_save: "Lagre",
            icon_cancel: "Avbryt",
            icon_details: "Detaljer",
            icon_edit: "Endre",
            icon_delete: "Slett",
            confirm_closing: "Endringer blir ikke lagret, er du sikker?",
            confirm_deleting: "Oppføringen vil bli slettet, er du sikker?",
            section_description: "Beskrivelse",
            section_time: "Tidsperiode",
            full_day: "Full dag",
            confirm_recurring:
              "Vil du endre hele settet med repeterende oppføringer?",
            section_recurring: "Repeterende oppføring",
            button_recurring: "Ikke aktiv",
            button_recurring_open: "Aktiv",
            button_edit_series: "Rediger serien",
            button_edit_occurrence: "Redigere en kopi",
            agenda_tab: "Agenda",
            date: "Dato",
            description: "Beskrivelse",
            year_tab: "År",
            week_agenda_tab: "Agenda",
            grid_tab: "Grid",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
          },
        },
        pe = {
          date: {
            month_full: [
              "Styczeń",
              "Luty",
              "Marzec",
              "Kwiecień",
              "Maj",
              "Czerwiec",
              "Lipiec",
              "Sierpień",
              "Wrzesień",
              "Październik",
              "Listopad",
              "Grudzień",
            ],
            month_short: [
              "Sty",
              "Lut",
              "Mar",
              "Kwi",
              "Maj",
              "Cze",
              "Lip",
              "Sie",
              "Wrz",
              "Paź",
              "Lis",
              "Gru",
            ],
            day_full: [
              "Niedziela",
              "Poniedziałek",
              "Wtorek",
              "Środa",
              "Czwartek",
              "Piątek",
              "Sobota",
            ],
            day_short: ["Nie", "Pon", "Wto", "Śro", "Czw", "Pią", "Sob"],
          },
          labels: {
            dhx_cal_today_button: "Dziś",
            day_tab: "Dzień",
            week_tab: "Tydzień",
            month_tab: "Miesiąc",
            new_event: "Nowe zdarzenie",
            icon_save: "Zapisz",
            icon_cancel: "Anuluj",
            icon_details: "Szczegóły",
            icon_edit: "Edytuj",
            icon_delete: "Usuń",
            confirm_closing: "",
            confirm_deleting:
              "Zdarzenie zostanie usunięte na zawsze, kontynuować?",
            section_description: "Opis",
            section_time: "Okres czasu",
            full_day: "Cały dzień",
            confirm_recurring:
              "Czy chcesz edytować cały zbiór powtarzających się zdarzeń?",
            section_recurring: "Powtórz zdarzenie",
            button_recurring: "Nieaktywne",
            button_recurring_open: "Aktywne",
            button_edit_series: "Edytuj serię",
            button_edit_occurrence: "Edytuj kopię",
            agenda_tab: "Agenda",
            date: "Data",
            description: "Opis",
            year_tab: "Rok",
            week_agenda_tab: "Agenda",
            grid_tab: "Tabela",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Codziennie",
            repeat_radio_week: "Co tydzie",
            repeat_radio_month: "Co miesic",
            repeat_radio_year: "Co rok",
            repeat_radio_day_type: "Kadego",
            repeat_text_day_count: "dnia",
            repeat_radio_day_type2: "Kadego dnia roboczego",
            repeat_week: " Powtarzaj kadego",
            repeat_text_week_count: "tygodnia w dni:",
            repeat_radio_month_type: "Powtrz",
            repeat_radio_month_start: "W",
            repeat_text_month_day: "dnia kadego",
            repeat_text_month_count: "miesica",
            repeat_text_month_count2_before: "kadego",
            repeat_text_month_count2_after: "miesica",
            repeat_year_label: "W",
            select_year_day2: "miesica",
            repeat_text_year_day: "dnia miesica",
            select_year_month: "",
            repeat_radio_end: "Bez daty kocowej",
            repeat_text_occurences_count: "wystpieniu/ach",
            repeat_radio_end3: "Zakocz w",
            repeat_radio_end2: "Po",
            month_for_recurring: [
              "Stycznia",
              "Lutego",
              "Marca",
              "Kwietnia",
              "Maja",
              "Czerwca",
              "Lipca",
              "Sierpnia",
              "Wrzenia",
              "Padziernka",
              "Listopada",
              "Grudnia",
            ],
            day_for_recurring: [
              "Niedziela",
              "Poniedziaek",
              "Wtorek",
              "roda",
              "Czwartek",
              "Pitek",
              "Sobota",
            ],
          },
        },
        ve = {
          date: {
            month_full: [
              "Janeiro",
              "Fevereiro",
              "Março",
              "Abril",
              "Maio",
              "Junho",
              "Julho",
              "Agosto",
              "Setembro",
              "Outubro",
              "Novembro",
              "Dezembro",
            ],
            month_short: [
              "Jan",
              "Fev",
              "Mar",
              "Abr",
              "Mai",
              "Jun",
              "Jul",
              "Ago",
              "Set",
              "Out",
              "Nov",
              "Dez",
            ],
            day_full: [
              "Domingo",
              "Segunda",
              "Terça",
              "Quarta",
              "Quinta",
              "Sexta",
              "Sábado",
            ],
            day_short: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"],
          },
          labels: {
            dhx_cal_today_button: "Hoje",
            day_tab: "Dia",
            week_tab: "Semana",
            month_tab: "Mês",
            new_event: "Novo evento",
            icon_save: "Salvar",
            icon_cancel: "Cancelar",
            icon_details: "Detalhes",
            icon_edit: "Editar",
            icon_delete: "Deletar",
            confirm_closing: "",
            confirm_deleting: "Tem certeza que deseja excluir?",
            section_description: "Descrição",
            section_time: "Período de tempo",
            full_day: "Dia inteiro",
            confirm_recurring: "Deseja editar todos esses eventos repetidos?",
            section_recurring: "Repetir evento",
            button_recurring: "Desabilitar",
            button_recurring_open: "Habilitar",
            button_edit_series: "Editar a série",
            button_edit_occurrence: "Editar uma cópia",
            agenda_tab: "Dia",
            date: "Data",
            description: "Descrição",
            year_tab: "Ano",
            week_agenda_tab: "Dia",
            grid_tab: "Grade",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Diário",
            repeat_radio_week: "Semanal",
            repeat_radio_month: "Mensal",
            repeat_radio_year: "Anual",
            repeat_radio_day_type: "Cada",
            repeat_text_day_count: "dia(s)",
            repeat_radio_day_type2: "Cada trabalho diário",
            repeat_week: " Repita cada",
            repeat_text_week_count: "semana:",
            repeat_radio_month_type: "Repetir",
            repeat_radio_month_start: "Em",
            repeat_text_month_day: "todo dia",
            repeat_text_month_count: "mês",
            repeat_text_month_count2_before: "todo",
            repeat_text_month_count2_after: "mês",
            repeat_year_label: "Em",
            select_year_day2: "of",
            repeat_text_year_day: "dia",
            select_year_month: "mês",
            repeat_radio_end: "Sem data final",
            repeat_text_occurences_count: "ocorrências",
            repeat_radio_end3: "Fim",
            repeat_radio_end2: "Depois",
            month_for_recurring: [
              "Janeiro",
              "Fevereiro",
              "Março",
              "Abril",
              "Maio",
              "Junho",
              "Julho",
              "Agosto",
              "Setembro",
              "Outubro",
              "Novembro",
              "Dezembro",
            ],
            day_for_recurring: [
              "Domingo",
              "Segunda",
              "Terça",
              "Quarta",
              "Quinta",
              "Sexta",
              "Sábado",
            ],
          },
        },
        ge = {
          date: {
            month_full: [
              "Ianuarie",
              "Februarie",
              "Martie",
              "Aprilie",
              "Mai",
              "Iunie",
              "Iulie",
              "August",
              "Septembrie",
              "Octombrie",
              "November",
              "December",
            ],
            month_short: [
              "Ian",
              "Feb",
              "Mar",
              "Apr",
              "Mai",
              "Iun",
              "Iul",
              "Aug",
              "Sep",
              "Oct",
              "Nov",
              "Dec",
            ],
            day_full: [
              "Duminica",
              "Luni",
              "Marti",
              "Miercuri",
              "Joi",
              "Vineri",
              "Sambata",
            ],
            day_short: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sa"],
          },
          labels: {
            dhx_cal_today_button: "Astazi",
            day_tab: "Zi",
            week_tab: "Saptamana",
            month_tab: "Luna",
            new_event: "Eveniment nou",
            icon_save: "Salveaza",
            icon_cancel: "Anuleaza",
            icon_details: "Detalii",
            icon_edit: "Editeaza",
            icon_delete: "Sterge",
            confirm_closing: "Schimbarile nu vor fi salvate, esti sigur?",
            confirm_deleting: "Evenimentul va fi sters permanent, esti sigur?",
            section_description: "Descriere",
            section_time: "Interval",
            full_day: "Toata ziua",
            confirm_recurring:
              "Vrei sa editezi toata seria de evenimente repetate?",
            section_recurring: "Repetare",
            button_recurring: "Dezactivata",
            button_recurring_open: "Activata",
            button_edit_series: "Editeaza serie",
            button_edit_occurrence: "Editeaza doar intrare",
            agenda_tab: "Agenda",
            date: "Data",
            description: "Descriere",
            year_tab: "An",
            week_agenda_tab: "Agenda",
            grid_tab: "Lista",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Zilnic",
            repeat_radio_week: "Saptamanal",
            repeat_radio_month: "Lunar",
            repeat_radio_year: "Anual",
            repeat_radio_day_type: "La fiecare",
            repeat_text_day_count: "zi(le)",
            repeat_radio_day_type2: "Fiecare zi lucratoare",
            repeat_week: " Repeta la fiecare",
            repeat_text_week_count: "saptamana in urmatoarele zile:",
            repeat_radio_month_type: "Repeta in",
            repeat_radio_month_start: "In a",
            repeat_text_month_day: "zi la fiecare",
            repeat_text_month_count: "luni",
            repeat_text_month_count2_before: "la fiecare",
            repeat_text_month_count2_after: "luni",
            repeat_year_label: "In",
            select_year_day2: "a lunii",
            repeat_text_year_day: "zi a lunii",
            select_year_month: "",
            repeat_radio_end: "Fara data de sfarsit",
            repeat_text_occurences_count: "evenimente",
            repeat_radio_end3: "La data",
            repeat_radio_end2: "Dupa",
            month_for_recurring: [
              "Ianuarie",
              "Februarie",
              "Martie",
              "Aprilie",
              "Mai",
              "Iunie",
              "Iulie",
              "August",
              "Septembrie",
              "Octombrie",
              "Noiembrie",
              "Decembrie",
            ],
            day_for_recurring: [
              "Duminica",
              "Luni",
              "Marti",
              "Miercuri",
              "Joi",
              "Vineri",
              "Sambata",
            ],
          },
        },
        me = {
          date: {
            month_full: [
              "Январь",
              "Февраль",
              "Март",
              "Апрель",
              "Maй",
              "Июнь",
              "Июль",
              "Август",
              "Сентябрь",
              "Oктябрь",
              "Ноябрь",
              "Декабрь",
            ],
            month_short: [
              "Янв",
              "Фев",
              "Maр",
              "Aпр",
              "Maй",
              "Июн",
              "Июл",
              "Aвг",
              "Сен",
              "Окт",
              "Ноя",
              "Дек",
            ],
            day_full: [
              "Воскресенье",
              "Понедельник",
              "Вторник",
              "Среда",
              "Четверг",
              "Пятница",
              "Суббота",
            ],
            day_short: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
          },
          labels: {
            dhx_cal_today_button: "Сегодня",
            day_tab: "День",
            week_tab: "Неделя",
            month_tab: "Месяц",
            new_event: "Новое событие",
            icon_save: "Сохранить",
            icon_cancel: "Отменить",
            icon_details: "Детали",
            icon_edit: "Изменить",
            icon_delete: "Удалить",
            confirm_closing: "",
            confirm_deleting: "Событие будет удалено безвозвратно, продолжить?",
            section_description: "Описание",
            section_time: "Период времени",
            full_day: "Весь день",
            confirm_recurring:
              "Вы хотите изменить всю серию повторяющихся событий?",
            section_recurring: "Повторение",
            button_recurring: "Отключено",
            button_recurring_open: "Включено",
            button_edit_series: "Редактировать серию",
            button_edit_occurrence: "Редактировать экземпляр",
            agenda_tab: "Список",
            date: "Дата",
            description: "Описание",
            year_tab: "Год",
            week_agenda_tab: "Список",
            grid_tab: "Таблица",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "День",
            repeat_radio_week: "Неделя",
            repeat_radio_month: "Месяц",
            repeat_radio_year: "Год",
            repeat_radio_day_type: "Каждый",
            repeat_text_day_count: "день",
            repeat_radio_day_type2: "Каждый рабочий день",
            repeat_week: " Повторять каждую",
            repeat_text_week_count: "неделю , в:",
            repeat_radio_month_type: "Повторять",
            repeat_radio_month_start: "",
            repeat_text_month_day: " числа каждый ",
            repeat_text_month_count: "месяц",
            repeat_text_month_count2_before: "каждый ",
            repeat_text_month_count2_after: "месяц",
            repeat_year_label: "",
            select_year_day2: "",
            repeat_text_year_day: "день",
            select_year_month: "",
            repeat_radio_end: "Без даты окончания",
            repeat_text_occurences_count: "повторений",
            repeat_radio_end3: "До ",
            repeat_radio_end2: "",
            month_for_recurring: [
              "Января",
              "Февраля",
              "Марта",
              "Апреля",
              "Мая",
              "Июня",
              "Июля",
              "Августа",
              "Сентября",
              "Октября",
              "Ноября",
              "Декабря",
            ],
            day_for_recurring: [
              "Воскресенье",
              "Понедельник",
              "Вторник",
              "Среду",
              "Четверг",
              "Пятницу",
              "Субботу",
            ],
          },
        },
        ye = {
          date: {
            month_full: [
              "Januar",
              "Februar",
              "Marec",
              "April",
              "Maj",
              "Junij",
              "Julij",
              "Avgust",
              "September",
              "Oktober",
              "November",
              "December",
            ],
            month_short: [
              "Jan",
              "Feb",
              "Mar",
              "Apr",
              "Maj",
              "Jun",
              "Jul",
              "Aug",
              "Sep",
              "Okt",
              "Nov",
              "Dec",
            ],
            day_full: [
              "Nedelja",
              "Ponedeljek",
              "Torek",
              "Sreda",
              "Četrtek",
              "Petek",
              "Sobota",
            ],
            day_short: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"],
          },
          labels: {
            dhx_cal_today_button: "Danes",
            day_tab: "Dan",
            week_tab: "Teden",
            month_tab: "Mesec",
            new_event: "Nov dogodek",
            icon_save: "Shrani",
            icon_cancel: "Prekliči",
            icon_details: "Podrobnosti",
            icon_edit: "Uredi",
            icon_delete: "Izbriši",
            confirm_closing: "",
            confirm_deleting: "Dogodek bo izbrisan. Želite nadaljevati?",
            section_description: "Opis",
            section_time: "Časovni okvir",
            full_day: "Ves dan",
            confirm_recurring:
              "Želite urediti celoten set ponavljajočih dogodkov?",
            section_recurring: "Ponovi dogodek",
            button_recurring: "Onemogočeno",
            button_recurring_open: "Omogočeno",
            button_edit_series: "Edit series",
            button_edit_occurrence: "Edit occurrence",
            agenda_tab: "Zadeva",
            date: "Datum",
            description: "Opis",
            year_tab: "Leto",
            week_agenda_tab: "Zadeva",
            grid_tab: "Miza",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
          },
        },
        be = {
          date: {
            month_full: [
              "Január",
              "Február",
              "Marec",
              "Apríl",
              "Máj",
              "Jún",
              "Júl",
              "August",
              "September",
              "Október",
              "November",
              "December",
            ],
            month_short: [
              "Jan",
              "Feb",
              "Mar",
              "Apr",
              "Máj",
              "Jún",
              "Júl",
              "Aug",
              "Sept",
              "Okt",
              "Nov",
              "Dec",
            ],
            day_full: [
              "Nedeľa",
              "Pondelok",
              "Utorok",
              "Streda",
              "Štvrtok",
              "Piatok",
              "Sobota",
            ],
            day_short: ["Ne", "Po", "Ut", "St", "Št", "Pi", "So"],
          },
          labels: {
            dhx_cal_today_button: "Dnes",
            day_tab: "Deň",
            week_tab: "Týždeň",
            month_tab: "Mesiac",
            new_event: "Nová udalosť",
            icon_save: "Uložiť",
            icon_cancel: "Späť",
            icon_details: "Detail",
            icon_edit: "Edituj",
            icon_delete: "Zmazať",
            confirm_closing: "Vaše zmeny nebudú uložené. Skutočne?",
            confirm_deleting: "Udalosť bude natrvalo vymazaná. Skutočne?",
            section_description: "Poznámky",
            section_time: "Doba platnosti",
            confirm_recurring:
              "Prajete si upraviť celú radu opakovaných udalostí?",
            section_recurring: "Opakovanie udalosti",
            button_recurring: "Vypnuté",
            button_recurring_open: "Zapnuté",
            button_edit_series: "Upraviť opakovania",
            button_edit_occurrence: "Upraviť inštancie",
            agenda_tab: "Program",
            date: "Dátum",
            description: "Poznámka",
            year_tab: "Rok",
            full_day: "Celý deň",
            week_agenda_tab: "Program",
            grid_tab: "Mriežka",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Denne",
            repeat_radio_week: "Týždenne",
            repeat_radio_month: "Mesaène",
            repeat_radio_year: "Roène",
            repeat_radio_day_type: "Každý",
            repeat_text_day_count: "deò",
            repeat_radio_day_type2: "Každý prac. deò",
            repeat_week: "Opakova každý",
            repeat_text_week_count: "týždeò v dòoch:",
            repeat_radio_month_type: "Opakova",
            repeat_radio_month_start: "On",
            repeat_text_month_day: "deò každý",
            repeat_text_month_count: "mesiac",
            repeat_text_month_count2_before: "každý",
            repeat_text_month_count2_after: "mesiac",
            repeat_year_label: "On",
            select_year_day2: "poèas",
            repeat_text_year_day: "deò",
            select_year_month: "mesiac",
            repeat_radio_end: "Bez dátumu ukonèenia",
            repeat_text_occurences_count: "udalostiach",
            repeat_radio_end3: "Ukonèi",
            repeat_radio_end2: "Po",
            month_for_recurring: [
              "Január",
              "Február",
              "Marec",
              "Apríl",
              "Máj",
              "Jún",
              "Júl",
              "August",
              "September",
              "Október",
              "November",
              "December",
            ],
            day_for_recurring: [
              "Nede¾a",
              "Pondelok",
              "Utorok",
              "Streda",
              "Štvrtok",
              "Piatok",
              "Sobota",
            ],
          },
        },
        xe = {
          date: {
            month_full: [
              "Januari",
              "Februari",
              "Mars",
              "April",
              "Maj",
              "Juni",
              "Juli",
              "Augusti",
              "September",
              "Oktober",
              "November",
              "December",
            ],
            month_short: [
              "Jan",
              "Feb",
              "Mar",
              "Apr",
              "Maj",
              "Jun",
              "Jul",
              "Aug",
              "Sep",
              "Okt",
              "Nov",
              "Dec",
            ],
            day_full: [
              "Söndag",
              "Måndag",
              "Tisdag",
              "Onsdag",
              "Torsdag",
              "Fredag",
              "Lördag",
            ],
            day_short: ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"],
          },
          labels: {
            dhx_cal_today_button: "Idag",
            day_tab: "Dag",
            week_tab: "Vecka",
            month_tab: "Månad",
            new_event: "Ny händelse",
            icon_save: "Spara",
            icon_cancel: "Ångra",
            icon_details: "Detaljer",
            icon_edit: "Ändra",
            icon_delete: "Ta bort",
            confirm_closing: "",
            confirm_deleting:
              "Är du säker på att du vill ta bort händelsen permanent?",
            section_description: "Beskrivning",
            section_time: "Tid",
            full_day: "Hela dagen",
            confirm_recurring:
              "Vill du redigera hela serien med repeterande händelser?",
            section_recurring: "Upprepa händelse",
            button_recurring: "Inaktiverat",
            button_recurring_open: "Aktiverat",
            button_edit_series: "Redigera serien",
            button_edit_occurrence: "Redigera en kopia",
            agenda_tab: "Dagordning",
            date: "Datum",
            description: "Beskrivning",
            year_tab: "År",
            week_agenda_tab: "Dagordning",
            grid_tab: "Galler",
            drag_to_create: "Dra för att skapa ny",
            drag_to_move: "Dra för att flytta",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "Dagligen",
            repeat_radio_week: "Veckovis",
            repeat_radio_month: "Månadsvis",
            repeat_radio_year: "Årligen",
            repeat_radio_day_type: "Var",
            repeat_text_day_count: "dag",
            repeat_radio_day_type2: "Varje arbetsdag",
            repeat_week: " Upprepa var",
            repeat_text_week_count: "vecka dessa dagar:",
            repeat_radio_month_type: "Upprepa",
            repeat_radio_month_start: "Den",
            repeat_text_month_day: "dagen var",
            repeat_text_month_count: "månad",
            repeat_text_month_count2_before: "var",
            repeat_text_month_count2_after: "månad",
            repeat_year_label: "Den",
            select_year_day2: "i",
            repeat_text_year_day: "dag i",
            select_year_month: "månad",
            repeat_radio_end: "Inget slutdatum",
            repeat_text_occurences_count: "upprepningar",
            repeat_radio_end3: "Sluta efter",
            repeat_radio_end2: "Efter",
            month_for_recurring: [
              "Januari",
              "Februari",
              "Mars",
              "April",
              "Maj",
              "Juni",
              "Juli",
              "Augusti",
              "September",
              "Oktober",
              "November",
              "December",
            ],
            day_for_recurring: [
              "Söndag",
              "Måndag",
              "Tisdag",
              "Onsdag",
              "Torsdag",
              "Fredag",
              "Lördag",
            ],
          },
        },
        ke = {
          date: {
            month_full: [
              "Ocak",
              "Þubat",
              "Mart",
              "Nisan",
              "Mayýs",
              "Haziran",
              "Temmuz",
              "Aðustos",
              "Eylül",
              "Ekim",
              "Kasým",
              "Aralýk",
            ],
            month_short: [
              "Oca",
              "Þub",
              "Mar",
              "Nis",
              "May",
              "Haz",
              "Tem",
              "Aðu",
              "Eyl",
              "Eki",
              "Kas",
              "Ara",
            ],
            day_full: [
              "Pazar",
              "Pazartes,",
              "Salý",
              "Çarþamba",
              "Perþembe",
              "Cuma",
              "Cumartesi",
            ],
            day_short: ["Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts"],
          },
          labels: {
            dhx_cal_today_button: "Bugün",
            day_tab: "Gün",
            week_tab: "Hafta",
            month_tab: "Ay",
            new_event: "Uygun",
            icon_save: "Kaydet",
            icon_cancel: "Ýptal",
            icon_details: "Detaylar",
            icon_edit: "Düzenle",
            icon_delete: "Sil",
            confirm_closing: "",
            confirm_deleting: "Etkinlik silinecek, devam?",
            section_description: "Açýklama",
            section_time: "Zaman aralýðý",
            full_day: "Tam gün",
            confirm_recurring: "Tüm tekrar eden etkinlikler silinecek, devam?",
            section_recurring: "Etkinliði tekrarla",
            button_recurring: "Pasif",
            button_recurring_open: "Aktif",
            button_edit_series: "Dizi düzenleme",
            button_edit_occurrence: "Bir kopyasını düzenleyin",
            agenda_tab: "Ajanda",
            date: "Tarih",
            description: "Açýklama",
            year_tab: "Yýl",
            week_agenda_tab: "Ajanda",
            grid_tab: "Izgara",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
          },
        },
        we = {
          date: {
            month_full: [
              "Січень",
              "Лютий",
              "Березень",
              "Квітень",
              "Травень",
              "Червень",
              "Липень",
              "Серпень",
              "Вересень",
              "Жовтень",
              "Листопад",
              "Грудень",
            ],
            month_short: [
              "Січ",
              "Лют",
              "Бер",
              "Кві",
              "Тра",
              "Чер",
              "Лип",
              "Сер",
              "Вер",
              "Жов",
              "Лис",
              "Гру",
            ],
            day_full: [
              "Неділя",
              "Понеділок",
              "Вівторок",
              "Середа",
              "Четвер",
              "П'ятниця",
              "Субота",
            ],
            day_short: ["Нед", "Пон", "Вів", "Сер", "Чет", "Птн", "Суб"],
          },
          labels: {
            dhx_cal_today_button: "Сьогодні",
            day_tab: "День",
            week_tab: "Тиждень",
            month_tab: "Місяць",
            new_event: "Нова подія",
            icon_save: "Зберегти",
            icon_cancel: "Відміна",
            icon_details: "Деталі",
            icon_edit: "Редагувати",
            icon_delete: "Вилучити",
            confirm_closing: "",
            confirm_deleting: "Подія вилучиться назавжди. Ви впевнені?",
            section_description: "Опис",
            section_time: "Часовий проміжок",
            full_day: "Весь день",
            confirm_recurring:
              "Хочете редагувати весь перелік повторюваних подій?",
            section_recurring: "Повторювана подія",
            button_recurring: "Відключено",
            button_recurring_open: "Включено",
            button_edit_series: "Редагувати серію",
            button_edit_occurrence: "Редагувати примірник",
            agenda_tab: "Перелік",
            date: "Дата",
            description: "Опис",
            year_tab: "Рік",
            week_agenda_tab: "Перелік",
            grid_tab: "Таблиця",
            drag_to_create: "Drag to create",
            drag_to_move: "Drag to move",
            message_ok: "OK",
            message_cancel: "Cancel",
            next: "Next",
            prev: "Previous",
            year: "Year",
            month: "Month",
            day: "Day",
            hour: "Hour",
            minute: "Minute",
            repeat_radio_day: "День",
            repeat_radio_week: "Тиждень",
            repeat_radio_month: "Місяць",
            repeat_radio_year: "Рік",
            repeat_radio_day_type: "Кожний",
            repeat_text_day_count: "день",
            repeat_radio_day_type2: "Кожний робочий день",
            repeat_week: " Повторювати кожен",
            repeat_text_week_count: "тиждень , по:",
            repeat_radio_month_type: "Повторювати",
            repeat_radio_month_start: "",
            repeat_text_month_day: " числа кожний ",
            repeat_text_month_count: "місяць",
            repeat_text_month_count2_before: "кожен ",
            repeat_text_month_count2_after: "місяць",
            repeat_year_label: "",
            select_year_day2: "",
            repeat_text_year_day: "день",
            select_year_month: "",
            repeat_radio_end: "Без дати закінчення",
            repeat_text_occurences_count: "повторень",
            repeat_radio_end3: "До ",
            repeat_radio_end2: "",
            month_for_recurring: [
              "січня",
              "лютого",
              "березня",
              "квітня",
              "травня",
              "червня",
              "липня",
              "серпня",
              "вересня",
              "жовтня",
              "листопада",
              "грудня",
            ],
            day_for_recurring: [
              "Неділям",
              "Понеділкам",
              "Вівторкам",
              "Середам",
              "Четвергам",
              "П'ятницям",
              "Суботам",
            ],
          },
        };
      function Ee(e) {
        "@babel/helpers - typeof";
        return (Ee =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      var Se = function (e) {
        var t = { version: "6.0.0" };
        !(function (e) {
          var t = {
              agenda: "https://docs.dhtmlx.com/scheduler/agenda_view.html",
              grid: "https://docs.dhtmlx.com/scheduler/grid_view.html",
              map: "https://docs.dhtmlx.com/scheduler/map_view.html",
              unit: "https://docs.dhtmlx.com/scheduler/units_view.html",
              timeline: "https://docs.dhtmlx.com/scheduler/timeline_view.html",
              week_agenda:
                "https://docs.dhtmlx.com/scheduler/weekagenda_view.html",
              year: "https://docs.dhtmlx.com/scheduler/year_view.html",
              anythingElse: "https://docs.dhtmlx.com/scheduler/views.html",
            },
            a = {
              agenda: "ext/dhtmlxscheduler_agenda_view.js",
              grid: "ext/dhtmlxscheduler_grid_view.js",
              map: "ext/dhtmlxscheduler_map_view.js",
              unit: "ext/dhtmlxscheduler_units.js",
              timeline:
                "ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js",
              week_agenda: "ext/dhtmlxscheduler_week_agenda.js",
              year: "ext/dhtmlxscheduler_year_view.js",
              limit: "ext/dhtmlxscheduler_limit.js",
            };
          (e._commonErrorMessages = {
            unknownView: function (e) {
              var n = a[e] ? "You're probably missing " + a[e] + "." : "";
              return (
                "`" +
                e +
                "` view is not defined. \nPlease check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \nRelated docs: " +
                (t[e] || t.anythingElse) +
                "\n" +
                (n ? n + "\n" : "")
              );
            },
            collapsedContainer: function (e) {
              return "Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \nMake sure that the container has some initial height or use different units. For example:\n<div id='scheduler_here' class='dhx_cal_container' style='width:100%; height:600px;'> \n";
            },
          }),
            (e.createTimelineView = function () {
              throw new Error(
                "scheduler.createTimelineView is not implemented. Be sure to add the required extension: " +
                  a.timeline +
                  "\nRelated docs: " +
                  t.timeline
              );
            }),
            (e.createUnitsView = function () {
              throw new Error(
                "scheduler.createUnitsView is not implemented. Be sure to add the required extension: " +
                  a.unit +
                  "\nRelated docs: " +
                  t.unit
              );
            }),
            (e.createGridView = function () {
              throw new Error(
                "scheduler.createGridView is not implemented. Be sure to add the required extension: " +
                  a.grid +
                  "\nRelated docs: " +
                  t.grid
              );
            }),
            (e.addMarkedTimespan = function () {
              throw new Error(
                "scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\nRelated docs: https://docs.dhtmlx.com/scheduler/limits.html"
              );
            }),
            (e.renderCalendar = function () {
              throw new Error(
                "scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\nhttps://docs.dhtmlx.com/scheduler/minicalendar.html"
              );
            }),
            (e.exportToPNG = function () {
              throw new Error(
                [
                  "scheduler.exportToPNG is not implemented.",
                  "This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html",
                  "Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml",
                ].join("\n")
              );
            }),
            (e.exportToPDF = function () {
              throw new Error(
                [
                  "scheduler.exportToPDF is not implemented.",
                  "This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html",
                  "Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml",
                ].join("\n")
              );
            });
        })(t),
          (function (e) {
            d(e),
              i(e),
              (e._detachDomEvent = function (e, t, a) {
                e.removeEventListener
                  ? e.removeEventListener(t, a, !1)
                  : e.detachEvent && e.detachEvent("on" + t, a);
              }),
              (e._init_once = function () {
                r(e), (e._init_once = function () {});
              });
            var t = {
                render: function (t) {
                  return e._init_nav_bar(t);
                },
              },
              a = {
                render: function (e) {
                  var t = document.createElement("div");
                  return (t.className = "dhx_cal_header"), t;
                },
              },
              n = {
                render: function (e) {
                  var t = document.createElement("div");
                  return (t.className = "dhx_cal_data"), t;
                },
              };
            function o(e) {
              return !!(
                e.querySelector(".dhx_cal_header") &&
                e.querySelector(".dhx_cal_data") &&
                e.querySelector(".dhx_cal_navline")
              );
            }
            (e.init = function (i, r, s) {
              if (!this.$destroyed) {
                if (
                  ((r = r || e._currentDate()),
                  (s = s || "week"),
                  this._obj && this.unset_actions(),
                  (this._obj =
                    "string" == typeof i ? document.getElementById(i) : i),
                  (this.$container = this._obj),
                  (this.$root = this._obj),
                  !this.$container.offsetHeight &&
                    this.$container.offsetWidth &&
                    "100%" === this.$container.style.height &&
                    window.console.error(
                      e._commonErrorMessages.collapsedContainer(),
                      this.$container
                    ),
                  this.config.wai_aria_attributes &&
                    this.config.wai_aria_application_role &&
                    this.$container.setAttribute("role", "application"),
                  this.config.header ||
                    o(this.$container) ||
                    ((this.config.header = (function (e) {
                      var t = ["day", "week", "month"];
                      if (e.matrix) for (var a in e.matrix) t.push(a);
                      if (e._props) for (var a in e._props) t.push(a);
                      if (e._grid && e._grid.names)
                        for (var a in e._grid.names) t.push(a);
                      return (
                        ["map", "agenda", "week_agenda", "year"].forEach(
                          function (a) {
                            e[a + "_view"] && t.push(a);
                          }
                        ),
                        t.concat(["date"]).concat(["prev", "today", "next"])
                      );
                    })(this)),
                    window.console.log(
                      [
                        "Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.",
                        "Using a default header configuration: ",
                        "scheduler.config.header = " +
                          JSON.stringify(this.config.header, null, 2),
                        "Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html",
                      ].join("\n")
                    )),
                  this.config.header)
                )
                  (this.$container.innerHTML = ""),
                    this.$container.classList.add("dhx_cal_container"),
                    this.config.header.height &&
                      (this.xy.nav_height = this.config.header.height),
                    this.$container.appendChild(t.render(this.config.header)),
                    this.$container.appendChild(a.render()),
                    this.$container.appendChild(n.render());
                else if (!o(this.$container))
                  throw new Error(
                    [
                      "Required DOM elements are missing from the scheduler container.",
                      "Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup",
                      "Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig",
                    ].join("\n")
                  );
                this.config.rtl &&
                  (this.$container.className += " dhx_cal_container_rtl"),
                  this._skin_init && e._skin_init(),
                  e.date.init(),
                  (this._scroll = !0),
                  (this._quirks =
                    this.$env.isIE && "BackCompat" == document.compatMode),
                  (this._quirks7 =
                    this.$env.isIE &&
                    -1 == navigator.appVersion.indexOf("MSIE 8")),
                  (this._els = []),
                  this.get_elements(),
                  this.init_templates(),
                  this.set_actions(),
                  this._init_once(),
                  this._init_touch_events(),
                  this.set_sizes(),
                  e.callEvent("onSchedulerReady", []),
                  this.setCurrentView(r, s);
              }
            }),
              (e.xy = {
                min_event_height: 40,
                scale_width: 50,
                scroll_width: 18,
                scale_height: 20,
                month_scale_height: 20,
                menu_width: 25,
                margin_top: 0,
                margin_left: 0,
                editor_width: 140,
                month_head_height: 22,
                event_header_height: 14,
              }),
              (e.keys = { edit_save: 13, edit_cancel: 27 }),
              (e.bind = function (e, t) {
                return e.bind
                  ? e.bind(t)
                  : function () {
                      return e.apply(t, arguments);
                    };
              }),
              (e.set_sizes = function () {
                var t = (this._x = this._obj.clientWidth - this.xy.margin_left),
                  a = (this._y = this._obj.clientHeight - this.xy.margin_top),
                  n = this._table_view
                    ? 0
                    : this.xy.scale_width + this.xy.scroll_width,
                  i = this._table_view ? -1 : this.xy.scale_width,
                  r = this.$container.querySelector(
                    ".dhx_cal_scale_placeholder"
                  );
                e._is_material_skin()
                  ? (r ||
                      (((r = document.createElement("div")).className =
                        "dhx_cal_scale_placeholder"),
                      this.$container.insertBefore(
                        r,
                        this._els.dhx_cal_header[0]
                      )),
                    (r.style.display = "block"),
                    this.set_xy(
                      r,
                      t,
                      this.xy.scale_height + 1,
                      0,
                      this.xy.nav_height + (this._quirks ? -1 : 1)
                    ))
                  : r && r.parentNode.removeChild(r),
                  this._lightbox &&
                    (e.$container.offsetWidth < 1200 ||
                      this._setLbPosition(
                        document.querySelector(".dhx_cal_light")
                      )),
                  this.set_xy(
                    this._els.dhx_cal_navline[0],
                    t,
                    this.xy.nav_height,
                    0,
                    0
                  ),
                  this.set_xy(
                    this._els.dhx_cal_header[0],
                    t - n,
                    this.xy.scale_height,
                    i,
                    this.xy.nav_height + (this._quirks ? -1 : 1)
                  );
                var o = this._els.dhx_cal_navline[0].offsetHeight;
                o > 0 && (this.xy.nav_height = o);
                var s =
                  this.xy.scale_height +
                  this.xy.nav_height +
                  (this._quirks ? -2 : 0);
                this.set_xy(
                  this._els.dhx_cal_data[0],
                  t,
                  a - (s + 2),
                  0,
                  s + 2
                );
              }),
              (e.set_xy = function (e, t, a, n, i) {
                var r = "left";
                (e.style.width = Math.max(0, t) + "px"),
                  (e.style.height = Math.max(0, a) + "px"),
                  arguments.length > 3 &&
                    (this.config.rtl && (r = "right"),
                    (e.style[r] = n + "px"),
                    (e.style.top = i + "px"));
              }),
              (e.get_elements = function () {
                for (
                  var t = this._obj.getElementsByTagName("DIV"), a = 0;
                  a < t.length;
                  a++
                ) {
                  var n = e._getClassName(t[a]),
                    i =
                      t[a].getAttribute("data-tab") ||
                      t[a].getAttribute("name") ||
                      "";
                  n && (n = n.split(" ")[0]),
                    this._els[n] || (this._els[n] = []),
                    this._els[n].push(t[a]);
                  var r =
                    e.locale.labels[i + "_tab"] || e.locale.labels[i || n];
                  "string" != typeof r &&
                    i &&
                    !t[a].innerHTML &&
                    (r = i.split("_")[0]),
                    r &&
                      (this._waiAria.labelAttr(t[a], r), (t[a].innerHTML = r));
                }
              }),
              (e.unset_actions = function () {
                for (var e in this._els)
                  if (this._click[e])
                    for (var t = 0; t < this._els[e].length; t++)
                      this._els[e][t].onclick = null;
                (this._obj.onselectstart = null),
                  (this._obj.onmousemove = null),
                  (this._obj.onmousedown = null),
                  (this._obj.onmouseup = null),
                  (this._obj.ondblclick = null),
                  (this._obj.oncontextmenu = null);
              }),
              (e.set_actions = function () {
                for (var t in this._els)
                  if (this._click[t])
                    for (var a = 0; a < this._els[t].length; a++)
                      this._els[t][a].onclick = e._click[t];
                (this._obj.onselectstart = function (e) {
                  return !1;
                }),
                  (this._obj.onmousemove = function (t) {
                    e._temp_touch_block || e._on_mouse_move(t);
                  }),
                  (this._obj.onmousedown = function (t) {
                    e._ignore_next_click || e._on_mouse_down(t);
                  }),
                  (this._obj.onmouseup = function (t) {
                    e._ignore_next_click || e._on_mouse_up(t);
                  }),
                  (this._obj.ondblclick = function (t) {
                    e._on_dbl_click(t);
                  }),
                  (this._obj.oncontextmenu = function (t) {
                    var a = t,
                      n = a.target || a.srcElement;
                    return e.callEvent("onContextMenu", [
                      e._locate_event(n),
                      a,
                    ]);
                  });
              }),
              (e.select = function (t) {
                this._select_id != t &&
                  (e._close_not_saved(),
                  this.editStop(!1),
                  this._select_id && this.unselect(),
                  (this._select_id = t),
                  this.updateEvent(t),
                  this.callEvent("onEventSelected", [t]));
              }),
              (e.unselect = function (e) {
                if (!e || e == this._select_id) {
                  var t = this._select_id;
                  (this._select_id = null),
                    t && this.getEvent(t) && this.updateEvent(t),
                    this.callEvent("onEventUnselected", [t]);
                }
              }),
              (e.getState = function () {
                return {
                  mode: this._mode,
                  date: new Date(this._date),
                  min_date: new Date(this._min_date),
                  max_date: new Date(this._max_date),
                  editor_id: this._edit_id,
                  lightbox_id: this._lightbox_id,
                  new_event: this._new_event,
                  select_id: this._select_id,
                  expanded: this.expanded,
                  drag_id: this._drag_id,
                  drag_mode: this._drag_mode,
                };
              }),
              (e._click = {
                dhx_cal_data: function (t) {
                  if (e._ignore_next_click)
                    return (
                      t.preventDefault && t.preventDefault(),
                      (t.cancelBubble = !0),
                      (e._ignore_next_click = !1),
                      !1
                    );
                  var a = t.target,
                    n = e._locate_event(a);
                  if (n) {
                    if (!e.callEvent("onClick", [n, t]) || e.config.readonly)
                      return;
                  } else
                    e.callEvent("onEmptyClick", [e.getActionData(t).date, t]);
                  if (n && e.config.select) {
                    e.select(n);
                    var i = e._getClassName(a);
                    -1 != i.indexOf("_icon") &&
                      e._click.buttons[i.split(" ")[1].replace("icon_", "")](n);
                  } else
                    e._close_not_saved(),
                      e.getState().select_id &&
                        new Date().valueOf() - (e._new_event || 0) > 500 &&
                        e.unselect();
                },
                dhx_cal_prev_button: function () {
                  e._click.dhx_cal_next_button(0, -1);
                },
                dhx_cal_next_button: function (t, a) {
                  var n = 1;
                  e.config.rtl && ((a = -a), (n = -n)),
                    e.setCurrentView(
                      e.date.add(
                        e.date[e._mode + "_start"](new Date(e._date)),
                        a || n,
                        e._mode
                      )
                    );
                },
                dhx_cal_today_button: function () {
                  e.callEvent("onBeforeTodayDisplayed", []) &&
                    e.setCurrentView(e._currentDate());
                },
                dhx_cal_tab: function () {
                  var t = this.getAttribute("data-tab"),
                    a = this.getAttribute("name"),
                    n = t || a.substring(0, a.search("_tab"));
                  e.setCurrentView(e._date, n);
                },
                buttons: {
                  delete: function (t) {
                    var a = e.locale.labels.confirm_deleting;
                    e._dhtmlx_confirm(
                      a,
                      e.locale.labels.title_confirm_deleting,
                      function () {
                        e.deleteEvent(t);
                      }
                    );
                  },
                  edit: function (t) {
                    e.edit(t);
                  },
                  save: function (t) {
                    e.editStop(!0);
                  },
                  details: function (t) {
                    e.showLightbox(t);
                  },
                  cancel: function (t) {
                    e.editStop(!1);
                  },
                },
              }),
              (e._dhtmlx_confirm = function (t, a, n) {
                if (!t) return n();
                var i = { text: t };
                a && (i.title = a),
                  n &&
                    (i.callback = function (e) {
                      e && n();
                    }),
                  e.confirm(i);
              }),
              (e.addEventNow = function (t, a, n) {
                var i = {};
                e._isObject(t) && !e._isDate(t) && ((i = t), (t = null));
                var r =
                  6e4 * (this.config.event_duration || this.config.time_step);
                t ||
                  (t =
                    i.start_date ||
                    Math.round(e._currentDate().valueOf() / r) * r);
                var o = new Date(t);
                if (!a) {
                  var s = this.config.first_hour;
                  s > o.getHours() && (o.setHours(s), (t = o.valueOf())),
                    (a = t.valueOf() + r);
                }
                var _ = new Date(a);
                o.valueOf() == _.valueOf() && _.setTime(_.valueOf() + r),
                  (i.start_date = i.start_date || o),
                  (i.end_date = i.end_date || _),
                  (i.text = i.text || this.locale.labels.new_event),
                  (i.id = this._drag_id = i.id || this.uid()),
                  (this._drag_mode = "new-size"),
                  (this._loading = !0);
                var d = this.addEvent(i);
                return (
                  this.callEvent("onEventCreated", [this._drag_id, n]),
                  (this._loading = !1),
                  (this._drag_event = {}),
                  this._on_mouse_up(n),
                  d
                );
              }),
              (e._on_dbl_click = function (t, a) {
                if (
                  ((a = a || t.target || t.srcElement), !this.config.readonly)
                ) {
                  var n = e._getClassName(a).split(" ")[0];
                  switch (n) {
                    case "dhx_scale_holder":
                    case "dhx_scale_holder_now":
                    case "dhx_month_body":
                    case "dhx_wa_day_data":
                      if (!e.config.dblclick_create) break;
                      this.addEventNow(this.getActionData(t).date, null, t);
                      break;
                    case "dhx_cal_event":
                    case "dhx_wa_ev_body":
                    case "dhx_agenda_line":
                    case "dhx_grid_event":
                    case "dhx_cal_event_line":
                    case "dhx_cal_event_clear":
                      var i = this._locate_event(a);
                      if (!this.callEvent("onDblClick", [i, t])) return;
                      this.config.details_on_dblclick ||
                      this._table_view ||
                      !this.getEvent(i)._timed ||
                      !this.config.select
                        ? this.showLightbox(i)
                        : this.edit(i);
                      break;
                    case "dhx_time_block":
                    case "dhx_cal_container":
                      return;
                    default:
                      var r = this["dblclick_" + n];
                      if (r) r.call(this, t);
                      else if (a.parentNode && a != this)
                        return e._on_dbl_click(t, a.parentNode);
                  }
                }
              }),
              (e._get_column_index = function (e) {
                var t = 0;
                if (this._cols) {
                  for (
                    var a = 0, n = 0;
                    a + this._cols[n] < e && n < this._cols.length;

                  )
                    (a += this._cols[n]), n++;
                  if (
                    ((t = n + (this._cols[n] ? (e - a) / this._cols[n] : 0)),
                    this._ignores && t >= this._cols.length)
                  )
                    for (; t >= 1 && this._ignores[Math.floor(t)]; ) t--;
                }
                return t;
              }),
              (e._week_indexes_from_pos = function (e) {
                if (this._cols) {
                  var t = this._get_column_index(e.x);
                  return (
                    (e.x = Math.min(
                      this._cols.length - 1,
                      Math.max(0, Math.ceil(t) - 1)
                    )),
                    (e.y =
                      Math.max(
                        0,
                        Math.ceil(
                          (60 * e.y) /
                            (this.config.time_step * this.config.hour_size_px)
                        ) - 1
                      ) +
                      this.config.first_hour * (60 / this.config.time_step)),
                    e
                  );
                }
                return e;
              }),
              (e._mouse_coords = function (t) {
                var a,
                  n = document.body,
                  i = document.documentElement;
                (a =
                  this.$env.isIE || (!t.pageX && !t.pageY)
                    ? {
                        x:
                          t.clientX +
                          (n.scrollLeft || i.scrollLeft || 0) -
                          n.clientLeft,
                        y:
                          t.clientY +
                          (n.scrollTop || i.scrollTop || 0) -
                          n.clientTop,
                      }
                    : { x: t.pageX, y: t.pageY }),
                  this.config.rtl && this._colsS
                    ? ((a.x =
                        this.$container.querySelector(".dhx_cal_data")
                          .offsetWidth - a.x),
                      "month" !== this._mode && (a.x -= this.xy.scale_width))
                    : (a.x -=
                        this.$domHelpers.getAbsoluteLeft(this._obj) +
                        (this._table_view ? 0 : this.xy.scale_width));
                var r = this.$container.querySelector(".dhx_cal_data");
                (a.y -=
                  this.$domHelpers.getAbsoluteTop(r) -
                  this._els.dhx_cal_data[0].scrollTop),
                  (a.ev = t);
                var o = this["mouse_" + this._mode];
                if (o) a = o.call(this, a);
                else if (this._table_view) {
                  var s = this._get_column_index(a.x);
                  if (!this._cols || !this._colsS) return a;
                  var _ = 0;
                  for (
                    _ = 1;
                    _ < this._colsS.heights.length &&
                    !(this._colsS.heights[_] > a.y);
                    _++
                  );
                  (a.y = Math.ceil(
                    (24 * (Math.max(0, s) + 7 * Math.max(0, _ - 1)) * 60) /
                      this.config.time_step
                  )),
                    (e._drag_mode || "month" == this._mode) &&
                      (a.y =
                        (24 *
                          (Math.max(0, Math.ceil(s) - 1) +
                            7 * Math.max(0, _ - 1)) *
                          60) /
                        this.config.time_step),
                    "move" == this._drag_mode &&
                      e._ignores_detected &&
                      e.config.preserve_length &&
                      ((a._ignores = !0),
                      this._drag_event._event_length ||
                        (this._drag_event._event_length =
                          this._get_real_event_length(
                            this._drag_event.start_date,
                            this._drag_event.end_date,
                            { x_step: 1, x_unit: "day" }
                          ))),
                    (a.x = 0);
                } else a = this._week_indexes_from_pos(a);
                return (a.timestamp = +new Date()), a;
              }),
              (e._close_not_saved = function () {
                if (
                  new Date().valueOf() - (e._new_event || 0) > 500 &&
                  e._edit_id
                ) {
                  var t = e.locale.labels.confirm_closing;
                  e._dhtmlx_confirm(
                    t,
                    e.locale.labels.title_confirm_closing,
                    function () {
                      e.editStop(e.config.positive_closing);
                    }
                  ),
                    t &&
                      (this._drag_id = this._drag_pos = this._drag_mode = null);
                }
              }),
              (e._correct_shift = function (t, a) {
                return (
                  t -
                  6e4 *
                    (new Date(e._min_date).getTimezoneOffset() -
                      new Date(t).getTimezoneOffset()) *
                    (a ? -1 : 1)
                );
              }),
              (e._is_pos_changed = function (e, t) {
                function a(e, t, a) {
                  return !!(Math.abs(e - t) > a);
                }
                return (
                  !e ||
                  !this._drag_pos ||
                  !!(
                    this._drag_pos.has_moved ||
                    !this._drag_pos.timestamp ||
                    t.timestamp - this._drag_pos.timestamp > 100 ||
                    a(e.ev.clientX, t.ev.clientX, 5) ||
                    a(e.ev.clientY, t.ev.clientY, 5)
                  )
                );
              }),
              (e._correct_drag_start_date = function (t) {
                var a;
                e.matrix && (a = e.matrix[e._mode]),
                  (a = a || { x_step: 1, x_unit: "day" }),
                  (t = new Date(t));
                var n = 1;
                return (
                  (a._start_correction || a._end_correction) &&
                    (n =
                      60 * (a.last_hour || 0) -
                        (60 * t.getHours() + t.getMinutes()) || 1),
                  1 * t + (e._get_fictional_event_length(t, n, a) - n)
                );
              }),
              (e._correct_drag_end_date = function (t, a) {
                var n;
                e.matrix && (n = e.matrix[e._mode]),
                  (n = n || { x_step: 1, x_unit: "day" });
                var i = 1 * t + e._get_fictional_event_length(t, a, n);
                return new Date(
                  1 * i - (e._get_fictional_event_length(i, -1, n, -1) + 1)
                );
              }),
              (e._on_mouse_move = function (t) {
                if (this._drag_mode) {
                  var a = this._mouse_coords(t);
                  if (this._is_pos_changed(this._drag_pos, a)) {
                    var n, i;
                    if (
                      (this._edit_id != this._drag_id &&
                        this._close_not_saved(),
                      !this._drag_mode)
                    )
                      return;
                    var r = null;
                    if (
                      (this._drag_pos &&
                        !this._drag_pos.has_moved &&
                        ((r = this._drag_pos).has_moved = !0),
                      (this._drag_pos = a),
                      (this._drag_pos.has_moved = !0),
                      "create" == this._drag_mode)
                    ) {
                      if (
                        (r && (a = r),
                        this._close_not_saved(),
                        this.unselect(this._select_id),
                        (this._loading = !0),
                        (n = this._get_date_from_pos(a).valueOf()),
                        !this._drag_start)
                      )
                        return this.callEvent("onBeforeEventCreated", [
                          t,
                          this._drag_id,
                        ])
                          ? ((this._loading = !1), void (this._drag_start = n))
                          : void (this._loading = !1);
                      (i = n), this._drag_start;
                      var o = new Date(this._drag_start),
                        s = new Date(i);
                      ("day" != this._mode && "week" != this._mode) ||
                        o.getHours() != s.getHours() ||
                        o.getMinutes() != s.getMinutes() ||
                        (s = new Date(this._drag_start + 1e3)),
                        (this._drag_id = this.uid()),
                        this.addEvent(
                          o,
                          s,
                          this.locale.labels.new_event,
                          this._drag_id,
                          a.fields
                        ),
                        this.callEvent("onEventCreated", [this._drag_id, t]),
                        (this._loading = !1),
                        (this._drag_mode = "new-size");
                    }
                    var _,
                      d = this.config.time_step,
                      l = this.getEvent(this._drag_id);
                    if (
                      (e.matrix && (_ = e.matrix[e._mode]),
                      (_ = _ || { x_step: 1, x_unit: "day" }),
                      "move" == this._drag_mode)
                    )
                      (n =
                        this._min_date.valueOf() +
                        6e4 * (a.y * this.config.time_step + 24 * a.x * 60)),
                        !a.custom &&
                          this._table_view &&
                          (n += 1e3 * this.date.time_part(l.start_date)),
                        !this._table_view &&
                          this._dragEventBody &&
                          void 0 === this._drag_event._move_event_shift &&
                          (this._drag_event._move_event_shift =
                            n - l.start_date),
                        this._drag_event._move_event_shift &&
                          (n -= this._drag_event._move_event_shift),
                        (n = this._correct_shift(n)),
                        a._ignores &&
                        this.config.preserve_length &&
                        this._table_view
                          ? ((n = e._correct_drag_start_date(n)),
                            (i = e._correct_drag_end_date(
                              n,
                              this._drag_event._event_length
                            )))
                          : (i =
                              l.end_date.valueOf() -
                              (l.start_date.valueOf() - n));
                    else {
                      if (
                        ((n = l.start_date.valueOf()),
                        (i = l.end_date.valueOf()),
                        this._table_view)
                      ) {
                        var c =
                          this._min_date.valueOf() +
                          a.y * this.config.time_step * 6e4 +
                          (a.custom ? 0 : 864e5);
                        if ("month" == this._mode)
                          if (
                            ((c = this._correct_shift(c, !1)),
                            this._drag_from_start)
                          ) {
                            var u = 864e5;
                            c <=
                              e.date.date_part(new Date(i + u - 1)).valueOf() &&
                              (n = c - u);
                          } else i = c;
                        else
                          this.config.preserve_length
                            ? a.resize_from_start
                              ? (n = e._correct_drag_start_date(c))
                              : (i = e._correct_drag_end_date(c, 0))
                            : a.resize_from_start
                            ? (n = c)
                            : (i = c);
                      } else {
                        var h = this.date
                            .date_part(new Date(l.end_date.valueOf() - 1))
                            .valueOf(),
                          f = new Date(h),
                          p = this.config.first_hour,
                          v = (60 / d) * (this.config.last_hour - p);
                        this.config.time_step = 1;
                        var g = this._mouse_coords(t);
                        this.config.time_step = d;
                        var m = a.y * d * 6e4,
                          y = Math.min(a.y + 1, v) * d * 6e4,
                          b = 6e4 * g.y;
                        (i = Math.abs(m - b) > Math.abs(y - b) ? h + y : h + m),
                          (i +=
                            6e4 *
                            (new Date(i).getTimezoneOffset() -
                              f.getTimezoneOffset())),
                          (this._els.dhx_cal_data[0].style.cursor = "s-resize"),
                          ("week" != this._mode && "day" != this._mode) ||
                            (i = this._correct_shift(i));
                      }
                      if ("new-size" == this._drag_mode)
                        if (i <= this._drag_start) {
                          var x =
                            a.shift ||
                            (this._table_view && !a.custom ? 864e5 : 0);
                          (n = i - (a.shift ? 0 : x)),
                            (i = this._drag_start + (x || 6e4 * d));
                        } else n = this._drag_start;
                      else i <= n && (i = n + 6e4 * d);
                    }
                    var k = new Date(i - 1),
                      w = new Date(n);
                    if (
                      "move" == this._drag_mode &&
                      e.config.limit_drag_out &&
                      (+w < +e._min_date || +i > +e._max_date)
                    ) {
                      if (
                        +l.start_date < +e._min_date ||
                        +l.end_date > +e._max_date
                      )
                        (w = new Date(l.start_date)),
                          (i = new Date(l.end_date));
                      else {
                        var E = i - w;
                        +w < +e._min_date
                          ? ((w = new Date(e._min_date)),
                            a._ignores &&
                            this.config.preserve_length &&
                            this._table_view
                              ? ((w = new Date(e._correct_drag_start_date(w))),
                                _._start_correction &&
                                  (w = new Date(
                                    w.valueOf() + _._start_correction
                                  )),
                                (i = new Date(
                                  1 * w +
                                    this._get_fictional_event_length(
                                      w,
                                      this._drag_event._event_length,
                                      _
                                    )
                                )))
                              : (i = new Date(+w + E)))
                          : ((i = new Date(e._max_date)),
                            a._ignores &&
                            this.config.preserve_length &&
                            this._table_view
                              ? (_._end_correction &&
                                  (i = new Date(
                                    i.valueOf() - _._end_correction
                                  )),
                                (i = new Date(
                                  1 * i -
                                    this._get_fictional_event_length(
                                      i,
                                      0,
                                      _,
                                      !0
                                    )
                                )),
                                (w = new Date(
                                  1 * i -
                                    this._get_fictional_event_length(
                                      i,
                                      this._drag_event._event_length,
                                      _,
                                      !0
                                    )
                                )),
                                this._ignores_detected &&
                                  ((w = e.date.add(w, _.x_step, _.x_unit)),
                                  (i = new Date(
                                    1 * i -
                                      this._get_fictional_event_length(
                                        i,
                                        0,
                                        _,
                                        !0
                                      )
                                  )),
                                  (i = e.date.add(i, _.x_step, _.x_unit))))
                              : (w = new Date(+i - E)));
                      }
                      k = new Date(i - 1);
                    }
                    if (
                      (!this._table_view &&
                        this._dragEventBody &&
                        !e.config.all_timed &&
                        ((!e._get_section_view() &&
                          a.x !=
                            this._get_event_sday({
                              start_date: new Date(n),
                              end_date: new Date(n),
                            })) ||
                          new Date(n).getHours() < this.config.first_hour) &&
                        ((E = i - w),
                        "move" == this._drag_mode &&
                          ((u = this._min_date.valueOf() + 24 * a.x * 60 * 6e4),
                          (w = new Date(u)).setHours(this.config.first_hour),
                          (i = new Date(w.valueOf() + E)),
                          (k = new Date(i - 1)))),
                      this._table_view ||
                        e.config.all_timed ||
                        !(
                          (!e.getView() &&
                            a.x !=
                              this._get_event_sday({
                                start_date: new Date(i),
                                end_date: new Date(i),
                              })) ||
                          new Date(i).getHours() >= this.config.last_hour
                        ) ||
                        ((E = i - w),
                        (u = this._min_date.valueOf() + 24 * a.x * 60 * 6e4),
                        (i = e.date.date_part(new Date(u))).setHours(
                          this.config.last_hour
                        ),
                        (k = new Date(i - 1)),
                        "move" == this._drag_mode && (w = new Date(+i - E))),
                      this._table_view ||
                        (k.getDate() == w.getDate() &&
                          k.getHours() < this.config.last_hour) ||
                        e._allow_dnd)
                    )
                      if (
                        ((l.start_date = w),
                        (l.end_date = new Date(i)),
                        this.config.update_render)
                      ) {
                        var S = e._els.dhx_cal_data[0].scrollTop;
                        this.update_view(),
                          (e._els.dhx_cal_data[0].scrollTop = S);
                      } else this.updateEvent(this._drag_id);
                    this._table_view &&
                      this.for_rendered(this._drag_id, function (e) {
                        e.className += " dhx_in_move dhx_cal_event_drag";
                      }),
                      this.callEvent("onEventDrag", [
                        this._drag_id,
                        this._drag_mode,
                        t,
                      ]);
                  }
                } else if (e.checkEvent("onMouseMove")) {
                  var D = this._locate_event(t.target || t.srcElement);
                  this.callEvent("onMouseMove", [D, t]);
                }
              }),
              (e._on_mouse_down = function (t, a) {
                if (
                  2 != t.button &&
                  !this.config.readonly &&
                  !this._drag_mode
                ) {
                  a = a || t.target || t.srcElement;
                  var n = e._getClassName(a).split(" ")[0];
                  switch (
                    (this.config.drag_event_body &&
                      "dhx_body" == n &&
                      a.parentNode &&
                      -1 ===
                        a.parentNode.className.indexOf("dhx_cal_select_menu") &&
                      ((n = "dhx_event_move"), (this._dragEventBody = !0)),
                    n)
                  ) {
                    case "dhx_cal_event_line":
                    case "dhx_cal_event_clear":
                      this._table_view && (this._drag_mode = "move");
                      break;
                    case "dhx_event_move":
                    case "dhx_wa_ev_body":
                      this._drag_mode = "move";
                      break;
                    case "dhx_event_resize":
                      (this._drag_mode = "resize"),
                        e._getClassName(a).indexOf("dhx_event_resize_end") < 0
                          ? (e._drag_from_start = !0)
                          : (e._drag_from_start = !1);
                      break;
                    case "dhx_scale_holder":
                    case "dhx_scale_holder_now":
                    case "dhx_month_body":
                    case "dhx_matrix_cell":
                    case "dhx_marked_timespan":
                      this._drag_mode = "create";
                      break;
                    case "":
                      if (a.parentNode)
                        return e._on_mouse_down(t, a.parentNode);
                      break;
                    default:
                      if (
                        (!e.checkEvent("onMouseDown") ||
                          e.callEvent("onMouseDown", [n, t])) &&
                        a.parentNode &&
                        a != this &&
                        "dhx_body" != n
                      )
                        return e._on_mouse_down(t, a.parentNode);
                      (this._drag_mode = null), (this._drag_id = null);
                  }
                  if (this._drag_mode) {
                    var i = this._locate_event(a);
                    if (
                      this.config["drag_" + this._drag_mode] &&
                      this.callEvent("onBeforeDrag", [i, this._drag_mode, t])
                    ) {
                      if (
                        ((this._drag_id = i),
                        (this._edit_id != this._drag_id ||
                          (this._edit_id && "create" == this._drag_mode)) &&
                          this._close_not_saved(),
                        !this._drag_mode)
                      )
                        return;
                      (this._drag_event = e._lame_clone(
                        this.getEvent(this._drag_id) || {}
                      )),
                        (this._drag_pos = this._mouse_coords(t));
                    } else this._drag_mode = this._drag_id = 0;
                  }
                  this._drag_start = null;
                }
              }),
              (e._get_private_properties = function (e) {
                var t = {};
                for (var a in e) 0 === a.indexOf("_") && (t[a] = !0);
                return t;
              }),
              (e._clear_temporary_properties = function (e, t) {
                var a = this._get_private_properties(e),
                  n = this._get_private_properties(t);
                for (var i in n) a[i] || delete t[i];
              }),
              (e._on_mouse_up = function (t) {
                if (!t || 2 != t.button || !this._mobile) {
                  if (this._drag_mode && this._drag_id) {
                    this._els.dhx_cal_data[0].style.cursor = "default";
                    var a = this._drag_id,
                      n = this._drag_mode,
                      i = !this._drag_pos || this._drag_pos.has_moved;
                    delete this._drag_event._move_event_shift;
                    var r = this.getEvent(this._drag_id);
                    if (
                      i &&
                      (this._drag_event._dhx_changed ||
                        !this._drag_event.start_date ||
                        r.start_date.valueOf() !=
                          this._drag_event.start_date.valueOf() ||
                        r.end_date.valueOf() !=
                          this._drag_event.end_date.valueOf())
                    ) {
                      var o = "new-size" == this._drag_mode;
                      if (
                        this.callEvent("onBeforeEventChanged", [
                          r,
                          t,
                          o,
                          this._drag_event,
                        ])
                      )
                        if (
                          ((this._drag_id = this._drag_mode = null),
                          o && this.config.edit_on_create)
                        ) {
                          if (
                            (this.unselect(),
                            (this._new_event = new Date()),
                            this._table_view ||
                              this.config.details_on_create ||
                              !this.config.select ||
                              !this.isOneDayEvent(this.getEvent(a)))
                          )
                            return (
                              e.callEvent("onDragEnd", [a, n, t]),
                              this.showLightbox(a)
                            );
                          (this._drag_pos = !0),
                            (this._select_id = this._edit_id = a);
                        } else
                          this._new_event ||
                            this.callEvent(
                              o ? "onEventAdded" : "onEventChanged",
                              [a, this.getEvent(a)]
                            );
                      else
                        o
                          ? this.deleteEvent(r.id, !0)
                          : ((this._drag_event._dhx_changed = !1),
                            this._clear_temporary_properties(
                              r,
                              this._drag_event
                            ),
                            e._lame_copy(r, this._drag_event),
                            this.updateEvent(r.id));
                    }
                    this._drag_pos &&
                      (this._drag_pos.has_moved || !0 === this._drag_pos) &&
                      ((this._drag_id = this._drag_mode = null),
                      this.render_view_data()),
                      e.callEvent("onDragEnd", [a, n, t]);
                  }
                  (this._drag_id = null),
                    (this._drag_mode = null),
                    (this._drag_pos = null);
                }
              }),
              (e._trigger_dyn_loading = function () {
                return !(
                  !this._load_mode ||
                  !this._load() ||
                  ((this._render_wait = !0), 0)
                );
              }),
              (e.update_view = function () {
                this._reset_ignores(),
                  this._update_nav_bar(
                    this.config.header,
                    this.$container.querySelector(".dhx_cal_navline")
                  );
                var e = this[this._mode + "_view"];
                if (
                  (e ? e.call(this, !0) : this._reset_scale(),
                  this._trigger_dyn_loading())
                )
                  return !0;
                this.render_view_data();
              }),
              (e.isViewExists = function (t) {
                return !!(
                  e[t + "_view"] ||
                  (e.date[t + "_start"] &&
                    e.templates[t + "_date"] &&
                    e.templates[t + "_scale_date"])
                );
              }),
              (e._set_aria_buttons_attrs = function () {
                for (
                  var e = [
                      "dhx_cal_next_button",
                      "dhx_cal_prev_button",
                      "dhx_cal_tab",
                      "dhx_cal_today_button",
                    ],
                    t = 0;
                  t < e.length;
                  t++
                )
                  for (var a = this._els[e[t]], n = 0; a && n < a.length; n++) {
                    var i =
                        a[n].getAttribute("data-tab") ||
                        a[n].getAttribute("name"),
                      r = this.locale.labels[e[t]];
                    i &&
                      (r =
                        this.locale.labels[i + "_tab"] ||
                        this.locale.labels[i] ||
                        r),
                      "dhx_cal_next_button" == e[t]
                        ? (r = this.locale.labels.next)
                        : "dhx_cal_prev_button" == e[t] &&
                          (r = this.locale.labels.prev),
                      this._waiAria.headerButtonsAttributes(a[n], r || "");
                  }
              }),
              (e.updateView = function (e, t) {
                if (!this.$container)
                  throw new Error(
                    "The scheduler is not initialized. \n **scheduler.updateView** or **scheduler.setCurrentView** can be called only after **scheduler.init**"
                  );
                (e = e || this._date), (t = t || this._mode);
                var a = this._obj,
                  n = "dhx_scheduler_" + this._mode,
                  i = "dhx_scheduler_" + t;
                this._mode && -1 != a.className.indexOf(n)
                  ? (a.className = a.className.replace(n, i))
                  : (a.className += " " + i);
                var r,
                  o =
                    !(this._mode != t || !this.config.preserve_scroll) &&
                    this._els.dhx_cal_data[0].scrollTop;
                this._els.dhx_multi_day &&
                  this._els.dhx_multi_day[0] &&
                  (r = this._els.dhx_multi_day[0].scrollTop),
                  this[this._mode + "_view"] &&
                    t &&
                    this._mode != t &&
                    this[this._mode + "_view"](!1),
                  this._close_not_saved(),
                  this._els.dhx_multi_day &&
                    (this._els.dhx_multi_day[0].parentNode.removeChild(
                      this._els.dhx_multi_day[0]
                    ),
                    (this._els.dhx_multi_day = null)),
                  (this._mode = t),
                  (this._date = e),
                  (this._table_view = "month" == this._mode),
                  (this._dy_shift = 0),
                  this.update_view(),
                  this._set_aria_buttons_attrs();
                var s = this._els.dhx_cal_tab;
                if (s)
                  for (var _ = 0; _ < s.length; _++) {
                    var d = s[_];
                    d.getAttribute("data-tab") == this._mode ||
                    d.getAttribute("name") == this._mode + "_tab"
                      ? (d.classList.add("active"),
                        this._waiAria.headerToggleState(d, !0))
                      : (d.classList.remove("active"),
                        this._waiAria.headerToggleState(d, !1));
                  }
                "number" == typeof o &&
                  (this._els.dhx_cal_data[0].scrollTop = o),
                  "number" == typeof r &&
                    this._els.dhx_multi_day &&
                    this._els.dhx_multi_day[0] &&
                    (this._els.dhx_multi_day[0].scrollTop = r);
              }),
              (e.setCurrentView = function (e, t) {
                this.callEvent("onBeforeViewChange", [
                  this._mode,
                  this._date,
                  t || this._mode,
                  e || this._date,
                ]) &&
                  (this.updateView(e, t),
                  this.callEvent("onViewChange", [this._mode, this._date]));
              }),
              (e.render = function (t, a) {
                e.setCurrentView(t, a);
              }),
              (e._render_x_header = function (e, t, a, n, i) {
                i = i || 0;
                var r = document.createElement("div");
                (r.className = "dhx_scale_bar"),
                  this.templates[this._mode + "_scalex_class"] &&
                    (r.className +=
                      " " + this.templates[this._mode + "_scalex_class"](a));
                var o = this._cols[e] - 1;
                "month" == this._mode &&
                  0 === e &&
                  this.config.left_border &&
                  ((r.className += " dhx_scale_bar_border"), (t += 1)),
                  this.set_xy(r, o, this.xy.scale_height - 2, t, i);
                var s = this.templates[this._mode + "_scale_date"](
                  a,
                  this._mode
                );
                (r.innerHTML = s),
                  this._waiAria.dayHeaderAttr(r, s),
                  n.appendChild(r);
              }),
              (e._get_columns_num = function (t, a) {
                var n = 7;
                if (!e._table_view) {
                  var i = e.date["get_" + e._mode + "_end"];
                  i && (a = i(t)),
                    (n = Math.round((a.valueOf() - t.valueOf()) / 864e5));
                }
                return n;
              }),
              (e._get_timeunit_start = function () {
                return this.date[this._mode + "_start"](
                  new Date(this._date.valueOf())
                );
              }),
              (e._get_view_end = function () {
                var t = this._get_timeunit_start(),
                  a = e.date.add(t, 1, this._mode);
                if (!e._table_view) {
                  var n = e.date["get_" + e._mode + "_end"];
                  n && (a = n(t));
                }
                return a;
              }),
              (e._calc_scale_sizes = function (e, t, a) {
                var n = this.config.rtl,
                  i = e,
                  r = this._get_columns_num(t, a);
                this._process_ignores(t, r, "day", 1);
                for (var o = r - this._ignores_detected, s = 0; s < r; s++)
                  this._ignores[s]
                    ? ((this._cols[s] = 0), o++)
                    : (this._cols[s] = Math.floor(i / (o - s))),
                    (i -= this._cols[s]),
                    (this._colsS[s] =
                      (this._cols[s - 1] || 0) +
                      (this._colsS[s - 1] ||
                        (this._table_view
                          ? 0
                          : (n ? this.xy.scroll_width : this.xy.scale_width) +
                            2)));
                (this._colsS.col_length = r),
                  (this._colsS[r] =
                    this._cols[r - 1] + this._colsS[r - 1] || 0);
              }),
              (e._set_scale_col_size = function (e, t, a) {
                var n = this.config;
                this.set_xy(
                  e,
                  t - 1,
                  n.hour_size_px * (n.last_hour - n.first_hour),
                  a + this.xy.scale_width + 1,
                  0
                );
              }),
              (e._render_scales = function (t, a) {
                var n = new Date(e._min_date),
                  i = new Date(e._max_date),
                  r = this.date.date_part(e._currentDate()),
                  o = parseInt(t.style.width, 10),
                  s = new Date(this._min_date),
                  _ = this._get_columns_num(n, i);
                this._calc_scale_sizes(o, n, i);
                var d = 0;
                t.innerHTML = "";
                for (var l = 0; l < _; l++) {
                  if (
                    (this._ignores[l] || this._render_x_header(l, d, s, t),
                    !this._table_view)
                  ) {
                    var c = document.createElement("div"),
                      u = "dhx_scale_holder";
                    s.valueOf() == r.valueOf() && (u = "dhx_scale_holder_now"),
                      c.setAttribute("data-column-index", l),
                      this._ignores_detected &&
                        this._ignores[l] &&
                        (u += " dhx_scale_ignore"),
                      (c.className =
                        u + " " + this.templates.week_date_class(s, r)),
                      this._waiAria.dayColumnAttr(c, s),
                      this._set_scale_col_size(c, this._cols[l], d),
                      a.appendChild(c),
                      this.callEvent("onScaleAdd", [c, s]);
                  }
                  (d += this._cols[l]),
                    (s = this.date.add(s, 1, "day")),
                    (s = this.date.day_start(s));
                }
              }),
              (e._getNavDateElement = function () {
                return this.$container.querySelector(".dhx_cal_date");
              }),
              (e._reset_scale = function () {
                if (this.templates[this._mode + "_date"]) {
                  var t = this._els.dhx_cal_header[0],
                    a = this._els.dhx_cal_data[0],
                    n = this.config;
                  (t.innerHTML = ""), (a.innerHTML = "");
                  var i,
                    r,
                    o =
                      (n.readonly || !n.drag_resize
                        ? " dhx_resize_denied"
                        : "") +
                      (n.readonly || !n.drag_move ? " dhx_move_denied" : "");
                  (a.className = "dhx_cal_data" + o),
                    (this._scales = {}),
                    (this._cols = []),
                    (this._colsS = { height: 0 }),
                    (this._dy_shift = 0),
                    this.set_sizes();
                  var s = this._get_timeunit_start(),
                    _ = e._get_view_end();
                  (i = r = this._table_view ? e.date.week_start(s) : s),
                    (this._min_date = i);
                  var d = this.templates[this._mode + "_date"](
                      s,
                      _,
                      this._mode
                    ),
                    l = this._getNavDateElement();
                  if (
                    (l &&
                      ((l.innerHTML = d), this._waiAria.navBarDateAttr(l, d)),
                    (this._max_date = _),
                    e._render_scales(t, a),
                    this._table_view)
                  )
                    this._reset_month_scale(a, s, r);
                  else if ((this._reset_hours_scale(a, s, r), n.multi_day)) {
                    this._els.dhx_multi_day &&
                      (this._els.dhx_multi_day[0].parentNode.removeChild(
                        this._els.dhx_multi_day[0]
                      ),
                      (this._els.dhx_multi_day = null));
                    var c =
                        this._els.dhx_cal_navline[0].offsetHeight +
                        this._els.dhx_cal_header[0].offsetHeight +
                        1,
                      u = document.createElement("div");
                    (u.className = "dhx_multi_day"),
                      (u.style.visibility = "hidden");
                    var h = this._colsS[this._colsS.col_length],
                      f = n.rtl ? this.xy.scale_width : this.xy.scroll_width,
                      p = Math.max(h + f - 2, 0);
                    this.set_xy(u, p, 0, 0, c), a.parentNode.insertBefore(u, a);
                    var v = u.cloneNode(!0);
                    (v.className = "dhx_multi_day_icon"),
                      (v.style.visibility = "hidden"),
                      this.set_xy(v, this.xy.scale_width, 0, 0, c),
                      u.appendChild(v),
                      (this._els.dhx_multi_day = [u, v]),
                      (this._els.dhx_multi_day[0].onclick =
                        this._click.dhx_cal_data);
                  }
                }
              }),
              (e._reset_hours_scale = function (t, a, n) {
                var i = document.createElement("div");
                i.className = "dhx_scale_holder";
                for (
                  var r = new Date(1980, 1, 1, this.config.first_hour, 0, 0),
                    o = 1 * this.config.first_hour;
                  o < this.config.last_hour;
                  o++
                ) {
                  var s = document.createElement("div");
                  (s.className = "dhx_scale_hour"),
                    (s.style.height = this.config.hour_size_px + "px");
                  var _ = this.xy.scale_width;
                  this.config.left_border &&
                    (s.className += " dhx_scale_hour_border"),
                    (s.style.width = _ + "px");
                  var d = e.templates.hour_scale(r);
                  (s.innerHTML = d),
                    this._waiAria.hourScaleAttr(s, d),
                    i.appendChild(s),
                    (r = this.date.add(r, 1, "hour"));
                }
                t.appendChild(i),
                  this.config.scroll_hour &&
                    (t.scrollTop =
                      this.config.hour_size_px *
                      (this.config.scroll_hour - this.config.first_hour));
              }),
              (e._currentDate = function () {
                return e.config.now_date
                  ? new Date(e.config.now_date)
                  : new Date();
              }),
              (e._reset_ignores = function () {
                (this._ignores = {}), (this._ignores_detected = 0);
              }),
              (e._process_ignores = function (t, a, n, i, r) {
                this._reset_ignores();
                var o = e["ignore_" + this._mode];
                if (o)
                  for (var s = new Date(t), _ = 0; _ < a; _++)
                    o(s) &&
                      ((this._ignores_detected += 1),
                      (this._ignores[_] = !0),
                      r && a++),
                      (s = e.date.add(s, i, n)),
                      e.date[n + "_start"] && (s = e.date[n + "_start"](s));
              }),
              (e._render_month_scale = function (t, a, n, i) {
                var r = e.date.add(a, 1, "month"),
                  o = new Date(n),
                  s = e._currentDate();
                this.date.date_part(s),
                  this.date.date_part(n),
                  (i =
                    i ||
                    Math.ceil(
                      Math.round((r.valueOf() - n.valueOf()) / 864e5) / 7
                    ));
                for (var _ = [], d = 0; d <= 7; d++) {
                  var l = (this._cols[d] || 0) - 1;
                  0 === d && this.config.left_border && (l -= 1),
                    (_[d] = l + "px");
                }
                function c(t) {
                  var a = e._colsS.height;
                  return (
                    void 0 !== e._colsS.heights[t + 1] &&
                      (a =
                        e._colsS.heights[t + 1] - (e._colsS.heights[t] || 0)),
                    a
                  );
                }
                var u = 0,
                  h = document.createElement("table");
                h.setAttribute("cellpadding", "0"),
                  h.setAttribute("cellspacing", "0");
                var f = document.createElement("tbody");
                h.appendChild(f);
                var p = [];
                for (d = 0; d < i; d++) {
                  var v = document.createElement("tr");
                  f.appendChild(v);
                  for (
                    var g = Math.max(c(d) - e.xy.month_head_height, 0), m = 0;
                    m < 7;
                    m++
                  ) {
                    var y = document.createElement("td");
                    v.appendChild(y);
                    var b = "";
                    n < a
                      ? (b = "dhx_before")
                      : n >= r
                      ? (b = "dhx_after")
                      : n.valueOf() == s.valueOf() && (b = "dhx_now"),
                      this._ignores_detected &&
                        this._ignores[m] &&
                        (b += " dhx_scale_ignore"),
                      (y.className =
                        b + " " + this.templates.month_date_class(n, s)),
                      y.setAttribute(
                        "data-cell-date",
                        e.templates.format_date(n)
                      );
                    var x = "dhx_month_body",
                      k = "dhx_month_head";
                    if (
                      (0 === m &&
                        this.config.left_border &&
                        ((x += " dhx_month_body_border"),
                        (k += " dhx_month_head_border")),
                      this._ignores_detected && this._ignores[m])
                    )
                      y.appendChild(document.createElement("div")),
                        y.appendChild(document.createElement("div"));
                    else {
                      this._waiAria.monthCellAttr(y, n);
                      var w = document.createElement("div");
                      (w.className = k),
                        (w.innerHTML = this.templates.month_day(n)),
                        y.appendChild(w);
                      var E = document.createElement("div");
                      (E.className = x),
                        (E.style.height = g + "px"),
                        (E.style.width = _[m]),
                        y.appendChild(E);
                    }
                    p.push(n);
                    var S = n.getDate();
                    (n = this.date.add(n, 1, "day")).getDate() - S > 1 &&
                      (n = new Date(
                        n.getFullYear(),
                        n.getMonth(),
                        S + 1,
                        12,
                        0
                      ));
                  }
                  (e._colsS.heights[d] = u), (u += c(d));
                }
                (this._min_date = o),
                  (this._max_date = n),
                  (t.innerHTML = ""),
                  t.appendChild(h),
                  (this._scales = {});
                var D = t.getElementsByTagName("div");
                for (d = 0; d < p.length; d++) {
                  t = D[2 * d + 1];
                  var N = p[d];
                  this._scales[+N] = t;
                }
                for (d = 0; d < p.length; d++)
                  (N = p[d]),
                    this.callEvent("onScaleAdd", [this._scales[+N], N]);
                return this._max_date;
              }),
              (e._reset_month_scale = function (t, a, n, i) {
                var r = e.date.add(a, 1, "month"),
                  o = e._currentDate();
                this.date.date_part(o),
                  this.date.date_part(n),
                  (i =
                    i ||
                    Math.ceil(
                      Math.round((r.valueOf() - n.valueOf()) / 864e5) / 7
                    ));
                var s =
                  Math.floor(t.clientHeight / i) - this.xy.month_head_height;
                return (
                  (this._colsS.height = s + this.xy.month_head_height),
                  (this._colsS.heights = []),
                  e._render_month_scale(t, a, n, i)
                );
              }),
              (e.getView = function (t) {
                return (
                  t || (t = e.getState().mode),
                  e.matrix && e.matrix[t]
                    ? e.matrix[t]
                    : e._props && e._props[t]
                    ? e._props[t]
                    : null
                );
              }),
              (e.getLabel = function (e, t) {
                for (
                  var a = this.config.lightbox.sections, n = 0;
                  n < a.length;
                  n++
                )
                  if (a[n].map_to == e)
                    for (var i = a[n].options, r = 0; r < i.length; r++)
                      if (i[r].key == t) return i[r].label;
                return "";
              }),
              (e.updateCollection = function (t, a) {
                var n = e.serverList(t);
                return (
                  !!n &&
                  (n.splice(0, n.length),
                  n.push.apply(n, a || []),
                  e.callEvent("onOptionsLoad", []),
                  e.resetLightbox(),
                  e.hideCover(),
                  !0)
                );
              }),
              (e._lame_clone = function (t, a) {
                var n, i, r;
                for (a = a || [], n = 0; n < a.length; n += 2)
                  if (t === a[n]) return a[n + 1];
                if (t && "object" == l(t)) {
                  for (
                    r = Object.create(t),
                      i = [Array, Date, Number, String, Boolean],
                      n = 0;
                    n < i.length;
                    n++
                  )
                    t instanceof i[n] && (r = n ? new i[n](t) : new i[n]());
                  for (n in (a.push(t, r), t))
                    Object.prototype.hasOwnProperty.apply(t, [n]) &&
                      (r[n] = e._lame_clone(t[n], a));
                }
                return r || t;
              }),
              (e._lame_copy = function (e, t) {
                for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
                return e;
              }),
              (e._get_date_from_pos = function (e) {
                var t =
                  this._min_date.valueOf() +
                  6e4 *
                    (e.y * this.config.time_step +
                      24 * (this._table_view ? 0 : e.x) * 60);
                return new Date(this._correct_shift(t));
              }),
              (e.getActionData = function (e) {
                var t = this._mouse_coords(e);
                return { date: this._get_date_from_pos(t), section: t.section };
              }),
              (e._focus = function (e, t) {
                if (e && e.focus)
                  if (this._mobile)
                    window.setTimeout(function () {
                      e.focus();
                    }, 10);
                  else
                    try {
                      t && e.select && e.offsetWidth && e.select(), e.focus();
                    } catch (e) {}
              }),
              (e._get_real_event_length = function (t, a, n) {
                var i,
                  r = a - t,
                  o = n._start_correction + n._end_correction || 0,
                  s = this["ignore_" + this._mode],
                  _ = 0;
                n.render
                  ? ((_ = this._get_date_index(n, t)),
                    (i = this._get_date_index(n, a)))
                  : (i = Math.round(r / 60 / 60 / 1e3 / 24));
                for (var d = !0; _ < i; ) {
                  var l = e.date.add(a, -n.x_step, n.x_unit);
                  s && s(a) && (!d || (d && s(l)))
                    ? (r -= a - l)
                    : ((d = !1), (r -= o)),
                    (a = l),
                    i--;
                }
                return r;
              }),
              (e._get_fictional_event_length = function (t, a, n, i) {
                var r = new Date(t),
                  o = i ? -1 : 1;
                if (n._start_correction || n._end_correction) {
                  var s;
                  s = i
                    ? 60 * r.getHours() +
                      r.getMinutes() -
                      60 * (n.first_hour || 0)
                    : 60 * (n.last_hour || 0) -
                      (60 * r.getHours() + r.getMinutes());
                  var _ = 60 * (n.last_hour - n.first_hour),
                    d = Math.ceil((a / 6e4 - s) / _);
                  d < 0 && (d = 0), (a += d * (1440 - _) * 60 * 1e3);
                }
                var l,
                  c = new Date(1 * t + a * o),
                  u = this["ignore_" + this._mode],
                  h = 0;
                for (
                  n.render
                    ? ((h = this._get_date_index(n, r)),
                      (l = this._get_date_index(n, c)))
                    : (l = Math.round(a / 60 / 60 / 1e3 / 24));
                  h * o <= l * o;

                ) {
                  var f = e.date.add(r, n.x_step * o, n.x_unit);
                  u && u(r) && ((a += (f - r) * o), (l += o)),
                    (r = f),
                    (h += o);
                }
                return a;
              }),
              (e._get_section_view = function () {
                return this.getView();
              }),
              (e._get_section_property = function () {
                return this.matrix && this.matrix[this._mode]
                  ? this.matrix[this._mode].y_property
                  : this._props && this._props[this._mode]
                  ? this._props[this._mode].map_to
                  : null;
              }),
              (e._is_initialized = function () {
                var e = this.getState();
                return this._obj && e.date && e.mode;
              }),
              (e._is_lightbox_open = function () {
                var e = this.getState();
                return null !== e.lightbox_id && void 0 !== e.lightbox_id;
              });
          })(t),
          (function (e) {
            var t = {
                event: function (e, t, a) {
                  e.addEventListener
                    ? e.addEventListener(t, a, !1)
                    : e.attachEvent && e.attachEvent("on" + t, a);
                },
                eventRemove: function (e, t, a) {
                  e.removeEventListener
                    ? e.removeEventListener(t, a, !1)
                    : e.detachEvent && e.detachEvent("on" + t, a);
                },
              },
              a = (function (e, n) {
                (e = e || t.event), (n = n || t.eventRemove);
                var i = [],
                  r = {
                    attach: function (t, a, n, r) {
                      i.push({ element: t, event: a, callback: n, capture: r }),
                        e(t, a, n, r);
                    },
                    detach: function (e, t, a, r) {
                      n(e, t, a, r);
                      for (var o = 0; o < i.length; o++) {
                        var s = i[o];
                        s.element === e &&
                          s.event === t &&
                          s.callback === a &&
                          s.capture === r &&
                          (i.splice(o, 1), o--);
                      }
                    },
                    detachAll: function () {
                      for (var e = i.slice(), t = 0; t < e.length; t++) {
                        var a = e[t];
                        r.detach(a.element, a.event, a.callback, a.capture),
                          r.detach(a.element, a.event, a.callback, void 0),
                          r.detach(a.element, a.event, a.callback, !1),
                          r.detach(a.element, a.event, a.callback, !0);
                      }
                      i.splice(0, i.length);
                    },
                    extend: function () {
                      return a(this.event, this.eventRemove);
                    },
                  };
                return r;
              })();
            (e.event = a.attach),
              (e.eventRemove = a.detach),
              (e._eventRemoveAll = a.detachAll),
              (e._createDomEventScope = a.extend),
              (e._trim = function (e) {
                return (
                  String.prototype.trim ||
                  function () {
                    return this.replace(/^\s+|\s+$/g, "");
                  }
                ).apply(e);
              }),
              (e._isDate = function (e) {
                return !(
                  !e ||
                  "object" != c(e) ||
                  !(e.getFullYear && e.getMonth && e.getDate)
                );
              }),
              (e._isObject = function (e) {
                return e && "object" == c(e);
              });
          })(t),
          (function (e) {
            !(function () {
              var t = new RegExp("<(?:.|\n)*?>", "gm"),
                a = new RegExp(" +", "gm");
              function n(e) {
                return (e + "").replace(t, " ").replace(a, " ");
              }
              var i = new RegExp("'", "gm");
              function r(e) {
                return (e + "").replace(i, "&#39;");
              }
              for (var o in ((e._waiAria = {
                getAttributeString: function (e) {
                  var t = [" "];
                  for (var a in e)
                    if ("function" != typeof e[a] && "object" != u(e[a])) {
                      var i = r(n(e[a]));
                      t.push(a + "='" + i + "'");
                    }
                  return t.push(" "), t.join(" ");
                },
                setAttributes: function (e, t) {
                  for (var a in t) e.setAttribute(a, n(t[a]));
                  return e;
                },
                labelAttr: function (e, t) {
                  return this.setAttributes(e, { "aria-label": t });
                },
                label: function (t) {
                  return e._waiAria.getAttributeString({ "aria-label": t });
                },
                hourScaleAttr: function (e, t) {
                  this.labelAttr(e, t);
                },
                monthCellAttr: function (t, a) {
                  this.labelAttr(t, e.templates.day_date(a));
                },
                navBarDateAttr: function (e, t) {
                  this.labelAttr(e, t);
                },
                dayHeaderAttr: function (e, t) {
                  this.labelAttr(e, t);
                },
                dayColumnAttr: function (t, a) {
                  this.dayHeaderAttr(t, e.templates.day_date(a));
                },
                headerButtonsAttributes: function (e, t) {
                  return this.setAttributes(e, {
                    role: "button",
                    "aria-label": t,
                  });
                },
                headerToggleState: function (e, t) {
                  return this.setAttributes(e, {
                    "aria-pressed": t ? "true" : "false",
                  });
                },
                getHeaderCellAttr: function (t) {
                  return e._waiAria.getAttributeString({ "aria-label": t });
                },
                eventAttr: function (e, t) {
                  this._eventCommonAttr(e, t);
                },
                _eventCommonAttr: function (t, a) {
                  a.setAttribute(
                    "aria-label",
                    n(e.templates.event_text(t.start_date, t.end_date, t))
                  ),
                    e.config.readonly && a.setAttribute("aria-readonly", !0),
                    t.$dataprocessor_class && a.setAttribute("aria-busy", !0),
                    a.setAttribute(
                      "aria-selected",
                      e.getState().select_id == t.id ? "true" : "false"
                    );
                },
                setEventBarAttr: function (e, t) {
                  this._eventCommonAttr(e, t);
                },
                _getAttributes: function (e, t) {
                  var a = {
                    setAttribute: function (e, t) {
                      this[e] = t;
                    },
                  };
                  return e.apply(this, [t, a]), a;
                },
                eventBarAttrString: function (e) {
                  return this.getAttributeString(
                    this._getAttributes(this.setEventBarAttr, e)
                  );
                },
                agendaHeadAttrString: function () {
                  return this.getAttributeString({ role: "row" });
                },
                agendaHeadDateString: function (e) {
                  return this.getAttributeString({
                    role: "columnheader",
                    "aria-label": e,
                  });
                },
                agendaHeadDescriptionString: function (e) {
                  return this.agendaHeadDateString(e);
                },
                agendaDataAttrString: function () {
                  return this.getAttributeString({ role: "grid" });
                },
                agendaEventAttrString: function (e) {
                  var t = this._getAttributes(this._eventCommonAttr, e);
                  return (t.role = "row"), this.getAttributeString(t);
                },
                agendaDetailsBtnString: function () {
                  return this.getAttributeString({
                    role: "button",
                    "aria-label": e.locale.labels.icon_details,
                  });
                },
                gridAttrString: function () {
                  return this.getAttributeString({ role: "grid" });
                },
                gridRowAttrString: function (e) {
                  return this.agendaEventAttrString(e);
                },
                gridCellAttrString: function (e, t, a) {
                  return this.getAttributeString({
                    role: "gridcell",
                    "aria-label": [
                      void 0 === t.label ? t.id : t.label,
                      ": ",
                      a,
                    ],
                  });
                },
                mapAttrString: function () {
                  return this.gridAttrString();
                },
                mapRowAttrString: function (e) {
                  return this.gridRowAttrString(e);
                },
                mapDetailsBtnString: function () {
                  return this.agendaDetailsBtnString();
                },
                minicalHeader: function (e, t) {
                  this.setAttributes(e, {
                    id: t + "",
                    "aria-live": "assertice",
                    "aria-atomic": "true",
                  });
                },
                minicalGrid: function (e, t) {
                  this.setAttributes(e, {
                    "aria-labelledby": t + "",
                    role: "grid",
                  });
                },
                minicalRow: function (e) {
                  this.setAttributes(e, { role: "row" });
                },
                minicalDayCell: function (t, a) {
                  var n =
                    a.valueOf() < e._max_date.valueOf() &&
                    a.valueOf() >= e._min_date.valueOf();
                  this.setAttributes(t, {
                    role: "gridcell",
                    "aria-label": e.templates.day_date(a),
                    "aria-selected": n ? "true" : "false",
                  });
                },
                minicalHeadCell: function (e) {
                  this.setAttributes(e, { role: "columnheader" });
                },
                weekAgendaDayCell: function (t, a) {
                  var n = t.querySelector(".dhx_wa_scale_bar"),
                    i = t.querySelector(".dhx_wa_day_data"),
                    r = e.uid() + "";
                  this.setAttributes(n, { id: r }),
                    this.setAttributes(i, { "aria-labelledby": r });
                },
                weekAgendaEvent: function (e, t) {
                  this.eventAttr(t, e);
                },
                lightboxHiddenAttr: function (e) {
                  e.setAttribute("aria-hidden", "true");
                },
                lightboxVisibleAttr: function (e) {
                  e.setAttribute("aria-hidden", "false");
                },
                lightboxSectionButtonAttrString: function (e) {
                  return this.getAttributeString({
                    role: "button",
                    "aria-label": e,
                    tabindex: "0",
                  });
                },
                yearHeader: function (e, t) {
                  this.setAttributes(e, { id: t + "" });
                },
                yearGrid: function (e, t) {
                  this.minicalGrid(e, t);
                },
                yearHeadCell: function (e) {
                  return this.minicalHeadCell(e);
                },
                yearRow: function (e) {
                  return this.minicalRow(e);
                },
                yearDayCell: function (e) {
                  this.setAttributes(e, { role: "gridcell" });
                },
                lightboxAttr: function (e) {
                  e.setAttribute("role", "dialog"),
                    e.setAttribute("aria-hidden", "true"),
                    e.firstChild.setAttribute("role", "heading");
                },
                lightboxButtonAttrString: function (t) {
                  return this.getAttributeString({
                    role: "button",
                    "aria-label": e.locale.labels[t],
                    tabindex: "0",
                  });
                },
                eventMenuAttrString: function (t) {
                  return this.getAttributeString({
                    role: "button",
                    "aria-label": e.locale.labels[t],
                  });
                },
                lightboxHeader: function (e, t) {
                  e.setAttribute("aria-label", t);
                },
                lightboxSelectAttrString: function (t) {
                  var a = "";
                  switch (t) {
                    case "%Y":
                      a = e.locale.labels.year;
                      break;
                    case "%m":
                      a = e.locale.labels.month;
                      break;
                    case "%d":
                      a = e.locale.labels.day;
                      break;
                    case "%H:%i":
                      a = e.locale.labels.hour + " " + e.locale.labels.minute;
                  }
                  return e._waiAria.getAttributeString({ "aria-label": a });
                },
                messageButtonAttrString: function (e) {
                  return "tabindex='0' role='button' aria-label='" + e + "'";
                },
                messageInfoAttr: function (e) {
                  e.setAttribute("role", "alert");
                },
                messageModalAttr: function (e, t) {
                  e.setAttribute("role", "dialog"),
                    t && e.setAttribute("aria-labelledby", t);
                },
                quickInfoAttr: function (e) {
                  e.setAttribute("role", "dialog");
                },
                quickInfoHeaderAttrString: function () {
                  return " role='heading' ";
                },
                quickInfoHeader: function (e, t) {
                  e.setAttribute("aria-label", t);
                },
                quickInfoButtonAttrString: function (t) {
                  return e._waiAria.getAttributeString({
                    role: "button",
                    "aria-label": t,
                    tabindex: "0",
                  });
                },
                tooltipAttr: function (e) {
                  e.setAttribute("role", "tooltip");
                },
                tooltipVisibleAttr: function (e) {
                  e.setAttribute("aria-hidden", "false");
                },
                tooltipHiddenAttr: function (e) {
                  e.setAttribute("aria-hidden", "true");
                },
              }),
              e._waiAria))
                e._waiAria[o] = (function (t) {
                  return function () {
                    return e.config.wai_aria_attributes
                      ? t.apply(this, arguments)
                      : " ";
                  };
                })(e._waiAria[o]);
            })();
          })(t),
          (t.utils = v),
          (t.$domHelpers = D),
          (t.utils.dom = D),
          (t.uid = v.uid),
          (t.mixin = v.mixin),
          (t.defined = v.defined),
          (t.assert = (function (e) {
            return function (t, a) {
              t ||
                (e.config.show_errors &&
                  !1 !== e.callEvent("onError", [a]) &&
                  (e.message
                    ? e.message({ type: "error", text: a, expire: -1 })
                    : console.log(a)));
            };
          })(t)),
          (t.copy = v.copy),
          (t._getFocusableNodes = D.getFocusableNodes),
          (t._getClassName = D.getClassName),
          (t._locate_css = D.locateCss);
        var a = J(t);
        t.utils.mixin(t, a),
          (t.env = t.$env = T),
          (t.Promise = M),
          (function (e) {
            e.destructor = function () {
              for (var t in (e.callEvent("onDestroy", []),
              this.clearAll(),
              this.$container && (this.$container.innerHTML = ""),
              this._eventRemoveAll && this._eventRemoveAll(),
              this.resetLightbox && this.resetLightbox(),
              this._dp && this._dp.destructor && this._dp.destructor(),
              this.detachAllEvents(),
              this))
                0 === t.indexOf("$") && delete this[t];
              e.$destroyed = !0;
            };
          })(t),
          (function (e) {
            function t(e, t) {
              var a = { method: e };
              if (0 === t.length)
                throw new Error("Arguments list of query is wrong.");
              if (1 === t.length)
                return (
                  "string" == typeof t[0]
                    ? ((a.url = t[0]), (a.async = !0))
                    : ((a.url = t[0].url),
                      (a.async = t[0].async || !0),
                      (a.callback = t[0].callback),
                      (a.headers = t[0].headers)),
                  t[0].data
                    ? "string" != typeof t[0].data
                      ? (a.data = O()(t[0].data))
                      : (a.data = t[0].data)
                    : (a.data = ""),
                  a
                );
              switch (((a.url = t[0]), e)) {
                case "GET":
                case "DELETE":
                  (a.callback = t[1]), (a.headers = t[2]);
                  break;
                case "POST":
                case "PUT":
                  t[1]
                    ? "string" != typeof t[1]
                      ? (a.data = O()(t[1]))
                      : (a.data = t[1])
                    : (a.data = ""),
                    (a.callback = t[2]),
                    (a.headers = t[3]);
              }
              return a;
            }
            (e.Promise = M),
              (e.ajax = {
                cache: !0,
                method: "get",
                serializeRequestParams: O.a,
                parse: function (t) {
                  return "string" != typeof t
                    ? t
                    : ((t = t.replace(/^[\s]+/, "")),
                      "undefined" == typeof DOMParser || e.$env.isIE
                        ? void 0 !== window.ActiveXObject &&
                          (((a = new window.ActiveXObject(
                            "Microsoft.XMLDOM"
                          )).async = "false"),
                          a.loadXML(t))
                        : (a = new DOMParser().parseFromString(t, "text/xml")),
                      a);
                  var a;
                },
                xmltop: function (t, a, n) {
                  if (void 0 === a.status || a.status < 400) {
                    var i = a.responseXML
                      ? a.responseXML || a
                      : this.parse(a.responseText || a);
                    if (
                      i &&
                      null !== i.documentElement &&
                      !i.getElementsByTagName("parsererror").length
                    )
                      return i.getElementsByTagName(t)[0];
                  }
                  return (
                    -1 !== n &&
                      e.callEvent("onLoadXMLError", [
                        "Incorrect XML",
                        arguments[1],
                        n,
                      ]),
                    document.createElement("DIV")
                  );
                },
                xpath: function (t, a) {
                  if ((a.nodeName || (a = a.responseXML || a), e.$env.isIE))
                    return a.selectNodes(t) || [];
                  for (
                    var n,
                      i = [],
                      r = (a.ownerDocument || a).evaluate(
                        t,
                        a,
                        null,
                        XPathResult.ANY_TYPE,
                        null
                      );
                    (n = r.iterateNext());

                  )
                    i.push(n);
                  return i;
                },
                query: function (e) {
                  return this._call(
                    e.method || "GET",
                    e.url,
                    e.data || "",
                    e.async || !0,
                    e.callback,
                    e.headers
                  );
                },
                get: function (e, a, n) {
                  var i = t("GET", arguments);
                  return this.query(i);
                },
                getSync: function (e, a) {
                  var n = t("GET", arguments);
                  return (n.async = !1), this.query(n);
                },
                put: function (e, a, n, i) {
                  var r = t("PUT", arguments);
                  return this.query(r);
                },
                del: function (e, a, n) {
                  var i = t("DELETE", arguments);
                  return this.query(i);
                },
                post: function (e, a, n, i) {
                  1 == arguments.length
                    ? (a = "")
                    : 2 == arguments.length &&
                      "function" == typeof a &&
                      (a = "");
                  var r = t("POST", arguments);
                  return this.query(r);
                },
                postSync: function (e, a, n) {
                  a = null === a ? "" : String(a);
                  var i = t("POST", arguments);
                  return (i.async = !1), this.query(i);
                },
                _call: function (t, a, n, i, r, o) {
                  return new e.Promise(
                    function (s, _) {
                      var d =
                          void 0 ===
                            ("undefined" == typeof XMLHttpRequest
                              ? "undefined"
                              : H(XMLHttpRequest)) || e.$env.isIE
                            ? new window.ActiveXObject("Microsoft.XMLHTTP")
                            : new XMLHttpRequest(),
                        l =
                          null !== navigator.userAgent.match(/AppleWebKit/) &&
                          null !== navigator.userAgent.match(/Qt/) &&
                          null !== navigator.userAgent.match(/Safari/);
                      if (
                        (i &&
                          (d.onreadystatechange = function () {
                            if (4 == d.readyState || (l && 3 == d.readyState)) {
                              if (
                                (200 != d.status || "" === d.responseText) &&
                                !e.callEvent("onAjaxError", [d])
                              )
                                return;
                              setTimeout(function () {
                                "function" == typeof r &&
                                  r.apply(window, [{ xmlDoc: d, filePath: a }]),
                                  s(d),
                                  "function" == typeof r &&
                                    ((r = null), (d = null));
                              }, 0);
                            }
                          }),
                        "GET" != t ||
                          this.cache ||
                          (a +=
                            (a.indexOf("?") >= 0 ? "&" : "?") +
                            "dhxr" +
                            new Date().getTime() +
                            "=1"),
                        d.open(t, a, i),
                        o)
                      )
                        for (var c in o) d.setRequestHeader(c, o[c]);
                      else
                        "POST" == t.toUpperCase() || "PUT" == t || "DELETE" == t
                          ? d.setRequestHeader(
                              "Content-Type",
                              "application/x-www-form-urlencoded"
                            )
                          : "GET" == t && (n = null);
                      if (
                        (d.setRequestHeader(
                          "X-Requested-With",
                          "XMLHttpRequest"
                        ),
                        d.send(n),
                        !i)
                      )
                        return { xmlDoc: d, filePath: a };
                    }.bind(this)
                  );
                },
                urlSeparator: function (e) {
                  return -1 != e.indexOf("?") ? "&" : "?";
                },
              }),
              (e.$ajax = e.ajax);
          })(t),
          j(t),
          (function (e) {
            (e.config = {
              default_date: "%j %M %Y",
              month_date: "%F %Y",
              load_date: "%Y-%m-%d",
              week_date: "%l",
              day_date: "%D, %F %j",
              hour_date: "%H:%i",
              month_day: "%d",
              date_format: "%Y-%m-%d %H:%i",
              api_date: "%d-%m-%Y %H:%i",
              parse_exact_format: !1,
              preserve_length: !0,
              time_step: 5,
              start_on_monday: !0,
              first_hour: 0,
              last_hour: 24,
              readonly: !1,
              drag_resize: !0,
              drag_move: !0,
              drag_create: !0,
              drag_event_body: !0,
              dblclick_create: !0,
              edit_on_create: !0,
              details_on_create: !1,
              header: null,
              resize_month_events: !1,
              resize_month_timed: !1,
              responsive_lightbox: !1,
              rtl: !1,
              cascade_event_display: !1,
              cascade_event_count: 4,
              cascade_event_margin: 30,
              multi_day: !0,
              multi_day_height_limit: 0,
              drag_lightbox: !0,
              preserve_scroll: !0,
              select: !0,
              server_utc: !1,
              touch: !0,
              touch_tip: !0,
              touch_drag: 500,
              touch_swipe_dates: !1,
              quick_info_detached: !0,
              positive_closing: !1,
              drag_highlight: !0,
              limit_drag_out: !1,
              icons_edit: ["icon_save", "icon_cancel"],
              icons_select: ["icon_details", "icon_edit", "icon_delete"],
              buttons_left: ["dhx_save_btn", "dhx_cancel_btn"],
              buttons_right: ["dhx_delete_btn"],
              lightbox: {
                sections: [
                  {
                    name: "description",
                    map_to: "text",
                    type: "textarea",
                    focus: !0,
                  },
                  { name: "time", height: 72, type: "time", map_to: "auto" },
                ],
              },
              highlight_displayed_event: !0,
              left_border: !1,
              ajax_error: "alert",
              delay_render: 0,
              timeline_swap_resize: !0,
              wai_aria_attributes: !0,
              wai_aria_application_role: !0,
              csp: "auto",
              event_attribute: "data-event-id",
              show_errors: !0,
            }),
              (e.config.buttons_left.$inital = e.config.buttons_left.join()),
              (e.config.buttons_right.$inital = e.config.buttons_right.join()),
              (e._helpers = {
                parseDate: function (t) {
                  return (e.templates.xml_date || e.templates.parse_date)(t);
                },
                formatDate: function (t) {
                  return (e.templates.xml_format || e.templates.format_date)(t);
                },
              }),
              (e.templates = {}),
              (e.init_templates = function () {
                var t = e.locale.labels;
                (t.dhx_save_btn = t.icon_save),
                  (t.dhx_cancel_btn = t.icon_cancel),
                  (t.dhx_delete_btn = t.icon_delete);
                var a = e.date.date_to_str,
                  n = e.config;
                !(function (e, t) {
                  for (var a in t) e[a] || (e[a] = t[a]);
                })(e.templates, {
                  day_date: a(n.default_date),
                  month_date: a(n.month_date),
                  week_date: function (t, a) {
                    return n.rtl
                      ? e.templates.day_date(e.date.add(a, -1, "day")) +
                          " &ndash; " +
                          e.templates.day_date(t)
                      : e.templates.day_date(t) +
                          " &ndash; " +
                          e.templates.day_date(e.date.add(a, -1, "day"));
                  },
                  day_scale_date: a(n.default_date),
                  month_scale_date: a(n.week_date),
                  week_scale_date: a(n.day_date),
                  hour_scale: a(n.hour_date),
                  time_picker: a(n.hour_date),
                  event_date: a(n.hour_date),
                  month_day: a(n.month_day),
                  load_format: a(n.load_date),
                  format_date: a(n.date_format, n.server_utc),
                  parse_date: e.date.str_to_date(n.date_format, n.server_utc),
                  api_date: e.date.str_to_date(n.api_date, !1, !1),
                  event_header: function (t, a, n) {
                    return (
                      e.templates.event_date(t) +
                      " - " +
                      e.templates.event_date(a)
                    );
                  },
                  event_text: function (e, t, a) {
                    return a.text;
                  },
                  event_class: function (e, t, a) {
                    return "";
                  },
                  month_date_class: function (e) {
                    return "";
                  },
                  week_date_class: function (e) {
                    return "";
                  },
                  event_bar_date: function (t, a, n) {
                    return e.templates.event_date(t) + " ";
                  },
                  event_bar_text: function (e, t, a) {
                    return a.text;
                  },
                  month_events_link: function (e, t) {
                    return "<a>View more(" + t + " events)</a>";
                  },
                  drag_marker_class: function (e, t, a) {
                    return "";
                  },
                  drag_marker_content: function (e, t, a) {
                    return "";
                  },
                  tooltip_date_format: e.date.date_to_str("%Y-%m-%d %H:%i"),
                  tooltip_text: function (t, a, n) {
                    return (
                      "<b>Event:</b> " +
                      n.text +
                      "<br/><b>Start date:</b> " +
                      e.templates.tooltip_date_format(t) +
                      "<br/><b>End date:</b> " +
                      e.templates.tooltip_date_format(a)
                    );
                  },
                }),
                  this.callEvent("onTemplatesReady", []);
              });
          })(t),
          (function (e) {
            (e._events = {}),
              (e.clearAll = function () {
                (this._events = {}),
                  (this._loaded = {}),
                  (this._edit_id = null),
                  (this._select_id = null),
                  (this._drag_id = null),
                  (this._drag_mode = null),
                  (this._drag_pos = null),
                  (this._new_event = null),
                  this.clear_view(),
                  this.callEvent("onClearAll", []);
              }),
              (e.addEvent = function (t, a, n, i, r) {
                if (!arguments.length) return this.addEventNow();
                var o = t;
                1 != arguments.length &&
                  (((o = r || {}).start_date = t),
                  (o.end_date = a),
                  (o.text = n),
                  (o.id = i)),
                  (o.id = o.id || e.uid()),
                  (o.text = o.text || ""),
                  "string" == typeof o.start_date &&
                    (o.start_date = this.templates.api_date(o.start_date)),
                  "string" == typeof o.end_date &&
                    (o.end_date = this.templates.api_date(o.end_date));
                var s =
                  6e4 * (this.config.event_duration || this.config.time_step);
                o.start_date.valueOf() == o.end_date.valueOf() &&
                  o.end_date.setTime(o.end_date.valueOf() + s),
                  o.start_date.setMilliseconds(0),
                  o.end_date.setMilliseconds(0),
                  (o._timed = this.isOneDayEvent(o));
                var _ = !this._events[o.id];
                return (
                  (this._events[o.id] = o),
                  this.event_updated(o),
                  this._loading ||
                    this.callEvent(_ ? "onEventAdded" : "onEventChanged", [
                      o.id,
                      o,
                    ]),
                  o.id
                );
              }),
              (e.deleteEvent = function (t, a) {
                var n = this._events[t];
                (a ||
                  (this.callEvent("onBeforeEventDelete", [t, n]) &&
                    this.callEvent("onConfirmedBeforeEventDelete", [t, n]))) &&
                  (n &&
                    (e.getState().select_id == t && e.unselect(),
                    delete this._events[t],
                    this.event_updated(n),
                    this._drag_id == n.id &&
                      ((this._drag_id = null),
                      (this._drag_mode = null),
                      (this._drag_pos = null))),
                  this.callEvent("onEventDeleted", [t, n]));
              }),
              (e.getEvent = function (e) {
                return this._events[e];
              }),
              (e.setEvent = function (e, t) {
                t.id || (t.id = e), (this._events[e] = t);
              }),
              (e.for_rendered = function (e, t) {
                for (var a = this._rendered.length - 1; a >= 0; a--)
                  this._rendered[a].getAttribute(this.config.event_attribute) ==
                    e && t(this._rendered[a], a);
              }),
              (e.changeEventId = function (t, a) {
                if (t != a) {
                  var n = this._events[t];
                  n &&
                    ((n.id = a), (this._events[a] = n), delete this._events[t]),
                    this.for_rendered(t, function (t) {
                      t.setAttribute("event_id", a),
                        t.setAttribute(e.config.event_attribute, a);
                    }),
                    this._select_id == t && (this._select_id = a),
                    this._edit_id == t && (this._edit_id = a),
                    this.callEvent("onEventIdChange", [t, a]);
                }
              }),
              (function () {
                for (
                  var t = [
                      "text",
                      "Text",
                      "start_date",
                      "StartDate",
                      "end_date",
                      "EndDate",
                    ],
                    a = function (t) {
                      return function (a) {
                        return e.getEvent(a)[t];
                      };
                    },
                    n = function (t) {
                      return function (a, n) {
                        var i = e.getEvent(a);
                        (i[t] = n),
                          (i._changed = !0),
                          (i._timed = this.isOneDayEvent(i)),
                          e.event_updated(i, !0);
                      };
                    },
                    i = 0;
                  i < t.length;
                  i += 2
                )
                  (e["getEvent" + t[i + 1]] = a(t[i])),
                    (e["setEvent" + t[i + 1]] = n(t[i]));
              })(),
              (e.event_updated = function (e, t) {
                this.is_visible_events(e)
                  ? this.render_view_data()
                  : this.clear_event(e.id);
              }),
              (e.is_visible_events = function (e) {
                if (!this._min_date || !this._max_date) return !1;
                if (
                  e.start_date.valueOf() < this._max_date.valueOf() &&
                  this._min_date.valueOf() < e.end_date.valueOf()
                ) {
                  var t = e.start_date.getHours(),
                    a = e.end_date.getHours() + e.end_date.getMinutes() / 60,
                    n = this.config.last_hour,
                    i = this.config.first_hour;
                  return !(
                    !this._table_view &&
                    (a > n || a <= i) &&
                    (t >= n || t < i) &&
                    !(
                      (e.end_date.valueOf() - e.start_date.valueOf()) / 36e5 >
                        24 - (this.config.last_hour - this.config.first_hour) ||
                      (t < n && a > i)
                    )
                  );
                }
                return !1;
              }),
              (e.isOneDayEvent = function (e) {
                var t = new Date(e.end_date.valueOf() - 1);
                return (
                  e.start_date.getFullYear() === t.getFullYear() &&
                  e.start_date.getMonth() === t.getMonth() &&
                  e.start_date.getDate() === t.getDate() &&
                  e.end_date.valueOf() - e.start_date.valueOf() < 864e5
                );
              }),
              (e.get_visible_events = function (e) {
                var t = [];
                for (var a in this._events)
                  this.is_visible_events(this._events[a]) &&
                    ((e && !this._events[a]._timed) ||
                      (this.filter_event(a, this._events[a]) &&
                        t.push(this._events[a])));
                return t;
              }),
              (e.filter_event = function (e, t) {
                var a = this["filter_" + this._mode];
                return !a || a(e, t);
              }),
              (e._is_main_area_event = function (e) {
                return !!e._timed;
              }),
              (e.render_view_data = function (t, a) {
                var n = !1;
                if (!t) {
                  if (((n = !0), this._not_render))
                    return void (this._render_wait = !0);
                  (this._render_wait = !1),
                    this.clear_view(),
                    (t = this.get_visible_events(
                      !(this._table_view || this.config.multi_day)
                    ));
                }
                for (var i = 0, r = t.length; i < r; i++)
                  this._recalculate_timed(t[i]);
                if (this.config.multi_day && !this._table_view) {
                  var o = [],
                    s = [];
                  for (i = 0; i < t.length; i++)
                    this._is_main_area_event(t[i])
                      ? o.push(t[i])
                      : s.push(t[i]);
                  if (!this._els.dhx_multi_day) {
                    var _ = e._commonErrorMessages.unknownView(this._mode);
                    throw new Error(_);
                  }
                  (this._rendered_location = this._els.dhx_multi_day[0]),
                    (this._table_view = !0),
                    this.render_data(s, a),
                    (this._table_view = !1),
                    (this._rendered_location = this._els.dhx_cal_data[0]),
                    (this._table_view = !1),
                    this.render_data(o, a);
                } else {
                  var d = document.createDocumentFragment(),
                    l = this._els.dhx_cal_data[0];
                  (this._rendered_location = d),
                    this.render_data(t, a),
                    l.appendChild(d),
                    (this._rendered_location = l);
                }
                n && this.callEvent("onDataRender", []);
              }),
              (e._view_month_day = function (t) {
                var a = e.getActionData(t).date;
                e.callEvent("onViewMoreClick", [a]) &&
                  e.setCurrentView(a, "day");
              }),
              (e._render_month_link = function (t) {
                for (
                  var a = this._rendered_location,
                    n = this._lame_clone(t),
                    i = t._sday;
                  i < t._eday;
                  i++
                ) {
                  (n._sday = i), (n._eday = i + 1);
                  var r = e.date,
                    o = e._min_date;
                  (o = r.add(o, n._sweek, "week")),
                    (o = r.add(o, n._sday, "day"));
                  var s = e.getEvents(o, r.add(o, 1, "day")).length,
                    _ = this._get_event_bar_pos(n),
                    d = _.x2 - _.x,
                    l = document.createElement("div");
                  (l.onclick = function (t) {
                    e._view_month_day(t);
                  }),
                    (l.className = "dhx_month_link"),
                    (l.style.top = _.y + "px"),
                    (l.style.left = _.x + "px"),
                    (l.style.width = d + "px"),
                    (l.innerHTML = e.templates.month_events_link(o, s)),
                    this._rendered.push(l),
                    a.appendChild(l);
                }
              }),
              (e._recalculate_timed = function (t) {
                var a;
                t &&
                  (a = "object" != L(t) ? this._events[t] : t) &&
                  (a._timed = e.isOneDayEvent(a));
              }),
              e.attachEvent("onEventChanged", e._recalculate_timed),
              e.attachEvent("onEventAdded", e._recalculate_timed),
              (e.render_data = function (t, a) {
                t = this._pre_render_events(t, a);
                for (var n = {}, i = 0; i < t.length; i++)
                  if (this._table_view)
                    if ("month" != e._mode) this.render_event_bar(t[i]);
                    else {
                      var r = e.config.max_month_events;
                      r !== 1 * r || t[i]._sorder < r
                        ? this.render_event_bar(t[i])
                        : void 0 !== r &&
                          t[i]._sorder == r &&
                          e._render_month_link(t[i]);
                    }
                  else {
                    var o = t[i],
                      s = e.locate_holder(o._sday);
                    if (!s) continue;
                    n[o._sday] ||
                      (n[o._sday] = {
                        real: s,
                        buffer: document.createDocumentFragment(),
                        width: s.clientWidth,
                      });
                    var _ = n[o._sday];
                    this.render_event(o, _.buffer, _.width);
                  }
                for (var i in n)
                  (_ = n[i]).real && _.buffer && _.real.appendChild(_.buffer);
              }),
              (e._get_first_visible_cell = function (e) {
                for (var t = 0; t < e.length; t++)
                  if (-1 == (e[t].className || "").indexOf("dhx_scale_ignore"))
                    return e[t];
                return e[0];
              }),
              (e._pre_render_events = function (t, a) {
                var n = this.xy.bar_height,
                  i = this._colsS.heights,
                  r = (this._colsS.heights = [0, 0, 0, 0, 0, 0, 0]),
                  o = this._els.dhx_cal_data[0];
                if (
                  ((t = this._table_view
                    ? this._pre_render_events_table(t, a)
                    : this._pre_render_events_line(t, a)),
                  this._table_view)
                )
                  if (a) this._colsS.heights = i;
                  else {
                    var s = o.firstChild;
                    if (s.rows) {
                      for (var _ = 0; _ < s.rows.length; _++) {
                        r[_]++;
                        var d = s.rows[_].cells,
                          l = this._colsS.height - this.xy.month_head_height;
                        if (r[_] * n > l) {
                          var c = l;
                          1 * this.config.max_month_events !==
                            this.config.max_month_events ||
                          r[_] <= this.config.max_month_events
                            ? (c = r[_] * n)
                            : (this.config.max_month_events + 1) * n > l &&
                              (c = (this.config.max_month_events + 1) * n);
                          for (var u = 0; u < d.length; u++)
                            d[u].childNodes[1].style.height = c + "px";
                        }
                        r[_] =
                          (r[_ - 1] || 0) +
                          e._get_first_visible_cell(d).offsetHeight;
                      }
                      if (
                        (r.unshift(0),
                        s.parentNode.offsetHeight < s.parentNode.scrollHeight &&
                          !e._colsS.scroll_fix &&
                          e.xy.scroll_width)
                      ) {
                        var h = e._colsS,
                          f = h[h.col_length],
                          p = h.heights.slice();
                        (f -= e.xy.scroll_width || 0),
                          this._calc_scale_sizes(
                            f,
                            this._min_date,
                            this._max_date
                          ),
                          (e._colsS.heights = p),
                          this.set_xy(
                            this._els.dhx_cal_header[0],
                            f,
                            this.xy.scale_height
                          ),
                          e._render_scales(this._els.dhx_cal_header[0]),
                          e._render_month_scale(
                            this._els.dhx_cal_data[0],
                            this._get_timeunit_start(),
                            this._min_date
                          ),
                          (h.scroll_fix = !0);
                      }
                    } else if (
                      (t.length ||
                        "visible" !=
                          this._els.dhx_multi_day[0].style.visibility ||
                        (r[0] = -1),
                      t.length || -1 == r[0])
                    ) {
                      var v = (r[0] + 1) * n + 1,
                        g = v,
                        m = v + "px";
                      this.config.multi_day_height_limit &&
                        (m =
                          (g = Math.min(
                            v,
                            this.config.multi_day_height_limit
                          )) + "px"),
                        (o.style.top =
                          this._els.dhx_cal_navline[0].offsetHeight +
                          this._els.dhx_cal_header[0].offsetHeight +
                          g +
                          "px"),
                        (o.style.height =
                          this._obj.offsetHeight -
                          parseInt(o.style.top, 10) -
                          (this.xy.margin_top || 0) +
                          "px");
                      var y = this._els.dhx_multi_day[0];
                      (y.style.height = m),
                        (y.style.visibility =
                          -1 == r[0] ? "hidden" : "visible");
                      var b = this._els.dhx_multi_day[1];
                      (b.style.height = m),
                        (b.style.visibility =
                          -1 == r[0] ? "hidden" : "visible"),
                        (b.className = r[0]
                          ? "dhx_multi_day_icon"
                          : "dhx_multi_day_icon_small"),
                        (this._dy_shift = (r[0] + 1) * n),
                        this.config.multi_day_height_limit &&
                          (this._dy_shift = Math.min(
                            this.config.multi_day_height_limit,
                            this._dy_shift
                          )),
                        (r[0] = 0),
                        g != v &&
                          ((o.style.top = parseInt(o.style.top) + 2 + "px"),
                          (y.style.overflowY = "auto"),
                          (b.style.position = "fixed"),
                          (b.style.top = ""),
                          (b.style.left = ""));
                    }
                  }
                return t;
              }),
              (e._get_event_sday = function (e) {
                var t = this.date.day_start(new Date(e.start_date));
                return Math.round(
                  (t.valueOf() - this._min_date.valueOf()) / 864e5
                );
              }),
              (e._get_event_mapped_end_date = function (e) {
                var t = e.end_date;
                if (this.config.separate_short_events) {
                  var a = (e.end_date - e.start_date) / 6e4;
                  a < this._min_mapped_duration &&
                    (t = this.date.add(
                      t,
                      this._min_mapped_duration - a,
                      "minute"
                    ));
                }
                return t;
              }),
              (e._pre_render_events_line = function (e, t) {
                e.sort(function (e, t) {
                  return e.start_date.valueOf() == t.start_date.valueOf()
                    ? e.id > t.id
                      ? 1
                      : -1
                    : e.start_date > t.start_date
                    ? 1
                    : -1;
                });
                var a = [],
                  n = [];
                this._min_mapped_duration = Math.ceil(
                  (60 * this.xy.min_event_height) / this.config.hour_size_px
                );
                for (var i = 0; i < e.length; i++) {
                  var r = e[i],
                    o = r.start_date,
                    s = r.end_date,
                    _ = o.getHours(),
                    d = s.getHours();
                  if (
                    ((r._sday = this._get_event_sday(r)),
                    this._ignores[r._sday])
                  )
                    e.splice(i, 1), i--;
                  else {
                    if ((a[r._sday] || (a[r._sday] = []), !t)) {
                      r._inner = !1;
                      for (var l = a[r._sday]; l.length; ) {
                        var c = l[l.length - 1];
                        if (
                          !(
                            this._get_event_mapped_end_date(c).valueOf() <=
                            r.start_date.valueOf()
                          )
                        )
                          break;
                        l.splice(l.length - 1, 1);
                      }
                      for (var u = l.length, h = !1, f = 0; f < l.length; f++)
                        if (
                          ((c = l[f]),
                          this._get_event_mapped_end_date(c).valueOf() <=
                            r.start_date.valueOf())
                        ) {
                          (h = !0),
                            (r._sorder = c._sorder),
                            (u = f),
                            (r._inner = !0);
                          break;
                        }
                      if ((l.length && (l[l.length - 1]._inner = !0), !h))
                        if (l.length)
                          if (l.length <= l[l.length - 1]._sorder) {
                            if (l[l.length - 1]._sorder)
                              for (f = 0; f < l.length; f++) {
                                for (var p = !1, v = 0; v < l.length; v++)
                                  if (l[v]._sorder == f) {
                                    p = !0;
                                    break;
                                  }
                                if (!p) {
                                  r._sorder = f;
                                  break;
                                }
                              }
                            else r._sorder = 0;
                            r._inner = !0;
                          } else {
                            var g = l[0]._sorder;
                            for (f = 1; f < l.length; f++)
                              l[f]._sorder > g && (g = l[f]._sorder);
                            (r._sorder = g + 1), (r._inner = !1);
                          }
                        else r._sorder = 0;
                      l.splice(u, u == l.length ? 0 : 1, r),
                        l.length > (l.max_count || 0)
                          ? ((l.max_count = l.length), (r._count = l.length))
                          : (r._count = r._count ? r._count : 1);
                    }
                    (_ < this.config.first_hour ||
                      d >= this.config.last_hour) &&
                      (n.push(r),
                      (e[i] = r = this._copy_event(r)),
                      _ < this.config.first_hour &&
                        (r.start_date.setHours(this.config.first_hour),
                        r.start_date.setMinutes(0)),
                      d >= this.config.last_hour &&
                        (r.end_date.setMinutes(0),
                        r.end_date.setHours(this.config.last_hour)),
                      r.start_date > r.end_date ||
                        _ == this.config.last_hour) &&
                      (e.splice(i, 1), i--);
                  }
                }
                if (!t) {
                  for (i = 0; i < e.length; i++)
                    e[i]._count = a[e[i]._sday].max_count;
                  for (i = 0; i < n.length; i++)
                    n[i]._count = a[n[i]._sday].max_count;
                }
                return e;
              }),
              (e._time_order = function (e) {
                e.sort(function (e, t) {
                  return e.start_date.valueOf() == t.start_date.valueOf()
                    ? e._timed && !t._timed
                      ? 1
                      : !e._timed && t._timed
                      ? -1
                      : e.id > t.id
                      ? 1
                      : -1
                    : e.start_date > t.start_date
                    ? 1
                    : -1;
                });
              }),
              (e._is_any_multiday_cell_visible = function (t, a, n) {
                var i = this._cols.length,
                  r = !1,
                  o = t,
                  s = !0,
                  _ = new Date(a);
                for (
                  e.date.day_start(new Date(a)).valueOf() != a.valueOf() &&
                  ((_ = e.date.day_start(_)), (_ = e.date.add(_, 1, "day")));
                  o < _;

                ) {
                  s = !1;
                  var d = this.locate_holder_day(o, !1, n) % i;
                  if (!this._ignores[d]) {
                    r = !0;
                    break;
                  }
                  o = e.date.add(o, 1, "day");
                }
                return s || r;
              }),
              (e._pre_render_events_table = function (t, a) {
                this._time_order(t);
                for (
                  var n,
                    i = [],
                    r = [[], [], [], [], [], [], []],
                    o = this._colsS.heights,
                    s = this._cols.length,
                    _ = {},
                    d = 0;
                  d < t.length;
                  d++
                ) {
                  var l = t[d],
                    c = l.id;
                  _[c] || (_[c] = { first_chunk: !0, last_chunk: !0 });
                  var u = _[c],
                    h = n || l.start_date,
                    f = l.end_date;
                  h < this._min_date &&
                    ((u.first_chunk = !1), (h = this._min_date)),
                    f > this._max_date &&
                      ((u.last_chunk = !1), (f = this._max_date));
                  var p = this.locate_holder_day(h, !1, l);
                  if (
                    ((l._sday = p % s), !this._ignores[l._sday] || !l._timed)
                  ) {
                    var v = this.locate_holder_day(f, !0, l) || s;
                    if (
                      ((l._eday = v % s || s),
                      (l._length = v - p),
                      (l._sweek = Math.floor(
                        (this._correct_shift(h.valueOf(), 1) -
                          this._min_date.valueOf()) /
                          (864e5 * s)
                      )),
                      e._is_any_multiday_cell_visible(h, f, l))
                    ) {
                      var g,
                        m = r[l._sweek];
                      for (
                        g = 0;
                        g < m.length && !(m[g]._eday <= l._sday);
                        g++
                      );
                      if (
                        ((l._sorder && a) || (l._sorder = g),
                        l._sday + l._length <= s)
                      )
                        (n = null),
                          i.push(l),
                          (m[g] = l),
                          (o[l._sweek] = m.length - 1),
                          (l._first_chunk = u.first_chunk),
                          (l._last_chunk = u.last_chunk);
                      else {
                        var y = this._copy_event(l);
                        (y.id = l.id),
                          (y._length = s - l._sday),
                          (y._eday = s),
                          (y._sday = l._sday),
                          (y._sweek = l._sweek),
                          (y._sorder = l._sorder),
                          (y.end_date = this.date.add(h, y._length, "day")),
                          (y._first_chunk = u.first_chunk),
                          u.first_chunk && (u.first_chunk = !1),
                          i.push(y),
                          (m[g] = y),
                          (n = y.end_date),
                          (o[l._sweek] = m.length - 1),
                          d--;
                      }
                    }
                  }
                }
                return i;
              }),
              (e._copy_dummy = function () {
                var e = new Date(this.start_date),
                  t = new Date(this.end_date);
                (this.start_date = e), (this.end_date = t);
              }),
              (e._copy_event = function (e) {
                return (this._copy_dummy.prototype = e), new this._copy_dummy();
              }),
              (e._rendered = []),
              (e.clear_view = function () {
                for (var e = 0; e < this._rendered.length; e++) {
                  var t = this._rendered[e];
                  t.parentNode && t.parentNode.removeChild(t);
                }
                this._rendered = [];
              }),
              (e.updateEvent = function (e) {
                var t = this.getEvent(e);
                this.clear_event(e),
                  t &&
                    this.is_visible_events(t) &&
                    this.filter_event(e, t) &&
                    (this._table_view || this.config.multi_day || t._timed) &&
                    (this.config.update_render
                      ? this.render_view_data()
                      : "month" != this.getState().mode ||
                        this.getState().drag_id ||
                        this.isOneDayEvent(t)
                      ? this.render_view_data([t], !0)
                      : this.render_view_data());
              }),
              (e.clear_event = function (t) {
                this.for_rendered(t, function (t, a) {
                  t.parentNode && t.parentNode.removeChild(t),
                    e._rendered.splice(a, 1);
                });
              }),
              (e._y_from_date = function (e) {
                var t = 60 * e.getHours() + e.getMinutes();
                return (
                  Math.round(
                    ((60 * t * 1e3 - 60 * this.config.first_hour * 60 * 1e3) *
                      this.config.hour_size_px) /
                      36e5
                  ) %
                  (24 * this.config.hour_size_px)
                );
              }),
              (e._calc_event_y = function (t, a) {
                a = a || 0;
                var n =
                    60 * t.start_date.getHours() + t.start_date.getMinutes(),
                  i =
                    60 * t.end_date.getHours() + t.end_date.getMinutes() ||
                    60 * e.config.last_hour;
                return {
                  top: this._y_from_date(t.start_date),
                  height: Math.max(
                    a,
                    ((i - n) * this.config.hour_size_px) / 60
                  ),
                };
              }),
              (e.render_event = function (t, a, n) {
                var i = e.xy.menu_width,
                  r = this.config.use_select_menu_space ? 0 : i;
                if (!(t._sday < 0)) {
                  var o = e.locate_holder(t._sday);
                  if (o) {
                    a = a || o;
                    var s = this._calc_event_y(t, e.xy.min_event_height),
                      _ = s.top,
                      d = s.height,
                      l = t._count || 1,
                      c = t._sorder || 0;
                    n = n || o.clientWidth;
                    var u = Math.floor((n - r) / l),
                      h = c * u + 1;
                    if (
                      (t._inner || (u *= l - c),
                      this.config.cascade_event_display)
                    ) {
                      var f = this.config.cascade_event_count,
                        p = this.config.cascade_event_margin;
                      h = (c % f) * p;
                      var v = t._inner ? (((l - c - 1) % f) * p) / 2 : 0;
                      u = Math.floor(n - r - h - v);
                    }
                    var g = this._render_v_bar(
                      t,
                      r + h,
                      _,
                      u,
                      d,
                      t._text_style,
                      e.templates.event_header(t.start_date, t.end_date, t),
                      e.templates.event_text(t.start_date, t.end_date, t)
                    );
                    if (
                      (this._waiAria.eventAttr(t, g),
                      this._rendered.push(g),
                      a.appendChild(g),
                      (h =
                        h +
                        parseInt(
                          this.config.rtl ? o.style.right : o.style.left,
                          10
                        ) +
                        r),
                      this._edit_id == t.id)
                    ) {
                      (g.style.zIndex = 1),
                        (u = Math.max(u - 4, e.xy.editor_width)),
                        (g = document.createElement("div")).setAttribute(
                          "event_id",
                          t.id
                        ),
                        g.setAttribute(this.config.event_attribute, t.id),
                        this._waiAria.eventAttr(t, g),
                        (g.className = "dhx_cal_event dhx_cal_editor"),
                        this.config.rtl && h++,
                        this.set_xy(
                          g,
                          u,
                          d - 20,
                          h,
                          _ + (e.xy.event_header_height || 14)
                        ),
                        t.color && (g.style.backgroundColor = t.color);
                      var m = e.templates.event_class(
                        t.start_date,
                        t.end_date,
                        t
                      );
                      m && (g.className += " " + m);
                      var y = document.createElement("div");
                      this.set_xy(y, u - 6, d - 26),
                        (y.style.cssText +=
                          ";margin:2px 2px 2px 2px;overflow:hidden;"),
                        g.appendChild(y),
                        this._els.dhx_cal_data[0].appendChild(g),
                        this._rendered.push(g),
                        (y.innerHTML =
                          "<textarea class='dhx_cal_editor'>" +
                          t.text +
                          "</textarea>"),
                        (this._editor = y.querySelector("textarea")),
                        this._quirks7 &&
                          (this._editor.style.height = d - 12 + "px"),
                        (this._editor.onkeydown = function (t) {
                          if (t.shiftKey) return !0;
                          var a = t.keyCode;
                          a == e.keys.edit_save && e.editStop(!0),
                            a == e.keys.edit_cancel && e.editStop(!1),
                            (a != e.keys.edit_save &&
                              a != e.keys.edit_cancel) ||
                              (t.preventDefault && t.preventDefault());
                        }),
                        (this._editor.onselectstart = function (e) {
                          return (e.cancelBubble = !0), !0;
                        }),
                        e._focus(this._editor, !0),
                        (this._els.dhx_cal_data[0].scrollLeft = 0);
                    }
                    if (0 !== this.xy.menu_width && this._select_id == t.id) {
                      this.config.cascade_event_display &&
                        this._drag_mode &&
                        (g.style.zIndex = 1);
                      for (
                        var b,
                          x =
                            this.config[
                              "icons_" +
                                (this._edit_id == t.id ? "edit" : "select")
                            ],
                          k = "",
                          w = t.color
                            ? "background-color: " + t.color + ";"
                            : "",
                          E = t.textColor ? "color: " + t.textColor + ";" : "",
                          S = 0;
                        S < x.length;
                        S++
                      )
                        (b = this._waiAria.eventMenuAttrString(x[S])),
                          (k +=
                            "<div class='dhx_menu_icon " +
                            x[S] +
                            "' style='" +
                            w +
                            E +
                            "' title='" +
                            this.locale.labels[x[S]] +
                            "'" +
                            b +
                            "></div>");
                      var D = this._render_v_bar(
                        t,
                        h - i + 1,
                        _,
                        i,
                        20 * x.length + 26 - 2,
                        "",
                        "<div style='" +
                          w +
                          E +
                          "' class='dhx_menu_head'></div>",
                        k,
                        !0
                      );
                      (D.style.left = h - i + 1),
                        this._els.dhx_cal_data[0].appendChild(D),
                        this._rendered.push(D);
                    }
                    this.config.drag_highlight &&
                      this._drag_id == t.id &&
                      this.highlightEventPosition(t);
                  }
                }
              }),
              (e._render_v_bar = function (t, a, n, i, r, o, s, _, d) {
                var l = document.createElement("div"),
                  c = t.id,
                  u = d ? "dhx_cal_event dhx_cal_select_menu" : "dhx_cal_event",
                  h = e.getState();
                h.drag_id == t.id && (u += " dhx_cal_event_drag"),
                  h.select_id == t.id && (u += " dhx_cal_event_selected");
                var f = e.templates.event_class(t.start_date, t.end_date, t);
                f && (u = u + " " + f),
                  this.config.cascade_event_display &&
                    (u += " dhx_cal_event_cascade");
                var p = t.color ? "background-color:" + t.color + ";" : "",
                  v = t.textColor ? "color:" + t.textColor + ";" : "",
                  g = e._border_box_events(),
                  m = i - 2,
                  y = g ? m : i - 4,
                  b = g ? m : i - 6,
                  x = g ? m : i - (this._quirks ? 4 : 14),
                  k = g ? m - 2 : i - 8,
                  w = g
                    ? r - this.xy.event_header_height - 1
                    : r - (this._quirks ? 20 : 30) + 1,
                  E =
                    '<div event_id="' +
                    c +
                    '" ' +
                    this.config.event_attribute +
                    '="' +
                    c +
                    '" class="' +
                    u +
                    '" style="position:absolute; top:' +
                    n +
                    "px; " +
                    (this.config.rtl ? "right:" : "left:") +
                    a +
                    "px; width:" +
                    y +
                    "px; height:" +
                    r +
                    "px;" +
                    (o || "") +
                    '"></div>';
                l.innerHTML = E;
                var S = l.cloneNode(!0).firstChild;
                if (!d && e.renderEvent(S, t, i, r, s, _)) return S;
                S = l.firstChild;
                var D =
                  '<div class="dhx_event_move dhx_header" style=" width:' +
                  b +
                  "px;" +
                  p +
                  '" >&nbsp;</div>';
                (D +=
                  '<div class="dhx_event_move dhx_title" style="' +
                  p +
                  v +
                  '">' +
                  s +
                  "</div>"),
                  (D +=
                    '<div class="dhx_body" style=" width:' +
                    x +
                    "px; height:" +
                    w +
                    "px;" +
                    p +
                    v +
                    '">' +
                    _ +
                    "</div>");
                var N = "dhx_event_resize dhx_footer";
                return (
                  (d || !1 === t._drag_resize) &&
                    (N = "dhx_resize_denied " + N),
                  (D +=
                    '<div class="' +
                    N +
                    '" style=" width:' +
                    k +
                    "px;" +
                    (d ? " margin-top:-1px;" : "") +
                    p +
                    v +
                    '" ></div>'),
                  (S.innerHTML = D),
                  S
                );
              }),
              (e.renderEvent = function () {
                return !1;
              }),
              (e.locate_holder = function (e) {
                return "day" == this._mode
                  ? this._els.dhx_cal_data[0].firstChild
                  : this._els.dhx_cal_data[0].childNodes[e];
              }),
              (e.locate_holder_day = function (e, t) {
                var a = Math.floor(
                  (this._correct_shift(e, 1) - this._min_date) / 864e5
                );
                return t && this.date.time_part(e) && a++, a;
              }),
              (e._get_dnd_order = function (e, t, a) {
                if (!this._drag_event) return e;
                this._drag_event._orig_sorder
                  ? (e = this._drag_event._orig_sorder)
                  : (this._drag_event._orig_sorder = e);
                for (var n = t * e; n + t > a; ) e--, (n -= t);
                return (e = Math.max(e, 0));
              }),
              (e._get_event_bar_pos = function (t) {
                var a = this.config.rtl,
                  n = this._colsS,
                  i = n[t._sday],
                  r = n[t._eday];
                a &&
                  ((i = n[n.col_length] - n[t._eday] + n[0]),
                  (r = n[n.col_length] - n[t._sday] + n[0])),
                  r == i && (r = n[t._eday + 1]);
                var o = this.xy.bar_height,
                  s = t._sorder;
                if (t.id == this._drag_id) {
                  var _ =
                    n.heights[t._sweek + 1] -
                    n.heights[t._sweek] -
                    this.xy.month_head_height;
                  s = e._get_dnd_order(s, o, _);
                }
                var d = s * o;
                return {
                  x: i,
                  x2: r,
                  y:
                    n.heights[t._sweek] +
                    (n.height ? this.xy.month_scale_height + 2 : 2) +
                    d,
                };
              }),
              (e.render_event_bar = function (t) {
                var a = this._rendered_location,
                  n = this._get_event_bar_pos(t),
                  i = n.y,
                  r = n.x,
                  o = n.x2,
                  s = "";
                if (o) {
                  var _ =
                      e.config.resize_month_events &&
                      "month" == this._mode &&
                      (!t._timed || e.config.resize_month_timed),
                    d = document.createElement("div"),
                    l = t.hasOwnProperty("_first_chunk") && t._first_chunk,
                    c = t.hasOwnProperty("_last_chunk") && t._last_chunk,
                    u = _ && (t._timed || l),
                    h = _ && (t._timed || c),
                    f = !0,
                    p = "dhx_cal_event_clear";
                  (t._timed && !_) || ((f = !1), (p = "dhx_cal_event_line")),
                    l && (p += " dhx_cal_event_line_start"),
                    c && (p += " dhx_cal_event_line_end"),
                    u &&
                      (s +=
                        "<div class='dhx_event_resize dhx_event_resize_start'></div>"),
                    h &&
                      (s +=
                        "<div class='dhx_event_resize dhx_event_resize_end'></div>");
                  var v = e.templates.event_class(t.start_date, t.end_date, t);
                  v && (p += " " + v);
                  var g = t.color ? "background:" + t.color + ";" : "",
                    m = t.textColor ? "color:" + t.textColor + ";" : "",
                    y = [
                      "position:absolute",
                      "top:" + i + "px",
                      "left:" + r + "px",
                      "width:" + (o - r - 3 - (f ? 1 : 0)) + "px",
                      m,
                      g,
                      t._text_style || "",
                    ].join(";"),
                    b =
                      "<div event_id='" +
                      t.id +
                      "' " +
                      this.config.event_attribute +
                      "='" +
                      t.id +
                      "' class='" +
                      p +
                      "' style='" +
                      y +
                      "'" +
                      this._waiAria.eventBarAttrString(t) +
                      ">";
                  _ && (b += s),
                    "month" == e.getState().mode && (t = e.getEvent(t.id)),
                    t._timed &&
                      (b += e.templates.event_bar_date(
                        t.start_date,
                        t.end_date,
                        t
                      )),
                    (b +=
                      e.templates.event_bar_text(t.start_date, t.end_date, t) +
                      "</div>"),
                    (b += "</div>"),
                    (d.innerHTML = b),
                    this._rendered.push(d.firstChild),
                    a.appendChild(d.firstChild);
                }
              }),
              (e._locate_event = function (e) {
                for (var t = null; e && !t && e.getAttribute; )
                  (t = e.getAttribute(this.config.event_attribute)),
                    (e = e.parentNode);
                return t;
              }),
              (e.edit = function (e) {
                this._edit_id != e &&
                  (this.editStop(!1, e),
                  (this._edit_id = e),
                  this.updateEvent(e));
              }),
              (e.editStop = function (e, t) {
                if (!t || this._edit_id != t) {
                  var a = this.getEvent(this._edit_id);
                  a &&
                    (e && (a.text = this._editor.value),
                    (this._edit_id = null),
                    (this._editor = null),
                    this.updateEvent(a.id),
                    this._edit_stop_event(a, e));
                }
              }),
              (e._edit_stop_event = function (e, t) {
                this._new_event
                  ? (t
                      ? this.callEvent("onEventAdded", [e.id, e])
                      : e && this.deleteEvent(e.id, !0),
                    (this._new_event = null))
                  : t && this.callEvent("onEventChanged", [e.id, e]);
              }),
              (e.getEvents = function (e, t) {
                var a = [];
                for (var n in this._events) {
                  var i = this._events[n];
                  i &&
                    ((!e && !t) || (i.start_date < t && i.end_date > e)) &&
                    a.push(i);
                }
                return a;
              }),
              (e.getRenderedEvent = function (t) {
                if (t) {
                  for (var a = e._rendered, n = 0; n < a.length; n++) {
                    var i = a[n];
                    if (i.getAttribute(e.config.event_attribute) == t) return i;
                  }
                  return null;
                }
              }),
              (e.showEvent = function (t, a) {
                t &&
                  "object" === L(t) &&
                  ((a = t.mode), (c = t.section), (t = t.section));
                var n =
                  "number" == typeof t || "string" == typeof t
                    ? e.getEvent(t)
                    : t;
                if (
                  ((a = a || e._mode),
                  n &&
                    (!this.checkEvent("onBeforeEventDisplay") ||
                      this.callEvent("onBeforeEventDisplay", [n, a])))
                ) {
                  var i = e.config.scroll_hour;
                  e.config.scroll_hour = n.start_date.getHours();
                  var r = e.config.preserve_scroll;
                  e.config.preserve_scroll = !1;
                  var o = n.color,
                    s = n.textColor;
                  if (
                    (e.config.highlight_displayed_event &&
                      ((n.color = e.config.displayed_event_color),
                      (n.textColor = e.config.displayed_event_text_color)),
                    e.setCurrentView(new Date(n.start_date), a),
                    (e.config.scroll_hour = i),
                    (e.config.preserve_scroll = r),
                    e.matrix && e.matrix[a])
                  ) {
                    var _ = e.getView(),
                      d = _.y_property,
                      l = e.getEvent(n.id);
                    if (l) {
                      if (!c) {
                        var c = l[d];
                        Array.isArray(c)
                          ? (c = c[0])
                          : "string" == typeof c &&
                            e.config.section_delimiter &&
                            c.indexOf(e.config.section_delimiter) > -1 &&
                            (c = c.split(e.config.section_delimiter)[0]);
                      }
                      var u = _.getSectionTop(c),
                        h = _.posFromDate(l.start_date),
                        f = e.$container.querySelector(
                          ".dhx_timeline_data_wrapper"
                        );
                      if (
                        ((h -= (f.offsetWidth - _.dx) / 2),
                        (u = u - f.offsetHeight / 2 + _.dy / 2),
                        _._smartRenderingEnabled())
                      )
                        var p = _.attachEvent("onScroll", function () {
                          v(), _.detachEvent(p);
                        });
                      _.scrollTo({ left: h, top: u }),
                        _._smartRenderingEnabled() || v();
                    }
                  } else v();
                  e.callEvent("onAfterEventDisplay", [n, a]);
                }
                function v() {
                  (n.color = o), (n.textColor = s);
                }
              });
          })(t),
          (function (e) {
            (e._append_drag_marker = function (t) {
              if (!t.parentNode) {
                var a = e._els.dhx_cal_data[0].lastChild,
                  n = e._getClassName(a);
                n.indexOf("dhx_scale_holder") < 0 &&
                  a.previousSibling &&
                  (a = a.previousSibling),
                  (n = e._getClassName(a)),
                  a && 0 === n.indexOf("dhx_scale_holder") && a.appendChild(t);
              }
            }),
              (e._update_marker_position = function (t, a) {
                var n = e._calc_event_y(a, 0);
                (t.style.top = n.top + "px"),
                  (t.style.height = n.height + "px");
              }),
              (e.highlightEventPosition = function (e) {
                var t = document.createElement("div");
                t.setAttribute("event_id", e.id),
                  t.setAttribute(this.config.event_attribute, e.id),
                  this._rendered.push(t),
                  this._update_marker_position(t, e);
                var a = this.templates.drag_marker_class(
                    e.start_date,
                    e.end_date,
                    e
                  ),
                  n = this.templates.drag_marker_content(
                    e.start_date,
                    e.end_date,
                    e
                  );
                (t.className = "dhx_drag_marker"),
                  a && (t.className += " " + a),
                  n && (t.innerHTML = n),
                  this._append_drag_marker(t);
              });
          })(t),
          I(t),
          (function (e) {
            (e._lightbox_controls = {}),
              (e.formSection = function (t) {
                for (
                  var a = this.config.lightbox.sections, n = 0;
                  n < a.length && a[n].name != t;
                  n++
                );
                if (n === a.length) return null;
                var i = a[n];
                e._lightbox || e.getLightbox();
                var r = document.getElementById(i.id),
                  o = r.nextSibling,
                  s = {
                    section: i,
                    header: r,
                    node: o,
                    getValue: function (t) {
                      return e.form_blocks[i.type].get_value(o, t || {}, i);
                    },
                    setValue: function (t, a) {
                      return e.form_blocks[i.type].set_value(o, t, a || {}, i);
                    },
                  },
                  _ = e._lightbox_controls["get_" + i.type + "_control"];
                return _ ? _(s) : s;
              }),
              (e._lightbox_controls.get_template_control = function (e) {
                return (e.control = e.node), e;
              }),
              (e._lightbox_controls.get_select_control = function (e) {
                return (
                  (e.control = e.node.getElementsByTagName("select")[0]), e
                );
              }),
              (e._lightbox_controls.get_textarea_control = function (e) {
                return (
                  (e.control = e.node.getElementsByTagName("textarea")[0]), e
                );
              }),
              (e._lightbox_controls.get_time_control = function (e) {
                return (e.control = e.node.getElementsByTagName("select")), e;
              }),
              (e._lightbox_controls.defaults = {
                template: { height: 30 },
                textarea: { height: 200 },
                select: { height: 23 },
                time: { height: 20 },
              }),
              (e.form_blocks = {
                template: {
                  render: function (t) {
                    var a = e._lightbox_controls.defaults.template,
                      n = a ? a.height : 30;
                    return (
                      "<div class='dhx_cal_ltext dhx_cal_template' style='height:" +
                      (t.height || n || 30) +
                      "px;'></div>"
                    );
                  },
                  set_value: function (e, t, a, n) {
                    e.innerHTML = t || "";
                  },
                  get_value: function (e, t, a) {
                    return e.innerHTML || "";
                  },
                  focus: function (e) {},
                },
                textarea: {
                  render: function (t) {
                    var a = e._lightbox_controls.defaults.textarea,
                      n = a ? a.height : 200;
                    return (
                      "<div class='dhx_cal_ltext' style='height:" +
                      (t.height || n || "130") +
                      "px;'><textarea></textarea></div>"
                    );
                  },
                  set_value: function (t, a, n) {
                    e.form_blocks.textarea._get_input(t).value = a || "";
                  },
                  get_value: function (t, a) {
                    return e.form_blocks.textarea._get_input(t).value;
                  },
                  focus: function (t) {
                    var a = e.form_blocks.textarea._get_input(t);
                    e._focus(a, !0);
                  },
                  _get_input: function (e) {
                    return e.getElementsByTagName("textarea")[0];
                  },
                },
                select: {
                  render: function (t) {
                    for (
                      var a = e._lightbox_controls.defaults.select,
                        n = a ? a.height : 23,
                        i =
                          "<div class='dhx_cal_ltext' style='height:" +
                          (t.height || n || "23") +
                          "px;'><select style='width:100%;'>",
                        r = 0;
                      r < t.options.length;
                      r++
                    )
                      i +=
                        "<option value='" +
                        t.options[r].key +
                        "'>" +
                        t.options[r].label +
                        "</option>";
                    return (i += "</select></div>");
                  },
                  set_value: function (e, t, a, n) {
                    var i = e.firstChild;
                    !i._dhx_onchange &&
                      n.onchange &&
                      ((i.onchange = n.onchange), (i._dhx_onchange = !0)),
                      void 0 === t && (t = (i.options[0] || {}).value),
                      (i.value = t || "");
                  },
                  get_value: function (e, t) {
                    return e.firstChild.value;
                  },
                  focus: function (t) {
                    var a = t.firstChild;
                    e._focus(a, !0);
                  },
                },
                time: {
                  render: function (t) {
                    t.time_format ||
                      (t.time_format = ["%H:%i", "%d", "%m", "%Y"]),
                      (t._time_format_order = {});
                    var a = t.time_format,
                      n = e.config,
                      i = e.date.date_part(e._currentDate()),
                      r = 1440,
                      o = 0;
                    e.config.limit_time_select &&
                      ((r = 60 * n.last_hour + 1),
                      (o = 60 * n.first_hour),
                      i.setHours(n.first_hour));
                    for (var s = "", _ = 0; _ < a.length; _++) {
                      var d = a[_];
                      _ > 0 && (s += " ");
                      var l = "",
                        c = "";
                      switch (d) {
                        case "%Y":
                          var u, h, f;
                          (l = "dhx_lightbox_year_select"),
                            (t._time_format_order[3] = _),
                            t.year_range &&
                              (isNaN(t.year_range)
                                ? t.year_range.push &&
                                  ((h = t.year_range[0]), (f = t.year_range[1]))
                                : (u = t.year_range)),
                            (u = u || 10);
                          var p = p || Math.floor(u / 2);
                          (h = h || i.getFullYear() - p), (f = f || h + u);
                          for (var v = h; v < f; v++)
                            c += "<option value='" + v + "'>" + v + "</option>";
                          break;
                        case "%m":
                          for (
                            l = "dhx_lightbox_month_select",
                              t._time_format_order[2] = _,
                              v = 0;
                            v < 12;
                            v++
                          )
                            c +=
                              "<option value='" +
                              v +
                              "'>" +
                              this.locale.date.month_full[v] +
                              "</option>";
                          break;
                        case "%d":
                          for (
                            l = "dhx_lightbox_day_select",
                              t._time_format_order[1] = _,
                              v = 1;
                            v < 32;
                            v++
                          )
                            c += "<option value='" + v + "'>" + v + "</option>";
                          break;
                        case "%H:%i":
                          (l = "dhx_lightbox_time_select"),
                            (t._time_format_order[0] = _),
                            (v = o);
                          var g = i.getDate();
                          for (t._time_values = []; v < r; )
                            (c +=
                              "<option value='" +
                              v +
                              "'>" +
                              this.templates.time_picker(i) +
                              "</option>"),
                              t._time_values.push(v),
                              i.setTime(
                                i.valueOf() + 60 * this.config.time_step * 1e3
                              ),
                              (v =
                                24 * (i.getDate() != g ? 1 : 0) * 60 +
                                60 * i.getHours() +
                                i.getMinutes());
                      }
                      if (c) {
                        var m = e._waiAria.lightboxSelectAttrString(d);
                        s +=
                          "<select class='" +
                          l +
                          "' " +
                          (t.readonly ? "disabled='disabled'" : "") +
                          m +
                          ">" +
                          c +
                          "</select> ";
                      }
                    }
                    var y = e._lightbox_controls.defaults.select;
                    return (
                      "<div style='height:" +
                      ((y ? y.height : 23) || 30) +
                      "px;padding-top:0px;font-size:inherit;' class='dhx_section_time'>" +
                      s +
                      "<span style='font-weight:normal; font-size:10pt;'> &nbsp;&ndash;&nbsp; </span>" +
                      s +
                      "</div>"
                    );
                  },
                  set_value: function (t, a, n, i) {
                    var r,
                      o,
                      s = e.config,
                      _ = t.getElementsByTagName("select"),
                      d = i._time_format_order;
                    if (s.full_day) {
                      if (!t._full_day) {
                        var l =
                          "<label class='dhx_fullday'><input type='checkbox' name='full_day' value='true'> " +
                          e.locale.labels.full_day +
                          "&nbsp;</label></input>";
                        e.config.wide_form ||
                          (l = t.previousSibling.innerHTML + l),
                          (t.previousSibling.innerHTML = l),
                          (t._full_day = !0);
                      }
                      var c =
                        t.previousSibling.getElementsByTagName("input")[0];
                      (c.checked =
                        0 === e.date.time_part(n.start_date) &&
                        0 === e.date.time_part(n.end_date)),
                        (_[d[0]].disabled = c.checked),
                        (_[d[0] + _.length / 2].disabled = c.checked),
                        (c.onclick = function () {
                          if (c.checked) {
                            var a = {};
                            e.form_blocks.time.get_value(t, a, i),
                              (r = e.date.date_part(a.start_date)),
                              (+(o = e.date.date_part(a.end_date)) == +r ||
                                (+o >= +r &&
                                  (0 !== n.end_date.getHours() ||
                                    0 !== n.end_date.getMinutes()))) &&
                                (o = e.date.add(o, 1, "day"));
                          } else (r = null), (o = null);
                          (_[d[0]].disabled = c.checked),
                            (_[d[0] + _.length / 2].disabled = c.checked),
                            f(_, 0, r || n.start_date),
                            f(_, 4, o || n.end_date);
                        });
                    }
                    if (s.auto_end_date && s.event_duration)
                      for (
                        var u = function () {
                            s.auto_end_date &&
                              s.event_duration &&
                              ((r = new Date(
                                _[d[3]].value,
                                _[d[2]].value,
                                _[d[1]].value,
                                0,
                                _[d[0]].value
                              )),
                              (o = new Date(
                                r.getTime() + 60 * e.config.event_duration * 1e3
                              )),
                              f(_, 4, o));
                          },
                          h = 0;
                        h < 4;
                        h++
                      )
                        _[h].onchange = u;
                    function f(e, t, a) {
                      for (
                        var n = i._time_values,
                          r = 60 * a.getHours() + a.getMinutes(),
                          o = r,
                          s = !1,
                          _ = 0;
                        _ < n.length;
                        _++
                      ) {
                        var l = n[_];
                        if (l === r) {
                          s = !0;
                          break;
                        }
                        l < r && (o = l);
                      }
                      (e[t + d[0]].value = s ? r : o),
                        s || o || (e[t + d[0]].selectedIndex = -1),
                        (e[t + d[1]].value = a.getDate()),
                        (e[t + d[2]].value = a.getMonth()),
                        (e[t + d[3]].value = a.getFullYear());
                    }
                    f(_, 0, n.start_date), f(_, 4, n.end_date);
                  },
                  get_value: function (t, a, n) {
                    var i = t.getElementsByTagName("select"),
                      r = n._time_format_order;
                    if (
                      ((a.start_date = new Date(
                        i[r[3]].value,
                        i[r[2]].value,
                        i[r[1]].value,
                        0,
                        i[r[0]].value
                      )),
                      (a.end_date = new Date(
                        i[r[3] + 4].value,
                        i[r[2] + 4].value,
                        i[r[1] + 4].value,
                        0,
                        i[r[0] + 4].value
                      )),
                      !i[r[3]].value || !i[r[3] + 4].value)
                    ) {
                      var o = e.getEvent(e._lightbox_id);
                      o &&
                        ((a.start_date = o.start_date),
                        (a.end_date = o.end_date));
                    }
                    return (
                      a.end_date <= a.start_date &&
                        (a.end_date = e.date.add(
                          a.start_date,
                          e.config.time_step,
                          "minute"
                        )),
                      {
                        start_date: new Date(a.start_date),
                        end_date: new Date(a.end_date),
                      }
                    );
                  },
                  focus: function (t) {
                    e._focus(t.getElementsByTagName("select")[0]);
                  },
                },
              }),
              (e._setLbPosition = function (e) {
                if (e) {
                  var t =
                      window.pageYOffset ||
                      document.body.scrollTop ||
                      document.documentElement.scrollTop,
                    a =
                      window.pageXOffset ||
                      document.body.scrollLeft ||
                      document.documentElement.scrollLeft,
                    n =
                      window.innerHeight ||
                      document.documentElement.clientHeight;
                  (e.style.top = t
                    ? Math.round(t + Math.max((n - e.offsetHeight) / 2, 0)) +
                      "px"
                    : Math.round(Math.max((n - e.offsetHeight) / 2, 0) + 9) +
                      "px"),
                    document.documentElement.scrollWidth >
                    document.body.offsetWidth
                      ? (e.style.left =
                          Math.round(
                            a + (document.body.offsetWidth - e.offsetWidth) / 2
                          ) + "px")
                      : (e.style.left =
                          Math.round(
                            (document.body.offsetWidth - e.offsetWidth) / 2
                          ) + "px");
                }
              }),
              (e.showCover = function (t) {
                t && ((t.style.display = "block"), this._setLbPosition(t)),
                  e.config.responsive_lightbox &&
                    (document.documentElement.classList.add(
                      "dhx_cal_overflow_container"
                    ),
                    document.body.classList.add("dhx_cal_overflow_container")),
                  this.show_cover();
              }),
              (e.showLightbox = function (e) {
                if (e)
                  if (this.callEvent("onBeforeLightbox", [e])) {
                    var t = this.getLightbox();
                    this.showCover(t),
                      this._fill_lightbox(e, t),
                      this._waiAria.lightboxVisibleAttr(t),
                      this.callEvent("onLightbox", [e]);
                  } else this._new_event && (this._new_event = null);
              }),
              (e._fill_lightbox = function (t, a) {
                var n = this.getEvent(t),
                  i = a.getElementsByTagName("span"),
                  r = [];
                if (e.templates.lightbox_header) {
                  r.push("");
                  var o = e.templates.lightbox_header(
                    n.start_date,
                    n.end_date,
                    n
                  );
                  r.push(o), (i[1].innerHTML = ""), (i[2].innerHTML = o);
                } else {
                  var s = this.templates.event_header(
                      n.start_date,
                      n.end_date,
                      n
                    ),
                    _ = (
                      this.templates.event_bar_text(
                        n.start_date,
                        n.end_date,
                        n
                      ) || ""
                    ).substr(0, 70);
                  r.push(s),
                    r.push(_),
                    (i[1].innerHTML = s),
                    (i[2].innerHTML = _);
                }
                this._waiAria.lightboxHeader(a, r.join(" "));
                for (
                  var d = this.config.lightbox.sections, l = 0;
                  l < d.length;
                  l++
                ) {
                  var c = d[l],
                    u = e._get_lightbox_section_node(c),
                    h = this.form_blocks[c.type],
                    f = void 0 !== n[c.map_to] ? n[c.map_to] : c.default_value;
                  h.set_value.call(this, u, f, n, c),
                    d[l].focus && h.focus.call(this, u);
                }
                e._lightbox_id = t;
              }),
              (e._get_lightbox_section_node = function (e) {
                return document.getElementById(e.id).nextSibling;
              }),
              (e._lightbox_out = function (e) {
                for (
                  var t = this.config.lightbox.sections, a = 0;
                  a < t.length;
                  a++
                ) {
                  var n = document.getElementById(t[a].id);
                  n = n ? n.nextSibling : n;
                  var i = this.form_blocks[t[a].type].get_value.call(
                    this,
                    n,
                    e,
                    t[a]
                  );
                  "auto" != t[a].map_to && (e[t[a].map_to] = i);
                }
                return e;
              }),
              (e._empty_lightbox = function (t) {
                var a = e._lightbox_id,
                  n = this.getEvent(a);
                this._lame_copy(n, t),
                  this.setEvent(n.id, n),
                  this._edit_stop_event(n, !0),
                  this.render_view_data();
              }),
              (e.hide_lightbox = function (t) {
                e.endLightbox(!1, this.getLightbox());
              }),
              (e.hideCover = function (t) {
                t && (t.style.display = "none"),
                  this.hide_cover(),
                  e.config.responsive_lightbox &&
                    (document.documentElement.classList.remove(
                      "dhx_cal_overflow_container"
                    ),
                    document.body.classList.remove(
                      "dhx_cal_overflow_container"
                    ));
              }),
              (e.hide_cover = function () {
                this._cover && this._cover.parentNode.removeChild(this._cover),
                  (this._cover = null);
              }),
              (e.show_cover = function () {
                this._cover ||
                  ((this._cover = document.createElement("div")),
                  (this._cover.className = "dhx_cal_cover"),
                  document.body.appendChild(this._cover));
              }),
              (e.save_lightbox = function () {
                var e = this._lightbox_out(
                  {},
                  this._lame_copy(this.getEvent(this._lightbox_id))
                );
                (this.checkEvent("onEventSave") &&
                  !this.callEvent("onEventSave", [
                    this._lightbox_id,
                    e,
                    this._new_event,
                  ])) ||
                  (this._empty_lightbox(e), this.hide_lightbox());
              }),
              (e.startLightbox = function (e, t) {
                (this._lightbox_id = e),
                  (this._custom_lightbox = !0),
                  (this._temp_lightbox = this._lightbox),
                  (this._lightbox = t),
                  this.showCover(t);
              }),
              (e.endLightbox = function (t, a) {
                a = a || e.getLightbox();
                var n = e.getEvent(this._lightbox_id);
                n && this._edit_stop_event(n, t),
                  t && e.render_view_data(),
                  this.hideCover(a),
                  this._custom_lightbox &&
                    ((this._lightbox = this._temp_lightbox),
                    (this._custom_lightbox = !1)),
                  (this._temp_lightbox = this._lightbox_id = null),
                  this._waiAria.lightboxHiddenAttr(a),
                  this.callEvent("onAfterLightbox", []);
              }),
              (e.resetLightbox = function () {
                e._lightbox &&
                  !e._custom_lightbox &&
                  e._lightbox.parentNode.removeChild(e._lightbox),
                  (e._lightbox = null);
              }),
              (e.cancel_lightbox = function () {
                this._lightbox_id &&
                  this.callEvent("onEventCancel", [
                    this._lightbox_id,
                    this._new_event,
                  ]),
                  this.hide_lightbox();
              }),
              (e.hideLightbox = e.cancel_lightbox),
              (e._init_lightbox_events = function () {
                (this.getLightbox().onclick = function (t) {
                  var a = t.target;
                  if (
                    (a.className || (a = a.previousSibling),
                    !(
                      a &&
                      a.className &&
                      e._getClassName(a).indexOf("dhx_btn_set") > -1
                    ) || (a = a.querySelector("[dhx_button]")))
                  ) {
                    var n = e._getClassName(a);
                    if (a && n)
                      switch (n) {
                        case "dhx_save_btn":
                          e.save_lightbox();
                          break;
                        case "dhx_delete_btn":
                          var i = e.locale.labels.confirm_deleting;
                          e._dhtmlx_confirm(
                            i,
                            e.locale.labels.title_confirm_deleting,
                            function () {
                              e.deleteEvent(e._lightbox_id),
                                (e._new_event = null),
                                e.hide_lightbox();
                            }
                          );
                          break;
                        case "dhx_cancel_btn":
                          e.cancel_lightbox();
                          break;
                        default:
                          var r, o;
                          a.getAttribute("dhx_button")
                            ? e.callEvent("onLightboxButton", [n, a, t])
                            : (-1 != n.indexOf("dhx_custom_button") &&
                                (-1 != n.indexOf("dhx_custom_button_")
                                  ? ((r = a.parentNode.getAttribute("index")),
                                    (o = a.parentNode.parentNode))
                                  : ((r = a.getAttribute("index")),
                                    (o = a.parentNode),
                                    (a = a.firstChild))),
                              r &&
                                e.form_blocks[
                                  e.config.lightbox.sections[r].type
                                ].button_click(r, a, o, o.nextSibling));
                      }
                  }
                }),
                  (this.getLightbox().onkeydown = function (t) {
                    var a = t || window.event,
                      n = t.target || t.srcElement,
                      i = n.querySelector("[dhx_button]");
                    switch (
                      (i ||
                        (i = n.parentNode.querySelector(
                          ".dhx_custom_button, .dhx_readonly"
                        )),
                      (t || a).keyCode)
                    ) {
                      case 32:
                        if ((t || a).shiftKey) return;
                        i && i.click && i.click();
                        break;
                      case e.keys.edit_save:
                        if ((t || a).shiftKey) return;
                        i && i.click ? i.click() : e.save_lightbox();
                        break;
                      case e.keys.edit_cancel:
                        e.cancel_lightbox();
                    }
                  });
              }),
              (e.setLightboxSize = function () {
                var t = this._lightbox;
                if (t) {
                  var a = t.childNodes[1];
                  (a.style.height = "0px"),
                    (a.style.height = a.scrollHeight + "px"),
                    (t.style.height =
                      a.scrollHeight + e.xy.lightbox_additional_height + "px"),
                    (a.style.height = a.scrollHeight + "px");
                }
              }),
              (e._init_dnd_events = function () {
                e.event(document.body, "mousemove", e._move_while_dnd),
                  e.event(document.body, "mouseup", e._finish_dnd),
                  (e._init_dnd_events = function () {});
              }),
              (e._move_while_dnd = function (t) {
                if (e._dnd_start_lb) {
                  document.dhx_unselectable ||
                    ((document.body.className += " dhx_unselectable"),
                    (document.dhx_unselectable = !0));
                  var a = e.getLightbox(),
                    n = [t.pageX, t.pageY];
                  (a.style.top =
                    e._lb_start[1] + n[1] - e._dnd_start_lb[1] + "px"),
                    (a.style.left =
                      e._lb_start[0] + n[0] - e._dnd_start_lb[0] + "px");
                }
              }),
              (e._ready_to_dnd = function (t) {
                var a = e.getLightbox();
                (e._lb_start = [
                  parseInt(a.style.left, 10),
                  parseInt(a.style.top, 10),
                ]),
                  (e._dnd_start_lb = [t.pageX, t.pageY]);
              }),
              (e._finish_dnd = function () {
                e._lb_start &&
                  ((e._lb_start = e._dnd_start_lb = !1),
                  (document.body.className = document.body.className.replace(
                    " dhx_unselectable",
                    ""
                  )),
                  (document.dhx_unselectable = !1));
              }),
              (e.getLightbox = function () {
                if (!this._lightbox) {
                  var t = document.createElement("div");
                  (t.className = "dhx_cal_light"),
                    e.config.wide_form &&
                      (t.className += " dhx_cal_light_wide"),
                    e.form_blocks.recurring &&
                      (t.className += " dhx_cal_light_rec"),
                    e.config.rtl && (t.className += " dhx_cal_light_rtl"),
                    e.config.responsive_lightbox &&
                      (t.className += " dhx_cal_light_responsive"),
                    /msie|MSIE 6/.test(navigator.userAgent) &&
                      (t.className += " dhx_ie6"),
                    (t.style.visibility = "hidden");
                  for (
                    var a = this._lightbox_template,
                      n = this.config.buttons_left,
                      i = 0;
                    i < n.length;
                    i++
                  )
                    a +=
                      "<div " +
                      this._waiAria.lightboxButtonAttrString(n[i]) +
                      " class='dhx_btn_set dhx_" +
                      (e.config.rtl ? "right" : "left") +
                      "_btn_set " +
                      n[i] +
                      "_set'><div dhx_button='1' class='" +
                      n[i] +
                      "'></div><div>" +
                      e.locale.labels[n[i]] +
                      "</div></div>";
                  n = this.config.buttons_right;
                  var r = e.config.rtl;
                  for (i = 0; i < n.length; i++)
                    a +=
                      "<div " +
                      this._waiAria.lightboxButtonAttrString(n[i]) +
                      " class='dhx_btn_set dhx_" +
                      (r ? "left" : "right") +
                      "_btn_set " +
                      n[i] +
                      "_set' style='float:" +
                      (r ? "left" : "right") +
                      ";'><div dhx_button='1' class='" +
                      n[i] +
                      "'></div><div>" +
                      e.locale.labels[n[i]] +
                      "</div></div>";
                  (a += "</div>"),
                    (t.innerHTML = a),
                    e.config.drag_lightbox &&
                      ((t.firstChild.onmousedown = e._ready_to_dnd),
                      (t.firstChild.onselectstart = function () {
                        return !1;
                      }),
                      (t.firstChild.style.cursor = "move"),
                      e._init_dnd_events()),
                    this._waiAria.lightboxAttr(t),
                    document.body.insertBefore(t, document.body.firstChild),
                    (this._lightbox = t);
                  var o = this.config.lightbox.sections;
                  for (a = "", i = 0; i < o.length; i++) {
                    var s = this.form_blocks[o[i].type];
                    if (s) {
                      o[i].id = "area_" + this.uid();
                      var _ = "";
                      o[i].button &&
                        (_ =
                          "<div " +
                          e._waiAria.lightboxSectionButtonAttrString(
                            this.locale.labels["button_" + o[i].button]
                          ) +
                          " class='dhx_custom_button' index='" +
                          i +
                          "'><div class='dhx_custom_button_" +
                          o[i].button +
                          "'></div><div>" +
                          this.locale.labels["button_" + o[i].button] +
                          "</div></div>"),
                        this.config.wide_form &&
                          (a += "<div class='dhx_wrap_section'>");
                      var d = this.locale.labels["section_" + o[i].name];
                      "string" != typeof d && (d = o[i].name),
                        (a +=
                          "<div id='" +
                          o[i].id +
                          "' class='dhx_cal_lsection'>" +
                          _ +
                          "<label>" +
                          d +
                          "</label></div>" +
                          s.render.call(this, o[i])),
                        (a += "</div>");
                    }
                  }
                  var l = t.getElementsByTagName("div");
                  for (i = 0; i < l.length; i++) {
                    var c = l[i];
                    if ("dhx_cal_larea" == e._getClassName(c)) {
                      c.innerHTML = a;
                      break;
                    }
                  }
                  e._bindLightboxLabels(o),
                    this.setLightboxSize(),
                    this._init_lightbox_events(this),
                    (t.style.display = "none"),
                    (t.style.visibility = "visible");
                }
                return this._lightbox;
              }),
              (e._bindLightboxLabels = function (t) {
                for (var a = 0; a < t.length; a++) {
                  var n = t[a];
                  if (n.id && document.getElementById(n.id)) {
                    for (
                      var i = document
                          .getElementById(n.id)
                          .querySelector("label"),
                        r = e._get_lightbox_section_node(n);
                      r && !r.querySelector;

                    )
                      r = r.nextSibling;
                    var o = !0;
                    if (r) {
                      var s = r.querySelector("input, select, textarea");
                      s &&
                        ((n.inputId = s.id || "input_" + e.uid()),
                        s.id || (s.id = n.inputId),
                        i.setAttribute("for", n.inputId),
                        (o = !1));
                    }
                    o &&
                      e.form_blocks[n.type].focus &&
                      (i.onclick = (function (t) {
                        return function () {
                          var a = e.form_blocks[t.type],
                            n = e._get_lightbox_section_node(t);
                          a && a.focus && a.focus.call(e, n);
                        };
                      })(n));
                  }
                }
              }),
              e.attachEvent("onEventIdChange", function (e, t) {
                this._lightbox_id == e && (this._lightbox_id = t);
              }),
              (e._lightbox_template =
                "<div class='dhx_cal_ltitle'><span class='dhx_mark'>&nbsp;</span><span class='dhx_time'></span><span class='dhx_title'></span></div><div class='dhx_cal_larea'></div>");
          })(t),
          R(t),
          (function (e) {
            e.getRootView = function () {
              return {
                view: {
                  render: function () {
                    return {
                      tag: "div",
                      type: 1,
                      attrs: { style: "width:100%;height:100%;" },
                      hooks: {
                        didInsert: function () {
                          e.setCurrentView();
                        },
                      },
                      body: [{ el: this.el, type: 1 }],
                    };
                  },
                  init: function () {
                    var t = document.createElement("DIV");
                    (t.id = "scheduler_" + e.uid()),
                      (t.style.width = "100%"),
                      (t.style.height = "100%"),
                      t.classList.add("dhx_cal_container"),
                      (t.cmp = "grid"),
                      (t.innerHTML =
                        '<div class="dhx_cal_navline"><div class="dhx_cal_prev_button">&nbsp;</div><div class="dhx_cal_next_button">&nbsp;</div><div class="dhx_cal_today_button"></div><div class="dhx_cal_date"></div><div class="dhx_cal_tab" data-tab="day"></div><div class="dhx_cal_tab" data-tab="week"></div><div class="dhx_cal_tab" data-tab="month"></div></div><div class="dhx_cal_header"></div><div class="dhx_cal_data"></div>'),
                      e.init(t),
                      (this.el = t);
                  },
                },
                type: 4,
              };
            };
          })(t),
          B(t),
          window.jQuery &&
            (function (e) {
              var t = 0,
                a = [];
              e.fn.dhx_scheduler = function (n) {
                if ("string" != typeof n) {
                  var i = [];
                  return (
                    this.each(function () {
                      if (this && this.getAttribute)
                        if (this.getAttribute("dhxscheduler"))
                          i.push(window[this.getAttribute("dhxscheduler")]);
                        else {
                          var e = "scheduler";
                          t &&
                            ((e = "scheduler" + (t + 1)),
                            (window[e] = Scheduler.getSchedulerInstance()));
                          var a = window[e];
                          for (var r in (this.setAttribute("dhxscheduler", e),
                          n))
                            "data" != r && (a.config[r] = n[r]);
                          this.getElementsByTagName("div").length ||
                            ((this.innerHTML =
                              '<div class="dhx_cal_navline"><div class="dhx_cal_prev_button">&nbsp;</div><div class="dhx_cal_next_button">&nbsp;</div><div class="dhx_cal_today_button"></div><div class="dhx_cal_date"></div><div class="dhx_cal_tab" name="day_tab" data-tab="day" style="right:204px;"></div><div class="dhx_cal_tab" name="week_tab" data-tab="week" style="right:140px;"></div><div class="dhx_cal_tab" name="month_tab" data-tab="month" style="right:76px;"></div></div><div class="dhx_cal_header"></div><div class="dhx_cal_data"></div>'),
                            (this.className += " dhx_cal_container")),
                            a.init(this, a.config.date, a.config.mode),
                            n.data && a.parse(n.data),
                            i.push(a),
                            t++;
                        }
                    }),
                    1 === i.length ? i[0] : i
                  );
                }
                if (a[n]) return a[n].apply(this, []);
                e.error(
                  "Method " + n + " does not exist on jQuery.dhx_scheduler"
                );
              };
            })(window.jQuery),
          (function (e) {
            !(function () {
              var t = e.setCurrentView,
                a = e.updateView,
                i = null,
                r = null,
                o = function (t, o) {
                  var s = this;
                  n.a.clearTimeout(r), n.a.clearTimeout(i);
                  var d = s._date,
                    l = s._mode;
                  _(this, t, o),
                    (r = setTimeout(function () {
                      s.callEvent("onBeforeViewChange", [
                        l,
                        d,
                        o || s._mode,
                        t || s._date,
                      ])
                        ? (a.call(s, t, o),
                          s.callEvent("onViewChange", [s._mode, s._date]),
                          n.a.clearTimeout(i),
                          (r = 0))
                        : _(s, d, l);
                    }, e.config.delay_render));
                },
                s = function (t, o) {
                  var s = this,
                    d = arguments;
                  _(this, t, o),
                    n.a.clearTimeout(i),
                    (i = setTimeout(function () {
                      r || a.apply(s, d);
                    }, e.config.delay_render));
                };
              function _(e, t, a) {
                t && (e._date = t), a && (e._mode = a);
              }
              e.attachEvent("onSchedulerReady", function () {
                e.config.delay_render
                  ? ((e.setCurrentView = o), (e.updateView = s))
                  : ((e.setCurrentView = t), (e.updateView = a));
              });
            })();
          })(t),
          (function (e) {
            (e.createDataProcessor = function (t) {
              var a, n;
              t instanceof Function
                ? (a = t)
                : t.hasOwnProperty("router") && (a = t.router),
                (n = a ? "CUSTOM" : t.mode || "REST-JSON");
              var i = new U(t.url);
              return (
                i.init(e),
                i.setTransactionMode({ mode: n, router: a }, t.batchUpdate),
                i
              );
            }),
              (e.DataProcessor = U);
          })(t),
          (function (e) {
            e.attachEvent("onSchedulerReady", function () {
              "undefined" != typeof dhtmlxError &&
                window.dhtmlxError.catchError("LoadXML", function (t, a, i) {
                  var r = i[0].responseText;
                  switch (e.config.ajax_error) {
                    case "alert":
                      n.a.alert(r);
                      break;
                    case "console":
                      n.a.console.log(r);
                  }
                });
            });
          })(t);
        var o = new ce({
          en: te,
          ar: Y,
          be: W,
          ca: K,
          cn: G,
          cs: X,
          da: Q,
          de: Z,
          el: ee,
          es: ae,
          fi: ne,
          fr: ie,
          he: re,
          hu: oe,
          id: se,
          it: _e,
          jp: de,
          nb: ue,
          nl: he,
          no: fe,
          pl: pe,
          pt: ve,
          ro: ge,
          ru: me,
          si: ye,
          sk: be,
          sv: xe,
          tr: ke,
          ua: we,
        });
        (t.i18n = {
          addLocale: o.addLocale,
          setLocale: function (e) {
            if ("string" == typeof e) {
              var a = o.getLocale(e);
              a || (a = o.getLocale("en")), (t.locale = a);
            } else if (e)
              if (t.locale)
                for (var n in e)
                  e[n] && "object" === Ee(e[n])
                    ? (t.locale[n] || (t.locale[n] = {}),
                      t.mixin(t.locale[n], e[n], !0))
                    : (t.locale[n] = e[n]);
              else t.locale = e;
          },
          getLocale: o.getLocale,
        }),
          t.i18n.setLocale("en"),
          (t.ext = {});
        var s = {};
        return (
          (t.plugins = function (a) {
            (function (e, t, a) {
              var n = [];
              for (var i in e)
                if (e[i]) {
                  var r = i.toLowerCase();
                  t[r] &&
                    t[r].forEach(function (t) {
                      var a = t.toLowerCase();
                      e[a] || n.push(a);
                    }),
                    n.push(r);
                }
              return (
                n.sort(function (e, t) {
                  var n = a[e] || 0,
                    i = a[t] || 0;
                  return n > i ? 1 : n < i ? -1 : 0;
                }),
                n
              );
            })(
              a,
              {
                treetimeline: ["timeline"],
                daytimeline: ["timeline"],
                outerdrag: ["legacy"],
              },
              {
                legacy: 1,
                limit: 1,
                timeline: 2,
                daytimeline: 3,
                treetimeline: 3,
                outerdrag: 6,
              }
            ).forEach(function (a) {
              if (!s[a]) {
                var n = e.getExtension(a);
                if (!n) throw new Error("unknown plugin " + a);
                n(t), (s[a] = !0);
              }
            });
          }),
          t
        );
      };
      function De(e, t) {
        for (var a = 0; a < t.length; a++) {
          var n = t[a];
          (n.enumerable = n.enumerable || !1),
            (n.configurable = !0),
            "value" in n && (n.writable = !0),
            Object.defineProperty(e, n.key, n);
        }
      }
      var Ne = (function () {
        function e(t) {
          for (var a in ((function (e, t) {
            if (!(e instanceof t))
              throw new TypeError("Cannot call a class as a function");
          })(this, e),
          (this._extensions = {}),
          t))
            this._extensions[a] = t[a];
        }
        return (
          (function (e, t, a) {
            t && De(e.prototype, t), a && De(e, a);
          })(e, [
            {
              key: "addExtension",
              value: function (e, t) {
                this._extensions[e] = t;
              },
            },
            {
              key: "getExtension",
              value: function (e) {
                return this._extensions[e];
              },
            },
          ]),
          e
        );
      })();
      function Ce(e, t) {
        for (var a = 0; a < t.length; a++) {
          var n = t[a];
          (n.enumerable = n.enumerable || !1),
            (n.configurable = !0),
            "value" in n && (n.writable = !0),
            Object.defineProperty(e, n.key, n);
        }
      }
      "undefined" != typeof dhtmlx &&
        dhtmlx.attaches &&
        (dhtmlx.attaches.attachScheduler = function (e, t, a, n) {
          a =
            a ||
            '<div class="dhx_cal_tab" name="day_tab" data-tab="day" style="right:204px;"></div><div class="dhx_cal_tab" name="week_tab" data-tab="week" style="right:140px;"></div><div class="dhx_cal_tab" name="month_tab" data-tab="month" style="right:76px;"></div>';
          var i = document.createElement("DIV");
          return (
            (i.id = "dhxSchedObj_" + this._genStr(12)),
            (i.innerHTML =
              '<div id="' +
              i.id +
              '" class="dhx_cal_container" style="width:100%; height:100%;"><div class="dhx_cal_navline"><div class="dhx_cal_prev_button">&nbsp;</div><div class="dhx_cal_next_button">&nbsp;</div><div class="dhx_cal_today_button"></div><div class="dhx_cal_date"></div>' +
              a +
              '</div><div class="dhx_cal_header"></div><div class="dhx_cal_data"></div></div>'),
            document.body.appendChild(i.firstChild),
            this.attachObject(i.id, !1, !0),
            (this.vs[this.av].sched = n),
            (this.vs[this.av].schedId = i.id),
            (n.setSizes = n.updateView),
            (n.destructor = function () {}),
            n.init(i.id, e, t),
            this.vs[this._viewRestore()].sched
          );
        });
      var Te = function (e, t) {
          t(
            !1,
            "The ".concat(
              e,
              ' extension is not included in this version of dhtmlxScheduler.<br>\n\t\tYou may need a <a href="https://docs.dhtmlx.com/scheduler/editions_comparison.html" target="_blank">Professional version of the component</a>.<br>\n\t\tContact us at <a href="https://dhtmlx.com/docs/contact.shtml" target="_blank">https://dhtmlx.com/docs/contact.shtml</a> if you have any questions.'
            )
          );
        },
        Me = function (e) {
          !(function () {
            var t = [];
            function a() {
              return !!t.length;
            }
            function n(t) {
              setTimeout(function () {
                a() ||
                  (function (e, t) {
                    for (; e && e != t; ) e = e.parentNode;
                    return !(e != t);
                  })(document.activeElement, e.$container) ||
                  e.focus();
              }, 1);
            }
            function i(a) {
              var n = (a = a || window.event).currentTarget;
              (function (e) {
                return e == t[t.length - 1];
              })(n) && e.$keyboardNavigation.trapFocus(n, a);
            }
            if (
              (e.attachEvent("onLightbox", function () {
                !(function (a) {
                  e.eventRemove(a, "keydown", i),
                    e.event(a, "keydown", i),
                    t.push(a);
                })(e.getLightbox());
              }),
              e.attachEvent("onAfterLightbox", function () {
                var a = t.pop();
                a && e.eventRemove(a, "keydown", i), n();
              }),
              e.attachEvent("onAfterQuickInfo", function () {
                n();
              }),
              !e._keyNavMessagePopup)
            ) {
              e._keyNavMessagePopup = !0;
              var r = null,
                o = null,
                s = [];
              e.attachEvent("onMessagePopup", function (t) {
                for (
                  r = document.activeElement, o = r;
                  o && e._getClassName(o).indexOf("dhx_cal_data") < 0;

                )
                  o = o.parentNode;
                o && (o = o.parentNode),
                  e.eventRemove(t, "keydown", i),
                  e.event(t, "keydown", i),
                  s.push(t);
              }),
                e.attachEvent("onAfterMessagePopup", function () {
                  var t = s.pop();
                  t && e.eventRemove(t, "keydown", i),
                    setTimeout(function () {
                      for (
                        var t = document.activeElement;
                        t && e._getClassName(t).indexOf("dhx_cal_light") < 0;

                      )
                        t = t.parentNode;
                      t ||
                        (r && r.parentNode
                          ? r.focus()
                          : o && o.parentNode && o.focus(),
                        (r = null),
                        (o = null));
                    }, 1);
                });
            }
            e.$keyboardNavigation.isModal = a;
          })();
        },
        Ae = function (e) {
          (e._temp_key_scope = function () {
            (e.config.key_nav = !0),
              (e.$keyboardNavigation._pasteDate = null),
              (e.$keyboardNavigation._pasteSection = null);
            var t = null,
              a = {};
            function n(e) {
              (e = e || window.event), (a.x = e.clientX), (a.y = e.clientY);
            }
            function i() {
              for (
                var t, n, i = document.elementFromPoint(a.x, a.y);
                i && i != e._obj;

              )
                i = i.parentNode;
              return (
                (t = !(i != e._obj)),
                (n = e.$keyboardNavigation.dispatcher.isEnabled()),
                t || n
              );
            }
            function r(t) {
              return e._lame_copy({}, t);
            }
            document.body
              ? e.event(document.body, "mousemove", n)
              : e.event(window, "load", function () {
                  e.event(document.body, "mousemove", n);
                }),
              e.attachEvent("onMouseMove", function (t, a) {
                var n = e.getState();
                if (n.mode && n.min_date) {
                  var i = e.getActionData(a);
                  (e.$keyboardNavigation._pasteDate = i.date),
                    (e.$keyboardNavigation._pasteSection = i.section);
                }
              }),
              (e._make_pasted_event = function (t) {
                var a = e.$keyboardNavigation._pasteDate,
                  n = e.$keyboardNavigation._pasteSection,
                  i = t.end_date - t.start_date,
                  o = r(t);
                if (
                  ((function (e) {
                    delete e.rec_type,
                      delete e.rec_pattern,
                      delete e.event_pid,
                      delete e.event_length;
                  })(o),
                  (o.start_date = new Date(a)),
                  (o.end_date = new Date(o.start_date.valueOf() + i)),
                  n)
                ) {
                  var s = e._get_section_property();
                  e.config.multisection ? (o[s] = t[s]) : (o[s] = n);
                }
                return o;
              }),
              (e._do_paste = function (t, a, n) {
                !1 !== e.callEvent("onBeforeEventPasted", [t, a, n]) &&
                  (e.addEvent(a), e.callEvent("onEventPasted", [t, a, n]));
              }),
              (e._is_key_nav_active = function () {
                return !(
                  !this._is_initialized() ||
                  this._is_lightbox_open() ||
                  !this.config.key_nav
                );
              }),
              e.event(document, "keydown", function (t) {
                (t.ctrlKey || t.metaKey) &&
                  86 == t.keyCode &&
                  e._buffer_event &&
                  !e.$keyboardNavigation.dispatcher.isEnabled() &&
                  (e.$keyboardNavigation.dispatcher.isActive = i());
              }),
              (e._key_nav_copy_paste = function (a) {
                if (!e._is_key_nav_active()) return !0;
                if (37 == a.keyCode || 39 == a.keyCode) {
                  a.cancelBubble = !0;
                  var n = e.date.add(
                    e._date,
                    37 == a.keyCode ? -1 : 1,
                    e._mode
                  );
                  return e.setCurrentView(n), !0;
                }
                var o = (function () {
                  var t = e.$keyboardNavigation.dispatcher.getActiveNode();
                  return t && t.eventId ? t.eventId : e._select_id;
                })();
                if ((a.ctrlKey || a.metaKey) && 67 == a.keyCode)
                  return (
                    o &&
                      ((e._buffer_event = r(e.getEvent(o))),
                      (t = !0),
                      e.callEvent("onEventCopied", [e.getEvent(o)])),
                    !0
                  );
                if ((a.ctrlKey || a.metaKey) && 88 == a.keyCode && o) {
                  t = !1;
                  var s = (e._buffer_event = r(e.getEvent(o)));
                  e.updateEvent(s.id), e.callEvent("onEventCut", [s]);
                }
                if ((a.ctrlKey || a.metaKey) && 86 == a.keyCode && i()) {
                  if (
                    (s =
                      (s = e._buffer_event
                        ? e.getEvent(e._buffer_event.id)
                        : e._buffer_event) || e._buffer_event)
                  ) {
                    var _ = e._make_pasted_event(s);
                    if (t) (_.id = e.uid()), e._do_paste(t, _, s);
                    else
                      e.callEvent("onBeforeEventChanged", [_, a, !1, s]) &&
                        (e._do_paste(t, _, s), (t = !0));
                  }
                  return !0;
                }
              });
          }),
            e._temp_key_scope();
        },
        Oe = function (e) {
          e.$keyboardNavigation.attachSchedulerHandlers = function () {
            var t,
              a = e.$keyboardNavigation.dispatcher,
              n = function (t) {
                if (e.config.key_nav) return a.keyDownHandler(t);
              },
              i = function () {
                a.keepScrollPosition(function () {
                  a.focusGlobalNode();
                });
              };
            e.attachEvent("onDataRender", function () {
              e.config.key_nav &&
                a.isEnabled() &&
                !e.getState().editor_id &&
                (clearTimeout(t),
                (t = setTimeout(function () {
                  a.isEnabled() || a.enable(), r();
                })));
            });
            var r = function () {
              if (a.isEnabled()) {
                var t = a.getActiveNode();
                t &&
                  (t.isValid() || (t = t.fallback()),
                  !t ||
                    t instanceof e.$keyboardNavigation.MinicalButton ||
                    t instanceof e.$keyboardNavigation.MinicalCell ||
                    a.keepScrollPosition(function () {
                      t.focus(!0);
                    }));
              }
            };
            function o(t) {
              if (!e.config.key_nav) return !0;
              var n,
                i = e.$keyboardNavigation.isChildOf(
                  t.target || t.srcElement,
                  e.$container.querySelector(".dhx_cal_data")
                ),
                r = e.getActionData(t);
              e._locate_event(t.target || t.srcElement)
                ? (n = new e.$keyboardNavigation.Event(
                    e._locate_event(t.target || t.srcElement)
                  ))
                : i &&
                  ((n = new e.$keyboardNavigation.TimeSlot()),
                  r.date &&
                    i &&
                    (n = n.nextSlot(
                      new e.$keyboardNavigation.TimeSlot(
                        r.date,
                        null,
                        r.section
                      )
                    ))),
                n &&
                  (a.isEnabled()
                    ? r.date &&
                      i &&
                      a.delay(function () {
                        a.setActiveNode(n);
                      })
                    : (a.activeNode = n));
            }
            e.attachEvent("onSchedulerReady", function () {
              var t = e.$container;
              e.eventRemove(document, "keydown", n),
                e.eventRemove(t, "mousedown", o),
                e.eventRemove(t, "focus", i),
                e.config.key_nav
                  ? (e.event(document, "keydown", n),
                    e.event(t, "mousedown", o),
                    e.event(t, "focus", i),
                    t.setAttribute("tabindex", "0"))
                  : t.removeAttribute("tabindex");
            });
            var s = e.updateEvent;
            (e.updateEvent = function (t) {
              var n = s.apply(this, arguments);
              if (
                e.config.key_nav &&
                a.isEnabled() &&
                e.getState().select_id == t
              ) {
                var i = new e.$keyboardNavigation.Event(t);
                e.getState().lightbox_id ||
                  (function (t) {
                    if (e.config.key_nav && a.isEnabled()) {
                      var n = t,
                        i = new e.$keyboardNavigation.Event(n.eventId);
                      if (!i.isValid()) {
                        var r = i.start || n.start,
                          o = i.end || n.end,
                          s = i.section || n.section;
                        (i = new e.$keyboardNavigation.TimeSlot(
                          r,
                          o,
                          s
                        )).isValid() ||
                          (i = new e.$keyboardNavigation.TimeSlot());
                      }
                      a.setActiveNode(i);
                      var _ = a.getActiveNode();
                      _ &&
                        _.getNode &&
                        document.activeElement != _.getNode() &&
                        a.focusNode(a.getActiveNode());
                    }
                  })(i);
              }
              return n;
            }),
              e.attachEvent("onEventDeleted", function (t) {
                if (!e.config.key_nav) return !0;
                a.isEnabled() &&
                  a.getActiveNode().eventId == t &&
                  a.setActiveNode(new e.$keyboardNavigation.TimeSlot());
                return !0;
              }),
              e.attachEvent("onClearAll", function () {
                if (!e.config.key_nav) return !0;
                a.isEnabled() &&
                  a.getActiveNode() instanceof e.$keyboardNavigation.Event &&
                  a.setActiveNode(new e.$keyboardNavigation.TimeSlot());
              });
          };
        };
      function He(e) {
        "@babel/helpers - typeof";
        return (He =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      function je(e) {
        "@babel/helpers - typeof";
        return (je =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      function Le(e) {
        "@babel/helpers - typeof";
        return (Le =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      function Pe(e) {
        "@babel/helpers - typeof";
        return (Pe =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      function ze(e) {
        "@babel/helpers - typeof";
        return (ze =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (e) {
                return typeof e;
              }
            : function (e) {
                return e &&
                  "function" == typeof Symbol &&
                  e.constructor === Symbol &&
                  e !== Symbol.prototype
                  ? "symbol"
                  : typeof e;
              })(e);
      }
      var $e = new ((function () {
          function e(t) {
            !(function (e, t) {
              if (!(e instanceof t))
                throw new TypeError("Cannot call a class as a function");
            })(this, e),
              (this._seed = 0),
              (this._schedulerPlugins = []),
              (this._bundledExtensions = t),
              (this._extensionsManager = new Ne(t));
          }
          return (
            (function (e, t, a) {
              t && Ce(e.prototype, t), a && Ce(e, a);
            })(e, [
              {
                key: "plugin",
                value: function (e) {
                  this._schedulerPlugins.push(e),
                    n.a.scheduler && e(n.a.scheduler);
                },
              },
              {
                key: "getSchedulerInstance",
                value: function (e) {
                  for (
                    var t = Se(this._extensionsManager), a = 0;
                    a < this._schedulerPlugins.length;
                    a++
                  )
                    this._schedulerPlugins[a](t);
                  return (
                    (t._internal_id = this._seed++),
                    this.$syncFactory && this.$syncFactory(t),
                    e && this._initFromConfig(t, e),
                    t
                  );
                },
              },
              {
                key: "_initFromConfig",
                value: function (e, t) {
                  if (
                    (t.plugins && e.plugins(t.plugins),
                    t.config && e.mixin(e.config, t.config, !0),
                    t.templates &&
                      e.attachEvent(
                        "onTemplatesReady",
                        function () {
                          e.mixin(e.templates, t.templates, !0);
                        },
                        { once: !0 }
                      ),
                    t.events)
                  )
                    for (var a in t.events) e.attachEvent(a, t.events[a]);
                  t.locale && e.i18n.setLocale(t.locale),
                    Array.isArray(t.calendars) &&
                      t.calendars.forEach(function (t) {
                        e.addCalendar(t);
                      }),
                    t.container ? e.init(t.container) : e.init(),
                    t.data &&
                      ("string" == typeof t.data
                        ? e.load(t.data)
                        : e.parse(t.data));
                },
              },
            ]),
            e
          );
        })())({
          active_links: function (e) {
            (e.config.active_link_view = "day"),
              (e._active_link_click = function (t) {
                var a = t.target.getAttribute("jump_to"),
                  n = e.date.str_to_date(e.config.api_date);
                if (a)
                  return (
                    e.setCurrentView(n(a), e.config.active_link_view),
                    t && t.preventDefault && t.preventDefault(),
                    !1
                  );
              }),
              e.attachEvent("onTemplatesReady", function () {
                var t = function (t, a) {
                  (a = a || t + "_scale_date"),
                    e.templates["_active_links_old_" + a] ||
                      (e.templates["_active_links_old_" + a] = e.templates[a]);
                  var n = e.templates["_active_links_old_" + a],
                    i = e.date.date_to_str(e.config.api_date);
                  e.templates[a] = function (e) {
                    return (
                      "<a jump_to='" + i(e) + "' href='#'>" + n(e) + "</a>"
                    );
                  };
                };
                if ((t("week"), t("", "month_day"), this.matrix))
                  for (var a in this.matrix) t(a);
                this._detachDomEvent(this._obj, "click", e._active_link_click),
                  e.event(this._obj, "click", e._active_link_click);
              });
          },
          agenda_view: function (e) {
            (e.date.add_agenda = function (t) {
              return e.date.add(t, 1, "year");
            }),
              (e.templates.agenda_time = function (t, a, n) {
                return n._timed
                  ? this.day_date(n.start_date, n.end_date, n) +
                      " " +
                      this.event_date(t)
                  : e.templates.day_date(t) +
                      " &ndash; " +
                      e.templates.day_date(a);
              }),
              (e.templates.agenda_text = function (e, t, a) {
                return a.text;
              }),
              (e.templates.agenda_date = function () {
                return "";
              }),
              (e.date.agenda_start = function () {
                return e.date.date_part(e._currentDate());
              }),
              e.attachEvent("onTemplatesReady", function () {
                var t = e.dblclick_dhx_cal_data;
                e.dblclick_dhx_cal_data = function () {
                  if ("agenda" == this._mode)
                    !this.config.readonly &&
                      this.config.dblclick_create &&
                      this.addEventNow();
                  else if (t) return t.apply(this, arguments);
                };
                var a = e.render_data;
                e.render_data = function (e) {
                  if ("agenda" != this._mode) return a.apply(this, arguments);
                  i();
                };
                var n = e.render_view_data;
                function i() {
                  var t = e.get_visible_events();
                  t.sort(function (e, t) {
                    return e.start_date > t.start_date ? 1 : -1;
                  });
                  for (
                    var a,
                      n =
                        "<div class='dhx_agenda_area' " +
                        e._waiAria.agendaDataAttrString() +
                        ">",
                      i = 0;
                    i < t.length;
                    i++
                  ) {
                    var r = t[i],
                      o = r.color ? "background:" + r.color + ";" : "",
                      s = r.textColor ? "color:" + r.textColor + ";" : "",
                      _ = e.templates.event_class(r.start_date, r.end_date, r);
                    a = e._waiAria.agendaEventAttrString(r);
                    var d = e._waiAria.agendaDetailsBtnString();
                    (n +=
                      "<div " +
                      a +
                      " class='dhx_agenda_line" +
                      (_ ? " " + _ : "") +
                      "' event_id='" +
                      r.id +
                      "' " +
                      e.config.event_attribute +
                      "='" +
                      r.id +
                      "' style='" +
                      s +
                      o +
                      (r._text_style || "") +
                      "'><div class='dhx_agenda_event_time'>" +
                      (e.config.rtl
                        ? e.templates.agenda_time(r.end_date, r.start_date, r)
                        : e.templates.agenda_time(
                            r.start_date,
                            r.end_date,
                            r
                          )) +
                      "</div>"),
                      (n +=
                        "<div " +
                        d +
                        " class='dhx_event_icon icon_details'>&nbsp;</div>"),
                      (n +=
                        "<span>" +
                        e.templates.agenda_text(r.start_date, r.end_date, r) +
                        "</span></div>");
                  }
                  (n += "<div class='dhx_v_border'></div></div>"),
                    (e._els.dhx_cal_data[0].innerHTML = n),
                    (e._els.dhx_cal_data[0].childNodes[0].scrollTop =
                      e._agendaScrollTop || 0);
                  var l = e._els.dhx_cal_data[0].childNodes[0];
                  l.childNodes[l.childNodes.length - 1].style.height =
                    l.offsetHeight < e._els.dhx_cal_data[0].offsetHeight
                      ? "100%"
                      : l.offsetHeight + "px";
                  var c = e._els.dhx_cal_data[0].firstChild.childNodes,
                    u = e._getNavDateElement();
                  for (
                    u &&
                      (u.innerHTML = e.templates.agenda_date(
                        e._min_date,
                        e._max_date,
                        e._mode
                      )),
                      e._rendered = [],
                      i = 0;
                    i < c.length - 1;
                    i++
                  )
                    e._rendered[i] = c[i];
                }
                (e.render_view_data = function () {
                  return (
                    "agenda" == this._mode &&
                      ((e._agendaScrollTop =
                        e._els.dhx_cal_data[0].childNodes[0].scrollTop),
                      (e._els.dhx_cal_data[0].childNodes[0].scrollTop = 0)),
                    n.apply(this, arguments)
                  );
                }),
                  (e.agenda_view = function (t) {
                    (e._min_date =
                      e.config.agenda_start || e.date.agenda_start(e._date)),
                      (e._max_date =
                        e.config.agenda_end ||
                        e.date.add_agenda(e._min_date, 1)),
                      (function (t) {
                        if (t) {
                          var a = e.locale.labels,
                            n = e._waiAria.agendaHeadAttrString(),
                            i = e._waiAria.agendaHeadDateString(a.date),
                            r = e._waiAria.agendaHeadDescriptionString(
                              a.description
                            );
                          (e._els.dhx_cal_header[0].innerHTML =
                            "<div " +
                            n +
                            " class='dhx_agenda_line'><div " +
                            i +
                            ">" +
                            a.date +
                            "</div><span class = 'description_header' style='padding-left:25px' " +
                            r +
                            ">" +
                            a.description +
                            "</span></div>"),
                            (e._table_view = !0),
                            e.set_sizes();
                        }
                      })(t),
                      t
                        ? ((e._cols = null),
                          (e._colsS = null),
                          (e._table_view = !0),
                          i())
                        : (e._table_view = !1);
                  });
              });
          },
          all_timed: function (e) {
            (e.config.all_timed = "short"), (e.config.all_timed_month = !1);
            var t = function (t) {
              return (
                !((t.end_date - t.start_date) / 36e5 >= 24) ||
                ("resize" == e._drag_mode && e._drag_id == t.id)
              );
            };
            e._safe_copy = function (t) {
              var a = null,
                n = e._copy_event(t);
              return (
                t.event_pid && (a = e.getEvent(t.event_pid)),
                a &&
                  a.isPrototypeOf(t) &&
                  (delete n.event_length,
                  delete n.event_pid,
                  delete n.rec_pattern,
                  delete n.rec_type),
                n
              );
            };
            var a = e._pre_render_events_line,
              n = e._pre_render_events_table,
              i = function (e, t) {
                return this._table_view
                  ? n.call(this, e, t)
                  : a.call(this, e, t);
              };
            e._pre_render_events_line = e._pre_render_events_table = function (
              a,
              n
            ) {
              if (
                !this.config.all_timed ||
                (this._table_view && "month" != this._mode) ||
                ("month" == this._mode && !this.config.all_timed_month)
              )
                return i.call(this, a, n);
              for (var r = 0; r < a.length; r++) {
                var o = a[r];
                if (!o._timed)
                  if ("short" != this.config.all_timed || t(o)) {
                    var s = this._safe_copy(o);
                    o._virtual ? (s._first_chunk = !1) : (s._first_chunk = !0),
                      (s._drag_resize = !1),
                      (s._virtual = !0),
                      (s.start_date = new Date(s.start_date)),
                      c(o)
                        ? ((s.end_date = u(s.start_date)),
                          24 != this.config.last_hour &&
                            (s.end_date = h(
                              s.start_date,
                              this.config.last_hour
                            )))
                        : (s.end_date = new Date(o.end_date));
                    var _ = !1;
                    s.start_date < this._max_date &&
                      s.end_date > this._min_date &&
                      s.start_date < s.end_date &&
                      ((a[r] = s), (_ = !0));
                    var d = this._safe_copy(o);
                    if (
                      ((d._virtual = !0),
                      (d.end_date = new Date(d.end_date)),
                      d.start_date < this._min_date
                        ? (d.start_date = h(
                            this._min_date,
                            this.config.first_hour
                          ))
                        : (d.start_date = h(
                            u(o.start_date),
                            this.config.first_hour
                          )),
                      d.start_date < this._max_date &&
                        d.start_date < d.end_date)
                    ) {
                      if (!_) {
                        a[r--] = d;
                        continue;
                      }
                      a.splice(r + 1, 0, d), (d._last_chunk = !1);
                    } else (s._last_chunk = !0), (s._drag_resize = !0);
                  } else "month" != this._mode && a.splice(r--, 1);
              }
              var l = "move" != this._drag_mode && n;
              return i.call(this, a, l);
              function c(e) {
                var t = u(e.start_date);
                return +e.end_date > +t;
              }
              function u(t) {
                var a = e.date.add(t, 1, "day");
                return (a = e.date.date_part(a));
              }
              function h(t, a) {
                var n = e.date.date_part(new Date(t));
                return n.setHours(a), n;
              }
            };
            var r = e.get_visible_events;
            (e.get_visible_events = function (e) {
              return this.config.all_timed && this.config.multi_day
                ? r.call(this, !1)
                : r.call(this, e);
            }),
              e.attachEvent("onBeforeViewChange", function (t, a, n, i) {
                return (e._allow_dnd = "day" == n || "week" == n), !0;
              }),
              (e._is_main_area_event = function (e) {
                return !!(
                  e._timed ||
                  !0 === this.config.all_timed ||
                  ("short" == this.config.all_timed && t(e))
                );
              });
            var o = e.updateEvent;
            e.updateEvent = function (t) {
              var a,
                n,
                i = e.getEvent(t);
              i &&
                (a =
                  e.config.all_timed &&
                  !(e.isOneDayEvent(e._events[t]) || e.getState().drag_id)) &&
                ((n = e.config.update_render), (e.config.update_render = !0)),
                o.apply(e, arguments),
                i && a && (e.config.update_render = n);
            };
          },
          collision: function (e) {
            var t, a;
            function n(a) {
              e._get_section_view() &&
                a &&
                (t = e.getEvent(a)[e._get_section_property()]);
            }
            (e.config.collision_limit = 1),
              e.attachEvent("onBeforeDrag", function (e) {
                return n(e), !0;
              }),
              e.attachEvent("onBeforeLightbox", function (t) {
                var i = e.getEvent(t);
                return (a = [i.start_date, i.end_date]), n(t), !0;
              }),
              e.attachEvent("onEventChanged", function (t) {
                if (!t || !e.getEvent(t)) return !0;
                var n = e.getEvent(t);
                if (!e.checkCollision(n)) {
                  if (!a) return !1;
                  (n.start_date = a[0]),
                    (n.end_date = a[1]),
                    (n._timed = this.isOneDayEvent(n));
                }
                return !0;
              }),
              e.attachEvent("onBeforeEventChanged", function (t, a, n) {
                return e.checkCollision(t);
              }),
              e.attachEvent("onEventAdded", function (t, a) {
                e.checkCollision(a) || e.deleteEvent(t);
              }),
              e.attachEvent("onEventSave", function (t, a, n) {
                if (
                  (((a = e._lame_clone(a)).id = t),
                  !a.start_date || !a.end_date)
                ) {
                  var i = e.getEvent(t);
                  (a.start_date = new Date(i.start_date)),
                    (a.end_date = new Date(i.end_date));
                }
                return a.rec_type && e._roll_back_dates(a), e.checkCollision(a);
              }),
              (e._check_sections_collision = function (t, a) {
                var n = e._get_section_property();
                return t[n] == a[n] && t.id != a.id;
              }),
              (e.checkCollision = function (a) {
                var n = [],
                  i = e.config.collision_limit;
                if (a.rec_type)
                  for (var r = e.getRecDates(a), o = 0; o < r.length; o++)
                    for (
                      var s = e.getEvents(r[o].start_date, r[o].end_date),
                        _ = 0;
                      _ < s.length;
                      _++
                    )
                      (s[_].event_pid || s[_].id) != a.id && n.push(s[_]);
                else {
                  n = e.getEvents(a.start_date, a.end_date);
                  for (var d = 0; d < n.length; d++) {
                    var l = n[d];
                    if (
                      l.id == a.id ||
                      (l.event_length &&
                        [l.event_pid, l.event_length].join("#") == a.id)
                    ) {
                      n.splice(d, 1);
                      break;
                    }
                  }
                }
                var c = e._get_section_view(),
                  u = e._get_section_property(),
                  h = !0;
                if (c) {
                  var f = 0;
                  for (d = 0; d < n.length; d++)
                    n[d].id != a.id &&
                      this._check_sections_collision(n[d], a) &&
                      f++;
                  f >= i && (h = !1);
                } else n.length >= i && (h = !1);
                if (!h) {
                  var p = !e.callEvent("onEventCollision", [a, n]);
                  return p || (a[u] = t || a[u]), p;
                }
                return h;
              });
          },
          container_autoresize: function (e) {
            (e.config.container_autoresize = !0),
              (e.config.month_day_min_height = 90),
              (e.config.min_grid_size = 25),
              (e.config.min_map_size = 400);
            var t = e._pre_render_events,
              a = !0,
              n = 0,
              i = 0;
            e._pre_render_events = function (r, o) {
              if (!e.config.container_autoresize || !a)
                return t.apply(this, arguments);
              var s = this.xy.bar_height,
                _ = this._colsS.heights,
                d = (this._colsS.heights = [0, 0, 0, 0, 0, 0, 0]),
                l = this._els.dhx_cal_data[0];
              if (
                ((r = this._table_view
                  ? this._pre_render_events_table(r, o)
                  : this._pre_render_events_line(r, o)),
                this._table_view)
              )
                if (o) this._colsS.heights = _;
                else {
                  var c = l.firstChild;
                  if (c.rows) {
                    for (var u = 0; u < c.rows.length; u++) {
                      if (
                        (d[u]++,
                        d[u] * s >
                          this._colsS.height - this.xy.month_head_height)
                      ) {
                        var h = c.rows[u].cells,
                          f = this._colsS.height - this.xy.month_head_height;
                        1 * this.config.max_month_events !==
                          this.config.max_month_events ||
                        d[u] <= this.config.max_month_events
                          ? (f = d[u] * s)
                          : (this.config.max_month_events + 1) * s >
                              this._colsS.height - this.xy.month_head_height &&
                            (f = (this.config.max_month_events + 1) * s);
                        for (var p = 0; p < h.length; p++)
                          h[p].childNodes[1].style.height = f + "px";
                        d[u] = (d[u - 1] || 0) + h[0].offsetHeight;
                      }
                      d[u] = (d[u - 1] || 0) + c.rows[u].cells[0].offsetHeight;
                    }
                    d.unshift(0),
                      c.parentNode.offsetHeight < c.parentNode.scrollHeight &&
                        c._h_fix;
                  } else if (
                    (r.length ||
                      "visible" !=
                        this._els.dhx_multi_day[0].style.visibility ||
                      (d[0] = -1),
                    r.length || -1 == d[0])
                  ) {
                    var v = (d[0] + 1) * s + 1;
                    i != v + 1 &&
                      (this._obj.style.height = n - i + v - 1 + "px"),
                      (v += "px"),
                      (l.style.top =
                        this._els.dhx_cal_navline[0].offsetHeight +
                        this._els.dhx_cal_header[0].offsetHeight +
                        parseInt(v, 10) +
                        "px"),
                      (l.style.height =
                        this._obj.offsetHeight -
                        parseInt(l.style.top, 10) -
                        (this.xy.margin_top || 0) +
                        "px");
                    var g = this._els.dhx_multi_day[0];
                    (g.style.height = v),
                      (g.style.visibility = -1 == d[0] ? "hidden" : "visible"),
                      ((g = this._els.dhx_multi_day[1]).style.height = v),
                      (g.style.visibility = -1 == d[0] ? "hidden" : "visible"),
                      (g.className = d[0]
                        ? "dhx_multi_day_icon"
                        : "dhx_multi_day_icon_small"),
                      (this._dy_shift = (d[0] + 1) * s),
                      (d[0] = 0);
                  }
                }
              return r;
            };
            var r = [
                "dhx_cal_navline",
                "dhx_cal_header",
                "dhx_multi_day",
                "dhx_cal_data",
              ],
              o = function (t) {
                n = 0;
                for (var a = 0; a < r.length; a++) {
                  var o = r[a],
                    s = e._els[o] ? e._els[o][0] : null,
                    _ = 0;
                  switch (o) {
                    case "dhx_cal_navline":
                    case "dhx_cal_header":
                      _ = parseInt(s.style.height, 10);
                      break;
                    case "dhx_multi_day":
                      (_ = s ? s.offsetHeight - 1 : 0), (i = _);
                      break;
                    case "dhx_cal_data":
                      var l = e.getState().mode;
                      if (
                        ((_ =
                          s.childNodes[1] && "month" != l
                            ? s.childNodes[1].offsetHeight
                            : Math.max(s.offsetHeight - 1, s.scrollHeight)),
                        "month" == l)
                      )
                        e.config.month_day_min_height &&
                          !t &&
                          (_ =
                            s.getElementsByTagName("tr").length *
                            e.config.month_day_min_height),
                          t && (s.style.height = _ + "px");
                      else if ("year" == l) _ = 190 * e.config.year_y;
                      else if ("agenda" == l) {
                        if (((_ = 0), s.childNodes && s.childNodes.length))
                          for (var c = 0; c < s.childNodes.length; c++)
                            _ += s.childNodes[c].offsetHeight;
                        _ + 2 < e.config.min_grid_size
                          ? (_ = e.config.min_grid_size)
                          : (_ += 2);
                      } else if ("week_agenda" == l) {
                        for (
                          var u,
                            h,
                            f =
                              e.xy.week_agenda_scale_height +
                              e.config.min_grid_size,
                            p = 0;
                          p < s.childNodes.length;
                          p++
                        )
                          for (
                            h = s.childNodes[p], c = 0;
                            c < h.childNodes.length;
                            c++
                          ) {
                            for (
                              var v = 0,
                                g = h.childNodes[c].childNodes[1],
                                m = 0;
                              m < g.childNodes.length;
                              m++
                            )
                              v += g.childNodes[m].offsetHeight;
                            (u = v + e.xy.week_agenda_scale_height),
                              (u = 1 != p || (2 != c && 3 != c) ? u : 2 * u) >
                                f && (f = u);
                          }
                        _ = 3 * f;
                      } else if ("map" == l) {
                        _ = 0;
                        var y = s.querySelectorAll(".dhx_map_line");
                        for (c = 0; c < y.length; c++) _ += y[c].offsetHeight;
                        _ + 2 < e.config.min_map_size
                          ? (_ = e.config.min_map_size)
                          : (_ += 2);
                      } else if (e._gridView)
                        if (
                          ((_ = 0),
                          s.childNodes[1].childNodes[0].childNodes &&
                            s.childNodes[1].childNodes[0].childNodes.length)
                        ) {
                          for (
                            y =
                              s.childNodes[1].childNodes[0].childNodes[0]
                                .childNodes,
                              c = 0;
                            c < y.length;
                            c++
                          )
                            _ += y[c].offsetHeight;
                          (_ += 2) < e.config.min_grid_size &&
                            (_ = e.config.min_grid_size);
                        } else _ = e.config.min_grid_size;
                      if (e.matrix && e.matrix[l]) {
                        if (t) (_ += 0), (s.style.height = _ + "px");
                        else {
                          _ = 0;
                          for (
                            var b = e.matrix[l], x = b.y_unit, k = 0;
                            k < x.length;
                            k++
                          )
                            _ += b.getSectionHeight(x[k].key);
                          e.$container.clientWidth !=
                            e.$container.scrollWidth && (_ += d());
                        }
                        _ -= 1;
                      }
                      ("day" == l ||
                        "week" == l ||
                        (e._props && e._props[l])) &&
                        (_ += 2);
                  }
                  n += _ += 1;
                }
                (e._obj.style.height = n + "px"), t || e.updateView();
              };
            function s() {
              (a = !1), e.callEvent("onAfterSchedulerResize", []), (a = !0);
            }
            var _ = function () {
              if (!e.config.container_autoresize || !a) return !0;
              var t = e.getState().mode;
              if (!t) return !0;
              var n = window.requestAnimationFrame || window.setTimeout,
                i = document.documentElement.scrollTop;
              n(function () {
                o();
              }),
                (e.matrix && e.matrix[t]) || "month" == t
                  ? n(function () {
                      o(!0), (document.documentElement.scrollTop = i), s();
                    }, 1)
                  : s();
            };
            function d() {
              var e = document.createElement("div");
              (e.style.cssText =
                "visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;"),
                document.body.appendChild(e);
              var t = e.offsetWidth - e.clientWidth;
              return document.body.removeChild(e), t;
            }
            e.attachEvent("onBeforeViewChange", function () {
              var t = e.config.container_autoresize;
              if (
                (e.xy.$original_scroll_width ||
                  (e.xy.$original_scroll_width = e.xy.scroll_width),
                (e.xy.scroll_width = t ? 0 : e.xy.$original_scroll_width),
                e.matrix)
              )
                for (var a in e.matrix) {
                  var n = e.matrix[a];
                  n.$original_section_autoheight ||
                    (n.$original_section_autoheight = n.section_autoheight),
                    (n.section_autoheight =
                      !t && n.$original_section_autoheight);
                }
              return !0;
            }),
              e.attachEvent("onViewChange", _),
              e.attachEvent("onXLE", _),
              e.attachEvent("onEventChanged", _),
              e.attachEvent("onEventCreated", _),
              e.attachEvent("onEventAdded", _),
              e.attachEvent("onEventDeleted", _),
              e.attachEvent("onAfterSchedulerResize", _),
              e.attachEvent("onClearAll", _),
              e.attachEvent("onBeforeExpand", function () {
                return (a = !1), !0;
              }),
              e.attachEvent("onBeforeCollapse", function () {
                return (a = !0), !0;
              });
          },
          cookie: function (e) {
            function t(e) {
              return (e._obj.id || "scheduler") + "_settings";
            }
            var a = !0;
            e.attachEvent("onBeforeViewChange", function (n, i, r, o) {
              if (a && e._get_url_nav) {
                var s = e._get_url_nav();
                (s.date || s.mode || s.event) && (a = !1);
              }
              var _ = t(e);
              if (a) {
                a = !1;
                var d = (function (e) {
                  var t = e + "=";
                  if (document.cookie.length > 0) {
                    var a = document.cookie.indexOf(t);
                    if (-1 != a) {
                      a += t.length;
                      var n = document.cookie.indexOf(";", a);
                      return (
                        -1 == n && (n = document.cookie.length),
                        document.cookie.substring(a, n)
                      );
                    }
                  }
                  return "";
                })(_);
                if (d) {
                  e._min_date || (e._min_date = o),
                    ((d = unescape(d).split("@"))[0] = this._helpers.parseDate(
                      d[0]
                    ));
                  var l = this.isViewExists(d[1]) ? d[1] : r;
                  return (
                    (o = isNaN(+d[0]) ? o : d[0]),
                    window.setTimeout(function () {
                      e.setCurrentView(o, l);
                    }, 1),
                    !1
                  );
                }
              }
              return !0;
            }),
              e.attachEvent("onViewChange", function (a, n) {
                !(function (e, t, a) {
                  var n = e + "=" + a + (t ? "; " + t : "");
                  document.cookie = n;
                })(
                  t(e),
                  "expires=Sun, 31 Jan 9999 22:00:00 GMT",
                  escape(this._helpers.formatDate(n) + "@" + a)
                );
              });
            var n = e._load;
            e._load = function () {
              var t = arguments;
              if (e._date) n.apply(this, t);
              else {
                var a = this;
                window.setTimeout(function () {
                  n.apply(a, t);
                }, 1);
              }
            };
          },
          daytimeline: function (e) {
            Te("Day Timeline", e.assert);
          },
          drag_between: function (e) {
            Te("Drag Between", e.assert);
          },
          editors: function (e) {
            (e.form_blocks.combo = {
              render: function (e) {
                e.cached_options || (e.cached_options = {});
                var t = "";
                return (t +=
                  "<div class='" +
                  e.type +
                  "' style='height:" +
                  (e.height || 20) +
                  "px;' ></div>");
              },
              set_value: function (t, a, n, i) {
                !(function () {
                  n();
                  var a = e.attachEvent("onAfterLightbox", function () {
                    n(), e.detachEvent(a);
                  });
                  function n() {
                    if (t._combo && t._combo.DOMParent) {
                      var e = t._combo;
                      e.unload ? e.unload() : e.destructor && e.destructor(),
                        (e.DOMParent = e.DOMelem = null);
                    }
                  }
                })(),
                  (window.dhx_globalImgPath = i.image_path || "/"),
                  (t._combo = new dhtmlXCombo(t, i.name, t.offsetWidth - 8)),
                  i.onchange && t._combo.attachEvent("onChange", i.onchange),
                  i.options_height &&
                    t._combo.setOptionHeight(i.options_height);
                var r = t._combo;
                if (
                  (r.enableFilteringMode(
                    i.filtering,
                    i.script_path || null,
                    !!i.cache
                  ),
                  i.script_path)
                ) {
                  var o = n[i.map_to];
                  o
                    ? i.cached_options[o]
                      ? (r.addOption(o, i.cached_options[o]),
                        r.disable(1),
                        r.selectOption(0),
                        r.disable(0))
                      : e.ajax.get(
                          i.script_path + "?id=" + o + "&uid=" + e.uid(),
                          function (t) {
                            var a,
                              n = t.xmlDoc.responseText;
                            try {
                              a = JSON.parse(n).options[0].text;
                            } catch (n) {
                              a = e.ajax.xpath("//option", t.xmlDoc)[0]
                                .childNodes[0].nodeValue;
                            }
                            (i.cached_options[o] = a),
                              r.addOption(o, a),
                              r.disable(1),
                              r.selectOption(0),
                              r.disable(0);
                          }
                        )
                    : r.setComboValue("");
                } else {
                  for (var s = [], _ = 0; _ < i.options.length; _++) {
                    var d = i.options[_],
                      l = [d.key, d.label, d.css];
                    s.push(l);
                  }
                  if ((r.addOption(s), n[i.map_to])) {
                    var c = r.getIndexByValue(n[i.map_to]);
                    r.selectOption(c);
                  }
                }
              },
              get_value: function (e, t, a) {
                var n = e._combo.getSelectedValue();
                return (
                  a.script_path &&
                    (a.cached_options[n] = e._combo.getSelectedText()),
                  n
                );
              },
              focus: function (e) {},
            }),
              (e.form_blocks.radio = {
                render: function (t) {
                  var a = "";
                  a +=
                    "<div class='dhx_cal_ltext dhx_cal_radio' style='height:" +
                    t.height +
                    "px;' >";
                  for (var n = 0; n < t.options.length; n++) {
                    var i = e.uid();
                    (a +=
                      "<input id='" +
                      i +
                      "' type='radio' name='" +
                      t.name +
                      "' value='" +
                      t.options[n].key +
                      "'><label for='" +
                      i +
                      "'> " +
                      t.options[n].label +
                      "</label>"),
                      t.vertical && (a += "<br/>");
                  }
                  return (a += "</div>");
                },
                set_value: function (e, t, a, n) {
                  for (
                    var i = e.getElementsByTagName("input"), r = 0;
                    r < i.length;
                    r++
                  ) {
                    i[r].checked = !1;
                    var o = a[n.map_to] || t;
                    i[r].value == o && (i[r].checked = !0);
                  }
                },
                get_value: function (e, t, a) {
                  for (
                    var n = e.getElementsByTagName("input"), i = 0;
                    i < n.length;
                    i++
                  )
                    if (n[i].checked) return n[i].value;
                },
                focus: function (e) {},
              }),
              (e.form_blocks.checkbox = {
                render: function (t) {
                  return e.config.wide_form
                    ? '<div class="dhx_cal_wide_checkbox" ' +
                        (t.height ? "style='height:" + t.height + "px;'" : "") +
                        "></div>"
                    : "";
                },
                set_value: function (t, a, n, i) {
                  t = document.getElementById(i.id);
                  var r = e.uid(),
                    o = void 0 !== i.checked_value ? a == i.checked_value : !!a;
                  t.className += " dhx_cal_checkbox";
                  var s =
                      "<input id='" +
                      r +
                      "' type='checkbox' value='true' name='" +
                      i.name +
                      "'" +
                      (o ? "checked='true'" : "") +
                      "'>",
                    _ =
                      "<label for='" +
                      r +
                      "'>" +
                      (e.locale.labels["section_" + i.name] || i.name) +
                      "</label>";
                  e.config.wide_form
                    ? ((t.innerHTML = _), (t.nextSibling.innerHTML = s))
                    : (t.innerHTML = s + _),
                    i.handler &&
                      (t.getElementsByTagName("input")[0].onclick = i.handler);
                },
                get_value: function (e, t, a) {
                  var n = (e = document.getElementById(
                    a.id
                  )).getElementsByTagName("input")[0];
                  return (
                    n || (n = e.nextSibling.getElementsByTagName("input")[0]),
                    n.checked ? a.checked_value || !0 : a.unchecked_value || !1
                  );
                },
                focus: function (e) {},
              });
          },
          expand: function (e) {
            (e.ext.fullscreen = { toggleIcon: null }),
              (e.expand = function () {
                if (e.callEvent("onBeforeExpand", [])) {
                  var t = e._obj;
                  do {
                    (t._position = t.style.position || ""),
                      (t.style.position = "static");
                  } while ((t = t.parentNode) && t.style);
                  ((t = e._obj).style.position = "absolute"),
                    (t._width = t.style.width),
                    (t._height = t.style.height),
                    (t.style.width = t.style.height = "100%"),
                    (t.style.top = t.style.left = "0px");
                  var a = document.body;
                  (a.scrollTop = 0),
                    (a = a.parentNode) && (a.scrollTop = 0),
                    (document.body._overflow =
                      document.body.style.overflow || ""),
                    (document.body.style.overflow = "hidden"),
                    e._maximize(),
                    e.callEvent("onExpand", []);
                }
              }),
              (e.collapse = function () {
                if (e.callEvent("onBeforeCollapse", [])) {
                  var t = e._obj;
                  do {
                    t.style.position = t._position;
                  } while ((t = t.parentNode) && t.style);
                  ((t = e._obj).style.width = t._width),
                    (t.style.height = t._height),
                    (document.body.style.overflow = document.body._overflow),
                    e._maximize(),
                    e.callEvent("onCollapse", []);
                }
              }),
              e.attachEvent("onTemplatesReady", function () {
                var t = document.createElement("div");
                (t.className = "dhx_expand_icon"),
                  (e.ext.fullscreen.toggleIcon = t),
                  e._obj.appendChild(t),
                  (t.onclick = function () {
                    e.expanded ? e.collapse() : e.expand();
                  });
              }),
              (e._maximize = function () {
                (this.expanded = !this.expanded),
                  (e.ext.fullscreen.toggleIcon.style.backgroundPosition =
                    "0 " + (this.expanded ? "0" : "18") + "px");
                for (var t = ["left", "top"], a = 0; a < t.length; a++) {
                  var n = e["_prev_margin_" + t[a]];
                  e.xy["margin_" + t[a]]
                    ? ((e["_prev_margin_" + t[a]] = e.xy["margin_" + t[a]]),
                      (e.xy["margin_" + t[a]] = 0))
                    : n &&
                      ((e.xy["margin_" + t[a]] = e["_prev_margin_" + t[a]]),
                      delete e["_prev_margin_" + t[a]]);
                }
                e.setCurrentView();
              });
          },
          grid_view: function (e) {
            Te("Grid", e.assert);
          },
          html_templates: function (e) {
            e.attachEvent("onTemplatesReady", function () {
              for (
                var t = document.body.getElementsByTagName("DIV"), a = 0;
                a < t.length;
                a++
              ) {
                var n = t[a].className || "";
                if (2 == (n = n.split(":")).length && "template" == n[0]) {
                  var i =
                    'return "' +
                    (t[a].innerHTML || "")
                      .replace(/"/g, '\\"')
                      .replace(/[\n\r]+/g, "") +
                    '";';
                  (i = unescape(i).replace(
                    /\{event\.([a-z]+)\}/g,
                    function (e, t) {
                      return '"+ev.' + t + '+"';
                    }
                  )),
                    (e.templates[n[1]] = Function("start", "end", "ev", i)),
                    (t[a].style.display = "none");
                }
              }
            });
          },
          key_nav: function (e) {
            function t(t) {
              var a = {
                  minicalButton: e.$keyboardNavigation.MinicalButton,
                  minicalDate: e.$keyboardNavigation.MinicalCell,
                  scheduler: e.$keyboardNavigation.SchedulerNode,
                  dataArea: e.$keyboardNavigation.DataArea,
                  timeSlot: e.$keyboardNavigation.TimeSlot,
                  event: e.$keyboardNavigation.Event,
                },
                n = {};
              for (var i in a) n[i.toLowerCase()] = a[i];
              return n[(t = (t + "").toLowerCase())] || a.scheduler;
            }
            (e.config.key_nav = !0),
              (e.config.key_nav_step = 30),
              (e.addShortcut = function (e, a, n) {
                var i = t(n);
                i && i.prototype.bind(e, a);
              }),
              (e.getShortcutHandler = function (a, n) {
                var i = t(n);
                if (i) {
                  var r = e.$keyboardNavigation.shortcuts.parse(a);
                  if (r.length) return i.prototype.findHandler(r[0]);
                }
              }),
              (e.removeShortcut = function (e, a) {
                var n = t(a);
                n && n.prototype.unbind(e);
              }),
              (e.focus = function () {
                if (e.config.key_nav) {
                  var t = e.$keyboardNavigation.dispatcher;
                  t.enable();
                  var a = t.getActiveNode();
                  !a ||
                  a instanceof e.$keyboardNavigation.MinicalButton ||
                  a instanceof e.$keyboardNavigation.MinicalCell
                    ? t.setDefaultNode()
                    : t.focusNode(t.getActiveNode());
                }
              }),
              (e.$keyboardNavigation = {}),
              (e._compose = function () {
                for (
                  var e = Array.prototype.slice.call(arguments, 0),
                    t = {},
                    a = 0;
                  a < e.length;
                  a++
                ) {
                  var n = e[a];
                  for (var i in ("function" == typeof n && (n = new n()), n))
                    t[i] = n[i];
                }
                return t;
              }),
              (function (e) {
                e.$keyboardNavigation.shortcuts = {
                  createCommand: function () {
                    return {
                      modifiers: { shift: !1, alt: !1, ctrl: !1, meta: !1 },
                      keyCode: null,
                    };
                  },
                  parse: function (e) {
                    for (
                      var t = [], a = this.getExpressions(this.trim(e)), n = 0;
                      n < a.length;
                      n++
                    ) {
                      for (
                        var i = this.getWords(a[n]),
                          r = this.createCommand(),
                          o = 0;
                        o < i.length;
                        o++
                      )
                        this.commandKeys[i[o]]
                          ? (r.modifiers[i[o]] = !0)
                          : this.specialKeys[i[o]]
                          ? (r.keyCode = this.specialKeys[i[o]])
                          : (r.keyCode = i[o].charCodeAt(0));
                      t.push(r);
                    }
                    return t;
                  },
                  getCommandFromEvent: function (e) {
                    var t = this.createCommand();
                    (t.modifiers.shift = !!e.shiftKey),
                      (t.modifiers.alt = !!e.altKey),
                      (t.modifiers.ctrl = !!e.ctrlKey),
                      (t.modifiers.meta = !!e.metaKey),
                      (t.keyCode = e.which || e.keyCode),
                      t.keyCode >= 96 && t.keyCode <= 105 && (t.keyCode -= 48);
                    var a = String.fromCharCode(t.keyCode);
                    return a && (t.keyCode = a.toLowerCase().charCodeAt(0)), t;
                  },
                  getHashFromEvent: function (e) {
                    return this.getHash(this.getCommandFromEvent(e));
                  },
                  getHash: function (e) {
                    var t = [];
                    for (var a in e.modifiers) e.modifiers[a] && t.push(a);
                    return t.push(e.keyCode), t.join(this.junctionChar);
                  },
                  getExpressions: function (e) {
                    return e.split(this.junctionChar);
                  },
                  getWords: function (e) {
                    return e.split(this.combinationChar);
                  },
                  trim: function (e) {
                    return e.replace(/\s/g, "");
                  },
                  junctionChar: ",",
                  combinationChar: "+",
                  commandKeys: { shift: 16, alt: 18, ctrl: 17, meta: !0 },
                  specialKeys: {
                    backspace: 8,
                    tab: 9,
                    enter: 13,
                    esc: 27,
                    space: 32,
                    up: 38,
                    down: 40,
                    left: 37,
                    right: 39,
                    home: 36,
                    end: 35,
                    pageup: 33,
                    pagedown: 34,
                    delete: 46,
                    insert: 45,
                    plus: 107,
                    f1: 112,
                    f2: 113,
                    f3: 114,
                    f4: 115,
                    f5: 116,
                    f6: 117,
                    f7: 118,
                    f8: 119,
                    f9: 120,
                    f10: 121,
                    f11: 122,
                    f12: 123,
                  },
                };
              })(e),
              (function (e) {
                e.$keyboardNavigation.EventHandler = {
                  _handlers: null,
                  findHandler: function (t) {
                    this._handlers || (this._handlers = {});
                    var a = e.$keyboardNavigation.shortcuts.getHash(t);
                    return this._handlers[a];
                  },
                  doAction: function (e, t) {
                    var a = this.findHandler(e);
                    a &&
                      (a.call(this, t),
                      t.preventDefault
                        ? t.preventDefault()
                        : (t.returnValue = !1));
                  },
                  bind: function (t, a) {
                    this._handlers || (this._handlers = {});
                    for (
                      var n = e.$keyboardNavigation.shortcuts,
                        i = n.parse(t),
                        r = 0;
                      r < i.length;
                      r++
                    )
                      this._handlers[n.getHash(i[r])] = a;
                  },
                  unbind: function (t) {
                    for (
                      var a = e.$keyboardNavigation.shortcuts,
                        n = a.parse(t),
                        i = 0;
                      i < n.length;
                      i++
                    )
                      this._handlers[a.getHash(n[i])] &&
                        delete this._handlers[a.getHash(n[i])];
                  },
                  bindAll: function (e) {
                    for (var t in e) this.bind(t, e[t]);
                  },
                  initKeys: function () {
                    this._handlers || (this._handlers = {}),
                      this.keys && this.bindAll(this.keys);
                  },
                };
              })(e),
              (function (e) {
                (e.$keyboardNavigation.getFocusableNodes =
                  e._getFocusableNodes),
                  (e.$keyboardNavigation.trapFocus = function (t, a) {
                    if (9 != a.keyCode) return !1;
                    for (
                      var n,
                        i = e.$keyboardNavigation.getFocusableNodes(t),
                        r = document.activeElement,
                        o = -1,
                        s = 0;
                      s < i.length;
                      s++
                    )
                      if (i[s] == r) {
                        o = s;
                        break;
                      }
                    if (a.shiftKey) {
                      if ((n = i[o <= 0 ? i.length - 1 : o - 1]))
                        return n.focus(), a.preventDefault(), !0;
                    } else if ((n = i[o >= i.length - 1 ? 0 : o + 1]))
                      return n.focus(), a.preventDefault(), !0;
                    return !1;
                  });
              })(e),
              (function (e) {
                e.$keyboardNavigation.marker = {
                  clear: function () {
                    for (
                      var t = e.$container.querySelectorAll(".dhx_focus_slot"),
                        a = 0;
                      a < t.length;
                      a++
                    )
                      t[a].parentNode.removeChild(t[a]);
                  },
                  createElement: function () {
                    var e = document.createElement("div");
                    return (
                      e.setAttribute("tabindex", -1),
                      (e.className = "dhx_focus_slot"),
                      e
                    );
                  },
                  renderMultiple: function (t, a, n) {
                    for (
                      var i = [],
                        r = new Date(t),
                        o = new Date(
                          Math.min(
                            a.valueOf(),
                            e.date
                              .add(e.date.day_start(new Date(t)), 1, "day")
                              .valueOf()
                          )
                        );
                      r.valueOf() < a.valueOf();

                    )
                      (i = i.concat(
                        n.call(
                          this,
                          r,
                          new Date(Math.min(o.valueOf(), a.valueOf()))
                        )
                      )),
                        (r = e.date.day_start(e.date.add(r, 1, "day"))),
                        (o = e.date.day_start(e.date.add(r, 1, "day"))),
                        (o = new Date(Math.min(o.valueOf(), a.valueOf())));
                    return i;
                  },
                  render: function (t, a, n) {
                    this.clear();
                    var i = [],
                      r = e.$keyboardNavigation.TimeSlot.prototype._modes;
                    switch (
                      e.$keyboardNavigation.TimeSlot.prototype._getMode()
                    ) {
                      case r.units:
                        i = this.renderVerticalMarker(t, a, n);
                        break;
                      case r.timeline:
                        i = this.renderTimelineMarker(t, a, n);
                        break;
                      case r.year:
                        i = i.concat(
                          this.renderMultiple(t, a, this.renderYearMarker)
                        );
                        break;
                      case r.month:
                        i = this.renderMonthMarker(t, a);
                        break;
                      case r.weekAgenda:
                        i = i.concat(
                          this.renderMultiple(t, a, this.renderWeekAgendaMarker)
                        );
                        break;
                      case r.list:
                        i = this.renderAgendaMarker(t, a);
                        break;
                      case r.dayColumns:
                        i = i.concat(
                          this.renderMultiple(t, a, this.renderVerticalMarker)
                        );
                    }
                    this.addWaiAriaLabel(i, t, a, n),
                      this.addDataAttributes(i, t, a, n);
                    for (var o = i.length - 1; o >= 0; o--)
                      if (i[o].offsetWidth) return i[o];
                    return null;
                  },
                  addDataAttributes: function (t, a, n, i) {
                    for (
                      var r = e.date.date_to_str(e.config.api_date),
                        o = r(a),
                        s = r(n),
                        _ = 0;
                      _ < t.length;
                      _++
                    )
                      t[_].setAttribute("data-start-date", o),
                        t[_].setAttribute("data-end-date", s),
                        i && t[_].setAttribute("data-section", i);
                  },
                  addWaiAriaLabel: function (t, a, n, i) {
                    var r = "",
                      o = e.getState().mode,
                      s = !1;
                    (r += e.templates.day_date(a)),
                      e.date.day_start(new Date(a)).valueOf() != a.valueOf() &&
                        ((r += " " + e.templates.hour_scale(a)), (s = !0)),
                      e.date.day_start(new Date(a)).valueOf() !=
                        e.date.day_start(new Date(n)).valueOf() &&
                        ((r += " - " + e.templates.day_date(n)),
                        (s ||
                          e.date.day_start(new Date(n)).valueOf() !=
                            n.valueOf()) &&
                          (r += " " + e.templates.hour_scale(n))),
                      i &&
                        (e.matrix && e.matrix[o]
                          ? (r +=
                              ", " +
                              e.templates[o + "_scale_label"](
                                i.key,
                                i.label,
                                i
                              ))
                          : e._props &&
                            e._props[o] &&
                            (r +=
                              ", " +
                              e.templates[o + "_scale_text"](
                                i.key,
                                i.label,
                                i
                              )));
                    for (var _ = 0; _ < t.length; _++)
                      e._waiAria.setAttributes(t[_], {
                        "aria-label": r,
                        "aria-live": "polite",
                      });
                  },
                  renderWeekAgendaMarker: function (t, a) {
                    for (
                      var n = e.$container.querySelectorAll(
                          ".dhx_wa_day_cont .dhx_wa_scale_bar"
                        ),
                        i = e.date.week_start(new Date(e.getState().min_date)),
                        r = -1,
                        o = e.date.day_start(new Date(t)),
                        s = 0;
                      s < n.length &&
                      (r++,
                      e.date.day_start(new Date(i)).valueOf() != o.valueOf());
                      s++
                    )
                      i = e.date.add(i, 1, "day");
                    return -1 != r ? this._wrapDiv(n[r]) : [];
                  },
                  _wrapDiv: function (e) {
                    var t = this.createElement();
                    return (
                      (t.style.top = e.offsetTop + "px"),
                      (t.style.left = e.offsetLeft + "px"),
                      (t.style.width = e.offsetWidth + "px"),
                      (t.style.height = e.offsetHeight + "px"),
                      e.appendChild(t),
                      [t]
                    );
                  },
                  renderYearMarker: function (t, a) {
                    var n = e._get_year_cell(t);
                    n.style.position = "relative";
                    var i = this.createElement();
                    return (
                      (i.style.top = "0px"),
                      (i.style.left = "0px"),
                      (i.style.width = "100%"),
                      (i.style.height = "100%"),
                      n.appendChild(i),
                      [i]
                    );
                  },
                  renderAgendaMarker: function (t, a) {
                    var n = this.createElement();
                    return (
                      (n.style.height = "1px"),
                      (n.style.width = "100%"),
                      (n.style.opacity = 1),
                      (n.style.top = "0px"),
                      (n.style.left = "0px"),
                      e.$container
                        .querySelector(".dhx_cal_data")
                        .appendChild(n),
                      [n]
                    );
                  },
                  renderTimelineMarker: function (t, a, n) {
                    var i = e._lame_copy({}, e.matrix[e._mode]),
                      r = i._scales;
                    i.round_position = !1;
                    var o = [],
                      s = t ? new Date(t) : e._min_date,
                      _ = a ? new Date(a) : e._max_date;
                    if (
                      (s.valueOf() < e._min_date.valueOf() &&
                        (s = new Date(e._min_date)),
                      _.valueOf() > e._max_date.valueOf() &&
                        (_ = new Date(e._max_date)),
                      !i._trace_x)
                    )
                      return o;
                    for (
                      var d = 0;
                      d < i._trace_x.length &&
                      !e._is_column_visible(i._trace_x[d]);
                      d++
                    );
                    if (d == i._trace_x.length) return o;
                    var l = r[n];
                    if (!(s < a && _ > t)) return o;
                    var c = this.createElement(),
                      u = e._timeline_getX({ start_date: t }, !1, i) - 1,
                      h = e._timeline_getX({ start_date: a }, !1, i) - 1,
                      f = i._section_height[n] - 1 || i.dy - 1,
                      p = 0;
                    e._isRender("cell") &&
                      ((p = l.offsetTop),
                      (u += i.dx),
                      (h += i.dx),
                      (l = e.$container.querySelector(".dhx_cal_data")));
                    var v = Math.max(1, h - u - 1);
                    return (
                      (c.style.cssText =
                        "height: " +
                        f +
                        "px; left: " +
                        u +
                        "px; width: " +
                        v +
                        "px; top: " +
                        p +
                        "px;"),
                      l.appendChild(c),
                      o.push(c),
                      o
                    );
                  },
                  renderMonthCell: function (t) {
                    for (
                      var a = e.$container.querySelectorAll(".dhx_month_head"),
                        n = [],
                        i = 0;
                      i < a.length;
                      i++
                    )
                      n.push(a[i].parentNode);
                    var r = -1,
                      o = 0,
                      s = -1,
                      _ = e.date.week_start(new Date(e.getState().min_date)),
                      d = e.date.day_start(new Date(t));
                    for (
                      i = 0;
                      i < n.length &&
                      (r++,
                      6 == s ? (o++, (s = 0)) : s++,
                      e.date.day_start(new Date(_)).valueOf() != d.valueOf());
                      i++
                    )
                      _ = e.date.add(_, 1, "day");
                    if (-1 == r) return [];
                    var l = e._colsS[s],
                      c = e._colsS.heights[o],
                      u = this.createElement();
                    (u.style.top = c + "px"),
                      (u.style.left = l + "px"),
                      (u.style.width = e._cols[s] + "px"),
                      (u.style.height =
                        (e._colsS.heights[o + 1] - c || e._colsS.height) +
                        "px");
                    var h = e.$container.querySelector(".dhx_cal_data"),
                      f = h.querySelector("table");
                    return (
                      f.nextSibling
                        ? h.insertBefore(u, f.nextSibling)
                        : h.appendChild(u),
                      u
                    );
                  },
                  renderMonthMarker: function (t, a) {
                    for (var n = [], i = t; i.valueOf() < a.valueOf(); )
                      n.push(this.renderMonthCell(i)),
                        (i = e.date.add(i, 1, "day"));
                    return n;
                  },
                  renderVerticalMarker: function (t, a, n) {
                    var i = e.locate_holder_day(t),
                      r = [],
                      o = null,
                      s = e.config;
                    if (e._ignores[i]) return r;
                    if (e._props && e._props[e._mode] && n) {
                      var _ = e._props[e._mode];
                      i = _.order[n];
                      var d = _.order[n];
                      _.days > 1
                        ? (i = e.locate_holder_day(t) + d)
                        : ((i = d),
                          _.size && i > _.position + _.size && (i = 0));
                    }
                    if (
                      !(o = e.locate_holder(i)) ||
                      o.querySelector(".dhx_scale_hour")
                    )
                      return document.createElement("div");
                    var l = Math.max(
                        60 * t.getHours() + t.getMinutes(),
                        60 * s.first_hour
                      ),
                      c = Math.min(
                        60 * a.getHours() + a.getMinutes(),
                        60 * s.last_hour
                      );
                    if (
                      (!c &&
                        e.date.day_start(new Date(a)).valueOf() >
                          e.date.day_start(new Date(t)).valueOf() &&
                        (c = 60 * s.last_hour),
                      c <= l)
                    )
                      return [];
                    var u = this.createElement(),
                      h = e.config.hour_size_px * s.last_hour + 1;
                    return (
                      (u.style.top =
                        (Math.round(
                          ((60 * l * 1e3 - 36e5 * e.config.first_hour) *
                            e.config.hour_size_px) /
                            36e5
                        ) %
                          h) +
                        "px"),
                      (u.style.lineHeight = u.style.height =
                        Math.max(
                          Math.round(
                            (60 * (c - l) * 1e3 * e.config.hour_size_px) / 36e5
                          ) % h,
                          1
                        ) + "px"),
                      (u.style.width = "100%"),
                      o.appendChild(u),
                      r.push(u),
                      r[0]
                    );
                  },
                };
              })(e),
              (function (e) {
                (e.$keyboardNavigation.SchedulerNode = function () {}),
                  (e.$keyboardNavigation.SchedulerNode.prototype = e._compose(
                    e.$keyboardNavigation.EventHandler,
                    {
                      getDefaultNode: function () {
                        var t = new e.$keyboardNavigation.TimeSlot();
                        return t.isValid() || (t = t.fallback()), t;
                      },
                      _modes: {
                        month: "month",
                        year: "year",
                        dayColumns: "dayColumns",
                        timeline: "timeline",
                        units: "units",
                        weekAgenda: "weekAgenda",
                        list: "list",
                      },
                      getMode: function () {
                        var t = e.getState().mode;
                        return e.matrix && e.matrix[t]
                          ? this._modes.timeline
                          : e._props && e._props[t]
                          ? this._modes.units
                          : "month" == t
                          ? this._modes.month
                          : "year" == t
                          ? this._modes.year
                          : "week_agenda" == t
                          ? this._modes.weekAgenda
                          : "map" == t ||
                            "agenda" == t ||
                            (e._grid && e["grid_" + t])
                          ? this._modes.list
                          : this._modes.dayColumns;
                      },
                      focus: function () {
                        e.focus();
                      },
                      blur: function () {},
                      disable: function () {
                        e.$container.setAttribute("tabindex", "0");
                      },
                      enable: function () {
                        e.$container &&
                          e.$container.removeAttribute("tabindex");
                      },
                      isEnabled: function () {
                        return e.$container.hasAttribute("tabindex");
                      },
                      _compareEvents: function (e, t) {
                        return e.start_date.valueOf() == t.start_date.valueOf()
                          ? e.id > t.id
                            ? 1
                            : -1
                          : e.start_date.valueOf() > t.start_date.valueOf()
                          ? 1
                          : -1;
                      },
                      _pickEvent: function (t, a, n, i) {
                        var r = e.getState();
                        (t = new Date(
                          Math.max(r.min_date.valueOf(), t.valueOf())
                        )),
                          (a = new Date(
                            Math.min(r.max_date.valueOf(), a.valueOf())
                          ));
                        var o = e.getEvents(t, a);
                        o.sort(this._compareEvents), i && (o = o.reverse());
                        for (var s = !!n, _ = 0; _ < o.length && s; _++)
                          o[_].id == n && (s = !1), o.splice(_, 1), _--;
                        for (_ = 0; _ < o.length; _++)
                          if (
                            new e.$keyboardNavigation.Event(o[_].id).getNode()
                          )
                            return o[_];
                        return null;
                      },
                      nextEventHandler: function (t) {
                        var a = e.$keyboardNavigation.dispatcher.activeNode,
                          n = t || (a && a.eventId),
                          i = null;
                        if (n && e.getEvent(n)) {
                          var r = e.getEvent(n);
                          i =
                            e.$keyboardNavigation.SchedulerNode.prototype._pickEvent(
                              r.start_date,
                              e.date.add(r.start_date, 1, "year"),
                              r.id,
                              !1
                            );
                        }
                        if (!i && !t) {
                          var o = e.getState();
                          i =
                            e.$keyboardNavigation.SchedulerNode.prototype._pickEvent(
                              o.min_date,
                              e.date.add(o.min_date, 1, "year"),
                              null,
                              !1
                            );
                        }
                        if (i) {
                          var s = new e.$keyboardNavigation.Event(i.id);
                          s.isValid()
                            ? (a && a.blur(),
                              e.$keyboardNavigation.dispatcher.setActiveNode(s))
                            : this.nextEventHandler(i.id);
                        }
                      },
                      prevEventHandler: function (t) {
                        var a = e.$keyboardNavigation.dispatcher.activeNode,
                          n = t || (a && a.eventId),
                          i = null;
                        if (n && e.getEvent(n)) {
                          var r = e.getEvent(n);
                          i =
                            e.$keyboardNavigation.SchedulerNode.prototype._pickEvent(
                              e.date.add(r.end_date, -1, "year"),
                              r.end_date,
                              r.id,
                              !0
                            );
                        }
                        if (!i && !t) {
                          var o = e.getState();
                          i =
                            e.$keyboardNavigation.SchedulerNode.prototype._pickEvent(
                              e.date.add(o.max_date, -1, "year"),
                              o.max_date,
                              null,
                              !0
                            );
                        }
                        if (i) {
                          var s = new e.$keyboardNavigation.Event(i.id);
                          s.isValid()
                            ? (a && a.blur(),
                              e.$keyboardNavigation.dispatcher.setActiveNode(s))
                            : this.prevEventHandler(i.id);
                        }
                      },
                      keys: {
                        "alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9":
                          function (t) {
                            var a =
                                e.$keyboardNavigation.HeaderCell.prototype.getNodes(
                                  ".dhx_cal_navline .dhx_cal_tab"
                                ),
                              n = t.key;
                            void 0 === n && (n = t.keyCode - 48),
                              a[1 * n - 1] && a[1 * n - 1].click();
                          },
                        "ctrl+left,meta+left": function (t) {
                          e._click.dhx_cal_prev_button();
                        },
                        "ctrl+right,meta+right": function (t) {
                          e._click.dhx_cal_next_button();
                        },
                        "ctrl+up,meta+up": function (t) {
                          e.$container.querySelector(
                            ".dhx_cal_data"
                          ).scrollTop -= 20;
                        },
                        "ctrl+down,meta+down": function (t) {
                          e.$container.querySelector(
                            ".dhx_cal_data"
                          ).scrollTop += 20;
                        },
                        e: function () {
                          this.nextEventHandler();
                        },
                        home: function () {
                          e.setCurrentView(new Date());
                        },
                        "shift+e": function () {
                          this.prevEventHandler();
                        },
                        "ctrl+enter,meta+enter": function () {
                          e.addEventNow({
                            start_date: new Date(e.getState().date),
                          });
                        },
                        "ctrl+c,meta+c": function (t) {
                          e._key_nav_copy_paste(t);
                        },
                        "ctrl+v,meta+v": function (t) {
                          e._key_nav_copy_paste(t);
                        },
                        "ctrl+x,meta+x": function (t) {
                          e._key_nav_copy_paste(t);
                        },
                      },
                    }
                  )),
                  e.$keyboardNavigation.SchedulerNode.prototype.bindAll(
                    e.$keyboardNavigation.SchedulerNode.prototype.keys
                  );
              })(e),
              (function (e) {
                (e.$keyboardNavigation.KeyNavNode = function () {}),
                  (e.$keyboardNavigation.KeyNavNode.prototype = e._compose(
                    e.$keyboardNavigation.EventHandler,
                    {
                      isValid: function () {
                        return !0;
                      },
                      fallback: function () {
                        return null;
                      },
                      moveTo: function (t) {
                        e.$keyboardNavigation.dispatcher.setActiveNode(t);
                      },
                      compareTo: function (e) {
                        if (!e) return !1;
                        for (var t in this) {
                          if (!!this[t] != !!e[t]) return !1;
                          var a = !(!this[t] || !this[t].toString),
                            n = !(!e[t] || !e[t].toString);
                          if (n != a) return !1;
                          if (n && a) {
                            if (e[t].toString() != this[t].toString())
                              return !1;
                          } else if (e[t] != this[t]) return !1;
                        }
                        return !0;
                      },
                      getNode: function () {},
                      focus: function () {
                        var e = this.getNode();
                        e &&
                          (e.setAttribute("tabindex", "-1"),
                          e.focus && e.focus());
                      },
                      blur: function () {
                        var e = this.getNode();
                        e && e.setAttribute("tabindex", "-1");
                      },
                    }
                  ));
              })(e),
              (function (e) {
                (e.$keyboardNavigation.HeaderCell = function (e) {
                  this.index = e || 0;
                }),
                  (e.$keyboardNavigation.HeaderCell.prototype = e._compose(
                    e.$keyboardNavigation.KeyNavNode,
                    {
                      getNode: function (e) {
                        e = e || this.index || 0;
                        var t = this.getNodes();
                        if (t[e]) return t[e];
                      },
                      getNodes: function (t) {
                        t =
                          t ||
                          [
                            ".dhx_cal_navline .dhx_cal_prev_button",
                            ".dhx_cal_navline .dhx_cal_next_button",
                            ".dhx_cal_navline .dhx_cal_today_button",
                            ".dhx_cal_navline .dhx_cal_tab",
                          ].join(", ");
                        var a = Array.prototype.slice.call(
                          e.$container.querySelectorAll(t)
                        );
                        return (
                          a.sort(function (e, t) {
                            return e.offsetLeft - t.offsetLeft;
                          }),
                          a
                        );
                      },
                      _handlers: null,
                      isValid: function () {
                        return !!this.getNode(this.index);
                      },
                      fallback: function () {
                        var t = this.getNode(0);
                        return (
                          t || (t = new e.$keyboardNavigation.TimeSlot()), t
                        );
                      },
                      keys: {
                        left: function () {
                          var t = this.index - 1;
                          t < 0 && (t = this.getNodes().length - 1),
                            this.moveTo(
                              new e.$keyboardNavigation.HeaderCell(t)
                            );
                        },
                        right: function () {
                          var t = this.index + 1;
                          t >= this.getNodes().length && (t = 0),
                            this.moveTo(
                              new e.$keyboardNavigation.HeaderCell(t)
                            );
                        },
                        down: function () {
                          this.moveTo(new e.$keyboardNavigation.TimeSlot());
                        },
                        enter: function () {
                          var e = this.getNode();
                          e && e.click();
                        },
                      },
                    }
                  )),
                  e.$keyboardNavigation.HeaderCell.prototype.bindAll(
                    e.$keyboardNavigation.HeaderCell.prototype.keys
                  );
              })(e),
              (function (e) {
                (e.$keyboardNavigation.Event = function (t) {
                  if (((this.eventId = null), e.getEvent(t))) {
                    var a = e.getEvent(t);
                    (this.start = new Date(a.start_date)),
                      (this.end = new Date(a.end_date)),
                      (this.section = this._getSection(a)),
                      (this.eventId = t);
                  }
                }),
                  (e.$keyboardNavigation.Event.prototype = e._compose(
                    e.$keyboardNavigation.KeyNavNode,
                    {
                      _getNodes: function () {
                        return Array.prototype.slice.call(
                          e.$container.querySelectorAll(
                            "[" + e.config.event_attribute + "]"
                          )
                        );
                      },
                      _modes:
                        e.$keyboardNavigation.SchedulerNode.prototype._modes,
                      getMode:
                        e.$keyboardNavigation.SchedulerNode.prototype.getMode,
                      _handlers: null,
                      isValid: function () {
                        return !(!e.getEvent(this.eventId) || !this.getNode());
                      },
                      fallback: function () {
                        var t = this._getNodes()[0],
                          a = null;
                        if (t && e._locate_event(t)) {
                          var n = e._locate_event(t);
                          a = new e.$keyboardNavigation.Event(n);
                        } else a = new e.$keyboardNavigation.TimeSlot();
                        return a;
                      },
                      isScrolledIntoView: function (t) {
                        var a = t.getBoundingClientRect(),
                          n = e.$container
                            .querySelector(".dhx_cal_data")
                            .getBoundingClientRect();
                        return !(a.bottom < n.top || a.top > n.bottom);
                      },
                      getNode: function () {
                        var t =
                            "[" +
                            e.config.event_attribute +
                            "='" +
                            this.eventId +
                            "']",
                          a = e.$keyboardNavigation.dispatcher.getInlineEditor(
                            this.eventId
                          );
                        if (a) return a;
                        if (
                          e.isMultisectionEvent &&
                          e.isMultisectionEvent(e.getEvent(this.eventId))
                        ) {
                          for (
                            var n = e.$container.querySelectorAll(t), i = 0;
                            i < n.length;
                            i++
                          )
                            if (this.isScrolledIntoView(n[i])) return n[i];
                          return n[0];
                        }
                        return e.$container.querySelector(t);
                      },
                      focus: function () {
                        var t = e.getEvent(this.eventId),
                          a = e.getState();
                        (t.start_date.valueOf() > a.max_date.valueOf() ||
                          t.end_date.valueOf() <= a.min_date.valueOf()) &&
                          e.setCurrentView(t.start_date);
                        var n = this.getNode();
                        this.isScrolledIntoView(n)
                          ? e.$keyboardNavigation.dispatcher.keepScrollPosition(
                              function () {
                                e.$keyboardNavigation.KeyNavNode.prototype.focus.apply(
                                  this
                                );
                              }.bind(this)
                            )
                          : e.$keyboardNavigation.KeyNavNode.prototype.focus.apply(
                              this
                            );
                      },
                      blur: function () {
                        e.$keyboardNavigation.KeyNavNode.prototype.blur.apply(
                          this
                        );
                      },
                      _getSection: function (t) {
                        var a = null,
                          n = e.getState().mode;
                        return (
                          e.matrix && e.matrix[n]
                            ? (a = t[e.matrix[e.getState().mode].y_property])
                            : e._props &&
                              e._props[n] &&
                              (a = t[e._props[n].map_to]),
                          a
                        );
                      },
                      _moveToSlot: function (t) {
                        var a = e.getEvent(this.eventId);
                        if (a) {
                          var n = this._getSection(a),
                            i = new e.$keyboardNavigation.TimeSlot(
                              a.start_date,
                              null,
                              n
                            );
                          this.moveTo(i.nextSlot(i, t));
                        } else
                          this.moveTo(new e.$keyboardNavigation.TimeSlot());
                      },
                      keys: {
                        left: function () {
                          this._moveToSlot("left");
                        },
                        right: function () {
                          this._moveToSlot("right");
                        },
                        down: function () {
                          this.getMode() == this._modes.list
                            ? e.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler()
                            : this._moveToSlot("down");
                        },
                        space: function () {
                          var t = this.getNode();
                          t && t.click
                            ? t.click()
                            : this.moveTo(new e.$keyboardNavigation.TimeSlot());
                        },
                        up: function () {
                          this.getMode() == this._modes.list
                            ? e.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler()
                            : this._moveToSlot("up");
                        },
                        delete: function () {
                          e.getEvent(this.eventId)
                            ? e._click.buttons.delete(this.eventId)
                            : this.moveTo(new e.$keyboardNavigation.TimeSlot());
                        },
                        enter: function () {
                          e.getEvent(this.eventId)
                            ? e.showLightbox(this.eventId)
                            : this.moveTo(new e.$keyboardNavigation.TimeSlot());
                        },
                      },
                    }
                  )),
                  e.$keyboardNavigation.Event.prototype.bindAll(
                    e.$keyboardNavigation.Event.prototype.keys
                  );
              })(e),
              (function (e) {
                (e.$keyboardNavigation.TimeSlot = function (t, a, n, i) {
                  var r = e.getState(),
                    o = e.matrix && e.matrix[r.mode];
                  t || (t = this.getDefaultDate()),
                    a ||
                      (a = o
                        ? e.date.add(t, o.x_step, o.x_unit)
                        : e.date.add(t, e.config.key_nav_step, "minute")),
                    (this.section = n || this._getDefaultSection()),
                    (this.start_date = new Date(t)),
                    (this.end_date = new Date(a)),
                    (this.movingDate = i || null);
                }),
                  (e.$keyboardNavigation.TimeSlot.prototype = e._compose(
                    e.$keyboardNavigation.KeyNavNode,
                    {
                      _handlers: null,
                      getDefaultDate: function () {
                        var t,
                          a = e.getState(),
                          n = new Date(a.date);
                        n.setSeconds(0), n.setMilliseconds(0);
                        var i = new Date();
                        i.setSeconds(0), i.setMilliseconds(0);
                        var r = e.matrix && e.matrix[a.mode],
                          o = !1;
                        if ((n.valueOf() === i.valueOf() && (o = !0), r))
                          o
                            ? ("day" === r.x_unit
                                ? (i.setHours(0), i.setMinutes(0))
                                : "hour" === r.x_unit && i.setMinutes(0),
                              (t = i))
                            : (t = e.date[r.name + "_start"](new Date(a.date))),
                            (t = this.findVisibleColumn(t));
                        else if (
                          ((t = new Date(e.getState().min_date)),
                          o && (t = i),
                          (t = this.findVisibleColumn(t)),
                          o || t.setHours(e.config.first_hour),
                          !e._table_view)
                        ) {
                          var s = e.$container.querySelector(".dhx_cal_data");
                          s.scrollTop &&
                            t.setHours(
                              e.config.first_hour +
                                Math.ceil(s.scrollTop / e.config.hour_size_px)
                            );
                        }
                        return t;
                      },
                      clone: function (t) {
                        return new e.$keyboardNavigation.TimeSlot(
                          t.start_date,
                          t.end_date,
                          t.section,
                          t.movingDate
                        );
                      },
                      _getMultisectionView: function () {
                        var t,
                          a = e.getState();
                        return (
                          e._props && e._props[a.mode]
                            ? (t = e._props[a.mode])
                            : e.matrix &&
                              e.matrix[a.mode] &&
                              (t = e.matrix[a.mode]),
                          t
                        );
                      },
                      _getDefaultSection: function () {
                        var e = null;
                        return (
                          this._getMultisectionView() &&
                            !e &&
                            (e = this._getNextSection()),
                          e
                        );
                      },
                      _getNextSection: function (e, t) {
                        var a = this._getMultisectionView(),
                          n = a.order[e],
                          i = n;
                        i =
                          (i =
                            void 0 !== n
                              ? n + t
                              : a.size && a.position
                              ? a.position
                              : 0) < 0
                            ? (i = (a.options || a.y_unit).length - 1)
                            : i;
                        var r = a.options || a.y_unit;
                        return r[i] ? r[i].key : null;
                      },
                      isValid: function () {
                        var t = e.getState();
                        if (
                          this.start_date.valueOf() < t.min_date.valueOf() ||
                          this.start_date.valueOf() >= t.max_date.valueOf()
                        )
                          return !1;
                        if (!this.isVisible(this.start_date, this.end_date))
                          return !1;
                        var a = this._getMultisectionView();
                        return !a || void 0 !== a.order[this.section];
                      },
                      fallback: function () {
                        var t = new e.$keyboardNavigation.TimeSlot();
                        return t.isValid()
                          ? t
                          : new e.$keyboardNavigation.DataArea();
                      },
                      getNodes: function () {
                        return Array.prototype.slice.call(
                          e.$container.querySelectorAll(".dhx_focus_slot")
                        );
                      },
                      getNode: function () {
                        return this.getNodes()[0];
                      },
                      focus: function () {
                        e.$keyboardNavigation.marker.render(
                          this.start_date,
                          this.end_date,
                          this.section
                        ),
                          e.$keyboardNavigation.KeyNavNode.prototype.focus.apply(
                            this
                          ),
                          (e.$keyboardNavigation._pasteDate = this.start_date),
                          (e.$keyboardNavigation._pasteSection = this.section);
                      },
                      blur: function () {
                        e.$keyboardNavigation.KeyNavNode.prototype.blur.apply(
                          this
                        ),
                          e.$keyboardNavigation.marker.clear();
                      },
                      _modes:
                        e.$keyboardNavigation.SchedulerNode.prototype._modes,
                      _getMode:
                        e.$keyboardNavigation.SchedulerNode.prototype.getMode,
                      addMonthDate: function (t, a, n) {
                        var i;
                        switch (a) {
                          case "up":
                            i = e.date.add(t, -1, "week");
                            break;
                          case "down":
                            i = e.date.add(t, 1, "week");
                            break;
                          case "left":
                            (i = e.date.day_start(e.date.add(t, -1, "day"))),
                              (i = this.findVisibleColumn(i, -1));
                            break;
                          case "right":
                            (i = e.date.day_start(e.date.add(t, 1, "day"))),
                              (i = this.findVisibleColumn(i, 1));
                            break;
                          default:
                            i = e.date.day_start(new Date(t));
                        }
                        var r = e.getState();
                        return (
                          (t.valueOf() < r.min_date.valueOf() ||
                            (!n && t.valueOf() >= r.max_date.valueOf())) &&
                            (i = new Date(r.min_date)),
                          i
                        );
                      },
                      nextMonthSlot: function (t, a, n) {
                        var i, r;
                        return (
                          (i = this.addMonthDate(t.start_date, a, n)).setHours(
                            e.config.first_hour
                          ),
                          (r = new Date(i)).setHours(e.config.last_hour),
                          { start_date: i, end_date: r }
                        );
                      },
                      _alignTimeSlot: function (t, a, n, i) {
                        for (var r = new Date(a); r.valueOf() < t.valueOf(); )
                          r = e.date.add(r, i, n);
                        return (
                          r.valueOf() > t.valueOf() &&
                            (r = e.date.add(r, -i, n)),
                          r
                        );
                      },
                      nextTimelineSlot: function (t, a, n) {
                        var i = e.getState(),
                          r = e.matrix[i.mode],
                          o = this._alignTimeSlot(
                            t.start_date,
                            e.date[r.name + "_start"](new Date(t.start_date)),
                            r.x_unit,
                            r.x_step
                          ),
                          s = this._alignTimeSlot(
                            t.end_date,
                            e.date[r.name + "_start"](new Date(t.end_date)),
                            r.x_unit,
                            r.x_step
                          );
                        s.valueOf() <= o.valueOf() &&
                          (s = e.date.add(o, r.x_step, r.x_unit));
                        var _ = this.clone(t);
                        switch (
                          ((_.start_date = o),
                          (_.end_date = s),
                          (_.section = t.section || this._getNextSection()),
                          a)
                        ) {
                          case "up":
                            _.section = this._getNextSection(t.section, -1);
                            break;
                          case "down":
                            _.section = this._getNextSection(t.section, 1);
                            break;
                          case "left":
                            (_.start_date = this.findVisibleColumn(
                              e.date.add(_.start_date, -r.x_step, r.x_unit),
                              -1
                            )),
                              (_.end_date = e.date.add(
                                _.start_date,
                                r.x_step,
                                r.x_unit
                              ));
                            break;
                          case "right":
                            (_.start_date = this.findVisibleColumn(
                              e.date.add(_.start_date, r.x_step, r.x_unit),
                              1
                            )),
                              (_.end_date = e.date.add(
                                _.start_date,
                                r.x_step,
                                r.x_unit
                              ));
                        }
                        return (
                          (_.start_date.valueOf() < i.min_date.valueOf() ||
                            _.start_date.valueOf() >= i.max_date.valueOf()) &&
                            (n && _.start_date.valueOf() >= i.max_date.valueOf()
                              ? (_.start_date = new Date(i.max_date))
                              : ((_.start_date = e.date[i.mode + "_start"](
                                  e.date.add(
                                    i.date,
                                    "left" == a ? -1 : 1,
                                    i.mode
                                  )
                                )),
                                (_.end_date = e.date.add(
                                  _.start_date,
                                  r.x_step,
                                  r.x_unit
                                )))),
                          _
                        );
                      },
                      nextUnitsSlot: function (t, a, n) {
                        var i = this.clone(t);
                        i.section = t.section || this._getNextSection();
                        var r = t.section || this._getNextSection(),
                          o = e.getState(),
                          s = e._props[o.mode];
                        switch (a) {
                          case "left":
                            r = this._getNextSection(t.section, -1);
                            var _ = s.size ? s.size - 1 : s.options.length;
                            s.days > 1 &&
                              s.order[r] == _ - 1 &&
                              e.date.add(t.start_date, -1, "day").valueOf() >=
                                o.min_date.valueOf() &&
                              (i = this.nextDaySlot(t, a, n));
                            break;
                          case "right":
                            (r = this._getNextSection(t.section, 1)),
                              s.days > 1 &&
                                !s.order[r] &&
                                e.date.add(t.start_date, 1, "day").valueOf() <
                                  o.max_date.valueOf() &&
                                (i = this.nextDaySlot(t, a, n));
                            break;
                          default:
                            (i = this.nextDaySlot(t, a, n)), (r = t.section);
                        }
                        return (i.section = r), i;
                      },
                      _moveDate: function (t, a) {
                        var n = this.findVisibleColumn(
                          e.date.add(t, a, "day"),
                          a
                        );
                        return (
                          n.setHours(t.getHours()),
                          n.setMinutes(t.getMinutes()),
                          n
                        );
                      },
                      isBeforeLastHour: function (t, a) {
                        var n = t.getMinutes(),
                          i = t.getHours(),
                          r = e.config.last_hour;
                        return i < r || (!a && (24 == r || i == r) && !n);
                      },
                      isAfterFirstHour: function (t, a) {
                        var n = t.getMinutes(),
                          i = t.getHours(),
                          r = e.config.first_hour,
                          o = e.config.last_hour;
                        return (
                          i >= r || (!a && !n && ((!i && 24 == o) || i == o))
                        );
                      },
                      isInVisibleDayTime: function (e, t) {
                        return (
                          this.isBeforeLastHour(e, t) &&
                          this.isAfterFirstHour(e, t)
                        );
                      },
                      nextDaySlot: function (t, a, n) {
                        var i,
                          r,
                          o = e.config.key_nav_step,
                          s = this._alignTimeSlot(
                            t.start_date,
                            e.date.day_start(new Date(t.start_date)),
                            "minute",
                            o
                          ),
                          _ = t.start_date;
                        switch (a) {
                          case "up":
                            if (
                              ((i = e.date.add(s, -o, "minute")),
                              !this.isInVisibleDayTime(i, !0) &&
                                (!n || this.isInVisibleDayTime(_, !0)))
                            ) {
                              var d = !0;
                              n &&
                                e.date.date_part(new Date(i)).valueOf() !=
                                  e.date.date_part(new Date(_)).valueOf() &&
                                (d = !1),
                                d &&
                                  (i = this.findVisibleColumn(
                                    e.date.add(t.start_date, -1, "day"),
                                    -1
                                  )),
                                i.setHours(e.config.last_hour),
                                i.setMinutes(0),
                                (i = e.date.add(i, -o, "minute"));
                            }
                            r = e.date.add(i, o, "minute");
                            break;
                          case "down":
                            i = e.date.add(s, o, "minute");
                            var l = n ? i : e.date.add(i, o, "minute");
                            this.isInVisibleDayTime(l, !1) ||
                              (n && !this.isInVisibleDayTime(_, !1)) ||
                              (n
                                ? ((d = !0),
                                  e.date.date_part(new Date(_)).valueOf() ==
                                    _.valueOf() && (d = !1),
                                  d &&
                                    (i = this.findVisibleColumn(
                                      e.date.add(t.start_date, 1, "day"),
                                      1
                                    )),
                                  i.setHours(e.config.first_hour),
                                  i.setMinutes(0),
                                  (i = e.date.add(i, o, "minute")))
                                : ((i = this.findVisibleColumn(
                                    e.date.add(t.start_date, 1, "day"),
                                    1
                                  )).setHours(e.config.first_hour),
                                  i.setMinutes(0))),
                              (r = e.date.add(i, o, "minute"));
                            break;
                          case "left":
                            (i = this._moveDate(t.start_date, -1)),
                              (r = this._moveDate(t.end_date, -1));
                            break;
                          case "right":
                            (i = this._moveDate(t.start_date, 1)),
                              (r = this._moveDate(t.end_date, 1));
                            break;
                          default:
                            (i = s), (r = e.date.add(i, o, "minute"));
                        }
                        return { start_date: i, end_date: r };
                      },
                      nextWeekAgendaSlot: function (t, a) {
                        var n,
                          i,
                          r = e.getState();
                        switch (a) {
                          case "down":
                          case "left":
                            (n = e.date.day_start(
                              e.date.add(t.start_date, -1, "day")
                            )),
                              (n = this.findVisibleColumn(n, -1));
                            break;
                          case "up":
                          case "right":
                            (n = e.date.day_start(
                              e.date.add(t.start_date, 1, "day")
                            )),
                              (n = this.findVisibleColumn(n, 1));
                            break;
                          default:
                            n = e.date.day_start(t.start_date);
                        }
                        return (
                          (t.start_date.valueOf() < r.min_date.valueOf() ||
                            t.start_date.valueOf() >= r.max_date.valueOf()) &&
                            (n = new Date(r.min_date)),
                          (i = new Date(n)).setHours(e.config.last_hour),
                          { start_date: n, end_date: i }
                        );
                      },
                      nextAgendaSlot: function (e, t) {
                        return {
                          start_date: e.start_date,
                          end_date: e.end_date,
                        };
                      },
                      isDateVisible: function (t) {
                        if (!e._ignores_detected) return !0;
                        var a,
                          n = e.matrix && e.matrix[e.getState().mode];
                        return (
                          (a = n
                            ? e._get_date_index(n, t)
                            : e.locate_holder_day(t)),
                          !e._ignores[a]
                        );
                      },
                      findVisibleColumn: function (t, a) {
                        var n = t;
                        a = a || 1;
                        for (
                          var i = e.getState();
                          !this.isDateVisible(n) &&
                          ((a > 0 && n.valueOf() <= i.max_date.valueOf()) ||
                            (a < 0 && n.valueOf() >= i.min_date.valueOf()));

                        )
                          n = this.nextDateColumn(n, a);
                        return n;
                      },
                      nextDateColumn: function (t, a) {
                        a = a || 1;
                        var n = e.matrix && e.matrix[e.getState().mode];
                        return n
                          ? e.date.add(t, a * n.x_step, n.x_unit)
                          : e.date.day_start(e.date.add(t, a, "day"));
                      },
                      isVisible: function (t, a) {
                        if (!e._ignores_detected) return !0;
                        for (var n = new Date(t); n.valueOf() < a.valueOf(); ) {
                          if (this.isDateVisible(n)) return !0;
                          n = this.nextDateColumn(n);
                        }
                        return !1;
                      },
                      nextSlot: function (t, a, n, i) {
                        var r;
                        n = n || this._getMode();
                        var o =
                          e.$keyboardNavigation.TimeSlot.prototype.clone(t);
                        switch (n) {
                          case this._modes.units:
                            r = this.nextUnitsSlot(o, a, i);
                            break;
                          case this._modes.timeline:
                            r = this.nextTimelineSlot(o, a, i);
                            break;
                          case this._modes.year:
                          case this._modes.month:
                            r = this.nextMonthSlot(o, a, i);
                            break;
                          case this._modes.weekAgenda:
                            r = this.nextWeekAgendaSlot(o, a, i);
                            break;
                          case this._modes.list:
                            r = this.nextAgendaSlot(o, a, i);
                            break;
                          case this._modes.dayColumns:
                            r = this.nextDaySlot(o, a, i);
                        }
                        return (
                          r.start_date.valueOf() >= r.end_date.valueOf() &&
                            (r = this.nextSlot(r, a, n)),
                          e.$keyboardNavigation.TimeSlot.prototype.clone(r)
                        );
                      },
                      extendSlot: function (t, a) {
                        var n;
                        switch (this._getMode()) {
                          case this._modes.units:
                            n =
                              "left" == a || "right" == a
                                ? this.nextUnitsSlot(t, a)
                                : this.extendUnitsSlot(t, a);
                            break;
                          case this._modes.timeline:
                            n =
                              "down" == a || "up" == a
                                ? this.nextTimelineSlot(t, a)
                                : this.extendTimelineSlot(t, a);
                            break;
                          case this._modes.year:
                          case this._modes.month:
                            n = this.extendMonthSlot(t, a);
                            break;
                          case this._modes.dayColumns:
                            n = this.extendDaySlot(t, a);
                            break;
                          case this._modes.weekAgenda:
                            n = this.extendWeekAgendaSlot(t, a);
                            break;
                          default:
                            n = t;
                        }
                        var i = e.getState();
                        return (
                          n.start_date.valueOf() < i.min_date.valueOf() &&
                            ((n.start_date = this.findVisibleColumn(
                              i.min_date
                            )),
                            n.start_date.setHours(e.config.first_hour)),
                          n.end_date.valueOf() > i.max_date.valueOf() &&
                            (n.end_date = this.findVisibleColumn(
                              i.max_date,
                              -1
                            )),
                          e.$keyboardNavigation.TimeSlot.prototype.clone(n)
                        );
                      },
                      extendTimelineSlot: function (e, t) {
                        return this.extendGenericSlot(
                          { left: "start_date", right: "end_date" },
                          e,
                          t,
                          "timeline"
                        );
                      },
                      extendWeekAgendaSlot: function (e, t) {
                        return this.extendGenericSlot(
                          { left: "start_date", right: "end_date" },
                          e,
                          t,
                          "weekAgenda"
                        );
                      },
                      extendGenericSlot: function (t, a, n, i) {
                        var r,
                          o = a.movingDate;
                        if ((o || (o = t[n]), !o || !t[n])) return a;
                        if (!n)
                          return e.$keyboardNavigation.TimeSlot.prototype.clone(
                            a
                          );
                        (r = this.nextSlot(
                          { start_date: a[o], section: a.section },
                          n,
                          i,
                          !0
                        )).start_date.valueOf() == a.start_date.valueOf() &&
                          (r = this.nextSlot(
                            { start_date: r.start_date, section: r.section },
                            n,
                            i,
                            !0
                          )),
                          (r.movingDate = o);
                        var s = this.extendSlotDates(a, r, r.movingDate);
                        return (
                          s.end_date.valueOf() <= s.start_date.valueOf() &&
                            (r.movingDate =
                              "end_date" == r.movingDate
                                ? "start_date"
                                : "end_date"),
                          (s = this.extendSlotDates(a, r, r.movingDate)),
                          (r.start_date = s.start_date),
                          (r.end_date = s.end_date),
                          r
                        );
                      },
                      extendSlotDates: function (e, t, a) {
                        var n = { start_date: null, end_date: null };
                        return (
                          "start_date" == a
                            ? ((n.start_date = t.start_date),
                              (n.end_date = e.end_date))
                            : ((n.start_date = e.start_date),
                              (n.end_date = t.start_date)),
                          n
                        );
                      },
                      extendMonthSlot: function (t, a) {
                        return (
                          (t = this.extendGenericSlot(
                            {
                              up: "start_date",
                              down: "end_date",
                              left: "start_date",
                              right: "end_date",
                            },
                            t,
                            a,
                            "month"
                          )).start_date.setHours(e.config.first_hour),
                          (t.end_date = e.date.add(t.end_date, -1, "day")),
                          t.end_date.setHours(e.config.last_hour),
                          t
                        );
                      },
                      extendUnitsSlot: function (e, t) {
                        var a;
                        switch (t) {
                          case "down":
                          case "up":
                            a = this.extendDaySlot(e, t);
                            break;
                          default:
                            a = e;
                        }
                        return (a.section = e.section), a;
                      },
                      extendDaySlot: function (e, t) {
                        return this.extendGenericSlot(
                          {
                            up: "start_date",
                            down: "end_date",
                            left: "start_date",
                            right: "end_date",
                          },
                          e,
                          t,
                          "dayColumns"
                        );
                      },
                      scrollSlot: function (t) {
                        var a = e.getState(),
                          n = this.nextSlot(this, t);
                        (n.start_date.valueOf() < a.min_date.valueOf() ||
                          n.start_date.valueOf() >= a.max_date.valueOf()) &&
                          e.setCurrentView(new Date(n.start_date)),
                          this.moveTo(n);
                      },
                      keys: {
                        left: function () {
                          this.scrollSlot("left");
                        },
                        right: function () {
                          this.scrollSlot("right");
                        },
                        down: function () {
                          this._getMode() == this._modes.list
                            ? e.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler()
                            : this.scrollSlot("down");
                        },
                        up: function () {
                          this._getMode() == this._modes.list
                            ? e.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler()
                            : this.scrollSlot("up");
                        },
                        "shift+down": function () {
                          this.moveTo(this.extendSlot(this, "down"));
                        },
                        "shift+up": function () {
                          this.moveTo(this.extendSlot(this, "up"));
                        },
                        "shift+right": function () {
                          this.moveTo(this.extendSlot(this, "right"));
                        },
                        "shift+left": function () {
                          this.moveTo(this.extendSlot(this, "left"));
                        },
                        enter: function () {
                          var t = {
                              start_date: new Date(this.start_date),
                              end_date: new Date(this.end_date),
                            },
                            a = e.getState().mode;
                          e.matrix && e.matrix[a]
                            ? (t[e.matrix[e.getState().mode].y_property] =
                                this.section)
                            : e._props &&
                              e._props[a] &&
                              (t[e._props[a].map_to] = this.section),
                            e.addEventNow(t);
                        },
                      },
                    }
                  )),
                  e.$keyboardNavigation.TimeSlot.prototype.bindAll(
                    e.$keyboardNavigation.TimeSlot.prototype.keys
                  );
              })(e),
              (function (e) {
                (e.$keyboardNavigation.MinicalButton = function (e, t) {
                  (this.container = e), (this.index = t || 0);
                }),
                  (e.$keyboardNavigation.MinicalButton.prototype = e._compose(
                    e.$keyboardNavigation.KeyNavNode,
                    {
                      isValid: function () {
                        return !!this.container.offsetWidth;
                      },
                      fallback: function () {
                        var t = new e.$keyboardNavigation.TimeSlot();
                        return t.isValid()
                          ? t
                          : new e.$keyboardNavigation.DataArea();
                      },
                      focus: function () {
                        e.$keyboardNavigation.dispatcher.globalNode.disable(),
                          this.container.removeAttribute("tabindex"),
                          e.$keyboardNavigation.KeyNavNode.prototype.focus.apply(
                            this
                          );
                      },
                      blur: function () {
                        this.container.setAttribute("tabindex", "0"),
                          e.$keyboardNavigation.KeyNavNode.prototype.blur.apply(
                            this
                          );
                      },
                      getNode: function () {
                        return this.index
                          ? this.container.querySelector(".dhx_cal_next_button")
                          : this.container.querySelector(
                              ".dhx_cal_prev_button"
                            );
                      },
                      keys: {
                        right: function (t) {
                          this.moveTo(
                            new e.$keyboardNavigation.MinicalButton(
                              this.container,
                              this.index ? 0 : 1
                            )
                          );
                        },
                        left: function (t) {
                          this.moveTo(
                            new e.$keyboardNavigation.MinicalButton(
                              this.container,
                              this.index ? 0 : 1
                            )
                          );
                        },
                        down: function () {
                          var t = new e.$keyboardNavigation.MinicalCell(
                            this.container,
                            0,
                            0
                          );
                          t && !t.isValid() && (t = t.fallback()),
                            this.moveTo(t);
                        },
                        enter: function (e) {
                          this.getNode().click();
                        },
                      },
                    }
                  )),
                  e.$keyboardNavigation.MinicalButton.prototype.bindAll(
                    e.$keyboardNavigation.MinicalButton.prototype.keys
                  );
              })(e),
              (function (e) {
                (e.$keyboardNavigation.MinicalCell = function (e, t, a) {
                  (this.container = e),
                    (this.row = t || 0),
                    (this.col = a || 0);
                }),
                  (e.$keyboardNavigation.MinicalCell.prototype = e._compose(
                    e.$keyboardNavigation.KeyNavNode,
                    {
                      isValid: function () {
                        var e = this._getGrid();
                        return !(!e[this.row] || !e[this.row][this.col]);
                      },
                      fallback: function () {
                        var t = this.row,
                          a = this.col,
                          n = this._getGrid();
                        n[t] || (t = 0);
                        var i = !0;
                        if ((t > n.length / 2 && (i = !1), !n[t])) {
                          var r = new e.$keyboardNavigation.TimeSlot();
                          return r.isValid()
                            ? r
                            : new e.$keyboardNavigation.DataArea();
                        }
                        if (i) {
                          for (var o = a; n[t] && o < n[t].length; o++)
                            if (
                              (n[t][o] ||
                                o != n[t].length - 1 ||
                                (t++, (a = 0)),
                              n[t][o])
                            )
                              return new e.$keyboardNavigation.MinicalCell(
                                this.container,
                                t,
                                o
                              );
                        } else
                          for (o = a; n[t] && o < n[t].length; o--)
                            if (
                              (n[t][o] || o || (a = n[--t].length - 1), n[t][o])
                            )
                              return new e.$keyboardNavigation.MinicalCell(
                                this.container,
                                t,
                                o
                              );
                        return new e.$keyboardNavigation.MinicalButton(
                          this.container,
                          0
                        );
                      },
                      focus: function () {
                        e.$keyboardNavigation.dispatcher.globalNode.disable(),
                          this.container.removeAttribute("tabindex"),
                          e.$keyboardNavigation.KeyNavNode.prototype.focus.apply(
                            this
                          );
                      },
                      blur: function () {
                        this.container.setAttribute("tabindex", "0"),
                          e.$keyboardNavigation.KeyNavNode.prototype.blur.apply(
                            this
                          );
                      },
                      _getNode: function (e, t) {
                        return this.container.querySelector(
                          ".dhx_year_body tr:nth-child(" +
                            (e + 1) +
                            ") td:nth-child(" +
                            (t + 1) +
                            ")"
                        );
                      },
                      getNode: function () {
                        return this._getNode(this.row, this.col);
                      },
                      _getGrid: function () {
                        for (
                          var t =
                              this.container.querySelectorAll(
                                ".dhx_year_body tr"
                              ),
                            a = [],
                            n = 0;
                          n < t.length;
                          n++
                        ) {
                          a[n] = [];
                          for (
                            var i = t[n].querySelectorAll("td"), r = 0;
                            r < i.length;
                            r++
                          ) {
                            var o = i[r],
                              s = !0,
                              _ = e._getClassName(o);
                            (_.indexOf("dhx_after") > -1 ||
                              _.indexOf("dhx_before") > -1 ||
                              _.indexOf("dhx_scale_ignore") > -1) &&
                              (s = !1),
                              (a[n][r] = s);
                          }
                        }
                        return a;
                      },
                      keys: {
                        right: function (t) {
                          var a = this._getGrid(),
                            n = this.row,
                            i = this.col + 1;
                          (a[n] && a[n][i]) ||
                            (a[n + 1] ? ((n += 1), (i = 0)) : (i = this.col));
                          var r = new e.$keyboardNavigation.MinicalCell(
                            this.container,
                            n,
                            i
                          );
                          r.isValid() || (r = r.fallback()), this.moveTo(r);
                        },
                        left: function (t) {
                          var a = this._getGrid(),
                            n = this.row,
                            i = this.col - 1;
                          (a[n] && a[n][i]) ||
                            (i = a[n - 1] ? a[(n -= 1)].length - 1 : this.col);
                          var r = new e.$keyboardNavigation.MinicalCell(
                            this.container,
                            n,
                            i
                          );
                          r.isValid() || (r = r.fallback()), this.moveTo(r);
                        },
                        down: function () {
                          var t = this._getGrid(),
                            a = this.row + 1,
                            n = this.col;
                          (t[a] && t[a][n]) || (a = this.row);
                          var i = new e.$keyboardNavigation.MinicalCell(
                            this.container,
                            a,
                            n
                          );
                          i.isValid() || (i = i.fallback()), this.moveTo(i);
                        },
                        up: function () {
                          var t = this._getGrid(),
                            a = this.row - 1,
                            n = this.col;
                          if (t[a] && t[a][n]) {
                            var i = new e.$keyboardNavigation.MinicalCell(
                              this.container,
                              a,
                              n
                            );
                            i.isValid() || (i = i.fallback()), this.moveTo(i);
                          } else {
                            var r = 0;
                            this.col > t[this.row].length / 2 && (r = 1),
                              this.moveTo(
                                new e.$keyboardNavigation.MinicalButton(
                                  this.container,
                                  r
                                )
                              );
                          }
                        },
                        enter: function (e) {
                          this.getNode()
                            .querySelector(".dhx_month_head")
                            .click();
                        },
                      },
                    }
                  )),
                  e.$keyboardNavigation.MinicalCell.prototype.bindAll(
                    e.$keyboardNavigation.MinicalCell.prototype.keys
                  );
              })(e),
              (function (e) {
                (e.$keyboardNavigation.DataArea = function (e) {
                  this.index = e || 0;
                }),
                  (e.$keyboardNavigation.DataArea.prototype = e._compose(
                    e.$keyboardNavigation.KeyNavNode,
                    {
                      getNode: function (t) {
                        return e.$container.querySelector(".dhx_cal_data");
                      },
                      _handlers: null,
                      isValid: function () {
                        return !0;
                      },
                      fallback: function () {
                        return this;
                      },
                      keys: {
                        "up,down,right,left": function () {
                          this.moveTo(new e.$keyboardNavigation.TimeSlot());
                        },
                      },
                    }
                  )),
                  e.$keyboardNavigation.DataArea.prototype.bindAll(
                    e.$keyboardNavigation.DataArea.prototype.keys
                  );
              })(e),
              Me(e),
              (function (e) {
                e.$keyboardNavigation.dispatcher = {
                  isActive: !1,
                  activeNode: null,
                  globalNode: new e.$keyboardNavigation.SchedulerNode(),
                  keepScrollPosition: function (t) {
                    var a,
                      n,
                      i = e.$container.querySelector(
                        ".dhx_timeline_scrollable_data"
                      );
                    i || (i = e.$container.querySelector(".dhx_cal_data")),
                      i && ((a = i.scrollTop), (n = i.scrollLeft)),
                      t(),
                      i && ((i.scrollTop = a), (i.scrollLeft = n));
                  },
                  enable: function () {
                    if (e.$container) {
                      this.isActive = !0;
                      var t = this;
                      this.keepScrollPosition(function () {
                        t.globalNode.enable(),
                          t.setActiveNode(t.getActiveNode());
                      });
                    }
                  },
                  disable: function () {
                    (this.isActive = !1), this.globalNode.disable();
                  },
                  isEnabled: function () {
                    return !!this.isActive;
                  },
                  getDefaultNode: function () {
                    return this.globalNode.getDefaultNode();
                  },
                  setDefaultNode: function () {
                    this.setActiveNode(this.getDefaultNode());
                  },
                  getActiveNode: function () {
                    var e = this.activeNode;
                    return e && !e.isValid() && (e = e.fallback()), e;
                  },
                  focusGlobalNode: function () {
                    this.blurNode(this.globalNode),
                      this.focusNode(this.globalNode);
                  },
                  setActiveNode: function (e) {
                    e &&
                      e.isValid() &&
                      ((this.activeNode && this.activeNode.compareTo(e)) ||
                        (this.isEnabled() &&
                          (this.blurNode(this.activeNode),
                          (this.activeNode = e),
                          this.focusNode(this.activeNode))));
                  },
                  focusNode: function (t) {
                    t &&
                      t.focus &&
                      (t.focus(),
                      t.getNode &&
                        document.activeElement != t.getNode() &&
                        this.setActiveNode(
                          new e.$keyboardNavigation.DataArea()
                        ));
                  },
                  blurNode: function (e) {
                    e && e.blur && e.blur();
                  },
                  getInlineEditor: function (t) {
                    var a = e.$container.querySelector(
                      ".dhx_cal_editor[" +
                        e.config.event_attribute +
                        "='" +
                        t +
                        "'] textarea"
                    );
                    return a && a.offsetWidth ? a : null;
                  },
                  keyDownHandler: function (t) {
                    if (!t.defaultPrevented) {
                      var a = this.getActiveNode();
                      if (
                        (!e.$keyboardNavigation.isModal() ||
                          (a &&
                            a.container &&
                            e.utils.dom.locateCss(
                              { target: a.container },
                              "dhx_minical_popup",
                              !1
                            ))) &&
                        (!e.getState().editor_id ||
                          !this.getInlineEditor(e.getState().editor_id)) &&
                        this.isEnabled()
                      ) {
                        t = t || window.event;
                        var n = this.globalNode,
                          i =
                            e.$keyboardNavigation.shortcuts.getCommandFromEvent(
                              t
                            );
                        a
                          ? a.findHandler(i)
                            ? a.doAction(i, t)
                            : n.findHandler(i) && n.doAction(i, t)
                          : this.setDefaultNode();
                      }
                    }
                  },
                  _timeout: null,
                  delay: function (e, t) {
                    clearTimeout(this._timeout),
                      (this._timeout = setTimeout(e, t || 1));
                  },
                };
              })(e),
              Ae(e),
              (function () {
                Oe(e),
                  (function (e) {
                    (e.$keyboardNavigation._minicalendars = []),
                      (e.$keyboardNavigation.isMinical = function (t) {
                        for (
                          var a = e.$keyboardNavigation._minicalendars, n = 0;
                          n < a.length;
                          n++
                        )
                          if (this.isChildOf(t, a[n])) return !0;
                        return !1;
                      }),
                      (e.$keyboardNavigation.isChildOf = function (e, t) {
                        for (; e && e !== t; ) e = e.parentNode;
                        return !(e !== t);
                      }),
                      (e.$keyboardNavigation.patchMinicalendar = function () {
                        var t = e.$keyboardNavigation.dispatcher;
                        function a(a) {
                          var n = a.target;
                          t.enable(),
                            t.setActiveNode(
                              new e.$keyboardNavigation.MinicalButton(n, 0)
                            );
                        }
                        function n(a) {
                          var n = a.target || a.srcElement,
                            i = e.utils.dom.locateCss(
                              a,
                              "dhx_cal_prev_button",
                              !1
                            ),
                            r = e.utils.dom.locateCss(
                              a,
                              "dhx_cal_next_button",
                              !1
                            ),
                            o = e.utils.dom.locateCss(a, "dhx_year_body", !1),
                            s = 0,
                            _ = 0;
                          if (o) {
                            for (
                              var d, l, c = n;
                              c && "td" != c.tagName.toLowerCase();

                            )
                              c = c.parentNode;
                            if ((c && (d = (l = c).parentNode), d && l)) {
                              for (
                                var u = d.parentNode.querySelectorAll("tr"),
                                  h = 0;
                                h < u.length;
                                h++
                              )
                                if (u[h] == d) {
                                  s = h;
                                  break;
                                }
                              var f = d.querySelectorAll("td");
                              for (h = 0; h < f.length; h++)
                                if (f[h] == l) {
                                  _ = h;
                                  break;
                                }
                            }
                          }
                          var p = a.currentTarget;
                          t.delay(function () {
                            var a;
                            (i || r || o) &&
                              (i
                                ? ((a = new e.$keyboardNavigation.MinicalButton(
                                    p,
                                    0
                                  )),
                                  t.setActiveNode(
                                    new e.$keyboardNavigation.MinicalButton(
                                      p,
                                      0
                                    )
                                  ))
                                : r
                                ? (a = new e.$keyboardNavigation.MinicalButton(
                                    p,
                                    1
                                  ))
                                : o &&
                                  (a = new e.$keyboardNavigation.MinicalCell(
                                    p,
                                    s,
                                    _
                                  )),
                              a &&
                                (t.enable(),
                                a.isValid() &&
                                  ((t.activeNode = null), t.setActiveNode(a))));
                          });
                        }
                        if (e.renderCalendar) {
                          var i = e.renderCalendar;
                          e.renderCalendar = function () {
                            var r = i.apply(this, arguments),
                              o = e.$keyboardNavigation._minicalendars;
                            e.eventRemove(r, "click", n),
                              e.event(r, "click", n),
                              e.eventRemove(r, "focus", a),
                              e.event(r, "focus", a);
                            for (var s = !1, _ = 0; _ < o.length; _++)
                              if (o[_] == r) {
                                s = !0;
                                break;
                              }
                            if ((s || o.push(r), t.isEnabled())) {
                              var d = t.getActiveNode();
                              d && d.container == r
                                ? t.focusNode(d)
                                : r.setAttribute("tabindex", "0");
                            } else r.setAttribute("tabindex", "0");
                            return r;
                          };
                        }
                        if (e.destroyCalendar) {
                          var r = e.destroyCalendar;
                          e.destroyCalendar = function (t, n) {
                            t =
                              t ||
                              (e._def_count ? e._def_count.firstChild : null);
                            var i = r.apply(this, arguments);
                            if (!t || !t.parentNode)
                              for (
                                var o = e.$keyboardNavigation._minicalendars,
                                  s = 0;
                                s < o.length;
                                s++
                              )
                                o[s] == t &&
                                  (e.eventRemove(o[s], "focus", a),
                                  o.splice(s, 1),
                                  s--);
                            return i;
                          };
                        }
                      });
                  })(e);
                var t = e.$keyboardNavigation.dispatcher;
                if (
                  (e.$keyboardNavigation.attachSchedulerHandlers(),
                  e.renderCalendar)
                )
                  e.$keyboardNavigation.patchMinicalendar();
                else
                  var a = e.attachEvent("onSchedulerReady", function () {
                    e.detachEvent(a), e.$keyboardNavigation.patchMinicalendar();
                  });
                function n() {
                  if (e.config.key_nav) {
                    var t = document.activeElement;
                    return (
                      !(
                        !t || e.utils.dom.locateCss(t, "dhx_cal_quick_info", !1)
                      ) &&
                      (e.$keyboardNavigation.isChildOf(t, e.$container) ||
                        e.$keyboardNavigation.isMinical(t))
                    );
                  }
                }
                function i(e) {
                  e && !t.isEnabled()
                    ? t.enable()
                    : !e && t.isEnabled() && t.disable();
                }
                setInterval(function () {
                  if (
                    e.$container &&
                    e.$keyboardNavigation.isChildOf(e.$container, document.body)
                  ) {
                    var a = n();
                    a
                      ? i(a)
                      : !a &&
                        t.isEnabled() &&
                        setTimeout(function () {
                          e.config.key_nav
                            ? i(n())
                            : e.$container.removeAttribute("tabindex");
                        }, 100);
                  }
                }, 500);
              })();
          },
          layer: function (e) {
            e.attachEvent("onTemplatesReady", function () {
              this.layers.sort(function (e, t) {
                return e.zIndex - t.zIndex;
              }),
                (e._dp_init = function (t) {
                  (t._methods = [
                    "_set_event_text_style",
                    "",
                    "changeEventId",
                    "deleteEvent",
                  ]),
                    this.attachEvent("onEventAdded", function (e) {
                      !this._loading &&
                        this.validId(e) &&
                        this.getEvent(e) &&
                        this.getEvent(e).layer == t.layer &&
                        t.setUpdated(e, !0, "inserted");
                    }),
                    this.attachEvent("onBeforeEventDelete", function (e) {
                      if (
                        this.getEvent(e) &&
                        this.getEvent(e).layer == t.layer
                      ) {
                        if (!this.validId(e)) return;
                        var a = t.getState(e);
                        return "inserted" == a || this._new_event
                          ? (t.setUpdated(e, !1), !0)
                          : "deleted" != a &&
                              ("true_deleted" == a ||
                                (t.setUpdated(e, !0, "deleted"), !1));
                      }
                      return !0;
                    }),
                    this.attachEvent("onEventChanged", function (e) {
                      !this._loading &&
                        this.validId(e) &&
                        this.getEvent(e) &&
                        this.getEvent(e).layer == t.layer &&
                        t.setUpdated(e, !0, "updated");
                    }),
                    (t._getRowData = function (e, t) {
                      var a = this.obj.getEvent(e),
                        n = {};
                      for (var i in a)
                        0 !== i.indexOf("_") &&
                          (a[i] && a[i].getUTCFullYear
                            ? (n[i] = this.obj._helpers.formatDate(a[i]))
                            : (n[i] = a[i]));
                      return n;
                    }),
                    (t._clearUpdateFlag = function () {}),
                    t.attachEvent("insertCallback", e._update_callback),
                    t.attachEvent("updateCallback", e._update_callback),
                    t.attachEvent("deleteCallback", function (e, t) {
                      this.obj.setUserData(
                        t,
                        this.action_param,
                        "true_deleted"
                      ),
                        this.obj.deleteEvent(t);
                    });
                }),
                (function () {
                  var t = function e(t) {
                    if (null === t || "object" != He(t)) return t;
                    var a = new t.constructor();
                    for (var n in t) a[n] = e(t[n]);
                    return a;
                  };
                  (e._dataprocessors = []), (e._layers_zindex = {});
                  for (var a = 0; a < e.layers.length; a++) {
                    if (
                      ((e.config["lightbox_" + e.layers[a].name] = {}),
                      (e.config["lightbox_" + e.layers[a].name].sections = t(
                        e.config.lightbox.sections
                      )),
                      (e._layers_zindex[e.layers[a].name] =
                        e.config.inital_layer_zindex || 5 + 3 * a),
                      e.layers[a].url)
                    ) {
                      var n = e.createDataProcessor({ url: e.layers[a].url });
                      (n.layer = e.layers[a].name),
                        e._dataprocessors.push(n),
                        e._dataprocessors[a].init(e);
                    }
                    e.layers[a].isDefault &&
                      (e.defaultLayer = e.layers[a].name);
                  }
                })(),
                (e.showLayer = function (e) {
                  this.toggleLayer(e, !0);
                }),
                (e.hideLayer = function (e) {
                  this.toggleLayer(e, !1);
                }),
                (e.toggleLayer = function (e, t) {
                  var a = this.getLayer(e);
                  (a.visible = void 0 !== t ? !!t : !a.visible),
                    this.setCurrentView(this._date, this._mode);
                }),
                (e.getLayer = function (t) {
                  var a, n;
                  "string" == typeof t && (n = t),
                    "object" == He(t) && (n = t.layer);
                  for (var i = 0; i < e.layers.length; i++)
                    e.layers[i].name == n && (a = e.layers[i]);
                  return a;
                }),
                e.attachEvent("onBeforeLightbox", function (t) {
                  var a = this.getEvent(t);
                  return (
                    (this.config.lightbox.sections =
                      this.config["lightbox_" + a.layer].sections),
                    e.resetLightbox(),
                    !0
                  );
                }),
                e.attachEvent("onClick", function (t, a) {
                  var n = e.getEvent(t);
                  return !e.getLayer(n.layer).noMenu;
                }),
                e.attachEvent("onEventCollision", function (t, a) {
                  var n = this.getLayer(t);
                  if (!n.checkCollision) return !1;
                  for (var i = 0, r = 0; r < a.length; r++)
                    a[r].layer == n.name && a[r].id != t.id && i++;
                  return i >= e.config.collision_limit;
                }),
                (e.addEvent = function (t, a, n, i, r) {
                  var o = t;
                  1 != arguments.length &&
                    (((o = r || {}).start_date = t),
                    (o.end_date = a),
                    (o.text = n),
                    (o.id = i),
                    (o.layer = this.defaultLayer)),
                    (o.id = o.id || e.uid()),
                    (o.text = o.text || ""),
                    "string" == typeof o.start_date &&
                      (o.start_date = this.templates.api_date(o.start_date)),
                    "string" == typeof o.end_date &&
                      (o.end_date = this.templates.api_date(o.end_date)),
                    (o._timed = this.isOneDayEvent(o));
                  var s = !this._events[o.id];
                  (this._events[o.id] = o),
                    this.event_updated(o),
                    this._loading ||
                      this.callEvent(s ? "onEventAdded" : "onEventChanged", [
                        o.id,
                        o,
                      ]);
                }),
                (this._evs_layer = {});
              for (var t = 0; t < this.layers.length; t++)
                this._evs_layer[this.layers[t].name] = [];
              (e.addEventNow = function (t, a, n) {
                var i = {};
                "object" == He(t) && ((i = t), (t = null));
                var r =
                  6e4 * (this.config.event_duration || this.config.time_step);
                t || (t = Math.round(e._currentDate().valueOf() / r) * r);
                var o = new Date(t);
                if (!a) {
                  var s = this.config.first_hour;
                  s > o.getHours() && (o.setHours(s), (t = o.valueOf())),
                    (a = t + r);
                }
                (i.start_date = i.start_date || o),
                  (i.end_date = i.end_date || new Date(a)),
                  (i.text = i.text || this.locale.labels.new_event),
                  (i.id = this._drag_id = this.uid()),
                  (i.layer = this.defaultLayer),
                  (this._drag_mode = "new-size"),
                  (this._loading = !0),
                  this.addEvent(i),
                  this.callEvent("onEventCreated", [this._drag_id, n]),
                  (this._loading = !1),
                  (this._drag_event = {}),
                  this._on_mouse_up(n);
              }),
                (e._t_render_view_data = function (e) {
                  if (this.config.multi_day && !this._table_view) {
                    for (var t = [], a = [], n = 0; n < e.length; n++)
                      e[n]._timed ? t.push(e[n]) : a.push(e[n]);
                    (this._table_view = !0),
                      this.render_data(a),
                      (this._table_view = !1),
                      this.render_data(t);
                  } else this.render_data(e);
                }),
                (e.render_view_data = function () {
                  if (this._not_render) this._render_wait = !0;
                  else {
                    (this._render_wait = !1),
                      this.clear_view(),
                      (this._evs_layer = {});
                    for (var e = 0; e < this.layers.length; e++)
                      this._evs_layer[this.layers[e].name] = [];
                    var t = this.get_visible_events();
                    for (e = 0; e < t.length; e++)
                      this._evs_layer[t[e].layer] &&
                        this._evs_layer[t[e].layer].push(t[e]);
                    if ("month" == this._mode) {
                      var a = [];
                      for (e = 0; e < this.layers.length; e++)
                        this.layers[e].visible &&
                          (a = a.concat(this._evs_layer[this.layers[e].name]));
                      this._t_render_view_data(a);
                    } else
                      for (e = 0; e < this.layers.length; e++)
                        if (this.layers[e].visible) {
                          var n = this._evs_layer[this.layers[e].name];
                          this._t_render_view_data(n);
                        }
                  }
                }),
                (e._render_v_bar = function (t, a, n, i, r, o, s, _, d) {
                  var l = t.id;
                  -1 == s.indexOf("<div class=") &&
                    (s = e.templates["event_header_" + t.layer]
                      ? e.templates["event_header_" + t.layer](
                          t.start_date,
                          t.end_date,
                          t
                        )
                      : s),
                    -1 == _.indexOf("<div class=") &&
                      (_ = e.templates["event_text_" + t.layer]
                        ? e.templates["event_text_" + t.layer](
                            t.start_date,
                            t.end_date,
                            t
                          )
                        : _);
                  var c = document.createElement("div"),
                    u = "dhx_cal_event",
                    h = e.templates["event_class_" + t.layer]
                      ? e.templates["event_class_" + t.layer](
                          t.start_date,
                          t.end_date,
                          t
                        )
                      : e.templates.event_class(t.start_date, t.end_date, t);
                  h && (u = u + " " + h);
                  var f = e._border_box_events(),
                    p = i - 2,
                    v = f ? p : i - 4,
                    g = f ? p : i - 6,
                    m = f ? p : i - (this._quirks ? 4 : 14),
                    y = f ? p - 2 : i - 8,
                    b = f
                      ? r - this.xy.event_header_height
                      : r - (this._quirks ? 20 : 30) + 1,
                    x =
                      '<div event_id="' +
                      l +
                      '" ' +
                      e.config.event_attribute +
                      '="' +
                      l +
                      '" class="' +
                      u +
                      '" style="position:absolute; top:' +
                      n +
                      "px; left:" +
                      a +
                      "px; width:" +
                      v +
                      "px; height:" +
                      r +
                      "px;" +
                      (o || "") +
                      '">';
                  return (
                    (x +=
                      '<div class="dhx_header" style=" width:' +
                      g +
                      'px;" >&nbsp;</div>'),
                    (x += '<div class="dhx_title">' + s + "</div>"),
                    (x +=
                      '<div class="dhx_body" style=" width:' +
                      m +
                      "px; height:" +
                      b +
                      'px;">' +
                      _ +
                      "</div>"),
                    (x +=
                      '<div class="dhx_footer" style=" width:' +
                      y +
                      "px;" +
                      (d ? " margin-top:-1px;" : "") +
                      '" ></div></div>'),
                    (c.innerHTML = x),
                    (c.style.zIndex = 100),
                    c.firstChild
                  );
                }),
                (e.render_event_bar = function (t) {
                  var a = this._els.dhx_cal_data[0],
                    n = this._colsS[t._sday],
                    i = this._colsS[t._eday];
                  i == n && (i = this._colsS[t._eday + 1]);
                  var r = this.xy.bar_height,
                    o =
                      this._colsS.heights[t._sweek] +
                      (this._colsS.height
                        ? this.xy.month_scale_height + 2
                        : 2) +
                      t._sorder * r,
                    s = document.createElement("div"),
                    _ = t._timed ? "dhx_cal_event_clear" : "dhx_cal_event_line",
                    d = e.templates["event_class_" + t.layer]
                      ? e.templates["event_class_" + t.layer](
                          t.start_date,
                          t.end_date,
                          t
                        )
                      : e.templates.event_class(t.start_date, t.end_date, t);
                  d && (_ = _ + " " + d);
                  var l =
                    '<div event_id="' +
                    t.id +
                    '" ' +
                    this.config.event_attribute +
                    '="' +
                    t.id +
                    '" class="' +
                    _ +
                    '" style="position:absolute; top:' +
                    o +
                    "px; left:" +
                    n +
                    "px; width:" +
                    (i - n - 15) +
                    "px;" +
                    (t._text_style || "") +
                    '">';
                  t._timed &&
                    (l += e.templates["event_bar_date_" + t.layer]
                      ? e.templates["event_bar_date_" + t.layer](
                          t.start_date,
                          t.end_date,
                          t
                        )
                      : e.templates.event_bar_date(
                          t.start_date,
                          t.end_date,
                          t
                        )),
                    (l += e.templates["event_bar_text_" + t.layer]
                      ? e.templates["event_bar_text_" + t.layer](
                          t.start_date,
                          t.end_date,
                          t
                        )
                      : e.templates.event_bar_text(
                          t.start_date,
                          t.end_date,
                          t
                        ) + "</div>)"),
                    (l += "</div>"),
                    (s.innerHTML = l),
                    this._rendered.push(s.firstChild),
                    a.appendChild(s.firstChild);
                }),
                (e.render_event = function (t) {
                  var a = e.xy.menu_width;
                  if ((e.getLayer(t.layer).noMenu && (a = 0), !(t._sday < 0))) {
                    var n = e.locate_holder(t._sday);
                    if (n) {
                      var i =
                          60 * t.start_date.getHours() +
                          t.start_date.getMinutes(),
                        r =
                          60 * t.end_date.getHours() +
                            t.end_date.getMinutes() || 60 * e.config.last_hour,
                        o =
                          (Math.round(
                            ((60 * i * 1e3 -
                              60 * this.config.first_hour * 60 * 1e3) *
                              this.config.hour_size_px) /
                              36e5
                          ) %
                            (24 * this.config.hour_size_px)) +
                          1,
                        s =
                          Math.max(
                            e.xy.min_event_height,
                            ((r - i) * this.config.hour_size_px) / 60
                          ) + 1,
                        _ = Math.floor((n.clientWidth - a) / t._count),
                        d = t._sorder * _ + 1;
                      t._inner || (_ *= t._count - t._sorder);
                      var l = this._render_v_bar(
                        t.id,
                        a + d,
                        o,
                        _,
                        s,
                        t._text_style,
                        e.templates.event_header(t.start_date, t.end_date, t),
                        e.templates.event_text(t.start_date, t.end_date, t)
                      );
                      if (
                        (this._rendered.push(l),
                        n.appendChild(l),
                        (d = d + parseInt(n.style.left, 10) + a),
                        (o += this._dy_shift),
                        (l.style.zIndex = this._layers_zindex[t.layer]),
                        this._edit_id == t.id)
                      ) {
                        l.style.zIndex = parseInt(l.style.zIndex) + 1;
                        var c = l.style.zIndex;
                        (_ = Math.max(_ - 4, e.xy.editor_width)),
                          (l = document.createElement("div")).setAttribute(
                            "event_id",
                            t.id
                          ),
                          l.setAttribute(this.config.event_attribute, t.id),
                          this.set_xy(l, _, s - 20, d, o + 14),
                          (l.className = "dhx_cal_editor"),
                          (l.style.zIndex = c);
                        var u = document.createElement("div");
                        this.set_xy(u, _ - 6, s - 26),
                          (u.style.cssText +=
                            ";margin:2px 2px 2px 2px;overflow:hidden;"),
                          (u.style.zIndex = c),
                          l.appendChild(u),
                          this._els.dhx_cal_data[0].appendChild(l),
                          this._rendered.push(l),
                          (u.innerHTML =
                            "<textarea class='dhx_cal_editor'>" +
                            t.text +
                            "</textarea>"),
                          this._quirks7 &&
                            (u.firstChild.style.height = s - 12 + "px"),
                          (this._editor = u.firstChild),
                          (this._editor.onkeypress = function (t) {
                            if (t.shiftKey) return !0;
                            var a = t.keyCode;
                            a == e.keys.edit_save && e.editStop(!0),
                              a == e.keys.edit_cancel && e.editStop(!1);
                          }),
                          (this._editor.onselectstart = function (e) {
                            return (e.cancelBubble = !0), !0;
                          }),
                          u.firstChild.focus(),
                          (this._els.dhx_cal_data[0].scrollLeft = 0),
                          u.firstChild.select();
                      }
                      if (this._select_id == t.id) {
                        l.style.zIndex = parseInt(l.style.zIndex) + 1;
                        for (
                          var h =
                              this.config[
                                "icons_" +
                                  (this._edit_id == t.id ? "edit" : "select")
                              ],
                            f = "",
                            p = 0;
                          p < h.length;
                          p++
                        )
                          f +=
                            "<div class='dhx_menu_icon " +
                            h[p] +
                            "' title='" +
                            this.locale.labels[h[p]] +
                            "'></div>";
                        var v = this._render_v_bar(
                          t.id,
                          d - a + 1,
                          o,
                          a,
                          20 * h.length + 26,
                          "",
                          "<div class='dhx_menu_head'></div>",
                          f,
                          !0
                        );
                        (v.style.left = d - a + 1),
                          (v.style.zIndex = l.style.zIndex),
                          this._els.dhx_cal_data[0].appendChild(v),
                          this._rendered.push(v);
                      }
                    }
                  }
                }),
                (e.filter_agenda = function (t, a) {
                  var n = e.getLayer(a.layer);
                  return n && n.visible;
                });
            });
          },
          limit: function (e) {
            (e.config.limit_start = null),
              (e.config.limit_end = null),
              (e.config.limit_view = !1),
              (e.config.check_limits = !0),
              (e.config.mark_now = !0),
              (e.config.display_marked_timespans = !0),
              (e.config.overwrite_marked_timespans = !0),
              (e._temp_limit_scope = function () {
                var t = null,
                  a = function (e, t, a) {
                    var n = "object" == je(e) ? e : { days: e };
                    return (
                      (n.type = "dhx_time_block"),
                      (n.css = ""),
                      t &&
                        (a && (n.sections = a),
                        (n = (function (e, t, a) {
                          return (
                            t instanceof Date && a instanceof Date
                              ? ((e.start_date = t), (e.end_date = a))
                              : ((e.days = t), (e.zones = a)),
                            e
                          );
                        })(n, e, t))),
                      n
                    );
                  };
                (e.blockTime = function (t, n, i) {
                  var r = a(t, n, i);
                  return e.addMarkedTimespan(r);
                }),
                  (e.unblockTime = function (t, n, i) {
                    var r = a(t, (n = n || "fullday"), i);
                    return e.deleteMarkedTimespan(r);
                  }),
                  e.attachEvent("onBeforeViewChange", function (t, a, n, i) {
                    function r(t, a) {
                      var n = e.config.limit_start,
                        i = e.config.limit_end,
                        r = e.date.add(t, 1, a);
                      return t.valueOf() > i.valueOf() || r <= n.valueOf();
                    }
                    return (
                      !e.config.limit_view ||
                      !r((i = i || a), (n = n || t)) ||
                      a.valueOf() == i.valueOf() ||
                      (setTimeout(function () {
                        var t = r(a, n) ? e.config.limit_start : a;
                        e.setCurrentView(r(t, n) ? null : t, n);
                      }, 1),
                      !1)
                    );
                  }),
                  (e.checkInMarkedTimespan = function (t, a, n) {
                    a = a || "default";
                    for (
                      var r = !0,
                        o = new Date(t.start_date.valueOf()),
                        s = e.date.add(o, 1, "day"),
                        _ = e._marked_timespans;
                      o < t.end_date;
                      o = e.date.date_part(s), s = e.date.add(o, 1, "day")
                    ) {
                      var d = +e.date.date_part(new Date(o)),
                        l = i(t, _, o.getDay(), d, a);
                      if (l)
                        for (var c = 0; c < l.length; c += 2) {
                          var u = e._get_zone_minutes(o),
                            h =
                              t.end_date > s ||
                              t.end_date.getDate() != o.getDate()
                                ? 1440
                                : e._get_zone_minutes(t.end_date),
                            f = l[c],
                            p = l[c + 1];
                          if (
                            f < h &&
                            p > u &&
                            !(r = "function" == typeof n && n(t, u, h, f, p))
                          )
                            break;
                        }
                    }
                    return !r;
                  });
                var n = (e.checkLimitViolation = function (t) {
                  if (!t) return !0;
                  if (!e.config.check_limits) return !0;
                  var a = e,
                    n = a.config,
                    i = [];
                  if (t.rec_type)
                    for (var r = e.getRecDates(t), o = 0; o < r.length; o++) {
                      var s = e._copy_event(t);
                      e._lame_copy(s, r[o]), i.push(s);
                    }
                  else i = [t];
                  for (var _ = !0, d = 0; d < i.length; d++) {
                    var l = !0;
                    ((s = i[d])._timed = e.isOneDayEvent(s)),
                      (l =
                        !n.limit_start ||
                        !n.limit_end ||
                        (s.start_date.valueOf() >= n.limit_start.valueOf() &&
                          s.end_date.valueOf() <= n.limit_end.valueOf())) &&
                        (l = !e.checkInMarkedTimespan(
                          s,
                          "dhx_time_block",
                          function (e, t, n, i, r) {
                            var o = !0;
                            return (
                              t <= r &&
                                t >= i &&
                                ((1440 == r || n <= r) && (o = !1),
                                e._timed &&
                                a._drag_id &&
                                "new-size" == a._drag_mode
                                  ? (e.start_date.setHours(0),
                                    e.start_date.setMinutes(r))
                                  : (o = !1)),
                              ((n >= i && n <= r) || (t < i && n > r)) &&
                                (e._timed &&
                                a._drag_id &&
                                "new-size" == a._drag_mode
                                  ? (e.end_date.setHours(0),
                                    e.end_date.setMinutes(i))
                                  : (o = !1)),
                              o
                            );
                          }
                        )),
                      l ||
                        (l = a.checkEvent("onLimitViolation")
                          ? a.callEvent("onLimitViolation", [s.id, s])
                          : l),
                      (_ = _ && l);
                  }
                  return _ || ((a._drag_id = null), (a._drag_mode = null)), _;
                });
                function i(t, a, n, i, r) {
                  var o = e,
                    s = [],
                    _ = { _props: "map_to", matrix: "y_property" };
                  for (var d in _) {
                    var l = _[d];
                    if (o[d])
                      for (var c in o[d]) {
                        var u = o[d][c][l];
                        t[u] &&
                          (s = o._add_timespan_zones(
                            s,
                            e._get_blocked_zones(a[c], t[u], n, i, r)
                          ));
                      }
                  }
                  return (s = o._add_timespan_zones(
                    s,
                    e._get_blocked_zones(a, "global", n, i, r)
                  ));
                }
                (e._get_blocked_zones = function (e, t, a, n, i) {
                  var r = [];
                  if (e && e[t])
                    for (
                      var o = e[t],
                        s = this._get_relevant_blocked_zones(a, n, o, i),
                        _ = 0;
                      _ < s.length;
                      _++
                    )
                      r = this._add_timespan_zones(r, s[_].zones);
                  return r;
                }),
                  (e._get_relevant_blocked_zones = function (t, a, n, i) {
                    var r;
                    return (
                      e.config.overwrite_marked_timespans
                        ? (r =
                            n[a] && n[a][i]
                              ? n[a][i]
                              : n[t] && n[t][i]
                              ? n[t][i]
                              : [])
                        : ((r = []),
                          n[a] && n[a][i] && (r = r.concat(n[a][i])),
                          n[t] && n[t][i] && (r = r.concat(n[t][i]))),
                      r
                    );
                  }),
                  e.attachEvent("onMouseDown", function (e) {
                    return !("dhx_time_block" == e);
                  }),
                  e.attachEvent("onBeforeDrag", function (t) {
                    return !t || n(e.getEvent(t));
                  }),
                  e.attachEvent("onClick", function (t, a) {
                    return n(e.getEvent(t));
                  }),
                  e.attachEvent("onBeforeLightbox", function (a) {
                    var i = e.getEvent(a);
                    return (t = [i.start_date, i.end_date]), n(i);
                  }),
                  e.attachEvent("onEventSave", function (t, a, i) {
                    if (!a.start_date || !a.end_date) {
                      var r = e.getEvent(t);
                      (a.start_date = new Date(r.start_date)),
                        (a.end_date = new Date(r.end_date));
                    }
                    if (a.rec_type) {
                      var o = e._lame_clone(a);
                      return e._roll_back_dates(o), n(o);
                    }
                    return n(a);
                  }),
                  e.attachEvent("onEventAdded", function (t) {
                    if (!t) return !0;
                    var a = e.getEvent(t);
                    return (
                      !n(a) &&
                        e.config.limit_start &&
                        e.config.limit_end &&
                        (a.start_date < e.config.limit_start &&
                          (a.start_date = new Date(e.config.limit_start)),
                        a.start_date.valueOf() >=
                          e.config.limit_end.valueOf() &&
                          (a.start_date = this.date.add(
                            e.config.limit_end,
                            -1,
                            "day"
                          )),
                        a.end_date < e.config.limit_start &&
                          (a.end_date = new Date(e.config.limit_start)),
                        a.end_date.valueOf() >= e.config.limit_end.valueOf() &&
                          (a.end_date = this.date.add(
                            e.config.limit_end,
                            -1,
                            "day"
                          )),
                        a.start_date.valueOf() >= a.end_date.valueOf() &&
                          (a.end_date = this.date.add(
                            a.start_date,
                            this.config.event_duration || this.config.time_step,
                            "minute"
                          )),
                        (a._timed = this.isOneDayEvent(a))),
                      !0
                    );
                  }),
                  e.attachEvent("onEventChanged", function (a) {
                    if (!a) return !0;
                    var i = e.getEvent(a);
                    if (!n(i)) {
                      if (!t) return !1;
                      (i.start_date = t[0]),
                        (i.end_date = t[1]),
                        (i._timed = this.isOneDayEvent(i));
                    }
                    return !0;
                  }),
                  e.attachEvent("onBeforeEventChanged", function (e, t, a) {
                    return n(e);
                  }),
                  e.attachEvent("onBeforeEventCreated", function (t) {
                    var a = e.getActionData(t).date,
                      i = {
                        _timed: !0,
                        start_date: a,
                        end_date: e.date.add(a, e.config.time_step, "minute"),
                      };
                    return n(i);
                  }),
                  e.attachEvent("onViewChange", function () {
                    e._mark_now();
                  }),
                  e.attachEvent("onAfterSchedulerResize", function () {
                    return (
                      window.setTimeout(function () {
                        e._mark_now();
                      }, 1),
                      !0
                    );
                  }),
                  e.attachEvent("onTemplatesReady", function () {
                    e._mark_now_timer = window.setInterval(function () {
                      e._is_initialized() && e._mark_now();
                    }, 6e4);
                  }),
                  (e._mark_now = function (t) {
                    this._els.dhx_now_time || (this._els.dhx_now_time = []);
                    var a = e._currentDate(),
                      n = this.config;
                    if (
                      (e._remove_mark_now(),
                      !t &&
                        n.mark_now &&
                        a < this._max_date &&
                        a > this._min_date &&
                        a.getHours() >= n.first_hour &&
                        a.getHours() < n.last_hour)
                    ) {
                      var i = this.locate_holder_day(a);
                      this._els.dhx_now_time = e._append_mark_now(i, a);
                    }
                  }),
                  (e._append_mark_now = function (t, a) {
                    var n = e._get_zone_minutes(a),
                      i = {
                        zones: [n, n + 1],
                        css: "dhx_now_time",
                        type: "dhx_now_time",
                      };
                    if (!this._table_view) {
                      if (this._props && this._props[this._mode]) {
                        var r,
                          o,
                          s = this._props[this._mode],
                          _ = s.size || s.options.length;
                        s.days > 1
                          ? (s.size &&
                              s.options.length &&
                              (t =
                                ((s.position + t) / s.options.length) * s.size),
                            (r = t),
                            (o = t + _))
                          : (o = (r = 0) + _);
                        for (var d = [], l = r; l < o; l++) {
                          var c = l;
                          i.days = c;
                          var u = e._render_marked_timespan(i, null, c)[0];
                          d.push(u);
                        }
                        return d;
                      }
                      return (
                        (i.days = t), e._render_marked_timespan(i, null, t)
                      );
                    }
                    if ("month" == this._mode)
                      return (
                        (i.days = +e.date.date_part(a)),
                        e._render_marked_timespan(i, null, null)
                      );
                  }),
                  (e._remove_mark_now = function () {
                    for (
                      var e = this._els.dhx_now_time, t = 0;
                      t < e.length;
                      t++
                    ) {
                      var a = e[t],
                        n = a.parentNode;
                      n && n.removeChild(a);
                    }
                    this._els.dhx_now_time = [];
                  }),
                  (e._marked_timespans = { global: {} }),
                  (e._get_zone_minutes = function (e) {
                    return 60 * e.getHours() + e.getMinutes();
                  }),
                  (e._prepare_timespan_options = function (t) {
                    var a = [],
                      n = [];
                    if (
                      ("fullweek" == t.days && (t.days = [0, 1, 2, 3, 4, 5, 6]),
                      t.days instanceof Array)
                    ) {
                      for (var i = t.days.slice(), r = 0; r < i.length; r++) {
                        var o = e._lame_clone(t);
                        (o.days = i[r]),
                          a.push.apply(a, e._prepare_timespan_options(o));
                      }
                      return a;
                    }
                    if (
                      !t ||
                      (!(
                        (t.start_date &&
                          t.end_date &&
                          t.end_date > t.start_date) ||
                        (void 0 !== t.days && t.zones)
                      ) &&
                        !t.type)
                    )
                      return a;
                    "fullday" == t.zones && (t.zones = [0, 1440]),
                      t.zones &&
                        t.invert_zones &&
                        (t.zones = e.invertZones(t.zones)),
                      (t.id = e.uid()),
                      (t.css = t.css || ""),
                      (t.type = t.type || "default");
                    var s = t.sections;
                    if (s) {
                      for (var _ in s)
                        if (s.hasOwnProperty(_)) {
                          var d = s[_];
                          for (
                            d instanceof Array || (d = [d]), r = 0;
                            r < d.length;
                            r++
                          )
                            ((v = e._lame_copy({}, t)).sections = {}),
                              (v.sections[_] = d[r]),
                              n.push(v);
                        }
                    } else n.push(t);
                    for (var l = 0; l < n.length; l++) {
                      var c = n[l],
                        u = c.start_date,
                        h = c.end_date;
                      if (u && h)
                        for (
                          var f = e.date.date_part(new Date(u)),
                            p = e.date.add(f, 1, "day");
                          f < h;

                        ) {
                          var v;
                          delete (v = e._lame_copy({}, c)).start_date,
                            delete v.end_date,
                            (v.days = f.valueOf());
                          var g = u > f ? e._get_zone_minutes(u) : 0,
                            m =
                              h > p || h.getDate() != f.getDate()
                                ? 1440
                                : e._get_zone_minutes(h);
                          (v.zones = [g, m]),
                            a.push(v),
                            (f = p),
                            (p = e.date.add(p, 1, "day"));
                        }
                      else
                        c.days instanceof Date &&
                          (c.days = e.date.date_part(c.days).valueOf()),
                          (c.zones = t.zones.slice()),
                          a.push(c);
                    }
                    return a;
                  }),
                  (e._get_dates_by_index = function (t, a, n) {
                    var i = [];
                    (a = e.date.date_part(new Date(a || e._min_date))),
                      (n = new Date(n || e._max_date));
                    for (
                      var r = a.getDay(),
                        o = t - r >= 0 ? t - r : 7 - a.getDay() + t,
                        s = e.date.add(a, o, "day");
                      s < n;
                      s = e.date.add(s, 1, "week")
                    )
                      i.push(s);
                    return i;
                  }),
                  (e._get_css_classes_by_config = function (e) {
                    var t = [];
                    return (
                      "dhx_time_block" == e.type &&
                        (t.push("dhx_time_block"),
                        e.css && t.push("dhx_time_block_reset")),
                      t.push("dhx_marked_timespan", e.css),
                      t.join(" ")
                    );
                  }),
                  (e._get_block_by_config = function (e) {
                    var t = document.createElement("div");
                    return (
                      e.html &&
                        ("string" == typeof e.html
                          ? (t.innerHTML = e.html)
                          : t.appendChild(e.html)),
                      t
                    );
                  }),
                  (e._render_marked_timespan = function (t, a, n) {
                    var i = [],
                      r = e.config,
                      o = this._min_date,
                      s = this._max_date,
                      _ = !1;
                    if (!r.display_marked_timespans) return i;
                    if (!n && 0 !== n) {
                      if (t.days < 7) n = t.days;
                      else {
                        var d = new Date(t.days);
                        if (((_ = +d), !(+s > +d && +o <= +d))) return i;
                        n = d.getDay();
                      }
                      var l = o.getDay();
                      l > n ? (n = 7 - (l - n)) : (n -= l);
                    }
                    var c = t.zones,
                      u = e._get_css_classes_by_config(t);
                    if (e._table_view && "month" == e._mode) {
                      var h = [],
                        f = [];
                      if (a) h.push(a), f.push(n);
                      else {
                        f = _ ? [_] : e._get_dates_by_index(n);
                        for (var p = 0; p < f.length; p++)
                          h.push(this._scales[f[p]]);
                      }
                      for (p = 0; p < h.length; p++) {
                        (a = h[p]), (n = f[p]);
                        var v = Math.floor(
                            (this._correct_shift(n, 1) - o.valueOf()) /
                              (864e5 * this._cols.length)
                          ),
                          g = this.locate_holder_day(n, !1) % this._cols.length;
                        if (!this._ignores[g]) {
                          var m = this.config.rtl
                              ? this._colsS.col_length - 1 - g
                              : g,
                            y = e._get_block_by_config(t),
                            b = Math.max(a.offsetHeight - 1, 0),
                            x = Math.max(a.offsetWidth - 1, 0),
                            k = this._colsS[m],
                            w =
                              this._colsS.heights[v] +
                              (this._colsS.height
                                ? this.xy.month_scale_height + 2
                                : 2) -
                              1;
                          (y.className = u),
                            (y.style.top = w + "px"),
                            (y.style.lineHeight = y.style.height = b + "px");
                          for (var E = 0; E < c.length; E += 2) {
                            var S = c[p];
                            if ((T = c[p + 1]) <= S) return [];
                            ((M = y.cloneNode(!0)).style.left =
                              k + Math.round((S / 1440) * x) + "px"),
                              (M.style.width =
                                Math.round(((T - S) / 1440) * x) + "px"),
                              a.appendChild(M),
                              i.push(M);
                          }
                        }
                      }
                    } else {
                      var D = n;
                      if (this._ignores[this.locate_holder_day(n, !1)])
                        return i;
                      if (
                        this._props &&
                        this._props[this._mode] &&
                        t.sections &&
                        t.sections[this._mode]
                      ) {
                        var N = this._props[this._mode];
                        D = N.order[t.sections[this._mode]];
                        var C = N.order[t.sections[this._mode]];
                        N.days > 1
                          ? (D = D * (N.size || N.options.length) + C)
                          : ((D = C),
                            N.size && D > N.position + N.size && (D = 0));
                      }
                      for (
                        a = a || e.locate_holder(D), p = 0;
                        p < c.length;
                        p += 2
                      ) {
                        var T, M;
                        if (
                          ((S = Math.max(c[p], 60 * r.first_hour)),
                          (T = Math.min(c[p + 1], 60 * r.last_hour)) <= S)
                        ) {
                          if (p + 2 < c.length) continue;
                          return [];
                        }
                        (M = e._get_block_by_config(t)).className = u;
                        var A = 24 * this.config.hour_size_px + 1;
                        (M.style.top =
                          (Math.round(
                            ((60 * S * 1e3 - 36e5 * this.config.first_hour) *
                              this.config.hour_size_px) /
                              36e5
                          ) %
                            A) +
                          "px"),
                          (M.style.lineHeight = M.style.height =
                            Math.max(
                              Math.round(
                                (60 *
                                  (T - S) *
                                  1e3 *
                                  this.config.hour_size_px) /
                                  36e5
                              ) % A,
                              1
                            ) + "px"),
                          a.appendChild(M),
                          i.push(M);
                      }
                    }
                    return i;
                  }),
                  (e._mark_timespans = function () {
                    var t = this._els.dhx_cal_data[0],
                      a = [];
                    if (e._table_view && "month" == e._mode)
                      for (var n in this._scales) {
                        var i = new Date(+n);
                        a.push.apply(
                          a,
                          e._on_scale_add_marker(this._scales[n], i)
                        );
                      }
                    else {
                      i = new Date(e._min_date);
                      for (var r = 0, o = t.childNodes.length; r < o; r++) {
                        var s = t.childNodes[r];
                        (s.firstChild &&
                          e
                            ._getClassName(s.firstChild)
                            .indexOf("dhx_scale_hour") > -1) ||
                          (a.push.apply(a, e._on_scale_add_marker(s, i)),
                          (i = e.date.add(i, 1, "day")));
                      }
                    }
                    return a;
                  }),
                  (e.markTimespan = function (t) {
                    var a = !1;
                    this._els.dhx_cal_data || (e.get_elements(), (a = !0));
                    var n = e._marked_timespans_ids,
                      i = e._marked_timespans_types,
                      r = e._marked_timespans;
                    e.deleteMarkedTimespan(), e.addMarkedTimespan(t);
                    var o = e._mark_timespans();
                    return (
                      a && (e._els = []),
                      (e._marked_timespans_ids = n),
                      (e._marked_timespans_types = i),
                      (e._marked_timespans = r),
                      o
                    );
                  }),
                  (e.unmarkTimespan = function (e) {
                    if (e)
                      for (var t = 0; t < e.length; t++) {
                        var a = e[t];
                        a.parentNode && a.parentNode.removeChild(a);
                      }
                  }),
                  (e._addMarkerTimespanConfig = function (t) {
                    var a = e._marked_timespans,
                      n = t.id,
                      i = e._marked_timespans_ids;
                    i[n] || (i[n] = []);
                    var r = t.days,
                      o = t.sections,
                      s = t.type;
                    if (((t.id = n), o)) {
                      for (var _ in o)
                        if (o.hasOwnProperty(_)) {
                          a[_] || (a[_] = {});
                          var d = o[_],
                            l = a[_];
                          l[d] || (l[d] = {}),
                            l[d][r] || (l[d][r] = {}),
                            l[d][r][s] ||
                              ((l[d][r][s] = []),
                              e._marked_timespans_types ||
                                (e._marked_timespans_types = {}),
                              e._marked_timespans_types[s] ||
                                (e._marked_timespans_types[s] = !0));
                          var c = l[d][r][s];
                          (t._array = c), c.push(t), i[n].push(t);
                        }
                    } else
                      a.global[r] || (a.global[r] = {}),
                        a.global[r][s] || (a.global[r][s] = []),
                        e._marked_timespans_types ||
                          (e._marked_timespans_types = {}),
                        e._marked_timespans_types[s] ||
                          (e._marked_timespans_types[s] = !0),
                        (c = a.global[r][s]),
                        (t._array = c),
                        c.push(t),
                        i[n].push(t);
                  }),
                  (e._marked_timespans_ids = {}),
                  (e.addMarkedTimespan = function (t) {
                    var a = e._prepare_timespan_options(t);
                    if (a.length) {
                      for (var n = a[0].id, i = 0; i < a.length; i++)
                        e._addMarkerTimespanConfig(a[i]);
                      return n;
                    }
                  }),
                  (e._add_timespan_zones = function (e, t) {
                    var a = e.slice();
                    if (((t = t.slice()), !a.length)) return t;
                    for (var n = 0; n < a.length; n += 2)
                      for (
                        var i = a[n],
                          r = a[n + 1],
                          o = n + 2 == a.length,
                          s = 0;
                        s < t.length;
                        s += 2
                      ) {
                        var _ = t[s],
                          d = t[s + 1];
                        if ((d > r && _ <= r) || (_ < i && d >= i))
                          (a[n] = Math.min(i, _)),
                            (a[n + 1] = Math.max(r, d)),
                            (n -= 2);
                        else {
                          if (!o) continue;
                          var l = i > _ ? 0 : 2;
                          a.splice(n + l, 0, _, d);
                        }
                        t.splice(s--, 2);
                        break;
                      }
                    return a;
                  }),
                  (e._subtract_timespan_zones = function (e, t) {
                    for (var a = e.slice(), n = 0; n < a.length; n += 2)
                      for (
                        var i = a[n], r = a[n + 1], o = 0;
                        o < t.length;
                        o += 2
                      ) {
                        var s = t[o],
                          _ = t[o + 1];
                        if (_ > i && s < r) {
                          var d = !1;
                          i >= s && r <= _ && a.splice(n, 2),
                            i < s && (a.splice(n, 2, i, s), (d = !0)),
                            r > _ && a.splice(d ? n + 2 : n, d ? 0 : 2, _, r),
                            (n -= 2);
                          break;
                        }
                      }
                    return a;
                  }),
                  (e.invertZones = function (t) {
                    return e._subtract_timespan_zones([0, 1440], t.slice());
                  }),
                  (e._delete_marked_timespan_by_id = function (t) {
                    var a = e._marked_timespans_ids[t];
                    if (a)
                      for (var n = 0; n < a.length; n++)
                        for (
                          var i = a[n], r = i._array, o = 0;
                          o < r.length;
                          o++
                        )
                          if (r[o] == i) {
                            r.splice(o, 1);
                            break;
                          }
                  }),
                  (e._delete_marked_timespan_by_config = function (t) {
                    var a,
                      n = e._marked_timespans,
                      i = t.sections,
                      r = t.days,
                      o = t.type || "default";
                    if (i) {
                      for (var s in i)
                        if (i.hasOwnProperty(s) && n[s]) {
                          var _ = i[s];
                          n[s][_] && (a = n[s][_]);
                        }
                    } else a = n.global;
                    if (a)
                      if (void 0 !== r)
                        a[r] &&
                          a[r][o] &&
                          (e._addMarkerTimespanConfig(t),
                          e._delete_marked_timespans_list(a[r][o], t));
                      else
                        for (var d in a)
                          if (a[d][o]) {
                            var l = e._lame_clone(t);
                            (t.days = d),
                              e._addMarkerTimespanConfig(l),
                              e._delete_marked_timespans_list(a[d][o], t);
                          }
                  }),
                  (e._delete_marked_timespans_list = function (t, a) {
                    for (var n = 0; n < t.length; n++) {
                      var i = t[n],
                        r = e._subtract_timespan_zones(i.zones, a.zones);
                      if (r.length) i.zones = r;
                      else {
                        t.splice(n, 1), n--;
                        for (
                          var o = e._marked_timespans_ids[i.id], s = 0;
                          s < o.length;
                          s++
                        )
                          if (o[s] == i) {
                            o.splice(s, 1);
                            break;
                          }
                      }
                    }
                  }),
                  (e.deleteMarkedTimespan = function (t) {
                    if (
                      (arguments.length ||
                        ((e._marked_timespans = { global: {} }),
                        (e._marked_timespans_ids = {}),
                        (e._marked_timespans_types = {})),
                      "object" != je(t))
                    )
                      e._delete_marked_timespan_by_id(t);
                    else {
                      (t.start_date && t.end_date) ||
                        (void 0 !== t.days || t.type || (t.days = "fullweek"),
                        t.zones || (t.zones = "fullday"));
                      var a = [];
                      if (t.type) a.push(t.type);
                      else for (var n in e._marked_timespans_types) a.push(n);
                      for (
                        var i = e._prepare_timespan_options(t), r = 0;
                        r < i.length;
                        r++
                      )
                        for (var o = i[r], s = 0; s < a.length; s++) {
                          var _ = e._lame_clone(o);
                          (_.type = a[s]),
                            e._delete_marked_timespan_by_config(_);
                        }
                    }
                  }),
                  (e._get_types_to_render = function (t, a) {
                    var n = t ? e._lame_copy({}, t) : {};
                    for (var i in a || {}) a.hasOwnProperty(i) && (n[i] = a[i]);
                    return n;
                  }),
                  (e._get_configs_to_render = function (e) {
                    var t = [];
                    for (var a in e)
                      e.hasOwnProperty(a) && t.push.apply(t, e[a]);
                    return t;
                  }),
                  (e._on_scale_add_marker = function (t, a) {
                    if (!e._table_view || "month" == e._mode) {
                      var n = a.getDay(),
                        i = a.valueOf(),
                        r = this._mode,
                        o = e._marked_timespans,
                        s = [],
                        _ = [];
                      if (this._props && this._props[r]) {
                        var d = this._props[r],
                          l = d.options,
                          c = l[e._get_unit_index(d, a)];
                        if (d.days > 1) {
                          var u = Math.round((a - e._min_date) / 864e5),
                            h = d.size || l.length;
                          (a = e.date.add(
                            e._min_date,
                            Math.floor(u / h),
                            "day"
                          )),
                            (a = e.date.date_part(a));
                        } else a = e.date.date_part(new Date(this._date));
                        if (
                          ((n = a.getDay()),
                          (i = a.valueOf()),
                          o[r] && o[r][c.key])
                        ) {
                          var f = o[r][c.key],
                            p = e._get_types_to_render(f[n], f[i]);
                          s.push.apply(s, e._get_configs_to_render(p));
                        }
                      }
                      var v = o.global;
                      if (e.config.overwrite_marked_timespans) {
                        var g = v[i] || v[n];
                        s.push.apply(s, e._get_configs_to_render(g));
                      } else
                        v[i] && s.push.apply(s, e._get_configs_to_render(v[i])),
                          v[n] &&
                            s.push.apply(s, e._get_configs_to_render(v[n]));
                      for (var m = 0; m < s.length; m++)
                        _.push.apply(_, e._render_marked_timespan(s[m], t, a));
                      return _;
                    }
                  }),
                  e.attachEvent("onScaleAdd", function () {
                    e._on_scale_add_marker.apply(e, arguments);
                  }),
                  (e.dblclick_dhx_marked_timespan = function (t, a) {
                    e.callEvent("onScaleDblClick", [
                      e.getActionData(t).date,
                      a,
                      t,
                    ]),
                      e.config.dblclick_create &&
                        e.addEventNow(e.getActionData(t).date, null, t);
                  });
              }),
              e._temp_limit_scope();
          },
          map_view: function (e) {
            var t;
            (e.xy.map_date_width = 188),
              (e.xy.map_icon_width = 25),
              (e.xy.map_description_width = 400),
              (e.config.map_resolve_event_location = !0),
              (e.config.map_resolve_user_location = !0),
              (e.config.map_initial_position = new google.maps.LatLng(
                48.724,
                8.215
              )),
              (e.config.map_error_position = new google.maps.LatLng(15, 15)),
              (e.config.map_infowindow_max_width = 300),
              (e.config.map_type = google.maps.MapTypeId.ROADMAP),
              (e.config.map_zoom_after_resolve = 15),
              (e.locale.labels.marker_geo_success = "It seems you are here."),
              (e.locale.labels.marker_geo_fail =
                "Sorry, could not get your current position using geolocation."),
              (e.templates.marker_date = e.date.date_to_str("%Y-%m-%d %H:%i")),
              (e.templates.marker_text = function (t, a, n) {
                return (
                  "<div><b>" +
                  n.text +
                  "</b><br/><br/>" +
                  (n.event_location || "") +
                  "<br/><br/>" +
                  e.templates.marker_date(t) +
                  " - " +
                  e.templates.marker_date(a) +
                  "</div>"
                );
              }),
              (e.dblclick_dhx_map_area = function () {
                !this.config.readonly &&
                  this.config.dblclick_create &&
                  this.addEventNow({
                    start_date: e._date,
                    end_date: e.date.add(e._date, e.config.time_step, "minute"),
                  });
              }),
              (e.templates.map_time = function (t, a, n) {
                return e.config.rtl && !n._timed
                  ? e.templates.day_date(a) +
                      " &ndash; " +
                      e.templates.day_date(t)
                  : n._timed
                  ? this.day_date(n.start_date, n.end_date, n) +
                    " " +
                    this.event_date(t)
                  : e.templates.day_date(t) +
                    " &ndash; " +
                    e.templates.day_date(a);
              }),
              (e.templates.map_text = function (e, t, a) {
                return a.text;
              }),
              (e.date.map_start = function (e) {
                return e;
              }),
              (e.date.add_map = function (e, t, a) {
                return new Date(e.valueOf());
              }),
              (e.templates.map_date = function (e, t, a) {
                return "";
              }),
              (e._latLngUpdate = !1),
              e.attachEvent("onSchedulerReady", function () {
                e._isMapPositionSet = !1;
                var a = document.createElement("div");
                (a.className = "dhx_map"),
                  (a.id = "dhx_gmap"),
                  (a.style.dispay = "none"),
                  e._obj.appendChild(a),
                  (e._els.dhx_gmap = []),
                  e._els.dhx_gmap.push(a),
                  _("dhx_gmap");
                var n = {
                    zoom: e.config.map_inital_zoom || 10,
                    center: e.config.map_initial_position,
                    mapTypeId:
                      e.config.map_type || google.maps.MapTypeId.ROADMAP,
                  },
                  i = new google.maps.Map(
                    document.getElementById("dhx_gmap"),
                    n
                  );
                (i.disableDefaultUI = !1),
                  (i.disableDoubleClickZoom = !e.config.readonly),
                  google.maps.event.addListener(i, "dblclick", function (a) {
                    if (!e.config.readonly && e.config.dblclick_create) {
                      var n = a.latLng;
                      t.geocode({ latLng: n }, function (t, a) {
                        a == google.maps.GeocoderStatus.OK &&
                          ((n = t[0].geometry.location),
                          e.addEventNow({
                            lat: n.lat(),
                            lng: n.lng(),
                            event_location: t[0].formatted_address,
                            start_date: e._date,
                            end_date: e.date.add(
                              e._date,
                              e.config.time_step,
                              "minute"
                            ),
                          }));
                      });
                    }
                  });
                var r = { content: "" };
                e.config.map_infowindow_max_width &&
                  (r.maxWidth = e.config.map_infowindow_max_width),
                  (e.map = {
                    _points: [],
                    _markers: [],
                    _infowindow: new google.maps.InfoWindow(r),
                    _infowindows_content: [],
                    _initialization_count: -1,
                    _obj: i,
                  }),
                  (t = new google.maps.Geocoder()),
                  e.config.map_resolve_user_location &&
                    navigator.geolocation &&
                    (e._isMapPositionSet ||
                      navigator.geolocation.getCurrentPosition(
                        function (t) {
                          var a = new google.maps.LatLng(
                            t.coords.latitude,
                            t.coords.longitude
                          );
                          i.setCenter(a),
                            i.setZoom(e.config.map_zoom_after_resolve || 10),
                            e.map._infowindow.setContent(
                              e.locale.labels.marker_geo_success
                            ),
                            (e.map._infowindow.position = i.getCenter()),
                            e.map._infowindow.open(i),
                            (e._isMapPositionSet = !0);
                        },
                        function () {
                          e.map._infowindow.setContent(
                            e.locale.labels.marker_geo_fail
                          ),
                            e.map._infowindow.setPosition(i.getCenter()),
                            e.map._infowindow.open(i),
                            (e._isMapPositionSet = !0);
                        }
                      )),
                  google.maps.event.addListener(i, "resize", function (e) {
                    (a.style.zIndex = "5"), i.setZoom(i.getZoom());
                  }),
                  google.maps.event.addListener(i, "tilesloaded", function (e) {
                    a.style.zIndex = "5";
                  }),
                  (a.style.display = "none");
                var o = e.render_data;
                function s() {
                  var t = e.get_visible_events();
                  t.sort(function (e, t) {
                    return e.start_date.valueOf() == t.start_date.valueOf()
                      ? e.id > t.id
                        ? 1
                        : -1
                      : e.start_date > t.start_date
                      ? 1
                      : -1;
                  });
                  for (
                    var a =
                        "<div " +
                        (_ = e._waiAria.mapAttrString()) +
                        " class='dhx_map_area'>",
                      n = 0;
                    n < t.length;
                    n++
                  ) {
                    var i = t[n],
                      r =
                        i.id == e._selected_event_id
                          ? "dhx_map_line highlight"
                          : "dhx_map_line",
                      o = i.color ? "background:" + i.color + ";" : "",
                      s = i.textColor ? "color:" + i.textColor + ";" : "",
                      _ = e._waiAria.mapRowAttrString(i),
                      d = e._waiAria.mapDetailsBtnString();
                    (a +=
                      "<div " +
                      _ +
                      " class='" +
                      r +
                      "' event_id='" +
                      i.id +
                      "' " +
                      e.config.event_attribute +
                      "='" +
                      i.id +
                      "' style='" +
                      o +
                      s +
                      (i._text_style || "") +
                      " width: " +
                      (e.xy.map_date_width + e.xy.map_description_width + 2) +
                      "px;'><div class='dhx_map_event_time' style='width: " +
                      e.xy.map_date_width +
                      "px;' >" +
                      e.templates.map_time(i.start_date, i.end_date, i) +
                      "</div>"),
                      (a +=
                        "<div " +
                        d +
                        " class='dhx_event_icon icon_details'>&nbsp;</div>"),
                      (a +=
                        "<div class='line_description' style='width:" +
                        (e.xy.map_description_width - e.xy.map_icon_width) +
                        "px;'>" +
                        e.templates.map_text(i.start_date, i.end_date, i) +
                        "</div></div>");
                  }
                  (a +=
                    "<div class='dhx_v_border' style=" +
                    (e.config.rtl ? "'right: " : "'left: ") +
                    (e.xy.map_date_width - 2) +
                    "px;'></div><div class='dhx_v_border_description'></div></div>"),
                    (e._els.dhx_cal_data[0].scrollTop = 0),
                    (e._els.dhx_cal_data[0].innerHTML = a),
                    (e._els.dhx_cal_data[0].style.width =
                      e.xy.map_date_width +
                      e.xy.map_description_width +
                      1 +
                      "px");
                  var l = e._els.dhx_cal_data[0].firstChild.childNodes,
                    c = e._getNavDateElement();
                  for (
                    c &&
                      (c.innerHTML = e.templates[e._mode + "_date"](
                        e._min_date,
                        e._max_date,
                        e._mode
                      )),
                      e._rendered = [],
                      n = 0;
                    n < l.length - 2;
                    n++
                  )
                    e._rendered[n] = l[n];
                }
                function _(t) {
                  var a = document.getElementById(t),
                    n = e._y - e.xy.nav_height;
                  n < 0 && (n = 0);
                  var i =
                    e._x - e.xy.map_date_width - e.xy.map_description_width - 1;
                  i < 0 && (i = 0),
                    (a.style.height = n + "px"),
                    (a.style.width = i + "px"),
                    e.config.rtl
                      ? (a.style.marginRight =
                          e.xy.map_date_width +
                          e.xy.map_description_width +
                          1 +
                          "px")
                      : (a.style.marginLeft =
                          e.xy.map_date_width +
                          e.xy.map_description_width +
                          1 +
                          "px"),
                    (a.style.marginTop = e.xy.nav_height + 2 + "px");
                }
                (e.render_data = function (t, a) {
                  if ("map" != this._mode) return o.apply(this, arguments);
                  s();
                  for (var n = e.get_visible_events(), i = 0; i < n.length; i++)
                    e.map._markers[n[i].id] || l(n[i], !1, !1);
                }),
                  (e.map_view = function (t) {
                    e.map._initialization_count++;
                    var a,
                      n = e._els.dhx_gmap[0];
                    if (
                      ((e._els.dhx_cal_data[0].style.width =
                        e.xy.map_date_width +
                        e.xy.map_description_width +
                        1 +
                        "px"),
                      (e._min_date = e.config.map_start || e._currentDate()),
                      (e._max_date =
                        e.config.map_end ||
                        e.date.add(e._currentDate(), 1, "year")),
                      (e._table_view = !0),
                      (function (t) {
                        if (t) {
                          var a = e.locale.labels;
                          (e._els.dhx_cal_header[0].innerHTML =
                            "<div class='dhx_map_line' style='width: " +
                            (e.xy.map_date_width +
                              e.xy.map_description_width +
                              2) +
                            "px;' ><div class='headline_date' style='width: " +
                            e.xy.map_date_width +
                            "px;'>" +
                            a.date +
                            "</div><div class='headline_description' style='width: " +
                            e.xy.map_description_width +
                            "px;'>" +
                            a.description +
                            "</div></div>"),
                            (e._table_view = !0),
                            e.set_sizes();
                        }
                      })(t),
                      t)
                    ) {
                      !(function () {
                        (e._selected_event_id = null),
                          e.map._infowindow.close();
                        var t = e.map._markers;
                        for (var a in t)
                          t.hasOwnProperty(a) &&
                            (t[a].setMap(null),
                            delete e.map._markers[a],
                            e.map._infowindows_content[a] &&
                              delete e.map._infowindows_content[a]);
                      })(),
                        s(),
                        (n.style.display = "block"),
                        _("dhx_gmap"),
                        (a = e.map._obj.getCenter());
                      for (
                        var i = e.get_visible_events(), r = 0;
                        r < i.length;
                        r++
                      )
                        e.map._markers[i[r].id] || l(i[r]);
                    } else n.style.display = "none";
                    google.maps.event.trigger(e.map._obj, "resize"),
                      0 === e.map._initialization_count &&
                        a &&
                        e.map._obj.setCenter(a),
                      e._selected_event_id && d(e._selected_event_id);
                  });
                var d = function (t) {
                    e.map._obj.setCenter(e.map._points[t]),
                      e.callEvent("onClick", [t]);
                  },
                  l = function (t, a, n) {
                    var i = e.config.map_error_position;
                    t.lat &&
                      t.lng &&
                      (i = new google.maps.LatLng(t.lat, t.lng));
                    var r = e.templates.marker_text(
                      t.start_date,
                      t.end_date,
                      t
                    );
                    e._new_event ||
                      ((e.map._infowindows_content[t.id] = r),
                      e.map._markers[t.id] && e.map._markers[t.id].setMap(null),
                      (e.map._markers[t.id] = new google.maps.Marker({
                        position: i,
                        map: e.map._obj,
                      })),
                      google.maps.event.addListener(
                        e.map._markers[t.id],
                        "click",
                        function () {
                          e.map._infowindow.setContent(
                            e.map._infowindows_content[t.id]
                          ),
                            e.map._infowindow.open(
                              e.map._obj,
                              e.map._markers[t.id]
                            ),
                            (e._selected_event_id = t.id),
                            e.render_data();
                        }
                      ),
                      (e.map._points[t.id] = i),
                      a && e.map._obj.setCenter(e.map._points[t.id]),
                      n && e.callEvent("onClick", [t.id]));
                  };
                e.attachEvent("onClick", function (t, a) {
                  if ("map" == this._mode) {
                    e._selected_event_id = t;
                    for (var n = 0; n < e._rendered.length; n++)
                      (e._rendered[n].className = "dhx_map_line"),
                        e._rendered[n].getAttribute(e.config.event_attribute) ==
                          t && (e._rendered[n].className += " highlight");
                    e.map._points[t] &&
                      e.map._markers[t] &&
                      (e.map._obj.setCenter(e.map._points[t]),
                      google.maps.event.trigger(e.map._markers[t], "click"));
                  }
                  return !0;
                });
                var c = function (a) {
                    a.event_location && t
                      ? t.geocode(
                          {
                            address: a.event_location,
                            language: e.uid().toString(),
                          },
                          function (t, n) {
                            var i = {};
                            n != google.maps.GeocoderStatus.OK
                              ? ((i = e.callEvent("onLocationError", [a.id])) &&
                                  !0 !== i) ||
                                (i = e.config.map_error_position)
                              : (i = t[0].geometry.location),
                              (a.lat = i.lat()),
                              (a.lng = i.lng()),
                              (e._selected_event_id = a.id),
                              (e._latLngUpdate = !0),
                              e.callEvent("onEventChanged", [a.id, a]),
                              l(a, !0, !0);
                          }
                        )
                      : l(a, !0, !0);
                  },
                  u = function (a) {
                    a.event_location &&
                      t &&
                      t.geocode(
                        {
                          address: a.event_location,
                          language: e.uid().toString(),
                        },
                        function (t, n) {
                          var i = {};
                          n != google.maps.GeocoderStatus.OK
                            ? ((i = e.callEvent("onLocationError", [a.id])) &&
                                !0 !== i) ||
                              (i = e.config.map_error_position)
                            : (i = t[0].geometry.location),
                            (a.lat = i.lat()),
                            (a.lng = i.lng()),
                            (e._latLngUpdate = !0),
                            e.callEvent("onEventChanged", [a.id, a]);
                        }
                      );
                  };
                e.attachEvent("onEventChanged", function (t, a) {
                  if (this._latLngUpdate) this._latLngUpdate = !1;
                  else {
                    var n = e.getEvent(t);
                    (n.start_date < e._min_date && n.end_date > e._min_date) ||
                    (n.start_date < e._max_date && n.end_date > e._max_date) ||
                    (n.start_date.valueOf() >= e._min_date &&
                      n.end_date.valueOf() <= e._max_date)
                      ? (e.map._markers[t] && e.map._markers[t].setMap(null),
                        c(n))
                      : ((e._selected_event_id = null),
                        e.map._infowindow.close(),
                        e.map._markers[t] && e.map._markers[t].setMap(null));
                  }
                  return !0;
                }),
                  e.attachEvent("onEventIdChange", function (t, a) {
                    var n = e.getEvent(a);
                    return (
                      ((n.start_date < e._min_date &&
                        n.end_date > e._min_date) ||
                        (n.start_date < e._max_date &&
                          n.end_date > e._max_date) ||
                        (n.start_date.valueOf() >= e._min_date &&
                          n.end_date.valueOf() <= e._max_date)) &&
                        (e.map._markers[t] &&
                          (e.map._markers[t].setMap(null),
                          delete e.map._markers[t]),
                        e.map._infowindows_content[t] &&
                          delete e.map._infowindows_content[t],
                        c(n)),
                      !0
                    );
                  }),
                  e.attachEvent("onEventAdded", function (t, a) {
                    return (
                      e._dataprocessor ||
                        (((a.start_date < e._min_date &&
                          a.end_date > e._min_date) ||
                          (a.start_date < e._max_date &&
                            a.end_date > e._max_date) ||
                          (a.start_date.valueOf() >= e._min_date &&
                            a.end_date.valueOf() <= e._max_date)) &&
                          (e.map._markers[t] && e.map._markers[t].setMap(null),
                          c(a))),
                      !0
                    );
                  }),
                  e.attachEvent("onBeforeEventDelete", function (t, a) {
                    return (
                      e.map._markers[t] && e.map._markers[t].setMap(null),
                      (e._selected_event_id = null),
                      e.map._infowindow.close(),
                      !0
                    );
                  }),
                  (e._event_resolve_delay = 1500),
                  e.attachEvent("onEventLoading", function (t) {
                    return (
                      e.config.map_resolve_event_location &&
                        t.event_location &&
                        !t.lat &&
                        !t.lng &&
                        ((e._event_resolve_delay += 1500),
                        (function (e, t, a, n) {
                          setTimeout(function () {
                            var n = e.apply(t, a);
                            return (e = t = a = null), n;
                          }, n || 1);
                        })(u, this, [t], e._event_resolve_delay)),
                      !0
                    );
                  }),
                  e.attachEvent("onEventCancel", function (t, a) {
                    return (
                      a &&
                        (e.map._markers[t] && e.map._markers[t].setMap(null),
                        e.map._infowindow.close()),
                      !0
                    );
                  });
              });
          },
          minical: function (e) {
            (e.templates.calendar_month = e.date.date_to_str("%F %Y")),
              (e.templates.calendar_scale_date = e.date.date_to_str("%D")),
              (e.templates.calendar_date = e.date.date_to_str("%d")),
              (e.config.minicalendar = { mark_events: !0 }),
              (e._synced_minicalendars = []),
              (e.renderCalendar = function (t, a, n) {
                var i = null,
                  r = t.date || e._currentDate();
                if (
                  ("string" == typeof r && (r = this.templates.api_date(r)), a)
                )
                  (i = this._render_calendar(a.parentNode, r, t, a)),
                    e.unmarkCalendar(i);
                else {
                  var o = t.container,
                    s = t.position;
                  if (
                    ("string" == typeof o && (o = document.getElementById(o)),
                    "string" == typeof s && (s = document.getElementById(s)),
                    s && void 0 === s.left && void 0 === s.right)
                  ) {
                    var _ = e.$domHelpers.getOffset(s);
                    s = { top: _.top + s.offsetHeight, left: _.left };
                  }
                  o || (o = e._get_def_cont(s)),
                    ((i = this._render_calendar(o, r, t)).onclick = function (
                      t
                    ) {
                      var a = t.target || t.srcElement,
                        n = e.$domHelpers;
                      if (
                        n.closest(a, ".dhx_month_head") &&
                        !n.closest(a, ".dhx_after") &&
                        !n.closest(a, ".dhx_before")
                      ) {
                        var i = n
                            .closest(a, "[data-cell-date]")
                            .getAttribute("data-cell-date"),
                          r = e.templates.parse_date(i);
                        e.unmarkCalendar(this),
                          e.markCalendar(this, r, "dhx_calendar_click"),
                          (this._last_date = r),
                          this.conf.handler &&
                            this.conf.handler.call(e, r, this);
                      }
                    });
                }
                if (e.config.minicalendar.mark_events)
                  for (
                    var d = e.date.month_start(r),
                      l = e.date.add(d, 1, "month"),
                      c = this.getEvents(d, l),
                      u = this["filter_" + this._mode],
                      h = {},
                      f = 0;
                    f < c.length;
                    f++
                  ) {
                    var p = c[f];
                    if (!u || u(p.id, p)) {
                      var v = p.start_date;
                      for (
                        v.valueOf() < d.valueOf() && (v = d),
                          v = e.date.date_part(new Date(v.valueOf()));
                        v < p.end_date &&
                        (h[+v] ||
                          ((h[+v] = !0),
                          this.markCalendar(i, v, "dhx_year_event")),
                        !(
                          (v = this.date.add(v, 1, "day")).valueOf() >=
                          l.valueOf()
                        ));

                      );
                    }
                  }
                return (
                  this._markCalendarCurrentDate(i),
                  (i.conf = t),
                  t.sync && !n && this._synced_minicalendars.push(i),
                  i.conf._on_xle_handler ||
                    (i.conf._on_xle_handler = e.attachEvent(
                      "onXLE",
                      function () {
                        e.updateCalendar(i, i.conf.date);
                      }
                    )),
                  this.config.wai_aria_attributes &&
                    this.config.wai_aria_application_role &&
                    i.setAttribute("role", "application"),
                  i
                );
              }),
              (e._get_def_cont = function (e) {
                return (
                  this._def_count ||
                    ((this._def_count = document.createElement("div")),
                    (this._def_count.className = "dhx_minical_popup"),
                    (this._def_count.onclick = function (e) {
                      e.cancelBubble = !0;
                    }),
                    document.body.appendChild(this._def_count)),
                  e.left && (this._def_count.style.left = e.left + "px"),
                  e.right && (this._def_count.style.right = e.right + "px"),
                  e.top && (this._def_count.style.top = e.top + "px"),
                  e.bottom && (this._def_count.style.bottom = e.bottom + "px"),
                  (this._def_count._created = new Date()),
                  this._def_count
                );
              }),
              (e._locateCalendar = function (t, a) {
                if (
                  ("string" == typeof a && (a = e.templates.api_date(a)),
                  +a > +t._max_date || +a < +t._min_date)
                )
                  return null;
                for (
                  var n = t.querySelector(".dhx_year_body").childNodes[0],
                    i = 0,
                    r = new Date(t._min_date);
                  +this.date.add(r, 1, "week") <= +a;

                )
                  (r = this.date.add(r, 1, "week")), i++;
                var o = e.config.start_on_monday,
                  s = (a.getDay() || (o ? 7 : 0)) - (o ? 1 : 0);
                return n.rows[i].cells[s].firstChild;
              }),
              (e.markCalendar = function (e, t, a) {
                var n = this._locateCalendar(e, t);
                n && (n.className += " " + a);
              }),
              (e.unmarkCalendar = function (e, t, a) {
                if (
                  ((t = t || e._last_date), (a = a || "dhx_calendar_click"), t)
                ) {
                  var n = this._locateCalendar(e, t);
                  n &&
                    (n.className = (n.className || "").replace(RegExp(a, "g")));
                }
              }),
              (e._week_template = function (t) {
                for (
                  var a = t || 250,
                    n = 0,
                    i = document.createElement("div"),
                    r = this.date.week_start(e._currentDate()),
                    o = 0;
                  o < 7;
                  o++
                )
                  (this._cols[o] = Math.floor(a / (7 - o))),
                    this._render_x_header(o, n, r, i),
                    (r = this.date.add(r, 1, "day")),
                    (a -= this._cols[o]),
                    (n += this._cols[o]);
                return (i.lastChild.className += " dhx_scale_bar_last"), i;
              }),
              (e.updateCalendar = function (e, t) {
                (e.conf.date = t), this.renderCalendar(e.conf, e, !0);
              }),
              (e._mini_cal_arrows = ["&nbsp;", "&nbsp;"]),
              (e._render_calendar = function (t, a, n, i) {
                var r = e.templates,
                  o = this._cols;
                this._cols = [];
                var s = this._mode;
                this._mode = "calendar";
                var _ = this._colsS;
                this._colsS = { height: 0 };
                var d = new Date(this._min_date),
                  l = new Date(this._max_date),
                  c = new Date(e._date),
                  u = r.month_day,
                  h = this._ignores_detected;
                (this._ignores_detected = 0),
                  (r.month_day = r.calendar_date),
                  (a = this.date.month_start(a));
                var f,
                  p = this._week_template(
                    t.offsetWidth - 1 - this.config.minicalendar.padding
                  );
                i
                  ? (f = i)
                  : ((f = document.createElement("div")).className =
                      "dhx_cal_container dhx_mini_calendar"),
                  f.setAttribute("date", this._helpers.formatDate(a)),
                  (f.innerHTML =
                    "<div class='dhx_year_month'></div><div class='dhx_year_grid" +
                    (e.config.rtl ? " dhx_grid_rtl'>" : "'>") +
                    "<div class='dhx_year_week'>" +
                    (p ? p.innerHTML : "") +
                    "</div><div class='dhx_year_body'></div></div>");
                var v = f.querySelector(".dhx_year_month"),
                  g = f.querySelector(".dhx_year_week"),
                  m = f.querySelector(".dhx_year_body");
                if (
                  ((v.innerHTML = this.templates.calendar_month(a)),
                  n.navigation)
                )
                  for (
                    var y = function (t, a) {
                        var n = e.date.add(t._date, a, "month");
                        e.updateCalendar(t, n),
                          e._date.getMonth() == t._date.getMonth() &&
                            e._date.getFullYear() == t._date.getFullYear() &&
                            e._markCalendarCurrentDate(t);
                      },
                      b = ["dhx_cal_prev_button", "dhx_cal_next_button"],
                      x = [
                        "left:1px;top:2px;position:absolute;",
                        "left:auto; right:1px;top:2px;position:absolute;",
                      ],
                      k = [-1, 1],
                      w = function (t) {
                        return function () {
                          if (n.sync)
                            for (
                              var a = e._synced_minicalendars, i = 0;
                              i < a.length;
                              i++
                            )
                              y(a[i], t);
                          else e.config.rtl && (t = -t), y(f, t);
                        };
                      },
                      E = [e.locale.labels.prev, e.locale.labels.next],
                      S = 0;
                    S < 2;
                    S++
                  ) {
                    var D = document.createElement("div");
                    (D.className = b[S]),
                      e._waiAria.headerButtonsAttributes(D, E[S]),
                      (D.style.cssText = x[S]),
                      (D.innerHTML = this._mini_cal_arrows[S]),
                      v.appendChild(D),
                      (D.onclick = w(k[S]));
                  }
                (f._date = new Date(a)),
                  (f.week_start =
                    (a.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) %
                    7);
                var N = (f._min_date = this.date.week_start(a));
                (f._max_date = this.date.add(f._min_date, 6, "week")),
                  this._reset_month_scale(m, a, N, 6),
                  i || t.appendChild(f),
                  (g.style.height = g.childNodes[0].offsetHeight - 1 + "px");
                var C = e.uid();
                e._waiAria.minicalHeader(v, C),
                  e._waiAria.minicalGrid(f.querySelector(".dhx_year_grid"), C),
                  e._waiAria.minicalRow(g);
                for (
                  var T = g.querySelectorAll(".dhx_scale_bar"), M = 0;
                  M < T.length;
                  M++
                )
                  e._waiAria.minicalHeadCell(T[M]);
                var A = m.querySelectorAll("td"),
                  O = new Date(N);
                for (M = 0; M < A.length; M++)
                  e._waiAria.minicalDayCell(A[M], new Date(O)),
                    (O = e.date.add(O, 1, "day"));
                return (
                  e._waiAria.minicalHeader(v, C),
                  (this._cols = o),
                  (this._mode = s),
                  (this._colsS = _),
                  (this._min_date = d),
                  (this._max_date = l),
                  (e._date = c),
                  (r.month_day = u),
                  (this._ignores_detected = h),
                  f
                );
              }),
              (e.destroyCalendar = function (t, a) {
                !t &&
                  this._def_count &&
                  this._def_count.firstChild &&
                  (a ||
                    new Date().valueOf() - this._def_count._created.valueOf() >
                      500) &&
                  (t = this._def_count.firstChild),
                  t &&
                    ((t.onclick = null),
                    (t.innerHTML = ""),
                    t.parentNode && t.parentNode.removeChild(t),
                    this._def_count && (this._def_count.style.top = "-1000px"),
                    t.conf &&
                      t.conf._on_xle_handler &&
                      e.detachEvent(t.conf._on_xle_handler));
              }),
              (e.isCalendarVisible = function () {
                return (
                  !!(
                    this._def_count &&
                    parseInt(this._def_count.style.top, 10) > 0
                  ) && this._def_count
                );
              }),
              (e._attach_minical_events = function () {
                e.event(document.body, "click", function () {
                  e.destroyCalendar();
                }),
                  (e._attach_minical_events = function () {});
              }),
              e.attachEvent("onTemplatesReady", function () {
                e._attach_minical_events();
              }),
              (e.templates.calendar_time = e.date.date_to_str("%d-%m-%Y")),
              (e.form_blocks.calendar_time = {
                render: function (t) {
                  var a =
                      "<input class='dhx_readonly' type='text' readonly='true'>",
                    n = e.config,
                    i = this.date.date_part(e._currentDate()),
                    r = 1440,
                    o = 0;
                  n.limit_time_select &&
                    ((o = 60 * n.first_hour), (r = 60 * n.last_hour + 1)),
                    i.setHours(o / 60),
                    (t._time_values = []),
                    (a += " <select class='dhx_lightbox_time_select'>");
                  for (var s = o; s < r; s += 1 * this.config.time_step)
                    (a +=
                      "<option value='" +
                      s +
                      "'>" +
                      this.templates.time_picker(i) +
                      "</option>"),
                      t._time_values.push(s),
                      (i = this.date.add(i, this.config.time_step, "minute"));
                  return (
                    "<div style='height:30px;padding-top:0; font-size:inherit;' class='dhx_section_time dhx_lightbox_minical'>" +
                    (a += "</select>") +
                    "<span style='font-weight:normal; font-size:10pt;'> &nbsp;&ndash;&nbsp; </span>" +
                    a +
                    "</div>"
                  );
                },
                set_value: function (t, a, n, i) {
                  var r,
                    o,
                    s = t.getElementsByTagName("input"),
                    _ = t.getElementsByTagName("select"),
                    d = function (t, a, n) {
                      t.onclick = function () {
                        e.destroyCalendar(null, !0),
                          e.renderCalendar({
                            position: t,
                            date: new Date(this._date),
                            navigation: !0,
                            handler: function (a) {
                              (t.value = e.templates.calendar_time(a)),
                                (t._date = new Date(a)),
                                e.destroyCalendar(),
                                e.config.event_duration &&
                                  e.config.auto_end_date &&
                                  0 === n &&
                                  h();
                            },
                          });
                      };
                    };
                  if (e.config.full_day) {
                    if (!t._full_day) {
                      var l =
                        "<label class='dhx_fullday'><input type='checkbox' name='full_day' value='true'> " +
                        e.locale.labels.full_day +
                        "&nbsp;</label></input>";
                      e.config.wide_form ||
                        (l = t.previousSibling.innerHTML + l),
                        (t.previousSibling.innerHTML = l),
                        (t._full_day = !0);
                    }
                    var c = t.previousSibling.getElementsByTagName("input")[0],
                      u =
                        0 === e.date.time_part(n.start_date) &&
                        0 === e.date.time_part(n.end_date);
                    (c.checked = u),
                      (_[0].disabled = c.checked),
                      (_[1].disabled = c.checked),
                      (c.onclick = function () {
                        if (!0 === c.checked) {
                          var a = {};
                          e.form_blocks.calendar_time.get_value(t, a),
                            (r = e.date.date_part(a.start_date)),
                            (+(o = e.date.date_part(a.end_date)) == +r ||
                              (+o >= +r &&
                                (0 !== n.end_date.getHours() ||
                                  0 !== n.end_date.getMinutes()))) &&
                              (o = e.date.add(o, 1, "day"));
                        }
                        var i = r || n.start_date,
                          d = o || n.end_date;
                        f(s[0], i),
                          f(s[1], d),
                          (_[0].value = 60 * i.getHours() + i.getMinutes()),
                          (_[1].value = 60 * d.getHours() + d.getMinutes()),
                          (_[0].disabled = c.checked),
                          (_[1].disabled = c.checked);
                      });
                  }
                  if (e.config.event_duration && e.config.auto_end_date) {
                    var h = function () {
                      e.config.auto_end_date &&
                        e.config.event_duration &&
                        ((r = e.date.add(s[0]._date, _[0].value, "minute")),
                        (o = new Date(
                          r.getTime() + 60 * e.config.event_duration * 1e3
                        )),
                        (s[1].value = e.templates.calendar_time(o)),
                        (s[1]._date = e.date.date_part(new Date(o))),
                        (_[1].value = 60 * o.getHours() + o.getMinutes()));
                    };
                    _[0].onchange = h;
                  }
                  function f(t, a, n) {
                    d(t, a, n),
                      (t.value = e.templates.calendar_time(a)),
                      (t._date = e.date.date_part(new Date(a)));
                  }
                  function p(e) {
                    for (
                      var t = i._time_values,
                        a = 60 * e.getHours() + e.getMinutes(),
                        n = a,
                        r = !1,
                        o = 0;
                      o < t.length;
                      o++
                    ) {
                      var s = t[o];
                      if (s === a) {
                        r = !0;
                        break;
                      }
                      s < a && (n = s);
                    }
                    return r || n ? (r ? a : n) : -1;
                  }
                  f(s[0], n.start_date, 0),
                    f(s[1], n.end_date, 1),
                    (d = function () {}),
                    (_[0].value = p(n.start_date)),
                    (_[1].value = p(n.end_date));
                },
                get_value: function (t, a) {
                  var n = t.getElementsByTagName("input"),
                    i = t.getElementsByTagName("select");
                  return (
                    (a.start_date = e.date.add(
                      n[0]._date,
                      i[0].value,
                      "minute"
                    )),
                    (a.end_date = e.date.add(n[1]._date, i[1].value, "minute")),
                    a.end_date <= a.start_date &&
                      (a.end_date = e.date.add(
                        a.start_date,
                        e.config.time_step,
                        "minute"
                      )),
                    {
                      start_date: new Date(a.start_date),
                      end_date: new Date(a.end_date),
                    }
                  );
                },
                focus: function (e) {},
              }),
              (e.linkCalendar = function (t, a) {
                var n = function () {
                  var n = e._date,
                    i = new Date(n.valueOf());
                  return (
                    a && (i = a(i)), i.setDate(1), e.updateCalendar(t, i), !0
                  );
                };
                e.attachEvent("onViewChange", n),
                  e.attachEvent("onXLE", n),
                  e.attachEvent("onEventAdded", n),
                  e.attachEvent("onEventChanged", n),
                  e.attachEvent("onEventDeleted", n),
                  n();
              }),
              (e._markCalendarCurrentDate = function (t) {
                var a = e.getState(),
                  n = a.min_date,
                  i = a.max_date,
                  r = a.mode,
                  o = e.date.month_start(new Date(t._date)),
                  s = e.date.add(o, 1, "month");
                if (
                  !(
                    { month: !0, year: !0, agenda: !0, grid: !0 }[r] ||
                    (n.valueOf() <= o.valueOf() && i.valueOf() >= s.valueOf())
                  )
                )
                  for (var _ = n; _.valueOf() < i.valueOf(); )
                    o.valueOf() <= _.valueOf() &&
                      s > _ &&
                      e.markCalendar(t, _, "dhx_calendar_click"),
                      (_ = e.date.add(_, 1, "day"));
              }),
              e.attachEvent("onEventCancel", function () {
                e.destroyCalendar(null, !0);
              });
          },
          monthheight: function (e) {
            e.attachEvent("onTemplatesReady", function () {
              e.xy.scroll_width = 0;
              var t = e.render_view_data;
              e.render_view_data = function () {
                var a = this._els.dhx_cal_data[0];
                (a.firstChild._h_fix = !0), t.apply(e, arguments);
                var n = parseInt(a.style.height);
                (a.style.height = "1px"),
                  (a.style.height = a.scrollHeight + "px"),
                  (this._obj.style.height =
                    this._obj.clientHeight + a.scrollHeight - n + "px");
              };
              var a = e._reset_month_scale;
              e._reset_month_scale = function (t, n, i, r) {
                var o = { clientHeight: 100 };
                a.apply(e, [o, n, i, r]), (t.innerHTML = o.innerHTML);
              };
            });
          },
          multisection: function (e) {
            Te("Multisection", e.assert);
          },
          multisource: function (e) {
            var t = e._load;
            e._load = function (e, a) {
              if ("object" == Le((e = e || this._load_url)))
                for (
                  var n = (function (e) {
                      var t = function () {};
                      return (t.prototype = e), t;
                    })(this._loaded),
                    i = 0;
                  i < e.length;
                  i++
                )
                  (this._loaded = new n()), t.call(this, e[i], a);
              else t.apply(this, arguments);
            };
          },
          mvc: function (e) {
            var t,
              a = { use_id: !1 };
            function n(e) {
              var t = {};
              for (var n in e) 0 !== n.indexOf("_") && (t[n] = e[n]);
              return a.use_id || delete t.id, t;
            }
            function i(e) {
              (e._not_render = !1),
                e._render_wait && e.render_view_data(),
                (e._loading = !1),
                e.callEvent("onXLE", []);
            }
            function r(e) {
              return a.use_id ? e.id : e.cid;
            }
            e.backbone = function (o, s) {
              s && (a = s),
                o.bind("change", function (a, n) {
                  var i = r(a),
                    o = (e._events[i] = a.toJSON());
                  (o.id = i),
                    e._init_event(o),
                    clearTimeout(t),
                    (t = setTimeout(function () {
                      e.updateView();
                    }, 1));
                }),
                o.bind("remove", function (t, a) {
                  var n = r(t);
                  e._events[n] && e.deleteEvent(n);
                });
              var _ = [];
              function d() {
                _.length && (e.parse(_, "json"), (_ = []));
              }
              o.bind("add", function (t, a) {
                var n = r(t);
                if (!e._events[n]) {
                  var i = t.toJSON();
                  (i.id = n),
                    e._init_event(i),
                    _.push(i),
                    1 == _.length && setTimeout(d, 1);
                }
              }),
                o.bind("request", function (t) {
                  t instanceof Backbone.Collection &&
                    (function (e) {
                      (e._loading = !0),
                        (e._not_render = !0),
                        e.callEvent("onXLS", []);
                    })(e);
                }),
                o.bind("sync", function (t) {
                  t instanceof Backbone.Collection && i(e);
                }),
                o.bind("error", function (t) {
                  t instanceof Backbone.Collection && i(e);
                }),
                e.attachEvent("onEventCreated", function (t) {
                  var a = new o.model(e.getEvent(t));
                  return (e._events[t] = a.toJSON()), (e._events[t].id = t), !0;
                }),
                e.attachEvent("onEventAdded", function (t) {
                  if (!o.get(t)) {
                    var a = n(e.getEvent(t)),
                      i = new o.model(a),
                      s = r(i);
                    s != t && this.changeEventId(t, s),
                      o.add(i),
                      o.trigger("scheduler:add", i);
                  }
                  return !0;
                }),
                e.attachEvent("onEventChanged", function (t) {
                  var a = o.get(t),
                    i = n(e.getEvent(t));
                  return a.set(i), o.trigger("scheduler:change", a), !0;
                }),
                e.attachEvent("onEventDeleted", function (e) {
                  var t = o.get(e);
                  return (
                    t && (o.trigger("scheduler:remove", t), o.remove(e)), !0
                  );
                });
            };
          },
          outerdrag: function (e) {
            e.attachEvent("onTemplatesReady", function () {
              var t,
                a = new dhtmlDragAndDropObject(),
                n = a.stopDrag;
              function i(a, n, i, r) {
                if (
                  !e.checkEvent("onBeforeExternalDragIn") ||
                  e.callEvent("onBeforeExternalDragIn", [a, n, i, r, t])
                ) {
                  var o = e.attachEvent("onEventCreated", function (n) {
                      e.callEvent("onExternalDragIn", [n, a, t]) ||
                        ((this._drag_mode = this._drag_id = null),
                        this.deleteEvent(n));
                    }),
                    s = e.getActionData(t),
                    _ = { start_date: new Date(s.date) };
                  if (e.matrix && e.matrix[e._mode]) {
                    var d = e.matrix[e._mode];
                    _[d.y_property] = s.section;
                    var l = e._locate_cell_timeline(t);
                    (_.start_date = d._trace_x[l.x]),
                      (_.end_date = e.date.add(
                        _.start_date,
                        d.x_step,
                        d.x_unit
                      ));
                  }
                  e._props &&
                    e._props[e._mode] &&
                    (_[e._props[e._mode].map_to] = s.section),
                    e.addEventNow(_),
                    e.detachEvent(o);
                }
              }
              (a.stopDrag = function (e) {
                return (t = e), n.apply(this, arguments);
              }),
                a.addDragLanding(e._els.dhx_cal_data[0], {
                  _drag: function (e, t, a, n) {
                    i(e, t, a, n);
                  },
                  _dragIn: function (e, t) {
                    return e;
                  },
                  _dragOut: function (e) {
                    return this;
                  },
                }),
                dhtmlx.DragControl &&
                  dhtmlx.DragControl.addDrop(
                    e._els.dhx_cal_data[0],
                    {
                      onDrop: function (e, a, n, r) {
                        var o = dhtmlx.DragControl.getMaster(e);
                        (t = r), i(e, o, a, r.target || r.srcElement);
                      },
                      onDragIn: function (e, t, a) {
                        return t;
                      },
                    },
                    !0
                  );
            });
          },
          pdf: function (e) {
            var t,
              a,
              n = new RegExp("<[^>]*>", "g"),
              i = new RegExp("<br[^>]*>", "g");
            function r(e) {
              return e.replace(i, "\n").replace(n, "");
            }
            function o(e, a) {
              (e = parseFloat(e)), (a = parseFloat(a)), isNaN(a) || (e -= a);
              var n = _(e);
              return (
                (e = e - n.width + n.cols * t),
                isNaN(e) ? "auto" : (100 * e) / t
              );
            }
            function s(e, a, n) {
              (e = parseFloat(e)),
                (a = parseFloat(a)),
                !isNaN(a) && n && (e -= a);
              var i = _(e);
              return (
                (e = e - i.width + i.cols * t),
                isNaN(e) ? "auto" : (100 * e) / (t - (isNaN(a) ? 0 : a))
              );
            }
            function _(t) {
              for (
                var a = 0,
                  n = e._els.dhx_cal_header[0].childNodes,
                  i = n[1] ? n[1].childNodes : n[0].childNodes,
                  r = 0;
                r < i.length;
                r++
              ) {
                var o = i[r].style ? i[r] : i[r].parentNode,
                  s = parseFloat(o.style.width);
                if (!(t > s)) break;
                (t -= s + 1), (a += s + 1);
              }
              return { width: a, cols: r };
            }
            function d(e) {
              return (e = parseFloat(e)), isNaN(e) ? "auto" : (100 * e) / a;
            }
            function l(e, t) {
              return (
                (window.getComputedStyle
                  ? window.getComputedStyle(e, null)[t]
                  : e.currentStyle
                  ? e.currentStyle[t]
                  : null) || ""
              );
            }
            function c(t, a) {
              for (
                var n = parseInt(t.style.left, 10), i = 0;
                i < e._cols.length;
                i++
              )
                if ((n -= e._cols[i]) < 0) return i;
              return a;
            }
            function u(t, a) {
              for (
                var n = parseInt(t.style.top, 10), i = 0;
                i < e._colsS.heights.length;
                i++
              )
                if (e._colsS.heights[i] > n) return i;
              return a;
            }
            function h(e) {
              return e ? "<" + e + ">" : "";
            }
            function f(e) {
              return e ? "</" + e + ">" : "";
            }
            function p(e, t, a, n) {
              var i = "<" + e + " profile='" + t + "'";
              return (
                a && (i += " header='" + a + "'"),
                n && (i += " footer='" + n + "'"),
                (i += ">")
              );
            }
            function v() {
              var t = "",
                n = e._mode;
              if (
                (e.matrix &&
                  e.matrix[e._mode] &&
                  (n =
                    "cell" == e.matrix[e._mode].render ? "matrix" : "timeline"),
                (t +=
                  "<scale mode='" +
                  n +
                  "' today='" +
                  e._els.dhx_cal_date[0].innerHTML +
                  "'>"),
                "week_agenda" == e._mode)
              )
                for (
                  var i = e._els.dhx_cal_data[0].getElementsByTagName("DIV"),
                    o = 0;
                  o < i.length;
                  o++
                )
                  "dhx_wa_scale_bar" == i[o].className &&
                    (t += "<column>" + r(i[o].innerHTML) + "</column>");
              else if ("agenda" == e._mode || "map" == e._mode)
                t +=
                  "<column>" +
                  r(
                    (i = e._els.dhx_cal_header[0].childNodes[0].childNodes)[0]
                      .innerHTML
                  ) +
                  "</column><column>" +
                  r(i[1].innerHTML) +
                  "</column>";
              else if ("year" == e._mode)
                for (
                  i = e._els.dhx_cal_data[0].childNodes, o = 0;
                  o < i.length;
                  o++
                )
                  (t +=
                    "<month label='" +
                    r(i[o].querySelector(".dhx_year_month").innerHTML) +
                    "'>"),
                    (t += m(i[o].querySelector(".dhx_year_week").childNodes)),
                    (t += g(i[o].querySelector(".dhx_year_body"))),
                    (t += "</month>");
              else {
                (t += "<x>"),
                  (t += m((i = e._els.dhx_cal_header[0].childNodes))),
                  (t += "</x>");
                var s = e._els.dhx_cal_data[0];
                if (e.matrix && e.matrix[e._mode]) {
                  for (t += "<y>", o = 0; o < s.firstChild.rows.length; o++)
                    t +=
                      "<row><![CDATA[" +
                      r(s.firstChild.rows[o].cells[0].innerHTML) +
                      "]]></row>";
                  (t += "</y>"),
                    (a = s.firstChild.rows[0].cells[0].offsetHeight);
                } else if ("TABLE" == s.firstChild.tagName) t += g(s);
                else {
                  for (
                    s = s.childNodes[s.childNodes.length - 1];
                    -1 == s.className.indexOf("dhx_scale_holder");

                  )
                    s = s.previousSibling;
                  for (s = s.childNodes, t += "<y>", o = 0; o < s.length; o++)
                    t += "\n<row><![CDATA[" + r(s[o].innerHTML) + "]]></row>";
                  (t += "</y>"), (a = s[0].offsetHeight);
                }
              }
              return (t += "</scale>");
            }
            function g(e) {
              for (
                var t = "", n = e.querySelectorAll("tr"), i = 0;
                i < n.length;
                i++
              ) {
                for (
                  var o = [], s = n[i].querySelectorAll("td"), _ = 0;
                  _ < s.length;
                  _++
                )
                  o.push(s[_].querySelector(".dhx_month_head").innerHTML);
                (t +=
                  "\n<row height='" +
                  s[0].offsetHeight +
                  "'><![CDATA[" +
                  r(o.join("|")) +
                  "]]></row>"),
                  (a = s[0].offsetHeight);
              }
              return t;
            }
            function m(a) {
              var n,
                i = "";
              e.matrix &&
                e.matrix[e._mode] &&
                (e.matrix[e._mode].second_scale && (n = a[1].childNodes),
                (a = a[0].childNodes));
              for (var o = 0; o < a.length; o++)
                i += "\n<column><![CDATA[" + r(a[o].innerHTML) + "]]></column>";
              if (((t = a[0].offsetWidth), n)) {
                var s = 0,
                  _ = a[0].offsetWidth,
                  d = 1;
                for (o = 0; o < n.length; o++)
                  (i +=
                    "\n<column second_scale='" +
                    d +
                    "'><![CDATA[" +
                    r(n[o].innerHTML) +
                    "]]></column>"),
                    (s += n[o].offsetWidth) >= _ &&
                      ((_ += a[d] ? a[d].offsetWidth : 0), d++),
                    (t = n[0].offsetWidth);
              }
              return i;
            }
            function y(t) {
              var n = "",
                i = e._rendered,
                _ = e.matrix && e.matrix[e._mode];
              if ("agenda" == e._mode || "map" == e._mode)
                for (var h = 0; h < i.length; h++)
                  n +=
                    "<event><head><![CDATA[" +
                    r(i[h].childNodes[0].innerHTML) +
                    "]]></head><body><![CDATA[" +
                    r(i[h].childNodes[2].innerHTML) +
                    "]]></body></event>";
              else if ("week_agenda" == e._mode)
                for (h = 0; h < i.length; h++)
                  n +=
                    "<event day='" +
                    i[h].parentNode.getAttribute("day") +
                    "'><body>" +
                    r(i[h].innerHTML) +
                    "</body></event>";
              else if ("year" == e._mode)
                for (i = e.get_visible_events(), h = 0; h < i.length; h++) {
                  var f = i[h].start_date;
                  for (
                    f.valueOf() < e._min_date.valueOf() && (f = e._min_date);
                    f < i[h].end_date;

                  ) {
                    var p =
                        f.getMonth() +
                        12 * (f.getFullYear() - e._min_date.getFullYear()) -
                        e.week_starts._month,
                      v = e.week_starts[p] + f.getDate() - 1,
                      g = t ? l(e._get_year_cell(f), "color") : "",
                      m = t ? l(e._get_year_cell(f), "backgroundColor") : "";
                    if (
                      ((n +=
                        "<event day='" +
                        (v % 7) +
                        "' week='" +
                        Math.floor(v / 7) +
                        "' month='" +
                        p +
                        "' backgroundColor='" +
                        m +
                        "' color='" +
                        g +
                        "'></event>"),
                      (f = e.date.add(f, 1, "day")).valueOf() >=
                        e._max_date.valueOf())
                    )
                      break;
                  }
                }
              else if (_ && "cell" == _.render)
                for (
                  i = e._els.dhx_cal_data[0].getElementsByTagName("TD"), h = 0;
                  h < i.length;
                  h++
                )
                  (g = t ? l(i[h], "color") : ""),
                    (n +=
                      "\n<event><body backgroundColor='" +
                      (m = t ? l(i[h], "backgroundColor") : "") +
                      "' color='" +
                      g +
                      "'><![CDATA[" +
                      r(i[h].innerHTML) +
                      "]]></body></event>");
              else
                for (h = 0; h < i.length; h++) {
                  var y, b;
                  if (e.matrix && e.matrix[e._mode])
                    (y = o(i[h].style.left)), (b = o(i[h].offsetWidth) - 1);
                  else {
                    var x = e.config.use_select_menu_space ? 0 : 26;
                    (y = s(i[h].style.left, x, !0)),
                      (b = s(i[h].style.width, x) - 1);
                  }
                  if (!isNaN(1 * b)) {
                    var k = d(i[h].style.top),
                      w = d(i[h].style.height),
                      E = i[h].className.split(" ")[0].replace("dhx_cal_", "");
                    if ("dhx_tooltip_line" !== E) {
                      var S = e.getEvent(
                        i[h].getAttribute(e.config.event_attribute)
                      );
                      if (S) {
                        v = S._sday;
                        var D = S._sweek,
                          N = S._length || 0;
                        if ("month" == e._mode)
                          (w = parseInt(i[h].offsetHeight, 10)),
                            (k =
                              parseInt(i[h].style.top, 10) -
                              e.xy.month_head_height),
                            (v = c(i[h], v)),
                            (D = u(i[h], D));
                        else if (e.matrix && e.matrix[e._mode]) {
                          (v = 0),
                            (D =
                              i[h].parentNode.parentNode.parentNode.rowIndex);
                          var C = a;
                          (a = i[h].parentNode.offsetHeight),
                            (k = d(i[h].style.top)),
                            (k -= 0.2 * k),
                            (a = C);
                        } else {
                          if (i[h].parentNode == e._els.dhx_cal_data[0])
                            continue;
                          var T = e._els.dhx_cal_data[0].childNodes[0],
                            M = parseFloat(
                              -1 != T.className.indexOf("dhx_scale_holder")
                                ? T.style.left
                                : 0
                            );
                          y += o(i[h].parentNode.style.left, M);
                        }
                        (n +=
                          "\n<event week='" +
                          D +
                          "' day='" +
                          v +
                          "' type='" +
                          E +
                          "' x='" +
                          y +
                          "' y='" +
                          k +
                          "' width='" +
                          b +
                          "' height='" +
                          w +
                          "' len='" +
                          N +
                          "'>"),
                          "event" == E
                            ? ((n +=
                                "<header><![CDATA[" +
                                r(i[h].childNodes[1].innerHTML) +
                                "]]></header>"),
                              (g = t ? l(i[h].childNodes[2], "color") : ""),
                              (n +=
                                "<body backgroundColor='" +
                                (m = t
                                  ? l(i[h].childNodes[2], "backgroundColor")
                                  : "") +
                                "' color='" +
                                g +
                                "'><![CDATA[" +
                                r(i[h].childNodes[2].innerHTML) +
                                "]]></body>"))
                            : ((g = t ? l(i[h], "color") : ""),
                              (n +=
                                "<body backgroundColor='" +
                                (m = t ? l(i[h], "backgroundColor") : "") +
                                "' color='" +
                                g +
                                "'><![CDATA[" +
                                r(i[h].innerHTML) +
                                "]]></body>")),
                          (n += "</event>");
                      }
                    }
                  }
                }
              return n;
            }
            function b(t, a, n, i, r, o) {
              var s = !1;
              "fullcolor" == i && ((s = !0), (i = "color")), (i = i || "color");
              var _ = "";
              if (t) {
                var d = e._date,
                  l = e._mode;
                (a = e.date[n + "_start"](a)),
                  (a = e.date["get_" + n + "_end"]
                    ? e.date["get_" + n + "_end"](a)
                    : e.date.add(a, 1, n)),
                  (_ = p("pages", i, r, o));
                for (var c = new Date(t); +c < +a; c = this.date.add(c, 1, n))
                  this.setCurrentView(c, n),
                    (_ += h("page") + v().replace("–", "-") + y(s) + f("page"));
                (_ += f("pages")), this.setCurrentView(d, l);
              } else
                _ =
                  p("data", i, r, o) + v().replace("–", "-") + y(s) + f("data");
              return _;
            }
            function x(t, a, n, i, r, o, s) {
              !(function (t, a) {
                var n = e.uid(),
                  i = document.createElement("div");
                (i.style.display = "none"),
                  document.body.appendChild(i),
                  (i.innerHTML =
                    '<form id="' +
                    n +
                    '" method="post" target="_blank" action="' +
                    a +
                    '" accept-charset="utf-8" enctype="application/x-www-form-urlencoded"><input type="hidden" name="mycoolxmlbody"/> </form>'),
                  (document.getElementById(n).firstChild.value =
                    encodeURIComponent(t)),
                  document.getElementById(n).submit(),
                  i.parentNode.removeChild(i);
              })(
                "object" == Pe(r)
                  ? (function (e) {
                      for (var t = "<data>", a = 0; a < e.length; a++)
                        t += e[a].source.getPDFData(
                          e[a].start,
                          e[a].end,
                          e[a].view,
                          e[a].mode,
                          e[a].header,
                          e[a].footer
                        );
                      return (t += "</data>");
                    })(r)
                  : b.apply(this, [t, a, n, r, o, s]),
                i
              );
            }
            (e.getPDFData = b),
              (e.toPDF = function (e, t, a, n) {
                return x.apply(this, [null, null, null, e, t, a, n]);
              }),
              (e.toPDFRange = function (t, a, n, i, r, o, s) {
                return (
                  "string" == typeof t &&
                    ((t = e.templates.api_date(t)),
                    (a = e.templates.api_date(a))),
                  x.apply(this, arguments)
                );
              });
          },
          quick_info: function (e) {
            (e.config.icons_select = ["icon_details", "icon_delete"]),
              (e.config.details_on_create = !0),
              (e.config.show_quick_info = !0),
              (e.xy.menu_width = 0),
              e.attachEvent("onClick", function (t) {
                return e.showQuickInfo(t), !0;
              }),
              (function () {
                for (
                  var t = [
                      "onEmptyClick",
                      "onViewChange",
                      "onLightbox",
                      "onBeforeEventDelete",
                      "onBeforeDrag",
                    ],
                    a = function () {
                      return e.hideQuickInfo(!0), !0;
                    },
                    n = 0;
                  n < t.length;
                  n++
                )
                  e.attachEvent(t[n], a);
              })(),
              (e.templates.quick_info_title = function (e, t, a) {
                return a.text.substr(0, 50);
              }),
              (e.templates.quick_info_content = function (e, t, a) {
                return a.details || a.text;
              }),
              (e.templates.quick_info_date = function (t, a, n) {
                return e.isOneDayEvent(n) && e.config.rtl
                  ? e.templates.day_date(t, a, n) +
                      " " +
                      e.templates.event_header(a, t, n)
                  : e.isOneDayEvent(n)
                  ? e.templates.day_date(t, a, n) +
                    " " +
                    e.templates.event_header(t, a, n)
                  : e.config.rtl
                  ? e.templates.week_date(a, t, n)
                  : e.templates.week_date(t, a, n);
              }),
              (e.showQuickInfo = function (e) {
                if (
                  e != this._quick_info_box_id &&
                  this.config.show_quick_info
                ) {
                  this.hideQuickInfo(!0);
                  var t = this._get_event_counter_part(e);
                  t &&
                    ((this._quick_info_box = this._init_quick_info(t)),
                    this._fill_quick_data(e),
                    this._show_quick_info(t),
                    this.callEvent("onQuickInfo", [e]));
                }
              }),
              (function () {
                function t(e) {
                  e = e || "";
                  var t,
                    a = parseFloat(e),
                    n = e.match(/m?s/);
                  switch ((n && (n = n[0]), n)) {
                    case "s":
                      t = 1e3 * a;
                      break;
                    case "ms":
                      t = a;
                      break;
                    default:
                      t = 0;
                  }
                  return t;
                }
                e.hideQuickInfo = function (a) {
                  var n = this._quick_info_box,
                    i = this._quick_info_box_id;
                  if (((this._quick_info_box_id = 0), n && n.parentNode)) {
                    var r = n.offsetWidth;
                    if (e.config.quick_info_detached)
                      return (
                        this.callEvent("onAfterQuickInfo", [i]),
                        n.parentNode.removeChild(n)
                      );
                    if (
                      ("auto" == n.style.right
                        ? (n.style.left = -r + "px")
                        : (n.style.right = -r + "px"),
                      a)
                    )
                      n.parentNode.removeChild(n);
                    else {
                      var o;
                      window.getComputedStyle
                        ? (o = window.getComputedStyle(n, null))
                        : n.currentStyle && (o = n.currentStyle);
                      var s =
                        t(o["transition-delay"]) + t(o["transition-duration"]);
                      setTimeout(function () {
                        n.parentNode && n.parentNode.removeChild(n);
                      }, s);
                    }
                    this.callEvent("onAfterQuickInfo", [i]);
                  }
                };
              })(),
              e.event(window, "keydown", function (t) {
                27 == t.keyCode && e.hideQuickInfo();
              }),
              (e._show_quick_info = function (t) {
                var a = e._quick_info_box;
                e._obj.appendChild(a);
                var n = a.offsetWidth,
                  i = a.offsetHeight;
                if (e.config.quick_info_detached) {
                  var r = t.left - t.dx * (n - t.width);
                  r + n > window.innerWidth && (r = window.innerWidth - n),
                    (r = Math.max(0, r)),
                    (a.style.left = r + "px"),
                    (a.style.top = t.top - (t.dy ? i : -t.height) + "px");
                } else
                  (a.style.top =
                    this.xy.scale_height + this.xy.nav_height + 20 + "px"),
                    1 == t.dx
                      ? ((a.style.right = "auto"),
                        (a.style.left = -n + "px"),
                        setTimeout(function () {
                          a.style.left = "-10px";
                        }, 1))
                      : ((a.style.left = "auto"),
                        (a.style.right = -n + "px"),
                        setTimeout(function () {
                          a.style.right = "-10px";
                        }, 1)),
                    (a.className =
                      a.className
                        .replace(" dhx_qi_left", "")
                        .replace(" dhx_qi_right", "") +
                      " dhx_qi_" +
                      (1 == t.dx ? "left" : "right"));
              }),
              e.attachEvent("onTemplatesReady", function () {
                if ((e.hideQuickInfo(), this._quick_info_box)) {
                  var t = this._quick_info_box;
                  t.parentNode && t.parentNode.removeChild(t),
                    (this._quick_info_box = null);
                }
              }),
              (e._quick_info_onscroll_handler = function (t) {
                e.hideQuickInfo();
              }),
              (e._init_quick_info = function () {
                if (!this._quick_info_box) {
                  var t = e.xy,
                    a = (this._quick_info_box = document.createElement("div"));
                  this._waiAria.quickInfoAttr(a),
                    (a.className = "dhx_cal_quick_info"),
                    e.$testmode && (a.className += " dhx_no_animate"),
                    e.config.rtl && (a.className += " dhx_quick_info_rtl");
                  var n = this._waiAria.quickInfoHeaderAttrString(),
                    i =
                      '<div class="dhx_cal_qi_title" style="height:' +
                      t.quick_info_title +
                      'px" ' +
                      n +
                      '><div class="dhx_cal_qi_tcontent"></div><div  class="dhx_cal_qi_tdate"></div></div><div class="dhx_cal_qi_content"></div>';
                  i +=
                    '<div class="dhx_cal_qi_controls" style="height:' +
                    t.quick_info_buttons +
                    'px">';
                  for (var r = e.config.icons_select, o = 0; o < r.length; o++)
                    i +=
                      "<div " +
                      (n = this._waiAria.quickInfoButtonAttrString(
                        this.locale.labels[r[o]]
                      )) +
                      ' class="dhx_qi_big_icon ' +
                      r[o] +
                      '" title="' +
                      e.locale.labels[r[o]] +
                      "\"><div class='dhx_menu_icon " +
                      r[o] +
                      "'></div><div>" +
                      e.locale.labels[r[o]] +
                      "</div></div>";
                  (i += "</div>"),
                    (a.innerHTML = i),
                    e.event(a, "click", function (t) {
                      e._qi_button_click(t.target || t.srcElement);
                    }),
                    e.config.quick_info_detached &&
                      (e._detachDomEvent(
                        e._els.dhx_cal_data[0],
                        "scroll",
                        e._quick_info_onscroll_handler
                      ),
                      e.event(
                        e._els.dhx_cal_data[0],
                        "scroll",
                        e._quick_info_onscroll_handler
                      ));
                }
                return this._quick_info_box;
              }),
              (e._qi_button_click = function (t) {
                var a = e._quick_info_box;
                if (t && t != a) {
                  var n = e._getClassName(t);
                  if (-1 != n.indexOf("_icon")) {
                    var i = e._quick_info_box_id;
                    e._click.buttons[n.split(" ")[1].replace("icon_", "")](i);
                  } else e._qi_button_click(t.parentNode);
                }
              }),
              (e._get_event_counter_part = function (t) {
                for (
                  var a = e.getRenderedEvent(t), n = 0, i = 0, r = a;
                  r && r != e._obj;

                )
                  (n += r.offsetLeft),
                    (i += r.offsetTop - r.scrollTop),
                    (r = r.offsetParent);
                return r
                  ? {
                      left: n,
                      top: i,
                      dx: n + a.offsetWidth / 2 > e._x / 2 ? 1 : 0,
                      dy: i + a.offsetHeight / 2 > e._y / 2 ? 1 : 0,
                      width: a.offsetWidth,
                      height: a.offsetHeight,
                    }
                  : 0;
              }),
              (e._fill_quick_data = function (t) {
                var a = e.getEvent(t),
                  n = e._quick_info_box;
                e._quick_info_box_id = t;
                var i = {
                    content: e.templates.quick_info_title(
                      a.start_date,
                      a.end_date,
                      a
                    ),
                    date: e.templates.quick_info_date(
                      a.start_date,
                      a.end_date,
                      a
                    ),
                  },
                  r = n.firstChild.firstChild;
                (r.innerHTML = i.content),
                  (r.nextSibling.innerHTML = i.date),
                  e._waiAria.quickInfoHeader(n, [i.content, i.date].join(" ")),
                  (n.firstChild.nextSibling.innerHTML =
                    e.templates.quick_info_content(
                      a.start_date,
                      a.end_date,
                      a
                    ));
              });
          },
          readonly: function (e) {
            e.attachEvent("onTemplatesReady", function () {
              var t;
              e.form_blocks.recurring &&
                (t = e.form_blocks.recurring.set_value);
              var a = e.config.buttons_left.slice(),
                n = e.config.buttons_right.slice();
              function i(e, t, a, n) {
                for (
                  var i = t.getElementsByTagName(e),
                    r = a.getElementsByTagName(e),
                    o = r.length - 1;
                  o >= 0;
                  o--
                )
                  if (((a = r[o]), n)) {
                    var s = document.createElement("span");
                    (s.className = "dhx_text_disabled"),
                      (s.innerHTML = n(i[o])),
                      a.parentNode.insertBefore(s, a),
                      a.parentNode.removeChild(a);
                  } else (a.disabled = !0), t.checked && (a.checked = !0);
              }
              e.attachEvent("onBeforeLightbox", function (i) {
                this.config.readonly_form || this.getEvent(i).readonly
                  ? (this.config.readonly_active = !0)
                  : ((this.config.readonly_active = !1),
                    (e.config.buttons_left = a.slice()),
                    (e.config.buttons_right = n.slice()),
                    e.form_blocks.recurring &&
                      (e.form_blocks.recurring.set_value = t));
                var r = this.config.lightbox.sections;
                if (this.config.readonly_active) {
                  for (var o = 0; o < r.length; o++)
                    "recurring" == r[o].type &&
                      this.config.readonly_active &&
                      e.form_blocks.recurring &&
                      (e.form_blocks.recurring.set_value = function (t, a, n) {
                        var i = e.$domHelpers.closest(t, ".dhx_wrap_section");
                        (i.querySelector(".dhx_cal_lsection").display = "none"),
                          (i.querySelector(".dhx_form_repeat").display =
                            "none"),
                          (i.style.display = "none"),
                          e.setLightboxSize();
                      });
                  var s = ["dhx_delete_btn", "dhx_save_btn"],
                    _ = [e.config.buttons_left, e.config.buttons_right];
                  for (o = 0; o < s.length; o++)
                    for (var d = s[o], l = 0; l < _.length; l++) {
                      for (var c = _[l], u = -1, h = 0; h < c.length; h++)
                        if (c[h] == d) {
                          u = h;
                          break;
                        }
                      -1 != u && c.splice(u, 1);
                    }
                }
                return this.resetLightbox(), !0;
              });
              var r = e._fill_lightbox;
              e._fill_lightbox = function () {
                var t = this.getLightbox();
                this.config.readonly_active &&
                  ((t.style.visibility = "hidden"),
                  (t.style.display = "block"));
                var a = r.apply(this, arguments);
                if (
                  (this.config.readonly_active &&
                    ((t.style.visibility = ""), (t.style.display = "none")),
                  this.config.readonly_active)
                ) {
                  var n = this.getLightbox(),
                    s = (this._lightbox_r = n.cloneNode(!0));
                  (s.id = e.uid()),
                    (s.className += " dhx_cal_light_readonly"),
                    i("textarea", n, s, function (e) {
                      return e.value;
                    }),
                    i("input", n, s, !1),
                    i("select", n, s, function (e) {
                      return e.options.length
                        ? e.options[Math.max(e.selectedIndex || 0, 0)].text
                        : "";
                    }),
                    n.parentNode.insertBefore(s, n),
                    o.call(this, s),
                    e._lightbox &&
                      e._lightbox.parentNode.removeChild(e._lightbox),
                    (this._lightbox = s),
                    e.config.drag_lightbox &&
                      (s.firstChild.onmousedown = e._ready_to_dnd),
                    this.setLightboxSize(),
                    (s.onclick = function (t) {
                      var a = t.target,
                        n = e.$domHelpers.closest(a, ".dhx_btn_set");
                      n &&
                        n.querySelector(".dhx_cancel_btn") &&
                        e.cancel_lightbox();
                    }),
                    (s.onkeydown = function (t) {
                      var a = t,
                        n = t.target || t.srcElement,
                        i = n.querySelector("[dhx_button]");
                      switch (
                        (i ||
                          (i = n.parentNode.querySelector(
                            ".dhx_custom_button, .dhx_readonly"
                          )),
                        (t || a).keyCode)
                      ) {
                        case 32:
                          if ((t || a).shiftKey) return;
                          i && i.click && i.click();
                          break;
                        case e.keys.edit_cancel:
                          e.cancel_lightbox();
                      }
                    });
                }
                return a;
              };
              var o = e.showCover;
              e.showCover = function () {
                this.config.readonly_active || o.apply(this, arguments);
              };
              var s = e.hide_lightbox;
              e.hide_lightbox = function () {
                return (
                  this._lightbox_r &&
                    (this._lightbox_r.parentNode.removeChild(this._lightbox_r),
                    (this._lightbox_r = this._lightbox = null)),
                  s.apply(this, arguments)
                );
              };
            });
          },
          recurring: function (e) {
            function t() {
              var t = e.formSection("recurring");
              if ((t || (t = a("recurring")), !t))
                throw new Error(
                  [
                    "Can't locate the Recurring form section.",
                    "Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox ",
                    'and that the recurring control has name "recurring":',
                    "",
                    "scheduler.config.lightbox.sections = [",
                    '\t{name:"recurring", ... }',
                    "];",
                  ].join("\n")
                );
              return t;
            }
            function a(t) {
              for (var a = 0; a < e.config.lightbox.sections.length; a++) {
                var n = e.config.lightbox.sections[a];
                if (n.type === t) return e.formSection(n.name);
              }
              return null;
            }
            function n(e) {
              return new Date(
                e.getFullYear(),
                e.getMonth(),
                e.getDate(),
                e.getHours(),
                e.getMinutes(),
                e.getSeconds(),
                0
              );
            }
            (e.config.occurrence_timestamp_in_utc = !1),
              (e.config.recurring_workdays = [1, 2, 3, 4, 5]),
              (e.form_blocks.recurring = {
                _get_node: function (e) {
                  return (
                    "string" == typeof e && (e = document.getElementById(e)),
                    "none" == e.style.display && (e.style.display = ""),
                    e
                  );
                },
                _outer_html: function (e) {
                  return (
                    e.outerHTML ||
                    (function (e) {
                      var t,
                        a = document.createElement("div");
                      return (
                        a.appendChild(e.cloneNode(!0)),
                        (t = a.innerHTML),
                        (a = null),
                        t
                      );
                    })(e)
                  );
                },
                render: function (t) {
                  if (t.form) {
                    var a = e.form_blocks.recurring,
                      n = a._get_node(t.form),
                      i = a._outer_html(n);
                    return (n.style.display = "none"), i;
                  }
                  var r = e.locale.labels;
                  return (
                    '<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />' +
                    r.repeat_radio_day +
                    '</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>' +
                    r.repeat_radio_week +
                    '</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />' +
                    r.repeat_radio_month +
                    '</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />' +
                    r.repeat_radio_year +
                    '</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>' +
                    r.repeat_radio_day_type +
                    '</label><label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />' +
                    r.repeat_text_day_count +
                    '</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>' +
                    r.repeat_radio_day_type2 +
                    '</label> </div> <div style="display:none;" id="dhx_repeat_week"><label>' +
                    r.repeat_week +
                    '<input class="dhx_repeat_text" type="text" name="week_count" value="1" /></label><span>' +
                    r.repeat_text_week_count +
                    '</span><br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />' +
                    r.day_for_recurring[1] +
                    '</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />' +
                    r.day_for_recurring[4] +
                    '</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />' +
                    r.day_for_recurring[2] +
                    '</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />' +
                    r.day_for_recurring[5] +
                    '</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />' +
                    r.day_for_recurring[3] +
                    '</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />' +
                    r.day_for_recurring[6] +
                    '</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />' +
                    r.day_for_recurring[0] +
                    '</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label class = "dhx_repeat_month_label"><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>' +
                    r.repeat_radio_month_type +
                    '</label><label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />' +
                    r.repeat_text_month_day +
                    '</label><label><input class="dhx_repeat_text" type="text" name="month_count" value="1" />' +
                    r.repeat_text_month_count +
                    '</label><br /> <label class = "dhx_repeat_month_label"><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>' +
                    r.repeat_radio_month_start +
                    '</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><label><select name="month_day2">\t<option value="1" selected >' +
                    e.locale.date.day_full[1] +
                    '<option value="2">' +
                    e.locale.date.day_full[2] +
                    '<option value="3">' +
                    e.locale.date.day_full[3] +
                    '<option value="4">' +
                    e.locale.date.day_full[4] +
                    '<option value="5">' +
                    e.locale.date.day_full[5] +
                    '<option value="6">' +
                    e.locale.date.day_full[6] +
                    '<option value="0">' +
                    e.locale.date.day_full[0] +
                    "</select>" +
                    r.repeat_text_month_count2_before +
                    '</label><label><input class="dhx_repeat_text" type="text" name="month_count2" value="1" />' +
                    r.repeat_text_month_count2_after +
                    '</label><br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label class = "dhx_repeat_year_label"><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>' +
                    r.repeat_radio_day_type +
                    '</label><label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />' +
                    r.repeat_text_year_day +
                    '</label><label><select name="year_month"><option value="0" selected >' +
                    r.month_for_recurring[0] +
                    '<option value="1">' +
                    r.month_for_recurring[1] +
                    '<option value="2">' +
                    r.month_for_recurring[2] +
                    '<option value="3">' +
                    r.month_for_recurring[3] +
                    '<option value="4">' +
                    r.month_for_recurring[4] +
                    '<option value="5">' +
                    r.month_for_recurring[5] +
                    '<option value="6">' +
                    r.month_for_recurring[6] +
                    '<option value="7">' +
                    r.month_for_recurring[7] +
                    '<option value="8">' +
                    r.month_for_recurring[8] +
                    '<option value="9">' +
                    r.month_for_recurring[9] +
                    '<option value="10">' +
                    r.month_for_recurring[10] +
                    '<option value="11">' +
                    r.month_for_recurring[11] +
                    "</select>" +
                    r.select_year_month +
                    '</label><br /> <label class = "dhx_repeat_year_label"><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>' +
                    r.repeat_year_label +
                    '</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >' +
                    e.locale.date.day_full[1] +
                    '<option value="2">' +
                    e.locale.date.day_full[2] +
                    '<option value="3">' +
                    e.locale.date.day_full[3] +
                    '<option value="4">' +
                    e.locale.date.day_full[4] +
                    '<option value="5">' +
                    e.locale.date.day_full[5] +
                    '<option value="6">' +
                    e.locale.date.day_full[6] +
                    '<option value="7">' +
                    e.locale.date.day_full[0] +
                    "</select>" +
                    r.select_year_day2 +
                    '<select name="year_month2"><option value="0" selected >' +
                    r.month_for_recurring[0] +
                    '<option value="1">' +
                    r.month_for_recurring[1] +
                    '<option value="2">' +
                    r.month_for_recurring[2] +
                    '<option value="3">' +
                    r.month_for_recurring[3] +
                    '<option value="4">' +
                    r.month_for_recurring[4] +
                    '<option value="5">' +
                    r.month_for_recurring[5] +
                    '<option value="6">' +
                    r.month_for_recurring[6] +
                    '<option value="7">' +
                    r.month_for_recurring[7] +
                    '<option value="8">' +
                    r.month_for_recurring[8] +
                    '<option value="9">' +
                    r.month_for_recurring[9] +
                    '<option value="10">' +
                    r.month_for_recurring[10] +
                    '<option value="11">' +
                    r.month_for_recurring[11] +
                    '</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>' +
                    r.repeat_radio_end +
                    '</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />' +
                    r.repeat_radio_end2 +
                    '</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />' +
                    r.repeat_text_occurences_count +
                    '<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />' +
                    r.repeat_radio_end3 +
                    '</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="' +
                    e.config.repeat_date_of_end +
                    '" /><br /> </div> </form> </div> <div style="clear:both"> </div>'
                  );
                },
                _ds: {},
                _get_form_node: function (e, t, a) {
                  var n = e[t];
                  if (!n) return null;
                  if (n.nodeName) return n;
                  if (n.length)
                    for (var i = 0; i < n.length; i++)
                      if (n[i].value == a) return n[i];
                },
                _get_node_value: function (e, t, a) {
                  var n = e[t];
                  if (!n) return "";
                  if (n.length) {
                    if (a) {
                      for (var i = [], r = 0; r < n.length; r++)
                        n[r].checked && i.push(n[r].value);
                      return i;
                    }
                    for (r = 0; r < n.length; r++)
                      if (n[r].checked) return n[r].value;
                  }
                  return n.value ? (a ? [n.value] : n.value) : void 0;
                },
                _get_node_numeric_value: function (t, a) {
                  return 1 * e.form_blocks.recurring._get_node_value(t, a) || 0;
                },
                _set_node_value: function (e, t, a) {
                  var n = e[t];
                  if (n)
                    if (n.name == t) n.value = a;
                    else if (n.length)
                      for (var i = "object" == ze(a), r = 0; r < n.length; r++)
                        (i || n[r].value == a) &&
                          (n[r].checked = i ? !!a[n[r].value] : !!a);
                },
                _init_set_value: function (t, a, n) {
                  var i = e.form_blocks.recurring,
                    r = i._get_node_value,
                    o = i._set_node_value;
                  e.form_blocks.recurring._ds = {
                    start: n.start_date,
                    end: n._end_date,
                  };
                  var s = e.date.str_to_date(e.config.repeat_date),
                    _ = function (t) {
                      var a = s(t);
                      return (
                        e.config.include_end_by &&
                          (a = e.date.add(a, 1, "day")),
                        a
                      );
                    },
                    d = e.date.date_to_str(e.config.repeat_date),
                    l = t.getElementsByTagName("FORM")[0],
                    c = {};
                  function u(e) {
                    for (var t = 0; t < e.length; t++) {
                      var a = e[t];
                      if (a.name)
                        if (c[a.name])
                          if (c[a.name].nodeType) {
                            var n = c[a.name];
                            c[a.name] = [n, a];
                          } else c[a.name].push(a);
                        else c[a.name] = a;
                    }
                  }
                  if (
                    (u(l.getElementsByTagName("INPUT")),
                    u(l.getElementsByTagName("SELECT")),
                    !e.config.repeat_date_of_end)
                  ) {
                    var h = e.date.date_to_str(e.config.repeat_date);
                    e.config.repeat_date_of_end = h(
                      e.date.add(e._currentDate(), 30, "day")
                    );
                  }
                  o(c, "date_of_end", e.config.repeat_date_of_end);
                  var f = function (e) {
                    return document.getElementById(e) || { style: {} };
                  };
                  function p() {
                    (f("dhx_repeat_day").style.display = "none"),
                      (f("dhx_repeat_week").style.display = "none"),
                      (f("dhx_repeat_month").style.display = "none"),
                      (f("dhx_repeat_year").style.display = "none"),
                      (f("dhx_repeat_" + this.value).style.display = "block"),
                      e.setLightboxSize();
                  }
                  function v(e, t) {
                    var a = e.end;
                    if (a.length)
                      if (a[0].value && "on" != a[0].value)
                        for (var n = 0; n < a.length; n++)
                          a[n].value == t && (a[n].checked = !0);
                      else {
                        var i = 0;
                        switch (t) {
                          case "no":
                            i = 0;
                            break;
                          case "date_of_end":
                            i = 2;
                            break;
                          default:
                            i = 1;
                        }
                        a[i].checked = !0;
                      }
                    else a.value = t;
                  }
                  e.form_blocks.recurring._get_repeat_code = function (t) {
                    var a = [r(c, "repeat")];
                    for (g[a[0]](a, t); a.length < 5; ) a.push("");
                    var n = "",
                      i = (function (e) {
                        var t = e.end;
                        if (t.length) {
                          for (var a = 0; a < t.length; a++)
                            if (t[a].checked)
                              return t[a].value && "on" != t[a].value
                                ? t[a].value
                                : a
                                ? 2 == a
                                  ? "date_of_end"
                                  : "occurences_count"
                                : "no";
                        } else if (t.value) return t.value;
                        return "no";
                      })(c);
                    return (
                      "no" == i
                        ? ((t.end = new Date(9999, 1, 1)), (n = "no"))
                        : "date_of_end" == i
                        ? (t.end = _(r(c, "date_of_end")))
                        : (e.transpose_type(a.join("_")),
                          (n = Math.max(1, r(c, "occurences_count"))),
                          (t.end =
                            e.date["add_" + a.join("_")](
                              new Date(t.start),
                              n + 0,
                              { start_date: t.start }
                            ) || t.start)),
                      a.join("_") + "#" + n
                    );
                  };
                  var g = {
                      month: function (t, a) {
                        var n = e.form_blocks.recurring._get_node_value,
                          i = e.form_blocks.recurring._get_node_numeric_value;
                        "d" == n(c, "month_type")
                          ? (t.push(Math.max(1, i(c, "month_count"))),
                            a.start.setDate(n(c, "month_day")))
                          : (t.push(Math.max(1, i(c, "month_count2"))),
                            t.push(n(c, "month_day2")),
                            t.push(Math.max(1, i(c, "month_week2"))),
                            e.config.repeat_precise || a.start.setDate(1)),
                          (a._start = !0);
                      },
                      week: function (t, a) {
                        var n = e.form_blocks.recurring._get_node_value,
                          i = e.form_blocks.recurring._get_node_numeric_value;
                        t.push(Math.max(1, i(c, "week_count"))),
                          t.push(""),
                          t.push("");
                        for (
                          var r = [],
                            o = n(c, "week_day", !0),
                            s = a.start.getDay(),
                            _ = !1,
                            d = 0;
                          d < o.length;
                          d++
                        )
                          r.push(o[d]), (_ = _ || o[d] == s);
                        r.length || (r.push(s), (_ = !0)),
                          r.sort(),
                          e.config.repeat_precise
                            ? _ ||
                              (e.transpose_day_week(a.start, r, 1, 7),
                              (a._start = !0))
                            : ((a.start = e.date.week_start(a.start)),
                              (a._start = !0)),
                          t.push(r.join(","));
                      },
                      day: function (t) {
                        var a = e.form_blocks.recurring._get_node_value,
                          n = e.form_blocks.recurring._get_node_numeric_value;
                        "d" == a(c, "day_type")
                          ? t.push(Math.max(1, n(c, "day_count")))
                          : (t.push("week"),
                            t.push(1),
                            t.push(""),
                            t.push(""),
                            t.push(e.config.recurring_workdays.join(",")),
                            t.splice(0, 1));
                      },
                      year: function (t, a) {
                        var n = e.form_blocks.recurring._get_node_value;
                        "d" == n(c, "year_type")
                          ? (t.push("1"),
                            a.start.setMonth(0),
                            a.start.setDate(n(c, "year_day")),
                            a.start.setMonth(n(c, "year_month")))
                          : (t.push("1"),
                            t.push(n(c, "year_day2")),
                            t.push(n(c, "year_week2")),
                            a.start.setDate(1),
                            a.start.setMonth(n(c, "year_month2"))),
                          (a._start = !0);
                      },
                    },
                    m = {
                      week: function (t, a) {
                        var n = e.form_blocks.recurring._set_node_value;
                        n(c, "week_count", t[1]);
                        for (
                          var i = t[4].split(","), r = {}, o = 0;
                          o < i.length;
                          o++
                        )
                          r[i[o]] = !0;
                        n(c, "week_day", r);
                      },
                      month: function (t, a) {
                        var n = e.form_blocks.recurring._set_node_value;
                        "" === t[2]
                          ? (n(c, "month_type", "d"),
                            n(c, "month_count", t[1]),
                            n(c, "month_day", a.start.getDate()))
                          : (n(c, "month_type", "w"),
                            n(c, "month_count2", t[1]),
                            n(c, "month_week2", t[3]),
                            n(c, "month_day2", t[2]));
                      },
                      day: function (t, a) {
                        var n = e.form_blocks.recurring._set_node_value;
                        n(c, "day_type", "d"), n(c, "day_count", t[1]);
                      },
                      year: function (t, a) {
                        var n = e.form_blocks.recurring._set_node_value;
                        "" === t[2]
                          ? (n(c, "year_type", "d"),
                            n(c, "year_day", a.start.getDate()),
                            n(c, "year_month", a.start.getMonth()))
                          : (n(c, "year_type", "w"),
                            n(c, "year_week2", t[3]),
                            n(c, "year_day2", t[2]),
                            n(c, "year_month2", a.start.getMonth()));
                      },
                    };
                  e.form_blocks.recurring._set_repeat_code = function (t, a) {
                    var n = e.form_blocks.recurring._set_node_value,
                      i = t.split("#");
                    switch (((t = i[0].split("_")), m[t[0]](t, a), i[1])) {
                      case "no":
                        v(c, "no");
                        break;
                      case "":
                        v(c, "date_of_end");
                        var r = a.end;
                        e.config.include_end_by &&
                          (r = e.date.add(r, -1, "day")),
                          n(c, "date_of_end", d(r));
                        break;
                      default:
                        v(c, "occurences_count"),
                          n(c, "occurences_count", i[1]);
                    }
                    n(c, "repeat", t[0]);
                    var o = e.form_blocks.recurring._get_form_node(
                      c,
                      "repeat",
                      t[0]
                    );
                    "SELECT" == o.nodeName && o.onchange
                      ? o.onchange()
                      : o.onclick && o.onclick();
                  };
                  for (var y = 0; y < l.elements.length; y++) {
                    var b = l.elements[y];
                    switch (b.name) {
                      case "repeat":
                        "SELECT" == b.nodeName
                          ? (b.onchange = p)
                          : (b.onclick = p);
                    }
                  }
                  e._lightbox._rec_init_done = !0;
                },
                set_value: function (t, a, n) {
                  var i = e.form_blocks.recurring;
                  e._lightbox._rec_init_done || i._init_set_value(t, a, n),
                    (t.open = !n.rec_type),
                    (t.blocked = this._is_modified_occurence(n));
                  var r = i._ds;
                  (r.start = n.start_date),
                    (r.end = n._end_date),
                    i._toggle_block(),
                    a && i._set_repeat_code(a, r);
                },
                get_value: function (t, n) {
                  if (t.open) {
                    var i = e.form_blocks.recurring._ds,
                      r = {};
                    (function () {
                      var t = e.formSection("time");
                      if (
                        (t || (t = a("time")),
                        t || (t = a("calendar_time")),
                        !t)
                      )
                        throw new Error(
                          [
                            "Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.",
                            "You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. ",
                            'In the latter case, make sure the control is named "time":',
                            "",
                            "scheduler.config.lightbox.sections = [",
                            '{name:"time", height:72, type:"YOU CONTROL", map_to:"auto" }];',
                          ].join("\n")
                        );
                      return t;
                    })().getValue(r),
                      (i.start = r.start_date),
                      (n.rec_type =
                        e.form_blocks.recurring._get_repeat_code(i)),
                      i._start
                        ? ((n.start_date = new Date(i.start)),
                          (n._start_date = new Date(i.start)),
                          (i._start = !1))
                        : (n._start_date = null),
                      (n._end_date = i.end),
                      (n.rec_pattern = n.rec_type.split("#")[0]);
                  } else
                    (n.rec_type = n.rec_pattern = ""),
                      (n._end_date = n.end_date);
                  return n.rec_type;
                },
                _get_button: function () {
                  return t().header.firstChild.firstChild;
                },
                _get_form: function () {
                  return t().node;
                },
                open: function () {
                  var t = e.form_blocks.recurring;
                  t._get_form().open || t._toggle_block();
                },
                close: function () {
                  var t = e.form_blocks.recurring;
                  t._get_form().open && t._toggle_block();
                },
                _toggle_block: function () {
                  var t = e.form_blocks.recurring,
                    a = t._get_form(),
                    n = t._get_button();
                  a.open || a.blocked
                    ? ((a.style.height = "0px"),
                      n &&
                        ((n.style.backgroundPosition = "-5px 20px"),
                        (n.nextSibling.innerHTML =
                          e.locale.labels.button_recurring)))
                    : ((a.style.height = "auto"),
                      n &&
                        ((n.style.backgroundPosition = "-5px 0px"),
                        (n.nextSibling.innerHTML =
                          e.locale.labels.button_recurring_open))),
                    (a.open = !a.open),
                    e.setLightboxSize();
                },
                focus: function (e) {},
                button_click: function (t, a, n, i) {
                  e.form_blocks.recurring._get_form().blocked ||
                    e.form_blocks.recurring._toggle_block();
                },
              }),
              (e._rec_markers = {}),
              (e._rec_markers_pull = {}),
              (e._add_rec_marker = function (e, t) {
                (e._pid_time = t),
                  (this._rec_markers[e.id] = e),
                  this._rec_markers_pull[e.event_pid] ||
                    (this._rec_markers_pull[e.event_pid] = {}),
                  (this._rec_markers_pull[e.event_pid][t] = e);
              }),
              (e._get_rec_marker = function (e, t) {
                var a = this._rec_markers_pull[t];
                return a ? a[e] : null;
              }),
              (e._get_rec_markers = function (e) {
                return this._rec_markers_pull[e] || [];
              }),
              (e._rec_temp = []),
              (function () {
                var t = e.addEvent;
                e.addEvent = function (a, i, r, o, s) {
                  var _ = t.apply(this, arguments);
                  if (_ && e.getEvent(_)) {
                    var d = e.getEvent(_);
                    d.start_date && (d.start_date = n(d.start_date)),
                      d.end_date && (d.end_date = n(d.end_date)),
                      this._is_modified_occurence(d) &&
                        e._add_rec_marker(d, 1e3 * d.event_length),
                      d.rec_type && (d.rec_pattern = d.rec_type.split("#")[0]);
                  }
                  return _;
                };
              })(),
              e.attachEvent("onEventIdChange", function (t, a) {
                if (!this._ignore_call) {
                  (this._ignore_call = !0),
                    e._rec_markers[t] &&
                      ((e._rec_markers[a] = e._rec_markers[t]),
                      delete e._rec_markers[t]),
                    e._rec_markers_pull[t] &&
                      ((e._rec_markers_pull[a] = e._rec_markers_pull[t]),
                      delete e._rec_markers_pull[t]);
                  for (var n = 0; n < this._rec_temp.length; n++)
                    (i = this._rec_temp[n]).event_pid == t &&
                      ((i.event_pid = a),
                      this.changeEventId(i.id, a + "#" + i.id.split("#")[1]));
                  for (var n in this._rec_markers) {
                    var i;
                    (i = this._rec_markers[n]).event_pid == t &&
                      ((i.event_pid = a), (i._pid_changed = !0));
                  }
                  var r = e._rec_markers[a];
                  r &&
                    r._pid_changed &&
                    (delete r._pid_changed,
                    setTimeout(function () {
                      e.callEvent("onEventChanged", [a, e.getEvent(a)]);
                    }, 1)),
                    delete this._ignore_call;
                }
              }),
              e.attachEvent("onConfirmedBeforeEventDelete", function (e) {
                var t = this.getEvent(e);
                if (
                  this._is_virtual_event(e) ||
                  (this._is_modified_occurence(t) &&
                    t.rec_type &&
                    "none" != t.rec_type)
                ) {
                  e = e.split("#");
                  var a = this.uid(),
                    n = e[1] ? e[1] : Math.round(t._pid_time / 1e3),
                    i = this._copy_event(t);
                  (i.id = a), (i.event_pid = t.event_pid || e[0]);
                  var r = n;
                  (i.event_length = r),
                    (i.rec_type = i.rec_pattern = "none"),
                    this.addEvent(i),
                    this._add_rec_marker(i, 1e3 * r);
                } else {
                  t.rec_type && this._lightbox_id && this._roll_back_dates(t);
                  var o = this._get_rec_markers(e);
                  for (var s in o)
                    o.hasOwnProperty(s) &&
                      ((e = o[s].id),
                      this.getEvent(e) && this.deleteEvent(e, !0));
                }
                return !0;
              }),
              e.attachEvent("onEventDeleted", function (t, a) {
                !this._is_virtual_event(t) &&
                  this._is_modified_occurence(a) &&
                  (e._events[t] ||
                    ((a.rec_type = a.rec_pattern = "none"),
                    this.setEvent(t, a)));
              }),
              e.attachEvent("onEventChanged", function (e, t) {
                if (this._loading) return !0;
                var a = this.getEvent(e);
                if (this._is_virtual_event(e)) {
                  e = e.split("#");
                  var i = this.uid();
                  this._not_render = !0;
                  var r = this._copy_event(t);
                  (r.id = i), (r.event_pid = e[0]);
                  var o = e[1];
                  (r.event_length = o),
                    (r.rec_type = r.rec_pattern = ""),
                    this._add_rec_marker(r, 1e3 * o),
                    this.addEvent(r),
                    (this._not_render = !1);
                } else {
                  a.start_date && (a.start_date = n(a.start_date)),
                    a.end_date && (a.end_date = n(a.end_date)),
                    a.rec_type && this._lightbox_id && this._roll_back_dates(a);
                  var s = this._get_rec_markers(e);
                  for (var _ in s)
                    s.hasOwnProperty(_) &&
                      (delete this._rec_markers[s[_].id],
                      this.deleteEvent(s[_].id, !0));
                  delete this._rec_markers_pull[e];
                  for (var d = !1, l = 0; l < this._rendered.length; l++)
                    this._rendered[l].getAttribute(
                      this.config.event_attribute
                    ) == e && (d = !0);
                  d || (this._select_id = null);
                }
                return !0;
              }),
              e.attachEvent("onEventAdded", function (e) {
                if (!this._loading) {
                  var t = this.getEvent(e);
                  t.rec_type && !t.event_length && this._roll_back_dates(t);
                }
                return !0;
              }),
              e.attachEvent("onEventSave", function (e, t, a) {
                return (
                  this.getEvent(e).rec_type ||
                    !t.rec_type ||
                    this._is_virtual_event(e) ||
                    (this._select_id = null),
                  !0
                );
              }),
              e.attachEvent("onEventCreated", function (e) {
                var t = this.getEvent(e);
                return (
                  t.rec_type ||
                    (t.rec_type =
                      t.rec_pattern =
                      t.event_length =
                      t.event_pid =
                        ""),
                  !0
                );
              }),
              e.attachEvent("onEventCancel", function (e) {
                var t = this.getEvent(e);
                t.rec_type &&
                  (this._roll_back_dates(t), this.render_view_data());
              }),
              (e._roll_back_dates = function (e) {
                e.start_date && (e.start_date = n(e.start_date)),
                  e.end_date && (e.end_date = n(e.end_date)),
                  (e.event_length = Math.round(
                    (e.end_date.valueOf() - e.start_date.valueOf()) / 1e3
                  )),
                  (e.end_date = e._end_date),
                  e._start_date &&
                    (e.start_date.setMonth(0),
                    e.start_date.setDate(e._start_date.getDate()),
                    e.start_date.setMonth(e._start_date.getMonth()),
                    e.start_date.setFullYear(e._start_date.getFullYear()));
              }),
              (e._is_virtual_event = function (e) {
                return -1 != e.toString().indexOf("#");
              }),
              (e._is_modified_occurence = function (e) {
                return e.event_pid && "0" != e.event_pid;
              }),
              (e._validId = function (e) {
                return !this._is_virtual_event(e);
              }),
              (e.showLightbox_rec = e.showLightbox),
              (e.showLightbox = function (t) {
                var a = this.locale,
                  n = e.config.lightbox_recurring,
                  i = this.getEvent(t),
                  r = i.event_pid,
                  o = this._is_virtual_event(t);
                o && (r = t.split("#")[0]);
                var s = function (t) {
                  var a = e.getEvent(t);
                  return (
                    (a._end_date = a.end_date),
                    (a.end_date = new Date(
                      a.start_date.valueOf() + 1e3 * a.event_length
                    )),
                    e.showLightbox_rec(t)
                  );
                };
                if ((r || 1 * r == 0) && i.rec_type) return s(t);
                if (
                  !r ||
                  "0" === r ||
                  !a.labels.confirm_recurring ||
                  "instance" == n ||
                  ("series" == n && !o)
                )
                  return this.showLightbox_rec(t);
                if ("ask" == n) {
                  var _ = this;
                  e.modalbox({
                    text: a.labels.confirm_recurring,
                    title: a.labels.title_confirm_recurring,
                    width: "500px",
                    position: "middle",
                    buttons: [
                      a.labels.button_edit_series,
                      a.labels.button_edit_occurrence,
                      a.labels.icon_cancel,
                    ],
                    callback: function (e) {
                      switch (+e) {
                        case 0:
                          return s(r);
                        case 1:
                          return _.showLightbox_rec(t);
                        case 2:
                          return;
                      }
                    },
                  });
                } else s(r);
              }),
              (e.get_visible_events_rec = e.get_visible_events),
              (e.get_visible_events = function (e) {
                for (var t = 0; t < this._rec_temp.length; t++)
                  delete this._events[this._rec_temp[t].id];
                this._rec_temp = [];
                var a = this.get_visible_events_rec(e),
                  n = [];
                for (t = 0; t < a.length; t++)
                  a[t].rec_type
                    ? "none" != a[t].rec_pattern && this.repeat_date(a[t], n)
                    : n.push(a[t]);
                return n;
              }),
              (function () {
                var t = e.isOneDayEvent;
                e.isOneDayEvent = function (e) {
                  return !!e.rec_type || t.call(this, e);
                };
                var a = e.updateEvent;
                e.updateEvent = function (t) {
                  var n = e.getEvent(t);
                  n &&
                    n.rec_type &&
                    (n.rec_pattern = (n.rec_type || "").split("#")[0]),
                    n && n.rec_type && !this._is_virtual_event(t)
                      ? e.update_view()
                      : a.call(this, t);
                };
              })(),
              (e.transponse_size = { day: 1, week: 7, month: 1, year: 12 }),
              (e.date.day_week = function (t, a, n) {
                t.setDate(1);
                var i = e.date.month_start(new Date(t)),
                  r = 1 * a + (n = 7 * (n - 1)) - t.getDay() + 1;
                t.setDate(r <= n ? r + 7 : r);
                var o = e.date.month_start(new Date(t));
                return i.valueOf() === o.valueOf();
              }),
              (e.transpose_day_week = function (t, a, n, i, r) {
                for (
                  var o =
                      (t.getDay() || (e.config.start_on_monday ? 7 : 0)) - n,
                    s = 0;
                  s < a.length;
                  s++
                )
                  if (a[s] > o)
                    return t.setDate(t.getDate() + 1 * a[s] - o - (i ? n : r));
                this.transpose_day_week(t, a, n + i, null, n);
              }),
              (e.transpose_type = function (t) {
                var a = "transpose_" + t;
                if (!this.date[a]) {
                  var n = t.split("_"),
                    i = "add_" + t,
                    r = this.transponse_size[n[0]] * n[1];
                  if ("day" == n[0] || "week" == n[0]) {
                    var o = null;
                    if (
                      n[4] &&
                      ((o = n[4].split(",")), e.config.start_on_monday)
                    ) {
                      for (var s = 0; s < o.length; s++) o[s] = 1 * o[s] || 7;
                      o.sort();
                    }
                    (this.date[a] = function (t, a) {
                      var n = Math.floor(
                        (a.valueOf() - t.valueOf()) / (864e5 * r)
                      );
                      return (
                        n > 0 && t.setDate(t.getDate() + n * r),
                        o && e.transpose_day_week(t, o, 1, r),
                        t
                      );
                    }),
                      (this.date[i] = function (t, a) {
                        var n = new Date(t.valueOf());
                        if (o)
                          for (var i = 0; i < a; i++)
                            e.transpose_day_week(n, o, 0, r);
                        else n.setDate(n.getDate() + a * r);
                        return n;
                      });
                  } else
                    ("month" != n[0] && "year" != n[0]) ||
                      ((this.date[a] = function (t, a, n) {
                        var o = Math.ceil(
                          (12 * a.getFullYear() +
                            1 * a.getMonth() +
                            1 -
                            (12 * t.getFullYear() + 1 * t.getMonth() + 1)) /
                            r -
                            1
                        );
                        return (
                          o >= 0 &&
                            (t.setDate(1), t.setMonth(t.getMonth() + o * r)),
                          e.date[i](t, 0, n)
                        );
                      }),
                      (this.date[i] = function (t, a, o, s) {
                        if ((s ? s++ : (s = 1), s > 12)) return null;
                        var _ = new Date(t.valueOf());
                        _.setDate(1), _.setMonth(_.getMonth() + a * r);
                        var d = _.getMonth(),
                          l = _.getFullYear();
                        _.setDate(o.start_date.getDate()),
                          n[3] && e.date.day_week(_, n[2], n[3]);
                        var c = e.config.recurring_overflow_instances;
                        return (
                          _.getMonth() != d &&
                            "none" != c &&
                            (_ =
                              "lastDay" === c
                                ? new Date(
                                    l,
                                    d + 1,
                                    0,
                                    _.getHours(),
                                    _.getMinutes(),
                                    _.getSeconds(),
                                    _.getMilliseconds()
                                  )
                                : e.date[i](
                                    new Date(l, d + 1, 0),
                                    a || 1,
                                    o,
                                    s
                                  )),
                          _
                        );
                      }));
                }
              }),
              (e.repeat_date = function (t, a, n, i, r, o) {
                (i = i || this._min_date), (r = r || this._max_date);
                var s = o || -1,
                  _ = new Date(t.start_date.valueOf()),
                  d = _.getHours(),
                  l = 0;
                for (
                  !t.rec_pattern &&
                    t.rec_type &&
                    (t.rec_pattern = t.rec_type.split("#")[0]),
                    this.transpose_type(t.rec_pattern),
                    _ = e.date["transpose_" + t.rec_pattern](_, i, t);
                  _ &&
                  (_ < t.start_date ||
                    e
                      ._fix_daylight_saving_date(
                        _,
                        i,
                        t,
                        _,
                        new Date(_.valueOf() + 1e3 * t.event_length)
                      )
                      .valueOf() <= i.valueOf() ||
                    _.valueOf() + 1e3 * t.event_length <= i.valueOf());

                )
                  _ = this.date["add_" + t.rec_pattern](_, 1, t);
                for (; _ && _ < r && _ < t.end_date && (s < 0 || l < s); ) {
                  _.setHours(d);
                  var c = e.config.occurrence_timestamp_in_utc
                      ? Date.UTC(
                          _.getFullYear(),
                          _.getMonth(),
                          _.getDate(),
                          _.getHours(),
                          _.getMinutes(),
                          _.getSeconds()
                        )
                      : _.valueOf(),
                    u = this._get_rec_marker(c, t.id);
                  if (u) n && ("none" != u.rec_type && l++, a.push(u));
                  else {
                    var h = new Date(_.valueOf() + 1e3 * t.event_length),
                      f = this._copy_event(t);
                    if (
                      ((f.text = t.text),
                      (f.start_date = _),
                      (f.event_pid = t.id),
                      (f.id = t.id + "#" + Math.round(c / 1e3)),
                      (f.end_date = h),
                      (f.end_date = e._fix_daylight_saving_date(
                        f.start_date,
                        f.end_date,
                        t,
                        _,
                        f.end_date
                      )),
                      (f._timed = this.isOneDayEvent(f)),
                      !f._timed && !this._table_view && !this.config.multi_day)
                    )
                      return;
                    a.push(f),
                      n || ((this._events[f.id] = f), this._rec_temp.push(f)),
                      l++;
                  }
                  _ = this.date["add_" + t.rec_pattern](_, 1, t);
                }
              }),
              (e._fix_daylight_saving_date = function (e, t, a, n, i) {
                var r = e.getTimezoneOffset() - t.getTimezoneOffset();
                return r
                  ? r > 0
                    ? new Date(
                        n.valueOf() + 1e3 * a.event_length - 60 * r * 1e3
                      )
                    : new Date(t.valueOf() - 60 * r * 1e3)
                  : new Date(i.valueOf());
              }),
              (e.getRecDates = function (t, a) {
                var n = "object" == ze(t) ? t : e.getEvent(t),
                  i = [];
                if (((a = a || 100), !n.rec_type))
                  return [{ start_date: n.start_date, end_date: n.end_date }];
                if ("none" == n.rec_type) return [];
                e.repeat_date(n, i, !0, n.start_date, n.end_date, a);
                for (var r = [], o = 0; o < i.length; o++)
                  "none" != i[o].rec_type &&
                    r.push({
                      start_date: i[o].start_date,
                      end_date: i[o].end_date,
                    });
                return r;
              }),
              (e.getEvents = function (e, t) {
                var a = [];
                for (var n in this._events) {
                  var i = this._events[n];
                  if (i && i.start_date < t && i.end_date > e)
                    if (i.rec_pattern) {
                      if ("none" == i.rec_pattern) continue;
                      var r = [];
                      this.repeat_date(i, r, !0, e, t);
                      for (var o = 0; o < r.length; o++)
                        !r[o].rec_pattern &&
                          r[o].start_date < t &&
                          r[o].end_date > e &&
                          !this._rec_markers[r[o].id] &&
                          a.push(r[o]);
                    } else this._is_virtual_event(i.id) || a.push(i);
                }
                return a;
              }),
              (e.config.repeat_date = "%m.%d.%Y"),
              (e.config.lightbox.sections = [
                {
                  name: "description",
                  map_to: "text",
                  type: "textarea",
                  focus: !0,
                },
                {
                  name: "recurring",
                  type: "recurring",
                  map_to: "rec_type",
                  button: "recurring",
                },
                { name: "time", height: 72, type: "time", map_to: "auto" },
              ]),
              (e._copy_dummy = function (e) {
                var t = new Date(this.start_date),
                  a = new Date(this.end_date);
                (this.start_date = t),
                  (this.end_date = a),
                  (this.event_length =
                    this.event_pid =
                    this.rec_pattern =
                    this.rec_type =
                      null);
              }),
              (e.config.include_end_by = !1),
              (e.config.lightbox_recurring = "ask"),
              e.attachEvent("onClearAll", function () {
                (e._rec_markers = {}),
                  (e._rec_markers_pull = {}),
                  (e._rec_temp = []);
              });
          },
          serialize: function (e) {
            var t = $()(e);
            (e.data_attributes = function () {
              var a = [],
                n = e._helpers.formatDate,
                i = t();
              for (var r in i) {
                var o = i[r];
                for (var s in o)
                  "_" != s.substr(0, 1) &&
                    a.push([
                      s,
                      "start_date" == s || "end_date" == s ? n : null,
                    ]);
                break;
              }
              return a;
            }),
              (e.toXML = function (e) {
                var a = [],
                  n = this.data_attributes(),
                  i = t();
                for (var r in i) {
                  var o = i[r];
                  a.push("<event>");
                  for (var s = 0; s < n.length; s++)
                    a.push(
                      "<" +
                        n[s][0] +
                        "><![CDATA[" +
                        (n[s][1] ? n[s][1](o[n[s][0]]) : o[n[s][0]]) +
                        "]]></" +
                        n[s][0] +
                        ">"
                    );
                  a.push("</event>");
                }
                return (e || "") + "<data>" + a.join("\n") + "</data>";
              }),
              (e._serialize_json_value = function (e) {
                return (
                  null === e || "boolean" == typeof e
                    ? (e = "" + e)
                    : (e || 0 === e || (e = ""),
                      (e =
                        '"' +
                        e
                          .toString()
                          .replace(/\n/g, "")
                          .replace(/\\/g, "\\\\")
                          .replace(/"/g, '\\"') +
                        '"')),
                  e
                );
              }),
              (e.toJSON = function () {
                return JSON.stringify(this.serialize());
              }),
              (e.toICal = function (a) {
                var n = e.date.date_to_str("%Y%m%dT%H%i%s"),
                  i = e.date.date_to_str("%Y%m%d"),
                  r = [],
                  o = t();
                for (var s in o) {
                  var _ = o[s];
                  r.push("BEGIN:VEVENT"),
                    _._timed &&
                    (_.start_date.getHours() || _.start_date.getMinutes())
                      ? r.push("DTSTART:" + n(_.start_date))
                      : r.push("DTSTART:" + i(_.start_date)),
                    _._timed &&
                    (_.end_date.getHours() || _.end_date.getMinutes())
                      ? r.push("DTEND:" + n(_.end_date))
                      : r.push("DTEND:" + i(_.end_date)),
                    r.push("SUMMARY:" + _.text),
                    r.push("END:VEVENT");
                }
                return (
                  "BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\nDESCRIPTION:" +
                  (a || "") +
                  "\n" +
                  r.join("\n") +
                  "\nEND:VCALENDAR"
                );
              });
          },
          timeline: function (e) {
            Te("Timeline", e.assert);
          },
          tooltip: function (e) {
            var t = {};
            (e.ext.tooltip = e.dhtmlXTooltip = e.tooltip = t),
              (t.config = {
                className: "dhtmlXTooltip scheduler_tooltip tooltip",
                timeout_to_display: 50,
                timeout_to_hide: 50,
                delta_x: 15,
                delta_y: -20,
              }),
              (t.tooltip = document.createElement("div")),
              (t.tooltip.className = t.config.className),
              e._waiAria.tooltipAttr(t.tooltip),
              (t.show = function (a, n) {
                if (!this._mobile || e.config.touch_tooltip) {
                  var i = t,
                    r = this.tooltip,
                    o = r.style;
                  i.tooltip.className = i.config.className;
                  var s = this.position(a),
                    _ = a.target || a.srcElement;
                  if (!this.isTooltip(_)) {
                    var d = s.x + (i.config.delta_x || 0),
                      l = s.y - (i.config.delta_y || 0);
                    (o.visibility = "hidden"),
                      o.removeAttribute
                        ? (o.removeAttribute("right"),
                          o.removeAttribute("bottom"))
                        : (o.removeProperty("right"),
                          o.removeProperty("bottom")),
                      (o.left = "0"),
                      (o.top = "0"),
                      e.config.rtl && (r.className += " dhtmlXTooltip_rtl"),
                      (this.tooltip.innerHTML = n),
                      document.body.appendChild(this.tooltip);
                    var c = this.tooltip.offsetWidth,
                      u = this.tooltip.offsetHeight;
                    document.documentElement.clientWidth - d - c < 0
                      ? (o.removeAttribute
                          ? o.removeAttribute("left")
                          : o.removeProperty("left"),
                        (o.right =
                          document.documentElement.clientWidth -
                          d +
                          2 * (i.config.delta_x || 0) +
                          "px"))
                      : (o.left =
                          d < 0
                            ? s.x + Math.abs(i.config.delta_x || 0) + "px"
                            : d + "px"),
                      document.documentElement.clientHeight - l - u < 0
                        ? (o.removeAttribute
                            ? o.removeAttribute("top")
                            : o.removeProperty("top"),
                          (o.bottom =
                            document.documentElement.clientHeight -
                            l -
                            2 * (i.config.delta_y || 0) +
                            "px"))
                        : (o.top =
                            l < 0
                              ? s.y + Math.abs(i.config.delta_y || 0) + "px"
                              : l + "px"),
                      e._waiAria.tooltipVisibleAttr(this.tooltip),
                      (o.visibility = "visible"),
                      (this.tooltip.onmouseleave = function (t) {
                        for (
                          var a = e.dhtmlXTooltip, n = t.relatedTarget;
                          n != e._obj && n;

                        )
                          n = n.parentNode;
                        n != e._obj &&
                          a.delay(a.hide, a, [], a.config.timeout_to_hide);
                      }),
                      e.callEvent("onTooltipDisplayed", [
                        this.tooltip,
                        this.tooltip.event_id,
                      ]);
                  }
                }
              }),
              (t._clearTimeout = function () {
                this.tooltip._timeout_id &&
                  clearTimeout(this.tooltip._timeout_id);
              }),
              (t.hide = function () {
                if (this.tooltip.parentNode) {
                  e._waiAria.tooltipHiddenAttr(this.tooltip);
                  var t = this.tooltip.event_id;
                  (this.tooltip.event_id = null),
                    (this.tooltip.onmouseleave = null),
                    this.tooltip.parentNode.removeChild(this.tooltip),
                    e.callEvent("onAfterTooltip", [t]);
                }
                this._clearTimeout();
              }),
              (t.delay = function (e, t, a, n) {
                this._clearTimeout(),
                  (this.tooltip._timeout_id = setTimeout(function () {
                    var n = e.apply(t, a);
                    return (e = t = a = null), n;
                  }, n || this.config.timeout_to_display));
              }),
              (t.isTooltip = function (e) {
                for (var t = !1; e && !t; )
                  (t = e.className == this.tooltip.className),
                    (e = e.parentNode);
                return t;
              }),
              (t.position = function (e) {
                return { x: e.clientX, y: e.clientY };
              }),
              e.attachEvent("onMouseMove", function (a, n) {
                var i = n.target || n.srcElement,
                  r = t,
                  o = r.isTooltip(i),
                  s = r.isTooltipTarget && r.isTooltipTarget(i);
                if ((a && e.getState().editor_id != a) || o || s) {
                  var _, d;
                  if (a || r.tooltip.event_id) {
                    var l = e.getEvent(a) || e.getEvent(r.tooltip.event_id);
                    if (!l) return;
                    if (
                      ((r.tooltip.event_id = l.id),
                      !(_ = e.templates.tooltip_text(
                        l.start_date,
                        l.end_date,
                        l
                      )))
                    )
                      return r.hide();
                  }
                  if ((s && (_ = ""), e.$env.isIE))
                    for (var c in (d = {
                      pageX: void 0,
                      pageY: void 0,
                      clientX: void 0,
                      clientY: void 0,
                      target: void 0,
                      srcElement: void 0,
                    }))
                      d[c] = n[c];
                  if (!e.callEvent("onBeforeTooltip", [a]) || !_) return;
                  r.delay(r.show, r, [d || n, _]);
                } else r.delay(r.hide, r, [], r.config.timeout_to_hide);
              }),
              e.attachEvent("onBeforeDrag", function () {
                return t.hide(), !0;
              }),
              e.attachEvent("onEventDeleted", function () {
                return t.hide(), !0;
              });
          },
          treetimeline: function (e) {
            Te("Tree Timeline", e.assert);
          },
          units: function (e) {
            Te("Units", e.assert);
          },
          url: function (e) {
            (e._get_url_nav = function () {
              for (
                var e = {},
                  t = (document.location.hash || "")
                    .replace("#", "")
                    .split(","),
                  a = 0;
                a < t.length;
                a++
              ) {
                var n = t[a].split("=");
                2 == n.length && (e[n[0]] = n[1]);
              }
              return e;
            }),
              e.attachEvent("onTemplatesReady", function () {
                var t = !0,
                  a = e.date.str_to_date("%Y-%m-%d"),
                  n = e.date.date_to_str("%Y-%m-%d"),
                  i = e._get_url_nav().event || null;
                function r(t) {
                  (i = t), e.getEvent(t) && e.showEvent(t);
                }
                e.attachEvent("onAfterEventDisplay", function (e) {
                  return (i = null), !0;
                }),
                  e.attachEvent("onBeforeViewChange", function (o, s, _, d) {
                    if (t) {
                      t = !1;
                      var l = e._get_url_nav();
                      if (l.event)
                        try {
                          if (e.getEvent(l.event))
                            return (
                              setTimeout(function () {
                                r(l.event);
                              }),
                              !1
                            );
                          var c = e.attachEvent("onXLE", function () {
                            setTimeout(function () {
                              r(l.event);
                            }),
                              e.detachEvent(c);
                          });
                        } catch (e) {}
                      if (l.date || l.mode) {
                        try {
                          this.setCurrentView(
                            l.date ? a(l.date) : null,
                            l.mode || null
                          );
                        } catch (e) {
                          this.setCurrentView(l.date ? a(l.date) : null, _);
                        }
                        return !1;
                      }
                    }
                    var u = ["date=" + n(d || s), "mode=" + (_ || o)];
                    i && u.push("event=" + i);
                    var h = "#" + u.join(",");
                    return (document.location.hash = h), !0;
                  });
              });
          },
          week_agenda: function (e) {
            Te("Week Agenda", e.assert);
          },
          wp: function (e) {
            e.attachEvent("onLightBox", function () {
              if (this._cover)
                try {
                  this._cover.style.height = this.expanded
                    ? "100%"
                    : (document.body.parentNode || document.body).scrollHeight +
                      "px";
                } catch (e) {}
            }),
              (e.form_blocks.select.set_value = function (e, t, a) {
                (void 0 !== t && "" !== t) ||
                  (t = (e.firstChild.options[0] || {}).value),
                  (e.firstChild.value = t || "");
              });
          },
          year_view: function (e) {
            (e.config.year_x = 4),
              (e.config.year_y = 3),
              (e.xy.year_top = 0),
              (e.templates.year_date = function (t) {
                return e.date.date_to_str(e.locale.labels.year_tab + " %Y")(t);
              }),
              (e.templates.year_month = e.date.date_to_str("%F")),
              (e.templates.year_scale_date = e.date.date_to_str("%D")),
              (e.templates.year_tooltip = function (e, t, a) {
                return a.text;
              });
            var t = function () {
              return "year" == e._mode;
            };
            e.dblclick_dhx_month_head = function (a) {
              if (t()) {
                var n = a.target || a.srcElement,
                  i = e._getClassName(n.parentNode);
                if (
                  -1 != i.indexOf("dhx_before") ||
                  -1 != i.indexOf("dhx_after")
                )
                  return !1;
                for (
                  var r = n;
                  r && (!r.hasAttribute || !r.hasAttribute("date"));

                )
                  r = r.parentNode;
                if (r) {
                  var o = this._helpers.parseDate(r.getAttribute("date"));
                  o.setDate(parseInt(n.innerHTML, 10));
                  var s = this.date.add(o, 1, "day");
                  !this.config.readonly &&
                    this.config.dblclick_create &&
                    this.addEventNow(o.valueOf(), s.valueOf(), a);
                }
              }
            };
            var a = e.changeEventId;
            e.changeEventId = function () {
              a.apply(this, arguments), t() && this.year_view(!0);
            };
            var n = e.render_data,
              i = e.date.date_to_str("%Y/%m/%d"),
              r = e.date.str_to_date("%Y/%m/%d");
            e.render_data = function (e) {
              if (!t()) return n.apply(this, arguments);
              for (var a = 0; a < e.length; a++) this._year_render_event(e[a]);
            };
            var o = e.clear_view;
            (e.clear_view = function () {
              if (!t()) return o.apply(this, arguments);
              var a = e._year_marked_cells,
                n = null;
              for (var i in a)
                a.hasOwnProperty(i) &&
                  (((n = a[i]).className = "dhx_month_head"),
                  n.removeAttribute("date"));
              e._year_marked_cells = {};
            }),
              (e._hideToolTip = function () {
                this._tooltip &&
                  ((this._tooltip.style.display = "none"),
                  (this._tooltip.date = new Date(9999, 1, 1)));
              }),
              (e._showToolTip = function (t, a, n, i) {
                if (this._tooltip) {
                  if (this._tooltip.date.valueOf() == t.valueOf()) return;
                  this._tooltip.innerHTML = "";
                } else {
                  var r = (this._tooltip = document.createElement("div"));
                  (r.className = "dhx_year_tooltip"),
                    this.config.rtl && (r.className += " dhx_tooltip_rtl"),
                    document.body.appendChild(r),
                    (r.onclick = e._click.dhx_cal_data);
                }
                for (
                  var o = this.getEvents(t, this.date.add(t, 1, "day")),
                    s = "",
                    _ = 0;
                  _ < o.length;
                  _++
                ) {
                  var d = o[_];
                  if (this.filter_event(d.id, d)) {
                    var l = d.color ? "background:" + d.color + ";" : "",
                      c = d.textColor ? "color:" + d.textColor + ";" : "";
                    (s +=
                      "<div class='dhx_tooltip_line' style='" +
                      l +
                      c +
                      "' event_id='" +
                      o[_].id +
                      "' " +
                      this.config.event_attribute +
                      "='" +
                      o[_].id +
                      "'>"),
                      (s +=
                        "<div class='dhx_tooltip_date' style='" +
                        l +
                        c +
                        "'>" +
                        (o[_]._timed
                          ? this.templates.event_date(o[_].start_date)
                          : "") +
                        "</div>"),
                      (s +=
                        "<div class='dhx_event_icon icon_details'>&nbsp;</div>"),
                      (s +=
                        this.templates.year_tooltip(
                          o[_].start_date,
                          o[_].end_date,
                          o[_]
                        ) + "</div>");
                  }
                }
                (this._tooltip.style.display = ""),
                  (this._tooltip.style.top = "0px"),
                  document.body.offsetWidth -
                    a.left -
                    this._tooltip.offsetWidth <
                  0
                    ? (this._tooltip.style.left =
                        a.left - this._tooltip.offsetWidth + "px")
                    : (this._tooltip.style.left =
                        a.left + i.offsetWidth + "px"),
                  (this._tooltip.date = t),
                  (this._tooltip.innerHTML = s),
                  document.body.offsetHeight -
                    a.top -
                    this._tooltip.offsetHeight <
                  0
                    ? (this._tooltip.style.top =
                        a.top -
                        this._tooltip.offsetHeight +
                        i.offsetHeight +
                        "px")
                    : (this._tooltip.style.top = a.top + "px");
              }),
              (e._year_view_tooltip_handler = function (a) {
                if (t()) {
                  var n = a.target || a.srcElement;
                  "a" == n.tagName.toLowerCase() && (n = n.parentNode),
                    -1 != e._getClassName(n).indexOf("dhx_year_event")
                      ? e._showToolTip(
                          r(n.getAttribute("date")),
                          e.$domHelpers.getOffset(n),
                          a,
                          n
                        )
                      : e._hideToolTip();
                }
              }),
              (e._init_year_tooltip = function () {
                e._detachDomEvent(
                  e._els.dhx_cal_data[0],
                  "mouseover",
                  e._year_view_tooltip_handler
                ),
                  e.event(
                    e._els.dhx_cal_data[0],
                    "mouseover",
                    e._year_view_tooltip_handler
                  );
              }),
              (e._get_year_cell = function (e) {
                var t =
                    e.getMonth() +
                    12 * (e.getFullYear() - this._min_date.getFullYear()) -
                    this.week_starts._month,
                  a = this._els.dhx_cal_data[0].childNodes[t],
                  n = this.week_starts[t] + e.getDate() - 1;
                return a
                  .querySelectorAll(".dhx_year_body tr")
                  [Math.floor(n / 7)].querySelectorAll("td")
                  [n % 7].querySelector(".dhx_month_head");
              }),
              (e._year_marked_cells = {}),
              (e._mark_year_date = function (t, a) {
                var n = i(t),
                  r = this._get_year_cell(t);
                if (r) {
                  var o = this.templates.event_class(
                    a.start_date,
                    a.end_date,
                    a
                  );
                  e._year_marked_cells[n] ||
                    ((r.className = "dhx_month_head dhx_year_event"),
                    r.setAttribute("date", n),
                    (e._year_marked_cells[n] = r)),
                    (r.className += o ? " " + o : "");
                }
              }),
              (e._unmark_year_date = function (e) {
                var t = this._get_year_cell(e);
                t && (t.className = "dhx_month_head");
              }),
              (e._year_render_event = function (e) {
                var t = e.start_date;
                for (
                  t =
                    t.valueOf() < this._min_date.valueOf()
                      ? this._min_date
                      : this.date.date_part(new Date(t));
                  t < e.end_date;

                )
                  if (
                    (this._mark_year_date(t, e),
                    (t = this.date.add(t, 1, "day")).valueOf() >=
                      this._max_date.valueOf())
                  )
                    return;
              }),
              (e.year_view = function (t) {
                var a;
                if (
                  (t && ((a = e.xy.scale_height), (e.xy.scale_height = -1)),
                  (e._els.dhx_cal_header[0].style.display = t ? "none" : ""),
                  e.set_sizes(),
                  t && (e.xy.scale_height = a),
                  (e._table_view = t),
                  !this._load_mode || !this._load())
                )
                  if (t) {
                    if (
                      (e._init_year_tooltip(),
                      e._reset_year_scale(),
                      e._load_mode && e._load())
                    )
                      return void (e._render_wait = !0);
                    e.render_view_data();
                  } else e._hideToolTip();
              }),
              (e._reset_year_scale = function () {
                (this._cols = []), (this._colsS = {});
                var t = [],
                  a = this._els.dhx_cal_data[0],
                  n = this.config;
                (a.scrollTop = 0), (a.innerHTML = "");
                var i = Math.floor(parseInt(a.style.width) / n.year_x),
                  r = Math.floor(
                    (parseInt(a.style.height) - e.xy.year_top) / n.year_y
                  );
                r < 190 &&
                  ((r = 190),
                  (i = Math.floor(
                    (parseInt(a.style.width) - e.xy.scroll_width) / n.year_x
                  )));
                var o = i - 11,
                  s = 0,
                  _ = document.createElement("div"),
                  d = this.date.week_start(e._currentDate());
                this._process_ignores(d, 7, "day", 1);
                for (
                  var l = 7 - (this._ignores_detected || 0), c = 0, u = 0;
                  u < 7;
                  u++
                )
                  (this._ignores && this._ignores[u]) ||
                    ((this._cols[u] = Math.floor(o / (l - c))),
                    this._render_x_header(u, s, d, _),
                    (o -= this._cols[u]),
                    (s += this._cols[u]),
                    c++),
                    (d = this.date.add(d, 1, "day"));
                for (
                  _.lastChild.className += " dhx_scale_bar_last", u = 0;
                  u < _.childNodes.length;
                  u++
                )
                  this._waiAria.yearHeadCell(_.childNodes[u]);
                var h = this.date[this._mode + "_start"](
                    this.date.copy(this._date)
                  ),
                  f = h,
                  p = null;
                for (u = 0; u < n.year_y; u++)
                  for (var v = 0; v < n.year_x; v++) {
                    ((p = document.createElement("div")).className =
                      "dhx_year_box"),
                      (p.style.cssText = "position:absolute;"),
                      p.setAttribute("date", this._helpers.formatDate(h)),
                      (p.innerHTML =
                        "<div class='dhx_year_month'></div><div class='dhx_year_grid'><div class='dhx_year_week'>" +
                        _.innerHTML +
                        "</div><div class='dhx_year_body'></div></div>");
                    var g = p.querySelector(".dhx_year_month"),
                      m = p.querySelector(".dhx_year_grid"),
                      y = p.querySelector(".dhx_year_week"),
                      b = p.querySelector(".dhx_year_body"),
                      x = e.uid();
                    this._waiAria.yearHeader(g, x),
                      this._waiAria.yearGrid(m, x),
                      (g.innerHTML = this.templates.year_month(h));
                    var k = this.date.week_start(h);
                    this._reset_month_scale(b, h, k, 6);
                    for (
                      var w = b.querySelectorAll("td"), E = 0;
                      E < w.length;
                      E++
                    )
                      this._waiAria.yearDayCell(w[E]);
                    a.appendChild(p),
                      (y.style.height = y.childNodes[0].offsetHeight + "px");
                    var S = Math.round((r - 190) / 2);
                    (p.style.marginTop = S + "px"),
                      this.set_xy(
                        p,
                        i - 10,
                        r - S - 10,
                        i * v + 5,
                        r * u + 5 + e.xy.year_top
                      ),
                      (t[u * n.year_x + v] =
                        (h.getDay() -
                          (this.config.start_on_monday ? 1 : 0) +
                          7) %
                        7),
                      (h = this.date.add(h, 1, "month"));
                  }
                var D = this._getNavDateElement();
                D &&
                  (D.innerHTML = this.templates[this._mode + "_date"](
                    f,
                    h,
                    this._mode
                  )),
                  (this.week_starts = t),
                  (t._month = f.getMonth()),
                  (this._min_date = f),
                  (this._max_date = h);
              });
            var s = e.getActionData;
            (e.getActionData = function (a) {
              if (!t()) return s.apply(e, arguments);
              var n = a.target,
                i = e._get_year_month_date(n),
                r = e._get_year_month_cell(n),
                o = e._get_year_day_indexes(r);
              return (
                o && i
                  ? ((i = e.date.add(i, o.week, "week")),
                    (i = e.date.add(i, o.day, "day")))
                  : (i = null),
                { date: i, section: null }
              );
            }),
              (e._get_year_day_indexes = function (t) {
                var a = e._get_year_el_node(t, this._locate_year_month_table);
                if (!a) return null;
                for (
                  var n = 0, i = 0, r = ((n = 0), a.rows.length);
                  n < r;
                  n++
                ) {
                  for (
                    var o = a.rows[n].getElementsByTagName("td"),
                      s = ((i = 0), o.length);
                    i < s && o[i] != t;
                    i++
                  );
                  if (i < s) break;
                }
                return n < r ? { day: i, week: n } : null;
              }),
              (e._get_year_month_date = function (t) {
                if (!(t = e._get_year_el_node(t, e._locate_year_month_root)))
                  return null;
                var a = t.getAttribute("date");
                return a ? e.date.week_start(e.date.month_start(r(a))) : null;
              }),
              (e._locate_year_month_day = function (t) {
                return (
                  -1 != e._getClassName(t).indexOf("dhx_year_event") &&
                  t.hasAttribute &&
                  t.hasAttribute("date")
                );
              });
            var _ = e._locate_event;
            (e._locate_event = function (t) {
              var a = _.apply(e, arguments);
              if (!a) {
                var n = e._get_year_el_node(t, e._locate_year_month_day);
                if (!n || !n.hasAttribute("date")) return null;
                var i = r(n.getAttribute("date")),
                  o = e.getEvents(i, e.date.add(i, 1, "day"));
                if (!o.length) return null;
                a = o[0].id;
              }
              return a;
            }),
              (e._locate_year_month_cell = function (e) {
                return "td" == e.nodeName.toLowerCase();
              }),
              (e._locate_year_month_table = function (e) {
                return "table" == e.nodeName.toLowerCase();
              }),
              (e._locate_year_month_root = function (e) {
                return e.hasAttribute && e.hasAttribute("date");
              }),
              (e._get_year_month_cell = function (e) {
                return this._get_year_el_node(e, this._locate_year_month_cell);
              }),
              (e._get_year_month_table = function (e) {
                return this._get_year_el_node(e, this._locate_year_month_table);
              }),
              (e._get_year_month_root = function (e) {
                return this._get_year_el_node(
                  this._get_year_month_table(e),
                  this._locate_year_month_root
                );
              }),
              (e._get_year_el_node = function (e, t) {
                for (; e && !t(e); ) e = e.parentNode;
                return e;
              });
          },
        }),
        Fe = $e.getSchedulerInstance(),
        Ie = { plugin: Fe.bind($e.plugin, $e) };
      (window.scheduler = Fe), (window.Scheduler = Ie);
      t.default = Fe;
    },
  ]);
});
//# sourceMappingURL=dhtmlxscheduler.js.map
