(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[31],{

/***/ "../dashboard/lib/model/List.js":
/*!**************************************!*\
  !*** ../dashboard/lib/model/List.js ***!
  \**************************************/
/*! exports provided: default, List */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return List; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "List", function() { return List; });
/* harmony import */ var _Stack__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Stack */ "../dashboard/lib/model/Stack.js");
/* harmony import */ var _ComponentTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ComponentTypes */ "../dashboard/lib/model/ComponentTypes.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


var List = /** @class */ (function (_super) {
    __extends(List, _super);
    function List() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Object.defineProperty(List.prototype, "type", {
        get: function () {
            return _ComponentTypes__WEBPACK_IMPORTED_MODULE_1__["list"];
        },
        enumerable: true,
        configurable: true
    });
    return List;
}(_Stack__WEBPACK_IMPORTED_MODULE_0__["Stack"]));



/***/ }),

/***/ "../dashboard/lib/model/Stack.js":
/*!***************************************!*\
  !*** ../dashboard/lib/model/Stack.js ***!
  \***************************************/
/*! exports provided: Stack */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Stack", function() { return Stack; });
/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ "../../node_modules/mobx/lib/mobx.module.js");
/* harmony import */ var _Component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Component */ "../dashboard/lib/model/Component.js");
/* harmony import */ var _Window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Window */ "../dashboard/lib/model/Window.js");
/* harmony import */ var _twii_common_lib_LangUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @twii/common/lib/LangUtils */ "../common/lib/LangUtils.js");
/* harmony import */ var _twii_common_lib_LangUtils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_twii_common_lib_LangUtils__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _ComponentTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ComponentTypes */ "../dashboard/lib/model/ComponentTypes.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





/**
 * Stack - a bunch/stack of windows
 */
