/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "./js/bootstrap-extras.jsx":
/*!*********************************!*\
  !*** ./js/bootstrap-extras.jsx ***!
  \*********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "../node_modules/jquery/dist/jquery.js");
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);

jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).ready(function () {
  jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-toggle=offcanvas]").click(function () {
    var target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr("data-target") || ".block-offcanvas");
    var isActive = target.is(".active");
    target.toggleClass("active", !isActive);
    jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).toggleClass("active", !isActive);
  });
});

/***/ }),

/***/ "./js/components/BaseComponent.jsx":
/*!*****************************************!*\
  !*** ./js/components/BaseComponent.jsx ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

// the base component.  This really should not exist in the first place
// but react is a bit meh when it comes to what's on the base component
// which breaks super.  This is why we do this here.  Note that this is
// also used by the standalone admin UI app.


var BaseComponent = /*#__PURE__*/function (_React$Component) {
  _inherits(BaseComponent, _React$Component);

  var _super = _createSuper(BaseComponent);

  function BaseComponent() {
    _classCallCheck(this, BaseComponent);

    return _super.apply(this, arguments);
  }

  _createClass(BaseComponent, [{
    key: "componentDidMount",
    value: function componentDidMount() {}
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {}
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate() {}
  }]);

  return BaseComponent;
}(react__WEBPACK_IMPORTED_MODULE_0__.Component);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BaseComponent);

/***/ }),

/***/ "./js/components/BreadCrumbs.jsx":
/*!***************************************!*\
  !*** ./js/components/BreadCrumbs.jsx ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _RecordComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RecordComponent */ "./js/components/RecordComponent.jsx");
/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Link */ "./js/components/Link.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _dialogSystem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../dialogSystem */ "./js/dialogSystem.jsx");
/* harmony import */ var _dialogs_findFiles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../dialogs/findFiles */ "./js/dialogs/findFiles.jsx");
/* harmony import */ var _dialogs_publish__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../dialogs/publish */ "./js/dialogs/publish.jsx");
/* harmony import */ var _dialogs_Refresh__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../dialogs/Refresh */ "./js/dialogs/Refresh.jsx");
/* harmony import */ var _richPromise__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../richPromise */ "./js/richPromise.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }












var BreadCrumbs = /*#__PURE__*/function (_RecordComponent) {
  _inherits(BreadCrumbs, _RecordComponent);

  var _super = _createSuper(BreadCrumbs);

  function BreadCrumbs(props) {
    var _this;

    _classCallCheck(this, BreadCrumbs);

    _this = _super.call(this, props);
    _this.state = {
      recordPathInfo: null
    };
    _this._onKeyPress = _this._onKeyPress.bind(_assertThisInitialized(_this));
    return _this;
  }

  _createClass(BreadCrumbs, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      _get(_getPrototypeOf(BreadCrumbs.prototype), "componentDidMount", this).call(this);

      this.updateCrumbs();
      window.addEventListener("keydown", this._onKeyPress);
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps, prevState) {
      _get(_getPrototypeOf(BreadCrumbs.prototype), "componentDidUpdate", this).call(this, prevProps, prevState);

      if (prevProps.match.params.path !== this.props.match.params.path) {
        this.updateCrumbs();
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      window.removeEventListener("keydown", this._onKeyPress);
    }
  }, {
    key: "updateCrumbs",
    value: function updateCrumbs() {
      var _this2 = this;

      var path = this.getRecordPath();

      if (path === null) {
        this.setState({
          recordPathInfo: null
        });
        return;
      }

      (0,_utils__WEBPACK_IMPORTED_MODULE_3__.loadData)("/pathinfo", {
        path: path
      }, null, _richPromise__WEBPACK_IMPORTED_MODULE_9__["default"]).then(function (resp) {
        _this2.setState({
          recordPathInfo: {
            path: path,
            segments: resp.segments
          }
        });
      });
    }
  }, {
    key: "_onKeyPress",
    value: function _onKeyPress(event) {
      // meta+g is open find files
      if (event.which === 71 && (0,_utils__WEBPACK_IMPORTED_MODULE_3__.isMetaKey)(event)) {
        event.preventDefault();
        _dialogSystem__WEBPACK_IMPORTED_MODULE_5__["default"].showDialog(_dialogs_findFiles__WEBPACK_IMPORTED_MODULE_6__["default"]);
      }
    }
  }, {
    key: "_onCloseClick",
    value: function _onCloseClick(e) {
      (0,_utils__WEBPACK_IMPORTED_MODULE_3__.loadData)("/previewinfo", {
        path: this.getRecordPath(),
        alt: this.getRecordAlt()
      }, null, _richPromise__WEBPACK_IMPORTED_MODULE_9__["default"]).then(function (resp) {
        if (resp.url === null) {
          window.location.href = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getCanonicalUrl)("/");
        } else {
          window.location.href = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getCanonicalUrl)(resp.url);
        }
      });
    }
  }, {
    key: "_onFindFiles",
    value: function _onFindFiles(e) {
      _dialogSystem__WEBPACK_IMPORTED_MODULE_5__["default"].showDialog(_dialogs_findFiles__WEBPACK_IMPORTED_MODULE_6__["default"]);
    }
  }, {
    key: "_onRefresh",
    value: function _onRefresh(e) {
      _dialogSystem__WEBPACK_IMPORTED_MODULE_5__["default"].showDialog(_dialogs_Refresh__WEBPACK_IMPORTED_MODULE_8__["default"]);
    }
  }, {
    key: "_onPublish",
    value: function _onPublish(e) {
      _dialogSystem__WEBPACK_IMPORTED_MODULE_5__["default"].showDialog(_dialogs_publish__WEBPACK_IMPORTED_MODULE_7__["default"]);
    }
  }, {
    key: "renderGlobalActions",
    value: function renderGlobalActions() {
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "btn-group"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        className: "btn btn-default",
        onClick: this._onFindFiles.bind(this),
        title: _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("FIND_FILES")
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
        className: "fa fa-search fa-fw"
      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        className: "btn btn-default",
        onClick: this._onPublish.bind(this),
        title: _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("PUBLISH")
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
        className: "fa fa-cloud-upload fa-fw"
      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        className: "btn btn-default",
        onClick: this._onRefresh.bind(this),
        title: _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("REFRESH_BUILD")
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
        className: "fa fa-refresh fa-fw"
      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        className: "btn btn-default",
        onClick: this._onCloseClick.bind(this),
        title: _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("RETURN_TO_WEBSITE")
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
        className: "fa fa-eye fa-fw"
      })));
    }
  }, {
    key: "render",
    value: function render() {
      var _this3 = this;

      var crumbs = [];
      var target = this.props.match.params.page === "preview" ? ".preview" : ".edit";
      var lastItem = null;

      if (this.state.recordPathInfo != null) {
        crumbs = this.state.recordPathInfo.segments.map(function (item) {
          var urlPath = _this3.getUrlRecordPathWithAlt(item.path);

          var label = item.label_i18n ? _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans(item.label_i18n) : item.label;
          var className = "record-crumb";

          if (!item.exists) {
            label = item.id;
            className += " missing-record-crumb";
          }

          lastItem = item;

          var adminPath = _this3.getPathToAdminPage(target, {
            path: urlPath
          });

          return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
            key: item.path,
            className: className
          }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Link__WEBPACK_IMPORTED_MODULE_2__["default"], {
            to: adminPath
          }, label));
        });
      } else {
        crumbs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Link__WEBPACK_IMPORTED_MODULE_2__["default"], {
          to: this.getPathToAdminPage(".edit", {
            path: "root"
          })
        }, _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("BACK_TO_OVERVIEW")));
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "breadcrumbs"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", {
        className: "breadcrumb container"
      }, this.props.children, crumbs, lastItem && lastItem.can_have_children ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
        className: "new-record-crumb"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Link__WEBPACK_IMPORTED_MODULE_2__["default"], {
        to: this.getPathToAdminPage(".add-child", {
          path: this.getUrlRecordPathWithAlt(lastItem.path)
        })
      }, "+")) : null, " "
      /* this space is needed for chrome ... */
      , /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
        className: "meta"
      }, this.renderGlobalActions())));
    }
  }]);

  return BreadCrumbs;
}(_RecordComponent__WEBPACK_IMPORTED_MODULE_1__["default"]);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BreadCrumbs);

/***/ }),

/***/ "./js/components/Component.jsx":
/*!*************************************!*\
  !*** ./js/components/Component.jsx ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _BaseComponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseComponent */ "./js/components/BaseComponent.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var Component = /*#__PURE__*/function (_BaseComponent) {
  _inherits(Component, _BaseComponent);

  var _super = _createSuper(Component);

  function Component() {
    _classCallCheck(this, Component);

    return _super.apply(this, arguments);
  }

  _createClass(Component, [{
    key: "getPathToAdminPage",
    value:
    /* helper that can generate a path to a rule */
    function getPathToAdminPage(name, params) {
      var parameters = _objectSpread(_objectSpread({}, this.props.match.params), params);

      if (name !== null) {
        if (name.substr(0, 1) === ".") {
          parameters.page = name.substr(1);
        } else {
          parameters.page = name;
        }
      }

      return "".concat($LEKTOR_CONFIG.admin_root, "/:path/:page").replace(/:[a-zA-Z]+/g, function (m) {
        var key = m.substr(1);
        return parameters[key];
      });
    }
    /* helper to transition to a specific page */

  }, {
    key: "transitionToAdminPage",
    value: function transitionToAdminPage(name, params) {
      var path = this.getPathToAdminPage(name, params);
      this.props.history.push(path);
    }
  }]);

  return Component;
}(_BaseComponent__WEBPACK_IMPORTED_MODULE_0__["default"]);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Component);

/***/ }),

/***/ "./js/components/DialogSlot.jsx":
/*!**************************************!*\
  !*** ./js/components/DialogSlot.jsx ***!
  \**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _dialogSystem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../dialogSystem */ "./js/dialogSystem.jsx");
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events */ "./js/events.jsx");
/* harmony import */ var _hub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hub */ "./js/hub.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }






var DialogSlot = /*#__PURE__*/function (_React$Component) {
  _inherits(DialogSlot, _React$Component);

  var _super = _createSuper(DialogSlot);

  function DialogSlot(props) {
    var _this;

    _classCallCheck(this, DialogSlot);

    _this = _super.call(this, props);
    _this.state = {
      currentDialog: null,
      currentDialogOptions: null
    };
    _this.onDialogChanged = _this.onDialogChanged.bind(_assertThisInitialized(_this));
    return _this;
  }

  _createClass(DialogSlot, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      _hub__WEBPACK_IMPORTED_MODULE_3__["default"].subscribe(_events__WEBPACK_IMPORTED_MODULE_2__.DialogChangedEvent, this.onDialogChanged);
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      _hub__WEBPACK_IMPORTED_MODULE_3__["default"].unsubscribe(_events__WEBPACK_IMPORTED_MODULE_2__.DialogChangedEvent, this.onDialogChanged);
    }
  }, {
    key: "onDialogChanged",
    value: function onDialogChanged(event) {
      this.setState({
        currentDialog: event.dialog,
        currentDialogOptions: event.dialogOptions || {}
      });
    }
  }, {
    key: "initDialogInstance",
    value: function initDialogInstance(dialog) {
      _dialogSystem__WEBPACK_IMPORTED_MODULE_1__["default"].notifyDialogInstance(dialog);
      window.scrollTo(0, 0);
    }
  }, {
    key: "render",
    value: function render() {
      var _this2 = this;

      var dialog = null;

      if (this.state.currentDialog) {
        dialog = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(this.state.currentDialog, _extends({
          ref: function ref(_ref) {
            return _this2.initDialogInstance(_ref);
          }
        }, this.props, this.state.currentDialogOptions));
      } else {
        _dialogSystem__WEBPACK_IMPORTED_MODULE_1__["default"].notifyDialogInstance(null);
      }

      if (!dialog) {
        return null;
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "dialog-slot"
      }, dialog, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "interface-protector"
      }));
    }
  }]);

  return DialogSlot;
}(react__WEBPACK_IMPORTED_MODULE_0__.Component);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DialogSlot);

/***/ }),

/***/ "./js/components/Link.jsx":
/*!********************************!*\
  !*** ./js/components/Link.jsx ***!
  \********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-router-dom */ "../node_modules/react-router-dom/esm/react-router-dom.js");




function LektorLink(props) {
  var path = props.to;

  if (path.substr(0, 1) !== "/") {
    path = $LEKTOR_CONFIG.admin_root + "/" + path;
  }

  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_2__.NavLink, {
    to: path,
    activeClassName: "active"
  }, props.children);
}

LektorLink.propTypes = {
  to: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LektorLink);

/***/ }),

/***/ "./js/components/RecordComponent.jsx":
/*!*******************************************!*\
  !*** ./js/components/RecordComponent.jsx ***!
  \*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "getRecordPathAndAlt": () => (/* binding */ getRecordPathAndAlt),
/* harmony export */   "default": () => (/* binding */ RecordComponent)
/* harmony export */ });
/* harmony import */ var _Component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Component */ "./js/components/Component.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



function getRecordPathAndAlt(path) {
  if (!path) {
    return [null, null];
  }

  var items = path.split(/\+/, 2);
  return [(0,_utils__WEBPACK_IMPORTED_MODULE_1__.urlToFsPath)(items[0]), items[1]];
}
/* a react component baseclass that has some basic knowledge about
   the record it works with. */

var RecordComponent = /*#__PURE__*/function (_Component) {
  _inherits(RecordComponent, _Component);

  var _super = _createSuper(RecordComponent);

  function RecordComponent() {
    _classCallCheck(this, RecordComponent);

    return _super.apply(this, arguments);
  }

  _createClass(RecordComponent, [{
    key: "getRecordPath",
    value:
    /* this returns the path of the current record.  If the current page does
     * not have a path component then null is returned. */
    function getRecordPath() {
      var _getRecordPathAndAlt = getRecordPathAndAlt(this.props.match.params.path),
          _getRecordPathAndAlt2 = _slicedToArray(_getRecordPathAndAlt, 1),
          path = _getRecordPathAndAlt2[0];

      return path;
    }
    /* returns the current alt */

  }, {
    key: "getRecordAlt",
    value: function getRecordAlt() {
      var _getRecordPathAndAlt3 = getRecordPathAndAlt(this.props.match.params.path),
          _getRecordPathAndAlt4 = _slicedToArray(_getRecordPathAndAlt3, 2),
          alt = _getRecordPathAndAlt4[1];

      return !alt ? "_primary" : alt;
    }
    /* return the url path for the current record path (or a modified one)
       by preserving or overriding the alt */

  }, {
    key: "getUrlRecordPathWithAlt",
    value: function getUrlRecordPathWithAlt(newPath, newAlt) {
      if (newPath === undefined || newPath === null) {
        newPath = this.getRecordPath();
      }

      if (newAlt === undefined || newAlt === null) {
        newAlt = this.getRecordAlt();
      }

      var rv = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fsToUrlPath)(newPath);

      if (newAlt !== "_primary") {
        rv += "+" + newAlt;
      }

      return rv;
    }
    /* returns the parent path if available */

  }, {
    key: "getParentRecordPath",
    value: function getParentRecordPath() {
      return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.getParentFsPath)(this.getRecordPath());
    }
  }]);

  return RecordComponent;
}(_Component__WEBPACK_IMPORTED_MODULE_0__["default"]);



/***/ }),

/***/ "./js/components/ServerStatus.jsx":
/*!****************************************!*\
  !*** ./js/components/ServerStatus.jsx ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _richPromise__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../richPromise */ "./js/richPromise.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }






var ServerStatus = /*#__PURE__*/function (_React$Component) {
  _inherits(ServerStatus, _React$Component);

  var _super = _createSuper(ServerStatus);

  function ServerStatus(props) {
    var _this;

    _classCallCheck(this, ServerStatus);

    _this = _super.call(this, props);
    _this.state = {
      serverIsUp: true,
      projectId: null
    };
    _this.intervalId = null;
    _this.onInterval = _this.onInterval.bind(_assertThisInitialized(_this));
    return _this;
  }

  _createClass(ServerStatus, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      this.intervalId = window.setInterval(this.onInterval, 2000);
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      if (this.intervalId !== null) {
        window.clearInterval(this.intervalId);
        this.intervalId = null;
      }
    }
  }, {
    key: "onInterval",
    value: function onInterval() {
      var _this2 = this;

      (0,_utils__WEBPACK_IMPORTED_MODULE_1__.loadData)("/ping", {}, null, _richPromise__WEBPACK_IMPORTED_MODULE_3__["default"]).then(function (resp) {
        if (_this2.state.projectId === null) {
          _this2.setState({
            projectId: resp.project_id
          });
        }

        _this2.setState({
          serverIsUp: _this2.state.projectId === resp.project_id
        });
      }, function () {
        _this2.setState({
          serverIsUp: false
        });
      });
    }
  }, {
    key: "render",
    value: function render() {
      if (this.state.serverIsUp) {
        return null;
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "server-down-panel"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "server-down-dialog"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3", null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ERROR_SERVER_UNAVAILABLE")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ERROR_SERVER_UNAVAILABLE_MESSAGE"))));
    }
  }]);

  return ServerStatus;
}(react__WEBPACK_IMPORTED_MODULE_0__.Component);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ServerStatus);

/***/ }),

/***/ "./js/components/Sidebar.jsx":
/*!***********************************!*\
  !*** ./js/components/Sidebar.jsx ***!
  \***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _hub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hub */ "./js/hub.jsx");
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../events */ "./js/events.jsx");
/* harmony import */ var _RecordComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./RecordComponent */ "./js/components/RecordComponent.jsx");
/* harmony import */ var _components_Link__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../components/Link */ "./js/components/Link.jsx");
/* harmony import */ var _richPromise__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../richPromise */ "./js/richPromise.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

/* eslint-env browser */









var getBrowseButtonTitle = function getBrowseButtonTitle() {
  var platform = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.getPlatform)();

  if (platform === "mac") {
    return _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("BROWSE_FS_MAC");
  } else if (platform === "windows") {
    return _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("BROWSE_FS_WINDOWS");
  } else {
    return _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("BROWSE_FS");
  }
};

var CHILDREN_PER_PAGE = 15;

var ChildPosCache = /*#__PURE__*/function () {
  function ChildPosCache() {
    _classCallCheck(this, ChildPosCache);

    this.memo = [];
  }

  _createClass(ChildPosCache, [{
    key: "rememberPosition",
    value: function rememberPosition(record, page) {
      for (var i = 0; i < this.memo.length; i++) {
        if (this.memo[i][0] === record) {
          this.memo[i][1] = page;
          return;
        }
      }

      this.memo.unshift([record, page]);

      if (this.memo.length > 5) {
        this.memo.length = 5;
      }
    }
  }, {
    key: "getPosition",
    value: function getPosition(record, childCount) {
      for (var i = 0; i < this.memo.length; i++) {
        if (this.memo[i][0] === record) {
          var rv = this.memo[i][1];

          if (childCount !== undefined) {
            rv = Math.min(rv, Math.ceil(childCount / CHILDREN_PER_PAGE));
          }

          return rv;
        }
      }

      return 1;
    }
  }]);

  return ChildPosCache;
}();

var Sidebar = /*#__PURE__*/function (_RecordComponent) {
  _inherits(Sidebar, _RecordComponent);

  var _super = _createSuper(Sidebar);

  function Sidebar(props) {
    var _this;

    _classCallCheck(this, Sidebar);

    _this = _super.call(this, props);
    _this.state = _this._getInitialState();
    _this.childPosCache = new ChildPosCache();
    _this.onAttachmentsChanged = _this.onAttachmentsChanged.bind(_assertThisInitialized(_this));
    return _this;
  }

  _createClass(Sidebar, [{
    key: "_getInitialState",
    value: function _getInitialState() {
      return {
        recordAttachments: [],
        recordChildren: [],
        recordAlts: [],
        canHaveAttachments: false,
        canHaveChildren: false,
        isAttachment: false,
        canBeDeleted: false,
        recordExists: false,
        lastRecordRequest: null,
        childrenPage: 1
      };
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      _get(_getPrototypeOf(Sidebar.prototype), "componentDidMount", this).call(this);

      this._updateRecordInfo();

      _hub__WEBPACK_IMPORTED_MODULE_3__["default"].subscribe(_events__WEBPACK_IMPORTED_MODULE_4__.AttachmentsChangedEvent, this.onAttachmentsChanged);
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps, prevState) {
      _get(_getPrototypeOf(Sidebar.prototype), "componentDidUpdate", this).call(this, prevProps, prevState);

      if (prevProps.match.params.path !== this.props.match.params.path) {
        this._updateRecordInfo();
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      _get(_getPrototypeOf(Sidebar.prototype), "componentWillUnmount", this).call(this);

      _hub__WEBPACK_IMPORTED_MODULE_3__["default"].unsubscribe(_events__WEBPACK_IMPORTED_MODULE_4__.AttachmentsChangedEvent, this.onAttachmentsChanged);
    }
  }, {
    key: "onAttachmentsChanged",
    value: function onAttachmentsChanged(event) {
      if (event.recordPath === this.getRecordPath()) {
        this._updateRecordInfo();
      }
    }
  }, {
    key: "_updateRecordInfo",
    value: function _updateRecordInfo() {
      var _this2 = this;

      var path = this.getRecordPath();

      if (path === null) {
        this.setState(this._getInitialState());
        return;
      }

      this.setState({
        lastRecordRequest: path
      }, function () {
        (0,_utils__WEBPACK_IMPORTED_MODULE_1__.loadData)("/recordinfo", {
          path: path
        }, null, _richPromise__WEBPACK_IMPORTED_MODULE_7__["default"]).then(function (resp) {
          // we're already fetching something else.
          if (path !== _this2.state.lastRecordRequest) {
            return;
          }

          var alts = resp.alts;
          alts.sort(function (a, b) {
            var nameA = (a.is_primary ? "A" : "B") + _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans(a.name_i18n);
            var nameB = (b.is_primary ? "A" : "B") + _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans(b.name_i18n);
            return nameA === nameB ? 0 : nameA < nameB ? -1 : 1;
          });

          _this2.setState({
            recordAttachments: resp.attachments,
            recordChildren: resp.children,
            recordAlts: alts,
            canHaveAttachments: resp.can_have_attachments,
            canHaveChildren: resp.can_have_children,
            isAttachment: resp.is_attachment,
            canBeDeleted: resp.can_be_deleted,
            recordExists: resp.exists,
            childrenPage: _this2.childPosCache.getPosition(path, resp.children.length)
          });
        });
      });
    }
  }, {
    key: "fsOpen",
    value: function fsOpen(event) {
      event.preventDefault();
      (0,_utils__WEBPACK_IMPORTED_MODULE_1__.apiRequest)("/browsefs", {
        data: {
          path: this.getRecordPath(),
          alt: this.getRecordAlt()
        },
        // eslint-disable-next-line indent
        method: "POST"
      }, _richPromise__WEBPACK_IMPORTED_MODULE_7__["default"]).then(function (resp) {
        if (!resp.okay) {
          alert(_i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ERROR_CANNOT_BROWSE_FS"));
        }
      });
    }
  }, {
    key: "renderPageActions",
    value: function renderPageActions() {
      var urlPath = this.getUrlRecordPathWithAlt();
      var links = [];
      var deleteLink = null;
      links.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
        key: "edit"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Link__WEBPACK_IMPORTED_MODULE_6__["default"], {
        to: "".concat(urlPath, "/edit")
      }, this.state.isAttachment ? _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("EDIT_METADATA") : _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("EDIT"))));

      if (this.state.canBeDeleted) {
        links.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
          key: "delete"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Link__WEBPACK_IMPORTED_MODULE_6__["default"], {
          to: "".concat(urlPath, "/delete")
        }, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("DELETE"))));
      }

      links.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
        key: "preview"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Link__WEBPACK_IMPORTED_MODULE_6__["default"], {
        to: "".concat(urlPath, "/preview")
      }, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("PREVIEW"))));

      if (this.state.recordExists) {
        links.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
          key: "fs-open"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("a", {
          href: "#",
          onClick: this.fsOpen.bind(this)
        }, getBrowseButtonTitle())));
      }

      if (this.state.canHaveChildren) {
        links.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
          key: "add-child"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Link__WEBPACK_IMPORTED_MODULE_6__["default"], {
          to: "".concat(urlPath, "/add-child")
        }, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ADD_CHILD_PAGE"))));
      }

      if (this.state.canHaveAttachments) {
        links.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
          key: "add-attachment"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Link__WEBPACK_IMPORTED_MODULE_6__["default"], {
          to: "".concat(urlPath, "/upload")
        }, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ADD_ATTACHMENT"))));
      }

      var title = this.state.isAttachment ? _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ATTACHMENT_ACTIONS") : _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("PAGE_ACTIONS");
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        key: "actions",
        className: "section"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3", null, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", {
        className: "nav"
      }, links, deleteLink));
    }
  }, {
    key: "renderAlts",
    value: function renderAlts() {
      var _this3 = this;

      if (this.state.recordAlts.length < 2) {
        return null;
      }

      var items = this.state.recordAlts.map(function (item) {
        var title = _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans(item.name_i18n);
        var className = "alt";

        if (item.is_primary) {
          title += " (" + _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("PRIMARY_ALT") + ")";
        } else if (item.primary_overlay) {
          title += " (" + _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("PRIMARY_OVERLAY") + ")";
        }

        if (!item.exists) {
          className += " alt-missing";
        }

        var path = _this3.getPathToAdminPage(null, {
          path: _this3.getUrlRecordPathWithAlt(null, item.alt)
        });

        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
          key: item.alt,
          className: className
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Link__WEBPACK_IMPORTED_MODULE_6__["default"], {
          to: path
        }, title));
      });
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        key: "alts",
        className: "section"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3", null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ALTS")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", {
        className: "nav"
      }, items));
    }
  }, {
    key: "renderChildPagination",
    value: function renderChildPagination() {
      var _this4 = this;

      var pages = Math.ceil(this.state.recordChildren.length / CHILDREN_PER_PAGE);

      if (pages <= 1) {
        return null;
      }

      var page = this.state.childrenPage;

      var goToPage = function goToPage(diff, event) {
        event.preventDefault();
        var newPage = page + diff;

        _this4.childPosCache.rememberPosition(_this4.getRecordPath(), newPage);

        _this4.setState({
          childrenPage: newPage
        });
      };

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
        className: "pagination"
      }, page > 1 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("a", {
        href: "#",
        onClick: goToPage.bind(this, -1)
      }, "\xAB") : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("em", null, "\xAB"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", {
        className: "page"
      }, page + " / " + pages), page < pages ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("a", {
        href: "#",
        onClick: goToPage.bind(this, +1)
      }, "\xBB") : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("em", null, "\xBB"));
    }
  }, {
    key: "renderChildActions",
    value: function renderChildActions() {
      var _this5 = this;

      var target = this.props.match.params.page === "preview" ? "preview" : "edit";
      var children = this.state.recordChildren.slice((this.state.childrenPage - 1) * CHILDREN_PER_PAGE, this.state.childrenPage * CHILDREN_PER_PAGE);
      var items = children.map(function (child) {
        var urlPath = _this5.getUrlRecordPathWithAlt(child.path);

        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
          key: child.id
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Link__WEBPACK_IMPORTED_MODULE_6__["default"], {
          to: "".concat(urlPath, "/").concat(target)
        }, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans(child.label_i18n)));
      });

      if (items.length === 0) {
        items.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
          key: "_missing"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("em", null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("NO_CHILD_PAGES"))));
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        key: "children",
        className: "section"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3", null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("CHILD_PAGES")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", {
        className: "nav record-children"
      }, this.renderChildPagination(), items));
    }
  }, {
    key: "renderAttachmentActions",
    value: function renderAttachmentActions() {
      var _this6 = this;

      var items = this.state.recordAttachments.map(function (atch) {
        var urlPath = _this6.getUrlRecordPathWithAlt(atch.path);

        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
          key: atch.id
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Link__WEBPACK_IMPORTED_MODULE_6__["default"], {
          to: "".concat(urlPath, "/edit")
        }, atch.id, " (", atch.type, ")"));
      });

      if (items.length === 0) {
        items.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
          key: "_missing"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("em", null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("NO_ATTACHMENTS"))));
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        key: "attachments",
        className: "section"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3", null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ATTACHMENTS")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", {
        className: "nav record-attachments"
      }, items));
    }
  }, {
    key: "render",
    value: function render() {
      var sections = [];

      if (this.getRecordPath() !== null) {
        sections.push(this.renderPageActions());
      }

      sections.push(this.renderAlts());

      if (this.state.canHaveChildren) {
        sections.push(this.renderChildActions());
      }

      if (this.state.canHaveAttachments) {
        sections.push(this.renderAttachmentActions());
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "sidebar-wrapper"
      }, sections);
    }
  }]);

  return Sidebar;
}(_RecordComponent__WEBPACK_IMPORTED_MODULE_5__["default"]);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Sidebar);

/***/ }),

/***/ "./js/components/SlideDialog.jsx":
/*!***************************************!*\
  !*** ./js/components/SlideDialog.jsx ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _dialogSystem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dialogSystem */ "./js/dialogSystem.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }






var SlideDialog = /*#__PURE__*/function (_React$Component) {
  _inherits(SlideDialog, _React$Component);

  var _super = _createSuper(SlideDialog);

  function SlideDialog(props) {
    var _this;

    _classCallCheck(this, SlideDialog);

    _this = _super.call(this, props);
    _this._onKeyPress = _this._onKeyPress.bind(_assertThisInitialized(_this));
    return _this;
  }

  _createClass(SlideDialog, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      if (this.props.closeOnEscape) {
        window.addEventListener("keydown", this._onKeyPress);
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      window.removeEventListener("keydown", this._onKeyPress);
    }
  }, {
    key: "_onKeyPress",
    value: function _onKeyPress(event) {
      if (event.which === 27 && this.props.closeOnEscape) {
        event.preventDefault();
        _dialogSystem__WEBPACK_IMPORTED_MODULE_2__["default"].dismissDialog();
      }
    }
  }, {
    key: "_onCloseClick",
    value: function _onCloseClick(event) {
      event.preventDefault();
      _dialogSystem__WEBPACK_IMPORTED_MODULE_2__["default"].dismissDialog();
    }
  }, {
    key: "render",
    value: function render() {
      var _this$props = this.props,
          children = _this$props.children,
          title = _this$props.title,
          hasCloseButton = _this$props.hasCloseButton,
          className = _this$props.className;
      className = (className || "") + " sliding-panel container";
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
        className: className
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
        className: "col-md-6 col-md-offset-4"
      }, hasCloseButton && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("a", {
        href: "#",
        className: "close-btn",
        onClick: this._onCloseClick.bind(this)
      }, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("CLOSE")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("h3", null, title), children));
    }
  }]);

  return SlideDialog;
}(react__WEBPACK_IMPORTED_MODULE_1__.Component);

SlideDialog.propTypes = {
  title: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
  hasCloseButton: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
  closeOnEscape: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SlideDialog);

/***/ }),

/***/ "./js/components/ToggleGroup.jsx":
/*!***************************************!*\
  !*** ./js/components/ToggleGroup.jsx ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

var _excluded = ["className", "groupTitle", "children", "defaultVisibility"];

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }




var ToggleGroup = /*#__PURE__*/function (_React$Component) {
  _inherits(ToggleGroup, _React$Component);

  var _super = _createSuper(ToggleGroup);

  function ToggleGroup(props) {
    var _this;

    _classCallCheck(this, ToggleGroup);

    _this = _super.call(this, props);
    _this.state = {
      isVisible: props.defaultVisibility
    };
    return _this;
  }

  _createClass(ToggleGroup, [{
    key: "toggle",
    value: function toggle(event) {
      event.preventDefault();
      this.setState({
        isVisible: !this.state.isVisible
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this$props = this.props,
          className = _this$props.className,
          groupTitle = _this$props.groupTitle,
          children = _this$props.children,
          defaultVisibility = _this$props.defaultVisibility,
          otherProps = _objectWithoutProperties(_this$props, _excluded);

      className = (className || "") + " toggle-group";

      if (this.state.isVisible) {
        className += " toggle-group-open";
      } else {
        className += " toggle-group-closed";
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", _extends({
        className: className
      }, otherProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "header"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h4", {
        className: "toggle",
        onClick: this.toggle.bind(this)
      }, groupTitle)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "children"
      }, children));
    }
  }]);

  return ToggleGroup;
}(react__WEBPACK_IMPORTED_MODULE_0__.Component);

