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

/***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/domain/Msi.vue?vue&type=script&lang=js&":
/*!************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/main/domain/Msi.vue?vue&type=script&lang=js& ***!
  \************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_document__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/document */ \"./src/utils/document.js\");\n/* harmony import */ var _utils_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/http */ \"./src/utils/http.js\");\n/* harmony import */ var _utils_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/settings */ \"./src/utils/settings.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  props: {\n    value: Boolean,\n    title: String,\n    domain: Object\n  },\n  components: {\n    Modal: () => __webpack_require__.e(/*! import() */ 2).then(__webpack_require__.bind(null, /*! @/components/main/Modal.vue */ \"./src/components/main/Modal.vue\")),\n    DatePicker: () => Promise.all(/*! import() */[__webpack_require__.e(3), __webpack_require__.e(21)]).then(__webpack_require__.bind(null, /*! @/components/singles/DatePicker.vue */ \"./src/components/singles/DatePicker.vue\"))\n  },\n  data() {\n    return {\n      date: new Date(),\n      isLoading: false,\n      showMore: false\n    };\n  },\n  async created() {\n    this.date = new Date(this.date.setDate(this.date.getDate() + 7));\n  },\n  methods: {\n    hide() {\n      if (!this.isLoading) {\n        this.$emit(\"hide\", false);\n        this.$emit(\"input\", false);\n      }\n    },\n    async download() {\n      this.isLoading = true;\n      this.$helpers.notify(\"Installer\", \"Creating key.\");\n      await Object(_utils_http__WEBPACK_IMPORTED_MODULE_1__[\"postApi\"])(\"create/pairingKey\", {\n        domainUID: this.domain.uid,\n        validUntil: this.date\n      });\n      this.$helpers.notify(\"Installer\", \"Creating MSI package.\");\n      try {\n        const msiPackageUrl = await Object(_utils_http__WEBPACK_IMPORTED_MODULE_1__[\"postApi\"])(\"msiPackage\", {\n          domainUID: this.domain.uid\n        });\n        this.$helpers.notify(\"Installer\", \"Starting download.\");\n        Object(_utils_document__WEBPACK_IMPORTED_MODULE_0__[\"downloadFile\"])(`${_utils_settings__WEBPACK_IMPORTED_MODULE_2__[\"appBaseUrl\"]}/${msiPackageUrl}`);\n        this.$emit(\"success\");\n      } catch (err) {\n        if (err.response.status === 410) this.$helpers.notify(\"Error\", \"No key is created.\", \"danger\", -1);else if (err.response.status === 500) this.$helpers.notify(\"Error\", \"Failed to create MSI package.\", \"danger\");\n      }\n      this.isLoading = false;\n      this.hide();\n    }\n  }\n});\n\n//# sourceURL=webpack:///./src/components/main/domain/Msi.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"7d40fa80-vue-loader-template\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/domain/Msi.vue?vue&type=template&id=3e8488ce&":
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7d40fa80-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/main/domain/Msi.vue?vue&type=template&id=3e8488ce& ***!
  \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\n    \"Modal\",\n    {\n      attrs: {\n        value: _vm.value,\n        title: \"Computer Agent\",\n        subtitle: \"Download installer for \" + _vm.domain.friendlyName\n      },\n      on: {\n        hide: function($event) {\n          return _vm.hide()\n        }\n      }\n    },\n    [\n      _c(\n        \"template\",\n        { staticClass: \"content\", slot: \"body\" },\n        [\n          _c(\"p\", [_vm._v(\"Please choose an expire date for the installer:\")]),\n          _c(\"DatePicker\", {\n            attrs: { type: \"date\", startDate: _vm.date, minDate: new Date() },\n            on: {\n              selected: function($event) {\n                _vm.date = $event\n              }\n            }\n          }),\n          _c(\n            \"div\",\n            { staticClass: \"notification content is-primary is-light\" },\n            [\n              _vm._v(\n                \" Install the Agent on the computers that you want to be in this domain. They will appear under \"\n              ),\n              _c(\"i\", [_vm._v(\"Computers\")]),\n              _vm._v(\" when the installation is complete. \"),\n              _c(\"br\"),\n              _c(\"br\"),\n              _vm._v(\n                \" This installer is only for this domain (\" +\n                  _vm._s(_vm.domain.friendlyName) +\n                  \"). Each domain has its own installer. \"\n              )\n            ]\n          ),\n          _c(\n            \"div\",\n            { staticClass: \"notification content is-warning is-light\" },\n            [\n              _vm._v(\n                \" All other installers for this domain will expire when downloading a new installer. \"\n              ),\n              !_vm.showMore\n                ? _c(\n                    \"a\",\n                    {\n                      on: {\n                        click: function($event) {\n                          $event.stopPropagation()\n                          _vm.showMore = true\n                        }\n                      }\n                    },\n                    [_vm._v(\"More information...\")]\n                  )\n                : _vm._e()\n            ]\n          ),\n          _c(\n            \"transition\",\n            {\n              attrs: {\n                name: \"custom-classes-transition\",\n                \"enter-active-class\": \"pulse-fast-once\",\n                appear: \"\"\n              }\n            },\n            [\n              _vm.showMore\n                ? _c(\n                    \"div\",\n                    {\n                      staticClass: \"notification fade-in-once margin-bottom-10\"\n                    },\n                    [\n                      _c(\"button\", {\n                        staticClass: \"delete\",\n                        on: {\n                          click: function($event) {\n                            $event.stopPropagation()\n                            _vm.showMore = false\n                          }\n                        }\n                      }),\n                      _vm._v(\n                        \" An expired installer will still install the Agent, but it will not be able to pair the computer with the domain and connect to the server. Though, an expired installer has no affect on an already paired computer. \"\n                      )\n                    ]\n                  )\n                : _vm._e()\n            ]\n          )\n        ],\n        1\n      ),\n      _c(\"template\", { staticClass: \"content\", slot: \"footer\" }, [\n        !_vm.isLoading\n          ? _c(\"div\", [\n              _c(\n                \"div\",\n                {\n                  staticClass: \"button is-success\",\n                  class: { \"is-loading\": _vm.isLoading },\n                  on: {\n                    click: function($event) {\n                      return _vm.download()\n                    }\n                  }\n                },\n                [_vm._v(\" Download \")]\n              ),\n              _c(\n                \"div\",\n                {\n                  staticClass: \"button\",\n                  on: {\n                    click: function($event) {\n                      return _vm.hide()\n                    }\n                  }\n                },\n                [_vm._v(\"Cancel\")]\n              )\n            ])\n          : _vm._e(),\n        _c(\n          \"div\",\n          {\n            directives: [\n              {\n                name: \"show\",\n                rawName: \"v-show\",\n                value: _vm.isLoading,\n                expression: \"isLoading\"\n              }\n            ],\n            staticClass: \"spinner-wrapper center\"\n          },\n          [_c(\"span\", { staticClass: \"spinner is-centered\" })]\n        )\n      ])\n    ],\n    2\n  )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/main/domain/Msi.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%227d40fa80-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./src/components/main/domain/Msi.vue":