var Stack = /** @class */ (function (_super) {
    __extends(Stack, _super);
    function Stack() {
        var _this = _super.call(this) || this;
        _this._closeDisabled = false;
        _this.windows = [];
        _this._onResize = function () {
            _this.notifyResizeWindows();
        };
        _this._replaceWithListModuleLoaded = function (m) {
            var active = _this.active;
            var list = new m.List();
            list.setCloseDisabled(_this._closeDisabled);
            _this.parent.replace(list, _this);
            while (_this.windows.length > 0) {
                list.add(_this.windows[0], false);
            }
            list.setActive(active);
            if (active) {
                list.setPendingScrollTo(active);
            }
        };
        _this.addEventListener("resize", _this._onResize);
        return _this;
    }
    Stack.prototype.notifyResizeWindows = function () {
        this.windows.forEach(function (w) { return w.emit({ type: "resize" }); });
    };
    Object.defineProperty(Stack.prototype, "type", {
        get: function () {
            return _ComponentTypes__WEBPACK_IMPORTED_MODULE_4__["stack"];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Stack.prototype, "windowCount", {
        get: function () {
            return this.windows ? this.windows.length : 0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Stack.prototype, "closeDisabled", {
        get: function () {
            return this._closeDisabled || (this.dashboard && this.dashboard.closeDisabled);
        },
        set: function (value) {
            this.setCloseDisabled(value);
        },
        enumerable: true,
        configurable: true
    });
    Stack.prototype.setCloseDisabled = function (closeDisabled) {
        this._closeDisabled = closeDisabled;
    };
    Object.defineProperty(Stack.prototype, "activeIndex", {
        get: function () {
            return this._activeIndex || 0;
        },
        set: function (value) {
            this.setActiveIndex(value);
        },
        enumerable: true,
        configurable: true
    });
    Stack.prototype.setActiveIndex = function (activeIndex) {
        if (activeIndex !== this._activeIndex) {
            this._activeIndex = activeIndex;
        }
    };
    Object.defineProperty(Stack.prototype, "first", {
        get: function () {
            return this.windowCount > 0 ? this.windows[0] : undefined;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Stack.prototype, "last", {
        get: function () {
            return this.windowCount > 0 ? this.windows[this.windows.length - 1] : undefined;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Stack.prototype, "active", {
        get: function () {
            return this.activeIndex >= 0 && this.activeIndex < this.windows.length ? this.windows[this.activeIndex] : undefined;
        },
        set: function (value) {
            this.setActive(value);
        },
        enumerable: true,
        configurable: true
    });
    Stack.prototype.setActive = function (active) {
        this.setActiveIndex(this.windows.indexOf(active));
    };
    Stack.prototype.add = function (win, makeActive) {
        if (makeActive === void 0) { makeActive = true; }
        if (win) {
            if (win.parent !== this) {
                win.removeFromParent();
                win.parent = this;
            }
            else {
                var itemIdx = this.windows.indexOf(win);
                this.windows.splice(itemIdx, 1);
            }
            this.windows.push(win);
            if (makeActive) {
                this.setActive(win);
            }
        }
    };
    Stack.prototype.open = function (request) {
        var win;
        if (request && request.replace && request.name) {
            var db = this.dashboard;
            win = db.findFirst(function (w) {
                return w.type === "window" ? w.name === request.name : false;
            });
        }
        if (!win) {
            win = new _Window__WEBPACK_IMPORTED_MODULE_2__["Window"]();
            if (request) {
                win.name = request.name;
                win.setPath(request.path);
                win.setParams(request.params);
                win.setQuery(request.query);
                if (request.title) {
                    win.setTitle(request.title);
                }
                if (request.transient !== undefined) {
                    win.setTransient(request.transient);
                }
            }
            this.add(win, request && request.makeActive !== undefined ? request.makeActive : true);
        }
        else {
            win.load(request);
        }
        return Promise.resolve(win);
    };
    Stack.prototype.addNew = function () {
        if (this.addApp) {
            return this.open(Object(_twii_common_lib_LangUtils__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(this.addApp) ? this.addApp() : this.addApp);
        }
        return Promise.resolve();
    };
    Stack.prototype.insertAt = function (item, index) {
        if (item && index >= 0 && index < this.windows.length) {
            var refStackItem = this.windows[index];
            var insertIdx = -1;
            if (item.parent !== this) {
                item.removeFromParent();
                item.parent = this;
                insertIdx = index;
            }
            else {
                var itemIdx = this.windows.indexOf(item);
                if (itemIdx >= 0 && itemIdx !== index) {
                    this.windows.splice(itemIdx, 1);
                    insertIdx = this.windows.indexOf(refStackItem);
                }
            }
            if (insertIdx >= 0) {
                this.windows.splice(insertIdx, 0, item);
            }
        }
        else {
            this.add(item);
        }
    };
    Stack.prototype.dropWindow = function (refWindow) {
        var drag = this.dashboard ? this.dashboard.drag : undefined;
        if (drag) {
            var win = drag;
            if (refWindow) {
                if (drag.parent === this) {
                    var dragIdx = this.windows.indexOf(win);
                    var refIdx = this.windows.indexOf(refWindow);
                    this.insertAt(win, dragIdx > refIdx ? refIdx : refIdx + 1);
                }
                else {
                    this.insertBefore(win, refWindow);
                }
            }
            else {
                this.add(win, false);
            }
            this.setActive(win);
            this.dashboard.clearDrag();
        }
    };
    Stack.prototype.splitLeft = function (newComp) {
        var _this = this;
        var right = this;
        return __webpack_require__.e(/*! import() */ 29).then(__webpack_require__.bind(null, /*! ./Split */ "../dashboard/lib/model/Split.js")).then(function (m) {
            var split = new m.HSplit();
            var newStack = new Stack();
            newStack.setCloseDisabled(_this._closeDisabled);
            split.setLeft(newStack);
            _this.parent.replace(split, _this);
            if (newComp) {
                newStack.add(newComp);
            }
            else {
                newStack.addNew();
            }
            split.setRight(_this);
        });
    };
    Stack.prototype.splitRight = function (newComp) {
        var _this = this;
        var left = this;
        return __webpack_require__.e(/*! import() */ 29).then(__webpack_require__.bind(null, /*! ./Split */ "../dashboard/lib/model/Split.js")).then(function (m) {
            var split = new m.HSplit();
            var newStack = new Stack();
            newStack.setCloseDisabled(_this._closeDisabled);
            split.setRight(newStack);
            _this.parent.replace(split, _this);
            if (newComp) {
                newStack.add(newComp);
            }
            else {
                newStack.addNew();
            }
            split.setLeft(_this);
        });
    };
    Stack.prototype.splitTop = function (newComp) {
        var _this = this;
        var bottom = this;
        return __webpack_require__.e(/*! import() */ 29).then(__webpack_require__.bind(null, /*! ./Split */ "../dashboard/lib/model/Split.js")).then(function (m) {
            var split = new m.VSplit();
            var newStack = new Stack();
            newStack.setCloseDisabled(_this._closeDisabled);
            split.setTop(newStack);
            _this.parent.replace(split, _this);
            if (newComp) {
                newStack.add(newComp);
            }
            else {
                newStack.addNew();
            }
            split.setBottom(bottom);
        });
    };
    Stack.prototype.splitBottom = function (newComp) {
        var _this = this;
        var top = this;
        return __webpack_require__.e(/*! import() */ 29).then(__webpack_require__.bind(null, /*! ./Split */ "../dashboard/lib/model/Split.js")).then(function (m) {
            var split = new m.VSplit();
            var newStack = new Stack();
            newStack.setCloseDisabled(_this._closeDisabled);
            split.setBottom(newStack);
            _this.parent.replace(split, _this);
            if (newComp) {
                newStack.add(newComp);
            }
            else {
                newStack.addNew();
            }
            split.setTop(top);
        });
    };
    Stack.prototype.insertBefore = function (item, refItem) {
        if (!refItem) {
            this.add(item);
        }
        else if (item) {
            this.insertAt(item, this.windows.indexOf(refItem));
        }
    };
    Stack.prototype.replace = function (newItem, oldItem) {
        if (newItem && oldItem && oldItem.parent === this) {
            this.insertBefore(newItem, oldItem);
            oldItem.removeFromParent();
        }
    };
    Object.defineProperty(Stack.prototype, "config", {
        get: function () {
            return {
                type: this.type,
                activeIndex: this.activeIndex,
                windows: this.windows.filter(function (w) { return !w.transient; }).map(function (w) { return w.config; }),
                closeDisabled: this._closeDisabled
            };
        },
        enumerable: true,
        configurable: true
    });
    Stack.prototype.setConfig = function (config) {
        var _this = this;
        this.windows = [];
        var windowPromise;
        if (config && config.windows && config.windows.length > 0) {
            windowPromise = Promise.all(config.windows.map(function (wc) {
                var w = new _Window__WEBPACK_IMPORTED_MODULE_2__["Window"]();
                _this.add(w, false);
                return w.setConfig(wc);
            }));
        }
        else {
            windowPromise = Promise.resolve();
        }
        return windowPromise.then(Object(mobx__WEBPACK_IMPORTED_MODULE_0__["action"])(function () {
            _this.setActiveIndex(config && !isNaN(config.activeIndex) ? config.activeIndex : 0);
            _this.setCloseDisabled(config ? config.closeDisabled : undefined);
        }));
    };
    Stack.prototype.remove = function (node) {
        var idx = this.windows.indexOf(node);
        if (idx >= 0) {
            var w = this.windows[idx];
            w.parent = undefined;
            this.windows.splice(idx, 1);
            if (this.windows.length === 0) {
                this.removeFromParent();
            }
            else if (this.windows.length > 0) {
                if (this.activeIndex >= this.windows.length) {
                    this.setActiveIndex(this.windows.length - 1);
                }
            }
        }
    };
    Stack.prototype._visitChildren = function (callback) {
        this.windows.forEach(function (w) { return w.visit(callback); });
    };
    Stack.prototype._findFirstChild = function (predicate) {
        var r;
        this.windows.some(function (w) {
            r = w.findFirst(predicate);
            return r ? true : false;
        });
        return r;
    };
    Stack.prototype._findAllChildren = function (predicate) {
        var r = [];
        var wr;
        this.windows.forEach(function (w) {
            wr = w.findAll(predicate);
            if (wr && wr.length > 0) {
                r = r.concat(wr);
            }
        });
        return r;
    };
    Stack.prototype.close = function () {
        while (this.windowCount > 0) {
            this.windows[0].close();
        }
        this.removeFromParent();
    };
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["observable"]
    ], Stack.prototype, "_closeDisabled", void 0);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["observable"]
    ], Stack.prototype, "_activeIndex", void 0);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["observable"]
    ], Stack.prototype, "windows", void 0);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Stack.prototype, "windowCount", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Stack.prototype, "closeDisabled", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "setCloseDisabled", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Stack.prototype, "activeIndex", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "setActiveIndex", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Stack.prototype, "first", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Stack.prototype, "last", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Stack.prototype, "active", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "setActive", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "add", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "open", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "addNew", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "insertAt", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "dropWindow", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "splitLeft", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "splitRight", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "splitTop", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "splitBottom", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "insertBefore", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "replace", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Stack.prototype, "config", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "setConfig", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "remove", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "_replaceWithListModuleLoaded", void 0);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Stack.prototype, "close", null);
    return Stack;
}(_Component__WEBPACK_IMPORTED_MODULE_1__["Component"]));



/***/ }),