ToggleGroup.propTypes = {
  groupTitle: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
  defaultVisibility: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool)
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ToggleGroup);

/***/ }),

/***/ "./js/dialogSystem.jsx":
/*!*****************************!*\
  !*** ./js/dialogSystem.jsx ***!
  \*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _hub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hub */ "./js/hub.jsx");
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./events */ "./js/events.jsx");
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }




var DialogSystem = /*#__PURE__*/function () {
  function DialogSystem() {
    _classCallCheck(this, DialogSystem);

    this._dialogInstance = null;
  } // invoked by the application once the dialog has been created.


  _createClass(DialogSystem, [{
    key: "notifyDialogInstance",
    value: function notifyDialogInstance(dialog) {
      this._dialogInstance = dialog;
    } // given a dialog class this will instruct the application to bring up
    // the dialog and display it.

  }, {
    key: "showDialog",
    value: function showDialog(dialog, options) {
      // if the current dialog prevents navigation, then we just silently
      // will not show the dialog.
      if (!this.preventNavigation()) {
        _hub__WEBPACK_IMPORTED_MODULE_0__["default"].emit(new _events__WEBPACK_IMPORTED_MODULE_1__.DialogChangedEvent({
          dialog: dialog,
          dialogOptions: options || {}
        }));
      }
    } // tells the application to dismiss the current dialog.

  }, {
    key: "dismissDialog",
    value: function dismissDialog() {
      if (!this.preventNavigation()) {
        _hub__WEBPACK_IMPORTED_MODULE_0__["default"].emit(new _events__WEBPACK_IMPORTED_MODULE_1__.DialogChangedEvent({
          currentDialog: null
        }));
      }
    } // indicates if a dialog is shown

  }, {
    key: "dialogIsOpen",
    value: function dialogIsOpen() {
      return !!this._dialogInstance;
    } // returns true if the current dialog prevents navigation.

  }, {
    key: "preventNavigation",
    value: function preventNavigation() {
      return this._dialogInstance && this._dialogInstance.preventNavigation !== undefined && this._dialogInstance.preventNavigation();
    }
  }]);

  return DialogSystem;
}();

var dialogSystem = new DialogSystem();
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (dialogSystem);

/***/ }),

/***/ "./js/dialogs/Refresh.jsx":
/*!********************************!*\
  !*** ./js/dialogs/Refresh.jsx ***!
  \********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _components_Component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/Component */ "./js/components/Component.jsx");
/* harmony import */ var _components_SlideDialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/SlideDialog */ "./js/components/SlideDialog.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _dialogSystem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../dialogSystem */ "./js/dialogSystem.jsx");
/* harmony import */ var _richPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../richPromise */ "./js/richPromise.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }









var Refresh = /*#__PURE__*/function (_Component) {
  _inherits(Refresh, _Component);

  var _super = _createSuper(Refresh);

  function Refresh(props) {
    var _this;

    _classCallCheck(this, Refresh);

    _this = _super.call(this, props);
    _this.state = {
      currentState: "IDLE"
    };
    return _this;
  }

  _createClass(Refresh, [{
    key: "preventNavigation",
    value: function preventNavigation() {
      return !this.isSafeToNavigate();
    }
  }, {
    key: "isSafeToNavigate",
    value: function isSafeToNavigate() {
      return this.state.currentState === "IDLE" || this.state.currentState === "DONE";
    }
  }, {
    key: "onRefresh",
    value: function onRefresh() {
      var _this2 = this;

      this.setState({
        currentState: "CLEANING"
      });
      (0,_utils__WEBPACK_IMPORTED_MODULE_3__.apiRequest)("/clean", {
        method: "POST"
      }, _richPromise__WEBPACK_IMPORTED_MODULE_6__["default"]).then(function (resp) {
        _this2.setState({
          currentState: "DONE"
        });
      });
    }
  }, {
    key: "onCancel",
    value: function onCancel() {
      _dialogSystem__WEBPACK_IMPORTED_MODULE_5__["default"].dismissDialog();
    }
  }, {
    key: "render",
    value: function render() {
      var progress = null;

      if (this.state.currentState !== "IDLE") {
        progress = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3", null, this.state.currentState !== "DONE" ? _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("CURRENTLY_REFRESHING_BUILD") : _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("REFRESHING_BUILD_DONE")));
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_SlideDialog__WEBPACK_IMPORTED_MODULE_2__["default"], {
        hasCloseButton: false,
        closeOnEscape: true,
        title: _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("REFRESH_BUILD")
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("REFRESH_BUILD_NOTE")), progress, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "actions"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        type: "submit",
        className: "btn btn-primary",
        disabled: !this.isSafeToNavigate(),
        onClick: this.onRefresh.bind(this)
      }, _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("REFRESH_BUILD")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        type: "submit",
        className: "btn btn-default",
        disabled: !this.isSafeToNavigate(),
        onClick: this.onCancel.bind(this)
      }, _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans(this.state.currentState === "DONE" ? "CLOSE" : "CANCEL"))));
    }
  }]);

  return Refresh;
}(_components_Component__WEBPACK_IMPORTED_MODULE_1__["default"]);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Refresh);

/***/ }),

/***/ "./js/dialogs/errorDialog.jsx":
/*!************************************!*\
  !*** ./js/dialogs/errorDialog.jsx ***!
  \************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _components_RecordComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/RecordComponent */ "./js/components/RecordComponent.jsx");
/* harmony import */ var _components_SlideDialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/SlideDialog */ "./js/components/SlideDialog.jsx");
/* harmony import */ var _dialogSystem__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../dialogSystem */ "./js/dialogSystem.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }








var ErrorDialog = /*#__PURE__*/function (_RecordComponent) {
  _inherits(ErrorDialog, _RecordComponent);

  var _super = _createSuper(ErrorDialog);

  function ErrorDialog() {
    _classCallCheck(this, ErrorDialog);

    return _super.apply(this, arguments);
  }

  _createClass(ErrorDialog, [{
    key: "onClose",
    value: function onClose() {
      _dialogSystem__WEBPACK_IMPORTED_MODULE_4__["default"].dismissDialog();
    }
  }, {
    key: "render",
    value: function render() {
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_SlideDialog__WEBPACK_IMPORTED_MODULE_3__["default"], {
        hasCloseButton: true,
        closeOnEscape: true,
        title: _i18n__WEBPACK_IMPORTED_MODULE_5__["default"].trans("ERROR")
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("p", null, _i18n__WEBPACK_IMPORTED_MODULE_5__["default"].trans("ERROR_OCURRED"), ": ", _i18n__WEBPACK_IMPORTED_MODULE_5__["default"].trans("ERROR_" + this.props.error.code)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
        className: "actions"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", {
        type: "submit",
        className: "btn btn-primary",
        onClick: this.onClose.bind(this)
      }, _i18n__WEBPACK_IMPORTED_MODULE_5__["default"].trans("CLOSE"))));
    }
  }]);

  return ErrorDialog;
}(_components_RecordComponent__WEBPACK_IMPORTED_MODULE_2__["default"]);

ErrorDialog.propTypes = {
  error: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ErrorDialog);

/***/ }),

/***/ "./js/dialogs/findFiles.jsx":
/*!**********************************!*\
  !*** ./js/dialogs/findFiles.jsx ***!
  \**********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _components_RecordComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/RecordComponent */ "./js/components/RecordComponent.jsx");
/* harmony import */ var _components_SlideDialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/SlideDialog */ "./js/components/SlideDialog.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _dialogSystem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../dialogSystem */ "./js/dialogSystem.jsx");
/* harmony import */ var _richPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../richPromise */ "./js/richPromise.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }









var FindFiles = /*#__PURE__*/function (_RecordComponent) {
  _inherits(FindFiles, _RecordComponent);

  var _super = _createSuper(FindFiles);

  function FindFiles(props) {
    var _this;

    _classCallCheck(this, FindFiles);

    _this = _super.call(this, props);
    _this.state = {
      query: "",
      currentSelection: -1,
      results: []
    };
    return _this;
  }

  _createClass(FindFiles, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      _get(_getPrototypeOf(FindFiles.prototype), "componentDidMount", this).call(this);

      this.refs.q.focus();
    }
  }, {
    key: "onInputChange",
    value: function onInputChange(e) {
      var _this2 = this;

      var q = e.target.value;

      if (q === "") {
        this.setState({
          query: "",
          results: [],
          currentSelection: -1
        });
      } else {
        this.setState({
          query: q
        });
        (0,_utils__WEBPACK_IMPORTED_MODULE_3__.apiRequest)("/find", {
          data: {
            q: q,
            alt: this.getRecordAlt(),
            lang: _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].currentLanguage
          },
          method: "POST"
        }, _richPromise__WEBPACK_IMPORTED_MODULE_6__["default"]).then(function (resp) {
          _this2.setState({
            results: resp.results,
            currentSelection: Math.min(_this2.state.currentSelection, resp.results.length - 1)
          });
        });
      }
    }
  }, {
    key: "onInputKey",
    value: function onInputKey(e) {
      var sel = this.state.currentSelection;
      var max = this.state.results.length;

      if (e.which === 40) {
        e.preventDefault();
        sel = (sel + 1) % max;
      } else if (e.which === 38) {
        e.preventDefault();
        sel = (sel - 1 + max) % max;
      } else if (e.which === 13) {
        this.onActiveItem(this.state.currentSelection);
      }

      this.setState({
        currentSelection: sel
      });
    }
  }, {
    key: "onActiveItem",
    value: function onActiveItem(index) {
      var item = this.state.results[index];

      if (item !== undefined) {
        var target = this.props.match.params.page === "preview" ? ".preview" : ".edit";
        var urlPath = this.getUrlRecordPathWithAlt(item.path);
        _dialogSystem__WEBPACK_IMPORTED_MODULE_5__["default"].dismissDialog();
        this.transitionToAdminPage(target, {
          path: urlPath
        });
      }
    }
  }, {
    key: "selectItem",
    value: function selectItem(index) {
      this.setState({
        currentSelection: Math.min(index, this.state.results.length - 1)
      });
    }
  }, {
    key: "renderResults",
    value: function renderResults() {
      var _this3 = this;

      var rv = this.state.results.map(function (result, idx) {
        var parents = result.parents.map(function (item, idx) {
          return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", {
            className: "parent",
            key: idx
          }, item.title);
        });
        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
          key: idx,
          className: idx === _this3.state.currentSelection ? "active" : "",
          onClick: _this3.onActiveItem.bind(_this3, idx),
          onMouseEnter: _this3.selectItem.bind(_this3, idx)
        }, parents, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong", null, result.title));
      });
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", {
        className: "search-results"
      }, rv);
    }
  }, {
    key: "render",
    value: function render() {
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_SlideDialog__WEBPACK_IMPORTED_MODULE_2__["default"], {
        hasCloseButton: true,
        closeOnEscape: true,
        title: _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("FIND_FILES")
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "form-group"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", {
        type: "text",
        ref: "q",
        className: "form-control",
        value: this.state.query,
        onChange: this.onInputChange.bind(this),
        onKeyDown: this.onInputKey.bind(this),
        placeholder: _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("FIND_FILES_PLACEHOLDER")
      })), this.renderResults());
    }
  }]);

  return FindFiles;
}(_components_RecordComponent__WEBPACK_IMPORTED_MODULE_1__["default"]);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FindFiles);

/***/ }),

/***/ "./js/dialogs/publish.jsx":
/*!********************************!*\
  !*** ./js/dialogs/publish.jsx ***!
  \********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _components_Component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/Component */ "./js/components/Component.jsx");
/* harmony import */ var _components_SlideDialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/SlideDialog */ "./js/components/SlideDialog.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _dialogSystem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../dialogSystem */ "./js/dialogSystem.jsx");
/* harmony import */ var _richPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../richPromise */ "./js/richPromise.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/* eslint-env browser */








var Publish = /*#__PURE__*/function (_Component) {
  _inherits(Publish, _Component);

  var _super = _createSuper(Publish);

  function Publish(props) {
    var _this;

    _classCallCheck(this, Publish);

    _this = _super.call(this, props);
    _this.state = {
      servers: [],
      activeTarget: null,
      log: [],
      currentState: "IDLE"
    };
    return _this;
  }

  _createClass(Publish, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      _get(_getPrototypeOf(Publish.prototype), "componentDidMount", this).call(this);

      this.syncDialog();
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(nextProps) {
      _get(_getPrototypeOf(Publish.prototype), "componentDidUpdate", this).call(this);

      if (nextProps.match.params.path !== this.props.match.params.path) {
        this.syncDialog();
      }

      var node = this.refs.log;

      if (node) {
        node.scrollTop = node.scrollHeight;
      }
    }
  }, {
    key: "preventNavigation",
    value: function preventNavigation() {
      return !this.isSafeToPublish();
    }
  }, {
    key: "syncDialog",
    value: function syncDialog() {
      var _this2 = this;

      (0,_utils__WEBPACK_IMPORTED_MODULE_3__.loadData)("/servers", {}, null, _richPromise__WEBPACK_IMPORTED_MODULE_6__["default"]).then(function (_ref) {
        var servers = _ref.servers;

        _this2.setState({
          servers: servers,
          activeTarget: servers && servers.length ? servers[0].id : null
        });
      });
    }
  }, {
    key: "isSafeToPublish",
    value: function isSafeToPublish() {
      return this.state.currentState === "IDLE" || this.state.currentState === "DONE";
    }
  }, {
    key: "onPublish",
    value: function onPublish() {
      if (this.isSafeToPublish()) {
        this._beginBuild();
      }
    }
  }, {
    key: "onCancel",
    value: function onCancel() {
      _dialogSystem__WEBPACK_IMPORTED_MODULE_5__["default"].dismissDialog();
    }
  }, {
    key: "_beginBuild",
    value: function _beginBuild() {
      var _this3 = this;

      this.setState({
        log: [],
        currentState: "BUILDING"
      });
      (0,_utils__WEBPACK_IMPORTED_MODULE_3__.apiRequest)("/build", {
        method: "POST"
      }, _richPromise__WEBPACK_IMPORTED_MODULE_6__["default"]).then(function (resp) {
        _this3._beginPublish();
      });
    }
  }, {
    key: "_beginPublish",
    value: function _beginPublish() {
      var _this4 = this;

      this.setState({
        currentState: "PUBLISH"
      });
      var es = new EventSource((0,_utils__WEBPACK_IMPORTED_MODULE_3__.getApiUrl)("/publish") + "?server=" + encodeURIComponent(this.state.activeTarget));
      es.addEventListener("message", function (event) {
        var data = JSON.parse(event.data);

        if (data === null) {
          _this4.setState({
            currentState: "DONE"
          });

          es.close();
        } else {
          _this4.setState({
            log: _this4.state.log.concat(data.msg)
          });
        }
      });
    }
  }, {
    key: "onSelectServer",
    value: function onSelectServer(event) {
      this.setState({
        activeTarget: event.target.value
      });
    }
  }, {
    key: "render",
    value: function render() {
      var servers = this.state.servers.map(function (server) {
        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("option", {
          value: server.id,
          key: server.id
        }, _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans(server.name_i18n) + " (" + server.short_target + ")");
      });
      var progress = null;

      if (this.state.currentState !== "IDLE") {
        progress = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3", null, this.state.currentState !== "DONE" ? _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("CURRENTLY_PUBLISHING") : _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("PUBLISH_DONE")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("pre", null, _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("STATE") + ": " + _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("PUBLISH_STATE_" + this.state.currentState)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("pre", {
          ref: "log",
          className: "build-log"
        }, this.state.log.join("\n")));
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_SlideDialog__WEBPACK_IMPORTED_MODULE_2__["default"], {
        hasCloseButton: false,
        closeOnEscape: true,
        title: _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("PUBLISH")
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("PUBLISH_NOTE")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("dl", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("dt", null, _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("PUBLISH_SERVER")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("dd", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "input-group"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("select", {
        value: this.state.activeTarget,
        onChange: this.onSelectServer.bind(this),
        className: "form-control"
      }, servers)))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "actions"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        type: "submit",
        className: "btn btn-primary",
        disabled: !this.isSafeToPublish(),
        onClick: this.onPublish.bind(this)
      }, _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("PUBLISH")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        type: "submit",
        className: "btn btn-default",
        disabled: !this.isSafeToPublish(),
        onClick: this.onCancel.bind(this)
      }, _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans(this.state.currentState === "DONE" ? "CLOSE" : "CANCEL"))), progress);
    }
  }]);

  return Publish;
}(_components_Component__WEBPACK_IMPORTED_MODULE_1__["default"]);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Publish);

/***/ }),

/***/ "./js/events.jsx":
/*!***********************!*\
  !*** ./js/events.jsx ***!
  \***********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "RecordEvent": () => (/* binding */ RecordEvent),
/* harmony export */   "AttachmentsChangedEvent": () => (/* binding */ AttachmentsChangedEvent),
/* harmony export */   "DialogChangedEvent": () => (/* binding */ DialogChangedEvent)
/* harmony export */ });
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

var Event = /*#__PURE__*/function () {
  function Event() {
    _classCallCheck(this, Event);
  }

  _createClass(Event, [{
    key: "type",
    get: function get() {
      return Object.getPrototypeOf(this).constructor.getEventType();
    }
  }, {
    key: "toString",
    value: function toString() {
      return "[Event " + this.type + "]";
    }
  }]);

  return Event;
}();

Event.getEventType = function () {
  return this.name;
};

var RecordEvent = /*#__PURE__*/function (_Event) {
  _inherits(RecordEvent, _Event);

  var _super = _createSuper(RecordEvent);

  function RecordEvent(options) {
    var _this;

    _classCallCheck(this, RecordEvent);

    _this = _super.call(this, options = options || {});
    _this.recordPath = options.recordPath;
    return _this;
  }

  return RecordEvent;
}(Event);
var AttachmentsChangedEvent = /*#__PURE__*/function (_RecordEvent) {
  _inherits(AttachmentsChangedEvent, _RecordEvent);

  var _super2 = _createSuper(AttachmentsChangedEvent);

  function AttachmentsChangedEvent(options) {
    var _this2;

    _classCallCheck(this, AttachmentsChangedEvent);

    _this2 = _super2.call(this, options = options || {});
    _this2.attachmentsAdded = options.attachmentsAdded || [];
    _this2.attachmentsRemoved = options.attachmentsRemoved || [];
    return _this2;
  }

  return AttachmentsChangedEvent;
}(RecordEvent);
var DialogChangedEvent = /*#__PURE__*/function (_Event2) {
  _inherits(DialogChangedEvent, _Event2);

  var _super3 = _createSuper(DialogChangedEvent);

  function DialogChangedEvent(options) {
    var _this3;

    _classCallCheck(this, DialogChangedEvent);

    _this3 = _super3.call(this, options = options || {});
    _this3.dialog = options.dialog;
    _this3.dialogOptions = options.dialogOptions;
    return _this3;
  }

  return DialogChangedEvent;
}(Event);

/***/ }),

/***/ "./js/hub.jsx":
/*!********************!*\
  !*** ./js/hub.jsx ***!
  \********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

var Hub = /*#__PURE__*/function () {
  function Hub() {
    _classCallCheck(this, Hub);

    this._subscriptions = {};
  }
  /* subscribes a callback to an event */


  _createClass(Hub, [{
    key: "subscribe",
    value: function subscribe(event, callback) {
      if (typeof event !== "string") {
        event = event.getEventType();
      }

      var subs = this._subscriptions[event];

      if (subs === undefined) {
        this._subscriptions[event] = subs = [];
      }

      for (var i = 0; i < subs.length; i++) {
        if (subs[i] === callback) {
          return false;
        }
      }

      subs.push(callback);
      return true;
    }
    /* unsubscribes a callback from an event */

  }, {
    key: "unsubscribe",
    value: function unsubscribe(event, callback) {
      if (typeof event !== "string") {
        event = event.getEventType();
      }

      var subs = this._subscriptions[event];

      if (subs === undefined) {
        return false;
      }

      for (var i = 0; i < subs.length; i++) {
        if (subs[i] === callback) {
          subs.splice(i, 1);
          return true;
        }
      }

      return false;
    }
    /* emits an event with some parameters */

  }, {
    key: "emit",
    value: function emit(event) {
      var subs = this._subscriptions[event.type];

      if (subs !== undefined) {
        subs.forEach(function (callback) {
          try {
            callback(event);
          } catch (e) {
            console.log("Event callback failed: ", e, "callback=", callback, "event=", event);
          }
        });
      }
    }
  }]);

  return Hub;
}();

var hub = new Hub();
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hub);

/***/ }),

/***/ "./js/i18n.jsx":
/*!*********************!*\
  !*** ./js/i18n.jsx ***!
  \*********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

var loadTranslations = function loadTranslations() {
  var ctx = __webpack_require__("../../translations sync recursive \\.json$");

  var rv = {};
  ctx.keys().forEach(function (key) {
    var langIdMatch = key.match(/([a-z]+)/);
    rv[langIdMatch[1]] = ctx(key);
  });
  return rv;
};

var i18n = {
  translations: loadTranslations(),
  currentLanguage: "en",
  setLanguageFromLocale: function setLanguageFromLocale(locale) {
    if (locale) {
      var lang = locale.split(/[-_]/)[0].toLowerCase();

      if (this.translations[lang] !== undefined) {
        this.currentLanguage = lang;
      }
    }
  },
  trans: function trans(key) {
    var rv;

    if (_typeof(key) === "object") {
      rv = key[i18n.currentLanguage];

      if (rv === undefined) {
        rv = key.en;
      }

      return rv;
    }

    return i18n.translations[i18n.currentLanguage][key] || key;
  }
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (i18n);

/***/ }),

/***/ "./js/main.jsx":
/*!*********************!*\
  !*** ./js/main.jsx ***!
  \*********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "../node_modules/react-dom/index.js");
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react-router-dom */ "../node_modules/react-router/esm/react-router.js");
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react-router-dom */ "../node_modules/react-router-dom/esm/react-router-dom.js");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./i18n */ "./js/i18n.jsx");
/* harmony import */ var bootstrap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! bootstrap */ "../node_modules/bootstrap/dist/js/npm.js");
/* harmony import */ var bootstrap__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(bootstrap__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _bootstrap_extras__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bootstrap-extras */ "./js/bootstrap-extras.jsx");
/* harmony import */ var font_awesome_css_font_awesome_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! font-awesome/css/font-awesome.css */ "../node_modules/font-awesome/css/font-awesome.css");
/* harmony import */ var event_source_polyfill__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! event-source-polyfill */ "../node_modules/event-source-polyfill/src/eventsource.js");
/* harmony import */ var event_source_polyfill__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(event_source_polyfill__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _views_App__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./views/App */ "./js/views/App.jsx");
/* harmony import */ var _views_EditPage__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./views/EditPage */ "./js/views/EditPage.jsx");
/* harmony import */ var _views_DeletePage__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./views/DeletePage */ "./js/views/DeletePage.jsx");
/* harmony import */ var _views_PreviewPage__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./views/PreviewPage */ "./js/views/PreviewPage.jsx");
/* harmony import */ var _views_AddChildPage__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./views/AddChildPage */ "./js/views/AddChildPage.jsx");
/* harmony import */ var _views_AddAttachmentPage__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./views/AddAttachmentPage */ "./js/views/AddAttachmentPage.jsx");






 // polyfill for internet explorer

 // route targets







_i18n__WEBPACK_IMPORTED_MODULE_2__["default"].currentLanguage = $LEKTOR_CONFIG.lang;

function BadRoute(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2", null, "Nothing to see here"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, "There is really nothing to see here."));
}

function Main(props) {
  var path = props.match.path;
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_views_App__WEBPACK_IMPORTED_MODULE_7__["default"], props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_13__.Switch, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_13__.Route, {
    name: "edit",
    path: "".concat(path, "/:path/edit"),
    component: _views_EditPage__WEBPACK_IMPORTED_MODULE_8__["default"]
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_13__.Route, {
    name: "delete",
    path: "".concat(path, "/:path/delete"),
    component: _views_DeletePage__WEBPACK_IMPORTED_MODULE_9__["default"]
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_13__.Route, {
    name: "preview",
    path: "".concat(path, "/:path/preview"),
    component: _views_PreviewPage__WEBPACK_IMPORTED_MODULE_10__["default"]
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_13__.Route, {
    name: "add-child",
    path: "".concat(path, "/:path/add-child"),
    component: _views_AddChildPage__WEBPACK_IMPORTED_MODULE_11__["default"]
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_13__.Route, {
    name: "upload",
    path: "".concat(path, "/:path/upload"),
    component: _views_AddAttachmentPage__WEBPACK_IMPORTED_MODULE_12__["default"]
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_13__.Route, {
    exact: true,
    path: path
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_13__.Redirect, {
    to: "".concat(path, "/root/edit")
  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_13__.Route, {
    component: BadRoute
  })));
}

var dash = document.getElementById("dash");

if (dash) {
  react_dom__WEBPACK_IMPORTED_MODULE_1__.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_14__.BrowserRouter, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_13__.Route, {
    name: "app",
    path: $LEKTOR_CONFIG.admin_root,
    component: Main
  })), dash);
}

/***/ }),

/***/ "./js/metaformat.jsx":
/*!***************************!*\
  !*** ./js/metaformat.jsx ***!
  \***************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

var lineIsDashes = function lineIsDashes(line) {
  line = line.match(/^\s*(.*?)\s*$/)[1];
  return line.length >= 3 && line === new Array(line.length + 1).join("-");
};

var processBuf = function processBuf(buf) {
  var lines = buf.map(function (line) {
    if (lineIsDashes(line)) {
      line = line.substr(1);
    }

    return line;
  });

  if (lines.length > 0) {
    var lastLine = lines[lines.length - 1];

    if (lastLine.substr(lastLine.length - 1) === "\n") {
      lines[lines.length - 1] = lastLine.substr(0, lastLine.length - 1);
    }
  }

  return lines;
};

var tokenize = function tokenize(lines) {
  var key = null;
  var buf = [];
  var wantNewline = false;
  var rv = [];

  var flushItem = function flushItem() {
    rv.push([key, processBuf(buf)]);
    key = null;
    buf = [];
  };

  for (var i = 0; i < lines.length; i++) {
    var line = lines[i].match(/^(.*?)(\r?\n)*$/m)[1] + "\n";

    if (line.match(/^(.*?)\s*$/m)[1] === "---") {
      wantNewline = false;

      if (key !== null) {
        flushItem();
      }
    } else if (key !== null) {
      if (wantNewline) {
        wantNewline = false;

        if (line.match(/^\s*$/)) {
          continue;
        }
      }

      buf.push(line);
    } else {
      var bits = line.split(":");

      if (bits.length >= 2) {
        key = bits.shift().match(/^\s*(.*?)\s*$/m)[1];
        var firstBit = bits.join(":").match(/^[\t ]*(.*?)[\t ]*$/m)[1];

        if (!firstBit.match(/^\s*$/)) {
          buf = [firstBit];
        } else {
          buf = [];
          wantNewline = true;
        }
      }
    }
  }

  if (key !== null) {
    flushItem();
  }

  return rv;
};

var serialize = function serialize(blocks) {
  var rv = [];
  blocks.forEach(function (item, idx) {
    var _item = _slicedToArray(item, 2),
        key = _item[0],
        value = _item[1];

    if (idx > 0) {
      rv.push("---\n");
    }

    if (value.match(/([\r\n]|(^[\t ])|([\t ]$))/m)) {
      rv.push(key + ":\n");
      rv.push("\n");
      var lines = value.split(/\n/);

      if (lines[lines.length - 1] === "") {
        lines.pop();
      }

      lines.forEach(function (line, idx, arr) {
        if (lineIsDashes(line)) {
          line = "-" + line;
        }

        rv.push(line + "\n");
      });
    } else {
      rv.push(key + ": " + value + "\n");
    }
  });
  return rv;
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  tokenize: tokenize,
  serialize: serialize
});

/***/ }),

/***/ "./js/richPromise.jsx":
/*!****************************!*\
  !*** ./js/richPromise.jsx ***!
  \****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _dialogs_errorDialog__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dialogs/errorDialog */ "./js/dialogs/errorDialog.jsx");
/* harmony import */ var _dialogSystem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dialogSystem */ "./js/dialogSystem.jsx");



var bringUpDialog = function bringUpDialog(error) {
  if (!_dialogSystem__WEBPACK_IMPORTED_MODULE_1__["default"].dialogIsOpen()) {
    _dialogSystem__WEBPACK_IMPORTED_MODULE_1__["default"].showDialog(_dialogs_errorDialog__WEBPACK_IMPORTED_MODULE_0__["default"], {
      error: error
    });
  }
};

var makeRichPromise = function makeRichPromise(callback) {
  var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : bringUpDialog;
  var rv = new Promise(callback);
  var then = rv.then;
  var hasRejectionHandler = false;
  rv.then(null, function (value) {
    if (!hasRejectionHandler) {
      return fallback(value);
    }
  });

  rv.then = function (onFulfilled, onRejected) {
    if (onRejected) {
      hasRejectionHandler = true;
    }

    return then.call(rv, onFulfilled, onRejected);
  };

  return rv;
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (makeRichPromise);

/***/ }),

/***/ "./js/userLabel.jsx":
/*!**************************!*\
  !*** ./js/userLabel.jsx ***!
  \**************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./i18n */ "./js/i18n.jsx");


var userLabel = {
  // formats a user label appropriately
  format: function format(inputConfig) {
    var label = null;

    if (typeof inputConfig === "string") {
      label = inputConfig;
    } else {
      label = _i18n__WEBPACK_IMPORTED_MODULE_1__["default"].trans(inputConfig);
    }

    if (!label) {
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", {
        className: ""
      });
    }

    var iconData = label.match(/^\[\[\s*(.*?)\s*(;\s*(.*?))?\s*\]\]$/); // eslint-disable-line no-useless-escape

    if (iconData) {
      var className = "fa fa-" + iconData[1];

      if ((iconData[3] || "").match(/90|180|270/)) {
        className += " fa-rotate-" + iconData[3];
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
        className: className
      });
    }

    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, label);
  }
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (userLabel);

/***/ }),

/***/ "./js/utils.jsx":
/*!**********************!*\
  !*** ./js/utils.jsx ***!
  \**********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "isValidUrl": () => (/* binding */ isValidUrl),
/* harmony export */   "getCanonicalUrl": () => (/* binding */ getCanonicalUrl),
/* harmony export */   "flipSetValue": () => (/* binding */ flipSetValue),
/* harmony export */   "urlPathsConsideredEqual": () => (/* binding */ urlPathsConsideredEqual),
/* harmony export */   "getApiUrl": () => (/* binding */ getApiUrl),
/* harmony export */   "getPlatform": () => (/* binding */ getPlatform),
/* harmony export */   "isMetaKey": () => (/* binding */ isMetaKey),
/* harmony export */   "getParentFsPath": () => (/* binding */ getParentFsPath),
/* harmony export */   "fsToUrlPath": () => (/* binding */ fsToUrlPath),
/* harmony export */   "urlToFsPath": () => (/* binding */ urlToFsPath),
/* harmony export */   "fsPathFromAdminObservedPath": () => (/* binding */ fsPathFromAdminObservedPath),
/* harmony export */   "loadData": () => (/* binding */ loadData),
/* harmony export */   "apiRequest": () => (/* binding */ apiRequest)
/* harmony export */ });
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "../node_modules/jquery/dist/jquery.js");
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);

function isValidUrl(url) {
  return !!url.match(/^(https?|ftps?):\/\/\S+$|^mailto:\S+$/);
}

