979 |       }
  980 |     }
  981 |   }), this.attachEvent("onDestroy", function () {
> 982 |     e.destroy();
      | ^  983 |   }), this._initStaticBackgroundRender = function () {});
  984 | },
  985 | _clearLayers: function _clearLayers(t) {  491 |   i = function i() {
  492 | for (var i = !0, n = 0; n < e.length; n++) {
  493 |   if (e[n]) {
> 494 |     var r = e[n].apply(t, arguments);
      | ^  495 |     i = i && r;
  496 |   }
  497 | }  515 | }, t.callEvent = function (t, i, n) {
  516 |   if (e._silent_mode) return !0;
  517 |   var r = "ev_" + t.toLowerCase();
> 518 |   return e.ev_listen_all && e.ev_listen_all.apply(n || this, [t].concat(i)), !e[r] || e[r].apply(n || this, i);
      | ^  519 | }, t.checkEvent = function (t) {
  520 |   return !!e["ev_" + t.toLowerCase()];
  521 | }, t.detachEvent = function (t) {  1152 |     },
  1153 |     destructor: function destructor() {
  1154 |       var t = this.$gantt;
> 1155 |       this._clearLayers(t), this.$task = null, this.$task_scale = null, this.$task_data = null, this.$task_bg = null, this.$task_links = null, this.$task_bars = null, this.$gantt = null, this.$config.rowStore && (this.$config.rowStore.detachEvent(this._staticBgHandler), this.$config.rowStore = null), this.$config.linkStore && (this.$config.linkStore = null), this.callEvent("onDestroy", []), this.detachAllEvents();
       | ^  1156 |     }
  1157 |   }, a.mixin(l.prototype, o()), t.exports = l;
  1158 | }, function (t, e) {  9964 | }, e.prototype.clear = function () {
  9965 |   if (this.$initialized = !1, this.$content) {
  9966 |     var e = this.$content.unload || this.$content.destructor;
> 9967 |     e && e.call(this.$content);
       | ^  9968 |   }
  9969 | 
  9970 |   t.prototype.clear.call(this);  9960 | }
  9961 | 
  9962 | return n(e, t), e.prototype.destructor = function () {
> 9963 |   this.clear(), t.prototype.destructor.call(this);
       | ^  9964 | }, e.prototype.clear = function () {
  9965 |   if (this.$initialized = !1, this.$content) {
  9966 |     var e = this.$content.unload || this.$content.destructor;  2283 | this.$container && this.$view && r.removeNode(this.$view);
  2284 | 
  2285 | for (var e = 0; e < this.$cells.length; e++) {
> 2286 |   this.$cells[e].destructor();
       | ^  2287 | }
  2288 | 
  2289 | this.$cells = [], t.prototype.destructor.call(this);  2283 | this.$container && this.$view && r.removeNode(this.$view);
  2284 | 
  2285 | for (var e = 0; e < this.$cells.length; e++) {
> 2286 |   this.$cells[e].destructor();
       | ^  2287 | }
  2288 | 
  2289 | this.$cells = [], t.prototype.destructor.call(this);  2715 |     this.$container && this.$container.parentNode && (this.$container.parentNode.removeChild(this.$container), this.$container = null), this.$layout && this.$layout.clear(), this._reinit(t);
  2716 |   }, this._reinit(t);
  2717 | }, t._reinit = function (i) {
> 2718 |   this.callEvent("onBeforeGanttReady", []), this.$mouseEvents.reset(), this.resetLightbox(), this._update_flags(), this.$services.getService("templateLoader").initTemplates(this), this._clearTaskLayers(), this._clearLinkLayers(), this.$layout && (this.$layout.destructor(), this.$ui.reset()), this.$root = n.toNode(i), this.$root && (this.$root.innerHTML = ""), this.$root.gantt = this, e(this), this.config.layout.id = "main", this.$layout = this.$ui.createView("layout", i, this.config.layout), this.$layout.attachEvent("onBeforeResize", function () {
       | ^  2719 |     for (var e = t.$services.getService("datastores"), i = 0; i < e.length; i++) {
  2720 |       t.getDatastore(e[i]).filter();
  2721 |     }  2712 | 
  2713 | t.assert = i(30)(t), t.init = function (t, e, i) {
  2714 |   e && i && (this.config.start_date = this._min_date = new Date(e), this.config.end_date = this._max_date = new Date(i)), this.date.init(), this.config.scroll_size || (this.config.scroll_size = n.getScrollSize() || 1), this.init = function (t) {
> 2715 |     this.$container && this.$container.parentNode && (this.$container.parentNode.removeChild(this.$container), this.$container = null), this.$layout && this.$layout.clear(), this._reinit(t);
       | ^  2716 |   }, this._reinit(t);
  2717 | }, t._reinit = function (i) {
  2718 |   this.callEvent("onBeforeGanttReady", []), this.$mouseEvents.reset(), this.resetLightbox(), this._update_flags(), this.$services.getService("templateLoader").initTemplates(this), this._clearTaskLayers(), this._clearLinkLayers(), this.$layout && (this.$layout.destructor(), this.$ui.reset()), this.$root = n.toNode(i), this.$root && (this.$root.innerHTML = ""), this.$root.gantt = this, e(this), this.config.layout.id = "main", this.$layout = this.$ui.createView("layout", i, this.config.layout), this.$layout.attachEvent("onBeforeResize", function () {  111 |   gantt.config.readonly = true;
  112 |   gantt.config.duration_unit = TimelineConfig.durationUnit;
  113 | 
> 114 |   gantt.init('gantt');
      | ^  115 | }, []);
  116 | 
  117 | useEffect(() => {