/*!********************************************!*\
  !*** ./src/components/main/domain/Msi.vue ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Msi_vue_vue_type_template_id_3e8488ce___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Msi.vue?vue&type=template&id=3e8488ce& */ \"./src/components/main/domain/Msi.vue?vue&type=template&id=3e8488ce&\");\n/* harmony import */ var _Msi_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Msi.vue?vue&type=script&lang=js& */ \"./src/components/main/domain/Msi.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n  _Msi_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _Msi_vue_vue_type_template_id_3e8488ce___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _Msi_vue_vue_type_template_id_3e8488ce___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/main/domain/Msi.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/main/domain/Msi.vue?");

/***/ }),

/***/ "./src/components/main/domain/Msi.vue?vue&type=script&lang=js&":
/*!*********************************************************************!*\
  !*** ./src/components/main/domain/Msi.vue?vue&type=script&lang=js& ***!
  \*********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Msi_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/babel-loader/lib!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./Msi.vue?vue&type=script&lang=js& */ \"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/domain/Msi.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Msi_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/main/domain/Msi.vue?");

/***/ }),

/***/ "./src/components/main/domain/Msi.vue?vue&type=template&id=3e8488ce&":
/*!***************************************************************************!*\
  !*** ./src/components/main/domain/Msi.vue?vue&type=template&id=3e8488ce& ***!
  \***************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_7d40fa80_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Msi_vue_vue_type_template_id_3e8488ce___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"7d40fa80-vue-loader-template\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./Msi.vue?vue&type=template&id=3e8488ce& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"7d40fa80-vue-loader-template\\\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/domain/Msi.vue?vue&type=template&id=3e8488ce&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_7d40fa80_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Msi_vue_vue_type_template_id_3e8488ce___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_7d40fa80_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Msi_vue_vue_type_template_id_3e8488ce___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/main/domain/Msi.vue?");

/***/ })

}]);