function stripLeadingSlash(string) {
  return string.match(/^\/*(.*?)$/)[1];
}

function stripTrailingSlash(string) {
  return string.match(/^(.*?)\/*$/)[1];
}

function addToSet(originalSet, value) {
  for (var i = 0; i < originalSet.length; i++) {
    if (originalSet[i] === value) {
      return originalSet;
    }
  }

  var rv = originalSet.slice();
  rv.push(value);
  return rv;
}

function removeFromSet(originalSet, value) {
  var rv = null;
  var off = 0;

  for (var i = 0; i < originalSet.length; i++) {
    if (originalSet[i] === value) {
      if (rv === null) {
        rv = originalSet.slice();
      }

      rv.splice(i - off++, 1);
    }
  }

  return rv === null ? originalSet : rv;
}

function getCanonicalUrl(localPath) {
  return $LEKTOR_CONFIG.site_root.match(/^(.*?)\/*$/)[1] + "/" + stripLeadingSlash(localPath);
}
function flipSetValue(originalSet, value, isActive) {
  if (isActive) {
    return addToSet(originalSet || [], value);
  } else {
    return removeFromSet(originalSet || [], value);
  }
}
function urlPathsConsideredEqual(a, b) {
  if (a == null || b == null) {
    return false;
  }

  return stripTrailingSlash(a) === stripTrailingSlash(b);
}
function getApiUrl(url) {
  return $LEKTOR_CONFIG.admin_root + "/api" + url;
}
function getPlatform() {
  if (navigator.appVersion.indexOf("Win") !== -1) {
    return "windows";
  } else if (navigator.appVersion.indexOf("Mac") !== -1) {
    return "mac";
  } else if (navigator.appVersion.indexOf("X11") !== -1 || navigator.appVersion.indexOf("Linux") !== -1) {
    return "linux";
  }

  return "other";
}
function isMetaKey(event) {
  if (getPlatform() === "mac") {
    return event.metaKey;
  } else {
    return event.ctrlKey;
  }
}
function getParentFsPath(fsPath) {
  return fsPath.match(/^(.*?)\/([^/]*)$/)[1];
}
function fsToUrlPath(fsPath) {
  var segments = fsPath.match(/^\/*(.*?)\/*$/)[1].split("/");

  if (segments.length === 1 && segments[0] === "") {
    segments = [];
  }

  segments.unshift("root");
  return segments.join(":");
}
function urlToFsPath(urlPath) {
  var segments = urlPath.match(/^:*(.*?):*$/)[1].split(":");

  if (segments.length < 1 || segments[0] !== "root") {
    return null;
  }

  segments[0] = "";
  return segments.join("/");
}
function fsPathFromAdminObservedPath(adminPath) {
  var base = $LEKTOR_CONFIG.site_root.match(/^(.*?)\/*$/)[1];

  if (adminPath.substr(0, base.length) !== base) {
    return null;
  }

  return "/" + adminPath.substr(base.length).match(/^\/*(.*?)\/*$/)[1];
}
function loadData(url, params, options, createPromise) {
  options = options || {};
  return createPromise(function (resolve, reject) {
    jquery__WEBPACK_IMPORTED_MODULE_0___default().ajax({
      url: getApiUrl(url),
      data: params,
      method: options.method || "GET"
    }).done(function (data) {
      resolve(data);
    }).fail(function () {
      reject({
        code: "REQUEST_FAILED"
      });
    });
  });
}
function apiRequest(url, options, createPromise) {
  options = options || {};
  options.url = getApiUrl(url);

  if (options.json !== undefined) {
    options.data = JSON.stringify(options.json);
    options.contentType = "application/json";
    delete options.json;
  }

  if (!options.method) {
    options.method = "GET";
  }

  return createPromise(function (resolve, reject) {
    jquery__WEBPACK_IMPORTED_MODULE_0___default().ajax(options).done(function (data) {
      resolve(data);
    }).fail(function () {
      reject({
        code: "REQUEST_FAILED"
      });
    });
  });
}

/***/ }),

/***/ "./js/views/AddAttachmentPage.jsx":
/*!****************************************!*\
  !*** ./js/views/AddAttachmentPage.jsx ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _components_RecordComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/RecordComponent */ "./js/components/RecordComponent.jsx");
/* harmony import */ var _hub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../hub */ "./js/hub.jsx");
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../events */ "./js/events.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _richPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../richPromise */ "./js/richPromise.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/* eslint-env browser */








var AddAttachmentPage = /*#__PURE__*/function (_RecordComponent) {
  _inherits(AddAttachmentPage, _RecordComponent);

  var _super = _createSuper(AddAttachmentPage);

  function AddAttachmentPage(props) {
    var _this;

    _classCallCheck(this, AddAttachmentPage);

    _this = _super.call(this, props);
    _this.state = {
      newAttachmentInfo: null,
      currentFiles: [],
      isUploading: false,
      currentProgress: 0
    };
    return _this;
  }

  _createClass(AddAttachmentPage, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      this.syncDialog();
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(nextProps) {
      if (nextProps.match.params.path !== this.props.match.params.path) {
        this.syncDialog();
      }
    }
  }, {
    key: "syncDialog",
    value: function syncDialog() {
      var _this2 = this;

      (0,_utils__WEBPACK_IMPORTED_MODULE_4__.loadData)("/newattachment", {
        path: this.getRecordPath()
      }, null, _richPromise__WEBPACK_IMPORTED_MODULE_6__["default"]).then(function (resp) {
        _this2.setState({
          newAttachmentInfo: resp
        });
      });
    }
  }, {
    key: "uploadFile",
    value: function uploadFile(event) {
      this.refs.file.click();
    }
  }, {
    key: "onUploadProgress",
    value: function onUploadProgress(event) {
      var newProgress = Math.round(event.loaded * 100 / event.total);

      if (newProgress !== this.state.currentProgress) {
        this.setState({
          currentProgress: newProgress
        });
      }
    }
  }, {
    key: "onUploadComplete",
    value: function onUploadComplete(resp, event) {
      var _this3 = this;

      this.setState({
        isUploading: false,
        newProgress: 100
      }, function () {
        _hub__WEBPACK_IMPORTED_MODULE_2__["default"].emit(new _events__WEBPACK_IMPORTED_MODULE_3__.AttachmentsChangedEvent({
          recordPath: _this3.getRecordPath(),
          attachmentsAdded: resp.buckets.map(function (bucket) {
            return bucket.stored_filename;
          })
        }));
      });
    }
  }, {
    key: "onFileSelected",
    value: function onFileSelected(event) {
      var _this4 = this;

      if (this.state.isUploading) {
        return;
      }

      var files = this.refs.file.files;
      this.setState({
        currentFiles: Array.prototype.slice.call(files, 0),
        isUploading: true
      });
      var formData = new FormData();
      formData.append("path", this.getRecordPath());

      for (var i = 0; i < files.length; i++) {
        formData.append("file", files[i], files[i].name);
      }

      var xhr = new XMLHttpRequest();
      xhr.open("POST", (0,_utils__WEBPACK_IMPORTED_MODULE_4__.getApiUrl)("/newattachment"));

      xhr.onload = function (event) {
        _this4.onUploadComplete(JSON.parse(xhr.responseText), event);
      };

      xhr.upload.onprogress = function (event) {
        _this4.onUploadProgress(event);
      };

      xhr.send(formData);
    }
  }, {
    key: "renderCurrentFiles",
    value: function renderCurrentFiles() {
      var files = this.state.currentFiles.map(function (file) {
        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
          key: file.name
        }, file.name, " (", file.type, ")");
      });
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", null, files);
    }
  }, {
    key: "render",
    value: function render() {
      var nai = this.state.newAttachmentInfo;

      if (!nai) {
        return null;
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2", null, _i18n__WEBPACK_IMPORTED_MODULE_5__["default"].trans("ADD_ATTACHMENT_TO").replace("%s", nai.label)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, _i18n__WEBPACK_IMPORTED_MODULE_5__["default"].trans("ADD_ATTACHMENT_NOTE")), this.renderCurrentFiles(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, _i18n__WEBPACK_IMPORTED_MODULE_5__["default"].trans("PROGRESS"), ": ", this.state.currentProgress, "%"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", {
        type: "file",
        ref: "file",
        multiple: true,
        style: {
          display: "none"
        },
        onChange: this.onFileSelected.bind(this)
      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "actions"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        className: "btn btn-primary",
        onClick: this.uploadFile.bind(this)
      }, _i18n__WEBPACK_IMPORTED_MODULE_5__["default"].trans("UPLOAD"))));
    }
  }]);

  return AddAttachmentPage;
}(_components_RecordComponent__WEBPACK_IMPORTED_MODULE_1__["default"]);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddAttachmentPage);

/***/ }),

/***/ "./js/views/AddChildPage.jsx":
/*!***********************************!*\
  !*** ./js/views/AddChildPage.jsx ***!
  \***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _components_RecordComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/RecordComponent */ "./js/components/RecordComponent.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _userLabel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../userLabel */ "./js/userLabel.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _slugify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../slugify */ "./js/slugify.js");
/* harmony import */ var _widgets__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../widgets */ "./js/widgets.jsx");
/* harmony import */ var _richPromise__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../richPromise */ "./js/richPromise.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/* eslint-env browser */









var getGoodDefaultModel = function getGoodDefaultModel(models) {
  if (models.page !== undefined) {
    return "page";
  }

  var choices = Object.keys(models);
  choices.sort();
  return choices[0];
};

var AddChildPage = /*#__PURE__*/function (_RecordComponent) {
  _inherits(AddChildPage, _RecordComponent);

  var _super = _createSuper(AddChildPage);

  function AddChildPage(props) {
    var _this;

    _classCallCheck(this, AddChildPage);

    _this = _super.call(this, props);
    _this.state = {
      newChildInfo: null,
      id: undefined,
      selectedModel: null
    };
    return _this;
  }

  _createClass(AddChildPage, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      _get(_getPrototypeOf(AddChildPage.prototype), "componentDidMount", this).call(this);

      this.syncDialog();
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(nextProps) {
      if (nextProps.match.params.path !== this.props.match.params.path) {
        this.syncDialog();
      }
    }
  }, {
    key: "syncDialog",
    value: function syncDialog() {
      var _this2 = this;

      (0,_utils__WEBPACK_IMPORTED_MODULE_4__.loadData)("/newrecord", {
        path: this.getRecordPath()
      }, null, _richPromise__WEBPACK_IMPORTED_MODULE_7__["default"]).then(function (resp) {
        var selectedModel = resp.implied_model;

        if (!selectedModel) {
          selectedModel = getGoodDefaultModel(resp.available_models);
        }

        _this2.setState({
          newChildInfo: resp,
          id: undefined,
          primary: undefined,
          selectedModel: selectedModel
        });
      });
    }
  }, {
    key: "onValueChange",
    value: function onValueChange(id, value) {
      var obj = {};
      obj[id] = value;
      this.setState(obj);
    }
  }, {
    key: "getAvailableModels",
    value: function getAvailableModels() {
      var rv = [];

      for (var key in this.state.newChildInfo.available_models) {
        var model = this.state.newChildInfo.available_models[key];
        rv.push(model);
      }

      rv.sort(function (a, b) {
        return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
      });
      return rv;
    }
  }, {
    key: "onModelSelected",
    value: function onModelSelected(event) {
      this.setState({
        selectedModel: event.target.value
      });
    }
  }, {
    key: "getImpliedId",
    value: function getImpliedId() {
      return (0,_slugify__WEBPACK_IMPORTED_MODULE_5__.slug)(this.state.primary || "").toLowerCase();
    }
  }, {
    key: "getPrimaryField",
    value: function getPrimaryField() {
      var model = this.state.selectedModel;
      return this.state.newChildInfo.available_models[model].primary_field;
    }
  }, {
    key: "createRecord",
    value: function createRecord() {
      var _this3 = this;

      var errMsg = function errMsg(text) {
        alert(_i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ERROR_PREFIX") + text);
      };

      var id = this.state.id || this.getImpliedId();

      if (!id) {
        errMsg(_i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ERROR_NO_ID_PROVIDED"));
        return;
      }

      var data = {};
      var params = {
        id: id,
        path: this.getRecordPath(),
        data: data
      };

      if (!this.state.newChildInfo.implied_model) {
        data._model = this.state.selectedModel;
      }

      var primaryField = this.getPrimaryField();

      if (primaryField) {
        data[primaryField.name] = this.state.primary;
      }

      (0,_utils__WEBPACK_IMPORTED_MODULE_4__.apiRequest)("/newrecord", {
        json: params,
        method: "POST"
      }, _richPromise__WEBPACK_IMPORTED_MODULE_7__["default"]).then(function (resp) {
        if (resp.exists) {
          errMsg(_i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ERROR_PAGE_ID_DUPLICATE").replace("%s", id));
        } else if (!resp.valid_id) {
          errMsg(_i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ERROR_INVALID_ID").replace("%s", id));
        } else {
          var urlPath = _this3.getUrlRecordPathWithAlt(resp.path);

          _this3.transitionToAdminPage(".edit", {
            path: urlPath
          });
        }
      });
    }
  }, {
    key: "renderFields",
    value: function renderFields() {
      var _this4 = this;

      var fields = [];

      if (!this.state.newChildInfo.implied_model) {
        var choices = this.getAvailableModels().map(function (model) {
          return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("option", {
            value: model.id,
            key: model.id
          }, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans(model.name_i18n));
        });
        fields.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
          className: "row",
          key: "_model"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
          className: "field-box col-md-12"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("dl", {
          className: "field"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("dt", null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("MODEL")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("dd", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("select", {
          value: this.state.selectedModel,
          className: "form-control",
          onChange: this.onModelSelected.bind(this)
        }, choices))))));
      }

      var addField = function addField(id, field, placeholder) {
        var value = _this4.state[id];
        var Widget = (0,_widgets__WEBPACK_IMPORTED_MODULE_6__.getWidgetComponentWithFallback)(field.type);

        if (Widget.deserializeValue) {
          value = Widget.deserializeValue(value, field.type);
        }

        fields.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
          className: "row field-row",
          key: field.name
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
          className: "field-box col-md-12"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("dl", {
          className: "field"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("dt", null, _userLabel__WEBPACK_IMPORTED_MODULE_3__["default"].format(field.label_i18n || field.label)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("dd", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Widget, {
          value: value,
          placeholder: placeholder,
          onChange: _this4.onValueChange.bind(_this4, id),
          type: field.type
        }))))));
      };

      var primaryField = this.getPrimaryField();

      if (primaryField) {
        addField("primary", primaryField);
      }

      addField("id", {
        name: "_id",
        label: _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ID"),
        type: {
          name: "slug",
          widget: "slug"
        }
      }, this.getImpliedId());
      return fields;
    }
  }, {
    key: "render",
    value: function render() {
      var nci = this.state.newChildInfo;

      if (!nci) {
        return null;
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "edit-area"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2", null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ADD_CHILD_PAGE_TO").replace("%s", this.state.newChildInfo.label)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("ADD_CHILD_PAGE_NOTE")), this.renderFields(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "actions"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        className: "btn btn-primary",
        onClick: this.createRecord.bind(this)
      }, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans("CREATE_CHILD_PAGE"))));
    }
  }]);

  return AddChildPage;
}(_components_RecordComponent__WEBPACK_IMPORTED_MODULE_1__["default"]);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddChildPage);

/***/ }),

/***/ "./js/views/App.jsx":
/*!**************************!*\
  !*** ./js/views/App.jsx ***!
  \**************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-router-dom */ "../node_modules/react-router/esm/react-router.js");
/* harmony import */ var _components_BreadCrumbs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/BreadCrumbs */ "./js/components/BreadCrumbs.jsx");
/* harmony import */ var _components_Sidebar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/Sidebar */ "./js/components/Sidebar.jsx");
/* harmony import */ var _components_DialogSlot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/DialogSlot */ "./js/components/DialogSlot.jsx");
/* harmony import */ var _components_ServerStatus__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components/ServerStatus */ "./js/components/ServerStatus.jsx");







function Header(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("header", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_BreadCrumbs__WEBPACK_IMPORTED_MODULE_1__["default"], props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
    type: "button",
    className: "navbar-toggle",
    "data-toggle": "offcanvas",
    "data-target": ".sidebar-block"
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", {
    className: "sr-only"
  }, "Toggle navigation"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", {
    className: "icon-list"
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", {
    className: "icon-list"
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", {
    className: "icon-list"
  }))));
}

function App(props) {
  var fullPath = "".concat(props.match.path, "/:path/:page");
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
    className: "application"
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_ServerStatus__WEBPACK_IMPORTED_MODULE_4__["default"], null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_5__.Route, {
    path: fullPath,
    component: Header
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
    className: "editor container"
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_5__.Route, {
    path: fullPath,
    component: _components_DialogSlot__WEBPACK_IMPORTED_MODULE_3__["default"]
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
    className: "sidebar-block block-offcanvas block-offcanvas-left"
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("nav", {
    className: "sidebar col-md-2 col-sm-3 sidebar-offcanvas"
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_5__.Route, {
    path: fullPath,
    component: _components_Sidebar__WEBPACK_IMPORTED_MODULE_2__["default"]
  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
    className: "view col-md-10 col-sm-9"
  }, props.children))));
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (App);

/***/ }),

/***/ "./js/views/DeletePage.jsx":
/*!*********************************!*\
  !*** ./js/views/DeletePage.jsx ***!
  \*********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _components_RecordComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/RecordComponent */ "./js/components/RecordComponent.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _hub__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hub */ "./js/hub.jsx");
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../events */ "./js/events.jsx");
/* harmony import */ var _richPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../richPromise */ "./js/richPromise.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }









var DeletePage = /*#__PURE__*/function (_RecordComponent) {
  _inherits(DeletePage, _RecordComponent);

  var _super = _createSuper(DeletePage);

  function DeletePage(props) {
    var _this;

    _classCallCheck(this, DeletePage);

    _this = _super.call(this, props);
    _this.state = {
      recordInfo: null,
      deleteMasterRecord: true
    };
    return _this;
  }

  _createClass(DeletePage, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      _get(_getPrototypeOf(DeletePage.prototype), "componentDidMount", this).call(this);

      this.syncDialog();
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(nextProps) {
      if (nextProps.match.params.path !== this.props.match.params.path) {
        this.syncDialog();
      }
    }
  }, {
    key: "syncDialog",
    value: function syncDialog() {
      var _this2 = this;

      (0,_utils__WEBPACK_IMPORTED_MODULE_2__.loadData)("/recordinfo", {
        path: this.getRecordPath()
      }, null, _richPromise__WEBPACK_IMPORTED_MODULE_6__["default"]).then(function (resp) {
        _this2.setState({
          recordInfo: resp,
          deleteMasterRecord: _this2.isPrimary()
        });
      });
    }
  }, {
    key: "deleteRecord",
    value: function deleteRecord(event) {
      var _this3 = this;

      var path = this.getRecordPath();
      var parent = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getParentFsPath)(path);
      var targetPath;

      if (parent === null) {
        targetPath = "root";
      } else {
        targetPath = this.getUrlRecordPathWithAlt(parent);
      }

      (0,_utils__WEBPACK_IMPORTED_MODULE_2__.apiRequest)("/deleterecord", {
        data: {
          path: path,
          alt: this.getRecordAlt(),
          delete_master: this.state.deleteMasterRecord ? "1" : "0"
        },
        // eslint-disable-next-line indent
        method: "POST"
      }, _richPromise__WEBPACK_IMPORTED_MODULE_6__["default"]).then(function (resp) {
        if (_this3.state.recordInfo.is_attachment) {
          _hub__WEBPACK_IMPORTED_MODULE_4__["default"].emit(new _events__WEBPACK_IMPORTED_MODULE_5__.AttachmentsChangedEvent({
            recordPath: _this3.getParentRecordPath(),
            attachmentsRemoved: [_this3.state.recordInfo.id]
          }));
        }

        _this3.transitionToAdminPage(".edit", {
          path: targetPath
        });
      });
    }
  }, {
    key: "cancelDelete",
    value: function cancelDelete(event) {
      var urlPath = this.getUrlRecordPathWithAlt();
      this.transitionToAdminPage(".edit", {
        path: urlPath
      });
    }
  }, {
    key: "onDeleteAllAltsChange",
    value: function onDeleteAllAltsChange(event) {
      this.setState({
        deleteMasterRecord: event.target.value === "1"
      });
    }
  }, {
    key: "isPrimary",
    value: function isPrimary() {
      return this.getRecordAlt() === "_primary";
    }
  }, {
    key: "render",
    value: function render() {
      var ri = this.state.recordInfo;

      if (!ri || !ri.can_be_deleted) {
        return null;
      }

      var elements = [];
      var children = [];
      var alts = [];
      var attachments = [];
      var altInfo = null;
      var altCount = 0;

      for (var i = 0; i < ri.alts.length; i++) {
        if (ri.alts[i].alt === this.getRecordAlt()) {
          altInfo = ri.alts[i];
        }

        if (ri.alts[i].exists) {
          altCount++;
        }
      }

      if (ri.is_attachment) {
        elements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", {
          key: "attachment"
        }, this.isPrimary() ? _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("DELETE_ATTACHMENT_PROMPT") : _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("DELETE_ATTACHMENT_ALT_PROMPT"), " "));
      } else {
        elements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", {
          key: "child-info"
        }, this.isPrimary() ? _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("DELETE_PAGE_PROMPT") : _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("DELETE_PAGE_ALT_PROMPT"), " ", ri.children.length > 0 && this.isPrimary() ? _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("DELETE_PAGE_CHILDREN_WARNING") : null));

        if (ri.children.length > 0) {
          children = ri.children.map(function (child) {
            return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
              key: child.id
            }, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans(child.label_i18n));
          });

          if (ri.child_count > children.length) {
            children.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
              key: "..."
            }, "..."));
          }
        }

        attachments = ri.attachments.map(function (atch) {
          return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
            key: atch.id
          }, atch.id, " (", atch.type, ")");
        });
      }

      if (altCount > 1 && this.getRecordAlt() === "_primary") {
        ri.alts.forEach(function (item) {
          if (!item.exists) {
            return;
          }

          var title = _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans(item.name_i18n);

          if (item.is_primary) {
            title += " (" + _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("PRIMARY_ALT") + ")";
          } else if (item.primary_overlay) {
            title += " (" + _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("PRIMARY_OVERLAY") + ")";
          }

          alts.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", {
            key: item.alt
          }, title));
        });
        elements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", {
          key: "alt-warning"
        }, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("DELETE_PRIMARY_ALT_INFO")));
        elements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", {
          key: "delete-all-alts"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", {
          type: "radio",
          id: "delete-all-alts",
          value: "1",
          name: "delete-master-record",
          checked: this.state.deleteMasterRecord,
          onChange: this.onDeleteAllAltsChange.bind(this)
        }), " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", {
          htmlFor: "delete-all-alts"
        }, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans(ri.is_attachment ? "DELETE_ALL_ATTACHMENT_ALTS" : "DELETE_ALL_PAGE_ALTS"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", {
          type: "radio",
          id: "delete-only-this-alt",
          value: "0",
          name: "delete-master-record",
          checked: !this.state.deleteMasterRecord,
          onChange: this.onDeleteAllAltsChange.bind(this)
        }), " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", {
          htmlFor: "delete-only-this-alt"
        }, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans(ri.is_attachment ? "DELETE_ONLY_PRIMARY_ATTACHMENT_ALT" : "DELETE_ONLY_PRIMARY_PAGE_ALT")))));
      }

      var label = ri.label_i18n ? _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans(ri.label_i18n) : ri.id;

      if (this.getRecordAlt() !== "_primary" && altInfo != null) {
        label += " (" + _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans(altInfo.name_i18n) + ")";
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2", null, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("DELETE_RECORD").replace("%s", label)), elements, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        style: {
          display: this.state.deleteMasterRecord && alts.length > 0 ? "block" : "none"
        }
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h4", null, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("ALTS_TO_BE_DELETED")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", null, alts)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        style: {
          display: this.state.deleteMasterRecord && children.length > 0 ? "block" : "none"
        }
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h4", null, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("CHILD_PAGES_TO_BE_DELETED")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", null, children)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        style: {
          display: this.state.deleteMasterRecord && attachments.length > 0 ? "block" : "none"
        }
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h4", null, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("ATTACHMENTS_TO_BE_DELETED")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", null, attachments)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "actions"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        className: "btn btn-primary",
        onClick: this.deleteRecord.bind(this)
      }, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("YES_DELETE")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        className: "btn btn-default",
        onClick: this.cancelDelete.bind(this)
      }, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("NO_CANCEL"))));
    }
  }]);

  return DeletePage;
}(_components_RecordComponent__WEBPACK_IMPORTED_MODULE_1__["default"]);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DeletePage);

/***/ }),

/***/ "./js/views/EditPage.jsx":
/*!*******************************!*\
  !*** ./js/views/EditPage.jsx ***!
  \*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-router-dom */ "../node_modules/react-router/esm/react-router.js");
/* harmony import */ var _components_RecordComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/RecordComponent */ "./js/components/RecordComponent.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _widgets__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../widgets */ "./js/widgets.jsx");
/* harmony import */ var _richPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../richPromise */ "./js/richPromise.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }









var EditPage = /*#__PURE__*/function (_RecordComponent) {
  _inherits(EditPage, _RecordComponent);

  var _super = _createSuper(EditPage);

  function EditPage(props) {
    var _this;

    _classCallCheck(this, EditPage);

    _this = _super.call(this, props);
    _this.state = {
      recordData: null,
      recordDataModel: null,
      recordInfo: null,
      hasPendingChanges: false
    };
    _this._onKeyPress = _this._onKeyPress.bind(_assertThisInitialized(_this));
    _this.setFieldValue = _this.setFieldValue.bind(_assertThisInitialized(_this));
    _this.form = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createRef();
    return _this;
  }

  _createClass(EditPage, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      _get(_getPrototypeOf(EditPage.prototype), "componentDidMount", this).call(this);

      this.syncEditor();
      window.addEventListener("keydown", this._onKeyPress);
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps, prevState) {
      if (prevProps.match.params.path !== this.props.match.params.path) {
        this.syncEditor();
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      window.removeEventListener("keydown", this._onKeyPress);
    }
  }, {
    key: "_onKeyPress",
    value: function _onKeyPress(event) {
      // meta+s is open find files
      if (event.which === 83 && (0,_utils__WEBPACK_IMPORTED_MODULE_2__.isMetaKey)(event)) {
        event.preventDefault();
        var current = this.form.current;

        if (current && current.reportValidity()) {
          this.saveChanges();
        }
      }
    }
  }, {
    key: "isIllegalField",
    value: function isIllegalField(field) {
      switch (field.name) {
        case "_id":
        case "_path":
        case "_gid":
        case "_alt":
        case "_source_alt":
        case "_model":
        case "_attachment_for":
          return true;

        case "_attachment_type":
          return !this.state.recordInfo.is_attachment;
      }

      return false;
    }
  }, {
    key: "syncEditor",
    value: function syncEditor() {
      var _this2 = this;

      (0,_utils__WEBPACK_IMPORTED_MODULE_2__.loadData)("/rawrecord", {
        path: this.getRecordPath(),
        alt: this.getRecordAlt()
      }, null, _richPromise__WEBPACK_IMPORTED_MODULE_5__["default"]).then(function (resp) {
        // transform resp.data into actual data
        var recordData = {};
        resp.datamodel.fields.forEach(function (field) {
          var widget = (0,_widgets__WEBPACK_IMPORTED_MODULE_4__.getWidgetComponentWithFallback)(field.type);
          var value = resp.data[field.name];

          if (value !== undefined) {
            if (widget.deserializeValue) {
              value = widget.deserializeValue(value, field.type);
            }

            recordData[field.name] = value;
          }
        });

        _this2.setState({
          recordData: recordData,
          recordDataModel: resp.datamodel,
          recordInfo: resp.record_info,
          hasPendingChanges: false
        });
      });
    }
  }, {
    key: "setFieldValue",
    value: function setFieldValue(field, value) {
      var uiChange = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

      var rd = _objectSpread(_objectSpread({}, this.state.recordData), {}, _defineProperty({}, field.name, value || ""));

      this.setState({
        recordData: rd,
        hasPendingChanges: !uiChange
      });
    }
  }, {
    key: "getValues",
    value: function getValues() {
      var _this3 = this;

      var rv = {};
      this.state.recordDataModel.fields.forEach(function (field) {
        if (_this3.isIllegalField(field)) {
          return;
        }

        var value = _this3.state.recordData[field.name];

        if (value !== undefined) {
          var Widget = (0,_widgets__WEBPACK_IMPORTED_MODULE_4__.getWidgetComponentWithFallback)(field.type);

          if (Widget.serializeValue) {
            value = Widget.serializeValue(value, field.type);
          }
        } else {
          value = null;
        }

        rv[field.name] = value;
      });
      return rv;
    }
  }, {
    key: "saveChanges",
    value: function saveChanges(event) {
      var _this4 = this;

      if (event) {
        event.preventDefault();
      }

      var path = this.getRecordPath();
      var alt = this.getRecordAlt();
      var newData = this.getValues();
      (0,_utils__WEBPACK_IMPORTED_MODULE_2__.apiRequest)("/rawrecord", {
        json: {
          data: newData,
          path: path,
          alt: alt
        },
        // eslint-disable-next-line indent
        method: "PUT"
      }, _richPromise__WEBPACK_IMPORTED_MODULE_5__["default"]).then(function (resp) {
        _this4.setState({
          hasPendingChanges: false
        }, function () {
          _this4.transitionToAdminPage(".preview", {
            path: _this4.getUrlRecordPathWithAlt(path)
          });
        });
      });
    }
  }, {
    key: "deleteRecord",
    value: function deleteRecord(event) {
      this.transitionToAdminPage(".delete", {
        path: this.getUrlRecordPathWithAlt()
      });
    }
  }, {
    key: "getValueForField",
    value: function getValueForField(widget, field) {
      var value = this.state.recordData[field.name];

      if (value === undefined) {
        value = "";

        if (widget.deserializeValue) {
          value = widget.deserializeValue(value, field.type);
        }
      }

      return value;
    }
  }, {
    key: "getPlaceholderForField",
    value: function getPlaceholderForField(widget, field) {
      if (field["default"] !== null) {
        if (widget.deserializeValue) {
          return widget.deserializeValue(field["default"], field.type);
        }

        return field["default"];
      } else if (field.name === "_slug") {
        return this.state.recordInfo.slug_format;
      } else if (field.name === "_template") {
        return this.state.recordInfo.default_template;
      } else if (field.name === "_attachment_type") {
        return this.state.recordInfo.implied_attachment_type;
      }

      return null;
    }
  }, {
    key: "renderFormField",
    value: function renderFormField(field) {
      var widget = (0,_widgets__WEBPACK_IMPORTED_MODULE_4__.getWidgetComponentWithFallback)(field.type);
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_widgets__WEBPACK_IMPORTED_MODULE_4__.FieldBox, {
        key: field.name,
        value: this.getValueForField(widget, field),
        placeholder: this.getPlaceholderForField(widget, field),
        field: field,
        setFieldValue: this.setFieldValue,
        disabled: !(field.alts_enabled == null || field.alts_enabled ^ this.state.recordInfo.alt === "_primary")
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this5 = this;

      // we have not loaded anything yet.
      if (this.state.recordInfo === null) {
        return null;
      }

      var deleteButton = this.state.recordInfo.can_be_deleted ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        type: "button",
        className: "btn btn-default",
        onClick: this.deleteRecord.bind(this)
      }, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("DELETE")) : null;
      var title = this.state.recordInfo.is_attachment ? _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("EDIT_ATTACHMENT_METADATA_OF") : _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("EDIT_PAGE_NAME");
      var label = this.state.recordInfo.label_i18n ? _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans(this.state.recordInfo.label_i18n) : this.state.recordInfo.label;
      var fields = this.state.recordDataModel.fields.filter(function (f) {
        return !_this5.isIllegalField(f);
      });
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "edit-area"
      }, this.state.hasPendingChanges && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_6__.Prompt, {
        message: function message() {
          return _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("UNLOAD_ACTIVE_TAB");
        }
      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2", null, title.replace("%s", label)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("form", {
        ref: this.form,
        onSubmit: this.saveChanges.bind(this)
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_widgets__WEBPACK_IMPORTED_MODULE_4__.FieldRows, {
        fields: fields,
        renderFunc: this.renderFormField.bind(this)
      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "actions"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
        type: "submit",
        className: "btn btn-primary"
      }, _i18n__WEBPACK_IMPORTED_MODULE_3__["default"].trans("SAVE_CHANGES")), deleteButton)));
    }
  }]);

  return EditPage;
}(_components_RecordComponent__WEBPACK_IMPORTED_MODULE_1__["default"]);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EditPage);