/***/ "../dashboard/lib/model/Window.js":
/*!****************************************!*\
  !*** ../dashboard/lib/model/Window.js ***!
  \****************************************/
/*! exports provided: Window */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Window", function() { return Window; });
/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ "../../node_modules/mobx/lib/mobx.module.js");
/* harmony import */ var _Component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Component */ "../dashboard/lib/model/Component.js");
/* harmony import */ var _ComponentTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ComponentTypes */ "../dashboard/lib/model/ComponentTypes.js");
/* harmony import */ var _WindowAppHost__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./WindowAppHost */ "../dashboard/lib/model/WindowAppHost.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};




var Window = /** @class */ (function (_super) {
    __extends(Window, _super);
    function Window() {
        var _this = _super.call(this) || this;
        _this._contentHidden = false;
        _this._closeDisabled = false;
        _this._transient = false;
        _this._onResizeInternal = function () {
            // this is to ensure that the bound view gets first bite at the cherry
            _this.emit({ type: "resizeview" });
        };
        _this._appHost = new _WindowAppHost__WEBPACK_IMPORTED_MODULE_3__["WindowAppHost"](_this);
        _this.addEventListener("resize", _this._onResizeInternal);
        return _this;
    }
    Object.defineProperty(Window.prototype, "appHost", {
        get: function () {
            return this._appHost;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Window.prototype, "path", {
        get: function () {
            return this._path;
        },
        set: function (value) {
            this.setPath(value);
        },
        enumerable: true,
        configurable: true
    });
    Window.prototype.setPath = function (path) {
        this._path = path;
    };
    Object.defineProperty(Window.prototype, "params", {
        get: function () {
            return Object.assign({}, this._params, this._query);
        },
        set: function (value) {
            this.setParams(value);
        },
        enumerable: true,
        configurable: true
    });
    Window.prototype.setParams = function (params) {
        this._params = params;
    };
    Object.defineProperty(Window.prototype, "query", {
        get: function () {
            return Object.assign({}, this._query);
        },
        set: function (value) {
            this.setQuery(value);
        },
        enumerable: true,
        configurable: true
    });
    Window.prototype.setQuery = function (query) {
        this._query = query;
    };
    Object.defineProperty(Window.prototype, "title", {
        get: function () {
            return this._appHost.title;
        },
        set: function (value) {
            this.setTitle(value);
        },
        enumerable: true,
        configurable: true
    });
    Window.prototype.setTitle = function (title) {
        this._appHost.setTitle(title);
    };
    Object.defineProperty(Window.prototype, "closeDisabled", {
        get: function () {
            return this._closeDisabled || (this.manager && this.manager.closeDisabled);
        },
        set: function (value) {
            this._closeDisabled = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Window.prototype, "contentHidden", {
        get: function () {
            return this._contentHidden;
        },
        set: function (value) {
            this.setContentHidden(value);
        },
        enumerable: true,
        configurable: true
    });
    Window.prototype.setContentHidden = function (contentHidden) {
        if (contentHidden !== this.contentHidden) {
            this._contentHidden = contentHidden;
            if (this.parent) {
                this.parent.emit({ type: "resize" });
            }
        }
    };
    Window.prototype.toggleContent = function () {
        this.setContentHidden(!this.contentHidden);
    };
    Window.prototype.setCloseDisabled = function (closeDisabled) {
        this._closeDisabled = closeDisabled;
    };
    Object.defineProperty(Window.prototype, "transient", {
        get: function () {
            return this._transient;
        },
        set: function (value) {
            this.setTransient(value);
        },
        enumerable: true,
        configurable: true
    });
    Window.prototype.setTransient = function (transient) {
        this._transient = transient;
    };
    Object.defineProperty(Window.prototype, "manager", {
        get: function () {
            var parent = this.parent;
            return parent && (parent.type === _ComponentTypes__WEBPACK_IMPORTED_MODULE_2__["stack"] || parent.type === _ComponentTypes__WEBPACK_IMPORTED_MODULE_2__["list"]) ? parent : undefined;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Window.prototype, "type", {
        get: function () {
            return _ComponentTypes__WEBPACK_IMPORTED_MODULE_2__["window"];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Window.prototype, "active", {
        get: function () {
            var manager = this.manager;
            return manager ? manager.active === this : false;
        },
        enumerable: true,
        configurable: true
    });
    Window.prototype.activate = function () {
        var manager = this.manager;
        if (manager) {
            manager.setActive(this);
        }
    };
    Object.defineProperty(Window.prototype, "config", {
        get: function () {
            return {
                type: this.type,
                path: this._path,
                params: this._params,
                query: this._query,
                closeDisabled: this._closeDisabled,
                contentHidden: this._contentHidden
            };
        },
        enumerable: true,
        configurable: true
    });
    Window.prototype.setConfig = function (config) {
        this.setTitle(config ? config.title : undefined);
        this.setCloseDisabled(config ? config.closeDisabled : undefined);
        this.setPath(config ? config.path : undefined);
        this.setParams(config ? config.params : undefined);
        this.setQuery(config ? config.query : undefined);
        this.setContentHidden(config ? config.contentHidden : undefined);
        return Promise.resolve();
    };
    Window.prototype.open = function (request) {
        var manager = this.manager;
        if (manager) {
            return manager.open(request);
        }
        return Promise.reject({ code: "INVALID_STATE", message: "No Window Manager Set" });
    };
    Window.prototype.load = function (request) {
        return this.appHost.load(request);
    };
    Window.prototype.close = function () {
        this.emit({ type: "beforeclose" });
        if (this.onClose) {
            this.onClose(this);
        }
        if (this.dashboard) {
            this.dashboard.destroyPortal(this);
        }
        this.removeFromParent();
        this.emit({ type: "close" });
    };
    Object.defineProperty(Window.prototype, "portal", {
        get: function () {
            return this.dashboard ? this.dashboard.getPortal(this) : undefined;
        },
        enumerable: true,
        configurable: true
    });
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["observable"]
    ], Window.prototype, "_path", void 0);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["observable"]
    ], Window.prototype, "_params", void 0);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["observable"]
    ], Window.prototype, "_query", void 0);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["observable"]
    ], Window.prototype, "_appHost", void 0);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["observable"]
    ], Window.prototype, "_contentHidden", void 0);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["observable"]
    ], Window.prototype, "_closeDisabled", void 0);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["observable"]
    ], Window.prototype, "_transient", void 0);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Window.prototype, "appHost", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Window.prototype, "path", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "setPath", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Window.prototype, "params", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "setParams", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Window.prototype, "query", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "setQuery", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Window.prototype, "title", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "setTitle", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Window.prototype, "closeDisabled", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Window.prototype, "contentHidden", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "setContentHidden", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "toggleContent", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "setCloseDisabled", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Window.prototype, "transient", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "setTransient", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Window.prototype, "manager", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Window.prototype, "active", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "activate", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["computed"]
    ], Window.prototype, "config", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "setConfig", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "load", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], Window.prototype, "close", null);
    return Window;
}(_Component__WEBPACK_IMPORTED_MODULE_1__["Component"]));