/***/ }),

/***/ "./js/views/PreviewPage.jsx":
/*!**********************************!*\
  !*** ./js/views/PreviewPage.jsx ***!
  \**********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _components_RecordComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/RecordComponent */ "./js/components/RecordComponent.jsx");
/* harmony import */ var _richPromise__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../richPromise */ "./js/richPromise.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }






var PreviewPage = /*#__PURE__*/function (_RecordComponent) {
  _inherits(PreviewPage, _RecordComponent);

  var _super = _createSuper(PreviewPage);

  function PreviewPage(props) {
    var _this;

    _classCallCheck(this, PreviewPage);

    _this = _super.call(this, props);
    _this.state = {
      pageUrl: null,
      pageUrlFor: null
    };
    return _this;
  }

  _createClass(PreviewPage, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      _get(_getPrototypeOf(PreviewPage.prototype), "componentDidMount", this).call(this);

      this.syncState();
    }
  }, {
    key: "shouldComponentUpdate",
    value: function shouldComponentUpdate(nextProps) {
      return this.getUrlRecordPathWithAlt() !== this.state.pageUrlFor || nextProps.match.params.path !== this.props.match.params.path;
    }
  }, {
    key: "syncState",
    value: function syncState() {
      var _this2 = this;

      var alt = this.getRecordAlt();
      var path = this.getRecordPath();

      if (path === null) {
        this.setState(this.getInitialState());
        return;
      }

      var recordUrl = this.getUrlRecordPathWithAlt();
      (0,_utils__WEBPACK_IMPORTED_MODULE_1__.loadData)("/previewinfo", {
        path: path,
        alt: alt
      }, null, _richPromise__WEBPACK_IMPORTED_MODULE_3__["default"]).then(function (resp) {
        _this2.setState({
          pageUrl: resp.url,
          pageUrlFor: recordUrl
        });
      });
    }
  }, {
    key: "getIntendedPath",
    value: function getIntendedPath() {
      if (this.state.pageUrlFor === this.getUrlRecordPathWithAlt()) {
        return this.state.pageUrl;
      }

      return null;
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(nextProps) {
      var _this3 = this;

      if (nextProps.match.params.path !== this.props.match.params.path) {
        this.setState({}, this.syncState.bind(this));
      }

      var frame = this.refs.iframe;
      var intendedPath = this.getIntendedPath();

      if (intendedPath !== null) {
        var framePath = this.getFramePath();

        if (!(0,_utils__WEBPACK_IMPORTED_MODULE_1__.urlPathsConsideredEqual)(intendedPath, framePath)) {
          frame.src = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.getCanonicalUrl)(intendedPath);
        }

        frame.onload = function (event) {
          _this3.onFrameNavigated();
        };
      }
    }
  }, {
    key: "getFramePath",
    value: function getFramePath() {
      var frameLocation = this.refs.iframe.contentWindow.location;

      if (frameLocation.href === "about:blank") {
        return frameLocation.href;
      }

      return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fsPathFromAdminObservedPath)(frameLocation.pathname);
    }
  }, {
    key: "onFrameNavigated",
    value: function onFrameNavigated() {
      var _this4 = this;

      var fsPath = this.getFramePath();

      if (fsPath === null) {
        return;
      }

      (0,_utils__WEBPACK_IMPORTED_MODULE_1__.loadData)("/matchurl", {
        url_path: fsPath
      }, null, _richPromise__WEBPACK_IMPORTED_MODULE_3__["default"]).then(function (resp) {
        if (resp.exists) {
          var urlPath = _this4.getUrlRecordPathWithAlt(resp.path, resp.alt);

          _this4.transitionToAdminPage(".preview", {
            path: urlPath
          });
        }
      });
    }
  }, {
    key: "render",
    value: function render() {
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "preview"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("iframe", {
        ref: "iframe"
      }));
    }
  }]);

  return PreviewPage;
}(_components_RecordComponent__WEBPACK_IMPORTED_MODULE_2__["default"]);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PreviewPage);

/***/ }),

/***/ "./js/widgets.jsx":
/*!************************!*\
  !*** ./js/widgets.jsx ***!
  \************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FieldBox": () => (/* binding */ FieldBox),
/* harmony export */   "getWidgetComponent": () => (/* binding */ getWidgetComponent),
/* harmony export */   "getWidgetComponentWithFallback": () => (/* binding */ getWidgetComponentWithFallback),
/* harmony export */   "FieldRows": () => (/* binding */ FieldRows)
/* harmony export */ });
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _widgets_primitiveWidgets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./widgets/primitiveWidgets */ "./js/widgets/primitiveWidgets.jsx");
/* harmony import */ var _widgets_multiWidgets__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./widgets/multiWidgets */ "./js/widgets/multiWidgets.jsx");
/* harmony import */ var _widgets_flowWidget__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./widgets/flowWidget */ "./js/widgets/flowWidget.jsx");
/* harmony import */ var _widgets_fakeWidgets__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./widgets/fakeWidgets */ "./js/widgets/fakeWidgets.jsx");
/* harmony import */ var _widgets_mixins__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./widgets/mixins */ "./js/widgets/mixins.jsx");
/* harmony import */ var _components_ToggleGroup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/ToggleGroup */ "./js/components/ToggleGroup.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./i18n */ "./js/i18n.jsx");
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }










var widgetComponents = {
  "singleline-text": _widgets_primitiveWidgets__WEBPACK_IMPORTED_MODULE_2__.SingleLineTextInputWidget,
  "multiline-text": _widgets_primitiveWidgets__WEBPACK_IMPORTED_MODULE_2__.MultiLineTextInputWidget,
  datepicker: _widgets_primitiveWidgets__WEBPACK_IMPORTED_MODULE_2__.DateInputWidget,
  integer: _widgets_primitiveWidgets__WEBPACK_IMPORTED_MODULE_2__.IntegerInputWidget,
  "float": _widgets_primitiveWidgets__WEBPACK_IMPORTED_MODULE_2__.FloatInputWidget,
  checkbox: _widgets_primitiveWidgets__WEBPACK_IMPORTED_MODULE_2__.BooleanInputWidget,
  url: _widgets_primitiveWidgets__WEBPACK_IMPORTED_MODULE_2__.UrlInputWidget,
  slug: _widgets_primitiveWidgets__WEBPACK_IMPORTED_MODULE_2__.SlugInputWidget,
  flow: _widgets_flowWidget__WEBPACK_IMPORTED_MODULE_4__.FlowWidget,
  checkboxes: _widgets_multiWidgets__WEBPACK_IMPORTED_MODULE_3__.CheckboxesInputWidget,
  select: _widgets_multiWidgets__WEBPACK_IMPORTED_MODULE_3__.SelectInputWidget,
  "f-line": _widgets_fakeWidgets__WEBPACK_IMPORTED_MODULE_5__.LineWidget,
  "f-spacing": _widgets_fakeWidgets__WEBPACK_IMPORTED_MODULE_5__.SpacingWidget,
  "f-info": _widgets_fakeWidgets__WEBPACK_IMPORTED_MODULE_5__.InfoWidget,
  "f-heading": _widgets_fakeWidgets__WEBPACK_IMPORTED_MODULE_5__.HeadingWidget
};

function FallbackWidget(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("em", null, "Widget \"", props.type.widget, "\" not implemented (used by type \"", props.type.name, "\")"));
}

FallbackWidget.propTypes = _widgets_mixins__WEBPACK_IMPORTED_MODULE_6__.widgetPropTypes;
/**
 * An input widget wrapped in a <div> with description and label.
 */

var FieldBox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.memo(function FieldBox(props) {
  var field = props.field,
      value = props.value,
      placeholder = props.placeholder,
      disabled = props.disabled;
  var onChange = props.onChange ? props.onChange : function (value, uiChange) {
    return props.setFieldValue(field, value, uiChange);
  };
  var className = "col-md-" + getFieldColumns(field) + " field-box";
  var innerClassName = "field";

  if (field.name.substr(0, 1) === "_") {
    innerClassName += " system-field";
  }

  var Widget = getWidgetComponentWithFallback(field.type);

  if (Widget.isFakeWidget) {
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
      className: className,
      key: field.name
    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(Widget, {
      key: field.name,
      type: field.type,
      field: field
    }));
  }

  var description = field.description_i18n ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
    className: "help-text"
  }, _i18n__WEBPACK_IMPORTED_MODULE_8__["default"].trans(field.description_i18n)) : null;
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
    className: className,
    key: field.name
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("dl", {
    className: innerClassName
  }, !field.hide_label ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("dt", null, _i18n__WEBPACK_IMPORTED_MODULE_8__["default"].trans(field.label_i18n)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("dd", null, description, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(Widget, {
    value: value,
    onChange: onChange,
    type: field.type,
    placeholder: placeholder,
    disabled: disabled
  }))));
});
FieldBox.propTypes = {
  value: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().any),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
  field: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().any),
  placeholder: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().any)
};
function getWidgetComponent(type) {
  return widgetComponents[type.widget] || null;
}
function getWidgetComponentWithFallback(type) {
  return widgetComponents[type.widget] || FallbackWidget;
}
/**
 * Get the width of a field in columns.
 */

function getFieldColumns(field) {
  var widthSpec = (field.type.width || "1/1").split("/");
  return Math.min(12, Math.max(2, parseInt(12 * +widthSpec[0] / +widthSpec[1])));
}
/**
 * Process fields into rows.
 */


function processFields(fields) {
  var rows = [];
  var currentColumns = 0;
  var row = [];
  fields.forEach(function (field) {
    var columns = getFieldColumns(field);

    if (columns + currentColumns > 12) {
      rows.push(row);
      currentColumns = 0;
      row = [];
    }

    row.push(field);
    currentColumns += columns;
  });

  if (row.length > 0) {
    rows.push(row);
  }

  return rows;
}
/**
 * Split the fields into normal and system fields and process into rows.
 */


function getFieldRows(fields) {
  var normalFields = [];
  var systemFields = [];
  fields.forEach(function (field) {
    if (field.name.substr(0, 1) === "_") {
      systemFields.push(field);
    } else {
      normalFields.push(field);
    }
  });
  return [processFields(normalFields), processFields(systemFields)];
}
/**
 * Render field rows using a render function.
 */


function FieldRows(_ref) {
  var fields = _ref.fields,
      renderFunc = _ref.renderFunc;

  var _getFieldRows = getFieldRows(fields),
      _getFieldRows2 = _slicedToArray(_getFieldRows, 2),
      normalRows = _getFieldRows2[0],
      systemRows = _getFieldRows2[1];

  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, normalRows.map(function (row, idx) {
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
      className: "row field-row",
      key: "normal-" + idx
    }, row.map(renderFunc));
  }), systemRows.length > 1 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_ToggleGroup__WEBPACK_IMPORTED_MODULE_7__["default"], {
    key: "sys",
    groupTitle: _i18n__WEBPACK_IMPORTED_MODULE_8__["default"].trans("SYSTEM_FIELDS"),
    defaultVisibility: false
  }, systemRows.map(function (row, idx) {
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
      className: "row field-row",
      key: "system-" + idx
    }, row.map(renderFunc));
  })) : null);
}

/***/ }),

/***/ "./js/widgets/fakeWidgets.jsx":
/*!************************************!*\
  !*** ./js/widgets/fakeWidgets.jsx ***!
  \************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "LineWidget": () => (/* binding */ LineWidget),
/* harmony export */   "SpacingWidget": () => (/* binding */ SpacingWidget),
/* harmony export */   "InfoWidget": () => (/* binding */ InfoWidget),
/* harmony export */   "HeadingWidget": () => (/* binding */ HeadingWidget)
/* harmony export */ });
/* harmony import */ var _mixins__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mixins */ "./js/widgets/mixins.jsx");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");



function LineWidget() {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("hr", null);
}
LineWidget.isFakeWidget = true;
LineWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_0__.widgetPropTypes;
function SpacingWidget() {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
    className: "spacing"
  });
}
SpacingWidget.isFakeWidget = true;
SpacingWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_0__.widgetPropTypes;
function InfoWidget(props) {
  var label = _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans(props.field.label_i18n);
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
    className: "info"
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("p", null, label ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("strong", null, label + ": ") : null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans(props.field.description_i18n)));
}
InfoWidget.isFakeWidget = true;
InfoWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_0__.widgetPropTypes;
function HeadingWidget(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("h3", null, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans(props.type.heading_i18n));
}
HeadingWidget.isFakeWidget = true;
HeadingWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_0__.widgetPropTypes;

/***/ }),

/***/ "./js/widgets/flowWidget.jsx":
/*!***********************************!*\
  !*** ./js/widgets/flowWidget.jsx ***!
  \***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FlowWidget": () => (/* binding */ FlowWidget)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _metaformat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../metaformat */ "./js/metaformat.jsx");
/* harmony import */ var _mixins__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mixins */ "./js/widgets/mixins.jsx");
/* harmony import */ var _userLabel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../userLabel */ "./js/userLabel.jsx");
/* harmony import */ var _widgets__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../widgets */ "./js/widgets.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

/* eslint-env browser */







var parseFlowFormat = function parseFlowFormat(value) {
  var blocks = [];
  var buf = [];
  var lines = value.split(/\r?\n/);
  var block = null;

  var _iterator = _createForOfIteratorHelper(lines),
      _step;

  try {
    for (_iterator.s(); !(_step = _iterator.n()).done;) {
      var line = _step.value;

      // leading whitespace is ignored.
      if (block === null && line.match(/^\s*$/)) {
        continue;
      }

      var blockStart = line.match(/^####\s*([^#]*?)\s*####\s*$/);

      if (!blockStart) {
        if (block === null) {
          // bad format :(
          return null;
        }
      } else {
        if (block !== null) {
          blocks.push([block, buf]);
          buf = [];
        }

        block = blockStart[1];
        continue;
      }

      buf.push(line.replace(/^#####(.*?)#####$/, "####$1####"));
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }

  if (block !== null) {
    blocks.push([block, buf]);
  }

  return blocks;
};

var serializeFlowFormat = function serializeFlowFormat(blocks) {
  var rv = [];
  blocks.forEach(function (block) {
    var _block = _slicedToArray(block, 2),
        blockName = _block[0],
        lines = _block[1];

    rv.push("#### " + blockName + " ####\n");
    lines.forEach(function (line) {
      rv.push(line.replace(/^(####(.*)####)(\r?\n)?$/, "#$1#$3"));
    });
  });
  rv = rv.join("");
  /* we need to chop of the last newline if it exists because this would
     otherwise add a newline to the last block.  This is just a side effect
     of how we serialize the meta format internally */

  if (rv[rv.length - 1] === "\n") {
    rv = rv.substr(0, rv.length - 1);
  }

  return rv;
};

var deserializeFlowBlock = function deserializeFlowBlock(flowBlockModel, lines, localId) {
  var data = {};
  var rawData = {};
  _metaformat__WEBPACK_IMPORTED_MODULE_2__["default"].tokenize(lines).forEach(function (item) {
    var _item = _slicedToArray(item, 2),
        key = _item[0],
        lines = _item[1];

    var value = lines.join("");
    rawData[key] = value;
  });
  flowBlockModel.fields.forEach(function (field) {
    var value = rawData[field.name] || "";
    var Widget = (0,_widgets__WEBPACK_IMPORTED_MODULE_5__.getWidgetComponent)(field.type);

    if (!value && field["default"]) {
      value = field["default"];
    }

    if (Widget && Widget.deserializeValue) {
      value = Widget.deserializeValue(value, field.type);
    }

    data[field.name] = value;
  });
  return {
    localId: localId || null,
    flowBlockModel: flowBlockModel,
    data: data
  };
};

var serializeFlowBlock = function serializeFlowBlock(flockBlockModel, data) {
  var rv = [];
  flockBlockModel.fields.forEach(function (field) {
    var Widget = (0,_widgets__WEBPACK_IMPORTED_MODULE_5__.getWidgetComponent)(field.type);

    if (Widget === null) {
      return;
    }

    var value = data[field.name];

    if (value === undefined || value === null) {
      return;
    }

    if (Widget.serializeValue) {
      value = Widget.serializeValue(value, field.type);
    }

    rv.push([field.name, value]);
  });
  return _metaformat__WEBPACK_IMPORTED_MODULE_2__["default"].serialize(rv);
};

var FlowWidget = /*#__PURE__*/function (_React$PureComponent) {
  _inherits(FlowWidget, _React$PureComponent);

  var _super = _createSuper(FlowWidget);

  function FlowWidget() {
    _classCallCheck(this, FlowWidget);

    return _super.apply(this, arguments);
  }

  _createClass(FlowWidget, [{
    key: "moveBlock",
    value: function moveBlock(idx, offset) {
      var newIndex = idx + offset;

      if (newIndex < 0 || newIndex >= this.props.value.length) {
        return;
      }

      var newValue = _toConsumableArray(this.props.value);

      newValue[newIndex] = this.props.value[idx];
      newValue[idx] = this.props.value[newIndex];
      this.props.onChange(newValue);
    }
  }, {
    key: "removeBlock",
    value: function removeBlock(idx) {
      if (confirm(_i18n__WEBPACK_IMPORTED_MODULE_1__["default"].trans("REMOVE_FLOWBLOCK_PROMPT"))) {
        this.props.onChange(this.props.value.filter(function (item, i) {
          return i !== idx;
        }));
      }
    }
  }, {
    key: "addNewBlock",
    value: function addNewBlock(key) {
      var flowBlockModel = this.props.type.flowblocks[key]; // find the first available id for this new block - use findMax + 1

      var blockIds = this.props.value.map(function (block) {
        return block.localId;
      });
      var newBlockId = blockIds.length === 0 ? 1 : Math.max.apply(Math, _toConsumableArray(blockIds)) + 1; // this is a rather ugly way to do this, but hey, it works.

      var newValue = [].concat(_toConsumableArray(this.props.value), [deserializeFlowBlock(flowBlockModel, [], newBlockId)]);
      this.props.onChange(newValue);
    }
  }, {
    key: "toggleBlock",
    value: function toggleBlock(idx) {
      var collapsed = this.props.value[idx].collapsed;

      var newValue = _toConsumableArray(this.props.value);

      newValue[idx] = _objectSpread(_objectSpread({}, this.props.value[idx]), {}, {
        collapsed: !collapsed
      });
      this.props.onChange(newValue, true); // true => just ui changed
    }
  }, {
    key: "renderFormField",
    value: function renderFormField(blockInfo, field, idx) {
      var _this = this;

      var value = blockInfo.data[field.name];
      var placeholder = field["default"];
      var Widget = (0,_widgets__WEBPACK_IMPORTED_MODULE_5__.getWidgetComponentWithFallback)(field.type);

      if (Widget.deserializeValue && placeholder != null) {
        placeholder = Widget.deserializeValue(placeholder, field.type);
      }

      var onChange = function onChange(value) {
        blockInfo.data[field.name] = value;

        _this.props.onChange(_toConsumableArray(_this.props.value));
      };

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_widgets__WEBPACK_IMPORTED_MODULE_5__.FieldBox, {
        key: idx,
        value: value,
        placeholder: placeholder,
        field: field,
        onChange: onChange
      });
    }
  }, {
    key: "renderBlocks",
    value: function renderBlocks() {
      var _this2 = this;

      return this.props.value.map(function (blockInfo, idx) {
        // bad block is no block
        if (blockInfo === null) {
          return null;
        }

        var fields = blockInfo.collapsed ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_widgets__WEBPACK_IMPORTED_MODULE_5__.FieldRows, {
          fields: blockInfo.flowBlockModel.fields,
          renderFunc: _this2.renderFormField.bind(_this2, blockInfo)
        });
        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
          key: blockInfo.localId,
          className: "flow-block"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
          className: "btn-group action-bar"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
          type: "button",
          className: "btn btn-default btn-xs",
          title: blockInfo.collapsed ? _i18n__WEBPACK_IMPORTED_MODULE_1__["default"].trans("Expand") : _i18n__WEBPACK_IMPORTED_MODULE_1__["default"].trans("Collapse"),
          onClick: _this2.toggleBlock.bind(_this2, idx)
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
          className: blockInfo.collapsed ? "fa fa-expand" : "fa fa-compress"
        })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
          type: "button",
          className: "btn btn-default btn-xs",
          title: _i18n__WEBPACK_IMPORTED_MODULE_1__["default"].trans("UP"),
          disabled: idx === 0,
          onClick: _this2.moveBlock.bind(_this2, idx, -1)
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
          className: "fa fa-fw fa-chevron-up"
        })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
          type: "button",
          className: "btn btn-default btn-xs",
          title: _i18n__WEBPACK_IMPORTED_MODULE_1__["default"].trans("DOWN"),
          disabled: idx >= _this2.props.value.length - 1,
          onClick: _this2.moveBlock.bind(_this2, idx, 1)
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
          className: "fa fa-fw fa-chevron-down"
        })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
          type: "button",
          className: "btn btn-default btn-xs",
          title: _i18n__WEBPACK_IMPORTED_MODULE_1__["default"].trans("REMOVE"),
          onClick: _this2.removeBlock.bind(_this2, idx)
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
          className: "fa fa-fw fa-times"
        }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h4", {
          className: "block-name"
        }, _userLabel__WEBPACK_IMPORTED_MODULE_4__["default"].format(blockInfo.flowBlockModel.name_i18n)), fields);
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this3 = this;

      var addBlockButtons = this.props.type.flowblock_order.map(function (key) {
        var flowBlockModel = _this3.props.type.flowblocks[key];
        var label = flowBlockModel.button_label ? _userLabel__WEBPACK_IMPORTED_MODULE_4__["default"].format(flowBlockModel.button_label) : _userLabel__WEBPACK_IMPORTED_MODULE_4__["default"].format(flowBlockModel.name_i18n);
        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", {
          type: "button",
          className: "btn btn-default",
          onClick: _this3.addNewBlock.bind(_this3, key),
          title: _i18n__WEBPACK_IMPORTED_MODULE_1__["default"].trans(flowBlockModel.name_i18n),
          key: flowBlockModel.id
        }, label);
      });
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "flow"
      }, this.renderBlocks(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "add-flow-block"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", null, _i18n__WEBPACK_IMPORTED_MODULE_1__["default"].trans("ADD_FLOWBLOCK") + ": "), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "btn-group"
      }, addBlockButtons)));
    }
  }], [{
    key: "deserializeValue",
    value: function deserializeValue(value, type) {
      var blockId = 0;
      return parseFlowFormat(value).map(function (item) {
        var _item2 = _slicedToArray(item, 2),
            id = _item2[0],
            lines = _item2[1];

        var flowBlock = type.flowblocks[id];

        if (flowBlock !== undefined) {
          return deserializeFlowBlock(flowBlock, lines, ++blockId);
        }

        return null;
      });
    }
  }, {
    key: "serializeValue",
    value: function serializeValue(value) {
      return serializeFlowFormat(value.map(function (item) {
        return [item.flowBlockModel.id, serializeFlowBlock(item.flowBlockModel, item.data)];
      }));
    }
  }]);

  return FlowWidget;
}(react__WEBPACK_IMPORTED_MODULE_0__.PureComponent);
FlowWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_3__.widgetPropTypes;

/***/ }),

/***/ "./js/widgets/mixins.jsx":
/*!*******************************!*\
  !*** ./js/widgets/mixins.jsx ***!
  \*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "widgetPropTypes": () => (/* binding */ widgetPropTypes),
/* harmony export */   "getInputClass": () => (/* binding */ getInputClass)
/* harmony export */ });
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);

var widgetPropTypes = {
  value: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().any),
  type: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
  placeholder: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().any),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().any),
  disabled: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)
};
function getInputClass(type) {
  var rv = "form-control";

  if (type.size === "small") {
    rv = "input-sm " + rv;
  } else if (type.size === "large") {
    rv = "input-lg " + rv;
  }

  return rv;
}

/***/ }),

/***/ "./js/widgets/multiWidgets.jsx":
/*!*************************************!*\
  !*** ./js/widgets/multiWidgets.jsx ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CheckboxesInputWidget": () => (/* binding */ CheckboxesInputWidget),
/* harmony export */   "SelectInputWidget": () => (/* binding */ SelectInputWidget)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
/* harmony import */ var _mixins__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mixins */ "./js/widgets/mixins.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

var _excluded = ["className", "value", "placeholder", "type", "onChange"],
    _excluded2 = ["className", "type", "value", "placeholder", "onChange"];

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }






function checkboxIsActive(field, props) {
  var value = props.value;

  if (value == null) {
    value = props.placeholder;

    if (value == null) {
      return false;
    }
  }

  var _iterator = _createForOfIteratorHelper(value),
      _step;

  try {
    for (_iterator.s(); !(_step = _iterator.n()).done;) {
      var item = _step.value;

      if (item === field) {
        return true;
      }
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }

  return false;
}

var CheckboxesInputWidget = /*#__PURE__*/function (_React$PureComponent) {
  _inherits(CheckboxesInputWidget, _React$PureComponent);

  var _super = _createSuper(CheckboxesInputWidget);

  function CheckboxesInputWidget() {
    _classCallCheck(this, CheckboxesInputWidget);

    return _super.apply(this, arguments);
  }

  _createClass(CheckboxesInputWidget, [{
    key: "render",
    value: function render() {
      var _this = this,
          _type$choices;

      var _this$props = this.props,
          className = _this$props.className,
          value = _this$props.value,
          placeholder = _this$props.placeholder,
          type = _this$props.type,
          onChange = _this$props.onChange,
          otherProps = _objectWithoutProperties(_this$props, _excluded);

      className = (className || "") + " checkbox";

      var onChangeHandler = function onChangeHandler(field, event) {
        var newValue = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.flipSetValue)(_this.props.value, field, event.target.checked);
        onChange(newValue);
      };

      var choices = (_type$choices = type.choices) === null || _type$choices === void 0 ? void 0 : _type$choices.map(function (item) {
        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
          className: className,
          key: item[0]
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", _extends({
          type: "checkbox"
        }, otherProps, {
          checked: checkboxIsActive(item[0], _this.props),
          onChange: function onChange(e) {
            return onChangeHandler(item[0], e);
          }
        })), _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans(item[1])));
      });
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "checkboxes"
      }, choices);
    }
  }], [{
    key: "serializeValue",
    value: function serializeValue(value) {
      return (value || "").join(", ");
    }
  }, {
    key: "deserializeValue",
    value: function deserializeValue(value) {
      if (value === "") {
        return null;
      }

      var rv = value.split(",").map(function (x) {
        return x.match(/^\s*(.*?)\s*$/)[1];
      });

      if (rv.length === 1 && rv[0] === "") {
        rv = [];
      }

      return rv;
    }
  }]);

  return CheckboxesInputWidget;
}(react__WEBPACK_IMPORTED_MODULE_0__.PureComponent);
CheckboxesInputWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_3__.widgetPropTypes;
function SelectInputWidget(props) {
  var _type$choices2;

  var className = props.className,
      type = props.type,
      value = props.value,
      placeholder = props.placeholder,
      _onChange = props.onChange,
      otherProps = _objectWithoutProperties(props, _excluded2);

  var choices = (_type$choices2 = type.choices) === null || _type$choices2 === void 0 ? void 0 : _type$choices2.map(function (item) {
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("option", {
      key: item[0],
      value: item[0]
    }, _i18n__WEBPACK_IMPORTED_MODULE_2__["default"].trans(item[1]));
  });
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
    className: "form-group"
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
    className: className
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("select", _extends({
    className: (0,_mixins__WEBPACK_IMPORTED_MODULE_3__.getInputClass)(type),
    value: value || placeholder || "",
    onChange: function onChange(e) {
      return _onChange(e.target.value);
    }
  }, otherProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("option", {
    key: "",
    value: ""
  }, "----"), choices)));
}
SelectInputWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_3__.widgetPropTypes;

/***/ }),

/***/ "./js/widgets/primitiveWidgets.jsx":
/*!*****************************************!*\
  !*** ./js/widgets/primitiveWidgets.jsx ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SingleLineTextInputWidget": () => (/* binding */ SingleLineTextInputWidget),
/* harmony export */   "SlugInputWidget": () => (/* binding */ SlugInputWidget),
/* harmony export */   "IntegerInputWidget": () => (/* binding */ IntegerInputWidget),
/* harmony export */   "FloatInputWidget": () => (/* binding */ FloatInputWidget),
/* harmony export */   "DateInputWidget": () => (/* binding */ DateInputWidget),
/* harmony export */   "UrlInputWidget": () => (/* binding */ UrlInputWidget),
/* harmony export */   "MultiLineTextInputWidget": () => (/* binding */ MultiLineTextInputWidget),
/* harmony export */   "BooleanInputWidget": () => (/* binding */ BooleanInputWidget)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../node_modules/react/index.js");
/* harmony import */ var _mixins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mixins */ "./js/widgets/mixins.jsx");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./js/utils.jsx");
/* harmony import */ var _userLabel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../userLabel */ "./js/userLabel.jsx");
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../i18n */ "./js/i18n.jsx");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }







var isTrue = function isTrue(value) {
  return value === "true" || value === "yes" || value === "1";
};

var isValidDate = function isValidDate(year, month, day) {
  year = parseInt(year, 10);
  month = parseInt(month, 10);
  day = parseInt(day, 10);
  var date = new Date(year, month - 1, day);

  if (date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day) {
    return true;
  }

  return false;
};

function InputWidgetBase(props) {
  var type = props.type,
      value = props.value,
      onChange = props.onChange,
      postprocessValue = props.postprocessValue,
      inputAddon = props.inputAddon,
      inputType = props.inputType,
      validate = props.validate,
      disabled = props.disabled,
      placeholder = props.placeholder;
  var help = null;
  var className = "input-group";

  function onChangeHandler(event) {
    var value = event.target.value;

    if (postprocessValue) {
      value = postprocessValue(value);
    }

    onChange(value);
  }

  var failure = validate ? validate(value) : null;

  var setValidity = function setValidity(el) {
    if (el) {
      el.setCustomValidity(failure || "");
    }
  };

  if (failure !== null) {
    className += " has-feedback has-error";
    var valClassName = "validation-block validation-block-error";
    help = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
      className: valClassName
    }, failure);
  }

  var addon = null;
  var configuredAddon = type.addon_label_i18n;

  if (configuredAddon) {
    addon = _userLabel__WEBPACK_IMPORTED_MODULE_3__["default"].format(configuredAddon);
  } else if (inputAddon) {
    addon = inputAddon;
  }

  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
    className: "form-group"
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
    className: className
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", {
    ref: setValidity,
    type: inputType,
    disabled: disabled,
    placeholder: placeholder,
    className: (0,_mixins__WEBPACK_IMPORTED_MODULE_1__.getInputClass)(type),
    onChange: onChangeHandler,
    value: value || ""
  }), addon ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", {
    className: "input-group-addon"
  }, addon) : null), help);
}

function SingleLineTextInputWidget(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(InputWidgetBase, _extends({
    inputType: "text",
    inputAddon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
      className: "fa fa-paragraph"
    })
  }, props));
}
SingleLineTextInputWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_1__.widgetPropTypes;

function postprocessSlug(value) {
  return value.replace(/\s+/g, "-");
}

function SlugInputWidget(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(InputWidgetBase, _extends({
    inputType: "text",
    inputAddon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
      className: "fa fa-link"
    }),
    postprocessValue: postprocessSlug
  }, props));
}
SlugInputWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_1__.widgetPropTypes;

function postprocessInteger(value) {
  return value.match(/^\s*(.*?)\s*$/)[1];
}

function validateInteger(value) {
  if (value && !value.match(/^-?\d+$/)) {
    return _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("ERROR_INVALID_NUMBER");
  }

  return null;
}

function IntegerInputWidget(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(InputWidgetBase, _extends({
    inputType: "text",
    inputAddon: "0",
    postprocessValue: postprocessInteger,
    validate: validateInteger
  }, props));
}
IntegerInputWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_1__.widgetPropTypes;

function postprocessFloat(value) {
  return value.match(/^\s*(.*?)\s*$/)[1];
}

function validateFloat(value) {
  if (value && !value.match(/^[+,-]?\d+[.]\d+$/)) {
    return _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("ERROR_INVALID_NUMBER");
  }

  return null;
}

function FloatInputWidget(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(InputWidgetBase, _extends({
    inputType: "text",
    inputAddon: "0.0",
    postprocessValue: postprocessFloat,
    validate: validateFloat
  }, props));
}
FloatInputWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_1__.widgetPropTypes;

function postprocessDate(value) {
  value = value.match(/^\s*(.*?)\s*$/)[1];
  var match = value.match(/^(\d{1,2})\.(\d{1,2})\.(\d{4})\s*$/);
  var day, month, year;

  if (match) {
    day = parseInt(match[1], 10);
    month = parseInt(match[2], 10);
    year = parseInt(match[3], 10);
    return year + "-" + (month < 10 ? "0" : "") + month + "-" + (day < 10 ? "0" : "") + day;
  }

  return value;
}

function validateDate(value) {
  if (!value) {
    return null;
  }

  var match = value.match(/^\s*(\d{4})-(\d{1,2})-(\d{1,2})\s*$/);

  if (match && isValidDate(match[1], match[2], match[3])) {
    return null;
  }

  return _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("ERROR_INVALID_DATE");
}

function DateInputWidget(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(InputWidgetBase, _extends({
    inputType: "date",
    inputAddon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
      className: "fa fa-calendar"
    }),
    postprocessValue: postprocessDate,
    validate: validateDate
  }, props));
}
DateInputWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_1__.widgetPropTypes;

function validateUrl(value) {
  if (value && !(0,_utils__WEBPACK_IMPORTED_MODULE_2__.isValidUrl)(value)) {
    return _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans("ERROR_INVALID_URL");
  }

  return null;
}

function UrlInputWidget(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(InputWidgetBase, _extends({
    inputType: "text",
    inputAddon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", {
      className: "fa fa-external-link"
    }),
    validate: validateUrl
  }, props));
}
UrlInputWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_1__.widgetPropTypes;
var MultiLineTextInputWidget = /*#__PURE__*/function (_React$Component) {
  _inherits(MultiLineTextInputWidget, _React$Component);

  var _super = _createSuper(MultiLineTextInputWidget);

  function MultiLineTextInputWidget(props) {
    var _this;

    _classCallCheck(this, MultiLineTextInputWidget);

    _this = _super.call(this, props);
    _this.recalculateSize = _this.recalculateSize.bind(_assertThisInitialized(_this));
    return _this;
  }

  _createClass(MultiLineTextInputWidget, [{
    key: "onChange",
    value: function onChange(event) {
      this.recalculateSize();
      this.props.onChange(event.target.value);
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      this.recalculateSize();
      window.addEventListener("resize", this.recalculateSize);
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      window.removeEventListener("resize", this.recalculateSize);
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps) {
      this.recalculateSize();
    }
  }, {
    key: "isInAutoResizeMode",
    value: function isInAutoResizeMode() {
      return this.props.rows === undefined;
    }
  }, {
    key: "recalculateSize",
    value: function recalculateSize() {
      if (!this.isInAutoResizeMode()) {
        return;
      }

      var diff;
      var node = this.refs.ta;

      if (window.getComputedStyle) {
        var s = window.getComputedStyle(node);

        if (s.getPropertyValue("box-sizing") === "border-box" || s.getPropertyValue("-moz-box-sizing") === "border-box" || s.getPropertyValue("-webkit-box-sizing") === "border-box") {
          diff = 0;
        } else {
          diff = parseInt(s.getPropertyValue("padding-bottom") || 0, 10) + parseInt(s.getPropertyValue("padding-top") || 0, 10);
        }
      } else {
        diff = 0;
      }

      var updateScrollPosition = node === document.activeElement; // Cross-browser compatibility for scroll position

      var oldScrollTop = document.documentElement.scrollTop || document.body.scrollTop;
      var oldHeight = node.offsetHeight;
      node.style.height = "auto";
      var newHeight = node.scrollHeight - diff;
      node.style.height = newHeight + "px";

      if (updateScrollPosition) {
        window.scrollTo(document.body.scrollLeft, oldScrollTop + (newHeight - oldHeight));
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this$props = this.props,
          type = _this$props.type,
          value = _this$props.value,
          placeholder = _this$props.placeholder,
          disabled = _this$props.disabled;
      var style = {};

      if (this.isInAutoResizeMode()) {
        style.display = "block";
        style.overflow = "hidden";
        style.resize = "none";
      }

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("textarea", {
        ref: "ta",
        className: (0,_mixins__WEBPACK_IMPORTED_MODULE_1__.getInputClass)(type),
        onChange: this.onChange.bind(this),
        style: style,
        value: value,
        disabled: disabled,
        placeholder: placeholder
      }));
    }
  }]);

  return MultiLineTextInputWidget;
}(react__WEBPACK_IMPORTED_MODULE_0__.Component);
MultiLineTextInputWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_1__.widgetPropTypes;
var BooleanInputWidget = /*#__PURE__*/function (_React$Component2) {
  _inherits(BooleanInputWidget, _React$Component2);

  var _super2 = _createSuper(BooleanInputWidget);

  function BooleanInputWidget(props) {
    var _this2;

    _classCallCheck(this, BooleanInputWidget);

    _this2 = _super2.call(this, props);
    _this2.checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createRef();
    return _this2;
  }

  _createClass(BooleanInputWidget, [{
    key: "onChange",
    value: function onChange(event) {
      this.props.onChange(event.target.checked ? "yes" : "no");
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      var checkbox = this.checkbox.current;

      if (!this.props.value && this.props.placeholder) {
        checkbox.indeterminate = true;
        checkbox.checked = isTrue(this.props.placeholder);
      } else {
        checkbox.indeterminate = false;
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this$props2 = this.props,
          type = _this$props2.type,
          value = _this$props2.value,
          disabled = _this$props2.disabled;
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
        className: "checkbox"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", {
        type: "checkbox",
        disabled: disabled,
        ref: this.checkbox,
        checked: isTrue(value),
        onChange: this.onChange.bind(this)
      }), type.checkbox_label_i18n ? _i18n__WEBPACK_IMPORTED_MODULE_4__["default"].trans(type.checkbox_label_i18n) : null));
    }
  }]);

  return BooleanInputWidget;
}(react__WEBPACK_IMPORTED_MODULE_0__.Component);
BooleanInputWidget.propTypes = _mixins__WEBPACK_IMPORTED_MODULE_1__.widgetPropTypes;

/***/ }),

/***/ "./js/slugify.js":
/*!***********************!*\
  !*** ./js/slugify.js ***!
  \***********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "slug": () => (/* binding */ slug)
/* harmony export */ });
const slug = (string, opts) => {
  opts = opts || {};
  string = string.toString();
  if (typeof opts === "string") {
    opts = { replacement: opts };
  }
  opts.mode = opts.mode || slug.defaults.mode;
  const defaults = slug.defaults.modes[opts.mode];
  ["replacement", "multicharmap", "charmap", "remove"].forEach((key) => {
    opts[key] = opts[key] || defaults[key];
  });
  if (typeof opts.symbols === "undefined") {
    opts.symbols = defaults.symbols;
  }
  const lengths = [];
  Object.keys(opts.multicharmap).forEach((key) => {
    const len = key.length;
    if (lengths.indexOf(len) === -1) {
      lengths.push(len);
    }
  });
  let result = "";
  for (let char, i = 0, l = string.length; i < l; i++) {
    char = string[i];
    if (
      !lengths.some((len) => {
        const str = string.substr(i, len);
        if (opts.multicharmap[str]) {
          i += len - 1;
          char = opts.multicharmap[str];
          return true;
        } else return false;
      })
    ) {
      if (opts.charmap[char]) {
        char = opts.charmap[char];
      }
    }
    char = char.replace(/[^\w\s\-._~]/g, ""); // allowed
    if (opts.remove) char = char.replace(opts.remove, ""); // add flavour
    result += char;
  }
  result = result.replace(/^\s+|\s+$/g, ""); // trim leading/trailing spaces
  result = result.replace(/[-\s]+/g, opts.replacement); // convert spaces
  return result.replace(opts.replacement + "$", ""); // remove trailing separator
};

slug.defaults = {
  mode: "pretty",
};

slug.multicharmap = slug.defaults.multicharmap = {
  "<3": "love",
  "&&": "and",
  "||": "or",
  "w/": "with",
};

// https://code.djangoproject.com/browser/django/trunk/django/contrib/admin/media/js/urlify.js
slug.charmap = slug.defaults.charmap = {
  // latin
  À: "A",
  Á: "A",
  Â: "A",
  Ã: "A",
  Ä: "Ae",
  Å: "A",
  Æ: "AE",
  Ç: "C",
  È: "E",
  É: "E",
  Ê: "E",
  Ë: "E",
  Ì: "I",
  Í: "I",
  Î: "I",
  Ï: "I",
  Ð: "D",
  Ñ: "N",
  Ò: "O",
  Ó: "O",
  Ô: "O",
  Õ: "O",
  Ö: "Oe",
  Ő: "O",
  Ø: "O",
  Ù: "U",
  Ú: "U",
  Û: "U",
  Ü: "Ue",
  Ű: "U",
  Ý: "Y",
  Þ: "TH",
  ß: "ss",
  à: "a",
  á: "a",
  â: "a",
  ã: "a",
  ä: "ae",
  å: "a",
  æ: "ae",
  ç: "c",
  è: "e",
  é: "e",
  ê: "e",
  ë: "e",
  ì: "i",
  í: "i",
  î: "i",
  ï: "i",
  ð: "d",
  ñ: "n",
  ò: "o",
  ó: "o",
  ô: "o",
  õ: "o",
  ö: "oe",
  ő: "o",
  ø: "o",
  ù: "u",
  ú: "u",
  û: "u",
  ü: "ue",
  ű: "u",
  ý: "y",
  þ: "th",
  ÿ: "y",
  ẞ: "SS",
  // greek
  α: "a",
  β: "b",
  γ: "g",
  δ: "d",
  ε: "e",
  ζ: "z",
  η: "h",
  θ: "8",
  ι: "i",
  κ: "k",
  λ: "l",
  μ: "m",
  ν: "n",
  ξ: "3",
  ο: "o",
  π: "p",
  ρ: "r",
  σ: "s",
  τ: "t",
  υ: "y",
  φ: "f",
  χ: "x",
  ψ: "ps",
  ω: "w",
  ά: "a",
  έ: "e",
  ί: "i",
  ό: "o",
  ύ: "y",
  ή: "h",
  ώ: "w",
  ς: "s",
  ϊ: "i",
  ΰ: "y",
  ϋ: "y",
  ΐ: "i",
  Α: "A",
  Β: "B",
  Γ: "G",
  Δ: "D",
  Ε: "E",
  Ζ: "Z",
  Η: "H",
  Θ: "8",
  Ι: "I",
  Κ: "K",
  Λ: "L",
  Μ: "M",
  Ν: "N",
  Ξ: "3",
  Ο: "O",
  Π: "P",
  Ρ: "R",
  Σ: "S",
  Τ: "T",
  Υ: "Y",
  Φ: "F",
  Χ: "X",
  Ψ: "PS",
  Ω: "W",
  Ά: "A",
  Έ: "E",
  Ί: "I",
  Ό: "O",
  Ύ: "Y",
  Ή: "H",
  Ώ: "W",
  Ϊ: "I",
  Ϋ: "Y",
  // turkish
  ş: "s",
  Ş: "S",
  ı: "i",
  İ: "I",
  ğ: "g",
  Ğ: "G",
  // russian
  а: "a",
  б: "b",
  в: "v",
  г: "g",
  д: "d",
  е: "e",
  ё: "yo",
  ж: "zh",
  з: "z",
  и: "i",
  й: "j",
  к: "k",
  л: "l",
  м: "m",
  н: "n",
  о: "o",
  п: "p",
  р: "r",
  с: "s",
  т: "t",
  у: "u",
  ф: "f",
  х: "h",
  ц: "c",
  ч: "ch",
  ш: "sh",
  щ: "sh",
  ъ: "u",
  ы: "y",
  ь: "",
  э: "e",
  ю: "yu",
  я: "ya",
  А: "A",
  Б: "B",
  В: "V",
  Г: "G",
  Д: "D",
  Е: "E",
  Ё: "Yo",
  Ж: "Zh",
  З: "Z",
  И: "I",
  Й: "J",
  К: "K",
  Л: "L",
  М: "M",
  Н: "N",
  О: "O",
  П: "P",
  Р: "R",
  С: "S",
  Т: "T",
  У: "U",
  Ф: "F",
  Х: "H",
  Ц: "C",
  Ч: "Ch",
  Ш: "Sh",
  Щ: "Sh",
  Ъ: "U",
  Ы: "Y",
  Ь: "",
  Э: "E",
  Ю: "Yu",
  Я: "Ya",
  // ukranian
  Є: "Ye",
  І: "I",
  Ї: "Yi",
  Ґ: "G",
  є: "ye",
  і: "i",
  ї: "yi",
  ґ: "g",
  // czech
  č: "c",
  ď: "d",
  ě: "e",
  ň: "n",
  ř: "r",
  š: "s",
  ť: "t",
  ů: "u",
  ž: "z",
  Č: "C",
  Ď: "D",
  Ě: "E",
  Ň: "N",
  Ř: "R",
  Š: "S",
  Ť: "T",
  Ů: "U",
  Ž: "Z",
  // polish
  ą: "a",
  ć: "c",
  ę: "e",
  ł: "l",
  ń: "n",
  ś: "s",
  ź: "z",
  ż: "z",
  Ą: "A",
  Ć: "C",
  Ę: "E",
  Ł: "L",
  Ń: "N",
  Ś: "S",
  Ź: "Z",
  Ż: "Z",
  // latvian
  ā: "a",
  ē: "e",
  ģ: "g",
  ī: "i",
  ķ: "k",
  ļ: "l",
  ņ: "n",
  ū: "u",
  Ā: "A",
  Ē: "E",
  Ģ: "G",
  Ī: "I",
  Ķ: "K",
  Ļ: "L",
  Ņ: "N",
  Ū: "U",
  // lithuanian
  ė: "e",
  į: "i",
  ų: "u",
  Ė: "E",
  Į: "I",
  Ų: "U",
  // romanian
  ț: "t",
  Ț: "T",
  ţ: "t",
  Ţ: "T",
  ș: "s",
  Ș: "S",
  ă: "a",
  Ă: "A",
  // currency
  "€": "euro",
  "₢": "cruzeiro",
  "₣": "french franc",
  "£": "pound",
  "₤": "lira",
  "₥": "mill",
  "₦": "naira",
  "₧": "peseta",
  "₨": "rupee",
  "₩": "won",
  "₪": "new shequel",
  "₫": "dong",
  "₭": "kip",
  "₮": "tugrik",
  "₯": "drachma",
  "₰": "penny",
  "₱": "peso",
  "₲": "guarani",
  "₳": "austral",
  "₴": "hryvnia",
  "₵": "cedi",
  "¢": "cent",
  "¥": "yen",
  元: "yuan",
  円: "yen",
  "﷼": "rial",
  "₠": "ecu",
  "¤": "currency",
  "฿": "baht",
  $: "dollar",
  "₹": "indian rupee",
  // symbols
  "©": "(c)",
  œ: "oe",
  Œ: "OE",
  "∑": "sum",
  "®": "(r)",
  "†": "+",
  "“": '"',
  "”": '"',
  "‘": "'",
  "’": "'",
  "∂": "d",
  ƒ: "f",
  "™": "tm",
  "℠": "sm",
  "…": "...",
  "˚": "o",
  º: "o",
  ª: "a",
  "•": "*",
  "∆": "delta",
  "∞": "infinity",
  "♥": "love",
  "&": "and",
  "|": "or",
  "<": "less",
  ">": "greater",
  "=": "equals",
};

slug.defaults.modes = {
  pretty: {
    replacement: "-",
    symbols: true,
    remove: /[.]/g,
    charmap: slug.defaults.charmap,
    multicharmap: slug.defaults.multicharmap,
  },
};


/***/ }),

/***/ "../../translations sync recursive \\.json$":
/*!****************************************!*\
  !*** ../../translations/ sync \.json$ ***!
  \****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var map = {
	"./ca.json": "../../translations/ca.json",
	"./de.json": "../../translations/de.json",
	"./en.json": "../../translations/en.json",
	"./es.json": "../../translations/es.json",
	"./fr.json": "../../translations/fr.json",
	"./it.json": "../../translations/it.json",
	"./ja.json": "../../translations/ja.json",
	"./ko.json": "../../translations/ko.json",
	"./nl.json": "../../translations/nl.json",
	"./pl.json": "../../translations/pl.json",
	"./pt.json": "../../translations/pt.json",
	"./ru.json": "../../translations/ru.json",
	"./zh.json": "../../translations/zh.json"
};


function webpackContext(req) {
	var id = webpackContextResolve(req);
	return __webpack_require__(id);
}
function webpackContextResolve(req) {
	if(!__webpack_require__.o(map, req)) {
		var e = new Error("Cannot find module '" + req + "'");
		e.code = 'MODULE_NOT_FOUND';
		throw e;
	}
	return map[req];
}
webpackContext.keys = function webpackContextKeys() {
	return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "../../translations sync recursive \\.json$";

/***/ }),

/***/ "../../translations/ca.json":
/*!**********************************!*\
  !*** ../../translations/ca.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"Tornar al Lloc Web","UNLOAD_ACTIVE_TAB":"Hi ha informació sense desar, està segur que vol abandonar aquesta pàgina?","EDIT_METADATA":"Editar Metadades","EDIT":"Editar","DELETE":"Esborrar","PREVIEW":"Previsualitzar","ALTS":"Alternatives","PRIMARY_ALT":"Primària","PRIMARY_OVERLAY":"Overlaid","ADD_CHILD_PAGE":"Afegir Pàgina","ADD_ATTACHMENT":"Afegir Adjunt","ATTACHMENT_ACTIONS":"Accions sobre els Adjunts","PAGE_ACTIONS":"Accions sobre la Pàgina","NO_CHILD_PAGES":"Sense Subpàgines","CHILD_PAGES":"Subpàgines","NO_ATTACHMENTS":"Sense Adjunts","ATTACHMENTS":"Adjunts","ADD_ATTACHMENT_TO":"Afegir Adjunt a “%s”","ADD_ATTACHMENT_NOTE":"Pot pujar un nou adjunt aquí.","UPLOAD":"Pujar","PROGRESS":"Avenç","ERROR_PREFIX":"Error: ","ERROR_NO_ID_PROVIDED":"No s\'ha proporcionat un ID.","ERROR_PAGE_ID_DUPLICATE":"Ja existeix una pàgina amb aquest ID (%s).","ERROR_INVALID_ID":"ID invàlid","ERROR_INVALID_DATE":"Data invàlida","ERROR_INVALID_NUMBER":"Número no vàlid","ERROR_INVALID_URL":"URL no vàlida","ERROR":"Error","ERROR_OCURRED":"Ha ocorregut un Error","ERROR_REQUEST_FAILED":"No s\'ha pogut enviar la tasca al servidor.  Potser el servidor està apagat o és inaccessible","ERROR_SERVER_UNAVAILABLE":"Servidor No Disponible","ERROR_SERVER_UNAVAILABLE_MESSAGE":"El servidor no respon.  Ha estat apagat o hi ha hagut un error crític que ha fet que estigui inoperatiu i hagi de ser reiniciat.","MODEL":"Model","ADD_CHILD_PAGE_TO":"Afegir Subpàgina a “%s”","ADD_CHILD_PAGE_NOTE":"Pot afegir una nova subpàgina aquí. Tingui en compte que el model o el ID no podrà ser canviat fàcilment més endavant.","CREATE_CHILD_PAGE":"Afegir pàgina filla","DELETE_ATTACHMENT_PROMPT":"Realment vol esborrar aquest adjunt?","DELETE_ATTACHMENT_ALT_PROMPT":"Realment vol esborrar les metadades d\'aquest adjunt alternatiu?","DELETE_PAGE_PROMPT":"Vol realment esborrar aquesta pàgina?","DELETE_PAGE_ALT_PROMPT":"Realment desitja esborrar aquesta alternativa?","DELETE_PAGE_CHILDREN_WARNING":"També s\'esborraran les subpàgines que pengin d\'aquesta pàgina.","DELETE_RECORD":"Esborrar “%s”","DELETE_ALL_PAGE_ALTS":"Esborrar també totes les alternatives i fitxers adjunts.","DELETE_ALL_ATTACHMENT_ALTS":"Esborrar totes les alternatives de l\'annex i el fitxer adjunt.","DELETE_ONLY_PRIMARY_PAGE_ALT":"Esborrar només el registre principal.  Els adjunts, les alternatives i les subpàgines no seran esborrades.","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"Esborrar només les metadades del registre principal.","DELETE_PRIMARY_ALT_INFO":"Com aquest registre és una alternativa principal, pot ser esborrat per separat o conjuntament a la resta de continguts.","CHILD_PAGES_TO_BE_DELETED":"Subpàgines que seran esborrares:","ALTS_TO_BE_DELETED":"Alternatives que seran eliminades:","ATTACHMENTS_TO_BE_DELETED":"Adjunts que seran eliminats:","YES_DELETE":"Sí, esborrar","NO_CANCEL":"No, cancel·lar","SYSTEM_FIELDS":"Camps del Sistema","EDIT_ATTACHMENT_METADATA_OF":"Editar les Metadades de l\'Adjunt “%s”","EDIT_PAGE_NAME":"Editar “%s”","SAVE_CHANGES":"Desar els canvis","BROWSE_FS":"Veure al Sistema de fitxers","BROWSE_FS_MAC":"Mostrar al Finder","BROWSE_FS_WINDOWS":"Mostrar a l\'Explorador","ERROR_CANNOT_BROWSE_FS":"Error: el fitxer no existeix encara.","REMOVE_FLOWBLOCK_PROMPT":"¿Realment vol esborrar aquest block?","ADD_FLOWBLOCK":"Afegir Block","INVALID_INPUT":"Entrada invàlida","UP":"Amunt","DOWN":"Abaix","REMOVE":"Esborrar","ID":"ID","CLOSE":"Tancar","CANCEL":"Cancel·lar","BACK_TO_OVERVIEW":"Tornar a la Revisió","PUBLISH":"Publicar","PUBLISH_NOTE":"Des d\'aquí pot publicar la versió actual del lloc web.","PUBLISH_SERVER":"Servidor Destinació","CURRENTLY_PUBLISHING":"Publicannt ...","STATE":"Estat","PUBLISH_DONE":"Publicat","PUBLISH_STATE_BUILDING":"Els canvis s\'estan generant ...","PUBLISH_STATE_PUBLISH":"Els canvis s\'estan publicant ...","PUBLISH_STATE_DONE":"Publicació finalitzada.","FIND_FILES":"Buscar Fitxers","FIND_FILES_PLACEHOLDER":"Introdueixi el nom de la pàgina ...","ATTACHMENT_TYPE":"Tipus d\'adjunt","URL_SLUG":"URL personalitzada","TEMPLATE":"Plantilla","HIDE_PAGE":"Amagar pàgina","HIDE_PAGE_EXPLANATION":"Hauria d\'estar oculta aquesta pàgina?","PAGE_IS_DISCOVERABLE":"La Pàgina és detectable","PAGE_IS_DISCOVERABLE_EXPLANATION":"Si s\'habilita, la pàgina pot ser detectada, en cas contrari la URL del contingut ha de ser coneguda.","REFRESH_BUILD":"Regenerar Lloc Web","REFRESH_BUILD_NOTE":"Això esborra tots els resultats generats i llença una nova generació des de zero.  Això és útil en algunes situacions on els errors de sincronització o a les plantilles han causat un resultat corrupte.","CURRENTLY_REFRESHING_BUILD":"Regenerant ...","REFRESHING_BUILD_DONE":"Actualització finalitzada!","FAILED_TO_LAUNCH_LEKTOR":"Ha fallat l\'execució de Lektor.","PROJECT":"Projecte","CLOSE_PROJECT":"Tancar Projecte","OPEN_PROJECT":"Obrir Projecte","BROWSE_WEBSITE":"Anar al Lloc Web","VIEW_ADMIN_PANEL":"Anar al Panell d\'Administració","QUIT":"Sortir","FAILED_TO_LOAD_PROJECT":"Ha fallat la càrrega del projecte :(","LOADING_PROJECT":"Carregant projecte ...","INITIALIZING_LEKTOR":"Inicialitzant Lektor ...","QUIT_LEKTOR":"Sortir de Lektor","FILE":"Arxiu","UNDO":"Desfer","REDO":"Tornar a fer","CUT":"Tallar","COPY":"Copiar","PASTE":"Enganxar","SELECT_ALL":"Seleccionar-ho Tot","HELP":"Ajuda","VISIT_WEBSITE":"Visitar Web","INSTALL_SHELL_COMMAND":"Instalar Eina","INSTALL_SHELL_COMMAND_QUESTION":"Vol instal·lar la eina \'lektor\'? Es requereixen permisos d\'administració.","FAILED_TO_INSTALL_SHELL_COMMANDS":"Ha fallat la instal·lació de l\'eina.","INSTALL_SHELL_COMMAND_SUCCESS":"L\'eina ha estat instal·lada amb èxit.","OPERATION_SUCCESS":"Amb èxit","YES":"Sí","NO":"No","OK":"OK","FAILED_TO_OPEN_CONTENT_FILE":"Error al intentar obrir el fitxer de contingut","OPEN_OTHER_PROJECT":"Obrir un altre Projecte","OPEN_OTHER_PROJECT_QUESTION":"Obrir aquest fitxer implica obrir un altre projecte (%s). El projecte actual serà tancat. Vol continuar?"}');

/***/ }),

/***/ "../../translations/de.json":
/*!**********************************!*\
  !*** ../../translations/de.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"Zur Webseite","UNLOAD_ACTIVE_TAB":"Du hast ungespeicherte Änderungen, willst du die Seite wirklich verlassen?","EDIT_METADATA":"Metadaten bearbeiten","EDIT":"Bearbeiten","DELETE":"Löschen","PREVIEW":"Vorschau","ALTS":"Alternativen","PRIMARY_ALT":"Primär","PRIMARY_OVERLAY":"Überlagert","ADD_CHILD_PAGE":"Seite hinzufügen","ADD_ATTACHMENT":"Anhang hinzufügen","ATTACHMENT_ACTIONS":"Anhang-Aktionen","PAGE_ACTIONS":"Seiten-Aktionen","NO_CHILD_PAGES":"Keine Unterseiten","CHILD_PAGES":"Unterseiten","NO_ATTACHMENTS":"Keine Anhänge","ATTACHMENTS":"Anhänge","ADD_ATTACHMENT_TO":"Anhang zu “%s” hinzufügen","ADD_ATTACHMENT_NOTE":"Hier kannst du neue Anhänge hochladen.","UPLOAD":"Hochladen","PROGRESS":"Fortschritt","ERROR_PREFIX":"Fehler: ","ERROR_NO_ID_PROVIDED":"Es wurde keine ID eingegeben.","ERROR_PAGE_ID_DUPLICATE":"Eine Seite mit dieser ID (%s) existiert bereits.","ERROR_INVALID_ID":"Ungültige ID","ERROR_INVALID_DATE":"Ungültiges Datum","ERROR_INVALID_NUMBER":"Ungültige Zahl","ERROR_INVALID_URL":"Ungültige URL","ERROR":"Fehler","ERROR_OCURRED":"Ein Fehler ist aufgetreten","ERROR_REQUEST_FAILED":"Ein Befehl konnte nicht an den Server gesendet werden. Eventuell reagiert der Server nicht oder wurde gestoppt.","ERROR_SERVER_UNAVAILABLE":"Server unerreichbar","ERROR_SERVER_UNAVAILABLE_MESSAGE":"Der Server reagiert nicht. Entweder er wurde gestoppt oder ein kritischer Fehler ist aufgetreten und er muss neu gestartet werden.","MODEL":"Modell","ADD_CHILD_PAGE_TO":"Unterseite zu “%s” hinzufügen","ADD_CHILD_PAGE_NOTE":"Du kannst hier eine neue Unterseite hinzufügen.  Beachte, dass die ID und das Modell später nicht mehr verändert werden kann.","CREATE_CHILD_PAGE":"Unterseite hinzufügen","DELETE_ATTACHMENT_PROMPT":"Willst du den Anhang wirklich löschen?","DELETE_ATTACHMENT_ALT_PROMPT":"Willst du die Metadaten dieser Anhang-Alternative wirklich löschen?","DELETE_PAGE_PROMPT":"Willst du diese Seite wirklich löschen?","DELETE_PAGE_ALT_PROMPT":"Willst du diese Alternative wirklich löschen?","DELETE_PAGE_CHILDREN_WARNING":"Dies wird auch die Unterseiten der Seite löschen.","DELETE_RECORD":"“%s” Löschen","DELETE_ALL_PAGE_ALTS":"Alle Alternativen und angehängten Dateien mitlöschen.","DELETE_ALL_ATTACHMENT_ALTS":"Alle Alternativen und die angehängte Datei löschen.","DELETE_ONLY_PRIMARY_PAGE_ALT":"Nur den Primäreintrag löschen. Anhänge, andere Alternativen und Unterseiten werden nicht gelöscht.","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"Nur die Metadaten des Primäreintrages löschen.","DELETE_PRIMARY_ALT_INFO":"Da dieser Eintrag eine Primäralternative ist, kann diese auch separat gelöscht werden oder zusammen mit allen anderen Inhalten.","CHILD_PAGES_TO_BE_DELETED":"Unterseiten, die gelöscht werden:","ALTS_TO_BE_DELETED":"Alternativen, die gelöscht werden:","ATTACHMENTS_TO_BE_DELETED":"Anhänge, die gelöscht werden:","YES_DELETE":"Ja, löschen","NO_CANCEL":"Nein, abbrechen","SYSTEM_FIELDS":"Systemfelder","EDIT_ATTACHMENT_METADATA_OF":"Bearbeite Metadaten von Anhang “%s”","EDIT_PAGE_NAME":"Bearbeite “%s”","SAVE_CHANGES":"Änderungen speichern","BROWSE_FS":"Im Dateisystem öffnen","BROWSE_FS_MAC":"In Finder anzeigen","BROWSE_FS_WINDOWS":"Im Explorer öffnen","ERROR_CANNOT_BROWSE_FS":"Fehler: Datei existiert noch nicht","REMOVE_FLOWBLOCK_PROMPT":"Willst du diesen Block wirklich entfernen?","ADD_FLOWBLOCK":"Block hinzufügen","INVALID_INPUT":"Ungültige Eingabe","UP":"Nach oben","DOWN":"Nach unten","REMOVE":"Entfernen","ID":"ID","CLOSE":"Schließen","CANCEL":"Abbrechen","BACK_TO_OVERVIEW":"Übersicht","PUBLISH":"Veröffentlichen","PUBLISH_NOTE":"Von hier aus kann der aktuelle Stand der Webseite publiziert werden.","PUBLISH_SERVER":"Ziel-Server","CURRENTLY_PUBLISHING":"Veröffentlichung …","STATE":"Status","PUBLISH_DONE":"Veröffentlicht","PUBLISH_STATE_BUILDING":"Änderungen werden gebaut ...","PUBLISH_STATE_PUBLISH":"Änderungen werden publiziert ...","PUBLISH_STATE_DONE":"Veröffentlichung fertiggestellt.","FIND_FILES":"Seiten Finden","FIND_FILES_PLACEHOLDER":"Seitenname eingeben ...","ATTACHMENT_TYPE":"Attachment type","URL_SLUG":"URL-Slug","TEMPLATE":"Vorlage","HIDE_PAGE":"Seite verstecken","HIDE_PAGE_EXPLANATION":"Soll diese Seite versteckt werden?","PAGE_IS_DISCOVERABLE":"Seite ist erkundbar","PAGE_IS_DISCOVERABLE_EXPLANATION":"Wenn dies aktiviert ist, wird Seite von Vorlagen verlinkt. Ansonsten muss die URL bekannt sein.","REFRESH_BUILD":"Änderungen regenerieren","REFRESH_BUILD_NOTE":"In machen Situationen kann es nützlich sein, alle Änderungen zu regenerieren.  Zum Beispiel können Synchronisationsfehler und kaputte Vorlagen manchmal dazu führen, dass Seiten fehlerhaft gebaut wurden.  Dies bringt Lektor dazu, alle Seiten neu zu bauen.","CURRENTLY_REFRESHING_BUILD":"Änderungen werden regeneriert ...","REFRESHING_BUILD_DONE":"Änderungen wurden regeneriert!","FAILED_TO_LAUNCH_LEKTOR":"Lektor konnte nicht gestartet werden.","PROJECT":"Projekt","CLOSE_PROJECT":"Projekt schließen","OPEN_PROJECT":"Projekt öffnen","BROWSE_WEBSITE":"Webseite anzeigen","VIEW_ADMIN_PANEL":"Admin-Panel öffnen","QUIT":"Beenden","FAILED_TO_LOAD_PROJECT":"Projekt konnte nicht geladen werden :(","LOADING_PROJECT":"Projekt wird geöffnet ...","INITIALIZING_LEKTOR":"Initialisiere Lektor ...","QUIT_LEKTOR":"Lektor beenden","FILE":"Datei","UNDO":"Rückgängig","REDO":"Wiederholen","CUT":"Ausschneiden","COPY":"Kopieren","PASTE":"Einfügen","SELECT_ALL":"Alles Markieren","HELP":"Hilfe","VISIT_WEBSITE":"Webseite öffnen","INSTALL_SHELL_COMMAND":"Shell-Befehl installieren","INSTALL_SHELL_COMMAND_QUESTION":"Möchtest du den \'lektor\' Shell-Befehl installieren? Dies erfordert Admin-Rechte.","FAILED_TO_INSTALL_SHELL_COMMANDS":"Konnte Shell-Befehl nicht installieren.","INSTALL_SHELL_COMMAND_SUCCESS":"Shell-Befehl wurde erfolgreich installiert.","OPERATION_SUCCESS":"Operation erfolgreich","YES":"Ja","NO":"Nein","OK":"OK","FAILED_TO_OPEN_CONTENT_FILE":"Konnte Datei nicht öffnen","OPEN_OTHER_PROJECT":"Anderes Projekt öffnen","OPEN_OTHER_PROJECT_QUESTION":"Um diese Datei zu öffnen, muss ein anderes Projekt (%s) geöffnet werden. Das aktuelle Projekt wird dadurch geschlossen. Fortfahren?"}');

/***/ }),