/***/ }),

/***/ "../dashboard/lib/model/WindowAppHost.js":
/*!***********************************************!*\
  !*** ../dashboard/lib/model/WindowAppHost.js ***!
  \***********************************************/
/*! exports provided: default, WindowAppHost */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return WindowAppHost; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WindowAppHost", function() { return WindowAppHost; });
/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ "../../node_modules/mobx/lib/mobx.module.js");
/* harmony import */ var _twii_common_lib_model_AbstractAppHost__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @twii/common/lib/model/AbstractAppHost */ "../common/lib/model/AbstractAppHost.js");
/* harmony import */ var _twii_common_lib_model_AbstractAppHost__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_twii_common_lib_model_AbstractAppHost__WEBPACK_IMPORTED_MODULE_1__);
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};


var WindowAppHost = /** @class */ (function (_super) {
    __extends(WindowAppHost, _super);
    function WindowAppHost(window) {
        var _this = _super.call(this) || this;
        _this._window = window;
        return _this;
    }
    Object.defineProperty(WindowAppHost.prototype, "defaultRequest", {
        get: function () {
            return { path: this._window.path, params: this._window.params, query: this._window.query };
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(WindowAppHost.prototype, "router", {
        get: function () {
            return this._window.router;
        },
        set: function (value) {
            this.setRouter(value);
        },
        enumerable: true,
        configurable: true
    });
    WindowAppHost.prototype.setRouter = function (router) {
        this._window.setRouter(router);
    };
    WindowAppHost.prototype.open = function (request) {
        return this._window.open(request).then(function (w) {
            return w.appHost;
        });
    };
    WindowAppHost.prototype.setRequest = function (request) {
        _super.prototype.setRequest.call(this, request);
        if (request && request.replace) {
            this._window.setPath(request.path);
            this._window.setParams(request.params);
            this._window.setQuery(request.query);
        }
    };
    WindowAppHost.prototype.close = function () {
        this._window.close();
    };
    WindowAppHost.prototype.addEventListener = function (type, handler) {
        this._window.addEventListener(type, handler);
    };
    WindowAppHost.prototype.removeEventListener = function (type, handler) {
        this._window.addEventListener(type, handler);
    };
    WindowAppHost.prototype.emit = function (event) {
        this._window.emit(event);
    };
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], WindowAppHost.prototype, "setRouter", null);
    __decorate([
        mobx__WEBPACK_IMPORTED_MODULE_0__["action"]
    ], WindowAppHost.prototype, "setRequest", null);
    return WindowAppHost;
}(_twii_common_lib_model_AbstractAppHost__WEBPACK_IMPORTED_MODULE_1__["AbstractAppHost"]));



/***/ })

}]);
//# sourceMappingURL=31.js.map