/***/ "../../translations/en.json":
/*!**********************************!*\
  !*** ../../translations/en.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"Return to Website","UNLOAD_ACTIVE_TAB":"You have unsaved information, are you sure you want to leave this page?","EDIT_METADATA":"Edit Metadata","EDIT":"Edit","DELETE":"Delete","PREVIEW":"Preview","ALTS":"Alternatives","PRIMARY_ALT":"Primary","PRIMARY_OVERLAY":"Overlaid","ADD_CHILD_PAGE":"Add Page","ADD_ATTACHMENT":"Add Attachment","ATTACHMENT_ACTIONS":"Attachment Actions","PAGE_ACTIONS":"Page Actions","NO_CHILD_PAGES":"No Subpages","CHILD_PAGES":"Subpages","NO_ATTACHMENTS":"No attachments","ATTACHMENTS":"Attachments","ADD_ATTACHMENT_TO":"Add Attachment to “%s”","ADD_ATTACHMENT_NOTE":"You can upload a new attachment here.","UPLOAD":"Upload","PROGRESS":"Progress","ERROR_PREFIX":"Error: ","ERROR_NO_ID_PROVIDED":"No ID provided.","ERROR_PAGE_ID_DUPLICATE":"A page with this ID (%s) exists already.","ERROR_INVALID_ID":"Invalid ID","ERROR_INVALID_DATE":"Invalid date","ERROR_INVALID_NUMBER":"Not a valid number","ERROR_INVALID_URL":"Not a valid URL","ERROR":"Error","ERROR_OCURRED":"An Error ocurred","ERROR_REQUEST_FAILED":"Could not send command to server.  Maybe the server was stopped or is unresponsive?","ERROR_SERVER_UNAVAILABLE":"Server Unavailable","ERROR_SERVER_UNAVAILABLE_MESSAGE":"The server is not responding.  Either it was stopped or a critical error made it not operable and it needs to be restarted.","MODEL":"Model","ADD_CHILD_PAGE_TO":"Add Subpage to “%s”","ADD_CHILD_PAGE_NOTE":"You can add a new subpage to the page here.  Note that the model or ID cannot be easily changed afterwards.","CREATE_CHILD_PAGE":"Add Child Page","DELETE_ATTACHMENT_PROMPT":"Do you really want to delete this attachment?","DELETE_ATTACHMENT_ALT_PROMPT":"Do you really want to delete the metadata of this attachment alternative?","DELETE_PAGE_PROMPT":"Do you really want to delete this page?","DELETE_PAGE_ALT_PROMPT":"Do you really want to delete this alternative?","DELETE_PAGE_CHILDREN_WARNING":"This will also delete the child subpages of this page.","DELETE_RECORD":"Delete “%s”","DELETE_ALL_PAGE_ALTS":"Also delete all alternatives and attached files.","DELETE_ALL_ATTACHMENT_ALTS":"Delete all alternatives and the attached file.","DELETE_ONLY_PRIMARY_PAGE_ALT":"Delete only the primary record.  Attachments, alternatives and subpages will not be deleted.","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"Only delete the Metadata of the primary record.","DELETE_PRIMARY_ALT_INFO":"Because this record is a primary alternative it can be deleted separately or together with all other contents.","CHILD_PAGES_TO_BE_DELETED":"Subpages that will be deleted:","ALTS_TO_BE_DELETED":"Alternatives that will be deleted:","ATTACHMENTS_TO_BE_DELETED":"Attachments that will be deleted:","YES_DELETE":"Yes, delete","NO_CANCEL":"No, cancel","SYSTEM_FIELDS":"System Fields","EDIT_ATTACHMENT_METADATA_OF":"Edit Metadata of Attachment “%s”","EDIT_PAGE_NAME":"Edit “%s”","SAVE_CHANGES":"Save Changes","BROWSE_FS":"Browse in Filesystem","BROWSE_FS_MAC":"Reveal in Finder","BROWSE_FS_WINDOWS":"Open in Explorer","ERROR_CANNOT_BROWSE_FS":"Error: File does not exist yet.","REMOVE_FLOWBLOCK_PROMPT":"Do you really want to remove this block?","ADD_FLOWBLOCK":"Add Block","INVALID_INPUT":"Invalid Input","UP":"Up","DOWN":"Down","REMOVE":"Remove","ID":"ID","CLOSE":"Close","CANCEL":"Cancel","BACK_TO_OVERVIEW":"Back to Overview","PUBLISH":"Publish","PUBLISH_NOTE":"From here you can publish the current version of the website.","PUBLISH_SERVER":"Target Server","CURRENTLY_PUBLISHING":"Publishing …","STATE":"Status","PUBLISH_DONE":"Published","PUBLISH_STATE_BUILDING":"Changes are being built ...","PUBLISH_STATE_PUBLISH":"Changes are being published ...","PUBLISH_STATE_DONE":"Publishing done.","FIND_FILES":"Find Files","FIND_FILES_PLACEHOLDER":"Enter page name ...","ATTACHMENT_TYPE":"Attachment type","URL_SLUG":"URL slug","TEMPLATE":"Template","HIDE_PAGE":"Hide page","HIDE_PAGE_EXPLANATION":"Should this page be hidden?","PAGE_IS_DISCOVERABLE":"Page is discoverable","PAGE_IS_DISCOVERABLE_EXPLANATION":"If this is enabled the page can be discovered, otherwise the URL has to be known.","REFRESH_BUILD":"Refresh Build","REFRESH_BUILD_NOTE":"This deletes all cached build results which triggers a rebuilt from scratch.  This is useful in certain situations where sync errors or mistakes in templates caused corrupted output.","CURRENTLY_REFRESHING_BUILD":"Currently refreshing build ...","REFRESHING_BUILD_DONE":"Done refreshing build!","FAILED_TO_LAUNCH_LEKTOR":"Failed to launch Lektor.","PROJECT":"Project","CLOSE_PROJECT":"Close Project","OPEN_PROJECT":"Open Project","BROWSE_WEBSITE":"Browse Website","VIEW_ADMIN_PANEL":"View Admin Panel","QUIT":"Quit","FAILED_TO_LOAD_PROJECT":"Failed to load the project :(","LOADING_PROJECT":"Loading project ...","INITIALIZING_LEKTOR":"Initializing Lektor ...","QUIT_LEKTOR":"Quit Lektor","FILE":"File","UNDO":"Undo","REDO":"Redo","CUT":"Cut","COPY":"Copy","PASTE":"Paste","SELECT_ALL":"Select All","HELP":"Help","VISIT_WEBSITE":"Visit Website","INSTALL_SHELL_COMMAND":"Install Shell Command","INSTALL_SHELL_COMMAND_QUESTION":"Do you want to install the \'lektor\' shell command? This requires admin rights.","FAILED_TO_INSTALL_SHELL_COMMANDS":"Failed to install shell commands.","INSTALL_SHELL_COMMAND_SUCCESS":"Shell command was successfully installed.","OPERATION_SUCCESS":"Success","YES":"Yes","NO":"No","OK":"OK","FAILED_TO_OPEN_CONTENT_FILE":"Failed to open content file","OPEN_OTHER_PROJECT":"Open other Project","OPEN_OTHER_PROJECT_QUESTION":"Opening this file requires opening another project (%s). The current project will be closed. Do you want to continue?"}');

/***/ }),

/***/ "../../translations/es.json":
/*!**********************************!*\
  !*** ../../translations/es.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"Volver al Sitio Web","UNLOAD_ACTIVE_TAB":"Tiene información sin guardar, está seguro de que quiere abandonar esta página?","EDIT_METADATA":"Editar Metadatos","EDIT":"Editar","DELETE":"Borrar","PREVIEW":"Previsualizar","ALTS":"Alternativas","PRIMARY_ALT":"Primaria","PRIMARY_OVERLAY":"Overlaid","ADD_CHILD_PAGE":"Añadir Página","ADD_ATTACHMENT":"Añadir Adjunto","ATTACHMENT_ACTIONS":"Acciones de Adjunto","PAGE_ACTIONS":"Acciones de Página","NO_CHILD_PAGES":"Sin Subpáginas","CHILD_PAGES":"Subpáginas","NO_ATTACHMENTS":"Sin Adjuntos","ATTACHMENTS":"Adjuntos","ADD_ATTACHMENT_TO":"Añadir Adjunto a “%s”","ADD_ATTACHMENT_NOTE":"Puede cargar un nuevo adjunto aquí.","UPLOAD":"Cargar","PROGRESS":"Avance","ERROR_PREFIX":"Error: ","ERROR_NO_ID_PROVIDED":"No se proporcionó un ID.","ERROR_PAGE_ID_DUPLICATE":"Ya existe una página con este ID (%s).","ERROR_INVALID_ID":"ID inválido","ERROR_INVALID_DATE":"Fecha inválida","ERROR_INVALID_NUMBER":"Número no válido","ERROR_INVALID_URL":"URL no válida","ERROR":"Error","ERROR_OCURRED":"Ocurrió un Error","ERROR_REQUEST_FAILED":"No se pudo enviar el comando al servidor.  ¿Es posible que el servidor esté apagado o no responda?","ERROR_SERVER_UNAVAILABLE":"Servidor No Disponible","ERROR_SERVER_UNAVAILABLE_MESSAGE":"El servidor no responde.  Fue apagado o hubo un error crítico que lo hace inoperativo y necesita ser reiniciado.","MODEL":"Modelo","ADD_CHILD_PAGE_TO":"Añada Subpágina a “%s”","ADD_CHILD_PAGE_NOTE":"Puede añadir una nueva subpágina aquí.  Tenga en cuenta que el modelo o el ID no puede ser cambiado fácilmente más tarde.","CREATE_CHILD_PAGE":"Añada Página Hijo","DELETE_ATTACHMENT_PROMPT":"¿Quiere realmente borrar este anexo?","DELETE_ATTACHMENT_ALT_PROMPT":"¿Quiere realmente borrar los metadatos de esta alternativa de anexo?","DELETE_PAGE_PROMPT":"¿Quiere realmente borrar esta página?","DELETE_PAGE_ALT_PROMPT":"¿Quiere realmente borrar esta alternativa?","DELETE_PAGE_CHILDREN_WARNING":"Esto también borrará las subpáginas hijo de esta página.","DELETE_RECORD":"Borrar “%s”","DELETE_ALL_PAGE_ALTS":"Borrar también todas las alternativas y ficheros adjuntos.","DELETE_ALL_ATTACHMENT_ALTS":"Borrar todas las alternativas y el fichero adjunto.","DELETE_ONLY_PRIMARY_PAGE_ALT":"Borra sólo el registro principal.  Los adjuntos, las alternativas y las subpáginas no serán borradas.","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"Borra sólo los metadatos del registro principal.","DELETE_PRIMARY_ALT_INFO":"Como este registro es una alternativa principal, puede ser borrado por separado o junto al resto de contenidos.","CHILD_PAGES_TO_BE_DELETED":"Subpáginas que serán borradas:","ALTS_TO_BE_DELETED":"Alternativas que serán borradas:","ATTACHMENTS_TO_BE_DELETED":"Adjuntos que serán borrados:","YES_DELETE":"Sí, borrar","NO_CANCEL":"No, cancelar","SYSTEM_FIELDS":"Campos de Sistema","EDIT_ATTACHMENT_METADATA_OF":"Editar los Metadatos del Adjunto “%s”","EDIT_PAGE_NAME":"Editar “%s”","SAVE_CHANGES":"Guardar los cambios","BROWSE_FS":"Navegar en el Sistema de ficheros","BROWSE_FS_MAC":"Mostrar en el Finder","BROWSE_FS_WINDOWS":"Abrir en el Explorador","ERROR_CANNOT_BROWSE_FS":"Error: el fichero no existe todavía.","REMOVE_FLOWBLOCK_PROMPT":"¿Quiere realmente borrar este bloque?","ADD_FLOWBLOCK":"Añadir Bloque","INVALID_INPUT":"Entrada inválida","UP":"Arriba","DOWN":"Abajo","REMOVE":"Eliminar","ID":"ID","CLOSE":"Cerrar","CANCEL":"Cancelar","BACK_TO_OVERVIEW":"Vuelve a Revisión","PUBLISH":"Publicar","PUBLISH_NOTE":"Desde aquí puede publicar la versión actual del sitio web.","PUBLISH_SERVER":"Servidor Destino","CURRENTLY_PUBLISHING":"Publicando …","STATE":"Estado","PUBLISH_DONE":"Publicado","PUBLISH_STATE_BUILDING":"Los cambios se están generando ...","PUBLISH_STATE_PUBLISH":"Los cambios están siendo publicados ...","PUBLISH_STATE_DONE":"Publicación finalizada.","FIND_FILES":"Encontrar Ficheros","FIND_FILES_PLACEHOLDER":"Introduzca el nombre de la página ...","ATTACHMENT_TYPE":"Tipo de adjunto","URL_SLUG":"URL personalizada","TEMPLATE":"Plantilla","HIDE_PAGE":"Ocultar página","HIDE_PAGE_EXPLANATION":"¿Debería estar oculta esta página?","PAGE_IS_DISCOVERABLE":"La Página es detectable","PAGE_IS_DISCOVERABLE_EXPLANATION":"Si esto está habilitado la página puede ser detectada, en caso contrario la URL ha de ser conocida.","REFRESH_BUILD":"Refrescar la Generación","REFRESH_BUILD_NOTE":"Esto borra todos los resultados generados y lanza una nueva generación desde cero. Esto es útil en ciertas situaciones donde errores de sincronización o en las plantillas causaron un resultado corrupto.","CURRENTLY_REFRESHING_BUILD":"Regenerando ...","REFRESHING_BUILD_DONE":"¡Acabó la regeneración!","FAILED_TO_LAUNCH_LEKTOR":"Falló la ejecución de Lektor.","PROJECT":"Proyecto","CLOSE_PROJECT":"Cerrar Proyecto","OPEN_PROJECT":"Abrir Proyecto","BROWSE_WEBSITE":"Navegar Sitio Web","VIEW_ADMIN_PANEL":"Ver Panel de Administración","QUIT":"Salir","FAILED_TO_LOAD_PROJECT":"Falló la carga del proyecto :(","LOADING_PROJECT":"Cargando proyecto ...","INITIALIZING_LEKTOR":"Inicializando Lektor ...","QUIT_LEKTOR":"Salir de Lektor","FILE":"Archivo","UNDO":"Deshacer","REDO":"Rehacer","CUT":"Cortar","COPY":"Copiar","PASTE":"Pegar","SELECT_ALL":"Seleccionar Todo","HELP":"Ayuda","VISIT_WEBSITE":"Visitar Web","INSTALL_SHELL_COMMAND":"Instalar Comando","INSTALL_SHELL_COMMAND_QUESTION":"¿Quiere instalar el comando \'lektor\'? Son necesarios privilegios de administrador.","FAILED_TO_INSTALL_SHELL_COMMANDS":"Falló la instalación de los comandos.","INSTALL_SHELL_COMMAND_SUCCESS":"El comando se instaló con éxito.","OPERATION_SUCCESS":"Con éxito","YES":"Sí","NO":"No","OK":"OK","FAILED_TO_OPEN_CONTENT_FILE":"Falló al abrir el fichero de contenido","OPEN_OTHER_PROJECT":"Abrir otro Proyecto","OPEN_OTHER_PROJECT_QUESTION":"Abrir este fichero requiere abrir otro proyecto (%s). El proyecto actual será cerrado. ¿Quiere continuar?"}');

/***/ }),

/***/ "../../translations/fr.json":
/*!**********************************!*\
  !*** ../../translations/fr.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"Retour au site Web","UNLOAD_ACTIVE_TAB":"Des informations ne sont pas enregistrées, voulez-vous vraiment quitter cette page ?","EDIT_METADATA":"Modifier les métadonnées","EDIT":"Modifier","DELETE":"Supprimer","PREVIEW":"Aperçu","ALTS":"Alternatives","PRIMARY_ALT":"Primaire","PRIMARY_OVERLAY":"Superposée","ADD_CHILD_PAGE":"Ajouter une page","ADD_ATTACHMENT":"Joindre un fichier","ATTACHMENT_ACTIONS":"Actions sur les fichiers joints","PAGE_ACTIONS":"Action sur les pages","NO_CHILD_PAGES":"Aucune sous-page","CHILD_PAGES":"Sous-pages","NO_ATTACHMENTS":"Aucun fichier joint","ATTACHMENTS":"Fichiers joints","ADD_ATTACHMENT_TO":"Joindre un fichier à « %s »","ADD_ATTACHMENT_NOTE":"Vous pouvez téléverser un nouveau fichier joint ici.","UPLOAD":"Téléverser","PROGRESS":"Progression","ERROR_PREFIX":"Erreur : ","ERROR_NO_ID_PROVIDED":"Erreur : aucun ID fourni.","ERROR_PAGE_ID_DUPLICATE":"Une page avec cet ID (%s) existe déjà.","ERROR_INVALID_ID":"ID non valide","ERROR_INVALID_DATE":"Date non valide","ERROR_INVALID_NUMBER":"Nombre non valide","ERROR_INVALID_URL":"URL non valide","ERROR":"Erreur","ERROR_OCURRED":"Une erreur a été rencontrée","ERROR_REQUEST_FAILED":"La commande n\'a pas pu être envoyée au serveur. Le serveur a peut-être été arrêté ou ne répond plus ?","ERROR_SERVER_UNAVAILABLE":"Serveur indisponible","ERROR_SERVER_UNAVAILABLE_MESSAGE":"Le serveur ne répond pas. Il a dû être arrêté ou une erreur critique l\'a rendu inopérant et il doit être redémarré.","MODEL":"Modèle","ADD_CHILD_PAGE_TO":"Ajouter une sous-page à « %s »","ADD_CHILD_PAGE_NOTE":"Vous pouvez ajouter une nouvelle sous-page à la page ici. Veuillez noter que le modèle ou l\'ID ne peut pas être changé facilement ultérieurement.","CREATE_CHILD_PAGE":"Ajouter une sous-page","DELETE_ATTACHMENT_PROMPT":"Voulez-vous vraiment supprimer ce fichier joint ?","DELETE_ATTACHMENT_ALT_PROMPT":"Voulez-vous vraiment supprimer les métadonnées de ce fichier joint alternatif ?","DELETE_PAGE_PROMPT":"Voulez-vous vraiment supprimer cette page ?","DELETE_PAGE_ALT_PROMPT":"Voulez-vous vraiment supprimer cette version alternative ?","DELETE_PAGE_CHILDREN_WARNING":"Cela supprimera aussi les sous-pages de cette page.","DELETE_RECORD":"Supprimer « %s »","DELETE_ALL_PAGE_ALTS":"Supprimer aussi toutes les versions alternatives et les fichiers joints.","DELETE_ALL_ATTACHMENT_ALTS":"Supprimer toutes les versions alternatives et les fichiers joints.","DELETE_ONLY_PRIMARY_PAGE_ALT":"Supprimer seulement le premier enregistrement. Les fichiers joints, versions alternatives et sous-pages ne seront pas supprimées.","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"Supprimer seulement les métadonnées de la pièce jointe primaire.","DELETE_PRIMARY_ALT_INFO":"Cet enregistrement étant l\'alternative primaire, il peut être supprimé séparément ou avec tous les autres contenus.","CHILD_PAGES_TO_BE_DELETED":"Les sous-pages qui seront supprimées :","ALTS_TO_BE_DELETED":"Les versions alternatives qui seront supprimées :","ATTACHMENTS_TO_BE_DELETED":"Les fichiers joints qui seront supprimés :","YES_DELETE":"Oui, supprimer","NO_CANCEL":"Non, annuler","SYSTEM_FIELDS":"Champs système","EDIT_ATTACHMENT_METADATA_OF":"Modifier les métadonnées du fichier joint « %s »","EDIT_PAGE_NAME":"Modifier « %s »","SAVE_CHANGES":"Enregistrer les changements","BROWSE_FS":"Parcourir le système de fichiers","BROWSE_FS_MAC":"Révéler dans le Finder","BROWSE_FS_WINDOWS":"Ouvrir dans l\'Explorateur","ERROR_CANNOT_BROWSE_FS":"Erreur : le fichier n\'existe pas encore.","REMOVE_FLOWBLOCK_PROMPT":"Voulez-vous vraiment supprimer ce bloc ?","ADD_FLOWBLOCK":"Ajouter un bloc","INVALID_INPUT":"Saisie non valide","UP":"Haut","DOWN":"Bas","REMOVE":"Enlever","ID":"ID","CLOSE":"Fermer","CANCEL":"Annuler","BACK_TO_OVERVIEW":"Retour à l\'aperçu","PUBLISH":"Publier","PUBLISH_NOTE":"À partir de maintenant, vous pouvez publier la version actuelle de votre site Web.","PUBLISH_SERVER":"Serveur cible","CURRENTLY_PUBLISHING":"Publication en cours…","STATE":"Statut","PUBLISH_DONE":"Publié","PUBLISH_STATE_BUILDING":"Les changements sont en cours de construction…","PUBLISH_STATE_PUBLISH":"Les changements  sont en cours de publication…","PUBLISH_STATE_DONE":"Publication effectuée.","FIND_FILES":"Trouver les fichiers","FIND_FILES_PLACEHOLDER":"Saisir le nom de la page…","ATTACHMENT_TYPE":"Type de fichier joint","URL_SLUG":"Motif d\'URL (slug)","TEMPLATE":"Modèle","HIDE_PAGE":"Masquer la page","HIDE_PAGE_EXPLANATION":"Est-ce que cette page devrait être masquée ?","PAGE_IS_DISCOVERABLE":"La page est « découvrable »","PAGE_IS_DISCOVERABLE_EXPLANATION":"Si activé, la page pourra être retrouvée car elle sera indexée, sinon l\'URL devra être connue pour y accéder.","REFRESH_BUILD":"Actualiser la construction","REFRESH_BUILD_NOTE":"Cela supprime tous les résultats de la construction et entraîne une reconstruction complète. C\'est utile dans certaines situations où le résultat est corrompu suite à des erreurs de synchronisation ou de modèles.","CURRENTLY_REFRESHING_BUILD":"Actualisation de la construction en cours…","REFRESHING_BUILD_DONE":"Actualisation de la construction terminée","FAILED_TO_LAUNCH_LEKTOR":"Impossible de lancer Lektor.","PROJECT":"Projet","CLOSE_PROJECT":"Fermer le projet","OPEN_PROJECT":"Ouvrir le projet","BROWSE_WEBSITE":"Ouvrir le site Web","VIEW_ADMIN_PANEL":"Voir le panneau administrateur","QUIT":"Quitter","FAILED_TO_LOAD_PROJECT":"Impossible de charger le projet :(","LOADING_PROJECT":"Chargement du projet…","INITIALIZING_LEKTOR":"Initialisation de Lektor…","QUIT_LEKTOR":"Quitter Lektor","FILE":"Fichier","UNDO":"Annuler","REDO":"Rétablir","CUT":"Couper","COPY":"Copier","PASTE":"Coller","SELECT_ALL":"Sélectionner tout","HELP":"Aide","VISIT_WEBSITE":"Visiter le site Web","INSTALL_SHELL_COMMAND":"Installer la commande shell","INSTALL_SHELL_COMMAND_QUESTION":"Voulez-vous installer la commande shell « lektor » ? Cela nécessite des droits administrateurs.","FAILED_TO_INSTALL_SHELL_COMMANDS":"Impossible d\'installer les commandes shell.","INSTALL_SHELL_COMMAND_SUCCESS":"La commande shell  a été correctement installée.","OPERATION_SUCCESS":"Succès","YES":"Oui","NO":"Non","OK":"OK","FAILED_TO_OPEN_CONTENT_FILE":"Impossible d\'ouvir le contenu du fichier","OPEN_OTHER_PROJECT":"Ouvrir un autre projet","OPEN_OTHER_PROJECT_QUESTION":"Ouvrir ce fichier nécessite d\'ouvrir un autre projet (%s). Le projet actuel sera fermé. Voulez-vous vraiment continuer ?"}');

/***/ }),

/***/ "../../translations/it.json":
/*!**********************************!*\
  !*** ../../translations/it.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"Torna al sito web","UNLOAD_ACTIVE_TAB":"Hai informazioni non salvate, sei sicuro di voler abbandonare questa pagina?","EDIT_METADATA":"Modifica metadati","EDIT":"Modifica","DELETE":"Cancella","PREVIEW":"Anteprima","ALTS":"Alternative","PRIMARY_ALT":"Primaria","PRIMARY_OVERLAY":"Sovrascritta","ADD_CHILD_PAGE":"Aggiungi pagina","ADD_ATTACHMENT":"Aggiungi allegato","ATTACHMENT_ACTIONS":"Azioni sull\'allegato","PAGE_ACTIONS":"Azioni sulla pagina","NO_CHILD_PAGES":"Nessuna sottopagina","CHILD_PAGES":"Sottopagine","NO_ATTACHMENTS":"Nessun alleagto","ATTACHMENTS":"Allegati","ADD_ATTACHMENT_TO":"Aggiungi allegato a “%s”","ADD_ATTACHMENT_NOTE":"Puoi caricare un allegato qui.","UPLOAD":"Carica","PROGRESS":"Avanzamento","ERROR_PREFIX":"Errore: ","ERROR_NO_ID_PROVIDED":"Nessun ID fornito.","ERROR_PAGE_ID_DUPLICATE":"Una pagina con questo ID (%s) esiste già.","ERROR_INVALID_ID":"ID non valido","ERROR_INVALID_DATE":"Data non valida","ERROR_INVALID_NUMBER":"Non è un numero valido","ERROR_INVALID_URL":"Non è un indirizzo valido","ERROR":"Errore","ERROR_OCURRED":"È capitato un errore","ERROR_REQUEST_FAILED":"Impossibile inviare comandi al server.  Magari il server è stato spento o è sovraccarico?","ERROR_SERVER_UNAVAILABLE":"Server non disponibile","ERROR_SERVER_UNAVAILABLE_MESSAGE":"Il server non risponde.  Può essere spento o un errore critico l\'ha reso non operativo ed è necessario riavviarlo.","MODEL":"Modello","ADD_CHILD_PAGE_TO":"Aggiungi sottopagina a “%s”","ADD_CHILD_PAGE_NOTE":"Puoi aggiungere una nuova sottopagina qui.  Tieni presente che il modello o l\'ID non potranno essere cambiati facilmente in futuro.","CREATE_CHILD_PAGE":"Aggiungi sottopagina","DELETE_ATTACHMENT_PROMPT":"Vuoi veramente cancellare questo allegato?","DELETE_ATTACHMENT_ALT_PROMPT":"Vuoi veramente cancellare i metadati di questa alternativa all\'allegato?","DELETE_PAGE_PROMPT":"Vuoi veramente cancellare questa pagina?","DELETE_PAGE_ALT_PROMPT":"Vuoi veramente cancellare questa alternativa?","DELETE_PAGE_CHILDREN_WARNING":"Questo cancellerà anche le sottopagine di questa pagina.","DELETE_RECORD":"Cancella “%s”","DELETE_ALL_PAGE_ALTS":"Cancella anche tutte le alternative ed i file allegati.","DELETE_ALL_ATTACHMENT_ALTS":"Cancella tutte le alternative ed il file allegato.","DELETE_ONLY_PRIMARY_PAGE_ALT":"Cancella solo la pagina principale. Allegati, alternative e sottopagine nnon verranno cancellate.","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"Cancella solo i metadati dell\'allegato principale.","DELETE_PRIMARY_ALT_INFO":"Dato che questo oggetto è l\'alternativa primaria, può essere cancellato separatamente o insieme al resto del contenuto.","CHILD_PAGES_TO_BE_DELETED":"Sottopagine che verranno cancellate:","ALTS_TO_BE_DELETED":"Alternative che verranno cancellate:","ATTACHMENTS_TO_BE_DELETED":"Allegati che verranno cancellati:","YES_DELETE":"Si, cancella","NO_CANCEL":"No, annulla","SYSTEM_FIELDS":"Campi di sistema","EDIT_ATTACHMENT_METADATA_OF":"Modifica i metadati dell\'allegato “%s”","EDIT_PAGE_NAME":"Modifica “%s”","SAVE_CHANGES":"Salva modifiche","BROWSE_FS":"Apri nel filesystem","BROWSE_FS_MAC":"Apri in Finder","BROWSE_FS_WINDOWS":"Apri in Esplora risorse","ERROR_CANNOT_BROWSE_FS":"Errore: il file non esiste.","REMOVE_FLOWBLOCK_PROMPT":"Vuoi davvero cancellare questo blocco?","ADD_FLOWBLOCK":"Aggiungi blocco","INVALID_INPUT":"Input invalido","UP":"Su","DOWN":"Giù","REMOVE":"Rimuovi","ID":"ID","CLOSE":"Chiudi","CANCEL":"Annulla","BACK_TO_OVERVIEW":"Torna alla panoramica","PUBLISH":"Pubblica","PUBLISH_NOTE":"Da qui puoi pubblicare la versione corrente del sito web.","PUBLISH_SERVER":"Server di destinazione","CURRENTLY_PUBLISHING":"Pubblicazione in corso...","STATE":"Stato","PUBLISH_DONE":"Pubblicato","PUBLISH_STATE_BUILDING":"Costruendo le pagine modificate...","PUBLISH_STATE_PUBLISH":"Pubblicando le pagine modificate...","PUBLISH_STATE_DONE":"Pubblicazione completata.","FIND_FILES":"Trova i file","FIND_FILES_PLACEHOLDER":"Inserisci il nome della pagina...","ATTACHMENT_TYPE":"Tipo dell\'allegato","URL_SLUG":"Alias della pagina","TEMPLATE":"Template","HIDE_PAGE":"Nascondi pagina","HIDE_PAGE_EXPLANATION":"Questa pagina deve essere nascosta?","PAGE_IS_DISCOVERABLE":"La pagina può essere scoperta?","PAGE_IS_DISCOVERABLE_EXPLANATION":"Se è abilitato la pagina può essere scoperta, altrimenti l\'indirizzo deve essere noto.","REFRESH_BUILD":"Esegui build completa","REFRESH_BUILD_NOTE":"Questo cancella tutti i risultati precedenti, eseguendo una build completa.  Questo è utile in casi in cui errori di sincronizzazione o errori nei template rendono il risultato corrotto.","CURRENTLY_REFRESHING_BUILD":"Eseguendo build completa...","REFRESHING_BUILD_DONE":"Build completa eseguita!","FAILED_TO_LAUNCH_LEKTOR":"Impossibile eseguire Lektor.","PROJECT":"Progetto","CLOSE_PROJECT":"Chiudi progetto","OPEN_PROJECT":"Apri progetto","BROWSE_WEBSITE":"Naviga nel sito web","VIEW_ADMIN_PANEL":"Mostra pannello di amministrazione","QUIT":"Esci","FAILED_TO_LOAD_PROJECT":"Impossibile caricare il progetto :(","LOADING_PROJECT":"Caricamento del progetto...","INITIALIZING_LEKTOR":"Preparazione di Lektor...","QUIT_LEKTOR":"Esci da Lektor","FILE":"File","UNDO":"Annulla","REDO":"Ripeti","CUT":"Taglia","COPY":"Copia","PASTE":"Incolla","SELECT_ALL":"Seleziona tutto","HELP":"Aiuto","VISIT_WEBSITE":"Visita il sito web","INSTALL_SHELL_COMMAND":"Installa comando shell","INSTALL_SHELL_COMMAND_QUESTION":"Vuoi installare il comando shell \'lektor\'? Questo richiede privilegi di amministrazione.","FAILED_TO_INSTALL_SHELL_COMMANDS":"Impossibile installare il comando shell.","INSTALL_SHELL_COMMAND_SUCCESS":"Il comando shell è stato installato con successo.","OPERATION_SUCCESS":"Successo","YES":"Si","NO":"No","OK":"OK","FAILED_TO_OPEN_CONTENT_FILE":"Impossibile aprire il file di contenuto","OPEN_OTHER_PROJECT":"Apri un altro progetto","OPEN_OTHER_PROJECT_QUESTION":"Aprire questo file richiede l\'apertura di un altro progetto (%s). Il progetto corrente verrà chiuso. Vuoi proseguire?"}');

/***/ }),

/***/ "../../translations/ja.json":
/*!**********************************!*\
  !*** ../../translations/ja.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"Websiteに戻る","UNLOAD_ACTIVE_TAB":"保存していない編集があります、本当にページを離れますか?","EDIT_METADATA":"メタデータの編集","EDIT":"編集","DELETE":"削除","PREVIEW":"プレビュー","ALTS":"代替","PRIMARY_ALT":"プライマリー","PRIMARY_OVERLAY":"上書き","ADD_CHILD_PAGE":"ページの追加","ADD_ATTACHMENT":"アタッチメントの追加","ATTACHMENT_ACTIONS":"アタッチメントのアクション","PAGE_ACTIONS":"ページアクション","NO_CHILD_PAGES":"サブページはありません","CHILD_PAGES":"サブページ","NO_ATTACHMENTS":"アタッチメントはありません","ATTACHMENTS":"アタッチメント","ADD_ATTACHMENT_TO":"“%s”にアタッチメントを追加する","ADD_ATTACHMENT_NOTE":"ここに新しいアタッチメントをアップロードできます","UPLOAD":"アップロード","PROGRESS":"プログレス","ERROR_PREFIX":"エラー: ","ERROR_NO_ID_PROVIDED":"IDがありません","ERROR_PAGE_ID_DUPLICATE":"このID (%s) のページはすでに存在します","ERROR_INVALID_ID":"IDが不正です","ERROR_INVALID_DATE":"日付が不正です","ERROR_INVALID_NUMBER":"不正な番号です","ERROR_INVALID_URL":"URLが不正です","ERROR":"エラー","ERROR_OCURRED":"エラーが発生しました","ERROR_REQUEST_FAILED":"サーバーにコマンドが送れませんでした、サーバーが止まっているか応答がないのかもしれません","ERROR_SERVER_UNAVAILABLE":"サーバーアンアベイラブル","ERROR_SERVER_UNAVAILABLE_MESSAGE":"サーバーが応答しません、中断されたかクリティカルなエラーが発生したたためオペレーションが完了しなかったためリスタートが必要です。","MODEL":"モデル","ADD_CHILD_PAGE_TO":"“%s”にサブページを追加する","ADD_CHILD_PAGE_NOTE":"このページにサブページが作れます。注意: モデルまたはIDはその後簡単には変更できません。","CREATE_CHILD_PAGE":"チャイルドページを作る","DELETE_ATTACHMENT_PROMPT":"本当にこの添付を削除しますか？","DELETE_ATTACHMENT_ALT_PROMPT":"本当にこの添付代替のメタデータを削除しますか？","DELETE_PAGE_PROMPT":"このページを本当に削除しますか？","DELETE_PAGE_ALT_PROMPT":"この代替を本能に削除しますか?","DELETE_PAGE_CHILDREN_WARNING":"このページのサブページも削除されます","DELETE_RECORD":"“%s”を削除","DELETE_ALL_PAGE_ALTS":"すべての代替と添付も削除","DELETE_ALL_ATTACHMENT_ALTS":"すべての代替と添付を削除","DELETE_ONLY_PRIMARY_PAGE_ALT":"プライマリレコードのメタデータのみ削除。添付、代替、サブページは削除されません。","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"プライマリレコードのメタデータのみ削除","DELETE_PRIMARY_ALT_INFO":"このレコードはプライマリの代替のため、別に削除することも、他のすべてのコンポーネントともに削除することもできます。","CHILD_PAGES_TO_BE_DELETED":"サブページは削除されます:","ALTS_TO_BE_DELETED":"代替は削除されます:","ATTACHMENTS_TO_BE_DELETED":"添付は削除されます:","YES_DELETE":"はい、削除します","NO_CANCEL":"いいえ、キャンセルします","SYSTEM_FIELDS":"システムフィールド","EDIT_ATTACHMENT_METADATA_OF":"添付 “%s”のメタデータを編集","EDIT_PAGE_NAME":"“%s”を編集","SAVE_CHANGES":"編集を保存","BROWSE_FS":"ファイルシステムで閲覧する","BROWSE_FS_MAC":"ファインダーで開く","BROWSE_FS_WINDOWS":"エクスプローラで開く","ERROR_CANNOT_BROWSE_FS":"エラー: ファイルは存在しません","REMOVE_FLOWBLOCK_PROMPT":"このブロックを本当に削除しますか？","ADD_FLOWBLOCK":"ブロックを追加","INVALID_INPUT":"不正な入力","UP":"アップ","DOWN":"ダウン","REMOVE":"取り除く","ID":"ID","CLOSE":"閉じる","CANCEL":"キャンセル","BACK_TO_OVERVIEW":"オーバービューに戻る","PUBLISH":"公開","PUBLISH_NOTE":"ここから現行のウェブサイトを公開できます。","PUBLISH_SERVER":"ターゲットサーバー","CURRENTLY_PUBLISHING":"公開 …","STATE":"状態","PUBLISH_DONE":"公開中","PUBLISH_STATE_BUILDING":"変更がをビルドしています...","PUBLISH_STATE_PUBLISH":"変更が公開されました ...","PUBLISH_STATE_DONE":"公開完了","FIND_FILES":"ファイルを見つける","FIND_FILES_PLACEHOLDER":"ページ名を入力...","ATTACHMENT_TYPE":"添付タイプ","URL_SLUG":"URLストリング","TEMPLATE":"テンプレート","HIDE_PAGE":"ヘージを隠す","HIDE_PAGE_EXPLANATION":"このページを非表示にしますか?","PAGE_IS_DISCOVERABLE":"このページは外部から見ることが可能です","PAGE_IS_DISCOVERABLE_EXPLANATION":"有効にすることで、ページは発見可能になります、そうしない場合はアクセスするのにそのURLを知っている必要があります。","REFRESH_BUILD":"ビルドを更新","REFRESH_BUILD_NOTE":"これは、キャッシュ済みのビルド結果をすべて削除し、最初からの構築を開始します。同期のエラーやテンプレート内のミスにより出力が不正な場合に有効です。","CURRENTLY_REFRESHING_BUILD":"ビルドを更新中...","REFRESHING_BUILD_DONE":"ビルドを更新が完了しました!","FAILED_TO_LAUNCH_LEKTOR":"Lektorを開けるのに失敗しました","PROJECT":"プロジェクト","CLOSE_PROJECT":"プロジェクトを閉じる","OPEN_PROJECT":"プロジェクトを開ける","BROWSE_WEBSITE":"ブラウザで開く","VIEW_ADMIN_PANEL":"アドミンパネルを開く","QUIT":"終了","FAILED_TO_LOAD_PROJECT":"Failed to load the project :(","LOADING_PROJECT":"プロジェクトを読み込んでいます ...","INITIALIZING_LEKTOR":"Lektorを初期化しています ...","QUIT_LEKTOR":"Lektorを終了する","FILE":"ファイル","UNDO":"アンドゥー","REDO":"リドゥー","CUT":"カット","COPY":"コピー","PASTE":"ペースト","SELECT_ALL":"全てを選択","HELP":"ヘルプ","VISIT_WEBSITE":"Websiteを訪ねる","INSTALL_SHELL_COMMAND":"シェルコマンドをインストール","INSTALL_SHELL_COMMAND_QUESTION":"「lektor」のシェルコマンドをインストールしますか？。インストールするには管理権限が必要です。","FAILED_TO_INSTALL_SHELL_COMMANDS":"シェルコマンドのインストールに失敗しました。","INSTALL_SHELL_COMMAND_SUCCESS":"シェルコマンドのインストールに成功しました。","OPERATION_SUCCESS":"成功","YES":"はい","NO":"いいえ","OK":"了解","FAILED_TO_OPEN_CONTENT_FILE":"コンテンツファイルを開くのに失敗しました","OPEN_OTHER_PROJECT":"他のプロジェクトを開く","OPEN_OTHER_PROJECT_QUESTION":"このファイルを開くには、他のプロジェクト(%s)を開く必要があります。現在のプロジェクトは閉じられます、処理を継続しますか?"}');

/***/ }),

/***/ "../../translations/ko.json":
/*!**********************************!*\
  !*** ../../translations/ko.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"사이트로 되돌아가기","UNLOAD_ACTIVE_TAB":"저장되지 않은 정보가 있습니다. 페이지를 떠나시겠습니까?","EDIT_METADATA":"메타데이터 수정","EDIT":"수정","DELETE":"삭제","PREVIEW":"미리보기","ALTS":"다른 언어","PRIMARY_ALT":"기본","PRIMARY_OVERLAY":"겹친","ADD_CHILD_PAGE":"페이지 추가","ADD_ATTACHMENT":"첨부 파일 추가","ATTACHMENT_ACTIONS":"첨부 파일 작업","PAGE_ACTIONS":"페이지 작업","NO_CHILD_PAGES":"하위 페이지 없음","CHILD_PAGES":"하위 페이지","NO_ATTACHMENTS":"첨부 파일 없음","ATTACHMENTS":"첨부 파일","ADD_ATTACHMENT_TO":"“%s“에서 첨부 파일 추가","ADD_ATTACHMENT_NOTE":"여기서 새로운 첨부 파일을 업로드할 수 있습니다.","UPLOAD":"업로드","PROGRESS":"진행","ERROR_PREFIX":"에러: ","ERROR_NO_ID_PROVIDED":"제공된 ID가 없습니다.","ERROR_PAGE_ID_DUPLICATE":"이 ID (%s) 페이지는 이미 존재합니다.","ERROR_INVALID_ID":"잘못된 ID","ERROR_INVALID_DATE":"잘못된 날짜","ERROR_INVALID_NUMBER":"유효한 숫자 아님","ERROR_INVALID_URL":"유효한 URL 아님","ERROR":"에러","ERROR_OCURRED":"오류 발생","ERROR_REQUEST_FAILED":"서버에 명령을 보내지 못했습니다. 서버가 중지되었거나 응답하지 않을 수도 있네요?","ERROR_SERVER_UNAVAILABLE":"서버를 사용할 수 없음","ERROR_SERVER_UNAVAILABLE_MESSAGE":"서버가 응답하지 않습니다. 서버가 중지되었거나, 재시작을 필요로 하는 치명적인 오류가 발생했습니다.","MODEL":"모델","ADD_CHILD_PAGE_TO":"“%s”에 하위 페이지 추가","ADD_CHILD_PAGE_NOTE":"이 페이지에서 새로운 하위 페이지를 추가할 수 있습니다.  중요, 나중에 모델이나 ID를 변경하기 어렵습니다.","CREATE_CHILD_PAGE":"하위 페이지 추가","DELETE_ATTACHMENT_PROMPT":"정말로 첨부 파일을 삭제하실 건가요?","DELETE_ATTACHMENT_ALT_PROMPT":"정말로 첨부 파일의 다른 언어에 대한 메타데이터를 삭제하실 건가요?","DELETE_PAGE_PROMPT":"정말로 이 페이지를 삭제하실 건가요?","DELETE_PAGE_ALT_PROMPT":"정말로 이 다른 언어를 삭제하실 건가요?","DELETE_PAGE_CHILDREN_WARNING":"이 페이지의 하위 페이지 또한 삭제됩니다.","DELETE_RECORD":"“%s” 삭제","DELETE_ALL_PAGE_ALTS":"또한, 모든 다른 언어와 첨부 파일을 삭제합니다.","DELETE_ALL_ATTACHMENT_ALTS":"모든 다른 언어와 첨부 파일을 삭제합니다.","DELETE_ONLY_PRIMARY_PAGE_ALT":"오직 주 레코드만 삭제됩니다. 첨부 파일, 다른 언어, 하위 페이지는 삭제되지 않습니다.","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"오직 주 레코드의 메타데이터만 삭제됩니다.","DELETE_PRIMARY_ALT_INFO":"이 레코드는 기본 언어이기 때문에 별도로 삭제하거나 다른 콘텐츠 전부와 같이 삭제할 수 있습니다.","CHILD_PAGES_TO_BE_DELETED":"하위 페이지를 삭제합니다:","ALTS_TO_BE_DELETED":"다른 언어를 삭제합니다:","ATTACHMENTS_TO_BE_DELETED":"첨부 파일을 삭제합니다:","YES_DELETE":"네, 삭제","NO_CANCEL":"아니요, 취소","SYSTEM_FIELDS":"시스템 필드","EDIT_ATTACHMENT_METADATA_OF":"첨부 파일 “%s”의 메타데이터 수정","EDIT_PAGE_NAME":"“%s” 수정","SAVE_CHANGES":"변경 저장","BROWSE_FS":"파일 시스템 검색","BROWSE_FS_MAC":"파인더에서 검색","BROWSE_FS_WINDOWS":"탐색기에서 열기","ERROR_CANNOT_BROWSE_FS":"오류: 파일이 존재하지 않습니다.","REMOVE_FLOWBLOCK_PROMPT":"이 블록을 제거하시겠습니까?","ADD_FLOWBLOCK":"블록 추가","INVALID_INPUT":"잘못된 입력","UP":"위로","DOWN":"아래로","REMOVE":"제거","ID":"ID","CLOSE":"닫기","CANCEL":"취소","BACK_TO_OVERVIEW":"개요로 되돌아가기","PUBLISH":"발행","PUBLISH_NOTE":"여기서 웹사이트 현재 버전을 발행할 수 있습니다.","PUBLISH_SERVER":"대상 서버","CURRENTLY_PUBLISHING":"발행 중 ...","STATE":"상태","PUBLISH_DONE":"발행됨","PUBLISH_STATE_BUILDING":"변경 사항 빌드 중 ...","PUBLISH_STATE_PUBLISH":"변경 사항 발행 중 ...","PUBLISH_STATE_DONE":"발행 완료.","FIND_FILES":"파일 찾기","FIND_FILES_PLACEHOLDER":"페이지 이름 입력 ...","ATTACHMENT_TYPE":"첨부 파일 형식","URL_SLUG":"URL slug","TEMPLATE":"템플릿","HIDE_PAGE":"페이지 숨기기","HIDE_PAGE_EXPLANATION":"이 페이지를 숨길까요?","PAGE_IS_DISCOVERABLE":"페이지 다시보이기","PAGE_IS_DISCOVERABLE_EXPLANATION":"이 설정이 활성화되어있으면 페이지를 확인할 수 있습니다. 그렇지 않으면 URL만 확인할 수 있습니다.","REFRESH_BUILD":"새로운 빌드","REFRESH_BUILD_NOTE":"이 트리거는 처음부터 다시 빌드합니다. 그러면서 이전 빌드하면서 캐시된 결과를 삭제합니다. 이 기능은 동기화 오류나 템플릿에서 잘못된 설정으로 출력물에 문제가 있을 때 유용합니다.","CURRENTLY_REFRESHING_BUILD":"지금 새롭게 빌드 중 ...","REFRESHING_BUILD_DONE":"새로운 빌드를 완료하였습니다!","FAILED_TO_LAUNCH_LEKTOR":"실행하지 못하였습니다.","PROJECT":"프로젝트","CLOSE_PROJECT":"프로젝트 닫기","OPEN_PROJECT":"프로젝트 열기","BROWSE_WEBSITE":"웹사이트 찾아보기","VIEW_ADMIN_PANEL":"관리자 판넬 보기","QUIT":"나가기","FAILED_TO_LOAD_PROJECT":"프로젝트를 불러오지 못하였습니다. :(","LOADING_PROJECT":"프로젝트 불러오는 중 ...","INITIALIZING_LEKTOR":"Lektor 초기화 중 ...","QUIT_LEKTOR":"Lektor 나가기","FILE":"파일","UNDO":"실행 취소","REDO":"다시 실행","CUT":"잘라내기","COPY":"복사","PASTE":"붙여넣기","SELECT_ALL":"전부 선택","HELP":"도움말","VISIT_WEBSITE":"웹사이트 방문","INSTALL_SHELL_COMMAND":"쉘 커멘드 설치","INSTALL_SHELL_COMMAND_QUESTION":"\'lektor\' 쉘 명령을 설치하시겠습니까? 관리자 권한이 필요합니다.","FAILED_TO_INSTALL_SHELL_COMMANDS":"쉘 명령을 설치하지 못하였습니다.","INSTALL_SHELL_COMMAND_SUCCESS":"쉘 명령이 성공적으로 설치되었습니다.","OPERATION_SUCCESS":"완료","YES":"예","NO":"아니오","OK":"OK","FAILED_TO_OPEN_CONTENT_FILE":"현재 파일을 열지 못하였습니다.","OPEN_OTHER_PROJECT":"다른 프로젝트 열기","OPEN_OTHER_PROJECT_QUESTION":"열려는 파일은 다른 프로젝트 (%s)를 열어야합니다. 현재 프로젝트는 종료됩니다. 계속 하시겠습니까?"}');

/***/ }),

/***/ "../../translations/nl.json":
/*!**********************************!*\
  !*** ../../translations/nl.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"Terug naar Website","UNLOAD_ACTIVE_TAB":"U hebt niet-opgeslagen data, weet je zeker dat je deze pagina wil verlaten?","EDIT_METADATA":"Bewerk Metadata","EDIT":"Bewerk","DELETE":"Verwijderen","PREVIEW":"Voorbeeld","ALTS":"Alternatieven","PRIMARY_ALT":"Primair","PRIMARY_OVERLAY":"Overlapt","ADD_CHILD_PAGE":"Pagina toevoegen","ADD_ATTACHMENT":"Bijlage toevoegen","ATTACHMENT_ACTIONS":"Bijlage Acties","PAGE_ACTIONS":"Pagina Acties","NO_CHILD_PAGES":"Geen Subpagina\'s","CHILD_PAGES":"Subpagina\'s","NO_ATTACHMENTS":"Geen bijlages","ATTACHMENTS":"Bijlages","ADD_ATTACHMENT_TO":"Voeg bijlage toe aan “%s”","ADD_ATTACHMENT_NOTE":"Je kan hier een nieuwe bijlage uploaden.","UPLOAD":"Upload","PROGRESS":"Vooruitgang","ERROR_PREFIX":"Fout: ","ERROR_NO_ID_PROVIDED":"Geen ID gegeven.","ERROR_PAGE_ID_DUPLICATE":"Een pagina met deze ID (%s) bestaat al.","ERROR_INVALID_ID":"Ongeldige ID","ERROR_INVALID_DATE":"Ongeldige datum","ERROR_INVALID_NUMBER":"Geen geldig getal","ERROR_INVALID_URL":"Geen geldige URL","ERROR":"Fout","ERROR_OCURRED":"Er is een fout opgetreden","ERROR_REQUEST_FAILED":"Kon het commando niet naar de server sturen. Misschien is de server gestopt of reageert deze niet?","ERROR_SERVER_UNAVAILABLE":"Server niet beschikbaar","ERROR_SERVER_UNAVAILABLE_MESSAGE":"De server reageert niet. Deze was gestopt of door een kritieke fout niet langer operationeel en moet worden herstart.","MODEL":"Model","ADD_CHILD_PAGE_TO":"Voeg Subpagina toe aan “%s”","ADD_CHILD_PAGE_NOTE":"U kan hier een nieuwe subpagina toevoegen. Merk op dat het model of de ID achteraf niet makkelijk gewijzigd kunnen worden.","CREATE_CHILD_PAGE":"Subpagina Toevoegen","DELETE_ATTACHMENT_PROMPT":"Weet je zeker dat je deze bijlage wilt verwijderen?","DELETE_ATTACHMENT_ALT_PROMPT":"Weet je zeker dat je de metadata van dit bijlage alternatief wilt verwijderen?","DELETE_PAGE_PROMPT":"Weet je zeker dat je deze pagina wilt verwijderen?","DELETE_PAGE_ALT_PROMPT":"Weet je zeker dat je dit alternatief wilt verwijderen?","DELETE_PAGE_CHILDREN_WARNING":"Dit zal ook de subpagina\'s van deze pagina verwijderen.","DELETE_RECORD":"Verwijder “%s”","DELETE_ALL_PAGE_ALTS":"Verwijder ook de alternatieven en bijlages.","DELETE_ALL_ATTACHMENT_ALTS":"Verwijder alle alternatieven en bijlages.","DELETE_ONLY_PRIMARY_PAGE_ALT":"Verwijder enkel de primaire record. Bijlages, alternatieven en subpagina\'s zullen niet verwijderd worden.","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"Verwijder enkel de metadata van de primaire record.","DELETE_PRIMARY_ALT_INFO":"Omdat dit record een primair alternatief is, kan het apart verwijderd worden of samen met alle andere inhoud.","CHILD_PAGES_TO_BE_DELETED":"Subpagina\'s die verwijderd zullen worden:","ALTS_TO_BE_DELETED":"Alternatieven die verwijderd zullen worden:","ATTACHMENTS_TO_BE_DELETED":"Bijlages die verwijderd zullen worden:","YES_DELETE":"Ja, verwijder","NO_CANCEL":"Nee, annuleer","SYSTEM_FIELDS":"Systeem Velden","EDIT_ATTACHMENT_METADATA_OF":"Bewerk Metadata van Bijlage “%s”","EDIT_PAGE_NAME":"Bewerk “%s”","SAVE_CHANGES":"Wijzigingen opslaan","BROWSE_FS":"Blader in Bestandsysteem","BROWSE_FS_MAC":"Bekijk in Finder","BROWSE_FS_WINDOWS":"Open in Explorer","ERROR_CANNOT_BROWSE_FS":"Fout: Bestand bestaat nog niet.","REMOVE_FLOWBLOCK_PROMPT":"Weet je zeker dat je dit blok wilt verwijderen?","ADD_FLOWBLOCK":"Blok Toevoegen","INVALID_INPUT":"Ongeldige Invoer","UP":"Omhoog","DOWN":"Omlaag","REMOVE":"Verwijderen","ID":"ID","CLOSE":"Sluiten","CANCEL":"Annuleren","BACK_TO_OVERVIEW":"Terug naar Overzicht","PUBLISH":"Publiceren","PUBLISH_NOTE":"Van hieruit kan je de huidige versie van je website publiceren.","PUBLISH_SERVER":"Doelserver","CURRENTLY_PUBLISHING":"Publiceren …","STATE":"Status","PUBLISH_DONE":"Gepubliceerd","PUBLISH_STATE_BUILDING":"De wijzigingen worden gebouwd ...","PUBLISH_STATE_PUBLISH":"De wijzigingen worden gepuliceerd ...","PUBLISH_STATE_DONE":"Klaar met publiceren.","FIND_FILES":"Zoek bestanden","FIND_FILES_PLACEHOLDER":"Vul paginanaam in ...","ATTACHMENT_TYPE":"Type Bijlage","URL_SLUG":"URL slug","TEMPLATE":"Template","HIDE_PAGE":"Verberg pagina","HIDE_PAGE_EXPLANATION":"Moet deze pagina verborgen zijn?","PAGE_IS_DISCOVERABLE":"Deze pagina is vindbaar","PAGE_IS_DISCOVERABLE_EXPLANATION":"Als dit ingeschakeld is, is de pagina vindbaar. Anders moet de URL bekend zijn.","REFRESH_BUILD":"Ververs Build","REFRESH_BUILD_NOTE":"Dit verwijdert alle buildresultaten in de cache en veroorzaakt een volledige rebuild. Dit is nuttig in bepaalde situaties waar synchonisatiefouten of fouten in de templates de uitvoer corrupt hebben gemaakt.","CURRENTLY_REFRESHING_BUILD":"Bezig met verversen van de build ...","REFRESHING_BUILD_DONE":"Klaar met de build te verversen!","FAILED_TO_LAUNCH_LEKTOR":"Het starten van Lektor is mislukt.","PROJECT":"Project","CLOSE_PROJECT":"Sluit Project","OPEN_PROJECT":"Open Project","BROWSE_WEBSITE":"Bekijk Website","VIEW_ADMIN_PANEL":"Bekijk Admin Paneel","QUIT":"Afsluiten","FAILED_TO_LOAD_PROJECT":"Laden van het project is mislukt :(","LOADING_PROJECT":"Project laden ...","INITIALIZING_LEKTOR":"Lektor Initializeren ...","QUIT_LEKTOR":"Lektor Afsluiten","FILE":"Bestand","UNDO":"Ongedaan maken","REDO":"Opnieuw","CUT":"Knippen","COPY":"Kopiëren","PASTE":"Plakken","SELECT_ALL":"Selecteer alles","HELP":"Help","VISIT_WEBSITE":"Bezoek Website","INSTALL_SHELL_COMMAND":"Installeer Shell Commando","INSTALL_SHELL_COMMAND_QUESTION":"Weet je zeker dat je het \'lektor\' shell commando wil installeren? Dit vereist admin rechten.","FAILED_TO_INSTALL_SHELL_COMMANDS":"Installeren van de shell commando\'s mislukt.","INSTALL_SHELL_COMMAND_SUCCESS":"Shell commando\'s zijn geïnstalleerd.","OPERATION_SUCCESS":"Success","YES":"Ja","NO":"Nee","OK":"OK","FAILED_TO_OPEN_CONTENT_FILE":"Kon het inhoudbestand niet openen","OPEN_OTHER_PROJECT":"Open ander Project","OPEN_OTHER_PROJECT_QUESTION":"Om deze file te openen moet een ander project geopend worden (%s). Het huidige project zal gesloten worden. Wil je verdergaan?"}');

/***/ }),

/***/ "../../translations/pl.json":
/*!**********************************!*\
  !*** ../../translations/pl.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"Wróć do strony","UNLOAD_ACTIVE_TAB":"Masz niezapisane dane, czy na pewno chcesz opuścić tą stronę ?","EDIT_METADATA":"Edytuj dane","EDIT":"Edycja","DELETE":"Usuń","PREVIEW":"Podgląd","ALTS":"Wersje językowe","PRIMARY_ALT":"Podstawowy język","PRIMARY_OVERLAY":"(Nałożony)","ADD_CHILD_PAGE":"Dodaj podstronę","ADD_ATTACHMENT":"Dodaj załącznik","ATTACHMENT_ACTIONS":"Operacje na załącznikach","PAGE_ACTIONS":"Operacje na stronach","NO_CHILD_PAGES":"Brak podstron","CHILD_PAGES":"Podstrony","NO_ATTACHMENTS":"Brak załączników","ATTACHMENTS":"Załączniki","ADD_ATTACHMENT_TO":"Dodaj załącznik do “%s”","ADD_ATTACHMENT_NOTE":"Możesz wgrać nowy załącznik tutaj.","UPLOAD":"Wgraj","PROGRESS":"Postęp","ERROR_PREFIX":"Błąd: ","ERROR_NO_ID_PROVIDED":"Nie podano ID.","ERROR_PAGE_ID_DUPLICATE":"Strona z ID: (%s) już istnieje.","ERROR_INVALID_ID":"Błędny ID","ERROR_INVALID_DATE":"Błędna data","ERROR_INVALID_NUMBER":"Błędny numer","ERROR_INVALID_URL":"Błędny adres URL","ERROR":"Błąd","ERROR_OCURRED":"Wystąpił błąd","ERROR_REQUEST_FAILED":"Nie można wysłać żądania do serwera. Może został zatrzymany, albo nie odpowiada?","ERROR_SERVER_UNAVAILABLE":"Serwer niedostępny","ERROR_SERVER_UNAVAILABLE_MESSAGE":"Serwer nie odpowiada. Został zatrzymany, albo wystąpił błąd krytyczny, który spowodował brak działania. Być może musi zostać zrestartowany.","MODEL":"Model","ADD_CHILD_PAGE_TO":"Dodaj podstronę do “%s”","ADD_CHILD_PAGE_NOTE":"Możesz dodać podstronę tutaj. Pamiętaj, że Model oraz ID nie mogą być zmienione później w prosty sposób.","CREATE_CHILD_PAGE":"Dodaj podstronę","DELETE_ATTACHMENT_PROMPT":"Czy na pewno chcesz usunąć ten załącznik?","DELETE_ATTACHMENT_ALT_PROMPT":"Czy na pewno chcesz usunąć dane załącznika dla tego języka?","DELETE_PAGE_PROMPT":"Czy na pewno chcesz usunąć tą stronę?","DELETE_PAGE_ALT_PROMPT":"Czy na pewno chcesz usunąć ten język?","DELETE_PAGE_CHILDREN_WARNING":"To spowoduje także usunięcie wszystkich podstron.","DELETE_RECORD":"Skasuj “%s”","DELETE_ALL_PAGE_ALTS":"Usuń również wszystkie wersje językowe oraz załączniki.","DELETE_ALL_ATTACHMENT_ALTS":"Usuń wszystkie wersje językowe oraz załączony plik.","DELETE_ONLY_PRIMARY_PAGE_ALT":"Usuń tylko podstawowy rekord.  Załączniki, wersje językowe oraz podstrony nie będę usunięte.","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"Usuń tylko dane podstawowego rekordu.","DELETE_PRIMARY_ALT_INFO":"Ponieważ ten rekord zawiera podstawową wersję językową może zostać usunięty osobno jak i razem z pozostałą zawartością.","CHILD_PAGES_TO_BE_DELETED":"Podstrony, które zostaną usunięte:","ALTS_TO_BE_DELETED":"Wersje językowe, które zostaną usunięte:","ATTACHMENTS_TO_BE_DELETED":"Załączniki, które zostaną usunięte:","YES_DELETE":"Tak, usuń","NO_CANCEL":"Nie, anuluj","SYSTEM_FIELDS":"Pola Systemowe","EDIT_ATTACHMENT_METADATA_OF":"Edytuj dane załącznika “%s”","EDIT_PAGE_NAME":"Edytuj “%s”","SAVE_CHANGES":"Zapisz zmiany","BROWSE_FS":"Otwórz w przeglądarce plików","BROWSE_FS_MAC":"Otwórz w Finderze","BROWSE_FS_WINDOWS":"Otwórz w eksploratorze plików","ERROR_CANNOT_BROWSE_FS":"Błąd: Plik jeszcze nie istnieje.","REMOVE_FLOWBLOCK_PROMPT":"Czy na pewno chcesz usunąć ten blok ?","ADD_FLOWBLOCK":"Dodaj blok","INVALID_INPUT":"Błędne dane wejściowe","UP":"W górę","DOWN":"W dół","REMOVE":"Usuń","ID":"ID","CLOSE":"Zamknij","CANCEL":"Anuluj","BACK_TO_OVERVIEW":"Powrót do przeglądu","PUBLISH":"Publikuj","PUBLISH_NOTE":"Stąd możesz opublikować aktualną wersję strony.","PUBLISH_SERVER":"Serwer Docelowy","CURRENTLY_PUBLISHING":"Publikowanie …","STATE":"Status","PUBLISH_DONE":"Opublikowany","PUBLISH_STATE_BUILDING":"Zmiany są wprowadzane ...","PUBLISH_STATE_PUBLISH":"Zmiany są publikowane ...","PUBLISH_STATE_DONE":"Publikowanie zakończone.","FIND_FILES":"Znadź Pliki","FIND_FILES_PLACEHOLDER":"Podaj nazwę strony ...","ATTACHMENT_TYPE":"Typ załącznika","URL_SLUG":"Przyjazny URL","TEMPLATE":"Szablon","HIDE_PAGE":"Ukryj stronę","HIDE_PAGE_EXPLANATION":"Czy ta strona powinna być ukryta?","PAGE_IS_DISCOVERABLE":"Strona jest \'widoczna\'","PAGE_IS_DISCOVERABLE_EXPLANATION":"Jeśli włączone, strona jest widoczna na liście stron oraz w listingu dla danego rekordu. W przeciwnym razie, adres URL musi być znany","REFRESH_BUILD":"Zbuduj odświeżoną wersję","REFRESH_BUILD_NOTE":"To spowoduje usunięcie pamięci podręcznej i stworzenie wersji końcowej od nowa. Ta opcja jest przydatna w sytuacjach, gdzie błędy albo pomyłki synchronizacji w szablonach spowodowały uszkodzenie danych wyjściowych.","CURRENTLY_REFRESHING_BUILD":"Aktualnie odświeżam pakiet wyjściowy ...","REFRESHING_BUILD_DONE":"Zakończono odświeżanie pakietu wyjściowego!","FAILED_TO_LAUNCH_LEKTOR":"Nie udało się uruchomić Lektor.","PROJECT":"Projekt","CLOSE_PROJECT":"Zamknij projekt","OPEN_PROJECT":"Otwórz projekt","BROWSE_WEBSITE":"Przeglądaj stronę","VIEW_ADMIN_PANEL":"Przejdź do panelu administracyjnego","QUIT":"Wyjdź","FAILED_TO_LOAD_PROJECT":"Nie udało się załadować projektu :(","LOADING_PROJECT":"Ładowanie projektu ...","INITIALIZING_LEKTOR":"Inicjalizacja Lektor ...","QUIT_LEKTOR":"Opuść Lektor","FILE":"Plik","UNDO":"Cofnij","REDO":"Ponów","CUT":"Wytnij","COPY":"Kopiuj","PASTE":"Wklej","SELECT_ALL":"Zaznacz wszystko","HELP":"Pomoc","VISIT_WEBSITE":"Odwiedź stronę","INSTALL_SHELL_COMMAND":"Zainstaluj komendę powłoki","INSTALL_SHELL_COMMAND_QUESTION":"Czy chcesz zainstalować komendę \'lektor\' w powłoce systemowej? Wygamane są uprawnienia administracyjne.","FAILED_TO_INSTALL_SHELL_COMMANDS":"Nie udało się zainstalować komend w powłoce systemowej.","INSTALL_SHELL_COMMAND_SUCCESS":"Komenda została pomyślnie zainstalowana w powłoce systemowej.","OPERATION_SUCCESS":"Sukces","YES":"Tak","NO":"Nie","OK":"OK","FAILED_TO_OPEN_CONTENT_FILE":"Nie udało się otworzyć zawartości pliku","OPEN_OTHER_PROJECT":"Otwórz inny projekt","OPEN_OTHER_PROJECT_QUESTION":"Otwarcie tego pliku wymaga otwarcia kolejnego projektu (%s). Obecny projekt zostanie zamknięty. Czy chcesz kontynuować?"}');

/***/ }),

/***/ "../../translations/pt.json":
/*!**********************************!*\
  !*** ../../translations/pt.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"Retornar ao Site","UNLOAD_ACTIVE_TAB":"Você tem modificações não salvas, tem certeza que deseja deixar a página?","EDIT_METADATA":"Editar Metadado","EDIT":"Editar","DELETE":"Deletar","PREVIEW":"Pré-visualizar","ALTS":"Alternativas","PRIMARY_ALT":"Primária","PRIMARY_OVERLAY":"Revestida","ADD_CHILD_PAGE":"Add Página","ADD_ATTACHMENT":"Add Anexo","ATTACHMENT_ACTIONS":"Ações de Anexos","PAGE_ACTIONS":"Ações de Páginas","NO_CHILD_PAGES":"Sem sub-páginas","CHILD_PAGES":"Sub-páginas","NO_ATTACHMENTS":"Sem anexos","ATTACHMENTS":"Anexos","ADD_ATTACHMENT_TO":"Add anexo para “%s”","ADD_ATTACHMENT_NOTE":"Você pode subir um novo anexo aqui.","UPLOAD":"Upload","PROGRESS":"Progresso","ERROR_PREFIX":"Erro: ","ERROR_NO_ID_PROVIDED":"Nenhuma ID fornecida.","ERROR_PAGE_ID_DUPLICATE":"Uma página com este ID (%s) já existe.","ERROR_INVALID_ID":"ID inválido","ERROR_INVALID_DATE":"Data inválida","ERROR_INVALID_NUMBER":"Não é um número válido","ERROR_INVALID_URL":"Não é uma URL válida","ERROR":"Erro","ERROR_OCURRED":"Ocorreu um Erro","ERROR_REQUEST_FAILED":"Não foi possível enviar o comando ao servidor.  Talvez o servidor foi parado ou não está respondendo","ERROR_SERVER_UNAVAILABLE":"Servidor Não Disponível","ERROR_SERVER_UNAVAILABLE_MESSAGE":"O servidor não está respondendo.  Ou foi parado ou um erro sério o fez parar e precisa ser reiniciado.","MODEL":"Modelo","ADD_CHILD_PAGE_TO":"Add Sub-página para “%s”","ADD_CHILD_PAGE_NOTE":"Você pode adicionar uma nova sub-página aqui.  Note que o modelo ou o ID não podem ser mudados facilmente depois.","CREATE_CHILD_PAGE":"Add Página Filha","DELETE_ATTACHMENT_PROMPT":"Você tem certeza que deseja deletar este anexo?","DELETE_ATTACHMENT_ALT_PROMPT":"Você tem certeza que deseja deletar o metadado deste anexo alternativo?","DELETE_PAGE_PROMPT":"Você tem certeza que deseja deletar esta página","DELETE_PAGE_ALT_PROMPT":"Você tem certeza que deseja deletar esta alternativa?","DELETE_PAGE_CHILDREN_WARNING":"Isto também deletará as sub-páginas filhas desta página.","DELETE_RECORD":"Deletar “%s”","DELETE_ALL_PAGE_ALTS":"Também delete todas alternativas e arquivos de anexo.","DELETE_ALL_ATTACHMENT_ALTS":"Delete todas alternativas e arquivo de anexo","DELETE_ONLY_PRIMARY_PAGE_ALT":"Delete somente o registro primário.  Anexos, alternativas e sub-páginas não serão deletadas.","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"Delete somente o Metadado do registro primário.","DELETE_PRIMARY_ALT_INFO":"Porque este registro é uma alternativa primária ele pode ser deletado separadamente ou junto com todos os outros conteúdos.","CHILD_PAGES_TO_BE_DELETED":"Sub-páginas que serão deletadas:","ALTS_TO_BE_DELETED":"Alternativas que serão deletadas:","ATTACHMENTS_TO_BE_DELETED":"Anexos que serão deletados:","YES_DELETE":"Sim, deletar","NO_CANCEL":"Não, cancelar","SYSTEM_FIELDS":"Campos do Sistema","EDIT_ATTACHMENT_METADATA_OF":"Editar Metadado do Anexo “%s”","EDIT_PAGE_NAME":"Editar “%s”","SAVE_CHANGES":"Salvar Alterações","BROWSE_FS":"Navegar no Sistema","BROWSE_FS_MAC":"Mostrar no Finder","BROWSE_FS_WINDOWS":"Abrir no Explorer","ERROR_CANNOT_BROWSE_FS":"Erro: Arquivo não existe ainda.","REMOVE_FLOWBLOCK_PROMPT":"Você realmente deseja remover este bloco?","ADD_FLOWBLOCK":"Add Bloco","INVALID_INPUT":"Entrada Inválida","UP":"Cima","DOWN":"Baixo","REMOVE":"Remover","ID":"ID","CLOSE":"Fechar","CANCEL":"Cancelar","BACK_TO_OVERVIEW":"Voltar para Overview","PUBLISH":"Publicar","PUBLISH_NOTE":"Daqui você pode publicar a versão atual do website.","PUBLISH_SERVER":"Servidor Alvo","CURRENTLY_PUBLISHING":"Publicando …","STATE":"Status","PUBLISH_DONE":"Publicado","PUBLISH_STATE_BUILDING":"Mudanças estão sendo construídas ...","PUBLISH_STATE_PUBLISH":"Mudanças estão sendo publicadas ...","PUBLISH_STATE_DONE":"Publicação feita.","FIND_FILES":"Procurar Arquivos","FIND_FILES_PLACEHOLDER":"Entrar com o nome da página ...","ATTACHMENT_TYPE":"Tipo de anexo","URL_SLUG":"URL slug","TEMPLATE":"Template","HIDE_PAGE":"Esconder página","HIDE_PAGE_EXPLANATION":"Isto deveria ser escondido?","PAGE_IS_DISCOVERABLE":"Página é descobrível","PAGE_IS_DISCOVERABLE_EXPLANATION":"Se isto estiver ativo a página pode ser descoberta, caso contrário será necessário saber a URL.","REFRESH_BUILD":"Atualizar Build","REFRESH_BUILD_NOTE":"Isto deleta todos os resultados de builds em cache ativando uma build do zero.  Isto é útil em situações onde erros de sincronização ou erros no template causam saídas corrompidas.","CURRENTLY_REFRESHING_BUILD":"No momento atualizando a build ...","REFRESHING_BUILD_DONE":"Atualização da build feita!","FAILED_TO_LAUNCH_LEKTOR":"Falha ao iniciar o Lektor.","PROJECT":"Projeto","CLOSE_PROJECT":"Fechar Projeto","OPEN_PROJECT":"Abrir Projeto","BROWSE_WEBSITE":"Navegar no Website","VIEW_ADMIN_PANEL":"Ver Admin Painel","QUIT":"Sair","FAILED_TO_LOAD_PROJECT":"Falha ao carregar o projeto :(","LOADING_PROJECT":"Carregando o projeto ...","INITIALIZING_LEKTOR":"Iniciando o Lektor ...","QUIT_LEKTOR":"Sair do Lektor","FILE":"Arquivo","UNDO":"Desfazer","REDO":"Refazer","CUT":"Cortar","COPY":"Copiar","PASTE":"Colar","SELECT_ALL":"Selecionar Todos","HELP":"Ajuda","VISIT_WEBSITE":"Visitar Website","INSTALL_SHELL_COMMAND":"Instalar Shell Command","INSTALL_SHELL_COMMAND_QUESTION":"Você deseja instalar \'lektor\' shell command? Isto requer permissões de administrador.","FAILED_TO_INSTALL_SHELL_COMMANDS":"Falha ao instalar shell commands.","INSTALL_SHELL_COMMAND_SUCCESS":"Shell command foi instalado com sucesso.","OPERATION_SUCCESS":"Sucesso","YES":"Sim","NO":"Não","OK":"OK","FAILED_TO_OPEN_CONTENT_FILE":"Falha ao abrir o conteúdo do arquivo","OPEN_OTHER_PROJECT":"Abrir outro Projeto","OPEN_OTHER_PROJECT_QUESTION":"Abrir este arquivo requer abrir outro projeto (%s). O projeto atual será fechado. Deseja continuar?"}');

/***/ }),

/***/ "../../translations/ru.json":
/*!**********************************!*\
  !*** ../../translations/ru.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"Вернуться на вебсайт","UNLOAD_ACTIVE_TAB":"Ваши изменения не сохранены. Вы уверены, что хотите покинуть страницу?","EDIT_METADATA":"Редактировать метаданные","EDIT":"Редактировать","DELETE":"Удалить","PREVIEW":"Предпросмотр","ALTS":"Варианты","PRIMARY_ALT":"Основной","PRIMARY_OVERLAY":"Оверлей","ADD_CHILD_PAGE":"Добавить страницу","ADD_ATTACHMENT":"Приложить файл","ATTACHMENT_ACTIONS":"Действия с вложением","PAGE_ACTIONS":"Действия со страницей","NO_CHILD_PAGES":"Вложенные страницы отсутствуют","CHILD_PAGES":"Вложенные страницы","NO_ATTACHMENTS":"Вложенные файлы отсутствуют","ATTACHMENTS":"Вложенные файлы","ADD_ATTACHMENT_TO":"Приложить файл к странице “%s”","ADD_ATTACHMENT_NOTE":"Здесь вы можете загрузить новый файл.","UPLOAD":"Загрузить","PROGRESS":"Прогресс","ERROR_PREFIX":"Ошибка: ","ERROR_NO_ID_PROVIDED":"Ошибка: Отсутсует ID.","ERROR_PAGE_ID_DUPLICATE":"Страница с ID (%s) уже существует.","ERROR_INVALID_ID":"Некорректный ID","ERROR_INVALID_DATE":"Некорректная дата","ERROR_INVALID_NUMBER":"Некорректное число","ERROR_INVALID_URL":"Некорректный URL","ERROR":"Ошибка","ERROR_OCURRED":"Произошла ошибка","ERROR_REQUEST_FAILED":"Ошибка при отправке команды на сервер.  Возможно, сервер остановлен или не отвечает.","ERROR_SERVER_UNAVAILABLE":"Сервер недоступен","ERROR_SERVER_UNAVAILABLE_MESSAGE":"Сервер не отвечает. Возможно, сервер остановлен или произошла критическая ошибка. Перезапустите сервер.","MODEL":"Модель","ADD_CHILD_PAGE_TO":"Создать вложенную страницу для “%s”","ADD_CHILD_PAGE_NOTE":"Здесь вы можете создать новую вложенную страницу. Имейте в виду, что вы не сможете легко изменить модель и ID после создания страницы.","CREATE_CHILD_PAGE":"Создать вложенную страницу","DELETE_ATTACHMENT_PROMPT":"Вы действительно хотите удалить это вложение?","DELETE_ATTACHMENT_ALT_PROMPT":"Вы действительно хотите удалить этот вариант вложения?","DELETE_PAGE_PROMPT":"Вы действительно хотите удалить эту страницу?","DELETE_PAGE_ALT_PROMPT":"Вы действительно хотите удалить этот вариант страницы?","DELETE_PAGE_CHILDREN_WARNING":"Страница будет удалена вместе со всеми вложенными страницами.","DELETE_RECORD":"Удалить “%s”","DELETE_ALL_PAGE_ALTS":"Удалить все варианты страницы и вложенные файлы.","DELETE_ALL_ATTACHMENT_ALTS":"Удалить все варианты вложенного файла","DELETE_ONLY_PRIMARY_PAGE_ALT":"Удалить только основную версию.  Вложеннные страницы, файлы и другие варианты страницы не будут удалены.","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"Удалить только основную версию.","DELETE_PRIMARY_ALT_INFO":"Данная версия является основной и может быть удалена как отдельно, так и вместе со всем содержимым.","CHILD_PAGES_TO_BE_DELETED":"Вложенные страницы, которые будут удалены:","ALTS_TO_BE_DELETED":"Версии, которые будут удалены:","ATTACHMENTS_TO_BE_DELETED":"Вложенные файлы, которые будут удалены:","YES_DELETE":"Да, удалить","NO_CANCEL":"Отмена","SYSTEM_FIELDS":"Системные поля","EDIT_ATTACHMENT_METADATA_OF":"Редактировать метаданные вложения “%s”","EDIT_PAGE_NAME":"Редактировать “%s”","SAVE_CHANGES":"Сохранить изменения","BROWSE_FS":"Посмотреть в файловой системе","BROWSE_FS_MAC":"Открыть в Finder","BROWSE_FS_WINDOWS":"Открыть в Обозревателе","ERROR_CANNOT_BROWSE_FS":"Ошибка: Файл не существует.","REMOVE_FLOWBLOCK_PROMPT":"Вы действительно хотите удалить этот блок?","ADD_FLOWBLOCK":"Добавить блок","INVALID_INPUT":"Некорректный ввод","UP":"Вверх","DOWN":"Вниз","REMOVE":"Удалить","ID":"Идентификатор (ID)","CLOSE":"Закрыть","CANCEL":"Отмена","BACK_TO_OVERVIEW":"На стартовую страницу","PUBLISH":"Опубликовать","PUBLISH_NOTE":"Здесь вы можете опубликовать текущую версию вебсайта.","PUBLISH_SERVER":"Сервер","CURRENTLY_PUBLISHING":"Публикация …","STATE":"Статус","PUBLISH_DONE":"Публикация завершена","PUBLISH_STATE_BUILDING":"Сборка изменений ...","PUBLISH_STATE_PUBLISH":"Публикация изменений ...","PUBLISH_STATE_DONE":"Публикация завершена.","FIND_FILES":"Поиск файла","FIND_FILES_PLACEHOLDER":"Введите имя страницы ...","ATTACHMENT_TYPE":"Тип вложения","URL_SLUG":"Краткий заголовок для URL","TEMPLATE":"Шаблон","HIDE_PAGE":"Скрыть страницу","HIDE_PAGE_EXPLANATION":"Скрыть данную страницу?","REFRESH_BUILD":"Обновить сборку","REFRESH_BUILD_NOTE":"В некоторых ситуациях бывает полезно заново пересобрать страницы вебсайта: например, когда произошёл сбой синхронизации или ошибка в шаблоне привела к некорректному отображению вебсайта.","CURRENTLY_REFRESHING_BUILD":"Обновление сборки ...","REFRESHING_BUILD_DONE":"Сборка обновлена!","FAILED_TO_LAUNCH_LEKTOR":"Не удалось запустить Lektor.","PROJECT":"Проект","CLOSE_PROJECT":"Закрыть проект","OPEN_PROJECT":"Открыть проект","BROWSE_WEBSITE":"Открыть вебсайт","VIEW_ADMIN_PANEL":"Открыть админ-панель","QUIT":"Выйти","FAILED_TO_LOAD_PROJECT":"Не удалось загрузить проект :(","LOADING_PROJECT":"Загрузка проекта ...","INITIALIZING_LEKTOR":"Инициализация Lektor ...","QUIT_LEKTOR":"Выйти из Lektor","FILE":"Файл","UNDO":"Отменить","REDO":"Повторить","CUT":"Вырезать","COPY":"Копировать","PASTE":"Вставить","SELECT_ALL":"Выделить всё","HELP":"Помощь","VISIT_WEBSITE":"Открыть вебсайт","INSTALL_SHELL_COMMAND":"Установить команду для терминала","INSTALL_SHELL_COMMAND_QUESTION":"Вы хотите установить команду \'lektor\' для терминала? Для этого необходимы права администратора.","FAILED_TO_INSTALL_SHELL_COMMANDS":"Не удалось установить команду для терминала.","INSTALL_SHELL_COMMAND_SUCCESS":"Команда для терминала была успешно установлена.","OPERATION_SUCCESS":"Операция завершена успешно","YES":"Да","NO":"Нет","OK":"ОК"}');

/***/ }),

/***/ "../../translations/zh.json":
/*!**********************************!*\
  !*** ../../translations/zh.json ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"RETURN_TO_WEBSITE":"回到網頁","UNLOAD_ACTIVE_TAB":"你還有未儲存的資訊，確定要離開這個頁面？","EDIT_METADATA":"編輯元資料","EDIT":"編輯","DELETE":"刪除","PREVIEW":"預覽","ALTS":"副語","PRIMARY_ALT":"主語","PRIMARY_OVERLAY":"Overlaid","ADD_CHILD_PAGE":"新增頁面","ADD_ATTACHMENT":"新增附件","ATTACHMENT_ACTIONS":"附件行為","PAGE_ACTIONS":"頁面行為","NO_CHILD_PAGES":"沒有附件","CHILD_PAGES":"子頁面","NO_ATTACHMENTS":"沒有附件","ATTACHMENTS":"附件","ADD_ATTACHMENT_TO":"新增附件到「%s」","ADD_ATTACHMENT_NOTE":"你可以在這裡上傳新的附件。","UPLOAD":"上傳","PROGRESS":"進度","ERROR_PREFIX":"錯誤：","ERROR_NO_ID_PROVIDED":"錯誤：沒有提供ID。","ERROR_PAGE_ID_DUPLICATE":"已經有頁面的ID跟這個ID（%s）一樣了。","ERROR_INVALID_ID":"無效的ID","ERROR_INVALID_DATE":"無效的日期","ERROR_INVALID_NUMBER":"無效的數字","ERROR_INVALID_URL":"無效的URL","ERROR":"錯誤","ERROR_OCURRED":"發生錯誤","ERROR_REQUEST_FAILED":"無法傳送指令到伺服器，可能它被關了或沒回應？","ERROR_SERVER_UNAVAILABLE":"伺服器掛掉了","ERROR_SERVER_UNAVAILABLE_MESSAGE":"伺服器目前沒回應，它可能已被關閉或是遇到嚴重錯誤導致無法運作，伺服器需要重新啟動。","MODEL":"模型","ADD_CHILD_PAGE_TO":"新增子面頁到 「%s」","ADD_CHILD_PAGE_NOTE":"你可以在這裡加入新的子頁面，注意模型及ID之後無法輕易更改。","CREATE_CHILD_PAGE":"新增子頁面","DELETE_ATTACHMENT_PROMPT":"真的要刪除這個附件？","DELETE_ATTACHMENT_ALT_PROMPT":"你真的想刪除這個副語附件的元資料嗎？","DELETE_PAGE_PROMPT":"真的要刪除這個頁面？","DELETE_PAGE_ALT_PROMPT":"你真的想刪除這個分支嗎？","DELETE_PAGE_CHILDREN_WARNING":"這也會把這個頁面的子頁面刪除。","DELETE_RECORD":"刪除「%s」","DELETE_ALL_PAGE_ALTS":"順便刪除所有副語及附加檔案。","DELETE_ALL_ATTACHMENT_ALTS":"刪除所有副語及附加檔案。","DELETE_ONLY_PRIMARY_PAGE_ALT":"只刪除主語的紀錄，附件、副語、及子頁面不會被刪除。","DELETE_ONLY_PRIMARY_ATTACHMENT_ALT":"只刪除主語紀錄的元資料。","DELETE_PRIMARY_ALT_INFO":"主語可以被單獨刪除，或是連同副語一起刪除。","CHILD_PAGES_TO_BE_DELETED":"即將被刪除的子頁面：","ALTS_TO_BE_DELETED":"即將被刪除的副語：","ATTACHMENTS_TO_BE_DELETED":"即將被刪除的附件：","YES_DELETE":"對，就是要把它刪掉！","NO_CANCEL":"還是不要好了...","SYSTEM_FIELDS":"系統欄位","EDIT_ATTACHMENT_METADATA_OF":"編輯附件「%s」的元資料","EDIT_PAGE_NAME":"編輯「%s」","SAVE_CHANGES":"儲存變更","BROWSE_FS":"用文件系統開啟","BROWSE_FS_MAC":"用Finder開啟","BROWSE_FS_WINDOWS":"用檔案總管開啟","ERROR_CANNOT_BROWSE_FS":"錯誤：檔案還沒有存在。","REMOVE_FLOWBLOCK_PROMPT":"你真的要刪掉這個區塊？","ADD_FLOWBLOCK":"新增區塊","INVALID_INPUT":"無效的輸入","UP":"上","DOWN":"下","REMOVE":"移除","ID":"ID","CLOSE":"關閉","CANCEL":"取消","BACK_TO_OVERVIEW":"回到總覽","PUBLISH":"發佈","PUBLISH_NOTE":"你可以在這裡發佈網站目前的版本。","PUBLISH_SERVER":"目標伺服器","CURRENTLY_PUBLISHING":"發佈中...","STATE":"狀態","PUBLISH_DONE":"已發佈","PUBLISH_STATE_BUILDING":"正在建置變更...","PUBLISH_STATE_PUBLISH":"正在發佈變更...","PUBLISH_STATE_DONE":"發佈完成。","FIND_FILES":"搜尋檔案","FIND_FILES_PLACEHOLDER":"輸入頁面名稱...","ATTACHMENT_TYPE":"附件類型","URL_SLUG":"URL縮略名","TEMPLATE":"模板","HIDE_PAGE":"隱藏頁面","HIDE_PAGE_EXPLANATION":"要隱藏這個頁面嗎？","PAGE_IS_DISCOVERABLE":"網頁可以被發現","PAGE_IS_DISCOVERABLE_EXPLANATION":"若啟用則這個頁面可以被發現，否則必須知道URL才能連結到這裡。","REFRESH_BUILD":"重新整理建置","REFRESH_BUILD_NOTE":"這會刪掉所有緩存的建置結果並導致重新置建。這在特殊情況（如同步錯誤、模板出錯等）下會有用。","CURRENTLY_REFRESHING_BUILD":"刷新建置中...","REFRESHING_BUILD_DONE":"完成刷新建置！","FAILED_TO_LAUNCH_LEKTOR":"啟動Lektor失敗。","PROJECT":"專案","CLOSE_PROJECT":"關閉專案","OPEN_PROJECT":"開啟專案","BROWSE_WEBSITE":"瀏覽網站","VIEW_ADMIN_PANEL":"查看管理員面板","QUIT":"離開","FAILED_TO_LOAD_PROJECT":"讀取專案失敗 QAQ","LOADING_PROJECT":"讀取專案中...","INITIALIZING_LEKTOR":"初始化Lektor中...","QUIT_LEKTOR":"離開Lektor","FILE":"檔案","UNDO":"復原","REDO":"重做","CUT":"剪下","COPY":"複製","PASTE":"貼上","SELECT_ALL":"全選","HELP":"說明","VISIT_WEBSITE":"參觀網站","INSTALL_SHELL_COMMAND":"安裝命令列模式","INSTALL_SHELL_COMMAND_QUESTION":"你想安裝lektor命令列模式嗎？ 這需要管理員權限。","FAILED_TO_INSTALL_SHELL_COMMANDS":"安裝命令列模式失敗。","INSTALL_SHELL_COMMAND_SUCCESS":"命令列模式安裝成功","OPERATION_SUCCESS":"成功","YES":"是","NO":"否","OK":"好","FAILED_TO_OPEN_CONTENT_FILE":"開啟檔案失敗","OPEN_OTHER_PROJECT":"開啟其它專案","OPEN_OTHER_PROJECT_QUESTION":"開啟這份檔案需要連同開啟另一個專案（%s），目前的專案將會被關閉，確定要繼續？"}');

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = __webpack_modules__;
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/chunk loaded */
/******/ 	(() => {
/******/ 		var deferred = [];
/******/ 		__webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ 			if(chunkIds) {
/******/ 				priority = priority || 0;
/******/ 				for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ 				deferred[i] = [chunkIds, fn, priority];
/******/ 				return;
/******/ 			}
/******/ 			var notFulfilled = Infinity;
/******/ 			for (var i = 0; i < deferred.length; i++) {
/******/ 				var [chunkIds, fn, priority] = deferred[i];
/******/ 				var fulfilled = true;
/******/ 				for (var j = 0; j < chunkIds.length; j++) {
/******/ 					if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ 						chunkIds.splice(j--, 1);
/******/ 					} else {
/******/ 						fulfilled = false;
/******/ 						if(priority < notFulfilled) notFulfilled = priority;
/******/ 					}
/******/ 				}
/******/ 				if(fulfilled) {
/******/ 					deferred.splice(i--, 1)
/******/ 					var r = fn();
/******/ 					if (r !== undefined) result = r;
/******/ 				}
/******/ 			}
/******/ 			return result;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/global */
/******/ 	(() => {
/******/ 		__webpack_require__.g = (function() {
/******/ 			if (typeof globalThis === 'object') return globalThis;
/******/ 			try {
/******/ 				return this || new Function('return this')();
/******/ 			} catch (e) {
/******/ 				if (typeof window === 'object') return window;
/******/ 			}
/******/ 		})();
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/jsonp chunk loading */
/******/ 	(() => {
/******/ 		// no baseURI
/******/ 		
/******/ 		// object to store loaded and loading chunks
/******/ 		// undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ 		// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ 		var installedChunks = {
/******/ 			"app": 0
/******/ 		};
/******/ 		
/******/ 		// no chunk on demand loading
/******/ 		
/******/ 		// no prefetching
/******/ 		
/******/ 		// no preloaded
/******/ 		
/******/ 		// no HMR
/******/ 		
/******/ 		// no HMR manifest
/******/ 		
/******/ 		__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/ 		
/******/ 		// install a JSONP callback for chunk loading
/******/ 		var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ 			var [chunkIds, moreModules, runtime] = data;
/******/ 			// add "moreModules" to the modules object,
/******/ 			// then flag all "chunkIds" as loaded and fire callback
/******/ 			var moduleId, chunkId, i = 0;
/******/ 			if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ 				for(moduleId in moreModules) {
/******/ 					if(__webpack_require__.o(moreModules, moduleId)) {
/******/ 						__webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ 					}
/******/ 				}
/******/ 				if(runtime) var result = runtime(__webpack_require__);
/******/ 			}
/******/ 			if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ 			for(;i < chunkIds.length; i++) {
/******/ 				chunkId = chunkIds[i];
/******/ 				if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ 					installedChunks[chunkId][0]();
/******/ 				}
/******/ 				installedChunks[chunkIds[i]] = 0;
/******/ 			}
/******/ 			return __webpack_require__.O(result);
/******/ 		}
/******/ 		
/******/ 		var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
/******/ 		chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ 		chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ 	})();
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module depends on other loaded chunks and execution need to be delayed
/******/ 	var __webpack_exports__ = __webpack_require__.O(undefined, ["vendor"], () => (__webpack_require__("./js/main.jsx")))
/******/ 	__webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/ 	
/******/ })()
;
//# sourceMappingURL=app.js.map